1!function(ln,on){"object"==typeof exports&&typeof module<"u"?on(exports):"function"==typeof define&&define.amd?define(["exports"],on):on((ln=typeof globalThis<"u"?globalThis:ln||self).Popper={})}(this,function(ln){"use strict";function on(O){if(null==O)return window;if("[object Window]"!==O.toString()){var V=O.ownerDocument;return V&&V.defaultView||window}return O}function er(O){return O instanceof on(O).Element||O instanceof Element}function X(O){return O instanceof on(O).HTMLElement||O instanceof HTMLElement}function bo(O){return typeof ShadowRoot<"u"&&(O instanceof on(O).ShadowRoot||O instanceof ShadowRoot)}var Di=Math.max,h=Math.min,zn=Math.round;function tr(){var O=navigator.userAgentData;return null!=O&&O.brands&&Array.isArray(O.brands)?O.brands.map(function(V){return V.brand+"/"+V.version}).join(" "):navigator.userAgent}function br(){return!/^((?!chrome|android).)*safari/i.test(tr())}function Yn(O,V,q){void 0===V&&(V=!1),void 0===q&&(q=!1);var J=O.getBoundingClientRect(),ge=1,ie=1;V&&X(O)&&(ge=O.offsetWidth>0&&zn(J.width)/O.offsetWidth||1,ie=O.offsetHeight>0&&zn(J.height)/O.offsetHeight||1);var me=(er(O)?on(O):window).visualViewport,ce=!br()&&q,ve=(J.left+(ce&&me?me.offsetLeft:0))/ge,Fe=(J.top+(ce&&me?me.offsetTop:0))/ie,Re=J.width/ge,De=J.height/ie;return{width:Re,height:De,top:Fe,right:ve+Re,bottom:Fe+De,left:ve,x:ve,y:Fe}}function St(O){var V=on(O);return{scrollLeft:V.pageXOffset,scrollTop:V.pageYOffset}}function Bn(O){return O?(O.nodeName||"").toLowerCase():null}function ji(O){return((er(O)?O.ownerDocument:O.document)||window.document).documentElement}function Ro(O){return Yn(ji(O)).left+St(O).scrollLeft}function hn(O){return on(O).getComputedStyle(O)}function qn(O){var V=hn(O);return/auto|scroll|overlay|hidden/.test(V.overflow+V.overflowY+V.overflowX)}function wt(O,V,q){void 0===q&&(q=!1);var J,ge,De,Rt,tt,ht,ie=X(V),me=X(V)&&(Rt=(De=V).getBoundingClientRect(),tt=zn(Rt.width)/De.offsetWidth||1,ht=zn(Rt.height)/De.offsetHeight||1,1!==tt||1!==ht),ce=ji(V),ve=Yn(O,me,q),Fe={scrollLeft:0,scrollTop:0},Re={x:0,y:0};return(ie||!ie&&!q)&&(("body"!==Bn(V)||qn(ce))&&(Fe=(J=V)!==on(J)&&X(J)?{scrollLeft:(ge=J).scrollLeft,scrollTop:ge.scrollTop}:St(J)),X(V)?((Re=Yn(V,!0)).x+=V.clientLeft,Re.y+=V.clientTop):ce&&(Re.x=Ro(ce))),{x:ve.left+Fe.scrollLeft-Re.x,y:ve.top+Fe.scrollTop-Re.y,width:ve.width,height:ve.height}}function No(O){var V=Yn(O),q=O.offsetWidth,J=O.offsetHeight;return Math.abs(V.width-q)<=1&&(q=V.width),Math.abs(V.height-J)<=1&&(J=V.height),{x:O.offsetLeft,y:O.offsetTop,width:q,height:J}}function m(O){return"html"===Bn(O)?O:O.assignedSlot||O.parentNode||(bo(O)?O.host:null)||ji(O)}function ee(O){return["html","body","#document"].indexOf(Bn(O))>=0?O.ownerDocument.body:X(O)&&qn(O)?O:ee(m(O))}function vo(O,V){var q;void 0===V&&(V=[]);var J=ee(O),ge=J===(null==(q=O.ownerDocument)?void 0:q.body),ie=on(J),me=ge?[ie].concat(ie.visualVie
vendor: 1,850 bytes, line 1
1wport||[],qn(J)?J:[]):J,ce=V.concat(me);return ge?ce:ce.concat(vo(m(me)))}function ds(O){return["table","td","th"].indexOf(Bn(O))>=0}function yo(O){return X(O)&&"fixed"!==hn(O).position?O.offsetParent:null}function Rr(O){for(var V=on(O),q=yo(O);q&&ds(q)&&"static"===hn(q).position;)q=yo(q);return q&&("html"===Bn(q)||"body"===Bn(q)&&"static"===hn(q).position)?V:q||function(J){var ge=/firefox/i.test(tr());if(/Trident/i.test(tr())&&X(J)&&"fixed"===hn(J).position)return null;var ie=m(J);for(bo(ie)&&(ie=ie.host);X(ie)&&["html","body"].indexOf(Bn(ie))<0;){var me=hn(ie);if("none"!==me.transform||"none"!==me.perspective||"paint"===me.contain||-1!==["transform","perspective"].indexOf(me.willChange)||ge&&"filter"===me.willChange||ge&&me.filter&&"none"!==me.filter)return ie;ie=ie.parentNode}return null}(O)||V}var x="top",Z="bottom",fe="right",pn="left",Le="auto",Te=[x,Z,fe,pn],Tn="start",En="end",hs="viewport",To="popper",se=Te.reduce(function(O,V){return O.concat([V+"-"+Tn,V+"-"+En])},[]),gi=[].concat(Te,[Le]).reduce(function(O,V){return O.concat([V,V+"-"+Tn,V+"-"+En])},[]),Oo=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Ui(O){var V=new Map,q=new Set,J=[];function ge(ie){q.add(ie.name),[].concat(ie.requires||[],ie.requiresIfExists||[]).forEach(function(me){if(!q.has(me)){var ce=V.get(me);ce&&ge(ce)}}),J.push(ie)}return O.forEach(function(ie){V.set(ie.name,ie)}),O.forEach(function(ie){q.has(ie.name)||ge(ie)}),J}function L(O,V){var q=V.getRootNode&&V.getRootNode();if(O.contains(V))return!0;if(q&&bo(q)){var J=V;do{if(J&&O.isSameNode(J))return!0;J=J.parentNode||J.host}while(J)}return!1}function Jt(O){return Object.assign({},O,{left:O.x,top:O.y,right:O.x+O.width,bottom:O.y+O.height})}function mi(O,V,q){return V===hs?Jt(function(J,ge){var ie=on(J),me=ji(J),ce=ie.visualVie
1wport,ve=me.clientWidth,Fe=me.clientHeight,Re=0,De=0;if(ce){ve=ce.width,Fe=ce.height;var Rt=br();(Rt||!Rt&&"fixed"===ge)&&(Re=ce.offsetLeft,De=ce.offsetTop)}return{width:ve,height:Fe,x:Re+Ro(J),y:De}}(O,q)):er(V)?((ie=Yn(J=V,!1,"fixed"===q)).top=ie.top+J.clientTop,ie.left=ie.left+J.clientLeft,ie.bottom=ie.top+J.clientHeight,ie.right=ie.left+J.clientWidth,ie.width=J.clientWidth,ie.height=J.clientHeight,ie.x=ie.left,ie.y=ie.top,ie):Jt(function(J){var ge,ie=ji(J),me=St(J),ce=null==(ge=J.ownerDocument)?void 0:ge.body,ve=Di(ie.scrollWidth,ie.clientWidth,ce?ce.scrollWidth:0,ce?ce.clientWidth:0),Fe=Di(ie.scrollHeight,ie.clientHeight,ce?ce.scrollHeight:0,ce?ce.clientHeight:0),Re=-me.scrollLeft+Ro(J),De=-me.scrollTop;return"rtl"===hn(ce||ie).direction&&(Re+=Di(ie.clientWidth,ce?ce.clientWidth:0)-ve),{width:ve,height:Fe,x:Re,y:De}}(ji(O)));var J,ie}function si(O){return O.split("-")[0]}function hr(O){return O.split("-")[1]}function In(O){return["top","bottom"].indexOf(O)>=0?"x":"y"}function Je(O){var V,q=O.reference,J=O.element,ge=O.placement,ie=ge?si(ge):null,me=ge?hr(ge):null,ce=q.x+q.width/2-J.width/2,ve=q.y+q.height/2-J.height/2;switch(ie){case x:V={x:ce,y:q.y-J.height};break;case Z:V={x:ce,y:q.y+q.height};break;case fe:V={x:q.x+q.width,y:ve};break;case pn:V={x:q.x-J.width,y:ve};break;default:V={x:q.x,y:q.y}}var Fe=ie?In(ie):null;if(null!=Fe){var Re="y"===Fe?"height":"width";switch(me){case Tn:V[Fe]=V[Fe]-(q[Re]/2-J[Re]/2);break;case En:V[Fe]=V[Fe]+(q[Re]/2-J[Re]/2)}}return V}function ue(O){return Object.assign({},{top:0,right:0,bottom:0,left:0},O)}function Nr(O,V){return V.reduce(function(q,J){return q[J]=O,q},{})}function pr(O,V){void 0===V&&(V={});var J=V.placement,ge=void 0===J?O.placement:J,ie=V.strategy,me=void 0===ie?O.strategy:ie,ce=V.boundary,ve=void 0===ce?"clippingParents":ce,Fe=V.rootBoundary,Re=void 0===Fe?hs:Fe,De=V.elementContext,Rt=void 0===De?To:De,tt=V.altBoundary,ht=void 0!==tt&&tt,xt=V.padding,it=void 0===xt?0:xt,pt=ue("number"!=typeof it?it:Nr(it,Te)),oe=O.rects.popper,lt=O.elements[ht?Rt===To?"reference":To:Rt],Ve=function Jr(O,V,q,J){var ve,Fe,Re,ge="clippingParents"===V?(Fe=vo(m(ve=O)),er(Re=["absolute","fixed"].indexOf(hn(ve).position)>=0&&X(ve)?Rr(ve):ve)?Fe.filter(function(De){return er(De)&&L(De,Re)&&"body"!==Bn(De)}):[]):[].concat(V),ie=[].concat(ge,[q]),ce=ie.reduce(function(ve,Fe){var Re=mi(O,Fe,J);
1return ve.top=Di(Re.top,ve.top),ve.right=h(Re.right,ve.right),ve.bottom=h(Re.bottom,ve.bottom),ve.left=Di(Re.left,ve.left),ve},mi(O,ie[0],J));return ce.width=ce.right-ce.left,ce.height=ce.bottom-ce.top,ce.x=ce.left,ce.y=ce.top,ce}(er(lt)?lt:lt.contextElement||ji(O.elements.popper),ve,Re,me),ct=Yn(O.elements.reference),k=Je({reference:ct,element:oe,strategy:"absolute",placement:ge}),Pt=Jt(Object.assign({},oe,k)),Tt=Rt===To?Pt:ct,We={top:Ve.top-Tt.top+pt.top,bottom:Tt.bottom-Ve.bottom+pt.bottom,left:Ve.left-Tt.left+pt.left,right:Tt.right-Ve.right+pt.right},Gt=O.modifiersData.offset;if(Rt===To&&Gt){var wn=Gt[ge];Object.keys(We).forEach(function(zt){var ui=[fe,Z].indexOf(zt)>=0?1:-1,yi=[x,Z].indexOf(zt)>=0?"y":"x";We[zt]+=wn[yi]*ui})}return We}var Li={placement:"bottom",modifiers:[],strategy:"absolute"};function Or(){for(var O=arguments.length,V=new Array(O),q=0;q<O;q++)V[q]=arguments[q];return!V.some(function(J){return!(J&&"function"==typeof J.getBoundingClientRect)})}function Rn(O){void 0===O&&(O={});var q=O.defaultModifiers,J=void 0===q?[]:q,ge=O.defaultOptions,ie=void 0===ge?Li:ge;return function(me,ce,ve){void 0===ve&&(ve=ie);var Fe,Re,De={placement:"bottom",orderedModifiers:[],options:Object.assign({},Li,ie),modifiersData:{},elements:{reference:me,popper:ce},attributes:{},styles:{}},Rt=[],tt=!1,ht={state:De,setOptions:function(it){var pt="function"==typeof it?it(De.options):it;xt(),De.options=Object.assign({},ie,De.options,pt),De.scrollParents={reference:er(me)?vo(me):me.contextElement?vo(me.contextElement):[],popper:vo(ce)};var Qe,oe,Ve,ct,lt=(Qe=[].concat(J,De.options.modifiers),oe=Qe.reduce(function(Ve,ct){var k=Ve[ct.name];return Ve[ct.name]=k?Object.assign({},k,ct,{options:Object.assign({},k.options,ct.options),data:Object.assign({},k.data,ct.data)}):ct,Ve},{}),Ve=Object.keys(oe).map(function(Ve){return oe[Ve]}),ct=Ui(Ve),Oo.reduce(function(k,Pt){return k.concat(ct.filter(function(Tt){return Tt.phase===Pt}))},[]));return De.orderedModifiers=lt.filter(function(Ve){return Ve.enabled}),De.orderedModifiers.forEach(function(Ve){var k=Ve.options,Tt=Ve.effect;if("function"==typeof Tt){var We=Tt({state:De,name:Ve.name,instance:ht,options:void 0===k?{}:k});Rt.push(We||function(){})}}),ht.update()},forceUpdate:function(){if(!tt){var it=De.elements,pt=it.reference,Qe=it.popper;if(Or(pt,Qe)){De.rects={reference:wt(pt,Rr(Qe),"fixed"===De.options.strategy),popper:No(Qe)},De.reset=!1,De.placement=De.options.placement,De.orderedModifiers.forEach(function(Tt){return De.modifiersData[Tt.name]=Object.assign({},Tt.data)});for(var oe=0;oe<De.orderedModifiers.length;oe++)if(!0!==De.reset){var lt=De.orderedModifiers[oe],Ve=lt.fn,ct=lt.options;"function"==typeof Ve&&(De=Ve({state:De,options:void 0===ct?{}:ct,name:lt.name,instance:ht})||De)}else De.reset=!1,oe=-1}}},update:(Fe=function(){return new Promise(function(it){ht.forceUpdate(),it(De)})},function(){return Re||(Re=new Promise(function(it){Promise.resolve().then(function(){Re=void 0,it(Fe())})})),Re}),destroy:function(){xt(),tt=!0}};if(!Or(me,ce))return ht;function xt(){Rt.forEach(function(it){return it()}),Rt=[]}return ht.setOptions(ve).then(function(it){!tt&&ve.onFirstUpdate&&ve.onFirstUpdate(it)}),ht}}var Be={passive:!0},fr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(O){var V=O.state,q=O.instance,J=O.options,ge=J.scroll,ie=void 0===ge||ge,me=J.resize,ce=void 0===me||me,ve=on(V.elements.popper),Fe=[].concat(V.scrollParents.reference,V.scrollParents.popper);return ie&&Fe.forEach(function(Re){Re.addEventListener("scroll",q.update,Be)}),ce&&ve.addEventListener("resize",q.update,Be),function(){ie&&Fe.forEach(function(Re){Re.removeEventListener("scroll",q.update,Be)}),ce&&ve.removeEventListener("resize",q.update,Be)}},data:{}},ps={name:"popperOffsets",enabled:!0,phase:"read",fn:function(O){var V=O.state;V.modifiersData[O.name]=Je({reference:V.rects.reference,element:V.rects.popper,strategy:"absolute",placement:V.placement})},data:{}},wo={top:"auto",right:"auto",bottom:"auto",left:"auto"};function fs(O){var V,q=O.popper,J=O.popperRect,ge=O.placement,ie=O.variation,me=O.offsets,ce=O.position,ve=O.gpuAcceleration,Fe=O.adaptive,Re=O.roundOffsets,De=O.isFixed,Rt=me.x,tt=void 0===Rt?0:Rt,ht=me.y,xt=void 0===ht?0:ht,it="function"==typeof Re?Re({x:tt,y:xt}):{x:tt,y:xt};tt=it.x,xt=it.y;var pt=me.hasOwnProperty("x"),Qe=me.hasOwnProperty("y"),oe=pn,lt=x,Ve=window;if(Fe){var ct=Rr(q),k="clientHeight",Pt="clientWidth";ct===on(q)&&"static"!==hn(ct=ji(q)).position&&"absolute"===ce&&(k="scrollHeight",Pt="scrollWidth"),(ge===x||(ge===pn||ge===fe)&&ie===En)&&(lt=Z,xt-=(De&&ct===Ve&&Ve.visualVie
1wport?Ve.visualViewport.height:ct[k])-J.height,xt*=ve?1:-1),(ge===pn||(ge===x||ge===Z)&&ie===En)&&(oe=fe,tt-=(De&&ct===Ve&&Ve.visualViewport?Ve.visualViewport.width:ct[Pt])-J.width,tt*=ve?1:-1)}var Tt,wn,zt,yi,mt,We=Object.assign({position:ce},Fe&&wo),Gt=!0===Re?(wn={x:tt,y:xt},zt=on(q),yi=wn.y,{x:zn(wn.x*(mt=zt.devicePixelRatio||1))/mt||0,y:zn(yi*mt)/mt||0}):{x:tt,y:xt};return tt=Gt.x,xt=Gt.y,Object.assign({},We,ve?((Tt={})[lt]=Qe?"0":"",Tt[oe]=pt?"0":"",Tt.transform=(Ve.devicePixelRatio||1)<=1?"translate("+tt+"px, "+xt+"px)":"translate3d("+tt+"px, "+xt+"px, 0)",Tt):((V={})[lt]=Qe?xt+"px":"",V[oe]=pt?tt+"px":"",V.transform="",V))}var vi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(O){var V=O.state,q=O.options,J=q.gpuAcceleration,ge=void 0===J||J,ie=q.adaptive,me=void 0===ie||ie,ce=q.roundOffsets,ve=void 0===ce||ce,Fe={placement:si(V.placement),variation:hr(V.placement),popper:V.elements.popper,popperRect:V.rects.popper,gpuAcceleration:ge,isFixed:"fixed"===V.options.strategy};null!=V.modifiersData.popperOffsets&&(V.styles.popper=Object.assign({},V.styles.popper,fs(Object.assign({},Fe,{offsets:V.modifiersData.popperOffsets,position:V.options.strategy,adaptive:me,roundOffsets:ve})))),null!=V.modifiersData.arrow&&(V.styles.arrow=Object.assign({},V.styles.arrow,fs(Object.assign({},Fe,{offsets:V.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:ve})))),V.attributes.popper=Object.assign({},V.attributes.popper,{"data-popper-placement":V.placement})},data:{}},Zr={name:"applyStyles",enabled:!0,phase:"write",fn:function(O){var V=O.state;Object.keys(V.elements).forEach(function(q){var J=V.styles[q]||{},ge=V.attributes[q]||{},ie=V.elements[q];X(ie)&&Bn(ie)&&(Object.assign(ie.style,J),Object.keys(ge).forEach(function(me){var ce=ge[me];!1===ce?ie.removeAttribute(me):ie.setAttribute(me,!0===ce?"":ce)}))})},effect:function(O){var V=O.state,q={popper:{position:V.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(V.elements.popper.style,q.popper),V.styles=q,V.elements.arrow&&Object.assign(V.elements.arrow.style,q.arrow),function(){Object.keys(V.elements).forEach(function(J){var ge=V.elements[J],ie=V.attributes[J]||{},me=Object.keys(V.styles.hasOwnProperty(J)?V.styles[J]:q[J]).reduce(function(ce,ve){return ce[ve]="",ce},{});X(ge)&&Bn(ge)&&(Object.assign(ge.style,me),Object.keys(ie).forEach(function(ce){ge.removeAttribute(ce)}))})}},requires:["computeStyles"]},et={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(O){var V=O.state,J=O.name,ge=O.options.offset,ie=void 0===ge?[0,0]:ge,me=gi.reduce(function(Re,De){return Re[De]=(tt=V.rects,ht=ie,xt=si(Rt=De),it=[pn,x].indexOf(xt)>=0?-1:1,Qe=(Qe=(pt="function"==typeof ht?ht(Object.assign({},tt,{placement:Rt})):ht)[0])||0,oe=((oe=pt[1])||0)*it,[pn,fe].indexOf(xt)>=0?{x:oe,y:Qe}:{x:Qe,y:oe}),Re;var Rt,tt,ht,xt,it,pt,Qe,oe},{}),ce=me[V.placement],Fe=ce.y;null!=V.modifiersData.popperOffsets&&(V.modifiersData.popperOffsets.x+=ce.x,V.modifiersData.popperOffsets.y+=Fe),V.modifiersData[J]=me}},Pu={left:"right",right:"left",bottom:"top",top:"bottom"};function xo(O){return O.replace(/left|right|bottom|top/g,function(V){return Pu[V]})}var gs={start:"end",end:"start"};function So(O){return O.replace(/start|end/g,function(V){return gs[V]})}var Ne={name:"flip",enabled:!0,phase:"main",fn:function(O){var V=O.state,q=O.options,J=O.name;if(!V.modifiersData[J]._skip){for(var ge=q.mainAxis,ie=void 0===ge||ge,me=q.altAxis,ce=void 0===me||me,ve=q.fallbackPlacements,Fe=q.padding,Re=q.boundary,De=q.rootBoundary,Rt=q.altBoundary,tt=q.flipVariations,ht=void 0===tt||tt,xt=q.allowedAutoPlacements,it=V.options.placement,pt=si(it),Qe=ve||(pt!==it&&ht?function(sn){if(si(sn)===Le)return[];var Nn=xo(sn);return[So(sn),Nn,So(Nn)]}(it):[xo(it)]),oe=[it].concat(Qe).reduce(function(sn,Nn){return sn.concat(si(Nn)===Le?function kt(O,V){void 0===V&&(V={});var ge=V.boundary,ie=V.rootBoundary,me=V.padding,ce=V.flipVariations,ve=V.allowedAutoPlacements,Fe=void 0===ve?gi:ve,Re=hr(V.placement),De=Re?ce?se:se.filter(function(ht){return hr(ht)===Re}):Te,Rt=De.filter(function(ht){return Fe.indexOf(ht)>=0});0===Rt.length&&(Rt=De);
1var tt=Rt.reduce(function(ht,xt){return ht[xt]=pr(O,{placement:xt,boundary:ge,rootBoundary:ie,padding:me})[si(xt)],ht},{});return Object.keys(tt).sort(function(ht,xt){return tt[ht]-tt[xt]})}(V,{placement:Nn,boundary:Re,rootBoundary:De,padding:Fe,flipVariations:ht,allowedAutoPlacements:xt}):Nn)},[]),lt=V.rects.reference,Ve=V.rects.popper,ct=new Map,k=!0,Pt=oe[0],Tt=0;Tt<oe.length;Tt++){var We=oe[Tt],Gt=si(We),wn=hr(We)===Tn,zt=[x,Z].indexOf(Gt)>=0,ui=zt?"width":"height",yi=pr(V,{placement:We,boundary:Re,rootBoundary:De,altBoundary:Rt,padding:Fe}),mt=zt?wn?fe:pn:wn?Z:x;lt[ui]>Ve[ui]&&(mt=xo(mt));var Bi=xo(mt),Nt=[];if(ie&&Nt.push(yi[Gt]<=0),ce&&Nt.push(yi[mt]<=0,yi[Bi]<=0),Nt.every(function(sn){return sn})){Pt=We,k=!1;break}ct.set(We,Nt)}if(k)for(var Fi=function(sn){var Nn=oe.find(function(Ti){var _t=ct.get(Ti);if(_t)return _t.slice(0,sn).every(function(Kt){return Kt})});if(Nn)return Pt=Nn,"break"},Vn=ht?3:1;Vn>0&&"break"!==Fi(Vn);Vn--);V.placement!==Pt&&(V.modifiersData[J]._skip=!0,V.placement=Pt,V.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Fn(O,V,q){return Di(O,h(V,q))}var nr={name:"preventOverflow",enabled:!0,phase:"main",fn:function(O){var Gi,gr,V=O.state,q=O.options,J=O.name,ge=q.mainAxis,ie=void 0===ge||ge,me=q.altAxis,ce=void 0!==me&&me,Rt=q.tether,tt=void 0===Rt||Rt,ht=q.tetherOffset,xt=void 0===ht?0:ht,it=pr(V,{boundary:q.boundary,rootBoundary:q.rootBoundary,padding:q.padding,altBoundary:q.altBoundary}),pt=si(V.placement),Qe=hr(V.placement),oe=!Qe,lt=In(pt),Ve="x"===lt?"y":"x",ct=V.modifiersData.popperOffsets,k=V.rects.reference,Pt=V.rects.popper,Tt="function"==typeof xt?xt(Object.assign({},V.rects,{placement:V.placement})):xt,We="number"==typeof Tt?{mainAxis:Tt,altAxis:Tt}:Object.assign({mainAxis:0,altAxis:0},Tt),Gt=V.modifiersData.offset?V.modifiersData.offset[V.placement]:null,wn={x:0,y:0};if(ct){if(ie){var zt,ui="y"===lt?x:pn,yi="y"===lt?Z:fe,mt="y"===lt?"height":"width",Bi=ct[lt],Nt=Bi+it[ui],Fi=Bi-it[yi],Vn=tt?-Pt[mt]/2:0,sn=Qe===Tn?k[mt]:Pt[mt],Nn=Qe===Tn?-Pt[mt]:-k[mt],Ti=V.elements.arrow,_t=tt&&Ti?No(Ti):{width:0,height:0},Kt=V.modifiersData["arrow#persistent"]?V.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ir=Kt[ui],vs=Kt[yi],Vi=Fn(0,k[mt],_t[mt]),Cn=oe?k[mt]/2-Vn-Vi-ir-We.mainAxis:sn-Vi-ir-We.mainAxis,jo=oe?-k[mt]/2+Vn+Vi+vs+We.mainAxis:Nn+Vi+vs+We.mainAxis,Pe=V.elements.arrow&&Rr(V.elements.arrow),qs=null!=(zt=Gt?.[lt])?zt:0,$s=Bi+jo-qs,Ur=Fn(tt?h(Nt,Bi+Cn-qs-(Pe?"y"===lt?Pe.clientTop||0:Pe.clientLeft||0:0)):Nt,Bi,tt?Di(Fi,$s):Fi);ct[lt]=Ur,wn[lt]=Ur-Bi}if(ce){var Ao,Zt=ct[Ve],Hi="y"===Ve?"height":"width",Ts=Zt+it["x"===lt?x:pn],Uo=Zt-it["x"===lt?Z:fe],Pi=-1!==[x,pn].indexOf(pt),ws=null!=(Ao=Gt?.[Ve])?Ao:0,xs=Pi?Ts:Zt-k[Hi]-Pt[Hi]-ws+We.altAxis,wi=Pi?Zt+k[Hi]+Pt[Hi]-ws-We.altAxis:Uo,Bo=tt&&Pi?(gr=Fn(xs,Zt,Gi=wi))>Gi?Gi:gr:Fn(tt?xs:Ts,Zt,tt?wi:Uo);ct[Ve]=Bo,wn[Ve]=Bo-Zt}V.modifiersData[J]=wn}},requiresIfExists:["offset"]},$n={name:"arrow",enabled:!0,phase:"main",fn:function(O){var V,Pt,Tt,q=O.state,J=O.name,ge=O.options,ie=q.elements.arrow,me=q.modifiersData.popperOffsets,ce=si(q.placement),ve=In(ce),Fe=[pn,fe].indexOf(ce)>=0?"height":"width";if(ie&&me){var Re=(Tt=q,ue("number"!=typeof(Pt="function"==typeof(Pt=ge.padding)?Pt(Object.assign({},Tt.rects,{placement:Tt.placement})):Pt)?Pt:Nr(Pt,Te))),De=No(ie),Rt="y"===ve?x:pn,tt="y"===ve?Z:fe,ht=q.rects.reference[Fe]+q.rects.reference[ve]-me[ve]-q.rects.popper[Fe],xt=me[ve]-q.rects.reference[ve],it=Rr(ie),pt=it?"y"===ve?it.clientHeight||0:it.clientWidth||0:0,Ve=pt/2-De[Fe]/2+(ht/2-xt/2),ct=Fn(Re[Rt],Ve,pt-De[Fe]-Re[tt]);q.modifiersData[J]=((V={})[ve]=ct,V.centerOffset=ct-Ve,V)}},effect:function(O){var V=O.state,q=O.options.element,J=void 0===q?"[data-popper-arrow]":q;null!=J&&("string"!=typeof J||(J=V.elements.popper.querySelector(J)))&&L(V.elements.popper,J)&&(V.elements.arrow=J)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Kn(O,V,q){return void 0===q&&(q={x:0,y:0}),{top:O.top-V.height-q.y,right:O.right-V.width+q.x,bottom:O.bottom-V.height+q.y,left:O.left-V.width-q.x}}function be(O){return[x,fe,Z,pn].some(function(V){return O[V]>=0})}var Jn={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(O){var V=O.state,q=O.name,J=V.rects.reference,ge=V.rects.popper,ie=V.modifiersData.preventOverflow,me=pr(V,{elementContext:"reference"}),ce=pr(V,{altBoundary:!0}),ve=Kn(me,J),Fe=Kn(ce,ge,ie),Re=be(ve),De=be(Fe);V.modifiersData[q]={referenceClippingOffsets:ve,popperEscapeOffsets:Fe,isReferenceHidden:Re,hasPopperEscaped:De},V.attributes.popper=Object.assign({},V.attributes.popper,{"data-popper-reference-hidden":Re,"data-popper-escaped":De})}},ms=Rn({defaultModifiers:[fr,ps,vi,Zr]}),jr=[fr,ps,vi,Zr,et,Ne,nr,$n,Jn],Qr=Rn({defaultModifiers:jr});ln.applyStyles=Zr,ln.arrow=$n,ln.computeStyles=vi,ln.createPopper=Qr,ln.createPopperLite=ms,ln.defaultModifiers=jr,ln.detectOverflow=pr,ln.eventListeners=fr,ln.flip=Ne,ln.hide=Jn,ln.offset=et,ln.popperGenerator=Rn,ln.popperOffsets=ps,ln.preventOverflow=nr,Object.defineProperty(ln,"__esModule",{value:!0})}),function(ln,on){"object"==typeof exports&&typeof module<"u"?module.exports=on():"function"==typeof define&&define.amd?define(on):(ln=typeof globalThis<"u"?globalThis:ln||self).bootstrap=on()}(this,function(){"use strict";const ln="transitionend",on=E=>{let p=E.getAttribute("data-bs-target");if(!p||"#"===p){let w=E.getAttribute("href");if(!w||!w.includes("#")&&!w.startsWith("."))return null;w.includes("#")&&!w.startsWith("#")&&(w=`#${w.split("#")[1]}`),p=w&&"#"!==w?w.trim():null}return p},er=E=>{const p=on(E);return p&&document.querySelector(p)?p:null},X=E=>{const p=on(E);return p?document.querySelector(p):null},bo=E=>{E.dispatchEvent(new Event(ln))},Di=E=>!(!E||"object"!=typeof E)&&(void 0!==E.jquery&&(E=E[0]),void 0!==E.nodeType),h=E=>
1Di(E)?E.jquery?E[0]:E:"string"==typeof E&&E.length>0?document.querySelector(E):null,zn=(E,p,w)=>{Object.keys(w).forEach(C=>{const N=w[C],F=p[C],Y=F&&Di(F)?"element":null==(ne=F)?`${ne}`:{}.toString.call(ne).match(/\s([a-z]+)/i)[1].toLowerCase();var ne;if(!new RegExp(N).test(Y))throw new TypeError(`${E.toUpperCase()}: Option "${C}" provided type "${Y}" but expected type "${N}".`)})},tr=E=>!(!Di(E)||0===E.getClientRects().length)&&"visible"===getComputedStyle(E).getPropertyValue("visibility"),br=E=>!E||E.nodeType!==Node.ELEMENT_NODE||!!E.classList.contains("disabled")||(void 0!==E.disabled?E.disabled:E.hasAttribute("disabled")&&"false"!==E.getAttribute("disabled")),Yn=E=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof E.getRootNode){const p=E.getRootNode();return p instanceof ShadowRoot?p:null}return E instanceof ShadowRoot?E:E.parentNode?Yn(E.parentNode):null},St=()=>{},ji=()=>{const{jQuery:E}=window;return E&&!document.body.hasAttribute("data-bs-no-jquery")?E:null},Ro=[],hn=()=>"rtl"===document.documentElement.dir,qn=E=>{var p;p=()=>{const w=ji();if(w){const C=E.NAME,N=w.fn[C];w.fn[C]=E.jQueryInterface,w.fn[C].Constructor=E,w.fn[C].noConflict=()=>(w.fn[C]=N,E.jQueryInterface)}},"loading"===document.readyState?(Ro.length||document.addEventListener("DOMContentLoaded",()=>{Ro.forEach(w=>w())}),Ro.push(p)):p()},wt=E=>{"function"==typeof E&&E()},No=(E,p,w=!0)=>{if(!w)return void wt(E);const C=(Y=>{if(!Y)return 0;let{transitionDuration:ne,transitionDelay:de}=window.getComputedStyle(Y);const te=Number.parseFloat(ne),xe=Number.parseFloat(de);return te||xe?(ne=ne.split(",")[0],de=de.split(",")[0],1e3*(Number.parseFloat(ne)+Number.parseFloat(de))):0})(p)+5;let N=!1;const F=({target:Y})=>{Y===p&&(N=!0,p.removeEventListener(ln,F),wt(E))};p.addEventListener(ln,F),setTimeout(()=>{N||bo(p)},C)},m=(E,p,w,C)=>{let N=E.indexOf(p);if(-1===N)return E[!w&&C?E.length-1:0];const F=E.length;return N+=w?1:-1,C&&(N=(N+F)%F),E[Math.max(0,Math.min(N,F-1))]},ee=/[^.]*(?=\..*)\.|.*/,vo=/\..*/,ds=/::\d+$/,yo={};let Rr=1;
1const x={mouseenter:"mouseover",mouseleave:"mouseout"},Z=/^(mouseenter|mouseleave)/i,fe=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function pn(E,p){return p&&`${p}::${Rr++}`||E.uidEvent||Rr++}function Le(E){const p=pn(E);return E.uidEvent=p,yo[p]=yo[p]||{},yo[p]}function Te(E,p,w=null){const C=Object.keys(E);for(let N=0,F=C.length;N<F;N++){const Y=E[C[N]];if(Y.originalHandler===p&&Y.delegationSelector===w)return Y}return null}function Tn(E,p,w){const C="string"==typeof p,N=C?w:p;let F=To(E);return fe.has(F)||(F=E),[C,N,F]}function En(E,p,w,C,N){if("string"!=typeof p||!E)return;if(w||(w=C,C=null),Z.test(p)){const Ye=qe=>function(st){if(!st.relatedTarget||st.relatedTarget!==st.delegateTarget&&!st.delegateTarget.contains(st.relatedTarget))return qe.call(this,st)};C?C=Ye(C):w=Ye(w)}const[F,Y,ne]=Tn(p,w,C),de=Le(E),te=de[ne]||(de[ne]={}),xe=Te(te,Y,F?w:null);if(xe)return void(xe.oneOff=xe.oneOff&&N);const pe=pn(Y,p.replace(ee,"")),gt=F?(Ye=E,qe=w,st=C,function rt(un){const Ft=Ye.querySelectorAll(qe);for(let{target:dt}=un;dt&&dt!==this;dt=dt.parentNode)for(let Vt=Ft.length;Vt--;)if(Ft[Vt]===dt)return un.delegateTarget=dt,rt.oneOff&&se.off(Ye,un.type,qe,st),st.apply(dt,[un]);return null}):function(Ye,qe){return function st(rt){return rt.delegateTarget=Ye,st.oneOff&&se.off(Ye,rt.type,qe),qe.apply(Ye,[rt])}}(E,w);var Ye,qe,st;gt.delegationSelector=F?w:null,gt.originalHandler=Y,gt.oneOff=N,gt.uidEvent=pe,te[pe]=gt,E.addEventListener(ne,gt,F)}function hs(E,p,w,C,N){const F=Te(p[w],C,N);F&&(E.removeEventListener(w,F,Boolean(N)),delete p[w][F.uidEvent])}function To(E){return E=E.replace(vo,""),x[E]||E}const se={on(E,p,w,C){En(E,p,w,C,!1)},one(E,p,w,C){En(E,p,w,C,!0)},off(E,p,w,C){if("string"!=typeof p||!E)return;const[N,F,Y]=Tn(p,w,C),ne=Y!==p,de=Le(E),te=p.startsWith(".");if(void 0!==F)return de&&de[Y]?void hs(E,de,Y,F,N?w:null):void 0;te&&Object.keys(de).forEach(pe=>{!function(gt,Ye,qe,st){const rt=Ye[qe]||{};Object.keys(rt).forEach(un=>{if(un.includes(st)){const Ft=rt[un];hs(gt,Ye,qe,Ft.originalHandler,Ft.delegationSelector)}})}(E,de,pe,p.slice(1))});const xe=de[Y]||{};Object.keys(xe).forEach(pe=>{const gt=pe.replace(ds,"");if(!ne||p.includes(gt)){const Ye=xe[pe];hs(E,de,Y,Ye.originalHandler,Ye.delegationSelector)}})},trigger(E,p,w){if("string"!=typeof p||!E)return null;const C=ji(),N=To(p),F=p!==N,Y=fe.has(N);let ne,de=!0,te=!0,xe=!1,pe=null;return F&&C&&(ne=C.Event(p,w),C(E).trigger(ne),de=!ne.isPropagationStopped(),te=!ne.isImmediatePropagationStopped(),xe=ne.isDefaultPrevented()),Y?(pe=document.createEvent("HTMLEvents"),pe.initEvent(N,de,!0)):pe=new CustomEvent(p,{bubbles:de,cancelable:!0}
1),void 0!==w&&Object.keys(w).forEach(gt=>{Object.defineProperty(pe,gt,{get:()=>w[gt]})}),xe&&pe.preventDefault(),te&&E.dispatchEvent(pe),pe.defaultPrevented&&void 0!==ne&&ne.preventDefault(),pe}},gi=new Map,Oo={set(E,p,w){gi.has(E)||gi.set(E,new Map);const C=gi.get(E);C.has(p)||0===C.size?C.set(p,w):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(C.keys())[0]}.`)},get:(E,p)=>gi.has(E)&&gi.get(E).get(p)||null,remove(E,p){if(!gi.has(E))return;const w=gi.get(E);w.delete(p),0===w.size&&gi.delete(E)}};class Ui{constructor(p){(p=h(p))&&(this._element=p,Oo.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Oo.remove(this._element,this.constructor.DATA_KEY),se.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(p=>{this[p]=null})}_queueCallback(p,w,C=!0){No(p,w,C)}static getInstance(p){return Oo.get(h(p),this.DATA_KEY)}static getOrCreateInstance(p,w={}){return this.getInstance(p)||new this(p,"object"==typeof w?w:null)}static get VERSION(){return"5.1.3"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const L=(E,p="hide")=>{const C=E.NAME;se.on(document,`click.dismiss${E.EVENT_KEY}`,`[data-bs-dismiss="${C}"]`,function(N){if(["A","AREA"].includes(this.tagName)&&N.preventDefault(),br(this))return;const F=X(this)||this.closest(`.${C}`);E.getOrCreateInstance(F)[p]()})};class Jt extends Ui{static get NAME(){return"alert"}close(){if(se.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const p=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,p)}_destroyElement(){this._element.remove(),se.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(p){return this.each(function(){const w=Jt.getOrCreateInstance(this);if("string"==typeof p){if(void 0===w[p]||p.startsWith("_")||"constructor"===p)throw new TypeError(`No method named "${p}"`);w[p](this)}})}}L(Jt,"close"),qn(Jt);const mi='[data-bs-toggle="button"]';class Jr extends Ui{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(p){return this.each(function(){const w=Jr.getOrCreateInstance(this);"toggle"===p&&w[p]()})}}function si(E){return"true"===E||"false"!==E&&(E===Number(E).toString()?Number(E):""===E||"null"===E?null:E)}function hr(E){return E.replace(/[A-Z]/g,p=>`-${p.toLowerCase()}`)}se.on(document,"click.bs.button.data-api",mi,E=>{E.preventDefault();const p=E.target.closest(mi);Jr.getOrCreateInstance(p).toggle()}),qn(Jr);const In={setDataAttribute(E,p,w){E.setAttribute(`data-bs-${hr(p)}`,w)},removeDataAttribute(E,p){E.removeAttribute(`data-bs-${hr(p)}`)},getDataAttributes(E){if(!E)return{};const p={};return Object.keys(E.dataset).filter(w=>w.startsWith("bs")).forEach(w=>{let C=w.replace(/^bs/,"");C=C.charAt(0).toLowerCase()+C.slice(1,C.length),p[C]=si(E.dataset[w])}),p},getDataAttribute:(E,p)=>si(E.getAttribute(`data-bs-${hr(p)}`)),offset(E){const p=E.getBoundingClientRect();return{top:p.top+window.pageYOffset,left:p.left+window.pageXOffset}},position:E=>({top:E.offsetTop,left:E.offsetLeft})},Je={find:(E,p=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(p,E)),findOne:(E,p=document.documentElement)=>Element.prototype.querySelector.call(p,E),children:(E,p)=>[].concat(...E.children).filter(w=>w.matches(p)),parents(E,p){const w=[];let C=E.parentNode;for(;C&&C.nodeType===Node.ELEMENT_NODE&&3!==C.nodeType;)C.matches(p)&&w.push(C),C=C.parentNode;return w},prev(E,p){let w=E.previousElementSibling;for(;w;){if(w.matches(p))return[w];w=w.previousElementSibling}return[]},next(E,p){let w=E.nextElementSibling;for(;w;){if(w.matches(p))return[w];w=w.nextElementSibling}return[]},focusableChildren(E){const p=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(w=>`${w}:not([tabindex^="-"])`).join(", ");return this.find(p,E).filter(w=>!br(w)&&tr(w))}},ue="carousel",Nr={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},pr={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"}
1,Li="next",Or="prev",Rn="left",Be="right",fr={ArrowLeft:Be,ArrowRight:Rn},ps="slid.bs.carousel",wo="active",fs=".active.carousel-item";class vi extends Ui{constructor(p,w){super(p),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(w),this._indicatorsElement=Je.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return Nr}static get NAME(){return ue}next(){this._slide(Li)}nextWhenVisible(){!document.hidden&&tr(this._element)&&this.next()}prev(){this._slide(Or)}pause(p){p||(this._isPaused=!0),Je.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(bo(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(p){p||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(p){this._activeElement=Je.findOne(fs,this._element);const w=this._getItemIndex(this._activeElement);if(!(p>this._items.length-1||p<0)){if(!this._isSliding)return w===p?(this.pause(),void this.cycle()):void this._slide(p>w?Li:Or,this._items[p]);
1se.one(this._element,ps,()=>this.to(p))}}_getConfig(p){return p={...Nr,...In.getDataAttributes(this._element),..."object"==typeof p?p:{}},zn(ue,p,pr),p}_handleSwipe(){const p=Math.abs(this.touchDeltaX);if(p<=40)return;const w=p/this.touchDeltaX;this.touchDeltaX=0,w&&this._slide(w>0?Be:Rn)}_addEventListeners(){this._config.keyboard&&se.on(this._element,"keydown.bs.carousel",p=>this._keydown(p)),"hover"===this._config.pause&&(se.on(this._element,"mouseenter.bs.carousel",p=>this.pause(p)),se.on(this._element,"mouseleave.bs.carousel",p=>this.cycle(p))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const p=F=>this._pointerEvent&&("pen"===F.pointerType||"touch"===F.pointerType),w=F=>{p(F)?this.touchStartX=F.clientX:this._pointerEvent||(this.touchStartX=F.touches[0].clientX)},C=F=>{this.touchDeltaX=F.touches&&F.touches.length>1?0:F.touches[0].clientX-this.touchStartX},N=F=>{p(F)&&(this.touchDeltaX=F.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(Y=>this.cycle(Y),500+this._config.interval))};Je.find(".carousel-item img",this._element).forEach(F=>{se.on(F,"dragstart.bs.carousel",Y=>Y.preventDefault())}),this._pointerEvent?(se.on(this._element,"pointerdown.bs.carousel",F=>w(F)),se.on(this._element,"pointerup.bs.carousel",F=>N(F)),this._element.classList.add("pointer-event")):(se.on(this._element,"touchstart.bs.carousel",F=>w(F)),se.on(this._element,"touchmove.bs.carousel",F=>C(F)),se.on(this._element,"touchend.bs.carousel",F=>N(F)))}_keydown(p){if(/input|textarea/i.test(p.target.tagName))return;const w=fr[p.key];w&&(p.preventDefault(),this._slide(w))}_getItemIndex(p){return this._items=p&&p.parentNode?Je.find(".carousel-item",p.parentNode):[],this._items.indexOf(p)}_getItemByOrder(p,w){return m(this._items,w,p===Li,this._config.wrap)}_triggerSlideEvent(p,w){const C=this._getItemIndex(p),N=this._getItemIndex(Je.findOne(fs,this._element));return se.trigger(this._element,"slide.bs.carousel",{relatedTarget:p,direction:w,from:N,to:C})}_setActiveIndicatorElement(p){if(this._indicatorsElement){const w=Je.findOne(".active",this._indicatorsElement);w.classList.remove(wo),w.removeAttribute("aria-current");const C=Je.find("[data-bs-target]",this._indicatorsElement);for(let N=0;N<C.length;N++)if(Number.parseInt(C[N].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(p)){C[N].classList.add(wo),C[N].setAttribute("aria-current","true");break}}}_updateInterval(){const p=this._activeElement||Je.findOne(fs,this._element);if(!p)return;const w=Number.parseInt(p.getAttribute("data-bs-interval"),10);w?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=w):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(p,w){const C=this._directionToOrder(p),N=Je.findOne(fs,this._element),F=this._getItemIndex(N),Y=w||this._getItemByOrder(C,N),ne=this._getItemIndex(Y),de=Boolean(this._interval),te=C===Li,xe=te?"carousel-item-start":"carousel-item-end",pe=te?"carousel-item-next":"carousel-item-prev",gt=this._orderToDirection(C);if(Y&&Y.classList.contains(wo))return void(this._isSliding=!1);if(this._isSliding||this._triggerSlideEvent(Y,gt).defaultPrevented||!N||!Y)return;this._isSliding=!0,de&&this.pause(),this._setActiveIndicatorElement(Y),this._activeElement=Y;const Ye=()=>{se.trigger(this._element,ps,{relatedTarget:Y,direction:gt,from:F,to:ne})};this._element.classList.contains("slide")?(Y.classList.add(pe),N.classList.add(xe),Y.classList.add(xe),this._queueCallback(()=>{Y.classList.remove(xe,pe),Y.classList.add(wo),N.classList.remove(wo,pe,xe),this._isSliding=!1,setTimeout(Ye,0)},N,!0)):(N.classList.remove(wo),Y.classList.add(wo),this._isSliding=!1,Ye()),de&&this.cycle()}_directionToOrder(p){return[Be,Rn].includes(p)?hn()?p===Rn?Or:Li:p===Rn?Li:Or:p}_orderToDirection(p){return[Li,Or].includes(p)?hn()?p===Or?Rn:Be:p===Or?Be:Rn:p}static carouselInterface(p,w){const C=vi.getOrCreateInstance(p,w);let{_config:N}=C;"object"==typeof w&&(N={...N,...w});
1const F="string"==typeof w?w:N.slide;if("number"==typeof w)C.to(w);else if("string"==typeof F){if(void 0===C[F])throw new TypeError(`No method named "${F}"`);C[F]()}else N.interval&&N.ride&&(C.pause(),C.cycle())}static jQueryInterface(p){return this.each(function(){vi.carouselInterface(this,p)})}static dataApiClickHandler(p){const w=X(this);if(!w||!w.classList.contains("carousel"))return;const C={...In.getDataAttributes(w),...In.getDataAttributes(this)},N=this.getAttribute("data-bs-slide-to");N&&(C.interval=!1),vi.carouselInterface(w,C),N&&vi.getInstance(w).to(N),p.preventDefault()}}se.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",vi.dataApiClickHandler),se.on(window,"load.bs.carousel.data-api",()=>{const E=Je.find('[data-bs-ride="carousel"]');for(let p=0,w=E.length;p<w;p++)vi.carouselInterface(E[p],vi.getInstance(E[p]))}),qn(vi);const Zr="collapse",et={toggle:!0,parent:null},Pu={toggle:"boolean",parent:"(null|element)"},xo="show",gs="collapse",So="collapsing",kt="collapsed",Ne=":scope .collapse .collapse",Fn='[data-bs-toggle="collapse"]';class nr extends Ui{constructor(p,w){super(p),this._isTransitioning=!1,this._config=this._getConfig(w),this._triggerArray=[];const C=Je.find(Fn);for(let N=0,F=C.length;N<F;N++){const Y=C[N],ne=er(Y),de=Je.find(ne).filter(te=>te===this._element);null!==ne&&de.length&&(this._selector=ne,this._triggerArray.push(Y))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return et}static get NAME(){return Zr}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let p,w=[];if(this._config.parent){const Y=Je.find(Ne,this._config.parent);w=Je.find(".collapse.show, .collapse.collapsing",this._config.parent).filter(ne=>!Y.includes(ne))}const C=Je.findOne(this._selector);if(w.length){const Y=w.find(ne=>C!==ne);if(p=Y?nr.getInstance(Y):null,p&&p._isTransitioning)return}if(se.trigger(this._element,"show.bs.collapse").defaultPrevented)return;w.forEach(Y=>{C!==Y&&nr.getOrCreateInstance(Y,{toggle:!1}).hide(),p||Oo.set(Y,"bs.collapse",null)});const N=this._getDimension();this._element.classList.remove(gs),this._element.classList.add(So),this._element.style[N]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const F=`scroll${N[0].toUpperCase()+N.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(So),this._element.classList.add(gs,xo),this._element.style[N]="",se.trigger(this._element,"shown.bs.collapse")},this._element,!0),this._element.style[N]=`${this._element[F]}px`}hide(){if(this._isTransitioning||!this._isShown()||se.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const p=this._getDimension();this._element.style[p]=`${this._element.getBoundingClientRect()[p]}px`,this._element.classList.add(So),this._element.classList.remove(gs,xo);const w=this._triggerArray.length;for(let C=0;C<w;C++){const N=this._triggerArray[C],F=X(N);F&&!this._isShown(F)&&this._addAriaAndCollapsedClass([N],!1)}this._isTransitioning=!0,this._element.style[p]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(So),this._element.classList.add(gs),se.trigger(this._element,"hidden.bs.collapse")},this._element,!0)}_isShown(p=this._element){return p.classList.contains(xo)}_getConfig(p){return(p={...et,...In.getDataAttributes(this._element),...p}).toggle=Boolean(p.toggle),p.parent=h(p.parent),zn(Zr,p,Pu),p}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const p=Je.find(Ne,this._config.parent);Je.find(Fn,this._config.parent).filter(w=>!p.includes(w)).forEach(w=>{const C=X(w);C&&this._addAriaAndCollapsedClass([w],this._isShown(C))})}_addAriaAndCollapsedClass(p,w){p.length&&p.forEach(C=>{w?C.classList.remove(kt):C.classList.add(kt),C.setAttribute("aria-expanded",w)})}static jQueryInterface(p){return this.each(function(){const w={};"string"==typeof p&&/show|hide/.test(p)&&(w.toggle=!1);const C=nr.getOrCreateInstance(this,w);
1if("string"==typeof p){if(void 0===C[p])throw new TypeError(`No method named "${p}"`);C[p]()}})}}se.on(document,"click.bs.collapse.data-api",Fn,function(E){("A"===E.target.tagName||E.delegateTarget&&"A"===E.delegateTarget.tagName)&&E.preventDefault();const p=er(this);Je.find(p).forEach(w=>{nr.getOrCreateInstance(w,{toggle:!1}).toggle()})}),qn(nr);var $n="top",Kn="bottom",be="right",Jn="left",ms="auto",jr=[$n,Kn,be,Jn],Qr="start",O="end",V="clippingParents",q="viewport",J="popper",ge="reference",ie=jr.reduce(function(E,p){return E.concat([p+"-"+Qr,p+"-"+O])},[]),me=[].concat(jr,[ms]).reduce(function(E,p){return E.concat([p,p+"-"+Qr,p+"-"+O])},[]),ce="beforeRead",Fe="afterRead",Re="beforeMain",Rt="afterMain",tt="beforeWrite",xt="afterWrite",it=[ce,"read",Fe,Re,"main",Rt,tt,"write",xt];function pt(E){return E?(E.nodeName||"").toLowerCase():null}function Qe(E){if(null==E)return window;if("[object Window]"!==E.toString()){var p=E.ownerDocument;return p&&p.defaultView||window}return E}function oe(E){return E instanceof Qe(E).Element||E instanceof Element}function lt(E){return E instanceof Qe(E).HTMLElement||E instanceof HTMLElement}function Ve(E){return typeof ShadowRoot<"u"&&(E instanceof Qe(E).ShadowRoot||E instanceof ShadowRoot)}const ct={name:"applyStyles",enabled:!0,phase:"write",fn:function(E){var p=E.state;Object.keys(p.elements).forEach(function(w){var C=p.styles[w]||{},N=p.attributes[w]||{},F=p.elements[w];lt(F)&&pt(F)&&(Object.assign(F.style,C),Object.keys(N).forEach(function(Y){var ne=N[Y];!1===ne?F.removeAttribute(Y):F.setAttribute(Y,!0===ne?"":ne)}))})},effect:function(E){var p=E.state,w={popper:{position:p.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(p.elements.popper.style,w.popper),p.styles=w,p.elements.arrow&&Object.assign(p.elements.arrow.style,w.arrow),function(){Object.keys(p.elements).forEach(function(C){var N=p.elements[C],F=p.attributes[C]||{},Y=Object.keys(p.styles.hasOwnProperty(C)?p.styles[C]:w[C]).reduce(function(ne,de){return ne[de]="",ne},{});lt(N)&&pt(N)&&(Object.assign(N.style,Y),Object.keys(F).forEach(function(ne){N.removeAttribute(ne)}))})}},requires:["computeStyles"]};function k(E){return E.split("-")[0]}function Pt(E,p){var w=E.getBoundingClientRect();return{width:w.width/1,height:w.height/1,top:w.top/1,right:w.right/1,bottom:w.bottom/1,left:w.left/1,x:w.left/1,y:w.top/1}}function Tt(E){var p=Pt(E),w=E.offsetWidth,C=E.offsetHeight;return Math.abs(p.width-w)<=1&&(w=p.width),Math.abs(p.height-C)<=1&&(C=p.height),{x:E.offsetLeft,y:E.offsetTop,width:w,height:C}}function We(E,p){var w=p.getRootNode&&p.getRootNode();if(E.contains(p))return!0;if(w&&Ve(w)){var C=p;do{if(C&&E.isSameNode(C))return!0;C=C.parentNode||C.host}while(C)}return!1}function Gt(E){return Qe(E).getComputedStyle(E)}function wn(E){return["table","td","th"].indexOf(pt(E))>=0}function zt(E){return((oe(E)?E.ownerDocument:E.document)||window.document).documentElement}function ui(E){return"html"===pt(E)?E:E.assignedSlot||E.parentNode||(Ve(E)?E.host:null)||zt(E)}function yi(E){return lt(E)&&"fixed"!==Gt(E).position?E.offsetParent:null}function mt(E){for(var p=Qe(E),w=yi(E);w&&wn(w)&&"static"===Gt(w).position;)w=yi(w);return w&&("html"===pt(w)||"body"===pt(w)&&"static"===Gt(w).position)?p:w||function(C){var N=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&<(C)&&"fixed"===Gt(C).position)return null;for(var F=ui(C);lt(F)&&["html","body"].indexOf(pt(F))<0;){var Y=Gt(F);if("none"!==Y.transform||"none"!==Y.perspective||"paint"===Y.contain||-1!==["transform","perspective"].indexOf(Y.willChange)||N&&"filter"===Y.willChange||N&&Y.filter&&"none"!==Y.filter)return F;F=F.parentNode}return null}(E)||p}function Bi(E){return["top","bottom"].indexOf(E)>=0?"x":"y"}var Nt=Math.max,Fi=Math.min,Vn=Math.round;function sn(E,p,w){return Nt(E,Fi(p,w))}function Nn(E){return Object.assign({},{top:0,right:0,bottom:0,left:0},E)}function Ti(E,p){return p.reduce(function(w,C){return w[C]=E,w},{})}const _t={name:"arrow",enabled:!0,phase:"main",fn:function(E){var p,qt,gn,w=E.state,C=E.name,N=E.options,F=w.elements.arrow,Y=w.modifiersData.popperOffsets,ne=k(w.placement),de=Bi(ne),te=[Jn,be].indexOf(ne)>=0?"height":"width";if(F&&Y){var xe=(gn=w,Nn("number"!=typeof(qt="function"==typeof(qt=N.padding)?qt(Object.assign({},gn.rects,{placement:gn.placement})):qt)?qt:Ti(qt,jr))),pe=Tt(F),gt="y"===de?$n:Jn,Ye="y"===de?Kn:be,qe=w.rects.reference[te]+w.rects.reference[de]-Y[de]-w.rects.popper[te],st=Y[de]-w.rects.reference[de],rt=mt(F),un=rt?"y"===de?rt.clientHeight||0:rt.clientWidth||0:0,bt=un/2-pe[te]/2+(qe/2-st/2),Ot=sn(xe[gt],bt,un-pe[te]-xe[Ye]);w.modifiersData[C]=((p={}
1)[de]=Ot,p.centerOffset=Ot-bt,p)}},effect:function(E){var p=E.state,w=E.options.element,C=void 0===w?"[data-popper-arrow]":w;null!=C&&("string"!=typeof C||(C=p.elements.popper.querySelector(C)))&&We(p.elements.popper,C)&&(p.elements.arrow=C)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Kt(E){return E.split("-")[1]}var ir={top:"auto",right:"auto",bottom:"auto",left:"auto"};function vs(E){var p,Wn,li,xn,w=E.popper,C=E.popperRect,N=E.placement,F=E.variation,Y=E.offsets,ne=E.position,de=E.gpuAcceleration,te=E.adaptive,xe=E.roundOffsets,pe=!0===xe?(li=(Wn=Y).y,xn=window.devicePixelRatio||1,{x:Vn(Vn(Wn.x*xn)/xn)||0,y:Vn(Vn(li*xn)/xn)||0}):"function"==typeof xe?xe(Y):Y,gt=pe.x,Ye=void 0===gt?0:gt,qe=pe.y,st=void 0===qe?0:qe,rt=Y.hasOwnProperty("x"),un=Y.hasOwnProperty("y"),Ft=Jn,dt=$n,Vt=window;if(te){var bt=mt(w),Ot="clientHeight",Qt="clientWidth";bt===Qe(w)&&"static"!==Gt(bt=zt(w)).position&&"absolute"===ne&&(Ot="scrollHeight",Qt="scrollWidth"),N!==$n&&(N!==Jn&&N!==be||F!==O)||(dt=Kn,st-=bt[Ot]-C.height,st*=de?1:-1),N!==Jn&&(N!==$n&&N!==Kn||F!==O)||(Ft=be,Ye-=bt[Qt]-C.width,Ye*=de?1:-1)}var qt,gn=Object.assign({position:ne},te&&ir);return Object.assign({},gn,de?((qt={})[dt]=un?"0":"",qt[Ft]=rt?"0":"",qt.transform=(Vt.devicePixelRatio||1)<=1?"translate("+Ye+"px, "+st+"px)":"translate3d("+Ye+"px, "+st+"px, 0)",qt):((p={})[dt]=un?st+"px":"",p[Ft]=rt?Ye+"px":"",p.transform="",p))}const Vi={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(E){var p=E.state,w=E.options,C=w.gpuAcceleration,N=void 0===C||C,F=w.adaptive,Y=void 0===F||F,ne=w.roundOffsets,de=void 0===ne||ne,te={placement:k(p.placement),variation:Kt(p.placement),popper:p.elements.popper,popperRect:p.rects.popper,gpuAcceleration:N};null!=p.modifiersData.popperOffsets&&(p.styles.popper=Object.assign({},p.styles.popper,vs(Object.assign({},te,{offsets:p.modifiersData.popperOffsets,position:p.options.strategy,adaptive:Y,roundOffsets:de})))),null!=p.modifiersData.arrow&&(p.styles.arrow=Object.assign({},p.styles.arrow,vs(Object.assign({},te,{offsets:p.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:de})))),p.attributes.popper=Object.assign({},p.attributes.popper,{"data-popper-placement":p.placement})},data:{}};var Cn={passive:!0};const jo={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(E){var p=E.state,w=E.instance,C=E.options,N=C.scroll,F=void 0===N||N,Y=C.resize,ne=void 0===Y||Y,de=Qe(p.elements.popper),te=[].concat(p.scrollParents.reference,p.scrollParents.popper);return F&&te.forEach(function(xe){xe.addEventListener("scroll",w.update,Cn)}),ne&&de.addEventListener("resize",w.update,Cn),function(){F&&te.forEach(function(xe){xe.removeEventListener("scroll",w.update,Cn)}),ne&&de.removeEventListener("resize",w.update,Cn)}},data:{}};var Pe={left:"right",right:"left",bottom:"top",top:"bottom"};function cn(E){return E.replace(/left|right|bottom|top/g,function(p){return Pe[p]})}var qs={start:"end",end:"start"};function $s(E){return E.replace(/start|end/g,function(p){return qs[p]})}function Ur(E){var p=Qe(E);return{scrollLeft:p.pageXOffset,scrollTop:p.pageYOffset}}function Ao(E){return Pt(zt(E)).left+Ur(E).scrollLeft}function ys(E){var p=Gt(E);return/auto|scroll|overlay|hidden/.test(p.overflow+p.overflowY+p.overflowX)}function Js(E){return["html","body","#document"].indexOf(pt(E))>=0?E.ownerDocument.body:lt(E)&&ys(E)?E:Js(ui(E))}function Zt(E,p){var w;void 0===p&&(p=[]);var C=Js(E),N=C===(null==(w=E.ownerDocument)?void 0:w.body),F=Qe(C),Y=N?[F].concat(F.visualViewport||[],ys(C)?C:[]):C,ne=p.concat(Y);return N?ne:ne.concat(Zt(ui(Y)))}function Hi(E){return Object.assign({},E,{left:E.x,top:E.y,right:E.x+E.width,bottom:E.y+E.height})}function Ts(E,p){return p===q?Hi((C=Qe(w=E),Y=(N=zt(w)).clientWidth,ne=N.clientHeight,de=0,te=0,(F=C.visualViewport)&&(Y=F.width,ne=F.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(de=F.offsetLeft,te=F.offsetTop)),{width:Y,height:ne,x:de+Ao(w),y:te})):lt(p)?function(w){var C=Pt(w);return C.top=C.top+w.clientTop,C.left=C.left+w.clientLeft,C.bottom=C.top+w.clientHeight,C.right=C.left+w.clientWidth,C.width=w.clientWidth,C.height=w.clientHeight,C.x=C.left,C.y=C.top,C}(p):Hi(function(w){var C,N=zt(w),F=Ur(w),Y=null==(C=w.ownerDocument)?void 0:C.body,ne=Nt(N.scrollWidth,N.clientWidth,Y?Y.scrollWidth:0,Y?Y.clientWidth:0),de=Nt(N.scrollHeight,N.clientHeight,Y?Y.scrollHeight:0,Y?Y.clientHeight:0),te=-F.scrollLeft+Ao(w),xe=-F.scrollTop;return"rtl"===Gt(Y||N).direction&&(te+=Nt(N.clientWidth,Y?Y.clientWidth:0)-ne),{width:ne,height:de,x:te,y:xe}}(zt(E)));var w,C,N,F,Y,ne,de,te}function Uo(E){var p,w=E.reference,C=E.element,N=E.placement,F=N?k(N):null,Y=N?Kt(N):null,ne=w.x+w.width/2-C.width/2,de=w.y+w.height/2-C.height/2;switch(F){case $n:p={x:ne,y:w.y-C.height};break;case Kn:p={x:ne,y:w.y+w.height};break;case be:p={x:w.x+w.width,y:de};break;case Jn:p={x:w.x-C.width,y:de};break;default:p={x:w.x,y:w.y}}var te=F?Bi(F):null;if(null!=te){var xe="y"===te?"height":"width";switch(Y){case Qr:p[te]=p[te]-(w[xe]/2-C[xe]/2);break;case O:p[te]=p[te]+(w[xe]/2-C[xe]/2)}}return p}function Pi(E,p){void 0===p&&(p={});var ai,li,xn,an,ho,ei,zo,lo,Sn,C=p.placement,N=void 0===C?E.placement:C,F=p.boundary,Y=void 0===F?V:F,ne=p.rootBoundary,de=void 0===ne?q:ne,te=p.elementContext,xe=void 0===te?J:te,pe=p.altBoundary,gt
1=void 0!==pe&&pe,Ye=p.padding,qe=void 0===Ye?0:Ye,st=Nn("number"!=typeof qe?qe:Ti(qe,jr)),un=E.rects.popper,Ft=E.elements[gt?xe===J?ge:J:xe],dt=(ai=oe(Ft)?Ft:Ft.contextElement||zt(E.elements.popper),xn=de,zo="clippingParents"===(li=Y)?(ho=Zt(ui(an=ai)),oe(ei=["absolute","fixed"].indexOf(Gt(an).position)>=0&<(an)?mt(an):an)?ho.filter(function(ci){return oe(ci)&&We(ci,ei)&&"body"!==pt(ci)}):[]):[].concat(li),Sn=(lo=[].concat(zo,[xn])).reduce(function(an,ho){var ei=Ts(ai,ho);return an.top=Nt(ei.top,an.top),an.right=Fi(ei.right,an.right),an.bottom=Fi(ei.bottom,an.bottom),an.left=Nt(ei.left,an.left),an},Ts(ai,lo[0])),Sn.width=Sn.right-Sn.left,Sn.height=Sn.bottom-Sn.top,Sn.x=Sn.left,Sn.y=Sn.top,Sn),Vt=Pt(E.elements.reference),bt=Uo({reference:Vt,element:un,strategy:"absolute",placement:N}),Ot=Hi(Object.assign({},un,bt)),Qt=xe===J?Ot:Vt,qt={top:dt.top-Qt.top+st.top,bottom:Qt.bottom-dt.bottom+st.bottom,left:dt.left-Qt.left+st.left,right:Qt.right-dt.right+st.right},gn=E.modifiersData.offset;if(xe===J&&gn){var Wn=gn[N];Object.keys(qt).forEach(function(ai){var li=[be,Kn].indexOf(ai)>=0?1:-1,xn=[$n,Kn].indexOf(ai)>=0?"y":"x";qt[ai]+=Wn[xn]*li})}return qt}const xs={name:"flip",enabled:!0,phase:"main",fn:function(E){var p=E.state,w=E.options,C=E.name;if(!p.modifiersData[C]._skip){for(var N=w.mainAxis,F=void 0===N||N,Y=w.altAxis,ne=void 0===Y||Y,de=w.fallbackPlacements,te=w.padding,xe=w.boundary,pe=w.rootBoundary,gt=w.altBoundary,Ye=w.flipVariations,qe=void 0===Ye||Ye,st=w.allowedAutoPlacements,rt=p.options.placement,un=k(rt),Ft=de||(un!==rt&&qe?function(ci){if(k(ci)===ms)return[];var Ei=cn(ci);return[$s(ci),Ei,$s(Ei)]}(rt):[cn(rt)]),dt=[rt].concat(Ft).reduce(function(ci,Ei){return ci.concat(k(Ei)===ms?function ws(E,p){void 0===p&&(p={});var N=p.boundary,F=p.rootBoundary,Y=p.padding,ne=p.flipVariations,de=p.allowedAutoPlacements,te=void 0===de?me:de,xe=Kt(p.placement),pe=xe?ne?ie:ie.filter(function(qe){return Kt(qe)===xe}):jr,gt=pe.filter(function(qe){return te.indexOf(qe)>=0});0===gt.length&&(gt=pe);var Ye=gt.reduce(function(qe,st){return qe[st]=Pi(E,{placement:st,boundary:N,rootBoundary:F,padding:Y})[k(st)],qe},{});return Object.keys(Ye).sort(function(qe,st){return Ye[qe]-Ye[st]})}(p,{placement:Ei,boundary:xe,rootBoundary:pe,padding:te,flipVariations:qe,allowedAutoPlacements:st}):Ei)},[]),Vt=p.rects.reference,bt=p.rects.popper,Ot=new Map,Qt=!0,qt=dt[0],gn=0;gn<dt.length;gn++){var Wn=dt[gn],ai=k(Wn),li=Kt(Wn)===Qr,xn=[$n,Kn].indexOf(ai)>=0,zo=xn?"width":"height",lo=Pi(p,{placement:Wn,boundary:xe,rootBoundary:pe,altBoundary:gt,padding:te}),co=xn?li?be:Jn:li?Kn:$n;Vt[zo]>bt[zo]&&(co=cn(co));var Sn=cn(co),an=[];if(F&&an.push(lo[ai]<=0),ne&&an.push(lo[co]<=0,lo[Sn]<=0),an.every(function(ci){return ci})){qt=Wn,Qt=!1;break}Ot.set(Wn,an)}if(Qt)for(var ho=function(ci){var Ei=dt.find(function(Co){var Mo=Ot.get(Co);if(Mo)return Mo.slice(0,ci).every(function(xr){return xr})});if(Ei)return qt=Ei,"break"},ei=qe?3:1;ei>0&&"break"!==ho(ei);ei--);p.placement!==qt&&(p.modifiersData[C]._skip=!0,p.placement=qt,p.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function wi(E,p,w){return void 0===w&&(w={x:0,y:0}),{top:E.top-p.height-w.y,right:E.right-p.width+w.x,bottom:E.bottom-p.height+w.y,left:E.left-p.width-w.x}}function Bo(E){return[$n,be,Kn,Jn].some(function(p){return E[p]>=0})}const Zs={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(E){var p=E.state,w=E.name,C=p.rects.reference,N=p.rects.popper,F=p.modifiersData.preventOverflow,Y=Pi(p,{elementContext:"reference"}),ne=Pi(p,{altBoundary:!0}),de=wi(Y,C),te=wi(ne,N,F),xe=Bo(de),pe=Bo(te);p.modifiersData[w]={referenceClippingOffsets:de,popperEscapeOffsets:te,isReferenceHidden:xe,hasPopperEscaped:pe},p.attributes.popper=Object.assign({},p.attributes.popper,{"data-popper-reference-hidden":xe,"data-popper-escaped":pe})}},Ss={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(E){var p=E.state,C=E.name,N=E.options.offset,F=void 0===N?[0,0]:N,Y=me.reduce(function(xe,pe){return xe[pe]=(Ye=p.rects,qe=F,st=k(gt=pe),rt=[Jn,$n].indexOf(st)>=0?-1:1,Ft=(Ft=(un="function"==typeof qe?qe(Object.assign({},Ye,{placement:gt})):qe)[0])||0,dt=((dt=un[1])||0)*rt,[Jn,be].indexOf(st)>=0?{x:dt,y:Ft}:{x:Ft,y:dt}),xe;var gt,Ye,qe,st,rt,un,Ft,dt},{}),ne=Y[p.placement],te=ne.y;null!=p.modifiersData.popperOffsets&&(p.modifiersData.popperOffsets.x+=ne.x,p.modifiersData.popperOffsets.y+=te),p.modifiersData[C]=Y}},Gi={name:"popperOffsets",enabled:!0,phase:"read",fn:function(E){var p=E.state;p.modifiersData[E.name]=Uo({reference:p.rects.reference,element:p.rects.popper,strategy:"absolute",placement:p.placement})},data:{}},gr={name:"preventOverflow",enabled:!0,phase:"main",fn:function(E){var p=E.state,w=E.options,C=E.name,N=w.mainAxis,F=void 0===N||N,Y=w.altAxis,ne=void 0!==Y&&Y,gt=w.tether,Ye=void 0===gt||gt,qe=w.tetherOffset,st=void 0===qe?0:qe,rt=Pi(p,{boundary:w.boundary,rootBoundary:w.rootBoundary,padding:w.padding,altBoundary:w.altBoundary}),un=k(p.placement),Ft=Kt(p.placement),dt=!Ft,Vt=Bi(un),bt="x"===Vt?"y":"x",Ot=p.modifiersData.popperOffsets,Qt=p.rects.reference,qt=p.rects.popper,gn="function"==typeof st?st(Object.assign({},p.rects,{placement:p.placement}
1)):st,Wn={x:0,y:0};if(Ot){if(F||ne){var ai="y"===Vt?$n:Jn,li="y"===Vt?Kn:be,xn="y"===Vt?"height":"width",zo=Ot[Vt],lo=Ot[Vt]+rt[ai],co=Ot[Vt]-rt[li],Sn=Ye?-qt[xn]/2:0,an=Ft===Qr?Qt[xn]:qt[xn],ho=Ft===Qr?-qt[xn]:-Qt[xn],ei=p.elements.arrow,ci=Ye&&ei?Tt(ei):{width:0,height:0},Ei=p.modifiersData["arrow#persistent"]?p.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Co=Ei[ai],Mo=Ei[li],xr=sn(0,Qt[xn],ci[xn]),mc=dt?Qt[xn]/2-Sn-xr-Co-gn:an-xr-Co-gn,jh=dt?-Qt[xn]/2+Sn+xr+Mo+gn:ho+xr+Mo+gn,Wu=p.elements.arrow&&mt(p.elements.arrow),Ja=p.modifiersData.offset?p.modifiersData.offset[p.placement][Vt]:0,Za=Ot[Vt]+mc-Ja-(Wu?"y"===Vt?Wu.clientTop||0:Wu.clientLeft||0:0),fu=Ot[Vt]+jh-Ja;if(F){var yc=sn(Ye?Fi(lo,Za):lo,zo,Ye?Nt(co,fu):co);Ot[Vt]=yc,Wn[Vt]=yc-zo}if(ne){var jt=Ot[bt],Qa=jt+rt["x"===Vt?$n:Jn],zu=jt-rt["x"===Vt?Kn:be],Tc=sn(Ye?Fi(Qa,Za):Qa,jt,Ye?Nt(zu,fu):zu);Ot[bt]=Tc,Wn[bt]=Tc-jt}}p.modifiersData[C]=Wn}},requiresIfExists:["offset"]};function xi(E,p,w){void 0===w&&(w=!1);var C=lt(p);lt(p)&&p.getBoundingClientRect();var N,F,Y=zt(p),ne=Pt(E),de={scrollLeft:0,scrollTop:0},te={x:0,y:0};return(C||!C&&!w)&&(("body"!==pt(p)||ys(Y))&&(de=(N=p)!==Qe(N)&<(N)?{scrollLeft:(F=N).scrollLeft,scrollTop:F.scrollTop}:Ur(N)),lt(p)?((te=Pt(p)).x+=p.clientLeft,te.y+=p.clientTop):Y&&(te.x=Ao(Y))),{x:ne.left+de.scrollLeft-te.x,y:ne.top+de.scrollTop-te.y,width:ne.width,height:ne.height}}function sc(E){var p=new Map,w=new Set,C=[];function N(F){w.add(F.name),[].concat(F.requires||[],F.requiresIfExists||[]).forEach(function(Y){if(!w.has(Y)){var ne=p.get(Y);ne&&N(ne)}}),C.push(F)}return E.forEach(function(F){p.set(F.name,F)}),E.forEach(function(F){w.has(F.name)||N(F)}),C}var Ha={placement:"bottom",modifiers:[],strategy:"absolute"};function Ki(){for(var E=arguments.length,p=new Array(E),w=0;w<E;w++)p[w]=arguments[w];return!p.some(function(C){return!(C&&"function"==typeof C.getBoundingClientRect)})}function As(E){void 0===E&&(E={});var w=E.defaultModifiers,C=void 0===w?[]:w,N=E.defaultOptions,F=void 0===N?Ha:N;return function(Y,ne,de){void 0===de&&(de=F);var te,xe,pe={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ha,F),modifiersData:{},elements:{reference:Y,popper:ne},attributes:{},styles:{}},gt=[],Ye=!1,qe={state:pe,setOptions:function(rt){var un="function"==typeof rt?rt(pe.options):rt;st(),pe.options=Object.assign({},F,pe.options,un),pe.scrollParents={reference:oe(Y)?Zt(Y):Y.contextElement?Zt(Y.contextElement):[],popper:Zt(ne)};var Ft,dt,bt,Ot,Vt=(Ft=[].concat(C,pe.options.modifiers),dt=Ft.reduce(function(bt,Ot){var Qt=bt[Ot.name];return bt[Ot.name]=Qt?Object.assign({},Qt,Ot,{options:Object.assign({},Qt.options,Ot.options),data:Object.assign({},Qt.data,Ot.data)}):Ot,bt},{}),bt=Object.keys(dt).map(function(bt){return dt[bt]}),Ot=sc(bt),it.reduce(function(Qt,qt){return Qt.concat(Ot.filter(function(gn){return gn.phase===qt}))},[]));return pe.orderedModifiers=Vt.filter(function(bt){return bt.enabled}),pe.orderedModifiers.forEach(function(bt){var Qt=bt.options,gn=bt.effect;if("function"==typeof gn){var Wn=gn({state:pe,name:bt.name,instance:qe,options:void 0===Qt?{}:Qt});gt.push(Wn||function(){})}}),qe.update()},forceUpdate:function(){if(!Ye){var rt=pe.elements,un=rt.reference,Ft=rt.popper;if(Ki(un,Ft)){pe.rects={reference:xi(un,mt(Ft),"fixed"===pe.options.strategy),popper:Tt(Ft)},pe.reset=!1,pe.placement=pe.options.placement,pe.orderedModifiers.forEach(function(gn){return pe.modifiersData[gn.name]=Object.assign({},gn.data)});for(var dt=0;dt<pe.orderedModifiers.length;dt++)if(!0!==pe.reset){var Vt=pe.orderedModifiers[dt],bt=Vt.fn,Ot=Vt.options;"function"==typeof bt&&(pe=bt({state:pe,options:void 0===Ot?{}:Ot,name:Vt.name,instance:qe})||pe)}else pe.reset=!1,dt=-1}}},update:(te=function(){return new Promise(function(rt){qe.forceUpdate(),rt(pe)})},function(){return xe||(xe=new Promise(function(rt){Promise.resolve().then(function(){xe=void 0,rt(te())})})),xe}),destroy:function(){st(),Ye=!0}};if(!Ki(Y,ne))return qe;function st(){gt.forEach(function(rt){return rt()}),gt=[]}return qe.setOptions(de).then(function(rt){!Ye&&de.onFirstUpdate&&de.onFirstUpdate(rt)}),qe}}var Qs=As(),Es=As({defaultModifiers:[jo,Gi,Vi,ct]}),Eo=As({defaultModifiers:[jo,Gi,Vi,ct,Ss,xs,gr,_t,Zs]});const Io=Object.freeze({__proto__:null,popperGenerator:As,detectOverflow:Pi,createPopperBase:Qs,createPopper:Eo,createPopperLite:Es,top:$n,bottom:Kn,right:be,left:Jn,auto:ms,basePlacements:jr,start:Qr,end:O,clippingParents:V,viewport:q,popper:J,reference:ge,variationPlacements:ie,placements:me,beforeRead:ce,read:"read",afterRead:Fe,beforeMain:Re,main:"main",afterMain:Rt,beforeWrite:tt,write:"write",afterWrite:xt,modifierPhases:it,applyStyles:ct,arrow:_t,computeStyles:Vi,eventListeners:jo,flip:xs,hide:Zs,offset:Ss,popperOffsets:Gi,preventOverflow:gr}),eo="dropdown",Fo="Escape",uc="ArrowUp",Is="ArrowDown",rr=new RegExp("ArrowUp|ArrowDown|Escape"),to="click.bs.dropdown.data-api",eu="keydown.bs.dropdown.data-api",Br="show",mr='[data-bs-toggle="dropdown"]',tu=".dropdown-menu",Nh=hn()?"top-end":"top-start",bu=hn()?"top-start":"top-end",ac=hn()?"bottom-end":"bottom-start",ft=hn()?"bottom-start":"bottom-end",fn=hn()?"left-start":"right-start",Si=hn()?"right-start":"left-start",vr={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},Yt={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"str
1ing",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class vn extends Ui{constructor(p,w){super(p),this._popper=null,this._config=this._getConfig(w),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return vr}static get DefaultType(){return Yt}static get NAME(){return eo}toggle(){return this._isShown()?this.hide():this.show()}show(){if(br(this._element)||this._isShown(this._menu))return;const p={relatedTarget:this._element};if(se.trigger(this._element,"show.bs.dropdown",p).defaultPrevented)return;const w=vn.getParentFromElement(this._element);this._inNavbar?In.setDataAttribute(this._menu,"popper","none"):this._createPopper(w),"ontouchstart"in document.documentElement&&!w.closest(".navbar-nav")&&[].concat(...document.body.children).forEach(C=>se.on(C,"mouseover",St)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Br),this._element.classList.add(Br),se.trigger(this._element,"shown.bs.dropdown",p)}hide(){!br(this._element)&&this._isShown(this._menu)&&this._completeHide({relatedTarget:this._element})}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(p){se.trigger(this._element,"hide.bs.dropdown",p).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(w=>se.off(w,"mouseover",St)),this._popper&&this._popper.destroy(),this._menu.classList.remove(Br),this._element.classList.remove(Br),this._element.setAttribute("aria-expanded","false"),In.removeDataAttribute(this._menu,"popper"),se.trigger(this._element,"hidden.bs.dropdown",p))}_getConfig(p){if(p={...this.constructor.Default,...In.getDataAttributes(this._element),...p},zn(eo,p,this.constructor.DefaultType),"object"==typeof p.reference&&!Di(p.reference)&&"function"!=typeof p.reference.getBoundingClientRect)throw new TypeError(`${eo.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return p}_createPopper(p){if(void 0===Io)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let w=this._element;"parent"===this._config.reference?w=p:Di(this._config.reference)?w=h(this._config.reference):"object"==typeof this._config.reference&&(w=this._config.reference);const C=this._getPopperConfig(),N=C.modifiers.find(F=>"applyStyles"===F.name&&!1===F.enabled);this._popper=Eo(w,this._menu,C),N&&In.setDataAttribute(this._menu,"popper","static")}_isShown(p=this._element){return p.classList.contains(Br)}_getMenuElement(){return Je.next(this._element,tu)[0]}_getPlacement(){const p=this._element.parentNode;if(p.classList.contains("dropend"))return fn;if(p.classList.contains("dropstart"))return Si;const w="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return p.classList.contains("dropup")?w?bu:Nh:w?ft:ac}
1_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:p}=this._config;return"string"==typeof p?p.split(",").map(w=>Number.parseInt(w,10)):"function"==typeof p?w=>p(w,this._element):p}_getPopperConfig(){const p={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(p.modifiers=[{name:"applyStyles",enabled:!1}]),{...p,..."function"==typeof this._config.popperConfig?this._config.popperConfig(p):this._config.popperConfig}}_selectMenuItem({key:p,target:w}){const C=Je.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(tr);C.length&&m(C,w,p===Is,!C.includes(w)).focus()}static jQueryInterface(p){return this.each(function(){const w=vn.getOrCreateInstance(this,p);if("string"==typeof p){if(void 0===w[p])throw new TypeError(`No method named "${p}"`);w[p]()}})}static clearMenus(p){if(p&&(2===p.button||"keyup"===p.type&&"Tab"!==p.key))return;const w=Je.find(mr);for(let C=0,N=w.length;C<N;C++){const F=vn.getInstance(w[C]);if(!F||!1===F._config.autoClose||!F._isShown())continue;const Y={relatedTarget:F._element};if(p){const ne=p.composedPath(),de=ne.includes(F._menu);if(ne.includes(F._element)||"inside"===F._config.autoClose&&!de||"outside"===F._config.autoClose&&de||F._menu.contains(p.target)&&("keyup"===p.type&&"Tab"===p.key||/input|select|option|textarea|form/i.test(p.target.tagName)))continue;"click"===p.type&&(Y.clickEvent=p)}F._completeHide(Y)}}static getParentFromElement(p){return X(p)||p.parentNode}static dataApiKeydownHandler(p){if(/input|textarea/i.test(p.target.tagName)?"Space"===p.key||p.key!==Fo&&(p.key!==Is&&p.key!==uc||p.target.closest(tu)):!rr.test(p.key))return;const w=this.classList.contains(Br);if(!w&&p.key===Fo||(p.preventDefault(),p.stopPropagation(),br(this)))return;const C=this.matches(mr)?this:Je.prev(this,mr)[0],N=vn.getOrCreateInstance(C);if(p.key!==Fo)return p.key===uc||p.key===Is?(w||N.show(),void N._selectMenuItem(p)):void(w&&"Space"!==p.key||vn.clearMenus());N.hide()}}se.on(document,eu,mr,vn.dataApiKeydownHandler),se.on(document,eu,tu,vn.dataApiKeydownHandler),se.on(document,to,vn.clearMenus),se.on(document,"keyup.bs.dropdown.data-api",vn.clearMenus),se.on(document,to,mr,function(E){E.preventDefault(),vn.getOrCreateInstance(this).toggle()}),qn(vn);const Ae=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Fr=".sticky-top";class Ru{constructor(){this._element=document.body}getWidth(){const p=document.documentElement.clientWidth;return Math.abs(window.innerWidth-p)}hide(){const p=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",w=>w+p),this._setElementAttributes(Ae,"paddingRight",w=>w+p),this._setElementAttributes(Fr,"marginRight",w=>w-p)}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(p,w,C){const N=this.getWidth();this._applyManipulationCallback(p,F=>{if(F!==this._element&&window.innerWidth>F.clientWidth+N)return;this._saveInitialAttribute(F,w);const Y=window.getComputedStyle(F)[w];F.style[w]=`${C(Number.parseFloat(Y))}px`})}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(Ae,"paddingRight"),this._resetElementAttributes(Fr,"marginRight")}_saveInitialAttribute(p,w){const C=p.style[w];C&&In.setDataAttribute(p,w,C)}_resetElementAttributes(p,w){this._applyManipulationCallback(p,C=>{const N=In.getDataAttribute(C,w);void 0===N?C.style.removeProperty(w):(In.removeDataAttribute(C,w),C.style[w]=N)})}_applyManipulationCallback(p,w){Di(p)?w(p):Je.find(p,this._element).forEach(w)}isOverflowing(){return this.getWidth()>0}}const Vr={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},no={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},nu="mousedown.bs.backdrop";class Mn{constructor(p){this._config=this._getConfig(p),this._isAppended=!1,this._element=null}show(p){this._config.isVisible?(this._append(),this._config.isAnimated&&this._getElement(),this._getElement().classList.add("show"),this._emulateAnimation(()=>{wt(p)})):wt(p)}hide(p){this._config.isVisible?(this._getElement().classList.remove("show"),this._emulateAnimation(()=>{this.dispose(),wt(p)})):wt(p)}_getElement(){if(!this._element){const p=document.createElement("div");p.className=this._config.className,this._config.isAnimated&&p.classList.add("fade"),this._element=p}return this._element}_getConfig(p){return(p={...Vr,..."object"==typeof p?p:{}}).rootElement=h(p.rootElement),zn("backdrop",p,no),p}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),se.on(this._getElement(),nu,()=>{wt(this._config.clickCallback)}),this._isAppended=!0)}dispose(){this._isAppended&&(se.off(this._element,nu),this._element.remove(),this._isAppended=!1)}_emulateAnimation(p){No(p,this._getElement(),this._config.isAnimated)}}const Hr={trapElement:null,autofocus:!0},On={trapElement:"element",autofocus:"boolean"},iu=".bs.focustrap",ru="backward";class lc{constructor(p){this._config=this._getConfig(p),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:p,autofocus:w}=this._config;this._isActive||(w&&p.focus(),se.off(document,iu),se.on(document,"focusin.bs.focustrap",C=>this._handleFocusin(C)),se.on(document,"keydown.tab.bs.focustrap",C=>this._handleKeydown(C)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,se.off(document,iu))}_handleFocusin(p){const{target:w}=p,{trapElement:C}=this._config;if(w===document||w===C||C.contains(w))return;const N=Je.focusableChildren(C);0===N.length?C.focus():this._lastTabNavDirection===ru?N[N.length-1].focus():N[0].focus()}_handleKeydown(p){"Tab"===p.key&&(this._lastTabNavDirection=p.shift
1Key?ru:"forward")}_getConfig(p){return p={...Hr,..."object"==typeof p?p:{}},zn("focustrap",p,On),p}}const Ka={backdrop:!0,keyboard:!0,focus:!0},cc={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},Wa="hidden.bs.modal",Nu="show.bs.modal",Ou="resize.bs.modal",ju="click.dismiss.bs.modal",Dt="keydown.dismiss.bs.modal",Xa="mousedown.dismiss.bs.modal",su="modal-open",Uu="modal-static";class Ho extends Ui{constructor(p,w){super(p),this._config=this._getConfig(w),this._dialog=Je.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new Ru}static get Default(){return Ka}static get NAME(){return"modal"}toggle(p){return this._isShown?this.hide():this.show(p)}show(p){this._isShown||this._isTransitioning||se.trigger(this._element,Nu,{relatedTarget:p}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(su),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),se.on(this._dialog,Xa,()=>{se.one(this._element,"mouseup.dismiss.bs.modal",w=>{w.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showBackdrop(()=>this._showElement(p)))}hide(){if(!this._isShown||this._isTransitioning||se.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;const p=this._isAnimated();p&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove("show"),se.off(this._element,ju),se.off(this._dialog,Xa),this._queueCallback(()=>this._hideModal(),this._element,p)}dispose(){[window,this._dialog].forEach(p=>se.off(p,".bs.modal")),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Mn({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new lc({trapElement:this._element})}_getConfig(p){return p={...Ka,...In.getDataAttributes(this._element),..."object"==typeof p?p:{}},zn("modal",p,cc),p}_showElement(p){const w=this._isAnimated(),C=Je.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,C&&(C.scrollTop=0),this._element.classList.add("show"),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,se.trigger(this._element,"shown.bs.modal",{relatedTarget:p})},this._dialog,w)}_setEscapeEvent(){this._isShown?se.on(this._element,Dt,p=>{this._config.keyboard&&"Escape"===p.key?(p.preventDefault(),this.hide()):this._config.keyboard||"Escape"!==p.key||this._triggerBackdropTransition()}):se.off(this._element,Dt)}_setResizeEvent(){this._isShown?se.on(window,Ou,()=>this._adjustDialog()):se.off(window,Ou)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(su),this._resetAdjustments(),this._scrollBar.reset(),se.trigger(this._element,Wa)})}_showBackdrop(p){se.on(this._element,ju,w=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:w.target===w.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())}),this._backdrop.show(p)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(se.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const{classList:p,scrollHeight:w,style:C}=this._element,N=w>document.documentElement.clientHeight;!N&&"hidden"===C.overflowY||p.contains(Uu)||(N||(C.overflowY="hidden"),p.add(Uu),this._queueCallback(()=>{p.remove(Uu),N||this._queueCallback(()=>{C.overflowY=""},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const p=this._element.scrollHeight>document.documentElement.clientHeight,w=this._scrollBar.getWidth(),C=w>0;(!C&&p&&!hn()||C&&!p&&hn())&&(this._element.style.paddingLeft=`${w}px`),(C&&!p&&!hn()||!C&&p&&hn())&&(this._element.style.paddingRight=`${w}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(p,w){return this.each(function(){const C=Ho.getOrCreateInstance(this,p);
1if("string"==typeof p){if(void 0===C[p])throw new TypeError(`No method named "${p}"`);C[p](w)}})}}se.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',function(E){const p=X(this);["A","AREA"].includes(this.tagName)&&E.preventDefault(),se.one(p,Nu,C=>{C.defaultPrevented||se.one(p,Wa,()=>{tr(this)&&this.focus()})});const w=Je.findOne(".modal.show");w&&Ho.getInstance(w).hide(),Ho.getOrCreateInstance(p).toggle(this)}),L(Ho),qn(Ho);const za="offcanvas",Cs={backdrop:!0,keyboard:!0,scroll:!1},Bu={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},Fu=".offcanvas.show",Ms="hidden.bs.offcanvas";class io extends Ui{constructor(p,w){super(p),this._config=this._getConfig(w),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return za}static get Default(){return Cs}toggle(p){return this._isShown?this.hide():this.show(p)}show(p){this._isShown||se.trigger(this._element,"show.bs.offcanvas",{relatedTarget:p}).defaultPrevented||(this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new Ru).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add("show"),this._queueCallback(()=>{this._config.scroll||this._focustrap.activate(),se.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:p})},this._element,!0))}hide(){this._isShown&&(se.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove("show"),this._backdrop.hide(),this._queueCallback(()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new Ru).reset(),se.trigger(this._element,Ms)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(p){return p={...Cs,...In.getDataAttributes(this._element),..."object"==typeof p?p:{}},zn(za,p,Bu),p}_initializeBackDrop(){return new Mn({className:"offcanvas-backdrop",isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new lc({trapElement:this._element})}_addEventListeners(){se.on(this._element,"keydown.dismiss.bs.offcanvas",p=>{this._config.keyboard&&"Escape"===p.key&&this.hide()})}static jQueryInterface(p){return this.each(function(){const w=io.getOrCreateInstance(this,p);if("string"==typeof p){if(void 0===w[p]||p.startsWith("_")||"constructor"===p)throw new TypeError(`No method named "${p}"`);w[p](this)}})}}se.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',function(E){const p=X(this);if(["A","AREA"].includes(this.tagName)&&E.preventDefault(),br(this))return;se.one(p,Ms,()=>{tr(this)&&this.focus()});const w=Je.findOne(Fu);w&&w!==p&&io.getInstance(w).hide(),io.getOrCreateInstance(p).toggle(this)}),se.on(window,"load.bs.offcanvas.data-api",()=>Je.find(Fu).forEach(E=>io.getOrCreateInstance(E).show())),L(io),qn(io);const au=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Go=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,lu=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Ko=(E,p)=>{const w=E.nodeName.toLowerCase();if(p.includes(w))return!au.has(w)||Boolean(Go.test(E.nodeValue)||lu.test(E.nodeValue));const C=p.filter(N=>N instanceof RegExp);for(let N=0,F=C.length;N<F;N++)if(C[N].test(w))return!0;return!1};function Vu(E,p,w){if(!E.length)return E;if(w&&"function"==typeof w)return w(E);const C=(new window.DOMParser).parseFromString(E,"text/html"),N=[].concat(...C.body.querySelectorAll("*"));for(let F=0,Y=N.length;F<Y;F++){const ne=N[F],de=ne.nodeName.toLowerCase();if(!Object.keys(p).includes(de)){ne.remove();continue}const te=[].concat(...ne.attributes),xe=[].concat(p["*"]||[],p[de]||[]);te.forEach(pe=>{Ko(pe,xe)||ne.removeAttribute(pe.nodeName)})}return C.body.innerHTML}const Ya="tooltip",dc=new Set(["sanitize","allowList","sanitizeFn"]),hc={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boun
1dary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},ks={AUTO:"auto",TOP:"top",RIGHT:hn()?"left":"right",BOTTOM:"bottom",LEFT:hn()?"right":"left"},qa={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},_s={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},cu="fade",Wi="show",du="show",Kr=".tooltip-inner",Hu="hide.bs.modal",wr="hover";class ro extends Ui{constructor(p,w){if(void 0===Io)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(p),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(w),this.tip=null,this._setListeners()}static get Default(){return qa}static get NAME(){return Ya}static get Event(){return _s}static get DefaultType(){return hc}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(p){if(this._isEnabled)if(p){const w=this._initializeOnDelegatedTarget(p);w._activeTrigger.click=!w._activeTrigger.click,w._isWithActiveTrigger()?w._enter(null,w):w._leave(null,w)}else{if(this.getTipElement().classList.contains(Wi))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),se.off(this._element.closest(".modal"),Hu,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const p=se.trigger(this._element,this.constructor.Event.SHOW),w=Yn(this._element),C=null===w?this._element.ownerDocument.documentElement.contains(this._element):w.contains(this._element);if(p.defaultPrevented||!C)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(Kr).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const N=this.getTipElement(),F=(pe=>{do{pe+=Math.floor(1e6*Math.random())}while(document.getElementById(pe));return pe})(this.constructor.NAME);N.setAttribute("id",F),this._element.setAttribute("aria-describedby",F),this._config.animation&&N.classList.add(cu);const Y="function"==typeof this._config.placement?this._config.placement.call(this,N,this._element):this._config.placement,ne=this._getAttachment(Y);this._addAttachmentClass(ne);const{container:de}=this._config;Oo.set(N,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(de.append(N),se.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=Eo(this._element,N,this._getPopperConfig(ne)),N.classList.add(Wi);const te=this._resolvePossibleFunction(this._config.customClass);te&&N.classList.add(...te.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(pe=>{se.on(pe,"mouseover",St)});const xe=this.tip.classList.contains(cu);this._queueCallback(()=>{const pe=this._hoverState;this._hoverState=null,se.trigger(this._element,this.constructor.Event.SHOWN),"out"===pe&&this._leave(null,this)},this.tip,xe)}hide(){if(!this._popper)return;const p=this.getTipElement();if(se.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;p.classList.remove(Wi),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEac
1h(C=>se.off(C,"mouseover",St)),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const w=this.tip.classList.contains(cu);this._queueCallback(()=>{this._isWithActiveTrigger()||(this._hoverState!==du&&p.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),se.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())},this.tip,w),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const p=document.createElement("div");p.innerHTML=this._config.template;const w=p.children[0];return this.setContent(w),w.classList.remove(cu,Wi),this.tip=w,this.tip}setContent(p){this._sanitizeAndSetContent(p,this.getTitle(),Kr)}_sanitizeAndSetContent(p,w,C){const N=Je.findOne(C,p);w||!N?this.setElementContent(N,w):N.remove()}setElementContent(p,w){if(null!==p)return Di(w)?(w=h(w),void(this._config.html?w.parentNode!==p&&(p.innerHTML="",p.append(w)):p.textContent=w.textContent)):void(this._config.html?(this._config.sanitize&&(w=Vu(w,this._config.allowList,this._config.sanitizeFn)),p.innerHTML=w):p.textContent=w)}getTitle(){const p=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(p)}updateAttachment(p){return"right"===p?"end":"left"===p?"start":p}_initializeOnDelegatedTarget(p,w){return w||this.constructor.getOrCreateInstance(p.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:p}=this._config;return"string"==typeof p?p.split(",").map(w=>Number.parseInt(w,10)):"function"==typeof p?w=>p(w,this._element):p}_resolvePossibleFunction(p){return"function"==typeof p?p.call(this._element):p}_getPopperConfig(p){const w={placement:p,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:C=>this._handlePopperPlacementChange(C)}],onFirstUpdate:C=>{C.options.placement!==C.placement&&this._handlePopperPlacementChange(C)}};return{...w,..."function"==typeof this._config.popperConfig?this._config.popperConfig(w):this._config.popperConfig}}_addAttachmentClass(p){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(p)}`)}_getAttachment(p){return ks[p.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(p=>{if("click"===p)se.on(this._element,this.constructor.Event.CLICK,this._config.selector,w=>this.toggle(w));else if("manual"!==p){const C=p===wr?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;se.on(this._element,p===wr?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,this._config.selector,N=>this._enter(N)),se.on(this._element,C,this._config.selector,N=>this._leave(N))}}),this._hideModalHandler=()=>{this._element&&this.hide()},se.on(this._element.closest(".modal"),Hu,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const p=this._element.getAttribute("title"),w=typeof this._element.getAttribute("data-bs-original-title");(p||"string"!==w)&&(this._element.setAttribute("data-bs-original-title",p||""),!p||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",p),this._element.setAttribute("title",""))}_enter(p,w){w=this._initializeOnDelegatedTarget(p,w),p&&(w._activeTrigger["focusin"===p.type?"focus":wr]=!0),w.getTipElement().classList.contains(Wi)||w._hoverState===du?w._hoverState=du:(clearTimeout(w._timeout),w._hoverState=du,w._config.delay&&w._config.delay.show?w._timeout=setTimeout(()=>{w._hoverState===du&&w.show()},w._config.delay.show):w.show())}_leave(p,w){w=this._initializeOnDelegatedTarget(p,w),p&&(w._activeTrigger["focusout"===p.type?"focus":wr]=w._element.contains(p.relatedTarget)),w._isWithActiveTrigger()||(clearTimeout(w._timeout),w._hoverState="out",w._config.delay&&w._config.delay.hide?w._timeout=setTimeout(()=>{"out"===w._hoverState&&w.hide()},w._config.delay.hide):w.hide())}_isWithActiveTrigger(){for(const p in this._activeTrigger)if(this._activeTrigger[p])return!0;return!1}_getConfig(p){const w=In.getDataAttributes(this._element);
1return Object.keys(w).forEach(C=>{dc.has(C)&&delete w[C]}),(p={...this.constructor.Default,...w,..."object"==typeof p&&p?p:{}}).container=!1===p.container?document.body:h(p.container),"number"==typeof p.delay&&(p.delay={show:p.delay,hide:p.delay}),"number"==typeof p.title&&(p.title=p.title.toString()),"number"==typeof p.content&&(p.content=p.content.toString()),zn(Ya,p,this.constructor.DefaultType),p.sanitize&&(p.template=Vu(p.template,p.allowList,p.sanitizeFn)),p}_getDelegateConfig(){const p={};for(const w in this._config)this.constructor.Default[w]!==this._config[w]&&(p[w]=this._config[w]);return p}_cleanTipClass(){const p=this.getTipElement(),w=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),C=p.getAttribute("class").match(w);null!==C&&C.length>0&&C.map(N=>N.trim()).forEach(N=>p.classList.remove(N))}_getBasicClassPrefix(){return"bs-tooltip"}_handlePopperPlacementChange(p){const{state:w}=p;w&&(this.tip=w.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(w.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(p){return this.each(function(){const w=ro.getOrCreateInstance(this,p);if("string"==typeof p){if(void 0===w[p])throw new TypeError(`No method named "${p}"`);w[p]()}})}}qn(ro);const pc={...ro.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},$a={...ro.DefaultType,content:"(string|element|function)"},dn={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class Xo extends ro{static get Default(){return pc}static get NAME(){return"popover"}static get Event(){return dn}static get DefaultType(){return $a}isWithContent(){return this.getTitle()||this._getContent()}setContent(p){this._sanitizeAndSetContent(p,this.getTitle(),".popover-header"),this._sanitizeAndSetContent(p,this._getContent(),".popover-body")}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return"bs-popover"}static jQueryInterface(p){return this.each(function(){const w=Xo.getOrCreateInstance(this,p);if("string"==typeof p){if(void 0===w[p])throw new TypeError(`No method named "${p}"`);w[p]()}})}}qn(Xo);const Ku="scrollspy",hu={offset:10,method:"auto",target:""},Zn={offset:"number",method:"string",target:"(string|element)"},Xi="active",Qn=".nav-link, .list-group-item, .dropdown-item",Ai="position";class oo extends Ui{constructor(p,w){super(p),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(w),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,se.on(this._scrollElement,"scroll.bs.scrollspy",()=>this._process()),this.refresh(),this._process()}static get Default(){return hu}static get NAME(){return Ku}refresh(){const w="auto"===this._config.method?this._scrollElement===this._scrollElement.window?"offset":Ai:this._config.method,C=w===Ai?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),Je.find(Qn,this._config.target).map(N=>{const F=er(N),Y=F?Je.findOne(F):null;if(Y){const ne=Y.getBoundingClientRect();if(ne.width||ne.height)return[In[w](Y).top+C,F]}return null}).filter(N=>N).sort((N,F)=>N[0]-F[0]).forEach(N=>{this._offsets.push(N[0]),this._targets.push(N[1])})}dispose(){se.off(this._scrollElement,".bs.scrollspy"),super.dispose()}_getConfig(p){return(p={...hu,...In.getDataAttributes(this._element),..."object"==typeof p&&p?p:{}}).target=h(p.target)||document.documentElement,zn(Ku,p,Zn),p}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const p=this._getScrollTop()+this._config.offset,w=this._getScrollHeight(),C=this._config.offset+w-this._getOffsetHeight();if(this._scrollHeight!==w&&this.refresh(),p>=C){const N=this._targets[this._targets.length-1];this._activeTarget!==N&&this._activate(N)}else{if(this._activeTarget&&p<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let N=this._offsets.length;N--;)this._activeTarget!==this._targets[N]&&p>=this._offsets[N]&&(void 0===this._offsets[N+1]||p<this._offsets[N+1]
1)&&this._activate(this._targets[N])}}_activate(p){this._activeTarget=p,this._clear();const w=Qn.split(",").map(N=>`${N}[data-bs-target="${p}"],${N}[href="${p}"]`),C=Je.findOne(w.join(","),this._config.target);C.classList.add(Xi),C.classList.contains("dropdown-item")?Je.findOne(".dropdown-toggle",C.closest(".dropdown")).classList.add(Xi):Je.parents(C,".nav, .list-group").forEach(N=>{Je.prev(N,".nav-link, .list-group-item").forEach(F=>F.classList.add(Xi)),Je.prev(N,".nav-item").forEach(F=>{Je.children(F,".nav-link").forEach(Y=>Y.classList.add(Xi))})}),se.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:p})}_clear(){Je.find(Qn,this._config.target).filter(p=>p.classList.contains(Xi)).forEach(p=>p.classList.remove(Xi))}static jQueryInterface(p){return this.each(function(){const w=oo.getOrCreateInstance(this,p);if("string"==typeof p){if(void 0===w[p])throw new TypeError(`No method named "${p}"`);w[p]()}})}}se.on(window,"load.bs.scrollspy.data-api",()=>{Je.find('[data-bs-spy="scroll"]').forEach(E=>new oo(E))}),qn(oo);const Ds="active",kn=".active",Ls=":scope > li > .active";class uo extends Ui{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(Ds))return;let p;
1const w=X(this._element),C=this._element.closest(".nav, .list-group");C&&(p=Je.find("UL"===C.nodeName||"OL"===C.nodeName?Ls:kn,C),p=p[p.length-1]);const N=p?se.trigger(p,"hide.bs.tab",{relatedTarget:this._element}):null;if(se.trigger(this._element,"show.bs.tab",{relatedTarget:p}).defaultPrevented||null!==N&&N.defaultPrevented)return;this._activate(this._element,C);const F=()=>{se.trigger(p,"hidden.bs.tab",{relatedTarget:this._element}),se.trigger(this._element,"shown.bs.tab",{relatedTarget:p})};w?this._activate(w,w.parentNode,F):F()}_activate(p,w,C){const N=(!w||"UL"!==w.nodeName&&"OL"!==w.nodeName?Je.children(w,kn):Je.find(Ls,w))[0],F=C&&N&&N.classList.contains("fade"),Y=()=>this._transitionComplete(p,N,C);N&&F?(N.classList.remove("show"),this._queueCallback(Y,p,!0)):Y()}_transitionComplete(p,w,C){if(w){w.classList.remove(Ds);const F=Je.findOne(":scope > .dropdown-menu .active",w.parentNode);F&&F.classList.remove(Ds),"tab"===w.getAttribute("role")&&w.setAttribute("aria-selected",!1)}p.classList.add(Ds),"tab"===p.getAttribute("role")&&p.setAttribute("aria-selected",!0),p.classList.contains("fade")&&p.classList.add("show");let N=p.parentNode;if(N&&"LI"===N.nodeName&&(N=N.parentNode),N&&N.classList.contains("dropdown-menu")){const F=p.closest(".dropdown");F&&Je.find(".dropdown-toggle",F).forEach(Y=>Y.classList.add(Ds)),p.setAttribute("aria-expanded",!0)}C&&C()}static jQueryInterface(p){return this.each(function(){const w=uo.getOrCreateInstance(this);if("string"==typeof p){if(void 0===w[p])throw new TypeError(`No method named "${p}"`);w[p]()}})}}se.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',function(E){["A","AREA"].includes(this.tagName)&&E.preventDefault(),br(this)||uo.getOrCreateInstance(this).show()}),qn(uo);const Ps="show",pu="showing",Oh={animation:"boolean",autohide:"boolean",delay:"number"},bs={animation:!0,autohide:!0,delay:5e3};class ao extends Ui{constructor(p,w){super(p),this._config=this._getConfig(w),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return Oh}static get Default(){return bs}static get NAME(){return"toast"}show(){se.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove("hide"),this._element.classList.add(Ps),this._element.classList.add(pu),this._queueCallback(()=>{this._element.classList.remove(pu),se.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this._element.classList.contains(Ps)&&(se.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(pu),this._queueCallback(()=>{this._element.classList.add("hide"),this._element.classList.remove(pu),this._element.classList.remove(Ps),se.trigger(this._element,"hidden.bs.toast")},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this._element.classList.contains(Ps)&&this._element.classList.remove(Ps),super.dispose()}_getConfig(p){return p={...bs,...In.getDataAttributes(this._element),..."object"==typeof p&&p?p:{}},zn("toast",p,this.constructor.DefaultType),p}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(p,w){switch(p.type){case"mouseover":case"mouseout":this._hasMouseInteraction=w;break;case"focusin":case"focusout":this._hasKeyboardInteraction=w}if(w)return void this._clearTimeout();const C=p.relatedTarget;this._element===C||this._element.contains(C)||this._maybeScheduleHide()}_setListeners(){se.on(this._element,"mouseover.bs.toast",p=>this._onInteraction(p,!0)),se.on(this._element,"mouseout.bs.toast",p=>this._onInteraction(p,!1)),se.on(this._element,"focusin.bs.toast",p=>this._onInteraction(p,!0)),se.on(this._element,"focusout.bs.toast",p=>this._onInteraction(p,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(p){return this.each(function(){const w=ao.getOrCreateInstance(this,p);
1if("string"==typeof p){if(void 0===w[p])throw new TypeError(`No method named "${p}"`);w[p](this)}})}}return L(ao),qn(ao),{Alert:Jt,Button:Jr,Carousel:vi,Collapse:nr,Dropdown:vn,Modal:Ho,Offcanvas:io,Popover:Xo,ScrollSpy:oo,Tab:uo,Toast:ao,Tooltip:ro}}),function(){var ln=typeof window<"u"?window:global,on={};if(function(X,bo,Di){var h,Bn,zn="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t},tr="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e},Yn=function br(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof X&&X,"object"==typeof self&&self,"object"==typeof bo&&bo];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")}(this);function St(e,t){if(t)e:{var n=Yn;e=e.split(".");for(var i=0;i<e.length-1;i++){var r=e[i];if(!(r in n))break e;n=n[r]}(t=t(i=n[e=e[e.length-1]]))!=i&&null!=t&&tr(n,e,{configurable:!0,writable:!0,value:t})}}if("function"==typeof Object.setPrototypeOf)Bn=Object.setPrototypeOf;else{var ji;e:{var hn={};try{hn.__proto__={a:!0},ji=hn.a;break e}catch{}ji=!1}Bn=ji?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var qn=Bn;function wt(e,t){if(e.prototype=zn(t.prototype),e.prototype.constructor=e,qn)qn(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var i=Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(e,n,i)}else e[n]=t[n];e.Im=t.prototype}function No(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function m(e){var t=typeof Symbol<"u"&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if("number"==typeof e.length)return{next:No(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function ee(e){if(!(e instanceof Array)){e=m(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}function vo(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function ds(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.B=this.i=null}function yo(e){if(e.o)throw new TypeError("Generator is already running");e.o=!0}function Rr(e,t){e.i={Xh:t,li:!0},e.g=e.m||e.j}function x(e,t,n){return e.g=n,{value:t}}function Z(e){e.g=0}function fe(e,t,n){e.m=t,null!=n&&(e.j=n)}function pn(e,t){e.m=0,e.j=t||0}function Le(e,t,n){e.g=t,e.m=n||0}function Te(e,t){return e.m=t||0,t=e.i.Xh,e.i=null,t}function Tn(e){e.B=[e.i],e.m=0,e.j=0}function En(e,t){var n=e.B.splice(0)[0];(n=e.i=e.i||n)?n.li?e.g=e.m||e.j:null!=n.A&&e.j<n.A?(e.g=n.A,e.i=null):e.g=e.j:e.g=t}function hs(e){this.g=new ds,this.h=e}function se(e,t,n,i){try{var r=t.call(e.g.l,n);if(!(r instanceof Object))throw new TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.o=!1,r;var o=r.value}catch(s){return e.g.l=null,Rr(e.g,s),gi(e)}
1return e.g.l=null,i.call(e.g,o),gi(e)}function gi(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(n){e.g.h=void 0,Rr(e.g,n)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.li)throw t.Xh;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function Oo(e){this.next=function(t){return yo(e.g),e.g.l?t=se(e,e.g.l.next,t,e.g.u):(e.g.u(t),t=gi(e)),t},this.throw=function(t){return yo(e.g),e.g.l?t=se(e,e.g.l.throw,t,e.g.u):(Rr(e.g,t),t=gi(e)),t},this.return=function(t){return function To(e,t){yo(e.g);var n=e.g.l;return n?se(e,"return"in n?n.return:function(i){return{value:i,done:!0}},t,e.g.return):(e.g.return(t),gi(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function L(e){return function Ui(e){function t(i){return e.next(i)}function n(i){return e.throw(i)}return new Promise(function(i,r){!function o(s){s.done?i(s.value):Promise.resolve(s.value).then(t,n).then(o,r)}(e.next())})}(new Oo(new hs(e)))}function Jt(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function mi(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Jr(e,t){e instanceof String&&(e+="");var n=0,i=!1,r={next:function(){if(!i&&n<e.length){var o=n++;return{value:t(o,e[o]),done:!1}}return i=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}function si(e,t,n){if(null==e)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+""}function hr(e,t,n){e instanceof String&&(e=String(e));for(var i=e.length,r=0;r<i;r++){var o=e[r];if(t.call(n,o,r,e))return{gi:r,v:o}}return{gi:-1,v:void 0}}St("Symbol",function(e){function n(o,s){this.g=o,tr(this,"description",{configurable:!0,writable:!0,value:s})}if(e)return e;n.prototype.toString=function(){return this.g};var i="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",r=0;return function t(o){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new n(i+(o||"")+"_"+r++,o)}}),St("Symbol.iterator",function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var i=Yn[t[n]];"function"==typeof i&&"function"!=typeof i.prototype[e]&&tr(i.prototype,e,{configurable:!0,writable:!0,value:function(){return vo(No(this))}})}return e}),ds.prototype.u=function(e){this.h=e},ds.prototype.return=function(e){this.i={return:e},this.g=this.j},ds.prototype.A=function(e){this.g=e},St("Promise",function(e){function t(s){this.h=0,this.i=void 0,this.g=[],this.o=!1;var u=this.j();try{s(u.resolve,u.reject)}catch(a){u.reject(a)}}function n(){this.g=null}function i(s){return s instanceof t?s:new t(function(u){u(s)})}if(e)return e;n.prototype.h=function(s){if(null==this.g){this.g=[];var u=this;this.i(function(){u.l()})}this.g.push(s)};var r=Yn.setTimeout;n.prototype.i=function(s){r(s,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var s=this.g;this.g=[];for(var u=0;u<s.length;++u){var a=s[u];s[u]=null;try{a()}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(c){a||(a=!0,l.call(u,c))}}var u=this,a=!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 u=null!=s;break e;case"function":u=!0;break e;default:u=!1}u?this.D(s):this.m(s)}},t.prototype.D=function(s){var u=void 0;try{u=s.then}catch(a){return void this.l(a)}"function"==typeof u?this.J(u,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,u){if(0!=this.h)throw Error("Cannot settle("+s+", "+u+"): Promise already settled in state"+this.h);this.h=s,this.i=u,2===this.h&&this.H(),this.B()},t.prototype.H=function(){var s=this;r(function(){if(s.C()){var u=Yn.console;typeof u<"u"&&u.error(s.i)}},1)},t.prototype.C=function(){if(this.o)return!1;var s=Yn.CustomEvent,u=Yn.Event,a=Yn.dispatchEvent;return typeof a>"u"||("function"==typeof s?s=new s("unhandledrejection",{cancelable:!0}):"function"==typeof u?s=new u("unhandledrejection",{cancelable:!0}):(s=Yn.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,s),s.promise=this,s.reason=this.i,a(s))},t.prototype.B=function(){if(null!=this.g){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 u=this.j();s.Ne(u.resolve,u.reject)},t.prototype.J=function(s,u){var a=this.j();try{s.call(u,a.resolve,a.reject)}catch(l){a.reject(l)}},t.prototype.then=function(s,u){function a(f,g){return"function"==typeof f?function(v){try{l(f(v))}catch(y){c(y)}}:g}var l,c,d=new t(function(f,g){l=f,c=g});return this.Ne(a(s,l),a(u,c)),d},t.prototype.catch=function(s){return this.then(void 0,s)},t.prototype.Ne=function(s,u){function a(){switch(l.h){case 1:s(l.i);break;case 2:u(l.i);break;default:throw Error("Unexpected state: "+l.h)}}var l=this;null==this.g?o.h(a):this.g.push(a),this.o=!0},t.resolve=i,t.reject=function(s){return new t(function(u,a){a(s)})},t.race=function(s){return new t(function(u,a){for(var l=m(s),c=l.next();!c.done;c=l.next())i(c.value).Ne(u,a)})},t.all=function(s){var u=m(s),a=u.next();return a.done?i([]):new t(function(l,c){function d(v){return function(y){f[v]=y,0==--g&&l(f)}}var f=[],g=0;do{f.push(void 0),g++,i(a.value).Ne(d(f.length-1),c),a=u.next()}while(!a.done)})},t}),St("WeakMap",function(e){function t(a){if(this.g=(u+=Math.random()+1).toString(),a){a=m(a);for(var l;!(l=a.next()).done;)this.set((l=l.value)[0],l[1])}}function n(){}function i(a){var l=typeof a;return"object"===l&&null!==a||"function"===l}function r(a){if(!mi(a,s)){var l=new n;tr(a,s,{value:l})}}function o(a){var l=Object[a];l&&(Object[a]=function(c){return c instanceof n?c:(Object.isExtensible(c)&&r(c),l(c))})}if(function(){if(!e||!Object.seal)return!1;
1try{var a=Object.seal({}),l=Object.seal({}),c=new e([[a,2],[l,3]]);return 2==c.get(a)&&3==c.get(l)&&(c.delete(a),c.set(l,4),!c.has(a)&&4==c.get(l))}catch{return!1}}())return e;var s="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var u=0;return t.prototype.set=function(a,l){if(!i(a))throw Error("Invalid WeakMap key");if(r(a),!mi(a,s))throw Error("WeakMap key fail: "+a);return a[s][this.g]=l,this},t.prototype.get=function(a){return i(a)&&mi(a,s)?a[s][this.g]:void 0},t.prototype.has=function(a){return i(a)&&mi(a,s)&&mi(a[s],this.g)},t.prototype.delete=function(a){return!!(i(a)&&mi(a,s)&&mi(a[s],this.g))&&delete a[s][this.g]},t}),St("Map",function(e){function t(){var u={};return u.uc=u.next=u.head=u}function n(u,a){var l=u[1];return vo(function(){if(l){for(;l.head!=u[1];)l=l.uc;for(;l.next!=l.head;)return{done:!1,value:a(l=l.next)};l=null}return{done:!0,value:void 0}})}function i(u,a){var l=a&&typeof a;"object"==l||"function"==l?o.has(a)?l=o.get(a):(l=""+ ++s,o.set(a,l)):l="p_"+a;var c=u[0][l];if(c&&mi(u[0],l))for(u=0;u<c.length;u++){var d=c[u];if(a!=a&&d.key!=d.key||a===d.key)return{id:l,list:c,index:u,entry:d}}return{id:l,list:c,index:-1,entry:void 0}}function r(u){if(this[0]={},this[1]=t(),this.size=0,u){u=m(u);for(var a;!(a=u.next()).done;)this.set((a=a.value)[0],a[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var u=Object.seal({x:4}),a=new e(m([[u,"s"]]));if("s"!=a.get(u)||1!=a.size||a.get({x:4})||a.set({x:4},"t")!=a||2!=a.size)return!1;var l=a.entries(),c=l.next();return!c.done&&c.value[0]==u&&"s"==c.value[1]&&!((c=l.next()).done||4!=c.value[0].x||"t"!=c.value[1]||!l.next().done)}catch{return!1}}())return e;var o=new WeakMap;r.prototype.set=function(u,a){var l=i(this,u=0===u?0:u);return l.list||(l.list=this[0][l.id]=[]),l.entry?l.entry.value=a:(l.entry={next:this[1],uc:this[1].uc,head:this[1],key:u,value:a},l.list.push(l.entry),this[1].uc.next=l.entry,this[1].uc=l.entry,this.size++),this},r.prototype.delete=function(u){return!(!(u=i(this,u)).entry||!u.list||(u.list.splice(u.index,1),u.list.length||delete this[0][u.id],u.entry.uc.next=u.entry.next,u.entry.next.uc=u.entry.uc,u.entry.head=null,this.size--,0))},r.prototype.clear=function(){this[0]={},this[1]=this[1].uc=t(),this.size=0},r.prototype.has=function(u){return!!i(this,u).entry},r.prototype.get=function(u){return(u=i(this,u).entry)&&u.value},r.prototype.entries=function(){return n(this,function(u){return[u.key,u.value]})},r.prototype.keys=function(){return n(this,function(u){return u.key})},r.prototype.values=function(){return n(this,function(u){return u.value})},r.prototype.forEach=function(u,a){for(var c,l=this.entries();!(c=l.next()).done;)u.call(a,(c=c.value)[1],c[0],this)},r.prototype[Symbol.iterator]=r.prototype.entries;var s=0;return r}),St("Set",function(e){function t(n){if(this.g=new Map,n){n=m(n);for(var i;!(i=n.next()).done;)this.add(i.value)}this.size=this.g.size}return function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var n=Object.seal({x:4}),i=new e(m([n]));if(!i.has(n)||1!=i.size||i.add(n)!=i||1!=i.size||i.add({x:4})!=i||2!=i.size)return!1;var r=i.entries(),o=r.next();return!o.done&&o.value[0]==n&&o.value[1]==n&&!(o=r.next()).done&&o.value[0]!=n&&4==o.value[0].x&&o.value[1]==o.value[0]&&r.next().done}catch{return!1}}()?e:(t.prototype.add=function(n){return this.g.set(n=0===n?0: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.keys=t.prototype.values=function(){return this.g.values()},t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(n,i){var r=this;this.g.forEach(function(o){return n.call(i,o,o,r)})},t)}),St("Array.prototype.values",function(e){return e||function(){return Jr(this,function(t,n){return n})}}),St("Array.from",function(e){return e||function(t,n,i){n=n??function(u){return u};var r=[],o=typeof Symbol<"u"&&Symbol.iterator&&t[Symbol.iterator];if("function"==typeof o){t=o.call(t);for(var s=0;!(o=t.next()).done;)r.push(n.call(i,o.value,s++))}else for(o=t.length,s=0;s<o;s++)r.push(n.call(i,t[s],s));return r}}),St("Array.prototype.keys",function(e){return e||function(){return Jr(this,function(t){return t})}}),St("Object.is",function(e){return e||function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}}),St("Array.prototype.includes",function(e){return e||function(t,n){var i=this;i instanceof String&&(i=String(i));var r=i.length;for((n=n||0)<0&&(n=Math.max(n+r,0));n<r;n++){var o=i[n];if(o===t||Object.is(o,t))return!0}return!1}}),St("String.prototype.includes",function(e){return e||function(t,n){return-1!==si(this,t,"includes").indexOf(t,n||0)}}),St("String.fromCodePoint",function(e){return e||function(t){for(var n="",i=0;i<arguments.length;i++){var r=Number(arguments[i]);if(r<0||r>1114111||r!==Math.floor(r))throw new RangeError("invalid_code_point "+r);r<=65535?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(r>>>
110&1023|55296),n+=String.fromCharCode(1023&r|56320))}return n}}),St("Array.prototype.findIndex",function(e){return e||function(t,n){return hr(this,t,n).gi}}),St("WeakSet",function(e){function t(n){if(this.g=new WeakMap,n){n=m(n);for(var i;!(i=n.next()).done;)this.add(i.value)}}return function(){if(!e||!Object.seal)return!1;try{var n=Object.seal({}),i=Object.seal({}),r=new e([n]);return!(!r.has(n)||r.has(i))&&(r.delete(n),r.add(i),!r.has(n)&&r.has(i))}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)}),St("Array.prototype.find",function(e){return e||function(t,n){return hr(this,t,n).v}}),St("String.prototype.startsWith",function(e){return e||function(t,n){var i=si(this,t,"startsWith"),r=i.length,o=t.length;n=Math.max(0,Math.min(0|n,i.length));for(var s=0;s<o&&n<r;)if(i[n++]!=t[s++])return!1;return s>=o}}),St("Object.entries",function(e){return e||function(t){var i,n=[];for(i in t)mi(t,i)&&n.push([i,t[i]]);return n}});var In="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var i=arguments[n];if(i)for(var r in i)mi(i,r)&&(e[r]=i[r])}return e};St("Object.assign",function(e){return e||In}),St("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})})}}),St("Array.prototype.entries",function(e){return e||function(){return Jr(this,function(t,n){return[t,n]})}}),St("Number.isNaN",function(e){return e||function(t){return"number"==typeof t&&isNaN(t)}}),St("String.prototype.repeat",function(e){return e||function(t){var n=si(this,null,"repeat");if(t<0||t>1342177279)throw new RangeError("Invalid count value");t|=0;for(var i="";t;)1&t&&(i+=n),(t>>>=1)&&(n+=n);return i}}),St("Number.EPSILON",function(){return 2220446049250313e-31}),St("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),St("Number.isFinite",function(e){return e||function(t){return"number"==typeof t&&!isNaN(t)&&t!==1/0&&t!==-1/0}}),St("Object.values",function(e){return e||function(t){var i,n=[];for(i in t)mi(t,i)&&n.push(t[i]);return n}}),St("Math.log2",function(e){return e||function(t){return Math.log(t)/Math.LN2}}),St("String.prototype.endsWith",function(e){return e||function(t,n){var i=si(this,t,"endsWith");void 0===n&&(n=i.length),n=Math.max(0,Math.min(0|n,i.length));for(var r=t.length;r>0&&n>0;)if(i[--n]!=t[--r])return!1;return r<=0}}),St("Math.trunc",function(e){return e||function(t){if(t=Number(t),isNaN(t)||t===1/0||t===-1/0||0===t)return t;var n=Math.floor(Math.abs(t));return t<0?-n:n}});var Je=this||self;function ue(e,t){e=e.split(".");var i,n=Je;e[0]in n||typeof n.execScript>"u"||n.execScript("var "+e[0]);for(;e.length&&(i=e.shift());)e.length||void 0===t?n=n[i]&&n[i]!==Object.prototype[i]?n[i]:n[i]={}:n[i]=t}function Nr(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function pr(e){return e.h/(1-Math.pow(e.g,e.i))}function Li(){this.h=new Nr(2),this.j=new Nr(5),this.g=0,this.i=128e3,this.l=16e3}function Or(){}function Rn(){}function Be(){}function fr(e){var t=Jt.apply(1,arguments);vi.has(e)||(vi.add(e),Be.apply(Or,ee(t)))}function ps(){}Nr.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.i+=e)},Li.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},Li.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)}},Li.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(pr(this.h),pr(this.j))};var vi=new Set;function Zr(){this.g=new Map}function et(){this.g=new Zr}function Pu(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.g=function xo(e,t){if(null==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(i){return!n.has(i)}),function gs(e){var t=So;if(null==t){t=!1;try{var n={},i={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",i),Object.defineProperty(n,"capture",i),e.addEventListener("test",i=function(){},n),e.removeEventListener("test",i,n)}catch{t=!1}So=t}return t||!1}(e)?t:t.capture||!1}(e,i),this.target.addEventListener(t,n,this.g)}X.console&&((new Map).set(1,function(){return console.error.apply(console,ee(Jt.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,ee(Jt.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,ee(Jt.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,ee(Jt.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,ee(Jt.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,ee(Jt.apply(0,arguments)))}),Be=function(){return console.warn.apply(console,ee(Jt.apply(0,arguments)))},Rn=function(){console.error.apply(console,ee(Jt.apply(0,arguments)))}),(h=Zr.prototype).push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},h.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},h.remove=function(e,t){if(this.g.has(e)){var n=this.g.get(e).filter(function(i){return i!=t});this.g.set(e,n),n.length||this.g.delete(e)}},h.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},h.size=function(){return this.g.size},h.keys=function(){return Array.from(this.g.keys())},(h=et.prototype).release=function(){this.Sa(),this.g=null},h.F=function(e,t,n,i){this.g&&(e=new Pu(e,t,n,i),this.g.push(t,e))},h.Aa=function(e,t,n,i){var o=this;this.F(e,t,function r(s){o.La(e,t,r),n(s)},i)},h.La=function(e,t,n){if(this.g)for(var i=this.g.get(t)||[],r=(i=m(i)).next();!r.done;r=i.next())(r=r.value).target!=e||n!=r.listener&&n||(r.La(),this.g.remove(t,r))},h.Sa=function(){if(this.g){for(var e=[],t=m(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,ee(n.value));for(t=(e=m(e)).next();!t.done;t=e.next())t.value.La();this.g.g.clear()}},ue("shaka.util.EventManager",et),et.prototype.removeAll=et.prototype.Sa,et.prototype.unlisten=et.prototype.La,et.prototype.listenOnce=et.prototype.Aa,et.prototype.listen=et.prototype.F,et.prototype.release=et.prototype.release,Pu.prototype.La=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var So=void 0;function kt(e){this.h=e,this.g=void 0}
1function Ne(){return $n.value()}ue("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3}),kt.prototype.value=function(){return void 0===this.g&&(this.g=this.h()),this.g};var Fn=null,nr=null,$n=new kt(function(){var e=void 0;return Fn&&(e=Fn()),!e&&nr&&(e=nr()),e});function Kn(e,t){this.g=e,this.h=t}function be(e,t){var n=new Kn(5,0),r=jr.g;((n.g-r.g||n.h-r.h)>0?jr.i:jr.h)(jr.g,n,e,t)}function Jn(e,t,n,i){Be([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",i].join(" "))}function ms(e,t,n,i){Rn([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",i].join(" "))}Kn.prototype.toString=function(){return"v"+this.g+"."+this.h};var jr=null,Qr=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");function O(e){var t;e instanceof O?(V(this,e.dc),this.gd=e.gd,q(this,e.Eb),J(this,e.yd),this.pb=e.pb,ge(this,e.g.clone()),this.Qc=e.Qc):e&&(t=String(e).match(Qr))?(V(this,t[1]||"",!0),this.gd=ie(t[2]||""),q(this,t[3]||"",!0),J(this,t[4]),this.pb=ie(t[5]||"",!0),ge(this,t[6]||"",!0),this.Qc=ie(t[7]||"")):this.g=new tt(null)}function V(e,t,n){e.dc=n?ie(t,!0):t,e.dc&&(e.dc=e.dc.replace(/:$/,""))}function q(e,t,n){e.Eb=n?ie(t,!0):t}function J(e,t){if(t){if(t=Number(t),isNaN(t)||t<0)throw Error("Bad port number "+t);e.yd=t}else e.yd=null}function ge(e,t,n){t instanceof tt?e.g=t:(n||(t=me(t,De)),e.g=new tt(t))}function ie(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function me(e,t,n){return null!=e?(e=encodeURI(e).replace(t,ce),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function ce(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(h=O.prototype).dc="",h.gd="",h.Eb="",h.yd=null,h.pb="",h.Qc="",h.toString=function(){var e=[],t=this.dc;if(t&&e.push(me(t,ve,!0),":"),t=this.Eb){e.push("//");var n=this.gd;n&&e.push(me(n,ve,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.yd)&&e.push(":",String(t))}return(t=this.pb)&&(this.Eb&&"/"!=t.charAt(0)&&e.push("/"),e.push(me(t,"/"==t.charAt(0)?Re:Fe,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.Qc)&&e.push("#",me(t,Rt)),e.join("")},h.resolve=function(e){var t=this.clone();"data"===t.dc&&(t=new O);var n=!!e.dc;n?V(t,e.dc):n=!!e.gd,n?t.gd=e.gd:n=!!e.Eb,n?q(t,e.Eb):n=null!=e.yd;var i=e.pb;if(n)J(t,e.yd);else if(n=!!e.pb){if("/"!=i.charAt(0))if(this.Eb&&!this.pb)i="/"+i;else{var r=t.pb.lastIndexOf("/");-1!=r&&(i=t.pb.substr(0,r+1)+i)}if(".."==i||"."==i)i="";else if(-1!=i.indexOf("./")||-1!=i.indexOf("/.")){r=0==i.lastIndexOf("/",0),i=i.split("/");for(var o=[],s=0;s<i.length;){var u=i[s++];"."==u?r&&s==i.length&&o.push(""):".."==u?((o.length>1||1==o.length&&""!=o[0])&&o.pop(),r&&s==i.length&&o.push("")):(o.push(u),r=!0)}i=o.join("/")}}return n?t.pb=i:n=""!==e.g.toString(),n?ge(t,e.g.clone()):n=!!e.Qc,n&&(t.Qc=e.Qc),t},h.clone=function(){return new O(this)};var ve=/[#\/\?@]/g,Fe=/[#\?:]/g,Re=/[#\?]/g,De=/[#\?@]/g,Rt=/#/g;function tt(e){this.g=e||null}function ht(e){if(!e.gb&&(e.gb=new Map,e.Pd=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var i=t[n].indexOf("="),r=null;if(i>=0){var o=t[n].substring(0,i);r=t[n].substring(i+1)}else o=t[n];o=decodeURIComponent(o),r=r||"",e.add(o,decodeURIComponent(r))}}function xt(e){return ht(e),e.Pd}function it(){}function pt(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=oe(e);t=oe(t);for(var i=0;i<e.byteLength;i++)if(n[i]!=t[i])return!1;return!0}function Qe(e){return ArrayBuffer.isView(e)?0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function oe(e,t,n){return ct(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function lt(e,t,n){return ct(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint16Array)}function Ve(e,t,n){return ct(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function ct(e,t,n,i){var r=ArrayBuffer.isView(e)?e.buffer:e,o=1;"BYTES_PER_ELEMENT"in i&&(o=i.BYTES_PER_ELEMENT);var s=((e.byteOffset||0)+e.byteLength)/o;return new i(r,e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/o,s))),Math.floor(Math.min(e+Math.max(n,0),s))-e)}
1function k(e,t,n){var i=Jt.apply(3,arguments);if(this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1,this.message="Shaka Error "+this.code,Pt)try{throw Error(this.message||"Shaka Error")}catch(r){this.stack=r.stack}}(h=tt.prototype).gb=null,h.Pd=null,h.add=function(e,t){ht(this),this.g=null;var n=this.gb.has(e)?this.gb.get(e):null;return n||this.gb.set(e,n=[]),n.push(t),this.Pd++,this},h.set=function(e,t){return ht(this),this.g=null,this.gb.has(e)?this.gb.set(e,[t]):this.add(e,t),this},h.get=function(e){return ht(this),this.gb.get(e)||[]},h.toString=function(){if(this.g)return this.g;if(!this.gb||!this.gb.size)return"";for(var e=[],t=m(this.gb.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=encodeURIComponent(i),i=this.gb.get(i);for(var r=0;r<i.length;r++){var o=n;""!==i[r]&&(o+="="+encodeURIComponent(i[r])),e.push(o)}}return this.g=e.join("&")},h.clone=function(){var e=new tt;if(e.g=this.g,this.gb){for(var t=new Map,n=m(this.gb),i=n.next();!i.done;i=n.next()){var r=m(i.value);i=r.next().value,r=r.next().value,t.set(i,r.concat())}e.gb=t,e.Pd=this.Pd}return e},ue("shaka.util.BufferUtils",it),it.toDataView=Ve,it.toUint16=lt,it.toUint8=oe,it.toArrayBuffer=Qe,it.equal=pt,k.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},ue("shaka.util.Error",k);var Pt=!0;function Tt(){}function We(e){if(!e)return"";if(239==(e=oe(e))[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),X.TextDecoder&&!Ne().sh())return(e=(new TextDecoder).decode(e)).includes("\ufffd")&&Rn('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 i=65533;if(0==(128&e[n])?i=e[n]:e.length>=n+2&&192==(224&e[n])&&128==(192&e[n+1])?(i=(31&e[n])<<6|63&e[n+1],n+=1):e.length>=n+3&&224==(240&e[n])&&128==(192&e[n+1])&&128==(192&e[n+2])?(i=(15&e[n])<<12|(63&e[n+1])<<6|63&e[n+2],n+=2):e.length>=n+4&&240==(241&e[n])&&128==(192&e[n+1])&&128==(192&e[n+2])&&128==(192&e[n+3])&&(i=(7&e[n])<<18|(63&e[n+1])<<12|(63&e[n+2])<<6|63&e[n+3],n+=3),i<=65535)t+=String.fromCharCode(i);else{var r=1023&(i-=65536);t+=String.fromCharCode(55296+(i>>10)),t+=String.fromCharCode(56320+r)}}return t}function Gt(e,t,n){if(!e)return"";if(!n&&e.byteLength%2!=0)throw new k(2,2,2004);n=Math.floor(e.byteLength/2);var i=new Uint16Array(n);e=Ve(e);for(var r=0;r<n;r++)i[r]=e.getUint16(2*r,t);return yi(i)}function wn(e){function t(i){return n.byteLength<=i||n[i]>=9&&n[i]<=126}if(!e)return"";var n=oe(e);if(239==n[0]&&187==n[1]&&191==n[2])return We(n);if(254==n[0]&&255==n[1])return Gt(n.subarray(2),!1);if(255==n[0]&&254==n[1])return Gt(n.subarray(2),!0);if(0==n[0]&&0==n[2])return Gt(e,!1);if(0==n[1]&&0==n[3])return Gt(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return We(e);throw new k(2,2,2003)}function zt(e){if(X.TextEncoder&&!Ne().sh()){var t=new TextEncoder;return Qe(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 Qe(t)}function ui(e,t){for(var n=new ArrayBuffer(2*e.length),i=new DataView(n),r=0;r<e.length;++r)i.setUint16(2*r,e.charCodeAt(r),t);return n}function yi(e){return Bi.value()(e)}function mt(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'"," ":"\xa0","‎":"\u200e","‏":"\u200f"},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(r){return"#"==r[1]?(r="x"==r[2]||"X"==r[2]?parseInt(r.substring(3),16):parseInt(r.substring(2),10))>=0&&r<=1114111?String.fromCodePoint(r):"":t[r]||"'"}):e||""}k.Severity={RECOVERABLE:1,CRITICAL:2},k.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},k.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,INVA
1LID_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:4054,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},ue("shaka.util.StringUtils",Tt),Tt.resetFromCharCode=function(){Bi.g=void 0}
1,Tt.toUTF16=ui,Tt.toUTF8=zt,Tt.fromBytesAutoDetect=wn,Tt.fromUTF16=Gt,Tt.fromUTF8=We;var Bi=new kt(function(){function e(n){try{var i=new Uint8Array(n);return String.fromCharCode.apply(null,i).length>0}catch{return!1}}for(var t={Lc:65536};t.Lc>0;(t={Lc:t.Lc}).Lc/=2)if(e(t.Lc))return function(n){return function(i){for(var r="",o=0;o<i.length;o+=n.Lc)r+=String.fromCharCode.apply(null,i.subarray(o,o+n.Lc));return r}}(t);return null});function Nt(){}function Fi(e){return e=yi(oe(e)),btoa(e)}function Vn(e,t){return t=t??!0,e=Fi(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function sn(e){e=X.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}function Nn(e){for(var t=e.length/2,n=new Uint8Array(t),i=0;i<t;i++)n[i]=X.parseInt(e.substr(2*i,2),16);return n}function Ti(e){var t=oe(e);e="";for(var n=(t=m(t)).next();!n.done;n=t.next())1==(n=(n=n.value).toString(16)).length&&(n="0"+n),e+=n;return e}function _t(){for(var e=Jt.apply(0,arguments),t=0,n=0;n<e.length;++n)t+=e[n].byteLength;t=new Uint8Array(t);for(var i=n=0;i<e.length;++i){var r=e[i];ArrayBuffer.isView(r)&&1===r.BYTES_PER_ELEMENT?t.set(r,n):t.set(oe(r),n),n+=r.byteLength}return t}function Kt(e,t,n){if(n=void 0===n?"":n,0==t.length)return e;if(1==e.length&&1==t.length){var i=new O(e[0]);return t=new O(t[0]),t=i.resolve(t),n&&ge(t,n),[t.toString()]}t=t.map(function(u){return new O(u)}),i=[];for(var r=(e=m(e)).next();!r.done;r=e.next()){r=new O(r.value);for(var o=m(t),s=o.next();!s.done;s=o.next())s=r.resolve(s.value),n&&ge(s,n),i.push(s.toString())}return i}function ir(e,t,n,i){return e={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set},i&&(e.keySystemUris=new Set([i])),e}function vs(e,t){t=void 0===t?"cenc":t;var n=[],i=[],r=[];e.forEach(function(s,u){var a=u;22!=a.length&&(a=Vn(Nn(u),!1));var l=s;22!=l.length&&(l=Vn(Nn(s),!1)),n.push(s={kty:"oct",kid:a,k:l}),i.push(s.kid),r.push(u)}),e=JSON.stringify({keys:n});var o=JSON.stringify({kids:i});return o=[{initData:oe(zt(o)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:t,licenseServerUri:"data:application/json;base64,"+X.btoa(e),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:o,keyIds:new Set(r)}}function Vi(e,t){if(1==t.length)return t[0];if(null!=(e=Cn(e,t)))return e;throw new k(2,4,4025,t)}function Cn(e,t){for(var n=$s.get(e),i=(n=m(n)).next();!i.done;i=n.next()){i=i.value;for(var r=m(t),o=r.next();!o.done;o=r.next())if(i.test((o=o.value).trim()))return o.trim()}return e==Pe?"":null}function jo(e,t){for(var n=[],i=(e=m(e=$s.get(e))).next();!i.done;i=e.next()){i=i.value;for(var r=m(t),o=r.next();!o.done;o=r.next())i.test((o=o.value).trim())&&n.push(o.trim())}return n}ue("shaka.util.Uint8ArrayUtils",Nt),Nt.concat=_t,Nt.toHex=Ti,Nt.fromHex=Nn,Nt.fromBase64=sn,Nt.toBase64=Vn,Nt.toStandardBase64=Fi;var Pe="text",cn={Ea:"video",ha:"audio",Ua:Pe,Vf:"image",ql:"application"},qs=1/15,$s=(new Map).set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function Ur(e,t,n,i){this.g=null,this.l=e,this.i=t,this.m=n,this.o=i,this.j=!1;e:{if(typeof libDPIModule>"u"&&Be("Could not find LCEVC Library dependencies on this page"),typeof LCEVCdec<"u")this.h=LCEVCdec;else{if(!(typeof LcevcDil<"u")){Be("Could not find LCEVC Library on this page"),e=!1;break e}this.h=LcevcDil,this.j=!0,be("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead")}typeof this.h.SupportObject>"u"?(Be("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||Be(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 Ao(e,t,n,i){"video"!==i.type||e.o&&!i.baseOriginalId||e.g&&e.g.appendBuffer(t,"video",i.id,-n,!e.o)}function ys(e){e.g&&e.i.classList.add("shaka-hidden")}function Js(e){return!!(e&&typeof LCEVCdec<"u")&&"lvc1"==e.codecs}function Zt(e){if(Uo.has(e))return Uo.get(e);var t=X.ManagedMediaSource||X.MediaSource;
1return!!t&&(t=t.isTypeSupported(e),Uo.set(e,t),t)}function Hi(){var e=X.ManagedSourceBuffer||X.SourceBuffer;return!!e&&!!e.prototype&&!!e.prototype.changeType}function Ts(){var e=X.ManagedMediaSource||X.MediaSource;return!!(e&&e.prototype&&e.prototype.setLiveSeekableRange&&e.prototype.clearLiveSeekableRange)}Ur.prototype.release=function(){this.g&&(this.g.close(),this.g=null)},ue("shaka.lcevc.Dec",Ur),Ur.prototype.release=Ur.prototype.release;var Uo=new Map;function Pi(){}function ws(){}function xs(){}function wi(e){this.h=new Map,this.i=0,this.j=new ws,(e=Zs(e.toLowerCase()))&&(this.j=e()),this.g=new Pi,(e=Gi)&&(this.g=e(),this.h.set(this.i,this.g))}function Bo(e,t){Ss.set(e,t)}function Zs(e){return Ss.get(e)}Pi.prototype.extract=function(){},Pi.prototype.decode=function(){return[]},Pi.prototype.clear=function(){},Pi.prototype.getStreams=function(){return[]},ws.prototype.init=function(){},ws.prototype.parse=function(){return[]},(h=xs.prototype).init=function(){},h.xf=function(){},h.Jd=function(){},h.remove=function(){},h.Wf=function(){},ue("shaka.media.IClosedCaptionParser",xs),(h=wi.prototype).init=function(e,t,n){if(t=void 0!==t&&t,-1!=(n=void 0===n?-1:n)&&this.i!=n){var i=this.h.get(t=n);this.h.set(this.i,this.g),i?this.g=i:((i=Gi)&&(this.g=i()),this.h.set(t,this.g))}else t||this.Jd();this.j.init(e),-1!=n&&(this.i=n)},h.xf=function(e){for(var t=(e=m(e=this.j.parse(e))).next();!t.done;t=e.next()){var n=oe((t=t.value).packet);n.length>0&&this.g.extract(n,t.pts)}return this.g.decode()},h.Jd=function(){this.g.clear()},h.remove=function(e){e=void 0===e?[]:e,e=new Set(e);for(var t=m(this.h.keys()),n=t.next();!n.done;n=t.next())if(!e.has(n=n.value)){var i=this.h.get(n);i&&i.clear(),this.h.delete(n)}},h.Wf=function(){return this.g.getStreams()},ue("shaka.media.ClosedCaptionParser",wi),wi.findDecoder=function(){return Gi},wi.unregisterDecoder=function(){Gi=null},wi.registerDecoder=function(e){Gi=e},wi.findParser=Zs,wi.unregisterParser=function(e){Ss.delete(e)},wi.registerParser=Bo;var Ss=new Map,Gi=null;function gr(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=xi,this.scroll=sc}ue("shaka.text.CueRegion",gr);var xi=1;gr.units={PX:0,PERCENTAGE:xi,LINES:2};var sc="";function Ha(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function Ki(e,t){(t=e.indexOf(t))>-1&&e.splice(t,1)}function As(e,t,n){if(n||(n=Ha),e.length!=t.length)return!1;t=t.slice();for(var i=(e=m(e)).next(),r={};!i.done;r={mi:void 0},i=e.next()){if(r.mi=i.value,-1==(i=t.findIndex(function(o){return function(s){return n(o.mi,s)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function Qs(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=Ha),e.length!=t.length)return!1;for(var i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1;return!0}function Es(e){this.h=e||"",this.g=0}function Eo(e){Io(e,/[ \t]+/gm)}function Io(e,t){return t.lastIndex=e.g,t=null==(t=t.exec(e.h))?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||null==t||t.position!=e.g?null:(e.g+=t.length,t.results)}function eo(e){return e.g==e.h.length?null:(e=Io(e,/[^ \t\n]*/gm))?e[0]:null}function Fo(e){if(null==(e=Io(e,uc)))return null;var t=Number(e[2]),n=Number(e[3]);return t>59||n>59?null:(Number(e[6])||0)/1e3+n+60*t+3600*(Number(e[1])||0)}function Vo(e){return e?Fo(new Es(e)):null}gr.scrollMode={NONE:sc,UP:"up"};var uc=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Is(){}function rr(e){var n=new WeakSet;return function t(i){switch(typeof i){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return i;default:if(!i||ArrayBuffer.isView(i))return i;if(n.has(i))return null;var r=Array.isArray(i);if(i.constructor!=Object&&!r)return null;n.add(i);var s,o=r?[]:{};for(s in i)o[s]=t(i[s]);return r&&(o.length=i.length),o}}(e)}function to(e){var n,t={};for(n in e)t[n]=e[n];return t}function eu(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var i=n.toString(),r=e[n];void 0!==r&&(r=eu(r))&&t.push(i+":"+r)}e="["+t.join(",")+"]"}else if("function"==typeof e)e="";else if(e instanceof Object){for((n=Object.keys(e)).sort(),t=[],i=(n=m(n)).next();!i.done;i=n.next())r=i.value,i=JSON.stringify(r),void 0!==(r=e[r])&&(r=eu(r))&&t.push(i+":"+r);
1e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}function Br(e,t){var n=void 0!==n&&n;return mr(e=wn(e),t,n)}function mr(e,t,n){return e=function Nh(e,t){function i(){for(var o=r;-1==="\r\n\t>/= ".indexOf(e[r])&&e[r];)r++;return e.slice(o,r)}var r=0;return function n(o,s){s=void 0!==s&&s;for(var u=[];e[r];)if(60==e.charCodeAt(r)){if(47===e.charCodeAt(r+1)){s=r+2,r=e.indexOf(">",r);var a=(s=e.substring(s,r)).indexOf(o);if(-1==a){var l=o.indexOf(".");l>0&&(a=s.indexOf(o.substring(0,l)))}if(-1==a)throw o=e.substring(0,r).split("\n"),Error("Unexpected close tag\nLine: "+(o.length-1)+"\nColumn: "+(o[o.length-1].length+1)+"\nChar: "+e[r]);r+1&&(r+=1);break}if(33===e.charCodeAt(r+1)){if(45==e.charCodeAt(r+2)){for(;-1!==r&&(62!==e.charCodeAt(r)||45!=e.charCodeAt(r-1)||45!=e.charCodeAt(r-2)||-1==r);)r=e.indexOf(">",r+1);-1===r&&(r=e.length)}else if(91===e.charCodeAt(r+2)&&91===e.charCodeAt(r+8)&&"cdata"===e.substr(r+3,5).toLowerCase()){-1==(a=e.indexOf("]]>",r))?(u.push(e.substr(r+9)),r=e.length):(u.push(e.substring(r+9,a)),r=a+3);continue}r++;continue}e:{l=s,r++;var c=i(),d={};for(a=[];62!==e.charCodeAt(r)&&e[r];){var f=e.charCodeAt(r);if(f>64&&f<91||f>96&&f<123){f=i();for(var g=e.charCodeAt(r);g&&39!==g&&34!==g&&!(g>64&&g<91||g>96&&g<123)&&62!==g;)r++,g=e.charCodeAt(r);var v=r+1;if(r=e.indexOf(e[r],v),v=e.slice(v,r),39===g||34===g){if(-1===r){if(l={tagName:c,attributes:d,children:a,parent:null},t)for(c=0;c<a.length;c++)"string"!=typeof a[c]&&(a[c].parent=l);a=l;break e}}else v=null,r--;if(f.startsWith("xmlns:")){g=v;var y=f.split(":")[1];Ou.set(g,y),ju.set(y,g)}"tt"===c&&"xml:space"===f&&"preserve"===v&&(l=!0),d[f]=v}r++}for(47!==e.charCodeAt(r-1)?(r++,a=n(c,l)):r++,l={tagName:c,attributes:d,children:a,parent:null},c=a.length,d=0;d<c;d++)"string"!=typeof(f=a[d])?t&&(f.parent=l):d==c-1&&"\n"==f&&a.pop();a=l}if(u.push(a),"string"==typeof a)break;"?"===a.tagName[0]&&a.children&&(u.push.apply(u,ee(a.children)),a.children=[])}else a=r,-2==(r=e.indexOf("<",r)-1)&&(r=e.length),a=e.slice(a,r+1),s?a.length>0&&u.push(a):(u.length&&1==a.length&&"\n"==a[0]||a.trim().length>0)&&u.push(a),r++;return u}("")}(e,void 0!==n&&n),!t&&e.length?e[0]:(e=e.find(function(i){return t.split(",").includes(i.tagName)}))?e:null}function tu(e){return Ou.has(e)?Ou.get(e):""}function bu(e){return"string"==typeof e}function ac(e){var t=[];if(!e.children)return[];for(var n=(e=m(e.children)).next();!n.done;n=e.next())"string"!=typeof(n=n.value)&&t.push(n);return t}function ft(e,t){var n=[];if(!e.children)return[];for(var i=(e=m(e.children)).next();!i.done;i=e.next())(i=i.value).tagName===t&&n.push(i);return n}function fn(e){return"string"==typeof e?mt(e):""===(e=e.children.reduce(function(t,n){return"string"==typeof n?t+n:t},""))?null:mt(e)}function Si(e){return Array.from(e.children).every(function(t){return"string"==typeof t})?((e=fn(e))&&(e=e.trim()),e):null}function vr(e,t,n){if(n=void 0===n?[]:n,e.tagName===t&&n.push(e),e.children)for(var i=(e=m(e.children)).next();!i.done;i=e.next())vr(i.value,t,n);return n}function Yt(e,t){return 1!=(e=ft(e,t)).length?null:e[0]}
1function vn(e,t,n){return 1!=(e=Ru(e,t,n)).length?null:e[0]}function Ae(e,t,n,i){i=void 0===i?null:i;var r=null;return null!=(e=e.attributes[t])&&(r=n(e)),r??i}function Fr(e,t,n){return t=tu(t),e.attributes[t+":"+n]||null}function Ru(e,t,n){var i=tu(t);if(t=[],e.children)for(n=i?i+":"+n:n,i=(e=m(e.children)).next();!i.done;i=e.next())(i=i.value)&&i.tagName===n&&t.push(i);return t}function Vr(e,t,n){for(var i=(t=m(t)).next();!i.done;i=t.next())if(i=Fr(e,i.value,n))return i;return null}function no(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 yr(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=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):null}function nu(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t&&(e=Number(t[1]),isFinite(e))?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null}function Mn(e){return(e=Number(e))%1==0?e:null}function Hr(e){return(e=Number(e))%1==0&&e>0?e:null}function On(e){return(e=Number(e))%1==0&&e>=0?e:null}function iu(e){return e=Number(e),isNaN(e)?null:e}function ru(e){return!!e&&"true"===e.toLowerCase()}function lc(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function ou(e){for(var t=[],n=(e=m(e=mt(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/))).next();!n.done;n=e.next()){var i=(n=n.value).match(/^([\w]+)/);if(i){var r=n.match(/(@id='(.*?)')/),o=n.match(/(@t='(\d+)')/),s=n.match(/(@n='(\d+)')/),u=n.match(/\[(\d+)\]/);t.push({name:i[0],id:r?r[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:u?Number(u[1])-1:null,Ac:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].Ac=n.slice(1))}return t}function Ga(e,t){var n=ou(t.attributes.sel||"");if(n.length){var i=n[n.length-1],r=t.attributes.pos||null;null==(n=i.position)&&(null!==i.t&&(n=Ka(e,"t",i.t)),null!==i.n&&(n=Ka(e,"n",i.n))),null===n?n="prepend"===r?0:e.length:"prepend"===r?--n:"after"===r&&++n,r=t.tagName,(i=i.Ac)&&e[n]?cc(e[n],r,i,Si(t)||""):("remove"!==r&&"replace"!==r||e.splice(n,1),"add"!==r&&"replace"!==r||e.splice.apply(e,[n,0].concat(ee(t.children))))}}function Ka(e,t,n){for(var i=0,r=(e=m(e)).next();!r.done;r=e.next()){if(Number(r.value.attributes[t])===n)return i;i++}return null}function cc(e,t,n,i){"remove"===t?delete e.attributes[n]:("add"===t||"replace"===t)&&(e.attributes[n]=i)}function Wa(e){var t="",n=e.tagName.split(":");for(var i in n.length>0&&(t=ju.has(t=n[0])?ju.get(t):""),t=document.createElementNS(t,e.tagName),e.attributes)t.setAttribute(i,e.attributes[i]);for(i=(e=m(e.children)).next();!i.done;i=e.next())n=void 0,n="string"==typeof(i=i.value)?new Text(i):Wa(i),t.appendChild(n);return t}function Nu(e){if(!e)return null;for(var t={tagName:e.tagName,attributes:to(e.attributes),children:[],parent:null},n=(e=m(e.children)).next();!n.done;n=e.next())"string"==typeof(n=n.value)||((n=Nu(n)).parent=t),t.children.push(n);return t}ue("shaka.util.ObjectUtils",Is),Is.alphabeticalKeyOrderStringify=eu,Is.shallowCloneObject=to,Is.cloneObject=rr;var Ou=new Map,ju=new Map;function Dt(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new gr,this.position=null,this.positionAlign=Bu,this.size=0,this.textAlign=Tr,this.direction=au,this.writingMode=Go,this.lineInterpretation=lu,this.line=null,this.lineHeight="",this.lineAlign=Ko,this.displayAlign=Ms,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=hc,this.fontStyle=qa,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 Xa(e,t){return(e=new Dt(e,t,"")).lineBreak=!0,e}function su(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("startTime"!=n&&"endTime"!=n&&"payload"!=n)if("nestedCues"==n){if(!Qs(e.nestedCues,t.nestedCues,su))return!1}else if("region"==n||"cellResolution"==n){for(var i in e[n])if(e[
1n][i]!=t[n][i])return!1}else if(Array.isArray(e[n])){if(!Qs(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1;return!0}function uu(e,t){t=void 0===t?new Map:t;var n=e.payload;if(n.includes("<")){0===t.size&&Uu(t);var i=n;n=[];for(var r=-1,o=0;o<i.length;o++)"<"===i[o]?r=o+1:">"===i[o]&&r>0&&((r=i.substr(r,o-r)).match(du)&&n.push(r),r=-1);for(o=(n=m(n)).next();!o.done;o=n.next())i=i.replace("<"+(o=o.value)+">",'<div time="'+o+'">'),i+="</div>";e:{o=i,r=[];var s=-1;n="",i=!1;for(var u=0;u<o.length;u++)if("/"===o[u]){var a=o.indexOf(">",u);if(-1===a){n=o;break e}if((a=o.substring(u+1,a))&&"v"==a){i=!0;var l=null;if(r.length&&(l=r[r.length-1]),l){if(l===a)n+="/"+a+">";else{if(!l.startsWith("v")){n+=o[u];continue}n+="/"+l+">"}u+=a.length+1}else n+=o[u]}else n+=o[u]}else"<"===o[u]?"v"!=o[s=u+1]&&(s=-1):">"===o[u]&&s>0&&(r.push(o.substr(s,u-s)),s=-1),n+=o[u];for(r=(o=m(r)).next();!r.done;r=o.next())s=(r=r.value).replace(" ",".voice-"),n=(n=n.replace("<"+r+">","<"+s+">")).replace("</"+r+">","</"+s+">"),i||(n+="</"+s+">")}n=function Ho(e){var t={"< ":""," >":" >"},n=/(< +>|<\s|\s>)/g,i=RegExp(n.source);return e&&i.test(e)?e.replace(n,function(r){return t[r]||""}):e||""}(n),e.payload="";try{var c=mr("<span>"+n+"</span>","span")}catch{}if(c)if(1!=(c=c.children).length||c[0].tagName)for(n=(c=m(c)).next();!n.done;n=c.next())za(n.value,e,t);else e.payload=mt(n);else e.payload=mt(n)}else e.payload=mt(n)}function Uu(e){for(var t=m(Object.entries(Ya)),n=t.next();!n.done;n=t.next()){var i=m(n.value);n=i.next().value,i=i.next().value;var r=new Dt(0,0,"");r.color=i,e.set("."+n,r)}for(n=(t=m(Object.entries(dc))).next();!n.done;n=t.next())n=(i=m(n.value)).next().value,i=i.next().value,(r=new Dt(0,0,"")).backgroundColor=i,e.set("."+n,r)}function za(e,t,n){var i=t.clone();if(i.nestedCues=[],i.payload="",i.rubyTag="",i.line=null,i.region=new gr,i.position=null,i.size=0,i.textAlign=Tr,e.tagName)for(var r=m(e.tagName.split(/(?=[ .])+/g)),o=r.next();!o.done;o=r.next()){var s=o=o.value;if(s.startsWith(".voice-")){var u=s.split("-").pop();n.has(s='v[voice="'+u+'"]')||(s="v[voice="+u+"]")}switch(n.has(s)&&(u=i,s=n.get(s))&&(u.backgroundColor=Cs(s.backgroundColor,u.backgroundColor),u.color=Cs(s.color,u.color),u.fontFamily=Cs(s.fontFamily,u.fontFamily),u.fontSize=Cs(s.fontSize,u.fontSize),u.textShadow=Cs(s.textShadow,u.textShadow),u.fontWeight=s.fontWeight,u.fontStyle=s.fontStyle,u.opacity=s.opacity,u.rubyTag=s.rubyTag,u.textCombineUpright=s.textCombineUpright,u.wrapLine=s.wrapLine),o){case"br":return i=Xa(i.startTime,i.endTime),void t.nestedCues.push(i);case"b":i.fontWeight=ks;break;case"i":i.fontStyle=_s;break;case"u":i.textDecoration.push(Wi);break;case"font":(o=e.attributes.color)&&(i.color=o);break;case"div":if(!(o=e.attributes.time))break;(o=Vo(o))&&(i.startTime=o);break;case"ruby":case"rp":case"rt":i.rubyTag=o}}if(r=e.children,bu(e)||1==r.length&&bu(r[0]))for(n=fn(e).split("\n"),e=!0,r=(n=m(n)).next();!r.done;r=n.next())r=r.value,e||(e=Xa(i.startTime,i.endTime),t.nestedCues.push(e)),r.length>0&&((e=i.clone()).payload=mt(r),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(i),e=(t=m(r)).next();!e.done;e=t.next())za(e.value,i,n)}function Cs(e,t){return e&&e.length>0?e:t}Dt.prototype.clone=function(){var t,e=new Dt(0,0,"");for(t in this)e[t]=this[t],Array.isArray(e[t])&&(e[t]=e[t].slice());return e},ue("shaka.text.Cue",Dt),Dt.parseCuePayload=uu,Dt.equal=su,Dt.prototype.clone=Dt.prototype.clone;var Bu="auto";Dt.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Bu};var Tr="center",Fu={LEFT:"left",RIGHT:"right",CENTER:Tr,START:"start",END:"end"};Dt.textAlign=Fu;var Ms="after",io={BEFORE:"before",CENTER:"center",AFTER:Ms};Dt.displayAlign=io;var au="ltr";Dt.direction={HORIZONTAL_LEFT_TO_RIGHT:au,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Go="horizontal-tb";Dt.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Go,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var lu=0;Dt.lineInterpretation={LINE_NUMBER:lu,PERCENTAGE:1};var Ko="start",Vu={CENTER:"center",START:Ko,END:"end"};Dt.lineAlign=Vu;var Ya={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};Dt.defaultTextColor=Ya;var dc={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};
1Dt.defaultTextBackgroundColor=dc;var hc=400,ks=700;Dt.fontWeight={NORMAL:hc,BOLD:ks};var qa="normal",_s="italic",cu={NORMAL:qa,ITALIC:_s,OBLIQUE:"oblique"};Dt.fontStyle=cu;var Wi="underline";Dt.textDecoration={UNDERLINE:Wi,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var du=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Gr(){}function Kr(e,t,n){Hu.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,yf:t})}function Wo(e,t){for(var n=e.toLowerCase().split(";")[0],i=m([pc,ro,Gu,wr]),r=i.next();!r.done;r=i.next())if(r=Hu.get(n+"-"+r.value)){var o=r.yf(),s=o.isSupported(e,t);if(o.destroy(),s)return r.yf}return null}Gr.prototype.destroy=function(){},ue("shaka.transmuxer.TransmuxerEngine",Gr),Gr.findTransmuxer=Wo,Gr.unregisterTransmuxer=function(e,t){Hu.delete(e.toLowerCase().split(";")[0]+"-"+t)},Gr.registerTransmuxer=Kr,Gr.prototype.destroy=Gr.prototype.destroy;var Hu=new Map,wr=1,Gu=2,ro=3,pc=4;function $a(){}function dn(e,t){var n=e;return t&&!so.includes(e)&&(n+='; codecs="'+t+'"'),n}function Xo(e,t){return t&&(e+='; codecs="'+t+'"'),e}function Ku(e,t,n){var i=dn(e,t);return Wo(t=Xo(e,t))?(e=Wo(t))?(n=(e=e()).convertCodecs(n,t),e.destroy()):n=t:n="video/mp2t"!=e&&"audio"==n?i.replace("video","audio"):i,n}function hu(e){return e.split(";")[0].split("/")[1]}function Zn(e){var t=Ds(e);switch(e=t[0].toLowerCase(),t=t[1].toLowerCase(),!0){case"mp4a"===e&&"69"===t:case"mp4a"===e&&"6b"===t:case"mp4a"===e&&"40.34"===t:return"mp3";case"mp4a"===e&&"66"===t:case"mp4a"===e&&"67"===t:case"mp4a"===e&&"68"===t:case"mp4a"===e&&"40.2"===t:case"mp4a"===e&&"40.02"===t:case"mp4a"===e&&"40.5"===t:case"mp4a"===e&&"40.05"===t:case"mp4a"===e&&"40.29"===t:case"mp4a"===e&&"40.42"===t:return"aac";case"mp4a"===e&&"a5"===t:case"ac3"===e:case"ac-3"===e:return"ac-3";case"mp4a"===e&&"a6"===t:case"eac3"===e:case"ec-3"===e:return"ec-3";case"ac-4"===e:return"ac-4";case"mp4a"===e&&"b2"===t:return"dtsx";case"mp4a"===e&&"a9"===t:return"dtsc";case"vp09"===e:case"vp9"===e:return"vp9";case"avc1"===e:case"avc3"===e:return"avc";case"hvc1"===e:case"hev1"===e:return"hevc";case"vvc1"===e:case"vvi1"===e:return"vvc";case"dvh1"===e:case"dvhe"===e:return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case"dvav"===e:case"dva1"===e:return"dovi-avc";case"dav1"===e:return"dovi-av1";case"dvc1"===e:case"dvi1"===e:return"dovi-vvc"}return e}function Xi(e){for(var t=[],n=(e=m(e.split(","))).next();!n.done;n=e.next())n=Ds(n.value),t.push(n[0]);return t.sort().join(",")}function Qn(e){return e.split(";")[0]}function Ai(e){return(e=e.split(/ *; */)).shift(),(e=e.find(function(t){return t.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function oo(e){return"application/x-mpegurl"===e||"application/vnd.apple.mpegurl"===e}function Ds(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}Gr.PluginPriority={FALLBACK:wr,PREFERRED_SECONDARY:Gu,PREFERRED:ro,APPLICATION:pc},ue("shaka.util.MimeUtils",$a),$a.getFullTypeWithAllCodecs=Xo,$a.getFullType=dn,(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var so=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Wr(e){this.i=null,this.j=e,this.C=!1,this.l=this.u=0,this.m=1/0,this.h=this.g=null,this.D="",this.B=function(){},this.o=new Map}function kn(e,t){bs.set(e,t)}function Ls(e){return bs.get(e)}function uo(e){return!!bs.has(e)||("application/cea-608"==e||"application/cea-708"==e)&&!!Gi}function Ps(e,t,n){if(e.D=t,t=e.o.get(t))for(var i=m(t.keys()),r=i.next();!r.done;r=i.next())(r=t.get(r.value).filter(function(o){return o.endTime<=n}))&&e.j.append(r)}function pu(e,t,n){t.startTime+=n,t.endTime+=n;for(var i=(t=m(t.nestedCues)).next();!i.done;i=t.next())pu(e,i.value,n)}Wr.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()},Wr.prototype.remove=function(e,t){var n=this;return L(function(i){if(1==i.g)return x(i,Promise.resolve(),2);!n.j||!n.j.remove(e,t)||null==n.g||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),Z(i)})},ue("shaka.text.TextEngine",Wr),Wr.prototype.destroy=Wr.prototype.destroy,Wr.findParser=Ls,Wr.unregisterParser=function(e){bs.delete(e)},Wr.registerParser=kn;var bs=new Map;function ao(e){this.h=e,this.g=null}function E(e){this.h=e,this.g=null}function p(e,t){return e.concat(t)}function w(){}function C(e){return null!=e}function N(e,t){return Promise.race([t,new Promise(function(n,i){new E(i).ka(e)})])}function F(){}function Y(e,t){return e=te(e),t=te(t),e.split("-")[0]==t.split("-")[0]}function ne(e,t){return e=te(e),t=te(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function de(e,t){return e=te(e),t=te(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function te(e){var t=(e=m(e.split("-x-"))).next().value;t=void 0===t?"":t,e=void 0===(e=e.next().value)?"":e;var n=m(t.split("-"));return t=void 0===(t=n.next().value)?"":t,n=void 0===(n=n.next().value)?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=qe.get(t)||t,((n=n.toUpperCase())?t+"-"+n:t)+(e?"-"+e:"")}function xe(e,t){return e=te(e),(t=te(t))==e?4:ne(t,e)?3:de(t,e)?2:ne(e,t)?1:0}function pe(e){var t=e.indexOf("-");return e=(e=t>=0?e.substring(0,t):e).toLowerCase(),qe.get(e)||e}function gt(e){return e.language?te(e.language):e.audio&&e.audio.language?te(e.audio.language):e.video&&e.video.language?te(e.video.language):"und"}function Ye(e,t){e=te(e);for(var n=new Set,i=(t=m(t)).next();!i.done;i=t.next())n.add(te(i.value));for(i=(t=m(n)).next();!i.done;i=t.next())if((i=i.value)==e)return i;for(i=(t=m(n)).next();!i.done;i=t.next())if(ne(i=i.value,e))return i;for(i=(t=m(n)).next();!i.done;i=t.next())if(de(i=i.value,e))return i;for(t=(n=m(n)).next();!t.done;t=n.next())if(ne(e,t=t.value))return t;return null}ao.prototype.ka=function(e){var t=this;this.stop();var n=!0,i=null;return this.g=function(){X.clearTimeout(i),n=!1},i=X.setTimeout(function(){n&&t.h()},1e3*e),this},ao.prototype.stop=function(){this.g&&(this.g(),this.g=null)},E.prototype.Lb=function(){return this.stop(),this.h(),this},E.prototype.ka=function(e){var t=this;return this.stop(),this.g=new ao(function(){t.h()}).ka(e),this},E.prototype.Ha=function(e){var t=this;return this.stop(),this.g=new ao(function(){t.g.ka(e),t.h()}).ka(e),this},E.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},ue("shaka.util.Timer",E),E.prototype.stop=E.prototype.stop,E.prototype.tickEvery=E.prototype.Ha,E.prototype.tickAfter=E.prototype.ka,E.prototype.tickNow=E.prototype.Lb,ue("shaka.util.LanguageUtils",F),F.findClosestLocale=Ye,F.getLocaleForVariant=gt,F.getL
1ocaleForText=function(e){return te(e.language||"und")},F.getBase=pe,F.relatedness=xe,F.areSiblings=function(e,t){var n=pe(e),i=pe(t);return e!=n&&t!=i&&n==i},F.normalize=te,F.isSiblingOf=de,F.isParentOf=ne,F.areLanguageCompatible=Y,F.areLocaleCompatible=function(e,t){return(e=te(e))==te(t)};var qe=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 st(){}function rt(e,t,n,i,r){function o(S){var A=String(S.width||"")+String(S.height||"")+String(Math.round(S.frameRate||0))+(S.hdr||"")+S.fastSwitching;return S.dependencyStream&&(A+=S.dependencyStream.baseOriginalId||""),S.roles&&(A+=S.roles.sort().join("_")),A}if(r.length){for(var u=e.textStreams,a=(r=m(r)).next(),l={};!a.done;l={Ch:void 0},a=r.next())if(l.Ch=a.value,(a=u.filter(function(S){return function(A){return!(!A.codecs.startsWith(S.Ch)&&!A.mimeType.startsWith(S.Ch))}}(l))).length){u=a;break}e.textStreams=u}if(u=e.variants,(t.length||n.length)&&(u=function un(e,t,n){for(var i=(t=m(t)).next(),r={};!i.done;r={videoCodec:void 0},i=t.next())if(r.videoCodec=i.value,i=e.filter(function(o){return function(s){return s.video&&s.video.codecs.startsWith(o.videoCodec)}}(r)),i.length){e=i;break}for(t=(n=m(n)).next(),i={};!t.done;i={audioCodec:void 0},t=n.next())if(i.audioCodec=t.value,t=e.filter(function(o){return function(s){return s.audio&&s.audio.codecs.startsWith(o.audioCodec)}}(i)),t.length){e=t;break}return e}(u,t,n)),i.length){for(t=new Zr,u=(n=m(u)).next();!u.done;u=n.next())u=u.value,t.push(String(u.video.width||0),u);var c=[];t.forEach(function(S,A){S=0;for(var I=[],_=(A=m(A)).next(),P={};!_.done;P={Tf:void 0},_=A.next())P.Tf=_.value,(_=i.filter(function(b){return function(M){return b.Tf.decodingInfos[0][M]}}(P)).length)>S?(S=_,I=[P.Tf]):_==S&&I.push(P.Tf);c.push.apply(c,ee(I))}),u=c}for(n=new Set,t=new Set,r=(u=m(u)).next();!r.done;r=u.next())(r=r.value).audio&&n.add(r.audio),r.video&&t.add(r.video);u=Array.from(n).sort(function(S,A){return S.bandwidth-A.bandwidth});var S,A,d=[];for(n=new Map,r=(u=m(u)).next();!r.done;r=u.next()){if(A=void 0,A=(S=r=r.value).language+(S.channelsCount||0)+(S.audioSamplingRate||0)+S.roles.join(",")+S.label+S.groupId+S.fastSwitching,S.dependencyStream&&(A+=S.dependencyStream.baseOriginalId||""),(l=n.get(a=A)||[]).length){var f=l[l.length-1],g=Zn(f.codecs),v=Zn(r.codecs);g!=v||r.bandwidth&&f.bandwidth&&!(r.bandwidth>
1f.bandwidth)||(l.push(r),d.push(r.id))}else l.push(r),d.push(r.id);n.set(a,l)}var y={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};u=Array.from(t).sort(function(S,A){if(!S.bandwidth||!A.bandwidth||S.bandwidth==A.bandwidth){if(S.codecs&&A.codecs&&S.codecs!=A.codecs&&S.width==A.width){var I=Zn(S.codecs),_=Zn(A.codecs);if(I!=_)return(y[I]||1)-(y[_]||1)}return S.width-A.width}return S.bandwidth-A.bandwidth}),t=Hi();var T=[];for(n=new Map,r=(u=m(u)).next();!r.done;r=u.next()){if(a=o(r=r.value),(l=n.get(a)||[]).length){if(f=l[l.length-1],!t&&(g=Zn(f.codecs))!==(v=Zn(r.codecs)))continue;(g=Zn(f.codecs))!=(v=Zn(r.codecs))||r.bandwidth&&f.bandwidth&&!(r.bandwidth>f.bandwidth)||(l.push(r),T.push(r.id))}else l.push(r),T.push(r.id);n.set(a,l)}e.variants=e.variants.filter(function(S){var A=S.audio;return S=S.video,!(A&&!d.includes(A.id)||S&&!T.includes(S.id))})}function dt(e,t,n){function i(u,a,l){return u>=a&&u<=l}var r=e.video;if(r&&r.width&&r.height){var o=r.width,s=r.height;if(s>o&&(o=(s=m([s,o])).next().value,s=s.next().value),!i(o,t.minWidth,Math.min(t.maxWidth,n.width))||!i(s,t.minHeight,Math.min(t.maxHeight,n.height))||!i(r.width*r.height,t.minPixels,t.maxPixels))return!1}return!(e&&e.video&&e.video.frameRate&&!i(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||e&&e.audio&&e.audio.channelsCount&&!i(e.audio.channelsCount,t.minChannelsCount,t.maxChannelsCount)||!i(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function bt(e,t,n,i,r){var o,s;return L(function(u){if(1==u.g)return Ne().Vi()&&function Ot(e){for(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,i=(e=m(e)).next();!i.done;i=e.next())(i=i.value).video&&n.add(i.video);for(e=(n=m(n)).next();!e.done;e=n.next()){e=e.value;for(var r=(i=m(t)).next();!r.done;r=i.next()){var o=m(r.value);if(r=o.next().value,o=o.next().value,e.codecs.includes(r)){e.codecs=e.codecs.replace(r,o);break}}}}(t.variants),x(u,Wn(t.variants,n,!1,i),2);o=null,e&&(s=e.g)&&(o=s.keySystem),t.variants=t.variants.filter(function(a){var l=function Qt(e,t,n){if(!e.decodingInfos.some(function(a){return!(!a.supported||t&&(a=a.keySystemAccess)&&(n[a.keySystem]||a.keySystem)!=t)}))return!1;var i=Ne(),r="Xbox"===i.Pb();i="MOBILE"===i.Ma()&&"GECKO"===i.Ca();var o=e.video;return!(r&&o&&((o&&o.width||0)>1920||(o&&o.height||0)>1080)&&(o.codecs.includes("avc1.")||o.codecs.includes("avc3."))||(r=o&&o.dependencyStream)&&!Js(r)||(e=e.audio,i&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")||e&&e.dependencyStream))}(a,o,r);if(!l){var c=[];a.audio&&c.push(vc(a.audio)),a.video&&c.push(vc(a.video))}return l}),Z(u)})}function qt(e,t){var n,i,r,o,s,u,a;return L(function(l){if(1==l.g){for(n=function(c,d){if(c){var f=to(c);return f.supported=c.supported&&d.supported,f.powerEfficient=c.powerEfficient&&d.powerEfficient,f.smooth=c.smooth&&d.smooth,d.keySystemAccess&&!f.keySystemAccess&&(f.keySystemAccess=d.keySystemAccess),f}return d},i=null,r=[],o=m(t),s=o.next(),u={};!s.done;u={cache:void 0,Me:void 0},s=o.next())u.Me=eu(a=s.value),u.cache=fu,u.cache.has(u.Me)?i=n(i,u.cache.get(u.Me)):r.push(gn(a).then(function(c){return function(d){for(var f=null,g=(d=m(d||[])).next();!g.done;g=d.next())f=n(f,g.value);f&&(c.cache.set(c.Me,f),i=n(i,f))}}(u)));return x(l,Promise.all(r),2)}i&&e.decodingInfos.push(i),Z(l)})}function gn(e){var t=[""];e.video&&(t=Ai(e.video.contentType).split(","));var n=[""];e.audio&&(n=Ai(e.audio.contentType).split(","));for(var i=[],r=(t=m(t)).next();!r.done;r=t.next()){r=r.value;for(var o=m(n),s=o.next(),u={};!s.done;u={Pc:void 0},s=o.next())s=s.value,u.Pc=rr(e),e.video&&(u.Pc.video.contentType=dn(Qn(u.Pc.video.contentType),r)),e.audio&&(u.Pc.audio.contentType=dn(Qn(u.Pc.audio.contentType),s)),i.push(new Promise(function(a){return function(l,c){("MOBILE"==Ne().Ma()?N(5,navigator.mediaCapabilities.decodingInfo(a.Pc)):navigator.mediaCapabilities.decodingInfo(a.Pc)).then(function(d){l(d)}).catch(c)}}(u)))}return Promise.all(i).catch(function(){return JSON.stringify(e),null})}function Wn(e,t,n,i){var o,s,u,a,l,c,d,f,g,v,T,S,A,I,_,P;return L(function(M){switch(M.g){case 1:if(e.some(function(D){return D.decodingInfos.length}))return M.return();o=m(i),s=o.next(),u={};case 2:if(s.done){M.A(4);break}u.Ci=s.value,a=!1,l=m(e),c=l.next();case 5:if(c.done){M.A(7);break}f=ai(d=c.value,t,n).filter((D=u,function(R){return((R=R[0]).keySystemConfiguration&&R.keySystemConfiguration.keySystem)===D.Ci})),g=m(f),v=g.next();case 8:if(v.done){M.A(10);break}return x(M,qt(d,v.value),9);case 9:v=g.next(),M.A(8);break;case 10:d.decodingInfos.some(function(D){return D.supported})&&(a=!0),c=l.next(),M.A(5);break;case 7:if(a)return M.return();u={Ci:void 0},s=o.next(),M.A(2);break;case 4:T=m(e),S=T.next();case 12:if(S.done){M.A(0);break}
1I=ai(A=S.value,t,n).filter(function(D){return!(D=(D=D[0]).keySystemConfiguration&&D.keySystemConfiguration.keySystem)||!i.includes(D)}),_=m(I),P=_.next();case 15:if(P.done){S=T.next(),M.A(12);break}return x(M,qt(A,P.value),16);case 16:P=_.next(),M.A(15)}var D})}function ai(e,t,n){var i=e.audio,r=e.video,o=[],s=[];if(r)for(var u=m(r.fullMimeTypes),a=u.next();!a.done;a=u.next()){var l=Ai(a=a.value);if(l.includes(",")&&!i){var c=l.split(","),d=Qn(a);l=Vi("video",c),d=Ku(d,c=li(c=Vi("audio",c),d),"audio"),s.push({contentType:d,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(l=xn(l),a={contentType:Ku(Qn(a),l,"video"),width:r.width||64,height:r.height||64,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||30},r.hdr)switch(r.hdr){case"PQ":a.transferFunction="pq";break;case"HLG":a.transferFunction="hlg"}r.colorGamut&&(a.colorGamut=r.colorGamut),o.push(a)}if(i)for(a=(u=m(i.fullMimeTypes)).next();!a.done;a=u.next())a=Ku(a=Qn(l=a.value),l=li(Ai(l),a),"audio"),s.push({contentType:a,channels:i.channelsCount||2,bitrate:i.bandwidth||e.bandwidth||1,samplerate:i.audioSamplingRate||1,spatialRendering:i.spatialAudio});for(u=[],0==o.length&&o.push(null),0==s.length&&s.push(null),a=(o=m(o)).next();!a.done;a=o.next())for(a=a.value,d=(l=m(s)).next();!d.done;d=l.next())d=d.value,c={type:n?"file":"media-source"},a&&(c.video=a),d&&(c.audio=d),u.push(c);if(!(s=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[u];for(e=[],n=new Map,o=(s=m(s)).next();!o.done;o=s.next())n.get((o=o.value).keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o);for(s=t?"required":"optional",t=t?["persistent-license"]:["temporary"],a=(o=m(n.keys())).next();!a.done;a=o.next()){for(d=n.get(a=a.value),l=new Map,c=(d=m(d)).next();!c.done;c=d.next()){var f=(c=c.value).videoRobustness+","+c.audioRobustness;l.get(f)||l.set(f,[]),l.get(f).push(c)}for(d=(l=m(l.values())).next();!d.done;d=l.next()){d=d.value,c=[];for(var g=(f=m(u)).next();!g.done;g=f.next()){g=Object.assign({},g.value);for(var v={keySystem:a,initDataType:"cenc",persistentState:s,distinctiveIdentifier:"optional",sessionTypes:t},y=m(d),T=y.next();!T.done;T=y.next()){if((T=T.value).initData&&T.initData.length){for(var S=new Set,A=m(T.initData),I=A.next();!I.done;I=A.next())S.add(I.value.initDataType);v.initDataType=T.initData[0].initDataType}T.distinctiveIdentifierRequired&&(v.distinctiveIdentifier="required"),T.persistentStateRequired&&(v.persistentState="required"),T.sessionType&&(v.sessionTypes=[T.sessionType]),i&&(v.audio?(T.encryptionScheme&&(v.audio.encryptionScheme=v.audio.encryptionScheme||T.encryptionScheme),v.audio.robustness=v.audio.robustness||T.audioRobustness):(v.audio={robustness:T.audioRobustness},T.encryptionScheme&&(v.audio.encryptionScheme=T.encryptionScheme)),""==v.audio.robustness&&delete v.audio.robustness),r&&(v.video?(T.encryptionScheme&&(v.video.encryptionScheme=v.video.encryptionScheme||T.encryptionScheme),v.video.robustness=v.video.robustness||T.videoRobustness):(v.video={robustness:T.videoRobustness},T.encryptionScheme&&(v.video.encryptionScheme=T.encryptionScheme)),""==v.video.robustness&&delete v.video.robustness)}g.keySystemConfiguration=v,c.push(g)}e.push(c)}}return e}function li(e,t){var n=Ne();return"flac"==e.toLowerCase()?"WEBKIT"!=n.Ca()?"flac":"fLaC":"opus"===e.toLowerCase()?"WEBKIT"!=n.Ca()?"opus":"mp4"==hu(t)?"Opus":"opus":"ac-3"==e.toLowerCase()&&n.je()?"ec-3":e}function xn(e){if(e.includes("avc1")){var t=e.split(".");if(3==t.length)return e=t.shift()+".",(e+=parseInt(t.shift(),10).toString(16))+("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if("vp9"==e)return"vp09.00.41.08";return e}function Sn(e){var t=e.audio,n=e.video,i=t?t.mimeType:null,r=n?n.mimeType:null,o=t?t.codecs:null,s=n?n.codecs:null,u=t?t.groupId:null,a=[];n&&a.push(n.mimeType),t&&a.push(t.mimeType),a=a[0]||null;var l=[];t&&l.push(t.kind),n&&l.push(n.kind),l=l[0]||null;var c=new Set;if(t)for(var d=m(t.roles),f=d.next();!f.done;f=d.next())c.add(f.value);if(n)for(f=(d=m(n.roles)).next();!f.done;f=d.next())c.add(f.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:a,audioMimeType:i,videoMimeType:r,codecs:"",audioCodec:o,videoCodec:s,primary:e.primary,roles:Array.from(c),audioRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:u,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audio
1Bandwidth: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,(i=n.dependencyStream)&&(e.width=i.width||e.width,e.height=i.height||e.height,e.videoCodec=i.codecs||e.videoCodec),s.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=r,n=s.split(",");try{e.videoCodec=Vi("video",n),e.audioCodec=Vi("audio",n)}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,t=t.dependencyStream)&&(e.audioCodec=t.codecs||e.audioCodec),t=[],e.videoCodec&&t.push(e.videoCodec),e.audioCodec&&t.push(e.audioCodec),e.codecs=t.join(", "),e}function an(e){return{id:e.id,active:!1,type:Pe,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 ho(e){var t=e.width||null,n=e.height||null,i=null;e.segmentIndex&&(i=fo(e.segmentIndex));var r=e.tilesLayout;return i&&(r=i.tilesLayout||r),r&&null!=t&&(t/=Number(r.split("x")[0])),r&&null!=n&&(n/=Number(r.split("x")[1])),{id:e.id,type:"image",bandwidth:e.bandwidth||0,width:t,height:n,mimeType:e.mimeType,codecs:e.codecs||null,tilesLayout:r||null,originalImageId:e.originalId}}function ei(e){return e.__shaka_id||(e.__shaka_id=yc++),e.__shaka_id}function ci(e){var t={id:ei(e),active:"disabled"!=e.mode,type:Pe,bandwidth:0,language:te(e.language||"und"),label:e.label,kind:e.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:"forced"==e.kind,originalTextId:e.id,originalLanguage:e.language};return"captions"==e.kind&&(t.mimeType="unknown"),"subtitles"==e.kind&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),t}function Ei(e,t){var n=e?e.language:null;if(n={id:ei(e||t),active:e?e.enabled:t.selected,type:"variant",bandwidth:0,language:te(n||"und"),label:e?e.label: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&&"main"==e.kind,roles:[],forced:!1,audioR
1oles: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 Co(e){return e.allowedByApplication&&e.allowedByKeySystem&&0==e.disabledUntilTime}function Mo(e){return e.filter(function(t){return Co(t)})}function xr(e,t,n,i){var r=e,o=e.filter(function(a){return a.primary});o.length&&(r=o);var s=r.length?r[0].language:"";if(r=r.filter(function(a){return a.language==s}),t){var u=Ye(te(t),e.map(function(a){return a.language}));u&&(r=e.filter(function(a){return te(a.language)==u}))}if(r=r.filter(function(a){return a.forced==i}),n){if((e=mc(r,n)).length)return e}else if((e=r.filter(function(a){return 0==a.roles.length})).length)return e;return(e=r.map(function(a){return a.roles}).reduce(p,[])).length?mc(r,e[0]):r}function mc(e,t){return e.filter(function(n){return n.roles.includes(t)})}function jh(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t}function Wu(e,t){t.length&&(t=t.filter(function(n){return Zn(e.codecs)==Zn(n.codecs)}).sort(function(n,i){return n.bandwidth&&i.bandwidth&&n.bandwidth!=i.bandwidth?n.bandwidth-i.bandwidth:(n.width||0)-(i.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 vc(e){return"audio"==e.type?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:"video"==e.type?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}function Ja(e,t,n){if(0==n.autoShowText)return!1;if(1==n.autoShowText)return!0;var i=te(n.preferredTextLanguage);return t=te(t.language),2==n.autoShowText?Y(t,i):3==n.autoShowText?!!e&&(e=te(e.language),Y(t,i)&&!Y(e,t)):(Be("Invalid autoShowText setting!"),!1)}function Za(e){for(var t={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},n=(e=m(e)).next();!n.done;n=e.next()){var i={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:(n=n.value)?Qn(n):"",codecs:n?Ai(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};i.fullMimeTypes.add(dn(i.mimeType,i.codecs)),n.startsWith("audio/")?(i.type="audio",t.audio=i):t.video=i}return t}ue("shaka.util.StreamUtils",st),st.meetsRestrictions=dt;var fu=new Map,yc=0,Xu=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Uh=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdj
1FDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function jt(){var e=this;this.H=null,this.o=!1,this.m=new Li,this.j=new et,navigator.connection&&navigator.connection.addEventListener&&this.j.F(navigator.connection,"change",function(){if(e.o&&e.g.useNetworkInformation){e.m=new Li,e.g&&e.m.configure(e.g.advanced);var t=e.chooseVariant();t&&navigator.onLine&&e.H(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.G=[],this.I=1,this.J=!1,this.h=this.l=this.g=this.u=null,this.B=new E(function(){if(e.o&&(e.g.restrictToElementSize||e.g.restrictToScreenSize)){var t=e.chooseVariant();t&&e.H(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.C=X,"documentPictureInPicture"in X&&this.j.F(X.documentPictureInPicture,"enter",function(){e.C=X.documentPictureInPicture.window,e.B&&e.B.Lb(),e.j.Aa(e.C,"pagehide",function(){e.C=X,e.B&&e.B.Lb()})}),this.D=this.i=null}function Qa(e){if(!e.J){var t=e.m;if(!(t.g>=t.i))return;e.J=!0,e.u-=1e3*(e.g.switchInterval-e.g.minTimeToSwitch)}Date.now()-e.u<1e3*e.g.switchInterval||(t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.H(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch))}function zu(e,t,n,i,r){if(e.D){var o=e.D.ci();o&&(n=n.filter(function(s){return!s.bandwidth||!o||s.bandwidth<=o}))}return t&&(n=n.filter(function(s){return dt(s,t,{width:r,height:i})})),n.sort(function(s,u){return s.bandwidth-u.bandwidth})}(h=jt.prototype).stop=function(){this.H=null,this.o=!1,this.G=[],this.I=1,this.l=this.u=null,this.h&&(this.h.disconnect(),this.h=null),this.B.stop(),this.D=this.i=null},h.release=function(){this.j.release(),this.B=null},h.init=function(e){this.H=e},h.chooseVariant=function(){var e=1/0,t=1/0;if(this.g.restrictToScreenSize){var n=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio;e=this.C.screen.height*n,t=this.C.screen.width*n}if(this.h&&this.g.restrictToElementSize){n=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio;var i=this.l.clientHeight,r=this.l.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.l&&(i=this.i.height,r=this.i.width),e=Math.min(e,i*n),t=Math.min(t,r*n)}if((n=this.G.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)})).length||(n=this.G),i=n,n.length!=this.G.length&&(i=this.G.filter(function(l){return l&&!!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)})),n=zu(this,this.g.restrictions,i,1/0,1/0),e!=1/0||t!=1/0){for(n=function Tc(e){for(var t=[],n=(e=m(e)).next();!n.done;n=e.next())(n=n.value.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(i,r){return i.width-r.width})}(n),r=(n=m(n)).next();!r.done;r=n.next())if((r=r.value).height>=e&&r.width>=t){e=r.height,t=r.width;break}n=zu(this,this.g.restrictions,i,e,t)}for(e=this.getBandwidthEstimate(),i.length&&!n.length&&(n=[(n=zu(this,null,i,1/0,1/0))[0]]),t=n[0]||null,i=0;i<n.length;i++){r=n[i];for(var o=isNaN(this.I)?1:Math.abs(this.I),s=o*r.bandwidth/this.g.bandwidthDowngradeTarget,u={bandwidth:1/0},a=i+1;a<n.length;a++)if(r.bandwidth!=n[a].bandwidth){u=n[a];break}o=o*u.bandwidth/this.g.bandwidthUpgradeTarget,e>=s&&e<=o&&(t.bandwidth!=r.bandwidth||t.bandwidth==r.bandwidth&&t.video&&r.video&&(t.video.width<r.video.width||t.video.height<r.video.height))&&(t=r)}return this.u=Date.now(),t},h.enable=function(){this.o=!0},h.disable=function(){this.o=!1},h.segmentDownloaded=function(e,t,n,i){var r=e;this.g.removeLatencyFromFirstPacketTime&&i&&1===i.packetNumber&&i.timeToFirstByte&&(r=e-i.timeToFirstByte),r>=this.g.cacheLoadThreshold&&this.m.sample(r,t),n&&null!=this.u&&this.o&&Qa(this)},h.trySuggestStreams=function(){null!=this.u&&this.o&&Qa(this)},h.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth?e:(e=this.m.getBandwidthEstimate(e),this.D?this.D.getBandwidthEstimate(e):e)},h.setVariants=function(e){this.G=e},h.playbackRateChanged=function(e){this.I=e},h.setMediaElement=function(e){function t(){n.B.ka(sx)}var n=this;this.l=e,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in X&&(this.h=new ResizeObserver(t),this.h.observe(this.l)),this.j.F(e,"enterpictureinpicture",function(i){i.pictureInPictureWindow&&(n.i=i.pictureInPictureWindow,n.j.F(n.i,"resize",t))}),this.j.F(e,"leavepictureinpicture",function(){n.i&&n.j.La(n.i,"resize",t),n.i=null})},h.setCmsdManager=function(e){this.D=e},h.configure=function(e){this.g=e,this.m&&this.g&&this.m.configure(this.g.advanced)},ue("shaka.abr.SimpleAbrManager",jt),jt.prototype.configure=jt.prototype.configure,jt.prototype.setCmsdManager=jt.prototype.setCmsdManager,jt.prototype.setMediaElement=jt.prototype.setMediaElement,jt.prototype.playbackRateChanged=jt.prototype.playbackRateChanged,jt.prototype.setVariants=jt.prototype.setVariants,jt.prototype.getBandwidthEstimate=jt.prototype.getBandwidthEstimate,jt.prototype.trySuggestStreams=jt.prototype.trySuggestStreams,jt.prototype.segmentDownloaded=jt.prototype.segmentDownloaded,jt.prototype.disable=jt.prototype.disable,jt.prototype.enable=jt.prototype.enable,jt.prototype.chooseVariant=jt.prototype.chooseVariant,jt.prototype.init=jt.prototype.init,jt.prototype.release=jt.prototype.release,jt.prototype.stop=jt.prototype.stop;var sx=1;function tm(e,t){if(e===t||!e.length||!t.length)return!0;for(var n=(e=m(e)).next();!n.done;n=e.next()){if(xc(n=n.value))return!0;for(var i=m(t),r=i.next();!r.done;r=i.next())if(n.keySystem===(r=r.value).keySystem||xc(r))return!0}return!1}function nm(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],i=(e=m(e)).next();!i.done;i=e.next()){i=i.value;for(var r=m(t),o=r.next();!o.done;o=r.next()){if(i.keySystem==(o=o.value).keySystem){r=new Map;for(var s=m((i.initData||[]).concat(o.initData||[])),u=s.next();!u.done;u=s.next())r.set((u=u.value).keyId,u);r=Array.from(r.values()),s=i.keyIds&&o.keyIds?new Set([].concat(ee(i.keyIds),ee(o.keyIds))):i.keyIds||o.keyIds,n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||o.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||o.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||o.persistentStateRequired,videoRobustness:i.videoRobustness||o.videoRobustness,audioR
1obustness:i.audioRobustness||o.audioRobustness,serverCertificate:i.serverCertificate||o.serverCertificate,serverCertificateUri:i.serverCertificateUri||o.serverCertificateUri,initData:r,keyIds:s});break}xc(i)?n.push(i):xc(o)&&n.push(o)}}return n}function Bh(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function wc(e){return!!e&&!!e.match(/^com\.apple\.fps/)}function xc(e){return!!(e=e.licenseServerUri)&&e.startsWith("data:application/json;base64,")}ue("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});var Sc=new kt(function(){return Qe(new Uint8Array([0]))}),Yu=new Map;function im(e,t){var n_baseDelay=1e3,n_backoffFactor=2,n_fuzzFactor=.5;this.l=e.maxAttempts??2,this.j=e.baseDelay??n_baseDelay,this.o=e.fuzzFactor??n_fuzzFactor,this.m=e.backoffFactor??n_backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function rm(e){var t,n;return L(function(i){if(1==i.g){if(e.g>=e.l){if(!e.i)throw new k(2,7,1010);e.g=1,e.h=e.j}return t=e.g,e.g++,0==t?i.return():(n=e.h*(1+(2*Math.random()-1)*e.o),x(i,new Promise(function(r){new E(r).ka(n/1e3)}),2))}e.h*=e.m,Z(i)})}function At(){var e,t,n=new Promise(function(i,r){e=i,t=r});return n.resolve=e,n.reject=t,n}function mn(e,t){this.promise=e,this.i=t,this.g=null}function Rs(e){return new mn(Promise.reject(e),function(){return Promise.resolve()})}function Fh(){var e=Promise.reject(new k(2,7,7001));return e.catch(function(){}),new mn(e,function(){return Promise.resolve()})}function qu(e){return new mn(Promise.resolve(e),function(){return Promise.resolve()})}function om(e){return new mn(e,function(){return e.catch(function(){})})}function sm(e){return new mn(Promise.all(e.map(function(t){return t.promise})),function(){return Promise.all(e.map(function(t){return t.abort()}))})}function re(e,t){if(t)if(t instanceof Map)for(var n=m(t.keys()),i=n.next();!i.done;i=n.next())i=i.value,Object.defineProperty(this,i,{value:t.get(i),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=X.performance&&X.performance.now?X.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function um(e){var n,t=new re(e.type);for(n in e)Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0});return t}At.prototype.resolve=function(){},At.prototype.reject=function(){},mn.prototype.abort=function(){return this.g||(this.g=this.i()),this.g},mn.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},mn.prototype.Wa=function(e,t){function n(u){return function(a){if(r.g&&u)o.reject(s);else{var l=u?e:t;l?i=function ux(e,t,n){try{var i=e(t);return i&&i.promise&&i.abort?(n.resolve(i.promise),function(){return i.abort()}):(n.resolve(i),function(){return Promise.resolve(i).then(function(){},function(){})})}catch(r){return n.reject(r),function(){return Promise.resolve()}}}(l,a,o):(u?o.resolve:o.reject)(a)}}}function i(){return o.reject(s),r.abort()}var r=this,o=new At;o.catch(function(){});var s=new k(2,7,7001);return this.promise.then(n(!0),n(!1)),new mn(o,function(){return i()})},Yn.Object.defineProperties(mn.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return null!==this.g}}}),ue("shaka.util.AbortableOperation",mn),mn.prototype.chain=mn.prototype.Wa,mn.prototype.finally=mn.prototype.finally,mn.all=sm,mn.prototype.abort=mn.prototype.abort,mn.notAbortable=om,mn.completed=qu,mn.aborted=Fh,mn.failed=Rs,re.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},re.prototype.stopImmediatePropagation=function(){this.g=!0},re.prototype.stopPropagation=function(){},ue("shaka.util.FakeEvent",re);var Ac={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",Il:"emsg",Ol:"itemsinserted",Pl:"itemsremoved",gm:"prft",Error:"error",Jl:"expirationupdated",Kl:"firstquartile",Ll:"gapjumped",Ql:"keystatuschanged",Ul:"loaded",Vl:"loading",Xl:"manifestparsed",Yl:"manifestupdated",Zl:"mediaqualitychanged",$l:"mediasourcerecovered",am:"metadataadded",Metadata:"metadata",bm:"midpoint",dm:"nospatialvideoinfo",fm:"onstatechange",hm:"ratechange",lm:"segmentappended",nm:"sessiondata",om:"spatialvideoinfo",pm:"stalldetected",qm:"started",rm:"statechanged",sm:"streaming",tm:"textchanged",um:"texttrackvisibility",vm:"thirdquartile",wm:"timelineregi
1onadded",xm:"timelineregionenter",ym:"timelineregionexit",zm:"trackschanged",Bm:"unloading",Dm:"variantchanged"};function vt(){this.$a=new Zr,this.Be=this}function $u(){this.g=[]}function gu(e,t){e.g.push(t.finally(function(){Ki(e.g,t)}))}function Wt(e,t,n,i,r,o,s){vt.call(this),this.i=null,this.j=!1,this.u=new $u,this.g=new Set,this.h=new Set,this.o=e||null,this.m=t||null,this.B=n||null,this.C=i||null,this.D=r||null,this.H=o||null,this.G=s||null,this.l=new Map}function Yo(e,t,n,i){i=void 0!==i&&i,n=n||hm;var r=Ic.get(e);(!r||n>=r.priority)&&Ic.set(e,{priority:n,yf:t,Gk:i})}function am(e,t){for(var n=m(e.g),i=n.next();!i.done;i=n.next())t.g.add(i.value);for(n=(e=m(e.h)).next();!n.done;n=e.next())t.h.add(n.value)}function _n(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:void 0===n?null:n}}function lm(e,t,n,i,r,o,s,u){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,i,n.uris[o],n.uris[o-1]);var a=new O(n.uris[o]),l=a.dc,c=!1;l||(V(a,l=(l=location.protocol).slice(0,-1)),n.uris[o]=a.toString()),l=l.toLowerCase();var d=(l=Ic.get(l))?l.yf:null;if(!d)return Rs(new k(2,1,1e3,a));var f=l.Gk;(a=e.l.get(a.Eb))&&(n.headers["common-access-token"]=a);var S,g=null,v=null,y=!1,T=!1;return om(rm(r)).Wa(function(){if(e.j)return Fh();S=Date.now();var A=0;n.requestStartTime=Date.now();var I=d(n.uris[o],n,t,function(b,M,D){g&&g.stop(),v&&v.ka(P/1e3),e.o&&t==Xr&&(A++,n.packetNumber=A,e.o(b,M,cm(i),n,i),c=!0,u.g=D)},function(b){T=!0,n.timeToFirstByte=Date.now()-n.requestStartTime,e.m&&e.m(b,n,t)},{minBytesForProgressEvents:e.i.minBytesForProgressEvents});if(!f)return I;var _=n.retryParameters.connectionTimeout;_&&(g=new E(function(){y=!0,I.abort()})).ka(_/1e3);var P=n.retryParameters.stallTimeout;return P&&(v=new E(function(){y=!0,I.abort()})),I}).Wa(function(A){g&&g.stop(),v&&v.stop(),null==A.timeMs&&(A.timeMs=Date.now()-S);var I=A.headers["common-access-token"];if(I){var _=new O(A.uri);e.l.set(_.Eb,I)}return I={response:A,gk:c},!T&&e.m&&e.m(A.headers,n,t),e.B&&e.B(n,A),I},function(A){if(g&&g.stop(),v&&v.stop(),e.C){var I=null,_=0;A instanceof k&&(I=A,1001==A.code&&(_=A.data[1])),e.C(n,I,_,y)}if(e.j)return Fh();if(y&&(A=new k(1,1,1003,n.uris[o],t)),A instanceof k){if(7001==A.code)throw A;if(1010==A.code)throw s;if(1==A.severity){if((I=new re("retry",I=(new Map).set("error",A))).cancelable=!0,e.dispatchEvent(I),I.defaultPrevented)throw A;return lm(e,t,n,i,r,o=(o+1)%n.uris.length,A,u)}}throw A})}function cm(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.o)return!1}return!0}function dm(){this.g=0}function Ec(e,t,n){mn.call(this,e,t),this.h=n}vt.prototype.addEventListener=function(e,t){this.$a&&this.$a.push(e,t)},vt.prototype.removeEventListener=function(e,t){this.$a&&this.$a.remove(e,t)},vt.prototype.dispatchEvent=function(e){if(!this.$a)return!0;var t=this.$a.get(e.type)||[],n=this.$a.get("All");for(n&&(t=t.concat(n)),n=(t=m(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.Be,e.currentTarget=this.Be;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch{}if(e.g)break}return e.defaultPrevented},vt.prototype.release=function(){this.$a=null},$u.prototype.destroy=function(){for(var e=[],t=m(this.g),n=t.next();!n.done;n=t.next())(n=n.value).promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)},wt(Wt,vt),(h=Wt.prototype).configure=function(e){this.i=e},h.Jk=function(e){this.g.add(e)},h.il=function(e){this.g.delete(e)},h.qj=function(){this.g.clear()},h.Kk=function(e){this.h.add(e)},h.jl=function(e){this.h.delete(e)},h.rj=function(){this.h.clear()},h.Rh=function(){this.l.clear()},h.destroy=function(){return this.j=!0,this.g.clear(),this.h.clear(),this.l.clear(),vt.prototype.release.call(this),this.u.destroy()},h.request=function(e,t,n){var i=this,r=new dm;if(this.j){var o=Promise.reject(new k(2,7,7001));return o.catch(function(){}),new Ec(o,function(){return Promise.resolve()},r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?rr(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},t.uris=rr(t.uris),o=function ax(e,t,n,i){function r(u){o=o.Wa(function(){return n.body&&(n.body=Qe(n.body)),u(t,n,i)})}var o=qu(void 0);e.D&&r(e.D);for(var s=(e=m(e.g)).next();!s.done;s=e.next())r(s.value);return o.Wa(void 0,function(u){throw u instanceof k&&7001==u.code?u:new k(2,1,1006,u)})}(this,e,t,n);var s=o.Wa(function(){return lm(i,e,t,n,new im(t.retryParameters,!1),0,null,r)}),u=s.Wa(function(f){return function lx(e,t,n,i){for(var r=qu(void 0),o=(e=m(e.h)).next(),s={};!o.done;s={Ji:void 0},o=e.next())s.Ji=o.value,r=r.Wa(function(u){return function(){var a=n.response;return a.data&&(a.data=Qe(a.data)),(0,u.Ji)(t,a,i)}}(s));return r.Wa(function(){return n},function(u){var a=2;if(u instanceof k){if(7001==u.code)throw u;a=u.severity}throw new k(a,1,1007,u)})}(i,e,f,n)}),a=Date.now(),l=0;o.promise.then(function(){l=Date.now()-a},function(){});var c=0;s.promise.then(function(){c=Date.now()},function(){});var d=u.Wa(function(f){var g=Date.now()-c,v=f.response;return v.timeMs+=l,v.timeMs+=g,f.gk||!i.o||v.fromCache||"HEAD"==t.method||e!=Xr||i.o(v.timeMs,v.data.byteLength,cm(n),t,n),i.G&&i.G(e,v,n),v},function(f){throw f&&(f.severity=2),f});return o=new Ec(d.promise,function(){return d.abort()},r),gu(this.u,o),o},ue("shaka.net.NetworkingEngine",Wt),Wt.prototype.request=Wt.prototype.request,Wt.prototype.destroy=Wt.prototype.destroy,Wt.makeRequest=_n,Wt.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},Wt.prototype.clearCommonAccessTokenMap=Wt.prototype.Rh,Wt.prototype.clearAllResponseFilters=Wt.prototype.rj,Wt.prototype.unregisterResponseFilter=Wt.prototype.jl,Wt.prototype.registerResponseFilter=Wt.prototype.Kk,Wt.prototype.clearAllRequestFilters=Wt.prototype.qj,Wt.prototype.unregisterRequestFilter=Wt.prototype.il,Wt.prototype.registerRequestFilter=Wt.prototype.Jk,Wt.unregisterScheme=function(e){Ic.delete(e)},Wt.registerScheme=Yo,Wt.prototype.configure=Wt.prototype.configure,Wt.NumBytesRemainingClass=dm,wt(Ec,mn),Wt.PendingRequest=Ec;var Xr=1;Wt.RequestType={MANIFEST:0,SEGMENT:Xr,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},Wt.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 hm=3;Wt.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:hm};var Ic=new Map;function Ju(e){this.g=!1,this.h=new At,this.i=e}function Ut(e,t){if(e.g)throw t instanceof k&&7003==t.code?t:new k(2,7,7003,t)}function Vh(e,t){for(var n=[],i=(e=m(e)).next();!i.done;i=e.next())n.push(t(i.value));return n}function Zu(e){for(var t=new Map,n=m(Object.keys(e)),i=n.next();!i.done;i=n.next())t.set(i=i.value,e[i]);return t}function Hh(e){var t={};return e.forEach(function(n,i){t[i]=n}
1),t}function Ht(e,t){this.h=Ve(e),this.i=t==pm,this.g=0}function qo(){return new k(2,3,3e3)}Ju.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()}))},(h=Ht.prototype).Ia=function(){return this.g<this.h.byteLength},h.Na=function(){return this.g},h.getLength=function(){return this.h.byteLength},h.Y=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch{throw qo()}},h.Da=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch{throw qo()}},h.U=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch{throw qo()}},h.$g=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch{throw qo()}},h.zd=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 qo()}if(t>2097151)throw new k(2,3,3001);return this.g+=8,4294967296*t+e},h.Vb=function(e){if(this.g+e>this.h.byteLength)throw qo();var t=oe(this.h,this.g,e);return this.g+=e,t},h.skip=function(e){if(this.g+e>this.h.byteLength)throw qo();this.g+=e},h.Ki=function(e){if(this.g<e)throw qo();this.g-=e},h.seek=function(e){if(e<0||e>this.h.byteLength)throw qo();this.g=e},h.Xc=function(){for(var e=this.g;this.Ia()&&0!=this.h.getUint8(this.g);)this.g+=1;return e=oe(this.h,e,this.g-e),this.g+=1,We(e)},ue("shaka.util.DataViewReader",Ht),Ht.prototype.readTerminatedString=Ht.prototype.Xc,Ht.prototype.seek=Ht.prototype.seek,Ht.prototype.rewind=Ht.prototype.Ki,Ht.prototype.skip=Ht.prototype.skip,Ht.prototype.readBytes=Ht.prototype.Vb,Ht.prototype.readUint64=Ht.prototype.zd,Ht.prototype.readInt32=Ht.prototype.$g,Ht.prototype.readUint32=Ht.prototype.U,Ht.prototype.readUint16=Ht.prototype.Da,Ht.prototype.readUint8=Ht.prototype.Y,Ht.prototype.getLength=Ht.prototype.getLength,Ht.prototype.getPosition=Ht.prototype.Na,Ht.prototype.hasMoreData=Ht.prototype.Ia;var pm=1;function Et(){this.i=new Map,this.h=new Map,this.g=!1}function Oe(e){for(var t=Ns(e);e.reader.Ia()&&!e.parser.g;)e.parser.wd(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function $o(e){for(var t=Ns(e),n=e.reader.U(),i=0;i<n&&(e.parser.wd(e.start+t,e.reader,e.partialOkay,e.stopOnPartial),!e.parser.g);i++);}function zi(e){var t=Ns(e);for(e.reader.skip(78);e.reader.Ia()&&!e.parser.g;)e.parser.wd(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function Cc(e){var t=Ns(e);e.reader.skip(8);var n=e.reader.Da();for(e.reader.skip(6),e.reader.skip(2==n?48:12),1==n&&e.reader.skip(16);e.reader.Ia()&&!e.parser.g;)e.parser.wd(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function Qu(e){return function(t){e(t.reader.Vb(t.reader.getLength()-t.reader.Na()))}}function fm(e){for(var t=0,n=(e=m(e)).next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function Mc(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function Ns(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}Ht.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:pm},(h=Et.prototype).box=function(e,t){return e=fm(e),this.i.set(e,dx),this.h.set(e,t),this},h.S=function(e,t){return e=fm(e),this.i.set(e,gm),this.h.set(e,t),this},h.stop=function(){this.g=!0},h.parse=function(e,t,n){for(e=new Ht(e,0),this.g=!1;e.Ia()&&!this.g;)this.wd(0,e,t,n)},h.wd=function(e,t,n,i){var r=t.Na();if(i&&r+8>t.getLength())this.g=!0;else{var o=t.U(),s=t.U(),u=Mc(s),a=!1;switch(o){case 0:o=t.getLength()-r;break;case 1:if(i&&t.Na()+8>t.getLength())return void(this.g=!0);o=t.zd(),a=!0}var l=this.h.get(s);if(l){var c=null,d=null;if(this.i.get(s)==gm){if(i&&t.Na()+4>t.getLength())return void(this.g=!0);c=(d=t.U())>>>24,d&=16777215}s=r+o,n&&s>t.getLength()&&(s=t.getLength()),i&&s>t.getLength()?this.g=!0:(s-=t.Na(),l({name:u,parser:this,partialOkay:n||!1,stopOnPartial:i||!1,version:c,flags:d,reader:t=new Ht(t=s>0?t.Vb(s):new Uint8Array(0),0),size:o,start:r+e,has64BitSize:a}))}else t.skip(Math.min(r+o-t.Na(),t.getLength()-t.Na()))}},ue("shaka.util.Mp4Parser",Et),Et.headerSize=Ns,Et.typeToString=Mc,Et.allData=Qu,Et.audioSampleEntry=Cc,Et.visualSampleEntry=zi,Et.sampleDescription=$o,Et.children=Oe,Et.prototype.parseNext=Et.prototype.wd,Et.prototype.parse=Et.prototype.parse,Et.prototype.stop=Et.prototype.stop,Et.prototype.fullBox=Et.prototype.S,Et.prototype.box=Et.prototype.box;var dx=0,gm=1;function Gh(e){var t=this;this.g=[],this.h=[],this.data=[],(new Et).box("moov",Oe).box("moof",Oe).S("pssh",function(n){if(!(n.version>1)){var i=oe(n.reader.h,-12,n.size);
1if(t.data.push(i),t.g.push(Ti(n.reader.Vb(16))),n.version>0){i=n.reader.U();for(var r=0;r<i;r++){var o=Ti(n.reader.Vb(16));t.h.push(o)}}}}).parse(e)}function kc(e,t,n,i){var r=e.length,o=12+t.length+4+r;i>0&&(o+=4+16*n.size);var s=new Uint8Array(o),u=Ve(s),a=0;if(u.setUint32(a,o),u.setUint32(a+=4,1886614376),u.setUint32(a+=4,i<1?0:16777216),s.set(t,a+=4),a+=t.length,i>0)for(u.setUint32(a,n.size),a+=4,n=(t=m(n)).next();!n.done;n=t.next())n=Nn(n.value),s.set(n,a),a+=n.length;return u.setUint32(a,r),s.set(e,a+4),s}function _c(e){var t=this;this.D=e,this.j=this.B=null,this.oa=this.T=!1,this.I=0,this.g=null,this.o=new et,this.i=new Map,this.X=[],this.C=new Map,this.J=!1,this.m=new At,this.h=null,this.u=function(n){2==n.severity&&t.m.reject(n),e.onError(n)},this.ia=new Map,this.ma=new Map,this.L=new E(function(){return function Sx(e){var t=e.ia,n=e.ma;n.clear(),t.forEach(function(i,r){return n.set(r,i)}),(t=Array.from(n.values())).length&&t.every(function(i){return"expired"==i})&&e.u(new k(2,6,6014)),e.D.uf(Hh(n))}(t)}),this.R=!1,this.N=[],this.ea=!1,this.G=new E(function(){!function Ex(e){e.i.forEach(function(t,n){var i=t.Vg,r=n.expiration;isNaN(r)&&(r=1/0),r!=i&&(e.D.onExpirationUpdated(n.sessionId,r),t.Vg=r)})}(t)}),this.m.catch(function(){}),this.l=new Ju(function(){return function hx(e){return L(function(t){switch(t.g){case 1:return e.o.release(),e.o=null,e.m.reject(),e.G.stop(),e.G=null,e.L.stop(),e.L=null,x(t,tl(e),2);case 2:if(!e.j){t.A(3);break}return fe(t,4),x(t,e.j.setMediaKeys(null),6);case 6:Le(t,5);break;case 4:Te(t);case 5:e.j=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.H=null,Z(t)}})}(t)}),this.O=!1,this.M=this.H=null,this.V=function(){return!1}}function mm(e,t,n,i){i=void 0===i||i,e.C=new Map;for(var r=(n=m(n)).next();!r.done;r=n.next())e.C.set(r.value,{initData:null,initDataType:null});for(r=(n=m(e.h.persistentSessionsMetadata)).next();!r.done;r=n.next())e.C.set((r=r.value).sessionId,{initData:r.initData,initDataType:r.initDataType});return e.R=e.C.size>0,vm(e,t,i)}function vm(e,t,n){var i,r,o,s,u,a,c,d,f,g,v,y,T,S,A,_;return L(function(P){if(1==P.g){for(Mm(e.h.clearKeys,t),i=t.some(function(b){return!!(b.video&&b.video.drmInfos.length||b.audio&&b.audio.drmInfos.length)}),r=Zu(e.h.servers),o=Zu(e.h.advanced||{}),!i&&n&&function Cx(e,t){var n=[];for(t.forEach(function(i,r){n.push({keySystem:r,licenseServerUri:i,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),t=(e=m(e)).next();!t.done;t=e.next())(t=t.value).video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}(t,r),s=new WeakSet,u=m(t),a=u.next();!a.done;a=u.next())for(c=Cm(a.value),d=m(c),f=d.next();!f.done;f=d.next())s.has(g=f.value)||(s.add(g),kx(g,r,o,e.h.keySystemsMapping));for(v=function(b,M){for(var D=[],R=(b=m(b)).next();!R.done;R=b.next()){var U,j=(R=R.value)[M]||o.has(R.keySystem)&&o.get(R.keySystem)[M]||"";if((U=""==j)&&(U=!!(U=R.keySystem)&&!!U.match(/^com\.widevine\.alpha/)),U&&("audioRobustness"==M?j=[e.h.defaultAudioRobustnessForWidevine]:"videoRobustness"==M&&(j=[e.h.defaultVideoRobustnessForWidevine])),"string"==typeof j)D.push(R);else if(Array.isArray(j))for(0===j.length&&(j=[""]),U=(j=m(j)).next();!U.done;U=j.next()){var B={};D.push(Object.assign({},R,(B[M]=U.value,B)))}}return D},y=new WeakSet,T=m(t),S=T.next();!S.done;S=T.next())(A=S.value).video&&!y.has(A.video)&&(A.video.drmInfos=v(A.video.drmInfos,"videoRobustness"),A.video.drmInfos=v(A.video.drmInfos,"audioRobustness"),y.add(A.video)),A.audio&&!y.has(A.audio)&&(A.audio.drmInfos=v(A.audio.drmInfos,"videoRobustness"),A.audio.drmInfos=v(A.audio.drmInfos,"audioRobustness"),y.add(A.audio));return x(P,Wn(t,e.R,e.O,e.h.preferredKeySystems),2)}return Ut(e.l),i||r.size>0?(_=xm(e,t),P.return(i?_:_.catch(function(){}))):(e.T=!0,P.return(Promise.resolve()))})}function ym(e){var t;return L(function(n){switch(n.g){case 1:if(e.j.mediaKeys)return n.return();if(!e.H){n.A(2);break}return x(n,e.H,3);case 3:return Ut(e.l),n.return();case 2:return fe(n,4),e.H=e.j.setMediaKeys(e.B),x(n,e.H,6);case 6:Le(n,5);break;case 4:t=Te(n),e.u(new k(2,6,6003,t.message));case 5:Ut(e.l),Z(n)}})}function Tm(e){var i,r,o;
1return L(function(s){if(1==s.g)return e.C.size?(e.C.forEach(function(u,a){Am(e,a,u)}),x(s,e.m,3)):s.A(2);if(2!=s.g){if((e.g&&e.g.keyIds||new Set([])).size>0&&function Ix(e){for(var t=m(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if("usable"!==e.ia.get(n.value))return!1;return!0}(e))return s.return(e.m);e.J=!1,e.m=new At,e.m.catch(function(){})}for(i=m((e.g?e.g.initData:[])||[]),r=i.next();!r.done;r=i.next())el(e,(o=r.value).initDataType,o.initData);return nl(e)&&e.m.resolve(),s.return(e.m)})}function el(e,t,n){if(n.length){if(e.h.ignoreDuplicateInitData){for(var i=e.i.values(),r=(i=m(i)).next();!r.done;r=i.next())if(pt(n,r.value.initData))return;var o=!1;if(e.C.forEach(function(s){!o&&pt(n,s.initData)&&(o=!0)}),o)return}e.J=!0,e.i.size>0&&nl(e)&&(e.m.resolve(),e.J=!1,e.m=new At,e.m.catch(function(){})),function wx(e,t,n,i){try{var r=e.B.createSession(i)}catch(o){return void e.u(new k(2,6,6005,o.message))}e.o.F(r,"message",function(o){e.j&&e.h.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.ea?e.N.push(o):Wh(e,o)}),e.o.F(r,"keystatuseschange",function(o){return Em(e,o)}),e.i.set(r,{initData:n,initDataType:t,loaded:!1,Vg:1/0,Mb:null,type:i});try{n=e.h.initDataTransform(n,t,e.g)}catch(o){return t=o,o instanceof k||(t=new k(2,6,6016,o)),void e.u(t)}e.h.logLicenseExchange&&Vn(n),r.generateRequest(t,n).catch(function(o){if(!e.l.g){e.i.delete(r);var s=o.errorCode;if(s&&s.systemCode){var u=s.systemCode;u<0&&(u+=4294967296),u="0x"+u.toString(16)}e.u(new k(2,6,6006,o.message,o,u))}})}(e,t,n,e.g.sessionType)}}function wm(e){return e=Vh(e=e.i.keys(),function(t){return t.sessionId}),Array.from(e)}function xm(e,t){var n,i,r,o,u,a;return L(function(l){switch(l.g){case 1:if(i=function Tx(e,t,n){for(var i=m(t),r=i.next();!r.done;r=i.next())for(var o=(r=m(Cm(r.value))).next();!o.done;o=r.next())n.has((o=o.value).keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o);if(1==n.size&&n.has(""))throw new k(2,6,6e3);(i=e.h.preferredKeySystems).length||1==(r=Zu(e.h.servers)).size&&(i=Array.from(r.keys()));var s=(r=m(i)).next();for(o={};!s.done;o={Di:void 0},s=r.next()){o.Di=s.value;for(var u=(s=m(t)).next();!u.done;u=s.next())if(u=u.value.decodingInfos.find(function(d){return function(f){return f.supported&&null!=f.keySystemAccess&&f.keySystemAccess.keySystem==d.Di}}(o)))return u.keySystemAccess}for(o=(r=m([!0,!1])).next();!o.done;o=r.next())for(o=o.value,u=(s=m(t)).next();!u.done;u=s.next())for(var a=(u=m(u.value.decodingInfos)).next();!a.done;a=u.next())if((a=a.value).supported&&a.keySystemAccess){var l=a.keySystemAccess.keySystem;if(!i.includes(l)){var c=n.get(l);for(!c&&e.h.keySystemsMapping[l]&&(c=n.get(e.h.keySystemsMapping[l])),c=(l=m(c)).next();!c.done;c=l.next())if(!!c.value.licenseServerUri==o)return a.keySystemAccess}}return null}(e,t,n=new Map),!i)throw navigator.requestMediaKeySystemAccess?new k(2,6,6001):new k(2,6,6020);
1Ut(e.l),fe(l,2),i.getConfiguration();var c=r=e.h.keySystemsMapping[i.keySystem]||i.keySystem,d=n.get(r),f=[],g=[],v=[],y=[],T=[],S=new Set,A=new Set;for(function Mx(e,t,n,i,r,o,s,u){for(var a=[],l=(e=m(e)).next(),c={};!l.done;c={Ja:void 0},l=e.next()){if(c.Ja=l.value,t.includes(c.Ja.encryptionScheme)||t.push(c.Ja.encryptionScheme),"org.w3.clearkey"==c.Ja.keySystem&&c.Ja.licenseServerUri.startsWith("data:application/json;base64,")?a.includes(c.Ja.licenseServerUri)||a.push(c.Ja.licenseServerUri):n.includes(c.Ja.licenseServerUri)||n.push(c.Ja.licenseServerUri),r.includes(c.Ja.serverCertificateUri)||r.push(c.Ja.serverCertificateUri),c.Ja.serverCertificate&&(i.some(function(g){return function(v){return pt(v,g.Ja.serverCertificate)}}(c))||i.push(c.Ja.serverCertificate)),c.Ja.initData)for(var d=(l=m(c.Ja.initData)).next(),f={};!d.done;f={Mg:void 0},d=l.next())f.Mg=d.value,o.some(function(g){return function(v){var y=g.Mg;return!(!v.keyId||v.keyId!=y.keyId)||v.initDataType==y.initDataType&&pt(v.initData,y.initData)}}(f))||o.push(f.Mg);if(c.Ja.keyIds)for(d=(l=m(c.Ja.keyIds)).next();!d.done;d=l.next())s.add(d.value);if(c.Ja.keySystemUris&&u)for(l=(c=m(c.Ja.keySystemUris)).next();!l.done;l=c.next())u.add(l.value)}if(1==a.length)n.push(a[0]);else if(a.length>0){for(t=[],i=(a=m(a)).next();!i.done;i=a.next())i=X.atob(i.value.split("data:application/json;base64,").pop()),i=JSON.parse(i),t.push.apply(t,ee(i.keys));a=JSON.stringify({keys:t}),n.push("data:application/json;base64,"+X.btoa(a))}}(d,f,g,y,v,T,S,A),c={keySystem:c,encryptionScheme:f[0],licenseServerUri:g[0],distinctiveIdentifierRequired:d[0].distinctiveIdentifierRequired,persistentStateRequired:d[0].persistentStateRequired,sessionType:d[0].sessionType||(e.R?"persistent-license":"temporary"),audioR
1obustness:d[0].audioRobustness||"",videoRobustness:d[0].videoRobustness||"",serverCertificate:y[0],serverCertificateUri:v[0],initData:T,keyIds:S},A.size>0&&(c.keySystemUris=A),A=(d=m(d)).next();!A.done;A=d.next())(A=A.value).distinctiveIdentifierRequired&&(c.distinctiveIdentifierRequired=A.distinctiveIdentifierRequired),A.persistentStateRequired&&(c.persistentStateRequired=A.persistentStateRequired);if(e.g=c,!e.g.licenseServerUri)throw new k(2,6,6012,e.g.keySystem);return x(l,i.createMediaKeys(),4);case 4:if(o=l.h,Ut(e.l),e.B=o,""==e.h.minHdcpVersion||!("getStatusForPolicy"in e.B)){l.A(5);break}return fe(l,6),x(l,e.B.getStatusForPolicy({minHdcpVersion:e.h.minHdcpVersion}),8);case 8:if("usable"!=l.h)throw new k(2,6,6018);Ut(e.l),Le(l,5,2);break;case 6:throw(u=Te(l,2))instanceof k?u:new k(2,6,6019,u.message);case 5:return e.T=!0,e.G.Ha(e.h.updateExpirationTime),x(l,function mx(e){var t;return L(function(s){switch(s.g){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=_n([e.g.serverCertificateUri],e.h.retryParameters),fe(s,3),x(s,e.D.sc.request(5,t,{isPreload:e.V()}).promise,5);case 5:e.g.serverCertificate=oe(s.h.data),Le(s,4);break;case 3:throw new k(2,6,6017,Te(s));case 4:if(e.l.g)return s.return();case 2:return e.g.serverCertificate&&e.g.serverCertificate.length?(fe(s,6),x(s,e.B.setServerCertificate(e.g.serverCertificate),8)):s.return();case 8:Le(s,0);break;case 6:throw new k(2,6,6004,Te(s).message)}})}(e),9);case 9:Ut(e.l),Le(l,0);break;case 2:throw a=Te(l),Ut(e.l,a),e.g=null,a instanceof k?a:new k(2,6,6002,a.message)}})}function Kh(e){nl(e)&&e.m.resolve()}function Sm(e,t){new E(function(){t.loaded=!0,Kh(e)}).ka(Dx)}function Am(e,t,n){var i,r,o,s,a;return L(function(c){switch(c.g){case 1:try{i=e.B.createSession("persistent-license")}catch(d){return r=new k(2,6,6005,d.message),e.u(r),c.return(Promise.reject(r))}return e.o.F(i,"message",function(d){e.j&&e.h.delayLicenseRequestUntilPlayed&&e.j.paused&&!e.ea?e.N.push(d):Wh(e,d)}),e.o.F(i,"keystatuseschange",function(d){return Em(e,d)}),e.i.set(i,o={initData:n.initData,initDataType:n.initDataType,loaded:!1,Vg:1/0,Mb:null,type:"persistent-license"}),fe(c,2),x(c,i.load(t),4);case 4:return s=c.h,Ut(e.l),s||(e.i.delete(i),e.u(new k(e.h.persistentSessionOnlinePlayback?1:2,6,6013)),o.loaded=!0),Sm(e,o),Kh(e),c.return(i);case 2:a=Te(c),Ut(e.l,a),e.i.delete(i),e.u(new k(e.h.persistentSessionOnlinePlayback?1:2,6,6005,a.message)),o.loaded=!0,Kh(e);case 3:return c.return(Promise.resolve())}})}function Wh(e,t){var n,i,r,o,s,u,a,l,c,d,f,g,v,y,T;L(function(S){switch(S.g){case 1:if(n=t.target,e.h.logLicenseExchange&&Vn(t.message),i=e.i.get(n),r=e.g.licenseServerUri,o=e.h.advanced[e.g.keySystem],"individualization-request"==t.messageType&&o&&o.individualizationServer&&(r=o.individualizationServer),(s=_n([r],e.h.retryParameters)).body=t.message,s.method="POST",s.licenseRequestType=t.messageType,s.sessionId=n.sessionId,s.drmInfo=e.g,i&&(s.initData=i.initData,s.initDataType=i.initDataType),o&&o.headers)for(u in o.headers)s.headers[u]=o.headers[u];if("org.w3.clearkey"===e.g.keySystem){var A=s,I=e.g;try{var _=wn(A.body);if(_){var P=JSON.parse(_);P.type||(P.type=I.sessionType,A.body=zt(JSON.stringify(P)))}}catch{}}if(Bh(e.g.keySystem))if((A=Gt(s.body,!0,!0)).includes("PlayReadyKeyMessage")){for(_=(I=m(I=vr(A=mr(A,"PlayReadyKeyMessage"),"HttpHeader"))).next();!_.done;_=I.next())_=vr(P=_.value,"name")[0],P=vr(P,"value")[0],s.headers[fn(_)]=fn(P);A=vr(A,"Challenge")[0],s.body=sn(fn(A))}else s.headers["Content-Type"]="text/xml; charset=utf-8";return a=Date.now(),fe(S,2),c=e.D.sc.request(2,s,{isPreload:e.V()}),e.X.push(c),x(S,c.promise,4);case 4:l=S.h,Ki(e.X,c),Le(S,3);break;case 2:return d=Te(S),e.l.g||(f=new k(2,6,6007,d),1==e.i.size?(e.u(f),i&&i.Mb&&i.Mb.reject(f)):(i&&i.Mb&&i.Mb.reject(f),e.i.delete(n),nl(e)&&(e.m.resolve(),e.L.ka(.1)))),S.return();case 3:return e.l.g?S.return():(e.I+=(Date.now()-a)/1e3,e.h.logLicenseExchange&&Vn(l.data),fe(S,5),x(S,n.update(l.data),7));case 7:Le(S,6);break;case 5:return v=(g=Te(S))&&g.message||String(g),y=new k(2,6,6008,v),e.u(y),i&&i.Mb&&i.Mb.reject(y),S.return();case 6:if(e.l.g)return S.return();T=new re("drmsessionupdate"),e.D.onEvent(T),i&&(i.Mb&&i.Mb.resolve(),Sm(e,i)),Z(S)}})}function Em(e,t){var n=e.i.get(t=t.target),i=!1;
1t.keyStatuses.forEach(function(o,s){if("string"==typeof s){var u=s;s=o,o=u}if(u=Ne(),Bh(e.g.keySystem)&&16==s.byteLength&&u.hh()){var a=(u=Ve(s)).getUint32(0,!0),l=u.getUint16(4,!0),c=u.getUint16(6,!0);u.setUint32(0,a,!1),u.setUint16(4,l,!1),u.setUint16(6,c,!1)}"status-pending"!=o&&(n.loaded=!0),"expired"==o&&(i=!0),s=Ti(s).slice(0,32),e.ia.set(s,o)});var r=t.expiration-Date.now();(r<0||i&&r<1e3)&&n&&!n.Mb&&(e.i.delete(t),Im(t)),nl(e)&&(e.m.resolve(),e.L.ka(Lx))}function Im(e){return L(function(t){return 1==t.g?(fe(t,2),x(t,N(_x,Promise.all([e.close().catch(function(){}),e.closed])),4)):2!=t.g?Le(t,0):(Te(t),void Z(t))})}function tl(e){var t;return L(function(n){return t=Array.from(e.i.entries()),e.i.clear(),x(n,Promise.all(t.map(function(i){var r=(i=m(i)).next().value,o=i.next().value;return L(function(s){return 1==s.g?(fe(s,2),e.oa||e.C.has(r.sessionId)||"persistent-license"!==o.type||e.h.persistentSessionOnlinePlayback?x(s,Im(r),5):x(s,r.remove(),5)):2!=s.g?Le(s,0):(Te(s),void Z(s))})})),0)})}function Cm(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function nl(e){return function cx(e,t){for(var n=(e=m(e)).next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}(e=e.i.values(),function(t){return t.loaded})}function kx(e,t,n,i){var r=e.keySystem;r&&("org.w3.clearkey"!=r||!e.licenseServerUri)&&(t.size&&t.get(r)&&(t=t.get(r),e.licenseServerUri=t),e.keyIds||(e.keyIds=new Set),(n=n.get(r))&&(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)),i[r]&&(e.keySystem=i[r]),X.cast&&X.cast.__platform__&&"com.microsoft.playready"==r&&(e.keySystem="com.chromecast.playready"))}function Mm(e,t){if(0!=(e=Zu(e)).size){e=vs(e);for(var n=(t=m(t)).next();!n.done;n=t.next())(n=n.value).video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}(h=_c.prototype).destroy=function(){return this.l.destroy()},h.configure=function(e,t){this.h=e,t&&(this.V=t),this.G&&this.T&&this.g&&this.G.Ha(this.h.updateExpirationTime)},h.hc=function(e){var n,t=this;return L(function(r){if(1==r.g)return t.j===e?r.return():t.B?(t.j=e,t.o.Aa(t.j,"play",function(){for(var o=m(t.N),s=o.next();!s.done;s=o.next())Wh(t,s.value);t.ea=!0,t.N=[]}),t.j.remote?(t.o.F(t.j.remote,"connect",function(){return tl(t)}),t.o.F(t.j.remote,"connecting",function(){return tl(t)}),t.o.F(t.j.remote,"disconnect",function(){return tl(t)})):"webkitCurrentPlaybackTargetIsWireless"in t.j&&t.o.F(t.j,"webkitcurrentplaybacktargetiswirelesschanged",function(){return tl(t)}),t.M=t.g&&t.g.initData.find(function(o){return o.initData.length>0})||null,n=t.g.keySystem,Ne().Sg(n)||!(t.M||t.C.size||t.h.parseInbandPsshEnabled)?(t.o.F(t.j,"encrypted",function(o){return function gx(e,t){return L(function(n){if(1==n.g)return x(n,ym(e),2);el(e,t.initDataType,oe(t.initData)),Z(n)})}(t,o)}),r.A(2)):x(r,ym(t),2)):(t.o.Aa(e,"encrypted",function(){t.u(new k(2,6,6010))}),r.return());Tm(t).catch(function(){}),Z(r)})},h.Gg=function(){var e=this,t=this.i.keys();return t=Vh(t,function(n){var i=e.i.get(n);return{sessionId:n.sessionId,sessionType:i.type,initData:i.initData,initDataType:i.initDataType}}),Array.from(t)},h.Td=function(){for(var e=1/0,t=this.i.keys(),n=(t=m(t)).next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},h.Ve=function(){return Hh(this.ma)};var _x=1,Dx=5,Lx=.5;function Dc(e,t,n){for(n=void 0===n||n,this.h=e,this.g=new Set([e]),t=(e=m(t=t||[])).next();!t.done;t=e.next())this.add(t.value,n)}function km(e,t){if(e.mimeType!=t.mimeType||(e=e.codecs.split(",").map(function(i){return Xi(i)}),t=t.codecs.split(",").map(function(i){return Xi(i)}),e.length!=t.length))return!1;e.sort(),t.sort();for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function _m(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;for(var n=(e=m(e)).next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}function Lc(){}function Px(){this.g=il,this.i=(new Map).set(il,2).set(ea,1),this.h=0}Dc.prototype.add=function(e,t){var i,n=this.h;
1if(t=void 0===t||t,!(i=!!n.audio!=!!e.audio||!!n.video!=!!e.video||n.language!=e.language)&&(i=n.audio&&e.audio)){var r=e.audio;i=!(!((!(i=n.audio).channelsCount||!r.channelsCount||i.channelsCount>2||r.channelsCount>2)&&i.channelsCount!=r.channelsCount||i.spatialAudio!==r.spatialAudio||t&&!km(i,r))&&_m(i.roles,r.roles)&&i.groupId===r.groupId)}return!i&&(i=n.video&&e.video)&&(n=n.video,i=e.video,i=!((!t||km(n,i))&&_m(n.roles,i.roles))),!i&&(this.g.add(e),!0)},Dc.prototype.values=function(){return this.g.values()},ue("shaka.media.AdaptationSet",Dc),ue("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"}),Lc.prototype.create=function(){},Lc.prototype.configure=function(){},Lc.prototype.getConfiguration=function(){},ue("shaka.media.AdaptationSetCriteria",Lc);var ea=0,il=1;function Xh(e,t,n){this.g=e,this.i=t,this.h=n}function Dm(e,t){return L(function(n){if(1==n.g)return x(n,function Vt(e,t,n,i){return n=void 0===n?[]:n,i=void 0===i?{}:i,L(function(r){return 1==r.g?x(r,bt(e,t,t.offlineSessionIds.length>0,n,i),2):(function zo(e){e.textStreams=e.textStreams.filter(function(t){return uo(t=dn(t.mimeType,t.codecs))})}(t),x(r,function lo(e){var t,n,i,r,o,s;return L(function(l){switch(l.g){case 1:t=[],n=m(e.imageStreams),i=n.next();case 2:if(i.done){l.A(4);break}if("application/mp4"==(o=(r=i.value).mimeType)&&"mjpg"==r.codecs&&(o="image/jpg"),Xu.has(o)){l.A(5);break}if(!(s=Uh.get(o))){Xu.set(o,!1),l.A(5);break}return x(l,function co(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(2===n.height)}})}(s),7);case 7:Xu.set(o,l.h);case 5:Xu.get(o)&&t.push(r),i=n.next(),l.A(2);break;case 4:e.imageStreams=t,Z(l)}})}(t),0))})}(e.h,t,e.g.drm.preferredKeySystems,e.g.drm.keySystemsMapping),2);if(e.g.streaming.dontChooseCodecs||rt(t,e.g.preferredVideoCodecs,e.g.preferredAudioCodecs,e.g.preferredDecodingAttributes,e.g.preferredTextFormats),!t.variants.some(Co))throw new k(2,4,4032);return n.return(Pm(e,t))})}function Lm(e,t){var n=e.g.restrictions;e=e.i;
1for(var i=!1,r=(t=m(t.variants)).next();!r.done;r=t.next()){var o=(r=r.value).allowedByApplication;r.allowedByApplication=dt(r,n,e),o!=r.allowedByApplication&&(i=!0)}return i}function Pm(e,t){var n=Lm(e,t);if(t){var i=e.h?e.h.g:null;if(i&&e.h.B){for(var r=new Set,o=m(t.variants),s=o.next();!s.done;s=o.next())(s=s.value).audio&&r.add(s.audio),s.video&&r.add(s.video);for(o=(r=m(r)).next();!o.done;o=r.next())bm(e,i.keySystem,o.value)}Rm(e,t)}return n}function bm(e,t,n){for(var i=(n=m(n.drmInfos)).next();!i.done;i=n.next())if((i=i.value).keySystem==t)for(var r=(i=m(i.initData||[])).next();!r.done;r=i.next())el(e.h,(r=r.value).initDataType,r.initData)}function Rm(e,t){e=e.h?e.h.Ve():{};var n=Object.keys(e);n=n.length&&"00"==n[0];for(var i=!1,r=!1,o=new Set,s=new Set,u=new Set,a=(t=m(t.variants)).next();!a.done;a=t.next())(a=a.value).audio&&u.add(a.audio),a.video&&u.add(a.video),a.allowedByApplication?a.allowedByKeySystem&&(i=!0):r=!0;for(t=(u=m(u)).next();!t.done;t=u.next())if((t=t.value).keyIds.size)for(a=(t=m(t.keyIds)).next();!a.done;a=t.next()){a=a.value;var l=e[n?"00":a];l?Nm.includes(l)&&s.add(l):o.add(a)}if(!i)throw new k(2,4,4012,e={hasAppRestrictions:r,missingKeys:Array.from(o),restrictedKeyStatuses:Array.from(s)})}var Nm=["output-restricted","internal-error"];function rl(){}function mu(e,t){ta.set(e,t)}function Om(e,t){if(t){var n=ta.get(t.toLowerCase());if(n)return n}throw new k(2,4,4e3,e,t)}ue("shaka.media.ManifestParser",rl),rl.unregisterParserByMime=function(e){ta.delete(e)},rl.registerParserByMime=mu,rl.registerParserByExtension=function(){be("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},rl.AccessibilityPurpose={Cm:"visually impaired",Ml:"hard of hearing",jm:"spoken subtitles"};var ta=new Map;function Pc(e,t){var n=null,i=null,r=null,o=null,s=e.U();return 1&t&&(r=e.zd()),2&t&&(o=e.U()),8&t&&(n=e.U()),16&t&&(i=e.U()),{trackId:s,Qd:n,Rd:i,mj:r,Li:o}}function bc(e,t){return 1==t?{baseMediaDecodeTime:4294967296*(t=e.U())+(e=e.U())}:{baseMediaDecodeTime:e.U()}}function Rc(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.U(),e.skip(4),e=e.Da(),{timescale:t,language:String.fromCharCode(96+(e>>10))+String.fromCharCode(96+((960&e)>>5))+String.fromCharCode(96+(31&e))}}function Nc(e,t,n){var i=e.U(),r=[],o=null;1&n&&(o=e.$g()),4&n&&e.skip(4);for(var s=0;s<i;s++){var u={jh:null,sampleSize:null,Df:null};256&n&&(u.jh=e.U()),512&n&&(u.sampleSize=e.U()),1024&n&&e.skip(4),2048&n&&(u.Df=0==t?e.U():e.$g()),r.push(u)}return{Hm:i,ih:r,og:o}}function jm(e){e.skip(6),e.skip(2),e.skip(8);var t=e.Da();return e.skip(2),e.skip(2),e.skip(2),{channelCount:t,sampleRate:e=e.Da()+e.Da()/65536}}function zh(e){return{codec:Mc(e=e.U())}}function ol(e,t){return t=void 0!==t&&t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function Yi(e){return(e<10?"0":"")+e}function na(e){this.g=e}function ia(e){for(var t=[],n=m(e.g),i=n.next();!i.done;i=n.next()){var r=t,o=r.push,s=i.value;i=Ze;var u=s.id+1,a=s.stream.width||0,l=s.stream.height||0;"audio"==s.type&&(l=a=0);var c=s.duration*s.timescale,d=Math.floor(c/(Os+1));switch(c=Math.floor(c%(Os+1)),u=Ze("tkhd",u=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(ee(en(u,4)),[0,0,0,0],ee(en(d,4)),ee(en(c,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],ee(en(a,2)),[0,0],ee(en(l,2)),[0,0]))),a=Ze,d=s.duration*s.timescale,l=Math.floor(d/(Os+1)),d=Math.floor(d%(Os+1)),c=(c=s.stream.language).charCodeAt(0)-96<<10|c.charCodeAt(1)-96<<5|c.charCodeAt(2)-96,l=Ze("mdhd",l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(ee(en(s.timescale,4)),ee(en(l,4)),ee(en(d,4)),ee(en(c,2)),[0,0]))),d=s,c=new Uint8Array([]),d.type){case"video":c=Ox.value();break;case"audio":c=jx.value()}d=Ze("hdlr",c);e:{switch(s.type){case"video":s=Ze("minf",Ze("vmhd",Hx.value()),Gm.value(),Um(s));break e;case"audio":s=Ze("minf",Ze("smhd",Gx.value()),Gm.value(),Um(s));break e}s=new Uint8Array([])}i=i("trak",u,s=a("mdia",l,d,s)),o.call(r,i)}for(t=_t.apply(Nt,ee(t)),n=Ze,i=(o=e.g[0]).duration*o.timescale,r=Math.floor(i/(Os+1)),i=Math.floor(i%(Os+1)),r=Ze("mvhd",r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(ee(en(o.timescale,4)),ee(en(r,4)),ee(en(i,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]))),i=[],a=(e=m(e.g)).next();!a.done;a=e.next())u=(s=i).push,a=Ze("trex",a=new Uint8Array([0,0,0,0].concat(ee(en(a.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),u.call(s,a);if(e=Ze("mvex",e=_t.apply(Nt,ee(i))),i=[],o.encrypted){for(s=(o=m(o.stream.drmInfos)).next();!s.done;s=o.next())if((s=s.value).initData)for(u=(s=m(s.initData)).next();!u.done;u=s.next())i.push(u.value.initData);o=_t.apply(Nt,ee(i))}else o=new Uint8Array([]);return e=n("moov",r,t,e,o),t=Wx.value(),(n=new Uint8Array(t.byteLength+e.byteLength)).set(t),n.set(e,t.byteLength),n}function Um(e){var t=Ze,n="aac";
1e.codecs.includes("mp3")?n="mp3":e.codecs.includes("ac-3")?n=Ne().je()?"ec-3":"ac-3":e.codecs.includes("ec-3")?n="ec-3":e.codecs.includes("opus")&&(n="opus");var i=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){if(n=e.stream.width||0,i=e.stream.height||0,e.Oa.byteLength>0)var r=Ze("avcC",e.Oa);else{r=Ze;for(var o=7,s=[],u=[],a=0,l=0,c=0,d=0;d<e.Cb.length;d++){var f=Fm(e.Cb[d]);switch(31&f[0]){case 7:s.push(f),o+=f.length+2;break;case 8:u.push(f),o+=f.length+2}}for(s.length>0&&(a=s[0][1],c=s[0][2],l=s[0][3]),d=0,(o=new Uint8Array(o))[d++]=1,o[d++]=a,o[d++]=c,o[d++]=l,o[d++]=255,o[d++]=224|s.length,a=0;a<s.length;a++)o[d++]=(65280&s[a].length)>>8,o[d++]=255&s[a].length,o.set(s[a],d),d+=s[a].length;for(o[d++]=u.length,s=0;s<u.length;s++)o[d++]=(65280&u[s].length)>>8,o[d++]=255&u[s].length,o.set(u[s],d),d+=u[s].length;r=r("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(ee(en(n,2)),ee(en(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="avc1",u=Bm(e),s=new Uint8Array([]),e.encrypted&&(s=vu(e.stream,e.codecs),i="encv"),i=Ze(i,n,r,u,s)}else e.codecs.includes("hvc1")&&(i=e.stream.width||0,r=e.stream.height||0,n=new Uint8Array([]),e.Oa.byteLength>0&&(n=Ze("hvcC",e.Oa)),i=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(ee(en(i,2)),ee(en(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="hvc1",u=Bm(e),s=new Uint8Array([]),e.encrypted&&(s=vu(e.stream,e.codecs),r="encv"),i=Ze(r,i,n,u,s));break;case"audio":"mp3"==n?e=Ze(".mp3",sl(e)):"ac-3"==n?(n=Ze("dac3",e.Ga),i="ac-3",r=new Uint8Array([]),e.encrypted&&(r=vu(e.stream,e.codecs),i="enca"),e=Ze(i,sl(e),n,r)):"ec-3"==n?(n=Ze("dec3",e.Ga),i="ec-3",r=new Uint8Array([]),e.encrypted&&(r=vu(e.stream,e.codecs),i="enca"),e=Ze(i,sl(e),n,r)):"opus"==n?(n=Ze("dOps",e.Ga),i="Opus",r=new Uint8Array([]),e.encrypted&&(r=vu(e.stream,e.codecs),i="enca"),e=Ze(i,sl(e),n,r)):(e.Ga.byteLength>0?n=Ze("esds",e.Ga):(n=Ze,i=e.id+1,r=e.stream.channelsCount||2,s=e.stream.audioSamplingRate||44100,a=Vi("audio",e.codecs.split(",")),u=(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})[s],("mp4a.40.5"===a||"mp4a.40.29"===a)&&(u=l[2*s]),s=parseInt(a.split(".").pop(),10),n=n("esds",i=new Uint8Array([0,0,0,0,3,25].concat(ee(en(i,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,s<<3|u>>>1,u<<7|r<<3,6,1,2])))),i="mp4a",r=new Uint8Array([]),e.encrypted&&(r=vu(e.stream,e.codecs),i="enca"),e=Ze(i,sl(e),n,r)),i=e}
1return t("stbl",e=Ze("stsd",Kx.value(),i),Ze("stts",Ux.value()),Ze("stsc",Bx.value()),Ze("stsz",Vx.value()),Ze("stco",Fx.value()))}function Bm(e){if(!e.Ya&&!e.Za)return new Uint8Array([]);var t=e.Za;return Ze("pasp",e=new Uint8Array([].concat(ee(en(e.Ya,4)),ee(en(t,4)))))}function sl(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(ee(en(e.stream.audioSamplingRate||44100,2)),[0,0]))}function vu(e,t){var n=Ze;t=Ze("frma",t=new Uint8Array([].concat(ee(en(Vm(t.split(".")[0]),4)))));var i="cenc",r=e.drmInfos[0];r&&r.encryptionScheme&&(i=r.encryptionScheme),i=Ze("schm",i=new Uint8Array([0,0,0,0].concat(ee(en(Vm(i),4)),[0,1,0,0]))),r=Ze;for(var o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),s=(e=m(e.drmInfos)).next();!s.done;s=e.next())if((s=s.value)&&s.keyIds&&s.keyIds.size)for(var u=(s=m(s.keyIds)).next();!u.done;u=s.next())o=Fm(u.value);return n("sinf",t,i,r("schi",o=Ze("tenc",e=new Uint8Array([0,0,0,0,0,0,1,8]),o)))}function ul(e){for(var t=[],n=(e=m(e.g)).next();!n.done;n=e.next()){n=n.value;var i=t.push,r=i.apply,o=Ze,s=new Uint8Array([0,0,0,0].concat(ee(en(n.data?n.data.sequenceNumber:0,4))));s=Ze("mfhd",s);var u,a=n.data?n.data.Ab:[],l=new Uint8Array(4+a.length);for(u=0;u<a.length;u++){var c=a[u].flags;l[u+4]=c.jb<<4|c.mb<<2|c.kb}var d=(a=Ze("sdtp",l)).length+32+20+8+16+8+8;l=Ze,u=Ze("tfhd",u=new Uint8Array([0,0,0,58].concat(ee(en(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),c=n.data?n.data.baseMediaDecodeTime:0;var f=Math.floor(c%(Os+1));c=Ze("tfdt",c=new Uint8Array([1,0,0,0].concat(ee(en(Math.floor(c/(Os+1)),4)),ee(en(f,4)))));var g=d,v=12+16*(f=(d=n.data?n.data.Ab:[]).length),y=new Uint8Array(v);for(g+=8+v,y.set(["video"===n.type?1:0,0,15,1].concat(ee(en(f,4)),ee(en(g,4))),0),g=0;g<f;g++){var T=d[g];v=en(T.duration,4);var S=en(T.size,4),A=T.flags;T=en(T.sb,4),y.set([].concat(ee(v),ee(S),[A.yb<<2|A.jb,A.mb<<6|A.kb<<4|A.zb,61440&A.ib,15&A.ib],ee(T)),12+16*g)}o=o("moof",s,a=l("traf",u,c,d=Ze("trun",y),a)),r.call(i,t,[o,Nx(n)])}return _t.apply(Nt,ee(t))}function Nx(e){return e=(e.data?e.data.Ab:[]).map(function(t){return t.data}),Ze("mdat",e=_t.apply(Nt,ee(e)))}function en(e,t){var n=[];for(--t;t>=0;t--)n.push(e>>8*t&255);return n}function Fm(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[2*n]+e[2*n+1]),16);return t}function Vm(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<8*(e.length-n-1);return t}function Ze(e){var t=Jt.apply(1,arguments),n=Hm.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],Hm.set(e,n));for(var i=8,r=t.length-1;r>=0;r--)i+=t[r].byteLength;for((r=new Uint8Array(i))[0]=i>>24&255,r[1]=i>>16&255,r[2]=i>>8&255,r[3]=255&i,r.set(n,4),n=0,i=8;n<t.length;n++)r.set(t[n],i),i+=t[n].byteLength;return r}var Os=4294967295,Hm=new Map,Ox=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])}),jx=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])}),Ux=new kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),Bx=new kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),Fx=new kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),Vx=new kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}),Hx=new kt(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),Gx=new kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),Kx=new kt(function(){return new Uint8Array([0,0,0,0,0,0,0,1])}),Wx=new kt(function(){var e=new Uint8Array([105,115,111,109]),t=new Uint8Array([97,118,99,49]);return Ze("ftyp",e,new Uint8Array([0,0,0,1]),e,t)}),Gm=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=Ze("dref",e),Ze("dinf",e)});function qx(e){function t(d){s.push(d),Oe(d)}var n,i,r,o,s=[];if((new Et).box("moof",t).box("traf",t).S("tfhd",function(d){n=d,r=Pc(d.reader,d.flags)}).S("trun",function(d){i=d,o=Nc(d.reader,d.version,d.flags)}).parse(e),r&&2!==r.Li){var u=n.start+Ns(n)+4+(null!==r.mj?8:0),a=Ve(e);if(null!==r.Li)a.setUint32(u,2);else{Oc(e,n.start,n.size+4);var l=a.getUint32(n.start+8);a.setUint32(n.start+8,2|l),o&&null!==o.og&&a.setInt32(i.start+Ns(i)+4,o.og+4),l=e.subarray(0,u),a=e.subarray(u),(e=new Uint8Array(e.byteLength+4)).set(l),l=[];for(var c=3;c>=0;c--)l.push(2>>8*c&255);for(e.set(new Uint8Array(l),u),e.set(a,u+4),a=(u=m(s)).next();!a.done;a=u.next())Oc(e,(a=a.value).start,a.size+4)}}return e}function $x(e,t,n,i,r,o){var s=vu(e,i.name),u=t.subarray(i.start,i.start+i.size);
1for((e=new Uint8Array(i.size+s.byteLength)).set(u,0),Ve(e).setUint32(4,o),e.set(s,i.size),Oc(e,0,e.byteLength),o=new Uint8Array(t.byteLength+e.byteLength),i=Ne().cf()?i.start:i.start+i.size,s=t.subarray(i),o.set(t.subarray(0,i)),o.set(e,i),o.set(s,i+e.byteLength),r=(t=m(r)).next();!r.done;r=t.next())Oc(o,(r=r.value).start,r.size+e.byteLength);return e=Ve(o,n.start),n=Ns(n),t=e.getUint32(n),e.setUint32(n,t+1),o}function Oc(e,t,n){0!=(t=(e=Ve(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}function bi(e,t,n,i,r,o,s,u){this.P=e,this.startByte=t,this.endByte=n,this.ud=void 0===i?null:i,this.timescale=void 0===r?null:r,this.h=void 0===o?null:o,this.aesKey=void 0===s?null:s,this.g=this.mimeType=this.codecs=null,this.encrypted=void 0!==u&&u}function al(e,t){return e===t||(e&&t?e.Fc()==t.Fc()&&e.Dc()==t.Dc()&&Qs(e.P().sort(),t.P().sort())&&pt(e.Zb(),t.Zb()):e==t)}function Ee(e,t,n,i,r,o,s,u,a,l,c,d,f,g,v,y){for(l=void 0===l?[]:l,g=void 0===g?Jo:g,this.startTime=e,this.j=this.endTime=t,this.D=n,this.startByte=i,this.endByte=r,this.Z=o,this.timestampOffset=s,this.appendWindowStart=u,this.appendWindowEnd=a,this.g=l,this.tilesLayout=void 0===c?"":c,this.C=void 0===d?null:d,this.h=void 0===f?null:f,this.status=g,this.preload=!1,this.l=!0,this.m=!1,this.aesKey=void 0===v?null:v,this.thumbnailSprite=null,this.i=-1,this.B=void 0!==y&&y,this.G=this.o=!1,t=(e=m(this.g)).next();!t.done;t=e.next())t.value.ri();this.B&&this.g.length&&this.g[this.g.length-1].pi(),this.u=this.bandwidth=this.mimeType=this.codecs=null,this.H=!1}function Km(e,t){e.Z=t;for(var n=(e=m(e.g)).next();!n.done;n=e.next())Km(n.value,t)}bi.prototype.Fc=function(){return this.startByte},bi.prototype.Dc=function(){return this.endByte},bi.prototype.ke=function(e){this.h=e},bi.prototype.Zb=function(){return this.h},ue("shaka.media.InitSegmentReference",bi),bi.prototype.getEndByte=bi.prototype.Dc,bi.prototype.getStartByte=bi.prototype.Fc,(h=Ee.prototype).P=function(){return this.D()},h.getStartTime=function(){return this.startTime},h.Fj=function(){return this.endTime},h.Fc=function(){return this.startByte},h.Dc=function(){return this.endByte},h.bk=function(){return this.tilesLayout},h.$j=function(){return this.C},h.Gc=function(){return this.status},h.yk=function(){this.status=Wm},h.Rg=function(){this.preload=!0},h.isPreload=function(){return this.preload},h.td=function(){this.l=!1},h.lk=function(){return this.l},h.ri=function(){this.o=!0},h.pk=function(){return this.o},h.pi=function(){this.G=!0},h.nk=function(){return this.G},h.oi=function(){this.m=!0},h.hk=function(){return this.m},h.Jf=function(e){this.thumbnailSprite=e},h.Yj=function(){return this.thumbnailSprite},h.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=m(this.g),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.j+=e},h.Ah=function(e){null==this.h?Rn("Sync attempted without sync time!"):(e=this.h-e-this.startTime,Math.abs(e)>=.001&&this.offset(e))},h.ke=function(e,t){this.u=e,this.H=void 0!==t&&t},h.Zb=function(e){var t=this.u;return(void 0===e||e)&&this.H&&(this.u=null),t},ue("shaka.media.SegmentReference",Ee),Ee.prototype.getSegmentData=Ee.prototype.Zb,Ee.prototype.setSegmentData=Ee.prototype.ke,Ee.prototype.syncAgainst=Ee.prototype.Ah,Ee.prototype.offset=Ee.prototype.offset,Ee.prototype.getThumbnailSprite=Ee.prototype.Yj,Ee.prototype.setThumbnailSprite=Ee.prototype.Jf,Ee.prototype.hasByterangeOptimization=Ee.prototype.hk,Ee.prototype.markAsByterangeOptimization=Ee.prototype.oi,Ee.prototype.isLastPartial=Ee.prototype.nk,Ee.prototype.markAsLastPartial=Ee.prototype.pi,Ee.prototype.isPartial=Ee.prototype.pk,Ee.prototype.markAsPartial=Ee.prototype.ri,Ee.prototype.isIndependent=Ee.prototype.lk,Ee.prototype.markAsNonIndependent=Ee.prototype.td,Ee.prototype.isPreload=Ee.prototype.isPreload,Ee.prototype.markAsPreload=Ee.prototype.Rg,Ee.prototype.markAsUnavailable=Ee.prototype.yk,Ee.prototype.getStatus=Ee.prototype.Gc,Ee.prototype.getTileDuration=Ee.prototype.$j,Ee.prototype.getTilesLayout=Ee.prototype.bk,Ee.prototype.getEndByte=Ee.prototype.Dc,Ee.prototype.getStartByte=Ee.prototype.Fc,Ee.prototype.getEndTime=Ee.prototype.Fj,Ee.prototype.getStartTime=Ee.prototype.getStartTime,Ee.prototype.getUris=Ee.prototype.P;var Jo=0,Wm=1;function ll(e){return 1==e.length&&e.end(0)-e.start(0)<1e-4}function Xm(e){return!e||ll(e)?null:1==e.length&&e.start(0)<0?0:e.length?e.start(0):null}function jc(e){return!e||ll(e)?null:e.length?e.end(e.length-1):null}function Yh(e,t){return!(!e||!e.length||ll(e)||t>e.end(e.length-1))&&t>=e.start(0)}function zm(e,t){if(!e||!e.length||ll(e))return 0;for(var n=0,i=(e=m(Zo(e))).next();!i.done;i=e.next()){var r=i.value;i=r.start,(r=r.end)>t&&(n+=r-Math.max(i,t))}return n}function Zo(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 qh(){}function Ym(e,t){var n=document.createElement("source");return n.src=e,n.type=void 0===t?"":t,n}function Uc(e){for(var t=!1,n=e.getElementsByTagName("source"),i=n.length-1;i>=0;--i)e.removeChild(n[i]),t=!0;return e.src&&(e.removeAttribute("src"),t=!0),t}function cl(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function yu(){return ra||($h||($h=new E(function(){ra=null})),(ra=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(ra=document.createElement("video")),$h.ka(1),ra)}Ee.Status={rl:Jo,Am:Wm,Wl:2},ue("shaka.util.Dom",qh),qh.removeAllChildren=cl,qh.clearSourceFromVideo=Uc;var $h=null,ra=null;function Jh(){}function qm(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&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 $m(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&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 Zh(e,t){var n=(127&e[t])<<21;return n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]}function eS(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===e.type){if(e.size<2||3!==e.data[0])return null;var n=e.data.subarray(1).indexOf(0);if(-1===n)return null;var i=We(oe(e.data,1,n)),r=e.data[2+n],o=e.data.subarray(3+n).indexOf(0);if(-1===o)return null;var u,s=We(oe(e.data,3+n,o));
1return u="--\x3e"===i?We(oe(e.data,4+n+o)):Qe(e.data.subarray(4+n+o)),t.mimeType=i,t.pictureType=r,t.description=s,t.data=u,t}return"TXXX"===e.type||"WXXX"===e.type?e.size<2||3!==e.data[0]||-1===(i=e.data.subarray(1).indexOf(0))?null:(n=We(oe(e.data,1,i)),e=We(oe(e.data,2+i)).replace(/\0*$/,""),t.description=n,t.data=e,t):"PRIV"===e.type?e.size<2||-1===(n=e.data.indexOf(0))?null:(n=We(oe(e.data,0,n)),t.description=n,"com.apple.streaming.transportStreamTimestamp"==n?(n=e.data.subarray(n.length+1),e=1&n[3],n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=47721858.84),t.data=n):(e=Qe(e.data.subarray(n.length+1)),t.data=e),t):"T"===e.type[0]?e.size<2||3!==e.data[0]?null:(e=We(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):"W"===e.type[0]?(e=We(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=Qe(e.data),t):null}function Tu(e){for(var t=0,n=[];qm(e,t);){var i=Zh(e,t+6);for(e[t+5]>>6&1&&(t+=10),i=(t+=10)+i;t+10<i;){var r=e.subarray(t),o=Zh(r,4);(o=eS(r={type:String.fromCharCode(r[0],r[1],r[2],r[3]),size:o,data:r.subarray(10,10+o)}))&&n.push(o),t+=r.size+10}$m(e,t)&&(t+=10)}return n}function oa(e,t){for(var n=t=void 0===t?0:t,i=0;qm(e,t);)e[t+5]>>6&1&&(i+=10),i+=10,i+=Zh(e,t+6),$m(e,t+10)&&(i+=10),t+=i;return i>0?e.subarray(n,n+i):new Uint8Array([])}function Jm(e){return new Date(Date.UTC(1900,0,1,0,0,0,0)+e).getTime()}function Qo(e,t){if(this.j=e,void 0!==t&&t){t=new Uint8Array(e.byteLength);for(var n=0,i=0;i<e.byteLength;i++)i>=2&&3==e[i]&&0==e[i-1]&&0==e[i-2]||(t[n]=e[i],n++);this.j=oe(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function Qh(e){var t=e.j.byteLength-e.i,n=new Uint8Array(4),i=Math.min(4,e.i);0!==i&&(n.set(e.j.subarray(t,t+i)),e.h=new Ht(n,0).U(),e.g=8*i,e.i-=i)}function qi(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=8*n,e.g-=n,Qh(e)}e.h<<=t,e.g-=t}function $e(e,t){var n=Math.min(e.g,t),i=e.h>>>32-n;return e.g-=n,e.g>0?e.h<<=n:e.i>0&&Qh(e),(n=t-n)>0?i<<n|$e(e,n):i}function ep(e){var t;for(t=0;t<e.g;++t)if(0!=(e.h&2147483648>>>t))return e.h<<=t,e.g-=t,t;return Qh(e),t+ep(e)}function Ri(e){qi(e,1+ep(e))}function ae(e){return $e(e,ep(e)+1)-1}function sa(e){return 1&(e=ae(e))?1+e>>>1:-1*(e>>>1)}function we(e){return 1===$e(e,1)}function yt(e){return $e(e,8)}function Bc(e,t){for(var n=8,i=8,r=0;r<t;r++)0!==i&&(i=(n+(i=sa(e))+256)%256),n=0===i?n:i}function tS(e){return yt(e),ae(e),ae(e)}function Bt(){this.I=null,this.J=!1,this.m=this.L=null,this.j=[],this.g=[],this.C=this.D=null,this.i=[],this.h=[],this.G=null,this.l=[],this.B=this.H=this.o=this.u=null}function tp(e,t){if(1!=(t[0]<<16|t[1]<<8|t[2]))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 i=t[7];if(192&i){var r=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2;null==e.u&&(e.u=r),n.pts=Qm(r,e.u),e.u=n.pts,n.dts=n.pts,64&i&&(i=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2,null==e.o&&(e.o=i),n.dts=n.pts!=r?Qm(i,e.o):i),e.o=n.dts}return t.byteLength<=(e=t[8]+9)?null:(n.data=t.subarray(e),n)}function Zm(e){var t=e.rd();return t.length>1&&(e=t[0].pts,t=t[1].pts,!isNaN(t-e))?String(1/(t-e)*9e4):null}function Qm(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e}function ua(e){return!(np(e)<0)}function np(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71==e[n]&&71==e[n+188]&&71==e[n+376])return n;n++}return-1}ue("shaka.util.Id3Utils",Jh),Jh.getID3Data=oa,Jh.getID3Frames=Tu,ue("shaka.util.ExpGolomb",Qo),(h=Bt.prototype).clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},h.Hf=function(e){null!=this.B&&this.B!=e&&(this.o=this.u=null),this.B=e},h.parse=function(e){if(e.length<564)return this;for(var t=Math.max(0,np(e)),n=e.length-(e.length+t)%188,i=!1,r=t;r<n;r+=188)if(71==e[r]){var o=!!(64&e[r+1]),s=((31&e[r+1])<<8)+e[r+2];if((48&e[r+3])>>4>1){var u=r+5+e[r+4];if(u==r+188)continue}else u=r+4;switch(s){case 0:o&&(u+=e[u]+1),this.I=(31&e[u+10])<<8|e[u+11];break;case 17:case 8191:break;case this.I:o&&(u+=e[u]+1),s={audio:-1,video:-1,$e:-1,audioCodec:"",videoCodec:""};var a=u+3+((15&(o=e)[u+1])<<8|o[u+2])-4;for(u+=12+((15&o[u+10])<<8|o[u+11]);u<a;){var l=(31&o[u+1])<<8|o[u+2],c=(15&o[u+3])<<8|o[u+4];switch(o[u]){case 6:if(c>0)for(var d=u+5,f=c;f>2;){var g=o[d+1]+2;switch(o[d]){case 5:var v=yi(o.subarray(d+2,d+g));-1==s.audio&&"Opus"===v?(s.audio=l,s.audioCodec="opus"):-1==s.video&&"AV01"===v&&(s.video=l,s.videoCodec="av1");break;case 106:-1==s.audio&&(s.audio=l,s.audioCodec="ac3");break;case 122:-1==s.audio&&(s.audio=l,s.audioCodec="ec3");break;case 124:-1==s.audio&&(s.audio=l,s.audioCodec="aac");break;case 127:"opus"==s.audioCodec&&(v=null,128===o[d+2]&&(v=o[d+3]),null!=v&&(this.H={channelCount:0==(15&v)?2:15&v,pj:v,sampleRate:48e3}))}d+=g,f-=g}break;case 15:-1==s.audio&&(s.audio=l,s.audioCodec="aac");break;case 17:-1==s.audio&&(s.audio=l,s.audioCodec="aac-loas");break;case 21:-1==s.$e&&(s.$e=l);break;case 27:-1==s.video&&(s.video=l,s.videoCodec="avc");break;case 3:case 4:-1==s.audio&&(s.audio=l,s.audioCodec="mp3");break;case 36:-1==s.video&&(s.video=l,s.videoCodec="hvc");break;case 129:-1==s.audio&&(s.audio=l,s.audioCodec="ac3");break;case 132:case 135:-1==s.audio&&(s.audio=l,s.audioCodec="ec3")}u+=c+5}-1!=(o=s).video&&(this.L=o.video,this.m=o.videoCodec),-1!=o.audio&&(this.D=o.audio,this.C=o.audioCodec),-1!=o.$e&&(this.G=o.$e),i&&!this.J&&(i=!1,r=t-188),this.J=!0;break;
1case this.L:u=e.subarray(u,r+188),o?this.j.push([u]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(u);break;case this.D:u=e.subarray(u,r+188),o?this.i.push([u]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(u);break;case this.G:u=e.subarray(u,r+188),o?this.l.push([u]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(u);break;default:i=!0}}return this},h.Fk=function(e){return be("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Xg(e,{ce:null,state:null})},h.Xg=function(e,t){var n=e.pts?e.pts/9e4:null,i=(e=e.data).byteLength,r=1;"hvc"==this.m&&(r=2);var o=t.state||0,s=o,u=0,a=[],l=-1,c=0;for(-1==o&&(l=0,c="hvc"==this.m?e[0]>>1&63:31&e[0],o=0,u=1);u<i;){var d=e[u++];o?1===o?o=d?0:2:d?1==d?(d=u-o-1,l>=0?a.push({data:e.subarray(l+r,d),fullData:e.subarray(l,d),type:c,time:n,state:null}):(o=a.length?a[a.length-1]:t.ce)&&(s&&u<=4-s&&o.state&&(o.data=o.data.subarray(0,o.data.byteLength-s),o.fullData=o.fullData.subarray(0,o.fullData.byteLength-s)),d>0&&(d=e.subarray(0,d),o.data=_t(o.data,d),o.fullData=_t(o.fullData,d),o.state=0)),u<i?(c="hvc"==this.m?e[u]>>1&63:31&e[u],l=u,o=0):o=-1):o=0:o=3:o=d?0:1}return l>=0&&o>=0&&a.push({data:e.subarray(l+r,i),fullData:e.subarray(l,i),type:c,time:n,state:o}),!a.length&&t.ce&&(n=a.length?a[a.length-1]:t.ce)&&(n.data=_t(n.data,e),n.fullData=_t(n.fullData,e)),t.state=o,a},h.getMetadata=function(){for(var e=[],t=m(this.l),n=t.next();!n.done;n=t.next())(n=tp(this,n=_t.apply(Nt,ee(n.value))))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:Tu(n.data),dts:n.dts,pts:n.pts});return e},h.ub=function(){if(this.i.length&&!this.h.length)for(var e=m(this.i),t=e.next();!t.done;t=e.next()){var n=_t.apply(Nt,ee(t.value)),i=tp(this,n);t=this.h.length?this.h[this.h.length-1]:null,i&&null!=i.pts&&null!=i.dts&&(!t||t.pts!=i.pts&&t.dts!=i.dts)?this.h.push(i):this.h.length&&(n=i?i.data:n)&&((t=this.h.pop()).data=_t(t.data,n),this.h.push(t))}return this.h},h.rd=function(e){if(e=void 0===e||e,this.j.length&&!this.g.length){for(var t=m(this.j),n=t.next();!n.done;n=t.next()){var i=_t.apply(Nt,ee(n.value)),r=tp(this,i);n=this.g.length?this.g[this.g.length-1]:null,r&&null!=r.pts&&null!=r.dts&&(!n||n.pts!=r.pts&&n.dts!=r.dts)?this.g.push(r):this.g.length&&(i=r?r.data:i)&&((n=this.g.pop()).data=_t(n.data,i),this.g.push(n))}if(e){for(t={ce:null,state:null},n=[],r=(i=m(this.g)).next();!r.done;r=i.next())(r=r.value).nalus=this.Xg(r,t),r.nalus.length&&(n.push(r),t.ce=r.nalus[r.nalus.length-1]);this.g=n}}return e?this.g:(e=this.g,this.g=[],e)},h.getStartTime=function(e){if("audio"==e){e=null;var t=this.ub();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return"video"==e?(e=null,(t=this.rd(!1)).length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},h.Sd=function(){return{audio:this.C,video:this.m}},h.Ze=function(){for(var e=[],t=m(this.rd()),n=t.next();!n.done;n=t.next())e.push.apply(e,ee(n.value.nalus));return e},h.ek=function(){be("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Kg();return{height:e.height,width:e.width}},h.Kg=function(){return"hvc"==this.m?function iS(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Ze();if(!n.length||!(n=n.find(function(P){return 33==P.type})))return t;var i=new Qo(n.fullData,!0);yt(i),yt(i),$e(i,4);var r=$e(i,3);we(i);var o=$e(i,2),s=$e(i,1),u=$e(i,5),a=$e(i,32);n=yt(i);for(var l=yt(i),c=yt(i),d=yt(i),f=yt(i),g=yt(i),v=yt(i),y=[],T=[],S=0;S<r;S++)y.push(we(i)),T.push(we(i));if(r>0)for(S=r;S<8;S++)$e(i,2);for(S=0;S<r;S++)y[S]&&$e(i,88),T[S]&&yt(i);ae(i),3==(r=ae(i))&&$e(i,1),y=ae(i),T=ae(i);var A=S=0,I=0,_=0;return we(i)&&(S+=ae(i),A+=ae(i),I+=ae(i),_+=ae(i)),t.width=String(y-(S+A)*(1===r||2===r?2:1)),t.height=String(T-(I+_)*(1===r?2:1)),i=function(P){for(var b=0,M=0;M<32;M++)b|=(P>>M&1)<<31-M;return b>>>0}(a),s=1==s?"H":"L",o="hvc1."+["","A","B","C"][o]+u,o+="."+i.toString(16).toUpperCase(),o+="."+s+v,g&&(o+="."+g.toString(16).toUpperCase()),f&&(o+="."+f.toString(16).toUpperCase()),d&&(o+="."+d.toString(16).toUpperCase()),c&&(o+="."+c.toString(16).toUpperCase()),l&&(o+="."+l.toString(16).toUpperCase()),n&&(o+="."+n.toString(16).toUpperCase()),t.codec=o,t.frameRate=Zm(e),t}(this):function nS(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Ze();if(!n.length||!(n=n.find(function(g){return 7==g.type})))return t;
1var i=yt(n=new Qo(n.data)),r=yt(n),o=yt(n);if(Ri(n),rS.includes(i)){var s=ae(n);if(3===s&&qi(n,1),Ri(n),Ri(n),qi(n,1),we(n)){s=3!==s?8:12;for(var u=0;u<s;u++)we(n)&&Bc(n,u<6?16:64)}}if(Ri(n),0===(s=ae(n)))ae(n);else if(1===s)for(qi(n,1),Ri(n),Ri(n),s=ae(n),u=0;u<s;u++)Ri(n);Ri(n),qi(n,1),s=ae(n),u=ae(n);var a=$e(n,1);0===a&&qi(n,1),qi(n,1);var l=0,c=0,d=0,f=0;return we(n)&&(l=ae(n),c=ae(n),d=ae(n),f=ae(n)),t.height=String((2-a)*(u+1)*16-2*d-2*f),t.width=String(16*(s+1)-2*l-2*c),t.codec="avc1."+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+o.toString(16).toUpperCase()).slice(-2),t.frameRate=Zm(e),t}(this)},ue("shaka.util.TsParser",Bt),Bt.syncOffset=np,Bt.probe=ua,Bt.prototype.getVideoInfo=Bt.prototype.Kg,Bt.prototype.getVideoResolution=Bt.prototype.ek,Bt.prototype.getVideoNalus=Bt.prototype.Ze,Bt.prototype.getCodecs=Bt.prototype.Sd,Bt.prototype.getStartTime=Bt.prototype.getStartTime,Bt.prototype.getVideoData=Bt.prototype.rd,Bt.prototype.getAudioData=Bt.prototype.ub,Bt.prototype.getMetadata=Bt.prototype.getMetadata,Bt.prototype.parseNalus=Bt.prototype.Xg,Bt.prototype.parseAvcNalus=Bt.prototype.Fk,Bt.prototype.parse=Bt.prototype.parse,Bt.prototype.setDiscontinuitySequence=Bt.prototype.Hf,Bt.prototype.clearData=Bt.prototype.clearData,Bt.Timescale=9e4;var rS=[100,110,122,244,44,83,86,118,128,138,139,134];function ev(e,t,n,i,r){var o=this;this.g=e,this.O=n,this.B=i,this.ia=t,this.l=new Map,this.D=new Map,this.Pa=new Map,this.h=null,this.Fa=!1,this.N=r||null,this.o=new Map,this.u=new et,this.j=new Map,this.J=null,this.L=new At,this.Ba="",this.cb=!1,this.ya=!0,this.M=!1,this.C=this.R=null,this.i=ip(this,this.L),this.$a=this.G=!1,this.I=new Ju(function(){return function uS(e){var t,n,i,o,s,u,a,c,d,g,v;return L(function(T){if(1==T.g){for(t=[],n=m(e.o),i=n.next();!i.done;i=n.next())for(o=m(i.value),s=o.next().value,u=o.next().value,a=u[0],e.o.set(s,u.slice(0,1)),a&&t.push(a.p.catch(w)),c=m(u.slice(1)),d=c.next();!d.done;d=c.next())d.value.p.reject(new k(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),x(T,Promise.all(t),2)}for(g=m(e.j.values()),v=g.next();!v.done;v=g.next())v.value.destroy();e.u&&(e.u.release(),e.u=null),e.g&&e.C&&e.g.removeChild(e.C),e.g&&e.R&&(e.g.removeChild(e.R),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.R=null,e.C=null,e.B=null,e.i=null,e.h=null,e.ia=null,e.l.clear(),e.Pa.clear(),e.j.clear(),e.J=null,e.o.clear(),e.N=null,e.ea.clear(),e.O=null,Z(T)})}(o)}),this.H=!1,this.X="UNKNOWN",this.ab=this.bb=!1,this.Qa=new At,this.m=!1,this.xa=null,this.ea=new Map,this.oa=this.T=this.wa=this.V=null,this.ma=new At,this.g.remote&&(this.M="disconnected"!=this.g.remote.state,this.u.F(this.g.remote,"connect",function(){o.M="disconnected"!=o.g.remote.state}),this.u.F(this.g.remote,"connecting",function(){o.M="disconnected"!=o.g.remote.state}),this.u.F(this.g.remote,"disconnect",function(){o.M="disconnected"!=o.g.remote.state}))}function ip(e,t){if(e.ya=!0,X.ManagedMediaSource){e.C||(e.g.disableRemotePlayback=!0);var n=new ManagedMediaSource;e.u.F(n,"startstreaming",function(){e.ya=!0}),e.u.F(n,"endstreaming",function(){e.ya=!1})}else n=new MediaSource;return e.u.Aa(n,"sourceopen",function(){URL.revokeObjectURL(e.Ba),t.resolve()}),e.u.Aa(e.g,"playing",function(){e.cb=!0}),e.Ba=up(n),e.B.useSourceElements?(e.g.removeAttribute("src"),e.R&&e.g.removeChild(e.R),e.C&&e.g.removeChild(e.C),e.R=Ym(e.Ba),e.g.appendChild(e.R),e.C&&e.g.appendChild(e.C),e.g.load()):e.g.src=e.Ba,n}function Fc(e,t,n,i){"audio"==t&&i&&(i=li(i,n.mimeType));var r=dn(n.mimeType,i);if(t==Pe)Vc(e,r,e.H,n.external);else{var o=e.B.forceTransmux;(!Zt(r)||!e.H&&so.includes(r))&&(o=!0);var s=Xo(n.mimeType,i);if(o){if(o=Cn("audio",(i||"").split(",")),i=Cn("video",(i||"").split(",")),o&&i)return e.m=!0,Fc(e,"audio",n,o),void Fc(e,"video",n,i);(i=Wo(s))&&(r=i(),e.j.set(t,r),r=r.convertCodecs(t,s))}s=r+e.B.addExtraFeaturesToSourceBuffer(r),Ut(e.I);try{var u=e.i.addSourceBuffer(s)}catch(a){throw new k(2,3,3015,a,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.H&&(u.mode=wS),e.u.F(u,"error",function(){var a=e.o.get(t)[0];a.p.reject(new k(2,3,3014,e.g.error?e.g.error.code:0,a.uri))}),e.u.F(u,"updateend",function(){return js(e,t)}),e.l.set(t,u),e.D.set(t,r),e.Pa.set(t,!!n.drmInfos.length)}}function tv(e){return e.ya&&!e.M&&!e.G}function Vc(e,t,n,i){e.h||(e.h=new Wr(e.ia),e.h&&(e.h.B=e.B.modifyCueCallback));var r=e.h;i=i||e.Fa,e=e.X,"application/cea-608"==t||"application/cea-708"==t?r.i=null:(r.i=bs.get(t)(),r.i.setSequenceMode?r.i.setSequenceMode(n):be("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),r.i.setManifestType?r.i.setManifestType(e):be("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),r.C=i)}function wu(e){return!(e.G||e.i&&"ended"!=e.i.readyState)}function xu(e){return!(e.G||e.i&&"closed"!=e.i.readyState)}function rp(e,t){return e.l.size?t==Pe?e.h.g:Xm(la(e,t)):null}function aa(e,t){return e.l.size?t==Pe?e.h.h:jc(la(e,t)):null}function la(e,t){if(e.G||e.M)return null;try{return e.l.get(t).buffered}catch{return e.l.has(t),null}}function Hc(e,t,n,i,r,o,s,u,a,l,c){var d,g,v,y,T,S,A,I,_,P,b,R,j,U,B;return s=void 0!==s&&s,u=void 0!==u&&u,a=void 0!==a&&a,l=void 0!==l&&l,L(function(H){switch(H.g){case 1:if(t!=(d=cn).Ua){H.A(2);break}if("HLS"!=e.X){H.A(3);break}return x(H,e.Qa,4);case 4:e.h.u=H.h;case 3:return x(H,function fc(e,t,n,i,r){var s,u,a,l,d;return L(function(f){if(1==f.g)return x(f,Promise.resolve(),2);
1if(!e.i||!e.j)return f.return();if(null==n||null==i)return e.i.parseInit(oe(t)),f.return();for(s={periodStart:e.u,segmentStart:n,segmentEnd:i,vttOffset:e.C?n:e.u},u=e.i.parseMedia(oe(t),s,r,[]),a=m(u),l=a.next();!l.done;l=a.next())e.B(l.value,r||null,s);d=u.filter(function(g){return g.startTime>=e.l&&g.startTime<e.m}),e.j.append(d),null==e.g&&(e.g=Math.max(n,e.l)),e.h=Math.min(i,e.m),Z(f)})}(e.h,n,i?i.startTime:null,i?i.endTime:null,i?i.P()[0]:null),5);case 5:return H.return();case 2:if(l||!e.m){H.A(6);break}return x(H,Hc(e,d.ha,n,i,r,o,s,u,a,!0),7);case 7:return x(H,Hc(e,d.Ea,n,i,r,o,s,u,a,!0),8);case 8:return H.return();case 6:if(!e.l.has(t))return H.return();if(g=e.l.get(t).timestampOffset,v=e.D.get(t),e.j.has(t)&&(v=e.j.get(t).getOriginalMimeType()),i&&(y=function lS(e,t,n,i,r,o){var s=null,u=[],a=oe(n);if(so.includes(o))(t=Tu(a)).length&&i&&((n=t.find(function(g){return"com.apple.streaming.transportStreamTimestamp"===g.description}))&&"number"==typeof n.data&&(s=Math.round(n.data)/1e3),e.O.onMetadata([{cueTime:i.startTime,data:a,frames:t,dts:i.startTime,pts:i.startTime}],0,i.endTime));else if(o.includes("/mp4")&&i&&i.Z&&i.Z.timescale){var l=i.Z.timescale;if(!isNaN(l)){var c=null!=r.emsgSchemeIdUris&&r.emsgSchemeIdUris.length>0||e.B.dispatchAllEmsgBoxes,d=0,f=!1;a=new Et,c&&a.S("emsg",function(g){var v=r.emsgSchemeIdUris;if(0===g.version)var y=g.reader.Xc(),T=g.reader.Xc(),S=g.reader.U(),A=g.reader.U(),I=g.reader.U(),_=g.reader.U(),P=i.startTime+A/S;else S=g.reader.U(),A=(P=g.reader.zd()/S+i.timestampOffset)-i.startTime,I=g.reader.U(),_=g.reader.U(),y=g.reader.Xc(),T=g.reader.Xc();g=g.reader.Vb(g.reader.getLength()-g.reader.Na()),(v&&v.includes(y)||e.B.dispatchAllEmsgBoxes)&&("urn:mpeg:dash:event:2012"==y?e.O.Ek():((v=new Uint8Array(g.byteLength)).set(g),e.O.Ck({startTime:P,endTime:g=P+I/S,schemeIdUri:y,value:T,timescale:S,presentationTimeDelta:A,eventDuration:I,id:_,messageData:v}),("https://aomedia.org/emsg/ID3"==y||"https://developer.apple.com/streaming/emsg-id3"==y)&&(S=Tu(v)).length&&e.O.onMetadata([{cueTime:P,data:v,frames:S,dts:P,pts:P}],0,g)))}),a.S("prft",function(g){var v=g.reader,y=g.version;v.U(),g=1e3*(g=v.U())+v.U()/4294967296*1e3,0===y?v=v.U():(y=v.U(),v=4294967296*y+(v=v.U())),g=Jm(g),v=new re("prft",v=(new Map).set("detail",{wallClockTime:g,programStartDate:new Date(g-v/l*1e3)})),e.O.onEvent(v)}).box("moof",Oe).box("traf",Oe).S("tfdt",function(g){f||(d=bc(g.reader,g.version).baseMediaDecodeTime/l,f=!0,c||g.parser.stop())}).parse(n,!0),f&&0==i.timestampOffset&&(s=d)}}else o.includes("/mp4")||o.includes("/webm")||!ua(a)||(e.ea.has(t)||e.ea.set(t,new Bt),(u=e.ea.get(t)).clearData(),u.Hf(i.i),u.parse(a),null!=(a=u.getStartTime(t))&&(s=a),u=u.getMetadata());return{timestamp:s,metadata:u}}(e,t,n,i,r,v),S=y.metadata,null!=(T=y.timestamp)&&(null==e.V&&t==d.Ea&&(e.V=T,e.wa=i.startTime,null!=e.T&&(A=0,e.wa==e.oa&&(A=e.V-e.T),e.ma.resolve(A))),null==e.T&&t==d.ha&&(e.T=T,e.oa=i.startTime,null!=e.V&&(I=0,e.wa==e.oa&&(I=e.V-e.T),e.ma.resolve(I))),_=T,P=so,!e.H&&P.includes(e.D.get(t))&&(_=0),b=i.startTime-_,(Math.abs(g-b)>=.001||s||u)&&(!a||b>0||!g)&&(g=b,e.ab&&(jn(e,t,function(){return ca(e,t)},null),jn(e,t,function(){return da(e,t,g)},null))),(t==d.Ea||!e.l.has(d.Ea))&&e.Qa.resolve(g)),S.length)&&e.O.onMetadata(S,g,i?i.endTime:null),o&&t==d.Ea&&(e.h||Vc(e,"application/cea-608",e.H,!1),e.J||(R=v.split(";",1)[0],e.J=new wi(R)),i?(j=e.J.xf(n)).length&&function Oh(e,t,n,i,r){for(var o=n+" "+i,s=new Map,u=(t=m(t)).next();!u.done;u=t.next()){var a=u.value;u=a.stream,a=a.cue,s.has(u)||s.set(u,new Map),s.get(u).has(o)||s.get(u).set(o,[]),pu(e,a,r),a.startTime>=e.l&&a.startTime<e.m&&(s.get(u).get(o).push(a),u==e.D&&e.j.append([a]))}for(o=(r=m(s.keys())).next();!o.done;o=r.next())for(e.o.has(o=o.value)||e.o.set(o,new Map),u=(t=m(s.get(o).keys())).next();!u.done;u=t.next())u=u.value,a=s.get(o).get(u),e.o.get(o).set(u,a);e.g=null==e.g?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(i,e.m))}(e.h,j,i.startTime,i.endTime,g):e.J.init(n,u,c)),!e.j.has(t)){H.A(9);break}return x(H,e.j.get(t).transmux(n,r,i,e.i.duration,t),10);case 10:n=H.h;case 9:if(n=function gS(e,t,n,i,r){if("mp4"!=hu(e.D.get(r)))return n;var o=null===i,s=e.Pa.get(r),u=e.O.Kj(),a=!1;i&&i.Z&&(a=i.Z.encrypted),i=i?i.P()[0]:null;var l=Ne();return e.B.correctEc3Enca&&o&&"audio"===r&&(n=function Xx(e){e=oe(e);var t=null;return(new Et).box("moov",Oe).box("trak",Oe).box("mdia",Oe).box("minf",Oe).box("stbl",Oe).S("stsd",$o).box("enca",function(n){return t=n.reader.h,Cc(n)}).box("sinf",Oe).box("frma",function(n){n.parser.stop(),"ec-3"===zh(n.reader).codec&&t&&2!==t.getUint16(16)&&t.setUint16(16,2)}).parse(e),e}(n)),e.B.insertFakeEncryptionInInit&&s&&l.Bd(u,r)&&(o?n=function zx(e,t,n){function i(g){d.push({box:g,wi:1701733217})}function r(g){d.push({box:g,wi:1701733238})}function o(g){a=!0,g.parser.stop()}function s(g){c.push(g),Oe(g)}var l,u=t=oe(t),a=!1,c=[],d=[];if((new Et).box("moov",s).box("trak",s).box("mdia",s).box("minf",s).box("stbl",s).S("stsd",function(g){l=g,c.push(g),$o(g)}).S("encv",o).S("enca",o).S("dvav",r).S("dva1",r).S("dvh1",r).S("dvhe",r).S("dvc1",r).S("dvi1",r).S("hev1",r).S("hvc1",r).S("avc1",r).S("avc3",r).S("ac-3",i).S("ec-3",i).S("ac-4",i).S("Opus",i).S("fLaC",i).S("mp4a",i).parse(t),a)return t;if(0==d.length||!l)throw Ti(t),new k(2,3,3019,n);d.reverse();for(var f=(n=m(d)).next();!f.done;f=n.next())u=$x(e,u,l,(f=f.value).box,c,f.wi);
1return Ne().Gi()?((e=new Uint8Array(t.byteLength+u.byteLength)).set(u),e.set(t,u.byteLength),e):u}(t,n,i):!a&&l.Hi(r)&&(n=function Yx(e){e=oe(e);var t=[];(new Et).box("mdat",function(s){t.push(s)}).parse(e);for(var n=[],i=0;i<t.length;i++){var r=t[i-1],o=t[i];n.push(qx(e.subarray(r?r.start+r.size:0,o.start+o.size)))}return _t.apply(Nt,ee(n))}(n))),o&&l.je()&&(n=function Jx(e){function t(r){i.push({start:r.start,size:r.size}),Oe(r)}var n=oe(e),i=[];return(new Et).box("moov",t).box("trak",t).box("mdia",t).box("minf",t).box("stbl",t).box("stsd",function(r){i.push({start:r.start,size:r.size});for(var o=Ve(n,r.start),s=0;s<r.size-3;s++){var u=o.getUint32(s);1633889587==u?o.setUint32(s,1700998451):1684103987==u&&o.setUint32(s,1684366131)}}).parse(n),n}(n)),n}(e,r,n,i,t),!i||!e.H||t==d.Ua){H.A(11);break}if(!s&&!u){H.A(11);break}if(U=i.startTime,"HLS"!=e.X||e.m||t!=d.ha||!e.l.has(d.Ea)){H.A(13);break}return x(H,e.ma,14);case 14:B=H.h,Math.abs(B)>.15&&(U-=B);case 13:jn(e,t,function(){return ca(e,t)},null),jn(e,t,function(){return da(e,t,U)},null);case 11:return x(H,jn(e,t,function(){var G=n;e.N&&Ao(e.N,G,g,r),e.l.get(t).appendBuffer(G)},i?i.P()[0]:null),15);case 15:Z(H)}})}function nv(e,t){var n;return L(function(i){return 1==i.g?t==(n=cn).Ua?e.h?x(i,e.h.remove(0,1/0),0):i.return():x(i,jn(e,t,function(){return Gc(e,t,0,e.i.duration)},null),4):e.m?x(i,jn(e,n.ha,function(){return Gc(e,n.ha,0,e.i.duration)},null),0):i.A(0)})}function iv(e,t,n,i,r,o,s,u,a){var l,c;return L(function(f){return 1==f.g?t==(l=cn).Ua?(o||(e.h.u=n),function gc(e,t,n){e.l=t,e.m=n}(e.h,i,r),f.return()):(c=[],x(f,function yS(e,t,n,i,r){var o,s,u,a,l,c;return L(function(d){return 1==d.g?(o=cn,s=av(e,t,n,i,r),u=s.type,a=s.fc,l=s.qf,(c=r.get(o.ha))&&(e.m=c.isAudioMuxedInVideo),u==ap?(e.j.has(t)&&!a?(e.j.get(t).destroy(),e.j.delete(t)):!e.j.has(t)&&a?e.j.set(t,a):a&&(e.j.has(t)&&e.j.get(t).transmux!==a.transmux?(e.j.get(t).destroy(),e.j.set(t,a)):a.destroy()),d.return(!1)):u==lv?x(d,function mS(e,t,n,i){return jn(e,t,function(){if(t!==Pe){if(e.D.get(t),Hi()){e.j.has(t)&&(e.j.get(t).destroy(),e.j.delete(t)),i&&e.j.set(t,i);var r=n+e.B.addExtraFeaturesToSourceBuffer(n);e.l.get(t).changeType(r),e.D.set(t,n)}js(e,t)}},null)}(e,t,l,a),3):u!=lp?d.A(3):(a&&a.destroy(),x(d,sv(e,r),3))):d.return(!0)})}(e,t,s,u,a),2)):(f.h||(c.push(jn(e,t,function(){return ca(e,t)},null)),e.m&&c.push(jn(e,l.ha,function(){return ca(e,l.ha)},null))),o||(c.push(jn(e,t,function(){return da(e,t,n)},null)),e.m&&c.push(jn(e,l.ha,function(){return da(e,l.ha,n)},null))),(0!=i||r!=1/0)&&(c.push(jn(e,t,function(){return rv(e,t,i,r)},null)),e.m&&c.push(jn(e,l.ha,function(){return rv(e,l.ha,i,r)},null))),c.length?x(f,Promise.all(c),0):f.A(0))})}function op(e){L(function(t){return e.I.g||e.g.error||e.M||e.G||wu(e)||xu(e)?t.return():x(t,dl(e,function(){wu(e)||xu(e)||e.i.clearLiveSeekableRange()}),0)})}function Gc(e,t,n,i){i<=n?js(e,t):e.l.get(t).remove(n,i)}function ca(e,t){var n=e.l.get(t),i=n.appendWindowStart,r=n.appendWindowEnd;n.abort(),n.appendWindowStart=i,n.appendWindowEnd=r,js(e,t)}function da(e,t,n){n<0&&(n+=.001),e.l.get(t).timestampOffset=n,js(e,t)}function rv(e,t,n,i){var r=e.l.get(t);(r.appendWindowEnd!==i||r.appendWindowStart!==n)&&(r.appendWindowStart=0,r.appendWindowEnd=i,r.appendWindowStart=n),js(e,t)}function js(e,t){if(e.G||e.I.g){var n=e.o.get(t);n&&n.length&&((n=n[0])&&n.p&&n.p.resolve(),e.o.set(t,[]))}else(n=e.o.get(t)[0])&&(n.p.resolve(),sp(e,t))}function jn(e,t,n,i){return Ut(e.I),n={start:n,p:new At,uri:i},e.o.get(t).push(n),1==e.o.get(t).length&&ov(e,t),n.p}function dl(e,t){var n,i,r,o,s,u,a,l,d,f;return L(function(y){switch(y.g){case 1:for(Ut(e.I),n=[],i=Array.from(e.l.keys()),r=m(i),o=r.next(),s={};!o.done;s={ready:void 0},o=r.next())u=o.value,s.ready=new At,a={start:function(T){return function(){return T.ready.resolve()}}(s),p:s.ready,uri:null},(l=e.o.get(u)).push(a),n.push(s.ready),1==l.length&&a.start();return fe(y,2),x(y,Promise.all(n),4);case 4:Le(y,3);break;case 2:throw Te(y);case 3:return fe(y,5,6),x(y,t(),6);case 6:for(Tn(y),d=m(i),f=d.next();!f.done;f=d.next())sp(e,f.value);En(y,0);break;case 5:throw new k(2,3,3015,Te(y),e.g.error||"No error in the media element",null)}})}function sp(e,t){e.o.get(t).shift(),ov(e,t)}function ov(e,t){var n=e.o.get(t)[0];if(n)try{n.start()}catch(i){"QuotaExceededError"==i.name?n.p.reject(new k(2,3,3017,t)):tv(e)?n.p.reject(new k(2,3,3015,i,e.g.error||"No error in the media element",n.uri)):n.p.reject(new k(2,3,3024,t)),sp(e,t)}}function sv(e,t){return dl(e,function(){return function vS(e,t){var n,i,r,o,s,a,l,c,d,f,g,v,y,T,S,A,I,_,P;return L(function(b){if(1==b.g){if(e.G||e.M)return b.return();for(n=cn,e.G=!0,e.m=!1,i=e.g.currentTime,r=e.g.autoplay,e.g.paused||(e.$a=!0),e.cb&&(e.g.autoplay=!1),pn(b,2),e.u.Sa(),o=m(e.j.values()),s=o.next();!s.done;s=o.next())s.value.destroy();for(a=m(e.l.values()),l=a.next();!l.done;l=a.next()){c=l.value;try{e.i.removeSourceBuffer(c)}catch{}}return e.j.clear(),e.l.clear(),d=e.i.duration,e.L=new At,e.i=ip(e,e.L),x(b,e.L,4)}if(2!=b.g){for(!isNaN(d)&&d?e.i.duration=d:!isNaN(e.xa)&&e.xa&&(e.i.duration=e.xa),f=new At,v=t.size,y=0,T=function(){++y===v&&(f.resolve(),e.u.La(g,"addsourcebuffer",T))},e.u.F(g=e.i.sourceBuffers,"addsourcebuffer",T),S=m(t.keys()),A=S.next();!A.done;A=S.next())_=t.get(I=A.value),Fc(e,I,_,_.codecs);return(P=t.get(n.ha))&&P.isAudioMuxedInVideo&&(e.m=!0),e.m&&!e.o.has(n.ha)&&e.o.set(n.ha,[]),e.g.currentTime=i,x(b,f,2)}return Tn(b),e.G=!1,Ut(e.I),e.u.Aa(e.g,"canplaythrough",function(){e.I.g||(e.g.autoplay=r,e.$a&&(e.$a=!1,e.g.play()))}),En(b,0)})}(e,t)})}function uv(e,t,n,i){var r=!1,o=Cn("audio",(i||"").split(",")),s=Cn("video",(i||"").split(",")),u=s;"audio"==t&&(u=o),u||(u=i),i=dn(n,u);var a=Qn(e.D.get(t)),l=e.B.forceTransmux;if(!Zt(i)||!e.H&&so.includes(i)?l=!0:l||n==a||(l="WEBKIT"===Ne().Ca()&&so.includes(n)),l&&(n=Wo(e=Xo(n,u)))){var c=n();o&&s&&(r=!0),i=c.convertCodecs(t,e)}return t=Zn(Ai(i)),{fc:c,fl:r,Oh:Qn(i),codec:t,mimeType:i}}function av(e,t,n,i,r){if(t==Pe)return{type:ap,qf:n,fc:null};var o=Zn(Ai(e.D.get(t))),s=Qn(e.D.get(t)),u=uv(e,t,n,i),a=u.fc,l=u.fl,c=u.Oh,d=u.codec;u=u.mimeType;var f=!0;return l&&e.D.has("audio")&&(n=uv(e,"audio",n,i),i=Zn(Ai(e.D.get("audio"))),f=Qn(e.D.get("audio")),f=i==n.codec&&f==n.Oh,n.fc&&n.fc.destroy()),o===d&&s===c&&f?{type:ap,qf:u,fc:a}:(o=!0,(e.m&&!r.has("audio")||l&&a&&!e.j.has(t))&&(o=!1),o&&"smooth"===e.B.codecSwitchingStrategy&&Hi()?{type:lv,qf:u,fc:a}:(a&&a.destroy(),{type:lp,qf:u,fc:null}))}(h=ev.prototype).destroy=function(){return this.I.destroy()},h.init=function(e,t,n,i){t=void 0!==t&&t,n=void 0===n?"UNKNOWN":n,i=void 0!==i&&i;var o,s,u,a,l,c,r=this;return L(function(d){if(1==d.g)return o=cn,x(d,r.L,2);
1if(3!=d.g)return wu(r)||xu(r)?(Rn("Expected MediaSource to be open during init(); reopening the media source."),r.L=new At,r.i=ip(r,r.L),x(d,r.L,3)):d.A(3);for(r.H=t,r.X=n,r.bb=i,r.ab=!r.H&&"HLS"==r.X&&!r.bb,r.ea.clear(),r.V=null,r.wa=null,r.T=null,r.oa=null,r.ma=new At,s=m(e.keys()),u=s.next();!u.done;u=s.next())l=e.get(a=u.value),Fc(r,a,l,l.codecs),r.m?(r.o.set(o.ha,[]),r.o.set(o.Ea,[])):r.o.set(a,[]);(c=e.get(o.ha))&&c.isAudioMuxedInVideo&&(r.m=!0),Z(d)})},h.configure=function(e){this.B=e,this.h&&(this.h.B=e.modifyCueCallback)},h.Wb=function(){var e={total:this.G?[]:Zo(this.g.buffered),audio:Zo(la(this,"audio")),video:Zo(la(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},h.remove=function(e,t,n,i){var o,r=this;return L(function(s){return 1==s.g?(e==(o=cn).Ea&&r.J&&r.J.remove(i),e==o.Ua?x(s,r.h.remove(t,n),0):n>t?x(s,jn(r,e,function(){return Gc(r,e,t,n)},null),5):s.A(0)):r.m?x(s,jn(r,o.ha,function(){return Gc(r,o.ha,t,n)},null),0):s.A(0)})},h.flush=function(e){var n,t=this;return L(function(i){return 1==i.g?e==(n=cn).Ua?i.return():x(i,jn(t,e,function(){t.g.currentTime-=.001,js(t,e)},null),2):t.m?x(i,jn(t,n.ha,function(){var r=n.ha;t.g.currentTime-=.001,js(t,r)},null),0):i.A(0)})},h.endOfStream=function(e){var t=this;return L(function(n){return x(n,dl(t,function(){wu(t)||xu(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},h.qb=function(e){var t=this;return L(function(n){return x(n,dl(t,function(){if(t.B.durationReductionEmitsUpdateEnd&&e<t.i.duration)for(var i=m(t.l.keys()),r=i.next();!r.done;r=i.next()){r=r.value;var o={start:function(){},p:new At,uri:null};t.o.get(r).unshift(o)}t.i.duration=e,t.xa=e}),0)})},h.getDuration=function(){return this.i.duration};var up=X.URL.createObjectURL,wS="sequence",ap="none",lp="reset",lv="changeType";function _e(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=void 0===n||n,this.H=0,this.o=!1,this.m=e}function cp(e,t,n,i){var r=this;this.u=i,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=function SS(e){if(!e.h.stallEnabled)return null;var t=e.h.stallThreshold,n=e.h.stallSkip;return new cv(new dv(e.g),t,function(){return L(function(r){if(1==r.g)return Zo(e.g.buffered).length?n?(e.g.currentTime+=n,r.A(2)):x(r,e.g.play(),3):r.return();if(2!=r.g){if(!e.g)return r.return();e.g.pause(),e.g.play()}e.H++,e.u(new re("stalldetected")),Z(r)})})}(this),this.B=!1,this.j.F(e,"waiting",function(){return hl(r)}),this.i=new E(function(){hl(r)}).Ha(this.h.gapJumpTimerTime)}function hl(e){if(0!=e.g.readyState){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)){var n=(t=e.o).h,i=hv(n),r=n.g.currentTime,o=Date.now()/1e3;(t.g!=r||t.m!=i)&&(t.l=o,t.g=r,t.m=i,t.i=!1),(i=(r=o-t.l)>=t.o&&i&&!t.i)&&(t.j&&t.j(t.g,r),t.i=!0,t.g=n.g.currentTime),t=!i}t&&(i=function Zx(e,t,n){return e&&e.length&&!ll(e)&&(e=Zo(e).findIndex(function(i,r,o){return i.start>t&&(0==r||o[r-1].end-t<=n)}))>=0?e:null}(n=e.g.buffered,t=e.g.currentTime,e.h.gapDetectionThreshold),null==i||0==i&&!e.B||(r=n.start(i),(o=e.h.gapPadding)&&(r=Math.ceil(100*(r+o))/100),r>=e.D.Hb()||r-t<.001||(0!=i&&n.end(i-1),function xS(e,t){e.C=!0,e.j.Aa(e.g,"seeked",function(){e.C=!1}),e.g.currentTime=t}(e,r),t==e.l&&(e.l=r),e.G++,e.u(new re("gapjumped")))))}}}function cv(e,t,n){this.h=e,this.m=hv(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.i=!1,this.o=t,this.j=n}function dv(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 hv(e){if(e.g.paused||0==e.g.playbackRate||e.i||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime;for(var n=(e=m(Zo(e.g.buffered))).next();!n.done;n=e.next())if(!(t<(n=n.value).start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function ha(e,t,n,i){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>
1=t?i():(t=AS.value().get(t),n.Aa(e,t,i))}(h=_e.prototype).getDuration=function(){return this.l},h.Nj=function(){return this.h},h.Ri=function(e){this.i=e},h.qb=function(e){this.l=e},h.Tj=function(){return this.i},h.Qi=function(e){this.B=e},h.bd=function(e){e&&!this.C&&(this.J=!0),this.C=e},h.If=function(e){this.u=e},h.Ye=function(){return this.u},h.oh=function(e){this.D=e},h.Ej=function(){return this.D},h.Ai=function(e,t){if(0!=e.length){var n=(Date.now()+this.B)/1e3;if(0!=(e=e.filter(function(r){return r.start+t<n})).length){var i=e[e.length-1].end+t;this.rf(e[0].start+t),this.h=e.reduce(function(r,o){return Math.max(r,o.end-o.start)},this.h),this.g=Math.max(this.g,i),null!=this.i&&this.G&&!this.o&&(this.i=n-this.g-this.h)}}},h.ee=function(e){if(0!=e.length){for(var t=e[0].startTime,n=e[0].endTime,i=(Date.now()+this.B)/1e3,r=(e=m(e)).next();!r.done;r=e.next())i<(r=r.value).startTime||(t=Math.min(t,r.startTime),n=Math.max(n,r.endTime),this.h=Math.max(this.h,r.endTime-r.startTime));this.rf(t),this.g=Math.max(this.g,n),null!=this.i&&this.G&&!this.o&&(this.i=i-this.g-this.h)}},h.zi=function(e,t){this.rf(e),t==1/0||this.W()||(this.g=Math.max(this.g,t))},h.Oj=function(){return this.g},h.kf=function(){this.o=!0},h.qk=function(){return this.o},h.ph=function(e){this.m=e},h.Jj=function(){return this.m},h.rf=function(e){null==this.j?this.j=e:this.J||(this.j=Math.min(this.j,e))},h.Tg=function(e){this.h=Math.max(this.h,e)},h.offset=function(e){null!=this.j&&(this.j+=e),null!=this.g&&(this.g+=e)},h.W=function(){return this.l==1/0&&!this.C},h.Vc=function(){return this.l!=1/0&&!this.C},h.Ib=function(){return Math.max(this.I,this.Ec()-this.u)},h.Ti=function(e){this.I=e},h.Ec=function(){return this.W()||this.Vc()?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},h.Ud=function(e){var t=Math.max(this.j,this.I);return this.u==1/0?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.Ec()-this.u+e,this.Hb()))},h.Yb=function(){return this.Ud(0)},h.Hb=function(){return Math.max(0,this.Ec()-(this.W()||this.Vc()?this.D:0))},h.ej=function(){return!(null==this.i||null!=this.g&&this.G)},h.Pi=function(e){this.H=e},h.zj=function(){return this.H},ue("shaka.media.PresentationTimeline",_e),_e.prototype.getAvailabilityTimeOffset=_e.prototype.zj,_e.prototype.setAvailabilityTimeOffset=_e.prototype.Pi,_e.prototype.usingPresentationStartTime=_e.prototype.ej,_e.prototype.getSeekRangeEnd=_e.prototype.Hb,_e.prototype.getSeekRangeStart=_e.prototype.Yb,_e.prototype.getSafeSeekRangeStart=_e.prototype.Ud,_e.prototype.getSegmentAvailabilityEnd=_e.prototype.Ec,_e.prototype.setUserSeekStart=_e.prototype.Ti,_e.prototype.getSegmentAvailabilityStart=_e.prototype.Ib,_e.prototype.isInProgress=_e.prototype.Vc,_e.prototype.isLive=_e.prototype.W,_e.prototype.offset=_e.prototype.offset,_e.prototype.notifyMaxSegmentDuration=_e.prototype.Tg,_e.prototype.notifyMinSegmentStartTime=_e.prototype.rf,_e.prototype.getInitialProgramDateTime=_e.prototype.Jj,_e.prototype.setInitialProgramDateTime=_e.prototype.ph,_e.prototype.isStartTimeLocked=_e.prototype.qk,_e.prototype.lockStartTime=_e.prototype.kf,_e.prototype.getMaxSegmentEndTime=_e.prototype.Oj,_e.prototype.notifyPeriodDuration=_e.prototype.zi,_e.prototype.notifySegments=_e.prototype.ee,_e.prototype.notifyTimeRange=_e.prototype.Ai,_e.prototype.getDelay=_e.prototype.Ej,_e.prototype.setDelay=_e.prototype.oh,_e.prototype.getSegmentAvailabilityDuration=_e.prototype.Ye,_e.prototype.setSegmentAvailabilityDuration=_e.prototype.If,_e.prototype.setStatic=_e.prototype.bd,_e.prototype.setClockOffset=_e.prototype.Qi,_e.prototype.getPresentationStartTime=_e.prototype.Tj,_e.prototype.setDuration=_e.prototype.qb,_e.prototype.setPresentationStartTime=_e.prototype.Ri,_e.prototype.getMaxSegmentDuration=_e.prototype.Nj,_e.prototype.getDuration=_e.prototype.getDuration,cp.prototype.release=function(){this.j&&(this.j.release(),this.j=null),null!=this.i&&(this.i.stop(),this.i=null),this.o&&(this.o.release(),this.o=null),this.g=this.D=this.u=null},cp.prototype.vf=function(){this.B=!0,this.i&&this.i.Ha(this.h.gapJumpTimerTime),hl(this)},cv.prototype.release=function(){this.h&&this.h.release(),this.j=this.h=null},dv.prototype.release=function(){this.h&&this.h.release(),this.h=null};var AS=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 pv(e,t,n,i){var r=this;this.g=e,this.m=t,this.u=n,this.l=null,this.j=function(){return null==r.l&&(r.l=i()),r.l},this.o=!1,this.h=new et,this.i=new vv(e),ha(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){gv
1(r,r.j())})}function dp(e){return e.o?e.g.currentTime:e.j()}function fv(e,t){e.g.readyState>0?yv(e.i,t):ha(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){gv(e,e.j())})}function gv(e,t){Math.abs(e.g.currentTime-t)<.001?mv(e):(e.h.Aa(e.g,"seeking",function(){mv(e)}),yv(e.i,e.g.currentTime&&0!=e.g.currentTime?e.g.currentTime:t))}function mv(e){e.o=!0,e.h.F(e.g,"seeking",function(){return e.m()}),e.u(e.g.currentTime)}function vv(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new E(function(){t.i<=0||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}function yv(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.Ha(.1)}function Tv(e){this.g=e,this.i=!1,this.h=null,this.j=new et}function wv(e){return e.g.getStartDate&&(e=e.g.getStartDate().getTime(),!isNaN(e))?e/1e3:null}function xv(e,t){return(e=e.g.seekable).length>0&&(t=Math.max(e.start(0),t),t=Math.min(e.end(e.length-1),t)),t}function Sv(e,t,n,i,r,o){var s=this;this.h=e,this.g=t.presentationTimeline,this.l=n,this.u=r,this.o=null,this.i=new cp(e,t.presentationTimeline,n,o),this.j=new pv(e,function(){e:{var u=s.i;u.m=!0,u.B=!1,u.i&&u.i.Ha(u.h.gapJumpTimerTime),hl(u);var a=dp(s.j);if(u=Iv(s,a),!Ts()&&Math.abs(u-a)>.001){a=!1;var l=Ne().Mi();if(l){var c=Date.now()/1e3;(!s.o||s.o<c-l)&&(s.o=c,a=!0)}else a=!0;if(a){fv(s.j,u),u=void 0;break e}}s.u(),u=void 0}return u},function(u){var a=s.i;a.g.seeking&&!a.m&&(a.m=!0,a.l=u),a.i&&a.i.Ha(a.h.gapJumpTimerTime),hl(a)},function(){return Av(s,i)}),this.m=new E(function(){if(0!=s.h.readyState&&!s.h.paused){var u=dp(s.j),a=s.g.Yb(),l=s.g.Hb();l-a<3&&(a=l-3),u<a&&(u=Iv(s,u),s.h.currentTime=u)}})}function Av(e,t){return null==t?t=e.g.getDuration()<1/0?e.g.Yb():e.g.Hb():t instanceof Date?t=t.getTime()/1e3-(e.g.m||e.g.i):t<0&&(t=e.g.Hb()+t),Ev(e,Cv(e,t))}function Ev(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function Iv(e,t){var n=e.l.rebufferingGoal,i=e.l.safeSeekOffset,r=e.g.Yb(),o=e.g.Hb(),s=e.g.getDuration();o-r<3&&(r=o-3);var u=e.g.Ud(n),a=e.g.Ud(i);return n=e.g.Ud(n+i),t>=s?Ev(e,t):t>o?o-e.l.safeSeekEndOffset:t<r?e.g.W()&&e.l.returnToEndOfLiveWindowWhenOutside?o-e.l.safeSeekEndOffset:Yh(e.h.buffered,a)?a:n:t>=u||Yh(e.h.buffered,t)?t:n}function Cv(e,t){var n=e.g.Yb();return t<n?n:t>(e=e.g.Hb())?e:t}function ut(e){this.g=e,this.m=null,this.i=0,this.o=!1}function fo(e){return e.g[0]||null}function Kc(e,t,n){return new ut([e=new Ee(e,e+t,function(){return n},0,null,null,e,e,e+t)])}function Sr(e,t,n,i){this.i=e,this.h=t,this.g=n,this.reverse=i}function rn(){ut.call(this,[]),this.h=[]}function pl(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Xe(),this.h=new E(function(){t.g.ui(.25*t.i)})}function hp(e){e.h.stop();var t=e.j?0:e.i;if(t>=0)try{return void(e.g.Xe()!=t&&e.g.qh(t))}catch{}e.h.Ha(.25),0!=e.g.Xe()&&e.g.qh(0)}function pp(e){var t=this;this.j=e,this.h=new et,this.g=new Set,this.i=new E(function(){Mv(t,!1)}).Lb(),e.paused||this.i.Ha(.25),this.h.F(e,"playing",function(){t.i.Lb().Ha(.25)}),this.h.F(e,"pause",function(){t.i.stop()})}function Mv(e,t){for(var n=e.j.currentTime,i=(e=m(e.g)).next();!i.done;i=e.next())i.value.j(n,t)}function Wc(e){vt.call(this),this.g=new Map,this.h=e}function kv(e,t,n){return!!((e=e.h()[n])&&e.length>0&&(n=e[e.length-1].end,t>=e[0].start&&t<n))}function Xc(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"video"==e.type&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),"audio"==e.type&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function fl(e){vt.call(this),this.h=new Map,this.i=e,this.g=null}function fp(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 re("regionadd",new Map([["region",t]])),e.dispatchEvent(t),function _S(e){e.g||(e.g=new E(function(){for(var t=e.i(),n=m(e.h),i=n.next();!i.done;i=n.next()){var r=m(i.value);i=r.next().value,(r=r.next().value).endTime<t.start&&(e.h.delete(i),i=new re("regionremove",new Map([["region",r]])),e.dispatchEvent(i))}!e.h.size&&e.g&&(e.g.stop(),e.g=null)}).Ha(2))}(e))}function zc(e,t,n,i){this.m=e,this.i=t,this.l=n,this.h=new Map,this.j=new Map,this.g=null,this.o=i}function DS(e,t){e.l=t;
1for(var n=(e=m(e.h.values())).next();!n.done;n=e.next())n.value.g=t}function gl(e,t,n){if(n=void 0!==n&&n,!e.i.segmentIndex||(e.g||(e.g=e.i.segmentIndex.Xb(t,!0,e.o)),!e.g))return Promise.resolve();for(n&&e.g.next(),t=[];e.h.size<e.m&&(n=e.g.next().value);){var i=!0;n.isPreload()&&null!=n.endByte&&(i=!1),2==n.Gc()&&(i=!1),n.Zb(!1)&&(i=!1),i&&n.Z&&t.push(_v(e,n.Z)),i&&!e.h.has(n)&&(i=new mp(e.l),t.push(Pv(i,n,e.i)),e.h.set(n,i))}return gp(e),Promise.all(t)}function _v(e,t){if(!e.i.segmentIndex||t.Zb()||Array.from(e.j.keys()).some(function(r){return al(r,t)}))return Promise.resolve();var n=new mp(e.l),i=Pv(n,t,e.i);return e.j.set(t,n),i}function Dv(e,t){for(var n=(t=m(t.keys())).next();!n.done;n=t.next())(n=n.value)&&ml(e,n)}function go(e){Dv(e,e.h),Dv(e,e.j),e.g=null}function gp(e){for(var t=Array.from(e.h.keys()),n=m(e.j.keys()),i=n.next(),r={};!i.done;r={Ng:void 0},i=n.next())r.Ng=i.value,t.some(function(o){return function(s){return al(s.Z,o.Ng)}}(r))||ml(e,r.Ng)}function Lv(e,t){e.m=t;for(var n=Array.from(e.h.keys());n.length>t;){var i=n.pop();i&&ml(e,i)}gp(e)}function ml(e,t){var n=e.h;t instanceof bi&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function mp(e){this.g=e,this.fe=this.xh=null}function Pv(e,t,n){var i=new Uint8Array(0);return e.fe=e.g(t,n,function(r){return L(function(o){if(1==o.g)return i=i.byteLength>0?_t(i,r):r,e.xh?x(o,e.xh(i),3):o.A(0);i=new Uint8Array(0),Z(o)})}),e.fe.promise.catch(function(r){return r instanceof k&&7001==r.code?Promise.resolve():Promise.reject(r)})}function vp(e){var t=Qn(e);return{type:t.split("/")[0],mimeType:t,codecs:e=Ai(e),language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,qe:null,colorGamut:null,frameRate:null}}function yp(e){for(var t=new Set,n=[],i=(e=m(e)).next();!i.done;i=e.next()){var r=Xi(i=i.value);t.has(r)||(n.push(i),t.add(r))}return t=jo("audio",n),i=jo("video",n),e=jo(Pe,n),i=function bS(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?Zt('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(n){return n!=t}):e}(i),t=t.concat(i).concat(e),n.length&&!t.length?n:t}function Tp(e,t,n){var i,r,o,s;return L(function(a){if(1==a.g)return(i=t).cryptoKey?a.A(2):x(a,i.fetchKey(),3);if(!(r=i.iv))for(r=oe(new ArrayBuffer(16)),o=i.firstMediaSequenceNumber+n,s=r.byteLength-1;s>=0;s--)r[s]=255&o,o>>=8;return a.return(X.crypto.subtle.decrypt("CBC"==t.blockCipherMode?{name:"AES-CBC",iv:r}:{name:"AES-CTR",counter:r,length:64},i.cryptoKey,e))})}function vl(e,t,n,i,r){return e=_n(e,i,r),(0!=t||null!=n)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function bv(e,t){var n=this;this.g=t,this.j=e,this.i=null,this.L=new Map,this.D=1,this.B=this.o=null,this.R=0,this.h=new Map,this.J=!1,this.T=null,this.C=!1,this.l=new Ju(function(){return function NS(e){var t,n,i,r,o,s;return L(function(a){if(1==a.g){for(e.u&&e.u.stop(),e.u=null,e.I&&e.I.stop(),e.I=null,t=[],n=m(e.h.values()),i=n.next();!i.done;i=n.next())es(r=i.value),t.push(fa(r)),r.aa&&(go(r.aa),r.aa=null);for(o=m(e.m.values()),s=o.next();!s.done;s=o.next())go(s.value);return x(a,Promise.all(t),2)}e.h.clear(),e.m.clear(),e.g=null,e.j=null,e.i=null,e.H=null,Z(a)})}(n)}),this.N=Date.now()/1e3,this.m=new Map,this.O={projection:null,hfov:null},this.X=0,this.V=1/0,this.G=null,this.M=[],this.u=new E(function(){if(n.j&&n.g)if(n.j.presentationTimeline.W()){var i=n.j.presentationTimeline.Yb(),r=n.j.presentationTimeline.Hb();r-i>1?function pS(e,t,n){L(function(i){return e.I.g||e.g.error||e.M||e.G||wu(e)||xu(e)?i.return():x(i,dl(e,function(){wu(e)||xu(e)||e.i.setLiveSeekableRange(t,n)}),0)})}(n.g.$,i,r):op(n.g.$)}else op(n.g.$),n.u&&n.u.stop();else n.u&&n.u.stop()}),this.H=null,this.I=new E(function(){var i=n.g.video;!i.ended&&n.H&&(i.currentTime=n.H,n.H=null)})}function Rv(e,t){for(var n=e.g.wb()<0,i=m(e.h.values()),r=i.next();!r.done;r=i.next())(r=r.value).ua&&r.ua.Fd(n),r.aa&&r.aa.Fd(n);for(r=(i=m(e.m.values())).next();!r.done;r=i.next())r.value.Fd(n);(n=e.h.get("video"))&&(i=n.stream)&&(t?(t=i.trickModeVideo)&&!n.Jc&&(pa(e,t,!1,0,!1),n.Jc=i):(t=n.Jc)&&(n.Jc=null,pa(e,t,!0,0,!1)))}function Nv(e,t,n,i,r,o){n=void 0!==n&&n,i=void 0===i?0:i,r=void 0!==r&&r,o=void 0!==o&&o,e.o=t,e.J&&(t.video&&pa(e,t.video,n,i,r,o),t.audio&&pa(e,t.audio,n,i,r,o))}function Yc(e,t){L(function(n){if(1==n.g)return e.G=null,e.B=t,e.J?t.segmentIndex?n.A(2):x(n,t.createSegmentIndex(),2):n.return();pa(e,t,!0,0,!1),Z(n)})}function pa(e,t,n,i,r,o){var s=e.h.get(t.type);s||t.type!=Pe?s&&(s.Jc&&(t.trickModeVideo?(s.Jc=t,t=t.trickModeVideo):s.Jc=null),s.stream!=t||r)&&(e.m.has(t)?s.aa=e.m.get(t):s.aa&&function LS(e,t){t&&t!==e.i&&(go(e),e.i=t)}(s.aa,t),t.type==Pe&&s.stream!=t&&(r=dn(t.mimeType,t.codecs),Vc(e.g.$,r,e.j.sequenceMode,t.external)),!e.m.has(s.stream)&&s.stream.closeSegmentIndex&&(s.Ra?e.L.has(r="("+s.type+":"+s.stream.id+")")||e.L.set(r,s.stream.closeSegmentIndex):s.stream.closeSegmentIndex()),r=s.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,s.stream=t,s.ua=null,s.dg=!!o,s.
1Cc=t.dependencyStream?qc(e,t.dependencyStream):null,r&&(s.ob=null,s.nc=null,s.mc=null,t.isAudioMuxedInVideo&&(t=null,"video"===s.type?t=e.h.get("audio"):"audio"===s.type&&(t=e.h.get("video")),t&&(fa(t).catch(function(){}),t.ob=null,t.nc=null,t.mc=null,yl(e,t),Ov(e,t).catch(function(u){e.g&&e.g.onError(u)})))),n?s.Oc?s.Uf=!0:s.Ra?(s.Mc=!0,s.Qe=i,s.Uf=!0):(es(s),Ep(e,s,!0,i).catch(function(u){e.g&&e.g.onError(u)})):s.Ra||s.Bb||Ii(e,s,0),Ov(e,s).catch(function(u){e.g&&e.g.onError(u)})):function jS(e,t){var n,i,r,o,a;L(function(l){switch(l.g){case 1:return n=cn,e.R++,i=e.R,fe(l,2),x(l,nv(e.g.$,n.Ua),4);case 4:Le(l,3);break;case 2:r=Te(l),e.g&&e.g.onError(r);case 3:o=dn(t.mimeType,t.codecs),Vc(e.g.$,o,e.j.sequenceMode,t.external),(e.g.$.ia.isTextVisible()||e.i.alwaysStreamText)&&e.R==i&&(a=qc(e,t),e.h.set(n.Ua,a),Ii(e,a,0)),Z(l)}})}(e,t)}function Ov(e,t){var n,i,r;return L(function(o){if(1==o.g)return t.Jb?(i=t.Jb,(n=t.stream).segmentIndex?o.A(2):x(o,n.createSegmentIndex(),2)):o.return();if(4!=o.g)return!(r=n.dependencyStream)||r.segmentIndex?o.A(4):x(o,r.createSegmentIndex(),4);if(t.Jb!=i||t.stream!=n)return o.return();var s=e.g.Tc(),u=aa(e.g.$,t.type),a=t.stream.segmentIndex.find(t.Ka?t.Ka.endTime:s),l=null==a?null:t.stream.segmentIndex.get(a);a=l&&l.endByte?l.endByte-l.startByte:null,l&&!a&&(a=(l.endTime-l.getStartTime())*(t.stream.bandwidth||0)/8),a?((l=l.Z)&&(a+=(l.endByte?l.endByte-l.startByte:null)||0),s=8*a/(l=e.g.getBandwidthEstimate())<(u||0)-s-e.i.rebufferingGoal||t.Jb.h.g>a):s=!1,s&&t.Jb.abort(),Z(o)})}function yl(e,t){t.Oc||t.Mc||(t.Ra?(t.Mc=!0,t.Qe=0):null==rp(e.g.$,t.type)?null==t.Bb&&Ii(e,t,0):(es(t),Ep(e,t,!1,0).catch(function(n){e.g&&e.g.onError(n)})))}function qc(e,t){var n={stream:t,type:t.type,ua:null,aa:wp(e,t),Ka:null,ob:null,jf:null,nc:null,mc:null,gf:null,hf:null,Jc:null,endOfStream:!1,Ra:!1,Bb:null,Mc:!1,Qe:0,Uf:!1,Oc:!1,$c:!0,dg:!1,bh:!1,Wd:!1,Jb:null,Cc:null};return t.dependencyStream&&(n.Cc=qc(e,t.dependencyStream)),n}function wp(e,t){if("video"===t.type&&e.i.disableVideoPrefetch||"audio"===t.type&&e.i.disableAudioPrefetch||t.type===Pe&&("application/cea-608"==t.mimeType||"application/cea-708"==t.mimeType)||t.type===Pe&&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.aa)&&t===n.i?n:e.i.segmentPrefetchLimit>0?new zc(e.i.segmentPrefetchLimit,t,function(i,r,o){return $c(i,r,o||null,e.i.retryParameters,e.g.sc)},e.g.wb()<0):null}function GS(e,t){var n,i,r,o,s,u,l,c;return L(function(d){switch(d.g){case 1:if(Ut(e.l),n=cn,t.Ra||null==t.Bb||t.Oc)return d.return();if(t.Bb=null,!t.Mc){d.A(2);break}return x(d,Ep(e,t,t.Uf,t.Qe),3);case 3:return d.return();case 2:if(function FS(e,t){for(var n=m(e.L.entries()),i=n.next();!i.done;i=n.next()){var r=m(i.value);i=r.next().value,r=r.next().value,i.includes(t.type)&&(r(),e.L.delete(i))}}(e,t),t.stream.segmentIndex){d.A(4);break}return i=t.stream,fe(d,5),x(d,t.stream.createSegmentIndex(),7);case 7:Le(d,6);break;case 5:return r=Te(d),x(d,Ip(e,t,r),8);case 8:return d.return();case 6:if(i!=t.stream)return i.closeSegmentIndex&&i.closeSegmentIndex(),t.Ra||t.Bb||Ii(e,t,0),d.return();case 4:if(!t.Cc){d.A(9);break}if(t.Cc.stream.segmentIndex){d.A(9);break}return fe(d,11),x(d,t.Cc.stream.createSegmentIndex(),13);case 13:Le(d,9);break;case 11:Te(d);case 9:fe(d,14),o=function KS(e,t){if(Ap(t))return function cS(e,t){var n=aa(e,"video")||0;Ps(e.h,t,n)}(e.g.$,t.stream.originalId||""),null;if(t.type==Pe&&function dS(e){e.h&&Ps(e.h,"",0)}(e.g.$),t.stream.isAudioMuxedInVideo&&"audio"==t.type)return null;if(t.type!=Pe&&xu(e.g.$))return Jc(e,!0),null;var n=e.i.updateIntervalSeconds/Math.max(1,Math.abs(e.g.wb()));if(!tv(e.g.$)&&t.type!=Pe)return n/2;var i=e.g.Tc();if("audio"===t.type)for(var r=m(e.m.keys()),o=r.next();!o.done;o=r.next())(o=e.m.get(o.value)).Xa(i,!0),gl(o,i);r=t.Ka?t.Ka.endTime:i;var s=function aS(e,t,n){return t==Pe?null==(e=e.h).h||e.h<n?0:e.h-Math.max(n,e.g):zm(e=la(e,t),n)}(e.g.$,t.type,i);o=Math.max(1,Math.max(e.i.rebufferingGoal,e.i.bufferingGoal)*e.D);var u=e.j.presentationTimeline.getDuration()-r,a=aa(e.g.$,t.type);if(u<1e-6&&a)return t.endOfStream=!0,"video"==t.type&&(e=e.h.get(Pe))&&Ap(e)&&(e.endOfStream=!0),null;if(t.endOfStream=!1,s>=o)return n/2;if(u=!t.ua,!(a=function WS(e,t,n,i){if(t.ua)return(n=t.ua.current())&&t.Ka&&Math.abs(t.K
1a.startTime-n.startTime)<.001&&(n=t.ua.next().value),n;if(t.Ka||i)return n=t.Ka?t.Ka.endTime:i,e=e.g.wb()<0,t.stream.segmentIndex&&(t.ua=t.stream.segmentIndex.Xb(n,!1,e)),t.ua&&t.ua.next().value;i=e.j.sequenceMode||Zc(e)?0:e.i.inaccurateManifestTolerance;var r=Math.max(n-i,0);e=e.g.wb()<0;var o=null;return i&&(t.stream.segmentIndex&&(t.ua=t.stream.segmentIndex.Xb(r,!1,e)),o=t.ua&&t.ua.next().value),o||(t.stream.segmentIndex&&(t.ua=t.stream.segmentIndex.Xb(n,!1,e)),o=t.ua&&t.ua.next().value),o}(e,t,i,a)))return n;var l=a.Z;(s=t.ob)&&l&&al(l,s)&&(s.g=l.g),s=!1,u&&t.dg&&(s=!0,t.dg=!1),u=1/0;for(var c=(l=m(l=Array.from(e.h.values()))).next();!c.done;c=l.next())Ap(c=c.value)||c.ua&&!c.ua.current()||(u=Math.min(u,c.Ka?c.Ka.endTime:i));return r>=u+e.j.presentationTimeline.h?n:(t.aa&&t.ua&&!e.m.has(t.stream)&&(t.aa.Xa(a.startTime+.001),gl(t.aa,a.startTime).catch(function(){})),Zc(e)&&function $S(e,t,n){if(t.type===Pe)return!1;var i=t.ob;if(!i)return!1;var r=n.Z;if(n=i.g!==r.g,"reset_to_encrypted"===e.i.crossBoundaryStrategy&&(i.encrypted||r.encrypted||(n=!1),i.encrypted&&(e.i.crossBoundaryStrategy="keep")),"RESET_ON_ENCRYPTION_CHANGE"===e.i.crossBoundaryStrategy&&i.encrypted==r.encrypted&&(n=!1),n&&t.$c){var o=e.g.video,s=o.paused;Jc(e,!0).then(function(){var u=(new Map).set("oldEncrypted",i.encrypted).set("newEncrypted",r.encrypted);e.g.onEvent(new re("boundarycrossed",u)),s||o.play()})}return n}(e,t,a)||(function XS(e,t,n,i,r){var o,s,u,a,l,f,g,v,y,T,S,A,I,P,b;return L(function(M){switch(M.g){case 1:if(o=cn,s=t.stream,u=t.ua,t.Ra=!0,fe(M,2),2==i.Gc())throw new k(1,1,1011);return x(M,function YS(e,t,n,i){var r,o,s,u,a,l,c,d,f,g,v,y,T,S,A;return L(function(_){switch(_.g){case 1:if(r=cn,o=null==t.Ka,s=[],u=Math.max(0,Math.max(n.appendWindowStart,e.X)-.1),a=Math.min(n.appendWindowEnd,e.V)+.1,c=Xi(l=n.codecs||t.stream.codecs),d=Qn(n.mimeType||t.stream.mimeType),(f=n.timestampOffset)==t.jf&&u==t.nc&&a==t.mc&&c==t.gf&&d==t.hf){_.A(2);break}if(g=t.gf&&t.hf&&function TS(e,t,n,i,r){return(e=av(e,t,n,i,r)).fc&&e.fc.destroy(),e.type==lp}(e.g.$,t.type,d,l,Qc(e)),!g){_.A(3);break}if(v=null,t.type===r.Ea?v=e.h.get(r.ha):t.type===r.ha&&(v=e.h.get(r.Ea)),!v){_.A(3);break}return x(_,fa(v).catch(function(){}),5);case 5:v.ob=null,v.nc=null,v.mc=null,yl(e,v);case 3:return x(_,Uv(e,t,f,u,a,n,c,d),2);case 2:return al(n.Z,t.ob)||(t.ob=n.Z,n.l&&n.Z&&(y=Tl(e,t,n.Z),T=function(){var P,b,M,D,R,j,U,B,H;return L(function(G){switch(G.g){case 1:return fe(G,2),x(G,y,4);case 4:return P=G.h,Ut(e.l),b=null,M=new Map,D={projection:null,hfov:null},(R=new Et).box("moov",Oe).box("trak",Oe).box("mdia",Oe).S("mdhd",function(K){b=Rc(K.reader,K.version).timescale}).box("hdlr",function(K){switch((K=K.reader).skip(8),K.Xc()){case"soun":M.set(r.ha,b);break;case"vide":M.set(r.Ea,b)}b=null}),t.type===r.Ea&&R.box("minf",Oe).box("stbl",Oe).S("stsd",$o).box("encv",zi).box("avc1",zi).box("avc3",zi).box("hev1",zi).box("hvc1",zi).box("dvav",zi).box("dva1",zi).box("dvh1",zi).box("dvhe",zi).box("dvc1",zi).box("dvi1",zi).box("vexu",Oe).box("proj",Oe).S("prji",function(K){K=K.reader.Xc(),D.projection=K}).box("hfov",function(K){K=K.reader.U()/1e3,D.hfov=K}),R.parse(P,!0,!0),t.type===r.Ea&&function qS(e,t){if(e.O.projection!=t.projection||e.O.hfov!=t.hfov){if(null!=t.projection||null!=t.hfov){var n=(new Map).set("detail",t);n=new re("spatialvideoinfo",n)}else n=new re("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.O=t}}(e,D),M.has(t.type)?n.Z.timescale=M.get(t.type):null!=b&&(n.Z.timescale=b),(j=t.stream.segmentIndex)instanceof rn&&(U=function IS(e,t){for(var n=(e=m(e.h)).next();!n.done;n=e.next())if(null!=(n=n.value).find(t))return n.Re();return-1}(j,n.startTime)),B=t.stream.closedCaptions&&t.stream.closedCaptions.size>0,x(G,e.g.Ph(t.type,P),5);case 5:return x(G,Hc(e.g.$,t.type,P,null,t.stream,B,t.$c,i,!1,!1,U),6);case 6:Le(G,0);break;case 2:throw H=Te(G),t.ob=null,H}})},S=n.startTime,o&&null!=(A=aa(e.g.$,t.type))&&(S=A),e.g.Dk(S,n.Z),s.push(T()))),n.i!=(t.Ka?t.Ka.i:-1)&&s.push(function hS(e,t,n){var i,r;return L(function(o){return 1==o.g?t==(i=cn).Ua||(t==i.Ea&&(e.Qa=new At),!e.H||(r=aa(e,t))&&Math.abs(r-n)<.
115)?o.return():(jn(e,t,function(){return ca(e,t)},null),e.m&&jn(e,i.ha,function(){return ca(e,i.ha)},null),x(o,jn(e,t,function(){return da(e,t,n)},null),2)):e.m?x(o,jn(e,i.ha,function(){return da(e,i.ha,n)},null),0):o.A(0)})}(e.g.$,t.type,n.startTime)),x(_,Promise.all(s),0)}})}(e,t,i,r),4);case 4:return Ut(e.l),e.C?M.return():(a="video/mp4"==s.mimeType||"audio/mp4"==s.mimeType,l=X.ReadableStream,e.i.lowLatencyMode&&e.j.isLowLatency&&l&&a&&("HLS"!=e.j.type||i.m)?(g=new Uint8Array(0),y=v=!1,S=function(D){var R,j,U;return L(function(H){switch(H.g){case 1:if(v||(y=!0,Ut(e.l),e.C))return H.return();if(fe(H,2),g=_t(g,D),R=!1,j=0,(new Et).box("mdat",function(G){j=G.size+G.start,R=!0}).parse(g,!1,!0),!R){H.A(4);break}return U=g.subarray(0,j),g=g.subarray(j),x(H,xp(e,t,n,s,i,U,!0,r),5);case 5:t.aa&&t.ua&&gl(t.aa,i.startTime,!0);case 4:Le(H,0);break;case 2:T=Te(H),Z(H)}})},x(M,Tl(e,t,i,S),9)):x(M,Tl(e,t,i),7));case 7:return f=M.h,Ut(e.l),e.C?M.return():(Ut(e.l),t.Mc?(t.Ra=!1,Ii(e,t,0),M.return()):x(M,xp(e,t,n,s,i,f,!1,r),6));case 9:if(A=M.h,T)throw T;if(y){M.A(10);break}return v=!0,Ut(e.l),e.C?M.return():t.Mc?(t.Ra=!1,Ii(e,t,0),M.return()):x(M,xp(e,t,n,s,i,A,!1,r),10);case 10:t.aa&&t.ua&&gl(t.aa,i.startTime,!0);case 6:if(Ut(e.l),e.C)return M.return();t.Ka=i,u.next(),t.Ra=!1,t.bh=!1,I=e.g.$.Wb(),JSON.stringify(I[t.type]),t.Mc||(P=null,t.type===o.Ea?P=e.h.get(o.ha):t.type===o.ha&&(P=e.h.get(o.Ea)),e.g.vf(i,t.stream,P&&P.type==o.ha?P.stream.isAudioMuxedInVideo:t.stream.codecs.includes(","))),es(t),Ii(e,t,0),Le(M,0);break;case 2:if(b=Te(M),Ut(e.l,b),e.C)return M.return();if(t.Ra=!1,7001==b.code)t.Ra=!1,es(t),Ii(e,t,0),M.A(0);else{if(t.type!=o.Ua||!e.i.ignoreTextStreamFailures)return 3017==b.code?x(M,function zS(e,t,n){var u,a;return L(function(l){if(1==l.g){if(Array.from(e.h.values()).some(function(c){return c!=t&&c.bh}))return l.A(2);if(e.g.disableStream(t.stream,0===e.i.maxDisabledTime&&1011==n.code?1:e.i.maxDisabledTime))return l.return();if(e.i.avoidEvictionOnQuotaExceededError)return Ii(e,t,4),l.return();if((u=Math.round(100*e.D))>20)e.D-=.2;else{if(!(u>4))return t.Wd=!0,e.C=!0,e.g.onError(n),l.return();e.D-=.04}return t.bh=!0,a=e.g.Tc(),x(l,Sp(e,t,a),2)}Ii(e,t,4),Z(l)})}(e,t,b),0):(t.Wd=!0,1==b.category&&t.aa&&ml(t.aa,i),b.severity=2,x(M,Ip(e,t,b),0));e.h.delete(o.Ua),M.A(0)}}})}(e,t,i,a,s).catch(function(){}),t.Cc&&jv(e,t.Cc,i,o)),null)}(e,t),null!=o&&(Ii(e,t,o),t.Wd=!1),Le(d,15);break;case 14:return s=Te(d),x(d,Ip(e,t,s),16);case 16:return d.return();case 15:if(t.type===n.Ua)return d.return();if(u=[t],(l=e.h.get(t.type===n.ha?n.Ea:n.ha))&&u.push(l),!e.J||!u.every(function(f){return f.endOfStream})){d.A(0);break}return x(d,e.g.$.endOfStream(),18);case 18:Ut(e.l),0!=(c=e.g.$.getDuration())&&c<e.j.presentationTimeline.getDuration()&&e.j.presentationTimeline.qb(c),Z(d)}})}function jv(e,t,n,i){var r,o,s,u,a,l,c,d,f,g;return L(function(y){switch(y.g){case 1:for(u=(s=(o=(r=t.stream).segmentIndex)&&o.Xb(n))&&s.next().value;u&&e.M.includes(u.startTime);)u=s&&s.next().value;if(!u){y.A(0);break}if(!(a=u.Z)||al(a,t.ob)){y.A(3);break}return t.ob=a,fe(y,4),x(y,Tl(e,t,a),6);case 6:l=y.h;var T=e.g.$;T.N&&Ao(T.N,l,0,r),e.M=[],Le(y,3);break;case 4:throw c=Te(y),t.ob=null,c;case 3:if(t.Ka&&t.Ka==u){y.A(0);break}return t.Ka=u,fe(y,8),x(y,Tl(e,t,u),10);case 10:d=y.h,(T=e.g.$).N&&Ao(T.N,d,0,r),e.M.push(u.startTime),Le(y,9);break;case 8:throw f=Te(y),t.Ka=null,f;case 9:if(g=Math.max.apply(Math,[0].concat(ee(e.M))),e.g.Tc()+i>g)return x(y,jv(e,t,u.startTime,i),0);y.A(0)}})}function Uv(e,t,n,i,r,o,s,u){var a,l,c,d,f;return L(function(g){switch(g.g){case 1:if(a=cn,l=Qc(e),fe(g,2),t.nc=i,t.mc=r,s&&(t.gf=s),u&&(t.hf=u),t.jf=n,c=e.j.sequenceMode||"HLS"==e.j.type,d=null,t.type===a.Ea?d=e.h.get(a.ha):t.type===a.ha&&(d=e.h.get(a.Ea)),!(d&&d.stream&&d.stream.isAudioMuxedInVideo)){g.A(4);break}return x(g,iv(e.g.$,d.type,n,i,r,c,d.stream.mimeType,d.stream.codecs,l),4);case 4:return x(g,iv(e.g.$,t.type,n,i,r,c,o.mimeType||t.stream.mimeType,o.codecs||t.stream.codecs,l),6);case 6:Le(g,0);break;case 2:throw f=Te(g),t.nc=null,t.mc=null,t.gf=null,t.hf=null,t.jf=null,f}})}function xp(e,t,n,i,r,o,s,u){var a,c,f;return s=void 0!==s&&s,u=void 0!==u&&u,L(function(g){switch(g.g){case 1:return a=i.closedCaptions&&i.closedCaptions.size>0,e.i.shouldFixTimestampOffset&&(c=null,r.Z&&(c=r.Z.timescale),("video/mp4"==i.mimeType||"audio/mp4"==i.mimeType)&&c&&"video"===i.t
1ype&&"DASH"==e.j.type&&(new Et).box("moof",Oe).box("traf",Oe).S("tfdt",function(v){var y,T,S;return L(function(P){return y=bc(v.reader,v.version),(T=y.baseMediaDecodeTime)?(S=-T/c,(Number(t.jf)||0)<S?x(P,Uv(e,t,S,t.nc,t.mc,r),0):P.A(0)):P.return()})}).parse(o,!1,s)),x(g,Sp(e,t,n),2);case 2:return Ut(e.l),f=t.$c,t.$c=!1,x(g,e.g.Ph(t.type,o),3);case 3:return x(g,Hc(e.g.$,t.type,o,r,i,a,f,u,s),4);case 4:Ut(e.l),Z(g)}})}function Sp(e,t,n){var i,r,o,s,u,a,l,c,d;return L(function(f){return 1==f.g?((i=t.stream.segmentIndex)instanceof rn&&(i.Xa(e.j.presentationTimeline.Ib()),r=[],function ES(e,t){for(var n=(e=m(e.h)).next();!n.done;n=e.next())t(n.value)}(i,function(g){r.push(g.Re())})),o=Math.max(e.i.bufferBehind*e.D,e.j.presentationTimeline.h),null==(s=rp(e.g.$,t.type))?(e.G==t&&(e.G=null),f.return()):(u=n-s,a=e.i.evictionGoal,l=e.j.presentationTimeline.Yb(),c=e.j.presentationTimeline.Hb(),d=u-o,c-l>a&&(d=Math.max(u-o,l-a-s)),d<=a?f.return():x(f,e.g.$.remove(t.type,s,s+d,r),2))):4!=f.g?(Ut(e.l),e.G?x(f,Sp(e,e.G,n),4):f.A(0)):(Ut(e.l),void Z(f))})}function Ap(e){return e&&e.type==Pe&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function Tl(e,t,n,i){var r,o,s,u,a;return L(function(l){switch(l.g){case 1:if(r=n.Zb())return l.return(r);if(o=null,t.aa){var c=t.aa,d=c.h;n instanceof bi&&(d=c.j),d.has(n)?(c=d.get(n),i&&(c.xh=i),o=c.fe):o=null}return o||(o=$c(n,t.stream,i||null,e.i.retryParameters,e.g.sc)),s=0,t.ua&&(s=t.ua.h),t.Jb=o,x(l,o.promise,2);case 2:if(u=l.h,t.Jb=null,a=u.data,!n.aesKey){l.A(3);break}return x(l,Tp(a,n.aesKey,s),4);case 4:a=l.h;case 3:return l.return(a)}})}function $c(e,t,n,i,r,o){o=void 0!==o&&o;var s=e instanceof Ee?e:void 0,u=s?1:0;return(e=vl(e.P(),e.startByte,e.endByte,i,n)).contentType=t.type,r.request(Xr,e,{type:u,stream:t,segment:s,isPreload:o})}function Ep(e,t,n,i){var r,o;return L(function(s){return 1==s.g?(t.Mc=!1,t.Uf=!1,t.Qe=0,t.Oc=!0,t.Ka=null,t.ua=null,t.aa&&!e.m.has(t.stream)&&go(t.aa),i?(r=e.g.Tc(),o=e.g.$.getDuration(),x(s,e.g.$.remove(t.type,r+i,o),3)):x(s,nv(e.g.$,t.type),4)):3!=s.g?(Ut(e.l),n?x(s,e.g.$.flush(t.type),3):s.A(3)):(Ut(e.l),t.Oc=!1,t.endOfStream=!1,t.Ra||t.Bb||Ii(e,t,0),void Z(s))})}function Ii(e,t,n){var i=t.type;(i!=Pe||e.h.has(i))&&(t.Bb=new ao(function(){var r;return L(function(o){return 1==o.g?(fe(o,2),x(o,GS(e,t),4)):2!=o.g?Le(o,0):(r=Te(o),e.g&&e.g.onError(r),void Z(o))})}).ka(n))}function es(e){null!=e.Bb&&(e.Bb.stop(),e.Bb=null)}function fa(e){return L(function(t){return e.Jb?x(t,e.Jb.abort(),0):t.A(0)})}function Ip(e,t,n){return L(function(r){if(1==r.g)return 3024==n.code?(t.Ra=!1,es(t),Ii(e,t,0),r.return()):x(r,rm(e.T),2);if(Ut(e.l),1===n.category&&1003!=n.code){if(t.Jc)return Rv(e,!1),r.return();n.handled=e.g.disableStream(t.stream,0===e.i.maxDisabledTime&&1011==n.code?1:e.i.maxDisabledTime),n.handled&&(n.severity=1)}(!n.handled||1011!=n.code)&&e.g.onError(n),n.handled||e.i.failureCallback(n),Z(r)})}function Jc(e,t){t=void 0!==t&&t;var i,r,o,s,u,n=void 0===n||n;return L(function(a){if(1==a.g){if(i=Date.now()/1e3,r=e.i.minTimeBetweenRecoveries,!t){if(!e.i.allowMediaSourceRecoveries||i-e.N<r)return a.return(!1);e.N=i}return(s=e.h.get((o=cn).ha))&&(s.ob=null,s.nc=null,s.mc=null,n&&yl(e,s),fa(s).catch(function(){}),s.ua&&s.ua.fh(),es(s)),(u=e.h.get(o.Ea))&&(u.ob=null,u.nc=null,u.mc=null,n&&yl(e,u),fa(u).catch(function(){}),u.ua&&u.ua.fh(),es(u)),x(a,sv(e.g.$,Qc(e)),2)}return!u||u.Oc||u.Ra||u.Bb||Ii(e,u,0),!s||s.Oc||s.Ra||s.Bb||Ii(e,s,0),a.return(!0)})}function Zc(e){return"keep"!==e.i.crossBoundaryStrategy}function Cp(e){if(Zc(e)){e.I.stop();var t=e.g.Tc(),n=e.h.get("video")||e.h.get("audio");n&&(n=n.ob)&&null!==n.g&&((t=n.g-t)<0||t>1||(e.H=n.g+.1,e.I.ka(t)))}}function Qc(e,t){t=void 0!==t&&t;var n=new Map;return e.o.audio&&n.set("audio",e.o.audio),e.o.video&&n.set("video",e.o.video),t&&e.B&&n.set(Pe,e.B),n}function ed(){}function Mp(e,t,n,i,r){var l,o=r in i,s=o?n.constructor==Object&&0==Object.keys(i).length:n.constructor==Object&&0==Object.keys(n).length,u=o||s,a=!0;for(l in t){var c=r+"."+l,d=o?i[r]:n[l];u||l in n?void 0===t[l]?void 0===d||u?delete e[l]:e[l]=rr(d):s?e[l]=t[l]:d.constructor==Object&&t[l]&&t[l].constructor==Object?(e[l]||(e[l]=rr(d)),c=Mp(e[l],t[l],d,i,c),a=a&&c):typeof t[l]!=typeof d||null==t[l]||"function"!=typeof t[l]&&t[l].constructor!=d.constructor?(Rn("Invalid config, wrong type for "+c),a=!1):"function"==typeof n[l]&&n[l].length!=t[l].length?(Be("Unexpected number of arguments for "+c),e[l]=t[l]):e[l]=Array.isArray(e[l])?t[l].slice():t[l]:(Rn("Invalid config, unrecognized key "+c),a=!1)}return a}function td(e,t){for(var n={},i=n,r=0,o=0;!((r=e.indexOf(".",r))<0);)(0==r||"\\"!=e[r-1])&&(i[o=e.substring(o,r).replace(/\\\./g,".")]={},i=i[o],o=r+1),r+=1;return i[e.substring(o).replace(/\\\./g,".")]=t,n}function ga(e,t){return e&&t}function Bv(e,t){function r(o){return o&&"object"==typeof o&&!Array.isArray(o)}return function n(o){for(var s=m(Object.keys(o)),u=s.next();!u.done;u=s.next())if(!(o[u=u.value]instanceof HTMLElement))if(r(o[u])&&0===Object.keys(o[u]).length)delete o[u];else{var a=o[u];Array.isArray(a)&&0===a.length||"function"==typeof o[u]?delete o[u]:r(o[u])&&(n(o[u]),0===Object.keys(o[u]).length&&delete o[u])}}(e=function i(o,s){return Object.keys(o).reduce(function(u,a){var l=o[a];return s.hasOwnProperty(a)?l instanceof HTMLElement&&s[a]instanceof HTMLElement?l.isEqualNode(s[a])||(u[a]=l):r(l)&&r(s[a])?(l=i(l,s[a]),(Object.keys(l).length>0||!r(l))&&(u[a]=l)):Array.isArray(l)&&Array.isArray(s[a])?As(l,s[a])||(u[a]=l):Number.isNaN(l)&&Number.isNaN(s[a])||l!==s[a]&&(u[a]=l):u[a]=l,u},{})}(e,t)),e}function Ni(){}function Fv(e){return new O(e=wn(e)).Eb}function wl(e,t,n){function i(u){Ve(o).setUint32(s,u.byteLength,!0),s+=4,o.set(oe(u),s),s+=u.byteLength}if(!n||!n.byteLength)throw new k(2,6,6015);var r;r="string"==typeof t?ui(t,!0):t,e=ui(e=wn(e),!0);var o=new Uint8Array(12+e.byteLength+r.byteLength+n.byteLength),s=0;return i(e),i(r),i(n),o}
1function kp(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,wl(e,n=wn(e).split("skd://").pop(),t))}function nd(e,t){2===e&&(e=t.drmInfo)&&wc(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}function id(){this.g=null}function tA(e,t){return e.filter(function(n){return!(n.audio&&n.audio.channelsCount&&n.audio.channelsCount>t)}).sort(function(n,i){return n.audio||i.audio?n.audio?i.audio?(i.audio.channelsCount||0)-(n.audio.channelsCount||0):1:-1:0})}function oA(e,t){return e.filter(function(n){return!(n.audio&&n.audio.codecs!=t)})}function rd(){}function ma(){var e=1/0,t=Ne();navigator.connection&&navigator.connection.saveData&&(e=360);var n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(u,a,l){return"apple"===X.shakaMediaKeysPolyfill&&"skd"==a&&(a=l.serverCertificate,u=wl(u,l=Fv(u),a)),u},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},i="reload",r=!1;Hi()&&t.ed()&&(i="smooth",r=!0);var o={trackSelectionCallback:function(u){return L(function(a){return a.return(u)})},downloadSizeCallback:function(u){var a;return L(function(l){return 1==l.g?navigator.storage&&navigator.storage.estimate?x(l,navigator.storage.estimate(),3):l.return(!0):l.return((a=l.h).usage+u<.95*a.quota)})},progressCallback:function(u,a){return ga([u,a])},usePersistentLicense:!0,numberOfParallelDownloads:5},s={drm:n,manifest:r={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},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,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:od,manifestPreprocessorTXml:sd,sequenceMode:!1,multiTypeVariantsAllowed:r,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.dd(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:od,manifestPreprocessorTXml:sd,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},streaming:{retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},failureCallback:function(u){return ga([u])},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:!1,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:i,addExtraFeaturesToSourceBuffer:function(u){return ga([u],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(u,a){return ga([u,a])},dispatchAllEmsgBoxes:!1,useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:o,abrFactory:function(){return new jt},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(id,[null].concat(ee(Jt.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:!0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",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},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:30,repeatMode:0}};return o.trackSelectionCallback=function(u){return L(function(a){return a.return(function sA(e,t,n){var i=n;"AUTO"==i&&(n=e.some(function(u){return!(!u.hdr||"HLG"!=u.hdr)}),i=v1(n));var r=e.filter(function(u){return!("variant"!=u.type||u.hdr&&u.hdr!=i)});n=[];var o=Ye(t,r.map(function(u){return u.language}));o&&(n=r.filter(function(u){return te(u.language)==o})),0==n.length&&(n=r.filter(function(u){return u.primary})),0==n.length&&(r.map(function(u){return u.language}),n=r);var s=n.filter(function(u){return u.height&&u.height<=480});for(s.length&&(s.sort(function(u,a){return a.height-u.height}),n=s.filter(function(u){return u.height==s[0].height})),t=[],n.length&&(r=Math.floor(n.length/2),n.sort(function(u,a){return u.bandwidth-a.bandwidth}),t.push(n[r])),n=(e=m(e)).next();!n.done;n=e.next())(n=n.value).type!=Pe&&"image"!=n.type||t.push(n);return t}(u,s.preferredAudioLanguage,s.preferredVideoHdrLevel))})},t.Va(s)}function ts(e,t,n){var i={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioR
1obustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Mp(e,t,n||ma(),i,"")}function od(e){return ga([e],e)}function sd(e){return ga([e],e)}function uA(){this.g=null,this.h=[]}function _p(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration);for(var i=(e=m(e.h)).next();!i.done;i=e.next())n+=(i=i.value).state==t?i.duration:0;return n}function lA(){this.i=this.h=null,this.g=[]}function Dp(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 ud(){this.C=this.X=NaN,this.l="",this.j=this.ni=this.u=this.B=this.L=this.D=this.o=this.m=this.J=this.G=this.i=this.T=this.V=this.N=this.O=this.R=NaN,this.M=0,this.H=this.I=NaN,this.g=new uA,this.h=new lA}function Hv(e,t,n){e.X=t,e.C=n}function Gv(e,t){e.j=isNaN(e.j)?t:e.j+t}function Ar(e,t,n,i){vt.call(this),this.O=e,this.X=t,this.Pa=i.networkingEngine,this.m=n,this.C=null,this.Fa=0,this.bb=i.kd,this.H=i.wk,this.cb=i.xk,this.g=i.config,this.l=this.I=this.h=null,this.xa=!1,this.J=i.Ik,this.ya=!1,this.i=null,this.oa=!1,this.j=this.G=null,this.ia=!1,this.N=new Map,this.Ba=!1,this.Qa=i.Hk,this.ea=new ud,this.wa=new At,this.B=new At,this.R=null,this.u=!1,this.ma=i.kj,this.V=this.o=null,this.ab=i.jj,this.T=!1,this.M=[],this.L=[],this.D=!0}function xl(e,t,n){(e=t?e.L:e.M)?e.push(n):n()}function Kv(e,t){if(e.R=t,e.T=!0,e.M)for(var n=(t=m(e.M)).next();!n.done;n=t.next())(n=n.value)();e.M=null}function Su(e){if(e.u)throw new k(2,7,7003)}function Lp(e,t){e.dispatchEvent(new re("onstatechange",(new Map).set("state",t)))}function Wv(e,t){var n,i,o;return L(function(s){switch(s.g){case 1:return!e.h||e.i?s.return():(Lp(e,"drm-engine"),e.Fa=Date.now()/1e3,e.i=e.bb(),e.H.h=e.i,e.i.configure(e.g.drm,function(){return e.D}),n=Mo(e.h.variants),i=!0,e.h&&e.h.presentationTimeline&&(i=e.h.presentationTimeline.W()),x(s,mm(e.i,n,e.h.offlineSessionIds,i),2));case 2:if(Su(e),!t){s.A(3);break}return x(s,e.i.hc(t),4);case 4:Su(e);case 3:return x(s,Dm(e.H,e.h),5);case 5:if(!s.h){s.A(0);break}return o=new re("trackschanged",void 0),x(s,Promise.resolve(),7);case 7:e.dispatchEvent(o),Z(s)}})}function Xv(e){var t=Mo(e.h.variants);return t=e.C.create(t),e.j.configure(e.g.abr),e.j.setVariants(Array.from(t.values())),e.j.chooseVariant()}function Pp(e,t,n){var r,s,u;return L(function(a){return 1==a.g?(r=new zc(e.g.streaming.segmentPrefetchLimit||2,t,function(l,c,d){return $c(l,c,d||null,e.g.streaming.retryParameters,e.Pa,e.D)},!1),e.N.set(t.id,r),t.segmentIndex?a.A(2):x(a,t.createSegmentIndex(),2)):(s=t.segmentIndex.Xb("number"==typeof e.m?e.m:0),u=null,s&&((u=s.current())||(u=s.next().value)),u||(u=fo(t.segmentIndex)),u?n?u.Z?x(a,_v(r,u.Z),0):a.A(0):x(a,gl(r,u.startTime),0):a.A(0))})}function Au(e,t){vt.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{jd:null,hd:va,Uc:function(i,r){return ns(n,"enter",i,r)}},{jd:Sl,hd:va,Uc:function(i,r){return ns(n,"enter",i,r)}},{jd:Al,hd:va,Uc:function(i,r){return ns(n,"enter",i,r)}},{jd:va,hd:Sl,Uc:function(i,r){return ns(n,"exit",i,r)}},{jd:va,hd:Al,Uc:function(i,r){return ns(n,"exit",i,r)}},{jd:Sl,hd:Al,Uc:function(i,r){r?ns(n,"skip",i,r):(ns(n,"enter",i,r),ns(n,"exit",i,r))}},{jd:Al,hd:Sl,Uc:function(i,r){return ns(n,"skip",i,r)}}],this.h=new et,this.h.F(this.i,"regionremove",function(i){n.g.delete(i.region)})}function ns(e,t,n,i){t=new re(t,new Map([["region",n],["seeking",i]])),e.dispatchEvent(t)}pv.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.m=function(){},this.g=null},vv.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null},(h=Tv.prototype).ready=function(){var t=this;ha(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){!function e(){if(null==t.h||0==t.h&&t.g.duration!=1/0)t.i=!0;else{var n=t.g.currentTime,i=null;if("number"==typeof t.h)i=t.h;else if(t.h instanceof Date){var r=wv(t);null!==r&&(i=t.h.getTime()/1e3-r,i=xv(t,i))}null==i?t.i=!0:(i<0&&(i=Math.max(0,n+i)),n!=i?(t.j.Aa(t.g,"seeking",function(){t.i=!0}),t.g.currentTime=i):t.i=!0)}}()})},h.release=function(){this.j&&(this.j.release(),this.j=null),this.g=null},h.Xf=function(e){this.h=this.i?this.h:e},h.Ee=function(){var e=this.i?this.g.currentTime:this.h;return e instanceof Date&&(e=xv(this,e=e.getTime()/1e3-(wv(this)||0))),e||0},h.Jh=function(){return 0},h.Hh=function(){return 0},h.Ih=function(){return!1},h.xi=function(){},h.ki=function(){var e=jc(this.g.buffered);return null!=e&&e>=this.g.duration-1},(h=Sv.prototype).ready=function(){this.m.Ha(.25)},h.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(){}},h.Xf=function(e){fv(this.j,Av(this,e))},h.Ee=function(){var e=dp(this.j);return this.h.readyState>0&&!this.h.paused?Cv(this,e):e},h.Jh=function(){return this.i.H},h.Hh=function(){return this.i.G},h.Ih=function(){return this.i.C},h.xi=function(){this.i.vf()},h.ki=function(){if(this.g.W()){var e=this.g.Ec(),t=jc(this.h.buffered);if(null!=t&&t>=e)return!0}return!1},(h=ut.prototype).getNumReferences=function(){return this.g.length},h.getNumEvicted=function(){return this.i},h.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},h.zk=function(){this.o=!0},h.Gb=function(e){for(var t=m(this.g),n=t.next();!n.done;n=t.next())e(n.value)},h.find=function(e){for(var t=this.g.length-1,n=t;n>=0;--n){var i=this.g[n];if(e>=i.startTime&&e<(n<t?this.g[n+1].startTime:i.endTime))return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},h.get=function(e){return 0==this.g.length||(e-=this.i)<0||e>=this.g.length?null:this.g[e]},h.offset=function(e){if(!this.o)for(var t=m(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},h.mf=function(e){if(!this.o&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3;this.g=this.g.filter(function(n){return Math.round(1e3*n.startTime)/1e3<t}),this.g.push.apply(this.g,ee(e))}},h.be=function(e,t){var n=this;e=e.filter(function(i){return i.endTime>t&&(0==n.g.length||i.endTime>n.g[0].startTime)}),this.mf(e),this.Xa(t)},h.Xa=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}},h.nd=function(e,t,n){if(n=void 0!==n&&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++;0!=this.g.length&&((t=new Ee((e=this.g[this.g.length-1]).startTime,t,e.D,e.startByte,e.endByte,e.Z,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.C,e.h,e.status,e.aesKey)).mimeType=e.mimeType,t.codecs=e.codecs,t.i=e.i,this.g[this.g.length-1]=t)}},h.Nf=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new E(function(){var i=t();i?n.g.push.apply(n.g,ee(i)):(n.m.stop(),n.m=null)}),this.m.Ha(e))},ut.prototype[Symbol.iterator]=function(){return this.Xb(0)},ut.prototype.Xb=function(e,t,n){t=void 0!==t&&t,n=void 0!==n&&n;var i=this.find(e);if(null==i)return null;var r=this.get(i);n?i++:i--;var o=-1;if(r&&r.g.length>0)for(var s=r.g.length-1;s>=0;--s){var u=r.g[s];if(e>=u.startTime&&e<u.endTime){if(!t){for(;s&&!u.l;)s--,u=r.g[s];if(!u.l)return Rn("No independent partial segment found!"),null}n?i--:i++,o=s-1;break}}return new Sr(this,i,o,n)},ut.prototype.Re=function(){return-1},ue("shaka.media.SegmentIndex",ut),ut.forSingleSegment=Kc,ut.prototype.getIteratorForTime=ut.prototype.Xb,ut.prototype.updateEvery=ut.prototype.Nf,ut.prototype.fit=ut.prototype.nd,ut.prototype.evict=ut.prototype.Xa,ut.prototype.mergeAndEvict=ut.prototype.be,ut.prototype.offset=ut.prototype.offset,ut.prototype.get=ut.prototype.get,ut.prototype.find=ut.prototype.find,ut.prototype.markImmutable=ut.prototype.zk,ut.prototype.release=ut.prototype.release,ut.prototype.getNumEvicted=ut.prototype.getNumEvicted,ut.prototype.getNumReferences=ut.prototype.getNumReferences,(h=Sr.prototype).Fd=function(e){this.reverse=e},h.uj=function(){return this.h},h.current=function(){var e=this.i.get(this.h);return e&&e.g.length>0&&e.B&&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},h.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.B&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),{value:e=this.current(),done:!e}},h.fh=function(){var e=this.current();if(e.o&&!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]},ue("shaka.media.SegmentIterator",Sr),Sr.prototype.resetToLastIndependent=Sr.prototype.fh,Sr.prototype.next=Sr.prototype.next,Sr.prototype.current=Sr.prototype.current,Sr.prototype.currentPosition=Sr.prototype.uj,Sr.prototype.setReverse=Sr.prototype.Fd,wt(rn,ut),(h=rn.prototype).clone=function(){var e=new rn;
1return e.h=this.h.slice(),e.i=this.i,e},h.release=function(){for(var e=m(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},h.Gb=function(e){for(var t=m(this.h),n=t.next();!n.done;n=t.next())n.value.Gb(e)},h.find=function(e){for(var t=this.i,n=m(this.h),i=n.next();!i.done;i=n.next()){var r=(i=i.value).find(e);if(null!=r)return r+t;t+=i.getNumEvicted()+i.getNumReferences()}return null},h.get=function(e){for(var t=this.i,n=m(this.h),i=n.next();!i.done;i=n.next()){var r=(i=i.value).get(e-t);if(r)return r;r=i.getNumReferences(),t+=i.getNumEvicted()+r}return null},h.offset=function(){},h.mf=function(){},h.Xa=function(e){if(this.h.length){var t=this.h[0];t.Xa(e),0==t.getNumReferences()&&(this.h.shift(),this.i+=t.getNumEvicted(),t.release(),this.Xa(e))}},h.be=function(){},h.nd=function(){},h.Nf=function(){},ue("shaka.media.MetaSegmentIndex",rn),rn.prototype.updateEvery=rn.prototype.Nf,rn.prototype.fit=rn.prototype.nd,rn.prototype.mergeAndEvict=rn.prototype.be,rn.prototype.evict=rn.prototype.Xa,rn.prototype.merge=rn.prototype.mf,rn.prototype.offset=rn.prototype.offset,rn.prototype.get=rn.prototype.get,rn.prototype.find=rn.prototype.find,rn.prototype.forEachTopLevelReference=rn.prototype.Gb,rn.prototype.release=rn.prototype.release,pl.prototype.release=function(){this.set(this.Sc()),this.h&&(this.h.stop(),this.h=null),this.g=null},pl.prototype.set=function(e){this.i=e,hp(this)},pl.prototype.Sc=function(){return this.g.Sc()},pp.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=m(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},wt(Wc,vt),Wc.prototype.release=function(){this.g.clear(),vt.prototype.release.call(this)},Wc.prototype.j=function(e){for(var t=m(this.g.values()),n=t.next();!n.done;n=t.next()){var i=(n=n.value).ng;e:{for(var r=n.ie,o=r.length-1;o>=0;o--){var s=r[o];if(s.position<=e){r=s.ud;break e}}r=null}o=r&&!(i===r||i&&r&&i.bandwidth==r.bandwidth&&i.audioSamplingRate==r.audioSamplingRate&&i.codecs==r.codecs&&i.contentType==r.contentType&&i.frameRate==r.frameRate&&i.height==r.height&&i.mimeType==r.mimeType&&i.channelsCount==r.channelsCount&&i.pixelAspectRatio==r.pixelAspectRatio&&i.width==r.width),s=r&&i&&r.label&&i.label&&i.label!==r.label;var u=r&&i&&r.language&&i.language&&i.language!==r.language;i=r&&i&&r.roles&&i.roles&&!Qs(i.roles,r.roles),(s||u||i)&&kv(this,e,r.contentType)&&(n.ng=r,i=new re("audiotrackchange",new Map([["quality",r],["position",e]])),this.dispatchEvent(i)),o&&kv(this,e,r.contentType)&&(n.ng=r,JSON.stringify(r),n=new re("qualitychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}},wt(fl,vt),fl.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),vt.prototype.release.call(this)},zc.prototype.Xa=function(e,t){t=void 0!==t&&t;for(var n=m(this.h.keys()),i=n.next();!i.done;i=n.next())e>(i=i.value).endTime&&ml(this,i);t&&gp(this)},zc.prototype.Fd=function(e){this.o=e,this.g&&this.g.Fd(e)},mp.prototype.abort=function(){this.fe&&this.fe.abort()},(h=bv.prototype).destroy=function(){return this.l.destroy()},h.configure=function(e){if(this.i=e,this.T=new im({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0),e.disableAudioPrefetch){var t=this.h.get("audio");t&&t.aa&&(go(t.aa),t.aa=null);for(var n=(t=m(this.m.keys())).next();!n.done;n=t.next())go(this.m.get(n=n.value)),this.m.delete(n)}for(e.disableTextPrefetch&&(t=this.h.get(Pe))&&t.aa&&(go(t.aa),t.aa=null),e.disableVideoPrefetch&&(t=this.h.get("video"))&&t.aa&&(go(t.aa),t.aa=null),n=(t=m(this.h.keys())).next();!n.done;n=t.next())(n=this.h.get(n.value)).aa?(Lv(n.aa,e.segmentPrefetchLimit),e.segmentPrefetchLimit>0||(go(n.aa),n.aa=null)):e.segmentPrefetchLimit>0&&(n.aa=wp(this,n.stream));e.disableAudioPrefetch||function HS(e){for(var t=e.i.segmentPrefetchLimit,n=e.i.prefetchAudioLanguages,i=m(e.j.variants),r=i.next(),o={};!r.done;o={Ob:void 0},r=i.next())if(o.Ob=r.value,o.Ob.audio)if(e.m.has(o.Ob.audio)){if(Lv(r=e.m.get(o.Ob.audio),t),!(t>0&&n.some(function(u){return function(a){return Y(u.Ob.audio.language,a)}}(o)))){var s=e.h.get(o.Ob.audio.type);r!==(s&&s.aa)&&go(r),e.m.delete(o.Ob.audio)}}else t<=0||!n.some(function(u){return function(a){return Y(u.Ob.audio.language,a)}}(o))||!(r=wp(e,o.Ob.audio))||(o.Ob.audio.segmentIndex||o.Ob.audio.createSegmentIndex(),e.m.set(o.Ob.audio,r))}(this)},h.start=function(e){var t=this;return L(function(n){if(1==n.g)return x(n,function VS(e,t){var n,r,o,s,u,a,l;return L(function(c){if(1==c.g){if(!e.o)throw new k(2,5,5006);return n=Qc(e,!0),x(c,e.g.$.init(n,e.j.sequenceMode,e.j.type,e.j.ignoreManifestTimestampsInSegmentsMode),2)}
1for(Ut(e.l),e.updateDuration(),r=m(n.keys()),o=r.next();!o.done;o=r.next())u=n.get(s=o.value),e.h.has(s)||(a=qc(e,u),t.has(u.id)&&(DS(l=t.get(u.id),function(d,f,g){return $c(d,f,g||null,e.i.retryParameters,e.g.sc)}),a.aa=l),e.h.set(s,a),Ii(e,a,0));Z(c)})}(t,e||new Map),2);Ut(t.l),t.J=!0,Z(n)})},h.$c=function(){if(this.g){for(var e=this.g.Tc(),t=m(this.h.keys()),n=t.next();!n.done;n=t.next()){var i=n.value;n=this.h.get(i);var r=this.g.$;if(!(r=i==Pe?null!=(r=r.h).g&&null!=r.h&&e>=r.g&&e<r.h:Yh(r=la(r,i),e))){if(this.N=0,n.aa&&(n.aa.g=null),"audio"===n.type)for(var o=(r=m(this.m.values())).next();!o.done;o=r.next())o.value.g=null;n.ua=null,(null!=aa(this.g.$,i)||n.Ra)&&yl(this,n),n.Jb&&(n.Jb.abort(),n.Jb=null),i===Pe&&(i=this.g.$).J&&i.J.Jd(),n.$c=!0}}Zc(this)&&Cp(this)}},h.updateDuration=function(){var e=Ts(),t=this.j.presentationTimeline.getDuration();t<1/0?(e&&(this.u&&this.u.stop(),op(this.g.$)),this.g.$.qb(t)):e?(this.u&&this.u.Ha(.5),this.g.$.qb(1/0)):this.g.$.qb(4294967296)},ue("shaka.util.ConfigUtils",ed),ed.getDifferenceFromConfigObjects=Bv,ed.convertToConfigObject=td,ed.mergeConfigObjects=Mp,ue("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2}),ue("shaka.drm.FairPlay",Ni),Ni.commonFairPlayResponse=function(e,t){if(2===e&&(e=t.originalRequest.drmInfo)&&wc(e.keySystem)){try{var n=We(t.data)}catch{return}if(e=!1,"<ckc>"===(n=n.trim()).substr(0,5)&&"</ckc>"===n.substr(-6)&&(n=n.slice(5,-6),e=!0),!e)try{var i=JSON.parse(n);i.ckc&&(n=i.ckc,e=!0),i.CkcMessage&&(n=i.CkcMessage,e=!0),i.License&&(n=i.License,e=!0)}catch{}e&&(t.data=Qe(sn(n)))}},Ni.muxFairPlayRequest=function(e,t){nd(e,t)},Ni.expressplayFairPlayRequest=function(e,t){if(2===e){var n=t.drmInfo;n&&wc(n.keySystem)&&nd(e,t)}},Ni.conaxFairPlayRequest=function(e,t){nd(e,t)},Ni.ezdrmFairPlayRequest=function(e,t){nd(e,t)},Ni.verimatrixFairPlayRequest=function(e,t){2===e&&(e=t.drmInfo)&&wc(e.keySystem)&&(e=Vn(e=oe(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=zt("spc="+e))},Ni.muxInitDataTransform=function(e,t,n){return kp(e,t,n)},Ni.expressplayInitDataTransform=function(e,t,n){return kp(e,t,n)},Ni.conaxInitDataTransform=function(e,t,n){if("skd"!==t)return e;t=n.serverCertificate,n=wn(e).split("skd://").pop().split("?").shift(),n=X.atob(n);var i=new ArrayBuffer(2*n.length);i=lt(i);for(var r=0,o=n.length;r<o;r++)i[r]=n.charCodeAt(r);return wl(e,i,t)},Ni.ezdrmInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,wl(e,n=wn(e).split(";").pop(),t))},Ni.verimatrixInitDataTransform=function(e,t,n){return kp(e,t,n)},Ni.initDataTransform=wl,Ni.defaultGetContentId=Fv,Ni.isFairPlaySupported=function(){var e;return L(function(t){return 1==t.g?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},fe(t,2),x(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):2!=t.g?t.return(!0):(Te(t),t.return(!1))})},id.prototype.configure=function(e){this.g=e},id.prototype.getConfiguration=function(){return this.g},id.prototype.create=function(e){var t;if(this.g.language){var n=function JS(e,t){var n=Ye(t=te(t),e.map(function(i){return gt(i)}));return n?e.filter(function(i){return n==gt(i)}):[]}(e,this.g.language);n.length&&(t=n)}t||(t=(t=e.filter(function(o){return o.primary})).length?t:e),e=function ZS(e,t){return e.filter(function(n){return!!n.audio&&(t?n.audio.roles.includes(t):0==n.audio.roles.length)})}(t,this.g.role),e.length&&(t=e),this.g.videoLayout&&(e=function iA(e,t){return e.filter(function(n){return!(n.video&&n.video.videoLayout&&n.video.videoLayout!=t)})}(t,this.g.videoLayout),e.length&&(t=e)),this.g.Ic&&(e=function nA(e,t){if("AUTO"==t){var n=e.some(function(i){return!(!i.video||!i.video.hdr||"HLG"!=i.video.hdr)});t=v1(n)}return e.filter(function(i){return!(i.video&&i.video.hdr&&i.video.hdr!=t)})}(t,this.g.Ic),e.length&&(t=e));var i=[this.g.channelCount,this.g.preferredAudioChannelCount];if((e=i.filter(function(o,s){return o&&i.indexOf(o)===s})).length)for(n=(e=m(e)).next();!n.done;n=e.next())if((n=tA(t,n.value)).length){t=n;break}this.g.Nc&&(e=function QS(e,t){return e.filter(function(n){return!(!n.audio||!n.audio.label)&&n.audio.label.toLowerCase()==t.toLowerCase()})}(t,this.g.Nc),e.length&&(t=e)),this.g.Hd&&(e=function eA(e,t){return e.filter(function(n){return!(!n.video||!n.video.label)&&n.video.label.toLowerCase()==t.toLowerCase()})}(t,this.g.Hd),e.length&&(t=e)),e=function rA(e,t){return e.filter(function(n){return!(n.audio&&n.audio.spatialAudio!=t)})}(t,this.g.spatialAudio),e.length&&(t=e);
1var r=[this.g.audioCodec,this.g.Kd].concat(ee(this.g.preferredAudioCodecs));if((e=r.filter(function(o,s){return o&&r.indexOf(o)===s})).length)for(n=(e=m(e)).next();!n.done;n=e.next())if((n=oA(t,n.value)).length){t=n;break}return new Dc(t[0],t,!("smooth"==this.g.codecSwitchingStrategy&&Hi()))},ue("shaka.util.PlayerConfiguration",rd),rd.mergeConfigObjects=ts,rd.createDefaultForLL=function Vv(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}},rd.createDefault=ma,wt(Ar,vt),(h=Ar.prototype).getStartTime=function(){return this.m},h.pd=function(){return this.O},h.Hg=function(){return this.h},h.getStats=function(){return this.ea},h.Sj=function(){return this.o?Sn(this.o):null},h.Rj=function(){return this.V?an(this.V):null},h.start=function(){var t,e=this;L(function(n){switch(n.g){case 1:return x(n,Promise.resolve(),2);case 2:return fe(n,3),x(n,function TA(e){var t,n,r,o;return L(function(u){switch(u.g){case 1:if(Lp(e,"manifest-parser"),e.l||(e.I=Om(e.O,e.X),e.l=e.I(),e.l.configure(e.g.manifest,function(){return e.D})),t=Date.now()/1e3,Lp(e,"manifest"),e.h){u.A(2);break}return x(u,e.l.start(e.O,e.cb),3);case 3:return e.h=u.h,x(u,function wA(e){var t,n,i,r,o,s;return L(function(u){if(e.C||(e.C=e.g.adaptationSetCriteriaFactory(),e.C.configure({language:e.g.preferredAudioLanguage,role:e.g.preferredVariantRole,channelCount:e.g.preferredAudioChannelCount,Ic:e.g.preferredVideoHdrLevel,spatialAudio:e.g.preferSpatialAudio,videoLayout:e.g.preferredVideoLayout,Nc:e.g.preferredAudioLabel,Hd:e.g.preferredVideoLabel,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Kd:"",He:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount})),e.ab&&(e.G=t=e.g.abrFactory,e.j=t(),e.j.configure(e.g.abr)),!(n=Xv(e))||1!=e.h.variants.length&&"HLS"!=e.h.type)return u.A(0);for(i=[],r=m([n.video,n.audio]),o=r.next();!o.done;o=r.next())(s=o.value)&&!s.segmentIndex&&i.push(s.createSegmentIndex());return i.length>0?x(u,Promise.all(i),0):u.A(0)})}(e),2);case 2:return e.wa.resolve(),n=new re("manifestparsed",void 0),x(u,Promise.resolve(),5);case 5:if(e.dispatchEvent(n),0==e.h.variants.length)throw new k(2,4,4036);if(function SA(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))}(e.h),!Lm(e.H,e.h)){u.A(6);break}return r=new re("trackschanged",void 0),x(u,Promise.resolve(),7);case 7:Su(e),e.dispatchEvent(r);case 6:o=Date.now()/1e3,e.ea.J=o-t,Z(u)}})}(e),5);case 5:if(Su(e),"webkit"===X.shakaMediaKeysPolyfill){n.A(6);break}return x(n,Wv(e),7);case 7:Su(e);case 6:if(!e.ma){n.A(8);break}return x(n,function xA(e){var t,n,i,r,o;return L(function(s){return!e.o&&(t=Xv(e))&&(e.o=t),e.o?(n=e.h.presentationTimeline.W(),i=[],(r=e.o).video&&i.push(Pp(e,r.video,n)),r.audio&&i.push(Pp(e,r.audio,n)),(o=xr(e.h.textStreams,e.g.preferredTextLanguage,e.g.preferredTextRole,e.g.preferForcedSubs)[0]||null)&&Ja(r.audio,o,e.g)&&(i.push(Pp(e,o,n)),e.V=o),x(s,Promise.all(i),0)):s.A(0)})}(e),9);case 9:Su(e);case 8:if(!e.ma||!e.i){n.A(10);break}return x(n,function xx(e){return L(function(t){return 1==t.g?e.J?x(t,e.m,3):t.A(0):x(t,Promise.all(e.X.map(function(n){return n.promise})),0)})}(e.i),11);case 11:Su(e);case 10:e.B.resolve(),Le(n,0);break;case 3:(t=Te(n))instanceof k&&(7001==t.code||7003==t.code)||e.B.reject(t),Z(n)}})},h.dispatchEvent=function(e){return this.R?this.R.dispatchEvent(e):vt.prototype.dispatchEvent.call(this,e)},h.onError=function(e){2===e.severity&&(this.B.reject(e),this.destroy());var t=(new Map).set("detail",e);t=new re("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)},h.configure=function(e,t){e=td(e,t),ts(this.g,e)},h.getConfiguration=function(){return rr(this.g)},h.ol=function(){return this.B},h.destroy=function(){var t,n,e=this;return L(function(r){switch(r.g){case 1:if(e.u=!0,!e.l||e.xa){r.A(2);break}return x(r,e.l.stop(),2);case 2:if(!e.j||e.ia){r.A(4);break}return x(r,e.j.stop(),4);case 4:if(e.J&&!e.ya&&e.J.release(),!e.i||e.oa){r.A(6);break}return x(r,e.i.destroy(),6);case 6:if(e.N.size>0&&!e.Ba)for(t=m(e.N.values()),n=t.next();!n.done;n=t.next())go(n.value);Z(r)}})},ue("shaka.media.PreloadManager",Ar),Ar.prototype.destroy=Ar.prototype.destroy,Ar.prototype.waitForFinish=Ar.prototype.ol,Ar.prototype.getPrefetchedTextTrack=Ar.prototype.Rj,Ar.prototype.getPrefetchedVariantTrack=Ar.prototype.Sj,wt(Au,vt),Au.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,vt.prototype.release.call(this)},Au.prototype.j=function(e,t){if(!this.l||0!=e){this.l=!1;for(var n=m(this.i.h.values()),i=n.next();!i.done;i=n.next()){var r=this.g.get(i=i.value),o=e<i.startTime?Sl:e>i.endTime?Al:va;this.g.set(i,o);for(var s=m(this.m),u=s.next();!u.done;u=s.next())(u=u.value).jd==r&&u.hd==o&&u.Uc(i,t)}}};var Sl=1,va=2,Al=3;function Eu(e,t,n){var i,r,o,s,a;return L(function(c){switch(c.g){case 1:var d=new O(e).pb.split("/").pop().split(".");return i=1==d.length?"":d.pop().toLowerCase(),(r=AA.get(i))?c.return(r):(o=0,s=_n([e],n),fe(c,2),s.method="HEAD",x(c,t.request(o,s).promise,4));case 4:r=c.h.headers["content-type"],Le(c,3);break;case 2:if(!(a=Te(c))||1002!=a.code&&1001!=a.code){c.A(3);break}return s.method="GET",x(c,t.request(o,s).promise,6);case 6:r=c.h.headers["content-type"];case 3:return c.return(r?r.toLowerCase().split(";").shift():"")}})}for(var AA=(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/d
1ash+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"),Us={ach:"Lwo",ady:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"T\u0255\u0265i",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-AR":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-MA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629","ar-SA":"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)","ay-BO":"Aymar aru",az:"Az\u0259rbaycan dili","az-AZ":"Az\u0259rbaycan dili","be-BY":"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bg:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438","bg-BG":"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",bn:"\u09ac\u09be\u0982\u09b2\u09be","bn-IN":"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)","bn-BD":"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)","bs-BA":"Bosanski",ca:"Catal\xe0","ca-ES":"Catal\xe0",cak:"Maya Kaqchikel","ck-US":"\u13e3\u13b3\u13a9 (tsalagi)",cs:"\u010ce\u0161tina","cs-CZ":"\u010ce\u0161tina",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (\xd6sterreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserb\u0161\u0107ina",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac","el-GR":"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",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\xf1ol","es-AR":"Espa\xf1ol (Argentine)","es-419":"Espa\xf1ol (Latinoam\xe9rica)","es-CL":"Espa\xf1ol (Chile)","es-CO":"Espa\xf1ol (Colombia)","es-EC":"Espa\xf1ol (Ecuador)","es-ES":"Espa\xf1ol (Espa\xf1a)","es-LA":"Espa\xf1ol (Latinoam\xe9rica)","es-NI":"Espa\xf1ol (Nicaragua)","es-MX":"Espa\xf1ol (M\xe9xico)","es-US":"Espa\xf1ol (Estados Unidos)","es-VE":"Espa\xf1ol (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"\u0641\u0627\u0631\u0633\u06cc","fa-IR":"\u0641\u0627\u0631\u0633\u06cc","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"F\xf8royskt",fr:"Fran\xe7ais","fr-CA":"Fran\xe7ais (Canada)","fr-FR":"Fran\xe7ais (France)","fr-BE":"Fran\xe7ais (Belgique)","fr-CH":"Fran\xe7ais (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",gl:"Galego","gl-ES":"Galego","gn-PY":"Ava\xf1e'\u1ebd","gu-IN":"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0","gx-GR":"\u1f19\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae \u1f00\u03c1\u03c7\u03b1\u03af\u03b1",he:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f","he-IL":"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",hi:"\u0939\u093f\u0928\u094d\u0926\u0940","hi-IN":"\u0939\u093f\u0928\u094d\u0926\u0940",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserb\u0161\u0107ina",ht:"Krey\xf2l",hu:"Magyar","hu-HU":"Magyar","hy-AM":"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"\xcdslenska","is-IS":"\xcdslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"\u65e5\u672c\u8a9e","ja-JP":"\u65e5\u672c\u8a9e","jv-ID":"Basa Jawa","ka-GE":"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8","kk-KZ":"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",km:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a","km-KH":"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",kab:"Taqbaylit",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1","kn-IN":"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1 (India)",ko:"\ud55c\uad6d\uc5b4","ko-KR":"\ud55c\uad6d\uc5b4 (\u97e9\u56fd)",ku:"Kurd\xee","ku-TR":"Kurd\xee",la:"Latin","la-VA"
1:"Latin",lb:"L\xebtzebuergesch","li-NL":"L\xe8mb\xf6rgs",lt:"Lietuvi\u0173","lt-LT":"Lietuvi\u0173",lv:"Latvie\u0161u","lv-LV":"Latvie\u0161u",mai:"\u092e\u0948\u0925\u093f\u0932\u0940, \u09ae\u09c8\u09a5\u09bf\u09b2\u09c0","mg-MG":"Malagasy",mk:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438","mk-MK":"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 (\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438)",ml:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","ml-IN":"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02","mn-MN":"\u041c\u043e\u043d\u0433\u043e\u043b",mr:"\u092e\u0930\u093e\u0920\u0940","mr-IN":"\u092e\u0930\u093e\u0920\u0940",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"\u1017\u1019\u102c\u1005\u1000\u102c",nb:"Norsk (bokm\xe5l)","nb-NO":"Norsk (bokm\xe5l)",ne:"\u0928\u0947\u092a\u093e\u0932\u0940","ne-NP":"\u0928\u0947\u092a\u093e\u0932\u0940",nl:"Nederlands","nl-BE":"Nederlands (Belgi\xeb)","nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"\u0b13\u0b21\u0b3c\u0b3f\u0b06",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40","pa-IN":"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40 (\u0a2d\u0a3e\u0a30\u0a24 \u0a28\u0a42\u0a70)",pl:"Polski","pl-PL":"Polski","ps-AF":"\u067e\u069a\u062a\u0648",pt:"Portugu\xeas","pt-BR":"Portugu\xeas (Brasil)","pt-PT":"Portugu\xeas (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Rom\xe2n\u0103","ro-RO":"Rom\xe2n\u0103",ru:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439","ru-RU":"\u0420\u0443\u0441\u0441\u043a\u0438\u0439","sa-IN":"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d","se-NO":"Davvis\xe1megiella","si-LK":"\u0db4\u0dc5\u0dcf\u0dad",sk:"Sloven\u010dina","sk-SK":"Sloven\u010dina (Slovakia)",sl:"Sloven\u0161\u010dina","sl-SI":"Sloven\u0161\u010dina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"\u0421\u0440\u043f\u0441\u043a\u0438","sr-RS":"\u0421\u0440\u043f\u0441\u043a\u0438 (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili","sw-KE":"Kiswahili",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd","ta-IN":"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",te:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41","te-IN":"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",tg:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301","tg-TJ":"\u0442\u043e\u04b7\u0438\u043a\u04e3",th:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22","th-TH":"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",tl:"Filipino","tl-PH":"Filipino",tlh:"tlhIngan-Hol",tr:"T\xfcrk\xe7e","tr-TR":"T\xfcrk\xe7e","tt-RU":"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",uk:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430","uk-UA":"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",ur:"\u0627\u0631\u062f\u0648","ur-PK":"\u0627\u0631\u062f\u0648",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Ti\u1ebfng Vi\u1ec7t","vi-VN":"Ti\u1ebfng Vi\u1ec7t","xh-ZA":"isiXhosa",yi:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9","yi-DE":"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",zh:"\u4e2d\u6587","zh-HANS":"\u4e2d\u6587\u7b80\u4f53","zh-HANT":"\u4e2d\u6587\u7e41\u9ad4","zh-CN":"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09","zh-HK":"\u4e2d\u6587\uff08\u9999\u6e2f\uff09","zh-SG":"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09","zh-TW":"\u4e2d\u6587\uff08\u53f0\u7063\uff09","zu-ZA":"isiZulu"},zv=m(Object.keys(Us)),bp=zv.next();!bp.done;bp=zv.next()){var Yv=bp.value;Us[Yv.toLowerCase()]=Us[Yv]}function qv(e,t){if(e.lineBreak)return"\n";if(e.nestedCues.length)return e.nestedCues.map(function(s){return qv(s,e)}).join("");if(!e.payload)return e.payload;var n=[],i=e.fontWeight>=ks,r=e.fontStyle==_s,o=e.textDecoration.includes(Wi);return i&&n.push(["b"]),r&&n.push(["i"]),o&&n.push(["u"]),""==(r=e.color)&&t&&(r=t.color),i="",(r=$v(r))&&(i+="."+r),""==(r=e.backgroundColor)&&t&&(r=t.backgroundColor),(t=$v(r))&&(i+=".bg_"+t),i&&n.push(["c",i]),n.reduceRight(function(s,u){var a=m(u);return"<"+(u=a.next().value)+(void 0===(a=a.next().value)?"":a)+">"+s+"</"+u+">"},e.payload)}function $v(e){var t=(e=e.toLowerCase()).replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(256|parseInt(t[1],10)).toString(16).slice(1)+(256|parseInt(t[2],10)).toString(16).slice(1)+(256|parseInt(t[3],10)).toString(16).slice(1):e.startsWith("#")&&e.length>
17&&(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 Rp(e,t){for(var n=[],i=(e=m(Jv(e))).next();!i.done;i=e.next())if((i=i.value).isContainer)n.push.apply(n,ee(Rp(i.nestedCues,i)));else{var r=i.clone();r.nestedCues=[],r.payload=qv(i,t),n.push(r)}return n}function Jv(e){for(var t=[],n=(e=m(e)).next(),i={};!n.done;i={kg:void 0},n=e.next())i.kg=n.value,t.some(function(r){return function(o){return su(r.kg,o)}}(i))||t.push(i.kg);return t}function EA(e){function t(i){for(var r=5381,o=i.length;o;)r=33*r^i.charCodeAt(--o);return(r>>>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"center"==e.textAlign&&"center"!=n.align&&(n.align="middle"),"vertical-lr"==e.writingMode?n.vertical="lr":"vertical-rl"==e.writingMode&&(n.vertical="rl"),1==e.lineInterpretation&&(n.snapToLines=!1),null!=e.line&&(n.line=e.line),null!=e.position&&(n.position=e.position),n}function Zv(e,t){var n=Rp(t),i=[];t=e.cues?Array.from(e.cues):[];for(var r=(n=m(n)).next(),o={};!r.done;o={sd:void 0},r=n.next())o.sd=r.value,!t.some(function(s){return function(u){return u.startTime==s.sd.startTime&&u.endTime==s.sd.endTime&&u.text==s.sd.payload}}(o))&&o.sd.payload&&(r=EA(o.sd))&&i.push(r);for(n=(t=m(t=i.slice().sort(function(s,u){return s.startTime!=u.startTime?s.startTime-u.startTime:s.endTime!=u.endTime?s.endTime-u.startTime:"line"in VTTCue.prototype?i.indexOf(u)-i.indexOf(s):i.indexOf(s)-i.indexOf(u)}))).next();!n.done;n=t.next())e.addCue(n.value)}function Np(e,t){var n=!1;"disabled"===e.mode&&(n=!0,e.mode="hidden");for(var i=0;i<e.cues.length;){var r=e.cues[i];t(r)?e.removeCue(r):i++}n&&(e.mode="disabled")}function Dn(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.o=null,this.C=function(){t.l.La(t.i,"textchanged",t.m),t.l.La(t.j.textTracks,"change",t.B);for(var n=m(t.h.values()),i=n.next();!i.done;i=n.next())i.value.remove();t.h.clear(),t.g=-1,t.j=null},this.m=function(){for(var n=new Map,i=t.i.Hc(),r=(i=m(i)).next();!r.done;r=i.next()){if(t.h.has((r=r.value).id)){var o=t.h.get(r.id);r.active||"disabled"===o.track.mode||(o.track.mode="disabled"),t.h.delete(r.id)}else{(o=t.j.ownerDocument.createElement("track")).kind=IA(r);var s=o,u=void 0;if(r.label)u=r.label;else if(r.language)if(r.language in Us)u=Us[r.language];else{var a=pe(r.language);a in Us&&(u=Us[a]+" ("+r.language+")")}u||(u=r.originalTextId,r.language&&r.language!==r.originalTextId&&(u+=" ("+r.language+")")),s.label=u,r.language in Us&&(o.srclang=r.language),"CHROMIUM"===Ne().Ca()&&(o.src="data:,WEBVTT"),o.track.mode="disabled",t.j.appendChild(o)}n.set(r.id,o),r.active&&(t.g=r.id)}for(r=(i=m(t.h.values())).next();!r.done;r=i.next())r.value.remove();t.g>-1&&(n.has(t.g)?"disabled"===(i=n.get(t.g).track).mode&&(i.mode=t.u?"showing":"hidden"):t.g=-1),t.h=n},this.B=function(){if(!t.o){var n=t.j;t.o=new E(function(){if(t.o=null,t.j===n){var i=-1,r=!1;if(t.h.has(t.g)){var o=t.h.get(t.g);"showing"===o.track.mode?(i=t.g,r=!0):"hidden"===o.track.mode&&(i=t.g)}if(!r)for(o=(r=m(t.h)).next();!o.done;o=r.next()){var s=m(o.value);if(o=s.next().value,"showing"===(s=s.next().value).track.mode){i=o;break}i<0&&"hidden"===s.track.mode&&(i=o)}for(o=(r=m(t.h)).next();!o.done;o=r.next())o=(s=m(o.value)).next().value,s=s.next().value,o!==i&&"disabled"!==s.track.mode&&(s.track.mode="disabled");t.g!==i&&(t.g=i,i>-1&&t.i.mh({id:i})),t.i.rh(i>-1&&"showing"===t.h.get(i).track.mode)}}).ka(0)}},this.l.F(e,"loaded",function(){return t.enableTextDisplayer()}),this.enableTextDisplayer()}function IA(e){var t=Ne();return e.forced&&"WEBKIT"===t.Ca()?"forced":"caption"===e.kind||e.roles&&e.roles.some(function(n){return n.includes("transcribes-spoken-dialog")})&&e.roles.some(function(n){return n.includes("describes-music-and-sound")})?"captions":"subtitles"}function ti(e,t){for(be("SimpleTextDisplayer","Please migrate to NativeTextDisplayer"),this.h=e,this.i=t,this.g=null,t=(e=m(Array.from(this.h.textTracks))).next();!t.done;t=e.next())"metadata"!==(t=t.value).kind&&"chapters"!==t.kind&&(t.mode="disabled",t.label==this.i&&(this.g=t));this.g&&(this.g.mode="hidden")}function Qv(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}function ni(){}function ii(e,t){var n=this;this.m=!1,this.h=[],this.j=e,this.o=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 E(function(){n.j.paused||Bs(n)}),El(this),this.l=new Map,this.i=new et,this.i.F(document,"fullscreenchange",function(){Bs(n,!0)}),this.i.F(this.j,"seeking",function(){Bs(n,!0)}),this.i.F(this.j,"ratechange",function(){El(n)}),this.i.F(this.j,"resize",function(){var i=n.j,r=i.videoWidth;i=i.videoHeight,n.u=r&&i?r/i:null}),this.D=null,"ResizeObserver"in X&&(this.D=new ResizeObserver(function(){Bs(n,!0)}),this.D.observe(this.g)),this.G=new Map}function El(e){e.B&&(e.h.length?e.B.Ha((e.C?e.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.j.playbackRate))):e.B.stop())}function CA(e,t){for(;null!=t;){if(t==e.g)return!0;t=t.parentElement}return!1}function ey(e,t,n,i,r){for(var o=!1,s=[],u=[],a=(t=m(t)).next();!a.done;a=t.next()){r.push(a=a.value);var l=e.l.get(a),c=a.startTime<=i&&a.endTime>i,d=l?l.gj:null;l&&(s.push(l.mg),l.Zc&&s.push(l.Zc),c||(o=!0,e.l.delete(a),l=null)),c&&(u.push(a),l?CA(e,d)||(o=!0):(MA(e,a,r),d=(l=e.l.get(a)).gj,o=!0)),a.nestedCues.length>0&&d&&ey(e,a.nestedCues,d,i,r),r.pop()}if(o){for(r=(i=m(s)).next();!r.done;r=i.next())(r=r.value).parentElement&&r.parentElement.removeChild(r);for(u.sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime-g.endTime}),i=(u=m(u)).next();!i.done;i=u.next())(i=e.l.get(i.value)).Zc?(i.Zc.contains(n)&&i.Zc.removeChild(n),n.appendChild(i.Zc),i.Zc.appendChild(i.mg)):n.appendChild(i.mg)}}function Bs(e,t){if(e.g){var n=e.j.currentTime;
1if(!e.m||void 0!==t&&t){for(var i=(t=m(e.G.values())).next();!i.done;i=t.next())cl(i.value);cl(e.g),e.l.clear(),e.G.clear()}e.m&&ey(e,e.h,e.g,n,[])}}function MA(e,t,n){var i=n.length>1,r=i?"span":"div";t.lineBreak&&(r="br"),t.rubyTag&&(r=t.rubyTag),i=!i&&t.nestedCues.length>0;var o=document.createElement(r);if("br"!=r&&function _A(e,t,n,i,r){var o=t.style,s=0==n.nestedCues.length,u=i.length>1;o.whiteSpace="pre-wrap";var a=n.payload.replace(/\s+$/g,function(c){return"\xa0".repeat(c.length)});if(o.webkitTextStrokeColor=n.textStrokeColor,o.webkitTextStrokeWidth=n.textStrokeWidth,o.color=n.color,o.direction=n.direction,o.opacity=n.opacity,o.paddingLeft=Op(n.linePadding,n,e.o),o.paddingRight=Op(n.linePadding,n,e.o),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),r||((t=function DA(e,t){for(var n=e.length-1;n>=0;n--){var i=t(e[n]);if(i||0===i)return i}return null}(i,function(c){return c.backgroundColor}))?l.style.backgroundColor=t:a&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)")),a&&(l.setAttribute("translate","no"),l.textContent=a)}u&&!i[i.length-1].isContainer?o.display="inline":(o.display="flex",o.flexDirection="column",o.alignItems="center","left"==n.textAlign||"start"==n.textAlign?(o.width="100%",o.alignItems="start"):("right"==n.textAlign||"end"==n.textAlign)&&(o.width="100%",o.alignItems="end"),o.justifyContent="before"==n.displayAlign?"flex-start":"center"==n.displayAlign?"center":"flex-end"),s||(o.margin="0"),o.fontFamily=n.fontFamily,o.fontWeight=n.fontWeight.toString(),o.fontStyle=n.fontStyle,o.letterSpacing=n.letterSpacing,o.fontSize=Op(n.fontSize,n,e.o,e.C?e.C.fontScaleFactor:1),null!=(i=n.line)&&((s=n.lineInterpretation)==lu&&(s=1,u=16,e.u&&e.u<1&&(u=32),i=i<0?100+i/u*100:i/u*100),1==s&&(o.position="absolute",n.writingMode==Go?(o.width="100%",n.lineAlign==Ko?o.top=i+"%":"end"==n.lineAlign&&(o.bottom=100-i+"%")):"vertical-lr"==n.writingMode?(o.height="100%",n.lineAlign==Ko?o.left=i+"%":"end"==n.lineAlign&&(o.right=100-i+"%")):(o.height="100%",n.lineAlign==Ko?o.right=i+"%":"end"==n.lineAlign&&(o.left=100-i+"%")))),o.lineHeight=n.lineHeight,"line-left"==(e=function kA(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==Bu?n:"left"===e||"start"===e&&t===au||"end"===e&&"rtl"===t?"line-left":"right"===e||"start"===e&&"rtl"===t||"end"===e&&t===au?"line-right":"center"}(n))?(o.cssFloat="left",null!==n.position&&(o.position="absolute",n.writingMode==Go?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%")):"line-right"==e?(o.cssFloat="right",null!==n.position&&(o.position="absolute",n.writingMode==Go?(o.right=100-n.position+"%",o.width="auto"):o.bottom=n.position+"%")):null!==n.position&&50!=n.position&&(o.position="absolute",n.writingMode==Go?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%"),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==Go?o.width=n.size+"%":o.height=n.size+"%")}(e,o,t,n,i),n=null,t.region&&t.region.id){var s=t.region,u=e.u===4/3?2.5:1.9;if(e.G.has(n=s.id+"_"+s.width+"x"+s.height+(s.heightUnits==xi?"%":"px")+"-"+s.viewportAnchorX+"x"+s.viewportAnchorY+(s.viewportAnchorUnits==xi?"%":"px")))n=e.G.get(n);else{r=document.createElement("span");var a=s.heightUnits==xi?"%":"px",l=s.widthUnits==xi?"%":"px",c=s.viewportAnchorUnits==xi?"%":"px";r.id="shaka-text-region---"+n,r.classList.add("shaka-text-region"),r.style.position="absolute";var d=s.height,f=s.width;2===s.heightUnits&&(d=5.33*s.height,a="%"),2===s.widthUnits&&(f=s.width*u,l="%"),r.style.height=d+a,r.style.width=f+l,2===s.viewportAnchorUnits?(u=s.viewportAnchorY/75*100,a=s.viewportAnchorX/(e.u===4/3?160:210)*100,a-=s.regionAnchorX*f/100,r.style.top=(u-=s.regionAnchorY*d/100)+"%",r.style.left=a+"%"):(r.style.top=s.viewportAnchorY-s.regionAnchorY*d/100+c,r.style.left=s.viewportAnchorX-s.regionAnchorX*f/100+c),0!==s.heightUnits&&0!==s.widthUnits&&0!==s.viewportAnchorUnits&&(s=Math.max(0,Math.min(100-(parseInt(r.style.width.slice(0,-1),10)||0),parseInt(r.style.left.slice(0,-1),10)||0)),r.style.top=Math.max(0,Math.min(100-(parseInt(r.style.height.slice(0,-1),10)||0),parseInt(r.style.top.slice(0,-1),10)||0))+"%",r.style.left=s+"%"),r.style.display="flex",r.style.flexDirection="column",r.style.alignItems="center",r.style.justifyContent="before"==t.displayAlign?"flex-start":"center"==t.displayAlign?"center":"flex-end",e.G.set(n,r),n=r}}r=o,i&&((r=document.createElement("span")).classList.add("shaka-text-wrapper"),r.style.backgroundColor=t.backgroundColor,r.style.lineHeight="normal",o.appendChild(r)),e.l.set(t,{mg:o,gj:r,Zc:n})}function Op(e,t,n,i){i=void 0===i?1:i;
1var r=(r=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(r[1]),unit:r[2]}:null;if(!r)return e;switch(i*=r.value,e=r.unit){case"%":return i/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*i/t.cellResolution.rows+"px";default:return i+e}}function jp(e,t){this.h=e,this.g=t,this.i=void 0,this.u=!1,this.G=!0,this.l=this.C=!1,this.o=this.m=void 0,this.B=0,this.H=!1,this.D=new et,this.j=null}function Up(e){return e.g.sessionId||(e.g.sessionId=X.crypto.randomUUID()),{v:e.g.version,sf:e.i,sid:e.g.sessionId,cid:e.g.contentId,mtp:e.h.getBandwidthEstimate()/1e3}}function ya(e,t,n){n=void 0===n?{}:n;var i=void 0===i?e.g.useHeaders:i;if(e.g.enabled)if(e=function VA(e,t){t=void 0===t?{}:t,Object.assign(t,Up(e)),t.pr=e.h.wb();var n=t.ot===cd||t.ot===dd;return e.C&&n&&(t.bs=!0,t.su=!0,e.C=!1),null==t.su&&(t.su=e.G),t.v===iy&&(e.h.W()&&(t.ltc=e.h.We()),null!=(n=!e.H&&e.o&&e.m?e.o-(e.B||e.m):void 0)&&(t.msd=n,e.H=!0)),function jA(e,t){var n=e.g.includeKeys;return n.length?Object.keys(t).reduce(function(i,r){return n.includes(r)&&(i[r]=t[r]),i},{}):t}(e,t)}(e,n),i)i=function HA(e){for(var t=Object.keys(e),n={},i=["Object","Request","Session","Status"],r=[{},{},{},{}],o={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3},s=(t=m(t)).next();!s.done;s=t.next())r[null!=o[s=s.value]?o[s]:1][s]=e[s];for(e=0;e<r.length;e++)(o=ad(r[e]))&&(n["CMCD-"+i[e]]=o);return n}(e),Object.keys(i).length&&Object.assign(t.headers,i);else{var r=ad(e);r&&(t.uris=t.uris.map(function(o){return Bp(o,r)}))}}function ty(e,t){if(!(t=e.h.Wb()[t]).length)return 0;var n=e.h.getCurrentTime();return(e=t.find(function(i){return i.start<=n&&i.end>=n}))?1e3*(e.end-n):0}function ad(e){function t(d){return 100*n(d/100)}function n(d){return Math.round(d)}for(var d,r=[],o={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(d){return encodeURIComponent(d)},rtp:t,tb:n},s=Object.keys(e||{}).sort(),u=(s=m(s)).next();!u.done;u=s.next()){var a=e[u=u.value];if(d=a,!(Number.isNaN(d)||null==d||""===d||!1===d||"v"===u&&1===a||"pr"==u&&1===a)){var c,l=o[u];l&&(a=l(a)),c="string"==(l=typeof a)&&"ot"!==u&&"sf"!==u&&"st"!==u?u+"="+JSON.stringify(a):"boolean"===l?u:"symbol"===l?u+"="+a.description:u+"="+a,r.push(c)}}return r.join(",")}function Bp(e,t){return!t||e.includes("offline:")?e:((e=new O(e)).g.set("CMCD",t),e.toString())}(h=Dn.prototype).configure=function(){},h.remove=function(e,t){return!!this.i&&(this.h.has(this.g)&&Np(this.h.get(this.g).track,function(n){return n.startTime<t&&n.endTime>e}),!0)},h.append=function(e){this.h.has(this.g)&&Zv(this.h.get(this.g).track,e)},h.destroy=function(){return this.i&&(this.j&&this.C(),this.i=null),this.l&&(this.l.release(),this.l=null),Promise.resolve()},h.isTextVisible=function(){return this.u},h.setTextVisibility=function(e){if(this.u=e,this.h.has(this.g)){var t=this.h.get(this.g).track;"disabled"!==t.mode&&t.mode!==(e=e?"showing":"hidden")&&(t.mode=e)}else if(this.i&&3===this.i.m)if(t=Array.from(this.i.h.textTracks).filter(function(i){return["captions","subtitles","forced"].includes(i.kind)}),e){e=null;for(var n=(t=m(t)).next();!n.done;n=t.next()){if("showing"===(n=n.value).mode){e=null;break}e||"hidden"!==n.mode||(e=n)}e&&(e.mode="showing")}else for(t=(e=m(t)).next();!t.done;t=e.next())"showing"===(t=t.value).mode&&(t.mode="hidden")},h.setTextLanguage=function(){},h.enableTextDisplayer=function(){!this.j&&this.i&&2===this.i.m&&(this.j=this.i.h,this.l.Aa(this.i,"unloading",this.C),this.l.F(this.i,"textchanged",this.m),this.l.F(this.j.textTracks,"change",this.B),this.m())},ue("shaka.text.NativeTextDisplayer",Dn),Dn.prototype.enableTextDisplayer=Dn.prototype.enableTextDisplayer,Dn.prototype.setTextLanguage=Dn.prototype.setTextLanguage,Dn.prototype.setTextVisibility=Dn.prototype.setTextVisibility,Dn.prototype.isTextVisible=Dn.prototype.isTextVisible,Dn.prototype.destroy=Dn.prototype.destroy,Dn.prototype.append=Dn.prototype.append,Dn.prototype.remove=Dn.prototype.remove,Dn.prototype.configure=Dn.prototype.configure,(h=ti.prototype).configure=function(){},h.remove=function(e,t){return!!this.g&&(Np(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0)},h.append=function(e){this.g&&Zv(this.g,e)},h.destroy=function(){return this.g&&(Np(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},h.isTextVisible=function(){return!!this.g&&"showing"==this.g.mode},h.setTextVisibility=function(e){e&&!this.g&&Qv(this),this.g&&(this.g.mode=e?"showing":"hidden")},h.setTextLanguage=function(){},h.enableTextDisplayer=function(){Qv(this)},ue("shaka.text.SimpleTextDisplayer",ti),ti.prototype.enableTextDisplayer=ti.prototype.enableTextDisplayer,ti.prototype.setTextLanguage=ti.prototype.setTextLanguage,ti.prototype.setTextVisibility=ti.prototype.setTextVisibility,ti.prototype.isTextVisible=ti.prototype.isTextVisible,ti.prototype.destroy=ti.prototype.destroy,ti.prototype.append=ti.prototype.append,ti.prototype.remove=ti.prototype.remove,ti.prototype.configure=ti.prototype.configure,(h=ni.prototype).configure=function(){},h.remove=function(){},h.append=function(){},h.destroy=function(){},h.isTextVisible=function(){return!1},h.setTextVisibility=function(){},h.setTextLanguage=function(){},h.enableTextDisplayer=function(){},ue("shaka.text.StubTextDisplayer",ni),ni.prototype.enableTextDisplayer=ni.prototype.enableTextDisplayer,ni.prototype.setTextLanguage=ni.prototype.setTextLanguage,ni.prototype.setTextVisibility=ni.prototype.setTextVisibility,ni.prototype.isTextVisible=ni.prototype.isTextVisible,ni.prototype.destroy=ni.prototype.destroy,ni.prototype.append=ni.prototype.append,ni.prototype.remove=ni.prototype.remove,ni.prototype.configure=ni.prototype.configure,(h=ii.prototype).configure=function(e){this.C=e,El(this),Bs(this,!0)},h.append=function(e){for(var t=[].concat(ee(this.h)),n=(e=m(Jv(e))).next(),i={};!n.done;i={lg:void 0},n=e.next())i.lg=n.value,t.some(function(r){return function(o){return su(o,r.lg)}}(i))||this.h.push(i.lg);this.h.length&&El(this),Bs(this)},h.destroy=function(){return this.g&&(this.g.parentElement&&this.o.removeChild(this.g),this.g=null,this.m=!1,this.h=[],this.B&&(this.B.stop(),this.B=null),this.l.clear(),this.i&&(this.i.release(),this.i=null),this.D&&(this.D.disconnect(),this.D=null)),Promise.resolve()},h.remove=function(e,t){if(!this.g)return!1;var n=this.h.length;return this.h=this.h.filter(function(i){return i.startTime<e||i.endTime>=t}),Bs(this,n>this.h.length),this.h.length||El(this),!0},h.isTextVisible=function(){return this.m},h.setTextVisibility=function(e){(this.m=e)?(this.g.parentElement||this.o.appendChild(this.g),Bs(this,!0)):this.g.parentElement&&this.o.removeChild(this.g)},h.setTextLanguage=function(e){this.g.setAttribute("lang",e&&"und"!=e?e:"")},h.enableTextDisplayer=function(){},ue("shaka.text.UITextDisplayer",ii),ii.prototype.enableTextDisplayer=ii.prototype.enableTextDisplayer,ii.prototype.setTextLanguage=ii.prototype.setTextLanguage,ii.prototype.setTextVisibility=ii.prototype.setTextVisibility,ii.prototype.isTextVisible=ii.prototype.isTextVisible,ii.prototype.remove=ii.prototype.remove,ii.prototype.destroy=ii.prototype.destroy,ii.prototype.append=ii.prototype.append,ii.prototype.configure=ii.prototype.configure,ue("shaka.text.WebVttGenerator",function(){}),jp.prototype.setMediaElement=function(e){this.j=e,function OA(e){e.D.Aa(e.j,"play",function(){e.m||(e.m=Date.now())}),e.D.Aa(e.j,"playing",function(){e.o||(e.o=Date.now())})}(this)},jp.prototype.configure=function(e){this.g=e};var cd="v",dd="av",iy=2;function Er(e){this.h=e,this.g=null}
1function ry(e){return!e||"false"!==e.toLowerCase()&&(/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""))}ue("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",Sl:"ld",HLS:"h",Tl:"lh",im:"s",OTHER:"o"}),(h=Er.prototype).configure=function(e){this.h=e},h.ci=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(sy)?1e3*this.g.get(sy):null},h.ai=function(){return this.h.enabled&&this.g&&this.g.has(oy)?1e3*this.g.get(oy):null},h.Uj=function(){return this.h.enabled&&this.g&&this.g.has(uy)?this.g.get(uy):null},h.Vj=function(){return this.h.enabled&&this.g&&this.g.has(ay)?this.g.get(ay):null},h.getBandwidthEstimate=function(e){var t=this.ai();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return n>0&&n<=1?e*(1-n)+t*n:e},ue("shaka.util.CmsdManager",Er),Er.prototype.getBandwidthEstimate=Er.prototype.getBandwidthEstimate,Er.prototype.getRoundTripTime=Er.prototype.Vj,Er.prototype.getResponseDelay=Er.prototype.Uj,Er.prototype.getEstimatedThroughput=Er.prototype.ai,Er.prototype.getMaxBitrate=Er.prototype.ci;var oy="etp",sy="mb",uy="rd",ay="rtt";function ly(){this.g=null,this.h=[]}function Vp(e,t){return L(function(n){if(1==n.g)return e.g?x(n,new Promise(function(i){return e.h.push(i)}),2):n.A(2);e.g=t,Z(n)})}function W(e,t,n){t=void 0===t?null:t,vt.call(this);var i=this;this.m=Sd,this.h=null,this.ye=t,this.ea=!1,this.De=new et,this.se=new et,this.j=new et,this.cc=new et,this.wc=new et,this.G=this.H=this.D=this.J=null,this.Fe=0,this.ma=new ly,this.O=this.ia=this.X=this.i=this.vc=this.I=this.l=this.pe=this.T=this.Lh=this.wa=this.M=this.bb=this.ya=this.re=this.R=this.Fa=this.L=this.$b=null,this.Pa=!1,this.ab=this.u=null,this.xe=1e9,this.Ce=[],this.cb=[],this.Yf=-1,this.g=mo(this),this.$f={streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}},this.V=null,this.Ge=-1,this.bc=null,this.xa={width:1/0,height:1/0},this.we=new Xh(this.g,this.xa,null),this.Ae=[],this.B=null,this.N=this.g.adaptationSetCriteriaFactory(),this.N.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredVariantRole,channelCount:0,Ic:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,Nc:this.g.preferredAudioLabel,Hd:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Kd:"",He:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount}),this.Cd=this.g.preferredTextLanguage,this.Id=this.g.preferredTextRole,this.ve=this.g.preferForcedSubs,this.ue=[],n&&n(this),this.M=function rE(e){return new jp({getBandwidthEstimate:function(){return e.u?e.u.getBandwidthEstimate():NaN},Wb:function(){return e.Wb()},getCurrentTime:function(){return e.h?e.h.currentTime:0},wb:function(){return e.wb()},Qb:function(){return e.Qb()},Rb:function(){return e.Rb()},W:function(){return e.W()},We:function(){return e.We()}},e.g.cmcd)}(this),this.wa=new Er(this.g.cmsd),this.J=my(this),this.Gd=this.oa=this.Ba=this.C=null,this.cg=!1,this.Zf=[],this.ag=new E(function(){return L(function(r){return 1==r.g?i.oa?x(r,i.hc(i.Gd,!0),3):r.A(0):4!=r.g?x(r,i.load(i.oa),4):(i.cg?i.Gd.pause():i.Gd.play(),i.oa=null,i.cg=!1,void Z(r))})}),Ad&&(this.C=Ad(),this.C.configure(this.g.ads),this.wc.F(this.C,"ad-content-pause-requested",function(r){return L(function(s){if(1==s.g)return i.ag.stop(),i.oa?s.A(0):(i.Gd=i.h,i.cg=i.$d(),x(s,i.Vh(!0,r.saveLivePosition||!1),3));i.oa=s.h,Z(s)})}),this.wc.F(this.C,"ad-content-resume-requested",function(r){if(r=r.offset||0,i.oa){var o=i.oa;o.m&&r&&("number"==typeof o.m?o.m+=r:o.m.setTime(o.m.getTime()+1e3*r))}i.ag.ka(.1)}),this.wc.F(this.C,"ad-content-attach-requested",function(){return L(function(r){return i.h||!i.Gd?r.A(0):x(r,i.hc(i.Gd,!0),0)})})),Ed&&(this.Ba=Ed(this),this.Ba.configure(this.g.queue)),this.De.F(X,"online",function(){$p(i),i.gh()}),this.ze=new E(function(){for(var r=Date.now()/1e3,o=!1,s=!0,u=m(i.i.variants),a=u.next();!a.done;a=u.next())(a=a.value).disabledUntilTime>0&&a.disabledUntilTime<=r&&(a.disabledUntilTime=0,o=!0),a.disabledUntilTime>0&&(s=!1);s&&i.ze.stop(),o&&Iu(i,!1,void 0,!1,!1)}),this.Qa=null,e&&(be("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.hc(e,!0)),this.o=null}function vd(e){null!=e.T&&(ys(e.T),e.T.release(),e.T=null)}function Lt(e,t){return new re(e,t)}function cy(e,t){jy.set(e,t)}function Ta(e,t){e.dispatchEvent(Lt("onstatechange",(new Map).set("state",t)))}function Hp(e,t){var n;return L(function(i){return 1==i.g?(n=++e.Fe,x(i,Vp(e.ma,t),2)):n!=e.Fe?(e.ma.release(),i.return(!0)):i.return(!1)})}function dy(e,t){var n,i,r;
1return t=void 0!==t&&t,L(function(o){if(1==o.g)return n=null,e.i&&e.I&&e.vc&&e.X&&e.g?(i=e.h.currentTime,e.W()&&!t&&(i=null),x(o,py(e,e.X,i,e.ia,e.g,!0,!1,!1),3)):o.A(2);if(2!=o.g){e.Ae.push(n=o.h),e.I&&e.I.setMediaElement&&e.I.setMediaElement(null),(r=e.l?e.l.o:null)&&(n.o=r);var s=n,u=e.I,a=e.vc;s.h=e.i,s.l=u,s.I=a,n.C=e.N,n.start(),e.i=null,e.I=null,e.vc=null,e.u=null,e.ab=null}return o.return(n)})}function hy(e,t,n,i,r,o){var u,a,l,c;return r=void 0!==r&&r,L(function(d){return 1==d.g?i?d.A(2):x(d,fy(e,t),3):(2!=d.g&&(i=d.h),function XA(e,t){if(!_o(Ne()))return!0;if(t){if(""==(e.h||yu()).canPlayType(t))return!1;if(!_o(Ne())||!ta.has(t))return!0;if(oo(t))return"WEBKIT"===Ne().Ca()&&(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("application/dash+xml"===t||"video/vnd.mpeg.dash.mpd"===t)return e.g.streaming.preferNativeDash}return!1}(e,i)?d.return(null):(u=o||e.g,a=!1,l=!0,r&&(e.u&&e.ab==u.abrFactory&&(l=!1),e.h&&"AUDIO"===e.h.nodeName&&(a=!0)),c=(c=py(e,t,n,i||null,u,!r,a,l)).then(r?function(f){return f.D=!1,f}:function(f){return e.Ae.push(f),f}),d.return(c)))})}function py(e,t,n,i,r,o,s,u){var a,l,c,d,g,v,y,T,S,A,I,_;return o=void 0===o||o,s=void 0!==s&&s,u=void 0===u||u,L(function(M){return 1==M.g?(a=null,l=rr(r),s&&(l.manifest.disableVideo=!0),c=function(){return a.T&&a.u?null:a},d=function(){return c()?c().getConfiguration():e.g},e.xa.width!=1/0||e.xa.height!=1/0||e.g.ignoreHardwareResolution?M.A(2):x(M,Ne().kc(),3)):(2!=M.g&&(e.xa.width=(g=M.h).width,e.xa.height=g.height),v=new Xh(l,e.xa,null),y={networkingEngine:e.J,filter:function(D){var j;return L(function(U){return 1==U.g?x(U,Dm(v,D),2):4!=U.g?U.h?(j=Lt("trackschanged"),x(U,Promise.resolve(),4)):U.A(0):(a.dispatchEvent(j),void Z(U))})},makeTextStreamsForClosedCaptions:function(D){return function lE(e,t){for(var n=new Set,i=m(t.textStreams),r=i.next();!r.done;r=i.next())"application/cea-608"!=(r=r.value).mimeType&&"application/cea-708"!=r.mimeType||n.add(r.originalId);
1for(r=(i=m(t.variants)).next();!r.done;r=i.next())if((r=r.value.video)&&r.closedCaptions)for(var o=m(r.closedCaptions.keys()),s=o.next();!s.done;s=o.next())if(!n.has(s=s.value)){var u=s.startsWith("CC")?"application/cea-608":"application/cea-708",a=new rn,l=r.closedCaptions.get(s);u={id:e.xe++,originalId:s,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:a,mimeType:u,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Pe,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:r.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([dn(u,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(u),n.add(s)}}(e,D)},onTimelineRegionAdded:function(D){fp(a.J,D)},onEvent:function(D){return a.dispatchEvent(D)},onError:function(D){return a.onError(D)},isLowLatencyMode:function(){return d().streaming.lowLatencyMode},updateDuration:function(){e.l&&a.T&&e.l.updateDuration()},newDrmInfo:function(D){var R=a.i,j=R?R.g:null;j&&R.B&&bm(v,j.keySystem,D)},onManifestUpdated:function(){var D=(new Map).set("isLive",e.W());a.dispatchEvent(Lt("manifestupdated",D)),xl(a,!1,function(){e.C&&e.C.onManifestUpdated(e.W())})},getBandwidthEstimate:function(){return e.u.getBandwidthEstimate()},onMetadata:function(D,R,j,U){var B=D;"com.apple.hls.interstitial"==D&&(B="com.apple.quicktime.HLS",D={startTime:R,endTime:j,values:U},e.C)&&e.C.onHLSInterstitialMetadata(e,e.h,D),D=(U=m(U)).next();for(var H={};!D.done;H={Zg:void 0},D=U.next())H.Zg=D.value,"ID"!=H.Zg.name&&xl(a,!1,function(G){return function(){Xp(e,R,j,B,G.Zg)}}(H))},disableStream:function(D){return e.disableStream(D,e.g.streaming.maxDisabledTime)},addFont:function(D,R){return e.addFont(D,R)}},(T=new fl(function(){return e.Ta()})).addEventListener("regionadd",function(D){var R=D.region;Ml(e,"timelineregionadded",R,a),xl(a,!1,function(){e.C&&(e.C.onDashTimedMetadata(R),e.C.onDASHInterstitialMetadata(e,e.h,R))})}),S=null,l.streaming.observeQualityChanges&&((S=new Wc(function(){return e.Wb()})).addEventListener("qualitychange",function(D){by(e,D.quality,D.position)}),S.addEventListener("audiotrackchange",function(D){by(e,D.quality,D.position,!0)})),A=!0,I={sc:e.J,onError:function(D){return a.onError(D)},uf:function(D){xl(a,!0,function(){e.D&&function dE(e,t){var n=Lt("keystatuschanged");e.dispatchEvent(n);var i=Object.keys(t);1==i.length&&""==i[0]&&(i=["00"],t={"00":t[""]});var r=1==i.length&&"00"==i[0];if(n=!1,i.length){i=e.keySystem();for(var o=Zu(e.g.drm.clearKeys),s=function(v,y){v.allowedByKeySystem=!0;for(var T=(y=m(y)).next();!T.done;T=y.next())T=T.value,((T=t[r?"00":T])||e.D.M)&&(v.allowedByKeySystem=v.allowedByKeySystem&&!!T&&!Nm.includes(T))},u=m(e.i.variants),a=u.next();!a.done;a=u.next())for(var l=jh(a=a.value),c=(l=m(l)).next();!c.done;c=l.next()){var d=a.allowedByKeySystem;if((c=c.value).keyIds.size)if(c.drmInfos.length&&!o.size&&"HLS"==e.i.type)for(var f=m(c.drmInfos),g=f.next();!g.done;g=f.next())(g=g.value).keySystem==i&&s(a,g.keyIds.size?g.keyIds:c.keyIds);else s(a,c.keyIds);d!=a.allowedByKeySystem&&(n=!0)}}n&&(Ci(e),!is(e))||(n=e.l.o)&&!n.allowedByKeySystem&&Iu(e)}(e,D)})},onExpirationUpdated:function(D,R){var j=Lt("expirationupdated");a.dispatchEvent(j),(j=a.l)&&j.onExpirationUpdated&&j.onExpirationUpdated(D,R)},onEvent:function(D){a.dispatchEvent(D),"drmsessionupdate"==D.type&&A&&(A=!1,D=Date.now()/1e3-a.Fa,(e.B||a.getStats()).m=D,e.T&&ys(e.T))}},_=my(e,c),am(e.J,_),a=new Ar(t,i,n,{config:l,xk:y,Ik:T,Hk:S,kd:function(){return e.kd(I)},wk:v,networkingEngine:_,kj:o,jj:u}),u||function yA(e,t,n){e.j=t,e.G=n}(a,e.u,e.ab),M.return(a))})}function fy(e,t){var i;return L(function(s){return 1==s.g?x(s,Eu(t,e.J,e.g.manifest.retryParameters),2):("application/x-mpegurl"==(i=s.h)&&"WEBKIT"===Ne().Ca()&&(i="application/vnd.apple.mpegurl"),"video/quicktime"==i&&"CHROMIUM"===Ne().Ca()&&(i="video/mp4"),s.return(i))})}function Gp(e){var t=e.g.textDisplayFactory;if(e.Kh!==t){var n=e.o;e.o=t(),e.o.configure?e.o.configure(e.g.textDisplayer):be("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.o.setTextLanguage||be("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),n?(e.o.setTextVisibility(n.isTextVisible()),n.destroy().catch(function(){})):e.o.setTextVisibility(e.ea),e.H&&function fS(e,t){e.ia=t,e.h&&(e.h.j=t)}(e.H,e.o),e.Kh=t,e.l&&function BS(e){var t=e.h.get(Pe);t&&pa(e,t.stream,!0,0,!0)}(e.l)}else e.o&&e.o.configure&&e.o.configure(e.g.textDisplayer)}function Kp(e){var t;return L(function(r){if(1==r.g)return Ne(),Ta(e,"media-source"),e.g.mediaSource.useSourceElements&&Uc(e.h),Gp(e),t=function iE(e,t,n,i,r){return new ev(e,t,n,r,i)}(e.h,e.o,{Kj:function(){return e.keySystem()},onMetadata:function(o,s,u){for(var a=(o=m(o)).next();!a.done;a=o.next())if((a=a.value).data&&"number"==typeof a.cueTime&&a.frames){var l=a.cueTime+s,c=u;c&&l>c&&(c=l);for(var d=m(a.frames),f=d.next();!f.done;f=d.next())Xp(e,l,c,"org.id3",f.value);e.C&&e.C.onHlsTimedMetadata(a,l)}},Ck:function(o){e.bb&&fp(e.bb,{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),t.Fa=e.g.manifest.segmentRelativeVttTiming,x(r,t.L,2);e.H=t,Z(r)})}function gy(e,t,n){function i(){return Yp(e)}if(e.j.F(t,"playing",i),e.j.F(t,"pause",i),e.j.F(t,"ended",i),e.j.F(t,"ratechange",function(){var o=e.h.playbackRate;0!=o&&(e.L&&(e.L.set(o),e.m==di&&e.u.playbackRateChanged(o),Iy(e,o)),o=Lt("ratechange"),e.dispatchEvent(o))}),t.remote&&(e.j.F(t.remote,"connect",function(){e.l&&"connected"==t.remote.state&&Cu(e),Ci(e)}),e.j.F(t.remote,"connecting",function(){return Ci(e)}),e.j.F(t.remote,"disconnect",function(){return L(function(o){if
1(1==o.g)return e.l&&"disconnected"==t.remote.state?x(o,Jc(e.l),3):o.A(2);2!=o.g&&Cu(e),Ci(e),Z(o)})})),t.audioTracks&&(e.j.F(t.audioTracks,"addtrack",function(){return Ci(e)}),e.j.F(t.audioTracks,"removetrack",function(){return Ci(e)}),e.j.F(t.audioTracks,"change",function(){return Ci(e)})),t.videoTracks&&(e.j.F(t.videoTracks,"addtrack",function(){return Ci(e)}),e.j.F(t.videoTracks,"removetrack",function(){return Ci(e)}),e.j.F(t.videoTracks,"change",function(){return Ci(e)})),t.textTracks){var r=function(){e.m===$i&&e.o instanceof Dn&&Cu(e),Ci(e)};e.j.F(t.textTracks,"addtrack",function(o){if(o.track)switch(o=o.track,o.kind){case"metadata":!function ZA(e,t){if("metadata"==t.kind){t.mode="hidden",e.j.F(t,"cuechange",function(){if(t.activeCues)for(var i=m(t.activeCues),r=i.next();!r.done;r=i.next())Xp(e,(r=r.value).startTime,r.endTime,r.type,r.value),e.C&&e.C.onCueMetadataChange(r.value);if(t.cues){i=[];for(var o=(r=m(t.cues)).next(),s={};!o.done;s={Bc:void 0},o=r.next())s.Bc=o.value,"com.apple.quicktime.HLS"==s.Bc.type&&null!=s.Bc.startTime&&((o=i.find(function(u){return function(a){return a.startTime==u.Bc.startTime&&a.endTime==u.Bc.endTime}}(s)))||i.push(o={startTime:s.Bc.startTime,endTime:s.Bc.endTime,values:[]}),o.values.push(s.Bc.value));for(r=(i=m(i)).next();!r.done;r=i.next())(r=r.value).values.some(function(u){return"X-ASSET-URI"==u.key||"X-ASSET-LIST"==u.key})&&e.C&&(r.values.push({key:"CUE",description:"",data:0!=r.startTime||e.W()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),e.C.onHLSInterstitialMetadata(e,e.h,r))}});var n=new E(function(){for(var i=function uE(e){return Array.from(e.h.textTracks).filter(function(t){return"metadata"==t.kind})}(e),r=(i=m(i)).next();!r.done;r=i.next())r.value.mode="hidden"}).Lb().ka(.5);e.ue.push(function(){n.stop()})}}(e,o);break;case"chapters":!function QA(e,t){if(t&&"chapters"==t.kind){t.mode="hidden";var n=new E(function(){t.mode="hidden"}).Lb().ka(.5);e.ue.push(function(){n.stop()})}}(e,o);break;default:r()}}),e.j.F(t.textTracks,"removetrack",r),e.j.F(t.textTracks,"change",r),"keep"!==e.g.streaming.crossBoundaryStrategy&&(e.j.F(t,"waiting",function(){e.l&&Cp(e.l)}),e.j.F(t,"timeupdate",function(){e.l&&Cp(e.l)}))}"none"!=t.preload&&e.j.Aa(t,"loadedmetadata",function(){e.B.G=Date.now()/1e3-n})}function Wp(e,t,n){t=(new Map).set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(Lt(n,t))}function Xp(e,t,n,i,r){e.ya&&((t={schemeIdUri:i,startTime:t,endTime:n||1/0,id:"",payload:r}).id=JSON.stringify(t),fp(e.ya,t))}function my(e,t){function n(o){t()?t().dispatchEvent(o):e.dispatchEvent(o)}function i(o){t()?xl(t(),!0,o):o()}t||(t=function(){return null});var r=new Wt(function(o,s,u,a,l){var c=t()?t().j:e.u;c&&c.segmentDownloaded(o,s,u,a,l)},function(o,s,u){n(Lt("downloadheadersreceived",s=(new Map).set("headers",o).set("request",s).set("requestType",u))),i(function(){if(e.wa){var a=e.wa;if(a.h.enabled){var l=o["cmsd-static"];if(l)try{var c=new Map,d=l.split(",");for(l=0;l<d.length;l++){var f=d[l].split("=");c.set(f[0],ry(f[1]))}}catch{}if(c=o["cmsd-dynamic"]){e:{try{var g=new Map,v=c.split(";");for(c=1;c<v.length;c++){var y=v[c].split("=");g.set(y[0],ry(y[1]))}var T=g;break e}catch{T=null;break e}T=void 0}T&&(a.g=T)}}}})},function(o,s){n(Lt("downloadcompleted",o=(new Map).set("request",o).set("response",s)))},function(o,s,u,a){n(Lt("downloadfailed",o=(new Map).set("request",o).set("error",s).set("httpResponseCode",u).set("aborted",a)))},function(o,s,u){i(function(){var a=e.M,l=u;if(l=void 0===l?{}:l,a.g.enabled)if("HEAD"===s.method)ya(a,s);else switch(o){case 0:try{if(a.g.enabled){if(l.type){e:{switch(l.type){case 4:var c=a.l?"ld":"d";break e;case 3:case 2:c=a.l?"lh":"h";break e;case 5:c="s";break e}c=void 0}a.i=c}ya(a,s,{ot:"m",su:!a.u})}}catch(K){fr("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",K)}break;case Xr:try{if(a.g.enabled){var d=s.uris[0],f=l.segment;c=0,f&&(c=f.endTime-f.startTime);var g={d:1e3*c,st:a.h.W()?"l":"v"};g.ot=function UA(e){if(0===e.type)return"i";if(e=e.stream){var t=e.type;if("video"==t)return e.codecs&&e.codecs.includes(",")?dd:cd;if("audio"==t)return"a";if("text"==t)return"application/mp4"===e.mimeType?"tt":"c"}}(l);var v=g.ot===cd||"a"===g.ot||g.ot===dd||"tt"===g.ot,y=l.stream;if(y){var T=a.h.wb();if(v&&(g.bl=function BA(e,t){if(!(t=e.h.Wb()[t]).length)return NaN;var n=e.h.getCurrentTime();return(e=t.find(function(i){return i.start<=n&&i.end>=n}))?1e3*(e.end-n):NaN}(a,y.type),"tt"!==g.ot)){var S=ty(a,y.type);g.dl=T?S/Math.abs(T):S}if(y.bandwidth&&(g.br=y.bandwidth/1e3),y.segmentIndex&&f){var A=y.segmentIndex.Xb(f.endTime,!0,T<0);if(A){var I=A.next().value;if(I&&I!=f){if(d&&!Qs(f.P(),I.P())){var _=I.P()[0],P=new URL(_),b=new URL(d);if(P.origin!==b.origin)var M=_;else{for(var D=P.pathname.split("/").slice(1),R=b.pathname.split("/").slice(1,-1);D[0]===R[0];)D.shift(),R.shift();for(;R.length;)R.shift(),D.unshift("..");M=D.join("/")}g.nor=M}if((I.startByte||I.endByte)&&(f.startByte!=I.startByte||f.endByte!=I.endByte)){var j=I.startByte+"-";I.endByte&&(j+=I.endByte),g.nrr=j}}}var U=a.h.wb()||1,B=ty(a,y.type)||500,H=y.bandwidth,G=H?H*(f.endTime-f.startTime)/1e3/(B/U/1e3)*a.g.rtpSafetyFactor:NaN;isNaN(G)||(g.rtp=G)}}v&&"tt"!==g.ot&&(g.tb=function FA(e,t){var n=e.h.Rb();if(!n.length)return NaN;e=n[0];for(var i=(n=m(n)).next();!i.done;i=n.next())"variant"===(i=i.value).type&&i.bandwidth>e.bandwidth&&(e=i);switch(t){case cd:return e.videoBandwidth||NaN;
1case"a":return e.audioBandwidth||NaN;default:return e.bandwidth}}(a,g.ot)/1e3),ya(a,s,g)}}catch(K){fr("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",K)}break;case 2:case 5:case 6:ya(a,s,{ot:"k"});break;case 4:ya(a,s,{ot:"o"})}})},function(o,s,u,a){(o=t()?t().l:e.I)&&o.banLocation&&o.banLocation(a)},function(o,s){if(s.data){s=s.data.byteLength;var u=t()?t().getStats():e.B;u&&(Gv(u,s),0===o&&(u.ni=s))}});return r.configure(e.g.networking),r}function vy(e,t,n){e.R=new Px,e.R.g=ea,yy(e),wd(e),e.Fa=new E(function(){ko(e)}),e.g.streaming.rebufferingGoal&&e.Fa.Ha(.25),e.j.F(t,"waiting",function(){return ko(e)}),e.j.F(t,"canplaythrough",function(){return ko(e)}),e.j.F(t,"playing",function(){return ko(e)}),e.j.F(t,"seeked",function(){return ko(e)}),n&&(e.j.F(t,"stalled",function(){return ko(e)}),e.j.F(t,"progress",function(){return ko(e)}),e.j.F(t,"timeupdate",function(){return ko(e)}))}function yy(e){var t=e.g.streaming.rebufferingGoal;e.R.i.set(il,Math.min(.5,t/2)).set(ea,t)}function ko(e){var t=!!e.H&&wu(e.H),n=e.$d()||t||e.G.ki(),i=zm(e.h.buffered,e.h.currentTime),r=(t=e.R).i.get(t.g),o=t.g;t.g=n=n||i>=r&&i>0?il:ea,(o=o!=n)&&n===il&&(t.h=Date.now()),o&&wd(e)}function Ty(e){if(e.we=new Xh(e.g,e.xa,e.D),e.I){var t=rr(e.g.manifest);e.h&&"AUDIO"===e.h.nodeName&&(t.disableVideo=!0),e.I.configure(t)}if(e.D&&e.D.configure(e.g.drm),e.l){e.l.configure(e.g.streaming);try{e.m!=zr&&Pm(e.we,e.i)&&Ci(e)}catch(n){wa(e,n)}e.u&&is(e),!(t=e.l.o)||t.allowedByApplication&&t.allowedByKeySystem||Iu(e)}e.J&&e.J.configure(e.g.networking),e.H&&(e.H.configure(e.g.mediaSource),e.H.Fa=e.g.manifest.segmentRelativeVttTiming),e.o&&Gp(e),e.u&&(e.u.configure(e.g.abr),e.g.abr.enabled?e.u.enable():e.u.disable(),Py(e)),e.R&&yy(e),e.Fa&&(e.g.streaming.rebufferingGoal?e.Fa.Ha(.25):e.Fa.stop()),e.i&&Zp(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.C&&e.C.configure(e.g.ads),e.M&&e.M.configure(e.g.cmcd),e.wa&&e.wa.configure(e.g.cmsd),e.Ba&&e.Ba.configure(e.g.queue)}function wy(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{columns:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}function xy(e,t){var n,i;return L(function(r){return 1==r.g?(e.m==di||e.m==$i)&&(n=e.Ce,e.i&&(n=e.i.imageStreams),i=n[0])?(null!=t&&(i=n.find(function(o){return o.id==t})),i?i.segmentIndex?r.A(2):x(r,i.createSegmentIndex(),2):r.return(null)):r.return(null):r.return(i)})}function Sy(e,t,n,i){var r=t.width||0,o=t.height||0,s=r/i.columns,u=o/i.rows,a=i.columns*i.rows,l=e.j-e.startTime;l=e.C||l/a;var c=e.startTime,d=0,f=0;return a>1&&(f=Math.floor((n-e.startTime)/l),c=e.startTime+f*l,d=f%i.columns*s,f=Math.floor(f/i.columns)*u),i=!1,(n=e.thumbnailSprite)&&(i=!0,u=n.height,d=n.positionX,f=n.positionY,s=n.width),{segment:e,imageHeight:o,imageWidth:r,height:u,positionX:d,positionY:f,startTime:c,duration:l,uris:e.P(),startByte:e.Fc(),endByte:e.Dc(),width:s,sprite:i,mimeType:e.mimeType||t.mimeType,codecs:e.codecs||t.codecs}}function Ay(e,t){e.j.F(t,"cuechange",function(){e.o.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));for(var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},i=[],r=Array.from(t.activeCues||[]),o=(r=m(r)).next();!o.done;o=r.next()){if((o=o.value).endTime===1/0||o.endTime<o.startTime)o=null;else{var s=new Dt(o.startTime,o.endTime,o.text);s.line="number"==typeof o.line?o.line:null,o.lineAlign&&(s.lineAlign=o.lineAlign),s.lineInterpretation=o.snapToLines?lu:1,s.position="number"==typeof o.position?o.position:null,o.positionAlign&&(s.positionAlign=o.positionAlign),s.size=o.size,s.textAlign=o.align,"lr"===o.vertical?s.writingMode="vertical-lr":"rl"===o.vertical&&(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=xi,s.region.width=o.region.width,s.region.widthUnits=xi),uu(s),o=s}o&&((s=e.g.mediaSource.modifyCueCallback)&&s(o,null,n),i.push(o))}e.o.append(i)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}function yd(e){return Array.from(e.h.textTracks).filter(function(t){return"metadata"!=t.kind&&"chapters"!=t.kind&&"Shaka Player TextTrack"!=t.label})}function zp(e,t){var n;return L(function(i){switch(i.g){case 1:return fe(i,2),x(i,Eu(t,e.J,e.g.streaming.retryParameters),4);case 4:n=i.h,Le(i,3);break;case 2:Te(i);case 3:if(n)return i.return(n);throw new k(1,2,2011,t)}})}function Td(e,t,n,i){var r,o;return L(function(u){if(1==u.g){r=Xr,(o=_n([t],i)).method="GET";var a=e.M;try{a.g.enabled&&ya(a,o,{ot:"c",su:!0})}catch(l){fr("CMCD_TEXT_ERROR","Could not generate text CMCD data.",l)}return x(u,n.request(r,o).promise,2)}return u.return(u.h.data)})}function Ey(e,t,n,i){var r=Ls(n);if(r)return n=r(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=oe(t),function LA(e,t){function n(o){for(var s=o,u=m(t),a=u.next();!a.done;a=u.next())(a=a.value).end&&a.start<o&&(s+=a.end-a.start);return((o=Math.floor(s/3600))<10?"0":"")+o+":"+((u=Math.floor(s/60%60))<10?"0":"")+u+":"+((a=Math.floor(s%60))<10?"0":"")+a+"."+((s=Math.floor(1e3*s%1e3))<100?s<10?"00":"0":"")+s}var i=Rp(e);e="WEBVTT\n\n";for(var r=(i=m(i)).next();!r.done;r=i.next())e+=n((r=r.value).startTime)+" --\x3e "+n(r.endTime)+function(o){var s=[];
1switch(o.textAlign){case"left":s.push("align:left");break;case"right":s.push("align:right");break;case Tr: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(" "):""}(r)+"\n",e+=r.payload+"\n\n";return e}(t=n.parseMedia(t,e,null,[]),i);throw new k(2,2,2014,n)}function mo(e){var t=ma();return t.streaming.failureCallback=function(n){if(e.W()){var i=null;1001==n.code||1002==n.code?(i=1,e.g.streaming.lowLatencyMode&&(i=.1)):1003==n.code&&(i=.1),null!=i&&(n.severity=1,e.gh(i))}},t.textDisplayFactory=function(){var n=Ne();return e.ye&&(document.fullscreenEnabled||"WEBKIT"!==n.Ca())?new ii(e.h,e.ye):"track"in document.createElement("track")?new Dn(e):new ni},t}function wd(e){var t=e.Og();if(e.B&&e.R&&e.G){if(0==e.g.streaming.rebufferingGoal){var n=e.L;n.j=!1,hp(n)}else(n=e.L).j=t,hp(n);if(e.M&&(n=e.M,t||n.u||(n.u=!0),n.u&&t&&(n.C=!0),n.G=t),Yp(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 i=e.g.streaming.liveSync.targetLatencyTolerance,r=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.V&&(e.V=Math.min(e.V+ ++e.Ge*r,n-i))}}t=(new Map).set("buffering",t),e.dispatchEvent(Lt("buffering",t))}function Iy(e,t){e.cc.Sa(),e.cc.F(e.h,"timeupdate",function(){var n=e.h.currentTime,i=e.Ta(),r=e.W(),o=r?e.g.streaming.safeSeekOffset:0;t>0?(!r||t>=1)&&Math.floor(n)>=Math.floor(i.end)&&e.Md():Math.floor(n)<=Math.floor(i.start+o)&&e.Md()})}function Yp(e){if(e.B&&e.R){var t=e.B.g,n="playing";e.R.g==ea?n="buffering":e.$d()?n="ended":e.h.paused&&(n="paused");var i=n;if(null==t.g)t.g={timestamp:Date.now()/1e3,state:i,duration:0},t=!0;else{var r=Date.now()/1e3;t.g.duration=r-t.g.timestamp,t.g.state==i?t=!1:(t.h.push(t.g),t.g={timestamp:r,state:i,duration:0},t=!0)}t&&(n=(new Map).set("newstate",n),e.dispatchEvent(Lt("statechanged",n)))}}function Cy(e){var t=e.h.playbackRate,n=e.W();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var i=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,r=e.$h();r<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=i&&e.oe(i,!1):1==r&&t!==e.L.Sc()&&e.Md()}if(n&&(n=e.Ta(),Number.isFinite(n.end)&&!(e.h.currentTime<n.start||e.h.paused))){i=e.g.streaming.liveSync.targetLatencyTolerance,r=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,u=s+i,a=Math.max(0,s-i),l=e.g.streaming.liveSync.maxPlaybackRate,c=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(s=e.i.serviceDescription.targetLatency,null!=e.i.serviceDescription.targetLatency?u=e.i.serviceDescription.targetLatency+i:null!=e.i.serviceDescription.maxLatency&&(u=e.i.serviceDescription.maxLatency),null!=e.i.serviceDescription.targetLatency?a=Math.max(0,e.i.serviceDescription.targetLatency-i):null!=e.i.serviceDescription.minLatency&&(a=e.i.serviceDescription.minLatency),l=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,c=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.V||"number"!=typeof s||(e.V=s),r&&e.bc&&null!==e.V&&"number"==typeof s&&e.Ge<e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts&&Date.now()-e.bc>1e3*o&&(o=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.V=Math.max(e.V-(s-o)/2,o+i),e.bc=Date.now()),r&&null!==e.V&&(u=e.V+i,a=e.V-i),s=n.end-e.h.currentTime,i=0,e.m==$i&&(r=e.h.buffered).length>0&&(i=r.end(r.length-1),i=Math.max(l,i-n.end)),n=e.g.streaming.liveSync.panicMode,r=1e3*e.g.streaming.liveSync.panicThreshold,o=Date.now()-e.R.h,n&&!c&&(c=e.g.streaming.liveSync.minPlaybackRate),n&&c&&o<=r?t!=c&&e.oe(c,!1):null!=u&&l&&s-i>u?(t!=l&&e.oe(l,!1),e.bc=null):null!=a&&c&&s-i<a?(t!=c&&e.oe(c,!1),e.bc=null):t!==e.L.Sc()&&(e.Md(),e.bc=Date.now())}}function xd(e){if(e.h){var t=function(r,o){var s=void 0===s?Number.EPSILON:s;
1if(r===o)s=!0;else{var u=Math.abs(r-o);s=u<=s||s!==Number.EPSILON&&Math.abs(u-s)<=Number.EPSILON}return!!((s||o>r)&&e.Yf<r)&&(e.Yf=r,!0)},n=e.Ta();if(n=(n=n.end-n.start)>0?e.h.currentTime/n:0,!isNaN(n)){if(t(0,n*=100))var i=Lt("started");else t(25,n)?i=Lt("firstquartile"):t(50,n)?i=Lt("midpoint"):t(75,n)?i=Lt("thirdquartile"):((t(100,n)||n>100)&&(i=Lt("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.$d()&&e.h.pause());i&&e.dispatchEvent(i)}}}function is(e){try{Rm(e.we,e.i)}catch(n){return wa(e,n),!1}var t=Mo(e.i.variants);return t=e.N.create(t),e.u.setVariants(Array.from(t.values())),!0}function Iu(e,t,n,i,r){var o;t=void 0===t||t,n=void 0===n?0:n,i=void 0!==i&&i,r=void 0===r||r,(o=is(e)?e.u.chooseVariant():null)&&Il(e,o,r,t,n,i)}function Il(e,t,n,i,r,o){o=void 0!==o&&o;var s=e.l.o;if(t==s)i&&Nv(e.l,t,i,r,!0);else{var u=e.B.h;if(u.h!=t&&(u.h=t,u.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),Nv(e.l,t,i,r,o,n),i=null,s&&(i=Sn(s)),(s=Sn(t)).active=!0,e.T&&(r=e.T,t=t.video)){switch(t.dependencyStream&&(t=t.dependencyStream),o=0,u=-1,t.mimeType){case"video/webm":o=1;break;case"video/mp4":o=2}switch(e.bi()){case"DASH":u=1;break;case"HLS":u=0}r.g&&(r.g.setLevelSwitching(t.id,!0),r.g.setContainerFormat(o),r.j||r.g.setStreamingFormat(u))}n?Mu(e,n=Lt("adaptation",n=(new Map).set("oldTrack",i).set("newTrack",s))):ky(e,i,s),_y(e,i,s)}}function qp(e,t){var n=Array.from(e.h.audioTracks).find(function(r){return r.enabled});if(t.enabled=!0,n){t.id!==n.id&&(n.enabled=!1);var i=My(e);ky(e,n=Ei(n,i),t=Ei(t,i)),_y(e,n,t)}}function My(e){return e.h&&e.h.videoTracks?Array.from(e.h.videoTracks).find(function(t){return t.selected}):null}function Ci(e){Mu(e,Lt("trackschanged")),Dy(e)}function ky(e,t,n){Mu(e,t=Lt("variantchanged",t=(new Map).set("oldTrack",t).set("newTrack",n)))}function _y(e,t,n){var i=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(i=!0),i&&Dy(e)}function Dy(e){Mu(e,Lt("audiotrackschanged"))}function Cu(e){Mu(e,Lt("textchanged"))}function Ly(e){Mu(e,Lt("texttrackvisibility"))}function Py(e){e.g.abr.enabled||$p(e),Mu(e,Lt("abrstatuschanged",(new Map).set("newStatus",e.g.abr.enabled)))}function Cl(e){var t=e.Hc().find(function(n){return n.active});t&&e.o&&e.o.setTextLanguage&&e.o.setTextLanguage(t.language)}function $p(e,t){if(t=void 0===t||t,e.m==di){e.ze.stop();for(var n=m(e.i.variants),i=n.next();!i.done;i=n.next())i.value.disabledUntilTime=0;t&&is(e)}}function wa(e,t){var n,r,o,s;return L(function(u){switch(u.g){case 1:if(e.m==zr)return u.return();if(1===t.severity&&e.B.M++,n=!0,!(e.Pa&&e.i&&e.l)||3016!=t.code&&3014!=t.code&&3015!=t.code&&3024!=t.code&&3018!=t.code){u.A(2);break}return"WEBKIT"===Ne().Ca()&&3016==t.code?u.return():(fe(u,3),x(u,Jc(e.l),5));case 5:n=!(r=u.h),r&&(o=Lt("mediasourcerecovered"),e.dispatchEvent(o)),Le(u,2);break;case 3:Te(u),n=!0;case 2:if(!n)return u.return();2===t.severity&&$p(e,!1),s=Lt("error",(new Map).set("detail",t)),e.dispatchEvent(s),s.defaultPrevented&&(t.handled=!0),Z(u)}})}function Ml(e,t,n,i){i=void 0===i?e:i,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}),i.dispatchEvent(Lt(t,e))}function by(e,t,n,i){i=void 0!==i&&i,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(Lt(i?"audiotrackchanged":"mediaqualitychanged",t))}function Jp(e,t){if(t=void 0===t||t,!e.h.error)return t?new k(2,3,3016):null;var n=e.h.error.code;return t||1!=n?((t=e.h.error.msExtendedCode)&&(t<0&&(t+=4294967296),t=t.toString(16)),new k(2,3,3016,n,t,e.h.error.message)):null}function Zp(e,t,n){t>0&&(e.W()||e.Ti(t)),n<(t=e.getDuration())&&(e.W()||e.qb(n))}function Mu(e,t){L(function(n){if(1==n.g)return x(n,Promise.resolve(),2);e.m!=zr&&e.dispatchEvent(t),Z(n)})}function Ry(e){for(var t=new Set,n=(e=m(e)).next();!n.done;n=e.next())t.add((n=n.value).language?te(n.language):"und");return t}function Ny(e){for(var t=new Map,n=new Map,i=0;i<e.length;i++){var r=e[i],o="und",s=[];r.language&&(o=te(r.language)),(s="variant"==r.type?r.audioRoles:r.roles)&&s.length||(s=[""]),t.has(o)||t.set(o,new Set);for(var u=(s=m(s)).next();!u.done;u=s.next())u=u.value,t.get(o).add(u),r.label&&(n.has(o)||n.set(o,new Map),n.get(o).set(u,r.label))}var a=[];return t.forEach(function(l,c){for(var d=(l=m(l)).next();!d.done;d=l.next()){d=d.value;var f=null;n.has(c)&&n.get(c).has(d)&&(f=n.get(c).get(d)),a.push({language:c,role:d,label:f})}}),a}ly.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null},wt(W,vt),(h=W.prototype).destroy=function(){var t,e=this;return L(function(n){switch(n.g){case 1:return e.m==zr?n.return():(vd(e),t=e.detach(),e.m=zr,x(n,t,2));case 2:return x(n,e.pg(),3);case 3:if(e.De&&(e.De.release(),e.De=null),e.se&&(e.se.release(),e.se=null),e.j&&(e.j.release(),e.j=null),e.cc&&(e.cc.release(),e.cc=null),e.wc&&(e.wc.release(),e.wc=null),e.ab=null,e.g=null,e.B=null,e.ye=null,e.M=null,e.wa=null,!e.J){n.A(4);break}return x(n,e.J.destroy(),5);case 5:e.J=null;case 4:e.u&&(e.u.release(),e.u=null),e.Ba&&(e.Ba.destroy(),e.Ba=null),vt.prototype.release.call(e),Z(n)}})},h.hc=function(e,t){t=void 0===t||t;var i,o,n=this;return L(function(s){switch(s.g){case 1:if(n.m==zr)throw new k(2,7,7e3);if(i=n.h&&n.h==e,!n.h||n.h==e){s.A(2);break}return x(s,n.detach(),2);case 2:return x(s,Hp(n,"attach"),4);case 4:if(s.h)return s.return();if(fe(s,5,6),i||(Ta(n,"attach"),n.se.F(e,"error",function(){var u=Jp(n,!1);u&&wa(n,u)}),n.h=e,n.M&&n.M.setMediaElement(e)),Ne(),!t||!_o()||n.H){s.A(6);break}return x(s,Kp(n),6);case 6:Tn(s),n.ma.release(),En(s,0);break;case 5:return o=Te(s),x(s,n.detach(),10);case 10:throw o}})},h.lj=function(e){this.Lh=e},h.detach=function(e){e=void 0!==e&&e;var t=this;return L(function(n){if(1==n.g){if(t.m==zr)throw new k(2,7,7e3);return x(n,t.zc(!1,e),2)}if(3!=n.g)return x(n,Hp(t,"detach"),3);if(n.h)return n.return();try{t.h&&(t.se.Sa(),t.h=null),Ta(t,"detach"),t.C&&!e&&t.C.release()}finally{t.ma.release()}Z(n)})},h.zc=function(e,t){e=void 0===e||e,t=void 0!==t&&t;var i,r,o,s,u,a,l,c,d,f,g,v,y,n=this;return L(function(T){switch(T.g){case 1:return n.m!=zr&&(n.m=Sd),x(T,Hp(n,"unload"),2);case 2:return T.h?T.return():(pn(T,3),n.Pa=!1,Ta(n,"unload"),vd(n),i=n.ue.map(function(S){return S()}),n.ue=[],x(T,Promise.all(i),5));case 5:if(n.dispatchEvent(Lt("unloading")),n.re&&(n.re.release(),n.re=null),n.ya&&(n.ya.release(),n.ya=null),n.bb&&(n.bb.release(),n.bb=null),n.h&&(n.j.Sa(),n.cc.Sa()),n.ze.stop(),n.$b&&(n.$b.release(),n.$b=null),n.Fa&&(n.Fa.stop(),n.Fa=null),!n.I){T.A(6);break}return x(T,n.I.stop(),7);case 7:n.I=null,n.vc=null;case 6:if(!n.u){T.A(8);break}return x(T,n.u.stop(),8);case 8:if(!n.l){T.A(10);break}return x(T,n.l.destroy(),11);case 11:n.l=null;case 10:if(n.L&&(n.L.release(),n.L=null),n.G&&(n.G.release(),n.G=null),"webkit"!==X.shakaMediaKeysPolyfill||!n.D){T.A(12);break}return x(T,n.D.destroy(),13);case 13:n.D=null;case 12:if(!n.H){T.A(14);break}return x(T,n.H.destroy(),15);case 15:n.H=null;case 14:if(n.C&&!t&&n.C.onAssetUnload(),n.oa&&!t&&(n.oa.destroy(),n.oa=null),t||n.ag.stop(),n.M&&function PA(e){e.u=!1,e.G=!0,e.C=!1,e.l=!1,e.m=0,e.o=0,e.B=0,e.H=!1,e.j=null,e.D.Sa()}(n.M),n.wa&&(n.wa.g=null),!n.o){T.A(16);break}return x(T,n.o.destroy(),17);case 17:n.o=null;case 16:if(n.ea=!1,n.h){for(r=m(n.Zf),o=r.next();!o.done;o=r.next())(s=o.value).src.startsWith("blob:")&&URL.revokeObjectURL(s.src),s.remove();n.Zf=[],Uc(n.h)&&n.h.load()}if(!n.D){T.A(18);break}return x(T,n.D.destroy(),19);case 19:n.D=null;case 18:if(n.Qa&&n.X!=n.Qa.pd()&&(n.Qa.u||n.Qa.destroy(),n.Qa=null),n.X=null,n.ia=null,n.R=null,n.i){for(u=m(n.i.variants),a=u.next();!a.done;a=u.next())for(c=m([(l=a.value).audio,l.video]),d=c.next();!d.done;d=c.next())(f=d.value)&&f.segmentIndex&&f.segmentIndex.release();for(g=m(n.i.textStreams),v=g.next();!v.done;v=g.next())(y=v.value).segmentIndex&&y.segmentIndex.release()}n.g&&n.g.streaming.clearDecodingCache&&(fu.clear(),Yu.clear()),n.i=null,n.B=new ud,n.Kh=null,n.bc=null,n.V=null,n.Ge=-1,n.Ce=[],n.cb=[],n.Yf=-1,n.J&&n.J.Rh(),wd(n);case 3:Tn(T),n.ma.release(),En(T,4);break;case 4:if(Ne(),e&&_o()&&!n.H&&n.h)return x(T,Kp(n),0);T.A(0)}})},h.ll=function(e){this.O=e},h.load=function(e,t,n){t=void 0===t?null:t;var r,o,s,u,a,l,c,d,f,g,v,y,T,S,i=this;return L(function(A){switch(A.g){case 1:if(i.m==zr)throw new k(2,7,7e3);if(r=null,o="",e instanceof Ar){if(e.u)throw new k(2,7,7006);o=(r=e).pd()||""}else o=e||"";return x(A,Vp(i.ma,"load"),2);case 2:if(i.ma.release(),!i.h)throw new k(2,7,7002);if(!i.X){A.A(3);break}return i.X=o,x(A,i.zc(!1),3);case 3:if(s=++i.Fe,u=function(){return L(function(I){if(1==I.g)return i.Fe==s?I.A(0):r?x(I,r.destroy(),3):I.A(3);throw new k(2,7,7e3)})},a=function(I,_){return L(function(P){switch(P.g){case 1:return pn(P,2),x(P,Vp(i.ma,_),4);case 4:return x(P,u(),5);case 5:return x(P,I(),6);case 6:return x(P,u(),7);case 7:r&&i.g&&(r.g=i.g);case 2:Tn(P),i.ma.release(),En(P,0)}})},fe(A,5,6),null==t&&r&&(t=r.getStartTime()),i.O=t,i.Pa=!1,i.dispatchEvent(Lt("loading")),r){n=r.X,A.A(8);break}if(n){A.A(8);break}return x(A,a(function(){return L(function(I){if(1==I.g)return x(I,fy(i,o),2);n=I.h,Z(I)})},"guessMimeType_"),8);case 8:if(l=!!r,r){Kv(r,i),i.B=r.getStats(),A.A(11);break}return x(A,hy(i,o,t,n,!0,i.g),12);case 12:(r=A.h)?(r.D=!1,Kv(r,i),i.B=r.getStats(),r.start(),r.B.catch(function(){})):i.B=new ud;case 11:return c=!r,d=Date.now()/1e3,i.B=r?r.getStats():new ud,i.X=o,i.ia=n||null,wd(i),i.ya=new fl(f=function(){var I=i.h?i.h.buffered:null;return{start:Xm(I)||0,end:jc(I)||0}}),i.ya.addEventListener("regionadd",function(I){Wp(i,I.region,"metadataadded")}),c?x(A,a(function(){return L(function(I){return x(I,function YA(e,t){var n,i,r;return L(function(o){return 1==o.g?(n=Date.now()/1e3,i=!0,e.D=e.kd({sc:e.J,onError:function(s){wa(e,s
1)},uf:function(){},onExpirationUpdated:function(){var s=Lt("expirationupdated");e.dispatchEvent(s)},onEvent:function(s){e.dispatchEvent(s),"drmsessionupdate"==s.type&&i&&(i=!1,e.B.m=Date.now()/1e3-n)}}),e.D.configure(e.g.drm),r=Za([t]),e.D.O=!0,x(o,mm(e.D,[r],[]),2)):x(o,e.D.hc(e.h),0)})}(i,n),0)})},"initializeSrcEqualsDrmInner_"),23):(i.bb=new fl(f),x(A,a(function(){return L(function(I){if(1==I.g)return x(I,Promise.race([r.wa,r.B]),2);i.vc=r.I;var _=r;_.xa=!0,i.I=_.l,i.i=r.Hg(),Z(I)})},"waitForFinish"),15));case 15:if(i.H){A.A(16);break}return x(A,a(function(){return L(function(I){return x(I,Kp(i),0)})},"initializeMediaSourceEngineInner_"),16);case 16:return i.i&&i.i.textStreams.length&&(i.o.enableTextDisplayer?i.o.enableTextDisplayer():be("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),x(A,a(function(){return L(function(I){return x(I,r.B,0)})},"waitForFinish"),18);case 18:if(i.g=r.getConfiguration(),i.we=r.H,i.I&&i.I.setMediaElement&&i.h&&i.I.setMediaElement(i.h),i.re=function gA(e){return e.ya=!0,e.J}(r),i.pe=r.Qa,(g=r.C)&&(i.N=g),l&&i.h&&"AUDIO"===i.h.nodeName&&(function WA(e){for(var t=m(e.i.variants),n=t.next();!n.done;n=t.next())(n=n.value).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(i){return i.audio})}(i),i.configure("manifest.disableVideo",!0)),r.i){A.A(19);break}return x(A,a(function(){return L(function(I){return x(I,Wv(r,i.h),0)})},"drmEngine_.init"),19);case 19:return i.D=function mA(e){return e.oa=!0,e.i}(r),x(A,a(function(){return L(function(I){return x(I,i.D.hc(i.h),0)})},"drmEngine_.attach"),21);case 21:return!(v=r.G)||i.ab&&i.ab==v||(i.u=function fA(e){return e.ia=!0,e.j}(r),i.ab=r.G,"function"!=typeof i.u.setMediaElement&&(be("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),i.u.setMediaElement=function(){}),"function"!=typeof i.u.setCmsdManager&&(be("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),i.u.setCmsdManager=function(){}),"function"!=typeof i.u.trySuggestStreams&&(be("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),i.u.trySuggestStreams=function(){})),y=function vA(e){return e.Ba=!0,e.N}(r),T=r.o,x(A,a(function(){return L(function(I){return x(I,function zA(e,t,n,i){var r,o,s,u,a,l,c,d,f,g,v,y,T,S,A,I,_,P,b,M,D,U,B,K;return L(function(z){switch(z.g){case 1:for((Ta(e,"load"),r=e.h,e.L=new pl({Xe:function(){return r.playbackRate},Sc:function(){return r.defaultPlaybackRate},qh:function($){r.playbackRate=$},ui:function($){r.currentTime+=$}}),gy(e,r,t),"onchange"in X.screen&&e.j.F(X.screen,"change",function(){if(e.N.getConfiguration){var $=e.N.getConfiguration();"AUTO"==$.Ic?is(e):"AUTO"==e.g.preferredVideoHdrLevel&&e.g.abr.enabled&&($.Ic="AUTO",e.N.configure($),is(e))}}),o=!1,s=m(e.i.variants),u=s.next());!u.done;u=s.next())(l=(a=u.value).video&&a.video.dependencyStream)&&(o=Js(l));(function KA(e,t,n){n||t.lcevc.enabled?(vd(e),null==e.T&&(e.T=new Ur(e.h,e.Lh,t.lcevc,n),e.H&&(e.H.N=e.T))):vd(e)})(e,e.g,o),e.Cd=e.g.preferredTextLanguage,e.Id=e.g.preferredTextRole,e.ve=e.g.preferForcedSubs,Zp(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.u.init(function($,Q,He){e.i&&e.l&&$!=e.l.o&&Il(e,$,!0,void 0!==Q&&Q,void 0===He?0:He)}),e.u.setMediaElement(r),e.u.setCmsdManager(e.wa),e.l=function oE(e){return new bv(e.i,{Tc:function(){return e.G?e.G.Ee():0},getBandwidthEstimate:function(){return e.u.getBandwidthEstimate()},wb:function(){return e.wb()},video:e.h,$:e.H,sc:e.J,onError:function(t){return wa(e,t)},onEvent:function(t){return e.dispatchEvent(t)},vf:function(t,n,i){var r=t.startTime;if(t=t.endTime,(n=n.type)!=Pe){if(e.G){e.G.xi();var o=rp(e.H,n);!e.W()&&e.h.paused&&!e.h.seeking&&null!=o&&o>0&&e.G.Ee()<o&&e.G.Xf(o)}ko(e)}i=(new Map).set("start",r).set("end",t).set("contentType",n).set("isMuxed",i),e.dispatchEvent(Lt("segmentappended",i))},Dk:function(t,n){(n=n.ud)&&e.pe&&function MS(e,t,n){var i=function CS(e,t){var n=e.g.get(t);return n||e.g.set(t,n={ie:[],ng:null,contentType:t}),n}(e,t.contentType);(function kS(e,t){if((e=e.h()[t.contentType])&&e.length>
10){var n=e[0].start,i=e[e.length-1].end,r=t.ie;t.ie=r.filter(function(o,s){return!(o.position<=n&&s+1<r.length&&r[s+1].position<=n||o.position>=i)})}else t.ie=[]})(e,i),e={ud:t,position:n},(t=(i=i.ie).findIndex(function(r){return r.position>=n}))>=0?i.splice(t,i[t].position==n?1:0,e):i.push(e)}(e.pe,n,t)},Ph:function(t,n){var i=e.D;if(i.h.parseInbandPsshEnabled&&!i.M&&["audio","video"].includes(t)){t=new Gh(oe(n)),n=0;for(var r=m(t.data),o=r.next();!o.done;o=r.next())n+=o.value.length;if(0==n)i=Promise.resolve();else{for(n=new Uint8Array(n),r=0,o=(t=m(t.data)).next();!o.done;o=t.next())n.set(o=o.value,r),r+=o.length;el(i,"cenc",n),i=i.m}}else i=Promise.resolve();return i},disableStream:function(t,n){return e.disableStream(t,n)}})}(e),e.l.configure(e.g.streaming),e.m=di,e.dispatchEvent(Lt("streaming")),c=n;case 2:for((f=e.l.o)||c||(c=is(e)?e.u.chooseVariant():null),g=[],v=m([(d=f||c).video,d.audio]),y=v.next();!y.done;y=v.next())(T=y.value)&&!T.segmentIndex&&(g.push(T.createSegmentIndex()),T.dependencyStream&&g.push(T.dependencyStream.createSegmentIndex()));if(!(g.length>0)){z.A(4);break}return x(z,Promise.all(g),4);case 4:if(!d||0!=d.disabledUntilTime){z.A(2);break}if(e.I&&e.I.onInitialVariantChosen&&e.I.onInitialVariantChosen(d),e.i.isLowLatency&&(e.g.streaming.lowLatencyMode?e.configure(e.$f):Be("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.M&&(function bA(e,t){e.l=t,e.l?"d"==e.i?e.i="ld":"h"==e.i&&(e.i="lh"):"ld"==e.i?e.i="d":"lh"==e.i&&(e.i="h")}(e.M,e.i.isLowLatency&&e.g.streaming.lowLatencyMode),function RA(e,t){if(e.g&&e.g.enabled&&e.g.version==iy&&e.j&&e.j.autoplay){var n=e.j.play();n&&n.then(function(){e.B=t}).catch(function(){e.B=0})}}(e.M,1e3*t)),Zp(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),function OS(e,t,n){e.j.presentationTimeline.W()||(e.X=t,e.V=n)}(e.l,e.g.playRangeStart,e.g.playRangeEnd),e.Pa=!0,e.dispatchEvent(Lt("canupdatestarttime")),S=function($){e.G=function eE(e,t){return new Sv(e.h,e.i,e.g.streaming,t,function(){e.$b&&Mv(e.$b,!e.G.Ih()),e.l&&e.l.$c(),e.R&&ko(e)},function(n){return e.dispatchEvent(n)})}(e,$),e.$b=function tE(e,t){var n=e.W()||"number"==typeof t&&t>0;(t=new Au(e.re,n)).addEventListener("enter",function(o){Ml(e,"timelineregionenter",o.region)}),t.addEventListener("exit",function(o){Ml(e,"timelineregionexit",o.region)}),t.addEventListener("skip",function(o){var s=o.region;
1o.seeking||(Ml(e,"timelineregionenter",s),Ml(e,"timelineregionexit",s))});var i=new Au(e.ya,n);i.addEventListener("enter",function(o){Wp(e,o.region,"metadata")}),(n=new Au(e.bb,n)).addEventListener("enter",function(o){o=(new Map).set("detail",o.region.emsg),e.dispatchEvent(Lt("emsg",o))});var r=new pp(e.h);return r.g.add(t),r.g.add(i),r.g.add(n),e.pe&&r.g.add(e.pe),r}(e,$),vy(e,r,!1)},e.g.streaming.startAtSegmentBoundary||(null==(A=e.O)&&e.i.startTime&&(A=e.i.startTime),S(A)),f){z.A(7);break}if(!e.g.streaming.startAtSegmentBoundary){z.A(8);break}return I=e.i.presentationTimeline,e.O instanceof Date&&(P=I.m||I.i,null!=(b=e.O.getTime()/1e3-P)&&(_=b)),null==_&&(_="number"==typeof e.O?e.O:e.h.currentTime),null==e.O&&e.i.startTime&&(_=e.i.startTime),M=I.Yb(),D=I.Hb(),_<M?_=M:_>D&&(_=D),x(z,function cE(e,t){var i,r,o,s;return L(function(u){return 1==u.g?(i=e.video,r=function(a,l){var c,d;return L(function(g){return 1==g.g?a?a.segmentIndex?g.A(2):x(g,a.createSegmentIndex(),2):g.return(null):(d=(c=a.segmentIndex.Xb(l))?c.next().value:null)?g.return(d.startTime):g.return(null)})},x(u,r(e.audio,t),2)):3!=u.g?(o=u.h,x(u,r(i,t),3)):u.return(null!=(s=u.h)&&null!=o?Math.max(s,o):null!=s?s:null!=o?o:t)})}(c,_),9);case 9:S(z.h);case 8:Il(e,c,!0,!1,0);case 7:return e.G.ready(),e.Hc().find(function($){return $.active})||((U=xr(e.i.textStreams,e.Cd,e.Id,e.ve)[0]||null)&&Dp(e.B.h,U,!0),c&&(U?(Ja(c.audio,U,e.g)&&(e.ea=!0),e.ea&&e.o.setTextVisibility(!0)):(e.ea=!1,e.o.setTextVisibility(!1)),Ly(e)),U&&(e.g.streaming.alwaysStreamText||e.Pg())&&(Yc(e.l,U),Cl(e))),x(z,e.l.start(i),10);case 10:e.g.abr.enabled&&(e.u.enable(),Py(e)),Ci(e),is(e),e.i.variants.some(function($){return $.primary}),((B=e.W())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.i.serviceDescription||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&e.j.F(r,"timeupdate",function(){return Cy(e)}),B||(e.j.F(r,"timeupdate",function(){return xd(e)}),xd(e),e.i.nextUrl&&(e.g.streaming.preloadNextUrlWindow>0&&(K=function(){var $;return L(function(Q){if(1==Q.g)return $=e.Ta().end-e.h.currentTime,!isNaN($)&&$<=e.g.streaming.preloadNextUrlWindow?(e.j.La(r,"timeupdate",K),x(Q,e.preload(e.i.nextUrl),4)):Q.A(0);e.Qa=Q.h,Z(Q)})},e.j.F(r,"timeupdate",K)),e.j.F(r,"ended",function(){e.load(e.Qa||e.i.nextUrl)}))),e.C&&e.C.onManifestUpdated(B),Z(z)}})}(i,d,T,y),0)})},"loadInner_"),22);case 22:(function pA(e){if(e.L)for(var t=m(e.L),n=t.next();!n.done;n=t.next())(n=n.value)();e.L=null})(r),i.ia&&Ne().bj()&&oo(i.ia)&&function oS(e,t,n){e.g&&X.ManagedMediaSource&&e.i&&e.B.useSourceElements&&(e.C&&e.g.removeChild(e.C),e.C=Ym(t,n),e.g.appendChild(e.C),e.g.disableRemotePlayback=!1)}(i.H,i.X,i.ia),A.A(14);break;case 23:return x(A,a(function(){return L(function(I){return x(I,function qA(e,t,n){var i,r,o,s,u,a,l,c,d,v;return L(function(y){switch(y.g){case 1:if(Ta(e,"src-equals"),e.G=new Tv(i=e.h),r=!1,e.ue.push(function(){r=!0}),e.dispatchEvent(Lt("canupdatestarttime")),null!=e.O&&e.G.Xf(e.O),e.$b=function nE(e,t){(t=new Au(e.ya,t instanceof Date||t>0)).addEventListener("enter",function(i){Wp(e,i.region,"metadata")});var n=new pp(e.h);return n.g.add(t),n}(e,e.O||0),e.L=new pl({Xe:function(){return i.playbackRate},Sc:function(){return i.defaultPlaybackRate},qh:function(T){i.playbackRate=T},ui:function(T){i.currentTime+=T}}),vy(e,i,!0),i.textTracks&&(Gp(e),o=function(T){if(!(e.o instanceof Dn)){var S=yd(e).find(function(A){return"disabled"!==A.mode});S&&(S.mode=T?"showing":"hidden"),e.o instanceof ti&&(S=function sE(e){return Array.from(e.h.textTracks).find(function(t){return"Shaka Player TextTrack"==t.label})}(e))&&(S.mode=!T&&e.o.isTextVisible()?"showing":"hidden")}},e.j.F(i,"enterpictureinpicture",function(){return o(!0)}),e.j.F(i,"leavepictureinpicture",function(){return o(!1)}),i.remote?(e.j.F(i.remote,"connect",function(){return o(!1)}),e.j.F(i.remote,"connecting",function(){return o(!1)}),e.j.F(i.remote,"disconnect",function(){return o(!1)})):"webkitCurrentPlaybackTargetIsWireless"in i&&e.j.F(i,"webkitcurrentplaybacktargetiswirelesschanged",function(){return o(!1)}),(s=i).webkitSupportsFullscreen&&e.j.F(s,"webkitpresentationmodechanged",function(){return o("inline"!==s.webkitPresentationMode)})),gy(e,i,t),u=function NA(e,t,n){try{if(!e.g.enabled)return t;var i=Up(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 r="a";break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":r=dd;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/d
1ash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":r="m";break e}r=void 0}return i.ot=r,i.su=!0,Bp(t,ad(i))}catch(s){return fr("CMCD_SRC_ERROR","Could not generate src CMCD data.",s),t}}(e.M,e.X,n),!u.includes("#t=")&&(e.g.playRangeStart>0||isFinite(e.g.playRangeEnd))&&(u+="#t=",e.g.playRangeStart>0&&(u+=e.g.playRangeStart),isFinite(e.g.playRangeEnd)&&(u+=","+e.g.playRangeEnd)),!e.H){y.A(2);break}return x(y,e.H.destroy(),3);case 3:e.H=null;case 2:return Uc(i),i.src=u,"TV"==(a=Ne()).Ma()&&i.load(),"none"!=i.preload&&!i.autoplay&&oo(n)&&"WEBKIT"===a.Ca()&&i.load(),e.m=$i,e.dispatchEvent(Lt("streaming")),l=new At,ha(i,HTMLMediaElement.HAVE_METADATA,e.j,function(){e.G.ready(),e.ia&&oo(e.ia)||l.resolve()}),c=function(){return new Promise(function(T){var S=new E(T);e.j.F(i.textTracks,"change",function(){return S.ka(.5)}),S.ka(.5)})},ha(i,HTMLMediaElement.HAVE_CURRENT_DATA,e.j,function(){var T,S,A,I,_;return L(function(P){if(1==P.g)return x(P,c(),2);if(r)return P.return();if(function $A(e){var t=e.g.preferredAudioLanguage;""!=t&&e.Ni(t,e.g.preferredVariantRole)}(e),(T=yd(e)).some(function(b){return"showing"===b.mode})&&(e.ea=!0,e.o.setTextVisibility(!0)),!(e.o instanceof Dn))for(T.length&&(e.o.enableTextDisplayer?e.o.enableTextDisplayer():be("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),S=!1,A=m(T),I=A.next();!I.done;I=A.next())"disabled"!==(_=I.value).mode&&(S?(_.mode="disabled",Be("Found more than one enabled text track, disabling it",_)):(Ay(e,_),S=!0));(function JA(e){var t=e.g.preferredTextLanguage;""!=t&&e.kh(t,e.g.preferredTextRole,e.g.preferForcedSubs)})(e),e.ia&&oo(e.ia)&&l.resolve(),Z(P)})}),i.error?l.reject(Jp(e)):"none"==i.preload&&(Be('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.'),l.resolve()),e.j.Aa(i,"error",function(){l.reject(Jp(e))}),x(y,N(e.g.streaming.loadTimeout,l),4);case 4:((d=e.W())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&e.j.F(i,"timeupdate",function(){return Cy(e)}),d||(e.j.F(i,"timeupdate",function(){return xd(e)}),xd(e)),e.C&&(e.C.onManifestUpdated(d),d&&(v=e.Ta().end,e.j.F(i,"progress",function(){var T=e.Ta().end;v!=T&&(e.C.onManifestUpdated(e.W()),v=T)}))),e.Pa=!0,Z(y)}})}(i,d,n),0)})},"srcEqualsInner_"),14);case 14:i.dispatchEvent(Lt("loaded"));case 6:if(Tn(A),!r){A.A(25);break}return x(A,r.destroy(),25);case 25:i.Qa=null,En(A,0);break;case 5:if(!(S=Te(A))||7e3==S.code){A.A(27);break}return x(A,i.zc(!1),27);case 27:throw S}})},h.hl=function(e,t){e=void 0===e||e,t=void 0!==t&&t;var i,n=this;return L(function(r){return 1==r.g?x(r,dy(n),2):3!=r.g?(i=r.h,x(r,n.zc(e,t),3)):r.return(i)})},h.Vh=function(e,t){e=void 0!==e&&e,t=void 0!==t&&t;var i,n=this;return L(function(r){return 1==r.g?x(r,dy(n,t),2):3!=r.g?(i=r.h,x(r,n.detach(e),3)):r.return(i)})},h.preload=function(e,t,n,i){t=void 0===t?null:t;var o,s,r=this;return L(function(u){return 1==u.g?(ts(o=mo(r),i||r.g,mo(r)),x(u,hy(r,e,t,n,!1,o),2)):((s=u.h)?s.start():wa(r,new k(2,7,7005)),u.return(s))})},h.pg=function(){var t,n,i,r,e=this;return L(function(o){for(t=[],n=m(e.Ae),i=n.next();!i.done;i=n.next())(r=i.value).u||t.push(r.destroy());return e.Ae=[],x(o,Promise.all(t),0)})},h.Mk=function(){for(var e=this.ma;e.g;)e.release()},h.kd=function(e){return new _c(e)},h.configure=function(e,t){if(2==arguments.length&&"string"==typeof e&&(e=td(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(be("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&&(be("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){be("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var n=Ne();e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&"WEBKIT"===n.Ca(),delete e.streaming.useNativeHlsOnSafari}if(e.streaming&&"boolean"==typeof e.streaming.liveSync&&(be("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),n=e.streaming.liveSync,e.streaming.liveSync={},e.streaming.liveSync.enabled=n),e.streaming&&(!e.streaming.liveSync||!("targetLatency"in e.
1streaming.liveSync))&&("liveSyncMinLatency"in e.streaming||"liveSyncMaxLatency"in e.streaming)){n=e.streaming.liveSyncMinLatency||0;var i=Math.abs((e.streaming.liveSyncMaxLatency||1)-n)/2;e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=n+i,e.streaming.liveSync.targetLatencyTolerance=i}if(e.streaming&&"liveSyncMaxLatency"in e.streaming&&(be("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&&(be("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&&(be("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&&(be("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&&(be("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&&(be("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&&(be("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&&(be("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){be("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var r=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return r},delete e.mediaSource.sourceBufferExtraFeatures}if(e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(be("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&&(be("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(be("manifest.dash.enableAudioGroups configuration","It is now enabled by default and cannot be disabled."),delete e.manifest.dash.enableAudioGroups),e.streaming&&"dispatchAllEmsgBoxes"in e.streaming&&(be("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&&(be("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&&(be("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&&(be("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&&(be("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&&(be("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&&(be("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){for(var o in n=!1,e.drm.advanced){var s=e.drm.advanced[o];
1i=s.videoRobustness,s=s.audioRobustness,"videoRobustness"in e.drm.advanced[o]&&!Array.isArray(e.drm.advanced[o].videoRobustness)&&(e.drm.advanced[o].videoRobustness=[i],n=!0),"audioRobustness"in e.drm.advanced[o]&&!Array.isArray(e.drm.advanced[o].audioRobustness)&&(e.drm.advanced[o].audioRobustness=[s],n=!0)}n&&be("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&&(be("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&&(be("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&&(be("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),e.networking=e.networking||{},e.networking.minBytesForProgressEvents=e.streaming.minBytesForProgressEvents,delete e.streaming.minBytesForProgressEvents),o=ts(this.g,e,mo(this)),Ty(this),o},h.tj=function(e){this.$f=e},h.getConfiguration=function(){var e=mo(this);return ts(e,this.g,mo(this)),e},h.Dj=function(){return this.$f},h.di=function(){return ts(mo(this),this.g,mo(this)),Bv(this.g,mo(this))},h.$h=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(e>=(t=Math.min(this.h.currentTime+t,this.Ta().end)))return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},h.Ii=function(){for(var e in this.g)delete this.g[e];ts(this.g,mo(this),mo(this)),Ty(this)},h.Lj=function(){return this.m},h.bi=function(){return this.i?this.i.type:null},h.Pj=function(){return this.h},h.Qb=function(){return this.J},h.pd=function(){return this.X},h.Zh=function(){return this.C?this.C:null},h.ei=function(){return this.Ba?this.Ba:null},h.W=function(){return this.i&&!this.va()?this.i.presentationTimeline.W():!(!this.h||!this.h.src&&!this.va())&&this.h.duration==1/0},h.Vc=function(){return!!this.i&&this.i.presentationTimeline.Vc()},h.ik=function(){if(this.i&&!this.va()){var e=this.i.variants;return!!e.length&&!e[0].video}return!(!this.h||!this.h.src&&!this.va())&&(this.h.videoTracks?0==this.h.videoTracks.length:0==this.h.videoHeight)},h.rk=function(){if(this.i&&!this.va()){var e=this.i.variants;return!(!e.length||(e=e[0]).audio||!e.video||e.video.codecs.includes(","))}return!(!this.h||!this.h.src&&!this.va()||!this.h.audioTracks)&&0==this.h.audioTracks.length},h.Ta=function(){if(this.i&&!this.va()){if(!this.Pa&&"HLS"==this.i.type)return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Yb(),end:e.Hb()}}if(this.h&&(this.h.src||this.va())&&(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{start:t,end:e=Math.min(e.end(e.length-1),n)}}return{start:0,end:0}},h.fk=function(){this.W()&&(this.h.currentTime=this.Ta().end)},h.jk=function(){return this.Pa},h.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},h.drmInfo=function(){return this.D?this.D.g:null},h.Td=function(){return this.D?this.D.Td():1/0},h.Gg=function(){return this.D?this.D.Gg():[]},h.Ve=function(){return this.D?this.D.Ve():{}},h.Og=function(){return this.R?this.R.g==ea:!!this.X},h.wb=function(){return this.h?this.L?this.L.i:1:0},h.Gh=function(e){this.m==di&&this.l&&Rv(this.l,e)},h.oe=function(e,t){t=void 0===t||t,0==e?Be("A trick play rate of 0 is unsupported!"):(this.L.set(e),this.m==di&&(this.u.playbackRateChanged(e),this.Gh(t&&1!=e)),Iy(this,e))},h.Md=function(){var e=this.L.Sc();this.m==$i&&this.L.set(e),this.m==di&&(this.L.set(e),this.u.playbackRateChanged(e),this.Gh(!1)),this.cc.Sa()},h.Rb=function(){if(this.i&&!this.va()){for(var e=this.l?this.l.o:null,t=[],n=0,i=m(this.i.variants),r=i.next();!r.done;r=i.next())if(Co(r=r.value)){var o=Sn(r);o.active=r==e,o.active||1==n||null==e||r.video!=e.video||r.audio!=e.audio||(o.active=!0),o.active&&n++,t.push(o)}return t}if(this.h&&this.h.audioTracks){var s=My(this);return(e=Array.from(this.h.audioTracks)).length?e.map(function(u){return Ei(u,s)}
1):s?[Ei(null,s)]:[]}return[]},h.Hc=function(){if(this.i){if(this.va())return[];for(var e=this.l?this.l.B:null,t=[],n=m(this.i.textStreams),i=n.next();!i.done;i=n.next()){var r=an(i=i.value);r.active=i==e,t.push(r)}return t}return this.h&&this.h.src&&this.h.textTracks?yd(this).map(function(o){return ci(o)}):[]},h.Ij=function(){var e=this.Ce;return this.i&&(e=this.i.imageStreams),e.map(function(t){return ho(t)})},h.wj=function(e){var n,i,t=this;return L(function(r){return 1==r.g?x(r,xy(t,e),2):(n=r.h)?(i=[],n.segmentIndex.Gb(function(o){var s=wy(o.tilesLayout||n.tilesLayout);if(s)for(var u=s.rows*s.columns,a=o.j-o.startTime,l=0;l<u;l++){var c=Sy(o,n,o.startTime+a*l/u,s);i.push(c)}}),n.closeSegmentIndex&&n.closeSegmentIndex(),r.return(i)):r.return(null)})},h.Zj=function(e,t){var i,r,o,s,n=this;return L(function(u){return 1==u.g?x(u,xy(n,e),2):(i=u.h)&&null!=(r=i.segmentIndex.find(t))?(o=i.segmentIndex.get(r),(s=wy(o.tilesLayout||i.tilesLayout))?u.return(Sy(o,i,t,s)):u.return(null)):u.return(null)})},h.mh=function(e){var n=this;this.i&&this.G&&(function t(){var i=n.i.textStreams.find(function(r){return r.id==e.id});i&&i!=n.l.B&&(Dp(n.B.h,i,!1),Yc(n.l,i),Cu(n),Cl(n),n.Cd=i.language)}(),!this.va())||function(){if(n.h&&n.h.textTracks){var i=yd(n),r=i.find(function(u){return ei(u)===e.id});if(r){if(n.o instanceof Dn)for(var o=(i=m(i)).next();!o.done;o=i.next()){var s=(o=o.value)===r?n.ea?"showing":"hidden":"disabled";o.mode!==s&&(o.mode=s)}else(i=i.find(function(u){return"disabled"!==u.mode}))!==r&&(i&&(i.mode="disabled",n.j.La(i,"cuechange"),n.o.remove(0,1/0)),r&&Ay(n,r));Cu(n),Cl(n)}}}()},h.Gf=function(e,t,n){var r=this;t=void 0!==t&&t,n=void 0===n?0:n,(!this.i||!this.G||(function i(){var o=r.i.variants.find(function(u){return u.id==e.id});if(o&&Co(o)){var s=r.l.o;r.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)&&Be("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),r.va()?Il(r,o,!1,!1,0):Il(r,o,!1,t||!1,n||0),r.N.configure({language:o.language,role:o.audio&&o.audio.roles&&o.audio.roles[0]||"",channelCount:o.audio&&o.audio.channelsCount?o.audio.channelsCount:0,Ic:o.video&&o.video.hdr?o.video.hdr:"",spatialAudio:!(!o.audio||!o.audio.spatialAudio)&&o.audio.spatialAudio,videoLayout:o.video&&o.video.videoLayout?o.video.videoLayout:"",Nc:o.audio&&o.audio.label?o.audio.label:"",Hd:"",codecSwitchingStrategy:r.g.mediaSource.codecSwitchingStrategy,audioCodec:o.audio&&o.audio.codecs?o.audio.codecs:"",Kd:s.audio&&s.audio.codecs?s.audio.codecs:"",He:s.audio&&s.audio.channelsCount?s.audio.channelsCount:0,preferredAudioCodecs:r.g.preferredAudioCodecs,preferredAudioChannelCount:r.g.preferredAudioChannelCount}),is(r)}}(),this.va()))&&function(){if(e.originalAudioId&&r.h&&r.h.audioTracks)for(var o=Array.from(r.h.audioTracks),s=(o=m(o)).next();!s.done;s=o.next())if(ei(s=s.value)==e.id){qp(r,s);break}}()},h.Uk=function(e,t){var i=this;t=void 0===t?0:t,(!this.i||!this.G||(function n(){var r=i.N.getConfiguration();r.audioCodec=e.codecs||"",r.Nc=e.label||"",r.channelCount=e.channelsCount||0,r.language=e.language,r.role=e.roles[0]||"",r.spatialAudio=e.spatialAudio,i.N.configure(r),Iu(i,!0,t,!1,!1)}(),this.va()))&&function(){if(i.h&&i.h.audioTracks){for(var r=te(e.language),o=Array.from(i.h.audioTracks),s=null,u=(o=m(o)).next();!u.done;u=o.next())if((u=u.value).label==e.label&&te(u.language||"und")==r&&u.kind==e.roles[0]){s=u;break}s&&qp(i,s)}}()},h.getAudioTracks=function(){if(this.i&&!this.va()){var e=this.Rb();if(!e.length)return[];var t=e.find(function(o){return o.active});if(!t)return[];var n=e;if(this.m!=di||this.va()||(n=e.filter(function(o){return o.originalVideoId===t.originalVideoId&&o.audioCodec})),!n.length)return[];e=new Map;for(var i=(n=m(n)).next();!i.done;i=n.next()){var r=(i=i.value).originalAudioId;r||null==i.audioId||(r=String(i.audioId)),r&&(r+=[i.language,i.label,i.channelsCount,i.spatialAudio].join("_"),e.set(r,{active:i.active,language:i.language,label:i.label,mimeType:i.audioMimeType,codecs:i.audioCodec,primary:i.primary,roles:i.audioR
1oles||[],accessibilityPurpose:i.accessibilityPurpose,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,originalLanguage:i.originalLanguage}))}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:te(s||"und"),label:o.label,mimeType:null,codecs:null,primary:"main"==o.kind,roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:s},o.kind&&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}):[]},h.Wk=function(e,t,n){t=void 0!==t&&t,n=void 0===n?0:n;var i=this.Rb();if(i.length){var r=i.find(function(o){return o.active});r&&(i=i.find(function(o){return o.audioId===r.audioId&&(o.videoBandwidth||o.bandwidth)==e.bandwidth&&o.width==e.width&&o.height==e.height&&o.frameRate==e.frameRate&&o.pixelAspectRatio==e.pixelAspectRatio&&o.hdr==e.hdr&&o.colorGamut==e.colorGamut&&o.videoLayout==e.videoLayout&&o.videoMimeType==e.mimeType&&o.videoCodec==e.codecs}))&&!i.active&&this.Gf(i,t,n)}},h.getVideoTracks=function(){if(this.m==$i||this.va())return[];var e=this.Rb();if(!e.length)return[];var t=e.find(function(o){return o.active});if(!t)return[];var n=e.filter(function(o){return o.originalAudioId===t.originalAudioId&&o.audioId===t.audioId&&o.audioGroupId===t.audioGroupId&&o.videoCodec});if(!n.length)return[];e=new Map;for(var i=(n=m(n)).next();!i.done;i=n.next()){var r=(i=i.value).originalVideoId;r||null==i.videoId||(r=String(i.videoId)),r&&e.set(r,{active:i.active,bandwidth:i.videoBandwidth||i.bandwidth,width:i.width,height:i.height,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,mimeType:i.videoMimeType,codecs:i.videoCodec})}return Array.from(e.values())},h.yj=function(){return Ny(this.Rb())},h.Xj=function(){return Ny(this.Hc())},h.xj=function(){return Array.from(Ry(this.Rb()))},h.Wj=function(){return Array.from(Ry(this.Hc()))},h.Ni=function(e,t,n,i,r,o,s){var a=this;n=void 0===n?0:n,i=void 0===i?0:i,r=void 0===r?"":r,o=void 0!==o&&o,s=void 0===s?"":s,(!this.i||!this.G||(function u(){function l(v,y){return v.video||y.video?v.video&&y.video?Math.abs((v.video.height||0)-(y.video.height||0))+Math.abs((v.video.width||0)-(y.video.width||0)):1/0:0}var c=a.l.o;a.N=a.g.adaptationSetCriteriaFactory(),a.N.configure({language:e,role:t||"",channelCount:n||0,Ic:"",spatialAudio:o||!1,videoLayout:"",Nc:s||"",Hd:"",codecSwitchingStrategy:a.g.mediaSource.codecSwitchingStrategy,audioCodec:r||"",Kd:c.audio&&c.audio.codecs?c.audio.codecs:"",He:c.audio&&c.audio.channelsCount?c.audio.channelsCount:0,preferredAudioCodecs:a.g.preferredAudioCodecs,preferredAudioChannelCount:a.g.preferredAudioChannelCount});for(var d=a.N.create(a.i.variants),f=null,g=(d=m(d.values())).next();!g.done;g=d.next())Co(g=g.value)&&(!f||l(f,c)>l(g,c))&&(f=g);f!=c&&(f?(c=Sn(f),a.Gf(c,!0,i||0)):Iu(a))}(),this.va()))&&function(){if(a.h&&a.h.audioTracks){var l=xr(a.Rb(),e,t||"",!1)[0];l&&a.Gf(l)}}()},h.kh=function(e,t,n){var o,r=this;n=void 0!==n&&n,(!this.i||!this.G||(function i(){r.Cd=e,r.Id=t||"",r.ve=n||!1;var o=xr(r.i.textStreams,r.Cd,r.Id,r.ve)[0]||null;o&&o!=r.l.B&&(Dp(r.B.h,o,!1),r.g.streaming.alwaysStreamText||r.Pg())&&(Yc(r.l,o),Cu(r),Cl(r))}(),this.va()))&&(o=xr(r.Hc(),e,t||"",n||!1)[0])&&r.mh(o)},h.Vk=function(e,t,n){var r=this;t=void 0===t||t,n=void 0===n?0:n,(!this.i||!this.G||(function i(){for(var o=null,s=m(r.i.variants),u=s.next();!u.done;u=s.next())if((u=u.value).audio.label==e){o=u;break}null!=o&&(r.N=r.g.adaptationSetCriteriaFactory(),r.N.configure({language:o.language,role:"",channelCount:0,Ic:"",spatialAudio:!1,videoLayout:"",Hd:"",Nc:e,codecSwitchingStrategy:r.g.mediaSource.codecSwitchingStrategy,audioCodec:"",Kd:"",He:0,preferredAudioCodecs:r.g.preferredAudioCodecs,preferredAudioChannelCount:r.g.preferredAudioChannelCount}),Iu(r,t,n))}(),this.va()))&&function(){if(r.h&&r.h.audioTracks){for(var o=Array.from(r.h.audioTracks),s=null,u=(o=m(o)).next();!u.done;u=o.next())(u=u.value).label==e&&(s=u);s&&qp(r,s)}}()},h.Pg=function(){var e=this.ea;return this.o?this.o.isTextVisible():e},h.Cj=function(){return this.cb.map(function(e){return an(e)})},h.Aj=function(e){if(be("getChapters","Please use an getChaptersAsync."),!this.cb.length)return[];var t=te(e);if(!(e=this.cb.filter(function(o){return te(o.language)==t})).length)return[];for(var n=[],i=new Set,r=(e=m(e)).next();!r.done;r=e.next())(r=r.value).segmentIndex&&r.segmentIndex.Gb(function(o){var s=o.P()[0],u=o.startTime+"-"+
1o.endTime+"-"+s;o={id:u,title:s,startTime:o.startTime,endTime:o.endTime},i.has(u)||(n.push(o),i.add(u))});return n},h.Bj=function(e){var n,i,r,o,s,u,a,t=this;return L(function(l){switch(l.g){case 1:if(!t.cb.length)return l.return([]);if(n=te(e),!(i=t.cb.filter(function(c){return te(c.language)==n})).length)return l.return([]);r=[],o=new Set,s=m(i),u=s.next();case 2:if(u.done){l.A(4);break}if((a=u.value).segmentIndex){l.A(5);break}return x(l,a.createSegmentIndex(),5);case 5:a.segmentIndex.Gb(function(c){var d=c.P()[0],f=c.startTime+"-"+c.endTime+"-"+d;c={id:f,title:d,startTime:c.startTime,endTime:c.endTime},o.has(f)||(r.push(c),o.add(f))}),u=s.next(),l.A(2);break;case 4:return l.return(r)}})},h.rh=function(e){this.ea!=(e=!!e)&&(this.ea=e,this.m==di?(this.o.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.l.B||(e=xr(this.i.textStreams,this.Cd,this.Id,this.ve)).length>0&&(Yc(this.l,e[0]),Cu(this),Cl(this)):function US(e){var t=e.h.get(Pe);t&&(es(t),fa(t).catch(function(){}),e.G=e.h.get(Pe),e.h.delete(Pe),t.stream&&t.stream.closeSegmentIndex&&t.stream.closeSegmentIndex()),e.B=null}(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.o.setTextVisibility(e),Ly(this))},h.Qj=function(){if(this.G)var e=this.G.Ee();else{if(null==this.O)return new Date;if(this.O instanceof Date)return this.O;e=this.O}if(this.i&&!this.va()){var t=this.i.presentationTimeline;return new Date(1e3*((t.m||t.i)+e))}return this.h&&this.h.getStartDate?(t=this.h.getStartDate(),isNaN(t.getTime())?null:new Date(t.getTime()+1e3*e)):null},h.Ig=function(){if(this.i&&!this.va()){var e=this.i.presentationTimeline;return null===(e=e.m||e.i)?null:new Date(1e3*e)}return this.h&&this.h.getStartDate?(e=this.h.getStartDate(),isNaN(e.getTime())?null:e):null},h.Ye=function(){return this.W()&&this.i?this.i.presentationTimeline.Ye():null},h.Wb=function(){if(this.m==di)return this.H.Wb();var e={total:[],audio:[],video:[],text:[]};return this.m==$i&&(e.total=Zo(this.h.buffered)),e},h.We=function(){if(!this.h||!this.h.currentTime)return null;var e=this.Ig().getTime()+1e3*this.h.currentTime;return Math.floor(Date.now()-e)},h.getStats=function(){if(this.m!=di&&this.m!=$i)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:[]};Yp(this);var e=this.h,t=e.currentTime/e.duration;if(isNaN(t)||this.W()||function dA(e,t){e.i=isNaN(e.i)?t:Math.max(e.i,t)}(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(),function cA(e,t,n){e.R=t,e.O=n}(this.B,Number(t.droppedVideoFrames),Number(t.totalVideoFrames)),this.B.N=Number(t.corruptedVideoFrames)),this.B.o=this.D?function yx(e){return e.I?e.I:NaN}(this.D):NaN,Hv(this.B,e.videoWidth||NaN,e.videoHeight||NaN),this.B.l="",this.W()&&null!=this.Ig()&&(e=this.We()||0,this.B.D=e/1e3),t=this.Rb().find(function(r){return r.active}),e=this.Hc().find(function(r){return r.active}),t){if(t.bandwidth){var n=this.L?this.L.i:1,i=n*t.bandwidth;e&&e.bandwidth&&(i+=n*e.bandwidth),this.B.B=i}t.width&&t.height&&Hv(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!=di||this.va()||(this.i&&(this.B.I=this.i.periodCount,this.B.H=this.i.gapCount,this.i.presentationTimeline&&(this.B.L=this.i.presentationTimeline.h)),e=this.u.getBandwidthEstimate(),this.B.u=e),this.m==$i&&Gv(this.B,NaN),function hA(e){for(var t=e.X,n=e.C,i=e.l,r=e.B,o=e.O,s=e.R,u=e.N,a=e.V,l=e.T,c=e.u,d=e.i,f=e.G,g=e.J,v=e.m,y=_p(e.g,"playing"),T=_p(e.g,"paused"),S=_p(e.g,"buffering"),A=e.o,I=e.D,_=e.L,P=e.ni,b=e.j,M=e.M,D=e.I,R=e.H,j=function aA(e){function t(o){return{timestamp:o.timestamp,state:o.state,duration:o.duration}}for(var n=[],i=m(e.h),r=i.next();!r.done;r=i.next())n.push(t(r.value));return e.g&&n.push(t(e.g)),n}(e.g),U=[],B=(e=m(e.h.g)).next();!B.done;B=e.next())U.push({timestamp:(B=B.value).timestamp,id:B.id,type:B.type,fromAdaptation:B.fromAdaptation,bandwidth:B.bandwidth});
1return{width:t,height:n,currentCodecs:i,streamBandwidth:r,decodedFrames:o,droppedFrames:s,corruptedFrames:u,stallsDetected:a,gapsJumped:l,estimatedBandwidth:c,completionPercent:d,loadLatency:f,manifestTimeSeconds:g,drmTimeSeconds:v,playTime:y,pauseTime:T,bufferingTime:S,licenseTime:A,liveLatency:I,maxSegmentDuration:_,manifestSizeBytes:P,bytesDownloaded:b,nonFatalErrorCount:M,manifestPeriodCount:D,manifestGapCount:R,stateHistory:j,switchHistory:U}}(this.B)},h.Ld=function(e,t,n,i,r,o,s){s=void 0!==s&&s;var a,l,c,d,f,g,y,T,S,u=this;return L(function(_){switch(_.g){case 1:if(u.m!=di&&u.m!=$i)throw new k(1,7,7004);if("subtitles"!=n&&"captions"!=n&&Be("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),i){_.A(2);break}return x(_,zp(u,e),3);case 3:i=_.h;case 2:if(a=[],u.C&&(a=u.C.getCuePoints()),u.m!=$i){_.A(4);break}return l=Ne(),s&&"WEBKIT"===l.Ca()&&(n="forced"),x(_,function aE(e,t,n,i,r,o,s){var a,l,c;return L(function(d){if(1==d.g)return"text/vtt"!=r||s.length?x(d,Td(e,t,e.J,e.g.streaming.retryParameters),3):d.A(2);2!=d.g&&(a=Ey(e,d.h,r,s),l=new Blob([a],{type:"text/vtt"}),t=up(l),r="text/vtt"),c=document.createElement("track");e:{var f=e.M,g=t;try{if(!f.g.enabled){var v=g;break e}var y=Up(f);y.ot="c",y.su=!0,v=Bp(g,ad(y));break e}catch(S){fr("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",S),v=g;break e}v=void 0}return c.src=v,c.label=o,c.kind=i,c.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(c),e.Zf.push(c),d.return(c)})}(u,e,t,n,i,o||"",a),5);case 5:if((c=_.h).track)return Ci(u),_.return(ci(c.track));throw new k(1,2,2012);case 4:if(d=cn,f=u.Ta(),g=f.end-f.start,u.i&&(g=u.i.presentationTimeline.getDuration()),g==1/0)throw new k(1,4,4033);if(!a.length){_.A(6);break}return x(_,Td(u,e,u.J,u.g.streaming.retryParameters),7);case 7:y=Ey(u,_.h,i,a),T=new Blob([y],{type:"text/vtt"}),e=up(T),i="text/vtt";case 6:if(S={id:u.xe++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Kc(0,g,[e]),mimeType:i||"",codecs:r||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:o||null,type:d.Ua,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([dn(i||"",r||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},!uo(dn(S.mimeType,S.codecs)))throw new k(2,2,2014,i);return u.i.textStreams.push(S),Ci(u),_.return(an(S))}})},h.Je=function(e,t){var i,r,o,s,u,a,l,c,d,f,g,v,y,T,S,A,I,_,n=this;return L(function(P){switch(P.g){case 1:if(n.m!=di&&n.m!=$i)throw new k(1,7,7004);if(t){P.A(2);break}return x(P,zp(n,e),3);case 3:t=P.h;case 2:if("text/vtt"!=t)throw new k(1,2,2017,e);if(i=cn,r=n.Ta(),o=r.end-r.start,n.i&&(o=n.i.presentationTimeline.getDuration()),o==1/0)throw new k(1,4,4045);return x(P,Td(n,e,n.J,n.g.streaming.retryParameters),4);case 4:if(s=P.h,!(u=Ls(t)))throw new k(2,2,2014,t);for(a=u(),l={periodStart:0,segmentStart:0,segmentEnd:o,vttOffset:0},c=oe(s),d=a.parseMedia(c,l,e,[]),f=[],g=m(d),v=g.next(),y={};!v.done;y={Sf:void 0,ld:void 0},v=g.next())y.ld=v.value,y.Sf=null,T=function(b){return function(){return null==b.Sf&&(b.Sf=Kt([e],[b.ld.payload])),b.Sf||[]}}(y),S=new Ee(y.ld.startTime,y.ld.endTime,T,0,null,null,0,0,1/0),y.ld.payload.includes("#xywh")&&4===(A=y.ld.payload.split("#xywh=")[1].split(",")).length&&S.Jf({height:parseInt(A[3],10),positionX:parseInt(A[0],10),positionY:parseInt(A[1],10),width:parseInt(A[2],10)}),f.push(S);if(I=t,!f.length){P.A(5);break}return x(P,Eu(f[0].P()[0],n.J,n.g.manifest.retryParameters),6);case 6:I=P.h;case 5:return _={id:n.xe++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ut(f),mimeType:I||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:i.Vf,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([dn(I||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null}
1,n.m==$i?n.Ce.push(_):n.i.imageStreams.push(_),Ci(n),P.return(ho(_))}})},h.Ie=function(e,t,n){var r,o,s,u,a,l,c,d,f,g,v,y,T,S,A,i=this;return L(function(I){switch(I.g){case 1:if(i.m!=di&&i.m!=$i)throw new k(1,7,7004);if(n){I.A(2);break}return x(I,zp(i,e),3);case 3:n=I.h;case 2:if(r=cn,o=i.Ta(),s=o.end-o.start,i.i&&(s=i.i.presentationTimeline.getDuration()),s==1/0)throw new k(1,4,4054);return x(I,Td(i,e,i.J,i.g.streaming.retryParameters),4);case 4:if(u=I.h,!(a=Ls(n)))throw new k(2,2,2014,n);for(l=a(),c={periodStart:0,segmentStart:0,segmentEnd:s,vttOffset:0},d=oe(u),f=l.parseMedia(d,c,e,[]),g=[],v=m(f),y=v.next(),T={};!y.done;T={Se:void 0},y=v.next())T.Se=y.value,S=new Ee(T.Se.startTime,T.Se.endTime,function(_){return function(){return[_.Se.payload]}}(T),0,null,null,0,0,1/0),g.push(S);return A={id:i.xe++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ut(g),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:null,type:r.Ua,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([dn("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},i.cb.push(A),Ci(i),I.return(an(A))}})},h.al=function(e,t){this.xa.width=e,this.xa.height=t},h.gh=function(e){if(this.m==di){var t=this.l;if(e=void 0===e?.1:e,t.l.g)t=!1;else if(t.C)t=!1;else{for(var n=m(t.h.values()),i=n.next();!i.done;i=n.next())!(i=i.value).Wd||i.Ra||i.Bb||(i.Wd=!1,Ii(t,i,e));t=!0}}else t=!1;return t},h.Hg=function(){return Be("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},h.Mj=function(){return this.vc},h.Gj=function(){var e={video:null,audio:null,text:null};if(this.m!=di)return e;for(var t=this.l.o,n=this.h.currentTime,i=(t=m([t.video,t.audio,this.l.B])).next();!i.done;i=t.next())if((i=i.value)&&i.segmentIndex){var r=i.segmentIndex.find(n);r={codecs:(r=i.segmentIndex.get(r)).codecs||i.codecs,mimeType:r.mimeType||i.mimeType,bandwidth:r.bandwidth||i.bandwidth},"video"==i.type?(r.width=i.width,r.height=i.height,e.video=r):"audio"==i.type?e.audio=r:i.type==Pe&&(e.text=r)}return e},h.Ui=function(e){this.ye=e},h.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===zr||!navigator.onLine||0==t||!this.i)return!1;if(this.i.variants.some(function(u){var a=u[e.type];return!(!a||a.id===e.id||u.disabledUntilTime||"audio"==e.type&&e.language!==a.language)})){for(var n=!1,i=!1,r=m(this.i.variants),o=r.next();!o.done;o=r.next()){var s=(o=o.value)[e.type];s&&(s.id===e.id?(o.disabledUntilTime=Date.now()/1e3+t,n=!0):s.trickModeVideo&&s.trickModeVideo.id==e.id&&(i=!0))}return!(!n&&i||(this.ze.Ha(1),Iu(this,!1,t=this.Wb().video.reduce(function(u,a){return u+a.end-a.start},0),!0,!1),0))}return!1},h.addFont=function(e,t){return function Qx(e,t){var i,r,o,s;return L(function(u){if(1==u.g)return"fonts"in document&&"FontFace"in X?x(u,document.fonts.ready,2):u.return();if(!("entries"in document.fonts))return u.return();for(i=m(function(a){for(var l=[],c=(a=a.entries()).next();!1===c.done;)l.push(c.value),c=a.next();return l}(document.fonts)),r=i.next();!r.done;r=i.next())if((o=r.value).family===e&&"swap"===o.display)return u.return();s=new FontFace(e,"url("+t+")",{display:"swap"}),document.fonts.add(s),Z(u)})}(e,t)},h.va=function(){return!(!this.h||!this.h.remote)&&"disconnected"!=this.h.remote.state},h.$d=function(){return!(this.h&&!this.h.ended)||this.Pa&&!this.W()&&this.h.currentTime>=this.Ta().end},ue("shaka.Player",W),W.prototype.isEnded=W.prototype.$d,W.prototype.isRemotePlayback=W.prototype.va,W.prototype.addFont=W.prototype.addFont,W.prototype.setVideoContainer=W.prototype.Ui,W.prototype.getFetchedPlaybackInfo=W.prototype.Gj,W.prototype.getManifestParserFactory=W.prototype.Mj,W.prototype.getManifest=W.prototype.Hg,W.prototype.retryStreaming=W.prototype.gh,W.prototype.setMaxHardwareResolution=W.prototype.al,W.prototype.addChapter
1sTrack=W.prototype.Ie,W.prototype.addThumbnailsTrack=W.prototype.Je,W.prototype.addTextTrackAsync=W.prototype.Ld,W.prototype.getStats=W.prototype.getStats,W.prototype.getBufferedInfo=W.prototype.Wb,W.prototype.getSegmentAvailabilityDuration=W.prototype.Ye,W.prototype.getPresentationStartTimeAsDate=W.prototype.Ig,W.prototype.getPlayheadTimeAsDate=W.prototype.Qj,W.prototype.setTextTrackVisibility=W.prototype.rh,W.prototype.getChaptersAsync=W.prototype.Bj,W.prototype.getChapters=W.prototype.Aj,W.prototype.getChaptersTracks=W.prototype.Cj,W.prototype.isTextTrackVisible=W.prototype.Pg,W.prototype.selectVariantsByLabel=W.prototype.Vk,W.prototype.selectTextLanguage=W.prototype.kh,W.prototype.selectAudioLanguage=W.prototype.Ni,W.prototype.getTextLanguages=W.prototype.Wj,W.prototype.getAudioLanguages=W.prototype.xj,W.prototype.getTextLanguagesAndRoles=W.prototype.Xj,W.prototype.getAudioLanguagesAndRoles=W.prototype.yj,W.prototype.getVideoTracks=W.prototype.getVideoTracks,W.prototype.selectVideoTrack=W.prototype.Wk,W.prototype.getAudioTracks=W.prototype.getAudioTracks,W.prototype.selectAudioTrack=W.prototype.Uk,W.prototype.selectVariantTrack=W.prototype.Gf,W.prototype.selectTextTrack=W.prototype.mh,W.prototype.getThumbnails=W.prototype.Zj,W.prototype.getAllThumbnails=W.prototype.wj,W.prototype.getImageTracks=W.prototype.Ij,W.prototype.getTextTracks=W.prototype.Hc,W.prototype.getVariantTracks=W.prototype.Rb,W.prototype.cancelTrickPlay=W.prototype.Md,W.prototype.trickPlay=W.prototype.oe,W.prototype.useTrickPlayTrackIfAvailable=W.prototype.Gh,W.prototype.getPlaybackRate=W.prototype.wb,W.prototype.isBuffering=W.prototype.Og,W.prototype.getKeyStatuses=W.prototype.Ve,W.prototype.getActiveSessionsMetadata=W.prototype.Gg,W.prototype.getExpiration=W.prototype.Td,W.prototype.drmInfo=W.prototype.drmInfo,W.prototype.keySystem=W.prototype.keySystem,W.prototype.isFullyLoaded=W.prototype.jk,W.prototype.goToLive=W.prototype.fk,W.prototype.seekRange=W.prototype.Ta,W.prototype.isVideoOnly=W.prototype.rk,W.prototype.isAudioOnly=W.prototype.ik,W.prototype.isInProgress=W.prototype.Vc,W.prototype.isLive=W.prototype.W,W.prototype.getQueueManager=W.prototype.ei,W.prototype.getAdManager=W.prototype.Zh,W.prototype.getAssetUri=W.prototype.pd,W.prototype.getNetworkingEngine=W.prototype.Qb,W.prototype.getMediaElement=W.prototype.Pj,W.prototype.getManifestType=W.prototype.bi,W.prototype.getLoadMode=W.prototype.Lj,W.prototype.resetConfiguration=W.prototype.Ii,W.prototype.getBufferFullness=W.prototype.$h,W.prototype.getNonDefaultConfiguration=W.prototype.di,W.prototype.getConfigurationForLowLatency=W.prototype.Dj,W.prototype.getConfiguration=W.prototype.getConfiguration,W.prototype.configurationForLowLatency=W.prototype.tj,W.prototype.configure=W.prototype.configure,W.prototype.releaseAllMutexes=W.prototype.Mk,W.prototype.destroyAllPreloads=W.prototype.pg,W.prototype.preload=W.prototype.preload,W.prototype.detachAndSavePreload=W.prototype.Vh,W.prototype.unloadAndSavePreload=W.prototype.hl,W.prototype.load=W.prototype.load,W.prototype.updateStartTime=W.prototype.ll,W.prototype.unload=W.prototype.zc,W.prototype.detach=W.prototype.detach,W.prototype.attachCanvas=W.prototype.lj,W.prototype.attach=W.prototype.hc,W.probeSupport=function(e){var t,n,i,s;return e=void 0===e||e,L(function(a){switch(a.g){case 1:if(t={},!e){a.A(2);break}return x(a,function Ax(){var e,t,n,i,o,s,a,l,c,d,f,g,v,y,T,S,A,I,P,b,M,D,R,j,U,B,H,G,K,z,$,Q;return L(function(He){if(1==He.g){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(" "),!(X.MediaKeys&&X.navigator&&X.navigator.requestMediaKeySystemAccess&&X.MediaKeySystemAccess&&X.MediaKeySystemAccess.prototype.getConfiguration)){for(t={},n=m(e),i=n.next();!i.done;i=n.next())t[i.value]=null;return He.return(t)}for(o="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),a={"com.widevine.alpha":s=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],"com.widevine.alpha.experiment":s,"com.microsoft.playready.recommendation":["150","2000","3000"]},d={videoCapabilities:l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],audioCapabilities:c=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],initDataTypes:["cenc","sinf","skd","keyids"]},f=[null,"cenc","cbcs"],g=new Map,v=Ne(),y=function(le,at){var ot,nt,Xe,je,ze,Ke,Ue,Ge,$t,tn,nn,bn,An;return L(function(Mt){switch(Mt.g){case 1:return fe(Mt,2),x(Mt,at.createMediaKeys(),5);case 5:ot=Mt.h;case 4:Le(Mt,3);break;case 2:return Te(Mt),Mt.return();case 3:if(Xe=!!(nt=at.getConfiguration().sessionTypes)&&nt.includes("persistent-license"),v.ti()&&(Xe=!1),je=at.getConfiguration().videoCapabilities,ze=at.getConfiguration().audioCapabilities,Ke={persistentState:Xe,encryptionSchemes:[],videoRobustnessLevels:[],audioR
1obustnessLevels:[],minHdcpVersions:[]},g.has(le)&&g.get(le)?Ke=g.get(le):g.set(le,Ke),(Ue=je[0].encryptionScheme)&&!Ke.encryptionSchemes.includes(Ue)&&Ke.encryptionSchemes.push(Ue),(Ge=je[0].robustness)&&!Ke.videoRobustnessLevels.includes(Ge)&&Ke.videoRobustnessLevels.push(Ge),($t=ze[0].robustness)&&!Ke.audioRobustnessLevels.includes($t)&&Ke.audioRobustnessLevels.push($t),"getStatusForPolicy"in ot){for(tn=[],nn=m(o),bn=nn.next(),An={};!bn.done;An={Xd:void 0},bn=nn.next())An.Xd=bn.value,Ke.minHdcpVersions.includes(An.Xd)||tn.push(ot.getStatusForPolicy({minHdcpVersion:An.Xd}).then(function(ls){return function(Pr){"usable"!=Pr||Ke.minHdcpVersions.includes(ls.Xd)||Ke.minHdcpVersions.push(ls.Xd)}}(An)));return x(Mt,Promise.all(tn),0)}Mt.A(0)}})},T=function(le,at,ot,nt){var Xe,je,ze,Ke,Ue,Ge,$t,tn,nn,bn;return L(function(Mt){switch(Mt.g){case 1:for(fe(Mt,2),Xe=rr(d),je=m(Xe.videoCapabilities),ze=je.next();!ze.done;ze=je.next())(Ke=ze.value).encryptionScheme=at,Ke.robustness=ot;for(Ue=m(Xe.audioCapabilities),Ge=Ue.next();!Ge.done;Ge=Ue.next())($t=Ge.value).encryptionScheme=at,$t.robustness=nt;return(tn=rr(Xe)).persistentState="required",tn.sessionTypes=["persistent-license"],nn=[tn,Xe],"MOBILE"==Ne().Ma()?x(Mt,N(5,navigator.requestMediaKeySystemAccess(le,nn)),7):x(Mt,navigator.requestMediaKeySystemAccess(le,nn),6);case 6:bn=Mt.h,Mt.A(5);break;case 7:bn=Mt.h;case 5:return x(Mt,y(le,bn),8);case 8:Le(Mt,0);break;case 2:Te(Mt),Z(Mt)}})},S=function(le,at,ot,nt){var Xe,je;return L(function(Ue){switch(Ue.g){case 1:return fe(Ue,2),Xe={type:"media-source",video:{contentType:l[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:c[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:le,video:{encryptionScheme:at,robustness:ot},audio:{encryptionScheme:at,robustness:nt}}},"MOBILE"==Ne().Ma()?x(Ue,N(5,navigator.mediaCapabilities.decodingInfo(Xe)),7):x(Ue,navigator.mediaCapabilities.decodingInfo(Xe),6);case 6:je=Ue.h,Ue.A(5);break;case 7:je=Ue.h;case 5:return x(Ue,y(le,je.keySystemAccess),8);case 8:Le(Ue,0);break;case 2:Te(Ue),Z(Ue)}})},A=m(e),I=A.next();!I.done;I=A.next())g.set(I.value,null);for(P=function(le){return!("WEBKIT"===Ne().Ca()&&"org.w3.clearkey"===le)},b=[],M=m(f),D=M.next();!D.done;D=M.next())for(R=D.value,j=m(e),U=j.next();!U.done;U=j.next())P(B=U.value)&&(b.push(T(B,R,"","")),b.push(S(B,R,"","")));for(H=m(e),G=H.next();!G.done;G=H.next())for(z=m(a[K=G.value]||[]),$=z.next();!$.done;$=z.next())Q=$.value,P(K)&&(b.push(T(K,null,Q,"")),b.push(T(K,null,"",Q)),b.push(S(K,null,Q,"")),b.push(S(K,null,"",Q)));return x(He,Promise.all(b),2)}return He.return(Hh(g))})}(),3);case 3:t=a.h;case 2:return n=function bx(){var e={};if(Ne(),_o())for(var t=m(ta.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(n=(t=m(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!n.done;n=t.next())e[n=n.value]=_o()?ta.has(n):""!=yu().canPlayType(n);return e}(),i=function sS(){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="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.05.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.01",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(ee(so)),t={};Ne();for(var n=(e=m(e)).next();!n.done;n=e.next()){if(uo(n=n.value))t[n]=!0;else if(_o()){var i=Qn(n);i=dn(i,li(Ai(n),i)),t[n]=Zt(i)||!!Wo(i)}else t[n]=""!=yu().canPlayType(n);t[i=n.split(";")[0]]=t[i]||t[n]}return t}(),x(a,Ne().kc(),4);case 4:return s={manifest:n,media:i,drm:t,hardwareResolution:a.h},jy.forEach(function(l,c){s[c]=l()}),a.return(s)}})},W.isBrowserSupported=function(){return X.Promise||Be("A Promise implementation or polyfill is required"),!(!(X.Promise&&X.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/")||(Ne(),!_o()&&""==yu().canPlayType("application/x-mpegurl")))},W.setQueueManagerFactory=function(e){Ed=e},W.setAdManagerFactory=function(e){Ad=e},W.registerSupportPlugin=cy,W.prototype.destroy=W.prototype.destroy;var zr=0,Sd=1,di=2,$i=3;W.LoadMode={DESTROYED:zr,NOT_LOADED:Sd,MEDIA_SOURCE:di,SRC_EQUALS:$i},W.version="v4.15.11";var Oy=["4","15"];jr=new function(e){this.g=e,this.i=Jn,this.h=ms}(new Kn(Number(Oy[0]),Number(Oy[1])));var jy=new Map,Ad=null,Ed=null;function Uy(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}function hE(e){return e.g.length?e.g.reduce(function(t,n){return t+n},0)/e.g.length:0}function Ie(e,t,n){var i=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(){i.i=!0}),this.l.F(this.h,google.ima.AdEvent.Type.RESUMED,function(){i.i=!1})}function Xt(){}function By(e,t){for(var n=[],i=(e=m(ft(e,"Ad"))).next();!i.done;i=e.next())if((i=Yt(i.value,"InLine"))&&(i=Yt(i,"Creatives")))for(var r=(i=m(ft(i,"Creative"))).next();!r.done;r=i.next()){var o=Yt(r=r.value,"Linear");
1if(o&&pE(n,t,o),r=Yt(r,"NonLinearAds"))for(var s=(r=m(r=ft(r,"NonLinear"))).next();!s.done;s=r.next())e:{o=n;var u=t,a=s.value,l=Yt(a,"StaticResource");if(l)s=l.attributes.creativeType;else{if(!(l=Yt(a,"HTMLResource")))break e;s="text/html"}if(l=Si(l)){"text/html"===s&&(l="data:text/html;charset=UTF-8,"+encodeURIComponent(l));var c=Ae(a,"width",Mn)||Ae(a,"expandedWidth",Mn),d=Ae(a,"height",Mn)||Ae(a,"expandedHeight",Mn);if(c||d){var f=null;(a=a.attributes.minSuggestedDuration)&&(f=Vo(a)),a=0,null!=u&&(a=u),o.push({id:null,groupId:null,startTime:a,endTime:null,uri:l,mimeType:s,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:f,once:!0,pre:null==u,post:u==1/0,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:c||0,y:d||0}},displayOnBackground:!1,currentVideo:null,background:null})}}}}return n}function pE(e,t,n){var i=0;null!=t&&(i=t);var r=null;if(n.attributes.skipoffset&&(r=Vo(n.attributes.skipoffset),isNaN(r)&&(r=null)),n=Yt(n,"MediaFiles")){var o=ft(n,"MediaFile");for(n=o,(o=o.filter(function(u){return"streaming"==u.attributes.delivery})).length&&(n=o),o=(n=m(n=n.sort(function(u,a){return(parseInt(a.attributes.height,10)||0)-(parseInt(u.attributes.height,10)||0)}
1))).next();!o.done;o=n.next())if(!(o=o.value).attributes.apiFramework){var s=Si(o);if(s){e.push({id:null,groupId:null,startTime:i,endTime:null,uri:s,mimeType:o.attributes.type||null,isSkippable:null!=r,skipOffset:r,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:null==t,post:t==1/0,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});break}}}}function Id(e,t,n,i,r){var o=this;this.u=e,this.i=t,this.G=!1,this.B=this.o=null,this.H=NaN,this.l=r,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.15.11"),this.g=null,this.C=i||new google.ima.AdsRenderingSettings,this.h.F(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(s){!function gE(e,t){if(e.l(new re("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.g.setVolume(e.i.muted?0: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 re("ima-ad-manager-loaded",(new Map).set("imaAdManager",e.g)));var i=e.g.getCuePoints();if(i.length){t=[];for(var r=(i=m(i)).next();!r.done;r=i.next())t.push({start:r.value,end:null});e.l(new re("ad-cue-points-changed",(new Map).set("cuepoints",t)))}!function mE(e){function t(n,i){n=(new Map).set("originalEvent",n),e.l(new re(i,n))}e.h.F(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(n){Fy(e,n)}),e.h.F(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(n){Vy(e,n)}),e.h.F(e.g,google.ima.AdEvent.Type.STARTED,function(n){Vy(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")}
1),e.h.F(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(n){Cd(e,n)}),e.h.F(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){Cd(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.ALL_ADS_COMPLETED,function(n){t(n,"all-ads-completed")}),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")})}(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 X?(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{Cd(e,null)}}(o,s)}),this.h.F(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(s){Fy(o,s)}),this.h.F(this.i,"ended",function(){o.m.contentComplete()}),this.h.Aa(this.i,"play",function(){o.G=!0})}function Fy(e,t){t.getError(),t=(new Map).set("originalEvent",t),e.l(new re("ad-error",t)),Cd(e,null),e.l(new re("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function Vy(e,t){var n=t.getAd();n?(e.j=new Ie(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new re("ad-content-pause-requested")),t=(new Map).set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new re("ad-started",t)),e.j.isLinear()&&(e.u.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?((t=e.j).j=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):Be("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function Cd(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new re("ad-content-resume-requested")),e.l(new re("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 Ce(e,t,n,i,r,o){this.g=e,this.i=t,this.j=(this.h=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.l=t.skipFor,this.B=n,this.o=i,this.m=r,this.u=o,this.C=t.overlay}function Me(e,t,n){this.g=e,this.j=t,this.h=n,this.i=null==e.overlay}function Hy(e,t,n,i){var r=this;this.N=null,this.C=e,this.D=t,this.g=n,this.H=null,this.B=!0,this.h=this.g,this.i=i,this.V=new Set,this.I=new Set,this.G=new Map,this.M=new Map,this.j=new W,nf(this),this.J=new et,this.l=new et,this.L=!1,this.ia=this.o=this.u=this.m=null,this.ma=!1,this.R=-1,this.ea=function(){if(!r.L&&r.m&&!r.D.va()){r.m=r.g.currentTime;var o=xa(r);o&&Md(r,o,1,1,Date.now())}},this.X=function(){if(!(r.L||r.m||r.D.va())){r.m=r.g.currentTime;var o=xa(r,!0);o||(o=xa(r)),o&&Md(r,o,1,1,Date.now())}},this.oa=function(){r.L||!r.m||r.D.va()||r.u&&!r.u.pre&&!r.u.post&&r.g.currentTime<(r.u.endTime||r.u.startTime)&&(r.u=null)},this.T=new E(this.ea),this.O=new E(function(){var o,s,u,a,l,c,d,g,v,y;return L(function(T){switch(T.g){case 1:if(!r.I.size||null==r.m){T.A(0);break}if((o=r.D.m)==zr||o==Sd)return T.return();s=!1,u=Array.from(r.I),a=r.D.Ta(),l=m(u),c=l.next();case 3:if(c.done){T.A(5);break}if((d=c.value)==r.u){T.A(4);break}if(!(a.start-(d.endTime||d.startTime)>=1)){(g=d.startTime-r.m)>0&&g<=10&&(!r.G.has(d)&&Ky(d)&&r.G.set(d,r.j.preload(d.uri,null,d.mimeType||void 0)),Xy(r,d)),T.A(4);break}if(!r.G.has(d)){T.A(7);break}return x(T,r.G.get(d),8);case 8:(v=T.h)&&v.destroy(),r.G.delete(d);case 7:zy(r,d),y=JSON.stringify(d),r.V.has(y)&&r.V.delete(y),r.I.delete(
1d),Qp(r),d.overlay||(s=!0);case 4:c=l.next(),T.A(3);break;case 5:s&&kd(r),Z(T)}})}),this.configure(this.D.getConfiguration().ads)}function Qp(e){e.ma&&!e.I.size&&(e.J.La(e.g,"playing",e.X),e.J.La(e.g,"timeupdate",e.X),e.J.La(e.g,"seeked",e.oa),e.J.La(e.g,"ended",e.ea),-1!=e.R&&(e.g.cancelVideoFrameCallback(e.R),e.R=-1),e.T&&e.T.stop(),e.O&&e.O.stop(),e.ma=!1)}function ef(e){if(e.C&&e.N&&!e.L){var t=e.N.supportsMultipleMediaElements,n=e.g;n.webkitPresentationMode&&"inline"!==n.webkitPresentationMode&&(t=!1),e.B==t&&(e.B=!t,e.B?(e.h=e.g,e.H&&(e.H.parentElement&&e.C.removeChild(e.H),e.H=null)):(e.H||((t=document.createElement(e.g.tagName)).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.H=t),e.h=e.H))}else e.B=!0}function kl(e,t){var n,i,r,o,s,u,a,l;L(function(c){switch(c.g){case 1:n=!1,i=m(t),r=i.next();case 2:if(r.done){c.A(4);break}if(!(o=r.value).uri){Be("Missing URL in interstitial",o),c.A(3);break}if(o.mimeType){c.A(5);break}return fe(c,6),s=e.j.Qb(),x(c,Eu(o.uri,s,e.D.getConfiguration().streaming.retryParameters),8);case 8:o.mimeType=c.h,Le(c,5);break;case 6:Te(c);case 5:if(u=o.id||JSON.stringify(o),e.V.has(u)){c.A(3);break}o.loop&&!o.overlay&&Be("Loop is only supported in overlay interstitials",o),o.overlay||(n=!0),e.V.add(u),e.I.add(o),a=!1,o.pre&&null==e.m?a=!0:0!=o.startTime||o.canJump?null!=e.m&&(l=o.startTime-e.m)>0&&l<=10&&(a=!0):a=!0,a&&(!e.G.has(o)&&Ky(o)&&e.G.set(o,e.j.preload(o.uri,null,o.mimeType||void 0)),Xy(e,o));case 3:r=i.next(),c.A(2);break;case 4:n&&kd(e),function vE(e){if(!e.ma&&e.I.size){if(e.J.F(e.g,"playing",e.X),e.J.F(e.g,"timeupdate",e.X),e.J.F(e.g,"seeked",e.oa),e.J.F(e.g,"ended",e.ea),"requestVideoFrameCallback"in e.g&&!Wy()){var t=e.g,n=function(){-1!=e.R&&(e.ea(),-1!=e.R&&(e.R=t.requestVideoFrameCallback(n)))};e.R=t.requestVideoFrameCallback(n)}else e.T.Ha(.025);e.O&&e.O.Ha(1),e.ma=!0}}(e),Z(c)}})}function xa(e,t,n){t=void 0!==t&&t,n=void 0===n?null:n;var i=0,r=null;if(e.I.size&&null!=e.m){var o=e.g.ended,s=Array.from(e.I).sort(function(d,f){return f.startTime-d.startTime}),u=s;for(u=s.filter(t?function(d){return d.pre}:o?function(d){return d.post}:function(d){return!d.pre&&!d.post}),u=(s=m(u)).next();!u.done;u=s.next()){u=u.value;var a=!1;if(t)a=u.pre;else if(o)a=u.post;else if(!u.pre&&!u.post){var l=e.m-Math.round(1e3*u.startTime)/1e3,c=1;e.N.allowStartInMiddleOfInterstitial&&u.endTime&&u.endTime!=1/0&&(c=u.endTime-u.startTime),(l>0||0==l&&0==e.m)&&(l<=c||!u.canJump)&&(a=!(null==n&&e.u&&!e.u.pre&&!e.u.post&&e.u.startTime>=u.startTime))}a&&(!e.u||u.startTime>=e.u.startTime)&&(i==(n||0)?r=u:r&&!u.canJump&&Math.round(1e3*u.startTime)/1e3-Math.round(1e3*r.startTime)/1e3>.001&&(r=u,i=0),i++)}}return r}function Md(e,t,n,i,r,o){o=void 0===o?0:o,e.u=t,ef(e),e.B||!e.C||e.h.parentElement||e.C.appendChild(e.h),1==i&&1==n&&(n=Array.from(e.I).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.I.delete(t),Qp(e),t.overlay||kd(e)),t.mimeType&&(t.mimeType.startsWith("image/")||"text/html"===t.mimeType)?t.overlay?function wE(e,t,n,i,r){function o(){e.o&&(e.o.stop(),e.o=null),e.C.removeChild(a),tf(e,t),e.i(new re("ad-stopped")),e.l.Sa();var f=xa(e,t.pre,i-r);f?Md(e,f,n,++i,Date.now(),r):e.L=!1}e.L=!0;var s=t.overlay,u="text/html"==t.mimeType?"iframe":"img",a=document.createElement(u);a.style.objectFit="contain",a.style.position="absolute",a.style.border="none",Gy(e,t),e.i(new re("ad-started",(new Map).set("ad",new Me(t,n,i)))),"iframe"==u?a.src=t.uri:(a.src=t.uri,a.onerror=function(f){e.i(new re("ad-error",(new Map).set("originalEvent",f))),o()});var l=s.viewport,c=s.topLeft;s=s.size,0==l.x&&0==l.y?(a.width=t.overlay.size.x,a.height=t.overlay.size.y,a.style.bottom="10%",a.style.left="0",a.style.right="0",a.style.width="100%",t.overlay.size.y||"iframe"!=u||(a.style.height="auto")):(a.style.height=s.y/l.y*100+"%",a.style.left=c.x/l.x*100+"%",a.style.top=c.y/l.y*100+"%",a.style.width=s.x/l.x*100+"%"),e.C.appendChild(a);var d=Date.now();e.o&&e.o.stop(),e.o=new E(function(){t.playoutLimit&&(Date.now()-d)/1e3>t.playoutLimit||t.endTime&&e.g.currentTime>t.endTime?(e.i(new re("ad-complete")),o()):e.g.currentTime<t.startTime&&(e.i(new re("ad-skipped")),o())}),t.playoutLimit&&!t.endTime?e.o.ka(t.playoutLimit):t.endTime&&e.o.Ha(.025),e.l.F(e.g,"seeked",function(){var f=e.g.currentTime;(f<t.startTime||t.endTime&&f>t.endTime)&&(e.o&&e.o.stop(),e.i(new re("ad-skipped")),o())})}(e,t,n,i,o):Be("Unsupported interstitial",t):e.B&&t.overlay?Be("Unsupported interstitial",t):function xE(e,t,n,i,r,o){var s,u,a,l,c,d,f,g,v,y,T,S,A,I,_,P,b,M,D,R;L(function(j){switch(j.g){case 1:if(s=Date.now(),e.L=!0,u=!1,a=function(){if(!e.B&&!t.overlay&&null==t.resumeOffset)if(t.timelineRange&&t.endTime&&t.endTime!=1/0)e.g.currentTime!=t.endTime&&(e.g.currentTime=t.endTime);else{var U=Date.now();e.g.currentTime+=(U-r)/1e3,r=U}},l=function(U){var B,H;return L(function(G){if(1==G.g){if(a(),B=xa(e,t.pre,i-o),U&&t.groupId)for(;B&&B.groupId==t.groupId;)i++,B=xa(e,t.pre,i-o);return e.o&&(!t.groupId||B&&B.groupId!=t.groupId)&&(e.o.stop(),e.o=null),tf(e,t),B&&!B.overlay?G.A(2):(t.post&&(e.m=null,e.u=null),x(G,e.B?e.
1j.detach():e.j.zc(),4))}2!=G.g&&(e.B&&(null==(H=t.resumeOffset)&&(H=t.timelineRange&&t.endTime&&t.endTime!=1/0?t.endTime-(e.m||0):(Date.now()-r)/1e3),e.i(new re("ad-content-resume-requested",(new Map).set("offset",H)))),e.i(new re("ad-stopped")),e.l.Sa(),e.L=!1,e.B?kd(e):(e.h.style.display="none",a(),e.g.ended||e.g.play())),ef(e),B&&(e.i(new re("ad-stopped")),e.l.Sa(),Md(e,B,n,++i,r,o)),Z(G)})},c=function(U){return L(function(B){return u?B.return():(u=!0,e.i(new re("ad-error",(new Map).set("originalEvent",U))),x(B,l(!1),0))})},d=function(){return L(function(U){if(1==U.g)return u?U.return():(u=!0,x(U,l(!1),2));e.i(new re("ad-complete")),Z(U)})},e.ia=function(){return L(function(U){return u?U.return():(u=!0,e.i(new re("ad-skipped")),x(U,l(!0),0))})},f=new Ce(e.h,t,e.ia,n,i,!e.B),e.B||(f.setMuted(e.g.muted),f.setVolume(e.g.volume)),e.i(new re("ad-started",(new Map).set("ad",f))),(g=f.canSkipNow())&&e.i(new re("ad-skip-state-changed")),e.l.Aa(e.j,"error",c),e.l.F(e.h,"timeupdate",function(){if(e.h.duration){var U=f.canSkipNow();g!=U&&f.getRemainingTime()>0&&f.getDuration()>0&&e.i(new re("ad-skip-state-changed")),g=U}}),e.l.Aa(e.j,"firstquartile",function(){a(),e.i(new re("ad-first-quartile"))}),e.l.Aa(e.j,"midpoint",function(){a(),e.i(new re("ad-midpoint"))}),e.l.Aa(e.j,"thirdquartile",function(){a(),e.i(new re("ad-third-quartile"))}),e.l.Aa(e.j,"complete",d),e.l.F(e.h,"play",function(){e.i(new re("ad-resumed"))}),e.l.F(e.h,"pause",function(){var U=e.j.getConfiguration();e.h.currentTime>=U.playRangeEnd?d():e.i(new re("ad-paused"))}),e.l.F(e.h,"volumechange",function(){e.i(new re(e.h.muted?"ad-muted":"ad-volume-changed"))}),!e.B||1!=i){j.A(2);break}return e.i(new re("ad-content-pause-requested",(new Map).set("saveLivePosition",!0))),v=new At,y=function(U){return L(function(B){if(1==B.g)return"detach"!=U.state?B.A(0):Wy()?x(B,new Promise(function(H){return new E(H).ka(.1)}),3):B.A(3);v.resolve(),e.l.La(e.D,"onstatechange",y),Z(B)})},e.l.F(e.D,"onstatechange",y),x(j,v,2);case 2:return Gy(e,t),e.B||(e.h.style.display="",t.overlay?(e.h.loop=t.loop,S=t.overlay.topLeft,e.h.style.height=(A=t.overlay.size).y/(T=t.overlay.viewport).y*100+"%",e.h.style.left=S.x/T.x*100+"%",e.h.style.top=S.y/T.y*100+"%",e.h.style.width=A.x/T.x*100+"%"):(e.g.pause(),null!=t.resumeOffset&&0!=t.resumeOffset&&(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%")),fe(j,4),nf(e),t.startTime&&t.endTime&&t.endTime!=1/0&&t.startTime!=t.endTime&&(I=t.endTime-t.startTime)>0&&e.j.configure("playRangeEnd",I),t.playoutLimit&&!e.o&&(e.o=new E(function(){e.ia()}).ka(t.playoutLimit),e.j.configure("playRangeEnd",t.playoutLimit)),x(j,e.j.hc(e.h),6);case 6:return _=null,e.N.allowStartInMiddleOfInterstitial&&null!=e.m&&(P=e.m-t.startTime,Math.abs(P)>.25&&(_=P)),e.G.has(t)?x(j,e.G.get(t),10):x(j,e.j.load(t.uri,_,t.mimeType||void 0),8);case 10:return b=j.h,e.G.delete(t),x(j,b?e.j.load(b):e.j.load(t.uri,_,t.mimeType||void 0),8);case 8:e.h.play(),M=(Date.now()-s)/1e3,e.i(new re("ads-loaded",(new Map).set("loadTime",M))),e.B&&e.g.play(),t.overlay&&(D=function(){var U=e.g.currentTime-t.startTime;Math.abs(U-e.h.currentTime)>.1&&(e.h.currentTime=U)},e.l.Aa(e.h,"playing",D),e.l.F(e.g,"seeking",D),e.l.F(e.g,"seeked",function(){var U=e.g.currentTime;(U<t.startTime||t.endTime&&U>t.endTime)&&e.ia()})),Le(j,0);break;case 4:if(R=Te(j),!e.L)return j.return();c(R),Z(j)}})}(e,t,n,i,r,o)}function Gy(e,t){if(t.displayOnBackground&&(e.g.style.zIndex="1"),null!=t.currentVideo){var n=t.currentVideo;e.g.style.transformOrigin="top left";var i=!0,r=[],o=n.topLeft.x/n.viewport.x*100;o>0&&o<=100&&(r.push("translateX("+o+"%)"),i=!1),(o=n.topLeft.y/n.viewport.y*100)>0&&o<=100&&(r.push("translateY("+o+"%)"),i=!1),(o=n.size.x/n.viewport.x)<1&&r.push("scaleX("+o+")"),n=n.size.y/n.viewport.y,o<1&&r.push("scaleY("+n+")"),r.length&&(e.g.style.transform=r.join(" ")),i&&(e.g.style.transition="transform 250ms")}e.C&&(e.C.style.pointerEvents="none",t.background&&(e.C.style.background=t.background)),e.H&&(e.H.style.background=t.overlay?"":"rgb(0, 0, 0)")}
1function tf(e,t){(!t||t.displayOnBackground)&&(e.g.style.zIndex=""),t&&null==t.currentVideo||(e.g.style.transformOrigin="",e.g.style.transition="",e.g.style.transform=""),e.C&&(e.C.style.pointerEvents="",!t||t.background)&&(e.C.style.background=""),e.H&&(e.H.style.background="")}function kd(e){for(var t=[],n=m(e.I),i=n.next(),r={};!i.done;r={yc:void 0},i=n.next())(i=i.value).overlay||(r.yc={start:i.startTime,end:null},i.pre?(r.yc.start=0,r.yc.end=null):i.post?(r.yc.start=-1,r.yc.end=null):i.timelineRange&&(r.yc.end=i.endTime),t.find(function(o){return function(s){return o.yc.start==s.start&&o.yc.end==s.end}}(r))||t.push(r.yc));e.i(new re("ad-cue-points-changed",(new Map).set("cuepoints",t)))}function nf(e){e.j.configure(e.D.di()),e.j.configure("ads.disableHLSInterstitial",!0),e.j.configure("ads.disableDASHInterstitial",!0),e.j.configure("playRangeEnd",1/0),am(e.D.Qb(),e.j.Qb())}function rf(e,t,n){var i;return L(function(s){return 1==s.g?(i=_n([t],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}),x(s,e.D.Qb().request(7,i,n).promise,2)):s.return(s.h.data)})}function Ky(e){return!(e=e.mimeType)||!e.startsWith("image/")&&"text/html"!==e}function Wy(){var e=Ne().Ma();return"TV"==e||"CONSOLE"==e||"CAST"==e}function Xy(e,t){if(!(e.M.has(t)||e.N&&!e.N.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},i=[];if(t.background){var r=t.background.match(/url\(('|")?([^'"()]+)('|")\)?/);r&&i.push(n(r[2]))}t.mimeType.startsWith("image/")&&i.push(n(t.uri)),e.M.set(t,i)}}function zy(e,t){if(e.M.has(t)){for(var n=e.M.get(t),i=(n=m(n)).next();!i.done;i=n.next())(i=i.value).parentNode.removeChild(i);e.M.delete(t)}}function Se(e,t,n,i,r){this.h=e,this.j=Vo(this.h.skipOffset),this.g=r,this.i=t,this.l=n,this.o=i,this.m=!1}function _l(e,t,n,i){this.C=e,this.L=t,this.h=n,this.l=null,this.R=NaN,this.i=i,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}function IE(e,t){var n,r,o,s,a,l;L(function(d){return 1==d.g?!t.staticResource||(n=Yy(t),e.G.get(n))?d.return():(r={type:9},o=_n([t.staticResource],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}),s=e.L.request(7,o,r),fe(d,2),e.G.set(n,[]),x(d,s.promise,4)):2!=d.g?(a=We(d.h.data),l=JSON.parse(a),e.G.set(n,l.apps),Le(d,0)):(Te(d),e.G.delete(n),void Z(d))})}function Yy(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function qy(e){var t=e.h.currentTime;if(0!=t&&null==e.B){for(var n,i,r=m(e.j),o=r.next();!o.done;o=r.next())for(var s=m((o=o.value).ads),u=s.next();!u.done;u=s.next())if(u=u.value,i){if(u.startTimeInSeconds<t&&u.startTimeInSeconds>i.startTimeInSeconds+i.durationInSeconds){i=u,n=o;break}}else u.startTimeInSeconds<t&&(i=u,n=o);n&&i&&!e.N.includes(i.adId)&&(e.B=t,e.h.currentTime=n.startTimeInSeconds)}}function $y(e){if(e.h.duration&&(e.g||e.j.length)){var t=e.h.currentTime,n=!1;if(e.g){n=!0;var i=e.D,r=i.startTimeInSeconds+.5*i.durationInSeconds,o=i.startTimeInSeconds+.75*i.durationInSeconds;t>=i.startTimeInSeconds+.25*i.durationInSeconds&&!e.u.includes("firstQuartile")?(e.u.push("firstQuartile"),Mi(e,"firstQuartile")):t>=r&&!e.u.includes("midpoint")?(e.u.push("midpoint"),Mi(e,"midpoint")):t>=o&&!e.u.includes("thirdQuartile")&&(e.u.push("thirdQuartile"),Mi(e,"thirdQuartile")),i=e.g.getRemainingTime(),r=e.g.getDuration(),e.g.canSkipNow()&&i>0&&r>0&&Mi(e,"skipStateChanged"),r>0&&(i<=0||i>r)&&Sa(e)}if(!e.g||!e.g.isLinear()){e:for(i=m(e.j),r=i.next();!r.done&&(r=r.value,!e.g||!e.g.isLinear());r=i.next())for(o=0;o<r.ads.length;o++){var s=r.ads[o],u=s.startTimeInSeconds+s.durationInSeconds;if(s.startTimeInSeconds<=t&&u>t){if(e.N.includes(s.adId)){if(e.h.ended)continue;e.h.currentTime=u;break e}Sa(e),e.M=r,e.g=new Se(s,o+1,r.ads.length,!0,e.h),e.D=s,0===o&&Mi(e,"breakStart"),Jy(e);break}}if(!e.g)for(r=(i=m(e.j)).next();!r.done&&(r=r.value,!e.g);r=i.next())for(o=0;o<r.nonLinearAdsList.length;o++)if((s=r.nonLinearAdsList[o]).nonLinearAdList.length){u=r.startTimeInSeconds;var a=e.G.get(Yy(s.nonLinearAdList[0]));if(u<=t&&a&&a.length){Sa(e),u=e;for(var l=(a=m(a)).next();!l.done;l=a.next())if((l=l.value).data.source.length){var c=document.createElement("img");c.src=l.data.source[0].url,c.style.top=(l.placeholder.top||0)+"%",c.style.height=100-(l.placeholder.top||0)+"%",c.style.left=(l.placeholder.left||0)+"%",c.style.maxWidth=100-(l.placeholder.left||0)+"%",c.style.objectFit="contain",c.style.position="absolute",u.C.appendChild(c)}e.M=r,e.g=new Se(s,o+1,r.ads.length,!1,e.h),e.D=s,0===o&&Mi(e,"breakStart"),Jy(e);break}}n&&!e.g&&(t=e.h.currentTime,e.B&&e.B>t&&(e.h.currentTime=e.B),e.B=null)}}}function Sa(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;Mi(e,void 0!==t&&t?"skip":"complete");for(var n=(t=m(e.m)).next();!n.done;n=t.next())e.o.La((n=n.value).target,n.type,n.listener);e.m=[],e.u=[],(t=e.g.getPositionInSequence())===(n=e.g.getSequenceLength())&&Mi(e,"breakEnd"),e.g=null,e.D=null,e.M=null}}function Jy(e){var t=!1;e.h.paused?t=!0:(Mi(e,"impression"),Mi(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&Mi(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||Mi(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(Mi(e,"impression"),Mi(e,"start"),t=!1):Mi(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){Mi(e,"pause")}});for(var n=m(e.m),i=n.next();!i.done;i=n.next())e.o.F((i=i.value).target,i.type,i.listener)}function Mi(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)for(var i={type:10},r=(n=m(n.beaconUrls)).next();!r.done;r=n.next())(r=r.value)&&""!=r&&((r=_n([r],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4})).method="POST",e.L.request(7,r,i));switch(t){case"impression":e.i(new re("ad-impression"));break;case"start":e.i(new re("ad-started",(new Map).set("ad",e.g)));break;case"mute":e.i(new re("ad-muted"));break;case"unmute":e.i(new re("ad-volume-changed"));break;case"resume":e.i(new re("ad-resumed"));break;case"pause":e.i(new re("ad-paused"));break;case"firstQuartile":e.i(new re("ad-first-quartile"));break;case"midpoint":e.i(new re("ad-midpoint"));break;case"thirdQuartile":e.i(new re("ad-third-quartile"));break;case"complete":e.i(new re("ad-complete")),e.i(new re("ad-stopped"));break;case"skip":e.i(new re("ad-skipped")),e.i(new re("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 re("ad-skip-state-changed"))}}function ke(e,t){this.g=e,this.i=null,this.h=t}function Zy(e,t,n,i){var r=this;this.u=e,this.l=t,this.j=null,this.G=NaN,this.i=i,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).setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.u,e),this.i(new re("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g))),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(o){!function ME(e,t){e.i(new re("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(0!=n){e.g.streamTimeForContentTime(n);var i=e.g.previousCuePointForStreamTime(n);i&&!i.played&&(e.o=n,e.l.currentTime=i.start)}})}(r,o)}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){r.C.length?r.j.resolve(r.C):r.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),r.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(),r.m=new ke(o,r.l),r.B&&(r.m.i=r.B),r.i(new re("ad-started",(new Map).set("ad",r.m))),r.u.setAttribute("ad-active","true")}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){r.u.removeAttribute("ad-active"),r.o&&r.o>r.l.currentTime&&(r.l.currentTime=r.o,r.o=null)}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(o){r.B=o.getStreamData().adProgressData,r.m&&(r.m.i=r.B)}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){r.i(new re("ad-first-quartile"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){r.i(new re("ad-midpoint"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){r.i(new re("ad-third-quartile"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){r.i(new re("ad-complete")),r.i(new re("ad-stopped")),r.u.removeAttribute("ad-active"),r.m=null}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){r.i(new re("ad-skipped")),r.i(new re("ad-stopped"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(o){var s=o.getStreamData();o=[];for(var u=(s=m(s.cuepoints)).next();!u.done;u=s.next())o.push({start:(u=u.value).start,end:u.end});r.D=o,r.i(new re("ad-cue-points-changed",(new Map).set("cuepoints",o)))})}function he(){vt.call(this),this.h=this.i=this.j=this.g=null,this.m=new Uy,this.o=navigator.language,this.l=null}function _d(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)}function Qy(e){return JSON.stringify(e,function(t,n){if("function"!=typeof n){if(n instanceof Event||n instanceof re){var i={};for(r in n)(t=n[r])&&"object"==typeof t?"detail"==r&&(i[r]=t):r in Event||(i[r]=t);return i}if(n instanceof Error){var r=new Set(["name","message","stack"]);for(i in n)r.add(i);for(t=(i=m(Object.getOwnPropertyNames(n))).next();!t.done;t=i.next())r.add(t.value);for(i={},t=(r=m(r)).next();!t.done;t=r.next())i[t=t.value]=n[t];n={__type__:"Error",contents:i}}else if(n instanceof TimeRanges){for(r={__type__:"TimeRanges",length:n.length,start:[],end:[]},i=(n=m(Zo(n))).next();!i.done;i=n.next())t=(i=i.value).end,r.start.push(i.start),r.end.push(t);n=r}else n=ArrayBuffer.isView(n)&&1===n.BYTES_PER_ELEMENT?{__type__:"Uint8Array",entries:Array.from(n)}:"number"==typeof n?isNaN(n)?"NaN":isFinite(n)?n:n<0?"-Infinity":"Infinity":n;return n}})}function of(e){return JSON.parse(e,function(t,n){if("NaN"==n)var i=NaN;else if("-Infinity"==n)i=-1/0;else if("Infinity"==n)i=1/0;else if(n&&"object"==typeof n&&"TimeRanges"==n.__type__)i=function kE(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(n);else if(n&&"object"==typeof n&&"Uint8Array"==n.__type__)i=new Uint8Array(n.entries);else if(n&&"object"==typeof n&&"Error"==n.__type__){for(i in t=n.contents,n=Error(t.message),t)n[i]=t[i];i=n}else i=n;return i})}(h=Ie.prototype).needsSkipUI=function(){return!1},h.isClientRendering=function(){return!0},h.hasCustomClick=function(){return!0},h.isUsingAnotherMediaElement=function(){return!0},h.getDuration=function(){return this.g.getDuration()},h.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},h.getRemainingTime=function(){return this.h.getRemainingTime()},h.isPaused=function(){return this.i},h.isSkippable=function(){return this.g.getSkipTimeOffset()>=0}
1,h.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},h.canSkipNow=function(){return this.h.getAdSkippableState()},h.skip=function(){return this.h.skip()},h.pause=function(){return this.h.pause()},h.play=function(){return this.h.resume()},h.getVolume=function(){return this.h.getVolume()},h.setVolume=function(e){return this.m.volume=e,this.h.setVolume(e)},h.isMuted=function(){return 0==this.h.getVolume()},h.isLinear=function(){return this.g.isLinear()},h.resize=function(e,t){this.h.resize(e,t)},h.setMuted=function(e){(this.m.muted=e)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)},h.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},h.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},h.getTitle=function(){return this.g.getTitle()},h.getDescription=function(){return this.g.getDescription()},h.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},h.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},h.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},h.getVastAdId=function(){return""},h.getAdId=function(){return this.g.getAdId()},h.getCreativeAdId=function(){return this.g.getCreativeAdId()},h.getAdvertiserName=function(){return this.g.getAdvertiserName()},h.getMediaUrl=function(){return this.g.getMediaUrl()},h.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},h.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},h.release=function(){this.h=this.g=null},ue("shaka.ads.ClientSideAd",Ie),Ie.prototype.release=Ie.prototype.release,Ie.prototype.getPodIndex=Ie.prototype.getPodIndex,Ie.prototype.getTimeOffset=Ie.prototype.getTimeOffset,Ie.prototype.getMediaUrl=Ie.prototype.getMediaUrl,Ie.prototype.getAdvertiserName=Ie.prototype.getAdvertiserName,Ie.prototype.getCreativeAdId=Ie.prototype.getCreativeAdId,Ie.prototype.getAdId=Ie.prototype.getAdId,Ie.prototype.getVastAdId=Ie.prototype.getVastAdId,Ie.prototype.getVastMediaWidth=Ie.prototype.getVastMediaWidth,Ie.prototype.getVastMediaHeight=Ie.prototype.getVastMediaHeight,Ie.prototype.getVastMediaBitrate=Ie.prototype.getVastMediaBitrate,Ie.prototype.getDescription=Ie.prototype.getDescription,Ie.prototype.getTitle=Ie.prototype.getTitle,Ie.prototype.getPositionInSequence=Ie.prototype.getPositionInSequence,Ie.prototype.getSequenceLength=Ie.prototype.getSequenceLength,Ie.prototype.setMuted=Ie.prototype.setMuted,Ie.prototype.resize=Ie.prototype.resize,Ie.prototype.isLinear=Ie.prototype.isLinear,Ie.prototype.isMuted=Ie.prototype.isMuted,Ie.prototype.setVolume=Ie.prototype.setVolume,Ie.prototype.getVolume=Ie.prototype.getVolume,Ie.prototype.play=Ie.prototype.play,Ie.prototype.pause=Ie.prototype.pause,Ie.prototype.skip=Ie.prototype.skip,Ie.prototype.canSkipNow=Ie.prototype.canSkipNow,Ie.prototype.getTimeUntilSkippable=Ie.prototype.getTimeUntilSkippable,Ie.prototype.isSkippable=Ie.prototype.isSkippable,Ie.prototype.isPaused=Ie.prototype.isPaused,Ie.prototype.getRemainingTime=Ie.prototype.getRemainingTime,Ie.prototype.getMinSuggestedDuration=Ie.prototype.getMinSuggestedDuration,Ie.prototype.getDuration=Ie.prototype.getDuration,Ie.prototype.isUsingAnotherMediaElement=Ie.prototype.isUsingAnotherMediaElement,Ie.prototype.hasCustomClick=Ie.prototype.hasCustomClick,Ie.prototype.isClientRendering=Ie.prototype.isClientRendering,Ie.prototype.needsSkipUI=Ie.prototype.needsSkipUI,ue("shaka.ads.Utils",Xt),Xt.ADS_LOADED="ads-loaded",Xt.AD_STARTED="ad-started",Xt.AD_FIRST_QUARTILE="ad-first-quartile",Xt.AD_MIDPOINT="ad-midpoint",Xt.AD_THIRD_QUARTILE="ad-third-quartile",Xt.AD_COMPLETE="ad-complete",Xt.AD_STOPPED="ad-stopped",Xt.AD_SKIPPED="ad-skipped",Xt.AD_VOLUME_CHANGED="ad-volume-changed",Xt.AD_MUTED="ad-muted",Xt.AD_PAUSED="ad-paused",Xt.AD_RESUMED="ad-resumed",Xt.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Xt.CUEPOINTS_CHANGED="ad-cue-points-changed",Xt.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Xt.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Xt.AD_CLICKED="ad-clicked",Xt.AD_PROGRESS="ad-progress",Xt.AD_BUFFERING="ad-buffering",Xt.AD_IMPRESSION="ad-impression",Xt.AD_DURATION_CHANGED="ad-duration-changed",Xt.AD_CLOSED="ad-closed",Xt.AD_LOADED="ad-loaded",Xt.ALL_ADS_COMPLETED="all-ads-completed",Xt.AD_LINEAR_CHANGED="ad-linear-changed",Xt.AD_METADATA="ad-metadata",Xt.AD_RECOVERABLE_ERROR="ad-recoverable-error",Xt.AD_ERROR="ad-error",Xt.AD_BREAK_READY="ad-break-ready",Xt.AD_INTERACTION="ad-interaction",Xt.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",Xt.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",Xt.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",Id.prototype.configure=function(e){this.o=e},Id.prototype.stop=function(){this.g&&this.g.stop(),this.u&&cl(this.u)},Id.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()},(h=Ce.prototype).needsSkipUI=function(){return!0},h.isClientRendering=function(){return!0},h.hasCustomClick=function(){return!1},h.isUsingAnotherMediaElement=function(){return this.u},h.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},h.isPaused=function(){return this.g.paused},h.isSkippable=function(){return this.h&&null!=this.l?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.h},h.getTimeUntilSkippable=function(){if(this.isSkippable()){var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)}return Math.max(this.getRemainingTime(),0)},h.canSkipNow=function(){return this.h&&0==this.getTimeUntilSkippable()},h.skip=function(){this.canSkipNow()&&this.B()},h.pause=function(){return this.g.pause()},h.play=function(){return this.g.play()},h.getVolume=function(){return this.g.volume},h.setVolume=function(e){this.g.volume=e},h.isMuted=function(){return this.g.muted},h.isLinear=function(){return null==this.C},h.resize=function(){},h.setMuted=function(e){this.g.muted=e},h.getSequenceLength=function(){return this.o},h.getPositionInSequence=function(){return this.m},h.getTitle=function(){return""},h.getDescription=function(){return""},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return 0},h.getVastMediaWidth=function(){return 0},h.getVastAdId=function(){return""},h.getAdId=function(){return this.i.id||""},h.getCreativeAdId=function(){return""},h.getAdvertiserName=function(){return""},h.getMediaUrl=function(){return this.i.uri},h.getTimeOffset=function(){return 0},h.getPodIndex=function(){return 0},h.release=function(){this.g=null},ue("shaka.ads.InterstitialAd",Ce),Ce.prototype.release=Ce.prototype.release,Ce.prototype.getPodIndex=Ce.prototype.getPodIndex,Ce.prototype.getTimeOffset=Ce.prototype.getTimeOffset,Ce.prototype.getMediaUrl=Ce.prototype.getMediaUrl,Ce.prototype.getAdvertiserName=Ce.prototype.getAdvertiserName,Ce.prototype.getCreativeAdId=Ce.prototype.getCreativeAdId,Ce.prototype.getAdId=Ce.prototype.getAdId,Ce.prototype.getVastAdId=Ce.prototype.getVastAdId,Ce.prototype.getVastMediaWidth=Ce.prototype.getVastMediaWidth,Ce.prototype.getVastMediaHeight=Ce.prototype.getVastMediaHeight,Ce.prototype.getVastMediaBitrate=Ce.prototype.getVastMediaBitrate,Ce.prototype.getDescription=Ce.prototype.getDescription,Ce.prototype.getTitle=Ce.prototype.getTitle,Ce.prototype.getPositionInSequence=Ce.prototype.getPositionInSequence,Ce.prototype.getSequenceLength=Ce.prototype.getSequenceLength,Ce.prototype.setMuted=Ce.prototype.setMuted,Ce.prototype.resize=Ce.prototype.resize,Ce.prototype.isLinear=Ce.prototype.isLinear,Ce.prototype.isMuted=Ce.prototype.isMuted,Ce.prototype.setVolume=Ce.prototype.setVolume,Ce.prototype.getVolume=Ce.prototype.getVolume,Ce.prototype.play=Ce.prototype.play,Ce.prototype.pause=Ce.prototype.pause,Ce.prototype.skip=Ce.prototype.skip,Ce.prototype.canSkipNow=Ce.prototype.canSkipNow,Ce.prototype.getTimeUntilSkippable=Ce.prototype.getTimeUntilSkippable,Ce.prototype.isSkippable=Ce.prototype.isSkippable,Ce.prototype.isPaused=Ce.prototype.isPaused,Ce.prototype.getRemainingTime=Ce.prototype.getRemainingTime,Ce.prototype.getMinSuggestedDuration=Ce.prototype.getMinSuggestedDuration,Ce.prototype.getDuration=Ce.prototype.getDuration,Ce.prototype.isUsingAnotherMediaElement=Ce.prototype.isUsingAnotherMediaElement,Ce.prototype.hasCu
1stomClick=Ce.prototype.hasCustomClick,Ce.prototype.isClientRendering=Ce.prototype.isClientRendering,Ce.prototype.needsSkipUI=Ce.prototype.needsSkipUI,(h=Me.prototype).needsSkipUI=function(){return!0},h.isClientRendering=function(){return!0},h.hasCustomClick=function(){return!1},h.isUsingAnotherMediaElement=function(){return!1},h.getDuration=function(){return-1},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){return-1},h.isPaused=function(){return!1},h.isSkippable=function(){return!1},h.getTimeUntilSkippable=function(){return 0},h.canSkipNow=function(){return!1},h.skip=function(){},h.pause=function(){},h.play=function(){},h.getVolume=function(){return 1},h.setVolume=function(){},h.isMuted=function(){return!1},h.isLinear=function(){return this.i},h.resize=function(){},h.setMuted=function(){},h.getSequenceLength=function(){return this.j},h.getPositionInSequence=function(){return this.h},h.getTitle=function(){return""},h.getDescription=function(){return""},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return 0},h.getVastMediaWidth=function(){return 0},h.getVastAdId=function(){return""},h.getAdId=function(){return this.g.id||""},h.getCreativeAdId=function(){return""},h.getAdvertiserName=function(){return""},h.getMediaUrl=function(){return this.g.uri},h.getTimeOffset=function(){return 0},h.getPodIndex=function(){return 0},h.release=function(){},ue("shaka.ads.InterstitialStaticAd",Me),Me.prototype.release=Me.prototype.release,Me.prototype.getPodIndex=Me.prototype.getPodIndex,Me.prototype.getTimeOffset=Me.prototype.getTimeOffset,Me.prototype.getMediaUrl=Me.prototype.getMediaUrl,Me.prototype.getAdvertiserName=Me.prototype.getAdvertiserName,Me.prototype.getCreativeAdId=Me.prototype.getCreativeAdId,Me.prototype.getAdId=Me.prototype.getAdId,Me.prototype.getVastAdId=Me.prototype.getVastAdId,Me.prototype.getVastMediaWidth=Me.prototype.getVastMediaWidth,Me.prototype.getVastMediaHeight=Me.prototype.getVastMediaHeight,Me.prototype.getVastMediaBitrate=Me.prototype.getVastMediaBitrate,Me.prototype.getDescription=Me.prototype.getDescription,Me.prototype.getTitle=Me.prototype.getTitle,Me.prototype.getPositionInSequence=Me.prototype.getPositionInSequence,Me.prototype.getSequenceLength=Me.prototype.getSequenceLength,Me.prototype.setMuted=Me.prototype.setMuted,Me.prototype.resize=Me.prototype.resize,Me.prototype.isLinear=Me.prototype.isLinear,Me.prototype.isMuted=Me.prototype.isMuted,Me.prototype.setVolume=Me.prototype.setVolume,Me.prototype.getVolume=Me.prototype.getVolume,Me.prototype.play=Me.prototype.play,Me.prototype.pause=Me.prototype.pause,Me.prototype.skip=Me.prototype.skip,Me.prototype.canSkipNow=Me.prototype.canSkipNow,Me.prototype.getTimeUntilSkippable=Me.prototype.getTimeUntilSkippable,Me.prototype.isSkippable=Me.prototype.isSkippable,Me.prototype.isPaused=Me.prototype.isPaused,Me.prototype.getRemainingTime=Me.prototype.getRemainingTime,Me.prototype.getMinSuggestedDuration=Me.prototype.getMinSuggestedDuration,Me.prototype.getDuration=Me.prototype.getDuration,Me.prototype.isUsingAnotherMediaElement=Me.prototype.isUsingAnotherMediaElement,Me.prototype.hasCustomClick=Me.prototype.hasCustomClick,Me.prototype.isClientRendering=Me.prototype.isClientRendering,Me.prototype.needsSkipUI=Me.prototype.needsSkipUI,(h=Hy.prototype).configure=function(e){this.N=e,ef(this)},h.stop=function(){if(this.l&&this.l.Sa(),this.V.clear(),this.I.clear(),this.j.pg(),this.G.size)for(var e=Array.from(this.G.values()),t=(e=m(e)).next();!t.done;t=e.next())(t=t.value)&&t.then(function(n){n&&n.destroy()});if(this.G.clear(),this.M.size)for(t=(e=m(e=Array.from(this.M.keys()))).next();!t.done;t=e.next())zy(this,t.value);this.M.clear(),this.j.detach(),this.L=!1,this.u=this.m=null,this.B=!0,this.h=this.g,this.H=null,tf(this),Qp(this),this.C&&cl(this.C),this.o&&(this.o.stop(),this.o=null)},h.release=function(){this.stop(),this.J&&this.J.release(),this.l&&this.l.release(),this.T&&(this.T.stop(),this.T=null),this.O&&(this.O.stop(),this.O=null),this.j.destroy()},h.qd=function(){return this.j},h.addAdUrlInterstitial=function(e){var n,r,o,s,u,a,l,t=this;return L(function(d){if(1==d.g)return x(d,rf(t,e,n={type:12}),2);if(3!=d.g){if(!(r=Br(d.h,"VAST,vmap:VMAP")))throw new k(2,10,10007);if(o=[],"VAST"==r.tagName)return o=By(r,t.m),d.A(3);if("vmap:VMAP"!=r.tagName)return d.A(3);for(s=function(f){var v;return L(function(y){if(1==y.g)return x(y,rf(t,f.uri,n),2);
1if(!(v=Br(y.h,"VAST")))throw new k(2,10,10007);o.push.apply(o,ee(By(v,f.time))),Z(y)})},u=[],a=m(function fE(e){for(var t=[],n=(e=m(ft(e,"vmap:AdBreak"))).next();!n.done;n=e.next()){var i=n.value,r=i.attributes.timeOffset;r&&(n=null,n="start"==r?null:"end"==r?1/0:Vo(r),(i=Yt(i,"vmap:AdSource"))&&(i=Yt(i,"vmap:AdTagURI"))&&(i=fn(i))&&t.push({time:n,uri:i}))}return t}(r)),l=a.next();!l.done;l=a.next())u.push(s(l.value));return u.length?x(d,Promise.all(u),3):d.A(3)}kl(t,o),Z(d)})},(h=Se.prototype).needsSkipUI=function(){return!0},h.isClientRendering=function(){return!1},h.hasCustomClick=function(){return!1},h.isUsingAnotherMediaElement=function(){return!1},h.getDuration=function(){return this.h.durationInSeconds},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},h.isPaused=function(){return this.g.paused},h.isSkippable=function(){return"number"==typeof this.j},h.getTimeUntilSkippable=function(){if("number"!=typeof this.j)return this.getRemainingTime();var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)},h.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},h.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},h.pause=function(){return this.g.pause()},h.play=function(){return this.g.play()},h.getVolume=function(){return this.g.volume},h.setVolume=function(e){this.g.volume=e},h.isMuted=function(){return this.g.muted},h.isLinear=function(){return this.o},h.resize=function(){},h.setMuted=function(e){this.g.muted=e},h.getSequenceLength=function(){return this.l?this.l:1},h.getPositionInSequence=function(){return this.i?this.i:1},h.getTitle=function(){return this.h.adTitle},h.getDescription=function(){return""},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return 0},h.getVastMediaWidth=function(){return 0},h.getVastAdId=function(){return this.h.vastAdId||""},h.getAdId=function(){return this.h.adId},h.getCreativeAdId=function(){return this.h.creativeId},h.getAdvertiserName=function(){return""},h.getMediaUrl=function(){return null},h.getTimeOffset=function(){return 0},h.getPodIndex=function(){return 0},h.release=function(){this.l=this.i=this.g=this.h=null},ue("shaka.ads.MediaTailorAd",Se),Se.prototype.release=Se.prototype.release,Se.prototype.getPodIndex=Se.prototype.getPodIndex,Se.prototype.getTimeOffset=Se.prototype.getTimeOffset,Se.prototype.getMediaUrl=Se.prototype.getMediaUrl,Se.prototype.getAdvertiserName=Se.prototype.getAdvertiserName,Se.prototype.getCreativeAdId=Se.prototype.getCreativeAdId,Se.prototype.getAdId=Se.prototype.getAdId,Se.prototype.getVastAdId=Se.prototype.getVastAdId,Se.prototype.getVastMediaWidth=Se.prototype.getVastMediaWidth,Se.prototype.getVastMediaHeight=Se.prototype.getVastMediaHeight,Se.prototype.getVastMediaBitrate=Se.prototype.getVastMediaBitrate,Se.prototype.getDescription=Se.prototype.getDescription,Se.prototype.getTitle=Se.prototype.getTitle,Se.prototype.getPositionInSequence=Se.prototype.getPositionInSequence,Se.prototype.getSequenceLength=Se.prototype.getSequenceLength,Se.prototype.setMuted=Se.prototype.setMuted,Se.prototype.resize=Se.prototype.resize,Se.prototype.isLinear=Se.prototype.isLinear,Se.prototype.isMuted=Se.prototype.isMuted,Se.prototype.setVolume=Se.prototype.setVolume,Se.prototype.getVolume=Se.prototype.getVolume,Se.prototype.play=Se.prototype.play,Se.prototype.pause=Se.prototype.pause,Se.prototype.skip=Se.prototype.skip,Se.prototype.canSkipNow=Se.prototype.canSkipNow,Se.prototype.getTimeUntilSkippable=Se.prototype.getTimeUntilSkippable,Se.prototype.isSkippable=Se.prototype.isSkippable,Se.prototype.isPaused=Se.prototype.isPaused,Se.prototype.getRemainingTime=Se.prototype.getRemainingTime,Se.prototype.getMinSuggestedDuration=Se.prototype.getMinSuggestedDuration,Se.prototype.getDuration=Se.prototype.getDuration,Se.prototype.isUsingAnotherMediaElement=Se.prototype.isUsingAnotherMediaElement,Se.prototype.hasCustomClick=Se.prototype.hasCustomClick,Se.prototype.isClientRendering=Se.prototype.isClientRendering,Se.prototype.needsSkipUI=Se.prototype.needsSkipUI,_l.prototype.stop=function(){for(var e=m(this.m),t=e.next();!t.done;t=e.next())this.o.La((t=t.value).target,t.type,t.listener);Sa(this),this.m=[],this.u=[],this.H="",this.O=!0,this.I="",this.B=null,this.j=[],this.N=[],this.G.clear()},_l.prototype.release=function(){this.stop(),this.o&&this.o.release()},_l.prototype.onManifestUpdated=function(e){this.J=e,""!=this.H&&(function EE(e,t,n){var i,r,o,u,a,l,c,d,g,v,T,S;L(function(I){if(1==I.g)return i={type:8},r=_n([t],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}),o=e.L.request(7,r,i),fe(I,2),x(I,o.promise,4);if(2!=I.g){if(u=[],a=We(I.h.data),(l=JSON.parse(a)).avails.length>0){if(JSON.stringify(e.j)!=JSON.stringify(l.avails)){for(e.j=l.avails,c=m(e.j),d=c.next();!d.done;d=c.next())for(g=m(d.value.nonLinearAdsList),v=g.next();!v.done;v=g.next())for(T=m(v.value.nonLinearAdList),S=T.next();!S.done;S=T.next())IE(e,S.value);u=e.getCuePoints(),e.i(new re("ad-cue-points-changed",(new Map).set("cuepoints",u)))}}else e.j.length&&e.i(new re("ad-cue-points-changed",(new Map).set("cuepoints",u))),Sa(e),e.j=[];return n&&(e.J||u.length>0)&&function CE(e){$y(e),e.J||(qy(e),e.o.F(e.h,"seeked",function(){qy(e)}),e.o.F(e.h,"ended",function(){Sa(e)})),e.o.F(e.h,"timeupdate",function(){$y(e)})}(e),Le(I,0)}Te(I),Z(I)})}(this,this.H,this.O),this.O=!1)},_l.prototype.getCuePoints=function(){for(var e=[],t=m(this.j),n=t.next();!n.done;n=t.next())for(var i=(n=m(n.value.ads)).next();!i.done;i=n.next())e.push({start:(i=i.value).startTimeInSeconds,end:i.startTimeInSeconds+i.durationInSeconds});return e},(h=ke.prototype).needsSkipUI=function(){return!0},h.isClientRendering=function(){return!1},h.hasCustomClick=function(){return!0},h.isUsingAnotherMediaElement=function(){return!1},h.getDuration=function(){return this.i?this.i.duration:-1},h.getMinSuggestedDuration=function(){return this.getDuration()},h.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},h.isPaused=function(){return this.h.paused},h.isSkippable=function(){return this.g.isSkippable()},h.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},h.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},h.skip=function(){this.h.currentTime+=this.getRemainingTime()},h.pause=function(){return this.h.pause()},h.play=function(){return this.h.play()},h.getVolume=function(){return this.h.volume},h.setVolume=function(e){this.h.volume=e},h.isMuted=function(){return this.h.muted},h.isLinear=function(){return!0},h.resize=function(){},h.setMuted=function(e){this.h.muted=e},h.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},h.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},h.getTitle=function(){return this.g.getTitle()},h.getDescription=function(){return this.g.getDescription()},h.getVastMediaBitrate=function(){return 0},h.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},h.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},h.getVastAdId=function(){return""},h.getAdId=function(){return this.g.getAdId()},h.getCreativeAdId=function(){return this.g.getCreativeAdId()},h.getAdvertiserName=function(){return this.g.getAdvertiserName()},h.getMediaUrl=function(){return null},h.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},h.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},h.release=function(){this.h=this.i=this.g=null},ue("shaka.ads.ServerSideAd",ke),ke.prototype.release=ke.prototype.release,ke.prototype.getPodIndex=ke.prototype.getPodIndex,ke.prototype.getTimeOffset=ke.prototype.getTimeOffset,ke.prototype.getMediaUrl=ke.prototype.getMediaUrl,ke.prototype.getAdvertiserName=ke.prototype.getAdvertiserName,ke.prototype.getCreativeAdId=ke.prototype.getCreativeAdId,ke.prototype.getAdId=ke.prototype.getAdId,ke.prototype.getVastAdId=ke.prototype.getVastAdId,ke.prototype.getVastMediaWidth=ke.prototype.getVastMediaWidth,ke.prototype.getVastMediaHeight=ke.prototype.getVastMediaHeight,ke.prototype.getVastMediaBitrate=ke.prototype.getVastMediaBitrate,ke.prototype.getDescription=ke.prototype.getDescription,ke.prototype.getTitle=ke.prototype.getTitle,ke.prototype.getPositionInSequence=ke.prototype.getPositionInSequence,ke.prototype.getSequenceLength=ke.prototype.getSequenceLength,ke.prototype.setMuted=ke.prototype.setMuted,ke.prototype.resize=ke.prototype.resize,ke.prototype.isLinear=ke.prototype.isLinear,ke.prototype.isMuted=ke.prototype.isMuted,ke.prototype.setVolume=ke.prototype.setVolume,ke.prototype.getVolume=ke.prototype.getVolume,ke.prototype.play=ke.prototype.play,ke.prototype.pause=ke.prototype.pause,ke.prototype.skip=ke.prototype.skip,ke.prototype.canSkipNow=ke.prototype.canSkipNow,ke.prototype.getTimeUntilSkippable=ke.prototype.getTimeUntilSkippable,ke.prototype.isSkippable=ke.prototype.isSkippable,ke.prototype.isPaused=ke.prototype.isPaused,ke.prototype.getRemainingTime=ke.prototype.getRemainingTime,ke.prototype.getMinSuggestedDuration=ke.prototype.getMinSuggestedDuration,ke.prototype.getDuration=ke.prototype.getDuration,ke.prototype.isUsingAnotherMediaElement=ke.prototype.isUsingAnotherMediaElement,ke.prototype.hasCu
1stomClick=ke.prototype.hasCustomClick,ke.prototype.isClientRendering=ke.prototype.isClientRendering,ke.prototype.needsSkipUI=ke.prototype.needsSkipUI,(h=Zy.prototype).configure=function(){},h.stop=function(){this.C="",this.o=null,this.D=[]},h.release=function(){this.stop(),this.h&&this.h.release()},h.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},h.getCuePoints=function(){return this.D},wt(he,vt),(h=he.prototype).setLocale=function(e){this.o=e},h.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)},h.initInterstitial=function(e,t,n){var i=this;this.g&&this.g.release(),this.g=new Hy(e,t,n,function(r){return _d(i,r)}),this.g.configure(this.l)},h.initClientSide=function(e,t,n){var i=this;if(!X.google||!google.ima||!google.ima.AdsLoader)throw new k(2,10,1e4);this.j&&this.j.release(),this.j=new Id(e,t,this.o,n,function(r){return _d(i,r)}),this.j.configure(this.l)},h.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),vt.prototype.release.call(this)},h.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 re("ad-stopped")),this.dispatchEvent(new re("ad-content-attach-requested")),this.m=new Uy},h.requestClientSideAds=function(e){if(!this.j)throw new k(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)},h.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new k(1,10,10001);var t=this.j;t.C=e,t.g&&t.g.updateAdsRenderingSettings(t.C)},h.initMediaTailor=function(e,t,n){var i=this;this.i&&this.i.release(),this.i=new _l(e,t,n,function(r){return _d(i,r)})},h.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new k(1,10,10005);var i=this.i;return n=void 0===n?"":n,i.l?e=Promise.reject(new k(1,10,10004)):(i.l=new At,function AE(e,t,n){var i,r,o,s,a,l,c,d,f,g,v;L(function(y){if(1==y.g)return i={type:7},(r=_n([t],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4})).method="POST",n&&(o=JSON.stringify(n),r.body=zt(o)),s=e.L.request(7,r,i),fe(y,2),x(y,s.promise,4);if(2!=y.g){if(a=We(y.h.data),!(l=JSON.parse(a)).manifestUrl||!l.trackingUrl)throw Error("Insufficient data from MediaTailor.");return c=new O(t),d=new O(l.trackingUrl),e.H=c.resolve(d).toString(),f=Date.now()/1e3,g=f-e.R,e.i(new re("ads-loaded",(new Map).set("loadTime",g))),v=new O(l.manifestUrl),e.l.resolve(c.resolve(v).toString()),e.l=null,Le(y,0)}if(Te(y),!e.I.length)return e.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),e.l=null,y.return();e.l.resolve(e.I),e.l=null,Z(y)})}(i,e,t),i.I=n||"",i.R=Date.now()/1e3,e=i.l),e},h.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new k(1,10,10005);var t=this.i;t.H=e,t.i(new re("ads-loaded",(new Map).set("loadTime",0)))},h.initServerSide=function(e,t){var n=this;if(!X.google||!google.ima||!google.ima.dai)throw new k(2,10,10002);this.h&&this.h.release(),this.h=new Zy(e,t,this.o,function(i){return _d(n,i)}),this.h.configure(this.l)},h.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.h)throw new k(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&Be('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.15.11",(n=this.h).j?e=Promise.reject(new k(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.H=!0),n.j=new At,n.g.requestStream(e),n.C=t||"",n.G=Date.now()/1e3,e=n.j),e},h.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new k(1,10,10003);(e.mpt||e.mpv)&&Be('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.15.11",this.h.g.replaceAdTagParameters(e)}
1,h.getServerSideCuePoints=function(){return be("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},h.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},h.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:hE(e),started:e.h,overlayAds:e.j,playedCompletely:e.l,skipped:e.m,errors:e.i}},h.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},h.onDashTimedMetadata=function(e){this.h&&"urn:google:dai:2018"==e.schemeIdUri&&this.h.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},h.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},h.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},h.onHLSInterstitialMetadata=function(e,t,n){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&function yE(e,t){var n;L(function(i){if(1==i.g)return nf(e),x(i,function SE(e,t){var n,i,r,o,s,u,a,l,c,d,f,g,v,T,S,I,_,b,M,R,j,U,B,H,G,K,$,Q,at,ot,nt,Xe,je,ze,Ke;return L(function(Ue){switch(Ue.g){case 1:if(n=[],!t||(i=t.values.find(function(Ge){return"X-ASSET-URI"==Ge.key}),r=t.values.find(function(Ge){return"X-ASSET-LIST"==Ge.key}),!i&&!r))return Ue.return(n);if(o=null,(s=t.values.find(function(Ge){return"ID"==Ge.key}))&&(o=s.data),u=null==o?Math.floor(10*t.startTime)/10:t.startTime,(a=t.endTime)&&t.endTime!=1/0&&"number"==typeof t.endTime&&(a=null==o?Math.floor(10*t.endTime)/10:t.endTime),l=t.values.find(function(Ge){return"X-RESTRICT"==Ge.key}),d=c=!0,l&&l.data&&(c=!(f=l.data).includes("SKIP"),d=!f.includes("JUMP")),g=c?0:null,(v=t.values.find(function(Ge){return"X-ENABLE-SKIP-AFTER"==Ge.key}))&&(g=parseFloat(v.data),isNaN(g)&&(g=c?0:null)),T=null,(S=t.values.find(function(Ge){return"X-ENABLE-SKIP-FOR"==Ge.key}))&&(T=parseFloat(S.data),isNaN(g)&&(T=null)),I=null,(_=t.values.find(function(Ge){return"X-RESUME-OFFSET"==Ge.key}))&&(I=parseFloat(_.data),isNaN(I)&&(I=null)),b=null,(M=t.values.find(function(Ge){return"X-PLAYOUT-LIMIT"==Ge.key}))&&(b=parseFloat(M.data),isNaN(b)&&(b=null)),U=j=R=!1,(B=t.values.find(function(Ge){return"CUE"==Ge.key}))&&(R=(H=B.data).includes("ONCE"),j=H.includes("PRE"),U=H.includes("POST")),G=!1,(K=t.values.find(function(Ge){return"X-TIMELINE-OCCUPIES"==Ge.key}))?G=K.data.includes("RANGE"):!_&&e.D.W()&&(G=!j&&!U),i){if(!($=i.data))return Ue.return(n);n.push({id:o,groupId:null,startTime:u,endTime:a,uri:$,mimeType:null,isSkippable:c,skipOffset:g,skipFor:T,canJump:d,resumeOffset:I,playoutLimit:b,once:R,pre:j,post:U,timelineRange:G,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}),Ue.A(2);break}if(!r){Ue.A(2);break}return(Q=r.data)?(fe(Ue,4),x(Ue,rf(e,Q,{type:11}),6)):Ue.return(n);case 6:for(at=We(Ue.h),ot=JSON.parse(at),(nt=ot["SKIP-CONTROL"])&&("number"==typeof(Xe=nt["ENABLE-SKIP-AFTER"])&&(g=parseFloat(Xe),isNaN(Xe)&&(g=c?0:null)),"number"==typeof(je=nt["ENABLE-SKIP-FOR"])&&(T=parseFloat(je),isNaN(je)&&(T=null))),ze=0;ze<ot.ASSETS.length;ze++)(Ke=ot.ASSETS[ze]).URI&&n.push({id:o+"_shaka_asset_"+ze,groupId:o,startTime:u,endTime:a,uri:Ke.URI,mimeType:null,isSkippable:c,skipOffset:g,skipFor:T,canJump:d,resumeOffset:I,playoutLimit:b,once:R,pre:j,post:U,timelineRange:G,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null});Le(Ue,2);break;case 4:Te(Ue);case 2:return Ue.return(n)}})}(e,t),2);(n=i.h).length?kl(e,n):Be("Unsupported HLS interstitial",t),Z(i)})}(this.g,n))},h.onDASHInterstitialMetadata=function(e,t,n){if(!this.l||!this.l.disableDASHInterstitial){var i=n.schemeIdUri;if("urn:mpeg:dash:event:alternativeMPD:insert:2025"==i||"urn:mpeg:dash:event:alternativeMPD:replace:2025"==i){if(this.g||this.initInterstitial(null,e,t),this.g&&(e=this.g,i="urn:mpeg:dash:event:alternativeMPD:insert:2025"==n.schemeIdUri,(t="urn:mpeg:dash:event:alternativeMPD:replace:2025"==n.schemeIdUri)||i)){for(var a,r=n.startTime,o=n.endTime,s=null,u=0,l=m(n.eventNode.children),c=l.next();!c.done;c=l.next())if("AlternativeMPD"==(c=c.value).tagName){if(c=c.attributes.uri){a=c;break}}else if("InsertPresentation"==c.tagName||"ReplacePresentation"==c.tagName){var d=c.attributes.url;if(d){a=d,(l=Ae(c,"maxDuration",Mn))&&(s=l/n.timescale),(l=Ae(c,"returnOffset",Mn))&&(u=l/n.timescale),t&&u&&(o=r+u);break}}
1a&&kl(e,[{id:n.id,groupId:null,startTime:r,endTime:o,uri:a,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:i?u:null,playoutLimit:s,once:!1,pre:!1,post:!1,timelineRange:t&&!i,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null}])}}else("urn:mpeg:dash:event:2012"==i||"urn:scte:dash:scte214-events"==i)&&n.eventNode&&Yt(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&function TE(e,t){var n=Yt(t.eventNode,"OverlayEvent"),i=n.attributes.uri,r=n.attributes.mimeType,o="true"==n.attributes.loop,s=Ae(n,"z",Mn);if(i&&0!=s){var u=null,a=Yt(n,"Background");if(a){var l=a.attributes.uri;u=l?"center / contain no-repeat url('"+l+"')":Si(a)}a=1920,l=1080;var c=Yt(n,"Viewport");if(c&&(null==(a=Ae(c,"x",Mn))||null==(l=Ae(c,"y",Mn))))return;var d={viewport:{x:a,y:l},topLeft:{x:0,y:0},size:{x:a,y:l}},f=Yt(n,"Overlay");if(c&&f){var g=Yt(f,"TopLeft"),v=Yt(f,"Size");if(g&&v){if(null==(f=Ae(g,"x",Mn))||null==(g=Ae(g,"y",Mn)))return;var y=Ae(v,"x",Mn);if(null==y||null==(v=Ae(v,"y",Mn)))return;d.topLeft.x=f,d.topLeft.y=g,d.size.x=y,d.size.y=v}}if(f=null,n=Yt(n,"Squeeze"),c&&n&&(v=Yt(n,"TopLeft"),n=Yt(n,"Size"),v&&n)){if(null==(c=Ae(v,"x",Mn))||null==(f=Ae(v,"y",Mn))||null==(v=Ae(n,"x",Mn))||null==(n=Ae(n,"y",Mn)))return;f={viewport:{x:a,y:l},topLeft:{x:c,y:f},size:{x:v,y:n}}}kl(e,[{id:t.id,groupId:null,startTime:t.startTime,endTime:t.endTime,uri:i,mimeType:r,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:o,overlay:d,displayOnBackground:-1==s,currentVideo:f,background:u}])}}(this.g,n))}},h.addCustomInterstitial=function(e){if(!this.g)throw new k(1,10,10006);kl(this.g,[e])},h.addAdUrlInterstitial=function(e){if(!this.g)throw new k(1,10,10006);return this.g.addAdUrlInterstitial(e)},h.getInterstitialPlayer=function(){if(!this.g)throw new k(1,10,10006);return this.g.qd()},ue("shaka.ads.AdManager",he),he.prototype.getInterstitialPlayer=he.prototype.getInterstitialPlayer,he.prototype.addAdUrlInterstitial=he.prototype.addAdUrlInterstitial,he.prototype.addCustomInterstitial=he.prototype.addCustomInterstitial,he.prototype.onDASHInterstitialMetadata=he.prototype.onDASHInterstitialMetadata,he.prototype.onHLSInterstitialMetadata=he.prototype.onHLSInterstitialMetadata,he.prototype.onCueMetadataChange=he.prototype.onCueMetadataChange,he.prototype.onHlsTimedMetadata=he.prototype.onHlsTimedMetadata,he.prototype.onDashTimedMetadata=he.prototype.onDashTimedMetadata,he.prototype.onManifestUpdated=he.prototype.onManifestUpdated,he.prototype.getStats=he.prototype.getStats,he.prototype.getCuePoints=he.prototype.getCuePoints,he.prototype.getServerSideCuePoints=he.prototype.getServerSideCuePoints,he.prototype.replaceServerSideAdTagParameters=he.prototype.replaceServerSideAdTagParameters,he.prototype.requestServerSideStream=he.prototype.requestServerSideStream,he.prototype.initServerSide=he.prototype.initServerSide,he.prototype.addMediaTailorTrackingUrl=he.prototype.addMediaTailorTrackingUrl,he.prototype.requestMediaTailorStream=he.prototype.requestMediaTailorStream,he.prototype.initMediaTailor=he.prototype.initMediaTailor,he.prototype.updateClientSideAdsRenderingSettings=he.prototype.updateClientSideAdsRenderingSettings,he.prototype.requestClientSideAds=he.prototype.requestClientSideAds,he.prototype.onAssetUnload=he.prototype.onAssetUnload,he.prototype.release=he.prototype.release,he.prototype.initClientSide=he.prototype.initClientSide,he.prototype.initInterstitial=he.prototype.initInterstitial,he.prototype.configure=he.prototype.configure,he.prototype.setLocale=he.prototype.setLocale,he.ADS_LOADED="ads-loaded",he.AD_STARTED="ad-started",he.AD_FIRST_QUARTILE="ad-first-quartile",he.AD_MIDPOINT="ad-midpoint",he.AD_THIRD_QUARTILE="ad-third-quartile",he.AD_COMPLETE="ad-complete",he.AD_STOPPED="ad-stopped",he.AD_SKIPPED="ad-skipped",he.AD_VOLUME_CHANGED="ad-volume-changed",he.AD_MUTED="ad-muted",he.AD_PAUSED="ad-paused",he.AD_RESUMED="ad-resumed",he.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",he.CUEPOINTS_CHANGED="ad-cue-points-changed",he.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",he.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",he.AD_CLICKED="ad-clicked",he.AD_PROGRESS="ad-progress",he.AD_BUFFERING="ad-buffering",he.AD_IMPRESSION="ad-impression",he.AD_DURATION_CHANGED="ad-duration-changed",he.AD_CLOSED="ad-closed",he.AD_LOADED="ad-loaded",he.ALL_ADS_COMPLETED="all-ads-completed",he.AD_LINEAR_CHANGED="ad-linear-changed",he.AD_METADATA="ad-metadata",he.AD_RECOVERABLE_ERROR="ad-recoverable-error",he.AD_ERROR="ad-error",he.AD_BREAK_READY="ad-break-ready",he.AD_INTERACTION="ad-interaction",he.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",he.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",he.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",Ad=function(){return new he};var e0="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),_E="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),sf=["loop","playbackRate"],DE=["pause","play"],uf=(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),af=(new Map).set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("get
1Stats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",2).set("getVideoTracks",2).set("getTextTracks",2).set("getVariantTracks",2),t0=(new Map).set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),n0=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],i0=[["isTextTrackVisible","setTextTrackVisibility"]],LE="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),PE="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function lf(e,t,n,i,r,o,s){var u=this;this.H=e,this.L=s,this.l=new E(t),this.M=n,this.u=!1,this.B=i,this.G=r,this.N=o,this.i=this.m=!1,this.J="",this.o=null,this.C=function(){return cf(u)},this.D=function(a,l){switch((a=of(l)).type){case"event":var c=a.targetName,d=um(a.event);u.B(c,d);break;case"update":for(d in c=a.update)for(var f in a=u.g[d]||{},c[d])a[f]=c[d][f];u.u&&(u.M(),u.u=!1);break;case"asyncComplete":if(d=a.error,l=a.res,a=u.h.get(f=a.id),u.h.delete(f),a)if(d){for(c in f=new k(d.severity,d.category,d.code),d)f[c]=d[c];a.reject(f)}else a.resolve(l)}},this.g={video:{},player:{}},this.I=0,this.h=new Map,this.j=null,Ll.add(this)}function Dd(e,t){var n=e.N();Yr=t,t.addUpdateListener(e.C),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.D),cf(e),Dl(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function r0(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 k(2,8,n,t))}function o0(e){var t=Yr;t.removeUpdateListener(e.C),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.D)}function cf(e){var t=!!Yr&&"connected"==Yr.status;if(e.i&&!t){for(var n in e.G(),e.g)e.g[n]={};df(e)}e.i=t,e.J=t?Yr.receiver.friendlyName:"",e.l.Lb()}function df(e){if(e.h)for(var t=m(e.h.keys()),n=t.next();!n.done;n=t.next()){var i=e.h.get(n=n.value);e.h.delete(n),i.reject(new k(1,7,7e3))}}function Dl(e,t){t=Qy(t);var n=Yr;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},ps)}catch(i){throw t=new k(2,8,8005,i),n=new re("error",(new Map).set("detail",t)),e.B("player",n),e.od(),t}}(h=lf.prototype).destroy=function(){return Ll.delete(this),df(this),Yr&&o0(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()},h.xb=function(){return this.i},h.ah=function(){return this.J},h.init=function(){if(this.H.length)if(X.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.Lb();var e=new chrome.cast.SessionRequest(this.H,[],null,this.L,null);e=new chrome.cast.ApiConfig(e,function(t){for(var n=m(Ll),i=n.next();!i.done;i=n.next()){var r=t;(i=i.value).j=new At,i.u=!0,Dd(i,r)}},function(t){for(var n=m(Ll),i=n.next();!i.done;i=n.next())Ld="available"==t,(i=i.value).l.Lb()},"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),Ld&&this.l.ka(RE),(e=Yr)&&e.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new At,this.u=!0,Dd(this,e)):Yr=null}else X.__onGCastApiAvailable!==s0&&(Pd=X.__onGCastApiAvailable||null,X.__onGCastApiAvailable=s0)},h.nh=function(e){this.o=e,this.i&&Dl(this,{type:"appData",appData:this.o})},h.cast=function(){var e=this;return L(function(t){if(!e.m)throw new k(1,8,8e3);if(!Ld)throw new k(1,8,8001);if(e.i)throw new k(1,8,8002);return e.j=new At,chrome.cast.requestSession(function(n){return Dd(e,n)},function(n){return r0(e,n)}),x(t,e.j,0)})},h.od=function(){if(this.i){if(df(this),Yr){o0(this);try{Yr.stop(function(){},function(){})}catch{}Yr=null}cf(this)}},h.get=function(e,t){var n=this;if("video"==e){if(DE.includes(t))return function(){return n.Fi.apply(n,[e,t].concat(ee(Jt.apply(0,arguments))))}}else if("player"==e){if(t0.has(t)&&!this.get("player","isLive")())return function(){};if(LE.includes(t))return function(){return n.Fi.apply(n,[e,t].concat(ee(Jt.apply(0,arguments))))};if(PE.includes(t))return function(){return n.Nk.apply(n,[e,t].concat(ee(Jt.apply(0,arguments))))};if(uf.has(t)||af.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},h.set=function(e,t,n){this.g[e][t]=n,Dl(this,{type:"set",targetName:e,property:t,value:n})},h.Fi=function(e,t){Dl(this,{type:"call",targetName:e,methodName:t,args:Jt.apply(2,arguments)})},h.Nk=function(e,t){var n=Jt.apply(2,arguments),i=new At,r=this.I.toString();this.I++,this.h.set(r,i);try{Dl(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:r})}catch(o){i.reject(o)}return i};var RE=.02,Ld=!1,Yr=null,Pd=null,Ll=new Set;function s0(e){if(Pd?X.__onGCastApiAvailable=Pd:delete X.__onGCastApiAvailable,Pd=null,e)for(var t=m(Ll),n=t.next();!n.done;
1n=t.next())n.value.init();"function"==typeof X.__onGCastApiAvailable&&X.__onGCastApiAvailable(e)}function yn(e,t,n,i){i=void 0!==i&&i,vt.call(this);var r=this;this.i=e,this.h=t,this.l=this.o=this.m=this.u=this.j=null,this.I=n,this.H=i,this.D=[],this.C=[],this.B=[],this.G=new Map,this.g=null,X.chrome?(this.g=new lf(n,function(){return l0(r)},function(){return c0(r)},function(o,s){return h0(r,o,s)},function(){return d0(r)},function(){return a0(r)},i),function NE(e){e.g.init(),e.l=new et;for(var t=m(e0),n=t.next();!n.done;n=t.next())e.l.F(e.i,n.value,function(o){e.g.xb()||(o=um(o),e.m.dispatchEvent(o))});for(var i in Ac)e.l.F(e.h,Ac[i],function(o){e.g.xb()||e.o.dispatchEvent(o)});for(var r in e.j={},t={},e.i)(t={ae:t.ae}).ae=r,Object.defineProperty(e.j,t.ae,{configurable:!1,enumerable:!0,get:function(o){return function(){return jE(e,o.ae)}}(t),set:function(o){return function(s){var u=o.ae;e.g.xb()?e.g.set("video",u,s):e.i[u]=s}}(t)});e.u={},u0(e,function(o){Object.defineProperty(e.u,o,{configurable:!1,enumerable:!0,get:function(){return bd(e,o)}})}),function OE(e){var t=new Map;u0(e,function(n,i){t.has(i)?(i=t.get(i),n.length<i.length?e.G.set(n,i):e.G.set(i,n)):t.set(i,n)})}(e),e.m=new vt,e.m.Be=e.j,e.o=new vt,e.o.Be=e.u,e.l.F(e.h,"unloading",function(){e.g&&e.g.xb()||hf(e)})}(this)):(this.j=this.i,this.u=this.h)}function u0(e,t){function n(a){return"constructor"!=a&&"function"==typeof i[a]&&!r.has(a)}var o,i=e.h,r=new Set;for(o in i)n(o)&&(r.add(o),t(o,i[o]));for(e=Object.getPrototypeOf(i),o=Object.getPrototypeOf({});e&&e!=o;){for(var s=m(Object.getOwnPropertyNames(e)),u=s.next();!u.done;u=s.next())n(u=u.value)&&(r.add(u),t(u,i[u]));e=Object.getPrototypeOf(e)}}function a0(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.pd(),startTime:null,addThumbnailsTrackCalls:e.D,addTextTrackAsyncCalls:e.C,addChaptersTrackCalls:e.B};e.i.pause();for(var n=m(sf),i=n.next();!i.done;i=n.next())t.video[i=i.value]=e.i[i];for(e.i.ended||(t.startTime=e.i.currentTime),i=(n=m(n0)).next();!i.done;i=n.next()){var r=i.value;i=r[1],r=e.h[r[0]](),t.player[i]=r}for(i=(n=m(i0)).next();!i.done;i=n.next())i=(r=i.value)[1],r=e.h[r[0]](),t.playerAfterLoad[i]=r;return t}function l0(e){var t=new re("caststatuschanged");e.dispatchEvent(t)}function c0(e){var t=new re(e.j.paused?"pause":"play");e.m.dispatchEvent(t)}function d0(e){for(var t=m(n0),n=t.next();!n.done;n=t.next()){var i=n.value;n=i[1],i=e.g.get("player",i[0])(),e.h[n](i)}var r=e.D,o=e.C,s=e.B;hf(e);var u=e.g.get("player","getAssetUri")();i=e.g.get("video","ended"),t=Promise.resolve();var l,a=e.i.autoplay;n=null,i||(n=e.g.get("video","currentTime")),(i=e.g.get("player","getTextTracks")())&&i.length&&(l=i.find(function(f){return f.active}));var c=e.g.get("player","isTextTrackVisible")();u&&(e.i.autoplay=!1,t=e.h.load(u,n));var d={};for(i=(n=m(sf)).next();!i.done;i=n.next())d[i=i.value]=e.g.get("video",i);t.then(function(){if(e.i){for(var f=m(r),g=f.next();!g.done;g=f.next()){var v;g=g.value,(v=e.qd()).Je.apply(v,ee(g))}for(v=(f=m(o)).next();!v.done;v=f.next()){var y;v=v.value,(y=e.qd()).Ld.apply(y,ee(v))}for(f=(y=m(s)).next();!f.done;f=y.next()){var T;f=f.value,(T=e.qd()).Ie.apply(T,ee(f))}for(y=(T=m(sf)).next();!y.done;y=T.next())e.i[y=y.value]=d[y];for(y=(T=m(i0)).next();!y.done;y=T.next())y=(f=y.value)[1],f=e.g.get("player",f[0])(),e.h[y](f);e.h.rh(c),l&&e.h.kh(l.language,l.roles,l.forced),e.i.autoplay=a,u&&e.i.play()}},function(f){f=new re("error",f=(new Map).set("detail",f)),e.h.dispatchEvent(f)})}function jE(e,t){if("addEventListener"==t)return function(i,r,o){return e.m.addEventListener(i,r,o)};if("removeEventListener"==t)return function(i,r,o){return e.m.removeEventListener(i,r,o)};if(e.g.xb()&&0==Object.keys(e.g.g.video).length){var n=e.i[t];if("function"!=typeof n)return n}return e.g.xb()?e.g.get("video",t):("function"==typeof(t=e.i[t])&&(t=t.bind(e.i)),t)}function bd(e,t,n){if(n=void 0!==n&&n,e.G.has(t)&&(t=e.G.get(t)),"addEventListener"==t)return function(i,r,o){return e.o.addEventListener(i,r,o)};if("removeEventListener"==t)return function(i,r,o){return e.o.removeEventListener(i,r,o)};if("getMediaElement"==t)return function(){return e.j};if("getSharedConfiguration"==t)return e.g.get("player","getConfiguration");if("getNetworkingEngine"==t)return function(){return e.h.Qb()};if("getDrmEngine"==t)return function(){return e.h.D};if("getAdManager"==t)return function(){return e.h.Zh()};if("getQueueManager"==t)return function(){return e.h.ei()};if("setVideoContainer"==t)return function(i){return e.h.Ui(i)};
1if(!n){if("addThumbnailsTrack"==t)return function(){var i=Jt.apply(0,arguments);return e.D.push(i),bd(e,t,!0).apply(null,ee(i))};if("addTextTrackAsync"==t)return function(){var i=Jt.apply(0,arguments);return e.C.push(i),bd(e,t,!0).apply(null,ee(i))};if("addChaptersTrack"==t)return function(){var i=Jt.apply(0,arguments);return e.B.push(i),bd(e,t,!0).apply(null,ee(i))}}if(e.g.xb()){if("getManifest"==t||"drmInfo"==t)return function(){return Be(t+"() does not work while casting!"),null};if("attach"==t||"detach"==t)return function(){return Be(t+"() does not work while casting!"),Promise.resolve()};if("getChapters"==t)return function(){return Be(t+"() does not work while casting!"),[]}}return e.g.xb()&&0==Object.keys(e.g.g.video).length&&(uf.has(t)||af.has(t))||!e.g.xb()?e.h[t].bind(e.h):e.g.get("player",t)}function h0(e,t,n){e.g.xb()&&("video"==t?e.m.dispatchEvent(n):"player"==t&&("unloading"==n.type&&hf(e),e.o.dispatchEvent(n)))}function hf(e){e.D=[],e.C=[],e.B=[]}function ri(e,t,n,i){vt.call(this);var r=this;this.h=e,this.g=t,this.j=new et,this.I={video:e,player:t},this.G=n||function(){},this.J=i||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 E(function(){pf(r)}),function UE(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return p0(e)},t.onSenderDisconnected=function(){return p0(e)},t.onSystemVolumeChanged=function(){var r=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();r&&rs(e,{type:"update",update:{video:{volume:r.level,muted:r.muted}}},e.l),rs(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(r){return function VE(e,t){var n=of(t.data);switch(n.type){case"PLAY":e.h.play(),os(e);break;case"PAUSE":e.h.pause(),os(e);break;case"SEEK":var i=n.resumeState;null!=(t=n.currentTime)&&(e.h.currentTime=Number(t)),i&&"PLAYBACK_START"==i?(e.h.play(),os(e)):i&&"PLAYBACK_PAUSE"==i&&(e.h.pause(),os(e));break;case"STOP":e.g.zc().then(function(){e.g&&os(e)});break;case"GET_STATUS":ff(e,Number(n.requestId));break;case"VOLUME":t=(i=n.volume).level,i=i.muted;var r=e.h.volume,o=e.h.muted;null!=t&&(e.h.volume=Number(t)),null!=i&&(e.h.muted=i),r==e.h.volume&&o==e.h.muted||os(e);break;case"LOAD":e.m=0,e.C=!1,e.B=!1,i=n.currentTime,r=e.J((t=n.media).contentId),o=n.autoplay||!0,e.G(t.customData),o&&(e.h.autoplay=!0),e.g.load(r,i).then(function(){e.g&&ff(e)}).catch(function(s){var u="LOAD_FAILED";7==s.category&&7e3==s.code&&(u="LOAD_CANCELLED"),rs(e,{requestId:Number(n.requestId),type:u},e.u)});break;default:rs(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.u)}}(e,r)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(r){return function FE(e,t){var n=of(t.data);switch(n.type){case"init":e.m=0,e.C=!1,e.B=!0,function BE(e,t,n){var i,o,s,u,l,c,f,g,y,T,S,A,_;L(function(b){switch(b.g){case 1:for(i in t.player)e.g[i](t.player[i]);return e.G(n),o=e.h.autoplay,t.manifest?(e.h.autoplay=!1,fe(b,5),x(b,e.g.load(t.manifest,t.startTime),7)):x(b,Promise.resolve(),3);case 7:if(t.addThumbnailsTrackCalls)for(s=m(t.addThumbnailsTrackCalls),u=s.next();!u.done;u=s.next())e.g.Je.apply(e.g,ee(u.value));if(t.addTextTrackAsyncCalls)for(l=m(t.addTextTrackAsyncCalls),c=l.next();!c.done;c=l.next())e.g.Ld.apply(e.g,ee(c.value));if(t.addChaptersTrackCalls)for(f=m(t.addChaptersTrackCalls),g=f.next();!g.done;g=f.next())e.g.Ie.apply(e.g,ee(g.value));Le(b,3);break;case 5:return y=Te(b),T=(new Map).set("detail",y),S=new re("error",T),e.g&&e.g.dispatchEvent(S),b.return();case 3:if(!e.g)return b.return();for(A in t.video)e.h[A]=t.video[A];for(_ in t.playerAfterLoad)e.g[_](t.playerAfterLoad[_]);e.h.autoplay=o,t.manifest&&(e.h.play(),os(e)),Z(b)}})}(e,n.initState,n.appData),pf(e);break;case"appData":e.G(n.appData);break;case"set":var i=n.targetName,r=n.property;if(n=n.value,"video"==i){if(t=cast.receiver.CastReceiverManager.getInstance(),"volume"==r){t.setSystemVolumeLevel(n);break}if("muted"==r){t.setSystemVolumeMuted(n);break}}e.I[i][r]=n;break;case"call":(i=e.I[n.targetName])[n.methodName].apply(i,n.args);break;case"asyncCall":r=n.methodName,"player"==(i=n.targetName)&&"load"==r&&(e.m=0,e.C=!1);var o=n.id,s=t.senderId;n=(t=e.I[i])[r].apply(t,n.args),"player"==i&&"load"==r&&(n=n.then(function(){e.B=!0})),n.then(function(u){return m0(e,s,o,null,u)},function(u){return m0(e,s,o,u,null)})}}(e,r)},t.start();for(var n=(t=m(e0)).next();!n.done;n=t.next())e.j.F(e.h,n.value,function(r){return f0(e,"video",r)});for(var i in Ac)e.j.F(e.g,Ac[i],function(r){return f0(e,"player",r)});e.j.F(e.h,"loadeddata",function(){e.C=!0}),e.j.F(e.g,"loading",function(){e.o=!1,Aa(e)}),e.j.F(e.h,"playing",function(){e.o=!1,Aa(e)}),e.j.F(e.h,"pause",function(){Aa(e)}),e.j.F(e.g,"unloading",function(){e.o=!0,Aa(e)}),e.j.F(e.h,"ended",function(){new E(function(){e.h&&e.h.ended&&(e.o=!0,Aa(e))}).ka(GE)})}(this)}function p0(e){e.m=0,e.B=!0,e.H=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,Aa(e)}function Aa(e){var t;L(function(n){return 1==n.g?x(n,Promise.resolve(),2):e.g?(t=new re("caststatuschanged"),e.dispatchEvent(t),g0(e)||os(e),void Z(n)):n.return()})}
1function f0(e,t,n){e.g&&(pf(e),rs(e,{type:"event",targetName:t,event:n},e.l))}function pf(e){e.D.ka(HE);for(var t={video:{},player:{}},n=m(_E),i=n.next();!i.done;i=n.next())t.video[i=i.value]=e.h[i];e.g.W()&&t0.forEach(function(r,o){e.m%r==0&&(t.player[o]=e.g[o]())}),uf.forEach(function(r,o){e.m%r==0&&(t.player[o]=e.g[o]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),rs(e,{type:"update",update:t},e.l),af.forEach(function(r,o){e.m%r==0&&((r={player:{}}).player[o]=e.g[o](),rs(e,{type:"update",update:r},e.l))}),e.C&&(e.m+=1),g0(e)}function g0(e){return!(!e.B||!e.h.duration&&!e.g.W()||(ff(e),e.B=!1,0))}function ff(e,t){var n={contentId:e.g.pd(),streamType:e.g.W()?"LIVE":"BUFFERED",contentType:""};e.g.W()||(n.duration=e.h.duration),e.i&&(n.metadata=e.i),os(e,void 0===t?0:t,n)}function m0(e,t,n,i,r){e.g&&rs(e,{type:"asyncComplete",id:n,error:i,res:r},e.l,t)}function rs(e,t,n,i){e.H&&(e=Qy(t),i?n.getCastChannel(i).send(e):n.broadcast(e))}function os(e,t,n){n=void 0===n?null:n;var i={mediaSessionId:0,playbackRate:e.h.playbackRate,playerState:e.o?KE:e.g.Og()?XE:e.h.paused?zE:WE,currentTime:e.h.currentTime,supportedMediaCommands:63,volume:{level:e.h.volume,muted:e.h.muted}};n&&(i.media=n),rs(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[i]},e.u)}wt(yn,vt),(h=yn.prototype).destroy=function(e){return this.g&&(void 0===e?0:e)&&this.g.od(),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,vt.prototype.release.call(this),Promise.all(e)},h.dk=function(){return this.j},h.qd=function(){return this.u},h.nj=function(){return!!this.g&&this.g.m&&Ld},h.xb=function(){return!!this.g&&this.g.xb()},h.ah=function(){return this.g?this.g.ah():""},h.cast=function(){var e=this;return L(function(t){return 1==t.g?e.g?x(t,e.g.cast(),2):t.return():e.h?x(t,e.h.zc(),0):t.return()})},h.nh=function(e){this.g&&this.g.nh(e)},h.cl=function(){this.g&&function bE(e){e.i&&chrome.cast.requestSession(function(t){return Dd(e,t)},function(t){return r0(e,t)})}(this.g)},h.od=function(){this.g&&this.g.od()},h.oj=function(e,t){t=void 0!==t&&t;var n=this;return L(function(i){if(1==i.g)return e==n.I&&t==n.H||(n.I=e,n.H=t,!n.g)?i.return():(n.g.od(),x(i,n.g.destroy(),2));n.g=null,n.g=new lf(e,function(){return l0(n)},function(){return c0(n)},function(r,o){return h0(n,r,o)},function(){return d0(n)},function(){return a0(n)},t),n.g.init(),Z(i)})},ue("shaka.cast.CastProxy",yn),yn.prototype.changeReceiverId=yn.prototype.oj,yn.prototype.forceDisconnect=yn.prototype.od,yn.prototype.suggestDisconnect=yn.prototype.cl,yn.prototype.setAppData=yn.prototype.nh,yn.prototype.cast=yn.prototype.cast,yn.prototype.receiverName=yn.prototype.ah,yn.prototype.isCasting=yn.prototype.xb,yn.prototype.canCast=yn.prototype.nj,yn.prototype.getPlayer=yn.prototype.qd,yn.prototype.getVideo=yn.prototype.dk,yn.prototype.destroy=yn.prototype.destroy,wt(ri,vt),(h=ri.prototype).isConnected=function(){return this.H},h.kk=function(){return this.o},h.Zk=function(e){this.i=e},h.sj=function(){this.i=null},h.$k=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},h.Yk=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},h.Xk=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},h.destroy=function(){var t,e=this;return L(function(i){if(1==i.g)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,vt.prototype.release.call(e),x(i,Promise.all(t),2);cast.receiver.CastReceiverManager.getInstance().stop(),Z(i)})},ue("shaka.cast.CastReceiver",ri),ri.prototype.destroy=ri.prototype.destroy,ri.prototype.setContentArtist=ri.prototype.Xk,ri.prototype.setContentImage=ri.prototype.Yk,ri.prototype.setContentTitle=ri.prototype.$k,ri.prototype.clearContentMetadata=ri.prototype.sj,ri.prototype.setContentMetadata=ri.prototype.Zk,ri.prototype.isIdle=ri.prototype.kk,ri.prototype.isConnected=ri.prototype.isConnected;var HE=.5,GE=5,KE="IDLE",WE="PLAYING",XE="BUFFERING",zE="PAUSED";function v0(e,t,n,i,r){if(i>=r)return null;for(var o=-1,s=-1,u=0;u<n.length;u++)if(n[u].some(function(_){return null!=_&&""!=_.g.trim()})){o=u;break}for(u=n.length-1;u>=0;u--)if(n[u].some(function(_){return null!=_&&""!=_.g.trim()})){s=u;break}if(-1===o||-1===s)return null;for(var a=u=!1,l="white",c="black",d=gf(i,r,u,a,l,c);o<=s;o++){for(var f=n[o],g=-1,v=-1,y=0;y<f.length;
1y++)if(null!=f[y]&&""!==f[y].g.trim()){g=y;break}for(y=f.length-1;y>=0;y--)if(null!=f[y]&&""!==f[y].g.trim()){v=y;break}if(-1===g||-1===v)f=y0(i,r),e.nestedCues.push(f);else{for(;g<=v;g++)if(y=f[g]){var T=y.l,S=y.i,A=y.j,I=y.h;(T!=u||S!=a||A!=l||I!=c)&&(d.payload&&e.nestedCues.push(d),d=gf(i,r,T,S,A,I),u=T,a=S,l=A,c=I),d.payload+=y.g}else d.payload+=" ";d.payload&&e.nestedCues.push(d),o!==s&&(d=y0(i,r),e.nestedCues.push(d)),d=gf(i,r,u,a,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function gf(e,t,n,i,r,o){return e=new Dt(e,t,""),n&&e.textDecoration.push(Wi),i&&(e.fontStyle=_s),e.color=r,e.backgroundColor=o,e}function y0(e,t){return(e=new Dt(e,t,"")).lineBreak=!0,e}function T0(e,t,n,i,r){this.g=e,this.l=t,this.i=n,this.h=i,this.j=r}function mf(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,Pl(this)}function Rd(e,t,n){var i="CC"+(1+(e.D<<1|e.C)),r=new Dt(t,n,"");r.lineInterpretation=1;var o=S0.get(e.g);return o&&(r.line=o),null!=e.u&&null!=e.B&&(r.position=10+Math.min(70,10*e.u)+2.5*e.B),(t=v0(r,i,e.i,t,n))&&e.g+t.cue.nestedCues.length-3>15&&(o=S0.get(e.g+3-t.cue.nestedCues.length))&&(r.line=o),t}function Pl(e){ss(e,0,15),e.g=1}function Ea(e,t,n){if(!(n<32||n>127)){var i="";switch(t){case 0:i=x0.has(n)?x0.get(n):String.fromCharCode(n);break;case 1:i=YE.get(n);break;case 2:e.i[e.g].pop(),i=qE.get(n);break;case 3:e.i[e.g].pop(),i=$E.get(n)}i&&e.i[e.g].push(new T0(i,e.m,e.j,e.o,e.l))}}function w0(e,t,n,i){if(!(n<0||t<0))if(t>=n)for(--i;i>=0;i--)e.i[t+i]=e.i[n+i].map(function(o){return o});else for(var r=0;r<i;r++)e.i[t+r]=e.i[n+r].map(function(o){return o})}function ss(e,t,n){for(var i=0;i<=n;i++)e.i[t+i]=[]}var x0=new Map([[39,"\u2019"],[42,"\xe1"],[92,"\xe9"],[92,"\xe9"],[94,"\xed"],[95,"\xf3"],[96,"\xfa"],[123,"\xe7"],[124,"\xf7"],[125,"\xd1"],[126,"\xf1"],[127,"\u2588"]]),YE=new Map([[48,"\xae"],[49,"\xb0"],[50,"\xbd"],[51,"\xbf"],[52,"\u2122"],[53,"\xa2"],[54,"\xa3"],[55,"\u266a"],[56,"\xe0"],[57," "],[58,"\xe8"],[59,"\xe2"],[60,"\xea"],[61,"\xee"],[62,"\xf4"],[63,"\xfb"]]),qE=new Map([[32,"\xc1"],[33,"\xc9"],[34,"\xd3"],[35,"\xda"],[36,"\xdc"],[37,"\xfc"],[38,"\u2018"],[39,"\xa1"],[40,"*"],[41,"'"],[42,"\u2500"],[43,"\xa9"],[44,"\u2120"],[45,"\xb7"],[46,"\u201c"],[47,"\u201d"],[48,"\xc0"],[49,"\xc2"],[50,"\xc7"],[51,"\xc8"],[52,"\xca"],[53,"\xcb"],[54,"\xeb"],[55,"\xce"],[56,"\xcf"],[57,"\xef"],[58,"\xd4"],[59,"\xd9"],[60,"\xf9"],[61,"\xdb"],[62,"\xab"],[63,"\xbb"]]),$E=new Map([[32,"\xc3"],[33,"\xe3"],[34,"\xcd"],[35,"\xcc"],[36,"\xec"],[37,"\xd2"],[38,"\xf2"],[39,"\xd5"],[40,"\xf5"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"\xc4"],[49,"\xe4"],[50,"\xd6"],[51,"\xf6"],[52,"\xdf"],[53,"\xa5"],[54,"\xa4"],[55,"\u2502"],[56,"\xc5"],[57,"\xe5"],[58,"\xd8"],[59,"\xf8"],[60,"\u250c"],[61,"\u2510"],[62,"\u2514"],[63,"\u2518"]]),S0=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 Nd(e,t){this.h=0,this.o=new mf(e,t),this.i=new mf(e,t),this.g=this.j=new mf(e,t),this.l=0,this.m=null}function vf(e,t,n){e.g=e.i;var i=e.g,r=null;return 3!==e.h&&4!==e.h&&(r=Rd(i,e.l,n),(n=e.i).g=n.h>0?n.h:0,ss(n,0,15),(n=e.j).g=n.h>0?n.h:0,ss(n,0,15),i.g=15),e.h=3,i.h=t,r}function A0(e){e.h=1,e.g=e.j,e.g.h=0}function E0(e){fr("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var JE="black green blue cyan red yellow magenta black".split(" "),I0="white green blue cyan red yellow magenta white_italics".split(" ");function yf(e,t){this.J=t,this.N=e,this.L=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",Tf(this)}function Tf(e){e.i=[];for(var t=0;t<16;t++)e.i.push(wf())}function wf(){for(var e=[],t=0;t<42;t++)e.push(null);return e}function Fs(e,t){C0(e)&&(e.i[e.h][e.g]=new T0(t,e.D,e.B,e.u,e.C),e.g++)}function C0(e){return e.h<e.o&&e.h>=0&&e.g<e.m&&e.g>=0}function ku(e,t,n){var i=new Dt(e.j,t,"");i.textAlign=0===e.G?"left":1===e.G?"right":Tr;var r=i.region;switch(e.J&&(r.id+="svc"+e.J),r.id+="win"+e.N,r.height=e.o,r.width=e.m,r.heightUnits=2,r.widthUnits=2,r.viewportAnchorX=e.I,r.viewportAnchorY=e.M,r.viewportAnchorUnits=e.L?xi:2,e.H){case 0:r.regionAnchorX=0,r.regionAnchorY=0;break;case 1:r.regionAnchorX=50,r.regionAnchorY=0;break;case 2:r.regionAnchorX=100,r.regionAnchorY=0;break;
1case 3:r.regionAnchorX=0,r.regionAnchorY=50;break;case 4:r.regionAnchorX=50,r.regionAnchorY=50;break;case 5:r.regionAnchorX=100,r.regionAnchorY=50;break;case 6:r.regionAnchorX=0,r.regionAnchorY=100;break;case 7:r.regionAnchorX=50,r.regionAnchorY=100;break;case 8:r.regionAnchorX=100,r.regionAnchorY=100}return(n=v0(i,"svc"+n,e.i,e.j,t))&&(e.j=t),n}function QE(){this.i=[],this.h=null,this.g=0}function e2(e,t){3===t.type?(e.g=2*(63&t.value)-1,e.h=[]):e.h&&(e.g>0&&(e.h.push(t),e.g--),0===e.g&&(e.i.push(new bl(e.h)),e.h=null,e.g=0))}function bl(e){this.g=0,this.h=e}function Ln(e){if(!e.Ia())throw new k(2,2,3e3);return e.h[e.g++]}function t2(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function n2(e,t,n,i){if(!e.g)return[];if(24==n)return n=[n=Ln(t).value,i=Ln(t).value].map(function(s){return("0"+(255&s).toString(16)).slice(-2)}).join(""),Fs(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var r=null;switch(n){case 8:!C0(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()&&(r=ku(t,i,e.i)),t.h+1>=t.o?function ZE(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]=wf()}(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(r=ku(t,i,e.i)),t.i[t.h]=wf(),t.g=0;break;case 12:t.isVisible()&&(r=ku(t,i,e.i)),Tf(t),t.h=0,t.g=0}return r?[r]:[]}function i2(e,t,n,i){if(n>=128&&n<=135)e.h[i=7&n]&&(e.g=e.h[i]);else{if(136===n){n=Ln(t).value,t=[];for(var r=(n=m(Rl(e,n))).next();!r.done;r=n.next()){if((r=e.h[r.value]).isVisible()){var o=ku(r,i,e.i);o&&t.push(o)}Tf(r)}return t}if(137===n)for(n=(t=m(Rl(e,t=Ln(t).value))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=i),n.display();else{if(138===n){for(n=Ln(t).value,t=null,r=(n=m(Rl(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()&&(t=ku(r,i,e.i)),r.l=!1;return t?[t]:[]}if(139===n){for(n=Ln(t).value,t=null,r=(n=m(Rl(e,n))).next();!r.done;r=n.next())(r=e.h[r.value]).isVisible()?t=ku(r,i,e.i):r.j=i,r.l=!r.l;return t?[t]:[]}if(140===n)return M0(e,t=Ln(t).value,i);if(143===n)return i=M0(e,255,i),k0(e),i;if(144===n)t.skip(1),i=Ln(t).value,e.g&&(e.g.B=(128&i)>0,e.g.D=(64&i)>0);
1else if(145===n)i=Ln(t).value,n=Ln(t).value,t.skip(1),e.g&&(t=_0((48&n)>>4,(12&n)>>2,3&n),e.g.C=_0((48&i)>>4,(12&i)>>2,3&i),e.g.u=t);else if(146===n)i=Ln(t).value,t=Ln(t).value,e.g&&((e=e.g).h=15&i,e.g=63&t);else if(151===n)t.skip(1),t.skip(1),i=Ln(t).value,t.skip(1),e.g&&(e.g.G=3&i);else if(n>=152&&n<=159){(r=null!==e.h[n=(15&n)-8])||((o=new yf(n,e.i)).j=i,e.h[n]=o),i=Ln(t).value,o=Ln(t).value;var s=Ln(t).value,u=Ln(t).value,a=Ln(t).value;t=Ln(t).value,r&&0==(7&t)||((t=e.h[n]).h=0,t.g=0,t.D=!1,t.B=!1,t.C="white",t.u="black"),(t=e.h[n]).l=(32&i)>0,t.M=127&o,t.I=s,t.H=(240&u)>>4,t.L=(128&o)>0,t.o=1+(15&u),t.m=1+(63&a),e.g=e.h[n]}}}return[]}function Rl(e,t){for(var n=[],i=0;i<8;i++)1==(1&t)&&e.h[i]&&n.push(i),t>>=1;return n}function M0(e,t,n){for(var i=[],r=(t=m(Rl(e,t))).next();!r.done;r=t.next()){var o=e.h[r=r.value];o.isVisible()&&(o=ku(o,n,e.i))&&i.push(o),e.h[r]=null}return i}function k0(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function _0(e,t,n){var i={0:0,1:0,2:1,3:1};return r2[(e=i[e])<<2|(t=i[t])<<1|(n=i[n])]}yf.prototype.isVisible=function(){return this.l},yf.prototype.display=function(){this.l=!0},bl.prototype.Ia=function(){return this.g<this.h.length},bl.prototype.Na=function(){return this.g},bl.prototype.skip=function(e){if(this.g+e>this.h.length)throw new k(2,2,3e3);this.g+=e},bl.prototype.Ki=function(e){if(this.g-e<0)throw new k(2,2,3e3);this.g-=e};var D0=new Map([[32," "],[33,"\xa0"],[37,"\u2026"],[42,"\u0160"],[44,"\u0152"],[48,"\u2588"],[49,"\u2018"],[50,"\u2019"],[51,"\u201c"],[52,"\u201d"],[53,"\u2022"],[57,"\u2122"],[58,"\u0161"],[60,"\u0153"],[61,"\u2120"],[63,"\u0178"],[118,"\u215b"],[119,"\u215c"],[120,"\u215d"],[121,"\u215e"],[122,"\u2502"],[123,"\u2510"],[124,"\u2514"],[125,"\u2500"],[126,"\u2518"],[127,"\u250c"]]),r2="black blue green cyan red magenta yellow white".split(" ");function Ia(){this.h=[],this.g=[],this.i=new QE,this.l=0,this.m=new Map([["CC1",new Nd(0,0)],["CC2",new Nd(0,1)],["CC3",new Nd(1,0)],["CC4",new Nd(1,1)]]),this.u=this.o=0,this.j=new Map,this.C=!0,this.B=new Set,xf(this)}function xf(e){e.o=0,e.u=0;for(var t=m(e.m.values()),n=t.next();!n.done;n=t.next())(n=n.value).h=0,n.g=n.j,n.m=null,Pl(n.i),Pl(n.j),Pl(n.o);e.C=!0}function o2(e,t){var n=t.type;if(16==(112&t.Db)){var i=t.Db>>3&1;0===n?e.o=i:e.u=i}if(n=e.m.get(i="CC"+(1+(n<<1|(n?e.u:e.o)))),255===t.Db&&255===t.jc||!t.Db&&!t.jc||!L0(t.Db)||!L0(t.jc))return++e.l>=45&&xf(e),null;e.l=0,t.Db&=127,t.jc&=127;var r=t.Db;if(r>=1&&r<=15||!t.Db&&!t.jc)return null;if(r=null,16==(112&t.Db))e:{if(e.B.add(i),n.m===((i=t.Db)<<8|(e=t.jc)))n.m=null;else if(n.m=i<<8|e,16==(240&i)&&64==(192&e)){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&i)<<1|e>>5&1],i="white",r=!1;var o=null,s=e>95?e-96:e-64;s<=13?i=I0[Math.floor(s/2)]:s<=15?r=!0:o=Math.floor((s-16)/2),e=1==(1&e),4!==n.h&&(s=n.g,3===n.h&&t!==s.g&&(w0(s,n=1+t-s.h,1+s.g-s.h,s.h),ss(s,0,n-1),ss(s,t+1,15-t)),s.g=t,s.m=e,s.j=r,s.l=i,s.u=o,s.o="black")}else if(17==(247&i)&&32==(240&e))n.g.m=!1,n.g.j=!1,n.g.l="white",Ea(n.g,0,32),i=!1,"white_italics"===(t=I0[(14&e)>>1])&&(t="white",i=!0),n.g.m=1==(1&e),n.g.j=i,n.g.l=t;else if(16==(247&i)&&32==(240&e)||23==(247&i)&&45==(255&e))t="black",0==(7&i)&&(t=JE[(14&e)>>1]),n.g.o=t;else if(17==(247&i)&&48==(240&e))Ea(n.g,1,e);else if(18==(246&i)&&32==(224&e))Ea(n.g,1&i?3:2,e);else{if(20==(246&i)&&32==(240&e)){switch(e=t.pts,i=null,t.jc){case 32:A0(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:i=vf(n,2,e);break;case 38:i=vf(n,3,e);break;case 39:i=vf(n,4,e);break;case 40:Ea(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:Pl(n.o),E0(n);break;case 43:E0(n);break;case 44:t=n.i,i=null,4!==n.h&&(i=Rd(t,n.l,e)),ss(t,0,15);break;case 45:t=n.g,3!==n.h?i=null:(i=Rd(t,n.l,e),w0(t,(r=t.g-t.h+1)-1,r,t.h),ss(t,0,r-1),ss(t,t.g,15-t.g),n.l=e);break;case 46:ss(n.j,0,15);break;case 47:t=null,4!==n.h&&(t=Rd(n.i,n.l,e)),i=n.j,n.j=n.i,n.i=i,A0(n),n.l=e,i=t}r=i;break e}(23==i||31==i)&&e>=33&&e<=35&&(n.g.B=e-32)}r=null}else e=t.jc,Ea(n.g,0,t.Db),Ea(n.g,0,e);return r}function s2(e,t){var n=[];try{for(;t.Ia();){var i=Ln(t).value,r=(224&i)>>5,o=31&i;if(7===r&&0!=o&&(r=63&Ln(t).value),0!=r){e.B.add("svc"+r),e.j.has(r)||e.j.set(r,new t2(r));for(var s=e.j.get(r),u=t.Na();t.Na()-u<o;){r=s;var a=t,l=Ln(a),c=l.value,d=l.pts;
1if(16===c&&(c=c<<16|Ln(a).value),c>=0&&c<=31)var g=n2(r,a,c,d);else if(c>=128&&c<=159)g=i2(r,a,c,d);else{if(c>=4096&&c<=4127)r=a,(a=255&c)>=8&&a<=15?r.skip(1):a>=16&&a<=23?r.skip(2):a>=24&&a<=31&&r.skip(3);else if(c>=4224&&c<=4255)r=a,(a=255&c)>=128&&a<=135?r.skip(4):a>=136&&a<=143&&r.skip(5);else if(c>=32&&c<=127)a=c,r.g&&Fs(r.g,127===a?"\u266a":String.fromCharCode(a));else if(c>=160&&c<=255)r.g&&Fs(r.g,String.fromCharCode(c));else if(c>=4128&&c<=4223){if(a=255&c,r.g)if(D0.has(a)){var v=D0.get(a);Fs(r.g,v)}else Fs(r.g,"_")}else c>=4256&&c<=4351&&r.g&&Fs(r.g,160!=(255&c)?"_":"[CC]");g=[]}n.push.apply(n,ee(g))}}}}catch(y){if(!(y instanceof k&&3e3===y.code))throw y;fr("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}function L0(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function P0(e){for(var t=[],n=e,i=e=0;i<n.length;)2==e&&3==n[i]?(e=0,(n=[].concat(ee(n))).splice(i,1),n=new Uint8Array(n)):0==n[i]?e++:e=0,i++;for(e=n,i=0;i<e.length;){for(n=0;255==e[i];)n+=255,i++;n+=e[i++];for(var r=0;255==e[i];)r+=255,i++;r+=e[i++],4==n&&t.push(e.subarray(i,i+r)),i+=r}return t}function Od(){this.j=new Map,this.i=this.h=0,this.g=Sf}function u2(e,t,n,i,r,o,s,u,a){var l=0,c=o,d=u.map(function(v){return v.ih});for((d=[].concat.apply([],ee(d))).length&&(c=d[0].sampleSize||o),t.skip(s+u[0].og);t.Ia();){s=t.U();var f=t.Y(),g=null;switch(g=!1,u=1,e.g){case Nl:g=6==(g=31&f);break;case Ol:u=2,t.skip(1),g=39==(g=f>>1&63)||40==g;break;case jl:u=2,t.skip(1),g=23==(g=f>>1&63)||24==g;break;default:return}if(g)for(f=0,l<d.length&&(f=d[l].Df||0),f=(n+f)/i,g=(u=m(P0(t.Vb(s-u)))).next();!g.done;g=u.next())a.push({packet:g.value,pts:f});else try{t.skip(s-u)}catch{break}0==(c-=s+4)&&(n=l<d.length?n+(d[l].jh||r):n+r,c=++l<d.length&&d[l].sampleSize||o)}}Ia.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,xf(this);for(var t=(e=m(this.j.values())).next();!t.done;t=e.next())k0(t.value)},Ia.prototype.extract=function(e,t){if(this.C){for(var n=m(this.m.values()),i=n.next();!i.done;i=n.next())i.value.l=t;this.C=!1}if(!((e=new Ht(e,0)).getLength()<8)&&181===e.Y()&&49===e.Da()&&1195456820===e.U()&&3===e.Y()&&0!=(64&(n=e.Y())))for(n&=31,e.skip(1),i=0;i<n;i++){var r=e.Y(),o=(4&r)>>2,s=e.Y(),u=e.Y();o&&(0==(r&=3)||1===r?this.h.push({pts:t,type:r,Db:s,jc:u,order:this.h.length}):(this.g.push({pts:t,type:r,value:s,order:this.g.length}),this.g.push({pts:t,type:2,value:u,order:this.g.length})))}},Ia.prototype.decode=function(){function e(r,o){return r.pts-o.pts||r.order-o.order}var t=[];this.h.sort(e),this.g.sort(e);for(var n=m(this.h),i=n.next();!i.done;i=n.next())(i=o2(this,i.value))&&t.push(i);for(i=(n=m(this.g)).next();!i.done;i=n.next())e2(this.i,i.value);for(i=(n=m(this.i.i)).next();!i.done;i=n.next())i=s2(this,i.value),t.push.apply(t,ee(i));return this.i.i=[],this.h=[],this.g=[],t},Ia.prototype.getStreams=function(){return Array.from(this.B)},ue("shaka.cea.CeaDecoder",Ia),Gi=function(){return new Ia},Od.prototype.init=function(e){function t(o){jd.has(o=o.name)&&(n.g=jd.get(o))}var n=this,i=[],r=[];if((new Et).box("moov",Oe).box("mvex",Oe).S("trex",function(o){var s=o.reader;s.skip(4),s.skip(4),o=s.U(),s=s.U(),n.h=o,n.i=s}).box("trak",Oe).S("tkhd",function(o){var s=o.reader;1==(o=o.version)?(s.skip(8),s.skip(8)):(s.skip(4),s.skip(4));var u=s.U();s.skip(1==o?8: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(),i.push(u)}).box("mdia",Oe).S("mdhd",function(o){o=Rc(o.reader,o.version),r.push(o.timescale)}).box("minf",Oe).box("stbl",Oe).S("stsd",$o).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",zi).box("sinf",Oe).box("frma",function(o){o=zh(o.reader).codec,jd.has(o)&&(n.g=jd.get(o))}).parse(e,!0,!0),!i.length||!r.length||i.length!=r.length)throw new k(2,2,2010);this.g==Sf&&Be("Unable to determine bitstream format for CEA parsing!"),i.forEach(function(o,s){n.j.set(o,r[s])})},Od.prototype.parse=function(e){var t=this;if(this.g==Sf)return[];var n=[],i=0,r=[];return(new Et).box("moof",function(o){i=o.start,r=[],Oe(o)}).box("traf",function(o){r.push({baseMediaDecodeTime:null,Qd:t.h,Rd:t.i,Bi:[],timescale:9e4}),Oe(o)}).S("trun",function(o){var s=r[r.length-1];o=Nc(o.reader,o.version,o.flags),s.Bi.push(o)}).S("tfhd",function(o){var s=r[r.length-1];o=Pc(o.reader,o.flags),s.Qd=o.Qd||t.h,s.Rd=o.Rd||t.i,t.j.has(o=o.trackId)&&(s.timescale=t.j.get(o))}).S("tfdt",function(o){var s=r[r.length-1];o=bc(o.reader,o.version),s.baseMediaDecodeTime=o.baseMediaDecodeTime}).box("mdat",function(o){for(var s=i-o.start-8,u=o.reader.Na(),a=m(r),l=a.next();!l.done;l=a.next())null===(l=l.value).baseMediaDecodeTime?Be("Unable to find base media decode time for CEA captions!"):(o.reader.seek(u),u2(t,o.reader,l.baseMediaDecodeTime,l.timescale,l.Qd,l.Rd,s,l.Bi,n))}).parse(e,!1,!0),n},ue("shaka.cea.Mp4CeaParser",Od);var Sf=0,Nl=1,Ol=2,jl=3,jd=(new Map).set("avc1",Nl).set("avc3",Nl).set("dvav",Nl).set("dva1",Nl).set("hev1",Ol).set("hvc1",Ol).set("dvh1",Ol).set("dvhe",Ol).set("vvc1",jl).set("vvi1",jl).set("dvc1",jl).set("dvi1",jl);function Ud(){this.g=null}function b0(e){return(e=function a2(e){var t=0,n=Ve(e),i=n.getUint32(t,!0);if(i!=e.byteLength)return[];e:{for(e=t+4+2,t=[];e<n.byteLength-1;){i=n.getUint16(e,!0);var r=n.getUint16(e+=2,!0);if(e+=2,0!=(1&r)||r+e>n.byteLength){n=[];break e}var o=oe(n,e,r);t.push({type:i,value:o}),e+=r}n=t}return n}(e=sn(fn(e))).filter(function(t){return t.type===l2})[0])&&(e=mr(e=Gt(e.value,!0),"WRMHEADER"))?e:null}function Bd(e){try{var t=b0(e);if(t)e:{for(var n=m(vr(t,"DATA")),i=n.next();!i.done;i=n.next()){var r=i.value;if(r.children)for(var o=m(r.children),s=o.next();!s.done;s=o.next()){var u=s.value;if("LA_URL"==u.tagName){var a=fn(u);break e}}}a=""}else a="";return a}catch{return""}}Bo("video/mp4",function(){return new Od}),Ud.prototype.init=function(){},Ud.prototype.parse=function(e){this.g?this.g.clearData():this.g=new Bt;var t=[];if(!ua(e=oe(e)))return t;var n=(e=this.g.parse(e)).Sd(),i=e.Ze();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(i=(n=m(i)).next();!i.done;i=n.next())if(e.includes((i=i.value).type)&&null!=i.time)for(var r=m(P0(i.data)),o=r.
1next();!o.done;o=r.next())t.push({packet:o.value,pts:i.time});return t},ue("shaka.cea.TsCeaParser",Ud),Bo("video/mp2t",function(){return new Ud});var l2=1;function R0(){this.g=new Map}function N0(e,t,n,i){var r=function h2(e,t){for(var n=[],i=(t=m(t)).next();!i.done;i=t.next())(i=p2(e,i.value))&&n.push(i);return n}(e,t),o=null;e=[];var s=[];t=null;var u=new Set(r.map(function(l){return l.keyId}));u.delete(null);var a="cenc";if(u.size>1)throw new k(2,4,4010);if(!n){if((s=r.filter(function(l){return"urn:mpeg:dash:sea:2012"==l.Dd})).length>1)throw new k(2,4,4050);s.length&&(t=function f2(e){if(!X.crypto||!X.crypto.subtle)throw Be("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new k(2,4,4042);var t=vn(e.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!t)throw new k(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=t.attributes.schemeIdUri)throw new k(2,4,4051);if(!(t=vn(e.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod")))throw new k(2,4,4051);if(e=t.attributes.IV,t=mt(t.attributes.keyUriTemplate),!e||!t)throw new k(2,4,4051);if(16!=(e=Nn(e.substr(2))).byteLength)throw new k(2,4,4048);return{tk:t,iv:e}}(s[0])),(s=r.find(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Dd}))&&s.encryptionScheme&&(a=s.encryptionScheme),(s=r.filter(function(l){return"urn:mpeg:dash:mp4protection:2011"==l.Dd?(o=l.init||o,!1):"urn:mpeg:dash:sea:2012"!=l.Dd})).length&&(e=function d2(e,t,n,i,r){for(var o=[],s=(n=m(n)).next();!s.done;s=n.next()){var u=i[(s=s.value).Dd];if(u){var a;if((a=vn(s.node,"urn:microsoft:playready","pro"))&&fn(a)){a=sn(a=fn(a));var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);a=[{initData:kc(a,l,new Set,0),initDataType:"cenc",keyId:s.keyId}]}else a=null;if(l=null,"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===s.Dd){l=s;var c=r;if(0==c.size)l=null;else{var d=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]);l=[{initData:kc(new Uint8Array([]),d,c,1),initDataType:"cenc",keyId:l.keyId}]}}a=ir(u,t,s.init||e||a||l),(u=g2.get(u))&&(a.licenseServerUri=u(s)),o.push(a)}}return o}(o,a,s,i,u),0==e.length&&(e=[ir("",a,o)]))}if(r.length&&!t&&(n||!s.length))for(e=[],i=(n=m(Object.values(i))).next();!i.done;i=n.next())"org.w3.clearkey"!=(i=i.value)&&e.push(ir(i,a,o));if(u=Array.from(u)[0]||null)for(n=(a=m(e)).next();!n.done;n=a.next())for(i=(n=m(n.value.initData)).next();!i.done;i=n.next())i.value.keyId=u;return{Th:u,Em:o,drmInfos:e,eg:t,Yh:!0}}function Fd(e){var t=vn(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=fn(t)))return t;if((t=vn(e.node,"urn:microsoft:playready","pro"))&&fn(t))return Bd(t);if((e=vn(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=fn(e))){t=sn(e),e=8;var n=(t=Ve(t)).getUint8(e);return e+=20,n>0&&(e+=4+16*t.getUint32(e)),Bd(e=mr("<pro>"+(e=Fi(e=oe(t,e+4)))+"</pro>"))}return""}function p2(e,t){var n=t.attributes.schemeIdUri,i=Fr(t,"urn:mpeg:cenc:2013","default_KID"),r=Ru(t,"urn:mpeg:cenc:2013","pssh").map(Si),o=t.attributes.value;if(!n)return null;if(n=n.toLowerCase(),i&&(i=i.replace(/-/g,"").toLowerCase()).includes(" "))throw new k(2,4,4009);var s=[];try{s=r.map(function(u){if(!e.g.has(u)){var a=sn(u);e.g.set(u,a)}return{initDataType:"cenc",initData:e.g.get(u),keyId:null}})}catch{throw new k(2,4,4007)}return{node:t,Dd:n,keyId:i,init:s.length>0?s:null,encryptionScheme:o}}R0.prototype.release=function(){this.g.clear()};var g2=(new Map).set("com.apple.fps",function(e){if("apple"===X.shakaMediaKeysPolyfill)throw new k(2,4,4054);return(e=vn(e.node,"https://dashif.org/CPS","Laurl"))&&(e=fn(e))?e:""}).set("com.widevine.alpha",function(e){var t=vn(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=fn(t))?t:(e=vn(e.node,"urn:microsoft","laurl"))&&mt(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",Fd).set("com.microsoft.playready.recommendation",Fd).set("com.microsoft.playready.software",Fd).set("com.microsoft.playready.hardware",Fd).set("org.w3.clearkey",function(e){var t=vn(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=fn(t))?t:(e=vn(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===e.attributes.Lic_type&&e&&(e=fn(e))?e:""});function Ul(e,t,n,i,r,o){var s=(new Map).set("RepresentationID",t).set("Number",n).set("SubNumber",i).set("Bandwidth",r).set("Time",o);return e.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(u,a,l,c){if("$$"==u)return"$";var d=s.get(a);if(null==d)return u;switch("RepresentationID"==a&&l&&(l=void 0),"Time"==a&&"bigint"!=typeof d&&(Math.abs(d-Math.round(d))>=.2&&Be("Calculated $Time$ values must be close to integers"),d=Math.round(d)),c){case void 0:case"d":case"i":case"u":u=d.toString();break;case"o":u=d.toString(8);break;case"x":u=d.toString(16);break;case"X":u=d.toString(16).toUpperCase();break;default:u=d.toString()}return l=X.parseInt(l,10)||1,Array(Math.max(0,l-u.length)+1).join("0")+u})}function O0(e,t){var n=qr(e,t,"timescale"),i=1;n&&(i=Hr(n)||1);var r=(n=Hr((n=qr(e,t,"duration"))||""))?n/i:null,o=qr(e,t,"startNumber"),s=Number(qr(e,t,"presentationTimeOffset"))||0,u=On(o||"");if((null==o||null==u)&&(u=1),o=null,t=Ca(e,t,"SegmentTimeline")){t=ft(t,"S"),o=i,e=e.na.duration||1/0;for(var a=u,l=[],c=-s,d=0;d<t.length;++d){var f=t[d],g=t[d+1],v=Ae(f,"t",On),y=Ae(f,"d",On),T=Ae(f,"r",Mn);
1if(f=Ae(f,"k",Mn)||0,null!=v&&(v-=s),y){if(v=v??c,(T=T||0)<0)if(g){if(null==(g=Ae(g,"t",On)))break;if(v>=g)break;T=Math.ceil((g-v)/y)-1}else{if(e==1/0)break;if(v/o>=e)break;T=Math.ceil((e*o-v)/y)-1}for(l.length>0&&v!=c&&(l[l.length-1].end=v/o),g=0;g<=T;++g)l.push({start:v/o,end:(c=v+y)/o,Fh:v,tc:f,Tk:l.length+a}),v=c}}o=l}return{timescale:i,Mf:n,hb:r,le:u,Kb:s/i||0,fd:s,timeline:o}}function j0(e,t){return[t(e.K),t(e.qa),t(e.sa)].filter(C)}function qr(e,t,n){t=j0(e,t),e=null;for(var i=(t=m(t)).next();!i.done&&!(e=i.value.attributes[n]);i=t.next());return e}function Ca(e,t,n){t=j0(e,t),e=null;for(var i=(t=m(t)).next();!i.done&&!(e=Yt(i.value,n));i=t.next());return e}function Vd(e,t,n,i,r,o){if(o=void 0===o?0:o,Fr(e,"http://www.w3.org/1999/xlink","href")){var s=function m2(e,t,n,i,r,o){for(var s=Fr(e,"http://www.w3.org/1999/xlink","href"),u=Fr(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",a=m(Object.keys(e.attributes)),l=a.next();!l.done;l=a.next()){var c=(l=l.value).split(":"),d=tu("http://www.w3.org/1999/xlink");c[0]==d&&delete e.attributes[l]}if(o>=5)return Rs(new k(2,4,4028));if("onLoad"!=u)return Rs(new k(2,4,4027));var f=Kt([i],[s]);return r.request(0,_n(f,t)).Wa(function(g){if(!(g=Br(g.data,e.tagName)))return Rs(new k(2,4,4001,s));for(e.children=[];g.children.length;){var v=g.children.shift();e.children.push(v)}for(var y=(v=m(Object.keys(g.attributes))).next();!y.done;y=v.next())e.attributes[y=y.value]=g.attributes[y];return Vd(e,t,n,f[0],r,o+1)})}(e,t,n,i,r,o);return n&&(s=s.Wa(void 0,function(){return Vd(e,t,n,i,r,o)})),s}s=[];for(var u=m(ac(e)),a=u.next(),l={};!a.done;l={Nd:void 0},a=u.next())l.Nd=a.value,"urn:mpeg:dash:resolve-to-zero:2013"==Fr(l.Nd,"http://www.w3.org/1999/xlink","href")?e.children=e.children.filter(function(c){return function(d){return d!==c.Nd}}(l)):"SegmentTimeline"!=l.Nd.tagName&&s.push(Vd(l.Nd,t,n,i,r,o));return sm(s).Wa(function(){return e})}function Vs(e){this.h=Ve(e),this.g=new Ht(this.h,0)}function us(e){var t=U0(e);if(t.length>7)throw new k(2,3,3002);for(var n=0,i=(t=m(t)).next();!i.done;i=t.next())n=256*n+i.value;t=U0(e);e:{for(var r=(i=m(T2)).next();!r.done;r=i.next())if(pt(t,new Uint8Array(r.value))){i=!0;break e}i=!1}if(i)t=e.h.byteLength-e.g.Na();else{if(8==t.length&&224&t[1])throw new k(2,3,3001);for(r=i=0;r<t.length;r++){var o=t[r];i=0==r?o&(1<<8-t.length)-1:256*i+o}t=i}return t=e.g.Na()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Na(),i=Ve(e.h,e.g.Na(),t),e.g.skip(t),new w2(n,i)}function U0(e){var t=e.g.Na(),n=e.g.Y();if(0==n)throw new k(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),oe(e.h,t,n)}Vs.prototype.Ia=function(){return this.g.Ia()};var T2=[[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 w2(e,t){this.id=e,this.g=t}function Af(e){if(e.g.byteLength>8)throw new k(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new k(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++)t=256*t+e.g.getUint8(n);return t}function S2(e){var t=new Vs(e.g);if(179!=(e=us(t)).id)throw new k(2,3,3013);if(e=Af(e),183!=(t=us(t)).id)throw new k(2,3,3012);t=new Vs(t.g);for(var n=0;t.Ia();){var i=us(t);if(241==i.id){n=Af(i);break}}return{kl:e,Lk:n}}function B0(e,t,n){if(!(t=Ca(e,t,"Initialization")))return null;var i=e.K.fb(),r=t.attributes.sourceURL;r&&(i=Kt(i,[mt(r)],e.Nb())),r=0;var o=null;return(t=Ae(t,"range",nu))&&(r=t.start,o=t.end),(n=new bi(function(){return i},r,o,G0(e),null,null,n,e.qa.encrypted)).codecs=e.K.codecs,n.mimeType=e.K.mimeType,e.na&&!e.na.df&&(n.g=e.na.start+e.na.duration),n}function F0(e,t,n,i,r,o,s){var u,a,l,c,d,f,g,v,y,T,S,A,I,_,P,b,M,D;return L(function(R){if(1==R.g)return u=e.presentationTimeline,a=!e.Fb||!e.na.df,l=e.na.start,c=e.na.duration,d=e.K.mimeType.split("/")[1],g=null,v=[(f=t)(i,r,o,!1),"webm"==d?f(n.P(),n.startByte,n.endByte,!0):null],f=null,x(R,Promise.all(v),2);if(T=(y=R.h)[0],S=y[1]||null,I=l-s,_=l,P=c?l+c:1/0,"mp4"==d)var j=function v2(e,t,n,i,r,o,s){var u,a=(new Et).S("sidx",function(l){u=function y2(e,t,n,i,r,o,s){var u=[];s.reader.skip(4);var a=s.reader.U();if(0==a)throw new k(2,3,3005);if(0==s.version)var l=s.reader.U(),c=s.reader.U();else l=s.reader.zd(),c=s.reader.zd();s.reader.skip(2);var d=s.reader.Da();for(e=e+s.size+c,c=0;c<d;c++){var f=s.reader.U(),g=(2147483648&f)>>>31;f&=2147483647;var v=s.reader.U();if(s.reader.skip(4),1==g)throw new k(2,3,3006);u.push(new Ee(l/a+n,(l+v)/a+n,function(){return o},e,e+f-1,t,n,i,r)),l+=v,e+=f}return s.parser.stop(),u}(t,i,r,o,s,n,l)});if(e&&a.parse(e),u)return u;throw new k(2,3,3004)}(T,r,i,n,I,_,P);else{j=T;var U=new Vs(S);if(440786851!=us(U).id)throw new k(2,3,3008);var B=us(U);if(408125543!=B.id)throw new k(2,3,3009);U=B.g.byteOffset,B=new Vs(B.g);for(var H=null;B.Ia();){var G=us(B);if(357149030==G.id){H=G;break}}if(!H)throw new k(2,3,3010);for(H=new Vs(H.g),G=1e6,B=null;H.Ia();){var K=us(H);if(2807729==K.id)G=Af(K);else if(17545==K.id)if(4==K.g.byteLength)B=K.g.getFloat32(0);else{if(8!=K.g.byteLength)throw new k(2,3,3003);B=K.g.getFloat64(0)}}if(null==B)throw new k(2,3,3011);if(B*=H=G/1e9,475249515!=(j=us(new Vs(j))).id)throw new k(2,3,3007);j=function x2(e,t,n,i,r,o,s,u,a){function l(){return r}var c=[];e=new Vs(e.g);for(var d=null,f=null;e.Ia();){var g=us(e);if(187==g.id){var v=S2(g);v&&(g=n*v.kl,v=t+v.Lk,null!=d&&c.push(new Ee(d+s,g+s,l,f,v-1,o,s,u,a)),d=g,f=v)}}return null!=d&&c.push(new Ee(d+s,i+s,l,f,null,o,s,u,a)),c}(j,U,H,B,i,n,I,_,P)}for(b=m(A=j),M=b.next();!M.done;M=b.next())(D=M.value).codecs=e.K.codecs,D.mimeType=e.K.mimeType,D.bandwidth=e.bandwidth;return u.ee(A),g=new ut(A),a&&g.nd(_,P,!0),R.return(g)})}function Ma(e){return e.Ed}function V0(e){var t=Ca(e,Ma,"RepresentationIndex");return e=nu((e=qr(e,Ma,"indexRange"))||""),t&&(e=Ae(t,"range",nu,e)),e}function H0(e,t){var n=e.K.mimeType.split("/")[1];if(e.K.contentType!=Pe&&"mp4"!=n&&"webm"!=n)throw new k(2,4,4006);if("webm"==n&&!t)throw new k(2,4,4005)}function G0(e){var t=e.K;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.tf,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.qa.label||null,roles:e.roles||null,language:e.qa.language||null}}function K0(e){return e.xc}function W0(e,t,n,i,r,o,s,u,a,l){a||e.K.bf||(e.K.bf=qr(e,Hs,"initialization"));var c=e.K.bf?function P2(e,t){var n=e.K.bf;if(n||(n=qr(e,Hs,"initialization")),!n)return null;n=mt(n);var i=e.K.originalId,r=e.bandwidth||null,o=e.K.fb,s=e.Nb;return t=new bi(function(){var u=Ul(n,i,null,null,r,null);return Kt(o(),[u],s())},0,null,G0(e),null,null,t,e.qa.encrypted),t.codecs=e.K.codecs,t.mimeType=e.K.mimeType,e.na&&!e.na.df&&(t.g=e.na.start+e.na.duration),t}(e,s):null,d=function _2(e){var t=O0(e,Hs),n=qr(e,Hs,"media"),i=qr(e,Hs,"index"),r=qr(e,Hs,"k"),o=0;return r&&(o=parseInt(r,10)),{Mf:t.Mf,hb:t.hb,timescale:t.timescale,le:t.le,Kb:t.Kb,fd:t.fd,timeline:t.timeline,ac:n&&mt(n),Zd:i,mimeType:e.K.mimeType,codecs:e.K.codecs,bandwidth:e.bandwidth,Bk:o}}(e);!function D2(e){var t=e.Zd?1:0;if(t+=e.timeline?1:0,0==(t+=e.hb?1:0))throw new k(2,4,4002);
1if(1!=t&&(e.Zd&&(e.timeline=null),e.Mf=null,e.hb=null),!e.Zd&&!e.ac)throw new k(2,4,4002)}(d);var f=to(e);if(d.Zd)return H0(e,c),{endTime:-1,timeline:-1,Rc:function(){var S=Ul(d.Zd,f.K.originalId,null,null,f.bandwidth||null,null);return S=Kt(f.K.fb(),[S]),F0(f,t,c,S,0,null,d.Kb)},timescale:d.timescale};if(d.hb)return i||"image"===e.qa.contentType||"text"===e.qa.contentType||(i=e.na.start,n=e.na.duration,l=(l=null!=(l=e.sa.id)&&o.get(l)||n)?i+l:1/0,e.presentationTimeline.Tg(d.hb),e.presentationTimeline.zi(i,l)),{endTime:-1,timeline:-1,Rc:function(){return function L2(e,t,n,i,r,o,s,u){function a(B){var H=B-T,G=H*y,K=t.Mf,z=H*K;"BigInt"in X&&z>Number.MAX_SAFE_INTEGER&&(z=BigInt(H)*BigInt(K)),H=(G+=f)+y,K=Math.min(H,c());var $=[],Q=t.Bk;if(Q)for(var He=(K-G)/Q,le={},at=0;at<Q;le={Xi:void 0},at++){var ot=G+He*at,nt=ot+He;le.Xi=at,(le=new Ee(ot,nt,function(Xe){return function(){var je=Ul(S,I,B,Xe.Xi,A,z);return Kt(_(),[je],P())}}(le),0,null,i,b,f,c(),[],"",null,null,Jo,o)).codecs=e.K.codecs,le.mimeType=e.K.mimeType,0==u?at>0&&le.td():at%u!=0&&le.td(),$.push(le)}return(G=new Ee(G,K,function(){if(Q)return[];var Xe=Ul(S,I,B,null,A,z);return Kt(_(),[Xe],P())},0,null,i,b,f,c(),$,"",null,null,Jo,o,$.length>0)).codecs=e.K.codecs,G.mimeType=e.K.mimeType,G.bandwidth=e.bandwidth,G.j=H,G}function l(){var B=[Math.max(d.Ib(),f),Math.min(d.Ec(),c())].map(function(H){return H-f});return B=[Math.ceil(B[0]/y),Math.ceil(B[1]/y)-1],e.K.rb&&B[1]++,B.map(function(H){return H+T})}function c(){var B=null!=g&&r.get(g)||v;return B?f+B:1/0}var d=e.presentationTimeline,f=e.na.start,g=e.sa.id,v=e.na.duration,y=t.hb,T=t.le,S=t.ac,A=e.bandwidth||null,I=e.K.originalId,_=e.K.fb,P=e.Nb,b=f-t.Kb,M=l();n=e.Fb?Math.max(M[0],M[1]-n+1):M[0],s=s||M[1],M=[];for(var D=n;D<=s;++D){var R=a(D);M.push(R)}var j=new ut(M);if(M=d.Ec()<c(),D=d.W(),M||D){var U=Math.max(n,s+1);n=y,e.K.rb&&(n=.1),j.Nf(n,function(){var B=d.Ib();j.Xa(B);var H=m(l());H.next(),H=H.next().value;for(var G=[];U<=H;){var K=a(U);G.push(K),U++}return B>c()&&!G.length?null:G})}return Promise.resolve(j)}(f,d,r,c,o,s,u,e.K.Ff)},timescale:d.timescale};var g=null;i=i=null,e.sa.id&&e.K.id&&(i=n.get(i=e.sa.id+","+e.K.id))&&(g=i.segmentIndex);var v=e.na.start,y=e.na.duration?v+e.na.duration:1/0;if(g)X0(l=g,d,v,y,c,e.Fb),l.Xa(e.presentationTimeline.Ib());else{if(n=0,a=-1,null!=e.sa.id&&null!=e.K.id){var T=l.get(e.sa.id);if(T)a=T.timeline;else for(T=(l=m(l.values())).next();!T.done;T=l.next()){if(T=T.value,Math.abs(d.Kb-T.endTime)<=qs&&T.dh.includes(e.K.id)){a=T.timeline;break}T.timeline>=n&&(n=T.timeline+1)}}-1==a&&(a=n),g=new Bl(e.Fb,d,e.K.originalId,e.bandwidth,e.K.fb,e.Nb,v,y,c,s,e.K.Ff,a)}return d.timeline&&"image"!==e.qa.contentType&&"text"!==e.qa.contentType&&e.presentationTimeline.Ai(g.h?g.h.timeline:[],v),i&&e.Fb&&(i.segmentIndex=g),i=(i=(i=d.timeline)&&i[i.length-1])?i.end+d.Kb:-1,l=-1,g instanceof Bl&&(l=g.Re()),{endTime:i,timeline:l,Rc:function(){return g instanceof Bl&&0==g.getNumReferences()&&X0(g,d,v,y,c,e.Fb),Promise.resolve(g)},timescale:d.timescale}}function Hs(e){return e.Kc}function Bl(e,t,n,i,r,o,s,u,a,l,c,d){ut.call(this,[]),this.D=e,this.h=t,this.H=n,this.C=i,this.G=r,this.J=o,this.j=s,this.l=u,this.u=a,this.B=l,this.I=c,this.L=d,Ef(this)}function X0(e,t,n,i,r,o){if(function b2(e,t){if(e.u!==t){e.u=t;for(var n=(e=m(e.g)).next();!n.done;n=e.next())(n=n.value)&&Km(n,t)}}(e,r),e.D=o,e.h){if(e.h.fd!==t.fd&&(e.h.timeline=t.timeline,e.h.fd=t.fd,e.h.Kb=t.Kb),e.h.ac!==t.ac&&(e.h.ac=t.ac),(n=e.h.timeline).length){var s=n[n.length-1];t=t.timeline.filter(function(u){return u.end>s.end})}else t=t.timeline.slice();t.length>0&&e.h.timeline.push.apply(e.h.timeline,ee(t)),e.l!==i&&(e.l=i)}else e.h=t,e.j=n,e.l=i;Ef(e)}function Ef(e){if(e.h&&!e.o){for(var t=[],n=m(e.h.timeline),i=n.next();!i.done;i=n.next())(i=i.value).start>=e.l||i.end<=0||t.push(i);e.h.timeline=t,e.Xa(e.j)}}function z0(e,t,n,i,r,o,s,u){return e=Ul(e,t,n,o,i||null,r),Kt(s(),[e],u()).map(function(a){return a.toString()})}function ka(e){this.o=null,this.B=e,this.H=new $u,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"}function Fl(e,t){var n,i,r,o,s,u,a;return L(function(l){return 1==l.g?(n=Kt(e.i,[R2(e,t)]),i=_n(n,e.o.retryParameters),r=e.B.networkingEngine.request(8,i),gu(e.H,r),fe(l,2),x(l,r.promise,4)):2!=l.g?(s=We((o=l.h).data),1==(u=JSON.parse(s)).VERSION&&function N2(e,t,n){null!=e.g&&(e.g.stop(),e.g=null);var i=t["RELOAD-URI"]||n;e.g=new E(function(){Fl(e,i)}),(n=t.TTL)&&(e.D=n),e.g.ka(e.D),e.m=t["PATHWAY-PRIORITY"]||[],e.G=t["PATHWAY-CLONES"]||[]}(e,u,o.uri),Le(l,0)):(a=Te(l))&&7001==a.code?l.return():(null!=e.g&&(e.g.stop(),e.g=null),e.g=new E(function(){Fl(e,t)}),e.g.ka(e.D),void Z(l))})}function R2(e,t){if(!e.m.length)return t;t=new O(t);var n=e.C||e.m[0],i=Math.round(e.B.getBandwidthEstimate()),r=t.g;return"DASH"==e.u?(r.add("_DASH_pathway",n),r.add("_DASH_throughput",String(i))):"HLS"==e.u&&(r.add("_HLS_pathway",n),r.add("_HLS_throughput",String(i))),xt(r)&&ge(t,r),t.toString()}function _a(e,t,n,i){var r=e.l.get(t);r||(r=new Map),r.set(n,i),e.l.set(t,r)}function Vl(e,t,n){n=void 0!==n&&n,t=e.l.get(t)||new Map;for(var i=[],r=m(e.m),o=r.next(),s={};!o.done;s={xd:void 0},o=r.next())if(s.xd=o.value,o=t.get(s.xd))i.push({Yg:s.xd,location:o});else if(o=e.G.find(function(a){return function(l){return l.Nl==a.xd}}(s))){var u=t.get(o["BASE-ID"]);u&&(o["URI-REPLACEMENT"].hj?(q(u=new O(u),o["URI-REPLACEMENT"].hj),i.push({Yg:s.xd,location:u.toString()})):i.push({Yg:s.xd,location:u}))}for(r=Date.now(),o=(s=m(e.j.keys())).next();!o.done;o=s.next())r>(u=e.j.get(o=o.value))&&e.j.delete(o);if((i=i.filter(function(a){for(var l=m(e.j.keys()),c=l.next();!c.done;c=l.next())if(c.value.includes(new O(a.location).Eb))return!1;return!0})).length&&(e.C=i[0].Yg),!(i=i.map(function(a){return a.location})).length&&e.h)for(s=(r=m(e.h.split(","))).next();!s.done;s=r.next())(s=t.get(s.value))&&(e.C=e.h,i.push(s));
1if(!i.length)for(r=(t=m(t.values())).next();!r.done;r=t.next())i.push(r.value);return n?i:Kt(e.i,i)}function hi(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.u=this.o=!1,this.m=new Set}function Y0(e,t){for(var n=[],i=[],r=[],o=[],s=(e=m(e)).next();!s.done;s=e.next()){var u=s.value;s=new Map(u.audioStreams.map(function(d){return[_f(d),d]}));var a=new Map(u.videoStreams.map(function(d){return[kf(d),d]})),l=new Map(u.textStreams.map(function(d){return[Gl(d),d]}));if(u=new Map(u.imageStreams.map(function(d){return[Kl(d),d]})),t){var c=e1(Pe);l.set(Gl(c),c),c=e1("image"),u.set(Kl(c),c)}n.push(s),i.push(a),r.push(l),o.push(u)}return{Nh:n,fj:i,cj:r,ji:o}}function q0(e){var t,n,i,r,o,s,u,a,l,c,d,f,g,v,y,T,S,A,I,_,P,b,D,R,j,U,B,G;return L(function(K){switch(K.g){case 1:if(t=cn,1==e.length)return K.return(e[0]);for(n=e.map(function(z){return new Map(z.filter(function($){return $.type===t.ha}).map(function($){return[_f($),$]}))}),i=e.map(function(z){return new Map(z.filter(function($){return $.type===t.Ea}).map(function($){return[kf($),$]}))}),r=e.map(function(z){return new Map(z.filter(function($){return $.type===t.Ua}).map(function($){return[Gl($),$]}))}),o=e.map(function(z){return new Map(z.filter(function($){return $.type===t.Vf}).map(function($){return[Kl($),$]}))}),s=m(r),u=s.next();!u.done;u=s.next())a=u.value,l=Q0(t.Ua),a.set(Gl(l),l);
1for(c=m(o),d=c.next();!d.done;d=c.next())f=d.value,g=Q0(t.Vf),f.set(Kl(g),g);return x(K,Gs(v=new hi,[],n,0,Hd,Gd,0),2);case 2:return y=K.h,x(K,Gs(v,[],i,0,Hd,Gd,0),3);case 3:return T=K.h,x(K,Gs(v,[],r,0,Hd,Gd,0),4);case 4:return S=K.h,x(K,Gs(v,[],o,0,Hd,Gd,0),5);case 5:if(A=K.h,I=0,T.length&&y.length)for(D=m(y),R=D.next();!R.done;R=D.next())for(j=R.value,U=m(T),B=U.next();!B.done;B=U.next())G=I++,B.value.variantIds.push(G),j.variantIds.push(G);else for(_=T.concat(y),P=m(_),b=P.next();!b.done;b=P.next())b.value.variantIds=[I++];return K.return(T.concat(y).concat(S).concat(A))}})}function Gs(e,t,n,i,r,o,s){var u,a,l,c,g,v,T,S,I,_,P,M,D,R;return L(function(U){switch(U.g){case 1:for(u=[],a=0;a<n.length;a++)u.push(a>=i?new Set(n[a].values()):new Set);l=m(t),c=l.next();case 2:if(c.done){U.A(4);break}return x(U,function O2(e,t,n,i,r,o,s){return L(function(u){return 1==u.g?(Z0(e,n,t,s>0),t.matchedStreams?t.segmentIndex?x(u,$0(t,i+s),2):u.A(2):u.return(!1)):(J0(t,i,r,o,s),u.return(!0))})}(e,c.value,n,i,o,u,s),5);case 5:if(!U.h)throw new k(2,4,4037);c=l.next(),U.A(2);break;case 4:for(g=m(u),v=g.next();!v.done;v=g.next())for(T=m(v.value),S=T.next();!S.done;S=T.next())(I=j2(e,S.value,n,r,o,u))&&t.push(I);for(_=m(u),P=_.next();!P.done;P=_.next())for(M=m(P.value),D=M.next(),R={};!D.done;R={uh:void 0},D=M.next())if(R.uh=D.value,!Mf(R.uh)&&t.some(function(B){return function(H){return Cf(e,B.uh,H)}}(R)))throw new k(2,4,4037);return U.return(t)}})}function $0(e,t){var n,i,r,o,s,u;return L(function(a){if(1==a.g){for(n=[],i=e.matchedStreams,r=t;r<i.length;r++)n.push((o=i[r]).createSegmentIndex()),o.trickModeVideo&&!o.trickModeVideo.segmentIndex&&n.push(o.trickModeVideo.createSegmentIndex()),o.dependencyStream&&!o.dependencyStream.segmentIndex&&n.push(o.dependencyStream.createSegmentIndex());return x(a,Promise.all(n),2)}if(e.segmentIndex instanceof rn)for(s=t;s<i.length;s++)(u=i[s]).segmentIndex&&e.segmentIndex.h.push(u.segmentIndex);Z(a)})}function j2(e,t,n,i,r,o){if(Mf(t))return null;var s=i(t);return Z0(e,n,s),s.createSegmentIndex&&(s.createSegmentIndex=function(){return L(function(u){return s.segmentIndex?u.A(0):(s.segmentIndex=new rn,x(u,$0(s,0),0))})}),s.matchedStreams&&s.matchedStreams.length?(J0(s,0,r,o,0),s):null}function J0(e,t,n,i,r){var o=e.matchedStreams;for(t+=r;t<o.length;t++){var s=o[t];n(e,s);var u=!0;if("audio"==e.type&&0==xe(e.language,s.language)&&(u=!1),u&&(i[t-r].delete(s),s.fullMimeTypes))for(u=(s=m(s.fullMimeTypes.values())).next();!u.done;u=s.next())e.fullMimeTypes.add(u.value)}}function Da(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var n=m(t.matchedStreams),i=n.next();!i.done;i=n.next())(i=i.value).segmentIndex&&(i.segmentIndex.release(),i.segmentIndex=null)},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 Hd(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 Ks(e,t){function n(s,u){s||(s=[]);for(var a=(u=m(u)).next();!a.done;a=u.next())s.includes(a=a.value)||s.push(a);return s}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var i=m(t.keyIds),r=i.next();!r.done;r=i.next())e.keyIds.add(r.value);if(null==e.originalId?e.originalId=t.originalId:(i=t.originalId||"")&&!e.originalId.endsWith(i)&&(e.originalId+=","+i),i=nm(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new k(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),r=(i=m(t.closedCaptions)).next();!r.done;r=i.next()){var o=m(r.value);r=o.next().value,o=o.next().value,e.closedCaptions.set(r,o)}e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=Da(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var s=new rn,u=m(e.trickModeVideo.matchedStreams),a=u.next();!a.done;a=u.next())s.h.push(a.value.segmentIndex);return e.trickModeVideo.segmentIndex=s,Promise.resolve()}),e.trickModeVideo.matchedStreams.push(t.trickModeVideo),Ks(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),Ks(e.trickModeVideo,t)),t.depen
1dencyStream?(e.dependencyStream||(e.dependencyStream=Da(t.dependencyStream),e.dependencyStream.matchedStreams=[],e.dependencyStream.createSegmentIndex=function(){if(e.dependencyStream.segmentIndex)return Promise.resolve();for(var s=new rn,u=m(e.dependencyStream.matchedStreams),a=u.next();!a.done;a=u.next())s.h.push(a.value.segmentIndex);return e.dependencyStream.segmentIndex=s,Promise.resolve()}),e.dependencyStream.matchedStreams.push(t.dependencyStream),Ks(e.dependencyStream,t.dependencyStream)):e.dependencyStream&&(e.dependencyStream.matchedStreams.push(t),Ks(e.dependencyStream,t))}function Gd(e,t){var n=e.roles;n||(n=[]);for(var i=m(t.roles),r=i.next();!r.done;r=i.next())n.includes(r=r.value)||n.push(r);for(e.roles=n,i=(n=m(t.keyIds)).next();!i.done;i=n.next())e.keyIds.add(i.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,ee(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=(t=m(t.closedCaptions)).next();!n.done;n=t.next())n=(i=m(n.value)).next().value,i=i.next().value,e.closedCaptions.set(n,i)}function Z0(e,t,n,i){i=void 0!==i&&i?n.matchedStreams:[];for(var r=(t=m(t)).next();!r.done;r=t.next()){if(!(r=U2(e,r.value,n)))return;i.push(r)}n.matchedStreams=i}function U2(e,t,n){var i={audio:_f,video:kf,text:Gl,image:Kl}[n.type],r=null,o=i(n);if(t.has(o))r=t.get(o);else{o={audio:function(l,c){return Cf(e,l,c)},video:function(l,c){return Cf(e,l,c)},text:B2,image:F2}[n.type];for(var s={audio:V2,video:H2,text:G2,image:K2}[n.type],u=m(t.values()),a=u.next();!a.done;a=u.next())!o(n,a=a.value)||n.fastSwitching!=a.fastSwitching||r&&!s(n,r,a)||(r=a)}return e.u&&!Mf(r)&&t.delete(i(r)),r}function If(e,t){return e.mimeType==t.mimeType&&i1(e.codecs)===i1(t.codecs)}function Cf(e,t,n){return!(!If(t,n)&&!e.o||t.drmInfos&&!tm(t.drmInfos,n.drmInfos))}function B2(e,t){return!t.language||!(e.forced!==t.forced||0==xe(e.language,t.language)||t.kind!=e.kind)}function F2(){return!0}function V2(e,t,n){var i=t1(e,t,n);if(i===Ji)return!0;if(i===Ir)return!1;i=xe(e.language,t.language);var r=xe(e.language,n.language);if(r>i)return!0;if(r<i)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(i=t.roles.filter(function(o){return e.roles.includes(o)}),(r=n.roles.filter(function(o){return e.roles.includes(o)})).length>i.length)return!0;if(r.length<i.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)||!(t.primary&&!n.primary)&&((i=Hl(e.channelsCount,t.channelsCount,n.channelsCount))==Ji||i!=Ir&&((i=Hl(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==Ji||i!=Ir&&!(!e.bandwidth||n1(e.bandwidth,t.bandwidth,n.bandwidth)!=Ji)))}function H2(e,t,n){var i=t1(e,t,n);if(i===Ji)return!0;if(i===Ir)return!1;if((i=Hl(e.width*e.height,t.width*t.height,n.width*n.height))==Ji)return!0;if(i==Ir)return!1;if(e.frameRate){if((i=Hl(e.frameRate,t.frameRate,n.frameRate))==Ji)return!0;if(i==Ir)return!1}return!(!e.bandwidth||n1(e.bandwidth,t.bandwidth,n.bandwidth)!=Ji)}function G2(e,t,n){var i=xe(e.language,t.language),r=xe(e.language,n.language);if(r>i)return!0;if(r<i)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(i=t.roles.filter(function(o){return e.roles.includes(o)}),(r=n.roles.filter(function(o){return e.roles.includes(o)})).length>i.length)return!0;if(r.length<i.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 K2(e,t,n){return Hl(e.width*e.height,t.width*t.height,n.width*n.height)==Ji}function Q0(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 e1(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ut([]),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 Hl(e,t,n){if(t==e&&e!=n)return Ir;if(n==e&&e!=t)return Ji;if(t>e){if(n<=e||n-e<t-e)return Ji;if(n-e>t-e)return Ir}else{if(n>e)return Ir;if(e-n<e-t)return Ji;if(e-n>e-t)return Ir}return Df}
1function t1(e,t,n){var i=e.mimeType===t.mimeType&&e.codecs===t.codecs,r=e.mimeType===n.mimeType&&e.codecs===n.codecs;return i&&!r?Ir:!i&&r?Ji:(t=If(e,t),e=If(e,n),t&&!e?Ir:!t&&e?Ji:Df)}function n1(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?Ji:t<e?Ir:Df}function Mf(e){switch(e.type){case Pe:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function kf(e){return Kd([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 _f(e){return Kd([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 Gl(e){return Kd([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function Kl(e){return Kd([e.width,e.codecs,e.mimeType])}function Kd(e){return JSON.stringify(e)}function i1(e){if(!Lf.has(e)){var t=Zn(e);Lf.set(e,t)}return Lf.get(e)}wt(Bl,ut),(h=Bl.prototype).getNumReferences=function(){return this.h?this.h.timeline.length:0},h.release=function(){ut.prototype.release.call(this),this.h=null},h.Xa=function(e){if(this.h){for(var t=0,n=this.h.timeline,i=0;i<n.length&&n[i].end+this.j<=e;i+=1)t+=1;t>0&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.i+=t,0===this.getNumReferences()&&this.release())}},h.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,i=0;i<t.length;i++){var r=t[i],o=r.start+this.j;if(r=i<n?t[i+1].start+this.j:this.l===1/0?r.end+this.j:this.l,e>=o&&e<r)return i+this.i}return null},h.get=function(e){var t=this;if((e-=this.i)<0||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){var i=(n=this.h.timeline[e]).Tk,r=n.Fh+this.h.fd,o=this.j-this.h.Kb,s=this.j+n.end,u=s;e===this.getNumReferences()-1&&this.l!==1/0&&(u=this.D&&Math.abs(u-this.l)>.1?Math.min(u,this.l):this.l);var a=this.h.codecs,l=this.h.mimeType,c=this.h.bandwidth,d=[],f=!1;if(n.tc&&this.h&&this.h.ac&&(f=this.h.ac.includes("$SubNumber$")),f){f=(n.end-n.start)/n.tc;for(var g={},v=0;v<n.tc;g={Pf:void 0,Yi:void 0},v++){var y=n.start+f*v,T=y+f;g.Yi=v,g.Pf=null,(g=new Ee(this.j+y,this.j+T,function(S){return function(){return t.h?(null==S.Pf&&(S.Pf=z0(t.h.ac,t.H,i,t.C,r,S.Yi,t.G,t.J)),S.Pf):[]}}(g),0,null,this.u,o,this.j,this.l,[],"",null,null,Jo,this.B)).codecs=a,g.mimeType=l,g.bandwidth=c,0==this.I?v>0&&g.td():v%this.I!=0&&g.td(),d.push(g)}}(n=new Ee(this.j+n.start,u,function(){return d.length>0||!t.h?[]:z0(t.h.ac,t.H,i,t.C,r,null,t.G,t.J)},0,null,this.u,o,this.j,this.l,d,"",null,null,Jo,this.B,d.length>0)).codecs=a,n.mimeType=l,n.j=s,n.bandwidth=c,this.g[e]=n}return n},h.Gb=function(e){Ef(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}},h.Re=function(){return this.L},ka.prototype.configure=function(e){this.o=e},ka.prototype.destroy=function(){return this.B=this.o=null,this.i=[],this.h=null,this.m=[],this.G=[],this.l.clear(),null!=this.g&&(this.g.stop(),this.g=null),this.H.destroy()},ka.prototype.setManifestType=function(e){this.u=e},ka.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)},(h=hi.prototype).release=function(){for(var e=m(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.l=[],this.u=this.o=!1,this.m.clear()},h.ck=function(){return this.l},h.Jg=function(){return this.j.slice()},h.Hj=function(){return this.i},h.Uh=function(e,t){if(e){if("audio"==e.type)for(var n=m(this.h),i=n.next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(r){return r!==e});else if("video"==e.type)for(i=(n=m(this.g)).next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(r){return r!==e}),i.trickModeVideo&&(i.trickModeVideo.matchedStreams=i.trickModeVideo.matchedStreams.filter(function(r){return r!==e})),i.dependencyStream&&(i.dependencyStream.matchedStreams=i.dependencyStream.matchedStreams.filter(function(r){return r!==e}));else if(e.type==Pe)for(i=(n=m(this.j)).next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(r){return r!==e});else if("image"==e.type)for(i=(n=m(this.i)).next();!i.done;i=n.next())(i=i.value).matchedStreams=i.matchedStreams.filter(function(r){return r!==e});e.segmentIndex&&e.closeSegmentIndex(),this.m.delete(t)}},h.ig=function(e,t,n){n=void 0!==n&&n;var r,o,u,a,l,c,d,f,g,v,T,S,A,I,_,b,M,D,R,j,U,B,H,G,K,z,$,Q,He,i=this;return L(function(le){if(1==le.g){if(r=cn,!t&&1==e.length)return o=Y0(e,!1),u=o.fj,a=o.cj,l=o.ji,i.h=Array.from(o.Nh[0].values()),i.g=Array.from(u[0].values()),i.j=Array.from(a[0].values()),i.i=Array.from(l[0].values()),le.A(2);for(c=n?i.m.size:0,d=-1,f=0;f<e.length;f++)i.m.has((g=e[f]).id)||(i.m.add(g.id),-1==d&&(d=f));return-1==d?le.return():(v=Y0(e,!0),T=v.fj,S=v.cj,A=v.ji,x(le,Promise.all([Gs(i,i.h,v.Nh,d,Da,Ks,c),Gs(i,i.g,T,d,Da,Ks,c),Gs(i,i.j,S,d,Da,Ks,c),Gs(i,i.i,A,d,Da,Ks,c)]),2))}if(I=0,_=[],i.g.length&&i.h.length)for(U=m(i.h),B=U.next();!B.done;B=U.next())for(H=B.value,G=m(i.g),K=G.next();!K.done;K=G.next())$=nm(H.drmInfos,(z=K.value).drmInfos),H.drmInfos.length&&z.drmInfos.length&&!$.length||(Q=(H.bandwidth||0)+(z.bandwidth||0),H.dependencyStream&&(Q+=H.dependencyStream.bandwidth||0),z.depen
1dencyStream&&(Q+=z.dependencyStream.bandwidth||0),He=I++,_.push({id:He,language:H.language,disabledUntilTime:0,primary:H.primary,audio:H,video:z,bandwidth:Q,drmInfos:$,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(b=m(i.g.length?i.g:i.h),M=b.next();!M.done;M=b.next())R=I++,j=(D=M.value).bandwidth||0,D.dependencyStream&&(j+=D.dependencyStream.bandwidth||0),_.push({id:R,language:D.language,disabledUntilTime:0,primary:D.primary,audio:D.type==r.ha?D:null,video:D.type==r.Ea?D:null,bandwidth:j,drmInfos:D.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});i.l=_,Z(le)})},h.Oi=function(e){this.o=e},h.Si=function(e){this.u=e},ue("shaka.util.PeriodCombiner",hi),hi.prototype.setUseStreamOnce=hi.prototype.Si,hi.prototype.setAllowMultiTypeVariants=hi.prototype.Oi,hi.prototype.combinePeriods=hi.prototype.ig,hi.prototype.deleteStream=hi.prototype.Uh,hi.prototype.getImageStreams=hi.prototype.Hj,hi.prototype.getTextStreams=hi.prototype.Jg,hi.prototype.getVariants=hi.prototype.ck;var Ji=1,Df=0,Ir=-1,Lf=new Map;function r1(e,t){try{return function W2(e,t){var n=new DOMParser,i=X2.value()(e);e=null;try{e=n.parseFromString(i,"text/xml")}catch{return null}if(!(n=e.documentElement)||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}(wn(e),t)}catch{return null}}var X2=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 Wd(){var e=this;this.j=this.g=null,this.B=[],this.h=null,this.Fa=1,this.H=[],this.l={pf:"",type:"",profiles:[],rc:null,rb:0,fb:null,ge:0},this.u=new Map,this.C=new Map,this.o=new Map,this.D=new Map,this.ya=new Map,this.m=new hi,this.L=0,this.Ba=new Nr(5),this.M=new E(function(){e.J&&!e.g.continueLoadingWhenPaused&&(e.I.La(e.J,"timeupdate"),e.J.paused)?e.I.Aa(e.J,"timeupdate",function(){return d1(e)}):d1(e)}),this.R=new $u,this.O=null,this.G=[],this.ia=1/0,this.wa=!1,this.i=null,this.N=0,this.T=!1,this.I=new et,this.J=null,this.V=!1,this.ea="",this.oa=function(){return!1},this.X=[],this.ma=new Set,this.xa=new R0}function Pf(e){var t,n,i,r,o,s,u,a,l,c,d;return L(function(f){return 1==f.g?(t=4,n="MPD",i=function cI(e){var t=e.l.ge;if(!e.l.pf||!t||!e.H.length)return[];var n=Date.now()/1e3,i=e.H.filter(function(r){return!(r=On(r.attributes.ttl))||t+r>n}).map(Si).filter(C);return i.length?Kt(e.B,i):[]}(e),r=e.B,i.length?(r=i,n="Patch",t=6):e.B.length>1&&e.i&&(o=Vl(e.i,"Location",!0)).length&&(r=o),s=_n(r,e.g.retryParameters),u=Date.now(),x(f,Nf(e,s,0,{type:t}),2)):3!=f.g?(a=f.h,e.j?(a.uri&&a.uri!=a.originalUri&&!e.B.includes(a.uri)&&e.B.unshift(a.uri),l=new O(a.uri),e.ea=l.g.toString(),x(f,function z2(e,t,n,i){var r,o,u,a,l,g;return L(function(y){if(1==y.g){if(r=t,(o=e.g.dash.manifestPreprocessor)!=od){if(be("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),!(u=r1(r,i)))throw new k(2,4,4001,n);o(u),r=zt(u.outerHTML)}if(!(a=Br(r,i)))throw new k(2,4,4001,n);return(l=e.g.dash.manifestPreprocessorTXml)!=sd&&l(a),"Patch"===i?y.return(function Y2(e,t){var n,i,r,o,s,u,a,l,c,d,f,y,T,I,_,b,M,R,j;return L(function(H){if(1==H.g){if(n=t.attributes.mpdId,i=Ae(t,"originalPublishTime",no),!n||n!==e.l.pf||i!==e.l.ge)throw e.H=[],new k(1,4,4052);for(r=[],o=[],s=new Set,u=m(ac(t)),a=u.next();!a.done;a=u.next())if(c=ou((l=a.value).attributes.sel||""),d=c[c.length-1],f=Si(l)||"","MPD"===d.name)if("mediaPresentationDuration"===d.Ac){var G=yr(Si(l)||"");if(null!=G){e.l.rc=G;for(var K=m(e.u.values()),z=K.next();!z.done;z=K.next())z.value.rc=G}}else if("type"===d.Ac){for(e.h.presentationTimeline.bd("static"==f),e.l.type=f,K=(G=m(e.u.values())).next();!K.done;K=G.next())K.value.Fb="dynamic"==f;"static"==f&&(e.L=-1)}else"publishTime"===d.Ac?e.l.ge=no(f)||0:null===d.Ac&&"add"===l.tagName&&o.push(l);else if("PatchLocation"===d.name)Ga(e.H,l);else if("Period"===d.name)"add"===l.tagName?o.push(l):"remove"===l.tagName&&d.id&&$2(e,d.id);else if("SegmentTemplate"===d.name){if((G=(K=ou(l.attributes.sel||""))[K.length-1]).Ac){K=u1(e,K),z=Si(l)||"";for(var $=m(K),Q=$.next();!Q.done;Q=$.next())cc((Q=e.u.get(Q.value)).K.Kc,l.tagName,G.Ac,z);G=K}else G=[];for(y=m(G),T=y.next();!T.done;T=y.next())s.add(T.value)}else if("SegmentTimeline"===d.name||"S"===d.name){for(G=ou(l.attributes.sel||""),z=(K=m(G=u1(e,G))).next();!z.done;z=K.next())Ga($=ft(z=Ca(z=e.u.get(z.value),Hs,"SegmentTimeline"),"S"),l),z.children=$;
1for(I=m(G),_=I.next();!_.done;_=I.next())s.add(_.value)}for(b=m(s),M=b.next();!M.done;M=b.next())a1(e,M.value);for(R=m(o),j=R.next();!j.done;j=R.next())r.push.apply(r,ee(q2(e,j.value)));return r.length?(e.h.periodCount+=r.length,e.h.gapCount=e.N,x(H,s1(e,r,!0),2)):H.A(2)}"static"==e.l.type&&e.h.presentationTimeline.qb(e.l.rc||1/0),Z(H)})}(e,a)):e.g.dash.disableXlinkProcessing?y.return(o1(e,a,n)):(g=Vd(a,e.g.retryParameters,e.g.dash.xlinkFailGracefully,n,e.j.networkingEngine),gu(e.R,g),x(y,g.promise,2))}return y.return(o1(e,y.h,n))})}(e,a.data,a.uri,n),3)):f.return(0)):(c=Date.now(),e.Ba.sample(1,d=(c-u)/1e3),e.ma.clear(),f.return(d))})}function o1(e,t,n){var i,r,o,s,u,a,l,c,d,f,g,v,y,T,S,I,_,P,b,M,D,R,j,U,B,H,G,K,z,$,Q,He,le,ot,Xe,je,ze,Ke,Ue,Ge,$t,nn,bn,Mt,ls,Pr,Xs,Lo,Ch,nc;return L(function($r){switch($r.g){case 1:for(e.i&&e.i.l.clear(),i=[n],r=[],o=new Map,s=ft(t,"Location"),u=m(s),a=u.next();!a.done;a=u.next())c=(l=a.value).attributes.serviceLocation,(d=Si(l))&&(f=Kt(i,[d])[0],c&&(e.i?_a(e.i,"Location",c,f):o.set(c,f)),r.push(f));if(e.i?(g=Vl(e.i,"Location",!0)).length>0&&(i=e.B=g):r.length&&(i=e.B=r),e.l.pf=t.attributes.id||"",e.l.ge=Ae(t,"publishTime",no)||0,e.H=ft(t,"PatchLocation"),v=Promise.resolve(),(y=Yt(t,"ContentSteering"))&&e.j)for(T=y.attributes.defaultServiceLocation,e.i?(e.i.i=i,e.i.h=T):(e.i=new ka(e.j),e.i.configure(e.g),e.i.setManifestType("DASH"),e.i.i=i,e.i.h=T,(S=Si(y))&&(Ae(y,"queryBeforeStart",ru,!1)?v=Fl(e.i,S):Fl(e.i,S))),I=m(o.keys()),_=I.next();!_.done;_=I.next())b=o.get(P=_.value),_a(e.i,"Location",P,b);if(M=ft(t,"BaseURL"),D=!1,e.i)for(R=m(M),j=R.next();!j.done;j=R.next())B=(U=j.value).attributes.serviceLocation,H=Si(U),B&&H&&(_a(e.i,"BaseURL",B,H),D=!0);if(e.X.splice(0),D&&e.i||(G=M.map(Si),e.X.push.apply(e.X,ee(Kt(i,G)))),K=e.i,z=e.X,e.l.fb=$=function(){return K&&D?Vl(K,"BaseURL"):z.slice()},Q=0,M&&M.length&&(Q=Ae(M[0],"availabilityTimeOffset",iu)||0),e.l.rb=Q,e.L=Ae(t,"minimumUpdatePeriod",yr,-1),He=Ae(t,"availabilityStartTime",no),le=Ae(t,"timeShiftBufferDepth",yr),ot=null,e.g.dash.ignoreSuggestedPresentationDelay||(ot=Ae(t,"suggestedPresentationDelay",yr)),Xe=null,e.g.dash.ignoreMaxSegmentDuration||(Xe=Ae(t,"maxSegmentDuration",yr)),je=t.attributes.type||"static",e.h&&e.h.presentationTimeline&&(e.V=e.h.presentationTimeline.W()&&"static"==je),e.l.type=je,e.h)for(Ke=(ze=e.h.presentationTimeline).Ib(),Ue=m(e.o.values()),Ge=Ue.next();!Ge.done;Ge=Ue.next())($t=Ge.value).segmentIndex&&$t.segmentIndex.Xa(Ke);else nn=0,e.g.dash.ignoreMinBufferTime||(nn=Ae(t,"minBufferTime",yr)||0),bn=null!=ot?Math.min(ot,le||1/0):e.g.defaultPresentationDelay>0?e.g.defaultPresentationDelay:Math.min(1.5*nn,le||1/0),ze=new _e(He,bn,e.g.dash.autoCorrectDrift);return ze.bd("static"==je),ze.W()&&!isNaN(e.g.availabilityWindowOverride)&&(le=e.g.availabilityWindowOverride),null==le&&(le=1/0),ze.If(le),e.l.profiles=(Mt=t.attributes.profiles||"").split(","),ls={Fb:"static"!=je,presentationTimeline:ze,sa:null,na:null,qa:null,K:null,bandwidth:0,Lg:!1,rb:Q,rc:null,profiles:Mt.split(","),roles:null,Nb:function(){return""}},x($r,v,2);case 2:return e.N=0,Pr=l1(e,ls,$,t,!1),Xs=Pr.duration,Lo=Pr.periods,("static"!=je||e.V)&&Pr.Wh||ze.qb(Xs||1/0),e.T&&e.wa&&ze.Pi(e.ia),ze.Tg(Xe||1),e.T&&e.wa&&ze.oh(ot??e.g.defaultPresentationDelay),e.h?(e.h.periodCount=Lo.length,e.h.gapCount=e.N,x($r,s1(e,Lo,!1),4)):x($r,e.m.ig(Lo,ls.Fb),6);case 6:if(e.h={presentationTimeline:ze,variants:e.m.l,textStreams:e.m.Jg(),imageStreams:e.m.i,offlineSessionIds:[],sequenceMode:e.g.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:J2(t),nextUrl:Z2(t),periodCount:Lo.length,gapCount:e.N,isLowLatency:e.T,startTime:null},!ze.ej()){$r.A(7);break}
1return Ch=ft(t,"UTCTiming"),x($r,function aI(e,t,n){var i,r,o,s,u,a,l,c;return L(function(d){switch(d.g){case 1:i=n.map(function(f){return{scheme:f.attributes.schemeIdUri,value:f.attributes.value}}),r=e.g.dash.clockSyncUri,!i.length&&r&&i.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:r}),o=m(i),s=o.next();case 2:if(s.done){d.A(4);break}switch(u=s.value,fe(d,5),l=u.value,a=u.scheme){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return d.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 d.A(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return c=Date.parse(l),d.return(isNaN(c)?0:c-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":Be("NTP UTCTiming scheme is not supported");break;default:Be("Unrecognized scheme in UTCTiming element",a)}d.A(9);break;case 7:return x(d,h1(e,t,l,"HEAD"),10);case 10:return d.return(d.h);case 8:return x(d,h1(e,t,l,"GET"),11);case 11:return d.return(d.h);case 9:Le(d,3);break;case 5:Te(d);case 3:s=o.next(),d.A(2);break;case 4:return Be("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),d.return(0)}})}(e,$,Ch),8);case 8:if(nc=$r.h,!e.j)return $r.return();ze.Qi(nc);case 7:ze.kf(),e.m&&!e.h.presentationTimeline.W()&&e.m.release();case 4:e.j.makeTextStreamsForClosedCaptions(e.h),function Q2(e){for(var t=Array.from(e.D.keys()).filter(function(u){return!e.G.includes(u)}),n=(t=m(t)).next();!n.done;n=t.next()){for(var i=!0,r=m(e.D.get(n=n.value)),o=r.next();!o.done;o=r.next()){var s=e.o.get(o=o.value);s&&(s.segmentIndex&&0!=s.segmentIndex.getNumReferences()?i=!1:(e.m&&e.m.Uh(s,n),e.o.delete(o)))}i&&e.D.delete(n)}}(e),function eI(e,t){t=new Set(t.map(function(r){return r.id}));for(var n=m(e.C.keys()),i=n.next();!i.done;i=n.next())t.has(i=i.value)||e.C.delete(i)}(e,Lo),Z($r)}})}function s1(e,t,n){var i;return L(function(r){if(1==r.g)return x(r,e.m.ig(t,!0,n),2);e.h.variants=e.m.l,(i=e.m.Jg()).length>0&&(e.h.textStreams=i),e.h.imageStreams=e.m.i,e.j.filter(e.h),Z(r)})}function q2(e,t){return l1(e,{Fb:"dynamic"==e.l.type,presentationTimeline:e.h.presentationTimeline,sa:null,na:null,qa:null,K:null,bandwidth:0,Lg:!1,rb:e.l.rb,profiles:e.l.profiles,rc:e.l.rc,roles:null,Nb:function(){return""}},e.l.fb,t,!0).periods}function $2(e,t){e.h.periodCount--;for(var n=m(e.u.keys()),i=n.next();!i.done;i=n.next())(i=i.value).startsWith(t)&&(Ca(e.u.get(i),Hs,"SegmentTimeline").children=[],a1(e,i),e.u.delete(i));e.G=e.G.filter(function(o){return o!==t})}function u1(e,t){for(var n="",i="",r=-1,o="",s=(t=m(t)).next();!s.done;s=t.next())"Period"===(s=s.value).name?n=s.id:"AdaptationSet"===s.name?(i=s.id,null!==s.position&&(r=s.position)):"Representation"===s.name&&(o=s.id);if(t=[],o)t.push(n+","+o);else if(i)for(r=m(e.u.values()),e=r.next();!e.done;e=r.next())(e=e.value).sa.id===n&&e.qa.id===i&&e.K.id&&t.push(n+","+e.K.id);else if(r>-1)for(i=m(e.u.values()),e=i.next();!e.done;e=i.next())(e=e.value).sa.id===n&&e.qa.position===r&&e.K.id&&t.push(n+","+e.K.id);return t}function a1(e,t){var n=e.u.get(t),i=e.o.get(t);i.segmentIndex&&i.segmentIndex.Xa(e.h.presentationTimeline.Ib());try{var r=W0(n,function(o,s,u,a){return p1(e,o,s,u,a)},e.o,!0,e.g.dash.initialSegmentLimit,e.ya,n.K.aesKey,null,!0,e.C);i.createSegmentIndex=function(){return L(function(o){if(1==o.g)return i.segmentIndex?o.A(0):x(o,r.Rc(),3);i.segmentIndex=o.h,Z(o)})}}catch(o){if((t=n.K.contentType)!=Pe&&"application"!=t&&"image"!=t||4002!=o.code)throw o}}function J2(e){var t=Yt(e,"ServiceDescription");if(!t||(e=Yt(t,"Latency"),t=Yt(t,"PlaybackRate"),!e&&!t))return null;var n={};return e&&("target"in e.attributes&&(n.targetLatency=parseInt(e.attributes.target,10)/1e3),"max"in e.attributes&&(n.maxLatency=parseInt(e.attributes.max,10)/1e3),"min"in e.attributes&&(n.minLatency=parseInt(e.attributes.min,10)/1e3)),t&&("max"in t.attributes&&(n.maxPlaybackRate=parseFloat(t.attributes.max)),"min"in t.attributes&&(n.minPlaybackRate=parseFloat(t.attributes.min))),n}function Z2(e){if(!(e=ft(e,"SupplementalProperty")).length)return null;for(var t=(e=m(e)).next();!t.done;t=e.next())if("urn:mpeg:dash:chaining:2016"==(t=t.value).attributes.schemeIdUri)return t.attributes.value;return null}function l1(e,t,n,i,r){var o=t.rc;o||(o=Ae(i,"mediaPresentationDuration",yr),e.l.rc=o);var s=0;e.h&&e.h.presentationTimeline&&e.V&&(s=e.h.presentationTimeline.Yb());var u=[],a=s;
1i=ft(i,"Period");for(var l=0;l<i.length;l++){var c=i[l],d=i[l+1],f=Ae(c,"start",yr,a),g=c.attributes.id,v=Ae(c,"duration",yr);f=0==l&&0==f&&e.V?s:f;var y=null;if(d){var T=Ae(d,"start",yr);null!=T&&(y=T-f+s)}else null!=o&&(y=o-f+s);if(T=qs,y&&v&&Math.abs(y-v)>T&&y>v&&e.N++,null==y&&(y=v),!(null!==e.O&&null!==g&&null!==f&&f<e.O)||e.G.includes(g)||l+1==i.length){if(null!==f&&(null===e.O||f>e.O)&&(e.O=f),a=tI(e,t,n,{start:f,duration:y,node:c,df:null==y||!d}),u.push(a),t.sa.id&&y&&e.ya.set(t.sa.id,y),null==y){a=null;break}a=f+y}}if(r)for(n=(t=m(u)).next();!n.done;n=t.next())e.G.includes(n=n.value.id)||e.G.push(n);else e.G=u.map(function(S){return S.id});return null!=o?{periods:u,duration:o+s,Wh:!1}:{periods:u,duration:a,Wh:!0}}function tI(e,t,n,i){t.sa=Rf(e,i.node,null,n),t.na=i,t.sa.rb=t.rb,t.sa.id||(t.sa.id="__shaka_period_"+i.start);var r=ft(i.node,"EventStream");n=t.presentationTimeline.Ib();for(var o=(r=m(r)).next();!o.done;o=r.next())lI(e,i.start,i.duration,o.value,n);for(r=(n=m(n=ft(i.node,"SupplementalProperty"))).next();!r.done;r=n.next())"urn:mpeg:dash:urlparam:2014"==(r=r.value).attributes.schemeIdUri&&(r=Wl(e,r))&&(t.Nb=r);if(n=ft(i.node,"AdaptationSet").map(function(g,v){return c1(e,t,v,g)}).filter(C),t.Fb){r=[];for(var s=(o=m(n)).next();!s.done;s=o.next())for(var u=(s=m(s.value.Pk)).next();!u.done;u=s.next())r.push(u.value);if(r.length!=new Set(r).size)throw new k(2,4,4018)}for(r=new Map,s=(o=m(n)).next();!s.done;s=o.next())for(u=(s=m(s.value.vj)).next();!u.done;u=s.next()){var a=m(u.value);u=a.next().value,a=a.next().value,r.set(u,a)}if(r.size)for(o=null,u=(s=m(n)).next();!u.done;u=s.next()){a=[];for(var l=m((u=u.value).streams),c=l.next(),d={};!c.done;d={wh:void 0},c=l.next())if(d.wh=c.value,r.has(d.wh.originalId)){o||(o=ft(i.node,"AdaptationSet").map(function(g,v){return c1(e,t,v,g)}).filter(C));for(var f=(c=m(o)).next();!f.done;f=c.next())(f=f.value.streams.find(function(g){return function(v){return v.originalId==g.wh.originalId}}
1(d)))&&(f.dependencyStream=r.get(f.originalId),f.originalId+=f.dependencyStream.originalId,a.push(f))}a.length&&u.streams.push.apply(u.streams,ee(a))}if(i=n.filter(function(g){return!g.Eh}),n=n.filter(function(g){return g.Eh}),!e.g.disableIFrames)for(r=(n=m(n)).next();!r.done;r=n.next())for(o=(r=r.value).Eh.split(" "),u=(s=m(i)).next();!u.done;u=s.next())if(o.includes((u=u.value).id))for(a=(u=m(u.streams)).next();!a.done;a=u.next())Wu(a.value,r.streams);if(n=Xd(e.g.disableAudio,i,"audio"),r=Xd(e.g.disableVideo,i,"video"),o=Xd(e.g.disableText,i,Pe),i=Xd(e.g.disableThumbnails,i,"image"),0===r.length&&0===n.length)throw new k(2,4,4004);return{id:t.sa.id,audioStreams:n,videoStreams:r,textStreams:o,imageStreams:i}}function Xd(e,t,n){return e||!t.length?[]:t.reduce(function(i,r){return r.contentType!=n||i.push.apply(i,ee(r.streams)),i},[])}function c1(e,t,n,i){function r(B){var H=B.attributes["dvb:fontFamily"];B=B.attributes["dvb:url"],H&&B&&(B=Kt(t.qa.fb(),[B],t.Nb()),e.j.addFont(H,B[0]))}function o(B){switch(B){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function s(B){switch(B){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.qa=Rf(e,i,t.sa,null),t.qa.position=n;var u=!1,a=(n=ft(i,"Role")).map(function(B){return B.attributes.value}).filter(C),l=void 0,c=t.qa.contentType==Pe;c&&(l="subtitle");for(var d=(n=m(n)).next();!d.done;d=n.next()){var f=(d=d.value).attributes.schemeIdUri;if(null==f||"urn:mpeg:dash:role:2011"==f)switch(d=d.attributes.value,d){case"main":u=!0;break;case"caption":case"subtitle":l=d}}var g=ft(i,"EssentialProperty");n=null;var v=!1;d=null,f=!1;for(var y=(g=m(g)).next();!y.done;y=g.next()){var T=(y=y.value).attributes.schemeIdUri;if("http://dashif.org/guidelines/trickmode"==T)n=y.attributes.value;else if("urn:mpeg:mpegB:cicp:TransferCharacteristics"==T)var S=s(parseInt(y.attributes.value,10));else if("urn:mpeg:mpegB:cicp:ColourPrimaries"==T)var A=o(parseInt(y.attributes.value,10));else"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=T&&("urn:mpeg:dash:ssr:2023"==T&&e.g.dash.enableFastSwitching?v=!0:"urn:dvb:dash:fontdownload:2014"==T?r(y):"urn:mpeg:dash:urlparam:2014"==T&&(d=Wl(e,y))||(f=!0))}if(f)return null;var I=null;for(g=(f=m(f=ft(i,"SupplementalProperty"))).next();!g.done;g=f.next())"http://dashif.org/guidelines/last-segment-number"==(y=(g=g.value).attributes.schemeIdUri)?I=parseInt(g.attributes.value,10)-1:"urn:mpeg:mpegB:cicp:TransferCharacteristics"==y?S=s(parseInt(g.attributes.value,10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"==y?A=o(parseInt(g.attributes.value,10)):"urn:dvb:dash:fontdownload:2014"==y?r(g):"urn:mpeg:dash:urlparam:2014"==y&&(d=Wl(e,g));d&&(t.Nb=d),d=ft(i,"Accessibility");var P,_=new Map;for(f=(d=m(d)).next();!f.done;f=d.next())if(f=(g=f.value).attributes.schemeIdUri,g=g.attributes.value,"urn:scte:dash:cc:cea-608:2015"!=f||e.g.disableText)if("urn:scte:dash:cc:cea-708:2015"!=f||e.g.disableText)"urn:mpeg:dash:role:2011"==f?null!=g&&(a.push(g),"captions"==g&&(l="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==f&&("1"==g?P="visually impaired":"2"==g?P="hard of hearing":"9"==g&&(P="spoken subtitles"));else if(f=1,null!=g)for(y=(g=m(g.split(";"))).next();!y.done;y=g.next()){T=y.value;var b=y=void 0;T.includes("=")?(y="svc"+(T=T.split("="))[0],b=T[1].split(",")[0].split(":").pop()):(y="svc"+f,f++,b=T),_.set(y,te(b))}else _.set("svc1","und");else if(f=1,null!=g)for(T=(y=m(g=g.split(";"))).next();!T.done;T=y.next()){b=T.value;var M=T=void 0;b.includes("=")?(T=(b=b.split("="))[0].startsWith("CC")?b[0]:"CC"+b[0],M=b[1]||"und"):(T="CC"+f,2==g.length?f+=2:f++,M=b),_.set(T,te(M))}else _.set("CC1","und");d=ft(i,"ContentProtection");var D=N0(e.xa,d,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI);t.qa.encrypted=d.length>0;var R=te(t.qa.language||"und"),j=t.qa.label,U=new Map;if(i=ft(i,"Representation"),!e.g.ignoreSupplementalCodecs){for(d=[],g=(f=m(i)).next();!g.done;g=f.next())(g=Fr(y=g.value,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&((y=rr(y)).attributes.codecs=g.split(" ").join(","),y.attributes.id&&(y.attributes.supplementalId=y.attributes.id+"_supplementalCodecs"),d.push(y));i.push.apply(i,ee(d))}if(d=i.map(function(B){var H=function nI(e,t,n,i,r,o,s,u,a,l,c,d){t.K=Rf(e,l,t.qa,null);var f=t.K.id;if(e.ia=Math.min(e.ia,t.K.rb),e.T=e.ia>0,!function uI(e){var t=e.Ed?1:0;return t+=e.xc?1:0,0==(t+=e.Kc?1:0)?e.contentType==Pe||"application"==e.contentType:(1!=t&&(e.Ed&&(e.xc=null),e.Kc=null),!0)}(t.K))return null;var g=t.na.start;t.bandwidth=Ae(l,"bandwidth",Hr)||0,t.roles=u;var v=ft(l,"SupplementalProperty"),y=ft(l,"EssentialProperty"),T=ft(l,"ContentProtection");l=null;var B,H,S=y.find(function(K){return"urn:mpeg:dash:urlparam:2014"==K.attributes.schemeIdUri});(S||(S=v.find(function(K){return"urn:mpeg:dash:urlparam:2014"==K.attributes.schemeIdUri})))&&(l=Wl(e,S)),l&&(t.Nb=l),l=(S=t.K.contentType)==Pe||"application"==S,S="image"==S,T.length&&(t.qa.encrypted=!0);try{var A=void 0;if(n.eg){var I=t.K.fb,_=t.Nb,b=_n(Kt(I(),[n.eg.tk],_()),e.g.retryParameters);A={bitsKey:128,blockCipherMode:"CBC",iv:n.eg.iv,firstMediaSequenceNumber:0,fetchKey:function(){var K,$;return L(function(Q){if(1==Q.g)return x(Q,Nf(e,b,6),2);
1if(3!=Q.g){if(!(K=Q.h).data||16!=K.data.byteLength)throw new k(2,4,4049);return $=A,x(Q,X.crypto.subtle.importKey("raw",K.data,{name:"AES-CBC"},!0,["decrypt"]),3)}$.cryptoKey=Q.h,A.fetchKey=void 0,Z(Q)})}}}if(t.K.aesKey=A,I=function(K,z,$,Q){return p1(e,K,z,$,Q)},t.K.Ed)var M=function A2(e,t,n){var i=Number(qr(e,Ma,"presentationTimeOffset"))||0,r=qr(e,Ma,"timescale"),o=1;r&&(o=Hr(r)||1);var s=i/o||0,u=B0(e,Ma,n);!function E2(e,t){if(H0(e,t),!V0(e))throw new k(2,4,4002)}(e,u);var a=to(e);return{endTime:-1,timeline:-1,Rc:function(){var l=Ca(a,Ma,"RepresentationIndex"),c=a.K.fb();return l&&(l=mt(l.attributes.sourceURL))&&(c=Kt(c,[l],a.Nb())),l=V0(a),F0(a,t,u,c,l.start,l.end,s)},timescale:o}}(t,I,A);else if(t.K.xc)M=function I2(e,t,n){var i=B0(e,K0,n),r=function C2(e){var t=function k2(e){return[e.K.xc,e.qa.xc,e.sa.xc].filter(C).map(function(t){return ft(t,"SegmentURL")}).reduce(function(t,n){return t.length>0?t:n}).map(function(t){return t.attributes.indexRange&&!e.Lg&&(e.Lg=!0),{Ak:mt(t.attributes.media),start:(t=Ae(t,"mediaRange",nu,{start:0,end:null})).start,end:t.end}})}(e),n=(e=O0(e,K0)).le;0==n&&(n=1);var i=0;return e.hb?i=e.hb*(n-1):e.timeline&&e.timeline.length>0&&(i=e.timeline[0].start),{hb:e.hb,startTime:i,le:n,Kb:e.Kb,timescale:e.timescale,timeline:e.timeline,vd:t}}(e);if(!r.hb&&!r.timeline&&r.vd.length>1)throw new k(2,4,4002);if(!r.hb&&!e.na.duration&&!r.timeline&&1==r.vd.length)throw new k(2,4,4002);if(r.timeline&&0==r.timeline.length)throw new k(2,4,4002);var o=null,s=null;e.sa.id&&e.K.id&&(s=t.get(e.sa.id+","+e.K.id))&&(o=s.segmentIndex);var u=function M2(e,t,n,i,r,o,s,u,a,l){var c=i.vd.length;i.timeline&&i.timeline.length!=i.vd.length&&(c=Math.min(i.timeline.length,i.vd.length));for(var d=e-i.Kb,f=t?e+t:1/0,g=[],v=i.startTime,y={},T=0;T<c;y={Of:void 0,Ef:void 0},T++){y.Ef=i.vd[T];var S=v;v=void 0,v=null!=i.hb?S+i.hb:i.timeline?i.timeline[T].end:S+t,y.Of=null,(y=new Ee(e+S,e+v,function(A){return function(){return null==A.Of&&(A.Of=Kt(n(),[A.Ef.Ak],l())),A.Of}}(y),y.Ef.start,y.Ef.end,r,d,e,f,[],"",null,null,Jo,o)).codecs=u,y.mimeType=s,y.bandwidth=a,g.push(y)}return g}(e.na.start,e.na.duration,e.K.fb,r,i,n,e.K.mimeType,e.K.codecs,e.bandwidth,e.Nb);return t=!o,o?o.be(u,e.presentationTimeline.Ib()):o=new ut(u),e.presentationTimeline.ee(u),e.Fb&&e.na.df||o.nd(e.na.start,e.na.duration?e.na.start+e.na.duration:1/0,t),s&&(s.segmentIndex=o),{endTime:-1,timeline:-1,Rc:function(){return o&&0!=o.getNumReferences()||o.mf(u),Promise.resolve(o)},timescale:r.timescale}}(t,e.o,A);else if(t.K.Kc)M=W0(t,I,e.o,!!e.h,e.g.dash.initialSegmentLimit,e.ya,A,d,!1,e.C);else{var D=t.na.duration||0,R=t.K.fb,j=t.K.mimeType,U=t.K.codecs;M={endTime:-1,timeline:-1,Rc:function(){var K=Kc(g,D,R());return K.Gb(function(z){z.mimeType=j,z.codecs=U}),Promise.resolve(K)},timescale:1}}}catch(K){if((l||S)&&4002==K.code)return null;throw K}if(d=function c2(e,t,n,i,r){var o=N0(e,t,i,r);if(n.Yh)e=1==n.drmInfos.length&&!n.drmInfos[0].keySystem,t=0==o.drmInfos.length,(0==n.drmInfos.length||e&&!t)&&(n.drmInfos=o.drmInfos),n.Yh=!1;else if(o.drmInfos.length>0&&(n.drmInfos=n.drmInfos.filter(function(s){return o.drmInfos.some(function(u){return u.keySystem==s.keySystem})}),0==n.drmInfos.length))throw new k(2,4,4008);return o.Th||n.Th}(e.xa,T,n,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI),d=new Set(d?[d]:[]),T=!1,v.some(function(K){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==K.attributes.schemeIdUri&&"JOC"==K.attributes.value})&&(T=!0),v=!1,l&&(v=u.includes("forced_subtitle")||u.includes("forced-subtitle")),S&&((y=y.find(function(K){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(K.attributes.schemeIdUri)}))&&(B=y.attributes.value),!B))return null;l=t.K.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"))&&(H="PQ"),y=t.K.id?t.sa.id+","+t.K.id:"",e.H.length&&f&&e.u.set(t.sa.id+","+f,function rI(e){function t(n){return n?((n=to(n)).Ed=null,n.xc=null,n.Kc=Nu(n.Kc),n.Af=null,n):null}return(e=to(e)).sa=t(e.sa),e.qa=t(e.qa),e.K=t(e.K),e.na&&(e.na=to(e.na),e.na.node=null),e}(t)),t.K.Af&&function iI(e,t,n,i){if(!e.ma.has(t)){e.ma.add(t);var s,r=Ae(t,"presentationTime",On)||0,o=Yt(t,"UTCTiming");(s=o&&o.attributes.schemeIdUri)&&(s=!("urn:mpeg:dash:utc:http-ntp:2014"===(o=o.attributes.schemeIdUri)||"urn:mpeg:dash:utc:ntp:2014"===o||"urn:mpeg:dash:utc:sntp:2014"===o)
1),t=s?1e3*(Ae(t,"wallClockTime",no)||0):Jm(t=Ae(t,"wallClockTime",On)||0),r=(n=new Date(t-r/n.timescale*1e3)).getTime()/1e3,isNaN(r)||(i.o||i.ph(r),i=new re("prft",i=(new Map).set("detail",{wallClockTime:t,programStartDate:n})),e.j.onEvent(i))}}(e,t.K.Af,M,t.presentationTimeline),-1!=M.endTime&&null!=t.sa.id&&null!=t.K.id&&((f=e.C.get(t.sa.id))?(f.endTime=M.endTime,f.dh.includes(t.K.id)||f.dh.push(t.K.id),e.C.set(t.sa.id,f)):e.C.set(t.sa.id,{endTime:M.endTime,timeline:M.timeline,dh:[t.K.id]}));var G=y&&e.o.has(y)?e.o.get(y):{id:e.Fa++,originalId:t.K.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){G.segmentIndex&&(G.segmentIndex.release(),G.segmentIndex=null)},segmentIndex:null,mimeType:t.K.mimeType,codecs:l,frameRate:t.K.frameRate,pixelAspectRatio:t.K.pixelAspectRatio,bandwidth:t.bandwidth,width:t.K.width,height:t.K.height,kind:i,encrypted:n.drmInfos.length>0,drmInfos:n.drmInfos,keyIds:d,language:r,originalLanguage:t.qa.language,label:o,type:t.qa.contentType,primary:s,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:t.K.emsgSchemeIdUris,roles:u,forced:v,channelsCount:t.K.tf,audioSamplingRate:t.K.audioSamplingRate,spatialAudio:T,closedCaptions:a,hdr:H,colorGamut:void 0,videoLayout:void 0,tilesLayout:B,accessibilityPurpose:c,external:!1,fastSwitching:!1,fullMimeTypes:new Set([dn(t.K.mimeType,t.K.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};return G.createSegmentIndex=function(){var K;return L(function(z){if(1==z.g)return G.segmentIndex?z.A(0):(K=G,x(z,M.Rc(),3));K.segmentIndex=z.h,Z(z)})},y&&t.Fb&&!e.o.has(y)&&(e.D.has(t=t.sa.id||"")||e.D.set(t,[]),e.o.set(y,G),e.D.get(t).push(y)),G}(e,t,D,l,R,j,u,a,_,B,P,I);return H&&(H.hdr=H.hdr||S,H.colorGamut=H.colorGamut||A,H.fastSwitching=v,B=B.attributes.dependencyId)?(H.baseOriginalId=B,U.set(B,H),null):H}).filter(function(B){return!!B}),0==d.length&&0==U.size){if(n="image"==t.qa.contentType,e.g.dash.ignoreEmptyAdaptationSet||c||n)return null;throw new k(2,4,4003)}if(!t.qa.contentType||"application"==t.qa.contentType)for(t.qa.contentType=f1(d[0].mimeType,d[0].codecs),f=(c=m(d)).next();!f.done;f=c.next())f.value.type=t.qa.contentType;for(c=t.qa.id||"__fake__"+e.Fa++,g=(f=m(d)).next();!g.done;g=f.next()){for(g=g.value,T=(y=m(D.drmInfos)).next();!T.done;T=y.next())(T=T.value).keyIds=T.keyIds&&g.keyIds?new Set([].concat(ee(T.keyIds),ee(g.keyIds))):T.keyIds||g.keyIds;g.groupId=c}return i=i.map(function(B){return B.attributes.supplementalId||B.attributes.id}).filter(C),{id:c,contentType:t.qa.contentType,language:R,Fm:u,streams:d,drmInfos:D.drmInfos,Eh:n,Pk:i,vj:U}}function Wl(e,t){if((t=vn(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&Ae(t,"useMPDUrlQuery",ru,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return"$querypart$"==n?e.ea:n.split("&").map(function(i){if("$querypart$"==i)return e.ea;var r=/\$query:(.*?)\$/g.exec(i);if(r&&2==r.length){r=r[1];var o=new tt(e.ea).get(r);if(o.length)return r+"="+o[0]}return i}).join("&")}}return null}function d1(e){var t,n;return L(function(i){switch(i.g){case 1:return t=0,fe(i,2),x(i,Pf(e),4);case 4:t=i.h,Le(i,3);break;case 2:if(n=Te(i),e.j){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.j.onError(n),i.return();n.severity=1,e.j.onError(n)}case 3:if(!e.j)return i.return();e.j.onManifestUpdated(),bf(e,t),Z(i)}})}function bf(e,t){if(!(e.L<0)){var n=e.L;e.g.updatePeriod>=0&&(n=e.g.updatePeriod),e.M.ka(Math.max(n-t,pr(e.Ba)))}}function Rf(e,t,n,i){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,tf:null,audioSamplingRate:null,rb:0,Ff:1,encrypted:!1},i=i||n.fb;var u,r=t.attributes.id,o=t.attributes.supplementalId,s=ft(t,"BaseURL"),a=!1;if(e.i)for(var l=m(s),c=l.next();!c.done;c=l.next()){var d=c.value;c=d.attributes.serviceLocation,d=Si(d),c&&d&&(_a(e.i,r,c,d),a=!0)}a&&e.i||(u=s.map(Si));var f=e.i;e=t.attributes.contentType||n.contentType,l=t.attributes.mimeType||n.mimeType,c=yp([t.attributes.codecs||n.c
1odecs]).join(","),d=Ae(t,"frameRate",lc)||n.frameRate;var g=t.attributes.sar||n.pixelAspectRatio,v=function oI(e,t){t=t.slice();for(var n=(e=m(e)).next();!n.done;n=e.next())t.includes(n=n.value.attributes.schemeIdUri)||t.push(n);return t}(ft(t,"InbandEventStream"),n.emsgSchemeIdUris),y=ft(t,"AudioChannelConfiguration");y=function sI(e){for(var t=(e=m(e)).next();!t.done;t=e.next()){var n=(t=t.value).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)))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)))continue;for(var i=0,r=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;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)))continue;for(r=i=0;r<n.length;r++)t&1<<r&&(i+=n[r]);if(i)return i;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}(y)||n.tf;var T=Ae(t,"audioSamplingRate",On)||n.audioSamplingRate;e||(e=f1(l,c));var S=Yt(t,"SegmentBase"),A=Yt(t,"SegmentTemplate"),I=S&&Ae(S,"availabilityTimeOffset",iu)||0,_=A&&Ae(A,"availabilityTimeOffset",iu)||0,P=s&&s.length&&Ae(s[0],"availabilityTimeOffset",iu)||0;I=n.rb+P+I+_,_=null,(P=Yt(t,"SegmentSequenceProperties"))&&(P=Ae(P,"cadence",Hr))&&(_=P),P=t.attributes.label;var b=ft(t,"Label");return b&&b.length&&fn(b=b[0])&&(P=fn(b)),{fb:function(){return Kt(i(),s.length?f&&a?Vl(f,r):u||[]:[])},Ed:S||n.Ed,xc:Yt(t,"SegmentList")||n.xc,Kc:A||n.Kc,Af:Yt(t,"ProducerReferenceTime")||n.Af,width:Ae(t,"width",On)||n.width,height:Ae(t,"height",On)||n.height,contentType:e,mimeType:l,codecs:c,frameRate:d,pixelAspectRatio:g,emsgSchemeIdUris:v,id:o||r,originalId:r,language:t.attributes.lang,tf:y,audioSamplingRate:T,rb:I,bf:null,Ff:_||n.Ff,label:P||null,encrypted:!1}}function h1(e,t,n,i){var r,o,s,u,a,l,c;return L(function(d){if(1==d.g)return r=[mt(n)],o=Kt(t(),r),(s=_n(o,e.g.retryParameters)).method=i,u=e.j.networkingEngine.request(4,s,{isPreload:e.oa()}),gu(e.R,u),x(d,u.promise,2);if(a=d.h,"HEAD"==i){if(!a.headers||!a.headers.date)return d.return(0);l=a.headers.date}else l=We(a.data);return c=Date.parse(l),isNaN(c)?d.return(0):d.return(c-Date.now())})}function lI(e,t,n,i,r){for(var o=i.attributes.schemeIdUri||"",s=i.attributes.value||"",u=Ae(i,"timescale",On)||1,a=Ae(i,"presentationTimeOffset",On)||0,l=(i=m(ft(i,"Event"))).next();!l.done;l=i.next()){var c=Ae(l=l.value,"presentationTime",On)||0,d=Ae(l,"duration",On)||0;d=(c=Math.max((c-a)/u+t,t))+d/u,null!=n&&(c=Math.min(c,t+n),d=Math.min(d,t+n)),d<r||(l={schemeIdUri:o,value:s,startTime:c,endTime:d,id:l.attributes.id||"",timescale:u,eventElement:Wa(l),eventNode:Nu(l)},e.j.onTimelineRegionAdded(l))}}function p1(e,t,n,i,r){var o,s,u;return L(function(l){return 1==l.g?(o=Xr,s=r?0:1,u=vl(t,n,i,e.g.retryParameters),x(l,Nf(e,u,o,{type:s}),2)):l.return(l.h.data)})}function f1(e,t){return uo(t=dn(e,t))?Pe:e.split("/")[0]}function Nf(e,t,n,i){return i||(i={}),i.isPreload=e.oa(),t=e.j.networkingEngine.request(n,t,i),gu(e.R,t),t.promise}function zd(){}(h=Wd.prototype).configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&e.updatePeriod>=0;this.g=e,t&&(this.oa=t),n&&this.h&&this.h.presentationTimeline.W()&&this.M.Lb(),this.i&&this.i.configure(this.g),this.m&&(this.m.Oi(this.g.dash.multiTypeVariantsAllowed&&Hi()),this.m.Si(this.g.dash.useStreamOnceInPeriodFlattening))},h.start=function(e,t){var i,n=this;return L(function(r){if(1==r.g)return n.wa=t.isLowLatencyMode(),n.B=[e],n.j=t,x(r,Pf(n),2);if(i=r.h,n.j&&bf(n,i),!n.j)throw new k(2,7,7001);return r.return(n.h)})},h.stop=function(){for(var e=m(this.o.values()),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();return this.m&&this.m.release(),this.g=this.j=null,this.B=[],this.h=null,this.o.clear(),this.D.clear(),this.u.clear(),this.C.clear(),this.l={pf:"",type:"",profiles:[],rc:null,rb:0,fb:null,ge:0},this.m=null,null!=this.M&&(this.M.stop(),this.M=null),this.i&&this.i.destroy(),this.I&&(this.I.release(),this.I=null),this.ma.clear(),this.xa.release(),this.R.destroy()},h.update=function(){var t,e=this;return L(function(n){return 1==n.g?(fe(n,2),x(n,Pf(e),4)):2!=n.g?Le(n,0):(t=Te(n),e.j&&t?(e.j.onError(t),void Z(n)):n.return())})},h.onExpirationUpdated=function(){},h.onInitialVariantChosen=function(e){if(this.h&&this.h.presentationTimeline.W()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.h.presentationTimeline.Ec();var n=t.segmentIndex.find(e);
1null!=n&&(t=t.segmentIndex.get(n))&&(this.L=t.endTime-e,bf(this,0))}}},h.banLocation=function(e){this.i&&this.i.banLocation(e)},h.setMediaElement=function(e){this.J=e},ue("shaka.dash.DashParser",Wd),mu("application/dash+xml",function(){return new Wd}),mu("video/vnd.mpeg.dash.mpd",function(){return new Wd}),ue("shaka.dependencies",zd),zd.has=function(e){return Of.has(e)},zd.add=function(e,t){if(!m1[e])throw Error(e+" is not supported");e==g1?be("mux.js","mux.js is no longer used in Shaka Player."):Of.set(e,function(){return t})};var g1="muxjs",m1={Gm:g1,ISOBoxer:"ISOBoxer"};zd.Allowed=m1;var Of=new Map([["ISOBoxer",function(){return X.ISOBoxer}]]);function It(){this.j=new kt(function(){return["Oculus","Quest"].some(function(e){return navigator.userAgent.includes(e.toLowerCase())})?"VR":navigator.userAgent.match(/Smart( ?|_)TV/i)||navigator.userAgent.match(/Android ?TV/i)?"TV":navigator.userAgentData?navigator.userAgentData.mobile?"MOBILE":"DESKTOP":/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)?"MOBILE":navigator.userAgentData&&navigator.userAgentData.platform?"android"==navigator.userAgentData.platform.toLowerCase()?"MOBILE":"DESKTOP":navigator.userAgent.includes("Android")?"MOBILE":"DESKTOP"}),this.l=new kt(function(){return navigator.vendor.includes("Apple")&&(navigator.userAgent.includes("Version/")||navigator.userAgent.includes("OS/"))?"WEBKIT":navigator.userAgent.includes("Edge/")?"EDGE":navigator.userAgent.includes("Chrome/")?"CHROMIUM":navigator.userAgent.includes("Firefox/")?"GECKO":"UNKNOWN"})}function _o(){var e=X.ManagedMediaSource||X.MediaSource;return!(!e||!e.isTypeSupported)}function v1(e){return Ne(),void 0!==X.matchMedia&&X.matchMedia("(color-gamut: p3)").matches?e?"HLG":"PQ":"SDR"}function jf(){It.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"})}function Uf(){if(!y1())throw Error("Not a Chromecast device!");It.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()).includes("android")?T1:e.includes("fuchsia")?w1:Bf})}function y1(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}(h=It.prototype).ec=function(){return!!navigator.mediaCapabilities},h.Ma=function(){return this.j.value()},h.Ca=function(){return this.l.value()},h.Bd=function(){return!1},h.Gi=function(){return!1},h.cf=function(){return!1},h.Hi=function(){return!1},h.je=function(){return!1},h.dd=function(){return!0},h.ed=function(){return!0},h.me=function(){return!0},h.Mi=function(){return 0},h.kc=function(){return Promise.resolve({width:1/0,height:1/0})},h.Vi=function(){return!1},h.sh=function(){return!1},h.Va=function(e){var t=this.Ma();return("TV"===t||"CONSOLE"===t||"CAST"===t)&&(e.ads.customPlayheadTracker=!0,e.ads.skipPlayDetection=!0,e.ads.supportsMultipleMediaElements=!1),e},h.yh=function(){return!!X.indexedDB},h.Ei=function(){return[]},h.bj=function(){return!1},h.si=function(){return!1},h.hh=function(){return!1},h.Kf=function(){return!0},h.ti=function(){return!1},h.aj=function(){return!0},h.cd=function(){return!1},h.Sg=function(e){return"com.apple.fps"===e},h.toString=function(){return"Device: "+this.Pb()+" v"+this.za()+"; Type: "+this.Ma()},wt(jf,It),(h=jf.prototype).za=function(){return this.g.value()},h.Pb=function(){return"Apple Browser"},h.Ma=function(){return this.h.value()},h.Ca=function(){return"WEBKIT"},h.ec=function(){return!1},h.Bd=function(e,t){return"audio"===t},h.cf=function(){return!0},h.Hi=function(e){return"audio"===e},h.Va=function(e){return It.prototype.Va.call(this,e),e.abr.minTimeToSwitch=.5,e},h.bj=function(){return!0},(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&"macos"==navigator.userAgentData.platform.toLowerCase()||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(Fn=function(){return new jf}),wt(Uf,It),(h=Uf.prototype).za=function(){return this.h.value()},h.Pb=function(){return"Chromecast with "+this.g.value()},h.Ma=function(){return"CAST"},h.Ca=function(){return"CHROMIUM"},h.ec=function(){return It.prototype.ec.call(this)&&this.g.value()!==Bf},h.ed=function(){return this.g.value()!==Bf},h.Mi=function(){switch(this.g.value()){case T1:return 0;case w1:return 3;default:return 1}},h.kc=function(){var e,t,n,i;return L(function(o){switch(o.g){case 1:if(e=X.cast&&cast.__platform__&&cast.__platform__.canDisplayType,t={width:1280,height:720},fe(o,2),!(n=e)){o.A(4);break}return x(o,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:n=o.h;case 4:if(n){t.width=3840,t.height=2160,o.A(6);break}if(!(i=e)){o.A(7);break}return x(o,cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:i=o.h;case 7:i&&(t.width=1920,t.height=1080);case 6:Le(o,3);break;case 2:Rn("Failed to check canDisplayType:",Te(o));case 3:return o.return(t)}})},h.Va=function(e){return It.prototype.Va.call(this,e),e.streaming.stallSkip=0,e},h.yh=function(){return!1},h.cd=function(){return!0};var T1="Android",w1="Fuchsia",Bf="Linux";function Ff(){It.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?"windows"==navigator.userAgentData.platform.toLowerCase():!!navigator.platform&&navigator.platform.toLowerCase().includes("win32")}),this.u=new kt(function(){return!navigator.userAgent.match(/Edge?\//)||!e.h.value()}),this.o=new kt(function(){return navigator.userAgent.includes("sony.hbbtv.tv")}),this.m=new kt(function(){return navigator.userAgentData&&navigator.userAgentData.platform?"android"==navigator.userAgentData.platform.toLowerCase():!!navigator.userAgent.includes("Android")})}function Vf(){It.apply(this,arguments)}function Hf(){It.call(this),this.g=new kt(function(){var e=navigator.userAgent.match(/PlayStation (\d+)/);return e?parseInt(e[1],10):null})}function Gf(){It.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}function La(){It.apply(this,arguments)}function Kf(){It.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})}function Wf(){It.call(this),this.g=function dI(){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}}()}function Xf(){It.call(this),this.g=navigator.userAgent.includes("Edge/");var e=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=e?parseInt(e[1],10):null}function x1(){var e=null;try{e=typeof Windows<"u"?Windows:chrome.webview.hostObjects.sync.Windows}catch{}return e}function S1(e,t,n){this.type=e,this.ba=t,this.segments=n||null}function Yd(e,t,n,i){this.id=e,this.name=t,this.attributes=n,this.value=void 0===i?null:i}function A1(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 Pa(e,t){return(e=e.attributes.filter(function(n){return n.name==t})).length?e[0]:null}function ye(e,t,n){return(e=Pa(e,t))?e.value:n||null}function Ct(e,t){if(!(e=Pa(e,t)))throw new k(2,4,4023,t);return e.value}function E1(e,t,n){n=void 0===n?[]:n,this.ba=t,this.g=e,this.tc=n}function qd(e,t){this.name=e,this.value=t}function Cr(e,t){return e.filter(function(n){return n.name==t})}function I1(e,t){return e.filter(function(n){return Ct(n,"TYPE")==t})}function Hn(e,t){for(var n=(e=m(e)).next();!n.done;n=e.next())if((n=n.value).name===t)return n;return null}function ba(e,t,n){return n=void 0===n?0:n,(e=Hn(e,t))?Number(e.value):n}function Ws(e,t,n){return t?C1(e,[t],n):[]}function C1(e,t,n){if(!t.length)return[];var i=t;return n&&n.size&&(i=t.map(function(r){return M1(r,n)})),Kt(e,i)}function M1(e,t){if(!t||!t.size)return e;var n=(e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}")).match(/{\$\w*}/g);if(n)for(var i=(n=m(n)).next();!i.done;i=n.next()){var r=(i=i.value).slice(2,i.length-1),o=t.get(r);if(!o)throw new k(2,4,4039,r);e=e.replace(i,o)}return e}function hI(){this.g=0}function zf(e,t){var n=(t=(t=We(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new k(2,4,4015);t=0;for(var i=!0,r=m(n),o=r.next();!o.done;o=r.next())if(/^#(?!EXT)/m.test(o=o.value)||i)i=!1;else{if(o=Yf(e,o),--e.g,k1.includes(o.name)){t=1;break}"EXT-X-STREAM-INF"==o.name&&(i=!0)}for(r=[],i=!0,o=0;o<n.length;o++){var s=n[o],u=n[o+1];if(/^#(?!EXT)/m.test(s)||i)i=!1;else{if(s=Yf(e,s),pI.includes(s.name)){if(1!=t)throw new k(2,4,4017);s=n.splice(o,n.length-o),n=[],i=[],o=[],u=null;for(var a=(s=m(s)).next();!a.done;a=s.next())/^(#EXT)/.test(a=a.value)?(a=Yf(e,a),k1.includes(a.name)?r.push(a):"EXT-X-MAP"==a.name?u=a:"EXT-X-PART"==a.name?o.push(a):"EXT-X-PRELOAD-HINT"
1==a.name?"PART"==ye(a,"TYPE")?o.push(a):"MAP"==ye(a,"TYPE")&&(a.name="EXT-X-MAP",u=a):i.push(a)):/^#(?!EXT)/m.test(a)||(a=a.trim(),u&&i.push(u),n.push(new E1(a,i,o)),i=[],o=[]);return o.length&&(u&&i.push(u),n.push(new E1("",i,o))),new S1(t,r,n)}r.push(s),"EXT-X-STREAM-INF"==s.name&&(s.attributes.push(new qd("URI",u)),i=!0)}}return new S1(t,r)}function Yf(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new k(2,4,4016,t);t=n[1];var r,i=n[2];if(n=[],i){var o;(o=Io(i=new Es(i),/^([^,=]+)(?:,|$)/g))&&(r=o[1]);for(var s=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;o=Io(i,s);)n.push(new qd(o[1],o[2]||o[3])),Eo(i)}return new Yd(e,t,n,r)}y1()&&(Fn=function(){return new Uf}),wt(Ff,It),(h=Ff.prototype).za=function(){return this.i.value()},h.Pb=function(){return this.g.value()},h.Bd=function(e){return!!Bh(e)&&"Edge"===this.g.value()&&this.h.value()},h.Gi=function(){return"Edge"===this.g.value()&&this.h.value()},h.cf=function(){return"Edge"===this.g.value()&&this.h.value()},h.ed=function(){return this.u.value()},h.Va=function(e){if(It.prototype.Va.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},h.hh=function(){return"Edge"===this.g.value()||this.o.value()},h.cd=function(){if("GECKO"===this.Ca()){var e=this.za();return null!==e?e>=100:It.prototype.cd.call(this)}return It.prototype.cd.call(this)},h.Sg=function(e){return"GECKO"===this.Ca()?e.startsWith("com.microsoft.playready.recommendation"):It.prototype.Sg.call(this,e)},nr=function(){return new Ff},wt(Vf,It),(h=Vf.prototype).za=function(){return null},h.Pb=function(){return"Hisense"},h.Ma=function(){return"TV"},h.ec=function(){return!1},h.kc=function(){var e={width:1920,height:1080},t=null;if(X.Hisense_Get4KSupportState)try{t=X.Hisense_Get4KSupportState()}catch{}return null==t&&(t=navigator.userAgent.includes("UHD")),t&&(e.width=3840,e.height=2160),Promise.resolve(e)},h.Va=function(e){return It.prototype.Va.call(this,e),e.streaming.stallSkip=0,e},(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))&&(Fn=function(){return new Vf}),wt(Hf,It),(h=Hf.prototype).Pb=function(){return"PlayStation"},h.Ma=function(){return"CONSOLE"},h.Ca=function(){return"WEBKIT"},h.za=function(){return this.g.value()},h.ec=function(){return!1},h.dd=function(){return!1},h.ed=function(){return!1},h.sh=function(){return 4===this.za()},h.kc=function(){var e,t;return L(function(o){switch(o.g){case 1:return e={width:1920,height:1080},t=!1,fe(o,2),x(o,X.msdk.device.getDisplayInfo(),4);case 4:t="4K"===o.h.resolution,Le(o,3);break;case 2:return Te(o),fe(o,5),x(o,X.msdk.device.getDisplayInfoImmediate(),7);case 7:t="4K"===o.h.resolution,Le(o,3);break;case 5:Be("PlayStation: Failed to get the display info:",Te(o));case 3:return t&&(e.width=3840,e.height=2160),o.return(e)}})},h.Va=function(e){return It.prototype.Va.call(this,e),4===this.za()&&e.drm.preferredKeySystems.push("com.microsoft.playready"),e.streaming.clearDecodingCache=!0,e},h.hh=function(){return 4===this.za()},h.Kf=function(){return 4!==this.za()},navigator.userAgent.includes("PlayStation")&&(Fn=function(){return new Hf}),wt(Gf,It),(h=Gf.prototype).za=function(){return this.g},h.Pb=function(){return"Tizen"},h.Ca=function(){return"CHROMIUM"},h.Ma=function(){return"TV"},h.Bd=function(){return!0},h.je=function(){return 3===this.za()},h.ec=function(){return!1},h.dd=function(){var e=this.za();return null!==e?e>=4:It.prototype.dd.call(this)},h.ed=function(){return!1},h.me=function(){return this.g&&this.h?5===this.g?this.h>=5:this.g>5:It.prototype.me.call(this)},h.kc=function(){var e=X.devicePixelRatio;e={width:X.screen.width*e>1920?3840:1920,height:X.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{Be("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},h.Va=function(e){return It.prototype.Va.call(this,e),e.drm.ignoreDuplicateInitData=2!==this.za(),3===this.za()&&(e.streaming.crossBoundaryStrategy="reset_to_encrypted"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e.streaming.gapPadding=2,e},h.Ei=function(){var e=[];return null!==this.g&&this.g<5&&e.push("opus"),e},h.si=function(){return!0},h.ti=function(){return 3===this.za()},navigator.userAgent.includes("Tizen")&&(Fn=function(){return new Gf}),wt(La,It),La.prototype.za=function(){return null},La.prototype.Pb=function(){return"Vizio"},La.prototype.Ma=function(){return"TV"},La.prototype.ec=function(){return!1},navigator.userAgent.includes("VIZIO SmartCast")&&(Fn=function(){return new L
1a}),wt(Kf,It),(h=Kf.prototype).za=function(){return this.g.value()},h.Pb=function(){return"WebKit STB"},h.Ma=function(){return"TV"},h.Ca=function(){return"WEBKIT"},h.ec=function(){return!1},h.dd=function(){var e=this.g.value();return null===e||e>=15},h.Bd=function(){return this.h.value()},h.kc=function(){return Promise.resolve({width:X.screen.width*X.devicePixelRatio,height:X.screen.height*X.devicePixelRatio})},h.Kf=function(){return!this.i.value()},(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&&"macos"==navigator.userAgentData.platform.toLowerCase()||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))&&(Fn=function(){return new Kf}),wt(Wf,It),(h=Wf.prototype).za=function(){return this.g},h.Pb=function(){return"WebOS"},h.Ma=function(){return"TV"},h.Ca=function(){return"CHROMIUM"},h.ec=function(){return!1},h.dd=function(){var e=this.za();return null!==e?e>3:It.prototype.dd.call(this)},h.ed=function(){var e=this.za();return null!==e?e>6:It.prototype.ed.call(this)},h.me=function(){var e=this.za();return null!==e?e>3:It.prototype.me.call(this)},h.kc=function(){var e={width:1920,height:1080};try{var t=JSON.parse(X.PalmSystem.deviceInfo);e.width=Math.max(1920,t.screenWidth),e.height=Math.max(1080,t.screenHeight)}catch{Be("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},h.Va=function(e){return It.prototype.Va.call(this,e),3===this.za()&&(e.streaming.crossBoundaryStrategy="reset"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e},h.aj=function(){return!1},h.cd=function(){var e=this.za();return null!==e?e>=6:It.prototype.cd.call(this)},navigator.userAgent.includes("Web0S")&&(Fn=function(){return new Wf}),wt(Xf,It),(h=Xf.prototype).za=function(){return this.h},h.Pb=function(){return"Xbox"},h.Ma=function(){return"CONSOLE"},h.Ca=function(){return this.g?"EDGE":"CHROMIUM"},h.Bd=function(){return!0},h.cf=function(){return!0},h.Vi=function(){return this.g},h.kc=function(){var e={width:1920,height:1080},t=x1();if(t)try{var n=new t.Media.Protection.ProtectionCapabilities,i=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===i.maybe);t===i.probably&&(e.width=3840,e.height=2160)}catch{Be("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},h.Va=function(e){return It.prototype.Va.call(this,e),e.drm.parseInbandPsshEnabled=this.g,e.drm.preferredKeySystems.push("com.microsoft.playready"),this.g&&(e.streaming.gapPadding=.01),e},h.yh=function(){return!1},(navigator.userAgent.includes("Xbox One")||null!==x1())&&(Fn=function(){return new Xf}),Yd.prototype.toString=function(e){var n="#"+this.name,i=this.attributes?this.attributes.filter(function(r){return!e||!e.has(r.name)}).map(function t(r){return r.name+"="+(isNaN(Number(r.value))?'"'+r.value+'"':r.value)}):[];return this.value&&i.unshift(this.value),i.length>0&&(n+=":"+i.join(",")),n};var k1="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(" "),pI="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 _1(){}function D1(e,t){try{var n=$d(e);return qu({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(i){return Rs(i)}}function $d(e){var t=e.split(":");if(t.length<2||"data"!=t[0])throw new k(2,1,1004,e);if((t=t.slice(1).join(":").split(",")).length<2)throw new k(2,1,1004,e);var n=t[0];e=X.decodeURIComponent(t.slice(1).join(",")),t=n.split(";"),n=t[0];var i=!1;return t.length>
11&&"base64"==t[t.length-1]&&(i=!0,t.pop()),{data:i?sn(e):zt(e),contentType:n}}function Jd(){var e=this;this.g=this.h=null,this.G=1,this.B=new Map,this.M=new Map,this.C=new Map,this.C.set("video",new Map),this.C.set("audio",new Map),this.C.set(Pe,new Map),this.C.set("image",new Map),this.cc=(new Map).set("com.apple.streamingkeydelivery",function(t,n,i){return function VI(e,t,n,i){var r,s,u,a,l;return L(function(c){if(1==c.g){if("video/mp2t"==n)throw new k(2,4,4040);if("apple"===X.shakaMediaKeysPolyfill)throw new k(2,4,4041);if(r=Ct(t,"METHOD"),!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(r))return c.return(null);s="cenc","SAMPLE-AES"==r&&(s="cbcs"),u=Ct(t,"URI"),a=ir("com.apple.fps",s,[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}],u);var d=new O(u).Eb.replace(/-/g,"").toLowerCase();return(l=32===d.length&&/^[0-9a-f]+$/.test(d)?d:null)||!i?c.A(2):x(c,Q1(e,i),3)}return 2!=c.g&&(l=c.h),l&&a.keyIds.add(l),c.return(a)})}(e,t,n,i)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(t){var n=Ct(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";"SAMPLE-AES"==n&&(i="cbcs");var r=Ct(t,"URI");n=$d(r.split("?")[0]),r=r.split("?")[0],e.I.has(r)||(n=oe(n.data),e.I.set(r,n)),i=ir("com.widevine.alpha",i,[{initDataType:"cenc",initData:e.I.get(r)}]),(t=ye(t,"KEYID"))&&i.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(i)}else t=Promise.resolve(null);return t}).set("com.microsoft.playready",function(t){var n=Ct(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";"SAMPLE-AES"==n&&(i="cbcs"),i=ir("com.microsoft.playready",i,[{initDataType:"cenc",initData:n=kc(t=oe((t=$d((t=Ct(t,"URI")).split("?")[0])).data),n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),new Set,0)}]),(t=mr(["<PLAYREADY>",Vn(t),"</PLAYREADY>"].join("\n")))&&(i.licenseServerUri=Bd(t)),i=Promise.resolve(i)}else i=Promise.resolve(null);return i}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(t){var n=Ct(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var i="cenc";"SAMPLE-AES"==n&&(i="cbcs");var r=Ct(t,"URI");n=$d(r.split("?")[0]),r=r.split("?")[0],e.I.has(r)||(n=oe(n.data),e.I.set(r,n)),i=ir("com.huawei.wiseplay",i,[{initDataType:"cenc",initData:e.I.get(r)}]),(t=ye(t,"KEYID"))&&i.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(i)}else t=Promise.resolve(null);return t}),this.cb=new Set,this.i=new Map,this.l=null,this.H="",this.Qa=new hI,this.N=-1,this.ma=1/0,this.ia=this.wc=this.bb=!1,this.D=new E(function(){e.X&&!e.g.continueLoadingWhenPaused&&(e.V.La(e.X,"timeupdate"),e.X.paused)?e.V.Aa(e.X,"timeupdate",function(){return J1(e)}):J1(e)}),this.Fa=nh,this.m=null,this.ab=0,this.o=1/0,this.$a=this.Pa=this.T=0,this.ea=new $u,this.J=new Map,this.L=new Map,this.Ba=new Map,this.wa=new Map,this.O=new Map,this.xa=new Map,this.ya=new Map,this.vc=this.oa=!1,this.$b=new Nr(5),this.j=null,this.R=!0,this.V=new et,this.u=this.X=null,this.bc=function(){return!1},this.I=new Map}function qf(e,t){return pi(e)?e.C.get(t.type):t.lf}function fI(e,t){var n,i,r,s,u,a,l,c,d,f,g,v,y,T,S,A,I,_,b,M,D,R,j,U,B,H,G,K,z,Q,He,le;return L(function(nt){switch(nt.g){case 1:if(t.stream.isAudioMuxedInVideo)return nt.return();for(n=[],i=m(t.P()),r=i.next();!r.done;r=i.next())s=new O(r.value),u=s.g,t.Oe&&(t.Tb>=0&&u.add("_HLS_msn",String(t.Tb)),t.Ub>=0&&u.add("_HLS_part",String(t.Ub))),t.Pe&&u.add("_HLS_skip","YES"),xt(u)&&ge(s,ie(u.toString())),n.push(s.toString());return fe(nt,2),x(nt,ng(e,n,!0).promise,4);case 4:a=nt.h,Le(nt,3);break;case 2:throw l=Te(nt),e.h&&e.h.disableStream(t.stream),l;case 3:if(!t.stream.segmentIndex)return nt.return();if(1!=(c=zf(e.Qa,a.data)).type)throw new k(2,4,4017);return(d=a.uri)==a.originalUri||t.P().includes(d)||t.Bf.push(d),f=Cr(c.ba,"EXT-X-DEFINE"),g=Jf(e,f,d),v=t.stream,y=qf(e,t),x(nt,H1(e,c,v.mimeType,t.P,g),5);case 5:for(S=(T=nt.h).keyIds,A=T.drmInfos,I=T.encrypted,_=T.Mh,v.encrypted||!I||_||(v.encrypted=!0),function(Xe,je){return Xe.size===je.size&&[].concat(ee(Xe)).every(function(ze){return je.has(ze)})}(v.keyIds,S)||(v.keyIds=S,v.drmInfos=A,e.h.newDrmInfo(v)),b=Y1(e,c,y,g,t.P,t.type),M=b.segments,(D=b.bandwidth)&&(v.bandwidth=D),R=Xc(v),j=m(M),U=j.next();!U.done;U=j.next())(B=U.value).Z&&(B.Z.ud=R);v.segmentIndex.be(M,e.l.Ib()),M.length&&(H=ba(c.ba,"EXT-X-MEDIA-SEQUENCE",0),K=(G=Hn(c.ba,"EXT-X-SKIP"))?Number(ye(G,"SKIPPED-SEGMENTS")):0,z=F1(H,M),Q=z.Ub,t.Tb=z.Tb+K,t.Ub=Q,He=y.get(H),v.segmentIndex.Xa(He)),(le=fo(v.segmentIndex))&&(t.Wc=le.
1startTime,t.qc=M[M.length-1].endTime),Hn(c.ba,"EXT-X-ENDLIST")&&(t.Vd=!0),Qf(e,c),eg(e,c.ba,v.type,g,t.P),Z(nt)}})}function L1(e,t,n){n=void 0!==n&&n;for(var i=-1==e.N,r=m(t),o=r.next();!o.done;o=r.next()){var s=(o=o.value).stream.segmentIndex,u=qf(e,o);if(s=fo(s))for(var a=(u=m(u)).next();!a.done;a=u.next()){var l=(a=m(a.value)).next().value;if(a.next().value==s.startTime){i&&(e.N=Math.max(e.N,l)),o.qg=l;break}}}if(!(e.N<0))for(i=(t=m(t)).next();!i.done;i=t.next())(Xl(e,(i=i.value).type)||n)&&(r=i.stream.segmentIndex)&&(o=e.N-i.qg)>0&&(r.g.splice(0,o),r=fo(r))&&(i.stream.segmentIndex.offset(r=-r.startTime),P1(e,i,r))}function P1(e,t,n){if(!(Math.abs(n)<.001)){t.Wc+=n,t.qc+=n;for(var i=m(e=qf(e,t)),r=i.next();!r.done;r=i.next()){var o=m(r.value);r=o.next().value,o=o.next().value,e.set(r,o+n)}t.P()}}function b1(e,t,n){var i,r,s,u,a;return L(function(l){switch(l.g){case 1:return t?(i=Xr,r=vl(t.P(),t.Fc(),t.Dc(),e.g.retryParameters),x(l,as(e,r,i,{type:t instanceof Ee?1:0}).promise,2)):l.return({mimeType:null,data:null});case 2:if(u=(s=l.h).data,!t.aesKey){l.A(3);break}return x(l,Tp(u,t.aesKey,n),4);case 4:u=l.h;case 3:return t instanceof Ee?t.ke(u,!0):t.ke(u),(a=s.headers["content-type"])&&(a=a.split(";")[0].toLowerCase()),l.return({mimeType:a,data:u})}})}function $f(e){if(pi(e)){if(e.Fa==ih){for(var t=1/0,n=1/0,i=m(e.i.values()),r=i.next();!r.done;r=i.next())(r=r.value).stream.segmentIndex&&"text"!=r.stream.type&&!r.stream.isAudioMuxedInVideo&&(t=Math.min(t,r.qc),n=Math.min(n,r.Wc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.If(t)}}else e.l.qb(j1(e));if(!e.l.o)for(n=(t=m(e.i.values())).next();!n.done;n=t.next())!(n=n.value).stream.segmentIndex||"audio"!=n.type&&"video"!=n.type||(n=fo(n.stream.segmentIndex))&&n.h&&e.l.ph(n.h);e.l.kf()}function Jf(e,t,n){n=new O(n).g;for(var i=new Map,r=(t=m(t)).next();!r.done;r=t.next()){var o=r.value,s=ye(o,"NAME"),u=ye(o,"VALUE");r=ye(o,"QUERYPARAM"),o=ye(o,"IMPORT"),s&&u&&(i.has(s)||i.set(s,u)),r&&(s=n.get(r)[0])&&!i.has(s)&&i.set(r,s),o&&(r=e.B.get(o))&&i.set(o,r)}return i}function Ra(e){var t=new Set([dn(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.Gb(function(n){n.mimeType&&t.add(dn(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function MI(e,t,n){for(var i={audio:[],video:[]},r=new Map,o=[],s=!1,u=!1,a=m(t),l=a.next();!l.done;l=a.next()){var c=l.value;l=ye(c,"AUDIO");var d=ye(c,"VIDEO"),f=l||d;f&&(o.includes(f)||o.push(f),(c=ye(c,"PATHWAY-ID"))&&r.set(f,c),l?s=!0:d&&(u=!0))}o.length&&n.length&&function EI(e,t,n){for(var i={},r=(t=m(t=t.filter(function(u){var a=ye(u,"URI")||"";return"SUBTITLES"!=(u=ye(u,"TYPE"))&&(""!=a||"AUDIO"==u)}))).next();!r.done;r=t.next()){var o=A1(r=r.value,!e.j);i[o]?i[o].push(r):i[o]=[r]}for(var s in i)N1(e,i[s],n,!1)}(e,n=n.filter(function(v){return o.includes(Ct(v,"GROUP-ID"))}),r),n=(r=o.sort().join(","))&&e.M.has(r)?e.M.get(r):[],s?i.audio.push.apply(i.audio,ee(n)):u&&i.video.push.apply(i.video,ee(n)),u=!1;var g=t.map(function(v){return Ct(v,"URI")});return s=i.audio.find(function(v){return v&&v.P().find(function(y){return g.includes(y)})}),a=Cn("video",n=R1(e,t[0])),(l=Cn("audio",n))&&!a?(s="audio",u=i.audio.length>0&&!i.audio.some(function(v){return v.stream.isAudioMuxedInVideo})):!i.audio.length&&!i.video.length&&l&&a?(s="video",n=[[a,l].join()]):i.audio.length&&s?(s="audio",u=!0):s=i.video.length&&!i.audio.length?"audio":"video",u||(e=function NI(e,t,n,i){for(var r=e.G++,o=[],s=m(t),u=s.next();!u.done;u=s.next()){var a=u.value;u=Ct(a,"URI"),a=ye(a,"PATHWAY-ID"),e.j&&a&&_a(e.j,r,a,u),o.push(u)}if(s=o.sort().join(",")+n.sort().join(","),e.i.has(s))return e.i.get(s);u=o.join(",");e:{if(t=ye(t[0],"CLOSED-CAPTIONS"),"video"==i){if(e.g.disableText){e.R=!1,t=null;break e}if(t){if("NONE"!=t){t=e.J.get(t);break e}e.R=!1}else if(!t&&e.J.size)for(t=(t=m(e.J.keys())).next();!t.done;t=t.next()){t=e.J.get(t.value);break e}}t=null}return i=Zd(e,r,o,n=Vi(i,n),i,null,!1,u,null,t,null,!1,null,!1),e.i.set(s,i),i}(e,t,n,s),r&&(e.stream.groupId=r),"audio"==e.stream.type&&"audio"===s&&i.audio.some(function(v){return v.stream.isAudioMuxedInVideo})&&(e.stream.language=(t=i.audio[0].stream).language,e.stream.channelsCount=t.channelsCount,e.stream.label=t.label,e.stream.audioSamplingRate=t.audioSamplingRate,e.stream.originalId=t.originalId,e.stream.originalLanguage=t.originalLanguage),i[e.stream.type]=[e]),i}function R1(e,t){return t=ye(t,"CODECS")||"",e.ia=t.length>0,e.ia||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(",")),yp(t.split(/\s*,\s*/))}function PI(e,t,n,i,r,o,s,u,a,l,c,d){for(var f=m(n),g=f.next();!g.done;g=f.next())$1(g.value.stream,r,o,s,u,a,null);for(r=e.g.disableVideo,(!n.length||r)&&(n=[null]),r&&(t=t.filter(function(S){return!S.stream.isAudioMuxedInVideo})),r=e.g.disableAudio,(!t.length||r)&&(t=[null]),r=[],o=(t=m(t)).next();!o.done;o=t.next())for(o=o.value,u=(s=m(n)).next();!u.done;u=s.next()){var v=u.value;
1(u=o?o.stream:null)&&(u.drmInfos=l,u.keyIds=c),(a=v?v.stream:null)&&(a.drmInfos=l,a.keyIds=c,e.g.disableIFrames||Wu(a,d)),a&&!u&&(a.bandwidth=i),!a&&u&&(u.bandwidth=i),f=o?o.stream.drmInfos:null,g=v?v.stream.drmInfos:null,v=v?v.P().sort().join(","):"";var y=o?o.P().sort().join(","):"",T=[];u&&u.codecs&&T.push(u.codecs),a&&a.codecs&&T.push(a.codecs),v=[v,y,T.sort()].join("-"),u&&a&&!tm(f,g)||e.cb.has(v)||(u={id:e.G++,language:u?u.language:"und",disabledUntilTime:0,primary:!!u&&u.primary||!!a&&a.primary,audio:u,video:a,bandwidth:i,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},r.push(u),e.cb.add(v))}return r}function N1(e,t,n,i){i=void 0===i||i;for(var r=[],o=[],s=new Map,u=m(t),a=u.next(),l={};!a.done;l={ii:void 0},a=u.next())a=a.value,l.ii=++e.G,l=function(y){return function(){return"shaka://hls-muxed"+y.ii}}(l),l=i?Ct(a,"URI"):ye(a,"URI")||l(),a=Ct(a,"GROUP-ID"),r.push(l),o.push(a),s.set(a,l);if(i=o.sort().join(","),a=t[0],t="",u=function LI(e){return"subtitles"==(e=Ct(e,"TYPE").toLowerCase())&&(e=Pe),e}(a),u==Pe)t=ye(a,"CODECS")||"";else for(l=(o=m(o)).next();!l.done;l=o.next())if(e.L.has(l=l.value)){t=e.L.get(l);break}if(o=r.sort().join(","),e.i.has(o))return e.i.get(o);if(l=e.G++,e.j)for(var c=(s=m(s)).next();!c.done;c=s.next()){var d=m(c.value);c=d.next().value,d=d.next().value,(c=n.get(c))&&_a(e.j,l,c,d)}n=ye(a,"LANGUAGE"),s=ye(a,"NAME"),c="YES"==ye(a,"DEFAULT"),d="audio"==u?function kI(e){return(e=ye(e,"CHANNELS"))?parseInt(e.split("/")[0],10):null}(a):null;var f="audio"==u&&function DI(e){return!!(e=ye(e,"CHANNELS"))&&2==(e=e.split("/")).length&&("JOC"===e[1]||e[1].includes("ATMOS"))}(a),g=ye(a,"CHARACTERISTICS"),v="YES"==ye(a,"FORCED");return a="audio"==u?function _I(e){return(e=ye(e,"SAMPLE-RATE"))?parseInt(e,10):null}(a):null,(r=Zd(e,l,r,t,u,n,c,s,d,null,g,v,a,f)).stream&&(r.stream.groupId=i),e.M.has(i)?e.M.get(i).push(r):e.M.set(i,[r]),e.i.set(o,r),r}function O1(e,t){var n="video",i=Ct(t,"URI"),r=ye(t,"CODECS")||"";if("mjpg"==r&&(n="image"),e.i.has(i))return e.i.get(i);var o=ye(t,"LANGUAGE"),s=ye(t,"NAME"),u=ye(t,"CHARACTERISTICS");return n=Zd(e,e.G++,[i],r,n,o,!1,s,null,null,u,!1,null,!1),o=m((r=ye(t,"RESOLUTION"))?r.split("x"):[null,null]),r=o.next().value,o=o.next().value,n.stream.width=Number(r)||void 0,n.stream.height=Number(o)||void 0,(t=ye(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.i.set(i,n),n}function Zd(e,t,n,i,r,o,s,u,a,l,c,d,f,g){function y(){return e.j&&n.length>1?Vl(e.j,t):S.Bf.concat(C1([e.H],n,e.B))}var T=V1(e,i,r,o,s,u,a,l,c,d,f,g);n.some(function(_){return _.startsWith("shaka://hls-muxed")})&&(T.isAudioMuxedInVideo=!0,T.mimeType="video/mp2t",Ra(T));var I,S={stream:T,type:r,Bf:[],Wc:0,qc:0,lf:new Map,Pe:!1,Oe:!1,Vd:!1,qg:-1,Tb:-1,Ub:-1,P:y},A=null;return T.createSegmentIndex=function(){return A||(T.isAudioMuxedInVideo?(T.segmentIndex=new ut([]),Promise.resolve()):(I=ng(e,S.P(),!0),A=new Promise(function(_){_(function v(_){var P,b,M,R,j,U,B,H,G,K,z,$,Q,He,le,at,ot,nt;return L(function(je){switch(je.g){case 1:return P=cn,fe(je,2),x(je,_.promise,4);case 4:if(b=je.h,_.aborted)return je.return();if((M=b.uri)!=b.originalUri&&(S.P().includes(M)||S.Bf.push(M)),1!=(R=zf(e.Qa,b.data)).type)throw new k(2,4,4017);return j=Cr(R.ba,"EXT-X-DEFINE"),U=Jf(e,j,M),B=!1,(!e.ia&&e.g.hls.disableCodecGuessing||e.R&&r==P.Ea&&!e.g.hls.disableClosedCaptionsDetection)&&R.segments.length>0&&(e.R=!1,B=!0),H=!e.ia&&e.g.hls.disableCodecGuessing,G=pi(e),x(je,B1(e,0,U,R,y,i,r,o,s,u,a,l,c,d,f,g,void 0,B,H),5);case 5:if(K=je.h,_.aborted)return je.return();z=K.stream,K1(e,R),pi(e)&&!G&&W1(e,R),S.Wc=K.Wc,S.qc=K.qc,S.Pe=K.Pe,S.Oe=K.Oe,S.Vd=K.Vd,S.lf=K.lf,S.Tb=K.Tb,S.Ub=K.Ub,T.segmentIndex=z.segmentIndex,T.encrypted=z.encrypted,T.drmInfos=z.drmInfos,T.keyIds=z.keyIds,T.mimeType=z.mimeType,T.bandwidth=T.bandwidth||z.bandwidth,T.codecs=T.codecs||z.codecs,T.closedCaptions=T.closedCaptions||z.closedCaptions,T.width=T.width||z.width,T.height=T.height||z.height,T.hdr=T.hdr||z.hdr,T.colorGamut=T.colorGamut||z.colorGamut,T.frameRate=T.frameRate||z.frameRate,"und"==T.language&&"und"!=z.language&&(T.language=z.language),T.language=T.language||z.language,T.channelsCount=T.channelsCount||z.channelsCount,T.audioSamplingRate=T.audioSamplingRate||z.audioSamplingRate,Ra(T),T.drmInfos.length&&e.h.newDrmInfo(T),$=!1,(!l&&T.closedCaptions||l&&T.closedCaptions&&l.size!=T.closedCaptions.size)&&($=!0),e.m&&$&&e.h.makeTextStreamsForClosedCaptions(e.m),r==P.Ua&&(Q=fo(z.segmentIndex))&&Q.Z&&(T.mimeType="application/mp4",Ra(T)),He=Xc(T),T.segmentIndex.Gb(function(ze){ze.Z&&(ze.Z.ud=He)}),function OI(e){if(!e.m)return!1;
1for(var t=[],n=[],i=(e=m(e.m.variants)).next();!i.done;i=e.next())(i=i.value).video&&t.push(i.video),i.audio&&n.push(i.audio);return!(t.length>0&&!t.some(function(r){return r.segmentIndex})||n.length>0&&!n.some(function(r){return r.segmentIndex}))}(e)&&(e.wc?Zf(e,[S]):(e.wc=!0,le=Array.from(e.i.values()),at=le.filter(function(ze){return ze.stream.segmentIndex}),Zf(e,at),$f(e),(ot=e.o)>0&&e.D.ka(ot))),eg(e,R.ba,T.type,U,y),e.m&&(e.m.startTime=e.u),Le(je,0);break;case 2:if(nt=Te(je),T.closeSegmentIndex(),7001===nt.code)return je.return();if(!e.h.disableStream(T))throw nt;Z(je)}})}(I))})))},T.closeSegmentIndex=function(){A&&!T.segmentIndex&&I.abort(),T.segmentIndex&&(T.segmentIndex.release(),T.segmentIndex=null),A=null},S}function j1(e){for(var t=1/0,n=(e=m(e.i.values())).next();!n.done;n=e.next())(n=n.value).stream.segmentIndex&&"text"!=n.stream.type&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.qc));return t}function U1(e,t){for(var n=[],i=(t=m(t)).next();!i.done;i=t.next())(i=i.value).segmentIndex&&i.segmentIndex.Gb(function(r){n.push(r)});e.l.ee(n)}function Zf(e,t){if(!pi(e))for(var n=j1(e),i=m(t),r=i.next();!r.done;r=i.next())r.value.stream.segmentIndex.nd(0,n);U1(e,t.map(function(o){return o.stream})),n=(i=Array.from(e.i.values()).filter(function(o){return o.stream.segmentIndex})).some(function(o){return"audio"==o.stream.type}),r=i.some(function(o){return"video"==o.stream.type}),i=pi(e)&&!e.bb,n=!pi(e)&&e.bb&&!(n&&r),e.g.hls.ignoreManifestProgramDateTime||i||n?L1(e,t,i):(function gI(e,t){if(e.ma==1/0)for(var n=(t=m(t)).next();!n.done;n=t.next())null!=(n=fo(n.value.stream.segmentIndex))&&null!=n.h&&(e.ma=Math.min(e.ma,n.h));if((t=e.ma)!=1/0)for(var i=(n=m(e.i.values())).next();!i.done;i=n.next())if(!Xl(e,(i=i.value).type)){var r=i.stream.segmentIndex;if(null!=r){var o=fo(r);if(o)if(null==o.h)Rn("Missing EXT-X-PROGRAM-DATE-TIME for stream",i.P(),"Expect AV sync issues!");else for(P1(e,i,o.h-t-o.startTime),r=(i=m(r)).next();!r.done;r=i.next())r.value.Ah(t)}}}(e,t),e.g.hls.ignoreManifestProgramDateTimeForTypes.length>0&&L1(e,t))}function Xl(e,t){return!!e.g.hls.ignoreManifestProgramDateTime||e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function B1(e,t,n,i,r,o,s,u,a,l,c,d,f,g,v,y,T,S,A){var I,_,P,b,M,D,R,j,U,B,H,G,K,z,$,Q,He,le,at,nt,Xe,je,ze,Ke,Ue,Ge;return S=void 0===S||S,A=void 0===A||A,L(function(nn){switch(nn.g){case 1:if(_=(I=i.segments||[]).every(function(bn){return!!Hn(bn.ba,"EXT-X-GAP")}),!I.length||_)throw new k(2,4,4053);if(function jI(e,t){var n=Hn(t.ba,"EXT-X-PLAYLIST-TYPE");t=Hn(t.ba,"EXT-X-ENDLIST"),t=n&&"VOD"==n.value||t,n=n&&"EVENT"==n.value&&!t,n=!t&&!n,eh(e,t?nh:n?ih:tT)}(e,i),pi(e)&&Qf(e,i),P=pi(e)?e.C.get(s):new Map,b=Y1(e,i,P,n,r,s),D=b.bandwidth,H=B=U=j=R=null,!((M=b.segments).length>0&&S)){nn.A(2);break}return x(nn,function vI(e,t){var n,i,r,o,s,a,l,c,d,f,g,v,y,T,S,A,I;return L(function(_){if(1==_.g)return n=vp(e.g.hls.mediaPlaylistFullMimeType),t.length?(i=q1(e,t),o=i.segmentIndex,s=(r=i.segment).P(),a=new O(s[0]),l=a.pb.split(".").pop(),(c=ig.get(l))?_.return(vp(c)):x(_,Promise.all([b1(e,r.Z,0),b1(e,r,o)]),2)):_.return(n);if(f=(d=_.h)[1].mimeType,g=d[0].data,v=d[1].data,y="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),T=["audio/mp4","video/mp4","video/iso.segment"],!(S=r.Z||T.includes(f))&&ua(oe(v))){var P=v,b=e.g.disableAudio,M=e.g.disableVideo,D=e.g.disableText,R=oe(P),j=(new Bt).parse(R),U=j.Sd();R=j.Kg();var B=[],H=!1,G=!1;if(!b)switch(U.audio){case"aac":case"aac-loas":j.ub().length&&(B.push("mp4a.40.2"),H=!0);break;case"mp3":j.ub().length&&(B.push("mp4a.40.34"),H=!0);break;case"ac3":j.ub().length&&(B.push("ac-3"),H=!0);break;case"ec3":j.ub().length&&(B.push("ec-3"),H=!0);break;case"opus":j.ub().length&&(B.push("opus"),H=!0)}if(!M)switch(U.video){case"avc":B.push(R.codec?R.codec:"avc1.42E01E"),G=!0;break;case"hvc":B.push(R.codec?R.codec:"hvc1.1.6.L93.90"),G=!0;break;case"av1":B.push("av01.0.01M.08"),G=!0}if(B.length){if(b=H&&!G,M=new Map,G&&!D){for((D=new wi("video/mp2t")).xf(P),G=(P=m(D.Wf())).next();!G.done;G=P.next())M.set(G=G.value,G);D.Jd()}R={type:b?"audio":"video",mimeType:"video/mp2t",codecs:B.join(", "),language:null,height:R.height,width:R.width,channelCount:null,sampleRate:null,closedCaptions:M,qe:null,colorGamut:null,frameRate:R.frameRate}}else R=null;if(A=R)return _.return(A)}else if((S||y.includes(l))&&(I=function PS(e,t,n){function i(M){S=M.name;var D=M.reader;D.skip(24);var R=D.Da(),j=D.Da();D.skip(50),f=String(R),d=String(j),M.reader.Ia()&&Oe(M)}function r(M){var D=jm(M.reader);g=D.channelCount,v=D.sampleRate,o(M.name)}function o(M){switch(M=M.toLowerCase()){case"avc1":case"avc3":u.pu
1sh(M+".42E01E"),l=!0;break;case"hev1":case"hvc1":u.push(M+".1.6.L93.90"),l=!0;break;case"dvh1":case"dvhe":u.push(M+".05.04"),l=!0;break;case"vp09":u.push(M+".00.10.08"),l=!0;break;case"av01":u.push(M+".0.01M.08"),l=!0;break;case"mp4a":s.push("mp4a.40.2"),a=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":s.push(M),a=!0;break;case"apac":s.push("apac.31.00"),a=!0}}var S,s=[],u=[],a=!1,l=!1,c=null,d=null,f=null,g=null,v=null,y=null,T=null;if((new Et).box("moov",Oe).box("trak",Oe).box("mdia",Oe).S("mdhd",function(M){c=Rc(M.reader,M.version).language}).box("minf",Oe).box("stbl",Oe).S("stsd",$o).box("mp4a",function(M){var D=jm(M.reader);g=D.channelCount,v=D.sampleRate,M.reader.Ia()?Oe(M):o(M.name)}).box("esds",function(M){M=M.reader;for(var R,j,D="mp4a";M.Ia();){R=M.Y();for(var U=M.Y();128&U;)U=M.Y();if(3==R)M.Da(),128&(U=M.Y())&&M.Da(),64&U&&M.skip(M.Y()),32&U&&M.Da();else if(4==R)j=M.Y(),M.skip(12);else if(5==R)break}j&&(D+="."+ol(j),5==R&&M.Ia()&&(31==(j=(248&(R=M.Y()))>>3)&&M.Ia()&&(j=32+((7&R)<<3)+((224&M.Y())>>5)),D+="."+j)),s.push(D),a=!0}).box("ac-3",r).box("ec-3",r).box("ac-4",r).box("Opus",r).box("fLaC",r).box("apac",r).box("avc1",i).box("avc3",i).box("hev1",i).box("hvc1",i).box("dva1",i).box("dvav",i).box("dvh1",i).box("dvhe",i).box("vp09",i).box("av01",i).box("avcC",function(M){var D=S||"";switch(S){case"dvav":D="avc3";break;case"dva1":D="avc1"}(M=M.reader).skip(1),M=D+"."+ol(M.Y())+ol(M.Y())+ol(M.Y()),u.push(M),l=!0}).box("hvcC",function(M){var D=S||"";switch(S){case"dvh1":D="hvc1";break;case"dvhe":D="hev1"}var R=M.reader;R.skip(1);var j=["","A","B","C"][(M=R.Y())>>6],U=31&M,B=R.U(),H=(32&M)>>5?"H":"L";M=[R.Y(),R.Y(),R.Y(),R.Y(),R.Y(),R.Y()],R=R.Y();for(var G=0,K=0;K<32&&(G|=1&B,31!=K);K++)G<<=1,B>>=1;for(D=D+"."+j+U+"."+ol(G,!0),D+="."+H+R,j="",U=M.length;U--;)((H=M[U])||j)&&(j="."+H.toString(16).toUpperCase()+j);u.push(D+=j),l=!0}).box("dvcC",function(M){var D=S||"";switch(S){case"hvc1":D="dvh1";break;case"hev1":D="dvhe";break;case"avc1":D="dva1";break;case"avc3":D="dvav";break;case"av01":D="dav1"}var R=M.reader;R.skip(2),M=R.Y(),R=R.Y(),u.push(D+"."+Yi(M>>1&127)+"."+Yi(M<<5&32|R>>3&31)),l=!0}).box("dvvC",function(M){var D=S||"";switch(S){case"hvc1":D="dvh1";break;case"hev1":D="dvhe";break;case"avc1":D="dva1";break;case"avc3":D="dvav";break;case"av01":D="dav1"}var R=M.reader;R.skip(2),M=R.Y(),R=R.Y(),u.push(D+"."+Yi(M>>1&127)+"."+Yi(M<<5&32|R>>3&31)),l=!0}).S("vpcC",function(M){var D=S||"",R=M.reader;M=R.Y();var j=R.Y();R=R.Y()>>4&15,u.push(D+"."+Yi(M)+"."+Yi(j)+"."+Yi(R)),l=!0}).box("av1C",function(M){var D=S||"";"dav1"===S&&(D="av01");var R=M.reader;R.skip(1);var j=(M=R.Y())>>>5,U=(64&(R=R.Y()))>>6;u.push(D+"."+j+"."+Yi(31&M)+(R>>>7?"H":"M")+"."+Yi(2===j&&U?(32&R)>>5?12:10:U?10:8)+"."+((16&R)>>4)+"."+((8&R)>>3)+((4&R)>>2)+(3&R)+"."+Yi(1)+"."+Yi(1)+"."+Yi(1)+".0"),l=!0}).box("enca",Cc).box("encv",zi).box("sinf",Oe).box("frma",function(M){o(M=zh(M.reader).codec)}).box("colr",function(M){u=u.map(function(j){if(j.startsWith("av01.")){var U=M.reader,B=U.Na(),H=U.Vb(4),G=String.fromCharCode(H[0]);if(G+=String.fromCharCode(H[1]),G+=String.fromCharCode(H[2]),"nclx"===(G+=String.fromCharCode(H[3]))){H=U.Da(),G=U.Da();var K=U.Da(),z=U.Y()>>7,$=j.split(".");10==$.length&&($[6]=Yi(H),$[7]=Yi(G),$[8]=Yi(K),$[9]=String(z),j=$.join("."))}U.seek(B)}return j});var D=function Rx(e){var t=null,n=null,i=e.Vb(4),r=String.fromCharCode(i[0]);if(r+=String.fromCharCode(i[1]),r+=String.fromCharCode(i[2]),"nclx"===(r+=String.fromCharCode(i[3]))){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(i=e.Da(),e.Da(),i){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,qe:n}}(M.reader);y=D.qe,T=D.colorGamut}).parse(e||t,!0,!0),!s.length&&!u.length)return null;var A=a&&!l,I=new Map;if(l&&!n){n=new wi("video/mp4"),e&&n.init(e);try{n.xf(t);for(var _=m(n.Wf()),P=_.next();!P.done;P=_.next()){var b=P.value;I.set(b,b)}}catch{}n.Jd()}return{type:A?"audio":"video",mimeType:A?"audio/mp4":"video/mp4",codecs:yp(s.concat(u)).join(", "),language:c,height:d,width:f,channelCount:g,sampleRate:v,closedCaptions:I,qe:y,colorGamut:T,frameRate:null}}(g,v,e.g.disableText)))return _.return(I);return _.return(f?vp(f):n)})}(e,M),3);case 3:s!=(G=nn.h).type&&pi(e)&&(e.C.set(G.type,e.C.get(s)),e.C.set(s,new Map)),s=G.type,u=G.language,c=G.channelCount,v=G.sampleRate,e.g.disableText||(d=G.closedCaptions),j=G.height,R=G.width,U=G.qe,B=G.colorGamut,H=G.frameRate,A&&(T=G.mimeType,o=G.codecs);case 2:if(T){nn.A(4);break}return x(nn,function FI(e,t,n,i){var r,o,s,u,a,l,c,d,f,g,v,y,T;return L(function(S){switch(S.g){case 1:return r=Xr,o=q1(e,i),2==(s=o.segment).status?S.return(Qd(t)):(u=s.P(),a=new O(u[0]),l=a.pb.split(".").pop(),c=rg.get(t),(d=c.get(l))||(d=ig.get(l))||(d=tg(t,n))?S.return(d):(g=1,v=_n(u,e.g.retryParameters),fe(S,2),v.method="HEAD",x(S,as(e,v,r,{type:g}).promise,4)));case 4:f=(y=S.h).headers["content-type"],Le(S,3);break;case 2:if(!(T=Te(S))||1002!=T.code&&1001!=T.code){S.A(3);break}return v.method="GET",e.g.hls.allowRangeRequestsToGuessMimeType&&(v.headers.Range="bytes=0-0"),x(S,as(e,v,r,{type:g}).promise,6);case 6:f=(y=S.h).headers["content-type"];case 3:if(!f){S.A(7);break}if("application/octet-stream"!=(d=f.toLowerCase().split(";")[0])){S.A(8);break}if(y.data.byteLength){S.A(9);break}return v.method="GET",x(S,as(e,v,r,{type:g}).promise,10);case 10:y=S.h;case 9:ua(oe(y.data))&&(d="video/mp2t");case 8:if("application/octet-stream"!=d)return S.return(d);case 7:return S.return(Qd(t))}})}(e,s,o,M),5);case 5:T=nn.h,s!=Pe||o||"application/mp4"!=T||!M[0]||M[0].Z||(T="text/vtt");case 4:return x(nn,H1(e,i,T,r,n),6);case 6:if(z=(K=nn.h).drmInfos,$=K.keyIds,He=K.Mh,(Q=K.encrypted)&&!z.length&&!He)throw new k(2,4,4026);return(le=V1(e,o,s,u,a,l,c,d,f,g,v,y)).encrypted=Q&&!He,le.drmInfos=z,le.keyIds=$,le.mimeType=T,D&&(le.bandwidth=D),Ra(le),"video"==s&&(R||j||U||B)&&$1(le,R,j,H,U,null,B),pi(e)&&Qf(e,i),at=M[0].startTime,nt=M[M.length-1].endTime,Xe=new ut(M),le.segmentIndex=Xe,ze=!!(je=Hn(i.ba,"EXT-X-SERVER-CONTROL"))&&null!=Pa(je,"CAN-SKIP-UNTIL"),Ke=!!je&&null!=Pa(je,"CAN-BLOCK-RELOAD"),Ue=ba(i.ba,"EXT-X-MEDIA-SEQUENCE",0),Ge=F1(Ue,M),nn.return({stream:le,type:s,Bf:[],P:r,Wc:at,qc:nt,Pe:ze,Oe:Ke,Vd:!1,qg:-1,Tb:Ge.Tb,Ub:Ge.Ub,lf:P})}})}function F1(e,t){e=e+t.length-1;var n=-1;if(!t.length)return{Tb:++e,Ub:n};var i=(t=t[t.length-1]).g;return t.g.length?(n=i.length-1,i[i.length-1].isPreload()||(e++,n=0),{Tb:e,Ub:n}):(e++,t.m&&(n=0),{Tb:e,Ub:n})}function V1(e,t,n,i,r,o,s,u,a,l,c,d){var f=tg(n,t)||Qd(n),g=[];if(a)for(var v=(a=m(a.split(","))).next();!v.done;v=a.next())g.push(v.value);return a=void 0,v=null,n==Pe?a=g.includes("public.accessibility.transcribes-spoken-dialog")&&g.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":g.includes("public.accessibility.describes-video")&&(v="visually impaired"),g.length||"subtitle"!==a||g.push("subtitle"),Ra(e={id:e.G++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:f,codecs:t,kind:n==Pe?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:te(i||"und"),originalLanguage:i,label:o,type:n,primary:r,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:g,forced:l,channelsCount:s,audioSamplingRate:c,spatialAudio:d,closedCaptions:u,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:v,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}),e}function H1(e,t,n,i,r){var o,s,u,a,l,c,d,f,v,y,T,S,A,I,P,b,M,D,R,j,U,B,H,G,K,z;return L(function(Q){switch(Q.g){case 1:if(o=new Map,!e.g.ignoreDrmInfo&&t.segments)for(s=m(t.segments),u=s.next();!u.done;u=s.next())if(l=Cr((a=u.value).ba,"EXT-X-KEY"),c=null,l.length)for(c=X1(e,t,a.ba,i,r),d=m(l),f=d.next();!f.done;f=d.next())o.set(f.value,c);y=v=!1,T=[],S=new Set,A=m(o),I=A.next();case 2:if(I.done){Q.A(4);break}if(P=m(I.value),b=P.next().value,M=P.next().value,R=M,"NONE"==(j=Ct(D=b,"METHOD"))){Q.A(3);break}if(v=!0,U=ye(D,"KEYFORMAT")||"identity",B=null,th(j)){y=!0,Q.A(3);break}if("identity"==U)return x(Q,Z1(e,D,n,i,R,r),11);if(!(H=e.cc.get(U))){G=null,Q.A(9);break}return x(Q,H(D,n,R),10);case 10:G=Q.h;case 9:B=G,Q.A(6);break;case 11:B=Q.h;case 6:if(B){if(B.keyIds)for(K=m(B.keyIds),z=K.next();!z.done;z=K.next())S.add(z.value);T.push(B)}case 3:I=A.next(),Q.A(2);break;case 4:return Q.return({drmInfos:T,keyIds:S,encrypted:v,Mh:y})}})}function G1(e,t,n,i,r){if(!X.crypto||!X.crypto.subtle)throw Be("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new k(2,4,4042);var o=0,s=ye(t,"IV","");if(s){var u=Nn(s.substr(2));if(16!=u.byteLength)throw new k(2,4,4048)}else o=ba(n.ba,"EXT-X-MEDIA-SEQUENCE",0);var a=Ws(i(),Ct(t,"URI"),r),l=a.sort().join("");if(n=t.toString()+"-"+o+"-"+l,!e.wa.has(n)){var c={bitsKey:128,blockCipherMode:"CBC",iv:u,f
1irstMediaSequenceNumber:o};switch(Ct(t,"METHOD")){case"AES-256":c.bitsKey=256;break;case"AES-256-CTR":c.bitsKey=256,c.blockCipherMode="CTR"}c.fetchKey=function(){var d,f,g;return L(function(y){if(1==y.g)return e.O.has(l)||(d=_n(a,e.g.retryParameters),f=as(e,d,6).promise,e.O.set(l,f)),x(y,e.O.get(l),2);if(3!=y.g){if(!(g=y.h).data||g.data.byteLength!=c.bitsKey/8)throw new k(2,4,4049);return x(y,X.crypto.subtle.importKey("raw",g.data,{name:"CTR"==c.blockCipherMode?"AES-CTR":"AES-CBC",length:c.bitsKey},!0,["decrypt"]),3)}c.cryptoKey=y.h,c.fetchKey=void 0,Z(y)})},e.wa.set(n,c)}return e.wa.get(n)}function K1(e,t){null==e.u&&(t=Hn(t.ba,"EXT-X-START"))&&(e.u=Number(Ct(t,"TIME-OFFSET")))}function Qf(e,t){var n=1/0,i=t.segments;if(i.length)for(var r=i.length-1;r>=0;){var o=Hn(i[r].ba,"EXTINF");if(o){n=Number(o.value.split(",")[0]);break}r--}if(!(i=Hn(t.ba,"EXT-X-TARGETDURATION")))throw new k(2,4,4024,"EXT-X-TARGETDURATION");i=Number(i.value),(r=Hn(t.ba,"EXT-X-PART-INF"))&&(e.T=Number(Ct(r,"PART-TARGET"))),t=Hn(t.ba,"EXT-X-SERVER-CONTROL"),e.oa&&e.T?(e.o=e.vc?5*e.T<=n?Math.min(e.T,e.o):Math.min(n,e.o):Math.min(e.T,e.o),e.$a=t?Number(Ct(t,"PART-HOLD-BACK")):0):(e.o=Math.min(n,e.o),n=t?Pa(t,"HOLD-BACK"):null,e.Pa=n?Number(n.value):0),e.ab=Math.max(i,e.ab)}function W1(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.$a)n=e.$a;else if(e.Pa)n=e.Pa;else for(var i=t.segments.length,r=i-Math.min(i,e.g.hls.liveSegmentsDelay);r<i;r++){var o=Hn(t.segments[r].ba,"EXTINF");n=o?n+Number(o.value.split(",")[0]):n+e.ab}e.u&&e.u<0&&(n=Math.min(-e.u,n),e.u+=n),e.l.Ri(0),e.l.oh(n),e.l.bd(!1)}function X1(e,t,n,i,r){var o=Hn(n,"EXT-X-MAP");if(!o)return null;var s=Ct(o,"URI"),u=Ws(i(),s,r);if(s=[u.toString(),ye(o,"BYTERANGE","")].join("-"),!e.Ba.has(s)){for(var a=void 0,l=null,c=!1,d=(n=m(n)).next();!d.done;d=n.next())"EXT-X-KEY"==(d=d.value).name?th(c=Ct(d,"METHOD"))&&d.id<o.id?(c=!1,a=G1(e,d,t,i,r)):c="NONE"!=c:"EXT-X-BYTERANGE"==d.name&&d.id<o.id&&(l=d);t=function UI(e,t,n,i,r){var o=0,s=null;return!(t=ye(t,"BYTERANGE"))&&n&&(t=n.value),t&&(o=t.split("@"),s=Number(o[0]),s=(o=Number(o[1]))+s-1,i&&(n=s+1-o)%16&&(s+=16-n%16)),new bi(function(){return e},o,s,null,null,null,i,r)}(u,o,l,a,c),e.Ba.set(s,t)}return e.Ba.get(s)}function BI(e,t,n,i,r,o,s,u,a){function l(Q){Q=new O(Q).pb.split(".").pop();var He=rg.get(s).get(Q);return He||(He=ig.get(Q)),He}var c=i.ba,d=Hn(c,"EXTINF"),f=0,g=0,v=null;i.tc.length&&(e.m.isLowLatency=!0);var y=null;if(!e.g.hls.ignoreManifestProgramDateTime){var T=Hn(c,"EXT-X-PROGRAM-DATE-TIME");T&&T.value&&(y=no(T.value),e.bb=!0)}var S=Jo;if(Hn(c,"EXT-X-GAP")&&(e.m.gapCount++,S=2),!d){if(0==i.tc.length)throw new k(2,4,4024,"EXTINF");if(!e.oa)return null}var A=[];T=!1;var I=null,_=!1,P=!1;if(e.oa&&i.tc.length){f=t&&X.ReadableStream&&e.g.hls.allowLowLatencyByteRangeOptimization;for(var b=y,M={},D=0;D<i.tc.length;M={Qf:void 0,wf:void 0},D++){var R=i.tc[D],j=0==D?n:A[A.length-1],U=0==D?r:j.endTime,B=Number(ye(R,"DURATION"))||e.T;if(B){var H=U+B,G=0,K=null;if("EXT-X-PRELOAD-HINT"==R.name?(G=(G=ye(R,"BYTERANGE-START"))?Number(G):0,(j=ye(R,"BYTERANGE-LENGTH"))?K=G+Number(j)-1:G&&(K=Number.MAX_SAFE_INTEGER)):(G=(K=m(z1(j,G=ye(R,"BYTERANGE")))).next().value,K=K.next().value),M.wf=ye(R,"URI"),M.wf){j=Jo,"YES"==ye(R,"GAP")&&(e.m.gapCount++,j=2,_=!0),M.Qf=null;var z=function(Q){return function(){return null==Q.Qf&&(Q.Qf=Ws(u(),Q.wf,o)),Q.Qf}}(M);f&&G>=0&&null!=K&&(I=z,T=!0),U=new Ee(U,H,z,G,K,t,0,0,1/0,[],"",null,b,j,a),"EXT-X-PRELOAD-HINT"==R.name&&(U.Rg(),P=!0),"YES"!=ye(R,"INDEPENDENT")&&D>0&&U.td(),(M=l(M.wf))&&(U.mimeType=M,eT.has(M)&&(U.Z=null)),A.push(U),b&&(b+=B)}}}}if(d){if(0==(d=Number(d.value.split(",")[0])))return null;f=r+d}else{if(!A.length)return null;f=A[A.length-1].endTime}T&&(_||0!=A[0].startByte?(T=!1,I=null):A=[]),(d=Hn(c,"EXT-X-BYTERANGE"))?(g=(v=m(z1(n,d.value))).next().value,v=v.next().value):A.length&&(g=A[0].startByte,v=A[A.length-1].endByte),n="",d=null,"image"==s&&(n="1x1",c=Hn(c,"EXT-X-TILES"))&&(n=Ct(c,"LAYOUT"),(c=ye(c,"DURATION"))&&(d=Number(c)));var $=null;return t=new Ee(r,f,function(){return I?I():(null==$&&($=Ws(u(),i.g,o)),$||[])},g,v,t,0,0,1/0,A,n,d,y,S,a,A.length>0&&!!i.g),(r=l(i.g))&&(t.mimeType=r,eT.has(r)&&(t.Z=null)),T&&(e.vc=!0,t.oi(),P&&t.Rg()),t}function z1(e,t){var n=0,i=null;return t&&(n=t.split("@"),t=Number(n[0]),i=(n=n[1]?Number(n[1]):e.endByte+1)+t-1),[n,i]}function eg(e,t,n,i,r){if("video"==n||"audio"==n){var o=e.l.m;if(o&&!Xl(e,n))for(t=(t=Cr(t,"EXT-X-DATERANGE")).filter(function(j){return null!=Pa(j,"START-DATE")}).sort(function(j,U){return(j=Ct(j,"START-DATE"))<(U=Ct(U,"START-DATE"))?-1:j>U?1:0}),n=0;n<t.length;n++){var s=t[n];try{var a=no(Ct(s,"START-DATE"));if(!isNaN(a)){var l=Math.max(0,a-o),c=null,d=ye(s,"END-DATE");if(d){var f=no(d);if(!isNaN(f)&&(c=f-o)<0)continue}if(null==c){var g=ye(s,"DURATION")||ye(s,"PLANNED-DURATION");if(g){var v=parseFloat(g);if(isNaN(v)||(c=l+v),a-o+v<0)continue}}var y=ye(s,"CLASS")||"com.apple.quicktime.HLS",T="YES"==ye(s,"END-ON-NEXT");if(null==c&&T){for(var S=n+1;S<t.length;S++)if(y==(ye(t[S],"CLASS")||"com.apple.quicktime.HLS")){var _=no(Ct(t[S],"START-DATE"));if(!isNaN(_)&&_&&_>a){c=Math.max(0,_-o);break}}if(null==c)continue}S=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var P=[],b=m(s.attributes),M=b.next();!M.done;M=b.next()){var D=M.value;if(!S.includes(D.name)){var R=M1(D.value,i);("X-ASSET-URI"==D.name||"X-ASSET-LIST"==D.name)&&(R=Ws(r(),D.value,i)[0]),P.push({key:D.name,description:"",data:R,mimeType:null,pictureType:null})}}P.length>1&&e.h.onMetadata(y,l,c,P)}}catch{}}}}function Y1(e,t,n,i,r,o){var s=t.segments,u=void 0,a=ba(t.ba,"EXT-X-DISCONTINUITY-SEQUENCE",-1),l=ba(t.ba,"EXT-X-MEDIA-SEQUENCE",0),c=Hn(t.ba,"EXT-X-SKIP"),d=c?Number(ye(c,"SKIPPED-SEGMENTS")):0,f=l+d,g=0;pi(e)&&n.has(f)&&(g=n.get(f)),0===g&&e.Fa==ih&&n.size>
10&&!n.has(f)&&null!=e.l.i&&(g=e.l.Ib());var v=[],y=null;c=[];for(var T=0;T<s.length;T++){var S=s[T],A=0==T?g:y.endTime;f=l+d+T,Hn(S.ba,"EXT-X-DISCONTINUITY")&&(a++,y&&y.Z&&(y.Z.g=A));for(var I=m(S.ba),_=I.next();!_.done;_=I.next())"EXT-X-KEY"==(_=_.value).name&&(u=th(Ct(_,"METHOD"))?G1(e,_,t,r,i):void 0);n.set(f,A),(A=BI(e,I=X1(e,t,S.ba,r,i),y,S,A,i,o,r,u))&&((y=ba(S.ba,"EXT-X-BITRATE"))?c.push({bitrate:y,duration:A.endTime-A.startTime}):c.length&&((y=c.pop()).duration+=A.endTime-A.startTime,c.push(y)),y=A,A.i=a,Xl(e,o)&&null!=e.N&&f<e.N||v.push(A))}if(t=void 0,c.length&&(t=c.reduce(function(P,b){return P+b.duration},0),t=Math.round(c.reduce(function(P,b){return P+b.bitrate*b.duration},0)/t*1e3)),c=v.some(function(P){return null!=P.h}))for(n={},i=0;i<v.length;n={Ue:void 0,Te:void 0,Le:void 0,Yc:void 0,Ke:void 0},i++)if(n.Yc=v[i],null==n.Yc.h)for(n.Te=0,n.Ue=i,r=function(P){return function(){var b=v[P.Ue];if(b){if(null!=b.h)return b.h+P.Te;P.Te-=b.endTime-b.startTime,P.Ue+=1}return null}}(n),n.Ke=0,n.Le=i,s=function(P){return function(){var b=v[P.Le];if(b){if(b!=P.Yc&&(P.Ke+=b.endTime-b.startTime),null!=b.h)return b.h+P.Ke;--P.Le}return null}}(n);null==n.Yc.h;)n.Yc.h=s(),null==n.Yc.h&&(n.Yc.h=r());if(c)for(i=(n=m(v)).next();!i.done;i=n.next())for(i=(r=i.value).h,s=(r=m(r.g)).next();!s.done;s=r.next())(s=s.value).h=i,i+=s.endTime-s.startTime;if(n=e.ma,c&&n!=1/0&&!Xl(e,o))for(o=(e=m(v)).next();!o.done;o=e.next())o.value.Ah(n);return{segments:v,bandwidth:t}}function tg(e,t){if(e==Pe){if("vtt"==t||"wvtt"==t)return"text/vtt";if(t&&""!==t)return"application/mp4"}return"image"!=e||t&&"jpeg"!=t?"audio"==e&&"mp4a.40.34"==t?"audio/mpeg":"mjpg"==t?"application/mp4":null:"image/jpeg"}function Qd(e){return e==Pe?"text/vtt":rg.get(e).get("mp4")}function q1(e,t){for(var n=t[e=pi(e)?Math.trunc((t.length-1)/2):0];2==n.Gc()&&e+1<t.length;)n=t[++e];return{segment:n,segmentIndex:e}}function $1(e,t,n,i,r,o,s){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(i)||void 0,e.hdr=r||void 0,e.videoLayout=o||void 0,e.colorGamut=s||void 0)}function ng(e,t,n){return as(e,_n(t,e.g.retryParameters),0,{type:n?2:3})}function J1(e){var t,n,o,s;return L(function(u){switch(u.g){case 1:return e.h?(fe(u,2),t=Date.now(),x(u,e.update(),4)):u.return();case 4:n=Date.now(),pi(e)&&(e.$b.sample(1,(n-t)/1e3),o=Math.max(0,(e.g.updatePeriod>0?e.g.updatePeriod:e.o)-pr(e.$b)),e.D.ka(o)),Le(u,3);break;case 2:if(s=Te(u),!e.h)return u.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(s),u.return();s.severity=1,e.h.onError(s),e.D.ka(.1);case 3:if(!e.h)return u.return();e.h.onManifestUpdated(),Z(u)}})}function pi(e){return e.Fa!=nh}function eh(e,t){e.Fa=t,e.l&&e.l.bd(!pi(e)),pi(e)||e.D.stop()}function as(e,t,n,i){if(!e.ea)throw new k(2,7,7001);return i||(i={}),i.isPreload=e.bc(),t=e.h.networkingEngine.request(n,t,i),gu(e.ea,t),t}function th(e){return"AES-128"==e||"AES-256"==e||"AES-256-CTR"==e}function Z1(e,t,n,i,r,o){var s,a,l,c,d,f,v,y,T,S;return L(function(A){switch(A.g){case 1:if("video/mp2t"==n)throw new k(2,4,4040);if("apple"===X.shakaMediaKeysPolyfill)throw new k(2,4,4041);if(s=Ct(t,"METHOD"),!["SAMPLE-AES","SAMPLE-AES-CTR"].includes(s))return A.return(null);if((a=Ws(i(),Ct(t,"URI"),o))[0].startsWith("data:text/plain;base64,")){l=Ti(sn(a[0].split("data:text/plain;base64,").pop())),A.A(2);break}return c=a.sort().join(""),e.xa.has(c)||(d=_n(a,e.g.retryParameters),f=as(e,d,6).promise,e.xa.set(c,f)),x(A,e.xa.get(c),3);case 3:l=Ti(A.h.data);case 2:if(v="00000000000000000000000000000000",!r){A.A(4);break}return x(A,Q1(e,r),5);case 5:(y=A.h)&&(v=y);case 4:return(T=new Map).set(v,l),S="cenc","SAMPLE-AES"==s&&(S="cbcs"),A.return(vs(T,S))}})}function Q1(e,t){var n,i,o;return L(function(s){return 1==s.g?(n=null,e.ya.has(t)?(n=e.ya.get(t),s.A(2)):(i=vl(t.P(),t.Fc(),t.Dc(),e.g.retryParameters),x(s,as(e,i,Xr,{type:0}).promise,3))):(2!=s.g&&(t.ke((o=s.h).data),n=function RS(e){var t=null;return(new Et).box("moov",Oe).box("trak",Oe).box("mdia",Oe).box("minf",Oe).box("stbl",Oe).S("stsd",$o).box("encv",zi).box("enca",Cc).box("sinf",Oe).box("schi",Oe).S("tenc",function(n){(n=n.reader).Y(),n.Y(),n.Y(),n.Y(),t=Ti(n.Vb(16))}).parse(e,!0),t}(o.data),e.ya.set(t,n)),s.return(n))})}ue("shaka.net.DataUriPlugin",_1),_1.parse=D1,Yo("data",D1),(h=Jd.prototype).configure=function(e,t){var n=this.h&&e.updatePeriod!=this.g.updatePeriod&&e.updatePeriod>=0;this.g=e,t&&(this.bc=t),this.j&&this.j.configure(this.g),n&&this.m&&this.m.presentationTimeline.W()&&this.D.Lb()},h.start=function(e,t){var i,n=this;
1return L(function(r){return 1==r.g?(n.h=t,n.oa=t.isLowLatencyMode(),x(r,ng(n,[e]).promise,2)):3!=r.g?(n.H=(i=r.h).uri,x(r,function mI(e,t){var n,i,r,o,s,u,a,l,c,d,f,g,v,y,T,S,A,I,_,P,b,M,D,R,j,U,B,H,G,K,z,$,Q,He,le,at,ot,Xe,je,ze,Ke,Ue;return L(function(Ge){switch(Ge.g){case 1:return n=cn,i=zf(e.Qa,t),r=Cr(i.ba,"EXT-X-DEFINE"),o=[],s=[],u=[],e.l=new _e(null,0),e.l.bd(!0),a=function(){return[e.H]},l=null,c=new Map,1==i.type?(e.R=!1,$=Cr(i.ba,"EXT-X-DEFINE"),c=Jf(e,$,e.H),l=n.Ea,Q="",He=new Map,x(Ge,B1(e,e.G++,c,i,a,"",l,Q,!0,"Media Playlist",null,He,null,!1,null,!1),7)):(function yI(e,t){for(var n=new O(e.H).g,i=(t=m(t)).next();!i.done;i=t.next()){var r=i.value;i=ye(r,"NAME");var o=ye(r,"VALUE");r=ye(r,"QUERYPARAM"),i&&o&&(e.B.has(i)||e.B.set(i,o)),r&&(i=n.get(r)[0])&&!e.B.has(i)&&e.B.set(r,i)}}(e,r),d=Cr(i.ba,"EXT-X-MEDIA"),f=Cr(i.ba,"EXT-X-STREAM-INF"),g=Cr(i.ba,"EXT-X-IMAGE-STREAM-INF"),v=Cr(i.ba,"EXT-X-I-FRAME-STREAM-INF"),y=Cr(i.ba,"EXT-X-SESSION-KEY"),T=Cr(i.ba,"EXT-X-SESSION-DATA"),S=Cr(i.ba,"EXT-X-CONTENT-STEERING"),function wI(e,t){for(var n=(t=m(t)).next();!n.done;n=t.next()){var i=n.value,r=ye(i,"DATA-ID");n=ye(i,"URI");var o=ye(i,"LANGUAGE");i=ye(i,"VALUE"),r=(new Map).set("id",r),n&&r.set("uri",Ws([e.H],n,e.B)[0]),o&&r.set("language",o),i&&r.set("value",i),n=new re("sessiondata",r),e.h&&e.h.onEvent(n)}}(e,T),x(Ge,function xI(e,t){var n,i,r,o,s,u;return L(function(a){if(!e.h||!e.g)return a.return();for(i=m(t),r=i.next();!r.done;r=i.next())if(s=ye(o=r.value,"PATHWAY-ID"),u=ye(o,"SERVER-URI"),s&&u){e.j=new ka(e.h),e.j.configure(e.g),e.j.i=[e.H],e.j.setManifestType("HLS"),e.j.h=s,n=Fl(e.j,u);break}return x(a,n,0)})}(e,S),4));case 4:if(!e.g.ignoreSupplementalCodecs){for(A=[],I=m(f),_=I.next(),P={};!_.done;P={Zi:void 0},_=I.next())(M=ye(b=_.value,"SUPPLEMENTAL-CODECS"))&&(P.Zi=M.split(/\s*,\s*/).map(function($t){return $t.split("/")[0]}),D=b.attributes.map(function($t){return function(tn){var nn=tn.name,bn=tn.value;return"CODECS"==nn&&(bn=$t.Zi.join(","),(tn=tn.value.split(",")).length>1&&(tn=Cn("audio",tn))&&(bn+=","+tn)),new qd(nn,bn)}}(P)),A.push(new Yd(b.id,b.name,D,null)));for(f.push.apply(f,ee(A)),R=[],j=m(v),U=j.next(),B={};!U.done;B={$i:void 0},U=j.next())(G=ye(H=U.value,"SUPPLEMENTAL-CODECS"))&&(B.$i=G.split(/\s*,\s*/).map(function($t){return $t.split("/")[0]}),K=H.attributes.map(function($t){return function(tn){var nn=tn.name;return tn=tn.value,"CODECS"==nn&&(tn=$t.$i.join(",")),new qd(nn,tn)}}(B)),R.push(new Yd(H.id,H.name,K,null)));v.push.apply(v,ee(R))}return function TI(e,t){for(var n=(t=m(t)).next();!n.done;n=t.next()){var i=n.value,r=ye(i,"AUDIO");n=ye(i,"VIDEO");var o=ye(i,"SUBTITLES");if(i=R1(e,i),o){var s=Cn(Pe,i);e.L.set(o,s),Ki(i,s)}r&&((o=Cn("audio",i))||(o=e.g.hls.defaultAudioCodec),e.L.set(r,o)),n&&((r=Cn("video",i))||(r=e.g.hls.defaultVideoCodec),e.L.set(n,r))}}(e,f),function bI(e,t){t=I1(t,"CLOSED-CAPTIONS"),e.R=0==t.length;for(var n=(t=m(t)).next();!n.done;n=t.next()){var i=n.value,r=ye(i,"LANGUAGE");n=te(r||"und"),r||(r=ye(i,"NAME"))&&(n=r),r=Ct(i,"GROUP-ID"),i=Ct(i,"INSTREAM-ID").replace("SERVICE","svc"),e.J.get(r)||e.J.set(r,new Map),e.J.get(r).set(i,n)}}(e,d),z=function II(e,t){return t.map(function(n){return"video"!==(n=O1(e,n)).stream.type?null:n.stream}).filter(function(n){return n})}(e,v),x(Ge,function CI(e,t,n,i,r,o,s){var u,a,l,c,d,f,g,v,y,T,S,A,I,_,P,b,D,R,j,U,B,H,G,K,z,$,Q,He,le,at,ot,nt,Xe,je,ze;return L(function(Ke){switch(Ke.g){case 1:if(u=[],a=new Set,e.g.ignoreDrmInfo||!(n.length>0)){Ke.A(2);break}l=m(n),c=l.next();case 3:if(c.done){Ke.A(2);break}if(f=Ct(d=c.value,"METHOD"),g=ye(d,"KEYFORMAT")||"identity",v=null,"NONE"==f){Ke.A(4);break}if(th(f)){y=Ws(r(),Ct(d,"URI"),o),T=y.sort().join(""),e.O.has(T)||(S=_n(y,e.g.retryParameters),A=as(e,S,6).promise,e.O.set(T,A)),Ke.A(4);break}if("identity"==g)return x(Ke,Z1(e,d,"",r,null,o),12);if(!(I=e.cc.get(g))){_=null,Ke.A(10);break}return x(Ke,I(d,"",null),11);case 11:_=Ke.h;case 10:v=_,Ke.A(6);break;case 12:v=Ke.h;case 6:if(v){if(v.keyIds)for(P=m(v.keyIds),b=P.next();!b.done;b=P.next())a.add(b.value);u.push(v)}case 4:c=l.next(),Ke.A(3);break;case 2:for(D={},R=m(t),j=R.next();!j.done;j=R.next())B=A1(U=j.value,!e.j),D[B]?D[B].push(U):D[B]=[U];for(G in H=[],D)$=ye(z=(K=D[G])[0],"FRAME-RATE"),Q=Number(ye(z,"AVERAGE-BANDWIDTH"))||Number(Ct(z,"BANDWIDTH")),He=ye(z,"RESOLUTION"),le=m(He?He.split("x"):[null,null]),at=le.next().value,ot=le.next().value,nt=ye(z,"VIDEO-RANGE"),(Xe=ye(z,"REQ-VIDEO-LAYOUT"))&&Xe.includes(",")&&(je=Xe.split(",").filter(function(Ue){return"CH-STEREO"==Ue||"CH-MONO"==Ue}),Xe=je[0]),Xe=Xe||"CH-MONO",ze=MI(e,K,i),H.push.apply(H,ee(PI(e,ze.audio,ze.video,Q,at,ot,$,nt,Xe,u,a,s)));return Ke.return(H.filter(function(Ue){return null!=Ue}))}})}(e,f,y,d,a,e.B,z),5);case 5:return o=Ge.h,s=function SI(e,t){var n=I1(t,"SUBTITLES");t=n.map(function(s){if(e.g.disableText)return null;try{return N1(e,[s],new Map).stream}catch(u){if(e.g.hls.ignoreTextStreamFailures)return null;throw u}});for(var i=(n=m(n)).next();!i.done;i=n.next()){var r=Ct(i.value,"GROUP-ID");if((i=e.L.get(r))&&(r=e.M.get(r)))for(var o=(r=m(r)).next();!o.done;o=r.next())(o=o.value).stream.codecs=i,o.stream.mimeType=tg(Pe,i)||Qd(Pe),Ra(o.stream)}return t.filter(function(s){return s})}(e,d),x(Ge,function AI(e,t,n){var i;return L(function(o){return 1==o.g?(i=t.map(function(s){var l;return L(function(c){if(1==c.g)return e.g.disableThumbnails?c.return(null):(fe(c,2),x(c,function RI(e,t){var n,i,r,o,s,u,a,l,c,d;return L(function(f){return 1==f.g?(n=Ct(t,"URI"),i=ye(t,"CODECS","jpeg")||"",e.i.has(n)?f.return(e.i.get(n)):(r=ye(t,"LANGUAGE"),o=ye(t,"NAME"),s=ye(t,"CHARACTERISTICS"),u=Zd(e,e.G++,[n],i,"image",r,!1,o,null,
1null,s,!1,null,!1),(a=ye(t,"RESOLUTION"))?x(f,u.stream.createSegmentIndex(),3):f.A(2))):(2!=f.g&&(l=fo(u.stream.segmentIndex),c=l.tilesLayout)&&(u.stream.width=Number(a.split("x")[0])*Number(c.split("x")[0]),u.stream.height=Number(a.split("x")[1])*Number(c.split("x")[1])),(d=ye(t,"BANDWIDTH"))&&(u.stream.bandwidth=Number(d)),e.i.set(n,u),f.return(u))})}(e,s),4));if(2!=c.g)return c.return(c.h.stream);if(l=Te(c),e.g.hls.ignoreImageStreamFailures)return c.return(null);throw l})}).concat(n.map(function(s){if(e.g.disableThumbnails)return null;try{var u=O1(e,s);return"image"!==u.stream.type?null:u.stream}catch(a){if(e.g.hls.ignoreImageStreamFailures)return null;throw a}})),x(o,Promise.all(i),2)):o.return(o.h.filter(function(s){return s}))})}(e,g,v),6);case 6:u=Ge.h,Ge.A(3);break;case 7:e.i.set(e.H,le=Ge.h),le.stream&&(at=Xc(le.stream),le.stream.segmentIndex.Gb(function($t){$t.Z&&($t.Z.ud=at)})),l=le.stream.type,ot=!0,(e.g.disableAudio&&"audio"==le.type||e.g.disableVideo&&"video"==le.type&&!le.stream.codecs.includes(","))&&(ot=!1),ot&&o.push({id:0,language:te(Q||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==le.type?le.stream:null,video:"video"==le.type?le.stream:null,bandwidth:le.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!e.h)throw new k(2,7,7001);if(K1(e,i),1==i.type&&(pi(e)&&(W1(e,i),e.D.ka(e.o)),Xe=Array.from(e.i.values()),Zf(e,Xe),$f(e),eg(e,i.ba,l,c,a)),e.m={presentationTimeline:e.l,variants:o,textStreams:s,imageStreams:u,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.u},e.ia||!e.g.hls.disableCodecGuessing){Ge.A(8);break}for(je=[],ze=m(e.m.variants),Ke=ze.next();!Ke.done;Ke=ze.next())(Ue=Ke.value).audio&&""===Ue.audio.codecs&&je.push(Ue.audio.createSegmentIndex()),Ue.video&&""===Ue.video.codecs&&je.push(Ue.video.createSegmentIndex());return x(Ge,Promise.all(je),8);case 8:e.h.makeTextStreamsForClosedCaptions(e.m),Z(Ge)}})}(n,i.data),3)):r.return(n.m)})},h.stop=function(){this.D&&(this.D.stop(),this.D=null);var e=[];return this.ea&&(e.push(this.ea.destroy()),this.ea=null),this.g=this.h=null,this.cb.clear(),this.m=null,this.i.clear(),this.M.clear(),this.L.clear(),this.B.clear(),this.Ba.clear(),this.wa.clear(),this.O.clear(),this.xa.clear(),this.ya.clear(),this.I.clear(),this.j&&this.j.destroy(),this.V&&(this.V.release(),this.V=null),Promise.all(e)},h.update=function(){var t,n,i,r,o,u,l,c,d,f,e=this;return L(function(g){if(1==g.g){if(!pi(e))return g.return();for(t=[],n=Array.from(e.i.values()),e.o=1/0,e.m.gapCount=0,i=n.filter(function(v){return v.stream.segmentIndex}),r=m(i),o=r.next();!o.done;o=r.next())t.push(fI(e,o.value));return x(g,Promise.all(t),2)}for(U1(e,i.map(function(v){return v.stream})),u=i.some(function(v){return 0==v.Vd}),i.length&&!u&&(eh(e,XI.ij),l=i.map(function(v){return v.qc}),e.l.qb(Math.min.apply(Math,ee(l))),e.h.updateDuration()),u&&$f(e),c=m(i),d=c.next();!d.done;d=c.next())(f=d.value).stream.isAudioMuxedInVideo||!f.stream.segmentIndex||fo(f.stream.segmentIndex)||e.h.disableStream(f.stream);Z(g)})},h.onExpirationUpdated=function(){},h.onInitialVariantChosen=function(){},h.banLocation=function(e){this.j&&this.j.banLocation(e)},h.setMediaElement=function(e){this.X=e},ue("shaka.hls.HlsParser",Jd);var ig=(new Map).set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),HI=(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"),GI=(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"),KI=(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"),WI=(new Map).set("jpg","
1image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),rg=(new Map).set("audio",HI).set("video",GI).set("text",KI).set("image",WI),eT=new Set(["video/mp2t"].concat(ee(so))),nh="VOD",tT="EVENT",ih="LIVE",XI={ij:nh,Hl:tT,Rl:ih};function rh(e){return Bd(e)}mu("application/x-mpegurl",function(){return new Jd}),mu("application/vnd.apple.mpegurl",function(){return new Jd});var zI=(new Map).set("com.microsoft.playready",rh).set("com.microsoft.playready.recommendation",rh).set("com.microsoft.playready.software",rh).set("com.microsoft.playready.hardware",rh);function og(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.u=1,this.i=null,this.D=new Nr(5),this.o=new E(function(){!function YI(e){var t;L(function(n){switch(n.g){case 1:return fe(n,2),x(n,sg(e),4);case 4:Le(n,3);break;case 2:t=Te(n),e.h&&(t.severity=1,e.h.onError(t));case 3:if(!e.h)return n.return();Z(n)}})}(e)}),this.C=new $u,this.m=new Map,this.B=function(){return!1}}function sg(e){var t,n,i,r,o,s;return L(function(a){if(1==a.g)return t=_n(e.l,e.g.retryParameters),n=e.h.networkingEngine,i=Date.now(),r=n.request(0,t,{type:5,isPreload:e.B()}),gu(e.C,r),x(a,r.promise,2);if(o=a.h,!e.h)return a.return();o.uri&&!e.l.includes(o.uri)&&e.l.unshift(o.uri);var l=o.uri,c=o.data,d=e.g.mss.manifestPreprocessor;if(d!=od){if(be("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),!(c=r1(c,"SmoothStreamingMedia")))throw new k(2,4,4046,l);d(c),c=zt(c.outerHTML)}var f=Br(c,"SmoothStreamingMedia");if(!f)throw new k(2,4,4046,l);if((l=e.g.mss.manifestPreprocessorTXml)!=sd&&l(f),e.i||(e.i=new _e(null,0)),l=Ae(f,"IsLive",ru,!1))throw new k(2,4,4047);e.i.bd(!l),d=Ae(f,"TimeScale",On,1e7),c=Ae(f,"DVRWindowLength",On),l&&(0===c||isNaN(c))&&(c=1/0);var v,g=Ae(f,"CanSeek",ru,!1);for(0===c&&g&&(c=1/0),g=null,c&&c>0&&(g=c/d),l&&!isNaN(e.g.availabilityWindowOverride)&&(g=e.g.availabilityWindowOverride),null==g&&(g=1/0),e.i.If(g),c=Ae(f,"Duration",On,1/0),l||e.i.qb(c/d),l={variants:[],textStreams:[],timescale:d,duration:c/d},g=ft(f,"Protection"),d=e.g.mss.keySystemsBySystemId,c=[],v=(g=m(g)).next();!v.done;v=g.next())c=c.concat(ft(v.value,"ProtectionHeader"));if(c.length){for(g=[],v=0;v<c.length;v++){var y=c[v],T=y.attributes.SystemID.toLowerCase(),S=d[T];if(S){var A;e:{if(A=b0(y))for(var I=(A=m(vr(A,"DATA"))).next();!I.done;I=A.next())if(I=Yt(I.value,"KID")){A=sn(fn(I)),A=Ti(A=new Uint8Array([A[3],A[2],A[1],A[0],A[5],A[4],A[7],A[6]].concat(ee(A.slice(8)))));break e}A=null}T=ir(S,"cenc",T=[{initData:kc(I=sn(fn(y)),T=Nn(T.replace(/-/g,"")),new Set,0),initDataType:"cenc",keyId:A}]),A&&T.keyIds.add(A),(S=zI.get(S))&&(T.licenseServerUri=S(y)),g.push(T)}}d=g}else d=[];for(v=d,g=[],d=[],c=[],y=(f=m(f=ft(f,"StreamIndex"))).next();!y.done;y=f.next()){S=ft(y=y.value,"QualityLevel"),T=l.timescale,A=l.duration,I=ft(y,"c");for(var _=[],P=0,b=0;b<I.length;++b){var M=I[b],D=I[b+1],R=Ae(M,"t",On),j=Ae(M,"d",On);if(M=Ae(M,"r",Mn),!j)break;if(R=R??P,(M=M||0)&&M--,M<0)if(D){if(null==(D=Ae(D,"t",On)))break;if(R>=D)break;M=Math.ceil((D-R)/j)-1}else{if(A==1/0)break;if(R/T>=A)break;M=Math.ceil((A*T-R)/j)-1}for(D=0;D<=M;++D)_.push({start:R/T,end:(P=R+j)/T,Fh:R}),R=P}for(T=_,A=(S=m(S)).next();!A.done;A=S.next())(A=qI(e,y,A.value,T,v,l))&&("audio"!=A.type||e.g.disableAudio?"video"!=A.type||e.g.disableVideo?A.type!=Pe||e.g.disableText||c.push(A):d.push(A):g.push(A))}for(f=[],v=(g=m(g.length>
10?g:[null])).next();!v.done;v=g.next())for(v=v.value,_=(y=m(d.length>0?d:[null])).next();!_.done;_=y.next())T=(S=f).push,b=0,(I=v)&&I.bandwidth&&I.bandwidth>0&&(b+=I.bandwidth),(_=_.value)&&_.bandwidth&&_.bandwidth>0&&(b+=_.bandwidth),A={id:(A=e).u++,language:I?I.language:"und",disabledUntilTime:0,primary:!!I&&I.primary||!!_&&_.primary,audio:I,video:_,bandwidth:b,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},T.call(S,A);l.variants=f,l.textStreams=c,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.kf()),Promise.resolve(),s=Date.now(),e.D.sample(1,(s-i)/1e3),Z(a)})}function qI(e,t,n,i,r,o){var s=t.attributes.Type;if("audio"!==s&&"video"!==s&&"text"!==s)return Be("Ignoring unrecognized type:",s),null;var u=t.attributes.Language,a=e.u++,l=Ae(n,"Bitrate",Hr),c=Ae(n,"MaxWidth",Hr),d=Ae(n,"MaxHeight",Hr),f=Ae(n,"Channels",Hr),g=Ae(n,"SamplingRate",Hr),v=o.duration;i.length&&(v=i[i.length-1].end-i[0].start);var y=e.i.getDuration();e.i.qb(Math.min(v,y));var T={id:a,originalId:t.attributes.Name||String(a),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:c||void 0,height:d||void 0,kind:"",encrypted:r.length>0,drmInfos:r,keyIds:new Set,language:te(u||"und"),originalLanguage:u,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:f,audioSamplingRate:g,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:v,timescale:o.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if((r=t.attributes.Subtype)&&((r=tC.get(r))&&T.roles.push(r),"main"===r&&(T.primary=!0)),(null===(r=n.attributes.FourCC)||""===r)&&(r=t.attributes.FourCC),!r)if("audio"===s)r="AAC";else if("video"===s)return Be('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!eC.includes(r.toUpperCase()))return Be("Codec not supported:",r),null;switch(n=function $I(e,t,n,i){if(e=e.attributes.CodecPrivateData)return e;if("audio"!==t)return null;t=i.channelsCount||2;var r={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 i=r[e=i.audioSamplingRate||44100],"AACH"===n?(n=new Uint8Array(4),e=r[2*e],n[0]=40|i>>1,n[1]=i<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,(t=new Uint16Array(2))[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))[0]=16|i>>1,n[1]=i<<7|t<<3,(t=new Uint16Array(1))[0]=(n[0]<<8)+n[1],t[0].toString(16))}(n,s,r,T),T.mssPrivateData.codecPrivateData=n,s){case"audio":if(!n)return Be("Quality unsupported without CodecPrivateData",s),null;T.type="audio",T.mimeType="mss/audio/mp4",T.codecs=function JI(e,t){var n=0;return"AACH"===e&&(n=5),t?0===n&&(n=(248&parseInt(t.substr(0,2),16))>>3):(n=2,"AACH"===e&&(n=5)),"mp4a.40."+n}(r,n);break;case"video":if(!n)return Be("Quality unsupported without CodecPrivateData",s),null;T.type="video",T.mimeType="mss/video/mp4",T.codecs=function ZI(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}(n);break;case"text":T.type=Pe,T.mimeType="application/mp4",("TTML"===r||"DFXP"===r)&&(T.codecs="stpp")}return T.fullMimeTypes.add(dn(T.mimeType,T.codecs)),T.createSegmentIndex=function(){if(T.segmentIndex)return Promise.resolve();if(e.m.has(T.id))var S=e.m.get(T.id);else S=[],"video"==T.type&&(S=T.mssPrivateData.codecPrivateData.split("00000001").slice(1)),S=ia(new na([S={id:T.id,type:T.type,codecs:T.codecs,encrypted:T.encrypted,timescale:T.mssPrivateData.timescale,duration:T.mssPrivateData.duration,Cb:S,Ga:new Uint8Array([]),Oa:new Uint8Array([]),Ya:0,Za:0,data:null,stream
1:T}])),e.m.set(T.id,S);return S=function QI(e,t,n,i,r){var o=i.attributes.Url.replace("{bitrate}",String(n.bandwidth));i=[];for(var s=(r=m(r)).next(),u={};!s.done;u={Lf:void 0},s=r.next())u.Lf=s.value,i.push(new Ee(u.Lf.start,u.Lf.end,function(a){return function(){return Kt(e.l,[o.replace("{start time}",String(a.Lf.Fh))])}}(u),0,null,t,0,0,n.mssPrivateData.duration));return i}(e,new bi(function(){return[]},0,null,Xc(T),T.mssPrivateData.timescale,S,null,T.encrypted),T,t,i),T.segmentIndex=new ut(S),Promise.resolve()},T.closeSegmentIndex=function(){T.segmentIndex&&(T.segmentIndex.release(),T.segmentIndex=null)},T}(h=og.prototype).configure=function(e,t){this.g=e,t&&(this.B=t)},h.start=function(e,t){var n=this;return L(function(i){if(1==i.g)return n.l=[e],n.h=t,x(i,sg(n),2);if(!n.h)throw new k(2,7,7001);return i.return(n.j)})},h.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,null!=this.o&&(this.o.stop(),this.o=null),this.m.clear(),this.C.destroy()},h.update=function(){var t,e=this;return L(function(n){return 1==n.g?(fe(n,2),x(n,sg(e),4)):2!=n.g?Le(n,0):(t=Te(n),e.h&&t?(e.h.onError(t),void Z(n)):n.return())})},h.onExpirationUpdated=function(){},h.onInitialVariantChosen=function(){},h.banLocation=function(){},h.setMediaElement=function(){},ue("shaka.mss.MssParser",og);var eC="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),tC=(new Map).set("CAPT","main").set("SUBT","alternate").set("DESC","main");function nT(e,t,n,i,r,o,s){if(n>=200&&n<=299&&202!=n||304==n)return{uri:r||i,originalUri:i,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:o};o=null;try{o=wn(t)}catch{}throw new k(401==n||403==n?2:1,1,1001,i,n,o,e,s,r||i)}function ug(){}function oh(e,t,n,i,r,o){var s=new uC;try{Zu(t.headers).forEach(function(c,d){s.append(d,c)})}catch(c){return Rs(new k(1,1,1002,e,c,n))}var u=new oC,a={Qh:!1,dj:!1};if(e=function nC(e,t,n,i,r,o,s,u,a){var l,c,d,f,g,v,y,T,S,A,I,P,b,M;return L(function(D){switch(D.g){case 1:return l=rC,c=sC,f=new ArrayBuffer(0),v=g=0,y={},T=Date.now(),fe(D,2),x(D,l(e,i),4);case 4:if(y=function iC(e){var t={};return e.forEach(function(n,i){t[i.trim()]=n}),t}((d=D.h).headers),s(y),"HEAD"==i.method){D.A(5);break}return A=(S=d.headers.get("Content-Length"))?parseInt(S,10):0,d.body?(I=d.clone().body.getReader(),new c({start:function(R){!function j(){var U,B,H;return L(function(K){switch(K.g){case 1:return fe(K,2),x(K,I.read(),4);case 4:U=K.h,Le(K,3);break;case 2:return Te(K),K.return();case 3:if(U.done){K.A(5);break}if(g+=U.value.byteLength,!u){K.A(5);break}return x(K,u(U.value),5);case 5:B=Date.now(),H=g-v,(B-T>100&&H>=a||U.done)&&(o(B-T,H,U.done?0:A-g),v=g,T=B),U.done?R.close():(R.enqueue(U.value),j()),Z(K)}})}()}}),x(D,d.arrayBuffer(),8)):x(D,d.arrayBuffer(),9);case 8:f=D.h,D.A(5);break;case 9:f=D.h,P=Date.now(),o(P-T,f.byteLength,0);case 5:t.headers.Range&&2==(b=t.headers.Range.replace("bytes=","").split("-").filter(function(R){return R}).map(function(R){return parseInt(R,10)})).length&&f.byteLength!=b[1]-b[0]+1&&Be("Payload length does not match range requested bytes",t,d),Le(D,3);break;case 2:throw M=Te(D),r.Qh?new k(1,1,7001,e,n):r.dj?new k(1,1,1003,e,n):new k(1,1,1002,e,M,n);case 3:return D.return(nT(y,f,d.status,e,d.url,t,n))}})}(e,t,n,{body:t.body||void 0,headers:s,method:t.method,signal:u.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},a,i,r,t.streamDataCallback,o.minBytesForProgressEvents||0),e=new mn(e,function(){return a.Qh=!0,u.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var l=new E(function(){a.dj=!0,u.abort()});l.ka(t/1e3),e.finally(function(){l.stop()})}return e}function iT(){if(!X.ReadableStream)return!1;try{new ReadableStream({})}catch{return!1}return!!X.Response&&!!new Response("").body&&!(!X.fetch||"polyfill"in X.fetch||!X.AbortController)}mu("application/vnd.ms-sstr+xml",function(){return new og}),ue("shaka.net.HttpFetchPlugin",ug),ug.isSupported=iT,ug.parse=oh;var rC=X.fetch,oC=X.AbortController,sC=X.ReadableStream,uC=X.Headers;function rT(){}function sh(e,t,n,i,r,o){var s=new aC,u=Date.now(),a=0;return new mn(new Promise(function(c,d){s.open(t.method,e,!0),s.responseType="arraybuffer",s.timeout=t.retryParameters.timeout,s.withCredentials=t.allowCrossSiteCredentials;var f={};
1for(var g in s.onabort=function(){d(new k(1,1,7001,e,n))},s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.HEADERS_RECEIVED){for(var v=s.getAllResponseHeaders().trim().split("\r\n"),y={},T=(v=m(v)).next();!T.done;T=v.next())y[(T=T.value.split(": "))[0].toLowerCase()]=T.slice(1).join(": ");r(f=y)}},s.onload=function(v){var y=s.response;try{i(Date.now()-u,v.loaded-a,0);var T=nT(f,y,s.status,e,s.responseURL,t,n);c(T)}catch(S){d(S)}},s.onerror=function(v){d(new k(1,1,1002,e,v,n))},s.ontimeout=function(){d(new k(1,1,1003,e,n))},s.onprogress=function(v){var y=Date.now(),S=v.loaded-a;(y-u>100&&S>=(o.minBytesForProgressEvents||0)||v.lengthComputable&&v.loaded==v.total)&&(i(y-u,S,4==s.readyState?0:v.total-v.loaded),a=v.loaded,u=y)},t.headers)try{s.setRequestHeader(g.toLowerCase(),t.headers[g])}catch(v){throw new k(1,1,1002,e,v,n)}s.send(t.body)}),function(){return s.abort(),Promise.resolve()})}iT()&&(Yo("http",oh,2,!0),Yo("https",oh,2,!0),Yo("blob",oh,2,!0)),ue("shaka.net.HttpXHRPlugin",rT),rT.parse=sh;var aC=X.XMLHttpRequest;function oT(e,t,n,i,r){this.g=e,this.i=t,this.groupId=n,this.h=i,this.j=r}function ag(e){var t=e.Zb(!1);return t?Vn(t):e.P().map(function(n){return"{"+encodeURI(n.split("#xywh=")[0])+"}"}).join("")+":"+e.startByte+":"+e.endByte}function lC(e,t){return vl(e.g.P(),e.g.startByte,e.g.endByte,t.streaming.retryParameters)}function sT(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function uT(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}function aT(e){return 0==e.i?0:e.j/e.i}function lg(e){var t=this;this.u=e,this.i=new Map,this.h=new Ju(function(){return cg(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new sT,this.l=!1}function cg(e){e.l=!0;var t=e.j.map(function(n){return n()});return e.j=[],Promise.all(t)}function dC(e,t,n,i,r,o){Ut(e.h);var s=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new k(2,9,7001);if(r){var u=oe(n);for(var a in(u=new Gh(u)).data){var l=Number(a);e.m(u.data[l],u.g[l])}}return e.g.close(i,n.byteLength),e.o(aT(e.g),e.g.g),o(n)});e.i.set(t,s)}function uh(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new At,e.onabort=function(i){i.preventDefault(),n.g.reject()},e.onerror=function(i){i.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}function dg(e,t){return new Promise(function(n,i){var r=e.h.openCursor();r.onerror=i,r.onsuccess=function(){var o;return L(function(s){if(1==s.g)return null==r.result?(n(),s.return()):x(s,t((o=r.result).key,o.value,o),2);o.continue(),Z(s)})}})}function hg(e){this.h=e,this.g=[]}function _u(e,t){return ah(e,t,"readwrite")}function ah(e,t,n){var i=new uh(n=e.h.transaction([t],n),t);return e.g.push(i),i.promise().then(function(){Ki(e.g,i)},function(){Ki(e.g,i)}),i}function Du(e,t,n){this.h=new hg(e),this.i=t,this.g=n}function lT(e){return Promise.reject(new k(2,9,9011,"Cannot add new value to "+e))}function cT(e,t,n,i){t=(e=_u(e.h,t)).store();for(var r=(n=m(n)).next(),o={};!r.done;o={Qg:void 0},r=n.next())o.Qg=r.value,t.delete(o.Qg).onsuccess=function(s){return function(){return i(s.Qg)}}(o);return e.promise()}function dT(e,t,n){var i,r,o,s,u,a,l;return L(function(c){if(1==c.g){for(i=ah(e.h,t,"readonly"),r=i.store(),o={},s=[],u=m(n),a=u.next(),l={};!a.done;l={Cf:void 0,ef:void 0},a=u.next())l.ef=a.value,l.Cf=r.get(l.ef),l.Cf.onsuccess=function(d){return function(){null==d.Cf.result&&s.push(d.ef),o[d.ef]=d.Cf.result}}(l);return x(c,i.promise(),2)}if(s.length)throw new k(2,9,9012,"Could not find values for "+s);return c.return(n.map(function(d){return o[d]}))})}function zl(e){this.g=new hg(e)}function Oi(){this.g=new Map}function hT(e){var t=null;
1if(e.g.forEach(function(n,i){n.getCells().forEach(function(r,o){r.hasFixedKeySpace()||t||(t={path:{Sb:i,eb:o},eb:r})})}),t)return t;throw new k(2,9,9013,"Could not find a cell that supports add-operations")}function lh(e,t,n){if(!(e=e.g.get(t)))throw new k(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new k(2,9,9013,"Could not find cell with name "+n);return t}function pT(e,t){Yl.set(e,t)}Yo("http",sh,1,!0),Yo("https",sh,1,!0),Yo("blob",sh,1,!0),sT.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}},lg.prototype.destroy=function(){return this.h.destroy()},lg.prototype.queue=function(e,t,n,i,r){var o=this;Ut(this.h);var s=(this.i.get(e)||Promise.resolve()).then(function(){var u,a,l,c,d;return L(function(v){if(1==v.g)return x(v,function pC(e,t){var i,r,o;return L(function(s){return 1==s.g?(i=e.u.request(Xr,t),e.j.push(r=function(){return i.abort()}),x(s,i.promise,2)):(o=s.h,Ki(e.j,r),s.return(o.data))})}(o,t),2);if(u=v.h,o.h.g)throw new k(2,9,7001);if(i)for(c in a=oe(u),(l=new Gh(a)).data)d=Number(c),o.m(l.data[d],l.g[d]);return o.g.close(n,u.byteLength),o.o(aT(o.g),o.g.g),v.return(r(u))})});return this.i.set(e,s),s},uh.prototype.abort=function(){var e=this;return L(function(t){if(1==t.g){try{e.i.abort()}catch{}return fe(t,2),x(t,e.g,4)}if(2!=t.g)return Le(t,0);Te(t),Z(t)})},uh.prototype.store=function(){return this.h},uh.prototype.promise=function(){return this.g},hg.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))},(h=Du.prototype).destroy=function(){return this.h.destroy()},h.hasFixedKeySpace=function(){return!0},h.addSegments=function(){return lT(this.i)},h.removeSegments=function(e,t){return cT(this,this.i,e,t)},h.getSegments=function(e){var t=this;return L(function(i){return 1==i.g?x(i,dT(t,t.i,e),2):i.return(i.h.map(function(r){return t.Sh(r)}))})},h.addManifests=function(){return lT(this.g)},h.updateManifest=function(){return Promise.reject(new k(2,9,9016,"Cannot modify values in "+this.g))},h.updateManifestExpiration=function(e,t){var n=_u(this.h,this.g),i=n.store();return i.get(e).onsuccess=function(r){(r=r.target.result)&&(r.expiration=t,i.put(r,e))},n.promise()},h.removeManifests=function(e,t){return cT(this,this.g,e,t)},h.getManifests=function(e){var t=this;return L(function(i){return 1==i.g?x(i,dT(t,t.g,e),2):i.return(Promise.all(i.h.map(function(r){return t.Od(r)})))})},h.getAllManifests=function(){var t,n,e=this;return L(function(i){return 1==i.g?(t=ah(e.h,e.g,"readonly"),n=new Map,x(i,dg(t,function(r,o){return L(function(u){if(1==u.g)return x(u,e.Od(o),2);n.set(r,u.h),Z(u)})}),2)):3!=i.g?x(i,t.promise(),3):i.return(n)})},h.Sh=function(e){return e},h.Od=function(e){return Promise.resolve(e)},h.add=function(e,t){var i,r,o,s,u,a,n=this;return L(function(c){if(1==c.g){for(i=_u(n.h,e),r=i.store(),o=[],s=m(t),u=s.next(),a={};!u.done;a={eh:void 0},u=s.next())a.eh=r.add(u.value),a.eh.onsuccess=function(d){return function(){o.push(d.eh.result)}}(a);return x(c,i.promise(),2)}return c.return(o)})},zl.prototype.destroy=function(){return this.g.destroy()},zl.prototype.getAll=function(){var t,n,e=this;return L(function(i){return 1==i.g?(t=ah(e.g,"session-ids","readonly"),n=[],x(i,dg(t,function(r,o){n.push(o)}),2)):3!=i.g?x(i,t.promise(),3):i.return(n)})},zl.prototype.add=function(e){for(var t=_u(this.g,"session-ids"),n=t.store(),i=(e=m(e)).next();!i.done;i=e.next())n.add(i.value);return t.promise()},zl.prototype.remove=function(e){var n,t=this;return L(function(i){return 1==i.g?x(i,dg(n=_u(t.g,"session-ids"),function(r,o,s){e.includes(o.sessionId)&&s.delete()}),2):x(i,n.promise(),0)})},Oi.prototype.destroy=function(){for(var e=[],t=m(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},Oi.prototype.init=function(){var e=this;Yl.forEach(function(r,o){(r=r())&&e.g.set(o,r)});for(var t=[],n=m(this.g.values()),i=n.next();!i.done;i=n.next())t.push(i.value.init());return Promise.all(t)},ue("shaka.offline.StorageMuxer",Oi),Oi.unregister=function(e){Yl.delete(e)},Oi.register=pT,Oi.prototype.destroy=Oi.prototype.destroy;var Yl=new Map;function ql(){Du.apply(this,arguments)}function TC(e,t){!function xC(e){var t=e.streams.filter(function(u){return"audio"==u.contentType});if(e=e.streams.filter(function(u){return"video"==u.contentType}),!t.every(function(u){return u.variantIds})||!e.every(function(u){return u.variantIds})){for(var n=m(t),i=n.next();!i.done;i=n.next())i.value.variantIds=[];for(i=(n=m(e)).next();!i.done;i=n.next())i.value.variantIds=[];if(n=0,e.length&&!t.length){i=n++;for(var r=m(e),o=r.next();!o.done;o=r.next())o.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,o=(r=m(t)).next();!o.done;o=r.next())o.value.variantIds.push(i);if(e.length&&t.length)for(i=(t=m(t)).next();!i.done;i=t.next())for(i=i.value,o=(r=m(e)).next();!o.done;o=r.next()){o=o.value;var s=n++;i.variantIds.push(s),o.variantIds.push(s)}}}(e);for(var n=m(e.streams),i=n.next();!i.done;i=n.next());return e.streams.map(function(r){return function wC(e,t,n){var i=e.initSegmentUri?fT(e.initSegmentUri):null,r=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:i,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(s){var u=fT(s.uri);return{startTime:t+s.startTime,endTime:t+s.endTime,dataKey:u,initSegmentKey:i,appendWindowStart:t,appendWindowEnd:o,timestampOffset:r,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}}(r,e.startTime,t)})}function fT(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 k(2,9,9004,"Could not parse uri "+e)}function ch(){Du.apply(this,arguments)}function SC(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(i){return{startTime:t+i.startTime,endTime:t+i.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:i.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 pg(){Du.apply(this,arguments)}function gT(){this.m=this.j=this.i=this.h=this.g=this.l=null}wt(ql,Du),ql.prototype.updateManifestExpiration=function(e,t){var i,r,o,n=this;
1return L(function(s){return i=_u(n.h,n.g),r=i.store(),o=new At,r.get(e).onsuccess=function(u){(u=u.target.result)?(u.expiration=t,r.put(u),o.resolve()):o.reject(new k(2,9,9012,"Could not find values for "+e))},x(s,Promise.all([i.promise(),o]),0)})},ql.prototype.Od=function(e){var t,n,o;return L(function(u){if(1==u.g){for(t=[],n=0;n<e.periods.length;++n)o=TC(e.periods[n],(n==e.periods.length-1?e.duration:e.periods[n+1].startTime)-e.periods[n].startTime),t.push(o);return x(u,q0(t),2)}return u.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:e.expiration??1/0,streams:u.h,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})},ql.prototype.Sh=function(e){return{data:e.data}},wt(ch,Du),ch.prototype.Od=function(e){var t,n,r;return L(function(u){if(1==u.g){for(t=[],n=0;n<e.periods.length;++n){r=(n==e.periods.length-1?e.duration:e.periods[n+1].startTime)-e.periods[n].startTime;for(var a=e.periods[n],l=[],c=m(a.streams),d=c.next();!d.done;d=c.next())0!=(d=d.value).variantIds.length&&l.push(SC(d,a.startTime,a.startTime+r));t.push(l)}return x(u,q0(t),2)}return u.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:e.expiration??1/0,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:u.h,sequenceMode:!1})})},wt(pg,Du),(h=pg.prototype).hasFixedKeySpace=function(){return!1},h.addSegments=function(e){return this.add(this.i,e)},h.addManifests=function(e){return this.add(this.g,e)},h.updateManifest=function(e,t){return function fC(e,t,n){var i=(e=_u(e.h,e.g)).store();return i.get(t).onsuccess=function(){i.put(n,t)},e.promise()}(this,e,t)},h.Od=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(h=gT.prototype).init=function(){var e=this,t=new At,n=!1,i=new E(function(){n=!0,t.reject(new k(2,9,9017))});"number"==typeof dh&&dh>0&&i.ka(dh);var r=X.indexedDB.open("shaka_offline_db",5);return r.onsuccess=function(){if(!n){i.stop();var o=r.result;e.l=o;var s=o.objectStoreNames;s=s.contains("manifest")&&s.contains("segment")?new ql(o,"segment","manifest"):null,e.g=s,s=(s=o.objectStoreNames).contains("manifest-v2")&&s.contains("segment-v2")?new ch(o,"segment-v2","manifest-v2"):null,e.h=s,s=(s=o.objectStoreNames).contains("manifest-v3")&&s.contains("segment-v3")?new ch(o,"segment-v3","manifest-v3"):null,e.i=s,s=(s=o.objectStoreNames).contains("manifest-v5")&&s.contains("segment-v5")?new pg(o,"segment-v5","manifest-v5"):null,e.j=s,o=o.objectStoreNames.contains("session-ids")?new zl(o):null,e.m=o,t.resolve()}},r.onupgradeneeded=function(){for(var o=r.result,s=m(["segment-v5","manifest-v5","session-ids"]),u=s.next();!u.done;u=s.next())o.objectStoreNames.contains(u=u.value)||o.createObjectStore(u,{autoIncrement:!0})},r.onerror=function(o){n||(i.stop(),t.reject(new k(2,9,9001,r.error)),o.preventDefault())},t},h.destroy=function(){var e=this;return L(function(t){switch(t.g){case 1:if(!e.g){t.A(2);break}return x(t,e.g.destroy(),2);case 2:if(!e.h){t.A(4);break}return x(t,e.h.destroy(),4);case 4:if(!e.i){t.A(6);break}return x(t,e.i.destroy(),6);case 6:if(!e.j){t.A(8);break}return x(t,e.j.destroy(),8);case 8:if(!e.m){t.A(10);break}return x(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),Z(t)}})},h.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},h.getEmeSessionCell=function(){return this.m},h.erase=function(){var e=this;return L(function(t){switch(t.g){case 1:if(!e.g){t.A(2);break}return x(t,e.g.destroy(),2);case 2:if(!e.h){t.A(4);break}return x(t,e.h.destroy(),4);case 4:if(!e.i){t.A(6);break}return x(t,e.i.destroy(),6);case 6:if(!e.j){t.A(8);break}return x(t,e.j.destroy(),8);case 8:return e.l&&e.l.close(),x(t,function AC(){var e=new At,t=X.indexedDB.deleteDatabase("shaka_offline_db");return t.onblocked=function(){},t.onsuccess=function(){e.resolve()},t.onerror=function(n){e.reject(new k(2,9,9001,t.error)),n.preventDefault()},e}(),10);case 10:return e.l=null,e.g=null,e.h=null,e.i=null,e.j=null,x(t,e.init(),0)}})};var dh=5;function Do(e,t,n,i){this.g=e,this.i=t,this.h=n,this.l=i,this.j=["offline:",e,"/",t,"/",n,"/",i].join("")}function fg(e){if(null==(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var n=e[2];if(!n)return null;var i=e[3];return i&&null!=t?new Do(t,n,i,Number(e[4])):null}function mT(e,t){this.h=e,this.g=t}function vT(e,t){var n=new _e(null,0);n.qb(t.duration);var i=t.streams.filter(function(l){return"audio"==l.type}),r=t.streams.filter(function(l){return"video"==l.type});i=function EC(e,t,n,i){for(var r=new Set,o=m(t),s=o.next();!s.done;s=o.next())for(var u=(s=m(s.value.variantIds)).next();!u.done;u=s.next())r.add(u.value);for(s=(o=m(n)).next();!s.done;s=o.next())for(u=(s=m(s.value.variantIds)).next();!u.done;u=s.next())r.add(u.value);for(o=new Map,s=(r=m(r)).next();!s.done;s=r.next())o.set(s=s.value,{id:s,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(r=(t=m(t)).next();!r.done;r=t.next())for(r=hh(e,s=r.value,i),u=(s=m(s.variantIds)).next();!u.done;u=s.next())(u=o.get(u.value)).language=r.language,u.primary=u.primary||r.primary,u.audio=r;for(t=(n=m(n)).next();!t.done;t=n.next())for(t=hh(e,r=t.value,i),s=(r=m(r.variantIds)).next();!s.done;s=r.next())(s=o.get(s.value)).primary=s.primary||t.primary,s.video=t;return o}(e,i,r,n),r=t.streams.filter(function(l){return l.type==Pe}).map(function(l){return hh(e,l,n)});var o=t.streams.filter(function(l){return"image"==l.type}).map(function(l){return hh(e,l,n)}),s=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var u=m(i.values()),a=u.next();!a.done;a=u.next())(a=a.value).audio&&a.audio.encrypted&&(a.audio.drmInfos=s),a.video&&a.video.encrypted&&(a.video.drmInfos=s);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(i.values()),textStreams:r,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 hh(e,t,n){var i=t.segments.map(function(r){return function IC(e,t,n){var i=new Do("segment",e.h,e.g,t.dataKey);return(e=new Ee(t.startTime,t.endTime,function(){return[i.toString()]},0,null,null!=t.initSegmentKey?function CC(e,t){var n=new Do("segment",e.h,e.g,t);return new bi(function(){return[n.toString()]},0,null)}(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||"")).mimeType=t.mimeType||n.mimeType||"",e.codecs=t.codecs||n.c
1odecs||"",t.thumbnailSprite&&e.Jf(t.thumbnailSprite),e}(e,r,t)});return n.ee(i),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ut(i),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([dn(t.mimeType,t.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null}}function yT(){this.g=null}function TT(){}function wT(e,t){var n=fg(e);return e=n&&"manifest"==n.g?qu(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t}):n&&"segment"==n.g?function MC(e,t,n){var i=new Oi;return qu(void 0).Wa(function(){return i.init()}).Wa(function(){return lh(i,t.Sb(),t.eb())}).Wa(function(r){return r.getSegments([t.key()])}).Wa(function(r){return{uri:t,data:r[0].data,headers:{},originalRequest:n}}).finally(function(){return i.destroy()})}(n.key(),n,t):Rs(new k(2,1,9004,e)),e}function xT(e,t,n){var i,r,o,u;return L(function(l){switch(l.g){case 1:i=[];for(var c=[],d=m(n),f=d.next();!f.done;f=d.next()){f=f.value;for(var g=!1,v=m(c),y=v.next();!y.done;y=v.next())if(_C((y=y.value).info,f)){y.sessionIds.push(f.sessionId),g=!0;break}g||c.push({info:f,sessionIds:[f.sessionId]})}r=m(c),o=r.next();case 2:if(o.done){l.A(4);break}return u=function kC(e,t,n){var i,r;return L(function(o){switch(o.g){case 1:return i=new _c({sc:t,onError:function(){},uf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),fe(o,2),i.configure(e),x(o,function fx(e,t,n,i,r,o){var s,u,a,l,c;return L(function(d){return 1==d.g?(s=[],o.length&&s.push(o[0].contentType),r.length&&s.push(r[0].contentType),u=function(f){return(f=ir(t,f,null)).licenseServerUri=n,f.serverCertificate=i,f.persistentStateRequired=!0,f.sessionType="persistent-license",f},(a=Za(s)).video&&(l=u(o[0].encryptionScheme||""),a.video.drmInfos.push(l)),a.audio&&(c=u(r[0].encryptionScheme||""),a.audio.drmInfos.push(c)),x(d,Wn([a],!0,e.O,[]),2)):(Ut(e.l),d.return(xm(e,[a])))})}(i,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:Le(o,3);break;case 2:return Te(o),x(o,i.destroy(),5);case 5:return o.return([]);case 3:return r=[],x(o,Promise.all(n.sessionIds.map(function(s){return L(function(u){return 1==u.g?(fe(u,2),x(u,function vx(e,t){var n,i,r;return L(function(o){return 1==o.g?x(o,Am(e,t,{initData:null,initDataType:null}),2):3!=o.g?(n=o.h)?(i=[],(r=e.i.get(n))&&(r.Mb=new At,i.push(r.Mb)),i.push(n.remove()),x(o,Promise.all(i),3)):o.return():(e.i.delete(n),void Z(o))})}(i,s),4)):2!=u.g?(r.push(s),Le(u,0)):(Te(u),void Z(u))})})),6);case 6:return x(o,i.destroy(),7);case 7:return o.return(r)}})}(e,t,o.value),x(l,u,5);case 5:i=i.concat(l.h),o=r.next(),l.A(2);break;case 4:return l.return(i)}})}function _C(e,t){function n(i,r){return i.robustness==r.robustness&&i.contentType==r.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&As(e.audioCapabilities,t.audioCapabilities,n)&&As(e.videoCapabilities,t.videoCapabilities,n)}function gg(e,t){var n=vT(new mT(e.Sb(),e.eb()),t),i=t.appMetadata||{};return n=ST(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:i,isIncomplete:t.isIncomplete||!1}}function ST(e){for(var t=[],n=Mo(e.variants),i=(n=m(n)).next();!i.done;i=n.next())t.push(Sn(i.value));for(n=(e=m(e.textStreams)).next();!n.done;n=e.next())t.push(an(n.value));return t}function LC(){this.g=new Map}function PC(e,t){var n=t.audio,i=t.video;
1if(n&&!i&&e.g.set(n.id,n.bandwidth||t.bandwidth),!n&&i&&e.g.set(i.id,i.bandwidth||t.bandwidth),n&&i){var r=n.bandwidth||393216,o=i.bandwidth||t.bandwidth-r;o<=0&&(o=t.bandwidth),e.g.set(n.id,r),e.g.set(i.id,o)}}function bC(e,t){e.g.set(t.id,t.bandwidth||2048)}function AT(e,t){return null==(e=e.g.get(t))&&(e=0),e}function Gn(e){var t=this;if(e&&e.constructor!=W)throw new k(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.Qb()):(this.h=ma(),this.g=new Wt,this.g.configure(this.h.networking)),this.i=[],this.l=[];var n=!e;this.j=new Ju(function(){var i,r,o,s;return L(function(a){switch(a.g){case 1:return x(a,Promise.all(t.l.map(function(l){return cg(l)})),2);case 2:for(i=function(){},r=[],o=m(t.i),s=o.next();!s.done;s=o.next())r.push(s.value.then(i,i));return x(a,Promise.all(r),3);case 3:if(!n){a.A(4);break}return x(a,t.g.destroy(),4);case 4:t.h=null,t.g=null,Z(a)}})}),this.m=1e9}function mg(){if(_o(Ne()))e:{for(var e=m(Yl.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function ET(e){var t,n,i;return L(function(o){switch(o.g){case 1:return x(o,(t=new Oi).init(),2);case 2:return x(o,hT(t),3);case 3:return i=new Do("manifest",(n=o.h).path.Sb,n.path.eb,e),x(o,t.destroy(),4);case 4:return x(o,(new Gn).remove(i.toString()),0)}})}function IT(e,t,n,i,r,o){var s,u,a,l,d,f,g,v,y,T;return L(function(S){switch(S.g){case 1:for(s=!1,fe(S,2),u=!0,a=m(n.streams),l=a.next();!l.done;l=a.next())for(d=m(l.value.segments),f=d.next();!f.done;f=d.next())null!=(v=(g=f.value).pendingSegmentRefId?i[g.pendingSegmentRefId]:null)&&(g.dataKey=v,g.pendingSegmentRefId=void 0),null!=(v=g.pendingInitSegmentRefId?i[g.pendingInitSegmentRefId]:null)&&(g.initSegmentKey=v,g.pendingInitSegmentRefId=void 0),g.pendingSegmentRefId&&(u=!1),g.pendingInitSegmentRefId&&(u=!1);return n.size+=r,u&&(n.isIncomplete=!1),x(S,e.updateManifest(t,n),4);case 4:s=!0,o(),Le(S,0);break;case 2:return y=Te(S),x(S,ET(t),5);case 5:if(s){S.A(6);break}return T=Object.values(i),x(S,e.removeSegments(T,function(){}),6);case 6:throw y}})}function vg(e){return e.variants.some(function(t){return t.video&&t.video.encrypted||t.audio&&t.audio.encrypted})}function CT(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 MT(e,t,n,i){if(t.expiration=n.Td(),n=wm(n),t.sessionIds=i?n:[],vg(e)&&i&&!n.length)throw new k(2,9,9007)}function kT(e,t){for(var n=[],i=m(e.streams),r=i.next();!r.done;r=i.next())r=r.value,t&&"video"==r.type?n.push({contentType:dn(r.mimeType,r.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=r.type||n.push({contentType:dn(r.mimeType,r.codecs),robustness:e.drmInfo.audioRobustness});return n}function BC(e,t,n){return L(function(i){return x(i,function ZC(e,t,n,i){var r,o,s;return L(function(u){return 1==u.g?i.drmInfo?(r=function vC(e){var t=Array.from(e.g.keys());if(!t.length)throw new k(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(n),o=i.sessionIds.map(function(a){return{sessionId:a,keySystem:i.drmInfo.keySystem,licenseUri:i.drmInfo.licenseServerUri,serverCertificate:i.drmInfo.serverCertificate,audioCapabilities:kT(i,!1),videoCapabilities:kT(i,!0)}}),x(u,xT(t,e,o),2)):u.return():3!=u.g?x(u,r.remove(s=u.h),3):x(u,r.add(o.filter(function(a){return!s.includes(a.sessionId)})),0)})}(e.g,e.h.drm,n,t),0)})}function FC(e,t,n){function i(){}var r=function JC(e){for(var t=new Set,n=(e=m(e.streams)).next();!n.done;n=e.next())for(var i=(n=m(n.value.segments)).next();!i.done;i=n.next())null!=(i=i.value).initSegmentKey&&t.add(i.initSegmentKey),t.add(i.dataKey);return Array.from(t)}(n);return gg(t,n),Promise.all([e.removeSegments(r,i),e.removeManifests([t.key()],i)])}function _T(e,t){var n;return L(function(i){switch(i.g){case 1:return fe(i,2),x(i,Eu(t,e.g,e.h.streaming.retryParameters),4);case 4:n=i.h,Le(i,3);break;case 2:Te(i);case 3:if(n)return i.return(n);throw new k(1,2,2011,t)}})}function YC(e,t,n,i,r,o){var s={id:i.id,originalId:i.originalId,groupId:i.groupId,primary:i.primary,type:i.type,mimeType:i.mimeType,codecs:i.codecs,frameRate:i.frameRate,pixelAspectRatio:i.pixelAspectRatio,hdr:i.hdr,colorGamut:i.colorGamut,videoLayout:i.videoLayout,kind:i.kind,language:i.language,originalLanguage:i.originalLanguage,label:i.label,width:i.width||null,height:i.height||null,encrypted:i.encrypted,keyIds:i.keyIds,segments:[],variantIds:[],roles:i.roles,forced:i.forced,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,closedCaptions:i.closedCaptions,tilesLayout:i.tilesLayout,mssPrivateData:i.mssPrivateData,external:i.external,fastSwitching:i.fastSwitching,isAudioMuxedInVideo:i.isAudioMuxedInVideo},u=r.offline.numberOfParallelDownloads,a=0===u?i.id:0;return function qC(e,t,n){if(null!=(t=e.segmentIndex.find(t)))for(var i=e.segmentIndex.get(t);i;)n(i,t),i=e.segmentIndex.get(++t)}(i,n.presentationTimeline.Ib(),function(l,c){var d=ag(l),f=void 0;if(!o.has(d)){var g=l.endTime-l.startTime;g=AT(t,i.id)*g,g=uT(e.g,g),o.set(d,new oT(l,g,a,!1,c))}l.Z&&(f=ag(l.Z),o.has(f)||(g=.5*AT(t,i.id),g=uT(e.g,g),o.set(f,new oT(l.Z,g,a,!0,c)))),s.segments.push({pendingInitSegmentRefId:f,initSegmentKey:f?0:null,
1startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:d,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite}),0!==u&&(a=(a+1)%u)}),s}function or(e){if(e.j.g)throw new k(2,9,7001)}function ph(){if(!mg())throw new k(2,9,9e3)}function yg(e,t){return L(function(n){return 1==n.g?(e.i.push(t),pn(n,2),x(n,t,4)):2!=n.g?n.return(n.h):(Tn(n),Ki(e.i,t),En(n,0))})}function DT(e){for(var t=new Set,n=m(e.variants),i=n.next();!i.done;i=n.next())(i=i.value).audio&&t.add(i.audio),i.video&&t.add(i.video);for(i=(n=m(e.textStreams)).next();!i.done;i=n.next())t.add(i.value);for(n=(e=m(e.imageStreams)).next();!n.done;n=e.next())t.add(n.value);return t}ue("shaka.offline.indexeddb.StorageMechanismOpenTimeout",dh),pT("idb",function(){return Ne().yh()?new gT:null}),Do.prototype.Sb=function(){return this.i},Do.prototype.eb=function(){return this.h},Do.prototype.key=function(){return this.l},Do.prototype.toString=function(){return this.j},(h=yT.prototype).configure=function(){},h.start=function(e,t){var i,r,u,a,l,n=this;return L(function(c){switch(c.g){case 1:if(i=fg(e),n.g=i,null==i||"manifest"!=i.g)throw new k(2,1,9004,e);return r=new Oi,pn(c,2),x(c,r.init(),4);case 4:return x(c,lh(r,i.Sb(),i.eb()),5);case 5:return x(c,c.h.getManifests([i.key()]),6);case 6:return u=c.h[0],a=new mT(i.Sb(),i.eb()),l=vT(a,u),t.makeTextStreamsForClosedCaptions(l),c.return(l);case 2:return Tn(c),x(c,r.destroy(),7);case 7:En(c,0)}})},h.stop=function(){return Promise.resolve()},h.update=function(){},h.onExpirationUpdated=function(e,t){var i,r,o,u,a,l,n=this;return L(function(c){switch(c.g){case 1:return i=n.g,r=new Oi,fe(c,2,3),x(c,r.init(),5);case 5:return x(c,lh(r,i.Sb(),i.eb()),6);case 6:return x(c,(o=c.h).getManifests([i.key()]),7);case 7:if(a=(u=c.h[0]).sessionIds.includes(e),l=null==u.expiration||u.expiration>t,!a||!l){c.A(3);break}return x(c,o.updateManifestExpiration(i.key(),t),3);case 3:return Tn(c),x(c,r.destroy(),10);case 10:En(c,0);break;case 2:Te(c),c.A(3)}})},h.onInitialVariantChosen=function(){},h.banLocation=function(){},h.setMediaElement=function(){},mu("application/x-offline-manifest",function(){return new yT}),ue("shaka.offline.OfflineScheme",TT),TT.plugin=wT,Yo("offline",wT),(h=Gn.prototype).destroy=function(){return this.j.destroy()},h.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=td(e,t)),ts(this.h,e)},h.getConfiguration=function(){var e=ma();return ts(e,this.h,ma()),e},h.Qb=function(){return this.g},h.store=function(e,t,n,i,r){var o=this,s=this.getConfiguration(),u=new lg(this.g);return this.l.push(u),t=function RC(e,t,n,i,r,o,s,u){var a,l,c,d,f,g,v,T,S,_,P,b,D,R,j,U,B,H,G,K;return L(function(z){switch(z.g){case 1:return ph(),l=a=null,c=new Oi,g=f=d=null,fe(z,2,3),x(z,o(),5);case 5:return x(z,function GC(e,t,n,i){var r,s,u,a;return L(function(l){if(1==l.g)return r=null,s={networkingEngine:e.g,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(c){r=c},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return i.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},n.configure(i.manifest),or(e),x(l,n.start(t,s),2);if(3!=l.g)return u=l.h,or(e),a=DT(u),x(l,Promise.all(Vh(a,function(c){return c.createSegmentIndex()})),3);if(or(e),r)throw r;return l.return(u)})}(e,t,a=z.h,s),6);case 6:if(v=z.h,or(e),v.presentationTimeline.W()||v.presentationTimeline.Vc())throw new k(2,9,9005,t);T=m(i),S=T.next();case 7:if(S.done){z.A(9);break}return x(z,function KC(e,t,n){var i,r,o,s,u,a,l,c,d,f,g,v,y,T,S;return L(function(A){switch(A.g){case 1:return x(A,_T(e,t),2);case 2:if("text/vtt"!=(i=A.h))throw new k(1,2,2017,t);return x(A,function XC(e,t,n){var i,r;return L(function(s){return 1==s.g?(i=Xr,(r=_n([e],n)).method="GET",x(s,t.request(i,r).promise,2)):s.return(s.h.data)})}(t,e.g,e.h.streaming.retryParameters),3);case 3:if(r=A.h,!(o=Ls(i)))throw new k(2,2,2014,i);for(s=o(),u={periodStart:0,segmentStart:0,segmentEnd:n.presentationTimeline.getDuration(),vttOffset:0},a=oe(r),l=s.parseMedia(a,u,t,[]),c=[],d=m(l),f=d.next(),g={};!f.done;g={Rf:void 0,md:void 0},f=d.next())g.md=f.value,g.Rf=null,v=function(I){return function(){return null==I.Rf&&(I.Rf=Kt([t],[I.md.payload])),I.Rf||[]}}(g),y=new Ee(g.md.startTime,g.md.endTime,v,0,null,null,0,0,1/0),g.md.payload.includes("#xywh")&&4===(T=g.md.payload.split("#xywh=")[1].split(",")).length&&y.Jf({height:parseInt(T[3],10),positionX:parseInt(T[0],10),positionY:parseInt(T[1],10),width:parseInt(T[2],10)}),c.push(y);if(S=i,!c.length){A.A(4);break}return x(A,Eu(c[0].P()[0],e.g,e.h.manifest.retryParameters),5);case 5:S=A.h;case 4:return A.return({id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new ut(c),mimeType:S||"",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([dn(S||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}(e,S.value,v),10);case 10:v.imageStreams.push(z.h),or(e),S=T.next(),z.A(7);break;case 9:_=m(r),P=_.next();case 11:return P.done?(Mm(s.drm.clearKeys,v.variants),D=v.variants.some(function($){if($.audio)for(var Q=m($.audio.drmInfos),He=Q.next();!He.done;He=Q.next())if(He.value.licenseServerUri.startsWith("data:"))return!0;
1if($.video)for(Q=($=m($.video.drmInfos)).next();!Q.done;Q=$.next())if(Q.value.licenseServerUri.startsWith("data:"))return!0;return!1}),R=s.offline.usePersistentLicense,D&&(R=!1),x(z,e.kd(v,function($){g=g||$},s,R),15)):x(z,function WC(e,t,n,i,r,o,s){var u;return L(function(c){if(1==c.g)return o?c.A(2):x(c,_T(e,n),3);if(2!=c.g&&(o=c.h),u={id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Kc(0,t.presentationTimeline.getDuration(),[n]),mimeType:o||"",codecs:s||"",kind:r,encrypted:!1,drmInfos:[],keyIds:new Set,language:i,originalLanguage:i,label:null,type:Pe,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([dn(o||"",s||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},!uo(dn(u.mimeType,u.codecs)))throw new k(2,2,2014,o);return c.return(u)})}(e,v,(b=P.value).uri,b.language,b.kind,b.mime,b.codecs),14);case 14:v.textStreams.push(z.h),or(e),P=_.next(),z.A(11);break;case 15:if(l=z.h,or(e),g)throw g;return x(z,function OC(e,t,n,i){var o,c,d,g,v,T,S,I,_,P,b,M,U,B,H,G,K,z,$;return L(function(Q){switch(Q.g){case 1:return function Ft(e,t,n){e.variants=e.variants.filter(function(i){return dt(i,t,n)})}(e,n.restrictions,{width:1/0,height:1/0}),x(Q,bt(t,e,i,n.drm.preferredKeySystems,n.drm.keySystemsMapping),2);case 2:for(o=[],rt(e,n.preferredVideoCodecs,n.preferredAudioCodecs,n.preferredDecodingAttributes,n.preferredTextFormats),c=m(e.variants),d=c.next();!d.done;d=c.next())o.push(Sn(d.value));for(g=m(e.textStreams),v=g.next();!v.done;v=g.next())o.push(an(v.value));for(T=m(e.imageStreams),S=T.next();!S.done;S=T.next())o.push(ho(S.value));return x(Q,n.offline.trackSelectionCallback(o),3);case 3:for(I=Q.h,_=e.presentationTimeline.getDuration(),P=0,b=m(I),M=b.next();!M.done;M=b.next())P+=M.value.bandwidth*_/8;return fe(Q,4),x(Q,n.offline.downloadSizeCallback(P),6);case 6:if(!Q.h)throw new k(2,9,9014);Le(Q,5);break;case 4:throw(U=Te(Q))instanceof k?U:new k(2,9,9015);case 5:for(B=new Set,H=new Set,G=new Set,K=m(I),z=K.next();!z.done;z=K.next())"variant"==($=z.value).type&&B.add($.id),"text"==$.type&&H.add($.id),"image"==$.type&&G.add($.id);e.variants=e.variants.filter(function(He){return B.has(He.id)}),e.textStreams=e.textStreams.filter(function(He){return H.has(He.id)}),e.imageStreams=e.imageStreams.filter(function(He){return G.has(He.id)}),function QC(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=m(t),i=n.next();!i.done;i=n.next())for(var r=(i=m(t)).next();!r.done;r=i.next());for(n=(t=m(e)).next();!n.done;n=t.next())for(i=(n=m(e)).next();!i.done;i=n.next());}(e),Z(Q)}})}(v,l,s,R),16);case 16:return x(z,c.init(),17);case 17:return or(e),x(z,hT(c),18);case 18:return d=z.h,or(e),j=function jC(e,t,n,i,r,o,s){var u=function DC(e,t,n){return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:t=ST(t),appMetadata:n,isIncomplete:!1}}(n,t,i),a=r.offline.progressCallback;!function cC(e,t,n){e.o=t,e.m=n}(o,function(v,y){u.size=y,a(u,v)},function(v,y){l&&s&&c==y&&el(e,"cenc",v)});var l=vg(t)&&!CT(t),c=null;l&&(c=eM.get(e.g.keySystem));for(var d=new LC,f=m(t.textStreams),g=f.next();!g.done;g=f.next())d.g.set(g.value.id,52);for(g=(f=m(t.imageStreams)).next();!g.done;g=f.next())bC(d,g.value);
1for(g=(f=m(t.variants)).next();!g.done;g=f.next())PC(d,g.value);return o=function zC(e,t,n,i){for(var r=new Map,o=DT(n),s=new Map,u=(o=m(o)).next();!u.done;u=o.next()){var a=YC(e,t,n,u=u.value,i,r);s.set(u.id,a)}for(t=(e=m(n.variants)).next();!t.done;t=e.next())(t=t.value).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(r.values())}}(o,d,t,r),r=o.streams,o=o.Dh,(d=e.g)&&s&&(d.initData=[]),{vk:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.Td(),streams:r,sessionIds:s?wm(e):[],drmInfo:d,appMetadata:i,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},Dh:o}}(l,v,t,n,s,u,R),B=j.Dh,x(z,d.eb.addManifests([U=j.vk]),19);case 19:if(H=z.h,or(e),f=H[0],or(e),g)throw g;return x(z,function NC(e,t,n,i,r,o,s,u,a,l){var c,d,f,g,v,y,T,S,A,I,_;return L(function(P){switch(P.g){case 1:if(c={},d=0,f=function(){if(e.j.g||r.l)throw new k(2,9,7001)},g=function(b,M){var D,R,j,U,B,H,G,z;return L(function($){if(1==$.g){for(D=m(b),R=D.next(),j={};!R.done;j={lc:void 0},R=D.next())j.lc=R.value,f(),U=lC(j.lc,o),B=j.lc.i,H=j.lc.h,G=function(Q){return function(He){var le,at,ot,nt;return L(function(Xe){switch(Xe.g){case 1:if(at=(le=Q.lc.g).Zb(!1),!le.aesKey||at){Xe.A(2);break}return x(Xe,Tp(He,le.aesKey,Q.lc.j),3);case 3:He=Xe.h;case 2:return ot=ag(le),x(Xe,s.addSegments([{data:He}]),4);case 4:nt=Xe.h,f(),c[ot]=nt[0],d+=He.byteLength,Z(Xe)}})}}(j),(z=j.lc.g.Zb(!1))?dC(r,j.lc.groupId,z,B,H,G):r.queue(j.lc.groupId,U,B,H,G);return x($,function hC(e){return L(function(t){return 1==t.g?x(t,Promise.all(e.i.values()),2):t.return(e.g.g)})}(r),2)}return f(),!M||r.l?$.A(0):(MT(u,i,a,l),x($,s.updateManifest(n,i),0))})},v=!1,fe(P,2),!vg(u)||!v||CT(u)){P.A(4);break}return x(P,g(t.filter(function(b){return b.h}),!0),5);case 5:return f(),t=t.filter(function(b){return!b.h}),y=c,T=d,c={},d=0,x(P,IT(s,n,i,y,T,function(){return or(e)}),6);case 6:f();case 4:if(v){P.A(7);break}return x(P,g(t,!1),8);case 8:return f(),S=c,A=d,c={},d=0,x(P,IT(s,n,i,S,A,function(){return f()}),9);case 9:f();case 7:Le(P,0);break;case 2:return I=Te(P),_=Object.values(c),x(P,s.removeSegments(_,function(){}),10);case 10:throw I}})}(e,B,f,U,u,s,d.eb,v,l,R),20);case 20:return or(e),MT(v,U,l,R),x(z,d.eb.updateManifest(f,U),21);case 21:return or(e),G=new Do("manifest",d.path.Sb,d.path.eb,f),z.return(gg(G,U));case 3:return Tn(z),x(z,c.destroy(),22);case 22:if(!a){z.A(23);break}return x(z,a.stop(),23);case 23:if(!l){z.A(25);break}return x(z,l.destroy(),25);case 25:En(z,0);break;case 2:if(K=Te(z),null==f){z.A(27);break}return x(z,ET(f),27);case 27:throw g||K}})}(this,e,t||{},i||[],r||[],function(){var a;return L(function(l){return 1==l.g?n?l.A(2):x(l,Eu(e,o.g,s.manifest.retryParameters),3):(2!=l.g&&(n=l.h),a=Om(e,n||null),l.return(a()))})},s,u),(t=new mn(t,function(){return cg(u)})).finally(function(){Ki(o.l,u)}),function $C(e,t){var n=t.promise;return e.i.push(n),t.finally(function(){Ki(e.i,n)})}(this,t)},h.remove=function(e){return yg(this,function UC(e,t){var n,i,r,o,u;return L(function(a){switch(a.g){case 1:if(ph(),null==(n=fg(t))||"manifest"!=n.g)throw new k(2,9,9004,t);return i=n,r=new Oi,pn(a,2),x(a,r.init(),4);case 4:return x(a,lh(r,i.Sb(),i.eb()),5);case 5:return x(a,(o=a.h).getManifests([i.key()]),6);case 6:return u=a.h[0],x(a,Promise.all([BC(e,u,r),FC(o,i,u)]),2);case 2:return Tn(a),x(a,r.destroy(),8);case 8:En(a,0)}})}(this,e))},h.Ok=function(){return yg(this,function VC(e){var t,n,i,r,o,s,u,a,l,c;return L(function(d){switch(d.g){case 1:return ph(),t=e.g,n=e.h.drm,i=new Oi,r=!1,pn(d,2),x(d,i.init(),4);case 4:o=[],function mC(e,t){e.g.forEach(function(n){t(n.getEmeSessionCell())})}(i,function(f){return o.push(f)}),s=m(o),u=s.next();case 5:if(u.done){d.A(2);break}return x(d,(a=u.value).getAll(),8);case 8:return x(d,xT(n,t,l=d.h),9);case 9:return x(d,a.remove(c=d.h),10);case 10:c.length!=l.length&&(r=!0),u=s.next(),d.A(5);break;case 2:return Tn(d),x(d,i.destroy(),11);case 11:En(d,3);break;case 3:return d.return(!r)}})}(this))},h.list=function(){return yg(this,function HC(){var e,t,n;return L(function(i){switch(i.g){case 1:return ph(),e=[],t=new Oi,pn(i,2),x(i,t.init(),4);case 4:return n=Promise.resolve(),function gC(e,t){e.g.forEach(function(n,i){n.getCells().forEac
1h(function(r,o){t({Sb:i,eb:o},r)})})}(t,function(r,o){n=n.then(function(){return L(function(u){if(1==u.g)return x(u,o.getAllManifests(),2);u.h.forEach(function(a,l){a=gg(new Do("manifest",r.Sb,r.eb,l),a),e.push(a)}),Z(u)})})}),x(i,n,2);case 2:return Tn(i),x(i,t.destroy(),6);case 6:En(i,3);break;case 3:return i.return(e)}})}())},h.kd=function(e,t,n,i){var o,r=this;return L(function(s){return 1==s.g?((o=new _c({sc:r.g,onError:t,uf:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(n.drm),x(s,function px(e,t,n){return e.oa=!0,e.C=new Map,e.R=n,vm(e,t,!1)}(o,e.variants,i),2)):3!=s.g?x(s,Tm(o),3):s.return(o)})},ue("shaka.offline.Storage",Gn),Gn.deleteAll=function(){var e;return L(function(t){return 1==t.g?(e=new Oi,pn(t,2),x(t,function yC(e){var t,n;return L(function(r){return 1==r.g?(t=Array.from(e.g.values()),(n=t.length>0)||Yl.forEach(function(o){(o=o())&&t.push(o)}),x(r,Promise.all(t.map(function(o){return o.erase()})),2)):n?r.A(0):x(r,Promise.all(t.map(function(o){return o.destroy()})),0)})}(e),2)):5!=t.g?(Tn(t),x(t,e.destroy(),5)):En(t,0)})},Gn.prototype.list=Gn.prototype.list,Gn.prototype.removeEmeSessions=Gn.prototype.Ok,Gn.prototype.remove=Gn.prototype.remove,Gn.prototype.store=Gn.prototype.store,Gn.prototype.getNetworkingEngine=Gn.prototype.Qb,Gn.prototype.getConfiguration=Gn.prototype.getConfiguration,Gn.prototype.configure=Gn.prototype.configure,Gn.prototype.destroy=Gn.prototype.destroy,Gn.support=mg;var eM=(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");function Xn(){}function fi(e,t){for(e={priority:t||0,callback:e},t=0;t<$l.length;t++)if($l[t].priority<e.priority)return void $l.splice(t,0,e);$l.push(e)}cy("offline",mg),ue("shaka.polyfill",Xn),Xn.register=fi,Xn.installAll=function(){for(var e=m($l),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(n){Be("Error installing polyfill!",n)}}};var Jl,Zl,$l=[];function LT(){}function PT(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=m(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())tM(t.value)}function tM(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(n){null==n||null==n?this.removeAttribute(t):this.setAttribute(t,n)}})}function fh(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}function bT(e){return e.startsWith("com.apple")?"cbcs":e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("org.w3")||e.startsWith("com.huawei")?"cenc":(Be("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function RT(e){return!!e&&!(!(e=(e=e.getConfiguration()).videoCapabilities&&e.videoCapabilities[0]||e.audioCapabilities&&e.audioCapabilities[0])||void 0===e.encryptionScheme)}function Tg(e,t){return!(e&&e!=t&&("cbcs"!=e&&"cbcs-1-9"!=e||!Ne().cd()))}function NT(){}function OT(){Ne().Kf()&&!Jl&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(Jl=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=nM,navigator.emeEncryptionSchemePolyfilled=!0)}function nM(e,t){var i,n=this;return L(function(o){return 1==o.g?x(o,Jl.call(n,e,t),2):RT(i=o.h)?(navigator.requestMediaKeySystemAccess=Jl,o.return(i)):(navigator.requestMediaKeySystemAccess=jT,o.return(jT.call(n,e,t)))})}function jT(e,t){var i,r,o,s,u,a,l,c,d,g,v,n=this;return L(function(y){if(1==y.g){for(i=bT(e),r=[],o=m(t),s=o.next();!s.done;s=o.next())a=UT((u=s.value).videoCapabilities,i),l=UT(u.audioCapabilities,i),u.videoCapabilities&&u.videoCapabilities.length&&!a.length||u.audioCapabilities&&u.audioCapabilities.length&&!l.length||((c=Object.assign({},u)).videoCapabilities=a,c.audioCapabilities=l,r.push(c));if(!r.length)throw(d=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",d.code=DOMException.NOT_SUPPORTED_ERR,d;return x(y,Jl.call(n,e,r),2)}return v=g=null,r[0]&&(r[0].videoCapabilities&&(g=r[0].videoCapabilities[0].encryptionScheme),r[0].audioCapabilities&&(v=r[0].audioCapabilities[0].encryptionScheme)),y.return(new fh(y.h,g,v))})}function UT(e,t){return e&&e.filter(function(n){return Tg(n.encryptionScheme,t)})}function BT(){}function FT(){if(X.Document){var e=Element.prototype;e.requestFullscreen=e.requestFullscreen||e.mozRequestFullScreen||e.msRequestFullscreen||e.webkitRequestFullscreen,(e=Document.prototype).exitFullscreen=e.exitFullscreen||e.mozCancelFullScreen||e.msExitFullscreen||e.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",Na),document.addEventListener("webkitfullscreenerror",Na),document.addEventListener("mozfullscreenchange",Na),document.addEventListener("mozfullscreenerror",Na),document.addEventListener("MSFullscreenChange",Na),document.addEventListener("MSFullscreenError",Na)}}function Na(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}function VT(){}function HT(){Ne().Kf()&&!Zl&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(Zl=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=iM,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}function iM(e){var n,i,t=this;return L(function(o){switch(o.g){case 1:return x(o,Zl.call(t,e),2);case 2:if(!(n=o.h).supported||!e.keySystemConfiguration)return o.return(n);if(RT(i=n.keySystemAccess))return navigator.mediaCapabilities.decodingInfo=Zl,o.return(n);if(navigator.mediaCapabilities.decodingInfo=GT,i){o.A(3);break}return x(o,KT(e),4);case 4:return n.keySystemAccess=o.h,o.return(n);case 3:return o.return(GT.call(t,e))}})}function GT(e){var n,i,r,s,u,a,t=this;return L(function(l){switch(l.g){case 1:return i=n=null,!e.keySystemConfiguration||(i=(r=e.keySystemConfiguration).audio&&r.audio.encryptionScheme,n=r.video&&r.video.encryptionScheme,s=bT(r.keySystem),u={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},Tg(i,s)&&Tg(n,s))?x(l,Zl.call(t,e),2):l.return(u);case 2:if((a=l.h).keySystemAccess){a.keySystemAccess=new fh(a.keySystemAccess,n,i),l.A(3);break}if(!e.keySystemConfiguration){l.A(3);break}return x(l,KT(e),5);case 5:a.keySystemAccess=l.h;case 3:return l.return(a)}})}function KT(e){return L(function(i){if(1==i.g){var r=e.keySystemConfiguration,o=[],s=[];return r.audio&&o.push({robustness:r.audio.robustness||"",contentType:e.audio.contentType,encryptionScheme:r.audio.encryptionScheme}),r.video&&s.push({robustness:r.video.robustness||"",contentType:e.video.contentType,encryptionScheme:r.video.encryptionScheme}),r={initDataTypes:r.initDataType?[r.initDataType]:[],distinctiveIdentifier:r.distinctiveIdentifier,persistentState:r.persistentState,sessionTypes:r.sessionTypes},o.length&&(r.audioCapabilities=o),s.length&&(r.videoCapabilities=s),x(i,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[r]),2)}return i.return(i.h)})}function gh(){}
1function WT(){Ne().ec()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),gh.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=rM)}function rM(e){var t,n,i,r,s,d;return L(function(f){switch(f.g){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},Ne(),n=e.video,i=e.audio,"media-source"!=e.type){if("file"!=e.type)return f.return(t);if(n&&(r=n.contentType,""==yu().canPlayType(r))||i&&(s=i.contentType,""==yu().canPlayType(s)))return f.return(t);f.A(2);break}if(!_o())return f.return(t);if(!n){f.A(3);break}return x(f,function oM(e){return L(function(r){return 1==r.g?"CAST"!==Ne().Ma()?r.A(2):x(r,function uM(e){var t,n,r,o;return L(function(s){if(1==s.g){if(!(X.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return s.return(Zt(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))<24||n>30)&&(t+="; framerate="+e.framerate),e.transferFunction||""){case"":case"srgb":break;case"pq":t+="; eotf=smpte2084";break;case"hlg":t+="; eotf=arib-std-b67";break;default:return s.return(!1)}return r=!1,(o=aM).has(t)?(r=o.get(t),s.A(2)):x(s,cast.__platform__.canDisplayType(t),3)}return 2!=s.g&&o.set(t,r=s.h),s.return(r)})}(e),3):r.return(2!=r.g?r.h:Zt(e.contentType))})}(n),4);case 4:if(!f.h)return f.return(t);case 3:if(i){var g=Ne().Ma(),v=i.contentType;if("CAST"===g&&i.spatialRendering&&(v+="; spatialRendering=true"),!Zt(v))return f.return(t)}case 2:return e.keySystemConfiguration?x(f,function sM(e,t,n){var i,r,o,s,u,a,l,c,d,f,g;return L(function(v){switch(v.g){case 1:if(i=[],r=[],n.audio&&(o={robustness:n.audio.robustness||"",contentType:t.contentType},Ne().si()&&t.contentType.includes('codecs="ac-3"')&&(o.contentType='audio/mp4; codecs="ec-3"'),n.audio.encryptionScheme&&(o.encryptionScheme=n.audio.encryptionScheme),i.push(o)),n.video&&(s={robustness:n.video.robustness||"",contentType:e.contentType},n.video.encryptionScheme&&(s.encryptionScheme=n.video.encryptionScheme),r.push(s)),u={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes},i.length&&(u.audioCapabilities=i),r.length&&(u.videoCapabilities=r),l=t?t.contentType:"",c=Qn(a=e?e.contentType:"")+";"+Xi(a),d=Qn(l)+";"+Xi(l),f=n.keySystem,g=null,fe(v,2),Yu.has(c+"#"+d+"#"+f)){g=Yu.get(c+"#"+d+"#"+f)||null,v.A(4);break}return x(v,navigator.requestMediaKeySystemAccess(n.keySystem,[u]),5);case 5:Yu.set(c+"#"+d+"#"+f,g=v.h);case 4:Le(v,3);break;case 2:Te(v);case 3:return v.return(g)}})}(n,i,e.keySystemConfiguration),6):(t.supported=!0,f.return(t));case 6:(d=f.h)&&(t.supported=!0,t.keySystemAccess=d);case 5:return f.return(t)}})}Xn.Aria=LT,LT.install=PT,fi(PT),fh.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=m(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(n=(t=m(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},fh.prototype.createMediaKeys=function(){return this.g.createMediaKeys()},Xn.EmeEncryptionScheme=NT,NT.install=OT,fi(OT),Xn.Fullscreen=BT,BT.install=FT,fi(FT),Xn.MCapEncryptionScheme=VT,VT.install=HT,fi(HT,-2),Xn.MediaCapabilities=gh,gh.install=WT,gh.originalMcap=null;var xg,Sg,Ag,Eg,Ig,Cg,aM=new Map;function XT(){}function zT(){var e=Ne(),t="WEBKIT"===e.Ca()?e.za():null;for((X.MediaSource||X.ManagedMediaSource)&&t&&X.MediaSource&&(t<=12?(YT(),function lM(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}()):t<=15&&YT()),t=(e=m(e.Ei())).next();!t.done;t=e.next())dM(t.value);(X.MediaSource||X.ManagedMediaSource)&&function cM(){if(X.MediaSource){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(n){return"mp2t"!=hu(n)&&e(n)}}if(X.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);
1X.ManagedMediaSource.isTypeSupported=function(n){return"mp2t"!=hu(n)&&t(n)}}}(),X.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&function hM(){var e=MediaSource.isTypeSupported;Ne().aj()&&(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),i=n.findIndex(function(s){return s.startsWith("codecs=")});if(i<0)return e(t);var r=n[i].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),o=r.findIndex(function(s){return s.startsWith("vp09")});return o>=0&&(r[o]="vp9",n[i]='codecs="'+r.join(",")+'"',t=n.join("; ")),e(t)})}()}function YT(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,Jt.apply(0,arguments));return t.abort=function(){},t}}function dM(e){var t=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(i){return Xi(i)!=e&&t(i)},X.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);X.ManagedMediaSource.isTypeSupported=function(i){return Xi(i)!=e&&n(i)}}}function qT(){}function $T(){screen.orientation&&screen.orientation.unlock||(null!=screen.orientation?function pM(){void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()}),void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})}():null!=X.orientation&&function fM(){function e(){switch(X.orientation){case-90:t.type="landscape-secondary",t.angle=270;break;case 0:t.type="portrait-primary",t.angle=0;break;case 90:t.type="landscape-primary",t.angle=90;break;case 180:t.type="portrait-secondary",t.angle=180}}var t=new mh;screen.orientation=t,e(),X.addEventListener("orientationchange",function(){e();var n=new re("change");t.dispatchEvent(n)})}())}function mh(){vt.call(this),this.type="",this.angle=0}function wg(){}function JT(e){X.HTMLVideoElement&&X.WebKitMediaKeys&&X.shakaMediaKeysPolyfill!=kg&&(void 0!==e&&e&&(xg=!0,Sg=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Ag=HTMLMediaElement.prototype.setMediaKeys,Eg=X.MediaKeys,Ig=X.MediaKeySystemAccess,Cg=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=mM,X.MediaKeys=Ql,X.MediaKeySystemAccess=vh,navigator.requestMediaKeySystemAccess=gM,X.shakaMediaKeysPolyfill=kg,fu.clear(),Yu.clear())}function gM(e,t){try{var n=new vh(e,t);return Promise.resolve(n)}catch(i){return Promise.reject(i)}}function mM(e){var t=this.mediaKeys;return t&&t!=e&&ZT(t,null),delete this.mediaKeys,(this.mediaKeys=e)?ZT(e,this):Promise.resolve()}function vM(e){if(Ve(e=oe(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=zt(e=Gt(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=Qe(e),this.dispatchEvent(t)}function vh(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(t=(e=m(t)).next();!t.done;t=e.next()){var n=t.value;if("required"==n.persistentState)t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var i=!1,r=!1;if(n.audioCapabilities)for(var o=m(n.audioCapabilities),s=o.next();!s.done;s=o.next())(s=s.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,s.contentType.split(";")[0])&&(t.audioCapabilities.push(s),r=!0));if(n.videoCapabilities)for(o=(n=m(n.videoCapabilities)).next();!o.done;o=n.next())(o=o.value).contentType&&(i=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.videoCapabilities.push(o),r=!0));i||(r=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=r?t:null}if(t)return void(this.g=t)}throw(e=Error("Unsupported keySystem")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function Ql(e){this.h=new WebKitMediaKeys(e),this.g=new et}function ZT(e,t){if(e.g.Sa(),!t)return Promise.resolve();e.g.F(t,"webkitneedkey",vM);try{return ha(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(n){return Promise.reject(n)}}function Mg(e){vt.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 At,this.keyStatuses=new QT,this.onkeystatuseschange=null}function yh(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,t=new re("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}
1function QT(){this.size=0,this.g=void 0}fi(WT,-1),Xn.MediaSource=XT,XT.install=zT,fi(zT),Xn.Orientation=qT,qT.install=$T,wt(mh,vt),mh.prototype.lock=function(e){function t(i){return screen.lockOrientation?screen.lockOrientation(i):screen.mozLockOrientation?screen.mozLockOrientation(i):!!screen.msLockOrientation&&screen.msLockOrientation(i)}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():((e=Error("screen.orientation.lock() is not available on this device")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},mh.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},fi($T),Xn.PatchedMediaKeysApple=wg,wg.uninstall=function(){X.shakaMediaKeysPolyfill==kg&&xg&&(xg=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Sg),HTMLMediaElement.prototype.setMediaKeys=Ag,X.MediaKeys=Eg,X.MediaKeySystemAccess=Ig,navigator.requestMediaKeySystemAccess=Cg,Sg=Cg=Ag=Ig=Eg=null,X.shakaMediaKeysPolyfill="",fu.clear(),Yu.clear())},wg.install=JT,vh.prototype.createMediaKeys=function(){var e=new Ql(this.keySystem);return Promise.resolve(e)},vh.prototype.getConfiguration=function(){return this.g},Ql.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Mg(this.h,e)},Ql.prototype.setServerCertificate=function(){return Promise.resolve(!1)},Ql.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},wt(Mg,vt),(h=Mg.prototype).generateRequest=function(e,t){var n=this;this.h=new At;try{var i=this.l.createSession("video/mp4",oe(t));this.i=i,this.sessionId=i.sessionId||"",this.j.F(this.i,"webkitkeymessage",function(r){n.h&&(n.h.resolve(),n.h=null),r=new re("message",r=(new Map).set("messageType",null==n.keyStatuses.Gc()?"license-request":"license-renewal").set("message",Qe(r.message))),n.dispatchEvent(r)}),this.j.F(i,"webkitkeyadded",function(){n.g&&(yh(n,"usable"),n.g.resolve(),n.g=null)}),this.j.F(i,"webkitkeyerror",function(){var r=Error("EME PatchedMediaKeysApple key error");if(r.errorCode=n.i.error,null!=n.h)n.h.reject(r),n.h=null;else if(null!=n.g)n.g.reject(r),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:yh(n,"output-not-allowed");break;default:yh(n,"internal-error")}}),yh(this,"status-pending")}catch(r){this.h.reject(r)}return this.h},h.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},h.update=function(e){this.g=new At;try{this.i.update(oe(e))}catch(t){this.g.reject(t)}return this.g},h.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Sa()}catch(e){this.closed.reject(e)}return this.closed},h.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(h=QT.prototype).Gc=function(){return this.g},h.forEach=function(e){this.g&&e(this.g,Sc.value())},h.get=function(e){if(this.has(e))return this.g},h.has=function(e){var t=Sc.value();return!(!this.g||!pt(e,t))},h.entries=function(){},h.keys=function(){},h.values=function(){};var kg="apple";function ew(){}function tw(){if(X.MediaKeys){var e=Ne();MediaKeys.prototype.setServerCertificate&&e.me()||(MediaKeys.prototype.setServerCertificate=yM)}}function yM(){return Promise.resolve(!1)}function nw(){}function iw(){if(!(!X.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)bg="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=TM,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=wM,X.MediaKeys=ec,X.MediaKeySystemAccess=Th,X.shakaMediaKeysPolyfill=xM}}function _g(e){return bg?bg+e.charAt(0).toUpperCase()+e.slice(1):e}function TM(e,t){try{var n=new Th(e,t);return Promise.resolve(n)}catch(i){return Promise.reject(i)}}function wM(e){var t=this.mediaKeys;return t&&t!=e&&rw(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&rw(e,this),Promise.resolve()}function Th(e,t){this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var i=!1,r=document.getElementsByTagName("video");r=r.length?r[0]:document.createElement("video");for(var o=(t=m(t)).next();!o.done;o=t.next()){var s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(o=o.value).initDataTypes,sessionTypes:["temporary"],label:o.label},u=!1;if(o.audioCapabilities)for(var a=m(o.audioCapabilities),l=a.next();!l.done;l=a.next())(l=l.value).contentType&&(u=!0,r.canPlayType(l.contentType.split(";")[0],this.g)&&(s.audioCapabilities.push(l),i=!0));if(o.videoCapabilities)for(l=(a=m(o.videoCapabilities)).next();!l.done;l=a.next())(l=l.value).contentType&&(u=!0,r.canPlayType(l.contentType,this.g)&&(s.videoCapabilities.push(l),i=!0));if(u||(i=r.canPlayType("video/mp4",this.g)||r.canPlayType("video/webm",this.g)),"required"==o.persistentState&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):i=!1),i)return void(this.h=s)}throw n="Unsupported keySystem",("org.w3.clearkey"==e||"com.widevine.alpha"==e)&&(n="None of the requested configurations were supported."),(e=Error(n)).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function ec(e){this.l=e,this.h=null,this.g=new et,this.i=[],this.j=new Map}function rw(e,t){e.h=t,e.g.Sa();var n=bg;t&&(e.g.F(t,n+"needkey",function(i){var r=new CustomEvent("encrypted");r.initDataType="cenc",r.initData=Qe(i.initData),e.h.dispatchEvent(r)}),e.g.F(t,n+"keymessage",function(i){var r=Dg(e,i.sessionId);r&&(i=new re("message",i=(new Map).set("messageType",null==r.keyStatuses.Gc()?"licenserequest":"licenserenewal").set("message",i.message)),r.h&&(r.h.resolve(),r.h=null),r.dispatchEvent(i))}
1),e.g.F(t,n+"keyadded",function(i){(i=Dg(e,i.sessionId))&&i.ready()}),e.g.F(t,n+"keyerror",function(i){var r=Dg(e,i.sessionId);if(r){var o=Error("EME v0.1b key error"),s=i.errorCode;s.systemCode=i.systemCode,o.errorCode=s,!i.sessionId&&r.h?(45==i.systemCode&&(o.message="Unsupported session type."),r.h.reject(o),r.h=null):i.sessionId&&r.g?(r.g.reject(o),r.g=null):(o=i.systemCode,i.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?wh(r,"output-restricted"):wh(r,1==o?"expired":"internal-error"))}}))}function Dg(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 Lg(e,t,n){vt.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 At,this.keyStatuses=new sw,this.onkeystatuseschange=null}function ow(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if("persistent-license"==e.l)if(n)var i=oe(zt("LOAD_SESSION|"+n));else{var r=zt("PERSISTENT|");i=_t(r,t)}else i=oe(t)}catch(s){return Promise.reject(s)}e.h=new At;var o=_g("generateKeyRequest");try{e.j[o](e.i,i)}catch(s){if("InvalidStateError"!=s.name)return e.h=null,Promise.reject(s);new E(function(){try{e.j[o](e.i,i)}catch(u){e.h.reject(u),e.h=null}}).ka(.01)}return e.h}function Pg(e,t,n){if(e.g)e.g.then(function(){return Pg(e,t,n)}).catch(function(){return Pg(e,t,n)});else{if(e.g=t,"webkit-org.w3.clearkey"==e.i){var i=We(n),r=JSON.parse(i);"oct"!=r.keys[0].kty&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),i=sn(r.keys[0].k),r=sn(r.keys[0].kid)}else i=oe(n),r=null;var o=_g("addKey");try{e.j[o](e.i,i,r,e.sessionId)}catch(s){e.g.reject(s),e.g=null}}}function wh(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,t=new re("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}function sw(){this.size=0,this.g=void 0}fi(function(){X.HTMLVideoElement&&X.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||JT())}),Xn.PatchedMediaKeysCert=ew,ew.install=tw,fi(tw),Xn.PatchedMediaKeysWebkit=nw,nw.install=iw,Th.prototype.createMediaKeys=function(){var e=new ec(this.g);return Promise.resolve(e)},Th.prototype.getConfiguration=function(){return this.h},ec.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)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 Lg(t,this.l,e),this.i.push(e),e},ec.prototype.setServerCertificate=function(){return Promise.resolve(!1)},ec.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},wt(Lg,vt),(h=Lg.prototype).ready=function(){wh(this,"usable"),this.g&&this.g.resolve(),this.g=null},h.generateRequest=function(e,t){return ow(this,t,null)},h.load=function(e){return"persistent-license"==this.l?ow(this,null,e):Promise.reject(Error("Not a persistent session."))},h.update=function(e){var t=new At;return Pg(this,t,e),t},h.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=_g("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch{}}return this.closed.resolve(),this.closed},h.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(h=sw.prototype).Gc=function(){return this.g},h.forEach=function(e){this.g&&e(this.g,Sc.value())},h.get=function(e){if(this.has(e))return this.g},h.has=function(e){var t=Sc.value();return!(!this.g||!pt(e,t))},h.entries=function(){},h.keys=function(){},h.values=function(){};var bg="",xM="webkit";function uw(){}function aw(){if(X.HTMLVideoElement){var e=HTMLVideoElement.prototype;e.requestPictureInPicture&&document.exitPictureInPicture||!e.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,e.requestPictureInPicture=AM,Object.defineProperty(e,"disablePictureInPicture",{get:IM,set:CM,enumerable:!0,configurable:!0}),document.exitPictureInPicture=EM,document.addEventListener("webkitpresentationmodechanged",SM,!0))}}function SM(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function AM(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function EM(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function IM(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function CM(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function lw(){}function cw(){X.crypto&&("randomUUID"in X.crypto||(X.crypto.randomUUID=MM))}function MM(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function dw(){}function hw(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:kM})}function kM(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}function pw(){}function fw(){for(var e=m([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array
1]),t=e.next();!t.done;t=e.next())(t=t.value).prototype.indexOf||(t.prototype.indexOf=_M),t.prototype.lastIndexOf||(t.prototype.lastIndexOf=DM),t.prototype.includes||(t.prototype.includes=LM)}function _M(e,t){return Array.prototype.indexOf.call(this,e,t)}function DM(e,t){return Array.prototype.lastIndexOf.call(this,e,t)}function LM(e,t){return-1!==this.indexOf(e,t)}function gw(){}function mw(){if(X.HTMLMediaElement){var e=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var t=e.apply(this);return t&&t.catch(function(){}),t}}}function vw(){}function yw(){if(X.HTMLVideoElement){var e=HTMLVideoElement.prototype;!e.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in e||"number"==typeof yu().webkitDroppedFrameCount)&&(e.getVideoPlaybackQuality=PM)}}function PM(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function Tw(){}function ww(){if(!X.VTTCue&&X.TextTrackCue){var e=null,t=TextTrackCue.length;if(3==t)e=Rg;else if(6==t)e=bM;else{try{var n=!!Rg(1,2,"")}catch{n=!1}n&&(e=Rg)}e&&(X.VTTCue=function(i,r,o){return e(i,r,o)})}}function Rg(e,t,n){return new X.TextTrackCue(e,t,n)}function bM(e,t,n){return new X.TextTrackCue(e+"-"+t+"-"+n,e,t,n)}function Un(e){vt.call(this),this.h=e,this.l=null,this.g=[],this.i=-1,this.j=null,this.m=new et}function sr(){}fi(iw),Xn.PiPWebkit=uw,uw.install=aw,fi(aw),Xn.RandomUUID=lw,lw.install=cw,fi(cw),Xn.Symbol=dw,dw.install=hw,fi(hw),Xn.TypedArray=pw,pw.install=fw,fi(fw),Xn.VideoPlayPromise=gw,gw.install=mw,fi(mw),Xn.VideoPlaybackQuality=vw,vw.install=yw,fi(yw),Xn.VTTCue=Tw,Tw.install=ww,fi(ww),wt(Un,vt),(h=Un.prototype).destroy=function(){var e=this;return L(function(t){if(1==t.g)return x(t,e.removeAllItems(),2);e.h=null,e.m&&(e.m.release(),e.m=null),vt.prototype.release.call(e),Z(t)})},h.configure=function(e){this.l=e},h.getConfiguration=function(){return this.l},h.getCurrentItem=function(){return this.g.length&&this.i>=0&&this.i<this.g.length?this.g[this.i]:null},h.getCurrentItemIndex=function(){return this.i},h.getItems=function(){return this.g.slice()},h.insertItems=function(e){this.g.push.apply(this.g,ee(e)),this.dispatchEvent(new re("itemsinserted"))},h.removeAllItems=function(){var e=this;return L(function(t){switch(t.g){case 1:if(e.m.Sa(),!(e.g.length&&e.i>=0)){t.A(2);break}return x(t,e.h.zc(),2);case 2:if(!e.j){t.A(4);break}if(e.j.zf.u){t.A(5);break}return x(t,e.j.zf.destroy(),5);case 5:e.j=null;case 4:e.g=[],e.i=-1,e.dispatchEvent(new re("itemsremoved")),Z(t)}})},h.playItem=function(e){var n,i,r,o,s,u,a,l,c,d,g,v,y,t=this;return L(function(T){if(1==T.g){if(t.m.Sa(),!t.g.length||e>=t.g.length)throw new k(2,7,7007);return n=t.g[e],t.i!=e&&(t.i=e,t.dispatchEvent(new re("currentitemchanged"))),i=t.h.h,(r=t.l?t.l.preloadNextUrlWindow:0)>0&&(o=!1,t.m.F(i,"timeupdate",function(){var S,A,I,_;return L(function(P){switch(P.g){case 1:if(t.j||t.g.length<=1||o||t.h.W()||!i.duration)return P.return();if(S=t.h.Ta().end-i.currentTime,isNaN(S)){P.A(0);break}if(!(S<=r)){P.A(0);break}if(A=t.l&&t.l.repeatMode,I=null,t.i+1<t.g.length?I=t.g[t.i+1]:1==A&&(I=t.g[0]),!I){P.A(0);break}return o=!0,_=null,fe(P,5),x(P,t.h.preload(I.manifestUri,I.startTime,I.mimeType,I.config),7);case 7:_=P.h,Le(P,6);break;case 5:Te(P),_=null;case 6:t.j={item:I,zf:_},o=!1,Z(P)}})})),t.m.F(t.h,"complete",function(){var S=t.l&&t.l.repeatMode,A=!1;if(2==S)A=!0;else{var I=t.i+1;I<t.g.length?t.playItem(I):1==S&&(1==t.g.length?A=!0:t.playItem(0))}A&&(i.paused?(i.currentTime=t.h.Ta().start,i.play()):t.m.F(i,"paused",function(){i.currentTime=t.h.Ta().start,i.play()}))}),n.config&&(t.h.Ii(),t.h.configure(n.config)),s=n.manifestUri,t.j&&t.j.item==n&&t.j.zf&&(s=t.j.zf),x(T,t.h.load(s,n.startTime,n.mimeType),2)}if(t.j=null,n.extraText)for(u=m(n.extraText),a=u.next();!a.done;a=u.next())(l=a.value).mime?t.h.Ld(l.uri,l.language,l.kind,l.mime,l.codecs):t.h.Ld(l.uri,l.language,l.kind);if(n.extraThumbnail)for(c=m(n.extraThumbnail),d=c.next();!d.done;d=c.next())t.h.Je(d.value);if(n.extraChapter)for(g=m(n.extraChapter),v=g.next();!v.done;v=g.next())t.h.Ie((y=v.value).uri,y.language,y.mime);Z(T)})},ue("shaka.queue.QueueManager",Un),Un.prototype.playItem=Un.prototype.playItem,Un.prototype.removeAllItems=Un.prototype.removeAllItems,Un.prototype.insertItems=Un.prototype.insertItems,Un.prototype.getItems=Un.prototype.getItems,Un.prototype.getCurrentItemIndex=Un.prototype.getCurrentItemIndex,Un.prototype.getCurrentItem=Un.prototype.getCurrentItem,Un.prototype.getConfiguration=Un.prototype.getConfiguration,Un.prototype.configure=Un.prototype.configure,Un.prototype.destroy=Un.prototype.destroy,Ed=function(e){return new Un(e)},sr.prototype.parseInit=function(){},sr.prototype.setSequenceMode=function(){},sr.prototype.setManifestType=function(){},sr.prototype.parseMedia=function(e,t){for(var n=null,i=[],r=(e=m(e=We(e).split(/\r?\n/))).next();!r.done;r=e.next())if((r=r.value)&&!/^\s+$/.test(r)&&(r=RM.exec(r))){var o=NM.exec(r[1]);r=new Dt(o=60*parseInt(o[1],10)+parseFloat(o[2].replace(",",".")),t.segmentEnd?t.segmentEnd:o+2,r[2]),n&&(n.endTime=o,i.push(n)),n=r}return n&&i.push(n),i},ue("shaka.text.LrcTextParser",sr),sr.prototype.parseMedia=sr.prototype.parseMedia,sr.prototype.setManifestType=sr.prototype.setManifestType,sr.prototype.setSequenceMode=sr.prototype.setSequenceMode,sr.prototype.parseInit=sr.prototype.parseInit;var RM=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,NM=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function Zi(){this.g="UNKNOWN"}function xw(e,t,n,i,r,o,s,u,a,l,c,d,f,g){var v=c;if(bu(t)){if(!d)return null;var y={tagName:"span",children:[fn(t)],attributes:{},parent:null}}else y=t;for(var T=null,S=m(Lw),A=S.next();!A.done&&!(T=Sh(y,"backgroundImage",r,"#",A.value)[0]);A=S.next());S=null;var I=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if((A=Vr(y,Lw,"backgroundImage"))&&I.test(A)){if((S=parseInt(A.split(":").pop(),10)-1)>=g.length)return null;S=g[S]}else f&&A&&!A.startsWith("#")&&(I=new O(f),A=new O(A),(A=I.resolve(A).toString())&&
1(S=A));if(("p"==t.tagName||T||S)&&(d=!0),t=d,A="default"==(y.attributes["xml:space"]||(a?"default":"preserve")),a=[],!(I=y.children.every(bu)))for(var _=m(y.children),P=_.next();!P.done;P=_.next())(P=xw(e,P.value,n,i,r,o,s,u,A,l,y,d,f,g))&&a.push(P);if(r=null!=c,f=fn(y),f=y.children.length&&f&&/\S/.test(f),!((_=y.attributes.begin||y.attributes.end||y.attributes.dur)||f||"br"==y.tagName||0!=a.length||r&&!A))return null;for(f=(g=Ew(y,i)).start,g=g.end;v&&v.tagName&&"tt"!=v.tagName;)f=(g=UM(v,i,f,g)).start,g=g.end,v=v.parent;if(null==f&&(f=0),f+=n.periodStart,g=null==g?1/0:g+n.periodStart,"HLS"!==e.g&&(f=Math.max(f,n.segmentStart),g=Math.min(g,n.segmentEnd)),!_&&a.length>0)for(f=1/0,g=0,i=(n=m(a)).next();!i.done;i=n.next())i=i.value,f=Math.min(f,i.startTime),g=Math.max(g,i.endTime);if("br"==y.tagName)return(e=new Dt(f,g,"")).lineBreak=!0,e;if(n="",I&&(n=mt(fn(y)||""),A&&(n=n.replace(/\s+/g," "))),(n=new Dt(f,g,n)).nestedCues=a,d||(n.isContainer=!0),l&&(n.cellResolution=l),l=Sh(y,"region",s,"")[0],y.attributes.region&&l&&l.attributes["xml:id"]){var b=l.attributes["xml:id"];n.region=u.filter(function(M){return M.id==b})[0]}return u=l,c&&r&&!y.attributes.region&&!y.attributes.style&&(u=Sh(c,"region",s,"")[0]),function jM(e,t,n,i,r,o,s,u,a){if("rtl"==oi(e,n,i,s,"direction",u=u||a)&&(t.direction="rtl"),"tb"==(a=oi(e,n,i,s,"writingMode",u))||"tblr"==a?t.writingMode="vertical-lr":"tbrl"==a?t.writingMode="vertical-rl":"rltb"==a||"rl"==a?t.direction="rtl":a&&(t.direction=au),(a=oi(e,n,i,s,"textAlign",!0))?(t.positionAlign=GM.get(a),t.lineAlign=HM.get(a),t.textAlign=Fu[a.toUpperCase()]):t.textAlign=Tr,(a=oi(e,n,i,s,"displayAlign",!0))&&(t.displayAlign=io[a.toUpperCase()]),(a=oi(e,n,i,s,"color",u))&&(t.color=Ng(a)),(a=oi(e,n,i,s,"backgroundColor",u))&&(t.backgroundColor=Ng(a)),(a=oi(e,n,i,s,"border",u))&&(t.border=a),a=oi(e,n,i,s,"fontFamily",u))switch(a){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=a.split(",").filter(function(l){return"default"!=l}).join(",")}switch((a=oi(e,n,i,s,"fontWeight",u))&&"bold"==a&&(t.fontWeight=ks),a=oi(e,n,i,s,"wrapOption",u),t.wrapLine=!(a&&"noWrap"==a),(a=oi(e,n,i,s,"lineHeight",u))&&a.match(Oa)&&(t.lineHeight=a),(a=oi(e,n,i,s,"fontSize",u))&&(a.match(Oa)||a.match(VM))&&(t.fontSize=a),(a=oi(e,n,i,s,"fontStyle",u))&&(t.fontStyle=cu[a.toUpperCase()]),r?(o=r.attributes.imageType||r.attributes.imagetype,a=r.attributes.encoding,r=fn(r).trim(),"PNG"==o&&"Base64"==a&&r&&(t.backgroundImage="data:image/png;base64,"+r)):o&&(t.backgroundImage=o),(r=oi(e,n,i,s,"textOutline",u))&&((r=r.split(" "))[0].match(Oa)?t.textStrokeColor=t.color:(t.textStrokeColor=Ng(r[0]),r.shift()),r[0]&&r[0].match(Oa)?t.textStrokeWidth=r[0]:t.textStrokeColor=""),(r=oi(e,n,i,s,"letterSpacing",u))&&r.match(Oa)&&(t.letterSpacing=r),(r=oi(e,n,i,s,"linePadding",u))&&r.match(Oa)&&(t.linePadding=r),(r=oi(e,n,i,s,"opacity",u))&&(t.opacity=parseFloat(r)),(r=xh(e,i,s,"textDecoration"))&&Sw(t,r),(r=Og(e,n,s,"textDecoration"))&&Sw(t,r),(r=oi(e,n,i,s,"textCombine",u))&&(t.textCombineUpright=r),oi(e,n,i,s,"ruby",u)){case"container":t.rubyTag="ruby";break;case"text":t.rubyTag="rt"}}(e,n,y,u,T,S,o,t,0==a.length),n}function OM(e,t,n,i){var r=new gr,o=t.attributes["xml:id"];if(!o)return null;r.id=o,o=null,i&&(o=Bg.exec(i)||Fg.exec(i)),i=o?Number(o[1]):null,o=o?Number(o[2]):null;var s,u=xh(e,t,n,"extent");if(u){var a=(s=Bg.exec(u))||Fg.exec(u);null!=a&&(r.width=Number(a[1]),r.height=Number(a[2]),s||(null!=i&&(r.width=100*r.width/i),null!=o&&(r.height=100*r.height/o)),r.widthUnits=s||null!=i?xi:0,r.heightUnits=s||null!=o?xi:0)}return(e=xh(e,t,n,"origin"))&&null!=(a=(s=Bg.exec(e))||Fg.exec(e))&&(r.viewportAnchorX=Number(a[1]),r.viewportAnchorY=Number(a[2]),s?u||(r.width=100-r.viewportAnchorX,r.widthUnits=xi,r.height=100-r.viewportAnchorY,r.heightUnits=xi):(null!=o&&(r.viewportAnchorY=100*r.viewportAnchorY/o),null!=i&&(r.viewportAnchorX=100*r.viewportAnchorX/i)),r.viewportAnchorUnits=s||null!=i?xi:0),r}function Ng(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&4==(t=t[1].split(",")).length?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function Sw(e,t){for(var n=(t=m(t.split(" "))).next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(Wi)||e.textDecoration.push(Wi);break;case"noUnderline":e.textDecoration.includes(Wi)&&Ki(e.textDecoration,Wi);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&Ki(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&Ki(e.textDecoration,"overline")}}function oi(e,t,n,i,r,o){return o=void 0===o||o,(t=Og(e,t,i,r))?t:o?xh(e,n,i,r):null}function xh(e,t,n,i){return t?Vr(t,Ah,i)||Aw(e,t,n,i):null}function Og(e,t,n,i){return Vr(t,Ah,i)||Aw(e,t,n,i)}function Aw(e,t,n,i){t=Sh(t,"style",n,"");for(var r=null,o=0;o<t.length;o++){var s=Fr(t[o],"urn:ebu:tt:style",i);s||(s=Vr(t[o],Ah,i)),s||(s=Og(e,t[o],n,i)),s&&(r=s)}return r}function Sh(e,t,n,i,r){var o=[];if(!e||n.length<1)return o;var s=e;for(e=null;!e&&!(e=r?Fr(s,r,t):s.attributes[t])&&(s=s.parent););if(t=e)for(r=(t=m(t.split(" "))).next();!r.done;r=t.next())for(r=r.value,s=(e=m(n)).next();!s.done;s=e.next())if(i+(s=s.value).attributes["xml:id"]==r){o.push(s);break}return o}function UM(e,t,n,i){return e=Ew(e,t),null==n?n=e.start:null!=e.start&&(n+=e.start),null==i?i=e.end:null!=e.start&&(i+=e.start),{start:n,end:i}}function Ew(e,t){var n=jg(e.attributes.begin,t),i=jg(e.attributes.end,t);return e=jg(e.attributes.dur,t),null==i&&null!=e&&(i=n+e),{start:n,end:i}}function jg(e,t){var n=null;if(Iw.test(e)){e=Iw.exec(e),n=Number(e[1]);var i=Number(e[2]),r=Number(e[3]),o=Number(e[4]);n=(r+=(o+=(Number(e[5])||0)/t.h)/t.frameRate)+60*i+3600*n}else if(Cw.test(e))n=Ug(Cw,e);else if(Mw.test(e))n=Ug(Mw,e);else if(kw.test(e))e=kw.exec(e),n=Number(e[1])/t.frameRate;else if(_w.test(e))e=_w.exec(e),n=Number(e[1])/t.g;else if(Dw.test(e))n=Ug(Dw,e);else if(e)throw new k(2,2,2001,"Could not parse cue time range in TTML");return n}function Ug(e,t){return null==(e=e.exec(t))||""==e[0]?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function FM(e,t,n,i){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(i),0==this.g&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}kn("application/x-subtitle-lrc",function(){return new sr}),Zi.prototype.parseInit=function(){},Zi.prototype.setSequenceMode=function(){},Zi.prototype.setManifestType=function(e){this.g=e},Zi.prototype.parseMedia=function(e,t,n,i){var r=We(e);if(e=[],""==r)return e;var o=mr(r,"tt",!0);if(!o)throw new k(2,2,2005,"Failed to parse TTML.");if(!(r=vr(o,"body")[0]))return[];var s=Vr(o,tc,"frameRate"),u=Vr(o,tc,"subFrameRate"),a=Vr(o,tc,"frameRateMultiplier"),l=Vr(o,tc,"tickRate"),c=Vr(o,tc,"cellResolution"),d=o.attributes["xml:space"]||"default",f=Vr(o,Ah,"extent");
1if("default"!=d&&"preserve"!=d)throw new k(2,2,2005,"Invalid xml:space value: "+d);d="default"==d,s=new FM(s,u,a,l),c=function BM(e){return e&&(e=/^(\d+) (\d+)$/.exec(e))?{columns:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}(c),u=((u=vr(o,"metadata")[0])?u.children:[]).filter(function(y){return"\n"!=y}),a=vr(o,"style"),l=[];for(var g=m(o=vr(o,"region")),v=g.next();!v.done;v=g.next())(v=OM(this,v.value,a,f))&&l.push(v);if(ft(r,"p").length)throw new k(2,2,2001,"<p> can only be inside <div> in TTML");for(g=(f=m(ft(r,"div"))).next();!g.done;g=f.next())if(ft(g.value,"span").length)throw new k(2,2,2001,"<span> can only be inside <p> in TTML");return(t=xw(this,r,t,s,u,a,o,l,d,c,null,!1,n,i))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e},ue("shaka.text.TtmlTextParser",Zi),Zi.prototype.parseMedia=Zi.prototype.parseMedia,Zi.prototype.setManifestType=Zi.prototype.setManifestType,Zi.prototype.setSequenceMode=Zi.prototype.setSequenceMode,Zi.prototype.parseInit=Zi.prototype.parseInit;var Bg=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,VM=/^(\d{1,4}(?:\.\d+)?|100)%$/,Oa=/^(\d+px|\d+em|\d*\.?\d+c)$/,Fg=/^(\d+)px (\d+)px$/,Iw=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Cw=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Mw=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,kw=/^(\d*(?:\.\d*)?)f$/,_w=/^(\d*(?:\.\d*)?)t$/,Dw=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),HM=(new Map).set("left",Ko).set("center","center").set("right","end").set("start",Ko).set("end","end"),GM=(new Map).set("left","line-left").set("center","center").set("right","line-right"),tc=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],Ah=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],Lw=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function Pn(){this.g=new Zi}function ki(){this.g="UNKNOWN"}function Pw(e,t,n){var i;(i=/^align:(start|middle|center|end|left|right)$/.exec(t))?e.textAlign="middle"==(t=i[1])?Tr:Fu[t.toUpperCase()]:(i=/^vertical:(lr|rl)$/.exec(t))?e.writingMode="lr"==i[1]?"vertical-lr":"vertical-rl":(i=/^size:([\d.]+)%$/.exec(t))?e.size=Number(i[1]):(i=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(t))?(e.position=Number(i[1]),i[2]&&(e.positionAlign="line-left"==(t=i[2])||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center"==t||"middle"==t?"center":Bu)):(i=/^regi
1on:(.*)$/.exec(t))?(t=function KM(e,t){return e=e.filter(function(n){return n.id==t}),e.length?e[0]:null}(n,i[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=Vu[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=lu,e.line=Number(n[1]),n[2]&&(e.lineAlign=Vu[n[2].toUpperCase()]))}function ur(){this.g=null}function WM(e,t,n){var i,r,o;return(new Et).box("payl",Qu(function(s){i=We(s)})).box("iden",Qu(function(s){r=We(s)})).box("sttg",Qu(function(s){o=We(s)})).parse(e),i?function XM(e,t,n,i,r){if(uu(e=new Dt(i,r,e)),t&&(e.id=t),n)for(n=eo(t=new Es(n));n;)Pw(e,n,[]),Eo(t),n=eo(t);return e}(i,r,o,t,n):null}function ar(){}function Qi(){this.g=new ki}function bw(e){var t="WEBVTT\n\n";if(""==e)return t;for(var n=(e=m((e=(e=e.replace(/\r+/g,"")).trim()).split("\n\n"))).next();!n.done;n=e.next())(n=n.value.split(/\n/))[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return t}function lr(){}function zM(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=Rw(n))&&(e.color=n),(n=t.BackColour)&&(n=Rw(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=ks),t.Italic&&(e.fontStyle=_s),t.Underline&&e.textDecoration.push(Wi),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=Ms,e.textAlign="start";break;case 2:e.displayAlign=Ms,e.textAlign=Tr;break;case 3:e.displayAlign=Ms,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=Tr;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=Tr;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}function Rw(e){return(e=parseInt(e.replace("&H",""),16))>=0?"rgba("+(255&e)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function Nw(e){return 3600*((e=qM.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}kn("application/ttml+xml",function(){return new Zi}),Pn.prototype.parseInit=function(e){var t=!1;if((new Et).box("moov",Oe).box("trak",Oe).box("mdia",Oe).box("minf",Oe).box("stbl",Oe).S("stsd",$o).box("stpp",function(n){t=!0,n.parser.stop()}).parse(e),!t)throw new k(2,2,2007)},Pn.prototype.setSequenceMode=function(e){this.g.setSequenceMode(e)},Pn.prototype.setManifestType=function(e){this.g.setManifestType(e)},Pn.prototype.parseMedia=function(e,t,n){var i=[],r=null,o=[],s=new Map,u=[];if((new Et).box("moof",Oe).box("traf",Oe).S("tfhd",function(S){r=Pc(S.reader,S.flags).Rd}).S("trun",function(S){for(var A=(S=m((S=Nc(S.reader,S.version,S.flags)).ih)).next();!A.done;A=S.next())u.push(A.value.sampleSize||r||0)}).S("subs",function(S){for(var A=S.reader,I=A.U(),_=-1,P=0;P<I;P++){var b=A.U();_+=b,b=A.Da();for(var M=[],D=0;D<b;D++)M.push(1==S.version?A.U():A.Da()),A.Y(),A.Y(),A.U();s.set(_,M)}}).box("mdat",Qu(function(S){o.push(S)})).parse(e,!1),0==o.length)throw new k(2,2,2007);for(var a=_t.apply(Nt,ee(o)),l=0,c=0;c<u.length;c++){var d=oe(a,l,u[c]);l+=u[c];var f=s.get(c);if(f&&f.length){d=oe(d,0,f[0]);for(var g=[],v=f[0],y=1;y<f.length;y++){var T=oe(e,v,f[y]);T=Fi(T),g.push("data:image/png;base64,"+T),v+=f[y]}i=i.concat(this.g.parseMedia(d,t,n,g))}else i=i.concat(this.g.parseMedia(d,t,n,[]))}return i},ue("shaka.text.Mp4TtmlParser",Pn),Pn.prototype.parseMedia=Pn.prototype.parseMedia,Pn.prototype.setManifestType=Pn.prototype.setManifestType,Pn.prototype.setSequenceMode=Pn.prototype.setSequenceMode,Pn.prototype.parseInit=Pn.prototype.parseInit,kn('application/mp4; codecs="stpp"',function(){return new Pn}),kn('application/mp4; codecs="stpp.ttml"',function(){return new Pn}),kn('application/mp4; codecs="stpp.ttml.im1i"',function(){return new Pn}),kn('application/mp4; codecs="stpp.ttml.im1t"',function(){return new Pn}),kn('application/mp4; codecs="stpp.ttml.im2i"',function(){return new Pn}),kn('application/mp4; codecs="stpp.ttml.im2t"',function(){return new Pn}),kn('application/mp4; codecs="stpp.ttml.etd1"',function(){return new Pn}),kn('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new Pn}),kn('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new Pn}),kn('application/mp4; codecs="stpp.TTML.im1t"',function(){return new Pn}),ki.prototype.parseInit=function(){},ki.prototype.setSequenceMode=function(){},ki.prototype.setManifestType=function(e){this.g=e},ki.prototype.parseMedia=function(e,t){var n=(e=(e=We(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);
1if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new k(2,2,2e3);if(e=t.vttOffset,"HLS"==this.g)if(n[0].includes("X-TIMESTAMP-MAP")){var i=n[0];if(e=i.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),i=i.match(/MPEGTS:(\d+)/m),!e||!i)throw new k(2,2,2e3);if(null==(e=Vo(e[1])))throw new k(2,2,2e3);i=Number(i[1]);for(var r=t.segmentStart-t.periodStart;r>=95443.7176888889;)r-=95443.7176888889,i+=8589934592;e=t.periodStart+i/9e4-e}else t.periodStart&&t.vttOffset==t.periodStart&&(e=0);for(t=[],r=(i=m(n[0].split("\n"))).next();!r.done;r=i.next())if(/^Region:/.test(r=r.value)){r=new Es(r);var o=new gr;eo(r),Eo(r);for(var s=eo(r);s;){var u=o,a=s;(s=/^id=(.*)$/.exec(a))?u.id=s[1]:(s=/^width=(\d{1,2}|100)%$/.exec(a))?u.width=Number(s[1]):(s=/^lines=(\d+)$/.exec(a))?(u.height=Number(s[1]),u.heightUnits=2):(s=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(a))?(u.regionAnchorX=Number(s[1]),u.regionAnchorY=Number(s[2])):(s=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(a))?(u.viewportAnchorX=Number(s[1]),u.viewportAnchorY=Number(s[2])):/^scroll=up$/.exec(a)&&(u.scroll="up"),Eo(r),s=eo(r)}t.push(o)}for(Uu(i=new Map),r=[],o=(n=m(n.slice(1))).next();!o.done;o=n.next()){if((1!=(o=o.value.split("\n")).length||o[0])&&!/^NOTE($|[ \t])/.test(o[0])&&"STYLE"==o[0]){for(u=[],s=-1,a=1;a<o.length;
1a++)o[a].includes("::cue")&&(u.push([]),s=u.length-1),-1!=s&&(u[s].push(o[a]),o[a].includes("}")&&(s=-1));for(s=(u=m(u)).next();!s.done;s=u.next()){var l=s.value;s="global",(a=l[0].match(/\((.*)\)/))&&(s=a.pop()),a=l.slice(1,-1),l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(a=l[1].split(";")),(l=i.get(s))||(l=new Dt(0,0,""));for(var c=!1,d=0;d<a.length;d++){var f=/^\s*([^:]+):\s*(.*)/.exec(a[d]);if(f){var g=f[2].trim().replace(";","");switch(f[1].trim()){case"background-color":case"background":c=!0,l.backgroundColor=g;break;case"color":c=!0,l.color=g;break;case"font-family":c=!0,l.fontFamily=g;break;case"font-size":c=!0,l.fontSize=g;break;case"font-weight":(parseInt(g,10)>=700||"bold"==g)&&(c=!0,l.fontWeight=ks);break;case"font-style":switch(g){case"normal":c=!0,l.fontStyle=qa;break;case"italic":c=!0,l.fontStyle=_s;break;case"oblique":c=!0,l.fontStyle="oblique"}break;case"opacity":c=!0,l.opacity=parseFloat(g);break;case"text-combine-upright":c=!0,l.textCombineUpright=g;break;case"text-shadow":c=!0,l.textShadow=g;break;case"white-space":c=!0,l.wrapLine="noWrap"!=g}}}c&&i.set(s,l)}}if(c=e,1==(l=o).length&&!l[0]||/^NOTE($|[ \t])/.test(l[0])||"STYLE"==l[0]||"REGION"==l[0])o=null;else if(o=null,l[0].includes("--\x3e")||(o=l[0],l.splice(0,1)),s=Fo(u=new Es(l[0])),d=Io(u,/[ \t]+--\x3e[ \t]+/g),a=Fo(u),null==s||null==d||null==a)Be("Failed to parse VTT time code. Cue skipped:",o,l),o=null;else{for(s+=c,a+=c,c=l.slice(1).join("\n").trim(),i.has("global")?((l=i.get("global").clone()).startTime=s,l.endTime=a,l.payload=c):l=new Dt(s,a,c),Eo(u),s=eo(u);s;)Pw(l,s,t),Eo(u),s=eo(u);uu(l,i),null!=o&&(l.id=o),o=l}o&&r.push(o)}return r},ue("shaka.text.VttTextParser",ki),ki.prototype.parseMedia=ki.prototype.parseMedia,ki.prototype.setManifestType=ki.prototype.setManifestType,ki.prototype.setSequenceMode=ki.prototype.setSequenceMode,ki.prototype.parseInit=ki.prototype.parseInit,kn("text/vtt",function(){return new ki}),kn('text/vtt; codecs="vtt"',function(){return new ki}),kn('text/vtt; codecs="wvtt"',function(){return new ki}),ur.prototype.parseInit=function(e){var t=this,n=!1;if((new Et).box("moov",Oe).box("trak",Oe).box("mdia",Oe).S("mdhd",function(i){i=Rc(i.reader,i.version),t.g=i.timescale}).box("minf",Oe).box("stbl",Oe).S("stsd",$o).box("wvtt",function(){n=!0}).parse(e),!this.g)throw new k(2,2,2008);if(!n)throw new k(2,2,2008)},ur.prototype.setSequenceMode=function(){},ur.prototype.setManifestType=function(){},ur.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new k(2,2,2008);var r,n=0,i=[],o=[],s=!1,u=!1,a=!1,l=null;if((new Et).box("moof",Oe).box("traf",Oe).S("tfdt",function(I){s=!0,n=bc(I.reader,I.version).baseMediaDecodeTime}).S("tfhd",function(I){l=Pc(I.reader,I.flags).Qd}).S("trun",function(I){u=!0,i=Nc(I.reader,I.version,I.flags).ih}).box("mdat",Qu(function(I){a=!0,r=I})).parse(e,!1),!a&&!s&&!u)throw new k(2,2,2008);e=n;for(var c=new Ht(r,0),d=m(i),f=d.next();!f.done;f=d.next()){var g=(f=f.value).jh||l,v=f.Df?n+f.Df:e;e=v+(g||0);var y=0;do{var T=c.U();y+=T;var A=null;"vttc"==Mc(c.U())?T>8&&(A=c.Vb(T-8)):c.skip(T-8),g&&A&&(T=WM(A,t.periodStart+v/this.g,t.periodStart+e/this.g),o.push(T))}while(f.sampleSize&&y<f.sampleSize)}return o.filter(C)},ue("shaka.text.Mp4VttParser",ur),ur.prototype.parseMedia=ur.prototype.parseMedia,ur.prototype.setManifestType=ur.prototype.setManifestType,ur.prototype.setSequenceMode=ur.prototype.setSequenceMode,ur.prototype.parseInit=ur.prototype.parseInit,kn('application/mp4; codecs="wvtt"',function(){return new ur}),ar.prototype.parseInit=function(){},ar.prototype.setSequenceMode=function(){},ar.prototype.setManifestType=function(){},ar.prototype.parseMedia=function(e){var t=We(e).replace(/\r+/g,"");if(e=[],""==(t=t.trim()))return e;for(var n=(t=m(t.split("\n\n"))).next();!n.done;n=t.next()){var i=new Es((n=n.value.split("\n"))[0]),r=Fo(i),o=Io(i,/,/g);if(i=Fo(i),null==r||null==o||null==i)throw new k(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new Dt(r,i,n.slice(1).join("\n").trim()))}return e},ue("shaka.text.SbvTextParser",ar),ar.prototype.parseMedia=ar.prototype.parseMedia,ar.prototype.setManifestType=ar.prototype.setManifestType,ar.prototype.setSequenceMode=ar.prototype.setSequenceMode,ar.prototype.parseInit=ar.prototype.parseInit,kn("text/x-subviewer",function(){return new ar}),Qi.prototype.parseInit=function(){},Qi.prototype.setSequenceMode=function(){},Qi.prototype.setManifestType=function(){},Qi.prototype.parseMedia=function(e,t,n){return e=oe(zt(e=bw(e=We(e)))
1),this.g.parseMedia(e,t,n,[])},ue("shaka.text.SrtTextParser",Qi),Qi.srt2webvtt=bw,Qi.prototype.parseMedia=Qi.prototype.parseMedia,Qi.prototype.setManifestType=Qi.prototype.setManifestType,Qi.prototype.setSequenceMode=Qi.prototype.setSequenceMode,Qi.prototype.parseInit=Qi.prototype.parseInit,kn("text/srt",function(){return new Qi}),lr.prototype.parseInit=function(){},lr.prototype.setSequenceMode=function(){},lr.prototype.setManifestType=function(){},lr.prototype.parseMedia=function(e){var t="",n="",i=null,r=null;for(r=(e=m(r=We(e).split(/\r?\n\s*\r?\n/))).next();!r.done;r=e.next()){var o=r.value;r=o,(o=YM.exec(o))&&(i=o[1],r=o[2]),"V4 Styles"==i||"V4+ Styles"==i?(t=r,t=n?t+"\n"+r:r):"Events"==i&&(n=n?n+"\n"+r:r)}for(i=[],r=null,e=(t=m(t.split(/\r?\n/))).next();!e.done;e=t.next())if(!/^\s*;/.test(e=e.value)&&(o=Ow.exec(e)))if(e=o[1].trim(),o=o[2].trim(),"Format"==e)r=o.split(Eh);else if("Style"==e){e=o.split(Eh),o={};for(var s=0;s<r.length&&s<e.length;s++)o[r[s]]=e[s];i.push(o)}for(r=[],t=null,o=(n=m(n.split(/\r?\n/))).next(),e={};!o.done;e={Wi:void 0},o=n.next())if(!/^\s*;/.test(o=o.value)&&(s=Ow.exec(o)))if(o=s[1].trim(),s=s[2].trim(),"Format"==o)t=s.split(Eh);else if("Dialogue"==o){s=s.split(Eh),o={};for(var u=0;u<t.length&&u<s.length;u++)o[t[u]]=s[u];s=new Dt(u=Nw(o.Start),Nw(o.End),s.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,"")),e.Wi=o.Style,(e=i.find(function(l){return function(c){return c.Name==l.W
1i}}(e)))&&zM(s,e),r.push(s)}return r},ue("shaka.text.SsaTextParser",lr),lr.prototype.parseMedia=lr.prototype.parseMedia,lr.prototype.setManifestType=lr.prototype.setManifestType,lr.prototype.setSequenceMode=lr.prototype.setSequenceMode,lr.prototype.parseInit=lr.prototype.parseInit;var YM=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Ow=/^\s*([^:]+):\s*(.*)/,Eh=/\s*,\s*/,qM=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function jw(e,t){var n=1&e[t+1]?7:9;return t+n<=e.length&&(e=((3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5)-n)>0?{Yd:n,ra:e}:null}function Uw(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=(60&e[t+2])>>>2;if(i>n.length-1)return null;var o=(1&e[t+2])<<2;return{sampleRate:n[i],channelCount:o|=(192&e[t+3])>>>6,codec:"mp4a.40."+(1+((192&e[t+2])>>>6))}}function Bw(e,t){if(t+1<e.length&&255===e[t]&&240==(246&e[t+1])){var n=1&e[t+1]?7:9;if(t+n>=e.length)return!1;var i=(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5;return!(i<=n)&&((t+=i)===e.length||t+1<e.length&&255===e[t]&&240==(246&e[t+1]))}return!1}function cr(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function Fw(e,t){if(t+8>e.length||11!==e[t]||119!==e[t+1])return null;var n=e[t+4]>>6;if(n>=3)return null;var i=63&e[t+4],r=2*[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][3*i+n];if(t+r>e.length)return null;var o=e[t+6]>>5,s=0;2===o?s+=2:(1&o&&1!==o&&(s+=2),4&o&&(s+=2)),s=(e[t+6]<<8|e[t+7])>>12-s&1;var u=7&e[t+5];return e=new Uint8Array([n<<6|e[t+5]>>3<<1|u>>2,(3&u)<<6|o<<3|s<<2|i>>4,i<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][o]+s,Ga:e,ra:r}}function JM(e,t){if(11===e[t]&&119===e[t+1]){var r,o,n=0,i=5;for(t+=i;i>0;){o=e[t];var s=Math.min(i,8),u=8-s;r=(o&(r=4278190080>>>24+u<<u))>>u,n=n?n<<s|r:r,t+=1,i-=s}if(n<16)return!0}return!1}function Mr(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function Vw(e,t){if(t+8>e.length||2935!=(e[t]<<8|e[t+1]<<0))return null;var n=new Qo(e.subarray(t+2));qi(n,2),qi(n,3);var i=$e(n,11)+1<<1,r=$e(n,2);if(3==r){r=[24e3,22060,16e3][r=$e(n,2)];var o=3}else r=[48e3,44100,32e3][r],o=$e(n,2);var s=$e(n,3),u=$e(n,1);return n=$e(n,5),t+i>e.byteLength?null:(e=Math.floor(i*r/(16*[1,2,3,6][o])),e=new Uint8Array([(8160&e)>>5,(31&e)<<3,r<<6|n<<1|0,0|s<<1|u<<0,0]),{sampleRate:r,channelCount:[2,1,2,3,3,4,4,5][s]+u,Ga:e,ra:i})}function kr(e){this.j=e,this.h=0,this.g=new Map,this.i=null}kn("text/x-ssa",function(){return new lr}),(h=cr.prototype).destroy=function(){this.g.clear()},h.isSupported=function(e){return"audio/aac"==e.toLowerCase().split(";")[0]&&Zt(this.convertCodecs("audio",e))},h.convertCodecs=function(e,t){return"audio/aac"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(Ai(t)||"mp4a.40.2")+'"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,i){for(var r=oe(e),o=oa(r),s=o.length;s<r.length&&!Bw(r,s);s++);if(e=1e3*n.endTime,(o=Tu(o)).length&&n&&(o=o.find(function(c){return"com.apple.streaming.transportStreamTimestamp"===c.description}))&&(e=o.data),!(o=Uw(r,s)))return Promise.reject(new k(2,3,3018,n?n.P()[0]:null));t.audioSamplingRate=o.sampleRate,t.channelsCount=o.channelCount;for(var u=[];s<r.length;){var a=jw(r,s);if(!a)return Promise.reject(new k(2,3,3018,n?n.P()[0]:null));var l=a.Yd+a.ra;s+l<=r.length&&u.push({data:r.subarray(s+a.Yd,s+l),size:a.ra,duration:1024,sb:0,flags:{yb:0,mb:0,kb:0,ib:0,jb:2,zb:0}}),s+=l}return r=o.sampleRate,e=Math.floor(e*r/1e3),i=new na([i={id:t.id,type:"audio",codecs:o.codec,encrypted:t.encrypted&&t.drmInfos.length>0,timescale:r,duration:i,Cb:[],Ga:new Uint8Array([]),Oa:new Uint8Array([]),Ya:0,Za:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,Ab:u},stream:t}]),this.g.has(n=t.id+"_"+n.i)?t=this.g.get(n):(t=ia(i),this.g.set(n,t)),n=this.i!==t,i=ul(i),this.i=t,this.h++,n?(t=_t(t,i),Promise.resolve(t)):Promise.resolve(i)},ue("shaka.transmuxer.AacTransmuxer",cr),cr.prototype.transmux=cr.prototype.transmux,cr.prototype.getOriginalMimeType=cr.prototype.getOriginalMimeType,cr.prototype.convertCodecs=cr.prototype.convertCodecs,cr.prototype.isSupported=cr.prototype.isSupported,cr.prototype.destroy=cr.prototype.destroy,Kr("audio/aac",function(){return new cr("audio/aac")},wr),(h=Mr.prototype).destroy=function(){this.g.clear()},h.isSupported=function(e){return"audio/ac3"==e.toLowerCase().split(";")[0]&&Zt(this.convertCodecs("audio",e))},h.convertCodecs=function(e,t){return"audio/ac3"==t.toLowerCase().split(";")[0]?Ne().je()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,i){for(var r=oa(e=oe(e)),o=r.length;o<e.length&&!JM(e,o);o++);var s=1e3*n.endTime;(r=Tu(r)).length&&n&&(r=r.find(function(c){return"com.apple.streaming.transportStreamTimestamp"===c.description}))&&(s=r.data),r=0;for(var u=new Uint8Array([]),a=[];o<e.length;){var l=Fw(e,o);if(!l)return Promise.reject(new k(2,3,3018,n?n.P()[0]:null));
1t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,u=l.Ga,a.push({data:e.subarray(o,o+l.ra),size:l.ra,duration:1536,sb:0,flags:{yb:0,mb:0,kb:0,ib:0,jb:2,zb:0}}),o+=l.ra}return e=Math.floor(s*r/1e3),i=new na([i={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&t.drmInfos.length>0,timescale:r,duration:i,Cb:[],Ga:u,Oa:new Uint8Array([]),Ya:0,Za:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,Ab:a},stream:t}]),this.g.has(n=t.id+"_"+n.i)?t=this.g.get(n):(t=ia(i),this.g.set(n,t)),n=this.i!==t,i=ul(i),this.i=t,this.h++,n?(t=_t(t,i),Promise.resolve(t)):Promise.resolve(i)},ue("shaka.transmuxer.Ac3Transmuxer",Mr),Mr.prototype.transmux=Mr.prototype.transmux,Mr.prototype.getOriginalMimeType=Mr.prototype.getOriginalMimeType,Mr.prototype.convertCodecs=Mr.prototype.convertCodecs,Mr.prototype.isSupported=Mr.prototype.isSupported,Mr.prototype.destroy=Mr.prototype.destroy,Kr("audio/ac3",function(){return new Mr("audio/ac3")},wr),(h=kr.prototype).destroy=function(){this.g.clear()},h.isSupported=function(e){return"audio/ec3"==e.toLowerCase().split(";")[0]&&Zt(this.convertCodecs("audio",e))},h.convertCodecs=function(e,t){return"audio/ec3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,i){for(var r=oa(e=oe(e)),o=r.length;o<e.length&&2935!=(e[o]<<8|e[o+1]<<0);o++);var s=1e3*n.endTime;(r=Tu(r)).length&&n&&(r=r.find(function(c){return"com.apple.streaming.transportStreamTimestamp"===c.description}))&&(s=r.data),r=0;for(var u=new Uint8Array([]),a=[];o<e.length;){var l=Vw(e,o);if(!l)return Promise.reject(new k(2,3,3018,n?n.P()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,r=l.sampleRate,u=l.Ga,a.push({data:e.subarray(o,o+l.ra),size:l.ra,duration:1536,sb:0,flags:{yb:0,mb:0,kb:0,ib:0,jb:2,zb:0}}),o+=l.ra}return e=Math.floor(s*r/1e3),i=new na([i={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&t.drmInfos.length>0,timescale:r,duration:i,Cb:[],Ga:u,Oa:new Uint8Array([]),Ya:0,Za:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,Ab:a},stream:t}]),this.g.has(n=t.id+"_"+n.i)?t=this.g.get(n):(t=ia(i),this.g.set(n,t)),n=this.i!==t,i=ul(i),this.i=t,this.h++,n?(t=_t(t,i),Promise.resolve(t)):Promise.resolve(i)},ue("shaka.transmuxer.Ec3Transmuxer",kr),kr.prototype.transmux=kr.prototype.transmux,kr.prototype.getOriginalMimeType=kr.prototype.getOriginalMimeType,kr.prototype.convertCodecs=kr.prototype.convertCodecs,kr.prototype.isSupported=kr.prototype.isSupported,kr.prototype.destroy=kr.prototype.destroy,Kr("audio/ec3",function(){return new kr("audio/ec3")},wr);var ek=[100,110,122,244,44,83,86,118,128,138,139,134];function Ih(e,t){var n=e[t+1]>>3&3,i=e[t+1]>>1&3,r=e[t+2]>>4&15,o=e[t+2]>>2&3;if(1!==n&&0!==r&&15!==r&&3!==o){var s=e[t+3]>>6;r=1e3*sk[14*(3===n?3-i:3===i?3:4)+r-1],o=uk[3*(3===n?0:2===n?1:2)+o],n=ak[n][i];var u=lk[i],a=Math.floor(n*r/o+(e[t+2]>>1&1))*u,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(l=l?parseInt(l[1],10):0)&&l<=87&&2===i&&r>=224e3&&0===s&&(e[t+3]|=128),{sampleRate:o,channelCount:3===s?1:2,ra:a,Qk:8*n*u}}return null}function Hw(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function Gw(e,t){if(t+1<e.length&&Hw(e,t)){var n=Ih(e,t),i=4;return n&&n.ra&&(i=n.ra),(t+=i)===e.length||t+1<e.length&&Hw(e,t)}return!1}var sk=[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],uk=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],ak=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],lk=[0,1,1,4];function _r(e){this.j=e,this.h=0,this.g=new Map,this.i=null}function Dr(e){this.h=e,this.g=null}function dr(e){this.h=e,(this.g=Of.get("ISOBoxer")())&&function ck(e){function t(){this._procFullBox(),1&this.flags&&(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),2&this.flags&&(this._procEntryField(n,"NumberOfEntries","uint",16),this._procSubEntries(n,"clearAndCryptedData",n.NumberOfEntries,function(i){this._procEntryField(i,"BytesOfClearData","uint",16),this._procEntryField(i,"BytesOfEncryptedData","uint",32)}))})}e.g.addBoxProcessor("saio",function(){this._procFullBox(),1&this.flags&&(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",1===this.version?64:32)}),e.g.addBoxProcessor("saiz",function(){this._procFullBox(),1&this.flags&&(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),0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",function(){for(var n=!0,i=0;i<16;i++)this.usertype[i]!==dk[i]&&(n=!1);
1n&&(this._parsing&&(this.type="sepiff"),t.call(this))})}(this)}function Kw(e,t){for(var n=8,i=0;i<e.boxes.length&&e.boxes[i].type!==t;i++)n+=e.boxes[i].size;return n}(h=_r.prototype).destroy=function(){this.g.clear()},h.isSupported=function(e){return"audio/mpeg"==e.toLowerCase().split(";")[0]&&Zt(this.convertCodecs("audio",e))},h.convertCodecs=function(e,t){return"audio/mpeg"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':t},h.getOriginalMimeType=function(){return this.j},h.transmux=function(e,t,n,i){for(var r=oe(e),o=oa(r).length;o<r.length&&!Gw(r,o);o++);var s;for(e=[];o<r.length;){var u=Ih(r,o);if(!u)return Promise.reject(new k(2,3,3018,n?n.P()[0]:null));s||(s=u),o+u.ra<=r.length&&e.push({data:r.subarray(o,o+u.ra),size:u.ra,duration:1152,sb:0,flags:{yb:0,mb:0,kb:0,ib:0,jb:2,zb:0}}),o+=u.ra}return s?(r=9e4*s.Qk/s.sampleRate*this.h,i=new na([i={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&t.drmInfos.length>0,timescale:s.sampleRate,duration:i,Cb:[],Ga:new Uint8Array([]),Oa:new Uint8Array([]),Ya:0,Za:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:r,Ab:e},stream:t}]),this.g.has(n=t.id+"_"+n.i)?t=this.g.get(n):(t=ia(i),this.g.set(n,t)),n=this.i!==t,i=ul(i),this.i=t,this.h++,n?(t=_t(t,i),Promise.resolve(t)):Promise.resolve(i)):Promise.reject(new k(2,3,3018,n?n.P()[0]:null))},ue("shaka.transmuxer.Mp3Transmuxer",_r),_r.prototype.transmux=_r.prototype.transmux,_r.prototype.getOriginalMimeType=_r.prototype.getOriginalMimeType,_r.prototype.convertCodecs=_r.prototype.convertCodecs,_r.prototype.isSupported=_r.prototype.isSupported,_r.prototype.destroy=_r.prototype.destroy,Kr("audio/mpeg",function(){return new _r("audio/mpeg")},wr),(h=Dr.prototype).destroy=function(){},h.isSupported=function(e){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var t=Ai(e).split(","),n=Cn("audio",t);return t=Cn("video",t),!(!n||t||"mp3"!=Zn(n))&&Zt(this.convertCodecs("audio",e))},h.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?"audio/mpeg":t},h.getOriginalMimeType=function(){return this.h},h.transmux=function(e,t,n,i,r){if(this.g?this.g.clearData():this.g=new Bt,this.g.Hf(n.i),e=oe(e),"mp3"!=(e=this.g.parse(e)).Sd().audio||"audio"!=r)return Promise.reject(new k(2,3,3018,n?n.P()[0]:null));for(n=new Uint8Array([]),r=m(e.ub()),e=r.next();!e.done;e=r.next())if(e=e.value.data)for(t=0;t<e.length;)(i=Ih(e,t))?(t+i.ra<=e.length&&(n=_t(n,e.subarray(t,t+i.ra))),t+=i.ra):t++;return Promise.resolve(n)},ue("shaka.transmuxer.MpegTsTransmuxer",Dr),Dr.prototype.transmux=Dr.prototype.transmux,Dr.prototype.getOriginalMimeType=Dr.prototype.getOriginalMimeType,Dr.prototype.convertCodecs=Dr.prototype.convertCodecs,Dr.prototype.isSupported=Dr.prototype.isSupported,Dr.prototype.destroy=Dr.prototype.destroy,Kr("video/mp2t",function(){return new Dr("video/mp2t")},Gu),(h=dr.prototype).destroy=function(){},h.isSupported=function(e,t){var n=e.startsWith("mss/");return!(!this.g||!n)&&(t?Zt(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Zt(t)||Zt(e)))},h.convertCodecs=function(e,t){return t.replace("mss/","")},h.getOriginalMimeType=function(){return this.h},h.transmux=function(e,t,n){if(!n)return Promise.resolve(oe(e));if(!t.mssPrivateData)return Promise.reject(new k(2,3,3020,n?n.P()[0]:null));try{var i,r=this.g.parseBuffer(e),o=r.fetch("tfhd");o.track_ID=t.id+1;var s=r.fetch("tfdt"),u=r.fetch("traf");null===s&&((s=this.g.createFullBox("tfdt",u,o)).version=1,s.flags=0,s.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var a=r.fetch("trun"),l=r.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var c=r.fetch("tfrf");c&&c._parent.boxes.splice(c._parent.boxes.indexOf(c),1);var d=r.fetch("sepiff");if(null!==d){d.type="senc",d.usertype=void 0;var f=r.fetch("saio");if(null===f){(f=this.g.createFullBox("saio",u)).version=0,f.flags=0,f.entry_count=1,f.offset=[0];var g=this.g.createFullBox("saiz",u);if(g.version=0,g.flags=0,g.sample_count=d.sample_count,g.default_sample_info_size=0,g.sample_info_size=[],2&d.flags)for(i=0;i<d.sample_count;i+=1)g.sample_info_size[i]=10+6*d.entry[i].NumberOfEntries;else g.default_sample_info_size=8}}o.flags&=16777214,o.flags|=131072,a.flags|=1;var v=r.fetch("moof");a.data_offset=v.getLength()+8;var y=r.fetch("saio");null!==y&&(y.offset[0]=Kw(v,"traf")+Kw(u,"senc")+16);var T=oe(r.write());return Promise.resolve(T)}
1catch(S){return Promise.reject(S instanceof k?S:new k(2,3,3022,n?n.P()[0]:null))}},ue("shaka.transmuxer.MssTransmuxer",dr),dr.prototype.transmux=dr.prototype.transmux,dr.prototype.getOriginalMimeType=dr.prototype.getOriginalMimeType,dr.prototype.convertCodecs=dr.prototype.convertCodecs,dr.prototype.isSupported=dr.prototype.isSupported,dr.prototype.destroy=dr.prototype.destroy;var dk=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);function Lr(e){this.m=e,this.g=0,this.j=new Map,this.l=this.i=this.h=null}Kr("mss/audio/mp4",function(){return new dr("mss/audio/mp4")},wr),Kr("mss/video/mp4",function(){return new dr("mss/video/mp4")},wr),(h=Lr.prototype).destroy=function(){this.j.clear(),this.i&&this.i.destroy()},h.isSupported=function(e,t){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var n=e;t&&(n=this.convertCodecs(t,e));var i=Ai(n).split(",");return n=Cn("audio",i),i=Cn("video",i),!(n&&(n=Zn(n),!hk.includes(n))||i&&(n=Zn(i),!pk.includes(n)))&&(t?Zt(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Zt(t)||Zt(e)))},h.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?(t=Ai(t).replace("mp4a.40.34","mp3").split(",").map(function(n){return li(n,"audio/mp4")}).map(xn).join(","),"audio"==e?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},h.getOriginalMimeType=function(){return this.m},h.transmux=function(e,t,n,i,r){var o=oe(e);if("audio"==r&&!ua(o)){for(var s=oa(o),u=s.length;u<o.length;u++)if(Gw(o,u))return Promise.reject(new k(2,3,3018,n?n.P()[0]:null));for(u=s.length;u<o.length;u++)if(Bw(o,u))return this.i||(this.i=new cr("audio/aac")),this.i.transmux(e,t,n,i,r);return Promise.reject(new k(2,3,3018,n?n.P()[0]:null))}this.h?this.h.clearData():this.h=new Bt,this.h.Hf(n.i);var a=this.h.parse(o),l=[],c=a.Sd();try{var d=null;if("video"==r){switch(c.video){case"avc":var f=[],g=null,v=a.rd(),y=function QM(e){function t(v){r={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:v.pts,dts:v.dts,nalus:[]}}function n(){if(r&&r.nalus.length&&r.frame){for(var v=[],y=m(r.nalus),T=y.next();!T.done;T=y.next()){var S=(T=T.value).fullData.byteLength,A=new Uint8Array(4);A[0]=S>>24&255,A[1]=S>>16&255,A[2]=S>>8&255,A[3]=255&S,v.push(A),v.push(T.fullData)}r.data=_t.apply(Nt,ee(v)),i.push(r)}}for(var i=[],r=null,o=!1,s=0;s<e.length;s++){var u=e[s],a=u.nalus,l=!1;r&&a.length&&!o&&(n(),t(u));for(var c=(a=m(u.nalus)).next();!c.done;c=a.next()){var d=!1;switch((c=c.value).type){case 1:var f=!1;d=!0;var g=c.data;l&&g.length>4&&(2===(g=tS(new Qo(g)))||4===g||7===g||9===g)&&(f=!0),f&&r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(u),r.frame=!0,r.isKeyframe=f;break;case 5:d=!0,r&&r.frame&&!r.isKeyframe&&(n(),r=null),r||t(u),r.frame=!0,r.isKeyframe=!0;break;case 6:case 8:case 12:d=!0;break;case 7:l=d=!0;break;case 9:o=d=!0,r&&r.frame&&(n(),r=null),r||t(u);break;default:d=!1}r&&d&&r.nalus.push(c)}}return n(),i}(v);if(!y.length)throw new k(2,3,3023,n?n.P()[0]:null);for(var T=0;T<y.length;T++){var S=y[T];null==g&&(g=S.dts),f.push({data:S.data,size:S.data.byteLength,duration:T+1<y.length?(y[T+1].dts||0)-(S.dts||0):y.length>1?(S.dts||0)-(y[T-1].dts||0):9e4*(n.endTime-n.startTime),sb:Math.round((S.pts||0)-(S.dts||0)),flags:{yb:0,mb:0,kb:0,ib:0,jb:S.isKeyframe?2:1,zb:S.isKeyframe?0:1}})}for(var I=[],_=m(v),P=_.next();!P.done;P=_.next())I.push.apply(I,ee(P.value.nalus));var b=function ZM(e){if(!e.length)return null;var t=e.find(function(y){return 7==y.type});if(e=e.find(function(y){return 8==y.type}),!t||!e)return null;var n=new Qo(t.data),i=yt(n);if(yt(n),yt(n),Ri(n),ek.includes(i)&&(3===(i=ae(n))&&qi(n,1),Ri(n),Ri(n),qi(n,1),we(n))){i=3!==i?8:12;for(var r=0;r<i;r++)we(n)&&Bc(n,r<6?16:64)}if(Ri(n),0===(i=ae(n)))ae(n);else if(1===i)for(qi(n,1),Ri(n),Ri(n),i=ae(n),r=0;r<i;r++)Ri(n);Ri(n),qi(n,1);var o=ae(n),s=ae(n),u=$e(n,1);0===u&&qi(n,1),qi(n,1);var a=0,l=0,c=0,d=0;if(we(n)&&(a=ae(n),l=ae(n),c=ae(n),d=ae(n)),r=i=1,we(n)&&we(n)){var f=yt(n);f>0&&f<=16?(i=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][f-1],r=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][f-1]):255===f&&(i=$e(n,16),r=$e(n,16))}return n=(2-u)*(s+1)*16-2*c-2*d,o=16*(o+1)-2*a-2*l,(a=[]).push((t=t.fullData).byteLength>>>8&255),a.push(255&t.byteLength),a=a.concat.apply(a,ee(t)),(t=[]).push((e=e.fullData).byteLength>>>8&255),t.push(255&e.byteLength),t=t.concat.apply(t,ee(e)),{height:n,width:o,Oa:e=new
1Uint8Array([1,a[3],a[4],a[5],255,225].concat(a,[1],t)),Ya:i,Za:r}}(I);if(!b||null==g)throw new k(2,3,3018,n?n.P()[0]:null);t.height=b.height,t.width=b.width,d={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&t.drmInfos.length>0,timescale:9e4,duration:i,Cb:[],Ga:new Uint8Array([]),Oa:b.Oa,Ya:b.Ya,Za:b.Za,data:{sequenceNumber:this.g,baseMediaDecodeTime:g,Ab:f},stream:t};break;case"hvc":var M=[],D=null,R=[],j=a.rd();if(!j.length)throw new k(2,3,3023,n?n.P()[0]:null);for(var U=0;U<j.length;U++){var B=j[U],H=B.nalus;R.push.apply(R,ee(H));for(var G=!1,K=[],z=!1,$=m(H),Q=$.next();!Q.done;Q=$.next()){var He=Q.value;switch(He.type){case 1:case 0:var le=z=!0;break;case 19:case 20:case 21:G=le=z=!0;break;case 32:case 33:case 34:case 39:case 40:le=!0;break;case 35:z=le=!0;break;default:le=!1}if(z&&le){var at=He.fullData.byteLength,ot=new Uint8Array(4);ot[0]=at>>24&255,ot[1]=at>>16&255,ot[2]=at>>8&255,ot[3]=255&at,K.push(ot),K.push(He.fullData)}}var nt=K.length?{data:_t.apply(Nt,ee(K)),isKeyframe:G}:null;nt&&(null==D&&null!=B.dts&&(D=B.dts),M.push({data:nt.data,size:nt.data.byteLength,duration:U+1<j.length?(j[U+1].dts||0)-(B.dts||0):j.length>1?(B.dts||0)-(j[U-1].dts||0):9e4*(n.endTime-n.startTime),sb:Math.round((B.pts||0)-(B.dts||0)),flags:{yb:0,mb:0,kb:0,ib:0,jb:nt.isKeyframe?2:1,zb:nt.isKeyframe?0:1}}))}var je=function tk(e){if(!e.length)return null;var t=e.find(function(s){return 32==s.type}),n=e.find(function(s){return 33==s.type}),i=e.find(function(s){return 34==s.type});if(!t||!n||!i)return null;var r=function nk(e){var t=new Qo(e,!0);return yt(t),yt(t),$e(t,4),$e(t,2),$e(t,6),{Ug:(e=$e(t,3))+1,Bh:t=we(t)}}(t.fullData);e=function ik(e){yt(e=new Qo(e,!0)),yt(e);var t=0,n=0,i=0,r=0;$e(e,4);var o=$e(e,3);we(e);for(var s=$e(e,2),u=$e(e,1),a=$e(e,5),l=yt(e),c=yt(e),d=yt(e),f=yt(e),g=yt(e),v=yt(e),y=yt(e),T=yt(e),S=yt(e),A=yt(e),I=yt(e),_=[],P=[],b=0;b<o;b++)_.push(we(e)),P.push(we(e));if(o>0)for(b=o;b<8;b++)$e(e,2);for(b=0;b<o;b++)_[b]&&$e(e,88),P[b]&&yt(e);ae(e),3==(_=ae(e))&&$e(e,1),P=ae(e),b=ae(e),we(e)&&(t+=ae(e),n+=ae(e),i+=ae(e),r+=ae(e));var M=ae(e),D=ae(e),R=ae(e);if(we(e))for(var j=0;j<=o;j++)ae(e),ae(e),ae(e);else ae(e),ae(e),ae(e);if(ae(e),ae(e),ae(e),ae(e),ae(e),ae(e),we(e)&&we(e))for(j=0;j<4;j++)for(var U=0;U<(3===j?2:6);U++)if(we(e)){var B=Math.min(64,1<<4+(j<<1));j>1&&sa(e);for(var H=0;H<B;H++)sa(e)}else ae(e);for(we(e),we(e),we(e)&&(yt(e),ae(e),ae(e),we(e)),j=ae(e),B=U=0;B<j;B++)if(H=!1,0!==B&&(H=we(e)),H){B===j&&ae(e),we(e),ae(e);for(var G=H=0;G<=U;G++){var K=we(e),z=!1;K||(z=we(e)),(K||z)&&H++}U=H}else{for(U=(G=ae(e))+(H=ae(e)),K=0;K<G;K++)ae(e),we(e);for(G=0;G<H;G++)ae(e),we(e)}if(we(e))for(j=ae(e),U=0;U<j;U++){for(B=0;B<R+4;B++)$e(e,1);$e(e,1)}if(j=R=1,U=0,we(e),we(e),we(e)){if(we(e)&&(H=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],G=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1],(B=yt(e))>0&&B<=16?(R=H[B-1],j=G[B-1]):255===B&&(R=$e(e,16),j=$e(e,16))),we(e)&&we(e),we(e)&&($e(e,3),we(e),we(e)&&(yt(e),yt(e),yt(e))),we(e)&&(ae(e),ae(e)),we(e),we(e),we(e),(B=we(e))&&(ae(e),ae(e),ae(e),ae(e)),we(e)&&($e(e,32),$e(e,32),we(e)&&ae(e),we(e)))for(G=!1,B=we(e),H=we(e),(B||H)&&((G=we(e))&&(yt(e),$e(e,5),we(e),$e(e,5)),$e(e,4),$e(e,4),G&&$e(e,4),$e(e,5),$e(e,5),$e(e,5)),K=0;K<=o;K++){var $=!0;z=1,we(e)||($=we(e));var Q=!1;if($?ae(e):Q=we(e),Q||(z=ae(e)+1),B){for($=0;$<z;$++)ae(e),ae(e),G&&(ae(e),ae(e));we(e)}if(H){for($=0;$<z;$++)ae(e),ae(e),G&&(ae(e),ae(e));we(e)}}we(e)&&(we(e),we(e),we(e),U=ae(e),ae(e),ae(e),ae(e),ae(e))}return{yg:I,Eg:s,Fg:u,Dg:a,zg:l,Ag:c,Bg:d,Cg:f,rg:g,sg:v,ug:y,vg:T,wg:S,xg:A,nf:U,jg:0,hg:_,gg:M,fg:D,width:P-(t+n)*(1===_||2===_?2:1),height:b-(i+r)*(1===_?2:1),Sk:R,Rk:j}}(n.fullData);var o=function rk(e){var t=new Qo(e,!0);yt(t),yt(t),ae(t),ae(t),we(t),we(t),$e(t,3),we(t),we(t),ae(t),ae(t),sa(t),we(t),we(t),we(t)&&ae(t),sa(t),sa(t),we(t),we(t),we(t),we(t),e=we(t);var n=1;return(t=we(t))&&e?n=0:t?n=3:e&&(n=2),{Wg:n}}(i.fullData);return t=function ok(e,t,n,i){var r=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));return r[0]=1,r[1]=(3&i.Eg)<<6|(i.Fg?1:0)<<5|31&i.Dg,r[2]=i.zg,r[3]=i.Ag,r[4]=i.Bg,r[5]=i.Cg,r[6]=i.rg,r[7]=i.sg,r[8]=i.ug,r[9]=i.vg,r[10]=i.wg,r[11]=i.xg,r[12]=i.yg,r[13]=240|(3840&i.nf)>>8,r[14]=255&i.nf,r[15]=252|3&i.Wg,r[16]=252|3&i.hg,r[17]=248|7&i.gg,r[18]=248|7&i.fg,r[19]=0,r[20]=0,r[21]=(3&i.jg)<<6|(7&i.Ug)<<3|(i.Bh?1:0)<<2|3,r[22]=3,r[23]=160,r[24]=0,r[25]=1,r[26]=(65280&e.byteLength)>>8,r[27]=(255&e.byteLength)>>0,r.set(e,28),r[23+(5+e.byteLength)]=161,r[23+(5+e.byteLength)+1]=0,r[23+(5+e.byteLength)+2]=1,r[23+(5+e.byteLength)+3]=(65280&t.byteLength)>>8,r[23+(5+e.byteLength)+4]=(255&t.byteLength)>>0,r.set(t,23+(5+e.byteLength)+5),r[23+(5+e.byteLength+5+t.byteLength)]=162,r[23+(5+e.byteLength+5+t.byteLength)+1]=0,r[23+(5+e.byteLength+5+t.byteLength)+2]=1,r[23+(5+e.byteLength+5+t.byteLength)+3]=(65280&n.byteLength)>>
18,r[23+(5+e.byteLength+5+t.byteLength)+4]=(255&n.byteLength)>>0,r.set(n,23+(5+e.byteLength+5+t.byteLength)+5),r}(t.fullData,n.fullData,i.fullData,{Ug:r.Ug,Bh:r.Bh,Eg:e.Eg,Fg:e.Fg,yg:e.yg,Dg:e.Dg,zg:e.zg,Ag:e.Ag,Bg:e.Bg,Cg:e.Cg,rg:e.rg,sg:e.sg,ug:e.ug,vg:e.vg,wg:e.wg,xg:e.xg,jg:e.jg,nf:e.nf,hg:e.hg,gg:e.gg,fg:e.fg,Wg:o.Wg}),{height:e.height,width:e.width,Oa:t,Ya:e.Sk,Za:e.Rk}}(R);if(!je||null==D)throw new k(2,3,3018,n?n.P()[0]:null);t.height=je.height,t.width=je.width,d={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&t.drmInfos.length>0,timescale:9e4,duration:i,Cb:[],Ga:new Uint8Array([]),Oa:je.Oa,Ya:je.Ya,Za:je.Za,data:{sequenceNumber:this.g,baseMediaDecodeTime:D,Ab:M},stream:t}}d&&(l.push(d),d=null)}if("audio"==r){switch(c.audio){case"aac":for(var Ke,ze=[],Ue=null,Ge=null,$t=null,tn=m(a.ub()),nn=tn.next();!nn.done;nn=tn.next()){var bn=nn.value,An=bn.data;if(An){var Mt=0;if(-1==Ge&&$t)An=_t($t,bn.data),Ge=null;else if(null!=Ge&&$t){Mt=Math.max(0,Ge);var ls=_t($t,An.subarray(0,Mt));ze.push({data:ls,size:ls.byteLength,duration:1024,sb:0,flags:{yb:0,mb:0,kb:0,ib:0,jb:2,zb:0}}),Ge=$t=null}if(!(Ke=Uw(An,Mt)))throw new k(2,3,3018,n?n.P()[0]:null);for(t.audioSamplingRate=Ke.sampleRate,t.channelsCount=Ke.channelCount,null==Ue&&null!==bn.pts&&(Ue=bn.pts);Mt<An.length;){var Pr=jw(An,Mt);if(!Pr){$t=An.subarray(Mt,An.length),Ge=-1;break}var Xs=Pr.Yd+Pr.ra;0!=(Ge=Math.max(0,Mt+Xs-An.length))?$t=An.subarray(Mt+Pr.Yd,Mt+Xs):Mt+Xs<=An.length&&ze.push({data:An.subarray(Mt+Pr.Yd,Mt+Xs),size:Pr.ra,duration:1024,sb:0,flags:{yb:0,mb:0,kb:0,ib:0,jb:2,zb:0}}),Mt+=Xs}}}if(!Ke||null==Ue){Ue=9e4*n.startTime;var Lo=Cn("audio",t.codecs.split(","));if(!Lo||!t.channelsCount||!t.audioSamplingRate)throw new k(2,3,3018,n?n.P()[0]:null);Ke={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:Lo};var ja=function $M(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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(6===t)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])}else{if(1===t)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(2===t||3===t)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}(Lo,t.channelsCount);if(!ja)throw new k(2,3,3018,n?n.P()[0]:null);for(var Ch=Ue+9e4*(n.endTime-n.startTime),nc=Ue;nc<Ch;)ze.push({data:ja,size:ja.byteLength,duration:1024,sb:0,flags:{yb:0,mb:0,kb:0,ib:0,jb:2,zb:0}}),nc+=1024/Ke.sampleRate*9e4}var $r=Ke.sampleRate,fk=Ue/9e4*$r;d={id:t.id,type:"audio",codecs:Ke.codec,encrypted:t.encrypted&&t.drmInfos.length>0,timescale:$r,duration:i,Cb:[],Ga:new Uint8Array([]),Oa:new Uint8Array([]),Ya:0,Za:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:fk,Ab:ze},stream:t};break;case"ac3":for(var Xw=[],Mh=0,Vg=new Uint8Array([]),kh=null,zw=m(a.ub()),Hg=zw.next();!Hg.done;Hg=zw.next()){var Gg=Hg.value,Kg=Gg.data;null==kh&&null!==Gg.pts&&(kh=Gg.pts);for(var Ua=0;Ua<Kg.length;){var zs=Fw(Kg,Ua);zs?(t.audioSamplingRate=zs.sampleRate,t.channelsCount=zs.channelCount,Mh=zs.sampleRate,Vg=zs.Ga,Xw.push({data:Kg.subarray(Ua,Ua+zs.ra),size:zs.ra,duration:1536,sb:0,flags:{yb:0,mb:0,kb:0,ib:0,jb:2,zb:0}}),Ua+=zs.ra):Ua++}}if(0==Mh||0==Vg.byteLength||null==kh)throw new k(2,3,3018,n?n.P()[0]:null);var gk=kh/9e4*Mh;d={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&t.drmInfos.length>0,timescale:Mh,duration:i,Cb:[],Ga:Vg,Oa:new Uint8Array([]),Ya:0,Za:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:gk,Ab:Xw},stream:t};break;case"ec3":for(var Yw=[],_h=0,Wg=new Uint8Array([]),Dh=null,qw=m(a.ub()),Xg=qw.next();!Xg.done;Xg=qw.next()){var zg=Xg.value,Yg=zg.data;null==Dh&&null!==zg.pts&&(Dh=zg.pts);for(var Ba=0;Ba<Yg.length;){var Ys=Vw(Yg,Ba);Ys?(t.audioSamplingRate=Ys.sampleRate,t.channelsCount=Ys.channelCount,_h=Ys.sampleRate,Wg
1=Ys.Ga,Yw.push({data:Yg.subarray(Ba,Ba+Ys.ra),size:Ys.ra,duration:1536,sb:0,flags:{yb:0,mb:0,kb:0,ib:0,jb:2,zb:0}}),Ba+=Ys.ra):Ba++}}if(0==_h||0==Wg.byteLength||null==Dh)throw new k(2,3,3018,n?n.P()[0]:null);var mk=Dh/9e4*_h;d={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&t.drmInfos.length>0,timescale:_h,duration:i,Cb:[],Ga:Wg,Oa:new Uint8Array([]),Ya:0,Za:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:mk,Ab:Yw},stream:t};break;case"mp3":for(var Lh,$w=[],Ph=null,Jw=m(a.ub()),qg=Jw.next();!qg.done;qg=Jw.next()){var $g=qg.value,ic=$g.data;if(ic){null==Ph&&null!==$g.pts&&(Ph=$g.pts);for(var Lu=0;Lu<ic.length;){var Fa=Ih(ic,Lu);Fa?(Lh||(Lh=Fa),Lu+Fa.ra<=ic.length&&$w.push({data:ic.subarray(Lu,Lu+Fa.ra),size:Fa.ra,duration:1152,sb:0,flags:{yb:0,mb:0,kb:0,ib:0,jb:2,zb:0}}),Lu+=Fa.ra):Lu++}}}if(!Lh||null==Ph)throw new k(2,3,3018,n?n.P()[0]:null);var Zw=Lh.sampleRate,vk=Ph/9e4*Zw;d={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&t.drmInfos.length>0,timescale:Zw,duration:i,Cb:[],Ga:new Uint8Array([]),Oa:new Uint8Array([]),Ya:0,Za:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:vk,Ab:$w},stream:t};break;case"opus":var Qw=[],bh=null,Po=a.H;if(!Po)throw new k(2,3,3018,n?n.P()[0]:null);var _i=[];switch(Po.pj){case 1:case 2:_i=[0];break;case 0:_i=[255,1,1,0,1];break;case 128:_i=[255,2,0,0,1];break;case 3:_i=[1,2,1,0,2,1];break;case 4:_i=[1,2,2,0,1,2,3];break;case 5:_i=[1,3,2,0,4,1,2,3];break;case 6:_i=[1,4,2,0,4,1,2,3,5];break;case 7:_i=[1,4,2,0,4,1,2,3,5,6];break;case 8:_i=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:_i=[1,1,2,0,1];break;case 131:_i=[1,1,3,0,1,2];break;case 132:_i=[1,1,4,0,1,2,3];break;case 133:_i=[1,1,5,0,1,2,3,4];break;case 134:_i=[1,1,6,0,1,2,3,4,5];break;case 135:_i=[1,1,7,0,1,2,3,4,5,6];break;case 136:_i=[1,1,8,0,1,2,3,4,5,6,7]}for(var ex=new Uint8Array([0,Po.channelCount,0,0,Po.sampleRate>>>24&255,Po.sampleRate>>>17&255,Po.sampleRate>>>8&255,Po.sampleRate>>>0&255,0,0].concat(ee(_i))),tx=Po.sampleRate,nx=m(a.ub()),Jg=nx.next();!Jg.done;Jg=nx.next()){var Zg=Jg.value,Va=Zg.data;null==bh&&null!==Zg.pts&&(bh=Zg.pts);for(var rc=0;rc<Va.length;){for(var yk=0!=(16&Va[rc+1]),Tk=0!=(8&Va[rc+1]),cs=rc+2,Rh=0;255===Va[cs];)Rh+=255,cs+=1;Rh+=Va[cs],cs+=1,cs+=yk?2:0;var ix=Va.slice(cs+=Tk?2:0,cs+Rh);Qw.push({data:ix,size:ix.byteLength,duration:960,sb:0,flags:{yb:0,mb:0,kb:0,ib:0,jb:2,zb:0}}),rc=cs+Rh}}if(0==ex.byteLength||null==bh)throw new k(2,3,3018,n?n.P()[0]:null);t.audioSamplingRate=Po.sampleRate,t.channelsCount=Po.channelCount;var wk=bh/9e4*tx;d={id:t.id,type:"audio",codecs:"opus",encrypted:t.encrypted&&t.drmInfos.length>0,timescale:tx,duration:i,Cb:[],Ga:ex,Oa:new Uint8Array([]),Ya:0,Za:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:wk,Ab:Qw},stream:t}}d&&(l.push(d),d=null)}}catch(em){return em&&3023==em.code?Promise.resolve(new Uint8Array([])):Promise.reject(em)}if(!l.length)return Promise.reject(new k(2,3,3018,n?n.P()[0]:null));var rx=new na(l),Qg=t.id+"_"+n.i;if(this.j.has(Qg))var oc=this.j.get(Qg);else oc=ia(rx),this.j.set(Qg,oc);var xk=this.l!==oc,ox=ul(rx);if(this.l=oc,this.g++,xk){var Sk=_t(oc,ox);return Promise.resolve(Sk)}return Promise.resolve(ox)},ue("shaka.transmuxer.TsTransmuxer",Lr),Lr.prototype.transmux=Lr.prototype.transmux,Lr.prototype.getOriginalMimeType=Lr.prototype.getOriginalMimeType,Lr.prototype.convertCodecs=Lr.prototype.convertCodecs,Lr.prototype.isSupported=Lr.prototype.isSupported,Lr.prototype.destroy=Lr.prototype.destroy;var hk=["aac","ac-3","ec-3","mp3","opus"],pk=["avc","hevc"];function Ww(){}Kr("video/mp2t",function(){return new Lr("video/mp2t")},ro),wt(Ww,Ni),ue("shaka.util.FairPlayUtils",Ww)}.call(on,ln,ln,void 0),typeof exports<"u")for(var er in on.shaka)exports[er]=on.shaka[er];else"function"==typeof define&&define.amd?define(function(){return on.shaka}):ln.shaka=on.shaka}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.