PageSourceSearch

https://member.ufa356.guru/assets/1789559418326/DN0qTZCl.js

js ufa356.guru collected 2026-10-06 13:17:25 UTC 929,897 bytes, 84 lines download raw bytes

1import{O as W_,d as Si,Q as uf,R as za,S as un,r as He,G as sr,T as z_,K as Va,M as Mn,o as qi,L as lf,f as qe,g as dt,h as Se,a as Me,c as ii,w as Ni,b as _e,B as gi,t as At,V as Hg,P as ea,J as Vi,v as xi,F as vi,I as wn,W as jg,e as Yt,q as ln,X as Ld,Y as Xs,n as Gg,Z as on,z as Gi,$ as $_,y as K_,a0 as As,a1 as cf,a2 as X_,a3 as Y_,x as Q_,l as yo,a4 as J_,a5 as zr,a6 as Xt,U as Z_,a7 as eb,a8 as Wg,a9 as Ys,aa as tb,E as du,D as rb,p as Kt,ab as jr,_ as ib,ac as ks,ad as Ds}from"./zGN25SIG.js";import{_ as zg}from"./DniAcJkn.js";import{s as $g}from"./BdzrbLwg.js";import{_ as nb,s as yh}from"./C5OnWoI0.js";import{u as ab,a as sb}from"./Bis7A5QA.js";import{_ as Kg}from"./B48F4MML.js";import{u as ob}from"./BWXnTfPx.js";import{u as ub}from"./BiojWOmp.js";import{u as lb}from"./BlXiFU5_.js";import"./CivJAmq1.js";import"./Bwo9GFhf.js";import"./CXTT9b81.js";import"./DxzWTJS2.js";const cb=""+new URL("freerewards.CejWw17-.gif",import.meta.url).href,df=W_("floatingButton",{state:()=>({list:[]}),actions:{register(s){let r=this.list||[];r=r.filter(i=>s.id!==i.id),r.push(s),r.sort((i,n)=>(n.priority||0)-(i.priority||0)),this.list=r},unregister(s){this.list=this.list.filter(r=>r.id!==s)}}}),db={key:0},fb={style:{position:"absolute",top:"150px",left:"50%",transform:"translate(-50%, -50%)","z-index":"1000",width:"100%"}},hb={class:"flex flex-1 justify-center items-center mt-2"},pb=["src"],mb={class:"flex flex-col items-center text-center"},vb=Si({__name:"PopupReward",setup(s){const{showMobileLayout:r}=uf(),i=za(),{isEnableFeatureMembership:n}=un(i),e=He([]),t=sr(()=>{let E=e.value;return E.length===0?null:E[0]}),a=z_("minimizePopUpRewardModal",!1),o=He(!1),l=He(void 0);Va(()=>t.value,E=>{if(E){const B=new Image;B.src=E?.image,B.onload=()=>{o.value=!0},l.value=E?.image}else l.value=void 0});const u=()=>{o.value=!1,l.value=void 0,e.value=[]},d=df(),f=async()=>{const{succ:E,data:B}=await Vi.getPopupRewardRedemptionList("",void 0,{showLoading:!1});E&&(e.value=(B||{}).items||[],e.value.length>0?d.register({id:"popup-reward",icon:cb,action:function(){a.value=!1},priority:90}):d.unregister("popup-reward"))},m=Mn(),x=()=>{m.push({path:"/"+ea.REWARDS,query:{redeemId:t.value?.id}})},C=async()=>{u(),n.value&&await f()},L=async()=>{a.value=!a.value};return qi(()=>{window.scrollTo({top:0,behavior:"smooth"}),document.body.classList.toggle("overflow-hidden",!0),C()}),lf(()=>{document.body.classList.toggle("overflow-hidden",!1),d.unregister("popup-reward")}),(E,B)=>{const q=Hg;return Se(n)&&Se(t)&&o.value?(Me(),qe("div",db,[Se(a)?dt("",!0):(Me(),ii(q,{key:0},{default:Ni(()=>[_e("div",fb,[_e("div",{class:gi(["popup-reward-modal-container p-2",{"mx-auto max-w-[438px]":Se(r)}])},[_e("div",hb,[_e("img",{class:"rounded-lg cursor-pointer",src:l.value,onClick:x},null,8,pb)]),_e("div",mb,[_e("div",{class:"modal-btn flex justify-center items-center text-center text-xs my-2 cursor-pointer max-w-[200px]",onClick:L},At(E.$t("btn.close")),1)])],2)])]),_:1}))])):dt("",!0)}}}),gb=Object.assign(xi(vb,[["__scopeId","data-v-eafb49ea"]]),{__name:"PopupReward"}),yb={key:0,class:"flex justify-center items-center h-[35px]"},_b={class:"w-[15px] flex items-center mx-2"},bb={class:"flex justify-center items-center"},Tb=["onClick"],Sb={class:"w-[15px] flex items-center mx-2"},xb={key:1,class:"h-[35px]"},Eb={__name:"AnnouncementNavigator",props:{items:{type:Array,required:!0},currentIndex:{type:Number,required:!0},totalCount:{type:Number,required:!0}},emits:["slide-left","slide-right","select-item"],setup(s){return(r,i)=>s.totalCount>1?(Me(),qe("div",yb,[_e("div",_b,[s.currentIndex>0?(Me(),qe("img",{key:0,class:"w-[15px] h-[17px] mt-1 cursor-pointer",src:zg,alt:"icn",onClick:i[0]||(i[0]=n=>r.$emit("slide-left"))})):dt("",!0)]),_e("div",bb,[(Me(!0),qe(vi,null,wn(s.items,(n,e)=>(Me(),qe("div",{key:n.id},[_e("div",{class:gi(["rounded-full mx-1 mt-1",[e===s.currentIndex?"bg-[#EFD0A0]":"bg-[#807E75]",s.totalCount>20?"w-[4px] h-[4px]":"w-[7px] h-[7px]"]]),onClick:t=>r.$emit("select-item",e)},null,10,Tb)]))),128))]),_e("div",Sb,[s.currentIndex<s.totalCount-1?(Me(),qe("img",{key:0,class:"w-[15px] h-[17px] mt-1 cursor-pointer",src:jg,alt:"icn",onClick:i[1]||(i[1]=n=>r.$emit("slide-right"))})):dt("",!0)])])):(Me(),qe("div",xb))}},Cb={class:"overlay-announcement-modal-popup"},wb={key:0,class:"overlay-arrows"},Ab={class:"announcement-modal-content-wrapper"},kb={class:"flex flex-col p-4 overflow-auto announcement-modal-content-scroll"},Db={class:"flex justify-center mb-2 mt-2"},Pb=["innerHTML"],Ib=Si({__name:"AnnouncementContentOverlay",props:{title:{},content:{},currentIndex:{},totalCount:{}},emits:["slide-left-touch","slide-right-touch"],setup(s){return(r,i)=>(Me(),qe("div",Cb,[r.totalCount>1?(Me(),qe("div",wb,[r.currentIndex>0?(Me(),qe("img",{key:0,class:"overlay-arrow left",src:zg,alt:"left",onClick:i[0]||(i[0]=n=>r.$emit("slide-right-touch"))})):dt("",!0),r.currentIndex<r.totalCount-1?(Me(),qe("img",{key:1,class:"overlay-arrow right",src:jg,alt:"right",onClick:i[1]||(i[1]=n=>r.$emit("slide-left-touch"))})):dt("",!0)])):dt("",!0),_e("div",Ab,[_e("div",kb,[_e("div",Db,At(r.t
1itle),1),_e("div",{class:"text-[#D9D9D9] text-sm px-4",innerHTML:r.content},null,8,Pb)])])]))}}),Lb=Object.assign(xi(Ib,[["__scopeId","data-v-65c1966a"]]),{__name:"AnnouncementContentOverlay"}),Xg={SELF_CONTENT:"self-content",NO_CONTENT:"no-content",EXTERNAL_URL:"external-url"},Mb=["id"],Ob={key:0,class:"loader absolute"},Rb=["src"],Fb={__name:"AnnouncementCarousel",props:{currentItem:{type:Object,default:null},currentIndex:{type:Number,required:!0},totalCount:{type:Number,required:!0},transitionName:{type:String,default:"slideLeft"},isImgLoading:{type:Boolean,default:!1},showModalContent:{type:Boolean,default:!1}},emits:["touchstart","touchmove","touchend","img-load","img-error","img-click","slide-left-touch","slide-right-touch"],setup(s){return(r,i)=>{const n=Lb;return Me(),qe("div",{class:"announcement-image-area",onTouchstart:i[5]||(i[5]=e=>r.$emit("touchstart",e)),onTouchmove:i[6]||(i[6]=e=>r.$emit("touchmove",e)),onTouchend:i[7]||(i[7]=e=>r.$emit("touchend"))},[Yt(Ld,{name:s.transitionName,mode:"out-in"},{default:Ni(()=>[s.currentItem?(Me(),qe("div",{key:s.currentItem.id},[_e("div",{id:s.currentItem.id,class:"relative w-full h-full flex justify-center items-center"},[s.isImgLoading?(Me(),qe("span",Ob)):dt("",!0),(Me(),qe("img",{key:s.currentItem.id,class:gi(["rounded-lg announcement-modal-image",s.currentItem.contentType===Se(Xg).NO_CONTENT?"":"cursor-pointer"]),src:s.currentItem.imgUrl,loading:"lazy",decoding:"async",style:ln({visibility:s.isImgLoading?"hidden":"visible"}),onLoad:i[0]||(i[0]=e=>r.$emit("img-load")),onError:i[1]||(i[1]=e=>r.$emit("img-error")),onClick:i[2]||(i[2]=e=>r.$emit("img-click",s.currentItem))},null,46,Rb))],8,Mb),Yt(Ld,{name:s.showModalContent?"slideDown":"slideUp",mode:"out-in"},{default:Ni(()=>[s.showModalContent?(Me(),ii(n,{key:0,title:s.currentItem.title,content:s.currentItem.content,"current-index":s.currentIndex,"total-count":s.totalCount,onSlideLeftTouch:i[3]||(i[3]=e=>r.$emit("slide-left-touch")),onSlideRightTouch:i[4]||(i[4]=e=>r.$emit("slide-right-touch"))},null,8,["title","content","current-index","total-count"])):dt("",!0)]),_:1},8,["name"])])):dt("",!0)]),_:1},8,["name"])],32)}}},Nb=xi(Fb,[["__scopeId","data-v-98148107"]]),Bb=["src"],Ub=1,qb=5,Vb=Si({__name:"AnnouncementImageViewer",props:{url:{}},emits:["close"],setup(s){const r=He(null),i=He(1),n=He(0),e=He(0),t=He(!1),a=He({x:0,y:0}),o=He(0),l=sr(()=>({transform:`translate(calc(-50% + ${n.value}px), calc(-50% + ${e.value}px)) scale(${i.value})`}));function u(z){const U=i.value*z;i.value=Math.max(Ub,Math.min(qb,U))}function d(z){const G=1+-z.deltaY*.0015;u(G)}function f(z){t.value=!0,a.value={x:z.clientX-n.value,y:z.clientY-e.value}}function m(z){t.value&&(n.value=z.clientX-a.value.x,e.value=z.clientY-a.value.y)}function x(){t.value=!1}function C(){i.value===1?i.value=2:(i.value=1,n.value=0,e.value=0)}function L(z){const U=z[0],F=z[1];if(!U||!F)return 0;const G=U.clientX-F.clientX,O=U.clientY-F.clientY;return Math.hypot(G,O)}function E(z){if(z.touches.length===1){const U=z.touches[0];if(!U)return;t.value=!0,a.value={x:U.clientX-n.value,y:U.clientY-e.value}}else z.touches.length===2&&(t.value=!1,o.value=L(z.touches))}function B(z){if(z.touches.length===1&&i.value>1){const U=z.touches[0];if(!U)return;n.value=U.clientX-a.value.x,e.value=U.clientY-a.value.y}else if(z.touches.length===2){const U=L(z.touches),F=U/(o.value||U);u(F),o.value=U}}function q(){t.value=!1,o.value=0}return(z,U)=>(Me(),qe("div",{class:"image-viewer-backdrop",onClick:U[1]||(U[1]=Xs(F=>z.$emit("close"),["self"]))},[_e("button",{class:"image-viewer-close","aria-label":"Close image viewer",onClick:U[0]||(U[0]=F=>z.$emit("close"))},"✕"),_e("div",{ref_key:"viewerStage",ref:r,class:"image-viewer-stage",onWheelPassive:d,onMousedown:f,onMousemove:m,onMouseup:x,onMouseleave:x,onTouchstartPassive:E,onTouchmovePassive:B,onTouchend:q,onDblclick:Xs(C,["prevent"])},[z.url?(Me(),qe("img",{key:0,src:z.url,class:"image-viewer-img",style:ln(Se(l)),alt:"announcement",draggable:"false"},null,12,Bb)):dt("",!0)],544)]))}}),Hb=Object.assign(xi(Vb,[["__scopeId","data-v-037938a8"]]),{__name:"AnnouncementImageViewer"}),jb={class:"flex flex-col justify-center items-center text-center"},Gb={class:"inline-flex items-center"},Wb={class:"relative flex cursor-pointer items-center rounded-full p-3",for:"announcement-checkbox","data-ripple-dark":"true"},zb=["checked"],$b={class:"my-2 text-[12px] text-[#FDD387]"},Kb={__name:"AnnouncementFooter",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue","close"],setup(s){return(r,i)=>(Me(),qe("div",jb,[_e("div",Gb,[_e("label",Wb,[_e("input",{id:"announcement-checkbox",checked:s.modelValue,type:"checkbox",class:"before:content[''] peer relative h-5 w-5 cursor-pointer appearance-none rounded-md border border-[#FDD387] transition-all before:absolute before:top-2/4 before:left-2/4 before:block before:h-12 before:w-12 before:-translate-y-2/4 before:-translate-x-2/4 before:rounded-full before:bg-blue-gray-500 before:opacity-0 before:transition-opacity checked:border-[#FDD387] checked:bg-transparent checked:before:bg-transparent hover:before:opacity-10",onChange:i[0]||(i[0]=n=>r.$emit("update:modelValue",n.target.checked))},null,40,zb),i[2]||(i[2]=_e("div",{class:"pointer-events-none absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-[#FDD387] opacity-0 transition-opacity peer-checked:opacity-100"},[_e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor",stroke:"currentColor","stroke-width":"1"},[_e("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"})])],-1))]),_e("span",$b,At(r.$t("info.doNotShowAgainToday")),1)]),_e("div",{class:"announcement-modal-btn flex justify-center items-center text-center text-xs my-2 cursor-pointer",onClick:i[1]||(i[1]=n=>r.$emit("close"))},At(r.$t("btn.close")),1)]))}},Xb=xi(Kb,[["__scopeId","data-v-0216a4d7"]]),Yb={style:{position:"absolute",top:"min(150px, 15vh)",left:"50%",transform:"translate(-50%, -50%)","z-index":"1000",width:"100%"}},Qb={__name:"PopupModalAnnouncement",emits:["closeModalClick"],setup(s,{emit:r}){const{showMobileLayout:i}
1=uf(),n=r,e=He([]),t=He(0),a=He("slideLeft"),o=He(!1),l=He(!1),u=He(!0),d=He(!1),f=He(8),m=He(0),x=He(!1),C=He(!1),L=He(""),E=new Set;let B=null,q=0,z=0;async function U(){if(await O(),e.value.length===0){n("closeModalClick",{btn:!0});return}await H(),u.value=!1,d.value=!0,D(t.value)}function F(){u.value=!1}function G(){u.value=!1}async function O(){const ge=await Vi.getPopupAnnouncements({showLoading:!1});ge.succ&&(e.value=ge.data.rows.map(De=>({id:De.fileId,title:De.title,imgUrl:De.contentFile.url,externalUrl:De.externalUrl,content:De.content,contentType:De.contentType})))}function H(){return new Promise(ge=>{if(!e.value||e.value.length===0)return ge();const De=e.value[t.value],Qe=De&&De.imgUrl;if(!Qe)return ge();if(E&&E.has(Qe)){Promise.resolve().then(ge);return}try{E.add(Qe);const Oe=new Image;Oe.decoding="async",Oe.loading="eager",Oe.onload=()=>ge(),Oe.onerror=()=>ge(),Oe.src=Qe}catch{ge()}})}function A(ge){try{if(!ge||E.has(ge))return;E.add(ge);const De=new Image;De.decoding="async",De.loading="eager",De.src=ge}catch{}}function D(ge){if(!e.value||e.value.length===0)return;const De=e.value.length,Qe=Math.max(0,Math.min(ge,De-1));[Qe,Math.min(Qe+1,De-1),Math.min(Qe+2,De-1),Math.max(Qe-1,0)].forEach(ot=>{const vt=e.value[ot];vt&&vt.imgUrl&&A(vt.imgUrl)})}function j(ge){ge.contentType===Xg.EXTERNAL_URL&&window.open(ge.externalUrl,"_blank")}function X(){t.value>0&&(a.value="slideRight",t.value=(t.value-1+e.value.length)%e.value.length,u.value=!0),D(t.value),be()}function J(){t.value<e.value.length-1&&(a.value="slideLeft",t.value=(t.value+1)%e.value.length,u.value=!0),D(t.value),be()}function ne(ge){if(ge.touches.length>1){x.value=!0,be();return}x.value=!1,q=ge.touches[0].clientX}function se(ge){if(ge.touches.length>1||x.value){x.value=!0;return}z=ge.touches[0].clientX}function ue(){if(x.value){x.value=!1;return}const ge=z-q;ge>50?te():ge<-50&&oe()}function oe(){t.value<e.value.length-1&&(a.value="slideLeft",t.value=(t.value+1)%e.value.length,u.value=!0),D(t.value),be()}function te(){t.value>0&&(a.value="slideRight",t.value=(t.value-1+e.value.length)%e.value.length,u.value=!0),D(t.value),be()}function le(){n("closeModalClick",{btn:!0});const ge=Gg();if(ge.setShowAnnouncementModal(!1),l.value){const De=new Date().toLocaleDateString();ge.setDoNotShowAnnouncementModalDate(De)}}function re(){m.value=f.value,B=$g(()=>{m.value--,m.value<=0&&(t.value===e.value.length-1?(clearInterval(B),m.value=0):o.value||(m.value=f.value,oe()))},1e3)}function ce(ge){ge!==t.value&&(ge>t.value?(t.value=ge-1,J()):(t.value=ge+1,X()),u.value=!0,D(t.value),be())}function be(){t.value<e.value.length-1&&(m.value=f.value)}function Pe(){C.value=!1,L.value="",document.body.classList.remove("overflow-hidden"),t.value<e.value.length-1&&re(),window.removeEventListener("keydown",Re)}function Re(ge){ge.key==="Escape"&&Pe()}return qi(()=>{window.scrollTo({top:0,behavior:"smooth"}),document.body.classList.toggle("overflow-hidden",!0),U(),re()}),lf(()=>{document.body.classList.toggle("overflow-hidden",!1),B&&clearInterval(B)}),(ge,De)=>{const Qe=Eb,Oe=Nb,ot=Hb,vt=Xb,ut=Hg;return e.value.length>=1&&d.value?(Me(),ii(ut,{key:0},{default:Ni(()=>[_e("div",Yb,[e.value.length>
1=1?(Me(),qe("div",{key:0,class:gi(["announcement-modal-container p-2",{"mx-auto max-w-[438px]":Se(i)}])},[Yt(Qe,{items:e.value,"current-index":t.value,"total-count":e.value.length,onSlideLeft:X,onSlideRight:J,onSelectItem:ce},null,8,["items","current-index","total-count"]),Yt(Oe,{"current-item":e.value[t.value],"current-index":t.value,"total-count":e.value.length,"transition-name":a.value,"is-img-loading":u.value,"show-modal-content":o.value,onTouchstart:ne,onTouchmove:se,onTouchend:ue,onImgLoad:F,onImgError:G,onImgClick:j,onSlideLeftTouch:oe,onSlideRightTouch:te},null,8,["current-item","current-index","total-count","transition-name","is-img-loading","show-modal-content"]),C.value?(Me(),ii(ot,{key:0,url:L.value,onClose:Pe},null,8,["url"])):dt("",!0),Yt(vt,{modelValue:l.value,"onUpdate:modelValue":De[0]||(De[0]=it=>l.value=it),onClose:le},null,8,["modelValue"])],2)):dt("",!0)])]),_:1})):dt("",!0)}}},Jb=xi(Qb,[["__scopeId","data-v-d73f5953"]]);var fu,_h;function _o(){if(_h)return fu;_h=1;var s;return typeof window<"u"?s=window:typeof on<"u"?s=on:typeof self<"u"?s=self:s={},fu=s,fu}var Zb=_o();const K=Gi(Zb);var hu,bh;function Yg(){if(bh)return hu;bh=1;var s=typeof on<"u"?on:typeof window<"u"?window:{},r=$_,i;return typeof document<"u"?i=document:(i=s["__GLOBAL_DOCUMENT_CACHE@4"],i||(i=s["__GLOBAL_DOCUMENT_CACHE@4"]=r)),hu=i,hu}var eT=Yg();const xe=Gi(eT);function ai(){return ai=Object.assign?Object.assign.bind():function(s){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var n in i)({}).hasOwnProperty.call(i,n)&&(s[n]=i[n])}return s},ai.apply(null,arguments)}var Ps={exports:{}},Th;function tT(){return Th||(Th=1,(function(s,r){function i(l){if(l&&typeof l=="object"){var u=l.which||l.keyCode||l.charCode;u&&(l=u)}if(typeof l=="number")return a[l];var d=String(l),f=n[d.toLowerCase()];if(f)return f;var f=e[d.toLowerCase()];if(f)return f;if(d.length===1)return d.charCodeAt(0)}i.isEventKey=function(u,d){if(u&&typeof u=="object"){var f=u.which||u.keyCode||u.charCode;if(f==null)return!1;if(typeof d=="string"){var m=n[d.toLowerCase()];if(m)return m===f;var m=e[d.toLowerCase()];if(m)return m===f}else if(typeof d=="number")return d===f;return!1}},r=s.exports=i;var n=r.code=r.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},e=r.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(t=97;t<123;t++)n[String.fromCharCode(t)]=t-32;for(var t=48;t<58;t++)n[t-48]=t;for(t=1;t<13;t++)n["f"+t]=t+111;for(t=0;t<10;t++)n["numpad "+t]=t+96;var a=r.names=r.title={};for(t in n)a[n[t]]=t;for(var o in e)n[o]=e[o]})(Ps,Ps.exports)),Ps.exports}var rT=tT();const ze=Gi(rT);function Ge(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function na(s,r){return na=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,n){return i.__proto__=n,i},na(s,r)}function Ee(s,r){s.prototype=Object.create(r.prototype),s.prototype.constructor=s,na(s,r)}var pu,Sh;function iT(){if(Sh)return pu;Sh=1,pu=s;function s(r,i){var n,e=null;try{n=JSON.parse(r,i)}catch(t){e=t}return[e,n]}return pu}var nT=iT();const aT=Gi(nT);var Is={exports:{}},mu={exports:{}},xh;function Qg(){return xh||(xh=1,(function(s){function r(){return s.exports=r=Object.assign?Object.assign.bind():function(i){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)({}).hasOwnProperty.call(e,t)&&(i[t]=e[t])}return i},s.exports.__esModule=!0,s.exports.default=s.exports,r.apply(null,arguments)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports})(mu)),mu.exports}var vu,Eh;
1function sT(){if(Eh)return vu;Eh=1,vu=r;var s=Object.prototype.toString;function r(i){if(!i)return!1;var n=s.call(i);return n==="[object Function]"||typeof i=="function"&&n!=="[object RegExp]"||typeof window<"u"&&(i===window.setTimeout||i===window.alert||i===window.confirm||i===window.prompt)}return vu}var gu,Ch;function oT(){if(Ch)return gu;Ch=1;var s=_o(),r=function(e,t){return t===void 0&&(t=!1),function(a,o,l){if(a){e(a);return}if(o.statusCode>=400&&o.statusCode<=599){var u=l;if(t)if(s.TextDecoder){var d=i(o.headers&&o.headers["content-type"]);try{u=new TextDecoder(d).decode(l)}catch{}}else u=String.fromCharCode.apply(null,new Uint8Array(l));e({cause:u});return}e(null,l)}};function i(n){return n===void 0&&(n=""),n.toLowerCase().split(";").reduce(function(e,t){var a=t.split("="),o=a[0],l=a[1];return o.trim()==="charset"?l.trim():e},"utf-8")}return gu=r,gu}var wh;function uT(){if(wh)return Is.exports;wh=1;var s=_o(),r=Qg(),i=sT();o.httpHandler=oT();var n=function(m){var x={};return m&&m.trim().split(`
2`).forEach(function(C){var L=C.indexOf(":"),E=C.slice(0,L).trim().toLowerCase(),B=C.slice(L+1).trim();typeof x[E]>"u"?x[E]=B:Array.isArray(x[E])?x[E].push(B):x[E]=[x[E],B]}),x};Is.exports=o,Is.exports.default=o,o.XMLHttpRequest=s.XMLHttpRequest||d,o.XDomainRequest="withCredentials"in new o.XMLHttpRequest?o.XMLHttpRequest:s.XDomainRequest,e(["get","put","post","patch","head","delete"],function(f){o[f==="delete"?"del":f]=function(m,x,C){return x=a(m,x,C),x.method=f.toUpperCase(),l(x)}});function e(f,m){for(var x=0;x<f.length;x++)m(f[x])}function t(f){for(var m in f)if(f.hasOwnProperty(m))return!1;return!0}function a(f,m,x){var C=f;return i(m)?(x=m,typeof f=="string"&&(C={uri:f})):C=r({},m,{uri:f}),C.callback=x,C}function o(f,m,x){return m=a(f,m,x),l(m)}function l(f){if(typeof f.callback>"u")throw new Error("callback argument missing");var m=!1,x=function(ne,se,ue){m||(m=!0,f.callback(ne,se,ue))};function C(){q.readyState===4&&setTimeout(B,0)}function L(){var J=void 0;if(q.response?J=q.response:J=q.responseText||u(q),D)try{J=JSON.parse(J)}catch{}return J}function E(J){return clearTimeout(j),J instanceof Error||(J=new Error(""+(J||"Unknown XMLHttpRequest Error"))),J.statusCode=0,x(J,X)}function B(){if(!U){var J;clearTimeout(j),f.useXDR&&q.status===void 0?J=200:J=q.status===1223?204:q.status;var ne=X,se=null;return J!==0?(ne={body:L(),statusCode:J,method:G,headers:{},url:F,rawRequest:q},q.getAllResponseHeaders&&(ne.headers=n(q.getAllResponseHeaders()))):se=new Error("Internal XMLHttpRequest Error"),x(se,ne,ne.body)}}var q=f.xhr||null;q||(f.cors||f.useXDR?q=new o.XDomainRequest:q=new o.XMLHttpRequest);var z,U,F=q.url=f.uri||f.url,G=q.method=f.method||"GET",O=f.body||f.data,H=q.headers=f.headers||{},A=!!f.sync,D=!1,j,X={body:void 0,headers:{},statusCode:0,method:G,url:F,rawRequest:q};if("json"in f&&f.json!==!1&&(D=!0,H.accept||H.Accept||(H.Accept="application/json"),G!=="GET"&&G!=="HEAD"&&(H["content-type"]||H["Content-Type"]||(H["Content-Type"]="application/json"),O=JSON.stringify(f.json===!0?O:f.json))),q.onreadystatechange=C,q.onload=B,q.onerror=E,q.onprogress=function(){},q.onabort=function(){U=!0},q.ontimeout=E,q.open(G,F,!A,f.username,f.password),A||(q.withCredentials=!!f.withCredentials),!A&&f.timeout>0&&(j=setTimeout(function(){if(!U){U=!0,q.abort("timeout");var J=new Error("XMLHttpRequest timeout");J.code="ETIMEDOUT",E(J)}},f.timeout)),q.setRequestHeader)for(z in H)H.hasOwnProperty(z)&&q.setRequestHeader(z,H[z]);else if(f.headers&&!t(f.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in f&&(q.responseType=f.responseType),"beforeSend"in f&&typeof f.beforeSend=="function"&&f.beforeSend(q),q.send(O||null),q}function u(f){try{if(f.responseType==="document")return f.responseXML;var m=f.responseXML&&f.responseXML.documentElement.nodeName==="parsererror";if(f.responseType===""&&!m)return f.responseXML}catch{}return null}function d(){}return Is.exports}var lT=uT();const Jg=Gi(lT);var yu={exports:{}},_u,Ah;function cT(){if(Ah)return _u;Ah=1;var s=Yg(),r=Object.create||(function(){function A(){}return function(D){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return A.prototype=D,new A}})();
vendor: 15,799 bytes, lines 2-9
2function i(A,D){this.name="ParsingError",this.code=A.code,this.message=D||A.message}i.prototype=r(Error.prototype),i.prototype.constructor=i,i.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function n(A){function D(X,J,ne,se){return(X|0)*3600+(J|0)*60+(ne|0)+(se|0)/1e3}var j=A.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return j?j[3]?D(j[1],j[2],j[3].replace(":",""),j[4]):j[1]>59?D(j[1],j[2],0,j[4]):D(0,j[1],j[2],j[4]):null}function e(){this.values=r(null)}e.prototype={set:function(A,D){!this.get(A)&&D!==""&&(this.values[A]=D)},get:function(A,D,j){return j?this.has(A)?this.values[A]:D[j]:this.has(A)?this.values[A]:D},has:function(A){return A in this.values},alt:function(A,D,j){for(var X=0;X<j.length;++X)if(D===j[X]){this.set(A,D);break}},integer:function(A,D){/^-?\d+$/.test(D)&&this.set(A,parseInt(D,10))},percent:function(A,D){return D.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(D=parseFloat(D),D>=0&&D<=100)?(this.set(A,D),!0):!1}};function t(A,D,j,X){var J=X?A.split(X):[A];for(var ne in J)if(typeof J[ne]=="string"){var se=J[ne].split(j);if(se.length===2){var ue=se[0].trim(),oe=se[1].trim();D(ue,oe)}}}function a(A,D,j){var X=A;function J(){var ue=n(A);if(ue===null)throw new i(i.Errors.BadTimeStamp,"Malformed timestamp: "+X);return A=A.replace(/^[^\sa-zA-Z-]+/,""),ue}function ne(ue,oe){var te=new e;t(ue,function(le,re){switch(le){case"region":for(var ce=j.length-1;ce>=0;ce--)if(j[ce].id===re){te.set(le,j[ce].region);break}break;case"vertical":te.alt(le,re,["rl","lr"]);break;case"line":var be=re.split(","),Pe=be[0];te.integer(le,Pe),te.percent(le,Pe)&&te.set("snapToLines",!1),te.alt(le,Pe,["auto"]),be.length===2&&te.alt("lineAlign",be[1],["start","center","end"]);break;case"position":be=re.split(","),te.percent(le,be[0]),be.length===2&&te.alt("positionAlign",be[1],["start","center","end"]);break;case"size":te.percent(le,re);break;case"align":te.alt(le,re,["start","center","end","left","right"]);break}},/:/,/\s/),oe.region=te.get("region",null),oe.vertical=te.get("vertical","");try{oe.line=te.get("line","auto")}catch{}oe.lineAlign=te.get("lineAlign","start"),oe.snapToLines=te.get("snapToLines",!0),oe.size=te.get("size",100);try{oe.align=te.get("align","center")}catch{oe.align=te.get("align","middle")}try{oe.position=te.get("position","auto")}catch{oe.position=te.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},oe.align)}oe.positionAlign=te.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},oe.align)}function se(){A=A.replace(/^\s+/,"")}if(se(),D.startTime=J(),se(),A.substr(0,3)!=="-->")throw new i(i.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+X);A=A.substr(3),se(),D.endTime=J(),se(),ne(A,D)}var o=s.createElement&&s.createElement("textarea"),l={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},u={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},d={v:"title",lang:"lang"},f={rt:"ruby"};function m(A,D){function j(){if(!D)return null;function Pe(ge){return D=D.substr(ge.length),ge}var Re=D.match(/^([^<]*)(<[^>]*>?)?/);return Pe(Re[1]?Re[1]:Re[2])}function X(Pe){return o.innerHTML=Pe,Pe=o.textContent,o.textContent="",Pe}function J(Pe,Re){return!f[Re.localName]||f[Re.localName]===Pe.localName}function ne(Pe,Re){var ge=l[Pe];if(!ge)return null;var De=A.document.createElement(ge),Qe=d[Pe];return Qe&&Re&&(De[Qe]=Re.trim()),De}for(var se=A.document.createElement("div"),ue=se,oe,te=[];(oe=j())!==null;){if(oe[0]==="<"){if(oe[1]==="/"){te.length&&te[te.length-1]===oe.substr(2).replace(">","")&&(te.pop(),ue=ue.parentNode);continue}var le=n(oe.substr(1,oe.length-2)),re;if(le){re=A.document.createProcessingInstruction("timestamp",le),ue.appendChild(re);continue}var ce=oe.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!ce||(re=ne(ce[1],ce[3]),!re)||!J(ue,re))continue;if(ce[2]){var be=ce[2].split(".");be.forEach(function(Pe){var Re=/^bg_/.test(Pe),ge=Re?Pe.slice(3):Pe;if(u.hasOwnProperty(ge)){var De=Re?"background-color":"color",Qe=u[ge];re.style[De]=Qe}}),re.className=be.join(" ")}te.push(ce[1]),ue.appendChild(re),ue=re;continue}ue.appendChild(A.document.createTextNode(X(oe)))}return se}var x=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function C(A){for(var D=0;D<x.length;D++){var j=x[D];if(A>=j[0]&&A<=j[1])return!0}return!1}function L(A){var D=[],j="",X;if(!A||!A.childNodes)return"ltr";function J(ue,oe){for(var te=oe.childNodes.length-1;te>=0;te--)ue.push(oe.childNodes[te])}function ne(ue){if(!ue||!ue.length)return null;var oe=ue.pop(),te=oe.textContent||oe.innerText;if(te){var le=te.match(/^.*(\n|\r)/);return le?(ue.length=0,le[0]):te}if(oe.tagName==="ruby")return ne(ue);if(oe.childNodes)return J(ue,oe),ne(ue)}for(J(D,A);j=ne(D);)for(var se=0;se<j.length;se++)if(X=j.charCodeAt(se),C(X))return"rtl";return"ltr"}function E(A){if(typeof A.line=="number"&&(A.snapToLines||A.line>=0&&A.line<=100))return A.line;if(!A.track||!A.track.textTrackList||!A.track.textTrackList.mediaElement)return-1;for(var D=A.track,j=D.textTrackList,X=0,J=0;J<j.length&&j[J]!==D;J++)j[J].mode==="showing"&&X++;return++X*-1}function B(){}B.prototype.applyStyles=function(A,D){D=D||this.div;for(var j in A)A.hasOwnProperty(j)&&(D.style[j]=A[j])},B.prototype.formatStyle=function(A,D){return A===0?0:A+D};function q(A,D,j){B.call(this),this.cue=D,this.cueDiv=m(A,D.text);var X={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:D.vertical===""?"horizontal-tb":D.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(X,this.cueDiv),this.div=A.document.createElement("div"),X={direction:L(this.cueDiv),writingMode:D.vertical===""?"horizontal-tb":D.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:D.align==="middle"?"center":D.align,font:j.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(X),this.div.appendChild(this.cueDiv);var J=0;switch(D.positionAlign){case"start":case"line-left":J=D.position;break;case"center":J=D.position-D.size/2;break;case"end":case"line-right":J=D.position-D.size;break}D.vertical===""?this.applyStyles({left:this.formatStyle(J,"%"),width:this.formatStyle(D.size,"%")}):this.applyStyles({top:this.formatStyle(J,"%"),height:this.formatStyle(D.size,"%")}),this.move=function(ne){this.applyStyles({top:this.formatStyle(ne.top,"px"),bottom:this.formatStyle(ne.bottom,"px"),left:this.formatStyle(ne.left,"px"),right:this.formatStyle(ne.right,"px"),height:this.formatStyle(ne.height,"px"),width:this.formatStyle(ne.width,"px")})}}q.prototype=r(B.prototype),q.prototype.constructor=q;function z(A){var D,j,X,J;if(A.div){j=A.div.offsetHeight,X=A.div.offsetWidth,J=A.div.offsetTop;var ne=(ne=A.div.childNodes)&&(ne=ne[0])&&ne.getClientRects&&ne.getClientRects();A=A.div.getBoundingClientRect(),D=ne?Math.max(ne[0]&&ne[0].height||0,A.height/ne.length):0}this.left=A.left,this.right=A.right,this.top=A.top||J,this.height=A.height||j,this.bottom=A.bottom||J+(A.height||j),this.width=A.width||X,this.lineHeight=D!==void 0?D:A.lineHeight}z.prototype.move=function(A,D){switch(D=D!==void 0?D:this.lineHeight,A){case"+x":this.left+=D,this.right+=D;break;case"-x":this.left-=D,this.right-=D;break;case"+y":this.top+=D,this.bottom+=D;break;case"-y":this.top-=D,this.bottom-=D;break}},z.prototype.overlaps=function(A){return this.left<A.right&&this.right>A.left&&this.top<A.bottom&&this.bottom>A.top},z.prototype.overlapsAny=function(A){for(var D=0;D<A.length;D++)if(this.overlaps(A[D]))return!0;return!1},z.prototype.within=function(A){return this.top>=A.top&&this.bottom<=A.bottom&&this.left>=A.left&&this.right<=A.right},z.prototype.overlapsOppositeAxis=function(A,D){switch(D){case"+x":return this.left<A.left;case"-x":return this.right>A.right;case"+y":return this.top<A.top;case"-y":return this.bottom>A.bottom}},z.prototype.intersectPercentage=function(A){var D=Math.max(0,Math.min(this.right,A.right)-Math.max(this.left,A.left)),j=Math.max(0,Math.min(this.bottom,A.bottom)-Math.max(this.top,A.top)),X=D*j;return X/(this.height*this.width)},z.prototype.toCSSCompatValues=function(A){return{top:this.top-A.top,bottom:A.bottom-this.bottom,left:this.left-A.left,right:A.right-this.right,height:this.height,width:this.width}},z.getSimpleBoxPosition=function(A){var D=A.div?A.div.offsetHeight:A.tagName?A.offsetHeight:0,j=A.div?A.div.offsetWidth:A.tagName?A.offsetWidth:0,X=A.div?A.div.offsetTop:A.tagName?A.offsetTop:0;A=A.div?A.div.getBoundingClientRect():A.tagName?A.getBoundingClientRect():A;var J={left:A.left,right:A.right,top:A.top||X,height:A.height||D,bottom:A.bottom||X+(A.height||D),width:A.width||j};return J};function U(A,D,j,X){function J(ge,De){for(var Qe,Oe=new z(ge),ot=1,vt=0;vt<De.length;vt++){for(;ge.overlapsOppositeAxis(j,De[vt])||ge.within(j)&&ge.overlapsAny(X);)ge.move(De[vt]);if(ge.within(j))return ge;var ut=ge.intersectPercentage(j);ot>ut&&(Qe=new z(ge),ot=ut),ge=new z(Oe)}return Qe||Oe}var ne=new z(D),se=D.cue,ue=E(se),oe=[];if(se.snapToLines){var te;switch(se.vertical){case"":oe=["+y","-y"],te="height";break;case"rl":oe=["+x","-x"],te="width";break;case"lr":oe=["-x","+x"],te="width";break}var le=ne.lineHeight,re=le*Math.round(ue),ce=j[te]+le,be=oe[0];Math.abs(re)>ce&&(re=re<0?-1:1,re*=Math.ceil(ce/le)*le),ue<0&&(re+=se.vertical===""?j.height:j.width,oe=oe.reverse()),ne.move(be,re)}else{var Pe=ne.lineHeight/j.height*100;switch(se.lineAlign){case"center":ue-=Pe/2;break;case"end":ue-=Pe;break}switch(se.vertical){case"":D.applyStyles({top:D.formatStyle(ue,"%")});break;case"rl":D.applyStyles({left:D.formatStyle(ue,"%")});break;case"lr":D.applyStyles({right:D.formatStyle(ue,"%")});break}oe=["+y","-x","+x","-y"],ne=new z(D)}var Re=J(ne,oe);D.move(Re.toCSSCompatValues(j))}function F(){}F.StringDecoder=function(){return{decode:function(A){if(!A)return"";if(typeof A!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(A))}}},F.convertCueToDOMTree=function(A,D){return!A||!D?null:m(A,D)};var G=.05,O="sans-serif",H="1.5%";return F.processCues=function(A,D,j){if(!A||!D||!j)return null;for(;j.firstChild;)j.removeChild(j.firstChild);var X=A.document.createElement("div");X.style.position="absolute",X.style.left="0",X.style.right="0",X.style.top="0",X.style.bottom="0",X.style.margin=H,j.appendChild(X);function J(le){for(var re=0;re<le.length;re++)if(le[re].hasBeenReset||!le[re].displayState)return!0;return!1}if(!J(D)){for(var ne=0;ne<D.length;ne++)X.appendChild(D[ne].displayState);return}var se=[],ue=z.getSimpleBoxPosition(X),oe=Math.round(ue.height*G*100)/100,te={font:oe+"px "+O};(function(){for(var le,re,ce=0;ce<D.length;ce++)re=D[ce],le=new q(A,re,te),X.appendChild(le.div),U(A,le,ue,se),re.displayState=le.div,se.push(z.getSimpleBoxPosition(le))})()},F.Parser=function(A,D,j){j||(j=D,D={}),D||(D={}),this.window=A,this.vttjs=D,this.state="INITIAL",this.buffer="",this.decoder=j||new TextDecoder("utf8"),this.regionList=[]},F.Parser.prototype={reportOrThrowError:function(A){if(A instanceof i)this.onparsingerror&&this.onparsingerror(A);else throw A},parse:function(A){var D=this;A&&(D.buffer+=D.decoder.decode(A,{stream:!0}));function j(){for(var le=D.buffer,re=0;re<le.length&&le[re]!=="\r"&&le[re]!==`
3`;)++re;var ce=le.substr(0,re);return le[re]==="\r"&&++re,le[re]===`
4`&&++re,D.buffer=le.substr(re),ce}function X(le){var re=new e;if(t(le,function(be,Pe){switch(be){case"id":re.set(be,Pe);break;case"width":re.percent(be,Pe);break;case"lines":re.integer(be,Pe);break;case"regionanchor":case"viewportanchor":var Re=Pe.split(",");if(Re.length!==2)break;var ge=new e;if(ge.percent("x",Re[0]),ge.percent("y",Re[1]),!ge.has("x")||!ge.has("y"))break;re.set(be+"X",ge.get("x")),re.set(be+"Y",ge.get("y"));break;case"scroll":re.alt(be,Pe,["up"]);break}},/=/,/\s/),re.has("id")){var ce=new(D.vttjs.VTTRegion||D.window.VTTRegion);ce.width=re.get("width",100),ce.lines=re.get("lines",3),ce.regionAnchorX=re.get("regionanchorX",0),ce.regionAnchorY=re.get("regionanchorY",100),ce.viewportAnchorX=re.get("viewportanchorX",0),ce.viewportAnchorY=re.get("viewportanchorY",100),ce.scroll=re.get("scroll",""),D.onregion&&D.onregion(ce),D.regionList.push({id:re.get("id"),region:ce})}}function J(le){var re=new e;t(le,function(ce,be){switch(ce){case"MPEGT":re.integer(ce+"S",be);break;case"LOCA":re.set(ce+"L",n(be));break}},/[^\d]:/,/,/),D.ontimestampmap&&D.ontimestampmap({MPEGTS:re.get("MPEGTS"),LOCAL:re.get("LOCAL")})}function ne(le){le.match(/X-TIMESTAMP-MAP/)?t(le,function(re,ce){switch(re){case"X-TIMESTAMP-MAP":J(ce);break}},/=/):t(le,function(re,ce){switch(re){case"Region":X(ce);break}},/:/)}try{var se;if(D.state==="INITIAL"){if(!/\r\n|\n/.test(D.buffer))return this;se=j();var ue=se.match(/^WEBVTT([ \t].*)?$/);if(!ue||!ue[0])throw new i(i.Errors.BadSignature);D.state="HEADER"}for(var oe=!1;D.buffer;){if(!/\r\n|\n/.test(D.buffer))return this;switch(oe?oe=!1:se=j(),D.state){case"HEADER":/:/.test(se)?ne(se):se||(D.state="ID");continue;case"NOTE":se||(D.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(se)){D.state="NOTE";break}if(!se)continue;D.cue=new(D.vttjs.VTTCue||D.window.VTTCue)(0,0,"");try{D.cue.align="center"}catch{D.cue.align="middle"}if(D.state="CUE",se.indexOf("-->")===-1){D.cue.id=se;continue}case"CUE":try{a(se,D.cue,D.regionList)}catch(le){D.reportOrThrowError(le),D.cue=null,D.state="BADCUE";continue}D.state="CUETEXT";continue;case"CUETEXT":var te=se.indexOf("-->")!==-1;if(!se||te&&(oe=!0)){D.oncue&&D.oncue(D.cue),D.cue=null,D.state="ID";continue}D.cue.text&&(D.cue.text+=`
5`),D.cue.text+=se.replace(/\u2028/g,`
6`).replace(/u2029/g,`
7`);continue;case"BADCUE":se||(D.state="ID");continue}}}catch(le){D.reportOrThrowError(le),D.state==="CUETEXT"&&D.cue&&D.oncue&&D.oncue(D.cue),D.cue=null,D.state=D.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},flush:function(){var A=this;try{if(A.buffer+=A.decoder.decode(),(A.cue||A.state==="HEADER")&&(A.buffer+=`
8
9`,A.parse()),A.state==="INITIAL")throw new i(i.Errors.BadSignature)}catch(D){A.reportOrThrowError(D)}return A.onflush&&A.onflush(),this}},_u=F,_u}var bu,kh;function dT(){if(kh)return bu;kh=1;
9var s="auto",r={"":1,lr:1,rl:1},i={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function n(a){if(typeof a!="string")return!1;var o=r[a.toLowerCase()];return o?a.toLowerCase():!1}function e(a){if(typeof a!="string")return!1;var o=i[a.toLowerCase()];return o?a.toLowerCase():!1}function t(a,o,l){this.hasBeenReset=!1;var u="",d=!1,f=a,m=o,x=l,C=null,L="",E=!0,B="auto",q="start",z="auto",U="auto",F=100,G="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return u},set:function(O){u=""+O}},pauseOnExit:{enumerable:!0,get:function(){return d},set:function(O){d=!!O}},startTime:{enumerable:!0,get:function(){return f},set:function(O){if(typeof O!="number")throw new TypeError("Start time must be set to a number.");f=O,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return m},set:function(O){if(typeof O!="number")throw new TypeError("End time must be set to a number.");m=O,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return x},set:function(O){x=""+O,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return C},set:function(O){C=O,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return L},set:function(O){var H=n(O);if(H===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");L=H,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return E},set:function(O){E=!!O,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return B},set:function(O){if(typeof O!="number"&&O!==s)throw new SyntaxError("Line: an invalid number or illegal string was specified.");B=O,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return q},set:function(O){var H=e(O);H?(q=H,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return z},set:function(O){if(O<0||O>100)throw new Error("Position must be between 0 and 100.");z=O,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return U},set:function(O){var H=e(O);H?(U=H,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return F},set:function(O){if(O<0||O>100)throw new Error("Size must be between 0 and 100.");F=O,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return G},set:function(O){var H=e(O);if(!H)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");G=H,this.hasBeenReset=!0}}}),this.displayState=void 0}return t.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},bu=t,bu}var Tu,Dh;function fT(){if(Dh)return Tu;Dh=1;var s={"":!0,up:!0};function r(e){if(typeof e!="string")return!1;var t=s[e.toLowerCase()];return t?e.toLowerCase():!1}function i(e){return typeof e=="number"&&e>=0&&e<=100}function n(){var e=100,t=3,a=0,o=100,l=0,u=100,d="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(f){if(!i(f))throw new Error("Width must be between 0 and 100.");e=f}},lines:{enumerable:!0,get:function(){return t},set:function(f){if(typeof f!="number")throw new TypeError("Lines must be set to a number.");t=f}},regionAnchorY:{enumerable:!0,get:function(){return o},set:function(f){if(!i(f))throw new Error("RegionAnchorX must be between 0 and 100.");o=f}},regionAnchorX:{enumerable:!0,get:function(){return a}
9,set:function(f){if(!i(f))throw new Error("RegionAnchorY must be between 0 and 100.");a=f}},viewportAnchorY:{enumerable:!0,get:function(){return u},set:function(f){if(!i(f))throw new Error("ViewportAnchorY must be between 0 and 100.");u=f}},viewportAnchorX:{enumerable:!0,get:function(){return l},set:function(f){if(!i(f))throw new Error("ViewportAnchorX must be between 0 and 100.");l=f}},scroll:{enumerable:!0,get:function(){return d},set:function(f){var m=r(f);m===!1?console.warn("Scroll: an invalid or illegal string was specified."):d=m}}})}return Tu=n,Tu}var Ph;function hT(){if(Ph)return yu.exports;Ph=1;var s=_o(),r=yu.exports={WebVTT:cT(),VTTCue:dT(),VTTRegion:fT()};s.vttjs=r,s.WebVTT=r.WebVTT;var i=r.VTTCue,n=r.VTTRegion,e=s.VTTCue,t=s.VTTRegion;return r.shim=function(){s.VTTCue=i,s.VTTRegion=n},r.restore=function(){s.VTTCue=e,s.VTTRegion=t},s.VTTCue||r.shim(),yu.exports}var pT=hT();const Ih=Gi(pT);function Zg(){try{var s=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zg=function(){return!!s})()}function e0(s,r,i){if(Zg())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,r);var e=new(s.bind.apply(s,n));return i&&na(e,i.prototype),e}function mT(s,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(r&&r.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),r&&na(s,r)}var Su={exports:{}},Lh;function vT(){return Lh||(Lh=1,(function(s,r){(function(i){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,e=/^(?=([^\/?#]*))\1([^]*)$/,t=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(l,u,d){if(d=d||{},l=l.trim(),u=u.trim(),!u){if(!d.alwaysNormalize)return l;var f=o.parseURL(l);if(!f)throw new Error("Error trying to parse base URL.");return f.path=o.normalizePath(f.path),o.buildURLFromParts(f)}var m=o.parseURL(u);if(!m)throw new Error("Error trying to parse relative URL.");if(m.scheme)return d.alwaysNormalize?(m.path=o.normalizePath(m.path),o.buildURLFromParts(m)):u;var x=o.parseURL(l);if(!x)throw new Error("Error trying to parse base URL.");if(!x.netLoc&&x.path&&x.path[0]!=="/"){var C=e.exec(x.path);x.netLoc=C[1],x.path=C[2]}x.netLoc&&!x.path&&(x.path="/");var L={scheme:x.scheme,netLoc:m.netLoc,path:null,params:m.params,query:m.query,fragment:m.fragment};if(!m.netLoc&&(L.netLoc=x.netLoc,m.path[0]!=="/"))if(!m.path)L.path=x.path,m.params||(L.params=x.params,m.query||(L.query=x.query));else{var E=x.path,B=E.substring(0,E.lastIndexOf("/")+1)+m.path;L.path=o.normalizePath(B)}return L.path===null&&(L.path=d.alwaysNormalize?o.normalizePath(m.path):m.path),o.buildURLFromParts(L)},parseURL:function(l){var u=n.exec(l);return u?{scheme:u[1]||"",netLoc:u[2]||"",path:u[3]||"",params:u[4]||"",query:u[5]||"",fragment:u[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(t,"");l.length!==(l=l.replace(a,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};s.exports=o})()})(Su)),Su.exports}var gT=vT();const Mh=Gi(gT);var Oh="http://example.com",bo=function(r,i){if(/^[a-z]+:/i.test(i))return i;/^data:/.test(r)&&(r=K.location&&K.location.href||"");var n=typeof K.URL=="function",e=/^\/\//.test(r),t=!K.location&&!/\/\//i.test(r);if(n?r=new K.URL(r,K.location||Oh):/\/\//i.test(r)||(r=Mh.buildAbsoluteURL(K.location&&K.location.href||"",r)),n){var a=new URL(i,r);return t?a.href.slice(Oh.length):e?a.href.slice(a.protocol.length):a.href}return Mh.buildAbsoluteURL(r,i)},ff=(function(){function s(){this.listeners={}}var r=s.prototype;return r.on=function(n,e){this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(e)},r.off=function(n,e){if(!this.listeners[n])return!1;var t=this.listeners[n].indexOf(e);return this.listeners[n]=this.listeners[n].slice(0),this.listeners[n].splice(t,1),t>-1},r.trigger=function(n){var e=this.listeners[n];if(e)if(arguments.length===2)for(var t=e.length,a=0;a<t;
9++a)e[a].call(this,arguments[1]);else for(var o=Array.prototype.slice.call(arguments,1),l=e.length,u=0;u<l;++u)e[u].apply(this,o)},r.dispose=function(){this.listeners={}},r.pipe=function(n){this.on("data",function(e){n.push(e)})},s})(),yT=function(r){return K.atob?K.atob(r):Buffer.from(r,"base64").toString("binary")};function t0(s){for(var r=yT(s),i=new Uint8Array(r.length),n=0;n<r.length;n++)i[n]=r.charCodeAt(n);return i}var _T=(function(s){Ee(r,s);function r(){var n;return n=s.call(this)||this,n.buffer="",n}var i=r.prototype;return i.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf(`
10`);t>-1;t=this.buffer.indexOf(`
11`))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},r})(ff),bT="	",xu=function(r){var i=/([0-9.]*)?@?([0-9.]*)?/.exec(r||""),n={};return i[1]&&(n.length=parseInt(i[1],10)),i[2]&&(n.offset=parseInt(i[2],10)),n},TT=function(){var r="[^=]*",i='"[^"]*"|[^,]*',n="(?:"+r+")=(?:"+i+")";return new RegExp("(?:^|,)("+n+")")},ei=function(r){for(var i=r.split(TT()),n={},e=i.length,t;e--;)i[e]!==""&&(t=/([^=]*)=(.*)/.exec(i[e]).slice(1),t[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),n[t[0]]=t[1]);return n},ST=(function(s){Ee(r,s);function r(){var n;return n=s.call(this)||this,n.customParsers=[],n.tagMappers=[],n}var i=r.prototype;return i.push=function(e){var t=this,a,o;if(e=e.trim(),e.length!==0){if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}var l=this.tagMappers.reduce(function(u,d){var f=d(e);return f===e?u:u.concat([f])},[e]);l.forEach(function(u){for(var d=0;d<t.customParsers.length;d++)if(t.customParsers[d].call(t,u))return;if(u.indexOf("#EXT")!==0){t.trigger("data",{type:"comment",text:u.slice(1)});return}if(u=u.replace("\r",""),a=/^#EXTM3U/.exec(u),a){t.trigger("data",{type:"tag",tagType:"m3u"});return}if(a=/^#EXTINF:?([0-9\.]*)?,?(.*)?$/.exec(u),a){o={type:"tag",tagType:"inf"},a[1]&&(o.duration=parseFloat(a[1])),a[2]&&(o.title=a[2]),t.trigger("data",o);return}if(a=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(u),a){o={type:"tag",tagType:"targetduration"},a[1]&&(o.duration=parseInt(a[1],10)),t.trigger("data",o);return}if(a=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(u),a){o={type:"tag",tagType:"version"},a[1]&&(o.version=parseInt(a[1],10)),t.trigger("data",o);return}if(a=/^#EXT-X-MEDIA-SEQUENCE:?(\-?[0-9.]*)?/.exec(u),a){o={type:"tag",tagType:"media-sequence"},a[1]&&(o.number=parseInt(a[1],10)),t.trigger("data",o);return}if(a=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(\-?[0-9.]*)?/.exec(u),a){o={type:"tag",tagType:"discontinuity-sequence"},a[1]&&(o.number=parseInt(a[1],10)),t.trigger("data",o);return}if(a=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(u),a){o={type:"tag",tagType:"playlist-type"},a[1]&&(o.playlistType=a[1]),t.trigger("data",o);return}if(a=/^#EXT-X-BYTERANGE:?(.*)?$/.exec(u),a){o=ai(xu(a[1]),{type:"tag",tagType:"byterange"}),t.trigger("data",o);return}if(a=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(u),a){o={type:"tag",tagType:"allow-cache"},a[1]&&(o.allowed=!/NO/.test(a[1])),t.trigger("data",o);return}if(a=/^#EXT-X-MAP:?(.*)$/.exec(u),a){if(o={type:"tag",tagType:"map"},a[1]){var f=ei(a[1]);f.URI&&(o.uri=f.URI),f.BYTERANGE&&(o.byterange=xu(f.BYTERANGE))}t.trigger("data",o);return}if(a=/^#EXT-X-STREAM-INF:?(.*)$/.exec(u),a){if(o={type:"tag",tagType:"stream-inf"},a[1]){if(o.attributes=ei(a[1]),o.attributes.RESOLUTION){var m=o.attributes.RESOLUTION.split("x"),x={};m[0]&&(x.width=parseInt(m[0],10)),m[1]&&(x.height=parseInt(m[1],10)),o.attributes.RESOLUTION=x}o.attributes.BANDWIDTH&&(o.attributes.BANDWIDTH=parseInt(o.attributes.BANDWIDTH,10)),o.attributes["FRAME-RATE"]&&(o.attributes["FRAME-RATE"]=parseFloat(o.attributes["FRAME-RATE"])),o.attributes["PROGRAM-ID"]&&(o.attributes["PROGRAM-ID"]=parseInt(o.attributes["PROGRAM-ID"],10))}t.trigger("data",o);return}if(a=/^#EXT-X-MEDIA:?(.*)$/.exec(u),a){o={type:"tag",tagType:"media"},a[1]&&(o.attributes=ei(a[1])),t.trigger("data",o);return}if(a=/^#EXT-X-ENDLIST/.exec(u),a){t.trigger("data",{type:"tag",tagType:"endlist"});return}if(a=/^#EXT-X-DISCONTINUITY/.exec(u),a){t.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(a=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(u),a){o={type:"tag",tagType:"program-date-time"}
11,a[1]&&(o.dateTimeString=a[1],o.dateTimeObject=new Date(a[1])),t.trigger("data",o);return}if(a=/^#EXT-X-KEY:?(.*)$/.exec(u),a){o={type:"tag",tagType:"key"},a[1]&&(o.attributes=ei(a[1]),o.attributes.IV&&(o.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(o.attributes.IV=o.attributes.IV.substring(2)),o.attributes.IV=o.attributes.IV.match(/.{8}/g),o.attributes.IV[0]=parseInt(o.attributes.IV[0],16),o.attributes.IV[1]=parseInt(o.attributes.IV[1],16),o.attributes.IV[2]=parseInt(o.attributes.IV[2],16),o.attributes.IV[3]=parseInt(o.attributes.IV[3],16),o.attributes.IV=new Uint32Array(o.attributes.IV))),t.trigger("data",o);return}if(a=/^#EXT-X-START:?(.*)$/.exec(u),a){o={type:"tag",tagType:"start"},a[1]&&(o.attributes=ei(a[1]),o.attributes["TIME-OFFSET"]=parseFloat(o.attributes["TIME-OFFSET"]),o.attributes.PRECISE=/YES/.test(o.attributes.PRECISE)),t.trigger("data",o);return}if(a=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(u),a){o={type:"tag",tagType:"cue-out-cont"},a[1]?o.data=a[1]:o.data="",t.trigger("data",o);return}if(a=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(u),a){o={type:"tag",tagType:"cue-out"},a[1]?o.data=a[1]:o.data="",t.trigger("data",o);return}if(a=/^#EXT-X-CUE-IN:?(.*)?$/.exec(u),a){o={type:"tag",tagType:"cue-in"},a[1]?o.data=a[1]:o.data="",t.trigger("data",o);return}if(a=/^#EXT-X-SKIP:(.*)$/.exec(u),a&&a[1]){o={type:"tag",tagType:"skip"},o.attributes=ei(a[1]),o.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(o.attributes["SKIPPED-SEGMENTS"]=parseInt(o.attributes["SKIPPED-SEGMENTS"],10)),o.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(o.attributes["RECENTLY-REMOVED-DATERANGES"]=o.attributes["RECENTLY-REMOVED-DATERANGES"].split(bT)),t.trigger("data",o);return}if(a=/^#EXT-X-PART:(.*)$/.exec(u),a&&a[1]){o={type:"tag",tagType:"part"},o.attributes=ei(a[1]),["DURATION"].forEach(function(C){o.attributes.hasOwnProperty(C)&&(o.attributes[C]=parseFloat(o.attributes[C]))}),["INDEPENDENT","GAP"].forEach(function(C){o.attributes.hasOwnProperty(C)&&(o.attributes[C]=/YES/.test(o.attributes[C]))}),o.attributes.hasOwnProperty("BYTERANGE")&&(o.attributes.byterange=xu(o.attributes.BYTERANGE)),t.trigger("data",o);return}if(a=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(u),a&&a[1]){o={type:"tag",tagType:"server-control"},o.attributes=ei(a[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(C){o.attributes.hasOwnProperty(C)&&(o.attributes[C]=parseFloat(o.attributes[C]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(C){o.attributes.hasOwnProperty(C)&&(o.attributes[C]=/YES/.test(o.attributes[C]))}),t.trigger("data",o);return}if(a=/^#EXT-X-PART-INF:(.*)$/.exec(u),a&&a[1]){o={type:"tag",tagType:"part-inf"},o.attributes=ei(a[1]),["PART-TARGET"].forEach(function(C){o.attributes.hasOwnProperty(C)&&(o.attributes[C]=parseFloat(o.attributes[C]))}),t.trigger("data",o);return}if(a=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(u),a&&a[1]){o={type:"tag",tagType:"preload-hint"},o.attributes=ei(a[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(C){if(o.attributes.hasOwnProperty(C)){o.attributes[C]=parseInt(o.attributes[C],10);var L=C==="BYTERANGE-LENGTH"?"length":"offset";o.attributes.byterange=o.attributes.byterange||{},o.attributes.byterange[L]=o.attributes[C],delete o.attributes[C]}}),t.trigger("data",o);return}if(a=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(u),a&&a[1]){o={type:"tag",tagType:"rendition-report"},o.attributes=ei(a[1]),["LAST-MSN","LAST-PART"].forEach(function(C){o.attributes.hasOwnProperty(C)&&(o.attributes[C]=parseInt(o.attributes[C],10))}),t.trigger("data",o);return}t.trigger("data",{type:"tag",data:u.slice(4)})})}},i.addParser=function(e){var t=this,a=e.expression,o=e.customType,l=e.dataParser,u=e.segment;typeof l!="function"&&(l=function(f){return f}),this.customParsers.push(function(d){var f=a.exec(d);if(f)return t.trigger("data",{type:"custom",data:l(d),customType:o,segment:u}),!0})},i.addTagMapper=function(e){var t=e.expression,a=e.map,o=function(u){return t.test(u)?a(u):u};this.tagMappers.push(o)},r})(ff),xT=function(r){return r.toLowerCase().replace(/-(\w)/g,function(i){return i[1].toUpperCase()})},zn=function(r){var i={};return Object.keys(r).forEach(function(n){i[xT(n)]=r[n]}),i},Eu=function(r){var i=r.serverControl,n=r.targetDuration,e=r.partTargetDuration;if(i){var t="#EXT-X-SERVER-CONTROL",a="holdBack",o="partHoldBack",l=n&&n*3,u=e&&e*2;n&&!i.hasOwnProperty(a)&&(i[a]=l,this.trigger("info",{message:t+" defaulting HOLD-BACK to targetDuration * 3 ("+l+")."})),l&&i[a]<l&&(this.trigger("warn",{message:t+" clamping HOLD-BACK ("+i[a]+") to targetDuration * 3 ("+l+")"}),i[a]=l),e&&!i.hasOwnProperty(o)&&(i[o]=e*3,this.trigger("info",{message:t+" defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+i[o]+")."})),e&&i[o]<u&&(this.trigger("warn",{message:t+" clamping PART-HOLD-BACK ("+i[o]+") to partTargetDuration * 2 ("+u+")."}),i[o]=u)}},ET=(function(s){Ee(r,s);function r(){var n;n=s.call(this)||this,n.lineStream=new _T,n.parseStream=new ST,n.lineStream.pipe(n.parseStream);var e=Ge(n),t=[],a={},o,l,u=!1,d=function(){},f={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},m="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",x=0;n.manifest={allowCache:!0,discontinuityStarts:[],segments:[]};var C=0,L=0;return n.on("end",function(){a.uri||!a.parts&&!a.preloadHints||(!a.map&&o&&(a.map=o),!a.key&&l&&(a.key=l),!a.timeline&&typeof x=="number"&&(a.timeline=x),n.manifest.preloadSegment=a)}),n.parseStream.on("data",function(E){var B,q;({tag:function(){({version:function(){E.version&&(this.manifest.version=E.version)},"allow-cache":function(){this.manifest.allowCache=E.allowed,"allowed"in E||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var F={};"length"in E&&(a.byterange=F,F.length=E.length,"offset"in E||(E.offset=C)),"offset"in E&&(a.byterange=F,F.offset=E.offset),C=F.offset+F.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),E.duration>0&&(a.duration=E.duration),E.duration===0&&(a.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=t},key:function(){if(!E.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(E.attributes.METHOD==="NONE"){l=null;return}if(!E.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(E.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:E.attributes};return}if(E.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:E.attributes.URI};return}if(E.attributes.KEYFORMAT===m){var F=["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"];if(F.indexOf(E.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(E.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),E.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(E.attributes.KEYID&&E.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:E.attributes.KEYFORMAT,keyId:E.attributes.KEYID.substring(2)},pssh:t0(E.attributes.URI.split(",")[1])};return}E.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),l={method:E.attributes.METHOD||"AES-128",uri:E.attributes.URI},typeof E.attributes.IV<"u"&&(l.iv=E.attributes.IV)},"media-sequence":function(){if(!isFinite(E.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+E.number});return}this.manifest.mediaSequence=E.number},"discontinuity-sequence":function(){if(!isFinite(E.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+E.number});return}this.manifest.discontinuitySequence=E.number,x=E.number},"playlist-type":function(){if(!/VOD|EVENT/.test(E.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+E.playlist});return}this.manifest.playlistType=E.playlistType},map:function(){o={},E.uri&&(o.uri=E.uri),E.byterange&&(o.byterange=E.byterange),l&&(o.key=l)},"stream-inf":function(){if(this.manifest.playlists=t,this.manifest.mediaGroups=this.manifest.mediaGroups||f,!E.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}a.attributes||(a.attributes={}),ai(a.attributes,E.attributes)},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||f,!(E.attributes&&E.attributes.TYPE&&E.attributes["GROUP-ID"]&&E.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}var F=this.manifest.mediaGroups[E.attributes.TYPE];F[E.attributes["GROUP-ID"]]=F[E.attributes["GROUP-ID"]]||{},B=F[E.attributes["GROUP-ID"]],q={default:/yes/i.test(E.attributes.DEFAULT)},q.default?q.autoselect=!0:q.autoselect=/yes/i.test(E.attributes.AUTOSELECT),E.attributes.LANGUAGE&&(q.language=E.attributes.LANGUAGE),E.attributes.URI&&(q.uri=E.attributes.URI),E.attributes["INSTREAM-ID"]&&(q.instreamId=E.attributes["INSTREAM-ID"]),E.attributes.CHARACTERISTICS&&(q.characteristics=E.attributes.CHARACTERISTICS),E.attributes.FORCED&&(q.forced=/yes/i.test(E.attributes.FORCED)),B[E.attributes.NAME]=q},discontinuity:function(){x+=1,a.discontinuity=!0,this.manifest.discontinuityStarts.push(t.length)},"program-date-time":function(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=E.dateTimeString,this.manifest.dateTimeObject=E.dateTimeObject),a.dateTimeString=E.dateTimeString,a.dateTimeObject=E.dateTimeObject},targetduration:function(){if(!isFinite(E.duration)||E.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+E.duration});return}this.manifest.targetDuration=E.duration,Eu.call(this,this.manifest)},start:function(){if(!E.attributes||isNaN(E.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:E.attributes["TIME-OFFSET"],precise:E.attributes.PRECISE}},"cue-out":function(){a.cueOut=E.data},"cue-out-cont":function(){a.cueOutCont=E.data},"cue-in":function(){a.cueIn=E.data},skip:function(){this.manifest.skip=zn(E.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",E.attributes,["SKIPPED-SEGMENTS"])},part:function(){var F=this;u=!0;var G=this.manifest.segments.length,O=zn(E.attributes);a.parts=a.parts||[],a.parts.push(O),O.byterange&&(O.byterange.hasOwnProperty("offset")||(O.byterange.offset=L),L=O.byterange.offset+O.byterange.length);var H=a.parts.length-1;this.warnOnMissingAttributes_("#EXT-X-PART #"+H+" for segment #"+G,E.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEac
11h(function(A,D){A.hasOwnProperty("lastPart")||F.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+D+" lacks required attribute(s): LAST-PART"})})},"server-control":function(){var F=this.manifest.serverControl=zn(E.attributes);F.hasOwnProperty("canBlockReload")||(F.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),Eu.call(this,this.manifest),F.canSkipDateranges&&!F.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint":function(){var F=this.manifest.segments.length,G=zn(E.attributes),O=G.type&&G.type==="PART";a.preloadHints=a.preloadHints||[],a.preloadHints.push(G),G.byterange&&(G.byterange.hasOwnProperty("offset")||(G.byterange.offset=O?L:0,O&&(L=G.byterange.offset+G.byterange.length)));var H=a.preloadHints.length-1;if(this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+H+" for segment #"+F,E.attributes,["TYPE","URI"]),!!G.type)for(var A=0;A<a.preloadHints.length-1;A++){var D=a.preloadHints[A];D.type&&D.type===G.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+H+" for segment #"+F+" has the same TYPE "+G.type+" as preload hint #"+A})}},"rendition-report":function(){var F=zn(E.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(F);var G=this.manifest.renditionReports.length-1,O=["LAST-MSN","URI"];u&&O.push("LAST-PART"),this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+G,E.attributes,O)},"part-inf":function(){this.manifest.partInf=zn(E.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",E.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),Eu.call(this,this.manifest)}}[E.tagType]||d).call(e)},uri:function(){a.uri=E.uri,t.push(a),this.manifest.targetDuration&&!("duration"in a)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),a.duration=this.manifest.targetDuration),l&&(a.key=l),a.timeline=x,o&&(a.map=o),L=0,a={}},comment:function(){},custom:function(){E.segment?(a.custom=a.custom||{},a.custom[E.customType]=E.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[E.customType]=E.data)}})[E.type].call(e)}),n}var i=r.prototype;return i.warnOnMissingAttributes_=function(e,t,a){var o=[];a.forEach(function(l){t.hasOwnProperty(l)||o.push(l)}),o.length&&this.trigger("warn",{message:e+" lacks required attribute(s): "+o.join(", ")})},i.push=function(e){this.lineStream.push(e)},i.end=function(){this.lineStream.push(`
12`),this.trigger("end")},i.addParser=function(e){this.parseStream.addParser(e)},i.addTagMapper=function(e){this.parseStream.addTagMapper(e)},r})(ff),Dn={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},CT=["video","audio","text"],Rh=["Video","Audio","Text"],r0=function(r){return r&&r.replace(/avc1\.(\d+)\.(\d+)/i,function(i,n,e){var t=("00"+Number(n).toString(16)).slice(-2),a=("00"+Number(e).toString(16)).slice(-2);return"avc1."+t+"00"+a})},pi=function(r){r===void 0&&(r="");var i=r.split(","),n=[];return i.forEach(function(e){e=e.trim();var t;CT.forEach(function(a){var o=Dn[a].exec(e.toLowerCase());if(!(!o||o.length<=1)){t=a;var l=e.substring(0,o[1].length),u=e.replace(l,"");n.push({type:l,details:u,mediaType:a})}}),t||n.push({type:e,details:"",mediaType:"unknown"})}),n},wT=function(r,i){if(!r.mediaGroups.AUDIO||!i)return null;var n=r.mediaGroups.AUDIO[i];if(!n)return null;for(var e in n){var t=n[e];if(t.default&&t.playlists)return pi(t.playlists[0].attributes.CODECS)}return null},i0=function(r){return r===void 0&&(r=""),Dn.audio.test(r.trim().toLowerCase())},AT=function(r){return r===void 0&&(r=""),Dn.text.test(r.trim().toLowerCase())},$a=function(r){if(!(!r||typeof r!="string")){var i=r.toLowerCase().split(",").map(function(t){return r0(t.trim())}),n="video";i.length===1&&i0(i[0])?n="audio":i.length===1&&AT(i[0])&&(n="application");var e="mp4";return i.every(function(t){return Dn.mp4.test(t)})?e="mp4":i.every(function(t){return Dn.webm.test(t)})?e="webm":i.every(function(t){return Dn.ogg.test(t)}
vendor: 9,857 bytes, line 12
12)&&(e="ogg"),n+"/"+e+';codecs="'+r+'"'}},js=function(r){return r===void 0&&(r=""),K.MediaSource&&K.MediaSource.isTypeSupported&&K.MediaSource.isTypeSupported($a(r))||!1},Cu=function(r){return r===void 0&&(r=""),r.toLowerCase().split(",").every(function(i){i=i.trim();for(var n=0;n<Rh.length;n++){var e=Rh[n];if(Dn["muxer"+e].test(i))return!0}return!1})},Fh="mp4a.40.2",kT="avc1.4d400d",DT=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,PT=/^application\/dash\+xml/i,n0=function(r){return DT.test(r)?"hls":PT.test(r)?"dash":r==="application/vnd.videojs.vhs+json"?"vhs-json":null},IT=function(r){return r.toString(2).length},LT=function(r){return Math.ceil(IT(r)/8)},a0=function(r){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer},MT=function(r){return a0(r)},Ne=function(r){return r instanceof Uint8Array?r:(!Array.isArray(r)&&!MT(r)&&!(r instanceof ArrayBuffer)&&(typeof r!="number"||typeof r=="number"&&r!==r?r=0:r=[r]),new Uint8Array(r&&r.buffer||r,r&&r.byteOffset||0,r&&r.byteLength||0))},ar=K.BigInt||Number,Md=[ar("0x1"),ar("0x100"),ar("0x10000"),ar("0x1000000"),ar("0x100000000"),ar("0x10000000000"),ar("0x1000000000000"),ar("0x100000000000000"),ar("0x10000000000000000")];(function(){var s=new Uint16Array([65484]),r=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);return r[0]===255?"big":r[0]===204?"little":"unknown"})();var OT=function(r,i){var n=i===void 0?{}:i,e=n.signed,t=e===void 0?!1:e,a=n.le,o=a===void 0?!1:a;r=Ne(r);var l=o?"reduce":"reduceRight",u=r[l]?r[l]:Array.prototype[l],d=u.call(r,function(m,x,C){var L=o?C:Math.abs(C+1-r.length);return m+ar(x)*Md[L]},ar(0));if(t){var f=Md[r.length]/ar(2)-ar(1);d=ar(d),d>f&&(d-=f,d-=f,d-=ar(2))}return Number(d)},RT=function(r,i){var n={},e=n.le,t=e===void 0?!1:e;(typeof r!="bigint"&&typeof r!="number"||typeof r=="number"&&r!==r)&&(r=0),r=ar(r);for(var a=LT(r),o=new Uint8Array(new ArrayBuffer(a)),l=0;l<a;l++){var u=t?l:Math.abs(l+1-o.length);o[u]=Number(r/Md[l]&ar(255)),r<0&&(o[u]=Math.abs(~o[u]),o[u]-=l===0?1:2)}return o},s0=function(r,i){if(typeof r!="string"&&r&&typeof r.toString=="function"&&(r=r.toString()),typeof r!="string")return new Uint8Array;i||(r=unescape(encodeURIComponent(r)));for(var n=new Uint8Array(r.length),e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n},FT=function(){for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];if(i=i.filter(function(o){return o&&(o.byteLength||o.length)&&typeof o!="string"}),i.length<=1)return Ne(i[0]);var e=i.reduce(function(o,l,u){return o+(l.byteLength||l.length)},0),t=new Uint8Array(e),a=0;return i.forEach(function(o){o=Ne(o),t.set(o,a),a+=o.byteLength}),t},wt=function(r,i,n){var e=n===void 0?{}:n,t=e.offset,a=t===void 0?0:t,o=e.mask,l=o===void 0?[]:o;r=Ne(r),i=Ne(i);var u=i.every?i.every:Array.prototype.every;return i.length&&r.length-a>=i.length&&u.call(i,function(d,f){var m=l[f]?l[f]&r[a+f]:r[a+f];return d===m})},NT=function(r,i,n){i.forEach(function(e){for(var t in r.mediaGroups[e])for(var a in r.mediaGroups[e][t]){var o=r.mediaGroups[e][t][a];n(o,e,t,a)}})},Da={},Li={},xn={},Nh;function To(){if(Nh)return xn;Nh=1;function s(t,a,o){if(o===void 0&&(o=Array.prototype),t&&typeof o.find=="function")return o.find.call(t,a);for(var l=0;l<t.length;l++)if(Object.prototype.hasOwnProperty.call(t,l)){var u=t[l];if(a.call(void 0,u,l,t))return u}}function r(t,a){return a===void 0&&(a=Object),a&&typeof a.freeze=="function"?a.freeze(t):t}function i(t,a){if(t===null||typeof t!="object")throw new TypeError("target is not an object");for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(t[o]=a[o]);return t}var n=r({HTML:"text/html",isHTML:function(t){return t===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),e=r({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(t){return t===e.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return xn.assign=i,xn.find=s,xn.freeze=r,xn.MIME_TYPE=n,xn.NAMESPACE=e,xn}var Bh;function o0(){if(Bh)return Li;Bh=1;var s=To(),r=s.find,i=s.NAMESPACE;function n(R){return R!==""}function e(R){return R?R.split(/[\t\n\f\r ]+/).filter(n):[]}function t(R,M){return R.hasOwnProperty(M)||(R[M]=!0),R}function a(R){if(!R)return[];var M=e(R);return Object.keys(M.reduce(t,{}))}function o(R){return function(M){return R&&R.indexOf(M)!==-1}}function l(R,M){for(var ee in R)Object.prototype.hasOwnProperty.call(R,ee)&&(M[ee]=R[ee])}function u(R,M){var ee=R.prototype;if(!(ee instanceof M)){let Y=function(){};Y.prototype=M.prototype,Y=new Y,l(ee,Y),R.prototype=ee=Y}ee.constructor!=R&&(typeof R!="function"&&console.error("unknown Class:"+R),ee.constructor=R)}var d={},f=d.ELEMENT_NODE=1,m=d.ATTRIBUTE_NODE=2,x=d.TEXT_NODE=3,C=d.CDATA_SECTION_NODE=4,L=d.ENTITY_REFERENCE_NODE=5,E=d.ENTITY_NODE=6,B=d.PROCESSING_INSTRUCTION_NODE=7,q=d.COMMENT_NODE=8,z=d.DOCUMENT_NODE=9,U=d.DOCUMENT_TYPE_NODE=10,F=d.DOCUMENT_FRAGMENT_NODE=11,G=d.NOTATION_NODE=12,O={},H={};O.INDEX_SIZE_ERR=(H[1]="Index size error",1),O.DOMSTRING_SIZE_ERR=(H[2]="DOMString size error",2);var A=O.HIERARCHY_REQUEST_ERR=(H[3]="Hierarchy request error",3);O.WRONG_DOCUMENT_ERR=(H[4]="Wrong document",4),O.INVALID_CHARACTER_ERR=(H[5]="Invalid character",5),O.NO_DATA_ALLOWED_ERR=(H[6]="No data allowed",6),O.NO_MODIFICATION_ALLOWED_ERR=(H[7]="No modification allowed",7);var D=O.NOT_FOUND_ERR=(H[8]="Not found",8);O.NOT_SUPPORTED_ERR=(H[9]="Not supported",9);var j=O.INUSE_ATTRIBUTE_ERR=(H[10]="Attribute in use",10);O.INVALID_STATE_ERR=(H[11]="Invalid state",11),O.SYNTAX_ERR=(H[12]="Syntax error",12),O.INVALID_MODIFICATION_ERR=(H[13]="Invalid modification",13),O.NAMESPACE_ERR=(H[14]="Invalid namespace",14),O.INVALID_ACCESS_ERR=(H[15]="Invalid access",15);function X(R,M){if(M instanceof Error)var ee=M;else ee=this,Error.call(this,H[R]),this.message=H[R],Error.captureStackTrace&&Error.captureStackTrace(this,X);return ee.code=R,M&&(this.message=this.message+": "+M),ee}X.prototype=Error.prototype,l(O,X);function J(){}J.prototype={length:0,item:function(R){return R>=0&&R<this.length?this[R]:null},toString:function(R,M){for(var ee=[],Y=0;Y<this.length;Y++)fr(this[Y],ee,R,M);return ee.join("")},filter:function(R){return Array.prototype.filter.call(this,R)},indexOf:function(R){return Array.prototype.indexOf.call(this,R)}};function ne(R,M){this._node=R,this._refresh=M,se(this)}function se(R){var M=R._node._inc||R._node.ownerDocument._inc;if(R._inc!==M){var ee=R._refresh(R._node);if(Tt(R,"length",ee.length),!R.$$length||ee.length<R.$$length)for(var Y=ee.length;Y in R;Y++)Object.prototype.hasOwnProperty.call(R,Y)&&delete R[Y];l(ee,R),R._inc=M}}ne.prototype.item=function(R){return se(this),this[R]||null},u(ne,J);function ue(){}function oe(R,M){for(var ee=R.length;ee--;)if(R[ee]===M)return ee}function te(R,M,ee,Y){if(Y?M[oe(M,Y)]=ee:M[M.length++]=ee,R){ee.ownerElement=R;var we=R.ownerDocument;we&&(Y&&De(we,R,Y),ge(we,R,ee))}}function le(R,M,ee){var Y=oe(M,ee);if(Y>=0){for(var we=M.length-1;Y<we;)M[Y]=M[++Y];if(M.length=we,R){var Ue=R.ownerDocument;Ue&&(De(Ue,R,ee),ee.ownerElement=null)}}else throw new X(D,new Error(R.tagName+"@"+ee))}ue.prototype={length:0,item:J.prototype.item,getNamedItem:function(R){for(var M=this.length;M--;){var ee=this[M];if(ee.nodeName==R)return ee}},setNamedItem:function(R){var M=R.ownerElement;if(M&&M!=this._ownerElement)throw new X(j);var ee=this.getNamedItem(R.nodeName);return te(this._ownerElement,this,R,ee),ee},setNamedItemNS:function(R){var M=R.ownerElement,ee;if(M&&M!=this._ownerElement)throw new X(j);return ee=this.getNamedItemNS(R.namespaceURI,R.localName),te(this._ownerElement,this,R,ee),ee},removeNamedItem:function(R){var M=this.getNamedItem(R);return le(this._ownerElement,this,M),M},removeNamedItemNS:function(R,M){var ee=this.getNamedItemNS(R,M);return le(this._ownerElement,this,ee),ee},getNamedItemNS:function(R,M){for(var ee=this.length;ee--;){var Y=this[ee];if(Y.localName==M&&Y.namespaceURI==R)return Y}return null}};function re(){}re.prototype={hasFeature:function(R,M){return!0},createDocument:function(R,M,ee){var Y=new Re;if(Y.implementation=this,Y.childNodes=new J,Y.doctype=ee||null,ee&&Y.appendChild(ee),M){var we=Y.createElementNS(R,M);Y.appendChild(we)}return Y},createDocumentType:function(R,M,ee){var Y=new di;return Y.name=R,Y.nodeName=R,Y.publicId=M||"",Y.systemId=ee||"",Y}};function ce(){}ce.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(R,M){return $e(this,R,M)},replaceChild:function(R,M){$e(this,R,M,Ur),M&&this.removeChild(M)},removeChild:function(R){return Oe(this,R)},appendChild:function(R){return this.insertBefore(R,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(R){return qr(this.ownerDocument||this,this,R)},normalize:function(){for(var R=this.firstChild;R;){var M=R.nextSibling;M&&M.nodeType==x&&R.nodeType==x?(this.removeChild(M),R.appendData(M.data)):(R.normalize(),R=M)}},isSupported:function(R,M){return this.ownerDocument.implementation.hasFeature(R,M)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(R){for(var M=this;M;){var ee=M._nsMap;if(ee){for(var Y in ee)if(Object.prototype.hasOwnProperty.call(ee,Y)&&ee[Y]===R)return Y}M=M.nodeType==m?M.ownerDocument:M.parentNode}return null},lookupNamespaceURI:function(R){for(var M=this;M;){var ee=M._nsMap;if(ee&&Object.prototype.hasOwnProperty.call(ee,R))return ee[R];M=M.nodeType==m?M.ownerDocument:M.parentNode}return null},isDefaultNamespace:function(R){var M=this.lookupPrefix(R);return M==null}};function be(R){return R=="<"&&"&lt;"||R==">"&&"&gt;"||R=="&"&&"&amp;"||R=='"'&&"&quot;
12"||"&#"+R.charCodeAt()+";"}l(d,ce),l(d,ce.prototype);function Pe(R,M){if(M(R))return!0;if(R=R.firstChild)do if(Pe(R,M))return!0;while(R=R.nextSibling)}function Re(){this.ownerDocument=this}function ge(R,M,ee){R&&R._inc++;var Y=ee.namespaceURI;Y===i.XMLNS&&(M._nsMap[ee.prefix?ee.localName:""]=ee.value)}function De(R,M,ee,Y){R&&R._inc++;var we=ee.namespaceURI;we===i.XMLNS&&delete M._nsMap[ee.prefix?ee.localName:""]}function Qe(R,M,ee){if(R&&R._inc){R._inc++;var Y=M.childNodes;if(ee)Y[Y.length++]=ee;else{for(var we=M.firstChild,Ue=0;we;)Y[Ue++]=we,we=we.nextSibling;Y.length=Ue,delete Y[Y.length]}}}function Oe(R,M){var ee=M.previousSibling,Y=M.nextSibling;return ee?ee.nextSibling=Y:R.firstChild=Y,Y?Y.previousSibling=ee:R.lastChild=ee,M.parentNode=null,M.previousSibling=null,M.nextSibling=null,Qe(R.ownerDocument,R),M}function ot(R){return R&&(R.nodeType===ce.DOCUMENT_NODE||R.nodeType===ce.DOCUMENT_FRAGMENT_NODE||R.nodeType===ce.ELEMENT_NODE)}function vt(R){return R&&(it(R)||tt(R)||ut(R)||R.nodeType===ce.DOCUMENT_FRAGMENT_NODE||R.nodeType===ce.COMMENT_NODE||R.nodeType===ce.PROCESSING_INSTRUCTION_NODE)}function ut(R){return R&&R.nodeType===ce.DOCUMENT_TYPE_NODE}function it(R){return R&&R.nodeType===ce.ELEMENT_NODE}function tt(R){return R&&R.nodeType===ce.TEXT_NODE}function nt(R,M){var ee=R.childNodes||[];if(r(ee,it)||ut(M))return!1;var Y=r(ee,ut);return!(M&&Y&&ee.indexOf(Y)>ee.indexOf(M))}function Cr(R,M){var ee=R.childNodes||[];function Y(Ue){return it(Ue)&&Ue!==M}if(r(ee,Y))return!1;var we=r(ee,ut);return!(M&&we&&ee.indexOf(we)>ee.indexOf(M))}function ft(R,M,ee){if(!ot(R))throw new X(A,"Unexpected parent node type "+R.nodeType);if(ee&&ee.parentNode!==R)throw new X(D,"child not in parent");if(!vt(M)||ut(M)&&R.nodeType!==ce.DOCUMENT_NODE)throw new X(A,"Unexpected node type "+M.nodeType+" for parent node type "+R.nodeType)}function er(R,M,ee){var Y=R.childNodes||[],we=M.childNodes||[];if(M.nodeType===ce.DOCUMENT_FRAGMENT_NODE){var Ue=we.filter(it);if(Ue.length>1||r(we,tt))throw new X(A,"More than one element or text in fragment");if(Ue.length===1&&!nt(R,ee))throw new X(A,"Element in fragment can not be inserted before doctype")}if(it(M)&&!nt(R,ee))throw new X(A,"Only one element can be added and only after doctype");if(ut(M)){if(r(Y,ut))throw new X(A,"Only one doctype is allowed");var ct=r(Y,it);if(ee&&Y.indexOf(ct)<Y.indexOf(ee))throw new X(A,"Doctype can only be inserted before an element");if(!ee&&ct)throw new X(A,"Doctype can not be appended since element is present")}}function Ur(R,M,ee){var Y=R.childNodes||[],we=M.childNodes||[];if(M.nodeType===ce.DOCUMENT_FRAGMENT_NODE){var Ue=we.filter(it);if(Ue.length>1||r(we,tt))throw new X(A,"More than one element or text in fragment");if(Ue.length===1&&!Cr(R,ee))throw new X(A,"Element in fragment can not be inserted before doctype")}if(it(M)&&!Cr(R,ee))throw new X(A,"Only one element can be added and only after doctype");if(ut(M)){if(r(Y,function(tr){return ut(tr)&&tr!==ee}))throw new X(A,"Only one doctype is allowed");var ct=r(Y,it);if(ee&&Y.indexOf(ct)<Y.indexOf(ee))throw new X(A,"Doctype can only be inserted before an element")}}function $e(R,M,ee,Y){ft(R,M,ee),R.nodeType===ce.DOCUMENT_NODE&&(Y||er)(R,M,ee);var we=M.parentNode;if(we&&we.removeChild(M),M.nodeType===F){var Ue=M.firstChild;if(Ue==null)return M;var ct=M.lastChild}else Ue=ct=M;var Ht=ee?ee.previousSibling:R.lastChild;Ue.previousSibling=Ht,ct.nextSibling=ee,Ht?Ht.nextSibling=Ue:R.firstChild=Ue,ee==null?R.lastChild=ct:ee.previousSibling=ct;do Ue.parentNode=R;while(Ue!==ct&&(Ue=Ue.nextSibling));return Qe(R.ownerDocument||R,R),M.nodeType==F&&(M.firstChild=M.lastChild=null),M}function Kr(R,M){return M.parentNode&&M.parentNode.removeChild(M),M.parentNode=R,M.previousSibling=R.lastChild,M.nextSibling=null,M.previousSibling?M.previousSibling.nextSibling=M:R.firstChild=M,R.lastChild=M,Qe(R.ownerDocument,R,M),M}Re.prototype={nodeName:"#document",nodeType:z,doctype:null,documentElement:null,_inc:1,insertBefore:function(R,M){if(R.nodeType==F){for(var ee=R.firstChild;ee;){var Y=ee.nextSibling;this.insertBefore(ee,M),ee=Y}return R}return $e(this,R,M),R.ownerDocument=this,this.documentElement===null&&R.nodeType===f&&(this.documentElement=R
vendor: 4,525 bytes, line 12
12),R},removeChild:function(R){return this.documentElement==R&&(this.documentElement=null),Oe(this,R)},replaceChild:function(R,M){$e(this,R,M,Ur),R.ownerDocument=this,M&&this.removeChild(M),it(R)&&(this.documentElement=R)},importNode:function(R,M){return Zi(this,R,M)},getElementById:function(R){var M=null;return Pe(this.documentElement,function(ee){if(ee.nodeType==f&&ee.getAttribute("id")==R)return M=ee,!0}),M},getElementsByClassName:function(R){var M=a(R);return new ne(this,function(ee){var Y=[];return M.length>0&&Pe(ee.documentElement,function(we){if(we!==ee&&we.nodeType===f){var Ue=we.getAttribute("class");if(Ue){var ct=R===Ue;if(!ct){var Ht=a(Ue);ct=M.every(o(Ht))}ct&&Y.push(we)}}}),Y})},createElement:function(R){var M=new Xe;M.ownerDocument=this,M.nodeName=R,M.tagName=R,M.localName=R,M.childNodes=new J;var ee=M.attributes=new ue;return ee._ownerElement=M,M},createDocumentFragment:function(){var R=new Ze;return R.ownerDocument=this,R.childNodes=new J,R},createTextNode:function(R){var M=new ui;return M.ownerDocument=this,M.appendData(R),M},createComment:function(R){var M=new li;return M.ownerDocument=this,M.appendData(R),M},createCDATASection:function(R){var M=new ci;return M.ownerDocument=this,M.appendData(R),M},createProcessingInstruction:function(R,M){var ee=new Qi;return ee.ownerDocument=this,ee.tagName=ee.nodeName=ee.target=R,ee.nodeValue=ee.data=M,ee},createAttribute:function(R){var M=new Ie;return M.ownerDocument=this,M.name=R,M.nodeName=R,M.localName=R,M.specified=!0,M},createEntityReference:function(R){var M=new Xr;return M.ownerDocument=this,M.nodeName=R,M},createElementNS:function(R,M){var ee=new Xe,Y=M.split(":"),we=ee.attributes=new ue;return ee.childNodes=new J,ee.ownerDocument=this,ee.nodeName=M,ee.tagName=M,ee.namespaceURI=R,Y.length==2?(ee.prefix=Y[0],ee.localName=Y[1]):ee.localName=M,we._ownerElement=ee,ee},createAttributeNS:function(R,M){var ee=new Ie,Y=M.split(":");return ee.ownerDocument=this,ee.nodeName=M,ee.name=M,ee.namespaceURI=R,ee.specified=!0,Y.length==2?(ee.prefix=Y[0],ee.localName=Y[1]):ee.localName=M,ee}},u(Re,ce);function Xe(){this._nsMap={}}Xe.prototype={nodeType:f,hasAttribute:function(R){return this.getAttributeNode(R)!=null},getAttribute:function(R){var M=this.getAttributeNode(R);return M&&M.value||""},getAttributeNode:function(R){return this.attributes.getNamedItem(R)},setAttribute:function(R,M){var ee=this.ownerDocument.createAttribute(R);ee.value=ee.nodeValue=""+M,this.setAttributeNode(ee)},removeAttribute:function(R){var M=this.getAttributeNode(R);M&&this.removeAttributeNode(M)},appendChild:function(R){return R.nodeType===F?this.insertBefore(R,null):Kr(this,R)},setAttributeNode:function(R){return this.attributes.setNamedItem(R)},setAttributeNodeNS:function(R){return this.attributes.setNamedItemNS(R)},removeAttributeNode:function(R){return this.attributes.removeNamedItem(R.nodeName)},removeAttributeNS:function(R,M){var ee=this.getAttributeNodeNS(R,M);ee&&this.removeAttributeNode(ee)},hasAttributeNS:function(R,M){return this.getAttributeNodeNS(R,M)!=null},getAttributeNS:function(R,M){var ee=this.getAttributeNodeNS(R,M);return ee&&ee.value||""},setAttributeNS:function(R,M,ee){var Y=this.ownerDocument.createAttributeNS(R,M);Y.value=Y.nodeValue=""+ee,this.setAttributeNode(Y)},getAttributeNodeNS:function(R,M){return this.attributes.getNamedItemNS(R,M)},getElementsByTagName:function(R){return new ne(this,function(M){var ee=[];return Pe(M,function(Y){Y!==M&&Y.nodeType==f&&(R==="*"||Y.tagName==R)&&ee.push(Y)}),ee})},getElementsByTagNameNS:function(R,M){return new ne(this,function(ee){var Y=[];return Pe(ee,function(we){we!==ee&&we.nodeType===f&&(R==="*"||we.namespaceURI===R)&&(M==="*"||we.localName==M)&&Y.push(we)}),Y})}},Re.prototype.getElementsByTagName=Xe.prototype.getElementsByTagName,Re.prototype.getElementsByTagNameNS=Xe.prototype.getElementsByTagNameNS,u(Xe,ce);function Ie(){}Ie.prototype.nodeType=m,u(Ie,ce);function ht(){}ht.prototype={data:"",substringData:function(R,M){return this.data.substring(R,R+M)},appendData:function(R){R=this.data+R,this.nodeValue=this.data=R,this.length=R.length},insertData:function(R,M){this.replaceData(R,0,M)},appendChild:function(R){throw new Error(H[A])},deleteData:function(R,M){this.replaceData(R,M,"")},replaceData:function(R,M,ee){var Y=this.data.substring(0,R),we=this.data.substring(R+M);ee=Y+ee+we,this.nodeValue=this.data=ee,this.length=ee.length}},u(ht,ce);function ui(){}ui.prototype={nodeName:"#text",nodeType:x,splitText:function(R){var M=this.data,ee=M.substring(R);
vendor: 4,726 bytes, line 12
12M=M.substring(0,R),this.data=this.nodeValue=M,this.length=M.length;var Y=this.ownerDocument.createTextNode(ee);return this.parentNode&&this.parentNode.insertBefore(Y,this.nextSibling),Y}},u(ui,ht);function li(){}li.prototype={nodeName:"#comment",nodeType:q},u(li,ht);function ci(){}ci.prototype={nodeName:"#cdata-section",nodeType:C},u(ci,ht);function di(){}di.prototype.nodeType=U,u(di,ce);function Yi(){}Yi.prototype.nodeType=G,u(Yi,ce);function hn(){}hn.prototype.nodeType=E,u(hn,ce);function Xr(){}Xr.prototype.nodeType=L,u(Xr,ce);function Ze(){}Ze.prototype.nodeName="#document-fragment",Ze.prototype.nodeType=F,u(Ze,ce);function Qi(){}Qi.prototype.nodeType=B,u(Qi,ce);function pn(){}pn.prototype.serializeToString=function(R,M,ee){return Yr.call(R,M,ee)},ce.prototype.toString=Yr;function Yr(R,M){var ee=[],Y=this.nodeType==9&&this.documentElement||this,we=Y.prefix,Ue=Y.namespaceURI;if(Ue&&we==null){var we=Y.lookupPrefix(Ue);if(we==null)var ct=[{namespace:Ue,prefix:null}]}return fr(this,ee,R,M,ct),ee.join("")}function mn(R,M,ee){var Y=R.prefix||"",we=R.namespaceURI;if(!we||Y==="xml"&&we===i.XML||we===i.XMLNS)return!1;for(var Ue=ee.length;Ue--;){var ct=ee[Ue];if(ct.prefix===Y)return ct.namespace!==we}return!0}function Ji(R,M,ee){R.push(" ",M,'="',ee.replace(/[<>&"\t\n\r]/g,be),'"')}function fr(R,M,ee,Y,we){if(we||(we=[]),Y)if(R=Y(R),R){if(typeof R=="string"){M.push(R);return}}else return;switch(R.nodeType){case f:var Ue=R.attributes,ct=Ue.length,kt=R.firstChild,Ht=R.tagName;ee=i.isHTML(R.namespaceURI)||ee;var tr=Ht;if(!ee&&!R.prefix&&R.namespaceURI){for(var Et,Ir=0;Ir<Ue.length;Ir++)if(Ue.item(Ir).name==="xmlns"){Et=Ue.item(Ir).value;break}if(!Et)for(var Nt=we.length-1;Nt>=0;Nt--){var rr=we[Nt];if(rr.prefix===""&&rr.namespace===R.namespaceURI){Et=rr.namespace;break}}if(Et!==R.namespaceURI)for(var Nt=we.length-1;Nt>=0;Nt--){var rr=we[Nt];if(rr.namespace===R.namespaceURI){rr.prefix&&(tr=rr.prefix+":"+Ht);break}}}M.push("<",tr);for(var Bt=0;Bt<ct;Bt++){var jt=Ue.item(Bt);jt.prefix=="xmlns"?we.push({prefix:jt.localName,namespace:jt.value}):jt.nodeName=="xmlns"&&we.push({prefix:"",namespace:jt.value})}for(var Bt=0;Bt<ct;Bt++){var jt=Ue.item(Bt);if(mn(jt,ee,we)){var et=jt.prefix||"",Ei=jt.namespaceURI;Ji(M,et?"xmlns:"+et:"xmlns",Ei),we.push({prefix:et,namespace:Ei})}fr(jt,M,ee,Y,we)}if(Ht===tr&&mn(R,ee,we)){var et=R.prefix||"",Ei=R.namespaceURI;Ji(M,et?"xmlns:"+et:"xmlns",Ei),we.push({prefix:et,namespace:Ei})}if(kt||ee&&!/^(?:meta|link|img|br|hr|input)$/i.test(Ht)){if(M.push(">"),ee&&/^script$/i.test(Ht))for(;kt;)kt.data?M.push(kt.data):fr(kt,M,ee,Y,we.slice()),kt=kt.nextSibling;else for(;kt;)fr(kt,M,ee,Y,we.slice()),kt=kt.nextSibling;M.push("</",tr,">")}else M.push("/>");return;case z:case F:for(var kt=R.firstChild;kt;)fr(kt,M,ee,Y,we.slice()),kt=kt.nextSibling;return;case m:return Ji(M,R.name,R.value);case x:return M.push(R.data.replace(/[<&>]/g,be));case C:return M.push("<![CDATA[",R.data,"]]>");case q:return M.push("<!--",R.data,"-->");case U:var Ci=R.publicId,Lr=R.systemId;if(M.push("<!DOCTYPE ",R.name),Ci)M.push(" PUBLIC ",Ci),Lr&&Lr!="."&&M.push(" ",Lr),M.push(">");else if(Lr&&Lr!=".")M.push(" SYSTEM ",Lr,">");else{var Mr=R.internalSubset;Mr&&M.push(" [",Mr,"]"),M.push(">")}return;case B:return M.push("<?",R.target," ",R.data,"?>");case L:return M.push("&",R.nodeName,";");default:M.push("??",R.nodeName)}}function Zi(R,M,ee){var Y;switch(M.nodeType){case f:Y=M.cloneNode(!1),Y.ownerDocument=R;case F:break;case m:ee=!0;break}if(Y||(Y=M.cloneNode(!1)),Y.ownerDocument=R,Y.parentNode=null,ee)for(var we=M.firstChild;we;)Y.appendChild(Zi(R,we,ee)),we=we.nextSibling;return Y}function qr(R,M,ee){var Y=new M.constructor;for(var we in M)if(Object.prototype.hasOwnProperty.call(M,we)){var Ue=M[we];typeof Ue!="object"&&Ue!=Y[we]&&(Y[we]=Ue)}switch(M.childNodes&&(Y.childNodes=new J),Y.ownerDocument=R,Y.nodeType){case f:var ct=M.attributes,Ht=Y.attributes=new ue,tr=ct.length;Ht._ownerElement=Y;for(var Et=0;Et<tr;Et++)Y.setAttributeNode(qr(R,ct.item(Et),!0));break;case m:ee=!0}if(ee)for(var Ir=M.firstChild;Ir;)Y.appendChild(qr(R,Ir,ee)),Ir=Ir.nextSibling;return Y}function Tt(R,M,ee){R[M]=ee}try{if(Object.defineProperty){let R=function(M){switch(M.nodeType){case f:case F:var ee=[];for(M=M.firstChild;M;)M.nodeType!==7&&M.nodeType!==8&&ee.push(R(M)),M=M.nextSibling;return ee.join("");default:return M.nodeValue}};Object.defineProperty(ne.prototype,"length",{get:function(){return se(this),this.$$length}}),Object.defineProperty(ce.prototype,"textContent",{get:function(){return R(this)},set:function(M){switch(this.nodeType){case f:case F:for(;this.firstChild;)this.removeChild(this.firstChild);(M||String(M))&&this.appendChild(this.ownerDocument.createTextNode(M));break;
12default:this.data=M,this.value=M,this.nodeValue=M}}}),Tt=function(M,ee,Y){M["$$"+ee]=Y}}}catch{}return Li.DocumentType=di,Li.DOMException=X,Li.DOMImplementation=re,Li.Element=Xe,Li.Node=ce,Li.NodeList=J,Li.XMLSerializer=pn,Li}var Pa={},wu={},Uh;function BT(){return Uh||(Uh=1,(function(s){var r=To().freeze;s.XML_ENTITIES=r({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),s.HTML_ENTITIES=r
vendor: 14,815 bytes, line 12
12({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:
12`
13`
vendor: 9,925 bytes, line 13
13,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"
13	",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),s.entityMap=s.HTML_ENTITIES})(wu)),wu}var Ls={},qh;
vendor: 7,871 bytes, line 13
13function UT(){if(qh)return Ls;qh=1;var s=To().NAMESPACE,r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),n=new RegExp("^"+r.source+i.source+"*(?::"+r.source+i.source+"*)?$"),e=0,t=1,a=2,o=3,l=4,u=5,d=6,f=7;function m(A,D){this.message=A,this.locator=D,Error.captureStackTrace&&Error.captureStackTrace(this,m)}m.prototype=new Error,m.prototype.name=m.name;function x(){}x.prototype={parse:function(A,D,j){var X=this.domBuilder;X.startDocument(),U(D,D={}),C(A,D,j,X,this.errorHandler),X.endDocument()}};function C(A,D,j,X,J){function ne(Xe){if(Xe>65535){Xe-=65536;var Ie=55296+(Xe>>10),ht=56320+(Xe&1023);return String.fromCharCode(Ie,ht)}else return String.fromCharCode(Xe)}function se(Xe){var Ie=Xe.slice(1,-1);return Object.hasOwnProperty.call(j,Ie)?j[Ie]:Ie.charAt(0)==="#"?ne(parseInt(Ie.substr(1).replace("x","0x"))):(J.error("entity not found:"+Xe),Xe)}function ue(Xe){if(Xe>Re){var Ie=A.substring(Re,Xe).replace(/&#?\w+;/g,se);ce&&oe(Re),X.characters(Ie,0,Xe-Re),Re=Xe}}function oe(Xe,Ie){for(;Xe>=le&&(Ie=re.exec(A));)te=Ie.index,le=te+Ie[0].length,ce.lineNumber++;ce.columnNumber=Xe-te+1}for(var te=0,le=0,re=/.*(?:\r\n?|\n)|.*$/g,ce=X.locator,be=[{currentNSMap:D}],Pe={},Re=0;;){try{var ge=A.indexOf("<",Re);if(ge<0){if(!A.substr(Re).match(/^\s*$/)){var De=X.doc,Qe=De.createTextNode(A.substr(Re));De.appendChild(Qe),X.currentElement=Qe}return}switch(ge>Re&&ue(ge),A.charAt(ge+1)){case"/":var ft=A.indexOf(">",ge+3),Oe=A.substring(ge+2,ft).replace(/[ \t\n\r]+$/g,""),ot=be.pop();ft<0?(Oe=A.substring(ge+2).replace(/[\s<].*/,""),J.error("end tag name: "+Oe+" is not complete:"+ot.tagName),ft=ge+1+Oe.length):Oe.match(/\s</)&&(Oe=Oe.replace(/[\s<].*/,""),J.error("end tag name: "+Oe+" maybe not complete"),ft=ge+1+Oe.length);var vt=ot.localNSMap,ut=ot.tagName==Oe,it=ut||ot.tagName&&ot.tagName.toLowerCase()==Oe.toLowerCase();if(it){if(X.endElement(ot.uri,ot.localName,Oe),vt)for(var tt in vt)Object.prototype.hasOwnProperty.call(vt,tt)&&X.endPrefixMapping(tt);ut||J.fatalError("end tag name: "+Oe+" is not match the current start tagName:"+ot.tagName)}else be.push(ot);ft++;break;case"?":ce&&oe(ge),ft=G(A,ge,X);break;case"!":ce&&oe(ge),ft=F(A,ge,X,J);break;default:ce&&oe(ge);var nt=new O,Cr=be[be.length-1].currentNSMap,ft=E(A,ge,nt,Cr,se,J),er=nt.length;if(!nt.closed&&z(A,ft,nt.tagName,Pe)&&(nt.closed=!0,j.nbsp||J.warning("unclosed xml attribute")),ce&&er){for(var Ur=L(ce,{}),$e=0;$e<er;$e++){var Kr=nt[$e];oe(Kr.offset),Kr.locator=L(ce,{})}X.locator=Ur,B(nt,X,Cr)&&be.push(nt),X.locator=ce}else B(nt,X,Cr)&&be.push(nt);s.isHTML(nt.uri)&&!nt.closed?ft=q(A,ft,nt.tagName,se,X):ft++}}catch(Xe){if(Xe instanceof m)throw Xe;J.error("element parse error: "+Xe),ft=-1}ft>Re?Re=ft:ue(Math.max(ge,Re)+1)}}function L(A,D){return D.lineNumber=A.lineNumber,D.columnNumber=A.columnNumber,D}function E(A,D,j,X,J,ne){function se(ce,be,Pe){j.attributeNames.hasOwnProperty(ce)&&ne.fatalError("Attribute "+ce+" redefined"),j.addValue(ce,be.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,J),Pe)}for(var ue,oe,te=++D,le=e;;){var re=A.charAt(te);switch(re){case"=":if(le===t)ue=A.slice(D,te),le=o;else if(le===a)le=o;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(le===o||le===t)if(le===t&&(ne.warning('attribute value must after "="'),ue=A.slice(D,te)),D=te+1,te=A.indexOf(re,D),te>0)oe=A.slice(D,te),se(ue,oe,D-1),le=u;else throw new Error("attribute value no end '"+re+"' match");else if(le==l)oe=A.slice(D,te),se(ue,oe,D),ne.warning('attribute "'+ue+'" missed start quot('+re+")!!"),D=te+1,le=u;else throw new Error('attribute value must after "="');break;case"/":switch(le){case e:j.setTagName(A.slice(D,te));case u:case d:case f:le=f,j.closed=!0;case l:case t:break;case a:j.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return ne.error("unexpected end of input"),le==e&&j.setTagName(A.slice(D,te)),te;case">":switch(le){case e:j.setTagName(A.slice(D,te));case u:case d:case f:break;case l:case t:oe=A.slice(D,te),oe.slice(-1)==="/"&&(j.closed=!0,oe=oe.slice(0,-1));case a:le===a&&(oe=ue),le==l?(ne.warning('attribute "'+oe+'" missed quot(")!'),se(ue,oe,D)):((!s.isHTML(X[""])||!oe.match(/^(?:disabled|checked|selected)$/i))&&ne.warning('attribute "'+oe+'" missed value!! "'+oe+'" instead!!'),se(oe,oe,D));break;case o:throw new Error("attribute value missed!!")}return te;case"€":re=" ";default:if(re<=" ")switch(le){case e:j.setTagName(A.slice(D,te)),le=d;break;case t:ue=A.slice(D,te),le=a;break;case l:var oe=A.slice(D,te);ne.warning('attribute "'+oe+'" missed quot(")!!'),se(ue,oe,D);case u:le=d;break}else switch(le){case a:j.tagName,(!s.isHTML(X[""])||!ue.match(/^(?:disabled|checked|selected)$/i))&&ne.warning('attribute "'+ue+'" missed value!! "'+ue+'" instead2!!'),se(ue,ue,D),D=te,le=t;break;case u:ne.warning('attribute space is required"'+ue+'"!!');case d:le=t,D=te;break;case o:le=l,D=te;break;case f:throw new Error("elements closed character '/' and '>' must be connected to")}}te++}}function B(A,D,j){for(var X=A.tagName,J=null,re=A.length;re--;){var ne=A[re],se=ne.qName,ue=ne.value,ce=se.indexOf(":");if(ce>0)var oe=ne.prefix=se.slice(0,ce),te=se.slice(ce+1),le=oe==="xmlns"&&te;else te=se,oe=null,le=se==="xmlns"&&"";ne.localName=te,le!==!1&&(J==null&&(J={},U(j,j={})),j[le]=J[le]=ue,ne.uri=s.XMLNS,D.startPrefixMapping(le,ue))}for(var re=A.length;re--;){ne=A[re];var oe=ne.prefix;oe&&(oe==="xml"&&(ne.uri=s.XML),oe!=="xmlns"&&(ne.uri=j[oe||""]))}var ce=X.indexOf(":");ce>0?(oe=A.prefix=X.slice(0,ce),te=A.localName=X.slice(ce+1)):(oe=null,te=A.localName=X);var be=A.uri=j[oe||""];if(D.startElement(be,te,X,A),A.closed){if(D.endElement(be,te,X),J)for(oe in J)Object.prototype.hasOwnProperty.call(J,oe)&&D.endPrefixMapping(oe)}else return A.currentNSMap=j,A.localNSMap=J,!0}function q(A,D,j,X,J){if(/^(?:script|textarea)$/i.test(j)){var ne=A.indexOf("</"+j+">",D),se=A.substring(D+1,ne);if(/[&<]/.test(se))return/^script$/i.test(j)?(J.characters(se,0,se.length),ne):(se=se.replace(/&#?\w+;/g,X),J.characters(se,0,se.length),ne)}return D+1}function z(A,D,j,X){var J=X[j];return J==null&&(J=A.lastIndexOf("</"+j+">"),J<D&&(J=A.lastIndexOf("</"+j)),X[j]=J),J<D}function U(A,D){for(var j in A)Object.prototype.hasOwnProperty.call(A,j)&&(D[j]=A[j])}function F(A,D,j,X){var J=A.charAt(D+2);switch(J){case"-":if(A.charAt(D+3)==="-"){var ne=A.indexOf("-->",D+4);return ne>D?(j.comment(A,D+4,ne-D-4),ne+3):(X.error("Unclosed comment"),-1)}else return-1;default:if(A.substr(D+3,6)=="CDATA["){var ne=A.indexOf("]]>",D+9);return j.startCDATA(),j.characters(A,D+9,ne-D-9),j.endCDATA(),ne+3}var se=H(A,D),ue=se.length;if(ue>1&&/!doctype/i.test(se[0][0])){var oe=se[1][0],te=!1,le=!1;ue>3&&(/^public$/i.test(se[2][0])?(te=se[3][0],le=ue>4&&se[4][0]):/^system$/i.test(se[2][0])&&(le=se[3][0]));var re=se[ue-1];return j.startDTD(oe,te,le),j.endDTD(),re.index+re[0].length}}return-1}function G(A,D,j){var X=A.indexOf("?>",D);if(X){var J=A.substring(D,X).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return J?(J[0].length,j.processingInstruction(J[1],J[2]),X+2):-1}return-1}function O(){this.attributeNames={}}O.prototype={setTagName:function(A){if(!n.test(A))throw new Error("invalid tagName:"+A);this.tagName=A},addValue:function(A,D,j){if(!n.test(A))throw new Error("invalid attribute:"+A);this.attributeNames[A]=this.length,this[this.length++]={qName:A,value:D,offset:j}},length:0,getLocalName:function(A){return this[A].localName},getLocator:function(A){return this[A].locator},getQName:function(A){return this[A].qName},getURI:function(A){return this[A].uri},getValue:function(A){return this[A].value}};function H(A,D){var j,X=[],J=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(J.lastIndex=D,J.exec(A);
13j=J.exec(A);)if(X.push(j),j[1])return X}return Ls.XMLReader=x,Ls.ParseError=m,Ls}var Vh;function qT(){if(Vh)return Pa;Vh=1;var s=To(),r=o0(),i=BT(),n=UT(),e=r.DOMImplementation,t=s.NAMESPACE,a=n.ParseError,o=n.XMLReader;function l(E){return E.replace(/\r[\n\u0085]/g,`
14`).replace(/[\r\u0085\u2028]/g,`
15`)}function u(E){this.options=E||{locator:{}}}u.prototype.parseFromString=function(E,B){var q=this.options,z=new o,U=q.domBuilder||new f,F=q.errorHandler,G=q.locator,O=q.xmlns||{},H=/\/x?html?$/.test(B),A=H?i.HTML_ENTITIES:i.XML_ENTITIES;G&&U.setDocumentLocator(G),z.errorHandler=d(F,U,G),z.domBuilder=q.domBuilder||U,H&&(O[""]=t.HTML),O.xml=O.xml||t.XML;var D=q.normalizeLineEndings||l;return E&&typeof E=="string"?z.parse(D(E),O,A):z.errorHandler.error("invalid doc source"),U.doc};function d(E,B,q){if(!E){if(B instanceof f)return B;E=B}var z={},U=E instanceof Function;q=q||{};function F(G){var O=E[G];!O&&U&&(O=E.length==2?function(H){E(G,H)}:E),z[G]=O&&function(H){O("[xmldom "+G+"]	"+H+x(q))}||function(){}}return F("warning"),F("error"),F("fatalError"),z}function f(){this.cdata=!1}function m(E,B){B.lineNumber=E.lineNumber,B.columnNumber=E.columnNumber}f.prototype={startDocument:function(){this.doc=new e().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(E,B,q,z){var U=this.doc,F=U.createElementNS(E,q||B),G=z.length;L(this,F),this.currentElement=F,this.locator&&m(this.locator,F);for(var O=0;O<G;O++){var E=z.getURI(O),H=z.getValue(O),q=z.getQName(O),A=U.createAttributeNS(E,q);this.locator&&m(z.getLocator(O),A),A.value=A.nodeValue=H,F.setAttributeNode(A)}},endElement:function(E,B,q){var z=this.currentElement;z.tagName,this.currentElement=z.parentNode},startPrefixMapping:function(E,B){},endPrefixMapping:function(E){},processingInstruction:function(E,B){var q=this.doc.createProcessingInstruction(E,B);this.locator&&m(this.locator,q),L(this,q)},ignorableWhitespace:function(E,B,q){},characters:function(E,B,q){if(E=C.apply(this,arguments),E){if(this.cdata)var z=this.doc.createCDATASection(E);else var z=this.doc.createTextNode(E);this.currentElement?this.currentElement.appendChild(z):/^\s*$/.test(E)&&this.doc.appendChild(z),this.locator&&m(this.locator,z)}},skippedEntity:function(E){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(E){(this.locator=E)&&(E.lineNumber=0)},comment:function(E,B,q){E=C.apply(this,arguments);var z=this.doc.createComment(E);this.locator&&m(this.locator,z),L(this,z)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(E,B,q){var z=this.doc.implementation;if(z&&z.createDocumentType){var U=z.createDocumentType(E,B,q);this.locator&&m(this.locator,U),L(this,U),this.doc.doctype=U}},warning:function(E){console.warn("[xmldom warning]	"+E,x(this.locator))},error:function(E){console.error("[xmldom error]	"+E,x(this.locator))},fatalError:function(E){throw new a(E,this.locator)}};function x(E){if(E)return`
16@`+(E.systemId||"")+"#[line:"+E.lineNumber+",col:"+E.columnNumber+"]"}function C(E,B,q){return typeof E=="string"?E.substr(B,q):E.length>=B+q||B?new java.lang.String(E,B,q)+"":E}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(E){f.prototype[E]=function(){return null}});function L(E,B){E.currentElement?E.currentElement.appendChild(B):E.doc.appendChild(B)}return Pa.__DOMHandler=f,Pa.normalizeLineEndings=l,Pa.DOMParser=u,Pa}var Hh;function VT(){if(Hh)return Da;Hh=1;var s=o0();return Da.DOMImplementation=s.DOMImplementation,Da.XMLSerializer=s.XMLSerializer,Da.DOMParser=qT().DOMParser,Da}var HT=VT();var jh=function(r){return!!r&&typeof r=="object"},Tr=function s(){for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return i.reduce(function(e,t){return typeof t!="object"||Object.keys(t).forEach(function(a){Array.isArray(e[a])&&Array.isArray(t[a])?e[a]=e[a].concat(t[a]):jh(e[a])&&jh(t[a])?e[a]=s(e[a],t[a]):e[a]=t[a]}),e},{})},u0=function(r){return Object.keys(r).map(function(i){return r[i]})},jT=function(r,i){for(var n=[],e=r;e<i;e++)n.push(e);return n},So=function(r){return r.reduce(function(i,n){return i.concat(n)},[])},l0=function(r){if(!r.length)return[];for(var i=[],n=0;n<r.length;n++)i.push(r[n]);return i},GT=function(r,i){return r.reduce(function(n,e,t){return e[i]&&n.push(t),n},[])},Od=function(r,i){for(var n=0;n<r.length;n++)if(i(r[n]))return n;return-1},WT=function(r,i){return u0(r.reduce(function(n,e){return e.forEach(function(t){n[i(t)]=t}),n},{}))}
16,aa={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"},Ka=function(r){var i=r.baseUrl,n=i===void 0?"":i,e=r.source,t=e===void 0?"":e,a=r.range,o=a===void 0?"":a,l=r.indexRange,u=l===void 0?"":l,d={uri:t,resolvedUri:bo(n||"",t)};if(o||u){var f=o||u,m=f.split("-"),x=K.BigInt?K.BigInt(m[0]):parseInt(m[0],10),C=K.BigInt?K.BigInt(m[1]):parseInt(m[1],10);x<Number.MAX_SAFE_INTEGER&&typeof x=="bigint"&&(x=Number(x)),C<Number.MAX_SAFE_INTEGER&&typeof C=="bigint"&&(C=Number(C));var L;typeof C=="bigint"||typeof x=="bigint"?L=K.BigInt(C)-K.BigInt(x)+K.BigInt(1):L=C-x+1,typeof L=="bigint"&&L<Number.MAX_SAFE_INTEGER&&(L=Number(L)),d.byterange={length:L,offset:x}}return d},zT=function(r){var i;return typeof r.offset=="bigint"||typeof r.length=="bigint"?i=K.BigInt(r.offset)+K.BigInt(r.length)-K.BigInt(1):i=r.offset+r.length-1,r.offset+"-"+i},Gh=function(r){return r&&typeof r!="number"&&(r=parseInt(r,10)),isNaN(r)?null:r},$T={static:function(r){var i=r.duration,n=r.timescale,e=n===void 0?1:n,t=r.sourceDuration,a=r.periodDuration,o=Gh(r.endNumber),l=i/e;return typeof o=="number"?{start:0,end:o}:typeof a=="number"?{start:0,end:a/l}:{start:0,end:t/l}},dynamic:function(r){var i=r.NOW,n=r.clientOffset,e=r.availabilityStartTime,t=r.timescale,a=t===void 0?1:t,o=r.duration,l=r.periodStart,u=l===void 0?0:l,d=r.minimumUpdatePeriod,f=d===void 0?0:d,m=r.timeShiftBufferDepth,x=m===void 0?1/0:m,C=Gh(r.endNumber),L=(i+n)/1e3,E=e+u,B=L+f,q=B-E,z=Math.ceil(q*a/o),U=Math.floor((L-E-x)*a/o),F=Math.floor((L-E)*a/o);return{start:Math.max(0,U),end:typeof C=="number"?C:Math.min(z,F)}}},KT=function(r){return function(i){var n=r.duration,e=r.timescale,t=e===void 0?1:e,a=r.periodStart,o=r.startNumber,l=o===void 0?1:o;return{number:l+i,duration:n/t,timeline:a,time:i*n}}},hf=function(r){var i=r.type,n=r.duration,e=r.timescale,t=e===void 0?1:e,a=r.periodDuration,o=r.sourceDuration,l=$T[i](r),u=l.start,d=l.end,f=jT(u,d).map(KT(r));if(i==="static"){var m=f.length-1,x=typeof a=="number"?a:o;f[m].duration=x-n/t*m}return f},c0=function(r){var i=r.baseUrl,n=r.initialization,e=n===void 0?{}:n,t=r.sourceDuration,a=r.indexRange,o=a===void 0?"":a,l=r.periodStart,u=r.presentationTime,d=r.number,f=d===void 0?0:d,m=r.duration;if(!i)throw new Error(aa.NO_BASE_URL);var x=Ka({baseUrl:i,source:e.sourceURL,range:e.range}),C=Ka({baseUrl:i,source:i,indexRange:o});if(C.map=x,m){var L=hf(r);L.length&&(C.duration=L[0].duration,C.timeline=L[0].timeline)}else t&&(C.duration=t,C.timeline=l);return C.presentationTime=u||l,C.number=f,[C]},pf=function(r,i,n){var e=r.sidx.map?r.sidx.map:null,t=r.sidx.duration,a=r.timeline||0,o=r.sidx.byterange,l=o.offset+o.length,u=i.timescale,d=i.references.filter(function(A){return A.referenceType!==1}),f=[],m=r.endList?"static":"dynamic",x=r.sidx.timeline,C=x,L=r.mediaSequence||0,E;typeof i.firstOffset=="bigint"?E=K.BigInt(l)+i.firstOffset:E=l+i.firstOffset;for(var B=0;B<d.length;B++){var q=i.references[B],z=q.referencedSize,U=q.subsegmentDuration,F=void 0;typeof E=="bigint"?F=E+K.BigInt(z)-K.BigInt(1):F=E+z-1;var G=E+"-"+F,O={baseUrl:n,timescale:u,timeline:a,periodStart:x,presentationTime:C,number:L,duration:U,sourceDuration:t,indexRange:G,type:m},H=c0(O)[0];e&&(H.map=e),f.push(H),typeof E=="bigint"?E+=K.BigInt(z):E+=z,C+=U/u,L++}return r.segments=f,r},XT=["AUDIO","SUBTITLES"],YT=1/60,d0=function(r){return WT(r,function(i){var n=i.timeline;return n}).sort(function(i,n){return i.timeline>n.timeline?1:-1})},QT=function(r,i){for(var n=0;n<r.length;n++)if(r[n].attributes.NAME===i)return r[n];return null},Wh=function(r){var i=[];return NT(r,XT,function(n,e,t,a){i=i.concat(n.playlists||[])}),i},zh=function(r){var i=r.playlist,n=r.mediaSequence;i.mediaSequence=n,i.segments.forEach(function(e,t){e.number=i.mediaSequence+t})},JT=function(r){var i=r.oldPlaylists,n=r.newPlaylists,e=r.timelineStarts;n.forEach(function(t){t.discontinuitySequence=Od(e,function(d){var f=d.timeline;return f===t.timeline});var a=QT(i,t.attributes.NAME);if(a&&!t.sidx){var o=t.segments[0],l=Od(a.segments,function(d){return Math.abs(d.presentationTime-o.presentationTime)<YT});if(l===-1){zh({playlist:t,mediaSequence:a.mediaSequence+a.segments.length}),t.segments[0].discontinuity=!0,t.discontinuityStarts.unshift(0),(!a.segments.length&&t.timeline>a.timeline||a.segments.length&&t.timeline>a.segments[a.segments.length-1].timeline)&&t.discontinuitySequence--;return}var u=a.segments[l];u.discontinuity&&!o.discontinuity&&(o.discontinuity=!0,t.discontinuityStarts.unshift(0),t.discontinuitySequence--),zh({playlist:t,mediaSequence:a.segments[l].number})}})},ZT=function(r){var i=r.oldManifest,n=r.newManifest,e=i.playlists.concat(Wh(i)),t=n.playlists.concat(Wh(n));return n.timelineStarts=d0([i.timelineStarts,n.timelineStarts]),JT({oldPlaylists:e,newPlaylists:t,timelineStarts:n.timelineStarts}),n},xo=function(r){return r&&r.uri+"-"+zT(r.byterange)},Au=function(r){var i=u0(r.reduce(function(n,e){var t=e.attributes.id+(e.attributes.lang||"");if(!n[t])n[t]=e,n[t].attributes.timelineStarts=[];else{if(e.segments){var a;
16e.segments[0]&&(e.segments[0].discontinuity=!0),(a=n[t].segments).push.apply(a,e.segments)}e.attributes.contentProtection&&(n[t].attributes.contentProtection=e.attributes.contentProtection)}return n[t].attributes.timelineStarts.push({start:e.attributes.periodStart,timeline:e.attributes.periodStart}),n},{}));return i.map(function(n){return n.discontinuityStarts=GT(n.segments||[],"discontinuity"),n})},mf=function(r,i){var n=xo(r.sidx),e=n&&i[n]&&i[n].sidx;return e&&pf(r,e,r.sidx.resolvedUri),r},eS=function(r,i){if(i===void 0&&(i={}),!Object.keys(i).length)return r;for(var n in r)r[n]=mf(r[n],i);return r},tS=function(r,i){var n,e=r.attributes,t=r.segments,a=r.sidx,o=r.mediaSequence,l=r.discontinuitySequence,u=r.discontinuityStarts,d={attributes:(n={NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:e.type==="static",timeline:e.periodStart,resolvedUri:"",targetDuration:e.duration,discontinuitySequence:l,discontinuityStarts:u,timelineStarts:e.timelineStarts,mediaSequence:o,segments:t};return e.contentProtection&&(d.contentProtection=e.contentProtection),a&&(d.sidx=a),i&&(d.attributes.AUDIO="audio",d.attributes.SUBTITLES="subs"),d},rS=function(r){var i,n=r.attributes,e=r.segments,t=r.mediaSequence,a=r.discontinuityStarts,o=r.discontinuitySequence;typeof e>"u"&&(e=[{uri:n.baseUrl,timeline:n.periodStart,resolvedUri:n.baseUrl||"",duration:n.sourceDuration,number:0}],n.duration=n.sourceDuration);var l=(i={NAME:n.id,BANDWIDTH:n.bandwidth},i["PROGRAM-ID"]=1,i);return n.codecs&&(l.CODECS=n.codecs),{attributes:l,uri:"",endList:n.type==="static",timeline:n.periodStart,resolvedUri:n.baseUrl||"",targetDuration:n.duration,timelineStarts:n.timelineStarts,discontinuityStarts:a,discontinuitySequence:o,mediaSequence:t,segments:e}},iS=function(r,i,n){i===void 0&&(i={}),n===void 0&&(n=!1);var e,t=r.reduce(function(o,l){var u=l.attributes.role&&l.attributes.role.value||"",d=l.attributes.lang||"",f=l.attributes.label||"main";if(d&&!l.attributes.label){var m=u?" ("+u+")":"";f=""+l.attributes.lang+m}o[f]||(o[f]={language:d,autoselect:!0,default:u==="main",playlists:[],uri:""});var x=mf(tS(l,n),i);return o[f].playlists.push(x),typeof e>"u"&&u==="main"&&(e=l,e.default=!0),o},{});if(!e){var a=Object.keys(t)[0];t[a].default=!0}return t},nS=function(r,i){return i===void 0&&(i={}),r.reduce(function(n,e){var t=e.attributes.lang||"text";return n[t]||(n[t]={language:t,default:!1,autoselect:!1,playlists:[],uri:""}),n[t].playlists.push(mf(rS(e),i)),n},{})},aS=function(r){return r.reduce(function(i,n){return n&&n.forEach(function(e){var t=e.channel,a=e.language;i[a]={autoselect:!1,default:!1,instreamId:t,language:a},e.hasOwnProperty("aspectRatio")&&(i[a].aspectRatio=e.aspectRatio),e.hasOwnProperty("easyReader")&&(i[a].easyReader=e.easyReader),e.hasOwnProperty("3D")&&(i[a]["3D"]=e["3D"])}),i},{})},sS=function(r){var i,n=r.attributes,e=r.segments,t=r.sidx,a=r.discontinuityStarts,o={attributes:(i={NAME:n.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:n.width,height:n.height},CODECS:n.codecs,BANDWIDTH:n.bandwidth},i["PROGRAM-ID"]=1,i),uri:"",endList:n.type==="static",timeline:n.periodStart,resolvedUri:"",targetDuration:n.duration,discontinuityStarts:a,timelineStarts:n.timelineStarts,segments:e};return n.frameRate&&(o.attributes["FRAME-RATE"]=n.frameRate),n.contentProtection&&(o.contentProtection=n.contentProtection),t&&(o.sidx=t),o},oS=function(r){var i=r.attributes;return i.mimeType==="video/mp4"||i.mimeType==="video/webm"||i.contentType==="video"},uS=function(r){var i=r.attributes;return i.mimeType==="audio/mp4"||i.mimeType==="audio/webm"||i.contentType==="audio"},lS=function(r){var i=r.attributes;return i.mimeType==="text/vtt"||i.contentType==="text"},cS=function(r,i){r.forEach(function(n){n.mediaSequence=0,n.discontinuitySequence=Od(i,function(e){var t=e.timeline;return t===n.timeline}),n.segments&&n.segments.forEach(function(e,t){e.number=t})})},$h=function(r){return r?Object.keys(r).reduce(function(i,n){var e=r[n];return i.concat(e.playlists)},[]):[]},dS=function(r){var i,n=r.dashPlaylists,e=r.locations,t=r.sidxMapping,a=t===void 0?{}:t,o=r.previousManifest;if(!n.length)return{};var l=n[0].attributes,u=l.sourceDuration,d=l.type,f=l.suggestedPresentationDelay,m=l.minimumUpdatePeriod,x=Au(n.filter(oS)).map(sS),C=Au(n.filter(uS)),L=Au(n.filter(lS)),E=n.map(function(O){return O.attributes.captionServices}
16).filter(Boolean),B={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(i={AUDIO:{},VIDEO:{}},i["CLOSED-CAPTIONS"]={},i.SUBTITLES={},i),uri:"",duration:u,playlists:eS(x,a)};m>=0&&(B.minimumUpdatePeriod=m*1e3),e&&(B.locations=e),d==="dynamic"&&(B.suggestedPresentationDelay=f);var q=B.playlists.length===0,z=C.length?iS(C,a,q):null,U=L.length?nS(L,a):null,F=x.concat($h(z),$h(U)),G=F.map(function(O){var H=O.timelineStarts;return H});return B.timelineStarts=d0(G),cS(F,B.timelineStarts),z&&(B.mediaGroups.AUDIO.audio=z),U&&(B.mediaGroups.SUBTITLES.subs=U),E.length&&(B.mediaGroups["CLOSED-CAPTIONS"].cc=aS(E)),o?ZT({oldManifest:o,newManifest:B}):B},fS=function(r,i,n){var e=r.NOW,t=r.clientOffset,a=r.availabilityStartTime,o=r.timescale,l=o===void 0?1:o,u=r.periodStart,d=u===void 0?0:u,f=r.minimumUpdatePeriod,m=f===void 0?0:f,x=(e+t)/1e3,C=a+d,L=x+m,E=L-C;return Math.ceil((E*l-i)/n)},f0=function(r,i){for(var n=r.type,e=r.minimumUpdatePeriod,t=e===void 0?0:e,a=r.media,o=a===void 0?"":a,l=r.sourceDuration,u=r.timescale,d=u===void 0?1:u,f=r.startNumber,m=f===void 0?1:f,x=r.periodStart,C=[],L=-1,E=0;E<i.length;E++){var B=i[E],q=B.d,z=B.r||0,U=B.t||0;L<0&&(L=U),U&&U>L&&(L=U);var F=void 0;if(z<0){var G=E+1;G===i.length?n==="dynamic"&&t>0&&o.indexOf("$Number$")>0?F=fS(r,L,q):F=(l*d-L)/q:F=(i[G].t-L)/q}else F=z+1;for(var O=m+C.length+F,H=m+C.length;H<O;)C.push({number:H,duration:q/d,time:L,timeline:x}),L+=q,H++}return C},hS=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,pS=function(r){return function(i,n,e,t){if(i==="$$")return"$";if(typeof r[n]>"u")return i;var a=""+r[n];return n==="RepresentationID"||(e?t=parseInt(t,10):t=1,a.length>=t)?a:""+new Array(t-a.length+1).join("0")+a}},Kh=function(r,i){return r.replace(hS,pS(i))},mS=function(r,i){return!r.duration&&!i?[{number:r.startNumber||1,duration:r.sourceDuration,time:0,timeline:r.periodStart}]:r.duration?hf(r):f0(r,i)},vS=function(r,i){var n={RepresentationID:r.id,Bandwidth:r.bandwidth||0},e=r.initialization,t=e===void 0?{sourceURL:"",range:""}:e,a=Ka({baseUrl:r.baseUrl,source:Kh(t.sourceURL,n),range:t.range}),o=mS(r,i);return o.map(function(l){n.Number=l.number,n.Time=l.time;var u=Kh(r.media||"",n),d=r.timescale||1,f=r.presentationTimeOffset||0,m=r.periodStart+(l.time-f)/d,x={uri:u,timeline:l.timeline,duration:l.duration,resolvedUri:bo(r.baseUrl||"",u),map:a,number:l.number,presentationTime:m};return x})},gS=function(r,i){var n=r.baseUrl,e=r.initialization,t=e===void 0?{}:e,a=Ka({baseUrl:n,source:t.sourceURL,range:t.range}),o=Ka({baseUrl:n,source:i.media,range:i.mediaRange});return o.map=a,o},yS=function(r,i){var n=r.duration,e=r.segmentUrls,t=e===void 0?[]:e,a=r.periodStart;if(!n&&!i||n&&i)throw new Error(aa.SEGMENT_TIME_UNSPECIFIED);var o=t.map(function(d){return gS(r,d)}),l;n&&(l=hf(r)),i&&(l=f0(r,i));var u=l.map(function(d,f){if(o[f]){var m=o[f],x=r.timescale||1,C=r.presentationTimeOffset||0;return m.timeline=d.timeline,m.duration=d.duration,m.number=d.number,m.presentationTime=a+(d.time-C)/x,m}}).filter(function(d){return d});return u},_S=function(r){var i=r.attributes,n=r.segmentInfo,e,t;n.template?(t=vS,e=Tr(i,n.template)):n.base?(t=c0,e=Tr(i,n.base)):n.list&&(t=yS,e=Tr(i,n.list));var a={attributes:i};if(!t)return a;var o=t(e,n.segmentTimeline);if(e.duration){var l=e,u=l.duration,d=l.timescale,f=d===void 0?1:d;e.duration=u/f}else o.length?e.duration=o.reduce(function(m,x){return Math.max(m,Math.ceil(x.duration))},0):e.duration=0;return a.attributes=e,a.segments=o,n.base&&e.indexRange&&(a.sidx=o[0],a.segments=[]),a},bS=function(r){return r.map(_S)},Rt=function(r,i){return l0(r.childNodes).filter(function(n){var e=n.tagName;return e===i})},vf=function(r){return r.textContent.trim()},TS=function(r){return parseFloat(r.split("/").reduce(function(i,n){return i/n}))},$n=function(r){var i=31536e3,n=720*60*60,e=1440*60,t=3600,a=60,o=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/,l=o.exec(r);if(!l)return 0;var u=l.slice(1),d=u[0],f=u[1],m=u[2],x=u[3],C=u[4],L=u[5];return parseFloat(d||0)*i+parseFloat(f||0)*n+parseFloat(m||0)*e+parseFloat(x||0)*t+parseFloat(C||0)*a+parseFloat(L||0)},SS=function(r){var i=/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/;return i.test(r)&&(r+="Z"),Date.parse(r)},Xh={mediaPresentationDuration:function(r){return $n(r)},availabilityStartTime:function(r){return SS(r)/1e3},minimumUpdatePeriod:function(r){return $n(r)},suggestedPresentationDelay:function(r){return $n(r)},type:function(r){return r},timeShiftBufferDepth:function(r){return $n(r)},start:function(r){return $n(r)},width:function(r){return parseInt(r,10)},height:function(r){return parseInt(r,10)},bandwidth:function(r){return parseInt(r,10)},frameRate:function(r){return TS(r)},startNumber:function(r){return parseInt(r,10)},timescale:function(r){return parseInt(r,10)},presentationTimeOffset:function(r){return parseInt(r,10)},duration:function(r){var i=parseInt(r,10);return isNaN(i)?$n(r):i},d:function(r){return parseInt(r,10)},t:function(r){return parseInt(r,10)},r:function(r){return parseInt(r,10)},DEFAULT:function(r){return r}},cr=function(r){return r&&r.attributes?l0(r.attributes).reduce(function(i,n){var e=Xh[n.name]||Xh.DEFAULT;return i[n.name]=e(n.value),i},{}):{}},xS={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"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:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},Eo=function(r,i){return i.length?So(r.map(function(n){return i.map(function(e){return bo(n,vf(e))})})):r},gf=function(r){var i=Rt(r,"SegmentTemplate")[0],n=Rt(r,"SegmentList")[0],e=n&&Rt(n,"SegmentURL").map(function(m){return Tr({tag:"SegmentURL"},cr(m))}),t=Rt(r,"SegmentBase")[0],a=n||i,o=a&&Rt(a,"SegmentTimeline")[0],l=n||t||i,u=l&&Rt(l,"Initialization")[0],d=i&&cr(i);d&&u?d.initialization=u&&cr(u):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});var f={template:d,segmentTimeline:o&&Rt(o,"S").map(function(m){return cr(m)}),list:n&&Tr(cr(n),{segmentUrls:e,initialization:cr(u)}),base:t&&Tr(cr(t),{initialization:cr(u)})};return Object.keys(f).forEach(function(m){f[m]||delete f[m]}),f},ES=function(r,i,n){return function(e){var t=Rt(e,"BaseURL"),a=Eo(i,t),o=Tr(r,cr(e)),l=gf(e);return a.map(function(u){return{segmentInfo:Tr(n,l),attributes:Tr(o,{baseUrl:u})}})}},CS=function(r){return r.reduce(function(i,n){var e=cr(n);
16e.schemeIdUri&&(e.schemeIdUri=e.schemeIdUri.toLowerCase());var t=xS[e.schemeIdUri];if(t){i[t]={attributes:e};var a=Rt(n,"cenc:pssh")[0];if(a){var o=vf(a);i[t].pssh=o&&t0(o)}}return i},{})},wS=function(r){if(r.schemeIdUri==="urn:scte:dash:cc:cea-608:2015"){var i=typeof r.value!="string"?[]:r.value.split(";");return i.map(function(e){var t,a;if(a=e,/^CC\d=/.test(e)){var o=e.split("=");t=o[0],a=o[1]}else/^CC\d$/.test(e)&&(t=e);return{channel:t,language:a}})}else if(r.schemeIdUri==="urn:scte:dash:cc:cea-708:2015"){var n=typeof r.value!="string"?[]:r.value.split(";");return n.map(function(e){var t={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(e)){var a=e.split("="),o=a[0],l=a[1],u=l===void 0?"":l;t.channel=o,t.language=e,u.split(",").forEach(function(d){var f=d.split(":"),m=f[0],x=f[1];m==="lang"?t.language=x:m==="er"?t.easyReader=Number(x):m==="war"?t.aspectRatio=Number(x):m==="3D"&&(t["3D"]=Number(x))})}else t.language=e;return t.channel&&(t.channel="SERVICE"+t.channel),t})}},AS=function(r,i,n){return function(e){var t=cr(e),a=Eo(i,Rt(e,"BaseURL")),o=Rt(e,"Role")[0],l={role:cr(o)},u=Tr(r,t,l),d=Rt(e,"Accessibility")[0],f=wS(cr(d));f&&(u=Tr(u,{captionServices:f}));var m=Rt(e,"Label")[0];if(m&&m.childNodes.length){var x=m.childNodes[0].nodeValue.trim();u=Tr(u,{label:x})}var C=CS(Rt(e,"ContentProtection"));Object.keys(C).length&&(u=Tr(u,{contentProtection:C}));var L=gf(e),E=Rt(e,"Representation"),B=Tr(n,L);return So(E.map(ES(u,a,B)))}},kS=function(r,i){return function(n,e){var t=Eo(i,Rt(n.node,"BaseURL")),a=Tr(r,{periodStart:n.attributes.start});typeof n.attributes.duration=="number"&&(a.periodDuration=n.attributes.duration);var o=Rt(n.node,"AdaptationSet"),l=gf(n.node);return So(o.map(AS(a,t,l)))}},DS=function(r){var i=r.attributes,n=r.priorPeriodAttributes,e=r.mpdType;return typeof i.start=="number"?i.start:n&&typeof n.start=="number"&&typeof n.duration=="number"?n.start+n.duration:!n&&e==="static"?0:null},PS=function(r,i){i===void 0&&(i={});var n=i,e=n.manifestUri,t=e===void 0?"":e,a=n.NOW,o=a===void 0?Date.now():a,l=n.clientOffset,u=l===void 0?0:l,d=Rt(r,"Period");if(!d.length)throw new Error(aa.INVALID_NUMBER_OF_PERIOD);var f=Rt(r,"Location"),m=cr(r),x=Eo([t],Rt(r,"BaseURL"));m.type=m.type||"static",m.sourceDuration=m.mediaPresentationDuration||0,m.NOW=o,m.clientOffset=u,f.length&&(m.locations=f.map(vf));var C=[];return d.forEach(function(L,E){var B=cr(L),q=C[E-1];B.start=DS({attributes:B,priorPeriodAttributes:q?q.attributes:null,mpdType:m.type}),C.push({node:L,attributes:B})}),{locations:m.locations,representationInfo:So(C.map(kS(m,x)))}},h0=function(r){if(r==="")throw new Error(aa.DASH_EMPTY_MANIFEST);var i=new HT.DOMParser,n,e;try{n=i.parseFromString(r,"application/xml"),e=n&&n.documentElement.tagName==="MPD"?n.documentElement:null}catch{}if(!e||e&&e.getElementsByTagName("parsererror").length>0)throw new Error(aa.DASH_INVALID_XML);return e},IS=function(r){var i=Rt(r,"UTCTiming")[0];if(!i)return null;var n=cr(i);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;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":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(aa.UNSUPPORTED_UTC_TIMING_SCHEME)}return n},LS=function(r,i){i===void 0&&(i={});var n=PS(h0(r),i),e=bS(n.representationInfo);return dS({dashPlaylists:e,locations:n.locations,sidxMapping:i.sidxMapping,previousManifest:i.previousManifest})},MS=function(r){return IS(h0(r))},ku,Yh;function OS(){if(Yh)return ku;Yh=1;var s=Math.pow(2,32),r=function(i){var n=new DataView(i.buffer,i.byteOffset,i.byteLength),e;return n.getBigUint64?(e=n.getBigUint64(0),e<Number.MAX_SAFE_INTEGER?Number(e):e):n.getUint32(0)*s+n.getUint32(4)};return ku={getUint64:r,MAX_UINT32:s},ku}var Du,Qh;function RS(){if(Qh)return Du;Qh=1;var s=OS().getUint64,r=function(i){var n=new DataView(i.buffer,i.byteOffset,i.byteLength),e={ver
vendor: 4,819 bytes, line 16
16sion:i[0],flags:new Uint8Array(i.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8)},t=12;e.version===0?(e.earliestPresentationTime=n.getUint32(t),e.firstOffset=n.getUint32(t+4),t+=8):(e.earliestPresentationTime=s(i.subarray(t)),e.firstOffset=s(i.subarray(t+8)),t+=16),t+=2;var a=n.getUint16(t);for(t+=2;a>0;t+=12,a--)e.references.push({referenceType:(i[t]&128)>>>7,referencedSize:n.getUint32(t)&2147483647,subsegmentDuration:n.getUint32(t+4),startsWithSap:!!(i[t+8]&128),sapType:(i[t+8]&112)>>>4,sapDeltaTime:n.getUint32(t+8)&268435455});return e};return Du=r,Du}var FS=RS();const NS=Gi(FS);var BS=Ne([73,68,51]),US=function(r,i){i===void 0&&(i=0),r=Ne(r);var n=r[i+5],e=r[i+6]<<21|r[i+7]<<14|r[i+8]<<7|r[i+9],t=(n&16)>>4;return t?e+20:e+10},Fa=function s(r,i){return i===void 0&&(i=0),r=Ne(r),r.length-i<10||!wt(r,BS,{offset:i})?i:(i+=US(r,i),s(r,i))},Jh=function(r){return typeof r=="string"?s0(r):r},qS=function(r){return Array.isArray(r)?r.map(function(i){return Jh(i)}):[Jh(r)]},VS=function s(r,i,n){n===void 0&&(n=!1),i=qS(i),r=Ne(r);var e=[];if(!i.length)return e;for(var t=0;t<r.length;){var a=(r[t]<<24|r[t+1]<<16|r[t+2]<<8|r[t+3])>>>0,o=r.subarray(t+4,t+8);if(a===0)break;var l=t+a;if(l>r.length){if(n)break;l=r.length}var u=r.subarray(t+8,l);wt(o,i[0])&&(i.length===1?e.push(u):e.push.apply(e,s(u,i.slice(1),n))),t=l}return e},Ms={EBML:Ne([26,69,223,163]),DocType:Ne([66,130]),Segment:Ne([24,83,128,103]),SegmentInfo:Ne([21,73,169,102]),Tracks:Ne([22,84,174,107]),Track:Ne([174]),TrackNumber:Ne([215]),DefaultDuration:Ne([35,227,131]),TrackEntry:Ne([174]),TrackType:Ne([131]),FlagDefault:Ne([136]),CodecID:Ne([134]),CodecPrivate:Ne([99,162]),VideoTrack:Ne([224]),AudioTrack:Ne([225]),Cluster:Ne([31,67,182,117]),Timestamp:Ne([231]),TimestampScale:Ne([42,215,177]),BlockGroup:Ne([160]),BlockDuration:Ne([155]),Block:Ne([161]),SimpleBlock:Ne([163])},Rd=[128,64,32,16,8,4,2,1],HS=function(r){for(var i=1,n=0;n<Rd.length&&!(r&Rd[n]);n++)i++;return i},Qs=function(r,i,n,e){n===void 0&&(n=!0),e===void 0&&(e=!1);var t=HS(r[i]),a=r.subarray(i,i+t);return n&&(a=Array.prototype.slice.call(r,i,i+t),a[0]^=Rd[t-1]),{length:t,value:OT(a,{signed:e}),bytes:a}},Zh=function s(r){return typeof r=="string"?r.match(/.{1,2}/g).map(function(i){return s(i)}):typeof r=="number"?RT(r):r},jS=function(r){return Array.isArray(r)?r.map(function(i){return Zh(i)}):[Zh(r)]},GS=function s(r,i,n){if(n>=i.length)return i.length;var e=Qs(i,n,!1);if(wt(r.bytes,e.bytes))return n;var t=Qs(i,n+e.length);return s(r,i,n+t.length+t.value+e.length)},ep=function s(r,i){i=jS(i),r=Ne(r);var n=[];if(!i.length)return n;for(var e=0;e<r.length;){var t=Qs(r,e,!1),a=Qs(r,e+t.length),o=e+t.length+a.length;a.value===127&&(a.value=GS(t,r,o),a.value!==r.length&&(a.value-=o));var l=o+a.value>r.length?r.length:o+a.value,u=r.subarray(o,l);wt(i[0],t.bytes)&&(i.length===1?n.push(u):n=n.concat(s(u,i.slice(1))));var d=t.length+a.length+u.length;e+=d}return n},WS=Ne([0,0,0,1]),zS=Ne([0,0,1]),$S=Ne([0,0,3]),KS=function(r){for(var i=[],n=1;n<r.length-2;)wt(r.subarray(n,n+3),$S)&&(i.push(n+2),n++),n++;if(i.length===0)return r;var e=r.length-i.length,t=new Uint8Array(e),a=0;for(n=0;n<e;a++,n++)a===i[0]&&(a++,i.shift()),t[n]=r[a];return t},p0=function(r,i,n,e){r=Ne(r),n=[].concat(n);for(var t=0,a,o=0;t<r.length&&(o<e||a);){var l=void 0;if(wt(r.subarray(t),WS)?l=4:wt(r.subarray(t),zS)&&(l=3),!l){t++;continue}if(o++,a)return KS(r.subarray(a,t));var u=void 0;i==="h264"?u=r[t+l]&31:i==="h265"&&(u=r[t+l]>>1&63),n.indexOf(u)!==-1&&(a=t+l),t+=l+(i==="h264"?1:2)}return r.subarray(0,0)},XS=function(r,i,n){return p0(r,"h264",i,n)},YS=function(r,i,n){return p0(r,"h265",i,n)},yr={webm:Ne([119,101,98,109]),matroska:Ne([109,97,116,114,111,115,107,97]),flac:Ne([102,76,97,67]),ogg:Ne([79,103,103,83]),ac3:Ne([11,119]),riff:Ne([82,73,70,70]),avi:Ne([65,86,73]),wav:Ne([87,65,86,69]),"3gp":Ne([102,116,121,112,51,103]),mp4:Ne([102,116,121,112]),fmp4:Ne([115,116,121,112]),mov:Ne([102,116,121,112,113,116]),moov:Ne([109,111,111,118]),moof:Ne([109,111,111,102])},sa={aac:function(r){var i=Fa(r);return wt(r,[255,16],{offset:i,mask:[255,22]})},mp3:function(r){var i=Fa(r);return wt(r,[255,2],{offset:i,mask:[255,6]})},webm:function(r){var i=ep(r,[Ms.EBML,Ms.DocType])[0];return wt(i,yr.webm)},mkv:function(r){var i=ep(r,[Ms.EBML,Ms.DocType])[0];return wt(i,yr.matroska)},mp4:function(r){if(sa["3gp"](r)||sa.mov(r))return!1;if(wt(r,yr.mp4,{offset:4})||wt(r,yr.fmp4,{offset:4})||wt(r,yr.moof,{offset:4})||wt(r,yr.moov,{offset:4}))return!0},mov:function(r){return wt(r,yr.mov,{offset:4})},"3gp":function(r){return wt(r,yr["3gp"],{offset:4})},ac3:function(r){var i=Fa(r);return wt(r,yr.ac3,{offset:i})},ts:function(r){if(r.length<189&&r.length>=1)return r[0]===71;for(var i=0;i+188<r.length&&i<188;){if(r[i]===71&&r[i+188]===71)return!0;
16i+=1}return!1},flac:function(r){var i=Fa(r);return wt(r,yr.flac,{offset:i})},ogg:function(r){return wt(r,yr.ogg)},avi:function(r){return wt(r,yr.riff)&&wt(r,yr.avi,{offset:8})},wav:function(r){return wt(r,yr.riff)&&wt(r,yr.wav,{offset:8})},h264:function(r){return XS(r,7,3).length},h265:function(r){return YS(r,[32,33],3).length}},Fd=Object.keys(sa).filter(function(s){return s!=="ts"&&s!=="h264"&&s!=="h265"}).concat(["ts","h264","h265"]);Fd.forEach(function(s){var r=sa[s];sa[s]=function(i){return r(Ne(i))}});var QS=sa,yf=function(r){r=Ne(r);for(var i=0;i<Fd.length;i++){var n=Fd[i];if(QS[n](r))return n}return""},JS=function(r){return VS(r,["moof"]).length>0},Pu,tp;function ZS(){if(tp)return Pu;tp=1;var s=9e4,r,i,n,e,t,a,o;return r=function(l){return l*s},i=function(l,u){return l*u},n=function(l){return l/s},e=function(l,u){return l/u},t=function(l,u){return r(e(l,u))},a=function(l,u){return i(n(l),u)},o=function(l,u,d){return n(d?l:l-u)},Pu={ONE_SECOND_IN_TS:s,secondsToVideoTs:r,secondsToAudioTs:i,videoTsToSeconds:n,audioTsToSeconds:e,audioTsToVideoTs:t,videoTsToAudioTs:a,metadataTsToSeconds:o},Pu}var Js=ZS();function Nd(s){return Nd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Nd(s)}function ex(s){try{return Function.toString.call(s).indexOf("[native code]")!==-1}catch{return typeof s=="function"}}function Bd(s){var r=typeof Map=="function"?new Map:void 0;return Bd=function(n){if(n===null||!ex(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(r!==void 0){if(r.has(n))return r.get(n);r.set(n,e)}function e(){return e0(n,arguments,Nd(this).constructor)}return e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),na(e,n)},Bd(s)}var m0="7.21.7",Ri={},cn=function(r,i){return Ri[r]=Ri[r]||[],i&&(Ri[r]=Ri[r].concat(i)),Ri[r]},tx=function(r,i){cn(r,i)},v0=function(r,i){var n=cn(r).indexOf(i);return n<=-1?!1:(Ri[r]=Ri[r].slice(),Ri[r].splice(n,1),!0)},rx=function(r,i){cn(r,[].concat(i).map(function(n){var e=function t(){return v0(r,t),n.apply(void 0,arguments)};return e}))},Zs={prefixed:!0},Gs=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],rp=Gs[0],Na;for(var Os=0;Os<Gs.length;Os++)if(Gs[Os][1]in xe){Na=Gs[Os];break}if(Na){for(var Rs=0;Rs<Na.length;Rs++)Zs[rp[Rs]]=Na[Rs];Zs.prefixed=Na[0]!==rp[0]}var Dr=[],ix=function(r,i){return function(n,e,t){var a=i.levels[e],o=new RegExp("^("+a+")$");if(n!=="log"&&t.unshift(n.toUpperCase()+":"),t.unshift(r+":"),Dr){Dr.push([].concat(t));var l=Dr.length-1e3;Dr.splice(0,l>0?l:0)}if(K.console){var u=K.console[n];!u&&n==="debug"&&(u=K.console.info||K.console.log),!(!u||!a||!o.test(n))&&u[Array.isArray(t)?"apply":"call"](K.console,t)}}};function g0(s){var r="info",i,n=function(){for(var t=arguments.length,a=new Array(t),o=0;o<t;o++)a[o]=arguments[o];i("log",r,a)};return i=ix(s,n),n.createLogger=function(e){return g0(s+": "+e)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:r},n.level=function(e){if(typeof e=="string"){if(!n.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');r=e}return r},n.history=function(){return Dr?[].concat(Dr):[]},n.history.filter=function(e){return(Dr||[]).filter(function(t){return new RegExp(".*"+e+".*").test(t[0])})},n.history.clear=function(){Dr&&(Dr.length=0)},n.history.disable=function(){Dr!==null&&(Dr.length=0,Dr=null)},n.history.enable=function(){Dr===null&&(Dr=[])},n.error=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return i("error",r,t)},n.warn=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return i("warn",r,t)},n.debug=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return i("debug",r,t)},n}
16var Ye=g0("VIDEOJS"),y0=Ye.createLogger,nx=Object.prototype.toString,_0=function(r){return Hi(r)?Object.keys(r):[]};function ta(s,r){_0(s).forEach(function(i){return r(s[i],i)})}function ax(s,r,i){return i===void 0&&(i=0),_0(s).reduce(function(n,e){return r(n,s[e],e)},i)}function Pt(s){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return Object.assign?ai.apply(void 0,[s].concat(i)):(i.forEach(function(e){e&&ta(e,function(t,a){s[a]=t})}),s)}function Hi(s){return!!s&&typeof s=="object"}function Xa(s){return Hi(s)&&nx.call(s)==="[object Object]"&&s.constructor===Object}function Ya(s,r){if(!s||!r)return"";if(typeof K.getComputedStyle=="function"){var i;try{i=K.getComputedStyle(s)}catch{return""}return i?i.getPropertyValue(r)||i[r]:""}return""}var Jt=K.navigator&&K.navigator.userAgent||"",ip=/AppleWebKit\/([\d.]+)/i.exec(Jt),sx=ip?parseFloat(ip.pop()):null,b0=/iPod/i.test(Jt),ox=(function(){var s=Jt.match(/OS (\d+)_/i);return s&&s[1]?s[1]:null})(),Wi=/Android/i.test(Jt),_f=(function(){var s=Jt.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!s)return null;var r=s[1]&&parseFloat(s[1]),i=s[2]&&parseFloat(s[2]);return r&&i?parseFloat(s[1]+"."+s[2]):r||null})(),T0=Wi&&_f<5&&sx<537,S0=/Firefox/i.test(Jt),ts=/Edg/i.test(Jt),zi=!ts&&(/Chrome/i.test(Jt)||/CriOS/i.test(Jt)),x0=(function(){var s=Jt.match(/(Chrome|CriOS)\/(\d+)/);return s&&s[2]?parseFloat(s[2]):null})(),rs=(function(){var s=/MSIE\s(\d+)\.\d/.exec(Jt),r=s&&parseFloat(s[1]);return!r&&/Trident\/7.0/i.test(Jt)&&/rv:11.0/.test(Jt)&&(r=11),r})(),bf=/Safari/i.test(Jt)&&!zi&&!Wi&&!ts,E0=/Windows/i.test(Jt),oa=!!(ha()&&("ontouchstart"in K||K.navigator.maxTouchPoints||K.DocumentTouch&&K.document instanceof K.DocumentTouch)),Tf=/iPad/i.test(Jt)||bf&&oa&&!/iPhone/i.test(Jt),Sf=/iPhone/i.test(Jt)&&!Tf,Er=Sf||Tf||b0,Co=(bf||Er)&&!zi,ux=Object.freeze({__proto__:null,IS_IPOD:b0,IOS_VERSION:ox,IS_ANDROID:Wi,ANDROID_VERSION:_f,IS_NATIVE_ANDROID:T0,IS_FIREFOX:S0,IS_EDGE:ts,IS_CHROME:zi,CHROME_VERSION:x0,IE_VERSION:rs,IS_SAFARI:bf,IS_WINDOWS:E0,TOUCH_ENABLED:oa,IS_IPAD:Tf,IS_IPHONE:Sf,IS_IOS:Er,IS_ANY_SAFARI:Co});function np(s){return typeof s=="string"&&!!s.trim()}function C0(s){if(s.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function lx(s){return new RegExp("(^|\\s)"+s+"($|\\s)")}function ha(){return xe===K.document}function pa(s){return Hi(s)&&s.nodeType===1}function w0(){try{return K.parent!==K.self}catch{return!0}}function A0(s){return function(r,i){if(!np(r))return xe[s](null);np(i)&&(i=xe.querySelector(i));var n=pa(i)?i:xe;return n[s]&&n[s](r)}}function st(s,r,i,n){s===void 0&&(s="div"),r===void 0&&(r={}),i===void 0&&(i={});var e=xe.createElement(s);return Object.getOwnPropertyNames(r).forEach(function(t){var a=r[t];t.indexOf("aria-")!==-1||t==="role"||t==="type"?(Ye.warn(`Setting attributes in the second argument of createEl()
17has been deprecated. Use the third argument instead.
18`+("createEl(type, properties, attributes). Attempting to set "+t+" to "+a+".")),e.setAttribute(t,a)):t==="textContent"?On(e,a):(e[t]!==a||t==="tabIndex")&&(e[t]=a)}),Object.getOwnPropertyNames(i).forEach(function(t){e.setAttribute(t,i[t])}),n&&Ef(e,n),e}function On(s,r){return typeof s.textContent>"u"?s.innerText=r:s.textContent=r,s}function Ud(s,r){r.firstChild?r.insertBefore(s,r.firstChild):r.appendChild(s)}function Pn(s,r){return C0(r),s.classList?s.classList.contains(r):lx(r).test(s.className)}function Bi(s,r){return s.classList?s.classList.add(r):Pn(s,r)||(s.className=(s.className+" "+r).trim()),s}function is(s,r){return s?(s.classList?s.classList.remove(r):(C0(r),s.className=s.className.split(/\s+/).filter(function(i){return i!==r}).join(" ")),s):(Ye.warn("removeClass was called with an element that doesn't exist"),null)}function k0(s,r,i){var n=Pn(s,r);if(typeof i=="function"&&(i=i(s,r)),typeof i!="boolean"&&(i=!n),i!==n)return i?Bi(s,r):is(s,r),s}function D0(s,r){Object.getOwnPropertyNames(r).forEach(function(i){var n=r[i];n===null||typeof n>"u"||n===!1?s.removeAttribute(i):s.setAttribute(i,n===!0?"":n)})}function Oi(s){var r={},i=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(s&&s.attributes&&s.attributes.length>0)for(var n=s.attributes,e=n.length-1;e>=0;e--){var t=n[e].name,a=n[e].value;(typeof s[t]=="boolean"||i.indexOf(","+t+",")!==-1)&&(a=a!==null),r[t]=a}return r}function P0(s,r){return s.getAttribute(r)}function ua(s,r,i){s.setAttribute(r,i)}function wo(s,r){s.removeAttribute(r)}function I0(){xe.body.focus(),xe.onselectstart=function(){return!1}}function L0(){xe.onselectstart=function(){return!0}}function la(s){if(s&&s.getBoundingClientRect&&s.parentNode){var r=s.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(function(n){r[n]!==void 0&&(i[n]=r[n])}),i.height||(i.height=parseFloat(Ya(s,"height"))),i.width||(i.width=parseFloat(Ya(s,"width"))),i}}function Qa(s){if(!s||s&&!s.offsetParent)return{left:0,top:0,width:0,height:0};for(var r=s.offsetWidth,i=s.offsetHeight,n=0,e=0;s.offsetParent&&s!==xe[Zs.fullscreenElement];)n+=s.offsetLeft,e+=s.offsetTop,s=s.offsetParent;return{left:n,top:e,width:r,height:i}}function Ao(s,r){var i={x:0,y:0};if(Er)for(var n=s;n&&n.nodeName.toLowerCase()!=="html";){var e=Ya(n,"transform");
18if(/^matrix/.test(e)){var t=e.slice(7,-1).split(/,\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){var a=e.slice(9,-1).split(/,\s/).map(Number);i.x+=a[12],i.y+=a[13]}n=n.parentNode}var o={},l=Qa(r.target),u=Qa(s),d=u.width,f=u.height,m=r.offsetY-(u.top-l.top),x=r.offsetX-(u.left-l.left);return r.changedTouches&&(x=r.changedTouches[0].pageX-u.left,m=r.changedTouches[0].pageY+u.top,Er&&(x-=i.x,m-=i.y)),o.y=1-Math.max(0,Math.min(1,m/f)),o.x=Math.max(0,Math.min(1,x/d)),o}function M0(s){return Hi(s)&&s.nodeType===3}function xf(s){for(;s.firstChild;)s.removeChild(s.firstChild);return s}function O0(s){return typeof s=="function"&&(s=s()),(Array.isArray(s)?s:[s]).map(function(r){if(typeof r=="function"&&(r=r()),pa(r)||M0(r))return r;if(typeof r=="string"&&/\S/.test(r))return xe.createTextNode(r)}).filter(function(r){return r})}function Ef(s,r){return O0(r).forEach(function(i){return s.appendChild(i)}),s}function R0(s,r){return Ef(xf(s),r)}function Ja(s){return s.button===void 0&&s.buttons===void 0||s.button===0&&s.buttons===void 0||s.type==="mouseup"&&s.button===0&&s.buttons===0?!0:!(s.button!==0||s.buttons!==1)}var dn=A0("querySelector"),F0=A0("querySelectorAll"),N0=Object.freeze({__proto__:null,isReal:ha,isEl:pa,isInFrame:w0,createEl:st,textContent:On,prependTo:Ud,hasClass:Pn,addClass:Bi,removeClass:is,toggleClass:k0,setAttributes:D0,getAttributes:Oi,getAttribute:P0,setAttribute:ua,removeAttribute:wo,blockTextSelection:I0,unblockTextSelection:L0,getBoundingClientRect:la,findPosition:Qa,getPointerPosition:Ao,isTextNode:M0,emptyEl:xf,normalizeContent:O0,appendContent:Ef,insertContent:R0,isSingleLeftClick:Ja,$:dn,$$:F0}),B0=!1,qd,cx=function(){if(qd.options.autoSetup!==!1){var r=Array.prototype.slice.call(xe.getElementsByTagName("video")),i=Array.prototype.slice.call(xe.getElementsByTagName("audio")),n=Array.prototype.slice.call(xe.getElementsByTagName("video-js")),e=r.concat(i,n);if(e&&e.length>0)for(var t=0,a=e.length;t<a;t++){var o=e[t];if(o&&o.getAttribute){if(o.player===void 0){var l=o.getAttribute("data-setup");l!==null&&qd(o)}}else{Vd(1);break}}else B0||Vd(1)}};function Vd(s,r){ha()&&(r&&(qd=r),K.setTimeout(cx,s))}function Hd(){B0=!0,K.removeEventListener("load",Hd)}ha()&&(xe.readyState==="complete"?Hd():K.addEventListener("load",Hd));var U0=function(r){var i=xe.createElement("style");return i.className=r,i},q0=function(r,i){r.styleSheet?r.styleSheet.cssText=i:r.textContent=i},dx=3,fx=dx;function $i(){return fx++}var V0;K.WeakMap||(V0=(function(){function s(){this.vdata="vdata"+Math.floor(K.performance&&K.performance.now()||Date.now()),this.data={}}var r=s.prototype;return r.set=function(n,e){var t=n[this.vdata]||$i();return n[this.vdata]||(n[this.vdata]=t),this.data[t]=e,this},r.get=function(n){var e=n[this.vdata];if(e)return this.data[e];Ye("We have no data for this element",n)},r.has=function(n){var e=n[this.vdata];return e in this.data},r.delete=function(n){var e=n[this.vdata];e&&(delete this.data[e],delete n[this.vdata])},s})());var Sr=K.WeakMap?new WeakMap:new V0;function ap(s,r){if(Sr.has(s)){var i=Sr.get(s);i.handlers[r].length===0&&(delete i.handlers[r],s.removeEventListener?s.removeEventListener(r,i.dispatcher,!1):s.detachEvent&&s.detachEvent("on"+r,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),Object.getOwnPropertyNames(i).length===0&&Sr.delete(s)}}function Cf(s,r,i,n){i.forEach(function(e){s(r,e,n)})}function ko(s){if(s.fixed_)return s;function r(){return!0}function i(){return!1}if(!s||!s.isPropagationStopped||!s.isImmediatePropagationStopped){var n=s||K.event;s={};for(var e in n)e!=="layerX"&&e!=="layerY"&&e!=="keyLocation"&&e!=="webkitMovementX"&&e!=="webkitMovementY"&&e!=="path"&&(e==="returnValue"&&n.preventDefault||(s[e]=n[e]));if(s.target||(s.target=s.srcElement||xe),s.relatedTarget||(s.relatedTarget=s.fromElement===s.target?s.toElement:s.fromElement),s.preventDefault=function(){n.preventDefault&&n.preventDefault(),s.returnValue=!1,n.returnValue=!1,s.defaultPrevented=!0},s.defaultPrevented=!1,s.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),s.cancelBubble=!0,n.cancelBubble=!0,s.isPropagationStopped=r},s.isPropagationStopped=i,s.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),s.isImmediatePropagationStopped=r,s.stopPropagation()},s.isImmediatePropagationStopped=i,s.clientX!==null&&s.clientX!==void 0){var t=xe.documentElement,a=xe.body;s.pageX=s.clientX+(t&&t.scrollLeft||a&&a.scrollLeft||0)-(t&&t.clientLeft||a&&a.clientLeft||0),s.pageY=s.clientY+(t&&t.scrollTop||a&&a.scrollTop||0)-(t&&t.clientTop||a&&a.clientTop||0)}s.which=s.charCode||s.keyCode,s.button!==null&&s.button!==void 0&&(s.button=s.button&1?0:s.button&4?1:s.button&2?2:0)}return s.fixed_=!0,s}var Fs,hx=function(){if(typeof Fs!="boolean"){Fs=!1;try{var r=Object.defineProperty({},"passive",{get:function(){Fs=!0}});K.addEventListener("test",null,r),K.removeEventListener("test",null,r)}catch{}}return Fs},px=["touchstart","touchmove"];function Br(s,r,i){if(Array.isArray(r))return Cf(Br,s,r,i);Sr.has(s)||Sr.set(s,{});var n=Sr.get(s);if(n.handlers||(n.handlers={}),n.handlers[r]||(n.handlers[r]=[]),i.guid||(i.guid=$i()),n.handlers[r].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(t,a){if(!n.disabled){t=ko(t);var o=n.handlers[t.type];if(o)for(var l=o.slice(0),u=0,d=l.length;u<d&&!t.isImmediatePropagationStopped();u++)try{l[u].call(s,t,a)}catch(f){Ye.error(f)}}}),n.handlers[r].length===1)if(s.addEventListener){var e=!1;hx()&&px.indexOf(r)>-1&&(e={passive:!0}),s.addEventListener(r,n.dispatcher,e)}else s.attachEvent&&s.attachEvent("on"+r,n.dispatcher)}function dr(s,r,i){if(Sr.has(s)){var n=Sr.get(s);if(n.handlers){if(Array.isArray(r))return Cf(dr,s,r,i);var e=function(u,d){n.handlers[d]=[],ap(u,d)};if(r===void 0){for(var t in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},t)&&e(s,t);return}var a=n.handlers[r];if(a){if(!i){e(s,r);return}if(i.guid)for(var o=0;o<a.length;o++)a[o].guid===i.guid&&a.splice(o--,1);ap(s,r)}}}}function ma(s,r,i){var n=Sr.has(s)?Sr.get(s):{},e=s.parentNode||s.ownerDocument;if(typeof r=="string"?r={type:r,target:s}:r.target||(r.target=s),r=ko(r),n.dispatcher&&n.dispatcher.call(s,r,i),e&&!r.isPropagationStopped()&&r.bubbles===!0)ma.call(null,e,r,i);else if(!e&&!r.defaultPrevented&&r.target&&r.target[r.type]){Sr.has(r.target)||Sr.set(r.target,{});var t=Sr.get(r.target);r.target[r.type]&&(t.disabled=!0,typeof r.target[r.type]=="function"&&r.target[r.type](),t.disabled=!1)}return!r.defaultPrevented}function Do(s,r,i){if(Array.isArray(r))return Cf(Do,s,r,i);var n=function e(){dr(s,r,e),i.apply(this,arguments)};n.guid=i.guid=i.guid||$i(),Br(s,r,n)}function H0(s,r,i){var n=function e(){dr(s,r,e),i.apply(this,arguments)};n.guid=i.guid=i.guid||$i(),Br(s,r,n)}var mx=Object.freeze({__proto__:null,fixEvent:ko,on:Br,off:dr,trigger:ma,one:Do,any:H0}),si=30,xt=function(r,i,n){i.guid||(i.guid=$i());var e=i.bind(r);return e.guid=n?n+"_"+i.guid:i.guid,e},ji=function(r,i){var n=K.performance.now(),e=function(){var a=K.performance.now();a-n>=i&&(r.apply(void 0,arguments),n=a)};return e},vx=function(r,i,n,e){e===void 0&&(e=K);var t,a=function(){e.clearTimeout(t),t=null},o=function(){var u=this,d=arguments,f=function(){t=null,f=null,r.apply(u,d)};e.clearTimeout(t),t=e.setTimeout(f,i)};return o.cancel=a,o},Zt=function(){};Zt.prototype.allowedEvents_={};Zt.prototype.on=function(s,r){var i=this.addEventListener;this.addEventListener=function(){},Br(this,s,r),this.addEventListener=i};Zt.prototype.addEventListener=Zt.prototype.on;Zt.prototype.off=function(s,r){dr(this,s,r)};Zt.prototype.removeEventListener=Zt.prototype.off;Zt.prototype.one=function(s,r){var i=this.addEventListener;this.addEventListener=function(){},Do(this,s,r),this.addEventListener=i};Zt.prototype.any=function(s,r){var i=this.addEventListener;this.addEventListener=function(){},H0(this,s,r),this.addEventListener=i};Zt.prototype.trigger=function(s){var r=s.type||s;typeof s=="string"&&(s={type:r}),s=ko(s),this.allowedEvents_[r]&&this["on"+r]&&this["on"+r](s),ma(this,s)};Zt.prototype.dispatchEvent=Zt.prototype.trigger;var Ia;Zt.prototype.queueTrigger=function(s){var r=this;Ia||(Ia=new Map);var i=s.type||s,n=Ia.get(this);n||(n=new Map,Ia.set(this,n));var e=n.get(i);n.delete(i),K.clearTimeout(e);var t=K.setTimeout(function(){n.delete(i),n.size===0&&(n=null,Ia.delete(r)),r.trigger(s)},0);n.set(i,t)};var Po=function(r){return typeof r.name=="function"?r.name():typeof r.name=="string"?r.name:r.name_?r.name_:r.constructor&&r.constructor.name?r.constructor.name:typeof r},Ui=function(r){return r instanceof Zt||!!r.eventBusEl_&&["on","one","off","trigger"].every(function(i){return typeof r[i]=="function"})},gx=function(r,i){Ui(r)?i():(r.eventedCallbacks||(r.eventedCallbacks=[]),r.eventedCallbacks.push(i))},jd=function(r){return typeof r=="string"&&/\S/.test(r)||Array.isArray(r)&&!!r.length},eo=function(r,i,n){if(!r||!r.nodeName&&!Ui(r))throw new Error("Invalid target for "+Po(i)+"#"+n+"; must be a DOM node or evented object.")},j0=function(r,i,n){if(!jd(r))throw new Error("Invalid event type for "+Po(i)+"#"+n+"; must be a non-empty string or array.")},G0=function(r,i,n){if(typeof r!="function")throw new Error("Invalid listener for "+Po(i)+"#"+n+"; must be a function.")},Iu=function(r,i,n){var e=i.length<3||i[0]===r||i[0]===r.eventBusEl_,t,a,o;return e?(t=r.eventBusEl_,i.length>=3&&i.shift(),a=i[0],o=i[1]):(t=i[0],a=i[1],o=i[2]),eo(t,r,n),j0(a,r,n
18),G0(o,r,n),o=xt(r,o),{isTargetingSelf:e,target:t,type:a,listener:o}},En=function(r,i,n,e){eo(r,r,i),r.nodeName?mx[i](r,n,e):r[i](n,e)},yx={on:function(){for(var r=this,i=arguments.length,n=new Array(i),e=0;e<i;e++)n[e]=arguments[e];var t=Iu(this,n,"on"),a=t.isTargetingSelf,o=t.target,l=t.type,u=t.listener;if(En(o,"on",l,u),!a){var d=function(){return r.off(o,l,u)};d.guid=u.guid;var f=function(){return r.off("dispose",d)};f.guid=u.guid,En(this,"on","dispose",d),En(o,"on","dispose",f)}},one:function(){for(var r=this,i=arguments.length,n=new Array(i),e=0;e<i;e++)n[e]=arguments[e];var t=Iu(this,n,"one"),a=t.isTargetingSelf,o=t.target,l=t.type,u=t.listener;if(a)En(o,"one",l,u);else{var d=function f(){r.off(o,l,f);for(var m=arguments.length,x=new Array(m),C=0;C<m;C++)x[C]=arguments[C];u.apply(null,x)};d.guid=u.guid,En(o,"one",l,d)}},any:function(){for(var r=this,i=arguments.length,n=new Array(i),e=0;e<i;e++)n[e]=arguments[e];var t=Iu(this,n,"any"),a=t.isTargetingSelf,o=t.target,l=t.type,u=t.listener;if(a)En(o,"any",l,u);else{var d=function f(){r.off(o,l,f);for(var m=arguments.length,x=new Array(m),C=0;C<m;C++)x[C]=arguments[C];u.apply(null,x)};d.guid=u.guid,En(o,"any",l,d)}},off:function(r,i,n){if(!r||jd(r))dr(this.eventBusEl_,r,i);else{var e=r,t=i;eo(e,this,"off"),j0(t,this,"off"),G0(n,this,"off"),n=xt(this,n),this.off("dispose",n),e.nodeName?(dr(e,t,n),dr(e,"dispose",n)):Ui(e)&&(e.off(t,n),e.off("dispose",n))}},trigger:function(r,i){eo(this.eventBusEl_,this,"trigger");var n=r&&typeof r!="string"?r.type:r;if(!jd(n)){var e="Invalid event type for "+Po(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(r)(this.log||Ye).error(e);else throw new Error(e)}return ma(this.eventBusEl_,r,i)}};function wf(s,r){r===void 0&&(r={});var i=r,n=i.eventBusKey;if(n){if(!s[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');s.eventBusEl_=s[n]}else s.eventBusEl_=st("span",{className:"vjs-event-bus"});return Pt(s,yx),s.eventedCallbacks&&s.eventedCallbacks.forEach(function(e){e()}),s.on("dispose",function(){s.off(),[s,s.el_,s.eventBusEl_].forEach(function(e){e&&Sr.has(e)&&Sr.delete(e)}),K.setTimeout(function(){s.eventBusEl_=null},0)}),s}var _x={state:{},setState:function(r){var i=this;typeof r=="function"&&(r=r());var n;return ta(r,function(e,t){i.state[t]!==e&&(n=n||{},n[t]={from:i.state[t],to:e}),i.state[t]=e}),n&&Ui(this)&&this.trigger({changes:n,type:"statechanged"}),n}};function W0(s,r){return Pt(s,_x),s.state=Pt({},s.state,r),typeof s.handleStateChanged=="function"&&Ui(s)&&s.on("statechanged",s.handleStateChanged),s}var Ws=function(r){return typeof r!="string"?r:r.replace(/./,function(i){return i.toLowerCase()})},Ft=function(r){return typeof r!="string"?r:r.replace(/./,function(i){return i.toUpperCase()})},bx=function(r,i){return Ft(r)===Ft(i)};function St(){for(var s={},r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return i.forEach(function(e){e&&ta(e,function(t,a){if(!Xa(t)){s[a]=t;return}Xa(s[a])||(s[a]={}),s[a]=St(s[a],t)})}),s}var Tx=(function(){function s(){this.map_={}}var r=s.prototype;return r.has=function(n){return n in this.map_},r.delete=function(n){var e=this.has(n);return delete this.map_[n],e},r.set=function(n,e){return this.map_[n]=e,this},r.forEach=function(n,e){for(var t in this.map_)n.call(e,this.map_[t],t,this)},s})(),Sx=K.Map?K.Map:Tx,xx=(function(){function s(){this.set_={}}var r=s.prototype;return r.has=function(n){return n in this.set_},r.delete=function(n){var e=this.has(n);return delete this.set_[n],e},r.add=function(n){return this.set_[n]=1,this},r.forEach=function(n,e){for(var t in this.set_)n.call(e,t,t,this)},s})(),Lu=K.Set?K.Set:xx,ye=(function(){function s(i,n,e){var t=this;if(!i&&this.play?this.player_=i=this:this.player_=i,this.isDisposed_=!1,this.parentComponent_=null,this.options_=St({},this.options_),n=this.options_=St(this.options_,n),this.id_=n.id||n.el&&n.el.id,!this.id_){var a=i&&i.id&&i.id()||"no_player";this.id_=a+"_component_"+$i()}this.name_=n.name||null,n.el?this.el_=n.el:n.createEl!==!1&&(this.el_=this.createEl()),n.className&&this.el_&&n.className.split(" ").forEach(function(o){return t.addClass(o)}),n.evented!==!1&&(wf(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),W0(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Lu,this.setIntervalIds_=new Lu,this.rafIds_=new Lu,this.namedRafs_=new Sx,this.clearingTimersOnDispose_=!1,n.initChildren!==!1&&this.initChildren(),this.ready(e),n.reportTouchActivity!==!1&&this.enableTouchActivity()}
18var r=s.prototype;return r.dispose=function(n){if(n===void 0&&(n={}),!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(n.restoreEl?this.el_.parentNode.replaceChild(n.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}},r.isDisposed=function(){return!!this.isDisposed_},r.player=function(){return this.player_},r.options=function(n){return n?(this.options_=St(this.options_,n),this.options_):this.options_},r.el=function(){return this.el_},r.createEl=function(n,e,t){return st(n,e,t)},r.localize=function(n,e,t){t===void 0&&(t=n);var a=this.player_.language&&this.player_.language(),o=this.player_.languages&&this.player_.languages(),l=o&&o[a],u=a&&a.split("-")[0],d=o&&o[u],f=t;return l&&l[n]?f=l[n]:d&&d[n]&&(f=d[n]),e&&(f=f.replace(/\{(\d+)\}/g,function(m,x){var C=e[x-1],L=C;return typeof C>"u"&&(L=m),L})),f},r.handleLanguagechange=function(){},r.contentEl=function(){return this.contentEl_||this.el_},r.id=function(){return this.id_},r.name=function(){return this.name_},r.children=function(){return this.children_},r.getChildById=function(n){return this.childIndex_[n]},r.getChild=function(n){if(n)return this.childNameIndex_[n]},r.getDescendant=function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];e=e.reduce(function(l,u){return l.concat(u)},[]);for(var a=this,o=0;o<e.length;o++)if(a=a.getChild(e[o]),!a||!a.getChild)return;return a},r.addChild=function(n,e,t){e===void 0&&(e={}),t===void 0&&(t=this.children_.length);var a,o;if(typeof n=="string"){o=Ft(n);var l=e.componentClass||o;e.name=o;var u=s.getComponent(l);if(!u)throw new Error("Component "+l+" does not exist");if(typeof u!="function")return null;a=new u(this.player_||this,e)}else a=n;if(a.parentComponent_&&a.parentComponent_.removeChild(a),this.children_.splice(t,0,a),a.parentComponent_=this,typeof a.id=="function"&&(this.childIndex_[a.id()]=a),o=o||a.name&&Ft(a.name()),o&&(this.childNameIndex_[o]=a,this.childNameIndex_[Ws(o)]=a),typeof a.el=="function"&&a.el()){var d=null;this.children_[t+1]&&(this.children_[t+1].el_?d=this.children_[t+1].el_:pa(this.children_[t+1])&&(d=this.children_[t+1])),this.contentEl().insertBefore(a.el(),d)}return a},r.removeChild=function(n){if(typeof n=="string"&&(n=this.getChild(n)),!(!n||!this.children_)){for(var e=!1,t=this.children_.length-1;t>=0;t--)if(this.children_[t]===n){e=!0,this.children_.splice(t,1);break}if(e){n.parentComponent_=null,this.childIndex_[n.id()]=null,this.childNameIndex_[Ft(n.name())]=null,this.childNameIndex_[Ws(n.name())]=null;var a=n.el();a&&a.parentNode===this.contentEl()&&this.contentEl().removeChild(n.el())}}},r.initChildren=function(){var n=this,e=this.options_.children;if(e){var t=this.options_,a=function(d){var f=d.name,m=d.opts;if(t[f]!==void 0&&(m=t[f]),m!==!1){m===!0&&(m={}),m.playerOptions=n.options_.playerOptions;var x=n.addChild(f,m);x&&(n[f]=x)}},o,l=s.getComponent("Tech");Array.isArray(e)?o=e:o=Object.keys(e),o.concat(Object.keys(this.options_).filter(function(u){return!o.some(function(d){return typeof d=="string"?u===d:u===d.name})})).map(function(u){var d,f;return typeof u=="string"?(d=u,f=e[d]||n.options_[d]||{}):(d=u.name,f=u),{name:d,opts:f}}).filter(function(u){var d=s.getComponent(u.opts.componentClass||Ft(u.name));return d&&!l.isTech(d)}).forEach(a)}},r.buildCSSClass=function(){return""},r.ready=function(n,e){if(e===void 0&&(e=!1),!!n){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(n);return}e?n.call(this):this.setTimeout(n,1)}},r.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var n=this.readyQueue_;this.readyQueue_=[],n&&n.length>0&&n.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},r.$=function(n,e){return dn(n,e||this.contentEl())},r.$$=function(n,e){return F0(n,e||this.contentEl())},r.hasClass=function(n){return Pn(this.el_,n)},r.addClass=function(n){Bi(this.el_,n)},r.removeClass=function(n){is(this.el_,n)},r.toggleClass=function(n,e){k0(this.el_,n,e)},r.show=function(){this.removeClass("vjs-hidden")},r.hide=function(){this.addClass("vjs-hidden")}
18,r.lockShowing=function(){this.addClass("vjs-lock-showing")},r.unlockShowing=function(){this.removeClass("vjs-lock-showing")},r.getAttribute=function(n){return P0(this.el_,n)},r.setAttribute=function(n,e){ua(this.el_,n,e)},r.removeAttribute=function(n){wo(this.el_,n)},r.width=function(n,e){return this.dimension("width",n,e)},r.height=function(n,e){return this.dimension("height",n,e)},r.dimensions=function(n,e){this.width(n,!0),this.height(e)},r.dimension=function(n,e,t){if(e!==void 0){(e===null||e!==e)&&(e=0),(""+e).indexOf("%")!==-1||(""+e).indexOf("px")!==-1?this.el_.style[n]=e:e==="auto"?this.el_.style[n]="":this.el_.style[n]=e+"px",t||this.trigger("componentresize");return}if(!this.el_)return 0;var a=this.el_.style[n],o=a.indexOf("px");return parseInt(o!==-1?a.slice(0,o):this.el_["offset"+Ft(n)],10)},r.currentDimension=function(n){var e=0;if(n!=="width"&&n!=="height")throw new Error("currentDimension only accepts width or height value");if(e=Ya(this.el_,n),e=parseFloat(e),e===0||isNaN(e)){var t="offset"+Ft(n);e=this.el_[t]}return e},r.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},r.currentWidth=function(){return this.currentDimension("width")},r.currentHeight=function(){return this.currentDimension("height")},r.focus=function(){this.el_.focus()},r.blur=function(){this.el_.blur()},r.handleKeyDown=function(n){this.player_&&(ze.isEventKey(n,"Tab")||n.stopPropagation(),this.player_.handleKeyDown(n))},r.handleKeyPress=function(n){this.handleKeyDown(n)},r.emitTapEvents=function(){var n=0,e=null,t=10,a=200,o;this.on("touchstart",function(u){u.touches.length===1&&(e={pageX:u.touches[0].pageX,pageY:u.touches[0].pageY},n=K.performance.now(),o=!0)}),this.on("touchmove",function(u){if(u.touches.length>1)o=!1;else if(e){var d=u.touches[0].pageX-e.pageX,f=u.touches[0].pageY-e.pageY,m=Math.sqrt(d*d+f*f);m>t&&(o=!1)}});var l=function(){o=!1};this.on("touchleave",l),this.on("touchcancel",l),this.on("touchend",function(u){if(e=null,o===!0){var d=K.performance.now()-n;d<a&&(u.preventDefault(),this.trigger("tap"))}})},r.enableTouchActivity=function(){if(!(!this.player()||!this.player().reportUserActivity)){var n=xt(this.player(),this.player().reportUserActivity),e;this.on("touchstart",function(){n(),this.clearInterval(e),e=this.setInterval(n,250)});var t=function(o){n(),this.clearInterval(e)};this.on("touchmove",n),this.on("touchend",t),this.on("touchcancel",t)}},r.setTimeout=function(n,e){var t=this,a;return n=xt(this,n),this.clearTimersOnDispose_(),a=K.setTimeout(function(){t.setTimeoutIds_.has(a)&&t.setTimeoutIds_.delete(a),n()},e),this.setTimeoutIds_.add(a),a},r.clearTimeout=function(n){return this.setTimeoutIds_.has(n)&&(this.setTimeoutIds_.delete(n),K.clearTimeout(n)),n},r.setInterval=function(n,e){n=xt(this,n),this.clearTimersOnDispose_();var t=K.setInterval(n,e);return this.setIntervalIds_.add(t),t},r.clearInterval=function(n){return this.setIntervalIds_.has(n)&&(this.setIntervalIds_.delete(n),K.clearInterval(n)),n},r.requestAnimationFrame=function(n){var e=this;if(!this.supportsRaf_)return this.setTimeout(n,1e3/60);this.clearTimersOnDispose_();var t;return n=xt(this,n),t=K.requestAnimationFrame(function(){e.rafIds_.has(t)&&e.rafIds_.delete(t),n()}),this.rafIds_.add(t),t},r.requestNamedAnimationFrame=function(n,e){var t=this;if(!this.namedRafs_.has(n)){this.clearTimersOnDispose_(),e=xt(this,e);var a=this.requestAnimationFrame(function(){e(),t.namedRafs_.has(n)&&t.namedRafs_.delete(n)});return this.namedRafs_.set(n,a),n}},r.cancelNamedAnimationFrame=function(n){this.namedRafs_.has(n)&&(this.cancelAnimationFrame(this.namedRafs_.get(n)),this.namedRafs_.delete(n))},r.cancelAnimationFrame=function(n){return this.supportsRaf_?(this.rafIds_.has(n)&&(this.rafIds_.delete(n),K.cancelAnimationFrame(n)),n):this.clearTimeout(n)},r.clearTimersOnDispose_=function(){var n=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEac
18h(function(e){var t=e[0],a=e[1];n[t].forEach(function(o,l){return n[a](l)})}),n.clearingTimersOnDispose_=!1}))},s.registerComponent=function(n,e){if(typeof n!="string"||!n)throw new Error('Illegal component name, "'+n+'"; must be a non-empty string.');var t=s.getComponent("Tech"),a=t&&t.isTech(e),o=s===e||s.prototype.isPrototypeOf(e.prototype);if(a||!o){var l;throw a?l="techs must be registered using Tech.registerTech()":l="must be a Component subclass",new Error('Illegal component, "'+n+'"; '+l+".")}n=Ft(n),s.components_||(s.components_={});var u=s.getComponent("Player");if(n==="Player"&&u&&u.players){var d=u.players,f=Object.keys(d);if(d&&f.length>0&&f.map(function(m){return d[m]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return s.components_[n]=e,s.components_[Ws(n)]=e,e},s.getComponent=function(n){if(!(!n||!s.components_))return s.components_[n]},s})();ye.prototype.supportsRaf_=typeof K.requestAnimationFrame=="function"&&typeof K.cancelAnimationFrame=="function";ye.registerComponent("Component",ye);function Ex(s,r,i){if(typeof r!="number"||r<0||r>i)throw new Error("Failed to execute '"+s+"' on 'TimeRanges': The index provided ("+r+") is non-numeric or out of bounds (0-"+i+").")}function sp(s,r,i,n){return Ex(s,n,i.length-1),i[n][r]}function Mu(s){var r;return s===void 0||s.length===0?r={length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:r={length:s.length,start:sp.bind(null,"start",0,s),end:sp.bind(null,"end",1,s)},K.Symbol&&K.Symbol.iterator&&(r[K.Symbol.iterator]=function(){return(s||[]).values()}),r}function In(s,r){return Array.isArray(s)?Mu(s):s===void 0||r===void 0?Mu():Mu([[s,r]])}function z0(s,r){var i=0,n,e;if(!r)return 0;(!s||!s.length)&&(s=In(0,0));for(var t=0;t<s.length;t++)n=s.start(t),e=s.end(t),e>r&&(e=r),i+=e-n;return i/r}function xr(s){if(s instanceof xr)return s;typeof s=="number"?this.code=s:typeof s=="string"?this.message=s:Hi(s)&&(typeof s.code=="number"&&(this.code=s.code),Pt(this,s)),this.message||(this.message=xr.defaultMessages[this.code]||"")}xr.prototype.code=0;xr.prototype.message="";xr.prototype.status=null;xr.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];xr.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var Kn=0;Kn<xr.errorTypes.length;Kn++)xr[xr.errorTypes[Kn]]=Kn,xr.prototype[xr.errorTypes[Kn]]=Kn;function Ha(s){return s!=null&&typeof s.then=="function"}function yi(s){Ha(s)&&s.then(null,function(r){})}var Gd=function(r){var i=["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(n,e,t){return r[e]&&(n[e]=r[e]),n},{cues:r.cues&&Array.prototype.map.call(r.cues,function(n){return{startTime:n.startTime,endTime:n.endTime,text:n.text,id:n.id}})});return i},Cx=function(r){var i=r.$$("track"),n=Array.prototype.map.call(i,function(t){return t.track}),e=Array.prototype.map.call(i,function(t){var a=Gd(t.track);return t.src&&(a.src=t.src),a});return e.concat(Array.prototype.filter.call(r.textTracks(),function(t){return n.indexOf(t)===-1}).map(Gd))},wx=function(r,i){return r.forEach(function(n){var e=i.addRemoteTextTrack(n).track;!n.src&&n.cues&&n.cues.forEach(function(t){return e.addCue(t)})}),i.textTracks()},op={textTracksToJson:Cx,jsonToTextTracks:wx,trackToJson_:Gd},Ou="vjs-modal-dialog",va=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.handleKeyDown_=function(a){return t.handleKeyDown(a)},t.close_=function(a){return t.close(a)},t.opened_=t.hasBeenOpened_=t.hasBeenFilled_=!1,t.closeable(!t.options_.uncloseable),t.content(t.options_.content),t.contentEl_=st("div",{className:Ou+"-content"},{role:"document"}),t.descEl_=st("p",{className:Ou+"-description vjs-control-text",id:t.el().getAttribute("aria-describedby")}),On(t.descEl_,t.description()),t.el_.appendChild(t.descEl_),t.el_.appendChild(t.contentEl_),t}var i=r.prototype;return i.createEl=function(){return s.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},i.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,s.prototype.dispose.call(this)},i.buildCSSClass=function(){return Ou+" vjs-hidden "+s.prototype.buildCSSClass.call(this)},i.label=function(){return this.localize(this.options_.label||"Modal Window")},i.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},i.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpe
18n&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},i.opened=function(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_},i.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},i.closeable=function(e){if(typeof e=="boolean"){var t=this.closeable_=!!e,a=this.getChild("closeButton");if(t&&!a){var o=this.contentEl_;this.contentEl_=this.el_,a=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=o,this.on(a,"close",this.close_)}!t&&a&&(this.off(a,"close",this.close_),this.removeChild(a),a.dispose())}return this.closeable_},i.fill=function(){this.fillWith(this.content())},i.fillWith=function(e){var t=this.contentEl(),a=t.parentNode,o=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,a.removeChild(t),this.empty(),R0(t,e),this.trigger("modalfill"),o?a.insertBefore(t,o):a.appendChild(t);var l=this.getChild("closeButton");l&&a.appendChild(l.el_)},i.empty=function(){this.trigger("beforemodalempty"),xf(this.contentEl()),this.trigger("modalempty")},i.content=function(e){return typeof e<"u"&&(this.content_=e),this.content_},i.conditionalFocus_=function(){var e=xe.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())},i.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},i.handleKeyDown=function(e){if(e.stopPropagation(),ze.isEventKey(e,"Escape")&&this.closeable()){e.preventDefault(),this.close();return}if(ze.isEventKey(e,"Tab")){for(var t=this.focusableEls_(),a=this.el_.querySelector(":focus"),o,l=0;l<t.length;l++)if(a===t[l]){o=l;break}xe.activeElement===this.el_&&(o=0),e.shiftKey&&o===0?(t[t.length-1].focus(),e.preventDefault()):!e.shiftKey&&o===t.length-1&&(t[0].focus(),e.preventDefault())}},i.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,function(t){return(t instanceof K.HTMLAnchorElement||t instanceof K.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof K.HTMLInputElement||t instanceof K.HTMLSelectElement||t instanceof K.HTMLTextAreaElement||t instanceof K.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof K.HTMLIFrameElement||t instanceof K.HTMLObjectElement||t instanceof K.HTMLEmbedElement||t.hasAttribute("tabindex")&&t.getAttribute("tabindex")!==-1||t.hasAttribute("contenteditable")})},r})(ye);va.prototype.options_={pauseOnOpen:!0,temporary:!0};ye.registerComponent("ModalDialog",va);var ca=(function(s){Ee(r,s);function r(n){var e;n===void 0&&(n=[]),e=s.call(this)||this,e.tracks_=[],Object.defineProperty(Ge(e),"length",{get:function(){return this.tracks_.length}});for(var t=0;t<n.length;t++)e.addTrack(n[t]);return e}var i=r.prototype;return i.addTrack=function(e){var t=this,a=this.tracks_.length;""+a in this||Object.defineProperty(this,a,{get:function(){return this.tracks_[a]}}),this.tracks_.indexOf(e)===-1&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){t.trigger({track:e,type:"labelchange",target:t})},Ui(e)&&e.addEventListener("labelchange",e.labelchange_)},i.removeTrack=function(e){for(var t,a=0,o=this.length;a<o;a++)if(this[a]===e){t=this[a],t.off&&t.off(),this.tracks_.splice(a,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})},i.getTrackById=function(e){for(var t=null,a=0,o=this.length;a<o;a++){var l=this[a];if(l.id===e){t=l;break}}return t},r})(Zt);ca.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(var Ax in ca.prototype.allowedEvents_)ca.prototype["on"+Ax]=null;var Ru=function(r,i){for(var n=0;n<r.length;
18n++)!Object.keys(r[n]).length||i.id===r[n].id||(r[n].enabled=!1)},kx=(function(s){Ee(r,s);function r(n){var e;n===void 0&&(n=[]);for(var t=n.length-1;t>=0;t--)if(n[t].enabled){Ru(n,n[t]);break}return e=s.call(this,n)||this,e.changing_=!1,e}var i=r.prototype;return i.addTrack=function(e){var t=this;e.enabled&&Ru(this,e),s.prototype.addTrack.call(this,e),e.addEventListener&&(e.enabledChange_=function(){t.changing_||(t.changing_=!0,Ru(t,e),t.changing_=!1,t.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))},i.removeTrack=function(e){s.prototype.removeTrack.call(this,e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)},r})(ca),Fu=function(r,i){for(var n=0;n<r.length;n++)!Object.keys(r[n]).length||i.id===r[n].id||(r[n].selected=!1)},Dx=(function(s){Ee(r,s);function r(n){var e;n===void 0&&(n=[]);for(var t=n.length-1;t>=0;t--)if(n[t].selected){Fu(n,n[t]);break}return e=s.call(this,n)||this,e.changing_=!1,Object.defineProperty(Ge(e),"selectedIndex",{get:function(){for(var o=0;o<this.length;o++)if(this[o].selected)return o;return-1},set:function(){}}),e}var i=r.prototype;return i.addTrack=function(e){var t=this;e.selected&&Fu(this,e),s.prototype.addTrack.call(this,e),e.addEventListener&&(e.selectedChange_=function(){t.changing_||(t.changing_=!0,Fu(t,e),t.changing_=!1,t.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))},i.removeTrack=function(e){s.prototype.removeTrack.call(this,e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)},r})(ca),$0=(function(s){Ee(r,s);function r(){return s.apply(this,arguments)||this}var i=r.prototype;return i.addTrack=function(e){var t=this;s.prototype.addTrack.call(this,e),this.queueChange_||(this.queueChange_=function(){return t.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return t.trigger("selectedlanguagechange")}),e.addEventListener("modechange",this.queueChange_);var a=["metadata","chapters"];a.indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)},i.removeTrack=function(e){s.prototype.removeTrack.call(this,e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},r})(ca),Px=(function(){function s(i){i===void 0&&(i=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var n=0,e=i.length;n<e;n++)this.addTrackElement_(i[n])}var r=s.prototype;return r.addTrackElement_=function(n){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}),this.trackElements_.indexOf(n)===-1&&this.trackElements_.push(n)},r.getTrackElementByTrack_=function(n){for(var e,t=0,a=this.trackElements_.length;t<a;t++)if(n===this.trackElements_[t].track){e=this.trackElements_[t];break}return e},r.removeTrackElement_=function(n){for(var e=0,t=this.trackElements_.length;e<t;e++)if(n===this.trackElements_[e]){this.trackElements_[e].track&&typeof this.trackElements_[e].track.off=="function"&&this.trackElements_[e].track.off(),typeof this.trackElements_[e].off=="function"&&this.trackElements_[e].off(),this.trackElements_.splice(e,1);break}},s})(),up=(function(){function s(i){s.prototype.setCues_.call(this,i),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var r=s.prototype;return r.setCues_=function(n){var e=this.length||0,t=0,a=n.length;this.cues_=n,this.length_=n.length;var o=function(u){""+u in this||Object.defineProperty(this,""+u,{get:function(){return this.cues_[u]}})};if(e<a)for(t=e;t<a;t++)o.call(this,t)},r.getCueById=function(n){for(var e=null,t=0,a=this.length;t<a;t++){var o=this[t];if(o.id===n){e=o;break}}return e},s})(),Ix={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Lx={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Mx={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},lp={disabled:"disabled",hidden:"hidden",showing:"showing"},Af=(function(s){Ee(r,s);function r(i){var n;i===void 0&&(i={}),n=s.call(this)||this;var e={id:i.id||"vjs_track_"+$i(),kind:i.kind||"",language:i.language||""},t=i.label||"",a=function(u){Object.defineProperty(Ge(n),u,{get:function(){return e[u]}
18,set:function(){}})};for(var o in e)a(o);return Object.defineProperty(Ge(n),"label",{get:function(){return t},set:function(u){u!==t&&(t=u,this.trigger("labelchange"))}}),n}return r})(Zt),kf=function(r){var i=["protocol","hostname","port","pathname","search","hash","host"],n=xe.createElement("a");n.href=r;for(var e={},t=0;t<i.length;t++)e[i[t]]=n[i[t]];return e.protocol==="http:"&&(e.host=e.host.replace(/:80$/,"")),e.protocol==="https:"&&(e.host=e.host.replace(/:443$/,"")),e.protocol||(e.protocol=K.location.protocol),e.host||(e.host=K.location.host),e},K0=function(r){if(!r.match(/^https?:\/\//)){var i=xe.createElement("a");i.href=r,r=i.href}return r},Df=function(r){if(typeof r=="string"){var i=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/,n=i.exec(r);if(n)return n.pop().toLowerCase()}return""},Io=function(r,i){i===void 0&&(i=K.location);var n=kf(r),e=n.protocol===":"?i.protocol:n.protocol,t=e+n.host!==i.protocol+i.host;return t},Ox=Object.freeze({__proto__:null,parseUrl:kf,getAbsoluteURL:K0,getFileExtension:Df,isCrossOrigin:Io}),cp=function(r,i){var n=new K.WebVTT.Parser(K,K.vttjs,K.WebVTT.StringDecoder()),e=[];n.oncue=function(t){i.addCue(t)},n.onparsingerror=function(t){e.push(t)},n.onflush=function(){i.trigger({type:"loadeddata",target:i})},n.parse(r),e.length>0&&(K.console&&K.console.groupCollapsed&&K.console.groupCollapsed("Text Track parsing errors for "+i.src),e.forEach(function(t){return Ye.error(t)}),K.console&&K.console.groupEnd&&K.console.groupEnd()),n.flush()},dp=function(r,i){var n={uri:r},e=Io(r);e&&(n.cors=e);var t=i.tech_.crossOrigin()==="use-credentials";t&&(n.withCredentials=t),Jg(n,xt(this,function(a,o,l){if(a)return Ye.error(a,o);i.loaded_=!0,typeof K.WebVTT!="function"?i.tech_&&i.tech_.any(["vttjsloaded","vttjserror"],function(u){if(u.type==="vttjserror"){Ye.error("vttjs failed to load, stopping trying to process "+i.src);return}return cp(l,i)}):cp(l,i)}))},ns=(function(s){Ee(r,s);function r(n){var e;if(n===void 0&&(n={}),!n.tech)throw new Error("A tech was not provided.");var t=St(n,{kind:Mx[n.kind]||"subtitles",language:n.language||n.srclang||""}),a=lp[t.mode]||"disabled",o=t.default;(t.kind==="metadata"||t.kind==="chapters")&&(a="hidden"),e=s.call(this,t)||this,e.tech_=t.tech,e.cues_=[],e.activeCues_=[],e.preload_=e.tech_.preloadTextTracks!==!1;var l=new up(e.cues_),u=new up(e.activeCues_),d=!1;e.timeupdateHandler=xt(Ge(e),function(m){if(m===void 0&&(m={}),!this.tech_.isDisposed()){if(!this.tech_.isReady_){m.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,d&&(this.trigger("cuechange"),d=!1),m.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});var f=function(){e.stopTracking()};return e.tech_.one("dispose",f),a!=="disabled"&&e.startTracking(),Object.defineProperties(Ge(e),{default:{get:function(){return o},set:function(){}},mode:{get:function(){return a}
18,set:function(x){lp[x]&&a!==x&&(a=x,!this.preload_&&a!=="disabled"&&this.cues.length===0&&dp(this.src,this),this.stopTracking(),a!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?l:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(this.cues.length===0)return u;for(var x=this.tech_.currentTime(),C=[],L=0,E=this.cues.length;L<E;L++){var B=this.cues[L];(B.startTime<=x&&B.endTime>=x||B.startTime===B.endTime&&B.startTime<=x&&B.startTime+.5>=x)&&C.push(B)}if(d=!1,C.length!==this.activeCues_.length)d=!0;else for(var q=0;q<C.length;q++)this.activeCues_.indexOf(C[q])===-1&&(d=!0);return this.activeCues_=C,u.setCues_(this.activeCues_),u},set:function(){}}}),t.src?(e.src=t.src,e.preload_||(e.loaded_=!0),(e.preload_||t.kind!=="subtitles"&&t.kind!=="captions")&&dp(e.src,Ge(e))):e.loaded_=!0,e}var i=r.prototype;return i.startTracking=function(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)},i.stopTracking=function(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)},i.addCue=function(e){var t=e;if(!("getCueAsHTML"in t)){t=new K.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(var a in e)a in t||(t[a]=e[a]);t.id=e.id,t.originalCue_=e}for(var o=this.tech_.textTracks(),l=0;l<o.length;l++)o[l]!==this&&o[l].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},i.removeCue=function(e){for(var t=this.cues_.length;t--;){var a=this.cues_[t];if(a===e||a.originalCue_&&a.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},r})(Af);ns.prototype.allowedEvents_={cuechange:"cuechange"};var X0=(function(s){Ee(r,s);function r(i){var n;i===void 0&&(i={});var e=St(i,{kind:Lx[i.kind]||""});n=s.call(this,e)||this;var t=!1;return Object.defineProperty(Ge(n),"enabled",{get:function(){return t},set:function(o){typeof o!="boolean"||o===t||(t=o,this.trigger("enabledchange"))}}),e.enabled&&(n.enabled=e.enabled),n.loaded_=!0,n}return r})(Af),Y0=(function(s){Ee(r,s);function r(i){var n;i===void 0&&(i={});var e=St(i,{kind:Ix[i.kind]||""});n=s.call(this,e)||this;var t=!1;return Object.defineProperty(Ge(n),"selected",{get:function(){return t},set:function(o){typeof o!="boolean"||o===t||(t=o,this.trigger("selectedchange"))}}),e.selected&&(n.selected=e.selected),n}return r})(Af),Q0=0,Rx=1,J0=2,Fx=3,ga=(function(s){Ee(r,s);function r(i){var n;i===void 0&&(i={}),n=s.call(this)||this;var e,t=new ns(i);return n.kind=t.kind,n.src=t.src,n.srclang=t.language,n.label=t.label,n.default=t.default,Object.defineProperties(Ge(n),{readyState:{get:function(){return e}},track:{get:function(){return t}}}),e=Q0,t.addEventListener("loadeddata",function(){e=J0,n.trigger({type:"load",target:Ge(n)})}),n}return r})(Zt);ga.prototype.allowedEvents_={load:"load"};ga.NONE=Q0;ga.LOADING=Rx;ga.LOADED=J0;ga.ERROR=Fx;var $r={audio:{ListClass:kx,TrackClass:X0,capitalName:"Audio"},video:{ListClass:Dx,TrackClass:Y0,capitalName:"Video"},text:{ListClass:$0,TrackClass:ns,capitalName:"Text"}};Object.keys($r).forEach(function(s){$r[s].getterName=s+"Tracks",$r[s].privateName=s+"Tracks_"});var da={remoteText:{ListClass:$0,TrackClass:ns,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Px,TrackClass:ga,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},br=ai({},$r,da);da.names=Object.keys(da);$r.names=Object.keys($r);br.names=[].concat(da.names).concat($r.names);function Nx(s,r,i,n,e){e===void 0&&(e={});var t=s.textTracks();e.kind=r,i&&(e.label=i),n&&(e.language=n),e.tech=s;var a=new br.text.TrackClass(e);return t.addTrack(a),a}var _t=(function(s){Ee(r,s);function r(n,e){var t;return n===void 0&&(n={}),e===void 0&&(e=function(){}),n.reportTouchActivity=!1,t=s.call(this,null,n,e)||this,t.onDurationChange_=function(a){return t.onDurationChange(a)},t.trackProgress_=function(a){return t.trackProgress(a)},t.trackCurrentTime_=function(a){return t.trackCurrentTime(a)},t.stopTrackingCurrentTime_=function(a){return t.stopTrackingCurrentTime(a)},t.disposeSourceHandler_=function(a){return t.disposeSourceHandler(a)}
18,t.queuedHanders_=new Set,t.hasStarted_=!1,t.on("playing",function(){this.hasStarted_=!0}),t.on("loadstart",function(){this.hasStarted_=!1}),br.names.forEach(function(a){var o=br[a];n&&n[o.getterName]&&(t[o.privateName]=n[o.getterName])}),t.featuresProgressEvents||t.manualProgressOn(),t.featuresTimeupdateEvents||t.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(a){n["native"+a+"Tracks"]===!1&&(t["featuresNative"+a+"Tracks"]=!1)}),n.nativeCaptions===!1||n.nativeTextTracks===!1?t.featuresNativeTextTracks=!1:(n.nativeCaptions===!0||n.nativeTextTracks===!0)&&(t.featuresNativeTextTracks=!0),t.featuresNativeTextTracks||t.emulateTextTracks(),t.preloadTextTracks=n.preloadTextTracks!==!1,t.autoRemoteTextTracks_=new br.text.ListClass,t.initTrackListeners(),n.nativeControlsForTouch||t.emitTapEvents(),t.constructor&&(t.name_=t.constructor.name||"Unknown Tech"),t}var i=r.prototype;return i.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",function(){return t.setTimeout(function(){return t.triggerSourceset(e)},1)}),this.trigger({src:e,type:"sourceset"})},i.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)},i.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)},i.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(xt(this,function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,t===1&&this.stopTrackingProgress()}),500)},i.onDurationChange=function(e){this.duration_=this.duration()},i.buffered=function(){return In(0,0)},i.bufferedPercent=function(){return z0(this.buffered(),this.duration_)},i.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},i.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)},i.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)},i.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},i.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.dispose=function(){this.clearTracks($r.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),s.prototype.dispose.call(this)},i.clearTracks=function(e){var t=this;e=[].concat(e),e.forEach(function(a){for(var o=t[a+"Tracks"]()||[],l=o.length;l--;){var u=o[l];a==="text"&&t.removeRemoteTextTrack(u),o.removeTrack(u)}})},i.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var a=e[t];this.removeRemoteTextTrack(a)}},i.reset=function(){},i.crossOrigin=function(){},i.setCrossOrigin=function(){},i.error=function(e){return e!==void 0&&(this.error_=new xr(e),this.trigger("error")),this.error_},i.played=function(){return this.hasStarted_?In(0,0):In()},i.play=function(){},i.setScrubbing=function(){},i.scrubbing=function(){},i.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},i.initTrackListeners=function(){var e=this;$r.names.forEach(function(t){var a=$r[t],o=function(){e.trigger(t+"trackchange")},l=e[a.getterName]();l.addEventListener("removetrack",o),l.addEventListener("addtrack",o),e.on("dispose",function(){l.removeEventListener("removetrack",o),l.removeEventListener("addtrack",o)})})},i.addWebVttScript_=function(){var e=this;if(!K.WebVTT)if(xe.body.contains(this.el())){if(!this.options_["vtt.js"]&&Xa(Ih)&&Object.keys(Ih).length>0){this.trigger("vttjsloaded");return}var t=xe.createElement("script");t.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",t.onload=function(){e.trigger("vttjsloaded")},t.onerror=function(){e.trigger("vttjserror")},this.on("dispose",function(){t.onload=null,t.onerror=null}),K.WebVTT=!0,this.el().parentNode.appendChild(t)}else this.ready(this.addWebVttScript_)},i.emulateTextTracks=function(){var e=this,t=this.textTracks(),a=this.remoteTextTracks(),o=function(m){return t.addTrack(m.track)},l=function(m){return t.removeTrack(m.track)};a.on("addtrack",o),a.on("removetrack",l),this.addWebVttScript_();var u=function(){return e.trigger("texttrackchange")},d=function(){u();for(var m=0;m<t.length;m++){var x=t[m];x.removeEventListener("cuechange",u),x.mode==="showing"&&x.addEventListener("cuechange",u)}};d(),t.addEventListener("change",d),t.addEventListener("addtrack",d),t.addEventListener("removetrack",d),this.on("dispose",function(){a.off("addtrack",o),a.off("removetrack",l),t.removeEventListener("change",d),t.removeEventListener("addtrack",d),t.removeEventListener("removetrack",d);for(var f=0;f<t.length;f++){var m=t[f];m.removeEventListener("cuechange",u)}})},i.addTextTrack=function(e,t,a){if(!e)throw new Error("TextTrack kind is required but was not provided");return Nx(this,e,t,a)},i.createRemoteTextTrack=function(e){var t=St(e,{tech:this});return new da.remoteTextEl.TrackClass(t)},i.addRemoteTextTrack=function(e,t){var a=this;e===void 0&&(e={});var o=this.createRemoteTextTrack(e);return t!==!0&&t!==!1&&(Ye.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(o),this.remoteTextTracks().addTrack(o.track),t!==!0&&this.ready(function(){return a.autoRemoteTextTracks_.addTrack(o.track)}),o},i.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},i.getVideoPlaybackQuality=function(){return{}},i.requestPictureInPicture=function(){var e=this.options_.Promise||K.Promise;if(e)return e.reject()},i.disablePictureInPicture=function(){return!0},i.setDisablePictureInPicture=function(){},i.requestVideoFrameCallback=function(e){var t=this,a=$i();return!this.isReady_||this.paused()?(this.queuedHanders_.add(a),this.one("playing",function(){t.queuedH
18anders_.has(a)&&(t.queuedHanders_.delete(a),e())})):this.requestNamedAnimationFrame(a,e),a},i.cancelVideoFrameCallback=function(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)},i.setPoster=function(){},i.playsinline=function(){},i.setPlaysinline=function(){},i.overrideNativeAudioTracks=function(){},i.overrideNativeVideoTracks=function(){},i.canPlayType=function(){return""},r.canPlayType=function(){return""},r.canPlaySource=function(e,t){return r.canPlayType(e.type)},r.isTech=function(e){return e.prototype instanceof r||e instanceof r||e===r},r.registerTech=function(e,t){if(r.techs_||(r.techs_={}),!r.isTech(t))throw new Error("Tech "+e+" must be a Tech");if(!r.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!r.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=Ft(e),r.techs_[e]=t,r.techs_[Ws(e)]=t,e!=="Tech"&&r.defaultTechOrder_.push(e),t},r.getTech=function(e){if(e){if(r.techs_&&r.techs_[e])return r.techs_[e];if(e=Ft(e),K&&K.videojs&&K.videojs[e])return Ye.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),K.videojs[e]}},r})(ye);br.names.forEach(function(s){var r=br[s];_t.prototype[r.getterName]=function(){return this[r.privateName]=this[r.privateName]||new r.ListClass,this[r.privateName]}});_t.prototype.featuresVolumeControl=!0;_t.prototype.featuresMuteControl=!0;_t.prototype.featuresFullscreenResize=!1;_t.prototype.featuresPlaybackRate=!1;_t.prototype.featuresProgressEvents=!1;_t.prototype.featuresSourceset=!1;_t.prototype.featuresTimeupdateEvents=!1;_t.prototype.featuresNativeTextTracks=!1;_t.prototype.featuresVideoFrameCallback=!1;_t.withSourceHandlers=function(s){s.registerSourceHandler=function(i,n){var e=s.sourceHandlers;e||(e=s.sourceHandlers=[]),n===void 0&&(n=e.length),e.splice(n,0,i)},s.canPlayType=function(i){for(var n=s.sourceHandlers||[],e,t=0;t<n.length;t++)if(e=n[t].canPlayType(i),e)return e;return""},s.selectSourceHandler=function(i,n){for(var e=s.sourceHandlers||[],t,a=0;a<e.length;a++)if(t=e[a].canHandleSource(i,n),t)return e[a];return null},s.canPlaySource=function(i,n){var e=s.selectSourceHandler(i,n);return e?e.canHandleSource(i,n):""};var r=["seekable","seeking","duration"];r.forEach(function(i){var n=this[i];typeof n=="function"&&(this[i]=function(){return this.sourceHandler_&&this.sourceHandler_[i]?this.sourceHandler_[i].apply(this.sourceHandler_,arguments):n.apply(this,arguments)})},s.prototype),s.prototype.setSource=function(i){var n=s.selectSourceHandler(i,this.options_);n||(s.nativeSourceHandler?n=s.nativeSourceHandler:Ye.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==s.nativeSourceHandler&&(this.currentSource_=i),this.sourceHandler_=n.handleSource(i,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},s.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}};ye.registerComponent("Tech",_t);_t.registerTech("Tech",_t);_t.defaultTechOrder_=[];var Ln={},Wd={},to={};function Bx(s,r){Ln[s]=Ln[s]||[],Ln[s].push(r)}function Ux(s,r,i){s.setTimeout(function(){return Cn(r,Ln[r.type],i,s)},1)}function qx(s,r){s.forEach(function(i){return i.setTech&&i.setTech(r)})}function Vx(s,r,i){return s.reduceRight(Pf(i),r[i]())}function Hx(s,r,i,n){return r[i](s.reduce(Pf(i),n))}function fp(s,r,i,n){n===void 0&&(n=null);var e="call"+Ft(i),t=s.reduce(Pf(e),n),a=t===to,o=a?null:r[i](t);return Wx(s,i,o,a),o}var jx={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Gx={setCurrentTime:1,setMuted:1,setVolume:1},hp={play:1,pause:1};function Pf(s){return function(r,i){return r===to?to:i[s]?i[s](r):r}}function Wx(s,r,i,n){for(var e=s.length-1;e>=0;e--){var t=s[e];t[r]&&t[r](n,i)}}function zx(s){Wd[s.id()]=null}function $x(s,r){var i=Wd[s.id()],n=null;if(i==null)return n=r(s),Wd[s.id()]=[[r,n]],n;for(var e=0;e<i.length;e++){var t=i[e],a=t[0],o=t[1];a===r&&(n=o)}return n===null&&(n=r(s),i.push([r,n])),n}function Cn(s,r,i,n,e,t){s===void 0&&(s={}),r===void 0&&(r=[]),e===void 0&&(e=[]),t===void 0&&(t=!1);var a=r,o=a[0],l=a.slice(1);
18if(typeof o=="string")Cn(s,Ln[o],i,n,e,t);else if(o){var u=$x(n,o);if(!u.setSource)return e.push(u),Cn(s,l,i,n,e,t);u.setSource(Pt({},s),function(d,f){if(d)return Cn(s,l,i,n,e,t);e.push(u),Cn(f,s.type===f.type?l:Ln[f.type],i,n,e,t)})}else l.length?Cn(s,l,i,n,e,t):t?i(s,e):Cn(s,Ln["*"],i,n,e,!0)}var Kx={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},ro=function(r){r===void 0&&(r="");var i=Df(r),n=Kx[i.toLowerCase()];return n||""},Xx=function(r,i){if(!i)return"";if(r.cache_.source.src===i&&r.cache_.source.type)return r.cache_.source.type;var n=r.cache_.sources.filter(function(o){return o.src===i});if(n.length)return n[0].type;for(var e=r.$$("source"),t=0;t<e.length;t++){var a=e[t];if(a.type&&a.src&&a.src===i)return a.type}return ro(i)},Yx=function s(r){if(Array.isArray(r)){var i=[];r.forEach(function(n){n=s(n),Array.isArray(n)?i=i.concat(n):Hi(n)&&i.push(n)}),r=i}else typeof r=="string"&&r.trim()?r=[pp({src:r})]:Hi(r)&&typeof r.src=="string"&&r.src&&r.src.trim()?r=[pp(r)]:r=[];return r};function pp(s){if(!s.type){var r=ro(s.src);r&&(s.type=r)}return s}var Qx=(function(s){Ee(r,s);function r(i,n,e){var t,a=St({createEl:!1},n);if(t=s.call(this,i,a,e)||this,!n.playerOptions.sources||n.playerOptions.sources.length===0)for(var o=0,l=n.playerOptions.techOrder;o<l.length;o++){var u=Ft(l[o]),d=_t.getTech(u);if(u||(d=ye.getComponent(u)),d&&d.isSupported()){i.loadTech_(u);break}}else i.src(n.playerOptions.sources);return t}return r})(ye);ye.registerComponent("MediaLoader",Qx);var Lo=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.options_.controlText&&t.controlText(t.options_.controlText),t.handleMouseOver_=function(a){return t.handleMouseOver(a)},t.handleMouseOut_=function(a){return t.handleMouseOut(a)},t.handleClick_=function(a){return t.handleClick(a)},t.handleKeyDown_=function(a){return t.handleKeyDown(a)},t.emitTapEvents(),t.enable(),t}var i=r.prototype;return i.createEl=function(e,t,a){e===void 0&&(e="div"),t===void 0&&(t={}),a===void 0&&(a={}),t=Pt({className:this.buildCSSClass(),tabIndex:0},t),e==="button"&&Ye.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),a=Pt({role:"button"},a),this.tabIndex_=t.tabIndex;var o=st(e,t,a);return o.appendChild(st("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o},i.dispose=function(){this.controlTextEl_=null,s.prototype.dispose.call(this)},i.createControlTextEl=function(e){return this.controlTextEl_=st("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},i.controlText=function(e,t){if(t===void 0&&(t=this.el()),e===void 0)return this.controlText_||"Need Text";var a=this.localize(e);this.controlText_=e,On(this.controlTextEl_,a),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&t.setAttribute("title",a)},i.buildCSSClass=function(){return"vjs-control vjs-button "+s.prototype.buildCSSClass.call(this)},i.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))},i.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)},i.handleLanguagechange=function(){this.controlText(this.controlText_)},i.handleClick=function(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},i.handleKeyDown=function(e){ze.isEventKey(e,"Space")||ze.isEventKey(e,"Enter")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):s.prototype.handleKeyDown.call(this,e)},r})(ye);
18ye.registerComponent("ClickableComponent",Lo);var Jx=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.update(),t.update_=function(a){return t.update(a)},n.on("posterchange",t.update_),t}var i=r.prototype;return i.dispose=function(){this.player().off("posterchange",this.update_),s.prototype.dispose.call(this)},i.createEl=function(){var e=st("div",{className:"vjs-poster",tabIndex:-1});return e},i.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},i.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},i.handleClick=function(e){if(this.player_.controls()){var t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;this.player_.tech(!0)&&!((rs||ts)&&t)&&this.player_.tech(!0).focus(),this.player_.paused()?yi(this.player_.play()):this.player_.pause()}},r})(Lo);ye.registerComponent("PosterImage",Jx);var Gr="#222",mp="#ccc",Zx={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Nu(s,r){var i;if(s.length===4)i=s[1]+s[1]+s[2]+s[2]+s[3]+s[3];else if(s.length===7)i=s.slice(1);else throw new Error("Invalid color code provided, "+s+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+r+")"}function Bu(s,r,i){try{s.style[r]=i}catch{return}}var e2=(function(s){Ee(r,s);function r(n,e,t){var a;a=s.call(this,n,e,t)||this;var o=function(u){return a.updateDisplay(u)};return n.on("loadstart",function(l){return a.toggleDisplay(l)}),n.on("texttrackchange",o),n.on("loadedmetadata",function(l){return a.preselectTrack(l)}),n.ready(xt(Ge(a),function(){if(n.tech_&&n.tech_.featuresNativeTextTracks){this.hide();return}n.on("fullscreenchange",o),n.on("playerresize",o),K.addEventListener("orientationchange",o),n.on("dispose",function(){return K.removeEventListener("orientationchange",o)});for(var l=this.options_.playerOptions.tracks||[],u=0;u<l.length;u++)this.player_.addRemoteTextTrack(l[u],!0);this.preselectTrack()})),a}var i=r.prototype;return i.preselectTrack=function(){for(var e={captions:1,subtitles:1},t=this.player_.textTracks(),a=this.player_.cache_.selectedLanguage,o,l,u,d=0;d<t.length;d++){var f=t[d];a&&a.enabled&&a.language&&a.language===f.language&&f.kind in e?f.kind===a.kind?u=f:u||(u=f):a&&!a.enabled?(u=null,o=null,l=null):f.default&&(f.kind==="descriptions"&&!o?o=f:f.kind in e&&!l&&(l=f))}u?u.mode="showing":l?l.mode="showing":o&&(o.mode="showing")},i.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},i.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})},i.clearDisplay=function(){typeof K.WebVTT=="function"&&K.WebVTT.processCues(K,[],this.el_)},i.updateDisplay=function(){var e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){for(var a=[],o=0;o<e.length;++o){var l=e[o];l.mode==="showing"&&a.push(l)}this.updateForTrack(a);return}for(var u=null,d=null,f=e.length;f--;){var m=e[f];m.mode==="showing"&&(m.kind==="descriptions"?u=m:d=m)}d?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(d)):u&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(u))},i.updateDisplayState=function(e){for(var t=this.player_.textTrackSettings.getValues(),a=e.activeCues,o=a.length;o--;){var l=a[o];if(l){var u=l.displayState;if(t.color&&(u.firstChild.style.color=t.color),t.textOpacity&&Bu(u.firstChild,"color",Nu(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(u.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Bu(u.firstChild,"backgroundColor",Nu(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Bu(u,"backgroundColor",Nu(t.windowColor,t.windowOpacity)):u.style.backgroundColor=t.windowColor),t.edgeStyle&&(t.edgeStyle==="dropshadow"?u.firstChild.style.textShadow="2px 2px 3px "+Gr+", 2px 2px 4px "+Gr+", 2px 2px 5px "+Gr:t.edgeStyle==="raised"?u.firstChild.style.textShadow="1px 1px "+Gr+", 2px 2px "+Gr+", 3px 3px "+Gr:t.edgeStyle==="depressed"?u.firstChild.style.textShadow="1px 1px "+mp+", 0 1px "+mp+", -1px -1px "+Gr+", 0 -1px "+Gr:t.edgeStyle==="uniform"&&(u.firstChild.style.textShadow="0 0 4px "+Gr+", 0 0 4px "+Gr+", 0 0 4px "+Gr+", 0 0 4px "+Gr)),t.fontPercent&&t.fontPercent!==1){var d=K.parseFloat(u.style.fontSize);u.style.fontSize=d*t.fontPercent+"px",u.style.height="auto",u.style.top="auto"}t.fontFamily&&t.fontFamily!=="default"&&(t.fontFamily==="small-caps"?u.firstChild.style.fontVariant="small-caps":u.firstChild.style.fontFamily=Zx[t.fontFamily])}}},i.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),!(typeof K.WebVTT!="function"||e.every(function(x){return!x.activeCues}))){for(var t=[],a=0;a<e.length;++a)for(var o=e[a],l=0;l<o.activeCues.length;++l)t.push(o.activeCues[l]);K.WebVTT.processCues(K,t,this.el_);for(var u=0;u<e.length;++u){for(var d=e[u],f=0;f<d.activeCues.length;++f){var m=d.activeCues[f].displayState;Bi(m,"vjs-text-track-cue"),Bi(m,"vjs-text-track-cue-"+(d.language?d.language:u)),d.language&&ua(m,"lang",d.language)}this.player_.textTrackSettings&&this.updateDisplayState(d)}}},r})(ye);ye.registerComponent("TextTrackDisplay",e2);var t2=(function(s){Ee(r,s);function r(){return s.apply(this,arguments)||this}var i=r.prototype;return i.createEl=function(){var e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"
18Video Player"),a=st("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[t])}),o=s.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return o.appendChild(a),o},r})(ye);ye.registerComponent("LoadingSpinner",t2);var ni=(function(s){Ee(r,s);function r(){return s.apply(this,arguments)||this}var i=r.prototype;return i.createEl=function(e,t,a){t===void 0&&(t={}),a===void 0&&(a={}),e="button",t=Pt({className:this.buildCSSClass()},t),a=Pt({type:"button"},a);var o=st(e,t,a);return o.appendChild(st("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(o),o},i.addChild=function(e,t){t===void 0&&(t={});var a=this.constructor.name;return Ye.warn("Adding an actionable (user controllable) child to a Button ("+a+") is not supported; use a ClickableComponent instead."),ye.prototype.addChild.call(this,e,t)},i.enable=function(){s.prototype.enable.call(this),this.el_.removeAttribute("disabled")},i.disable=function(){s.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},i.handleKeyDown=function(e){if(ze.isEventKey(e,"Space")||ze.isEventKey(e,"Enter")){e.stopPropagation();return}s.prototype.handleKeyDown.call(this,e)},r})(Lo);ye.registerComponent("Button",ni);var Z0=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.mouseused_=!1,t.on("mousedown",function(a){return t.handleMouseDown(a)}),t}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-big-play-button"},i.handleClick=function(e){var t=this.player_.play();if(this.mouseused_&&e.clientX&&e.clientY){var a=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&this.player_.eme.sessions.length>0;yi(t),this.player_.tech(!0)&&!((rs||ts)&&a)&&this.player_.tech(!0).focus();return}var o=this.player_.getChild("controlBar"),l=o&&o.getChild("playToggle");if(!l){this.player_.tech(!0).focus();return}var u=function(){return l.focus()};Ha(t)?t.then(u,function(){}):this.setTimeout(u,1)},i.handleKeyDown=function(e){this.mouseused_=!1,s.prototype.handleKeyDown.call(this,e)},i.handleMouseDown=function(e){this.mouseused_=!0},r})(ni);Z0.prototype.controlText_="Play Video";ye.registerComponent("BigPlayButton",Z0);var r2=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.controlText(e&&e.controlText||t.localize("Close")),t}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-close-button "+s.prototype.buildCSSClass.call(this)},i.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},i.handleKeyDown=function(e){ze.isEventKey(e,"Esc")?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):s.prototype.handleKeyDown.call(this,e)},r})(ni);ye.registerComponent("CloseButton",r2);var ey=(function(s){Ee(r,s);function r(n,e){var t;return e===void 0&&(e={}),t=s.call(this,n,e)||this,e.replay=e.replay===void 0||e.replay,t.on(n,"play",function(a){return t.handlePlay(a)}),t.on(n,"pause",function(a){return t.handlePause(a)}),e.replay&&t.on(n,"ended",function(a){return t.handleEnded(a)}),t}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-play-control "+s.prototype.buildCSSClass.call(this)},i.handleClick=function(e){this.player_.paused()?yi(this.player_.play()):this.player_.pause()},i.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},i.handlePlay=function(e){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},i.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},i.handleEnded=function(e){var t=this;this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",function(a){return t.handleSeeked(a)})},r})(ni);ey.prototype.controlText_="Play";ye.registerComponent("PlayToggle",ey);var ty=function(r,i){r=r<0?0:r;var n=Math.floor(r%60),e=Math.floor(r/60%60),t=Math.floor(r/3600),a=Math.floor(i/60%60),o=Math.floor(i/3600);return(isNaN(r)||r===1/0)&&(t=e=n="-"),t=t>0||o>0?t+":":"",e=((t||a>=10)&&e<10?"0"+e:e)+":",n=n<10?"0"+n:n,t+e+n},If=ty;function i2(s){If=s}function n2(){If=ty}function fa(s,r){return r===void 0&&(r=s),If(s,r)}var ya=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.on(n,["timeupdate","ended"],function(a){return t.updateContent(a)}),t.updateTextNode_(),t}var i=r.prototype;return i.createEl=function(){var e=this.buildCSSClass(),t=s.prototype.createEl.call(this,"div",{className:e+" vjs-time-control vjs-control"}),a=st("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+" "},{role:"presentation"});return t.appendChild(a),this.contentEl_=st("span",{className:e+"-display"},{"aria-live":"off",role:"presentation"}),t.appendChild(this.contentEl_),t},i.dispose=function(){this.contentEl_=null,this.textNode_=null,s.prototype.dispose.call(this)},i.updateTextNode_=function(e){var t=this;e===void 0&&(e=0),e=fa(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(t.contentEl_){var a=t.textNode_;a&&t.contentEl_.firstChild!==a&&(a=null,Ye.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=xe.createTextNode(t.formattedTime_),t.textNode_&&(a?t.contentEl_.replaceChild(t.textNode_,a):t.contentEl_.appendChild(t.textNode_))}}))},i.updateContent=function(e){},r})(ye);ya.prototype.labelText_="Time";ya.prototype.controlText_="Time";
18ye.registerComponent("TimeDisplay",ya);var Lf=(function(s){Ee(r,s);function r(){return s.apply(this,arguments)||this}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-current-time"},i.updateContent=function(e){var t;this.player_.ended()?t=this.player_.duration():t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)},r})(ya);Lf.prototype.labelText_="Current Time";Lf.prototype.controlText_="Current Time";ye.registerComponent("CurrentTimeDisplay",Lf);var Mf=(function(s){Ee(r,s);function r(n,e){var t;t=s.call(this,n,e)||this;var a=function(l){return t.updateContent(l)};return t.on(n,"durationchange",a),t.on(n,"loadstart",a),t.on(n,"loadedmetadata",a),t}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-duration"},i.updateContent=function(e){var t=this.player_.duration();this.updateTextNode_(t)},r})(ya);Mf.prototype.labelText_="Duration";Mf.prototype.controlText_="Duration";ye.registerComponent("DurationDisplay",Mf);var a2=(function(s){Ee(r,s);function r(){return s.apply(this,arguments)||this}var i=r.prototype;return i.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=s.prototype.createEl.call(this,"div"),a=s.prototype.createEl.call(this,"span",{textContent:"/"});return t.appendChild(a),e.appendChild(t),e},r})(ye);ye.registerComponent("TimeDivider",a2);var Of=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.on(n,"durationchange",function(a){return t.updateContent(a)}),t}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-remaining-time"},i.createEl=function(){var e=s.prototype.createEl.call(this);return this.options_.displayNegative!==!1&&e.insertBefore(st("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e},i.updateContent=function(e){if(typeof this.player_.duration()=="number"){var t;this.player_.ended()?t=0:this.player_.remainingTimeDisplay?t=this.player_.remainingTimeDisplay():t=this.player_.remainingTime(),this.updateTextNode_(t)}},r})(ya);Of.prototype.labelText_="Remaining Time";Of.prototype.controlText_="Remaining Time";ye.registerComponent("RemainingTimeDisplay",Of);var s2=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.updateShowing(),t.on(t.player(),"durationchange",function(a){return t.updateShowing(a)}),t}var i=r.prototype;return i.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=st("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(st("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+" "})),this.contentEl_.appendChild(xe.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e},i.dispose=function(){this.contentEl_=null,s.prototype.dispose.call(this)},i.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},r})(ye);ye.registerComponent("LiveDisplay",s2);var ry=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.updateLiveEdgeStatus(),t.player_.liveTracker&&(t.updateLiveEdgeStatusHandler_=function(a){return t.updateLiveEdgeStatus(a)},t.on(t.player_.liveTracker,"liveedgechange",t.updateLiveEdgeStatusHandler_)),t}var i=r.prototype;return i.createEl=function(){var e=s.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=st("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e},i.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},i.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},i.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,s.prototype.dispose.call(this)},r})(ni);ry.prototype.controlText_="Seek to live, currently playing live";ye.registerComponent("SeekToLive",ry);var Mo=function(r,i,n){return r=Number(r),Math.min(n,Math.max(i,isNaN(r)?i:r))},Rf=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.handleMouseDown_=function(a){return t.handleMouseDown(a)},t.handleMouseUp_=function(a){return t.handleMouseUp(a)},t.handleKeyDown_=function(a){return t.handleKeyDown(a)},t.handleClick_=function(a){return t.handleClick(a)},t.handleMouseMove_=function(a){return t.handleMouseMove(a)},t.update_=function(a){return t.update(a)},t.bar=t.getChild(t.options_.barName),t.vertical(!!t.options_.vertical),t.enable(),t}var i=r.prototype;return i.enabled=function(){return this.enabled_},i.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},i.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},i.createEl=function(e,t,a){return t===void 0&&(t={}),a===void 0&&(a={}),t.className=t.className+" vjs-slider",t=Pt({tabIndex:0},t),a=Pt({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},a),s.prototype.createEl.call(this,e,t,a)},i.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!zi&&e.preventDefault(),I0(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove_),this.on(t,"mouseup",this.handleMouseUp_),this.on(t,"touchmove",this.handleMouseMove_),this.on(t,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)},i.handleMouseMove=function(e){},i.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;L0(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.update()},i.update=function(){var e=this;if(!(!this.el_||!this.bar)){var t=this.getProgress();return t===this.progress_||(this.progress_=t,this.requestNamedAnimationFrame("Slider#update",function(){var a=e.vertical()?"height":"width";e.bar.el().style[a]=(t*100).toFixed(2)+"%"})),t}},i.getProgress=function(){return Number(Mo(this.getPercent(),0,1).toFixed(4))},i.calculateDistance=function(e){var t=Ao(this.el_,e);return this.vertical()?t.y:t.x},i.handleKeyDown=function(e){ze.isEventKey(e,"Left")||ze.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepBack()):ze.
18isEventKey(e,"Right")||ze.isEventKey(e,"Up")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):s.prototype.handleKeyDown.call(this,e)},i.handleClick=function(e){e.stopPropagation(),e.preventDefault()},i.vertical=function(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},r})(ye);ye.registerComponent("Slider",Rf);var Uu=function(r,i){return Mo(r/i*100,0,100).toFixed(2)+"%"},o2=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.partEls_=[],t.on(n,"progress",function(a){return t.update(a)}),t}var i=r.prototype;return i.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),t=st("span",{className:"vjs-control-text"}),a=st("span",{textContent:this.localize("Loaded")}),o=xe.createTextNode(": ");return this.percentageEl_=st("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(a),t.appendChild(o),t.appendChild(this.percentageEl_),e},i.dispose=function(){this.partEls_=null,this.percentageEl_=null,s.prototype.dispose.call(this)},i.update=function(e){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var a=t.player_.liveTracker,o=t.player_.buffered(),l=a&&a.isLive()?a.seekableEnd():t.player_.duration(),u=t.player_.bufferedEnd(),d=t.partEls_,f=Uu(u,l);t.percent_!==f&&(t.el_.style.width=f,On(t.percentageEl_,f),t.percent_=f);for(var m=0;m<o.length;m++){var x=o.start(m),C=o.end(m),L=d[m];L||(L=t.el_.appendChild(st()),d[m]=L),!(L.dataset.start===x&&L.dataset.end===C)&&(L.dataset.start=x,L.dataset.end=C,L.style.left=Uu(x,u),L.style.width=Uu(C-x,u))}for(var E=d.length;E>o.length;E--)t.el_.removeChild(d[E-1]);d.length=o.length})},r})(ye);ye.registerComponent("LoadProgressBar",o2);var u2=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.update=ji(xt(Ge(t),t.update),si),t}var i=r.prototype;return i.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},i.update=function(e,t,a){var o=Qa(this.el_),l=la(this.player_.el()),u=e.width*t;if(!(!l||!o)){var d=e.left-l.left+u,f=e.width-u+(l.right-e.right),m=o.width/2;d<m?m+=m-d:f<m&&(m=f),m<0?m=0:m>o.width&&(m=o.width),m=Math.round(m),this.el_.style.right="-"+m+"px",this.write(a)}},i.write=function(e){On(this.el_,e)},i.updateTime=function(e,t,a,o){var l=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var u,d=l.player_.duration();if(l.player_.liveTracker&&l.player_.liveTracker.isLive()){var f=l.player_.liveTracker.liveWindow(),m=f-t*f;u=(m<1?"":"-")+fa(m,f)}else u=fa(a,d);l.update(e,t,u),o&&o()})},r})(ye);ye.registerComponent("TimeTooltip",u2);var Ff=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.update=ji(xt(Ge(t),t.update),si),t}var i=r.prototype;return i.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},i.update=function(e,t){var a=this.getChild("timeTooltip");if(a){var o=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();a.updateTime(e,t,o)}},r})(ye);Ff.prototype.options_={children:[]};!Er&&!Wi&&Ff.prototype.options_.children.push("timeTooltip");ye.registerComponent("PlayProgressBar",Ff);var iy=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.update=ji(xt(Ge(t),t.update),si),t}var i=r.prototype;return i.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},i.update=function(e,t){var a=this,o=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,o,function(){a.el_.style.left=e.width*t+"px"})},r})(ye);iy.prototype.options_={children:["timeTooltip"]};ye.registerComponent("MouseTimeDisplay",iy);var Ns=5,vp=12,Nf=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.setEventHandlers_(),t}var i=r.prototype;return i.setEventHandlers_=function(){var e=this;this.update_=xt(this,this.update),this.update=ji(this.update_,si),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=function(t){return e.enableInterval_(t)},this.disableIntervalHandler_=function(t){return e.disableInterval_(t)},this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in xe&&"visibilityState"in xe&&this.on(xe,"visibilitychange",this.toggleVisibility_)},i.toggleVisibility_=function(e){xe.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())},i.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,si))},i.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},i.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},i.update=function(e){var t=this;if(xe.visibilityState!=="hidden"){var a=s.prototype.update.call(this);return this.requestNamedAnimationFrame("SeekBar#update",function(){var o=t.player_.ended()?t.player_.duration():t.getCurrentTime_(),l=t.player_.liveTracker,u=t.player_.duration();
18l&&l.isLive()&&(u=t.player_.liveTracker.liveCurrentTime()),t.percent_!==a&&(t.el_.setAttribute("aria-valuenow",(a*100).toFixed(2)),t.percent_=a),(t.currentTime_!==o||t.duration_!==u)&&(t.el_.setAttribute("aria-valuetext",t.localize("progress bar timing: currentTime={1} duration={2}",[fa(o,u),fa(u,u)],"{1} of {2}")),t.currentTime_=o,t.duration_=u),t.bar&&t.bar.update(la(t.el()),t.getProgress())}),a}},i.userSeek_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)},i.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},i.getPercent=function(){var e=this.getCurrentTime_(),t,a=this.player_.liveTracker;return a&&a.isLive()?(t=(e-a.seekableStart())/a.liveWindow(),a.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t},i.handleMouseDown=function(e){Ja(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),s.prototype.handleMouseDown.call(this,e))},i.handleMouseMove=function(e,t){if(t===void 0&&(t=!1),!!Ja(e)){!t&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);var a,o=this.calculateDistance(e),l=this.player_.liveTracker;if(!l||!l.isLive())a=o*this.player_.duration(),a===this.player_.duration()&&(a=a-.1);else{if(o>=.99){l.seekToLiveEdge();return}var u=l.seekableStart(),d=l.liveCurrentTime();if(a=u+o*l.liveWindow(),a>=d&&(a=d),a<=u&&(a=u+.1),a===1/0)return}this.userSeek_(a)}},i.enable=function(){s.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},i.disable=function(){s.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},i.handleMouseUp=function(e){s.prototype.handleMouseUp.call(this,e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?yi(this.player_.play()):this.update_()},i.stepForward=function(){this.userSeek_(this.player_.currentTime()+Ns)},i.stepBack=function(){this.userSeek_(this.player_.currentTime()-Ns)},i.handleAction=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},i.handleKeyDown=function(e){var t=this.player_.liveTracker;if(ze.isEventKey(e,"Space")||ze.isEventKey(e,"Enter"))e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(ze.isEventKey(e,"Home"))e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(ze.isEventKey(e,"End"))e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(ze(e))){e.preventDefault(),e.stopPropagation();var a=(ze.codes[ze(e)]-ze.codes[0])*10/100;t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*a):this.userSeek_(this.player_.duration()*a)}else ze.isEventKey(e,"PgDn")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-Ns*vp)):ze.isEventKey(e,"PgUp")?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+Ns*vp)):s.prototype.handleKeyDown.call(this,e)},i.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in xe&&"visibilityState"in xe&&this.off(xe,"visibilitychange",this.toggleVisibility_),s.prototype.dispose.call(this)},r})(Rf);Nf.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};!Er&&!Wi&&Nf.prototype.options_.children.splice(1,0,"mouseTimeDisplay");ye.registerComponent("SeekBar",Nf);var ny=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.handleMouseMove=ji(xt(Ge(t),t.handleMouseMove),si),t.throttledHandleMouseSeek=ji(xt(Ge(t),t.handleMouseSeek),si),t.handleMouseUpHandler_=function(a){return t.handleMouseUp(a)},t.handleMouseDownHandler_=function(a){return t.handleMouseDown(a)},t.enable(),t}var i=r.prototype;return i.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},i.handleMouseMove=function(e){var t=this.getChild("seekBar");if(t){var a=t.getChild("playProgressBar"),o=t.getChild("mouseTimeDisplay");if(!(!a&&!o)){var l=t.el(),u=Qa(l),d=Ao(l,e).x;d=Mo(d,0,1),o&&o.update(u,d),a&&a.update(u,t.getProgress())}}},i.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},i.enabled=function(){return this.enabled_}
18,i.disable=function(){if(this.children().forEach(function(t){return t.disable&&t.disable()}),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&yi(this.player_.play())}},i.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},i.removeListenersAddedOnMousedownAndTouchstart=function(){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)},i.handleMouseDown=function(e){var t=this.el_.ownerDocument,a=this.getChild("seekBar");a&&a.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},i.handleMouseUp=function(e){var t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()},r})(ye);ny.prototype.options_={children:["seekBar"]};ye.registerComponent("ProgressControl",ny);var ay=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.on(n,["enterpictureinpicture","leavepictureinpicture"],function(a){return t.handlePictureInPictureChange(a)}),t.on(n,["disablepictureinpicturechanged","loadedmetadata"],function(a){return t.handlePictureInPictureEnabledChange(a)}),t.on(n,["loadedmetadata","audioonlymodechange","audiopostermodechange"],function(){var a=n.currentType().substring(0,5)==="audio";a||n.audioPosterMode()||n.audioOnlyMode()?(n.isInPictureInPicture()&&n.exitPictureInPicture(),t.hide()):t.show()}),t.disable(),t}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-picture-in-picture-control "+s.prototype.buildCSSClass.call(this)},i.handlePictureInPictureEnabledChange=function(){xe.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1?this.enable():this.disable()},i.handlePictureInPictureChange=function(e){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},i.handleClick=function(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},r})(ni);ay.prototype.controlText_="Picture-in-Picture";ye.registerComponent("PictureInPictureToggle",ay);var sy=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.on(n,"fullscreenchange",function(a){return t.handleFullscreenChange(a)}),xe[n.fsApi_.fullscreenEnabled]===!1&&t.disable(),t}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-fullscreen-control "+s.prototype.buildCSSClass.call(this)},i.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},i.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},r})(ni);sy.prototype.controlText_="Fullscreen";ye.registerComponent("FullscreenToggle",sy);var l2=function(r,i){i.tech_&&!i.tech_.featuresVolumeControl&&r.addClass("vjs-hidden"),r.on(i,"loadstart",function(){i.tech_.featuresVolumeControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})},c2=(function(s){Ee(r,s);function r(){return s.apply(this,arguments)||this}var i=r.prototype;return i.createEl=function(){var e=s.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});return e.appendChild(s.prototype.createEl.call(this,"span",{className:"vjs-control-text"})),e},r})(ye);ye.registerComponent("VolumeLevel",c2);var d2=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.update=ji(xt(Ge(t),t.update),si),t}var i=r.prototype;return i.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})},i.update=function(e,t,a,o){if(!a){var l=la(this.el_),u=la(this.player_.el()),d=e.width*t;if(!u||!l)return;var f=e.left-u.left+d,m=e.width-d+(u.right-e.right),x=l.width/2;
18f<x?x+=x-f:m<x&&(x=m),x<0?x=0:x>l.width&&(x=l.width),this.el_.style.right="-"+x+"px"}this.write(o+"%")},i.write=function(e){On(this.el_,e)},i.updateVolume=function(e,t,a,o,l){var u=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){u.update(e,t,a,o.toFixed(0)),l&&l()})},r})(ye);ye.registerComponent("VolumeLevelTooltip",d2);var oy=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.update=ji(xt(Ge(t),t.update),si),t}var i=r.prototype;return i.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},i.update=function(e,t,a){var o=this,l=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,a,l,function(){a?o.el_.style.bottom=e.height*t+"px":o.el_.style.left=e.width*t+"px"})},r})(ye);oy.prototype.options_={children:["volumeLevelTooltip"]};ye.registerComponent("MouseVolumeLevelDisplay",oy);var Oo=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.on("slideractive",function(a){return t.updateLastVolume_(a)}),t.on(n,"volumechange",function(a){return t.updateARIAAttributes(a)}),n.ready(function(){return t.updateARIAAttributes()}),t}var i=r.prototype;return i.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},i.handleMouseDown=function(e){Ja(e)&&s.prototype.handleMouseDown.call(this,e)},i.handleMouseMove=function(e){var t=this.getChild("mouseVolumeLevelDisplay");if(t){var a=this.el(),o=la(a),l=this.vertical(),u=Ao(a,e);u=l?u.y:u.x,u=Mo(u,0,1),t.update(o,u,l)}Ja(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},i.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},i.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},i.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},i.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},i.updateARIAAttributes=function(e){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},i.volumeAsPercentage_=function(){return Math.round(this.player_.volume()*100)},i.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){e.player_.volume()===0&&e.player_.lastVolume_(t)})},r})(Rf);Oo.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!Er&&!Wi&&Oo.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");Oo.prototype.playerEvent="volumechange";ye.registerComponent("VolumeBar",Oo);var uy=(function(s){Ee(r,s);function r(n,e){var t;return e===void 0&&(e={}),e.vertical=e.vertical||!1,(typeof e.volumeBar>"u"||Xa(e.volumeBar))&&(e.volumeBar=e.volumeBar||{},e.volumeBar.vertical=e.vertical),t=s.call(this,n,e)||this,l2(Ge(t),n),t.throttledHandleMouseMove=ji(xt(Ge(t),t.handleMouseMove),si),t.handleMouseUpHandler_=function(a){return t.handleMouseUp(a)},t.on("mousedown",function(a){return t.handleMouseDown(a)}),t.on("touchstart",function(a){return t.handleMouseDown(a)}),t.on("mousemove",function(a){return t.handleMouseMove(a)}),t.on(t.volumeBar,["focus","slideractive"],function(){t.volumeBar.addClass("vjs-slider-active"),t.addClass("vjs-slider-active"),t.trigger("slideractive")}),t.on(t.volumeBar,["blur","sliderinactive"],function(){t.volumeBar.removeClass("vjs-slider-active"),t.removeClass("vjs-slider-active"),t.trigger("sliderinactive")}),t}var i=r.prototype;return i.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),s.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},i.handleMouseDown=function(e){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)},i.handleMouseUp=function(e){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)},i.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},r})(ye);uy.prototype.options_={children:["volumeBar"]};
18ye.registerComponent("VolumeControl",uy);var f2=function(r,i){i.tech_&&!i.tech_.featuresMuteControl&&r.addClass("vjs-hidden"),r.on(i,"loadstart",function(){i.tech_.featuresMuteControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})},ly=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,f2(Ge(t),n),t.on(n,["loadstart","volumechange"],function(a){return t.update(a)}),t}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-mute-control "+s.prototype.buildCSSClass.call(this)},i.handleClick=function(e){var t=this.player_.volume(),a=this.player_.lastVolume_();if(t===0){var o=a<.1?.1:a;this.player_.volume(o),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},i.update=function(e){this.updateIcon_(),this.updateControlText_()},i.updateIcon_=function(){var e=this.player_.volume(),t=3;Er&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?t=0:e<.33?t=1:e<.67&&(t=2);for(var a=0;a<4;a++)is(this.el_,"vjs-vol-"+a);Bi(this.el_,"vjs-vol-"+t)},i.updateControlText_=function(){var e=this.player_.muted()||this.player_.volume()===0,t=e?"Unmute":"Mute";this.controlText()!==t&&this.controlText(t)},r})(ni);ly.prototype.controlText_="Mute";ye.registerComponent("MuteToggle",ly);var cy=(function(s){Ee(r,s);function r(n,e){var t;return e===void 0&&(e={}),typeof e.inline<"u"?e.inline=e.inline:e.inline=!0,(typeof e.volumeControl>"u"||Xa(e.volumeControl))&&(e.volumeControl=e.volumeControl||{},e.volumeControl.vertical=!e.inline),t=s.call(this,n,e)||this,t.handleKeyPressHandler_=function(a){return t.handleKeyPress(a)},t.on(n,["loadstart"],function(a){return t.volumePanelState_(a)}),t.on(t.muteToggle,"keyup",function(a){return t.handleKeyPress(a)}),t.on(t.volumeControl,"keyup",function(a){return t.handleVolumeControlKeyUp(a)}),t.on("keydown",function(a){return t.handleKeyPress(a)}),t.on("mouseover",function(a){return t.handleMouseOver(a)}),t.on("mouseout",function(a){return t.handleMouseOut(a)}),t.on(t.volumeControl,["slideractive"],t.sliderActive_),t.on(t.volumeControl,["sliderinactive"],t.sliderInactive_),t}var i=r.prototype;return i.sliderActive_=function(){this.addClass("vjs-slider-active")},i.sliderInactive_=function(){this.removeClass("vjs-slider-active")},i.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},i.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),s.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},i.dispose=function(){this.handleMouseOut(),s.prototype.dispose.call(this)},i.handleVolumeControlKeyUp=function(e){ze.isEventKey(e,"Esc")&&this.muteToggle.focus()},i.handleMouseOver=function(e){this.addClass("vjs-hover"),Br(xe,"keyup",this.handleKeyPressHandler_)},i.handleMouseOut=function(e){this.removeClass("vjs-hover"),dr(xe,"keyup",this.handleKeyPressHandler_)},i.handleKeyPress=function(e){ze.isEventKey(e,"Esc")&&this.handleMouseOut()},r})(ye);cy.prototype.options_={children:["muteToggle","volumeControl"]};ye.registerComponent("VolumePanel",cy);var dy=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,e&&(t.menuButton_=e.menuButton),t.focusedChild_=-1,t.on("keydown",function(a){return t.handleKeyDown(a)}),t.boundHandleBlur_=function(a){return t.handleBlur(a)},t.boundHandleTapClick_=function(a){return t.handleTapClick(a)},t}var i=r.prototype;return i.addEventListenerForItem=function(e){e instanceof ye&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},i.removeEventListenerForItem=function(e){e instanceof ye&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},i.removeChild=function(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),s.prototype.removeChild.call(this,e)},i.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},i.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=st(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var t=s.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),Br(t,"click",function(a){a.preventDefault(),a.stopImmediatePropagation()}),t},i.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,s.prototype.dispose.call(this)},i.handleBlur=function(e){var t=e.relatedTarget||xe.activeElement;if(!this.children().some(function(o){return o.el()===t})){var a=this.menuButton_;a&&a.buttonPressed_&&t!==a.el().firstChild&&a.unpressButton()}},i.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t=this.children();if(!Array.isArray(t))return;var a=t.filter(function(o){return o.el()===e.target})[0];if(!a)return;a.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}},i.handleKeyDown=function(e){ze.isEventKey(e,"Left")||ze.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(ze.isEventKey(e,"Right")||ze.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},i.stepForward=function(){var e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e)},i.stepBack=function(){var e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e)},i.focus=function(e){e===void 0&&(e=0);var t=this.children().slice(),a=t.length&&t[0].hasClass("vjs-menu-title");a&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},r})(ye);ye.registerComponent("Menu",dy);var Bf=(function(s){Ee(r,s);function r(n,e){var t;e===void 0&&(e={}),t=s.call(this,n,e)||this,t.menuButton_=new ni(n,e),t.menuButton_.controlText(t.controlText_),t.menuButton_.el_.setAttribute("aria-haspopup","true");var a=ni.prototype.buildCSSClass();t.menuButton_.el_.className=t.buildCSSClass()+" "+a,t.menuButton_.removeClass("vjs-control"),t.addChild(t.menuButton_),t.update(
18),t.enabled_=!0;var o=function(u){return t.handleClick(u)};return t.handleMenuKeyUp_=function(l){return t.handleMenuKeyUp(l)},t.on(t.menuButton_,"tap",o),t.on(t.menuButton_,"click",o),t.on(t.menuButton_,"keydown",function(l){return t.handleKeyDown(l)}),t.on(t.menuButton_,"mouseenter",function(){t.addClass("vjs-hover"),t.menu.show(),Br(xe,"keyup",t.handleMenuKeyUp_)}),t.on("mouseleave",function(l){return t.handleMouseLeave(l)}),t.on("keydown",function(l){return t.handleSubmenuKeyDown(l)}),t}var i=r.prototype;return i.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))},i.createMenu=function(){var e=new dy(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var t=st("li",{className:"vjs-menu-title",textContent:Ft(this.options_.title),tabIndex:-1}),a=new ye(this.player_,{el:t});e.addItem(a)}if(this.items=this.createItems(),this.items)for(var o=0;o<this.items.length;o++)e.addItem(this.items[o]);return e},i.createItems=function(){},i.createEl=function(){return s.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},i.buildWrapperCSSClass=function(){var e="vjs-menu-button";this.options_.inline===!0?e+="-inline":e+="-popup";var t=ni.prototype.buildCSSClass();return"vjs-menu-button "+e+" "+t+" "+s.prototype.buildCSSClass.call(this)},i.buildCSSClass=function(){var e="vjs-menu-button";return this.options_.inline===!0?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+s.prototype.buildCSSClass.call(this)},i.controlText=function(e,t){return t===void 0&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},i.dispose=function(){this.handleMouseLeave(),s.prototype.dispose.call(this)},i.handleClick=function(e){this.buttonPressed_?this.unpressButton():this.pressButton()},i.handleMouseLeave=function(e){this.removeClass("vjs-hover"),dr(xe,"keyup",this.handleMenuKeyUp_)},i.focus=function(){this.menuButton_.focus()},i.blur=function(){this.menuButton_.blur()},i.handleKeyDown=function(e){ze.isEventKey(e,"Esc")||ze.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),ze.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(ze.isEventKey(e,"Up")||ze.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},i.handleMenuKeyUp=function(e){(ze.isEventKey(e,"Esc")||ze.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},i.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},i.handleSubmenuKeyDown=function(e){(ze.isEventKey(e,"Esc")||ze.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),ze.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},i.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),Er&&w0())return;this.menu.focus()}},i.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},i.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},i.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},r})(ye);ye.registerComponent("MenuButton",Bf);var Uf=(function(s){Ee(r,s);function r(i,n){var e,t=n.tracks;if(e=s.call(this,i,n)||this,e.items.length<=1&&e.hide(),!t)return Ge(e);var a=xt(Ge(e),e.update);return t.addEventListener("removetrack",a),t.addEventListener("addtrack",a),t.addEventListener("labelchange",a),e.player_.on("ready",a),e.player_.on("dispose",function(){t.removeEventListener("removetrack",a),t.removeEventListener("addtrack",a),t.removeEventListener("labelchange",a)}),e}return r})(Bf);ye.registerComponent("TrackButton",Uf);var h2=["Tab","Esc","Up","Down","Right","Left"],as=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.selectable=e.selectable,t.isSelected_=e.selected||!1,t.multiSelectable=e.multiSelectable,t.selected(t.isSelected_),t.selectable?t.multiSelectable?t.el_.setAttribute("role","menuitemcheckbox"):t.el_.setAttribute("role","menuitemradio"):t.el_.setAttribute("role","menuitem"),t}var i=r.prototype;
18return i.createEl=function(e,t,a){this.nonIconControl=!0;var o=s.prototype.createEl.call(this,"li",Pt({className:"vjs-menu-item",tabIndex:-1},t),a);return o.replaceChild(st("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)}),o.querySelector(".vjs-icon-placeholder")),o},i.handleKeyDown=function(e){h2.some(function(t){return ze.isEventKey(e,t)})||s.prototype.handleKeyDown.call(this,e)},i.handleClick=function(e){this.selected(!0)},i.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},r})(Lo);ye.registerComponent("MenuItem",as);var ss=(function(s){Ee(r,s);function r(n,e){var t,a=e.track,o=n.textTracks();e.label=a.label||a.language||"Unknown",e.selected=a.mode==="showing",t=s.call(this,n,e)||this,t.track=a,t.kinds=(e.kinds||[e.kind||t.track.kind]).filter(Boolean);var l=function(){for(var m=arguments.length,x=new Array(m),C=0;C<m;C++)x[C]=arguments[C];t.handleTracksChange.apply(Ge(t),x)},u=function(){for(var m=arguments.length,x=new Array(m),C=0;C<m;C++)x[C]=arguments[C];t.handleSelectedLanguageChange.apply(Ge(t),x)};if(n.on(["loadstart","texttrackchange"],l),o.addEventListener("change",l),o.addEventListener("selectedlanguagechange",u),t.on("dispose",function(){n.off(["loadstart","texttrackchange"],l),o.removeEventListener("change",l),o.removeEventListener("selectedlanguagechange",u)}),o.onchange===void 0){var d;t.on(["tap","click"],function(){if(typeof K.Event!="object")try{d=new K.Event("change")}catch{}d||(d=xe.createEvent("Event"),d.initEvent("change",!0,!0)),o.dispatchEvent(d)})}return t.handleTracksChange(),t}var i=r.prototype;return i.handleClick=function(e){var t=this.track,a=this.player_.textTracks();if(s.prototype.handleClick.call(this,e),!!a)for(var o=0;o<a.length;o++){var l=a[o];this.kinds.indexOf(l.kind)!==-1&&(l===t?l.mode!=="showing"&&(l.mode="showing"):l.mode!=="disabled"&&(l.mode="disabled"))}},i.handleTracksChange=function(e){var t=this.track.mode==="showing";t!==this.isSelected_&&this.selected(t)},i.handleSelectedLanguageChange=function(e){if(this.track.mode==="showing"){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},i.dispose=function(){this.track=null,s.prototype.dispose.call(this)},r})(as);ye.registerComponent("TextTrackMenuItem",ss);var fy=(function(s){Ee(r,s);function r(n,e){return e.track={player:n,kind:e.kind,kinds:e.kinds,default:!1,mode:"disabled"},e.kinds||(e.kinds=[e.kind]),e.label?e.track.label=e.label:e.track.label=e.kinds.join(" and ")+" off",e.selectable=!0,e.multiSelectable=!1,s.call(this,n,e)||this}var i=r.prototype;return i.handleTracksChange=function(e){for(var t=this.player().textTracks(),a=!0,o=0,l=t.length;o<l;o++){var u=t[o];if(this.options_.kinds.indexOf(u.kind)>-1&&u.mode==="showing"){a=!1;break}}a!==this.isSelected_&&this.selected(a)},i.handleSelectedLanguageChange=function(e){for(var t=this.player().textTracks(),a=!0,o=0,l=t.length;o<l;o++){var u=t[o];if(["captions","descriptions","subtitles"].indexOf(u.kind)>-1&&u.mode==="showing"){a=!1;break}}a&&(this.player_.cache_.selectedLanguage={enabled:!1})},r})(ss);ye.registerComponent("OffTextTrackMenuItem",fy);var _a=(function(s){Ee(r,s);function r(n,e){return e===void 0&&(e={}),e.tracks=n.textTracks(),s.call(this,n,e)||this}var i=r.prototype;return i.createItems=function(e,t){e===void 0&&(e=[]),t===void 0&&(t=ss);var a;this.label_&&(a=this.label_+" off"),e.push(new fy(this.player_,{kinds:this.kinds_,kind:this.kind_,label:a})),this.hideThreshold_+=1;var o=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var l=0;l<o.length;l++){var u=o[l];if(this.kinds_.indexOf(u.kind)>-1){var d=new t(this.player_,{track:u,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});d.addClass("vjs-"+u.kind+"-menu-item"),e.push(d)}}return e},r})(Uf);ye.registerComponent("TextTrackButton",_a);var hy=(function(s){Ee(r,s);function r(n,e){var t,a=e.track,o=e.cue,l=n.currentTime();return e.selectable=!0,e.multiSelectable=!1,e.label=o.text,e.selected=o.startTime<=l&&l<o.endTime,t=s.call(this,n,e)||this,t.track=a,t.cue=o,t}var i=r.prototype;return i.handleClick=function(e){s.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime)},r})(as);ye.registerComponent("ChaptersTrackMenuItem",hy);var qf=(function(s){Ee(r,s);function r(n,e,t){var a;return a=s.call(this,n,e,t)||this,a.selectCurrentItem_=function(){a.items.forEac
18h(function(o){o.selected(a.track_.activeCues[0]===o.cue)})},a}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-chapters-button "+s.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-chapters-button "+s.prototype.buildWrapperCSSClass.call(this)},i.update=function(e){if(!(e&&e.track&&e.track.kind!=="chapters")){var t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),s.prototype.update.call(this)):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&s.prototype.update.call(this)}},i.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var a=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);a&&a.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}},i.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var a=e[t];if(a.kind===this.kind_)return a}},i.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Ft(this.kind_))},i.createMenu=function(){return this.options_.title=this.getMenuCaption(),s.prototype.createMenu.call(this)},i.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var a=0,o=t.length;a<o;a++){var l=t[a],u=new hy(this.player_,{track:this.track_,cue:l});e.push(u)}return e},r})(_a);qf.prototype.kind_="chapters";qf.prototype.controlText_="Chapters";ye.registerComponent("ChaptersButton",qf);var Vf=(function(s){Ee(r,s);function r(n,e,t){var a;a=s.call(this,n,e,t)||this;var o=n.textTracks(),l=xt(Ge(a),a.handleTracksChange);return o.addEventListener("change",l),a.on("dispose",function(){o.removeEventListener("change",l)}),a}var i=r.prototype;return i.handleTracksChange=function(e){for(var t=this.player().textTracks(),a=!1,o=0,l=t.length;o<l;o++){var u=t[o];if(u.kind!==this.kind_&&u.mode==="showing"){a=!0;break}}a?this.disable():this.enable()},i.buildCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+s.prototype.buildWrapperCSSClass.call(this)},r})(_a);Vf.prototype.kind_="descriptions";Vf.prototype.controlText_="Descriptions";ye.registerComponent("DescriptionsButton",Vf);var Hf=(function(s){Ee(r,s);function r(n,e,t){return s.call(this,n,e,t)||this}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-subtitles-button "+s.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+s.prototype.buildWrapperCSSClass.call(this)},r})(_a);Hf.prototype.kind_="subtitles";Hf.prototype.controlText_="Subtitles";ye.registerComponent("SubtitlesButton",Hf);var jf=(function(s){Ee(r,s);function r(n,e){var t;return e.track={player:n,kind:e.kind,label:e.kind+" settings",selectable:!1,default:!1,mode:"disabled"},e.selectable=!1,e.name="CaptionSettingsMenuItem",t=s.call(this,n,e)||this,t.addClass("vjs-texttrack-settings"),t.controlText(", opens "+e.kind+" settings dialog"),t}var i=r.prototype;return i.handleClick=function(e){this.player().getChild("textTrackSettings").open()},r})(ss);ye.registerComponent("CaptionSettingsMenuItem",jf);var Gf=(function(s){Ee(r,s);function r(n,e,t){return s.call(this,n,e,t)||this}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-captions-button "+s.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-captions-button "+s.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){var e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new jf(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),s.prototype.createItems.call(this,e)},r})(_a);Gf.prototype.kind_="captions";Gf.prototype.controlText_="Captions";ye.registerComponent("CaptionsButton",Gf);var py=(function(s){Ee(r,s);function r(){return s.apply(this,arguments)||this}var i=r.prototype;return i.createEl=function(e,t,a){var o=s.prototype.createEl.call(this,e,t,a),l=o.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(l.appendChild(st("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),l.appendChild(st("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")}))),o},r})(ss);ye.registerComponent("SubsCapsMenuItem",py);var Wf=(function(s){Ee(r,s);function r(n,e){var t;return e===void 0&&(e={}),t=s.call(this,n,e)||this,t.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(t.player_.language_)>-1&&(t.label_="captions"),t.menuButton_.controlText(Ft(t.label_)),t}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-subs-caps-button "+s.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+s.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){var e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new jf(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=s.prototype.createItems.call(this,e,py),e},r})(_a);Wf.prototype.kinds_=["captions","subtitles"];Wf.prototype.controlText_="Subtitles";ye.registerComponent("SubsCapsButton",Wf);var my=(function(s){Ee(r,s);function r(n,e){var t,a=e.track,o=n.audioTracks();e.label=a.label||a.language||"Unknown",e.selected=a.enabled,t=s.call(this,n,e)||this,t.track=a,t.addClass("vjs-"+a.kind+"-menu-item");var l=function(){for(var d=arguments.length,f=new Array(d),m=0;m<d;m++)f[m]=arguments[m];t.handleTracksChange.apply(Ge(t),f)};return o.addEventListener("change",l),t.on("dispose",function(){o.removeEventListener("change",l)}),t}var i=r.prototype;return i.createEl=function(e,t,a){var o=s.prototype.createEl.call(this,e,t,a),l=o.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="main-desc"&&(l.appendChild(st("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),l.appendChild(st("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),o},i.handleClick=function(e){if(s.prototype.handleClick.call(this,e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks)for(var t=this.player_.audioTracks(),a=0;a<t.length;a++){var o=t[a];o!==this.track&&(o.enabled=o===this.track)}},i.handleTracksChange=function(e){this.selected(this.track.enabled)},r})(as);ye.registerComponent("AudioTrackMenuItem",my);var vy=(function(s){Ee(r,s);function r(n,e){return e===void 0&&(e={}),e.tracks=n.audioTracks(),s.call(this,n,e)||this}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-audio-button "+s.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-audio-button "+s.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(e){e===void 0&&(e=[]),this.hideThreshold_=1;for(var t=this.player_.audioTracks(),a=0;a<t.length;a++){var o=t[a];e.push(new my(this.player_,{track:o,selectable:!0,multiSelectable:!1}))}return e},r})(Uf);vy.prototype.controlText_="Audio Track";ye.registerComponent("AudioTrackButton",vy);var zf=(function(s){Ee(r,s);function r(n,e){var t,a=e.rate,o=parseFloat(a,10);return e.label=a,e.selected=o===n.playbackRate(),e.selectable=!0,e.multiSelectable=!1,t=s.call(this,n,e)||this,t.label=a,t.rate=o,t.on(n,"ratechange",function(l){return t.update(l)}),t}var i=r.prototype;return i.handleClick=function(e){s.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},i.update=function(e){this.selected(this.player().playbackRate()===this.rate)},r})(as);zf.prototype.contentElType="button";ye.registerComponent("PlaybackRateMenuItem",zf);var gy=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.menuButton_.el_.setAttribute("aria-describedby",t.labelElId_),t.updateVisibility(),t.updateLabel(),t.on(n,"loadstart",function(a){return t.updateVisibility(a)}),t.on(n,"ratechange",function(a){return t.updateLabel(a)}),t.on(n,"playbackrateschange",function(a){return t.handlePlaybackRateschange(a)}),t}var i=r.prototype;return i.createEl=function(){var e=s.prototype.createEl.call(this);return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=st("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e},i.dispose=function(){this.labelEl_=null,s.prototype.dispose.call(this)},i.buildCSSClass=function(){return"vjs-playback-rate "+s.prototype.buildCSSClass.call(this)},i.buildWrapperCSSClass=function(){return"vjs-playback-rate "+s.prototype.buildWrapperCSSClass.call(this)},i.createItems=function(){for(var e=this.playbackRates(),t=[],a=e.length-1;a>=0;a--)t.push(new zf(this.player(),{rate:e[a]+"x"}));return t},i.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},i.handleClick=function(e){var t=this.player().playbackRate(),a=this.playbackRates(),o=a.indexOf(t),l=(o+1)%a.length;this.player().playbackRate(a[l])},i.handlePlaybackRateschange=function(e){this.update()},i.playbackRates=function(){var e=this.player();return e.playbackRates&&e.playbackRates()||[]},i.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},i.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},i.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")},r})(Bf);gy.prototype.controlText_="Playback Rate";ye.registerComponent("PlaybackRateMenuButton",gy);var yy=(function(s){Ee(r,s);function r(){return s.apply(this,arguments)||this}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-spacer "+s.prototype.buildCSSClass.call(this)},i.createEl=function(e,t,a){return e===void 0&&(e="div"),t===void 0&&(t={}),a===void 0&&(a={}),t.className||(t.className=this.buildCSSClass()),s.prototype.createEl.call(this,e,t,a)},r})(ye);ye.registerComponent("Spacer",yy);var p2=(function(s){Ee(r,s);function r(){return s.apply(this,arguments)||this}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-custom-control-spacer "+s.prototype.buildCSSClass.call(this)},i.createEl=function(){return s.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:" "})},r})(yy);ye.registerComponent("CustomControlSpacer",p2);var io=(function(s){Ee(r,s);function r(){return s.apply(this,arguments)||this}var i=r.prototype;return i.createEl=function(){return s.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},r})(ye);io.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]};"exitPictureInPicture"in xe&&io.prototype.options_.children.splice(io.prototype.options_.children.length-1,0,"pictureInPictureToggle");ye.registerComponent("ControlBar",io);var _y=(function(s){Ee(r,s);function r(n,e){var t;return t=s.call(this,n,e)||this,t.on(n,"error",function(a){return t.open(a)}),t}var i=r.prototype;return i.buildCSSClass=function(){return"vjs-error-display "+s.prototype.buildCSSClass.call(this)},i.content=function(){var e=this.player().error();return e?this.localize(e.message):""},r})(va);_y.prototype.options_=ai({}
18,va.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});ye.registerComponent("ErrorDisplay",_y);var qu="vjs-text-track-settings",gp=["#000","Black"],yp=["#00F","Blue"],_p=["#0FF","Cyan"],bp=["#0F0","Green"],Tp=["#F0F","Magenta"],Sp=["#F00","Red"],xp=["#FFF","White"],Ep=["#FF0","Yellow"],Vu=["1","Opaque"],Hu=["0.5","Semi-Transparent"],Cp=["0","Transparent"],An={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[gp,xp,Sp,bp,yp,Ep,Tp,_p]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Vu,Hu,Cp]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[xp,gp,Sp,bp,yp,Ep,Tp,_p]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(r){return r==="1.00"?null:Number(r)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Vu,Hu]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Cp,Hu,Vu]}};An.windowColor.options=An.backgroundColor.options;function by(s,r){if(r&&(s=r(s)),s&&s!=="none")return s}function m2(s,r){var i=s.options[s.options.selectedIndex].value;return by(i,r)}function v2(s,r,i){if(r){for(var n=0;n<s.options.length;n++)if(by(s.options[n].value,i)===r){s.selectedIndex=n;break}}}var g2=(function(s){Ee(r,s);function r(n,e){var t;return e.temporary=!1,t=s.call(this,n,e)||this,t.updateDisplay=t.updateDisplay.bind(Ge(t)),t.fill(),t.hasBeenOpened_=t.hasBeenFilled_=!0,t.endDialog=st("p",{className:"vjs-control-text",textContent:t.localize("End of dialog window.")}),t.el().appendChild(t.endDialog),t.setDefaults(),e.persistTextTrackSettings===void 0&&(t.options_.persistTextTrackSettings=t.options_.playerOptions.persistTextTrackSettings),t.on(t.$(".vjs-done-button"),"click",function(){t.saveSettings(),t.close()}),t.on(t.$(".vjs-default-button"),"click",function(){t.setDefaults(),t.updateDisplay()}),ta(An,function(a){t.on(t.$(a.selector),"change",t.updateDisplay)}),t.options_.persistTextTrackSettings&&t.restoreSettings(),t}var i=r.prototype;return i.dispose=function(){this.endDialog=null,s.prototype.dispose.call(this)},i.createElSelect_=function(e,t,a){var o=this;t===void 0&&(t=""),a===void 0&&(a="label");var l=An[e],u=l.id.replace("%s",this.id_),d=[t,u].join(" ").trim();return["<"+a+' id="'+u+'" class="'+(a==="label"?"vjs-label":"")+'">',this.localize(l.label),"</"+a+">",'<select aria-labelledby="'+d+'">'].concat(l.options.map(function(f){var m=u+"-"+f[1].replace(/\W+/g,"");return['<option id="'+m+'" value="'+f[0]+'" ','aria-labelledby="'+d+" "+m+'">',o.localize(f[1]),"</option>"].join("")})).concat("</select>").join("")},i.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},i.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">
18',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},i.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},i.createElColors_=function(){return st("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},i.createElFont_=function(){return st("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},i.createElControls_=function(){var e=this.localize("restore all settings to the default values");return st("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},i.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},i.label=function(){return this.localize("Caption Settings Dialog")},i.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},i.buildCSSClass=function(){return s.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},i.getValues=function(){var e=this;return ax(An,function(t,a,o){var l=m2(e.$(a.selector),a.parser);return l!==void 0&&(t[o]=l),t},{})},i.setValues=function(e){var t=this;ta(An,function(a,o){v2(t.$(a.selector),e[o],a.parser)})},i.setDefaults=function(){var e=this;ta(An,function(t){var a=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=a})},i.restoreSettings=function(){var e;try{e=JSON.parse(K.localStorage.getItem(qu))}catch(t){Ye.warn(t)}e&&this.setValues(e)},i.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?K.localStorage.setItem(qu,JSON.stringify(e)):K.localStorage.removeItem(qu)}catch(t){Ye.warn(t)}}},i.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},i.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,a=e&&e.captionsButton;t?t.focus():a&&a.focus()},r})(va);ye.registerComponent("TextTrackSettings",g2);var y2=(function(s){Ee(r,s);function r(n,e){var t,a=e.ResizeObserver||K.ResizeObserver;e.ResizeObserver===null&&(a=!1);var o=St({createEl:!a,reportTouchActivity:!1},e);return t=s.call(this,n,o)||this,t.ResizeObserver=e.ResizeObserver||K.ResizeObserver,t.loadListener_=null,t.resizeObserver_=null,t.debouncedHandler_=vx(function(){t.resizeHandler()},100,!1,Ge(t)),a?(t.resizeObserver_=new t.ResizeObserver(t.debouncedHandler_),t.resizeObserver_.observe(n.el())):(t.loadListener_=function(){if(!(!t.el_||!t.el_.contentWindow)){var l=t.debouncedHandler_,u=t.unloadListener_=function(){dr(this,"resize",l),dr(this,"unload",u),u=null};Br(t.el_.contentWindow,"unload",u),Br(t.el_.contentWindow,"resize",l)}},t.one("load",t.loadListener_)),t}var i=r.prototype;return i.createEl=function(){return s.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})},i.resizeHandler=function(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")},i.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,s.prototype.dispose.call(this)},r})(ye);ye.registerComponent("ResizeManager",y2);var _2={trackingThreshold:20,liveTolerance:15},b2=(function(s){Ee(r,s);function r(n,e){var t,a=St(_2,e,{createEl:!1});return t=s.call(this,n,a)||this,t.handleVisibilityChange_=function(o){return t.handleVisibilityChange(o)},t.trackLiveHandler_=function(){return t.trackLive_()},t.handlePlay_=function(o){return t.handlePlay(o)},t.handleFirstTimeupdate_=function(o){return t.handleFirstTimeupdate(o)},t.handleSeeked_=function(o){return t.handleSeeked(o)},t.seekToLiveEdge_=function(o){return t.seekToLiveEdge(o)},t.reset_(),t.on(t.player_,"durationchange",function(o){return t.handleDurationchange(o)}),t.on(t.player_,"canplay",function(){return t.toggleTracking()}),rs&&"hidden"in xe&&"visibilityState"in xe&&t.on(xe,"visibilitychange",t.handleVisibilityChange_),t}var i=r.prototype;return i.handleVisibilityChange=function(){this.player_.duration()===1/0&&(xe.hidden?this.stopTracking():this.startTracking())},i.trackLive_=function(){var e=this.player_.seekable();if(!(!e||!e.length)){var t=Number(K.performance.now().toFixed(4)),a=this.lastTime_===-1?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+a;var o=this.liveCurrentTime(),l=this.player_.currentTime(),u=this.player_.paused()||this.seekedBehindLive_||Math.abs(o-l)>this.options_.liveTolerance;(!this.timeupdateSeen_||o===1/0)&&(u=!1),u!==this.behindLiveEdge_&&(this.behindLiveEdge_=u,this.trigger("liveedgechange"))}},i.handleDurationchange=function(){this.toggleTracking()},i.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},i.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,si),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))},i.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)},i.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()},i.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)},i.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)},i.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0},i.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},i.seekableEnd=function(){for(var e=this.player_.seekable(),t=[],a=e?e.length:0;a--;)t.push(e.end(a));return t.length?t.sort()[t.length-1]:1/0},i.seekableStart=function(){for(var e=this.player_.seekable(),t=[],a=e?e.length:0;a--;)t.push(e.start(a));return t.length?t.sort()[0]:0}
18,i.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},i.isLive=function(){return this.isTracking()},i.atLiveEdge=function(){return!this.behindLiveEdge()},i.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},i.pastSeekEnd=function(){var e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},i.behindLiveEdge=function(){return this.behindLiveEdge_},i.isTracking=function(){return typeof this.trackingInterval_=="number"},i.seekToLiveEdge=function(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))},i.dispose=function(){this.off(xe,"visibilitychange",this.handleVisibilityChange_),this.stopTracking(),s.prototype.dispose.call(this)},r})(ye);ye.registerComponent("LiveTracker",b2);var zd=function(r){var i=r.el();if(i.hasAttribute("src"))return r.triggerSourceset(i.src),!0;var n=r.$$("source"),e=[],t="";if(!n.length)return!1;for(var a=0;a<n.length;a++){var o=n[a].src;o&&e.indexOf(o)===-1&&e.push(o)}return e.length?(e.length===1&&(t=e[0]),r.triggerSourceset(t),!0):!1},T2=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(r){var i=xe.createElement(this.nodeName.toLowerCase());i.innerHTML=r;for(var n=xe.createDocumentFragment();i.childNodes.length;)n.appendChild(i.childNodes[0]);return this.innerText="",K.Element.prototype.appendChild.call(this,n),this.innerHTML}}),Ty=function(r,i){for(var n={},e=0;e<r.length&&(n=Object.getOwnPropertyDescriptor(r[e],i),!(n&&n.set&&n.get));e++);return n.enumerable=!0,n.configurable=!0,n},S2=function(r){return Ty([r.el(),K.HTMLMediaElement.prototype,K.Element.prototype,T2],"innerHTML")},wp=function(r){var i=r.el();if(!i.resetSourceWatch_){var n={},e=S2(r),t=function(o){return function(){for(var l=arguments.length,u=new Array(l),d=0;d<l;d++)u[d]=arguments[d];var f=o.apply(i,u);return zd(r),f}};["append","appendChild","insertAdjacentHTML"].forEach(function(a){i[a]&&(n[a]=i[a],i[a]=t(n[a]))}),Object.defineProperty(i,"innerHTML",St(e,{set:t(e.set)})),i.resetSourceWatch_=function(){i.resetSourceWatch_=null,Object.keys(n).forEach(function(a){i[a]=n[a]}),Object.defineProperty(i,"innerHTML",e)},r.one("sourceset",i.resetSourceWatch_)}},x2=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?K0(K.Element.prototype.getAttribute.call(this,"src")):""},set:function(r){return K.Element.prototype.setAttribute.call(this,"src",r),r}}),E2=function(r){return Ty([r.el(),K.HTMLMediaElement.prototype,x2],"src")},C2=function(r){if(r.featuresSourceset){var i=r.el();if(!i.resetSourceset_){var n=E2(r),e=i.setAttribute,t=i.load;Object.defineProperty(i,"src",St(n,{set:function(o){var l=n.set.call(i,o);return r.triggerSourceset(i.src),l}})),i.setAttribute=function(a,o){var l=e.call(i,a,o);return/src/i.test(a)&&r.triggerSourceset(i.src),l},i.load=function(){var a=t.call(i);return zd(r)||(r.triggerSourceset(""),wp(r)),a},i.currentSrc?r.triggerSourceset(i.currentSrc):zd(r)||wp(r),i.resetSourceset_=function(){i.resetSourceset_=null,i.load=t,i.setAttribute=e,Object.defineProperty(i,"src",n),i.resetSourceWatch_&&i.resetSourceWatch_()}}}},$f=function(r,i,n,e){e===void 0&&(e=!0);var t=function(l){return Object.defineProperty(r,i,{value:l,enumerable:!0,writable:!0})},a={configurable:!0,enumerable:!0,get:function(){var l=n();return t(l),l}};return e&&(a.set=t),Object.defineProperty(r,i,a)},Ae=(function(s){Ee(r,s);function r(n,e){var t;t=s.call(this,n,e)||this;var a=n.source,o=!1;if(t.featuresVideoFrameCallback=t.featuresVideoFrameCallback&&t.el_.tagName==="VIDEO",a&&(t.el_.currentSrc!==a.src||n.tag&&n.tag.initNetworkState_===3)?t.setSource(a):t.handleLateInit_(t.el_),n.enableSourceset&&t.setupSourcesetHandling_(),t.isScrubbing_=!1,t.el_.hasChildNodes()){for(var l=t.el_.childNodes,u=l.length,d=[];u--;){var f=l[u],m=f.nodeName.toLowerCase();m==="track"&&(t.featuresNativeTextTracks?(t.remoteTextTrackEls().addTrackElement_(f),t.remoteTextTracks().addTrack(f.track),t.textTracks().addTrack(f.track),!o&&!t.el_.hasAttribute("crossorigin")&&Io(f.src)&&(o=!0)):d.push(f))}for(var x=0;x<d.length;x++)t.el_.removeChild(d[x])}return t.proxyNativeTracks_(),t.featuresNativeTextTracks&&o&&Ye.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
19This may prevent text tracks from loading.`),t.restoreMetadataTracksInIOSNativePlayer_(),(oa||Sf||T0)&&n.nativeControlsForTouch===!0&&t.setControls(!0),t.proxyWebkitFullscreen_(),t.triggerReady(),t}var i=r.prototype;return i.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),r.disposeMediaElement(this.el_),this.options_=null,s.prototype.dispose.call(this)},i.setupSourcesetHandling_=function(){C2(this)},i.restoreMetadataTracksInIOSNativePlayer_=function(){var e=this.textTracks(),t,a=function(){t=[];for(var u=0;u<e.length;u++){var d=e[u];d.kind==="metadata"&&t.push({track:d,storedMode:d.mode})}};a(),e.addEventListener("change",a),this.on("dispose",function(){return e.removeEventListener("change",a)});var o=function l(){for(var u=0;u<t.length;u++){var d=t[u];d.track.mode==="disabled"&&d.track.mode!==d.storedMode&&(d.track.mode=d.storedMode)}e.removeEventListener("change",l)};this.on("webkitbeginfullscreen",function(){e.removeEventListener("change",a),e.removeEventListener("change",o),e.addEventListener("change",o)}),this.on("webkitendfullscreen",function(){e.removeEventListener("change",a),e.addEventListener("change",a),e.removeEventListener("change",o)})},i.overrideNative_=function(e,t){var a=this;if(t===this["featuresNative"+e+"Tracks"]){var o=e.toLowerCase();this[o+"TracksListeners_"]&&Object.keys(this[o+"TracksListeners_"]).forEac
19h(function(l){var u=a.el()[o+"Tracks"];u.removeEventListener(l,a[o+"TracksListeners_"][l])}),this["featuresNative"+e+"Tracks"]=!t,this[o+"TracksListeners_"]=null,this.proxyNativeTracksForType_(o)}},i.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},i.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},i.proxyNativeTracksForType_=function(e){var t=this,a=$r[e],o=this.el()[a.getterName],l=this[a.getterName]();if(!(!this["featuresNative"+a.capitalName+"Tracks"]||!o||!o.addEventListener)){var u={change:function(m){var x={type:"change",target:l,currentTarget:l,srcElement:l};l.trigger(x),e==="text"&&t[da.remoteText.getterName]().trigger(x)},addtrack:function(m){l.addTrack(m.track)},removetrack:function(m){l.removeTrack(m.track)}},d=function(){for(var m=[],x=0;x<l.length;x++){for(var C=!1,L=0;L<o.length;L++)if(o[L]===l[x]){C=!0;break}C||m.push(l[x])}for(;m.length;)l.removeTrack(m.shift())};this[a.getterName+"Listeners_"]=u,Object.keys(u).forEach(function(f){var m=u[f];o.addEventListener(f,m),t.on("dispose",function(x){return o.removeEventListener(f,m)})}),this.on("loadstart",d),this.on("dispose",function(f){return t.off("loadstart",d)})}},i.proxyNativeTracks_=function(){var e=this;$r.names.forEach(function(t){e.proxyNativeTracksForType_(t)})},i.createEl=function(){var e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){var t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),r.disposeMediaElement(e),e=t}else{e=xe.createElement("video");var a=this.options_.tag&&Oi(this.options_.tag),o=St({},a);(!oa||this.options_.nativeControlsForTouch!==!0)&&delete o.controls,D0(e,Pt(o,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&ua(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var l=["loop","muted","playsinline","autoplay"],u=0;u<l.length;u++){var d=l[u],f=this.options_[d];typeof f<"u"&&(f?ua(e,d,d):wo(e,d),e[d]=f)}return e},i.handleLateInit_=function(e){if(!(e.networkState===0||e.networkState===3)){if(e.readyState===0){var t=!1,a=function(){t=!0};this.on("loadstart",a);var o=function(){t||this.trigger("loadstart")};this.on("loadedmetadata",o),this.ready(function(){this.off("loadstart",a),this.off("loadedmetadata",o),t||this.trigger("loadstart")});return}var l=["loadstart"];l.push("loadedmetadata"),e.readyState>=2&&l.push("loadeddata"),e.readyState>=3&&l.push("canplay"),e.readyState>=4&&l.push("canplaythrough"),this.ready(function(){l.forEach(function(u){this.trigger(u)},this)})}},i.setScrubbing=function(e){this.isScrubbing_=e},i.scrubbing=function(){return this.isScrubbing_},i.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Co?this.el_.fastSeek(e):this.el_.currentTime=e}catch(t){Ye(t,"Video is not ready. (Video.js)")}},i.duration=function(){var e=this;if(this.el_.duration===1/0&&Wi&&zi&&this.el_.currentTime===0){var t=function a(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",a))};return this.on("timeupdate",t),NaN}return this.el_.duration||NaN},i.width=function(){return this.el_.offsetWidth},i.height=function(){return this.el_.offsetHeight},i.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},a=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",a),this.on("dispose",function(){e.off("webkitbeginfullscreen",a),e.off("webkitendfullscreen",t)})}},i.supportsFullScreen=function(){if(typeof this.el_.webkitEnterFullScreen=="function"){var e=K.navigator&&K.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},i.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)yi(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}},0);else try{e.webkitEnterFullScreen()}catch(t){this.trigger("fullscreenerror",t)}},i.exitFullScreen=function(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()},i.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},i.requestVideoFrameCallback=function(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):s.prototype.requestVideoFrameCallback.call(this,e)},i.cancelVideoFrameCallback=function(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):s.prototype.cancelVideoFrameCallback.call(this,e)},i.src=function(e){if(e===void 0)return this.el_.src;this.setSrc(e)},i.reset=function(){r.resetMediaElement(this.el_)},i.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},i.setControls=function(e){this.el_.controls=!!e},i.addTextTrack=function(e,t,a){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,a):s.prototype.addTextTrack.call(this,e,t,a)},i.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return s.prototype.createRemoteTextTrack.call(this,e);var t=xe.createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t},i.addRemoteTextTrack=function(e,t){var a=s.prototype.addRemoteTextTrack.call(this,e,t);return this.featuresNativeTextTracks&&this.el().appendChild(a),a},i.removeRemoteTextTrack=function(e){if(s.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var t=this.$$("track"),a=t.length;a--;)(e===t[a]||e===t[a].track)&&this.el().removeChild(t[a])},i.getVideoPlaybackQuality=function(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();var e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),K.performance&&typeof K.performance.now=="function"?e.creationTime=K.performance.now():K.performance&&K.performance.timing&&typeof K.performance.timing.navigationStart=="number"&&(e.creationTime=K.Date.now()-K.performance.timing.navigationStart),e},r})(_t);$f(Ae,"TEST_VID",function(){if(ha()){var s=xe.createElement("video"),r=xe.createElement("track");return r.kind="captions",r.srclang="en",r.label="English",s.appendChild(r),s}});Ae.isSupported=function(){try{Ae.TEST_VID.volume=.5}catch{return!1}return!!(Ae.TEST_VID&&Ae.TEST_VID.canPlayType)};Ae.canPlayType=function(s){return Ae.TEST_VID.canPlayType(s)};Ae.canPlaySource=function(s,r){return Ae.canPlayType(s.type)};Ae.canControlVolume=function(){try{var s=Ae.TEST_VID.volume;Ae.TEST_VID.volume=s/2+.1;var r=s!==Ae.TEST_VID.volume;return r&&Er?(K.setTimeout(function(){Ae&&Ae.prototype&&(Ae.prototype.featuresVolumeControl=s!==Ae.TEST_VID.volume)}),!1):r}catch{return!1}};Ae.canMuteVolume=function(){try{var s=Ae.TEST_VID.muted;return Ae.TEST_VID.muted=!s,Ae.TEST_VID.muted?ua(Ae.TEST_VID,"muted","muted"):wo(Ae.TEST_VID,"muted","muted"),s!==Ae.TEST_VID.muted}catch{return!1}};Ae.canControlPlaybackRate=function(){if(Wi&&zi&&x0<58)return!1;try{var s=Ae.TEST_VID.playbackRate;return Ae.TEST_VID.playbackRate=s/2+.1,s!==Ae.TEST_VID.playbackRate}catch{return!1}};Ae.canOverrideAttributes=function(){try{var s=function(){};Object.defineProperty(xe.createElement("video"),"src",{get:s,set:s}),Object.defineProperty(xe.createElement("audio"),"src",{get:s,set:s}),Object.defineProperty(xe.createElement("video"),"innerHTML",{get:s,set:s}),Object.defineProperty(xe.createElement("audio"),"innerHTML",{get:s,set:s})}catch{return!1}return!0};Ae.supportsNativeTextTracks=function(){return Co||Er&&zi};Ae.supportsNativeVideoTracks=function(){return!!(Ae.TEST_VID&&Ae.TEST_VID.videoTracks)};Ae.supportsNativeAudioTracks=function(){return!!(Ae.TEST_VID&&Ae.TEST_VID.audioTracks)};Ae.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEac
19h(function(s){var r=s[0],i=s[1];$f(Ae.prototype,r,function(){return Ae[i]()},!0)});Ae.prototype.featuresVolumeControl=Ae.canControlVolume();Ae.prototype.movingMediaElementInDOM=!Er;Ae.prototype.featuresFullscreenResize=!0;Ae.prototype.featuresProgressEvents=!0;Ae.prototype.featuresTimeupdateEvents=!0;Ae.prototype.featuresVideoFrameCallback=!!(Ae.TEST_VID&&Ae.TEST_VID.requestVideoFrameCallback);var no;Ae.patchCanPlayType=function(){_f>=4&&!S0&&!zi&&(no=Ae.TEST_VID&&Ae.TEST_VID.constructor.prototype.canPlayType,Ae.TEST_VID.constructor.prototype.canPlayType=function(s){var r=/^application\/(?:x-|vnd\.apple\.)mpegurl/i;return s&&r.test(s)?"maybe":no.call(this,s)})};Ae.unpatchCanPlayType=function(){var s=Ae.TEST_VID.constructor.prototype.canPlayType;return no&&(Ae.TEST_VID.constructor.prototype.canPlayType=no),s};Ae.patchCanPlayType();Ae.disposeMediaElement=function(s){if(s){for(s.parentNode&&s.parentNode.removeChild(s);s.hasChildNodes();)s.removeChild(s.firstChild);s.removeAttribute("src"),typeof s.load=="function"&&(function(){try{s.load()}catch{}})()}};Ae.resetMediaElement=function(s){if(s){for(var r=s.querySelectorAll("source"),i=r.length;i--;)s.removeChild(r[i]);s.removeAttribute("src"),typeof s.load=="function"&&(function(){try{s.load()}catch{}})()}};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(s){Ae.prototype[s]=function(){return this.el_[s]||this.el_.hasAttribute(s)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(s){Ae.prototype["set"+Ft(s)]=function(r){this.el_[s]=r,r?this.el_.setAttribute(s,s):this.el_.removeAttribute(s)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(s){Ae.prototype[s]=function(){return this.el_[s]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(s){Ae.prototype["set"+Ft(s)]=function(r){this.el_[s]=r}});["pause","load","play"].forEach(function(s){Ae.prototype[s]=function(){return this.el_[s]()}});_t.withSourceHandlers(Ae);Ae.nativeSourceHandler={};Ae.nativeSourceHandler.canPlayType=function(s){try{return Ae.TEST_VID.canPlayType(s)}catch{return""}};Ae.nativeSourceHandler.canHandleSource=function(s,r){if(s.type)return Ae.nativeSourceHandler.canPlayType(s.type);if(s.src){var i=Df(s.src);return Ae.nativeSourceHandler.canPlayType("video/"+i)}return""};Ae.nativeSourceHandler.handleSource=function(s,r,i){r.setSrc(s.src)};Ae.nativeSourceHandler.dispose=function(){};Ae.registerSourceHandler(Ae.nativeSourceHandler);_t.registerTech("Html5",Ae);var Sy=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],ju={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},$d=["tiny","xsmall","small","medium","large","xlarge","huge"],zs={};$d.forEach(function(s){var r=s.charAt(0)==="x"?"x-"+s.substring(1):s;zs[s]="vjs-layout-"+r});var w2={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},Vt=(function(s){Ee(r,s);function r(n,e,t){var a;if(n.id=n.id||e.id||"vjs_video_"+$i(),e=Pt(r.getTagSettings(n),e),e.initChildren=!1,e.createEl=!1,e.evented=!1,e.reportTouchActivity=!1,!e.language)if(typeof n.closest=="function"){var o=n.closest("[lang]");o&&o.getAttribute&&(e.language=o.getAttribute("lang"))}else for(var l=n;l&&l.nodeType===1;){if(Oi(l).hasOwnProperty("lang")){e.language=l.getAttribute("lang");break}l=l.parentNode}if(a=s.call(this,null,e,t)||this,a.boundDocumentFullscreenChange_=function(m){return a.documentFullscreenChange_(m)},a.boundFullWindowOnEscKey_=function(m){return a.fullWindowOnEscKey(m)},a.boundUpdateStyleEl_=function(m){return a.updateStyleEl_(m)},a.boundApplyInitTime_=function(m){return a.applyInitTime_(m)},a.boundUpdateCurrentBreakpoint_=function(m){return a.updateCurrentBreakpoint_(m)},a.boundHandleTechClick_=function(m){return a.handleTechClick_(m)},a.boundHandleTechDoubleClick_=function(m){return a.handleTechDoubleClick_(m)},a.boundHandleTechTouchStart_=function(m){return a.handleTechTouchStart_(m)},a.boundHandleTechTouchMove_=function(m){return a.handleTechTouchMove_(m)},a.boundHandleTechTouchEnd_=function(m){return a.handleTechTouchEnd_(m)},a.boundHandleTechTap_=function(m){return a.handleTechTap_(m)},a.isFullscreen_=!1,a.log=y0(a.id_),a.fsApi_=Zs,a.isPosterFromTech_=!1,a.queuedCallbacks_=[],a.isReady_=!1,a.hasStarted_=!1,a.userActive_=!1,a.debugEnabled_=!1,a.audioOnlyMode_=!1,a.audioPosterMode_=!1,a.audioOnlyCache_={playerHe
19ight:null,hiddenChildren:[]},!a.options_||!a.options_.techOrder||!a.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(a.tag=n,a.tagAttributes=n&&Oi(n),a.language(a.options_.language),e.languages){var u={};Object.getOwnPropertyNames(e.languages).forEach(function(m){u[m.toLowerCase()]=e.languages[m]}),a.languages_=u}else a.languages_=r.prototype.options_.languages;a.resetCache_(),a.poster_=e.poster||"",a.controls_=!!e.controls,n.controls=!1,n.removeAttribute("controls"),a.changingSrc_=!1,a.playCallbacks_=[],a.playTerminatedQueue_=[],n.hasAttribute("autoplay")?a.autoplay(!0):a.autoplay(a.options_.autoplay),e.plugins&&Object.keys(e.plugins).forEach(function(m){if(typeof a[m]!="function")throw new Error('plugin "'+m+'" does not exist')}),a.scrubbing_=!1,a.el_=a.createEl(),wf(Ge(a),{eventBusKey:"el_"}),a.fsApi_.requestFullscreen&&(Br(xe,a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_),a.on(a.fsApi_.fullscreenchange,a.boundDocumentFullscreenChange_)),a.fluid_&&a.on(["playerreset","resize"],a.boundUpdateStyleEl_);var d=St(a.options_);e.plugins&&Object.keys(e.plugins).forEach(function(m){a[m](e.plugins[m])}),e.debug&&a.debug(!0),a.options_.playerOptions=d,a.middleware_=[],a.playbackRates(e.playbackRates),a.initChildren(),a.isAudio(n.nodeName.toLowerCase()==="audio"),a.controls()?a.addClass("vjs-controls-enabled"):a.addClass("vjs-controls-disabled"),a.el_.setAttribute("role","region"),a.isAudio()?a.el_.setAttribute("aria-label",a.localize("Audio Player")):a.el_.setAttribute("aria-label",a.localize("Video Player")),a.isAudio()&&a.addClass("vjs-audio"),a.flexNotSupported_()&&a.addClass("vjs-no-flex"),oa&&a.addClass("vjs-touch-enabled"),Er||a.addClass("vjs-workinghover"),r.players[a.id_]=Ge(a);var f=m0.split(".")[0];return a.addClass("vjs-v"+f),a.userActive(!0),a.reportUserActivity(),a.one("play",function(m){return a.listenForUserActivity_(m)}),a.on("stageclick",function(m){return a.handleStageClick_(m)}),a.on("keydown",function(m){return a.handleKeyDown(m)}),a.on("languagechange",function(m){return a.handleLanguagechange(m)}),a.breakpoints(a.options_.breakpoints),a.responsive(a.options_.responsive),a.on("ready",function(){a.audioPosterMode(a.options_.audioPosterMode),a.audioOnlyMode(a.options_.audioOnlyMode)}),a}var i=r.prototype;return i.dispose=function(){var e=this;this.trigger("dispose"),this.off("dispose"),dr(xe,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),dr(xe,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),r.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),zx(this),br.names.forEach(function(t){var a=br[t],o=e[a.getterName]();o&&o.off&&o.off()}),s.prototype.dispose.call(this,{restoreEl:this.options_.restoreEl})},i.createEl=function(){var e=this.tag,t,a=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player"),o=this.tag.tagName.toLowerCase()==="video-js";a?t=this.el_=e.parentNode:o||(t=this.el_=s.prototype.createEl.call(this,"div"));var l=Oi(e);if(o){for(t=this.el_=e,e=this.tag=xe.createElement("video");t.children.length;)e.appendChild(t.firstChild);Pn(t,"video-js")||Bi(t,"video-js"),t.appendChild(e),a=this.playerElIngest_=t,Object.keys(t).forEach(function(C){try{e[C]=t[C]}catch{}})}if(e.setAttribute("tabindex","-1"),l.tabindex="-1",(rs||zi&&E0)&&(e.setAttribute("role","application"),l.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in l&&delete l.width,"height"in l&&delete l.height,Object.getOwnPropertyNames(l).forEach(function(C){o&&C==="class"||t.setAttribute(C,l[C]),o&&e.setAttribute(C,l[C])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=t.player=this,this.addClass("vjs-paused"),K.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=U0("vjs-styles-dimensions");var u=dn(".vjs-styles-defaults"),d=dn("head");d.insertBefore(this.styleEl_,u?u.nextSibling:d.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(var f=e.getElementsByTagName("a"),m=0;m<f.length;m++){var x=f.item(m);Bi(x,"vjs-hidden"),x.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!a&&e.parentNode.insertBefore(t,e),Ud(e,t),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=t,t},i.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");if(e!=="anonymous"&&e!=="use-credentials"){Ye.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"');return}this.techCall_("setCrossOrigin",e)},i.width=function(e){return this.dimension("width",e)},i.height=function(e){return this.dimension("height",e)},i.dimension=function(e,t){var a=e+"_";if(t===void 0)return this[a]||0;if(t===""||t==="auto"){this[a]=void 0,this.updateStyleEl_();return}var o=parseFloat(t);if(isNaN(o)){Ye.error('Improper value "'+t+'" supplied for for '+e);return}this[a]=o,this.updateStyleEl_()},i.fluid=function(e){var t=this;if(e===void 0)return!!this.fluid_;
19this.fluid_=!!e,Ui(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),gx(this,function(){t.on(["playerreset","resize"],t.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()},i.fill=function(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},i.aspectRatio=function(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},i.updateStyleEl_=function(){if(K.VIDEOJS_NO_DYNAMIC_STYLE===!0){var e=typeof this.width_=="number"?this.width_:this.options_.width,t=typeof this.height_=="number"?this.height_:this.options_.height,a=this.tech_&&this.tech_.el();a&&(e>=0&&(a.width=e),t>=0&&(a.height=t));return}var o,l,u,d;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?u=this.aspectRatio_:this.videoWidth()>0?u=this.videoWidth()+":"+this.videoHeight():u="16:9";var f=u.split(":"),m=f[1]/f[0];this.width_!==void 0?o=this.width_:this.height_!==void 0?o=this.height_/m:o=this.videoWidth()||300,this.height_!==void 0?l=this.height_:l=o*m,/^[^a-zA-Z]/.test(this.id())?d="dimensions-"+this.id():d=this.id()+"-dimensions",this.addClass(d),q0(this.styleEl_,`
20      .`+d+` {
21        width: `+o+`px;
22        height: `+l+`px;
23      }
24
25      .`+d+`.vjs-fluid:not(.vjs-audio-only-mode) {
26        padding-top: `+m*100+`%;
27      }
28    `)},i.loadTech_=function(e,t){var a=this;this.tech_&&this.unloadTech_();var o=Ft(e),l=e.charAt(0).toLowerCase()+e.slice(1);o!=="Html5"&&this.tag&&(_t.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=o,this.isReady_=!1;var u=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(u=!1);var d={source:t,autoplay:u,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+l+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise};br.names.forEach(function(m){var x=br[m];d[x.getterName]=a[x.privateName]}),Pt(d,this.options_[o]),Pt(d,this.options_[l]),Pt(d,this.options_[e.toLowerCase()]),this.tag&&(d.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(d.startTime=this.cache_.currentTime);var f=_t.getTech(e);if(!f)throw new Error("No Tech named '"+o+"' exists! '"+o+"' should be registered using videojs.registerTech()'");this.tech_=new f(d),this.tech_.ready(xt(this,this.handleTechReady_),!0),op.jsonToTextTracks(this.textTracksJson_||[],this.tech_),Sy.forEach(function(m){a.on(a.tech_,m,function(x){return a["handleTech"+Ft(m)+"_"](x)})}),Object.keys(ju).forEach(function(m){a.on(a.tech_,m,function(x){if(a.tech_.playbackRate()===0&&a.tech_.seeking()){a.queuedCallbacks_.push({callback:a["handleTech"+ju[m]+"_"].bind(a),event:x});return}a["handleTech"+ju[m]+"_"](x)})}),this.on(this.tech_,"loadstart",function(m){return a.handleTechLoadStart_(m)}),this.on(this.tech_,"sourceset",function(m){return a.handleTechSourceset_(m)}),this.on(this.tech_,"waiting",function(m){return a.handleTechWaiting_(m)}),this.on(this.tech_,"ended",function(m){return a.handleTechEnded_(m)}),this.on(this.tech_,"seeking",function(m){return a.handleTechSeeking_(m)}),this.on(this.tech_,"play",function(m){return a.handleTechPlay_(m)}),this.on(this.tech_,"firstplay",function(m){return a.handleTechFirstPlay_(m)}),this.on(this.tech_,"pause",function(m){return a.handleTechPause_(m)}),this.on(this.tech_,"durationchange",function(m){return a.handleTechDurationChange_(m)}),this.on(this.tech_,"fullscreenchange",function(m,x){return a.handleTechFullscreenChange_(m,x)}),this.on(this.tech_,"fullscreenerror",function(m,x){return a.handleTechFullscreenError_(m,x)}),this.on(this.tech_,"enterpictureinpicture",function(m){return a.handleTechEnterPictureInPicture_(m)}),this.on(this.tech_,"leavepictureinpicture",function(m){return a.handleTechLeavePictureInPicture_(m)}),this.on(this.tech_,"error",function(m){return a.handleTechError_(m)}),this.on(this.tech_,"posterchange",function(m){return a.handleTechPosterChange_(m)}),this.on(this.tech_,"textdata",function(m){return a.handleTechTextData_(m)}
28),this.on(this.tech_,"ratechange",function(m){return a.handleTechRateChange_(m)}),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(o!=="Html5"||!this.tag)&&Ud(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},i.unloadTech_=function(){var e=this;br.names.forEach(function(t){var a=br[t];e[a.privateName]=e[a.getterName]()}),this.textTracksJson_=op.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},i.tech=function(e){return e===void 0&&Ye.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
29See https://github.com/videojs/video.js/issues/2617 for more info.
30`),this.tech_},i.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)},i.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)},i.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},i.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())},i.manualAutoplay_=function(e){var t=this;if(!(!this.tech_||typeof e!="string")){var a=function(){var u=t.muted();t.muted(!0);var d=function(){t.muted(u)};t.playTerminatedQueue_.push(d);var f=t.play();if(Ha(f))return f.catch(function(m){throw d(),new Error("Rejection at manualAutoplay. Restoring muted value. "+(m||""))})},o;if(e==="any"&&!this.muted()?(o=this.play(),Ha(o)&&(o=o.catch(a))):e==="muted"&&!this.muted()?o=a():o=this.play(),!!Ha(o))return o.then(function(){t.trigger({type:"autoplay-success",autoplay:e})}).catch(function(){t.trigger({type:"autoplay-failure",autoplay:e})})}},i.updateSourceCaches_=function(e){e===void 0&&(e="");var t=e,a="";typeof t!="string"&&(t=e.src,a=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!a&&(a=Xx(this,t)),this.cache_.source=St({},e,{src:t,type:a});for(var o=this.cache_.sources.filter(function(x){return x.src&&x.src===t}),l=[],u=this.$$("source"),d=[],f=0;f<u.length;f++){var m=Oi(u[f]);l.push(m),m.src&&m.src===t&&d.push(m.src)}d.length&&!o.length?this.cache_.sources=l:o.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},i.handleTechSourceset_=function(e){var t=this;if(!this.changingSrc_){var a=function(d){return t.updateSourceCaches_(d)},o=this.currentSource().src,l=e.src;o&&!/^blob:/.test(o)&&/^blob:/.test(l)&&(!this.lastSource_||this.lastSource_.tech!==l&&this.lastSource_.player!==o)&&(a=function(){}),a(l),e.src||this.tech_.any(["sourceset","loadstart"],function(u){if(u.type!=="sourceset"){var d=t.techGet("currentSrc");t.lastSource_.tech=d,t.updateSourceCaches_(d)}})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},i.hasStarted=function(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},i.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},i.handleTechRateChange_=function(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},i.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting");var t=this.currentTime(),a=function o(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",o))};this.on("timeupdate",a)},i.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},i.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},i.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},i.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},i.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},i.handleTechFirstPlay_=function(){this.options_.starttime&&(Ye.warn("Passing the `starttime` option to the player will be deprecated 
30in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},i.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},i.handleTechEnded_=function(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},i.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},i.handleTechClick_=function(e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?yi(this.play()):this.pause())},i.handleTechDoubleClick_=function(e){if(this.controls_){var t=Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(a){return a.contains(e.target)});t||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}},i.handleTechTap_=function(){this.userActive(!this.userActive())},i.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},i.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},i.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},i.handleStageClick_=function(){this.reportUserActivity()},i.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},i.documentFullscreenChange_=function(e){var t=e.target.player;if(!(t&&t!==this)){var a=this.el(),o=xe[this.fsApi_.fullscreenElement]===a;!o&&a.matches?o=a.matches(":"+this.fsApi_.fullscreen):!o&&a.msMatchesSelector&&(o=a.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(o)}},i.handleTechFullscreenChange_=function(e,t){var a=this;t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",function(){a.removeClass("vjs-ios-native-fs")})),this.isFullscreen(t.isFullscreen))},i.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},i.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},i.handleTechEnterPictureInPicture_=function(e){this.isInPictureInPicture(!0)},i.handleTechLeavePictureInPicture_=function(e){this.isInPictureInPicture(!1)},i.handleTechError_=function(){var e=this.tech_.error();this.error(e)},i.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},i.getCache=function(){return this.cache_},i.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}},i.techCall_=function(e,t){this.ready(function(){if(e in Gx)return Hx(this.middleware_,this.tech_,e,t);if(e in hp)return fp(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(a){throw Ye(a),a}},!0)},i.techGet_=function(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in jx)return Vx(this.middleware_,this.tech_,e);if(e in hp)return fp(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){throw this.tech_[e]===void 0?(Ye("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t):t.name==="TypeError"?(Ye("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t):(Ye(t),t)}}},i.play=function(){var e=this,t=this.options_.Promise||K.Promise;
30return t?new t(function(a){e.play_(a)}):this.play_()},i.play_=function(e){var t=this;e===void 0&&(e=yi),this.playCallbacks_.push(e);var a=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),o=!!(Co||Er);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!a){this.waitToPlay_=function(d){t.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!a&&o&&this.load();return}var l=this.techGet_("play"),u=o&&this.hasClass("vjs-ended");u&&this.resetProgressBar_(),l===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(l)},i.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(t){t()})},i.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(a){a(e)})},i.pause=function(){this.techCall_("pause")},i.paused=function(){return this.techGet_("paused")!==!1},i.played=function(){return this.techGet_("played")||In(0,0)},i.scrubbing=function(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},i.currentTime=function(e){if(typeof e<"u"){if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",e),this.cache_.initTime=0;return}return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime},i.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},i.duration=function(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},i.remainingTime=function(){return this.duration()-this.currentTime()},i.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},i.buffered=function(){var e=this.techGet_("buffered");return(!e||!e.length)&&(e=In(0,0)),e},i.bufferedPercent=function(){return z0(this.buffered(),this.duration())},i.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),a=e.end(e.length-1);return a>t&&(a=t),a},i.volume=function(e){var t;if(e!==void 0){t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),t>0&&this.lastVolume_(t);return}return t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t},i.muted=function(e){if(e!==void 0){this.techCall_("setMuted",e);return}return this.techGet_("muted")||!1},i.defaultMuted=function(e){return e!==void 0?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},i.lastVolume_=function(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return}return this.cache_.lastVolume},i.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},i.isFullscreen=function(e){if(e!==void 0){var t=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_},i.requestFullscreen=function(e){var t=this.options_.Promise||K.Promise;if(t){var a=this;return new t(function(o,l){function u(){a.off("fullscreenerror",f),a.off("fullscreenchange",d)}function d(){u(),o()}function f(x,C){u(),l(C)}a.one("fullscreenchange",d),a.one("fullscreenerror",f);var m=a.requestFullscreenHelper_(e);m&&(m.then(u,u),m.then(o,l))})}return this.requestFullscreenHelper_()},i.requestFullscreenHelper_=function(e){var t=this,a;if(this.fsApi_.prefixed||(a=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(a=e)),this.fsApi_.requestFullscreen){var o=this.el_[this.fsApi_.requestFullscreen](a);return o&&o.then(function(){return t.isFullscreen(!0)},function(){return t.isFullscreen(!1)}),o}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()},i.exitFullscreen=function(){var e=this.options_.Promise||K.Promise;if(e){var t=this;return new e(function(a,o){function l(){t.off("fullscreenerror",d),t.off("fullscreenchange",u)}function u(){l(),a()}function d(m,x){l(),o(x)}t.one("fullscreenchange",u),t.one("fullscreenerror",d);var f=t.exitFullscreenHelper_();f&&(f.then(l,l),f.then(a,o))})}return this.exitFullscreenHelper_()},i.exitFullscreenHelper_=function(){var e=this;if(this.fsApi_.requestFullscreen){var t=xe[this.fsApi_.exitFullscreen]();return t&&yi(t.then(function(){return e.isFullscreen(!1)})),t}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()},i.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=xe.documentElement.style.overflow,Br(xe,"keydown",this.boundFullWindowOnEscKey_),xe.documentElement.style.overflow="hidden",Bi(xe.body,"vjs-full-window"),this.trigger("enterFullWindow")},i.fullWindowOnEscKey=function(e){ze.isEventKey(e,"Esc")&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())},i.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,dr(xe,"keydown",this.boundFullWindowOnEscKey_),xe.documentElement.style.overflow=this.docOrigOverflow,is(xe.body,"vjs-full-window"),this.trigger("exitFullWindow")},i.disablePictureInPicture=function(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},i.isInPictureInPicture=function(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_},i.requestPictureInPicture=function(){if("pictureInPictureEnabled"in xe&&this.disablePictureInPicture()===!1)return this.techGet_("requestPictureInPicture")},i.exitPictureInPicture=function(){if("pictureInPictureEnabled"in xe)return xe.exitPictureInPicture()},i.handleKeyDown=function(e){var t=this.options_.userActions;if(!(!t||!t.hotkeys)){var a=function(l){var u=l.tagName.toLowerCase();if(l.isContentEditable)return!0;var d=["button","checkbox","hidden","radio","reset","submit"];if(u==="input")return d.indexOf(l.type)===-1;var f=["textarea"];return f.indexOf(u)!==-1};a(this.el_.ownerDocument.activeElement)||(typeof t.hotkeys=="function"?t.hotkeys.call(this,e):this.handleHotkeys(e))}},i.handleHotkeys=function(e){var t=this.options_.userActions?this.options_.userActions.hotkeys:{},a=t.fullscreenKey,o=a===void 0?function(L){return ze.isEventKey(L,"f")}:a,l=t.muteKey,u=l===void 0?function(L){return ze.isEventKey(L,"m")}:l,d=t.playPauseKey,f=d===void 0?function(L){return ze.isEventKey(L,"k")||ze.isEventKey(L,"Space")}:d;if(o.call(this,e)){e.preventDefault(),e.stopPropagation();var m=ye.getComponent("FullscreenToggle");xe[this.fsApi_.fullscreenEnabled]!==!1&&m.prototype.handleClick.call(this,e)}else if(u.call(this,e)){e.preventDefault(),e.stopPropagation();var x=ye.getComponent("MuteToggle");x.prototype.handleClick.call(this,e)}else if(f.call(this,e)){e.preventDefault(),e.stopPropagation();var C=ye.getComponent("PlayToggle");C.prototype.handleClick.call(this,e)}},i.canPlayType=function(e){for(var t,a=0,o=this.options_.techOrder;a<o.length;a++){var l=o[a],u=_t.getTech(l);if(u||(u=ye.getComponent(l)),!u){Ye.error('The "'+l+'" tech is undefined. Skipped browser support check for that tech.');continue}if(u.isSupported()&&(t=u.canPlayType(e),t))return t}return""},i.selectSource=function(e){var t=this,a=this.options_.techOrder.map(function(f){return[f,_t.getTech(f)]}).filter(function(f){var m=f[0],x=f[1];return x?x.isSupported():(Ye.error('The "'+m+'" tech is undefined. Skipped browser support check for that tech.'),!1)}),o=function(m,x,C){var L;return m.some(function(E){return x.some(function(B){if(L=C(E,B),L)return!0})}),L},l,u=function(m){return function(x,C){return m(C,x)}},d=function(m,x){var C=m[0],L=m[1];if(L.canPlaySource(x,t.options_[C.toLowerCase()]))return{source:x,tech:C}};return this.options_.sourceOrder?l=o(e,a,u(d)):l=o(a,e,d),l||!1},i.handleSrc_=function(e,t){var a=this;if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var o=Yx(e);if(!o.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,t||(this.cache_.sources=o),this.updateSourceCaches_(o[0]),Ux(this,o[0],function(d,f){a.middleware_=f,t||(a.cache_.sources=o),a.updateSourceCaches_(d);var m=a.src_(d);if(m){if(o.length>1)return a.handleSrc_(o.slice(1));a.changingSrc_=!1,a.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),a.triggerReady();return}qx(f,a.tech_)}),this.options_.retryOnError&&o.length>1){var l=function(){a.error(null),a.handleSrc_(o.slice(1),!0)},u=function(){a.off("error",l)};this.one("error",l),this.one("playing",u),this.resetRetryOnError_=function(){a.off("error",l),a.off("playing",u)}}},i.src=function(e){return this.handleSrc_(e,!1)},i.src_=function(e){var t=this,a=this.selectSource([e]);
30return a?bx(a.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(a.tech,a.source),this.tech_.ready(function(){t.changingSrc_=!1}),!1):!0},i.load=function(){this.techCall_("load")},i.reset=function(){var e=this,t=this.options_.Promise||K.Promise;if(this.paused()||!t)this.doReset_();else{var a=this.play();yi(a.then(function(){return e.doReset_()}))}},i.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),Ui(this)&&this.trigger("playerreset")},i.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},i.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar||{},t=e.durationDisplay,a=e.remainingTimeDisplay;t&&t.updateContent(),a&&a.updateContent()},i.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},i.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},i.currentSources=function(){var e=this.currentSource(),t=[];return Object.keys(e).length!==0&&t.push(e),this.cache_.sources||t},i.currentSource=function(){return this.cache_.source||{}},i.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},i.currentType=function(){return this.currentSource()&&this.currentSource().type||""},i.preload=function(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return}return this.techGet_("preload")},i.autoplay=function(e){if(e===void 0)return this.options_.autoplay||!1;var t;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),t=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,t=typeof t>"u"?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},i.playsinline=function(e){return e!==void 0?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},i.loop=function(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return}return this.techGet_("loop")},i.poster=function(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},i.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},i.controls=function(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},i.usingNativeControls=function(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},i.error=function(e){var t=this;if(e===void 0)return this.error_||null;if(cn("beforeerror").forEach(function(o){var l=o(t,e);if(!(Hi(l)&&!Array.isArray(l)||typeof l=="string"||typeof l=="number"||l===null)){t.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=l}),this.options_.suppressNotSupportedError&&e&&e.code===4){var a=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],a),this.one("loadstart",function(){this.off(["click","touchstart"],a)});return}if(e===null){this.error_=e,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new xr(e),this.addClass("vjs-error"),Ye.error("(CODE:"+this.error_.code+" "+xr.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),cn("error").forEach(function(o){return o(t,t.error_)})},i.reportUserActivity=function(e){this.userActivity_=!0},i.userActive=function(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(t){t.stopPropagation(),t.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},i.listenForUserActivity_=function(){var e,t,a,o=xt(this,this.reportUserActivity),l=function(C){(C.screenX!==t||C.screenY!==a)&&(t=C.screenX,a=C.screenY,o())},u=function(){o(),this.clearInterval(e),e=this.setInterval(o,250)},d=function(C){o(),this.clearInterval(e)};this.on("mousedown",u),this.on("mousemove",l),this.on("mouseup",d),this.on("mouseleave",d);var f=this.getChild("controlBar");f&&!Er&&!Wi&&(f.on("mouseenter",function(x){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),f.on("mouseleave",function(x){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",o),this.on("keyup",o);var m;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(m);var x=this.options_.inactivityTimeout;x<=0||(m=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},x))}},250)},i.playbackRate=function(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1},i.defaultPlaybackRate=function(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},i.isAudio=function(e){if(e!==void 0){this.isAudio_=!!e;return}return!!this.isAudio_},i.enableAudioOnlyUI_=function(){var e=this;this.addClass("vjs-audio-only-mode");var t=this.children(),a=this.getChild("ControlBar"),o=a&&a.currentHeight();t.forEach(function(l){l!==a&&l.el_&&!l.hasClass("vjs-hidden")&&(l.hide(),e.audioOnlyCache_.hiddenChildren.push(l))}
30),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.height(o),this.trigger("audioonlymodechange")},i.disableAudioOnlyUI_=function(){this.removeClass("vjs-audio-only-mode"),this.audioOnlyCache_.hiddenChildren.forEach(function(e){return e.show()}),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")},i.audioOnlyMode=function(e){var t=this;if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;this.audioOnlyMode_=e;var a=this.options_.Promise||K.Promise;if(a){if(e){var o=[];return this.isInPictureInPicture()&&o.push(this.exitPictureInPicture()),this.isFullscreen()&&o.push(this.exitFullscreen()),this.audioPosterMode()&&o.push(this.audioPosterMode(!1)),a.all(o).then(function(){return t.enableAudioOnlyUI_()})}return a.resolve().then(function(){return t.disableAudioOnlyUI_()})}e?(this.isInPictureInPicture()&&this.exitPictureInPicture(),this.isFullscreen()&&this.exitFullscreen(),this.enableAudioOnlyUI_()):this.disableAudioOnlyUI_()},i.enablePosterModeUI_=function(){var e=this.tech_&&this.tech_;e.hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},i.disablePosterModeUI_=function(){var e=this.tech_&&this.tech_;e.show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")},i.audioPosterMode=function(e){var t=this;if(typeof e!="boolean"||e===this.audioPosterMode_)return this.audioPosterMode_;this.audioPosterMode_=e;var a=this.options_.Promise||K.Promise;if(a){if(e){if(this.audioOnlyMode()){var o=this.audioOnlyMode(!1);return o.then(function(){t.enablePosterModeUI_()})}return a.resolve().then(function(){t.enablePosterModeUI_()})}return a.resolve().then(function(){t.disablePosterModeUI_()})}if(e){this.audioOnlyMode()&&this.audioOnlyMode(!1),this.enablePosterModeUI_();return}this.disablePosterModeUI_()},i.addTextTrack=function(e,t,a){if(this.tech_)return this.tech_.addTextTrack(e,t,a)},i.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},i.removeRemoteTextTrack=function(e){e===void 0&&(e={});var t=e,a=t.track;if(a||(a=e),this.tech_)return this.tech_.removeRemoteTextTrack(a)},i.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},i.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},i.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},i.language=function(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),Ui(this)&&this.trigger("languagechange"))},i.languages=function(){return St(r.prototype.options_.languages,this.languages_)},i.toJSON=function(){var e=St(this.options_),t=e.tracks;e.tracks=[];for(var a=0;a<t.length;a++){var o=t[a];o=St(o),o.player=void 0,e.tracks[a]=o}return e},i.createModal=function(e,t){var a=this;t=t||{},t.content=e||"";var o=new va(this,t);return this.addChild(o),o.on("dispose",function(){a.removeChild(o)}),o.open(),o},i.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e=this.currentBreakpoint(),t=this.currentWidth(),a=0;a<$d.length;a++){var o=$d[a],l=this.breakpoints_[o];if(t<=l){if(e===o)return;e&&this.removeClass(zs[e]),this.addClass(zs[o]),this.breakpoint_=o;break}}},i.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},i.breakpoints=function(e){return e===void 0?Pt(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Pt({},w2,e),this.updateCurrentBreakpoint_(),Pt(this.breakpoints_))},i.responsive=function(e){if(e===void 0)return this.responsive_;e=!!e;var t=this.responsive_;if(e!==t)return this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e},i.currentBreakpoint=function(){return this.breakpoint_},i.currentBreakpointClass=function(){return zs[this.breakpoint_]||""},i.loadMedia=function(e,t){var a=this;if(!(!e||typeof e!="object")){this.reset(),this.cache_.media=St(e);var o=this.cache_.media,l=o.artwork,u=o.poster,d=o.src,f=o.textTracks;!l&&u&&(this.cache_.media.artwork=[{src:u,type:ro(u)}]),d&&this.src(d),u&&this.poster(u),Array.isArray(f)&&f.forEach(function(m){return a.addRemoteTextTrack(m,!1)}),this.ready(t)}},i.getMedia=function(){if(!this.cache_.media){var e=this.poster(),t=this.currentSources(),a=Array.prototype.map.call(this.remoteTextTracks(),function(l){return{kind:l.kind,label:l.label,language:l.language,src:l.src}}),o={src:t,textTracks:a};return e&&(o.poster=e,o.artwork=[{src:o.poster,type:ro(o.poster)}]),o}return St(this.cache_.media)},r.getTagSettings=function(e){var t={sources:[],tracks:[]},a=Oi(e),o=a["data-setup"];if(Pn(e,"vjs-fill")&&(a.fill=!0),Pn(e,"vjs-fluid")&&(a.fluid=!0),o!==null){var l=aT(o||"{}"),u=l[0],d=l[1];u&&Ye.error(u),Pt(a,d)}if(Pt(t,a),e.hasChildNodes())for(var f=e.childNodes,m=0,x=f.length;m<x;m++){var C=f[m],L=C.nodeName.toLowerCase();L==="source"?t.sources.push(Oi(C)):L==="track"&&t.tracks.push(Oi(C))}return t},i.flexNotSupported_=function(){var e=xe.createElement("i");
30return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},i.debug=function(e){if(e===void 0)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},i.playbackRates=function(e){if(e===void 0)return this.cache_.playbackRates;Array.isArray(e)&&e.every(function(t){return typeof t=="number"})&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))},r})(ye);br.names.forEach(function(s){var r=br[s];Vt.prototype[r.getterName]=function(){return this.tech_?this.tech_[r.getterName]():(this[r.privateName]=this[r.privateName]||new r.ListClass,this[r.privateName])}});Vt.prototype.crossorigin=Vt.prototype.crossOrigin;Vt.players={};var La=K.navigator;Vt.prototype.options_={techOrder:_t.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:La&&(La.languages&&La.languages[0]||La.userLanguage||La.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1};["ended","seeking","seekable","networkState","readyState"].forEach(function(s){Vt.prototype[s]=function(){return this.techGet_(s)}});Sy.forEach(function(s){Vt.prototype["handleTech"+Ft(s)+"_"]=function(){return this.trigger(s)}});ye.registerComponent("Player",Vt);var ao="plugin",ra="activePlugins_",Yn={},so=function(r){return Yn.hasOwnProperty(r)},$s=function(r){return so(r)?Yn[r]:void 0},xy=function(r,i){r[ra]=r[ra]||{},r[ra][i]=!0},oo=function(r,i,n){var e=(n?"before":"")+"pluginsetup";r.trigger(e,i),r.trigger(e+":"+i.name,i)},A2=function(r,i){var n=function(){oo(this,{name:r,plugin:i,instance:null},!0);var t=i.apply(this,arguments);return xy(this,r),oo(this,{name:r,plugin:i,instance:t}),t};
30return Object.keys(i).forEach(function(e){n[e]=i[e]}),n},Ap=function(r,i){return i.prototype.name=r,function(){oo(this,{name:r,plugin:i,instance:null},!0);for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];var a=e0(i,[this].concat(e));return this[r]=function(){return a},oo(this,a.getEventHash()),a}},Ti=(function(){function s(i){if(this.constructor===s)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=i,this.log||(this.log=this.player.log.createLogger(this.name)),wf(this),delete this.trigger,W0(this,this.constructor.defaultState),xy(i,this.name),this.dispose=this.dispose.bind(this),i.on("dispose",this.dispose)}var r=s.prototype;return r.version=function(){return this.constructor.VERSION},r.getEventHash=function(n){return n===void 0&&(n={}),n.name=this.name,n.plugin=this.constructor,n.instance=this,n},r.trigger=function(n,e){return e===void 0&&(e={}),ma(this.eventBusEl_,n,this.getEventHash(e))},r.handleStateChanged=function(n){},r.dispose=function(){var n=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e[ra][n]=!1,this.player=this.state=null,e[n]=Ap(n,Yn[n])},s.isBasic=function(n){var e=typeof n=="string"?$s(n):n;return typeof e=="function"&&!s.prototype.isPrototypeOf(e.prototype)},s.registerPlugin=function(n,e){if(typeof n!="string")throw new Error('Illegal plugin name, "'+n+'", must be a string, was '+typeof n+".");if(so(n))Ye.warn('A plugin named "'+n+'" already exists. You may want to avoid re-registering plugins!');else if(Vt.prototype.hasOwnProperty(n))throw new Error('Illegal plugin name, "'+n+'", cannot share a name with an existing player method!');if(typeof e!="function")throw new Error('Illegal plugin for "'+n+'", must be a function, was '+typeof e+".");return Yn[n]=e,n!==ao&&(s.isBasic(e)?Vt.prototype[n]=A2(n,e):Vt.prototype[n]=Ap(n,e)),e},s.deregisterPlugin=function(n){if(n===ao)throw new Error("Cannot de-register base plugin.");so(n)&&(delete Yn[n],delete Vt.prototype[n])},s.getPlugins=function(n){n===void 0&&(n=Object.keys(Yn));var e;return n.forEach(function(t){var a=$s(t);a&&(e=e||{},e[t]=a)}),e},s.getPluginVersion=function(n){var e=$s(n);return e&&e.VERSION||""},s})();Ti.getPlugin=$s;Ti.BASE_PLUGIN_NAME=ao;Ti.registerPlugin(ao,Ti);Vt.prototype.usingPlugin=function(s){return!!this[ra]&&this[ra][s]===!0};Vt.prototype.hasPlugin=function(s){return!!so(s)};var kp=!1,k2=function(r,i){i===void 0&&(i={}),kp||(Ye.warn("videojs.extend is deprecated as of Video.js 7.22.0 and will be removed in Video.js 8.0.0"),kp=!0);var n=function(){r.apply(this,arguments)},e={};typeof i=="object"?(i.constructor!==Object.prototype.constructor&&(n=i.constructor),e=i):typeof i=="function"&&(n=i),mT(n,r),r&&(n.super_=r);for(var t in e)e.hasOwnProperty(t)&&(n.prototype[t]=e[t]);return n},Ey=function(r){return r.indexOf("#")===0?r.slice(1):r};function ae(s,r,i){var n=ae.getPlayer(s);if(n)return r&&Ye.warn('Player "'+s+'" is already initialised. Options will not be applied.'),i&&n.ready(i),n;var e=typeof s=="string"?dn("#"+Ey(s)):s;if(!pa(e))throw new TypeError("The element or ID supplied is not valid. (videojs)");(!e.ownerDocument.defaultView||!e.ownerDocument.body.contains(e))&&Ye.warn("The element supplied is not included in the DOM"),r=r||{},r.restoreEl===!0&&(r.restoreEl=(e.parentNode&&e.parentNode.hasAttribute("data-vjs-player")?e.parentNode:e).cloneNode(!0)),cn("beforesetup").forEach(function(a){var o=a(e,St(r));if(!Hi(o)||Array.isArray(o)){Ye.error("please return an object in beforesetup hooks");return}r=St(r,o)});var t=ye.getComponent("Player");return n=new t(e,r,i),cn("setup").forEach(function(a){return a(n)}),n}ae.hooks_=Ri;ae.hooks=cn;ae.hook=tx;ae.hookOnce=rx;ae.removeHook=v0;if(K.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&ha()){var Bs=dn(".vjs-styles-defaults");if(!Bs){Bs=U0("vjs-styles-defaults");var Gu=dn("head");Gu&&Gu.insertBefore(Bs,Gu.firstChild),q0(Bs,`
31      .video-js {
32        width: 300px;
33        height: 150px;
34      }
35
36      .vjs-fluid:not(.vjs-audio-only-mode) {
37        padding-top: 56.25%
38      }
39    `)}}Vd(1,ae);ae.VERSION=m0;ae.options=Vt.prototype.options_;ae.getPlayers=function(){return Vt.players};ae.getPlayer=function(s){var r=Vt.players,i;if(typeof s=="string"){var n=Ey(s),e=r[n];if(e)return e;i=dn("#"+n)}else i=s;if(pa(i)){var t=i,a=t.player,o=t.playerId;if(a||r[o])return a||r[o]}};ae.getAllPlayers=function(){return Object.keys(Vt.players).map(function(s){return Vt.players[s]}
39).filter(Boolean)};ae.players=Vt.players;ae.getComponent=ye.getComponent;ae.registerComponent=function(s,r){_t.isTech(r)&&Ye.warn("The "+s+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),ye.registerComponent.call(ye,s,r)};ae.getTech=_t.getTech;ae.registerTech=_t.registerTech;ae.use=Bx;Object.defineProperty(ae,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(ae.middleware,"TERMINATOR",{value:to,writeable:!1,enumerable:!0});ae.browser=ux;ae.TOUCH_ENABLED=oa;ae.extend=k2;ae.mergeOptions=St;ae.bind=xt;ae.registerPlugin=Ti.registerPlugin;ae.deregisterPlugin=Ti.deregisterPlugin;ae.plugin=function(s,r){return Ye.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Ti.registerPlugin(s,r)};ae.getPlugins=Ti.getPlugins;ae.getPlugin=Ti.getPlugin;ae.getPluginVersion=Ti.getPluginVersion;ae.addLanguage=function(s,r){var i;return s=(""+s).toLowerCase(),ae.options.languages=St(ae.options.languages,(i={},i[s]=r,i)),ae.options.languages[s]};ae.log=Ye;ae.createLogger=y0;ae.createTimeRange=ae.createTimeRanges=In;ae.formatTime=fa;ae.setFormatTime=i2;ae.resetFormatTime=n2;ae.parseUrl=kf;ae.isCrossOrigin=Io;ae.EventTarget=Zt;ae.on=Br;ae.one=Do;ae.off=dr;ae.trigger=ma;ae.xhr=Jg;ae.TextTrack=ns;ae.AudioTrack=X0;ae.VideoTrack=Y0;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(s){ae[s]=function(){return Ye.warn("videojs."+s+"() is deprecated; use videojs.dom."+s+"() instead"),N0[s].apply(null,arguments)}});ae.computedStyle=Ya;ae.dom=N0;ae.url=Ox;ae.defineLazyProperty=$f;ae.addLanguage("en",{"Non-Fullscreen":"Exit Fullscreen"});var ti=bo,uo=function(r,i,n){return r&&n&&n.responseURL&&i!==n.responseURL?n.responseURL:i},oi=function(r){return ae.log.debug?ae.log.debug.bind(ae,"VHS:",r+" >"):function(){}},fn=1/30,_i=fn*3,Cy=function(r,i){var n=[],e;if(r&&r.length)for(e=0;e<r.length;e++)i(r.start(e),r.end(e))&&n.push([r.start(e),r.end(e)]);return ae.createTimeRanges(n)},Qn=function(r,i){return Cy(r,function(n,e){return n-_i<=i&&e+_i>=i})},Us=function(r,i){return Cy(r,function(n){return n-fn>=i})},D2=function(r){if(r.length<2)return ae.createTimeRanges();for(var i=[],n=1;n<r.length;n++){var e=r.end(n-1),t=r.start(n);i.push([e,t])}return ae.createTimeRanges(i)},P2=function(r,i){var n=null,e=null,t=0,a=[],o=[];if(!r||!r.length||!i||!i.length)return ae.createTimeRange();for(var l=r.length;l--;)a.push({time:r.start(l),type:"start"}),a.push({time:r.end(l),type:"end"});for(l=i.length;l--;)a.push({time:i.start(l),type:"start"}),a.push({time:i.end(l),type:"end"});for(a.sort(function(u,d){return u.time-d.time}),l=0;l<a.length;l++)a[l].type==="start"?(t++,t===2&&(n=a[l].time)):a[l].type==="end"&&(t--,t===1&&(e=a[l].time)),n!==null&&e!==null&&(o.push([n,e]),n=null,e=null);return ae.createTimeRanges(o)},wy=function(r){var i=[];if(!r||!r.length)return"";for(var n=0;n<r.length;n++)i.push(r.start(n)+" => "+r.end(n));return i.join(", ")},I2=function(r,i,n){n===void 0&&(n=1);var e=r.length?r.end(r.length-1):0;return(e-i)/n},kn=function(r){for(var i=[],n=0;n<r.length;n++)i.push({start:r.start(n),end:r.end(n)});return i},L2=function(r,i){if(r===i)return!1;if(!r&&i||!i&&r||r.length!==i.length)return!0;for(var n=0;n<r.length;n++)if(r.start(n)!==i.start(n)||r.end(n)!==i.end(n))return!0;return!1},Dp=function(r){if(!(!r||!r.length||!r.end))return r.end(r.length-1)},Kf=function(r,i){var n=0;if(!r||!r.length)return n;for(var e=0;e<r.length;e++){var t=r.start(e),a=r.end(e);if(!(i>a)){if(i>t&&i<=a){n+=a-i;continue}n+=a-t}}return n},Pp=ae.createTimeRange,Xf=function(r,i){if(!i.preload)return i.duration;var n=0;return(i.parts||[]).forEach(function(e){n+=e.duration}),(i.preloadHints||[]).forEach(function(e){e.type==="PART"&&(n+=r.partTargetDuration)}),n},Kd=function(r){return(r.segments||[]).reduce(function(i,n,e){return n.parts?n.parts.forEach(function(t,a){i.push({duration:t.duration,segmentIndex:e,partIndex:a,part:t,segment:n})}):i.push({duration:n.duration,segmentIndex:e,partIndex:null,segment:n,part:null}),i},[])},Ay=function(r){var i=r.segments&&r.segments.length&&r.segments[r.segments.length-1];return i&&i.parts||[]},ky=function(r){var i=r.preloadSegment;if(i){var n=i.parts,e=i.preloadHints,t=(e||[]).reduce(function(a,o){return a+(o.type==="PART"?1:0)},0);return t+=n&&n.length?n.length:0,t}},Dy=function(r,i){if(i.endList)return 0;if(r&&r.suggestedPresentationDelay)return r.suggestedPresentationDelay;var n=Ay(i).length>0;return n&&i.serverControl&&i.serverControl.partHoldBack?i.serverControl.partHoldBack:n&&i.partTargetDuration?i.partTargetDuration*3:i.serverControl&&i.serverControl.holdBack?i.serverControl.holdBack:i.targetDuration?i.targetDuration*3:0},M2=function(r,i){var n=0,e=i-r.mediaSequence,t=r.segments[e];if(t){if(typeof t.start<"u")return{result:t.start,precise:!0};if(typeof t.end<"u")return{result:t.end-t.duration,precise:!0}}for(;e--;){if(t=r.segments[e],typeof t.end<"u")return{result:n+t.end,precise:!0};if(n+=Xf(r,t),typeof t.start<"u")return{result:n+t.start,precise:!0}}return{result:n,precise:!1}},O2=function(r,i){for(var n=0,e,t=i-r.mediaSequence;t<r.segments.length;t++){if(e=r.segments[t],typeof e.start<"u")return{result:e.start-n,precise:!0};if(n+=Xf(r,e),typeof e.end<"u")return{result:e.end-n,precise:!0}}return{result:-1,precise:!1}},Py=function(r,i,n){if(typeof i>"u"&&(i=r.mediaSequence+r.segments.length),i<r.mediaSequence)return 0;var e=M2(r,i);if(e.precise)return e.result;var t=O2(r,i);return t.precise?t.result:e.result+n},Iy=function(r,i,n){if(!r)return 0;if(typeof n!="number"&&(n=0),typeof i>"u"){if(r.totalDuration)return r.totalDuration;if(!r.endList)return K.Infinity}return Py(r,i,n)},ja=function(r){var i=r.defaultDuration,n=r.durationList,e=r.startIndex,t=r.endIndex,a=0;if(e>t){var o=[t,e];e=o[0],t=o[1]}if(e<0){for(var l=e;l<Math.min(0,t);l++)a+=i;e=0}for(var u=e;u<t;u++)a+=n[u].duration;return a},Ly=function(r,i,n,e){if(!r||!r.segments)return null;if(r.endList)return Iy(r);if(i===null)return null;i=i||0;var t=Py(r,r.mediaSequence+r.segments.length,i);return n&&(e=typeof e=="number"?e:Dy(null,r),t-=e),Math.max(0,t)},R2=function(r,i,n){var e=!0,t=i||0,a=Ly(r,i,e,n);return a===null?Pp():Pp(t,a)},F2=function(r){for(var i=r.playlist,n=r.currentTime,e=r.startingSegmentIndex,t=r.startingPartIndex,a=r.startTime,o=r.experimentalExactManifestTimings,l=n-a,u=Kd(i),d=0,f=0;f<u.length;f++){var m=u[f];if(e===m.segmentIndex&&!(typeof t=="number"&&typeof m.partIndex=="number"&&t!==m.partIndex)){d=f;break}}if(l<0){if(d>0)for(var x=d-1;x>=0;x--){var C=u[x];if(l+=C.duration,o){if(l<0)continue}else if(l+fn<=0)continue;return{partIndex:C.partIndex,segmentIndex:C.segmentIndex,startTime:a-ja({defaultDuration:i.targetDuration,durationList:u,startIndex:d,endIndex:x})}}return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:n}}if(d<0){for(var L=d;L<0;L++)if(l-=i.targetDuration,l<0)return{partIndex:u[0]&&u[0].partIndex||null,segmentIndex:u[0]&&u[0].segmentIndex||0,startTime:n};d=0}for(var E=d;E<u.length;E++){var B=u[E];if(l-=B.duration,o){if(l>0)continue}else if(l-fn>=0)continue;return{partIndex:B.partIndex,segmentIndex:B.segmentIndex,startTime:a+ja({defaultDuration:i.targetDuration,durationList:u,startIndex:d,endIndex:E})}}return{segmentIndex:u[u.length-1].segmentIndex,partIndex:u[u.length-1].partIndex,startTime:n}},My=function(r){return r.excludeUntil&&r.excludeUntil>Date.now()},Yf=function(r){return r.excludeUntil&&r.excludeUntil===1/0},Ro=function(r){var i=My(r);return!r.disabled&&!i},N2=function(r){return r.disabled},B2=function(r){for(var i=0;i<r.segments.length;i++)if(r.segments[i].key)return!0;return!1},Oy=function(r,i){return i.attributes&&i.attributes[r]},U2=function(r,i,n,e){if(e===void 0&&(e=0),!Oy("BANDWIDTH",n))return NaN;var t=r*n.attributes.BANDWIDTH;return(t-e*8)/i},Xd=function(r,i){if(r.playlists.length===1)return!0;var n=i.attributes.BANDWIDTH||Number.MAX_VALUE;return r.playlists.filter(function(e){return Ro(e)?(e.attributes.BANDWIDTH||0)<n:!1}
39).length===0},Qf=function(r,i){return!r&&!i||!r&&i||r&&!i?!1:!!(r===i||r.id&&i.id&&r.id===i.id||r.resolvedUri&&i.resolvedUri&&r.resolvedUri===i.resolvedUri||r.uri&&i.uri&&r.uri===i.uri)},Ip=function(r,i){var n=r&&r.mediaGroups&&r.mediaGroups.AUDIO||{},e=!1;for(var t in n){for(var a in n[t])if(e=i(n[t][a]),e)break;if(e)break}return!!e},os=function(r){if(!r||!r.playlists||!r.playlists.length){var i=Ip(r,function(a){return a.playlists&&a.playlists.length||a.uri});return i}for(var n=function(o){var l=r.playlists[o],u=l.attributes&&l.attributes.CODECS;if(u&&u.split(",").every(function(f){return i0(f)}))return"continue";var d=Ip(r,function(f){return Qf(l,f)});return d?"continue":{v:!1}},e=0;e<r.playlists.length;e++){var t=n(e);if(t!=="continue"&&typeof t=="object")return t.v}return!0},Pr={liveEdgeDelay:Dy,duration:Iy,seekable:R2,getMediaInfoForTime:F2,isEnabled:Ro,isDisabled:N2,isBlacklisted:My,isIncompatible:Yf,playlistEnd:Ly,isAes:B2,hasAttribute:Oy,estimateSegmentRequestTime:U2,isLowestEnabledRendition:Xd,isAudioOnly:os,playlistMatch:Qf,segmentDurationWithParts:Xf},Ry=ae.log,Jf=function(r,i){return r+"-"+i},q2=function(r,i,n){return"placeholder-uri-"+r+"-"+i+"-"+n},V2=function(r){var i=r.onwarn,n=r.oninfo,e=r.manifestString,t=r.customTagParsers,a=t===void 0?[]:t,o=r.customTagMappers,l=o===void 0?[]:o,u=r.experimentalLLHLS,d=new ET;i&&d.on("warn",i),n&&d.on("info",n),a.forEach(function(L){return d.addParser(L)}),l.forEach(function(L){return d.addTagMapper(L)}),d.push(e),d.end();var f=d.manifest;if(u||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(L){f.hasOwnProperty(L)&&delete f[L]}),f.segments&&f.segments.forEach(function(L){["parts","preloadHints"].forEach(function(E){L.hasOwnProperty(E)&&delete L[E]})})),!f.targetDuration){var m=10;f.segments&&f.segments.length&&(m=f.segments.reduce(function(L,E){return Math.max(L,E.duration)},0)),i&&i("manifest has no targetDuration defaulting to "+m),f.targetDuration=m}var x=Ay(f);if(x.length&&!f.partTargetDuration){var C=x.reduce(function(L,E){return Math.max(L,E.duration)},0);i&&(i("manifest has no partTargetDuration defaulting to "+C),Ry.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),f.partTargetDuration=C}return f},ba=function(r,i){r.mediaGroups&&["AUDIO","SUBTITLES"].forEach(function(n){if(r.mediaGroups[n])for(var e in r.mediaGroups[n])for(var t in r.mediaGroups[n][e]){var a=r.mediaGroups[n][e][t];i(a,n,e,t)}})},Fy=function(r){var i=r.playlist,n=r.uri,e=r.id;i.id=e,i.playlistErrors_=0,n&&(i.uri=n),i.attributes=i.attributes||{}},H2=function(r){for(var i=r.playlists.length;i--;){var n=r.playlists[i];Fy({playlist:n,id:Jf(i,n.uri)}),n.resolvedUri=ti(r.uri,n.uri),r.playlists[n.id]=n,r.playlists[n.uri]=n,n.attributes.BANDWIDTH||Ry.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},j2=function(r){ba(r,function(i){i.uri&&(i.resolvedUri=ti(r.uri,i.uri))})},G2=function(r,i){var n=Jf(0,i),e={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:K.location.href,resolvedUri:K.location.href,playlists:[{uri:i,id:n,resolvedUri:i,attributes:{}}]};return e.playlists[n]=e.playlists[0],e.playlists[i]=e.playlists[0],e},Ny=function(r,i,n){n===void 0&&(n=q2),r.uri=i;for(var e=0;e<r.playlists.length;e++)if(!r.playlists[e].uri){var t="placeholder-uri-"+e;r.playlists[e].uri=t}var a=os(r);ba(r,function(o,l,u,d){if(!o.playlists||!o.playlists.length){if(a&&l==="AUDIO"&&!o.uri)for(var f=0;f<r.playlists.length;f++){var m=r.playlists[f];if(m.attributes&&m.attributes.AUDIO&&m.attributes.AUDIO===u)return}o.playlists=[ai({},o)]}
39o.playlists.forEach(function(x,C){var L=n(l,u,d,x),E=Jf(C,L);x.uri?x.resolvedUri=x.resolvedUri||ti(r.uri,x.uri):(x.uri=C===0?L:E,x.resolvedUri=x.uri),x.id=x.id||E,x.attributes=x.attributes||{},r.playlists[x.id]=x,r.playlists[x.uri]=x})}),H2(r),j2(r)},lo=ae.mergeOptions,W2=ae.EventTarget,z2=function(r,i){if(i.endList||!i.serverControl)return r;var n={};if(i.serverControl.canBlockReload){var e=i.preloadSegment,t=i.mediaSequence+i.segments.length;if(e){var a=e.parts||[],o=ky(i)-1;o>-1&&o!==a.length-1&&(n._HLS_part=o),(o>-1||a.length)&&t--}n._HLS_msn=t}if(i.serverControl&&i.serverControl.canSkipUntil&&(n._HLS_skip=i.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(n).length){var l=new K.URL(r);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(u){n.hasOwnProperty(u)&&l.searchParams.set(u,n[u])}),r=l.toString()}return r},$2=function(r,i){if(!r)return i;var n=lo(r,i);if(r.preloadHints&&!i.preloadHints&&delete n.preloadHints,r.parts&&!i.parts)delete n.parts;else if(r.parts&&i.parts)for(var e=0;e<i.parts.length;e++)r.parts&&r.parts[e]&&(n.parts[e]=lo(r.parts[e],i.parts[e]));return!r.skipped&&i.skipped&&(n.skipped=!1),r.preload&&!i.preload&&(n.preload=!1),n},K2=function(r,i,n){var e=r.slice(),t=i.slice();n=n||0;for(var a=[],o,l=0;l<t.length;l++){var u=e[l+n],d=t[l];u?(o=u.map||o,a.push($2(u,d))):(o&&!d.map&&(d.map=o),a.push(d))}return a},By=function(r,i){!r.resolvedUri&&r.uri&&(r.resolvedUri=ti(i,r.uri)),r.key&&!r.key.resolvedUri&&(r.key.resolvedUri=ti(i,r.key.uri)),r.map&&!r.map.resolvedUri&&(r.map.resolvedUri=ti(i,r.map.uri)),r.map&&r.map.key&&!r.map.key.resolvedUri&&(r.map.key.resolvedUri=ti(i,r.map.key.uri)),r.parts&&r.parts.length&&r.parts.forEach(function(n){n.resolvedUri||(n.resolvedUri=ti(i,n.uri))}),r.preloadHints&&r.preloadHints.length&&r.preloadHints.forEach(function(n){n.resolvedUri||(n.resolvedUri=ti(i,n.uri))})},Uy=function(r){var i=r.segments||[],n=r.preloadSegment;if(n&&n.parts&&n.parts.length){if(n.preloadHints){for(var e=0;e<n.preloadHints.length;e++)if(n.preloadHints[e].type==="MAP")return i}n.duration=r.targetDuration,n.preload=!0,i.push(n)}return i},qy=function(r,i){return r===i||r.segments&&i.segments&&r.segments.length===i.segments.length&&r.endList===i.endList&&r.mediaSequence===i.mediaSequence&&r.preloadSegment===i.preloadSegment},Yd=function(r,i,n){n===void 0&&(n=qy);var e=lo(r,{}),t=e.playlists[i.id];if(!t||n(t,i))return null;i.segments=Uy(i);var a=lo(t,i);if(a.preloadSegment&&!i.preloadSegment&&delete a.preloadSegment,t.segments){if(i.skip){i.segments=i.segments||[];for(var o=0;o<i.skip.skippedSegments;o++)i.segments.unshift({skipped:!0})}a.segments=K2(t.segments,i.segments,i.mediaSequence-t.mediaSequence)}a.segments.forEach(function(u){By(u,a.resolvedUri)});for(var l=0;l<e.playlists.length;l++)e.playlists[l].id===i.id&&(e.playlists[l]=a);return e.playlists[i.id]=a,e.playlists[i.uri]=a,ba(r,function(u,d,f,m){if(u.playlists)for(var x=0;x<u.playlists.length;x++)i.id===u.playlists[x].id&&(u.playlists[x]=a)}),e},Qd=function(r,i){var n=r.segments||[],e=n[n.length-1],t=e&&e.parts&&e.parts[e.parts.length-1],a=t&&t.duration||e&&e.duration;return i&&a?a*1e3:(r.partTargetDuration||r.targetDuration||10)*500},Jn=(function(s){Ee(r,s);function r(n,e,t){var a;if(t===void 0&&(t={}),a=s.call(this)||this,!n)throw new Error("A non-empty playlist URL or object is required");a.logger_=oi("PlaylistLoader");var o=t,l=o.withCredentials,u=l===void 0?!1:l,d=o.handleManifestRedirects,f=d===void 0?!1:d;a.src=n,a.vhs_=e,a.withCredentials=u,a.handleManifestRedirects=f;var m=e.options_;return a.customTagParsers=m&&m.customTagParsers||[],a.customTagMappers=m&&m.customTagMappers||[],a.experimentalLLHLS=m&&m.experimentalLLHLS||!1,ae.browser.IE_VERSION&&(a.experimentalLLHLS=!1),a.state="HAVE_NOTHING",a.handleMediaupdatetimeout_=a.handleMediaupdatetimeout_.bind(Ge(a)),a.on("mediaupdatetimeout",a.handleMediaupdatetimeout_),a}var i=r.prototype;return i.handleMediaupdatetimeout_=function(){var e=this;if(this.state==="HAVE_METADATA"){var t=this.media(),a=ti(this.master.uri,t.uri);this.experimentalLLHLS&&(a=z2(a,t)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:a,withCredentials:this.withCredentials},function(o,l){if(e.request){if(o)return e.playlistRequestError(e.request,e.media(),"HAVE_METADATA");e.haveMetadata({playlistString:e.request.responseText,url:e.media().uri,id:e.media().id})}})}}
39,i.playlistRequestError=function(e,t,a){var o=t.uri,l=t.id;this.request=null,a&&(this.state=a),this.error={playlist:this.master.playlists[l],status:e.status,message:"HLS playlist request error at URL: "+o+".",responseText:e.responseText,code:e.status>=500?4:2},this.trigger("error")},i.parseManifest_=function(e){var t=this,a=e.url,o=e.manifestString;return V2({onwarn:function(u){var d=u.message;return t.logger_("m3u8-parser warn for "+a+": "+d)},oninfo:function(u){var d=u.message;return t.logger_("m3u8-parser info for "+a+": "+d)},manifestString:o,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,experimentalLLHLS:this.experimentalLLHLS})},i.haveMetadata=function(e){var t=e.playlistString,a=e.playlistObject,o=e.url,l=e.id;this.request=null,this.state="HAVE_METADATA";var u=a||this.parseManifest_({url:o,manifestString:t});u.lastRequest=Date.now(),Fy({playlist:u,uri:o,id:l});var d=Yd(this.master,u);this.targetDuration=u.partTargetDuration||u.targetDuration,this.pendingMedia_=null,d?(this.master=d,this.media_=this.master.playlists[l]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Qd(this.media(),!!d)),this.trigger("loadedplaylist")},i.dispose=function(){this.trigger("dispose"),this.stopRequest(),K.clearTimeout(this.mediaUpdateTimeout),K.clearTimeout(this.finalRenditionTimeout),this.off()},i.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},i.media=function(e,t){var a=this;if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof e=="string"){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(K.clearTimeout(this.finalRenditionTimeout),t){var o=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=K.setTimeout(this.media.bind(this,e,!1),o);return}var l=this.state,u=!this.media_||e.id!==this.media_.id,d=this.master.playlists[e.id];if(d&&d.endList||e.endList&&e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,u&&(this.trigger("mediachanging"),l==="HAVE_MASTER"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(Qd(e,!0)),!!u){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e,this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},function(f,m){if(a.request){if(e.lastRequest=Date.now(),e.resolvedUri=uo(a.handleManifestRedirects,e.resolvedUri,m),f)return a.playlistRequestError(a.request,e,l);a.haveMetadata({playlistString:m.responseText,url:e.uri,id:e.id}),l==="HAVE_MASTER"?a.trigger("loadedmetadata"):a.trigger("mediachange")}})}},i.pause=function(){this.mediaUpdateTimeout&&(K.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")},i.load=function(e){var t=this;this.mediaUpdateTimeout&&(K.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var a=this.media();if(e){var o=a?(a.partTargetDuration||a.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=K.setTimeout(function(){t.mediaUpdateTimeout=null,t.load()},o);return}if(!this.started){this.start();return}a&&!a.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")},i.updateMediaUpdateTimeout_=function(e){var t=this;this.mediaUpdateTimeout&&(K.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=K.setTimeout(function(){t.mediaUpdateTimeout=null,t.trigger("mediaupdatetimeout"),t.updateMediaUpdateTimeout_(e)},e))},i.start=function(){var e=this;if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=K.location.href),this.src.resolvedUri=this.src.uri,setTimeout(function(){e.setupInitialPlaylist(e.src)},0);return}this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(t,a){if(e.request){if(e.request=null,t)return e.error={status:a.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:a.responseText,code:2},e.state==="HAVE_NOTHING"&&(e.started=!1),e.trigger("error");e.src=uo(e.handleManifestRedirects,e.src,a);var o=e.parseManifest_({manifestString:a.responseText,url:e.src});e.setupInitialPlaylist(o)}})},i.srcUri=function(){return typeof this.src=="string"?this.src:this.src.uri},i.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists){this.master=e,Ny(this.master,this.srcUri()),e.playlists.forEac
39h(function(a){a.segments=Uy(a),a.segments.forEach(function(o){By(o,a.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.master.playlists[0]);return}var t=this.srcUri()||K.location.href;this.master=G2(e,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},r})(W2),X2=ae.xhr,Y2=ae.mergeOptions,Jd=function(r,i,n,e){var t=r.responseType==="arraybuffer"?r.response:r.responseText;!i&&t&&(r.responseTime=Date.now(),r.roundTripTime=r.responseTime-r.requestTime,r.bytesReceived=t.byteLength||t.length,r.bandwidth||(r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3))),n.headers&&(r.responseHeaders=n.headers),i&&i.code==="ETIMEDOUT"&&(r.timedout=!0),!i&&!r.aborted&&n.statusCode!==200&&n.statusCode!==206&&n.statusCode!==0&&(i=new Error("XHR Failed with a response of: "+(r&&(t||r.responseText)))),e(i,r)},Vy=function(){var r=function i(n,e){n=Y2({timeout:45e3},n);var t=i.beforeRequest||ae.Vhs.xhr.beforeRequest;if(t&&typeof t=="function"){var a=t(n);a&&(n=a)}var o=ae.Vhs.xhr.original===!0?X2:ae.Vhs.xhr,l=o(n,function(d,f){return Jd(l,d,f,e)}),u=l.abort;return l.abort=function(){return l.aborted=!0,u.apply(l,arguments)},l.uri=n.uri,l.requestTime=Date.now(),l};return r.original=!0,r},Q2=function(r){var i,n=r.offset;return typeof r.offset=="bigint"||typeof r.length=="bigint"?i=K.BigInt(r.offset)+K.BigInt(r.length)-K.BigInt(1):i=r.offset+r.length-1,"bytes="+n+"-"+i},Zd=function(r){var i={};return r.byterange&&(i.Range=Q2(r.byterange)),i},J2=function(r,i){return r.start(i)+"-"+r.end(i)},Z2=function(r,i){var n=r.toString(16);return"00".substring(0,2-n.length)+n+(i%2?" ":"")},eE=function(r){return r>=32&&r<126?String.fromCharCode(r):"."},Hy=function(r){var i={};return Object.keys(r).forEach(function(n){var e=r[n];a0(e)?i[n]={bytes:e.buffer,byteOffset:e.byteOffset,byteLength:e.byteLength}:i[n]=e}),i},co=function(r){var i=r.byterange||{length:1/0,offset:0};return[i.length,i.offset,r.resolvedUri].join(",")},jy=function(r){return r.resolvedUri},Gy=function(r){for(var i=Array.prototype.slice.call(r),n=16,e="",t,a,o=0;o<i.length/n;o++)t=i.slice(o*n,o*n+n).map(Z2).join(""),a=i.slice(o*n,o*n+n).map(eE).join(""),e+=t+" "+a+`
40`;return e},tE=function(r){var i=r.bytes;return Gy(i)},rE=function(r){var i="",n;for(n=0;n<r.length;n++)i+=J2(r,n)+" ";return i},iE=Object.freeze({__proto__:null,createTransferableMessage:Hy,initSegmentId:co,segmentKeyId:jy,hexDump:Gy,tagDump:tE,textRanges:rE}),Wy=.25,nE=function(r,i){if(!i.dateTimeObject)return null;var n=i.videoTimingInfo.transmuxerPrependedSeconds,e=i.videoTimingInfo.transmuxedPresentationStart,t=e+n,a=r-t;return new Date(i.dateTimeObject.getTime()+a*1e3)},aE=function(r){return r.transmuxedPresentationEnd-r.transmuxedPresentationStart-r.transmuxerPrependedSeconds},sE=function(r,i){var n;try{n=new Date(r)}catch{return null}if(!i||!i.segments||i.segments.length===0)return null;var e=i.segments[0];if(n<e.dateTimeObject)return null;for(var t=0;t<i.segments.length-1;t++){e=i.segments[t];var a=i.segments[t+1].dateTimeObject;if(n<a)break}var o=i.segments[i.segments.length-1],l=o.dateTimeObject,u=o.videoTimingInfo?aE(o.videoTimingInfo):o.duration+o.duration*Wy,d=new Date(l.getTime()+u*1e3);return n>d?null:(n>l&&(e=o),{segment:e,estimatedStart:e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationStart:Pr.duration(i,i.mediaSequence+i.segments.indexOf(e)),type:e.videoTimingInfo?"accurate":"estimate"})},oE=function(r,i){if(!i||!i.segments||i.segments.length===0)return null;for(var n=0,e,t=0;t<i.segments.length&&(e=i.segments[t],n=e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationEnd:n+e.duration,!(r<=n));t++);var a=i.segments[i.segments.length-1];if(a.videoTimingInfo&&a.videoTimingInfo.transmuxedPresentationEnd<r)return null;if(r>n){if(r>n+a.duration*Wy)return null;e=a}return{segment:e,estimatedStart:e.videoTimingInfo?e.videoTimingInfo.transmuxedPresentationStart:n-e.duration,type:e.videoTimingInfo?"accurate":"estimate"}},uE=function(r,i){var n,e;try{n=new Date(r),e=new Date(i)}catch{}var t=n.getTime(),a=e.getTime();return(a-t)/1e3},lE=function(r){if(!r.segments||r.segments.length===0)return!1;for(var i=0;i<r.segments.length;i++){var n=r.segments[i];if(!n.dateTimeObject)return!1}return!0},cE=function(r){var i=r.playlist,n=r.time,e=n===void 0?void 0:n,t=r.callback;if(!t)throw new Error("getProgramTime: callback must be provided");
40if(!i||e===void 0)return t({message:"getProgramTime: playlist and time must be provided"});var a=oE(e,i);if(!a)return t({message:"valid programTime was not found"});if(a.type==="estimate")return t({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:a.estimatedStart});var o={mediaSeconds:e},l=nE(e,a.segment);return l&&(o.programDateTime=l.toISOString()),t(null,o)},dE=function s(r){var i=r.programTime,n=r.playlist,e=r.retryCount,t=e===void 0?2:e,a=r.seekTo,o=r.pauseAfterSeek,l=o===void 0?!0:o,u=r.tech,d=r.callback;if(!d)throw new Error("seekToProgramTime: callback must be provided");if(typeof i>"u"||!n||!a)return d({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!n.endList&&!u.hasStarted_)return d({message:"player must be playing a live stream to start buffering"});if(!lE(n))return d({message:"programDateTime tags must be provided in the manifest "+n.resolvedUri});var f=sE(i,n);if(!f)return d({message:i+" was not found in the stream"});var m=f.segment,x=uE(m.dateTimeObject,i);if(f.type==="estimate"){if(t===0)return d({message:i+" is not buffered yet. Try again"});a(f.estimatedStart+x),u.one("seeked",function(){s({programTime:i,playlist:n,retryCount:t-1,seekTo:a,pauseAfterSeek:l,tech:u,callback:d})});return}var C=m.start+x,L=function(){return d(null,u.currentTime())};u.one("seeked",L),l&&u.pause(),a(C)},Wu=function(r,i){if(r.readyState===4)return i()},fE=function(r,i,n){var e=[],t,a=!1,o=function(m,x,C,L){return x.abort(),a=!0,n(m,x,C,L)},l=function(m,x){if(!a){if(m)return o(m,x,"",e);var C=x.responseText.substring(e&&e.byteLength||0,x.responseText.length);if(e=FT(e,s0(C,!0)),t=t||Fa(e),e.length<10||t&&e.length<t+2)return Wu(x,function(){return o(m,x,"",e)});var L=yf(e);return L==="ts"&&e.length<188?Wu(x,function(){return o(m,x,"",e)}):!L&&e.length<376?Wu(x,function(){return o(m,x,"",e)}):o(null,x,L,e)}},u={uri:r,beforeSend:function(m){m.overrideMimeType("text/plain; charset=x-user-defined"),m.addEventListener("progress",function(x){return x.total,x.loaded,Jd(m,null,{statusCode:m.status},l)})}},d=i(u,function(f,m){return Jd(d,f,m,l)});return d},hE=ae.EventTarget,zy=ae.mergeOptions,Lp=function(r,i){if(!qy(r,i)||r.sidx&&i.sidx&&(r.sidx.offset!==i.sidx.offset||r.sidx.length!==i.sidx.length))return!1;if(!r.sidx&&i.sidx||r.sidx&&!i.sidx||r.segments&&!i.segments||!r.segments&&i.segments)return!1;if(!r.segments&&!i.segments)return!0;for(var n=0;n<r.segments.length;n++){var e=r.segments[n],t=i.segments[n];if(e.uri!==t.uri)return!1;if(!(!e.byterange&&!t.byterange)){var a=e.byterange,o=t.byterange;if(a&&!o||!a&&o||a.offset!==o.offset||a.length!==o.length)return!1}}return!0},pE=function(r,i,n,e){var t=e.attributes.NAME||n;return"placeholder-uri-"+r+"-"+i+"-"+t},mE=function(r){var i=r.masterXml,n=r.srcUrl,e=r.clientOffset,t=r.sidxMapping,a=r.previousManifest,o=LS(i,{manifestUri:n,clientOffset:e,sidxMapping:t,previousManifest:a});return Ny(o,n,pE),o},vE=function(r,i){ba(r,function(n,e,t,a){a in i.mediaGroups[e][t]||delete r.mediaGroups[e][t][a]})},gE=function(r,i,n){for(var e=!0,t=zy(r,{duration:i.duration,minimumUpdatePeriod:i.minimumUpdatePeriod,timelineStarts:i.timelineStarts}),a=0;a<i.playlists.length;a++){var o=i.playlists[a];if(o.sidx){var l=xo(o.sidx);n&&n[l]&&n[l].sidx&&pf(o,n[l].sidx,o.sidx.resolvedUri)}var u=Yd(t,o,Lp);u&&(t=u,e=!1)}return ba(i,function(d,f,m,x){if(d.playlists&&d.playlists.length){var C=d.playlists[0].id,L=Yd(t,d.playlists[0],Lp);L&&(t=L,x in t.mediaGroups[f][m]||(t.mediaGroups[f][m][x]=d),t.mediaGroups[f][m][x].playlists[0]=t.playlists[C],e=!1)}}),vE(t,i),i.minimumUpdatePeriod!==r.minimumUpdatePeriod&&(e=!1),e?null:t},yE=function(r,i){var n=!r.map&&!i.map,e=n||!!(r.map&&i.map&&r.map.byterange.offset===i.map.byterange.offset&&r.map.byterange.length===i.map.byterange.length);return e&&r.uri===i.uri&&r.byterange.offset===i.byterange.offset&&r.byterange.length===i.byterange.length},Mp=function(r,i){var n={};for(var e in r){var t=r[e],a=t.sidx;if(a){var o=xo(a);if(!i[o])break;var l=i[o].sidxInfo;yE(l,a)&&(n[o]=i[o])}}return n},_E=function(r,i){var n=Mp(r.playlists,i),e=n;return ba(r,function(t,a,o,l){if(t.playlists&&t.playlists.length){var u=t.playlists;e=zy(e,Mp(u,i))}}),e},ef=(function(s){Ee(r,s);function r(n,e,t,a){var o;t===void 0&&(t={}),o=s.call(this)||this,o.masterPlaylistLoader_=a||Ge(o),a||(o.isMaster_=!0);var l=t,u=l.withCredentials,d=u===void 0?!1:u,f=l.handleManifestRedirects,m=f===void 0?!1:f;if(o.vhs_=e,o.withCredentials=d,o.handleManifestRedirects=m,!n)throw new Error("A non-empty playlist URL or object is required");return o.on("minimumUpdatePeriod",function(){o.refreshXml_()}),o.on("mediaupdatetimeout",function(){o.refreshMedia_(o.media().id)}),o.state="HAVE_NOTHING",o.loadedPlaylists_={},o.logger_=oi("DashPlaylistLoader"),o.isMaster_?(o.masterPlaylistLoader_.srcUrl=n,o.masterPlaylistLoader_.sidxMapping_={}):o.childPlaylist_=n,o}var i=r.prototype;return i.requestErrored_=function(e,t,a){if(!this.request)return!0;
40if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2},a&&(this.state=a),this.trigger("error"),!0},i.addSidxSegments_=function(e,t,a){var o=this,l=e.sidx&&xo(e.sidx);if(!e.sidx||!l||this.masterPlaylistLoader_.sidxMapping_[l]){this.mediaRequest_=K.setTimeout(function(){return a(!1)},0);return}var u=uo(this.handleManifestRedirects,e.sidx.resolvedUri),d=function(m,x){if(!o.requestErrored_(m,x,t)){var C=o.masterPlaylistLoader_.sidxMapping_,L;try{L=NS(Ne(x.response).subarray(8))}catch(E){o.requestErrored_(E,x,t);return}return C[l]={sidxInfo:e.sidx,sidx:L},pf(e,L,e.sidx.resolvedUri),a(!0)}};this.request=fE(u,this.vhs_.xhr,function(f,m,x,C){if(f)return d(f,m);if(!x||x!=="mp4")return d({status:m.status,message:"Unsupported "+(x||"unknown")+" container type for sidx segment at URL: "+u,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},m);var L=e.sidx.byterange,E=L.offset,B=L.length;if(C.length>=B+E)return d(f,{response:C.subarray(E,E+B),status:m.status,uri:m.uri});o.request=o.vhs_.xhr({uri:u,responseType:"arraybuffer",headers:Zd({byterange:e.sidx.byterange})},d)})},i.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},K.clearTimeout(this.minimumUpdatePeriodTimeout_),K.clearTimeout(this.mediaRequest_),K.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},i.hasPendingRequest=function(){return this.request||this.mediaRequest_},i.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},i.media=function(e){var t=this;if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);var a=this.state;if(typeof e=="string"){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}var o=!this.media_||e.id!==this.media_.id;if(o&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,o&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}o&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,a,function(l){t.haveMetadata({startingState:a,playlist:e})}))},i.haveMetadata=function(e){var t=e.startingState,a=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[a.id]=a,this.mediaRequest_=null,this.refreshMedia_(a.id),t==="HAVE_MASTER"?this.trigger("loadedmetadata"):this.trigger("mediachange")},i.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),K.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMaster_&&(K.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)},i.load=function(e){var t=this;K.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;var a=this.media();if(e){var o=a?a.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=K.setTimeout(function(){return t.load()},o);return}if(!this.started){this.start();return}a&&!a.endList?(this.isMaster_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")},i.start=function(){var e=this;if(this.started=!0,!this.isMaster_){this.mediaRequest_=K.setTimeout(function(){return e.haveMaster_()},0);return}this.requestMaster_(function(t,a){e.haveMaster_(),!e.hasPendingRequest()&&!e.media_&&e.media(e.masterPlaylistLoader_.master.playlists[0])})},i.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(a,o){if(t.requestErrored_(a,o)){t.state==="HAVE_NOTHING"&&(t.started=!1);return}var l=o.responseText!==t.masterPlaylistLoader_.masterXml_;if(t.masterPlaylistLoader_.masterXml_=o.responseText,o.responseHeaders&&o.responseHeaders.date?t.masterLoaded_=Date.parse(o.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=uo(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,o),l){t.handleMaster_(),t.syncClientServerClock_(function(){return e(o,l)});return}return e(o,l)})},i.syncClientServerClock_=function(e){var t=this,a=MS(this.masterPlaylistLoader_.masterXml_);if(a===null)return this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e();if(a.method==="DIRECT")return this.masterPlaylistLoader_.clientOffset_=a.value-Date.now(),e();this.request=this.vhs_.xhr({uri:ti(this.masterPlaylistLoader_.srcUrl,a.value),method:a.method,withCredentials:this.withCredentials},function(o,l){if(t.request){if(o)return t.masterPlaylistLoader_.clientOffset_=t.masterLoaded_-Date.now(),e();var u;a.method==="HEAD"?!l.responseHeaders||!l.responseHeaders.date?u=t.masterLoaded_:u=Date.parse(l.responseHeaders.date):u=Date.parse(l.responseText),t.masterPlaylistLoader_.clientOffset_=u-Date.now(),e()}})},i.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},i.handleMaster_=function(){this.mediaRequest_=null;var e=this.masterPlaylistLoader_.master,t=mE({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_,previousManifest:e});e&&(t=gE(e,t,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=t||e;var a=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0];return a&&a!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=a),(!e||t&&t.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),!!t},i.updateMinimumUpdatePeriodTimeout_=function(){var e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(K.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);var t=e.master&&e.master.minimumUpdatePeriod;
40if(t===0&&(e.media()?t=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof t!="number"||t<=0){t<0&&this.logger_("found invalid minimumUpdatePeriod of "+t+", not setting a timeout");return}this.createMUPTimeout_(t)},i.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=K.setTimeout(function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)},i.refreshXml_=function(){var e=this;this.requestMaster_(function(t,a){a&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=_E(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.sidxMapping_),e.addSidxSegments_(e.media(),e.state,function(o){e.refreshMedia_(e.media().id)}))})},i.refreshMedia_=function(e){var t=this;if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var a=this.masterPlaylistLoader_.master.playlists,o=!this.media_||this.media_!==a[e];if(o?this.media_=a[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){var l=function u(){t.media().endList||(t.mediaUpdateTimeout=K.setTimeout(function(){t.trigger("mediaupdatetimeout"),u()},Qd(t.media(),!!o)))};l()}this.trigger("loadedplaylist")},r})(hE),Qt={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},bE=function(r){for(var i=new Uint8Array(new ArrayBuffer(r.length)),n=0;n<r.length;n++)i[n]=r.charCodeAt(n);return i.buffer},$y=function(r){return r.on=r.addEventListener,r.off=r.removeEventListener,r},TE=function(r){try{return URL.createObjectURL(new Blob([r],{type:"application/javascript"}))}catch{var i=new BlobBuilder;return i.append(r),URL.createObjectURL(i.getBlob())}},Ky=function(r){return function(){var i=TE(r),n=$y(new Worker(i));n.objURL=i;var e=n.terminate;return n.on=n.addEventListener,n.off=n.removeEventListener,n.terminate=function(){return URL.revokeObjectURL(i),e.call(this)},n}},Xy=function(r){return"var browserWorkerPolyFill = "+$y.toString()+`;
41browserWorkerPolyFill(self);
42`+r},Yy=function(r){return r.toString().replace(/^function.+?{/,"").slice(0,-1)},SE=Xy(Yy(function(){var s=function(){this.init=function(){var h={};this.on=function(v,y){h[v]||(h[v]=[]),h[v]=h[v].concat(y)},this.off=function(v,y){var b;return h[v]?(b=h[v].indexOf(y),h[v]=h[v].slice(),h[v].splice(b,1),b>-1):!1},this.trigger=function(v){var y,b,w,k;if(y=h[v],!!y)if(arguments.length===2)for(w=y.length,b=0;b<w;++b)y[b].call(this,arguments[1]);else{for(k=[],b=arguments.length,b=1;b<arguments.length;++b)k.push(arguments[b]);for(w=y.length,b=0;b<w;++b)y[b].apply(this,k)}},this.dispose=function(){h={}}}};s.prototype.pipe=function(I){return this.on("data",function(h){I.push(h)}),this.on("done",function(h){I.flush(h)}),this.on("partialdone",function(h){I.partialFlush(h)}),this.on("endedtimeline",function(h){I.endTimeline(h)}),this.on("reset",function(h){I.reset(h)}),I},s.prototype.push=function(I){this.trigger("data",I)},s.prototype.flush=function(I){this.trigger("done",I)},s.prototype.partialFlush=function(I){this.trigger("partialdone",I)},s.prototype.endTimeline=function(I){this.trigger("endedtimeline",I)},s.prototype.reset=function(I){this.trigger("reset",I)};var r=s,i=Math.pow(2,32),n=function(h){var v=new DataView(h.buffer,h.byteOffset,h.byteLength),y;return v.getBigUint64?(y=v.getBigUint64(0),y<Number.MAX_SAFE_INTEGER?Number(y):y):v.getUint32(0)*i+v.getUint32(4)},e={getUint64:n,MAX_UINT32:i},t=e.MAX_UINT32,a,o,l,u,d,f,m,x,C,L,E,B,q,z,U,F,G,O,H,A,D,j,X,J,ne,se,ue,oe,te,le,re,ce,be,Pe,Re,ge;(function(){var I;if(X={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(I in X)X.hasOwnProperty(I)&&(X[I]=[I.charCodeAt(0),I.charCodeAt(1),I.charCodeAt(2),I.charCodeAt(3)]);J=new Uint8Array([105,115,111,109]),se=new Uint8Array([97,118,99,49]),ne=new Uint8Array([0,0,0,1]),ue=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]),oe=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]),te={video:ue,audio:oe},ce=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),re=new Uint8Array([0,0,0,0,0,0,0,0]),be=new Uint8Array([0,0,0,0,0,0,0,0]),Pe=be,Re=new 
vendor: 23,507 bytes, lines 42-45
42Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),ge=be,le=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),a=function(h){var v=[],y=0,b,w,k;for(b=1;b<arguments.length;b++)v.push(arguments[b]);for(b=v.length;b--;)y+=v[b].byteLength;for(w=new Uint8Array(y+8),k=new DataView(w.buffer,w.byteOffset,w.byteLength),k.setUint32(0,w.byteLength),w.set(h,4),b=0,y=8;b<v.length;b++)w.set(v[b],y),y+=v[b].byteLength;return w},o=function(){return a(X.dinf,a(X.dref,ce))},l=function(h){return a(X.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,h.audioobjecttype<<3|h.samplingfrequencyindex>>>1,h.samplingfrequencyindex<<7|h.channelcount<<3,6,1,2]))},u=function(){return a(X.ftyp,J,ne,J,se)},F=function(h){return a(X.hdlr,te[h])},d=function(h){return a(X.mdat,h)},U=function(h){var v=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,h.duration>>>24&255,h.duration>>>16&255,h.duration>>>8&255,h.duration&255,85,196,0,0]);return h.samplerate&&(v[12]=h.samplerate>>>24&255,v[13]=h.samplerate>>>16&255,v[14]=h.samplerate>>>8&255,v[15]=h.samplerate&255),a(X.mdhd,v)},z=function(h){return a(X.mdia,U(h),F(h.type),m(h))},f=function(h){return a(X.mfhd,new Uint8Array([0,0,0,0,(h&4278190080)>>24,(h&16711680)>>16,(h&65280)>>8,h&255]))},m=function(h){return a(X.minf,h.type==="video"?a(X.vmhd,le):a(X.smhd,re),o(),O(h))},x=function(h,v){for(var y=[],b=v.length;b--;)y[b]=A(v[b]);return a.apply(null,[X.moof,f(h)].concat(y))},C=function(h){for(var v=h.length,y=[];v--;)y[v]=B(h[v]);return a.apply(null,[X.moov,E(4294967295)].concat(y).concat(L(h)))},L=function(h){for(var v=h.length,y=[];v--;)y[v]=D(h[v]);return a.apply(null,[X.mvex].concat(y))},E=function(h){var v=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(h&4278190080)>>24,(h&16711680)>>16,(h&65280)>>8,h&255,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]);return a(X.mvhd,v)},G=function(h){var v=h.samples||[],y=new Uint8Array(4+v.length),b,w;for(w=0;w<v.length;w++)b=v[w].flags,y[w+4]=b.dependsOn<<4|b.isDependedOn<<2|b.hasRedundancy;return a(X.sdtp,y)},O=function(h){return a(X.stbl,H(h),a(X.stts,ge),a(X.stsc,Pe),a(X.stsz,Re),a(X.stco,be))},(function(){var I,h;H=function(y){return a(X.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),y.type==="video"?I(y):h(y))},I=function(y){var b=y.sps||[],w=y.pps||[],k=[],V=[],W,Z;for(W=0;W<b.length;W++)k.push((b[W].byteLength&65280)>>>8),k.push(b[W].byteLength&255),k=k.concat(Array.prototype.slice.call(b[W]));for(W=0;W<w.length;W++)V.push((w[W].byteLength&65280)>>>8),V.push(w[W].byteLength&255),V=V.concat(Array.prototype.slice.call(w[W]));if(Z=[X.avc1,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,(y.width&65280)>>8,y.width&255,(y.height&65280)>>8,y.height&255,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]),a(X.avcC,new Uint8Array([1,y.profileIdc,y.profileCompatibility,y.levelIdc,255].concat([b.length],k,[w.length],V))),a(X.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],y.sarRatio){var Q=y.sarRatio[0],ie=y.sarRatio[1];Z.push(a(X.pasp,new Uint8Array([(Q&4278190080)>>24,(Q&16711680)>>16,(Q&65280)>>8,Q&255,(ie&4278190080)>>24,(ie&16711680)>>16,(ie&65280)>>8,ie&255])))}return a.apply(null,Z)},h=function(y){return a(X.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(y.channelcount&65280)>>8,y.channelcount&255,(y.samplesize&65280)>>8,y.samplesize&255,0,0,0,0,(y.samplerate&65280)>>8,y.samplerate&255,0,0]),l(y))}})(),q=function(h){var v=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(h.id&4278190080)>>24,(h.id&16711680)>>16,(h.id&65280)>>8,h.id&255,0,0,0,0,(h.duration&4278190080)>>24,(h.duration&16711680)>>16,(h.duration&65280)>>8,h.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,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,(h.width&65280)>>8,h.width&255,0,0,(h.height&65280)>>8,h.height&255,0,0]);return a(X.tkhd,v)},A=function(h){var v,y,b,w,k,V,W;return v=a(X.tfhd,new Uint8Array([0,0,0,58,(h.id&4278190080)>>24,(h.id&16711680)>>16,(h.id&65280)>>8,h.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),V=Math.floor(h.baseMediaDecodeTime/t),W=Math.floor(h.baseMediaDecodeTime%t),y=a(X.tfdt,new Uint8Array([1,0,0,0,V>>>24&255,V>>>16&255,V>>>8&255,V&255,W>>>24&255,W>>>16&255,W>>>8&255,W&255])),k=92,h.type==="audio"?(b=j(h,k),a(X.traf,v,y,b)):(w=G(h),b=j(h,w.length+k),a(X.traf,v,y,b,w))},B=function(h){return h.duration=h.duration||4294967295,a(X.trak,q(h),z(h))},D=function(h){var v=new Uint8Array([0,0,0,0,(h.id&4278190080)>>24,(h.id&16711680)>>16,(h.id&65280)>>8,h.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return h.type!=="video"&&(v[v.length-1]=0),a(X.trex,v)},(function(){var I,h,v;v=function(b,w){var k=0,V=0,W=0,Z=0;return b.length&&(b[0].duration!==void 0&&(k=1),b[0].size!==void 0&&(V=2),b[0].flags!==void 0&&(W=4),b[0].compositionTimeOffset!==void 0&&(Z=8)),[0,0,k|V|W|Z,1,(b.length&4278190080)>>>24,(b.length&16711680)>>>16,(b.length&65280)>>>8,b.length&255,(w&4278190080)>>>24,(w&16711680)>>>16,(w&65280)>>>8,w&255]},h=function(b,w){var k,V,W,Z,Q,ie;for(Z=b.samples||[],w+=20+16*Z.length,W=v(Z,w),V=new Uint8Array(W.length+Z.length*16),V.set(W),k=W.length,ie=0;ie<Z.length;ie++)Q=Z[ie],V[k++]=(Q.duration&4278190080)>>>24,V[k++]=(Q.duration&16711680)>>>16,V[k++]=(Q.duration&65280)>>>8,V[k++]=Q.duration&255,V[k++]=(Q.size&4278190080)>>>24,V[k++]=(Q.size&16711680)>>>16,V[k++]=(Q.size&65280)>>>8,V[k++]=Q.size&255,V[k++]=Q.flags.isLeading<<2|Q.flags.dependsOn,V[k++]=Q.flags.isDependedOn<<6|Q.flags.hasRedundancy<<4|Q.flags.paddingValue<<1|Q.flags.isNonSyncSample,V[k++]=Q.flags.degradationPriority&61440,V[k++]=Q.flags.degradationPriority&15,V[k++]=(Q.compositionTimeOffset&4278190080)>>>24,V[k++]=(Q.compositionTimeOffset&16711680)>>>16,V[k++]=(Q.compositionTimeOffset&65280)>>>8,V[k++]=Q.compositionTimeOffset&255;return a(X.trun,V)},I=function(b,w){var k,V,W,Z,Q,ie;for(Z=b.samples||[],w+=20+8*Z.length,W=v(Z,w),k=new Uint8Array(W.length+Z.length*8),k.set(W),V=W.length,ie=0;ie<Z.length;ie++)Q=Z[ie],k[V++]=(Q.duration&4278190080)>>>24,k[V++]=(Q.duration&16711680)>>>16,k[V++]=(Q.duration&65280)>>>8,k[V++]=Q.duration&255,k[V++]=(Q.size&4278190080)>>>24,k[V++]=(Q.size&16711680)>>>16,k[V++]=(Q.size&65280)>>>8,k[V++]=Q.size&255;return a(X.trun,k)},j=function(b,w){return b.type==="audio"?I(b,w):h(b,w)}})();var De={ftyp:u,mdat:d,moof:x,moov:C,initSegment:function(h){var v=u(),y=C(h),b;return b=new Uint8Array(v.byteLength+y.byteLength),b.set(v),b.set(y,v.byteLength),b}},Qe=function(h){var v,y,b=[],w=[];for(w.byteLength=0,w.nalCount=0,w.duration=0,b.byteLength=0,v=0;v<h.length;v++)y=h[v],y.nalUnitType==="access_unit_delimiter_rbsp"?(b.length&&(b.duration=y.dts-b.dts,w.byteLength+=b.byteLength,w.nalCount+=b.length,w.duration+=b.duration,w.push(b)),b=[y],b.byteLength=y.data.byteLength,b.pts=y.pts,b.dts=y.dts):(y.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(b.keyFrame=!0),b.duration=y.dts-b.dts,b.byteLength+=y.data.byteLength,b.push(y));return w.length&&(!b.duration||b.duration<=0)&&(b.duration=w[w.length-1].duration),w.byteLength+=b.byteLength,w.nalCount+=b.length,w.duration+=b.duration,w.push(b),w},Oe=function(h){var v,y,b=[],w=[];for(b.byteLength=0,b.nalCount=0,b.duration=0,b.pts=h[0].pts,b.dts=h[0].dts,w.byteLength=0,w.nalCount=0,w.duration=0,w.pts=h[0].pts,w.dts=h[0].dts,v=0;v<h.length;v++)y=h[v],y.keyFrame?(b.length&&(w.push(b),w.byteLength+=b.byteLength,w.nalCount+=b.nalCount,w.duration+=b.duration),b=[y],b.nalCount=y.length,b.byteLength=y.byteLength,b.pts=y.pts,b.dts=y.dts,b.duration=y.duration):(b.duration+=y.duration,b.nalCount+=y.length,b.byteLength+=y.byteLength,b.push(y));return w.length&&b.duration<=0&&(b.duration=w[w.length-1].duration),w.byteLength+=b.byteLength,w.nalCount+=b.nalCount,w.duration+=b.duration,w.push(b),w},ot=function(h){var v;return!h[0][0].keyFrame&&h.length>1&&(v=h.shift(),h.byteLength-=v.byteLength,h.nalCount-=v.nalCount,h[0][0].dts=v.dts,h[0][0].pts=v.pts,h[0][0].duration+=v.duration),h},vt=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},ut=function(h,v){var y=vt();return y.dataOffset=v,y.compositionTimeOffset=h.pts-h.dts,y.duration=h.duration,y.size=4*h.length,y.size+=h.byteLength,h.keyFrame&&(y.flags.dependsOn=2,y.flags.isNonSyncSample=0),y},it=function(h,v){var y,b,w,k,V,W=v||0,Z=[];for(y=0;y<h.length;y++)for(k=h[y],b=0;b<k.length;b++)V=k[b],w=ut(V,W),W+=w.size,Z.push(w);return Z},tt=function(h){var v,y,b,w,k,V,W=0,Z=h.byteLength,Q=h.nalCount,ie=Z+4*Q,me=new Uint8Array(ie),Ce=new DataView(me.buffer);for(v=0;v<h.length;v++)for(w=h[v],y=0;y<w.length;y++)for(k=w[y],b=0;b<k.length;b++)V=k[b],Ce.setUint32(W,V.data.byteLength),W+=4,me.set(V.data,W),W+=V.data.byteLength;return me},nt=function(h,v){var y,b=v||0,w=[];return y=ut(h,b),w.push(y),w},Cr=function(h){var v,y,b=0,w=h.byteLength,k=h.length,V=w+4*k,W=new Uint8Array(V),Z=new DataView(W.buffer);for(v=0;v<h.length;v++)y=h[v],Z.setUint32(b,y.data.byteLength),b+=4,W.set(y.data,b),b+=y.data.byteLength;return W},ft={groupNalsIntoFrames:Qe,groupFramesIntoGops:Oe,extendFirstKeyFrame:ot,generateSampleTable:it,concatenateNalData:tt,generateSampleTableForFrame:nt,concatenateNalDataForFrame:Cr},er=[33,16,5,32,164,27],Ur=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],$e=function(h){for(var v=[];h--;)v.push(0);return v},Kr=function(h){return Object.keys(h).reduce(function(v,y){return v[y]=new Uint8Array(h[y].reduce(function(b,w){return b.concat(w)},[])),v},{})},Xe,Ie=function(){if(!Xe){var h={96e3:[er,[227,64],$e(154),[56]],88200:[er,[231],$e(170),[56]],64e3:[er,[248,192],$e(240),[56]],48e3:[er,[255,192],$e(268),[55,148,128],$e(54),[112]],44100:[er,[255,192],$e(268),[55,163,128],$e(84),[112]],32e3:[er,[255,192],$e(268),[55,234],$e(226),[112]],24e3:[er,[255,192],$e(268),[55,255,128],$e(268),[111,112],$e(126),[224]],16e3:[er,[255,192],$e(268),[55,255,128],$e(268),[111,255],$e(269),[223,108],$e(195),[1,192]],12e3:[Ur,$e(268),[3,127,248],$e(268),[6,255,240],$e(268),[13,255,224],$e(268),[27,253,128],$e(259),[56]],11025:[Ur,$e(268),[3,127,248],$e(268),[6,255,240],$e(268),[13,255,224],$e(268),[27,255,192],$e(268),[55,175,128],$e(108),[112]],8e3:[Ur,$e(268),[3,121,16],$e(47),[7]]};Xe=Kr(h)}return Xe},ht=9e4,ui,li,ci,di,Yi,hn,Xr;ui=function(h){return h*ht},li=function(h,v){return h*v},ci=function(h){return h/ht},di=function(h,v){return h/v},Yi=function(h,v){return ui(di(h,v))},hn=function(h,v){return li(ci(h),v)},Xr=function(h,v,y){return ci(y?h:h-v)};var Ze={ONE_SECOND_IN_TS:ht,secondsToVideoTs:ui,secondsToAudioTs:li,videoTsToSeconds:ci,audioTsToSeconds:di,audioTsToVideoTs:Yi,videoTsToAudioTs:hn,metadataTsToSeconds:Xr},Qi=function(h){var v,y,b=0;for(v=0;v<h.length;v++)y=h[v],b+=y.data.byteLength;return b},pn=function(h,v,y,b){var w,k=0,V=0,W=0,Z=0,Q,ie,me;if(v.length&&(w=Ze.audioTsToVideoTs(h.baseMediaDecodeTime,h.samplerate),k=Math.ceil(Ze.ONE_SECOND_IN_TS/(h.samplerate/1024)),y&&b&&(V=w-Math.max(y,b),W=Math.floor(V/k),Z=W*k),!(W<1||Z>Ze.ONE_SECOND_IN_TS/2))){for(Q=Ie()[h.samplerate],Q||(Q=v[0].data),ie=0;ie<W;ie++)me=v[0],v.splice(0,0,{data:Q,dts:me.dts-k,pts:me.pts-k});return h.baseMediaDecodeTime-=Math.floor(Ze.videoTsToAudioTs(Z,h.samplerate)),Z}},Yr=function(h,v,y){return v.minSegmentDts>=y?h:(v.minSegmentDts=1/0,h.filter(function(b){return b.dts>=y?(v.minSegmentDts=Math.min(v.minSegmentDts,b.dts),v.minSegmentPts=v.minSegmentDts,!0):!1}))},mn=function(h){var v,y,b=[];for(v=0;v<h.length;v++)y=h[v],b.push({size:y.data.byteLength,duration:1024});return b},Ji=function(h){var v,y,b=0,w=new Uint8Array(Qi(h));for(v=0;v<h.length;v++)y=h[v],w.set(y.data,b),b+=y.data.byteLength;return w},fr={prefixWithSilence:pn,trimAdtsFramesByEarliestDts:Yr,generateSampleTable:mn,concatenateFrameData:Ji},Zi=Ze.ONE_SECOND_IN_TS,qr=function(h,v){typeof v.pts=="number"&&(h.timelineStartInfo.pts===void 0&&(h.timelineStartInfo.pts=v.pts),h.minSegmentPts===void 0?h.minSegmentPts=v.pts:h.minSegmentPts=Math.min(h.minSegmentPts,v.pts),h.maxSegmentPts===void 0?h.maxSegmentPts=v.pts:h.maxSegmentPts=Math.max(h.maxSegmentPts,v.pts)),typeof v.dts=="number"&&(h.timelineStartInfo.dts===void 0&&(h.timelineStartInfo.dts=v.dts),h.minSegmentDts===void 0?h.minSegmentDts=v.dts:h.minSegmentDts=Math.min(h.minSegmentDts,v.dts),h.maxSegmentDts===void 0?h.maxSegmentDts=v.dts:h.maxSegmentDts=Math.max(h.maxSegmentDts,v.dts))},Tt=function(h){delete h.minSegmentDts,delete h.maxSegmentDts,delete h.minSegmentPts,delete h.maxSegmentPts},R=function(h,v){var y,b,w=h.minSegmentDts;return v||(w-=h.timelineStartInfo.dts),y=h.timelineStartInfo.baseMediaDecodeTime,y+=w,y=Math.max(0,y),h.type==="audio"&&(b=h.samplerate/Zi,y*=b,y=Math.floor(y)),y},M={clearDtsInfo:Tt,calculateTrackBaseMediaDecodeTime:R,collectDtsInfo:qr},ee=4,Y=128,we=function(h){for(var v=0,y={payloadType:-1,payloadSize:0},b=0,w=0;v<h.byteLength&&h[v]!==Y;){for(;h[v]===255;)b+=255,v++;for(b+=h[v++];h[v]===255;)w+=255,v++;if(w+=h[v++],!y.payload&&b===ee){var k=String.fromCharCode(h[v+3],h[v+4],h[v+5],h[v+6]);if(k==="GA94"){y.payloadType=b,y.payloadSize=w,y.payload=h.subarray(v,v+w);break}else y.payload=void 0}v+=w,b=0,w=0}return y},Ue=function(h){return h.payload[0]!==181||(h.payload[1]<<8|h.payload[2])!==49||String.fromCharCode(h.payload[3],h.payload[4],h.payload[5],h.payload[6])!=="GA94"||h.payload[7]!==3?null:h.payload.subarray(8,h.payload.length-1)},ct=function(h,v){var y=[],b,w,k,V;if(!(v[0]&64))return y;for(w=v[0]&31,b=0;b<w;b++)k=b*3,V={type:v[k+2]&3,pts:h},v[k+2]&4&&(V.ccData=v[k+3]<<8|v[k+4],y.push(V));return y},Ht=function(h){for(var v=h.byteLength,y=[],b=1,w,k;b<v-2;)h[b]===0&&h[b+1]===0&&h[b+2]===3?(y.push(b+2),b+=2):b++;if(y.length===0)return h;w=v-y.length,k=new Uint8Array(w);var V=0;for(b=0;b<w;V++,b++)V===y[0]&&(V++,y.shift()),k[b]=h[V];return k},tr={parseSei:we,parseUserData:Ue,parseCaptionPackets:ct,discardEmulationPreventionBytes:Ht,USER_DATA_REGISTERED_ITU_T_T35:ee},Et=function I(h){h=h||{},I.prototype.init.call(this),this.parse708captions_=typeof h.parse708captions=="boolean"?h.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new gt(0,0),new gt(0,1),new gt(1,0),new gt(1,1)],this.parse708captions_&&(this.cc708Stream_=new et({captionServices:h.captionServices})),this.reset(),this.ccStreams_.forEach(function(v){v.on("data",this.trigger.bind(this,"data")),v.on("partialdone",this.trigger.bind(this,"partialdone")),v.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Et.prototype=new r,Et.prototype.push=function(I){var h,v,y;if(I.nalUnitType==="sei_rbsp"&&(h=tr.parseSei(I.escapedRBSP),!!h.payload&&h.payloadType===tr.USER_DATA_REGISTERED_ITU_T_T35&&(v=tr.parseUserData(h),!!v))){if(I.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(I.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}y=tr.parseCaptionPackets(I.pts,v),this.captionPackets_=this.captionPackets_.concat(y),this.latestDts_!==I.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=I.dts}},Et.prototype.flushCCStreams=function(I){this.ccStreams_.forEach(function(h){return I==="flush"?h.flush():h.partialFlush()},this)},Et.prototype.flushStream=function(I){if(!this.captionPackets_.length){this.flushCCStreams(I);return}this.captionPackets_.forEach(function(h,v){h.presortIndex=v}),this.captionPackets_.sort(function(h,v){return h.pts===v.pts?h.presortIndex-v.presortIndex:h.pts-v.pts}),this.captionPackets_.forEach(function(h){h.type<2?this.dispatchCea608Packet(h):this.dispatchCea708Packet(h)},this),this.captionPackets_.length=0,this.flushCCStreams(I)},Et.prototype.flush=function(){return this.flushStream("flush")},Et.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Et.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(I){I.reset()})},Et.prototype.dispatchCea608Packet=function(I){this.setsTextOrXDSActive(I)?this.activeCea608Channel_[I.type]=null:this.setsChannel1Active(I)?this.activeCea608Channel_[I.type]=0:this.setsChannel2Active(I)&&(this.activeCea608Channel_[I.type]=1),this.activeCea608Channel_[I.type]!==null&&this.ccStreams_[(I.type<<1)+this.activeCea608Channel_[I.type]].push(I)},Et.prototype.setsChannel1Active=function(I){return(I.ccData&30720)===4096},Et.prototype.setsChannel2Active=function(I){return(I.ccData&30720)===6144},Et.prototype.setsTextOrXDSActive=function(I){return(I.ccData&28928)===256||(I.ccData&30974)===4138||(I.ccData&30974)===6186},Et.prototype.dispatchCea708Packet=function(I){this.parse708captions_&&this.cc708Stream_.push(I)};var Ir={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Nt=function(h){var v=Ir[h]||h;return h&4096&&h===v?"":String.fromCharCode(v)},rr=function(h){return 32<=h&&h<=127||160<=h&&h<=255},Bt=function(h){this.windowNum=h,this.reset()};Bt.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Bt.prototype.getText=function(){return this.rows.join(`
43`)},Bt.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Bt.prototype.newLine=function(I){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(I),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Bt.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Bt.prototype.addText=function(I){this.rows[this.rowIdx]+=I},Bt.prototype.backspace=function(){if(!this.isEmpty()){var I=this.rows[this.rowIdx];this.rows[this.rowIdx]=I.substr(0,I.length-1)}};var jt=function(h,v,y){this.serviceNum=h,this.text="",this.currentWindow=new Bt(-1),this.windows=[],this.stream=y,typeof v=="string"&&this.createTextDecoder(v)};jt.prototype.init=function(I,h){this.startPts=I;for(var v=0;v<8;v++)this.windows[v]=new Bt(v),typeof h=="function"&&(this.windows[v].beforeRowOverflow=h)},jt.prototype.setCurrentWindow=function(I){this.currentWindow=this.windows[I]},jt.prototype.createTextDecoder=function(I){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(I)}catch(h){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+I+" encoding. "+h})}};var et=function I(h){h=h||{},I.prototype.init.call(this);var v=this,y=h.captionServices||{},b={},w;Object.keys(y).forEach(function(k){w=y[k],/^SERVICE/.test(k)&&(b[k]=w.encoding)}),this.serviceEncodings=b,this.current708Packet=null,this.services={},this.push=function(k){k.type===3?(v.new708Packet(),v.add708Bytes(k)):(v.current708Packet===null&&v.new708Packet(),v.add708Bytes(k))}};et.prototype=new r,et.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},et.prototype.add708Bytes=function(I){var h=I.ccData,v=h>>>8,y=h&255;this.current708Packet.ptsVals.push(I.pts),this.current708Packet.data.push(v),this.current708Packet.data.push(y)},et.prototype.push708Packet=function(){var I=this.current708Packet,h=I.data,v=null,y=null,b=0,w=h[b++];for(I.seq=w>>6,I.sizeCode=w&63;b<h.length;b++)w=h[b++],v=w>>5,y=w&31,v===7&&y>0&&(w=h[b++],v=w),this.pushServiceBlock(v,b,y),y>0&&(b+=y-1)},et.prototype.pushServiceBlock=function(I,h,v){var y,b=h,w=this.current708Packet.data,k=this.services[I];for(k||(k=this.initService(I,b));b<h+v&&b<w.length;b++)y=w[b],rr(y)?b=this.handleText(b,k):y===24?b=this.multiByteCharacter(b,k):y===16?b=this.extendedCommands(b,k):128<=y&&y<=135?b=this.setCurrentWindow(b,k):152<=y&&y<=159?b=this.defineWindow(b,k):y===136?b=this.clearWindows(b,k):y===140?b=this.deleteWindows(b,k):y===137?b=this.displayWindows(b,k):y===138?b=this.hideWindows(b,k):y===139?b=this.toggleWindows(b,k):y===151?b=this.setWindowAttributes(b,k):y===144?b=this.setPenAttributes(b,k):y===145?b=this.setPenColor(b,k):y===146?b=this.setPenLocation(b,k):y===143?k=this.reset(b,k):y===8?k.currentWindow.backspace():y===12?k.currentWindow.clearText():y===13?k.currentWindow.pendingNewLine=!0:y===14?k.currentWindow.clearText():y===141&&b++},et.prototype.extendedCommands=function(I,h){var v=this.current708Packet.data,y=v[++I];return rr(y)&&(I=this.handleText(I,h,{isExtended:!0})),I},et.prototype.getPts=function(I){return this.current708Packet.ptsVals[Math.floor(I/2)]},et.prototype.initService=function(I,h){var y="SERVICE"+I,v=this,y,b;return y in this.serviceEncodings&&(b=this.serviceEncodings[y]),this.services[I]=new jt(I,b,v),this.services[I].init(this.getPts(h),function(w){v.flushDisplayed(w,v.services[I])}),this.services[I]},et.prototype.handleText=function(I,h,v){var y=v&&v.isExtended,b=v&&v.isMultiByte,w=this.current708Packet.data,k=y?4096:0,V=w[I],W=w[I+1],Z=h.currentWindow,Q,ie;return h.textDecoder_&&!y?(b?(ie=[V,W],I++):ie=[V],Q=h.textDecoder_.decode(new Uint8Array(ie))):Q=Nt(k|V),Z.pendingNewLine&&!Z.isEmpty()&&Z.newLine(this.getPts(I)),Z.pendingNewLine=!1,Z.addText(Q),I},et.prototype.multiByteCharacter=function(I,h){var v=this.current708Packet.data,y=v[I+1],b=v[I+2];return rr(y)&&rr(b)&&(I=this.handleText(++I,h,{isMultiByte:!0})),I},et.prototype.setCurrentWindow=function(I,h){var v=this.current708Packet.data,y=v[I],b=y&7;return h.setCurrentWindow(b),I},et.prototype.defineWindow=function(I,h){var v=this.current708Packet.data,y=v[I],b=y&7;h.setCurrentWindow(b);var w=h.currentWindow;return y=v[++I],w.visible=(y&32)>>5,w.rowLock=(y&16)>>4,w.columnLock=(y&8)>>3,w.priority=y&7,y=v[++I],w.relativePositioning=(y&128)>>7,w.anchorVertical=y&127,y=v[++I],w.anchorHorizontal=y,y=v[++I],w.anchorPoint=(y&240)>>4,w.rowCount=y&15,y=v[++I],w.columnCount=y&63,y=v[++I],w.windowStyle=(y&56)>>3,w.penStyle=y&7,w.virtualRowCount=w.rowCount+1,I},et.prototype.setWindowAttributes=function(I,h){var v=this.current708Packet.data,y=v[I],b=h.currentWindow.winAttr;return y=v[++I],b.fillOpacity=(y&192)>>6,b.fillRed=(y&48)>>4,b.fillGreen=(y&12)>>2,b.fillBlue=y&3,y=v[++I],b.borderType=(y&192)>>6,b.borderRed=(y&48)>>4,b.borderGreen=(y&12)>>2,b.borderBlue=y&3,y=v[++I],b.borderType+=(y&128)>>5,b.wordWrap=(y&64)>>6,b.printDirection=(y&48)>>4,b.scrollDirection=(y&12)>>2,b.justify=y&3,y=v[++I],b.effectSpeed=(y&240)>>4,b.effectDirection=(y&12)>>2,b.displayEffect=y&3,I},et.prototype.flushDisplayed=function(I,h){for(var v=[],y=0;y<8;y++)h.windows[y].visible&&!h.windows[y].isEmpty()&&v.push(h.windows[y].getText());h.endPts=I,h.text=v.join(`
44
45`),this.pushCaption(h),h.startPts=I},et.prototype.pushCaption=function(I){I.text!==""&&(this.trigger("data",{startPts:I.startPts,endPts:I.endPts,text:I.text,stream
45:"cc708_"+I.serviceNum}),I.text="",I.startPts=I.endPts)},et.prototype.displayWindows=function(I,h){var v=this.current708Packet.data,y=v[++I],b=this.getPts(I);this.flushDisplayed(b,h);for(var w=0;w<8;w++)y&1<<w&&(h.windows[w].visible=1);return I},et.prototype.hideWindows=function(I,h){var v=this.current708Packet.data,y=v[++I],b=this.getPts(I);this.flushDisplayed(b,h);for(var w=0;w<8;w++)y&1<<w&&(h.windows[w].visible=0);return I},et.prototype.toggleWindows=function(I,h){var v=this.current708Packet.data,y=v[++I],b=this.getPts(I);this.flushDisplayed(b,h);for(var w=0;w<8;w++)y&1<<w&&(h.windows[w].visible^=1);return I},et.prototype.clearWindows=function(I,h){var v=this.current708Packet.data,y=v[++I],b=this.getPts(I);this.flushDisplayed(b,h);for(var w=0;w<8;w++)y&1<<w&&h.windows[w].clearText();return I},et.prototype.deleteWindows=function(I,h){var v=this.current708Packet.data,y=v[++I],b=this.getPts(I);this.flushDisplayed(b,h);for(var w=0;w<8;w++)y&1<<w&&h.windows[w].reset();return I},et.prototype.setPenAttributes=function(I,h){var v=this.current708Packet.data,y=v[I],b=h.currentWindow.penAttr;return y=v[++I],b.textTag=(y&240)>>4,b.offset=(y&12)>>2,b.penSize=y&3,y=v[++I],b.italics=(y&128)>>7,b.underline=(y&64)>>6,b.edgeType=(y&56)>>3,b.fontStyle=y&7,I},et.prototype.setPenColor=function(I,h){var v=this.current708Packet.data,y=v[I],b=h.currentWindow.penColor;return y=v[++I],b.fgOpacity=(y&192)>>6,b.fgRed=(y&48)>>4,b.fgGreen=(y&12)>>2,b.fgBlue=y&3,y=v[++I],b.bgOpacity=(y&192)>>6,b.bgRed=(y&48)>>4,b.bgGreen=(y&12)>>2,b.bgBlue=y&3,y=v[++I],b.edgeRed=(y&48)>>4,b.edgeGreen=(y&12)>>2,b.edgeBlue=y&3,I},et.prototype.setPenLocation=function(I,h){var v=this.current708Packet.data,y=v[I],b=h.currentWindow.penLoc;return h.currentWindow.pendingNewLine=!0,y=v[++I],b.row=y&15,y=v[++I],b.column=y&63,I},et.prototype.reset=function(I,h){var v=this.getPts(I);return this.flushDisplayed(v,h),this.initService(h.serviceNum,I)};var Ei={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},kt=function(h){return h===null?"":(h=Ei[h]||h,String.fromCharCode(h))},Ci=14,Lr=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Mr=function(){for(var h=[],v=Ci+1;v--;)h.push("");return h},gt=function I(h,v){I.prototype.init.call(this),this.field_=h||0,this.dataChannel_=v||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(y){var b,w,k,V,W;if(b=y.ccData&32639,b===this.lastControlCode_){this.lastControlCode_=null;return}if((b&61440)===4096?this.lastControlCode_=b:b!==this.PADDING_&&(this.lastControlCode_=null),k=b>>>8,V=b&255,b!==this.PADDING_)if(b===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(b===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(y.pts),this.flushDisplayed(y.pts),w=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=w,this.startPts_=y.pts;else if(b===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(y.pts);else if(b===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(y.pts);else if(b===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(y.pts);else if(b===this.CARRIAGE_RETURN_)this.clearFormatting(y.pts),this.flushDisplayed(y.pts),this.shiftRowsUp_(),this.startPts_=y.pts;else if(b===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(b===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(y.pts),this.displayed_=Mr();else if(b===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Mr();else if(b===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(y.pts),this.displayed_=Mr()),this.mode_="paintOn",this.startPts_=y.pts;else if(this.isSpecialCharacter(k,V))k=(k&3)<<8,W=kt(k|V),this[this.mode_](y.pts,W),this.column_++;else if(this.isExtCharacter(k,V))this.mode_==="popOn"?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),k=(k&3)<<8,W=kt(k|V),this[this.mode_](y.pts,W),this.column_++;else if(this.isMidRowCode(k,V))this.clearFormatting(y.pts),this[this.mode_](y.pts," "),this.column_++,(V&14)===14&&this.addFormatting(y.pts,["i"]),(V&1)===1&&this.addFormatting(y.pts,["u"]);else if(this.isOffsetControlCode(k,V))this.column_+=V&3;else if(this.isPAC(k,V)){var Z=Lr.indexOf(b&7968);this.mode_==="rollUp"&&(Z-this.rollUpRows_+1<0&&(Z=this.rollUpRows_-1),this.setRollUp(y.pts,Z)),Z!==this.row_&&(this.clearFormatting(y.pts),this.row_=Z),V&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(y.pts,["u"]),(b&16)===16&&(this.column_=((b&14)>>1)*4),this.isColorPAC(V)&&(V&14)===14&&this.addFormatting(y.pts,["i"])}else this.isNormalChar(k)&&(V===0&&(V=null),W=kt(k),W+=kt(V),this[this.mode_](y.pts,W),this.column_+=W.length)}};gt.prototype=new r,gt.prototype.flushDisplayed=function(I){var h=this.displayed_.map(function(v,y){try{return v.trim()}catch{return this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+y+"."}),""}},this).join(`
46`).replace(/^\n+|\n+$/g,"");h.length&&this.trigger("data",{startPts:this.startPts_,endPts:I,text:h,stream:this.name_})},gt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Mr(),this.nonDisplayed_=Mr(),this.lastControlCode_=null,this.column_=0,this.row_=Ci,this.rollUpRows_=2,this.formatting_=[]},gt.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},gt.prototype.isSpecialCharacter=function(I,h){return I===this.EXT_&&h>=48&&h<=63},gt.prototype.isExtCharacter=function(I,h){return(I===this.EXT_+1||I===this.EXT_+2)&&h>=32&&h<=63},gt.prototype.isMidRowCode=function(I,h){return I===this.EXT_&&h>=32&&h<=47},gt.prototype.isOffsetControlCode=function(I,h){return I===this.OFFSET_&&h>=33&&h<=35},gt.prototype.isPAC=function(I,h){return I>=this.BASE_&&I<this.BASE_+8&&h>=64&&h<=127},gt.prototype.isColorPAC=function(I){return I>=64&&I<=79||I>=96&&I<=127},gt.prototype.isNormalChar=function(I){return I>=32&&I<=127},gt.prototype.setRollUp=function(I,h){if(this.mode_!=="rollUp"&&(this.row_=Ci,this.mode_="rollUp",this.flushDisplayed(I),this.nonDisplayed_=Mr(),this.displayed_=Mr()),h!==void 0&&h!==this.row_)for(var v=0;v<this.rollUpRows_;v++)this.displayed_[h-v]=this.displayed_[this.row_-v],this.displayed_[this.row_-v]="";h===void 0&&(h=this.row_),this.topRow_=h-this.rollUpRows_+1},gt.prototype.addFormatting=function(I,h){this.formatting_=this.formatting_.concat(h);var v=h.reduce(function(y,b){return y+"<"+b+">"},"");this[this.mode_](I,v)},gt.prototype.clearFormatting=function(I){if(this.formatting_.length){var h=this.formatting_.reverse().reduce(function(v,y){return v+"</"+y+">"},"");this.formatting_=[],this[this.mode_](I,h)}},gt.prototype.popOn=function(I,h){var v=this.nonDisplayed_[this.row_];v+=h,this.nonDisplayed_[this.row_]=v},gt.prototype.rollUp=function(I,h){var v=this.displayed_[this.row_];v+=h,this.displayed_[this.row_]=v},gt.prototype.shiftRowsUp_=function(){var I;for(I=0;I<this.topRow_;I++)this.displayed_[I]="";for(I=this.row_+1;I<Ci+1;I++)this.displayed_[I]="";for(I=this.topRow_;I<this.row_;I++)this.displayed_[I]=this.displayed_[I+1];this.displayed_[this.row_]=""},gt.prototype.paintOn=function(I,h){var v=this.displayed_[this.row_];v+=h,this.displayed_[this.row_]=v};var Fn={CaptionStream:Et,Cea608Stream:gt,Cea708Stream:et},It={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Ho=8589934592,cs=4294967296,en="shared",wr=function(h,v){var y=1;for(h>v&&(y=-1);Math.abs(v-h)>cs;)h+=y*Ho;return h},tn=function I(h){var v,y;I.prototype.init.call(this),this.type_=h||en,this.push=function(b){this.type_!==en&&b.type!==this.type_||(y===void 0&&(y=b.dts),b.dts=wr(b.dts,y),b.pts=wr(b.pts,y),v=b.dts,this.trigger("data",b))},this.flush=function(){y=v,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){y=void 0,v=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};tn.prototype=new r;var Ar={TimestampRolloverStream:tn,handleRollover:wr},Ta=function(h,v,y){var b,w="";for(b=v;b<y;b++)w+="%"+("00"+h[b].toString(16)).slice(-2);return w},wi=function(h,v,y){return decodeURIComponent(Ta(h,v,y))},Sa=function(h,v,y){return unescape(Ta(h,v,y))},rn=function(h){return h[0]<<21|h[1]<<14|h[2]<<7|h[3]},xa={TXXX:function(h){var v;if(h.data[0]===3){for(v=1;v<h.data.length;v++)if(h.data[v]===0){h.description=wi(h.data,1,v),h.value=wi(h.data,v+1,h.data.length).replace(/\0*$/,"");break}h.data=h.value}},WXXX:function(h){var v;if(h.data[0]===3){for(v=1;v<h.data.length;v++)if(h.data[v]===0){h.description=wi(h.data,1,v),h.url=wi(h.data,v+1,h.data.length);break}}},PRIV:function(h){var v;
vendor: 45,330 bytes, line 46
46for(v=0;v<h.data.length;v++)if(h.data[v]===0){h.owner=Sa(h.data,0,v);break}h.privateData=h.data.subarray(v+1),h.data=h.privateData}},Ai;Ai=function(h){var v={descriptor:h&&h.descriptor},y=0,b=[],w=0,k;if(Ai.prototype.init.call(this),this.dispatchType=It.METADATA_STREAM_TYPE.toString(16),v.descriptor)for(k=0;k<v.descriptor.length;k++)this.dispatchType+=("00"+v.descriptor[k].toString(16)).slice(-2);this.push=function(V){var W,Z,Q,ie,me,Ce;if(V.type==="timed-metadata"){if(V.dataAlignmentIndicator&&(w=0,b.length=0),b.length===0&&(V.data.length<10||V.data[0]!==73||V.data[1]!==68||V.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(b.push(V),w+=V.data.byteLength,b.length===1&&(y=rn(V.data.subarray(6,10)),y+=10),!(w<y)){for(W={data:new Uint8Array(y),frames:[],pts:b[0].pts,dts:b[0].dts},me=0;me<y;)W.data.set(b[0].data.subarray(0,y-me),me),me+=b[0].data.byteLength,w-=b[0].data.byteLength,b.shift();Z=10,W.data[5]&64&&(Z+=4,Z+=rn(W.data.subarray(10,14)),y-=rn(W.data.subarray(16,20)));do{if(Q=rn(W.data.subarray(Z+4,Z+8)),Q<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping metadata parsing."});return}if(Ce=String.fromCharCode(W.data[Z],W.data[Z+1],W.data[Z+2],W.data[Z+3]),ie={id:Ce,data:W.data.subarray(Z+10,Z+Q+10)},ie.key=ie.id,xa[ie.id]&&(xa[ie.id](ie),ie.owner==="com.apple.streaming.transportStreamTimestamp")){var ke=ie.data,Te=(ke[3]&1)<<30|ke[4]<<22|ke[5]<<14|ke[6]<<6|ke[7]>>>2;Te*=4,Te+=ke[7]&3,ie.timeStamp=Te,W.pts===void 0&&W.dts===void 0&&(W.pts=ie.timeStamp,W.dts=ie.timeStamp),this.trigger("timestamp",ie)}W.frames.push(ie),Z+=10,Z+=Q}while(Z<y);this.trigger("data",W)}}}},Ai.prototype=new r;var ds=Ai,fs=Ar.TimestampRolloverStream,pt,Qr,hr,nn=188,Nn=71;pt=function(){var h=new Uint8Array(nn),v=0;pt.prototype.init.call(this),this.push=function(y){var b=0,w=nn,k;for(v?(k=new Uint8Array(y.byteLength+v),k.set(h.subarray(0,v)),k.set(y,v),v=0):k=y;w<k.byteLength;){if(k[b]===Nn&&k[w]===Nn){this.trigger("data",k.subarray(b,w)),b+=nn,w+=nn;continue}b++,w++}b<k.byteLength&&(h.set(k.subarray(b),0),v=k.byteLength-b)},this.flush=function(){v===nn&&h[0]===Nn&&(this.trigger("data",h),v=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){v=0,this.trigger("reset")}},pt.prototype=new r,Qr=function(){var h,v,y,b;Qr.prototype.init.call(this),b=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,h=function(k,V){var W=0;V.payloadUnitStartIndicator&&(W+=k[W]+1),V.type==="pat"?v(k.subarray(W),V):y(k.subarray(W),V)},v=function(k,V){V.section_number=k[7],V.last_section_number=k[8],b.pmtPid=(k[10]&31)<<8|k[11],V.pmtPid=b.pmtPid},y=function(k,V){var W,Z,Q,ie;if(k[5]&1){for(b.programMapTable={video:null,audio:null,"timed-metadata":{}},W=(k[1]&15)<<8|k[2],Z=3+W-4,Q=(k[10]&15)<<8|k[11],ie=12+Q;ie<Z;){var me=k[ie],Ce=(k[ie+1]&31)<<8|k[ie+2];me===It.H264_STREAM_TYPE&&b.programMapTable.video===null?b.programMapTable.video=Ce:me===It.ADTS_STREAM_TYPE&&b.programMapTable.audio===null?b.programMapTable.audio=Ce:me===It.METADATA_STREAM_TYPE&&(b.programMapTable["timed-metadata"][Ce]=me),ie+=((k[ie+3]&15)<<8|k[ie+4])+5}V.programMapTable=b.programMapTable}},this.push=function(w){var k={},V=4;if(k.payloadUnitStartIndicator=!!(w[1]&64),k.pid=w[1]&31,k.pid<<=8,k.pid|=w[2],(w[3]&48)>>>4>1&&(V+=w[V]+1),k.pid===0)k.type="pat",h(w.subarray(V),k),this.trigger("data",k);else if(k.pid===this.pmtPid)for(k.type="pmt",h(w.subarray(V),k),this.trigger("data",k);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([w,V,k]):this.processPes_(w,V,k)},this.processPes_=function(w,k,V){V.pid===this.programMapTable.video?V.streamType=It.H264_STREAM_TYPE:V.pid===this.programMapTable.audio?V.streamType=It.ADTS_STREAM_TYPE:V.streamType=this.programMapTable["timed-metadata"][V.pid],V.type="pes",V.data=w.subarray(k),this.trigger("data",V)}},Qr.prototype=new r,Qr.STREAM_TYPES={h264:27,adts:15},hr=function(){var h=this,v=!1,y={data:[],size:0},b={data:[],size:0},w={data:[],size:0},k,V=function(Q,ie){var me,Ce=Q[0]<<16|Q[1]<<8|Q[2];ie.data=new Uint8Array,Ce===1&&(ie.packetLength=6+(Q[4]<<8|Q[5]),ie.dataAlignmentIndicator=(Q[6]&4)!==0,me=Q[7],me&192&&(ie.pts=(Q[9]&14)<<27|(Q[10]&255)<<20|(Q[11]&254)<<12|(Q[12]&255)<<5|(Q[13]&254)>>>3,ie.pts*=4,ie.pts+=(Q[13]&6)>>>1,ie.dts=ie.pts,me&64&&(ie.dts=(Q[14]&14)<<27|(Q[15]&255)<<20|(Q[16]&254)<<12|(Q[17]&255)<<5|(Q[18]&254)>>>3,ie.dts*=4,ie.dts+=(Q[18]&6)>>>1)),ie.data=Q.subarray(9+Q[8]))},W=function(Q,ie,me){var Ce=new Uint8Array(Q.size),ke={type:ie},Te=0,je=0,Gt=!1,gr;if(!(!Q.data.length||Q.size<9)){for(ke.trackId=Q.data[0].pid,Te=0;Te<Q.data.length;Te++)gr=Q.data[Te],Ce.set(gr.data,je),je+=gr.data.byteLength;V(Ce,ke),Gt=ie==="video"||ke.packetLength<=Q.size,(me||Gt)&&(Q.size=0,Q.data.length=0),Gt&&h.trigger("data",ke)}};hr.prototype.init.call(this),this.push=function(Z){({pat:function(){},pes:function(){var ie,me;switch(Z.streamType){case It.H264_STREAM_TYPE:ie=y,me="video";break;case It.ADTS_STREAM_TYPE:ie=b,me="audio";break;case It.METADATA_STREAM_TYPE:ie=w,me="timed-metadata";break;default:return}Z.payloadUnitStartIndicator&&W(ie,me,!0),ie.data.push(Z),ie.size+=Z.data.byteLength},pmt:function(){var ie={type:"metadata",tracks:[]};k=Z.programMapTable,k.video!==null&&ie.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+k.video,codec:"avc",type:"video"}),k.audio!==null&&ie.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+k.audio,codec:"adts",type:"audio"}),v=!0,h.trigger("data",ie)}})[Z.type]()},this.reset=function(){y.size=0,y.data.length=0,b.size=0,b.data.length=0,this.trigger("reset")},this.flushStreams_=function(){W(y,"video"),W(b,"audio"),W(w,"timed-metadata")},this.flush=function(){if(!v&&k){var Z={type:"metadata",tracks:[]};k.video!==null&&Z.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+k.video,codec:"avc",type:"video"}),k.audio!==null&&Z.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+k.audio,codec:"adts",type:"audio"}),h.trigger("data",Z)}v=!1,this.flushStreams_(),this.trigger("done")}},hr.prototype=new r;var hs={PAT_PID:0,MP2T_PACKET_LENGTH:nn,TransportPacketStream:pt,TransportParseStream:Qr,ElementaryStream:hr,TimestampRolloverStream:fs,CaptionStream:Fn.CaptionStream,Cea608Stream:Fn.Cea608Stream,Cea708Stream:Fn.Cea708Stream,MetadataStream:ds};for(var Ut in It)It.hasOwnProperty(Ut)&&(hs[Ut]=It[Ut]);var pr=hs,Ea=Ze.ONE_SECOND_IN_TS,Or,vn=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];Or=function(h){var v,y=0;Or.prototype.init.call(this),this.skipWarn_=function(b,w){this.trigger("log",{level:"warn",message:"adts skiping bytes "+b+" to "+w+" in frame "+y+" outside syncword"})},this.push=function(b){var w=0,k,V,W,Z,Q;if(h||(y=0),b.type==="audio"){v&&v.length?(W=v,v=new Uint8Array(W.byteLength+b.data.byteLength),v.set(W),v.set(b.data,W.byteLength)):v=b.data;for(var ie;w+7<v.length;){if(v[w]!==255||(v[w+1]&246)!==240){typeof ie!="number"&&(ie=w),w++;continue}if(typeof ie=="number"&&(this.skipWarn_(ie,w),ie=null),V=(~v[w+1]&1)*2,k=(v[w+3]&3)<<11|v[w+4]<<3|(v[w+5]&224)>>5,Z=((v[w+6]&3)+1)*1024,Q=Z*Ea/vn[(v[w+2]&60)>>>2],v.byteLength-w<k)break;this.trigger("data",{pts:b.pts+y*Q,dts:b.dts+y*Q,sampleCount:Z,audioobjecttype:(v[w+2]>>>6&3)+1,channelcount:(v[w+2]&1)<<2|(v[w+3]&192)>>>6,samplerate:vn[(v[w+2]&60)>>>2],samplingfrequencyindex:(v[w+2]&60)>>>2,samplesize:16,data:v.subarray(w+7+V,w+k)}),y++,w+=k}typeof ie=="number"&&(this.skipWarn_(ie,w),ie=null),v=v.subarray(w)}},this.flush=function(){y=0,this.trigger("done")},this.reset=function(){v=void 0,this.trigger("reset")},this.endTimeline=function(){v=void 0,this.trigger("endedtimeline")}},Or.prototype=new r;var ps=Or,ms;ms=function(h){var v=h.byteLength,y=0,b=0;this.length=function(){return 8*v},this.bitsAvailable=function(){return 8*v+b},this.loadWord=function(){var w=h.byteLength-v,k=new Uint8Array(4),V=Math.min(4,v);if(V===0)throw new Error("no bytes available");k.set(h.subarray(w,w+V)),y=new DataView(k.buffer).getUint32(0),b=V*8,v-=V},this.skipBits=function(w){var k;b>w?(y<<=w,b-=w):(w-=b,k=Math.floor(w/8),w-=k*8,v-=k,this.loadWord(),y<<=w,b-=w)},this.readBits=function(w){var k=Math.min(b,w),V=y>>>32-k;return b-=k,b>0?y<<=k:v>0&&this.loadWord(),k=w-k,k>0?V<<k|this.readBits(k):V},this.skipLeadingZeros=function(){var w;for(w=0;w<b;++w)if((y&2147483648>>>w)!==0)return y<<=w,b-=w,w;return this.loadWord(),w+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var w=this.skipLeadingZeros();return this.readBits(w+1)-1},this.readExpGolomb=function(){var w=this.readUnsignedExpGolomb();return 1&w?1+w>>>1:-1*(w>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var jo=ms,Bn,gn,Rr;gn=function(){var h=0,v,y;gn.prototype.init.call(this),this.push=function(b){var w;y?(w=new Uint8Array(y.byteLength+b.data.byteLength),w.set(y),w.set(b.data,y.byteLength),y=w):y=b.data;for(var k=y.byteLength;h<k-3;h++)if(y[h+2]===1){v=h+5;break}for(;v<k;)switch(y[v]){case 0:if(y[v-1]!==0){v+=2;break}else if(y[v-2]!==0){v++;break}h+3!==v-2&&this.trigger("data",y.subarray(h+3,v-2));do v++;while(y[v]!==1&&v<k);h=v-2,v+=3;break;case 1:if(y[v-1]!==0||y[v-2]!==0){v+=3;break}this.trigger("data",y.subarray(h+3,v-2)),h=v-2,v+=3;break;default:v+=3;break}y=y.subarray(h),v-=h,h=0},this.reset=function(){y=null,h=0,this.trigger("reset")},this.flush=function(){y&&y.byteLength>3&&this.trigger("data",y.subarray(h+3)),y=null,h=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},gn.prototype=new r,Rr={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Bn=function(){var h=new gn,v,y,b,w,k,V,W;Bn.prototype.init.call(this),v=this,this.push=function(Z){Z.type==="video"&&(y=Z.trackId,b=Z.pts,w=Z.dts,h.push(Z))},h.on("data",function(Z){var Q={trackId:y,pts:b,dts:w,data:Z,nalUnitTypeCode:Z[0]&31};switch(Q.nalUnitTypeCode){case 5:Q.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:Q.nalUnitType="sei_rbsp",Q.escapedRBSP=k(Z.subarray(1));break;case 7:Q.nalUnitType="seq_parameter_set_rbsp",Q.escapedRBSP=k(Z.subarray(1)),Q.config=V(Q.escapedRBSP);break;case 8:Q.nalUnitType="pic_parameter_set_rbsp";break;case 9:Q.nalUnitType="access_unit_delimiter_rbsp";break}v.trigger("data",Q)}),h.on("done",function(){v.trigger("done")}),h.on("partialdone",function(){v.trigger("partialdone")}),h.on("reset",function(){v.trigger("reset")}),h.on("endedtimeline",function(){v.trigger("endedtimeline")}),this.flush=function(){h.flush()},this.partialFlush=function(){h.partialFlush()},this.reset=function(){h.reset()},this.endTimeline=function(){h.endTimeline()},W=function(Q,ie){var me=8,Ce=8,ke,Te;for(ke=0;ke<Q;ke++)Ce!==0&&(Te=ie.readExpGolomb(),Ce=(me+Te+256)%256),me=Ce===0?me:Ce},k=function(Q){for(var ie=Q.byteLength,me=[],Ce=1,ke,Te;Ce<ie-2;)Q[Ce]===0&&Q[Ce+1]===0&&Q[Ce+2]===3?(me.push(Ce+2),Ce+=2):Ce++;if(me.length===0)return Q;ke=ie-me.length,Te=new Uint8Array(ke);var je=0;for(Ce=0;Ce<ke;je++,Ce++)je===me[0]&&(je++,me.shift()),Te[Ce]=Q[je];return Te},V=function(Q){var ie=0,me=0,Ce=0,ke=0,Te,je,Gt,gr,Tn,lu,hh,ph,mh,cu,vh,Ot=[1,1],gh,Sn;if(Te=new jo(Q),je=Te.readUnsignedByte(),gr=Te.readUnsignedByte(),Gt=Te.readUnsignedByte(),Te.skipUnsignedExpGolomb(),Rr[je]&&(Tn=Te.readUnsignedExpGolomb(),Tn===3&&Te.skipBits(1),Te.skipUnsignedExpGolomb(),Te.skipUnsignedExpGolomb(),Te.skipBits(1),Te.readBoolean()))for(vh=Tn!==3?8:12,Sn=0;Sn<vh;Sn++)Te.readBoolean()&&(Sn<6?W(16,Te):W(64,Te));if(Te.skipUnsignedExpGolomb(),lu=Te.readUnsignedExpGolomb(),lu===0)Te.readUnsignedExpGolomb();else if(lu===1)for(Te.skipBits(1),Te.skipExpGolomb(),Te.skipExpGolomb(),hh=Te.readUnsignedExpGolomb(),Sn=0;Sn<hh;Sn++)Te.skipExpGolomb();if(Te.skipUnsignedExpGolomb(),Te.skipBits(1),ph=Te.readUnsignedExpGolomb(),mh=Te.readUnsignedExpGolomb(),cu=Te.readBits(1),cu===0&&Te.skipBits(1),Te.skipBits(1),Te.readBoolean()&&(ie=Te.readUnsignedExpGolomb(),me=Te.readUnsignedExpGolomb(),Ce=Te.readUnsignedExpGolomb(),ke=Te.readUnsignedExpGolomb()),Te.readBoolean()&&Te.readBoolean()){switch(gh=Te.readUnsignedByte(),gh){case 1:Ot=[1,1];break;case 2:Ot=[12,11];break;case 3:Ot=[10,11];break;case 4:Ot=[16,11];break;case 5:Ot=[40,33];break;case 6:Ot=[24,11];break;case 7:Ot=[20,11];break;case 8:Ot=[32,11];break;case 9:Ot=[80,33];break;case 10:Ot=[18,11];break;case 11:Ot=[15,11];break;case 12:Ot=[64,33];break;case 13:Ot=[160,99];break;case 14:Ot=[4,3];break;case 15:Ot=[3,2];break;case 16:Ot=[2,1];break;case 255:{Ot=[Te.readUnsignedByte()<<8|Te.readUnsignedByte(),Te.readUnsignedByte()<<8|Te.readUnsignedByte()];break}}Ot&&Ot[0]/Ot[1]}return{profileIdc:je,levelIdc:Gt,profileCompatibility:gr,width:(ph+1)*16-ie*2-me*2,height:(2-cu)*(mh+1)*16-Ce*2-ke*2,sarRatio:Ot}}},Bn.prototype=new r;var Go={H264Stream:Bn},Un=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],qn=function(h,v){var y=h[v+6]<<21|h[v+7]<<14|h[v+8]<<7|h[v+9],b=h[v+5],w=(b&16)>>4;return y=y>=0?y:0,w?y+20:y+10},Wo=function I(h,v){return h.length-v<10||h[v]!==73||h[v+1]!==68||h[v+2]!==51?v:(v+=qn(h,v),I(h,v))},zo=function(h){var v=Wo(h,0);return h.length>=v+2&&(h[v]&255)===255&&(h[v+1]&240)===240&&(h[v+1]&22)===16},vs=function(h){return h[0]<<21|h[1]<<14|h[2]<<7|h[3]},$o=function(h,v,y){var b,w="";for(b=v;b<y;b++)w+="%"+("00"+h[b].toString(16)).slice(-2);return w},Ko=function(h,v,y){return unescape($o(h,v,y))},ir=function(h,v){var y=(h[v+5]&224)>>5,b=h[v+4]<<3,w=h[v+3]&6144;return w|b|y},Wt=function(h,v){return h[v]===73&&h[v+1]===68&&h[v+2]===51?"timed-metadata":h[v]&!0&&(h[v+1]&240)===240?"audio":null},Xo=function(h){for(var v=0;v+5<h.length;){if(h[v]!==255||(h[v+1]&246)!==240){v++;continue}return Un[(h[v+2]&60)>>>2]}return null},Yo=function(h){var v,y,b,w;v=10,h[5]&64&&(v+=4,v+=vs(h.subarray(10,14)));do{if(y=vs(h.subarray(v+4,v+8)),y<1)return null;if(w=String.fromCharCode(h[v],h[v+1],h[v+2],h[v+3]),w==="PRIV"){b=h.subarray(v+10,v+y+10);for(var k=0;k<b.byteLength;k++)if(b[k]===0){var V=Ko(b,0,k);if(V==="com.apple.streaming.transportStreamTimestamp"){var W=b.subarray(k+1),Z=(W[3]&1)<<30|W[4]<<22|W[5]<<14|W[6]<<6|W[7]>>>2;return Z*=4,Z+=W[7]&3,Z}break}}v+=10,v+=y}while(v<h.byteLength);return null},Vn={isLikelyAacData:zo,parseId3TagSize:qn,parseAdtsSize:ir,parseType:Wt,parseSampleRate:Xo,parseAacTimestamp:Yo},Hn;Hn=function(){var h=new Uint8Array,v=0;Hn.prototype.init.call(this),this.setTimestamp=function(y){v=y},this.push=function(y){var b=0,w=0,k,V,W,Z;for(h.length?(Z=h.length,h=new Uint8Array(y.byteLength+Z),h.set(h.subarray(0,Z)),h.set(y,Z)):h=y;h.length-w>=3;){if(h[w]===73&&h[w+1]===68&&h[w+2]===51){if(h.length-w<10||(b=Vn.parseId3TagSize(h,w),w+b>h.length))break;V={type:"timed-metadata",data:h.subarray(w,w+b)},this.trigger("data",V),w+=b;continue}else if((h[w]&255)===255&&(h[w+1]&240)===240){if(h.length-w<7||(b=Vn.parseAdtsSize(h,w),w+b>h.length))break;W={type:"audio",data:h.subarray(w,w+b),pts:v,dts:v},this.trigger("data",W),w+=b;continue}w++}k=h.length-w,k>0?h=h.subarray(w):h=new Uint8Array},this.reset=function(){h=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){h=new Uint8Array,this.trigger("endedtimeline")}},Hn.prototype=new r;var Qo=Hn,Jo=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],gs=Jo,ys=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],an=ys,Zo=Go.H264Stream,ur=Vn.isLikelyAacData,eu=Ze.ONE_SECOND_IN_TS,yn,_n,bn,fi,jn=function(h,v){v.stream=h,this.trigger("log",v)},Ca=function(h,v){for(var y=Object.keys(v),b=0;b<y.length;b++){var w=y[b];w==="headOfPipeline"||!v[w].on||v[w].on("log",jn.bind(h,w))}},_s=function(h,v){var y;if(h.length!==v.length)return!1;for(y=0;y<h.length;y++)if(h[y]!==v[y])return!1;return!0},ki=function(h,v,y,b,w,k){var V=y-v,W=b-v,Z=w-y;return{start:{dts:h,pts:h+V},end:{dts:h+W,pts:h+Z},prependedContentDuration:k,baseMediaDecodeTime:h}};_n=function(h,v){var y=[],b,w=0,k=0,V=1/0;v=v||{},b=v.firstSequenceNumber||0,_n.prototype.init.call(this),this.push=function(W){M.collectDtsInfo(h,W),h&&gs.forEach(function(Z){h[Z]=W[Z]}),y.push(W)},this.setEarliestDts=function(W){w=W},this.setVideoBaseMediaDecodeTime=function(W){V=W},this.setAudioAppendStart=function(W){k=W},this.flush=function(){var W,Z,Q,ie,me,Ce,ke;if(y.length===0){this.trigger("done","AudioSegmentStream");return}W=fr.trimAdtsFramesByEarliestDts(y,h,w),h.baseMediaDecodeTime=M.calculateTrackBaseMediaDecodeTime(h,v.keepOriginalTimestamps),ke=fr.prefixWithSilence(h,W,k,V),h.samples=fr.generateSampleTable(W),Q=De.mdat(fr.concatenateFrameData(W)),y=[],Z=De.moof(b,[h]),ie=new Uint8Array(Z.byteLength+Q.byteLength),b++,ie.set(Z),ie.set(Q,Z.byteLength),M.clearDtsInfo(h),me=Math.ceil(eu*1024/h.samplerate),W.length&&(Ce=W.length*me,this.trigger("segmentTimingInfo",ki(Ze.audioTsToVideoTs(h.baseMediaDecodeTime,h.samplerate),W[0].dts,W[0].pts,W[0].dts+Ce,W[0].pts+Ce,ke||0)),this.trigger("timingInfo",{start:W[0].pts,end:W[0].pts+Ce})),this.trigger("data",{track:h,boxes:ie}),this.trigger("done","AudioSegmentStream")},this.reset=function(){M.clearDtsInfo(h),y=[],this.trigger("reset")}},_n.prototype=new r,yn=function(h,v){var y,b=[],w=[],k,V;v=v||{},y=v.firstSequenceNumber||0,yn.prototype.init.call(this),delete h.minPTS,this.gopCache_=[],this.push=function(W){M.collectDtsInfo(h,W),W.nalUnitType==="seq_parameter_set_rbsp"&&!k&&(k=W.config,h.sps=[W.data],an.forEach(function(Z){h[Z]=k[Z]},this)),W.nalUnitType==="pic_parameter_set_rbsp"&&!V&&(V=W.data,h.pps=[W.data]),b.push(W)},this.flush=function(){for(var W,Z,Q,ie,me,Ce,ke=0,Te,je;b.length&&b[0].nalUnitType!=="access_unit_delimiter_rbsp";)b.shift();if(b.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(W=ft.groupNalsIntoFrames(b),Q=ft.groupFramesIntoGops(W),Q[0][0].keyFrame||(Z=this.getGopForFusion_(b[0],h),Z?(ke=Z.duration,Q.unshift(Z),Q.byteLength+=Z.byteLength,Q.nalCount+=Z.nalCount,Q.pts=Z.pts,Q.dts=Z.dts,Q.duration+=Z.duration):Q=ft.extendFirstKeyFrame(Q)),w.length){var Gt;if(v.alignGopsAtEnd?Gt=this.alignGopsAtEnd_(Q):Gt=this.alignGopsAtStart_(Q),!Gt){this.gopCache_.unshift({gop:Q.pop(),pps:h.pps,sps:h.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),b=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}M.clearDtsInfo(h),Q=Gt}M.collectDtsInfo(h,Q),h.samples=ft.generateSampleTable(Q),me=De.mdat(ft.concatenateNalData(Q)),h.baseMediaDecodeTime=M.calculateTrackBaseMediaDecodeTime(h,v.keepOriginalTimestamps),this.trigger("processedGopsInfo",Q.map(function(gr){return{pts:gr.pts,dts:gr.dts,byteLength:gr.byteLength}})),Te=Q[0],je=Q[Q.length-1],this.trigger("segmentTimingInfo",ki(h.baseMediaDecodeTime,Te.dts,Te.pts,je.dts+je.duration,je.pts+je.duration,ke)),this.trigger("timingInfo",{start:Q[0].pts,end:Q[Q.length-1].pts+Q[Q.length-1].duration}),this.gopCache_.unshift({gop:Q.pop(),pps:h.pps,sps:h.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),b=[],this.trigger("baseMediaDecodeTime",h.baseMediaDecodeTime),this.trigger("timelineStartInfo",h.timelineStartInfo),ie=De.moof(y,[h]),Ce=new Uint8Array(ie.byteLength+me.byteLength),y++,Ce.set(ie),Ce.set(me,ie.byteLength),this.trigger("data",{track:h,boxes:Ce}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),b=[],this.gopCache_.length=0,w.length=0,this.trigger("reset")},this.resetStream_=function(){M.clearDtsInfo(h),k=void 0,V=void 0},this.getGopForFusion_=function(W){var Z=45e3,Q=1/0,ie,me,Ce,ke,Te;for(Te=0;Te<this.gopCache_.length;Te++)ke=this.gopCache_[Te],Ce=ke.gop,!(!(h.pps&&_s(h.pps[0],ke.pps[0]))||!(h.sps&&_s(h.sps[0],ke.sps[0])))&&(Ce.dts<h.timelineStartInfo.dts||(ie=W.dts-Ce.dts-Ce.duration,ie>=-1e4&&ie<=Z&&(!me||Q>ie)&&(me=ke,Q=ie)));return me?me.gop:null},this.alignGopsAtStart_=function(W){var Z,Q,ie,me,Ce,ke,Te,je;for(Ce=W.byteLength,ke=W.nalCount,Te=W.duration,Z=Q=0;Z<w.length&&Q<W.length&&(ie=w[Z],me=W[Q],ie.pts!==me.pts);){if(me.pts>ie.pts){Z++;continue}Q++,Ce-=me.byteLength,ke-=me.nalCount,Te-=me.duration}return Q===0?W:Q===W.length?null:(je=W.slice(Q),je.byteLength=Ce,je.duration=Te,je.nalCount=ke,je.pts=je[0].pts,je.dts=je[0].dts,je)},this.alignGopsAtEnd_=function(W){var Z,Q,ie,me,Ce,ke;for(Z=w.length-1,Q=W.length-1,Ce=null,ke=!1;Z>=0&&Q>=0;){if(ie=w[Z],me=W[Q],ie.pts===me.pts){ke=!0;break}if(ie.pts>me.pts){Z--;continue}Z===w.length-1&&(Ce=Q),Q--}if(!ke&&Ce===null)return null;var Te;if(ke?Te=Q:Te=Ce,Te===0)return W;var je=W.slice(Te),Gt=je.reduce(function(gr,Tn){return gr.byteLength+=Tn.byteLength,gr.duration+=Tn.duration,gr.nalCount+=Tn.nalCount,gr},{byteLength:0,duration:0,nalCount:0});return je.byteLength=Gt.byteLength,je.duration=Gt.duration,je.nalCount=Gt.nalCount,je.pts=je[0].pts,je.dts=je[0].dts,je},this.alignGopsWith=function(W){w=W}},yn.prototype=new r,fi=function(h,v){this.numberOfTracks=0,this.metadataStream=v,h=h||{},typeof h.remux<"u"?this.remuxTracks=!!h.remux:this.remuxTracks=!0,typeof h.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=h.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,fi.prototype.init.call(this),this.push=function(y){if(y.text)return this.pendingCaptions.push(y);if(y.frames)return this.pendingMetadata.push(y);this.pendingTracks.push(y.track),this.pendingBytes+=y.boxes.byteLength,y.track.type==="video"&&(this.videoTrack=y.track,this.pendingBoxes.push(y.boxes)),y.track.type==="audio"&&(this.audioTrack=y.track,this.pendingBoxes.unshift(y.boxes))}},fi.prototype=new r,fi.prototype.flush=function(I){var h=0,v={captions:[],captionStreams:{},metadata:[],info:{}},y,b,w,k=0,V;if(this.pendingTracks.length<this.numberOfTracks){if(I!=="VideoSegmentStream"&&I!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(k=this.videoTrack.timelineStartInfo.pts,an.forEach(function(W){v.info[W]=this.videoTrack[W]},this)):this.audioTrack&&(k=this.audioTrack.timelineStartInfo.pts,gs.forEach(function(W){v.info[W]=this.audioTrack[W]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?v.type=this.pendingTracks[0].type:v.type="combined",this.emittedTracks+=this.pendingTracks.length,w=De.initSegment(this.pendingTracks),v.initSegment=new Uint8Array(w.byteLength),v.initSegment.set(w),v.data=new Uint8Array(this.pendingBytes),V=0;V<this.pendingBoxes.length;V++)v.data.set(this.pendingBoxes[V],h),h+=this.pendingBoxes[V].byteLength;for(V=0;V<this.pendingCaptions.length;V++)y=this.pendingCaptions[V],y.startTime=Ze.metadataTsToSeconds(y.startPts,k,this.keepOriginalTimestamps),y.endTime=Ze.metadataTsToSeconds(y.endPts,k,this.keepOriginalTimestamps),v.captionStreams[y.stream]=!0,v.captions.push(y);for(V=0;V<this.pendingMetadata.length;V++)b=this.pendingMetadata[V],b.cueTime=Ze.metadataTsToSeconds(b.pts,k,this.keepOriginalTimestamps),v.metadata.push(b);for(v.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",v),V=0;V<v.captions.length;V++)y=v.captions[V],this.trigger("caption",y);for(V=0;V<v.metadata.length;V++)b=v.metadata[V],this.trigger("id3Frame",b)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},fi.prototype.setRemux=function(I){this.remuxTracks=I},bn=function(h){var v=this,y=!0,b,w;bn.prototype.init.call(this),h=h||{},this.baseMediaDecodeTime=h.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var k={};this.transmuxPipeline_=k,k.type="aac",k.metadataStream=new pr.MetadataStream,k.aacStream=new Qo,k.audioTimestampRolloverStream=new pr.TimestampRolloverStream("audio"),k.timedMetadataTimestampRolloverStream=new pr.TimestampRolloverStream("timed-metadata"),k.adtsStream=new ps,k.coalesceStream=new fi(h,k.metadataStream),k.headOfPipeline=k.aacStream,k.aacStream.pipe(k.audioTimestampRolloverStream).pipe(k.adtsStream),k.aacStream.pipe(k.timedMetadataTimestampRolloverStream).pipe(k.metadataStream).pipe(k.coalesceStream),k.metadataStream.on("timestamp",function(V){k.aacStream.setTimestamp(V.timeStamp)}),k.aacStream.on("data",function(V){V.type!=="timed-metadata"&&V.type!=="audio"||k.audioSegmentStream||(w=w||{timelineStartInfo:{baseMediaDecodeTime:v.baseMediaDecodeTime},codec:"adts",type:"audio"},k.coalesceStream.numberOfTracks++,k.audioSegmentStream=new _n(w,h),k.audioSegmentStream.on("log",v.getLogTrigger_("audioSegmentStream")),k.audioSegmentStream.on("timingInfo",v.trigger.bind(v,"audioTimingInfo")),k.adtsStream.pipe(k.audioSegmentStream).pipe(k.coalesceStream),v.trigger("trackinfo",{hasAudio:!!w,hasVideo:!!b}))}),k.coalesceStream.on("data",this.trigger.bind(this,"data")),k.coalesceStream.on("done",this.trigger.bind(this,"done")),Ca(this,k)},this.setupTsPipeline=function(){var k={};this.transmuxPipeline_=k,k.type="ts",k.metadataStream=new pr.MetadataStream,k.packetStream=new pr.TransportPacketStream,k.parseStream=new pr.TransportParseStream,k.elementaryStream=new pr.ElementaryStream,k.timestampRolloverStream=new pr.TimestampRolloverStream,k.adtsStream=new ps,k.h264Stream=new Zo,k.captionStream=new pr.CaptionStream(h),k.coalesceStream=new fi(h,k.metadataStream),k.headOfPipeline=k.packetStream,k.packetStream.pipe(k.parseStream).pipe(k.elementaryStream).pipe(k.timestampRolloverStream),k.timestampRolloverStream.pipe(k.h264Stream),k.timestampRolloverStream.pipe(k.adtsStream),k.timestampRolloverStream.pipe(k.metadataStream).pipe(k.coalesceStream),k.h264Stream.pipe(k.captionStream).pipe(k.coalesceStream),k.elementaryStream.on("data",function(V){var W;if(V.type==="metadata"){for(W=V.tracks.length;W--;)!b&&V.tracks[W].type==="video"?(b=V.tracks[W],b.timelineStartInfo.baseMediaDecodeTime=v.baseMediaDecodeTime):!w&&V.tracks[W].type==="audio"&&(w=V.tracks[W],w.timelineStartInfo.baseMediaDecodeTime=v.baseMediaDecodeTime);b&&!k.videoSegmentStream&&(k.coalesceStream.numberOfTracks++,k.videoSegmentStream=new yn(b,h),k.videoSegmentStream.on("log",v.getLogTrigger_("videoSegmentStream")),k.videoSegmentStream.on("timelineStartInfo",function(Z){w&&!h.keepOriginalTimestamps&&(w.timelineStartInfo=Z,k.audioSegmentStream.setEarliestDts(Z.dts-v.baseMediaDecodeTime))}),k.videoSegmentStream.on("processedGopsInfo",v.trigger.bind(v,"gopInfo")),k.videoSegmentStream.on("segmentTimingInfo",v.trigger.bind(v,"videoSegmentTimingInfo")),k.videoSegmentStream.on("baseMediaDecodeTime",function(Z){w&&k.audioSegmentStream.setVideoBaseMediaDecodeTime(Z)}),k.videoSegmentStream.on("timingInfo",v.trigger.bind(v,"videoTimingInfo")),k.h264Stream.pipe(k.videoSegmentStream).pipe(k.coalesceStream)),w&&!k.audioSegmentStream&&(k.coalesceStream.numberOfTracks++,k.audioSegmentStream=new _n(w,h),k.audioSegmentStream.on("log",v.getLogTrigger_("audioSegmentStream")),k.audioSegmentStream.on("timingInfo",v.trigger.bind(v,"audioTimingInfo")),k.audioSegmentStream.on("segmentTimingInfo",v.trigger.bind(v,"audioSegmentTimingInfo")),k.adtsStream.pipe(k.audioSegmentStream).pipe(k.coalesceStream)),v.trigger("trackinfo",{hasAudio:!!w,hasVideo:!!b})}}),k.coalesceStream.on("data",this.trigger.bind(this,"data")),k.coalesceStream.on("id3Frame",function(V){V.dispatchType=k.metadataStream.dispatchType,v.trigger("id3Frame",V)}),k.coalesceStream.on("caption",this.trigger.bind(this,"caption")),k.coalesceStream.on("done",this.trigger.bind(this,"done")),Ca(this,k)},this.setBaseMediaDecodeTime=function(k){var V=this.transmuxPipeline_;h.keepOriginalTimestamps||(this.baseMediaDecodeTime=k),w&&(w.timelineStartInfo.dts=void 0,w.timelineStartInfo.pts=void 0,M.clearDtsInfo(w),V.audioTimestampRolloverStream&&V.audioTimestampRolloverStream.discontinuity()),b&&(V.videoSegmentStream&&(V.videoSegmentStream.gopCache_=[]),b.timelineStartInfo.dts=void 0,b.timelineStartInfo.pts=void 0,M.clearDtsInfo(b),V.captionStream.reset()),V.timestampRolloverStream&&V.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(k){w&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(k)},this.setRemux=function(k){var V=this.transmuxPipeline_;h.remux=k,V&&V.coalesceStream&&V.coalesceStream.setRemux(k)},this.alignGopsWith=function(k){b&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(k)},this.getLogTrigger_=function(k){var V=this;return function(W){W.stream=k,V.trigger("log",W)}},this.push=function(k){if(y){var V=ur(k);V&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!V&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),y=!1}this.transmuxPipeline_.headOfPipeline.push(k)},this.flush=function(){y=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},bn.prototype=new r;var bs={Transmuxer:bn},tu=function(h){return h>>>0},Ts=function(h){return("00"+h.toString(16)).slice(-2)},Gn={toUnsigned:tu,toHexString:Ts},ru=function(h){var v="";return v+=String.fromCharCode(h[0]),v+=String.fromCharCode(h[1]),v+=String.fromCharCode(h[2]),v+=String.fromCharCode(h[3]),v},Di=ru,qt=Gn.toUnsigned,Jr=function I(h,v){var y=[],b,w,k,V,W;if(!v.length)return null;for(b=0;b<h.byteLength;)w=qt(h[b]<<24|h[b+1]<<16|h[b+2]<<8|h[b+3]),k=Di(h.subarray(b+4,b+8)),V=w>1?b+w:h.byteLength,k===v[0]&&(v.length===1?y.push(h.subarray(b+8,V)):(W=I(h.subarray(b+8,V),v.slice(1)),W.length&&(y=y.concat(W)))),b=V;return y},yt=Jr,Ss=Gn.toUnsigned,iu=e.getUint64,xs=function(h){var v={version:h[0],flags:new Uint8Array(h.subarray(1,4))};return v.version===1?v.baseMediaDecodeTime=iu(h.subarray(4)):v.baseMediaDecodeTime=Ss(h[4]<<24|h[5]<<16|h[6]<<8|h[7]),v},Es=xs,S=function(h){return{isLeading:(h[0]&12)>>>2,dependsOn:h[0]&3,isDependedOn:(h[1]&192)>>>6,hasRedundancy:(h[1]&48)>>>4,paddingValue:(h[1]&14)>>>1,isNonSyncSample:h[1]&1,degradationPriority:h[2]<<8|h[3]}},_=S,c=function(h){var v={version:h[0],flags:new Uint8Array(h.subarray(1,4)),samples:[]},y=new DataView(h.buffer,h.byteOffset,h.byteLength),b=v.flags[2]&1,w=v.flags[2]&4,k=v.flags[1]&1,V=v.flags[1]&2,W=v.flags[1]&4,Z=v.flags[1]&8,Q=y.getUint32(4),ie=8,me;for(b&&(v.dataOffset=y.getInt32(ie),ie+=4),w&&Q&&(me={flags:_(h.subarray(ie,ie+4))},ie+=4,k&&(me.duration=y.getUint32(ie),ie+=4),V&&(me.size=y.getUint32(ie),ie+=4),Z&&(v.version===1?me.compositionTimeOffset=y.getInt32(ie):me.compositionTimeOffset=y.getUint32(ie),ie+=4),v.samples.push(me),Q--);Q--;)me={},k&&(me.duration=y.getUint32(ie),ie+=4),V&&(me.size=y.getUint32(ie),ie+=4),W&&(me.flags=_(h.subarray(ie,ie+4)),ie+=4),Z&&(v.version===1?me.compositionTimeOffset=y.getInt32(ie):me.compositionTimeOffset=y.getUint32(ie),ie+=4),v.samples.push(me);return v},p=c,g=function(h){var v=new DataView(h.buffer,h.byteOffset,h.byteLength),y={version:h[0],flags:new Uint8Array(h.subarray(1,4)),trackId:v.getUint32(4)},b=y.flags[2]&1,w=y.flags[2]&2,k=y.flags[2]&8,V=y.flags[2]&16,W=y.flags[2]&32,Z=y.flags[0]&65536,Q=y.flags[0]&131072,ie;return ie=8,b&&(ie+=4,y.baseDataOffset=v.getUint32(12),ie+=4),w&&(y.sampleDescriptionIndex=v.getUint32(ie),ie+=4),k&&(y.defaultSampleDuration=v.getUint32(ie),ie+=4),V&&(y.defaultSampleSize=v.getUint32(ie),ie+=4),W&&(y.defaultSampleFlags=v.getUint32(ie)),Z&&(y.durationIsEmpty=!0),!b&&Q&&(y.baseDataOffsetIsMoof=!0),y},T=g,P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},N;typeof window<"u"?N=window:typeof P<"u"?N=P:typeof self<"u"?N=self:N={};var $=N,de=tr.discardEmulationPreventionBytes,fe=Fn.CaptionStream,pe=function(h,v){for(var y=h,b=0;b<v.length;b++){var w=v[b];if(y<w.size)return w;y-=w.size}return null},he=function(h,v,y){var b=new DataView(h.buffer,h.byteOffset,h.byteLength),w={logs:[],seiNals:[]},k,V,W,Z;for(V=0;V+4<h.length;V+=W)if(W=b.getUint32(V),V+=4,!(W<=0))switch(h[V]&31){case 6:var Q=h.subarray(V+1,V+1+W),ie=pe(V,v);if(k={nalUnitType:"sei_rbsp",size:W,data:Q,escapedRBSP:de(Q),trackId:y},ie)k.pts=ie.pts,k.dts=ie.dts,Z=ie;else if(Z)k.pts=Z.pts,k.dts=Z.dts;else{w.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+V+" for trackId "+y+". See mux.js#223."});break}w.seiNals.push(k);break}return w},ve=function(h,v,y){var b=v,w=y.defaultSampleDuration||0,k=y.defaultSampleSize||0,V=y.trackId,W=[];return h.forEach(function(Z){var Q=p(Z),ie=Q.samples;ie.forEach(function(me){me.duration===void 0&&(me.duration=w),me.size===void 0&&(me.size=k),me.trackId=V,me.dts=b,me.compositionTimeOffset===void 0&&(me.compositionTimeOffset=0),typeof b=="bigint"?(me.pts=b+$.BigInt(me.compositionTimeOffset),b+=$.BigInt(me.duration)):(me.pts=b+me.compositionTimeOffset,b+=me.duration)}),W=W.concat(ie)}),W},Fe=function(h,v){var y=yt(h,["moof","traf"]),b=yt(h,["mdat"]),w={},k=[];return b.forEach(function(V,W){var Z=y[W];k.push({mdat:V,traf:Z})}),k.forEach(function(V){var W=V.mdat,Z=V.traf,Q=yt(Z,["tfhd"]),ie=T(Q[0]),me=ie.trackId,Ce=yt(Z,["tfdt"]),ke=Ce.length>0?Es(Ce[0]).baseMediaDecodeTime:0,Te=yt(Z,["trun"]),je,Gt;v===me&&Te.length>0&&(je=ve(Te,ke,ie),Gt=he(W,je,me),w[me]||(w[me]={seiNals:[],logs:[]}),w[me].seiNals=w[me].seiNals.concat(Gt.seiNals),w[me].logs=w[me].logs.concat(Gt.logs))}),w},Le=function(h,v,y){var b;if(v===null)return null;b=Fe(h,v);var w=b[v]||{};return{seiNals:w.seiNals,logs:w.logs,timescale:y}},Ke=function(){var h=!1,v,y,b,w,k,V;this.isInitialized=function(){return h},this.init=function(W){v=new fe,h=!0,V=W?W.isPartial:!1,v.on("data",function(Z){Z.startTime=Z.startPts/w,Z.endTime=Z.endPts/w,k.captions.push(Z),k.captionStreams[Z.stream]=!0}),v.on("log",function(Z){k.logs.push(Z)})},this.isNewInit=function(W,Z){return W&&W.length===0||Z&&typeof Z=="object"&&Object.keys(Z).length===0?!1:b!==W[0]||w!==Z[b]},this.parse=function(W,Z,Q){var ie;if(this.isInitialized()){if(!Z||!Q)return null;if(this.isNewInit(Z,Q))b=Z[0],w=Q[b];else if(b===null||!w)return y.push(W),null}else return null;for(;y.length>0;){var me=y.shift();this.parse(me,Z,Q)}return ie=Le(W,b,w),ie&&ie.logs&&(k.logs=k.logs.concat(ie.logs)),ie===null||!ie.seiNals?k.logs.length?{logs:k.logs,captions:[],captionStreams:[]}:null:(this.pushNals(ie.seiNals),this.flushStream(),k)},this.pushNals=function(W){if(!this.isInitialized()||!W||W.length===0)return null;W.forEach(function(Z){v.push(Z)})},this.flushStream=function(){if(!this.isInitialized())return null;V?v.partialFlush():v.flush()},this.clearParsedCaptions=function(){k.captions=[],k.captionStreams={},k.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;v.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){y=[],b=null,w=null,k?this.clearParsedCaptions():k={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},lt=Ke,mt=Gn.toUnsigned,Je=Gn.toHexString,Zr=e.getUint64,mr,nr,We,Ct,bt,Lt;mr=function(h){var v={},y=yt(h,["moov","trak"]);return y.reduce(function(b,w){var k,V,W,Z,Q;return k=yt(w,["tkhd"])[0],!k||(V=k[0],W=V===0?12:20,Z=mt(k[W]<<24|k[W+1]<<16|k[W+2]<<8|k[W+3]),Q=yt(w,["mdia","mdhd"])[0],!Q)?null:(V=Q[0],W=V===0?12:20,b[Z]=mt(Q[W]<<24|Q[W+1]<<16|Q[W+2]<<8|Q[W+3]),b)},v)},nr=function(h,v){var y;y=yt(v,["moof","traf"]);var b=y.reduce(function(w,k){var V=yt(k,["tfhd"])[0],W=mt(V[4]<<24|V[5]<<16|V[6]<<8|V[7]),Z=h[W]||9e4,Q=yt(k,["tfdt"])[0],ie=new DataView(Q.buffer,Q.byteOffset,Q.byteLength),me;Q[0]===1?me=Zr(Q.subarray(4,12)):me=ie.getUint32(4);var Ce;return typeof me=="bigint"?Ce=me/$.BigInt(Z):typeof me=="number"&&!isNaN(me)&&(Ce=me/Z),Ce<Number.MAX_SAFE_INTEGER&&(Ce=Number(Ce)),Ce<w&&(w=Ce),w},1/0);return typeof b=="bigint"||isFinite(b)?b:0},We=function(h,v){var y=yt(v,["moof","traf"]),b=0,w=0,k;if(y&&y.length){var V=yt(y[0],["tfhd"])[0],W=yt(y[0],["trun"])[0],Z=yt(y[0],["tfdt"])[0];if(V){var Q=T(V);k=Q.trackId}if(Z){var ie=Es(Z);b=ie.baseMediaDecodeTime}if(W){var me=p(W);me.samples&&me.samples.length&&(w=me.samples[0].compositionTimeOffset||0)}}var Ce=h[k]||9e4;typeof b=="bigint"&&(w=$.BigInt(w),Ce=$.BigInt(Ce));var ke=(b+w)/Ce;return typeof ke=="bigint"&&ke<Number.MAX_SAFE_INTEGER&&(ke=Number(ke)),ke},Ct=function(h){var v=yt(h,["moov","trak"]),y=[];return v.forEach(function(b){var w=yt(b,["mdia","hdlr"]),k=yt(b,["tkhd"]);w.forEach(function(V,W){var Z=Di(V.subarray(8,12)),Q=k[W],ie,me,Ce;Z==="vide"&&(ie=new DataView(Q.buffer,Q.byteOffset,Q.byteLength),me=ie.getUint8(0),Ce=me===0?ie.getUint32(12):ie.getUint32(20),y.push(Ce))})}),y},Lt=function(h){var v=h[0],y=v===0?12:20;return mt(h[y]<<24|h[y+1]<<16|h[y+2]<<8|h[y+3])},bt=function(h){var v=yt(h,["moov","trak"]),y=[];return v.forEach(function(b){var w={},k=yt(b,["tkhd"])[0],V,W;k&&(V=new DataView(k.buffer,k.byteOffset,k.byteLength),W=V.getUint8(0),w.id=W===0?V.getUint32(12):V.getUint32(20));var Z=yt(b,["mdia","hdlr"])[0];if(Z){var Q=Di(Z.subarray(8,12));Q==="vide"?w.type="video":Q==="soun"?w.type="audio":w.type=Q}var ie=yt(b,["mdia","minf","stbl","stsd"])[0];if(ie){var me=ie.subarray(8);w.codec=Di(me.subarray(4,8));var Ce=yt(me,[w.codec])[0],ke,Te;Ce&&(/^[asm]vc[1-9]$/i.test(w.codec)?(ke=Ce.subarray(78),Te=Di(ke.subarray(4,8)),Te==="avcC"&&ke.length>11?(w.codec+=".",w.codec+=Je(ke[9]),w.codec+=Je(ke[10]),w.codec+=Je(ke[11])):w.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(w.codec)?(ke=Ce.subarray(28),Te=Di(ke.subarray(4,8)),Te==="esds"&&ke.length>20&&ke[19]!==0?(w.codec+="."+Je(ke[19]),w.codec+="."+Je(ke[20]>>>2&63).replace(/^0/,"")):w.codec="mp4a.40.2"):w.codec=w.codec.toLowerCase())}var je=yt(b,["mdia","mdhd"])[0];je&&(w.timescale=Lt(je)),y.push(w)}),y};var vr={findBox:yt,parseType:Di,timescale:mr,startTime:nr,compositionStartTime:We,videoTrackIds:Ct,tracks:bt,getTimescaleFromMediaHeader:Lt},zt=function(h){var v=h[1]&31;return v<<=8,v|=h[2],v},lr=function(h){return!!(h[1]&64)},Mt=function(h){var v=0;return(h[3]&48)>>>4>1&&(v+=h[4]+1),v},hi=function(h,v){var y=zt(h);return y===0?"pat":y===v?"pmt":v?"pes":null},Vr=function(h){var v=lr(h),y=4+Mt(h);return v&&(y+=h[y]+1),(h[y+10]&31)<<8|h[y+11]},sn=function(h){var v={},y=lr(h),b=4+Mt(h);if(y&&(b+=h[b]+1),!!(h[b+5]&1)){var w,k,V;w=(h[b+1]&15)<<8|h[b+2],k=3+w-4,V=(h[b+10]&15)<<8|h[b+11];for(var W=12+V;W<k;){var Z=b+W;v[(h[Z+1]&31)<<8|h[Z+2]]=h[Z],W+=((h[Z+3]&15)<<8|h[Z+4])+5}return v}},Wn=function(h,v){var y=zt(h),b=v[y];switch(b){case It.H264_STREAM_TYPE:return"video";case It.ADTS_STREAM_TYPE:return"audio";case It.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},at=function(h){var v=lr(h);if(!v)return null;var y=4+Mt(h);if(y>=h.byteLength)return null;var b=null,w;return w=h[y+7],w&192&&(b={},b.pts=(h[y+9]&14)<<27|(h[y+10]&255)<<20|(h[y+11]&254)<<12|(h[y+12]&255)<<5|(h[y+13]&254)>>>3,b.pts*=4,b.pts+=(h[y+13]&6)>>>1,b.dts=b.pts,w&64&&(b.dts=(h[y+14]&14)<<27|(h[y+15]&255)<<20|(h[y+16]&254)<<12|(h[y+17]&255)<<5|(h[y+18]&254)>>>3,b.dts*=4,b.dts+=(h[y+18]&6)>>>1)),b},kr=function(h){switch(h){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},wa=function(h){for(var v=4+Mt(h),y=h.subarray(v),b=0,w=0,k=!1,V;w<y.byteLength-3;w++)if(y[w+2]===1){b=w+5;break}for(;b<y.byteLength;)switch(y[b]){case 0:if(y[b-1]!==0){b+=2;break}else if(y[b-2]!==0){b++;break}w+3!==b-2&&(V=kr(y[w+3]&31),V==="slice_layer_without_partitioning_rbsp_idr"&&(k=!0));do b++;while(y[b]!==1&&b<y.length);w=b-2,b+=3;break;case 1:if(y[b-1]!==0||y[b-2]!==0){b+=3;break}V=kr(y[w+3]&31),V==="slice_layer_without_partitioning_rbsp_idr"&&(k=!0),w=b-2,b+=3;break;default:b+=3;break}return y=y.subarray(w),b-=w,w=0,y&&y.byteLength>3&&(V=kr(y[w+3]&31),V==="slice_layer_without_partitioning_rbsp_idr"&&(k=!0)),k},nu={parseType:hi,parsePat:Vr,parsePmt:sn,parsePayloadUnitStartIndicator:lr,parsePesType:Wn,parsePesTime:at,videoPacketContainsKeyFrame:wa},Pi=Ar.handleRollover,rt={};rt.ts=nu,rt.aac=Vn;var Ii=Ze.ONE_SECOND_IN_TS,$t=188,Hr=71,Cs=function(h,v){for(var y=0,b=$t,w,k;b<h.byteLength;){if(h[y]===Hr&&h[b]===Hr){switch(w=h.subarray(y,b),k=rt.ts.parseType(w,v.pid),k){case"pat":v.pid=rt.ts.parsePat(w);break;case"pmt":var V=rt.ts.parsePmt(w);v.table=v.table||{},Object.keys(V).forEach(function(W){v.table[W]=V[W]});break}y+=$t,b+=$t;continue}y++,b++}},ws=function(h,v,y){for(var b=0,w=$t,k,V,W,Z,Q,ie=!1;w<=h.byteLength;){if(h[b]===Hr&&(h[w]===Hr||w===h.byteLength)){switch(k=h.subarray(b,w),V=rt.ts.parseType(k,v.pid),V){case"pes":W=rt.ts.parsePesType(k,v.table),Z=rt.ts.parsePayloadUnitStartIndicator(k),W==="audio"&&Z&&(Q=rt.ts.parsePesTime(k),Q&&(Q.type="audio",y.audio.push(Q),ie=!0));break}if(ie)break;b+=$t,w+=$t;continue}b++,w++}for(w=h.byteLength,b=w-$t,ie=!1;b>=0;){if(h[b]===Hr&&(h[w]===Hr||w===h.byteLength)){switch(k=h.subarray(b,w),V=rt.ts.parseType(k,v.pid),V){case"pes":W=rt.ts.parsePesType(k,v.table),Z=rt.ts.parsePayloadUnitStartIndicator(k),W==="audio"&&Z&&(Q=rt.ts.parsePesTime(k),Q&&(Q.type="audio",y.audio.push(Q),ie=!0));break}if(ie)break;b-=$t,w-=$t;continue}b--,w--}},au=function(h,v,y){for(var b=0,w=$t,k,V,W,Z,Q,ie,me,Ce,ke=!1,Te={data:[],size:0};w<h.byteLength;){if(h[b]===Hr&&h[w]===Hr){switch(k=h.subarray(b,w),V=rt.ts.parseType(k,v.pid),V){case"pes":if(W=rt.ts.parsePesType(k,v.table),Z=rt.ts.parsePayloadUnitStartIndicator(k),W==="video"&&(Z&&!ke&&(Q=rt.ts.parsePesTime(k),Q&&(Q.type="video",y.video.push(Q),ke=!0)),!y.firstKeyFrame)){if(Z&&Te.size!==0){for(ie=new Uint8Array(Te.size),me=0;Te.data.length;)Ce=Te.data.shift(),ie.set(Ce,me),me+=Ce.byteLength;if(rt.ts.videoPacketContainsKeyFrame(ie)){var je=rt.ts.parsePesTime(ie);je?(y.firstKeyFrame=je,y.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}Te.size=0}Te.data.push(k),Te.size+=k.byteLength}break}if(ke&&y.firstKeyFrame)break;b+=$t,w+=$t;continue}b++,w++}for(w=h.byteLength,b=w-$t,ke=!1;b>=0;){if(h[b]===Hr&&h[w]===Hr){switch(k=h.subarray(b,w),V=rt.ts.parseType(k,v.pid),V){case"pes":W=rt.ts.parsePesType(k,v.table),Z=rt.ts.parsePayloadUnitStartIndicator(k),W==="video"&&Z&&(Q=rt.ts.parsePesTime(k),Q&&(Q.type="video",y.video.push(Q),ke=!0));break}if(ke)break;b-=$t,w-=$t;continue}b--,w--}},Aa=function(h,v){if(h.audio&&h.audio.length){var y=v;(typeof y>"u"||isNaN(y))&&(y=h.audio[0].dts),h.audio.forEach(function(k){k.dts=Pi(k.dts,y),k.pts=Pi(k.pts,y),k.dtsTime=k.dts/Ii,k.ptsTime=k.pts/Ii})}if(h.video&&h.video.length){var b=v;if((typeof b>"u"||isNaN(b))&&(b=h.video[0].dts),h.video.forEach(function(k){k.dts=Pi(k.dts,b),k.pts=Pi(k.pts,b),k.dtsTime=k.dts/Ii,k.ptsTime=k.pts/Ii}),h.firstKeyFrame){var w=h.firstKeyFrame;w.dts=Pi(w.dts,b),w.pts=Pi(w.pts,b),w.dtsTime=w.dts/Ii,w.ptsTime=w.pts/Ii}}},su=function(h){for(var v=!1,y=0,b=null,w=null,k=0,V=0,W;h.length-V>=3;){var Z=rt.aac.parseType(h,V);switch(Z){case"timed-metadata":if(h.length-V<10){v=!0;break}if(k=rt.aac.parseId3TagSize(h,V),k>h.length){v=!0;break}w===null&&(W=h.subarray(V,V+k),w=rt.aac.parseAacTimestamp(W)),V+=k;break;case"audio":if(h.length-V<7){v=!0;break}if(k=rt.aac.parseAdtsSize(h,V),k>h.length){v=!0;break}b===null&&(W=h.subarray(V,V+k),b=rt.aac.parseSampleRate(W)),y++,V+=k;break;default:V++;break}if(v)return null}if(b===null||w===null)return null;var Q=Ii/b,ie={audio:[{type:"audio",dts:w,pts:w},{type:"audio",dts:w+y*1024*Q,pts:w+y*1024*Q}]};return ie},ou=function(h){var v={pid:null,table:null},y={};Cs(h,v);for(var b in v.table)if(v.table.hasOwnProperty(b)){var w=v.table[b];switch(w){case It.H264_STREAM_TYPE:y.video=[],au(h,v,y),y.video.length===0&&delete y.video;break;case It.ADTS_STREAM_TYPE:y.audio=[],ws(h,v,y),y.audio.length===0&&delete y.audio;break}}return y},uu=function(h,v){var y=rt.aac.isLikelyAacData(h),b;return y?b=su(h):b=ou(h),!b||!b.audio&&!b.video?null:(Aa(b,v),b)},ka={inspect:uu,parseAudioPes_:ws},Ve=function(h,v){v.on("data",function(y){var b=y.initSegment;y.initSegment={data:b.buffer,byteOffset:b.byteOffset,byteLength:b.byteLength};var w=y.data;y.data=w.buffer,h.postMessage({action:"data",segment:y,byteOffset:w.byteOffset,byteLength:w.byteLength},[y.data])}),v.on("done",function(y){h.postMessage({action:"done"})}),v.on("gopInfo",function(y){h.postMessage({action:"gopInfo",gopInfo:y})}),v.on("videoSegmentTimingInfo",function(y){var b={start:{decode:Ze.videoTsToSeconds(y.start.dts),presentation:Ze.videoTsToSeconds(y.start.pts)},end:{decode:Ze.videoTsToSeconds(y.end.dts),presentation:Ze.videoTsToSeconds(y.end.pts)},baseMediaDecodeTime:Ze.videoTsToSeconds(y.baseMediaDecodeTime)};
46y.prependedContentDuration&&(b.prependedContentDuration=Ze.videoTsToSeconds(y.prependedContentDuration)),h.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:b})}),v.on("audioSegmentTimingInfo",function(y){var b={start:{decode:Ze.videoTsToSeconds(y.start.dts),presentation:Ze.videoTsToSeconds(y.start.pts)},end:{decode:Ze.videoTsToSeconds(y.end.dts),presentation:Ze.videoTsToSeconds(y.end.pts)},baseMediaDecodeTime:Ze.videoTsToSeconds(y.baseMediaDecodeTime)};y.prependedContentDuration&&(b.prependedContentDuration=Ze.videoTsToSeconds(y.prependedContentDuration)),h.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:b})}),v.on("id3Frame",function(y){h.postMessage({action:"id3Frame",id3Frame:y})}),v.on("caption",function(y){h.postMessage({action:"caption",caption:y})}),v.on("trackinfo",function(y){h.postMessage({action:"trackinfo",trackInfo:y})}),v.on("audioTimingInfo",function(y){h.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Ze.videoTsToSeconds(y.start),end:Ze.videoTsToSeconds(y.end)}})}),v.on("videoTimingInfo",function(y){h.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Ze.videoTsToSeconds(y.start),end:Ze.videoTsToSeconds(y.end)}})}),v.on("log",function(y){h.postMessage({action:"log",log:y})})},Be=(function(){function I(v,y){this.options=y||{},this.self=v,this.init()}var h=I.prototype;return h.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new bs.Transmuxer(this.options),Ve(this.self,this.transmuxer)},h.pushMp4Captions=function(y){this.captionParser||(this.captionParser=new lt,this.captionParser.init());var b=new Uint8Array(y.data,y.byteOffset,y.byteLength),w=this.captionParser.parse(b,y.trackIds,y.timescales);this.self.postMessage({action:"mp4Captions",captions:w&&w.captions||[],logs:w&&w.logs||[],data:b.buffer},[b.buffer])},h.probeMp4StartTime=function(y){var b=y.timescales,w=y.data,k=vr.startTime(b,w);this.self.postMessage({action:"probeMp4StartTime",startTime:k,data:w},[w.buffer])},h.probeMp4Tracks=function(y){var b=y.data,w=vr.tracks(b);this.self.postMessage({action:"probeMp4Tracks",tracks:w,data:b},[b.buffer])},h.probeTs=function(y){var b=y.data,w=y.baseStartTime,k=typeof w=="number"&&!isNaN(w)?w*Ze.ONE_SECOND_IN_TS:void 0,V=ka.inspect(b,k),W=null;V&&(W={hasVideo:V.video&&V.video.length===2||!1,hasAudio:V.audio&&V.audio.length===2||!1},W.hasVideo&&(W.videoStart=V.video[0].ptsTime),W.hasAudio&&(W.audioStart=V.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:W,data:b},[b.buffer])},h.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},h.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},h.push=function(y){var b=new Uint8Array(y.data,y.byteOffset,y.byteLength);this.transmuxer.push(b)},h.reset=function(){this.transmuxer.reset()},h.setTimestampOffset=function(y){var b=y.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Ze.secondsToVideoTs(b)))},h.setAudioAppendStart=function(y){this.transmuxer.setAudioAppendStart(Math.ceil(Ze.secondsToVideoTs(y.appendStart)))},h.setRemux=function(y){this.transmuxer.setRemux(y.remux)},h.flush=function(y){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},h.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},h.alignGopsWith=function(y){this.transmuxer.alignGopsWith(y.gopsToAlignWith.slice())},I})();self.onmessage=function(I){if(I.data.action==="init"&&I.data.options){this.messageHandlers=new Be(self,I.data.options);return}this.messageHandlers||(this.messageHandlers=new Be(self)),I.data&&I.data.action&&I.data.action!=="init"&&this.messageHandlers[I.data.action]&&this.messageHandlers[I.data.action](I.data)}})),xE=Ky(SE),EE=function(r,i,n){var e=r.data.segment,t=e.type,a=e.initSegment,o=e.captions,l=e.captionStreams,u=e.metadata,d=e.videoFrameDtsTime,f=e.videoFramePtsTime;i.buffer.push({captions:o,captionStreams:l,metadata:u});var m=r.data.segment.boxes||{data:r.data.segment.data},x={type:t,data:new Uint8Array(m.data,m.data.byteOffset,m.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)};typeof d<"u"&&(x.videoFrameDtsTime=d),typeof f<"u"&&(x.videoFramePtsTime=f),n(x)},CE=function(r){var i=r.transmuxedData,n=r.callback;i.buffer=[],n(i)},wE=function(r,i){i.gopInfo=r.data.gopInfo},Qy=function(r){var i=r.transmuxer,n=r.bytes,e=r.audioAppendStart,t=r.gopsToAlignWith,a=r.remux,o=r.onData,l=r.onTrackInfo,u=r.onAudioTimingInfo,d=r.onVideoTimingInfo,f=r.onVideoSegmentTimingInfo,m=r.onAudioSegmentTimingInfo,x=r.onId3,C=r.onCaptions,L=r.onDone,E=r.onEndedTimeline,B=r.onTransmuxerLog,q=r.isEndOfTimeline,z={buffer:[]},U=q,F=function(A){i.currentTransmux===r&&(A.data.action==="data"&&EE(A,z,o),A.data.action==="trackinfo"&&l(A.data.trackInfo),A.data.action==="gopInfo"&&wE(A,z),A.data.action==="audioTimingInfo"&&u(A.data.audioTimingInfo),A.data.action==="videoTimingInfo"&&d(A.data.videoTimingInfo),A.data.action==="videoSegmentTimingInfo"&&f(A.data.videoSegmentTimingInfo),A.data.action==="audioSegmentTimingInfo"&&m(A.data.audioSegmentTimingInfo),A.data.action==="id3Frame"&&x([A.data.id3Frame],A.data.id3Frame.dispatchType),A.data.action==="caption"&&C(A.data.caption),A.data.action==="endedtimeline"&&(U=!1,E()),A.data.action==="log"&&B(A.data.log),A.data.type==="transmuxed"&&(U||(i.onmessage=null,CE({transmuxedData:z,callback:L}),Jy(i))))};if(i.onmessage=F,e&&i.postMessage({action:"setAudioAppendStart",appendStart:e}),Array.isArray(t)&&i.postMessage({action:"alignGopsWith",gopsToAlignWith:t}),typeof a<"u"&&i.postMessage({action:"setRemux",remux:a}),n.byteLength){var G=n instanceof ArrayBuffer?n:n.buffer,O=n instanceof ArrayBuffer?0:n.byteOffset;i.postMessage({action:"push",data:G,byteOffset:O,byteLength:n.byteLength},[G])}q&&i.postMessage({action:"endTimeline"}),i.postMessage({action:"flush"})},Jy=function(r){r.currentTransmux=null,r.transmuxQueue.length&&(r.currentTransmux=r.transmuxQueue.shift(),typeof r.currentTransmux=="function"?r.currentTransmux():Qy(r.currentTransmux))},Op=function(r,i){r.postMessage({action:i}),Jy(r)},Zy=function(r,i){if(!i.currentTransmux){i.currentTransmux=r,Op(i,r);return}i.transmuxQueue.push(Op.bind(null,i,r))},AE=function(r){Zy("reset",r)},kE=function(r){Zy("endTimeline",r)},e_=function(r){if(!r.transmuxer.currentTransmux){r.transmuxer.currentTransmux=r,Qy(r);return}r.transmuxer.transmuxQueue.push(r)},DE=function(r){var i=new xE;i.currentTransmux=null,i.transmuxQueue=[];var n=i.terminate;return i.terminate=function(){return i.currentTransmux=null,i.transmuxQueue.length=0,n.call(i)},i.postMessage({action:"init",options:r}),i},zu={reset:AE,endTimeline:kE,transmux:e_,createTransmuxer:DE},fo=function(r){var i=r.transmuxer,n=r.endAction||r.action,e=r.callback,t=ai({},r,{endAction:null,transmuxer:null,callback:null}),a=function u(d){d.data.action===n&&(i.removeEventListener("message",u),d.data.data&&(d.data.data=new Uint8Array(d.data.data,r.byteOffset||0,r.byteLength||d.data.data.byteLength),r.data&&(r.data=d.data.data)),e(d.data))};if(i.addEventListener("message",a),r.data){var o=r.data instanceof ArrayBuffer;t.byteOffset=o?0:r.data.byteOffset,t.byteLength=r.data.byteLength;var l=[o?r.data:r.data.buffer];i.postMessage(t,l)}else i.postMessage(t)},bi={FAILURE:2,TIMEOUT:-101,ABORTED:-102},tf=function(r){r.forEach(function(i){i.abort()})},PE=function(r){return{bandwidth:r.bandwidth,bytesReceived:r.bytesReceived||0,roundTripTime:r.roundTripTime||0}},IE=function(r){var i=r.target,n=Date.now()-i.requestTime,e={bandwidth:1/0,bytesReceived:0,roundTripTime:n||0};return e.bytesReceived=r.loaded,e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3),e},Zf=function(r,i){return i.timedout?{status:i.status,message:"HLS request timed-out at URL: "+i.uri,code:bi.TIMEOUT,xhr:i}:i.aborted?{status:i.status,message:"HLS request aborted at URL: "+i.uri,code:bi.ABORTED,xhr:i}:r?{status:i.status,message:"HLS request errored at URL: "+i.uri,code:bi.FAILURE,xhr:i}:i.responseType==="arraybuffer"&&i.response.byteLength===0?{status:i.status,message:"Empty HLS response at URL: "+i.uri,code:bi.FAILURE,xhr:i}:null},Rp=function(r,i,n){return function(e,t){var a=t.response,o=Zf(e,t);if(o)return n(o,r);if(a.byteLength!==16)return n({status:t.status,message:"Invalid HLS key at URL: "+t.uri,code:bi.FAILURE,xhr:t},r);for(var l=new DataView(a),u=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]),d=0;d<i.length;d++)i[d].bytes=u;return n(null,r)}},t_=function(r,i){var n=yf(r.map.bytes);if(n!=="mp4"){var e=r.map.resolvedUri||r.map.uri;return i({internal:!0,message:"Found unsupported "+(n||"unknown")+" container for initialization segment at URL: "+e,code:bi.FAILURE})}fo({action:"probeMp4Tracks",data:r.map.bytes,transmuxer:r.transmuxer,callback:function(a){var o=a.tracks,l=a.data;return r.map.bytes=l,o.forEach(function(u){r.map.tracks=r.map.tracks||{},!r.map.tracks[u.type]&&(r.map.tracks[u.type]=u,typeof u.id=="number"&&u.timescale&&(r.map.timescales=r.map.timescales||{},r.map.timescales[u.id]=u.timescale))}),i(null)}})},LE=function(r){var i=r.segment,n=r.finishProcessingFn;
46return function(e,t){var a=Zf(e,t);if(a)return n(a,i);var o=new Uint8Array(t.response);if(i.map.key)return i.map.encryptedBytes=o,n(null,i);i.map.bytes=o,t_(i,function(l){if(l)return l.xhr=t,l.status=t.status,n(l,i);n(null,i)})}},ME=function(r){var i=r.segment,n=r.finishProcessingFn,e=r.responseType;return function(t,a){var o=Zf(t,a);if(o)return n(o,i);var l=e==="arraybuffer"||!a.responseText?a.response:bE(a.responseText.substring(i.lastReachedChar||0));return i.stats=PE(a),i.key?i.encryptedBytes=new Uint8Array(l):i.bytes=new Uint8Array(l),n(null,i)}},OE=function(r){var i=r.segment,n=r.bytes,e=r.trackInfoFn,t=r.timingInfoFn,a=r.videoSegmentTimingInfoFn,o=r.audioSegmentTimingInfoFn,l=r.id3Fn,u=r.captionsFn,d=r.isEndOfTimeline,f=r.endedTimelineFn,m=r.dataFn,x=r.doneFn,C=r.onTransmuxerLog,L=i.map&&i.map.tracks||{},E=!!(L.audio&&L.video),B=t.bind(null,i,"audio","start"),q=t.bind(null,i,"audio","end"),z=t.bind(null,i,"video","start"),U=t.bind(null,i,"video","end"),F=function(){return e_({bytes:n,transmuxer:i.transmuxer,audioAppendStart:i.audioAppendStart,gopsToAlignWith:i.gopsToAlignWith,remux:E,onData:function(H){H.type=H.type==="combined"?"video":H.type,m(i,H)},onTrackInfo:function(H){e&&(E&&(H.isMuxed=!0),e(i,H))},onAudioTimingInfo:function(H){B&&typeof H.start<"u"&&(B(H.start),B=null),q&&typeof H.end<"u"&&q(H.end)},onVideoTimingInfo:function(H){z&&typeof H.start<"u"&&(z(H.start),z=null),U&&typeof H.end<"u"&&U(H.end)},onVideoSegmentTimingInfo:function(H){a(H)},onAudioSegmentTimingInfo:function(H){o(H)},onId3:function(H,A){l(i,H,A)},onCaptions:function(H){u(i,[H])},isEndOfTimeline:d,onEndedTimeline:function(){f()},onTransmuxerLog:C,onDone:function(H){x&&(H.type=H.type==="combined"?"video":H.type,x(null,i,H))}})};fo({action:"probeTs",transmuxer:i.transmuxer,data:n,baseStartTime:i.baseStartTime,callback:function(O){i.bytes=n=O.data;var H=O.result;H&&(e(i,{hasAudio:H.hasAudio,hasVideo:H.hasVideo,isMuxed:E}),e=null,H.hasAudio&&!E&&B(H.audioStart),H.hasVideo&&z(H.videoStart),B=null,z=null),F()}})},r_=function(r){var i=r.segment,n=r.bytes,e=r.trackInfoFn,t=r.timingInfoFn,a=r.videoSegmentTimingInfoFn,o=r.audioSegmentTimingInfoFn,l=r.id3Fn,u=r.captionsFn,d=r.isEndOfTimeline,f=r.endedTimelineFn,m=r.dataFn,x=r.doneFn,C=r.onTransmuxerLog,L=new Uint8Array(n);
46if(JS(L)){i.isFmp4=!0;var E=i.map.tracks,B={isFmp4:!0,hasVideo:!!E.video,hasAudio:!!E.audio};E.audio&&E.audio.codec&&E.audio.codec!=="enca"&&(B.audioCodec=E.audio.codec),E.video&&E.video.codec&&E.video.codec!=="encv"&&(B.videoCodec=E.video.codec),E.video&&E.audio&&(B.isMuxed=!0),e(i,B);var q=function(U){m(i,{data:L,type:B.hasAudio&&!B.isMuxed?"audio":"video"}),U&&U.length&&u(i,U),x(null,i,{})};fo({action:"probeMp4StartTime",timescales:i.map.timescales,data:L,transmuxer:i.transmuxer,callback:function(U){var F=U.data,G=U.startTime;if(n=F.buffer,i.bytes=L=F,B.hasAudio&&!B.isMuxed&&t(i,"audio","start",G),B.hasVideo&&t(i,"video","start",G),!E.video||!F.byteLength||!i.transmuxer){q();return}fo({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:i.transmuxer,data:L,timescales:i.map.timescales,trackIds:[E.video.id],callback:function(H){n=H.data.buffer,i.bytes=L=H.data,H.logs.forEach(function(A){C(ae.mergeOptions(A,{stream:"mp4CaptionParser"}))}),q(H.captions)}})}});return}if(!i.transmuxer){x(null,i,{});return}if(typeof i.container>"u"&&(i.container=yf(L)),i.container!=="ts"&&i.container!=="aac"){e(i,{hasAudio:!1,hasVideo:!1}),x(null,i,{});return}OE({segment:i,bytes:n,trackInfoFn:e,timingInfoFn:t,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:m,doneFn:x,onTransmuxerLog:C})},i_=function(r,i){var n=r.id,e=r.key,t=r.encryptedBytes,a=r.decryptionWorker,o=function u(d){if(d.data.source===n){a.removeEventListener("message",u);var f=d.data.decrypted;i(new Uint8Array(f.bytes,f.byteOffset,f.byteLength))}};a.addEventListener("message",o);var l;e.bytes.slice?l=e.bytes.slice():l=new Uint32Array(Array.prototype.slice.call(e.bytes)),a.postMessage(Hy({source:n,encrypted:t,key:l,iv:e.iv}),[t.buffer,l.buffer])},RE=function(r){var i=r.decryptionWorker,n=r.segment,e=r.trackInfoFn,t=r.timingInfoFn,a=r.videoSegmentTimingInfoFn,o=r.audioSegmentTimingInfoFn,l=r.id3Fn,u=r.captionsFn,d=r.isEndOfTimeline,f=r.endedTimelineFn,m=r.dataFn,x=r.doneFn,C=r.onTransmuxerLog;i_({id:n.requestId,key:n.key,encryptedBytes:n.encryptedBytes,decryptionWorker:i},function(L){n.bytes=L,r_({segment:n,bytes:n.bytes,trackInfoFn:e,timingInfoFn:t,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:m,doneFn:x,onTransmuxerLog:C})})},FE=function(r){var i=r.activeXhrs,n=r.decryptionWorker,e=r.trackInfoFn,t=r.timingInfoFn,a=r.videoSegmentTimingInfoFn,o=r.audioSegmentTimingInfoFn,l=r.id3Fn,u=r.captionsFn,d=r.isEndOfTimeline,f=r.endedTimelineFn,m=r.dataFn,x=r.doneFn,C=r.onTransmuxerLog,L=0,E=!1;return function(B,q){if(!E){if(B)return E=!0,tf(i),x(B,q);if(L+=1,L===i.length){var z=function(){if(q.encryptedBytes)return RE({decryptionWorker:n,segment:q,trackInfoFn:e,timingInfoFn:t,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:m,doneFn:x,onTransmuxerLog:C});r_({segment:q,bytes:q.bytes,trackInfoFn:e,timingInfoFn:t,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:l,captionsFn:u,isEndOfTimeline:d,endedTimelineFn:f,dataFn:m,doneFn:x,onTransmuxerLog:C})};if(q.endOfAllRequests=Date.now(),q.map&&q.map.encryptedBytes&&!q.map.bytes)return i_({decryptionWorker:n,id:q.requestId+"-init",encryptedBytes:q.map.encryptedBytes,key:q.map.key},function(U){q.map.bytes=U,t_(q,function(F){if(F)return tf(i),x(F,q);z()})});z()}}}},NE=function(r){var i=r.loadendState,n=r.abortFn;return function(e){var t=e.target;t.aborted&&n&&!i.calledAbortFn&&(n(),i.calledAbortFn=!0)}},BE=function(r){var i=r.segment,n=r.progressFn;return function(e){var t=e.target;if(!t.aborted)return i.stats=ae.mergeOptions(i.stats,IE(e)),!i.stats.firstBytesReceivedAt&&i.stats.bytesReceived&&(i.stats.firstBytesReceivedAt=Date.now()),n(e,i)}},UE=function(r){var i=r.xhr,n=r.xhrOptions,e=r.decryptionWorker,t=r.segment,a=r.abortFn,o=r.progressFn,l=r.trackInfoFn,u=r.timingInfoFn,d=r.videoSegmentTimingInfoFn,f=r.audioSegmentTimingInfoFn,m=r.id3Fn,x=r.captionsFn,C=r.isEndOfTimeline,L=r.endedTimelineFn,E=r.dataFn,B=r.doneFn,q=r.onTransmuxerLog,z=[],U=FE({activeXhrs:z,decryptionWorker:e,trackInfoFn:l,timingInfoFn:u,videoSegmentTimingInfoFn:d,audioSegmentTimingInfoFn:f,id3Fn:m,captionsFn:x,isEndOfTimeline:C,endedTimelineFn:L,dataFn:E,doneFn:B,onTransmuxerLog:q});if(t.key&&!t.key.bytes){var F=[t.key];t.map&&!t.map.bytes&&t.map.key&&t.map.key.resolvedUri===t.key.resolvedUri&&F.push(t.map.key);var G=ae.mergeOptions(n,{uri:t.key.resolvedUri,responseType:"arraybuffer"}),O=Rp(t,F,U),H=i(G,O);z.push(H)}if(t.map&&!t.map.bytes){var A=t.map.key&&(!t.key||t.key.resolvedUri!==t.map.key.resolvedUri);if(A){var D=ae.mergeOptions(n,{uri:t.map.key.resolvedUri,responseType:"arraybuffer"}),j=Rp(t,[t.map.key],U),X=i(D,j);z.push(X)}var J=ae.mergeOptions(n,{uri:t.map.resolvedUri,responseType:"arraybuffer",headers:Zd(t.map)}),ne=LE({segment:t,finishProcessingFn:U}),se=i(J,ne);z.push(se)}var ue=ae.mergeOptions(n,{uri:t.part&&t.part.resolvedUri||t.resolvedUri,responseType:"arraybuffer",headers:Zd(t)}),oe=ME({segment:t,finishProcessingFn:U,responseType:ue.responseType}),te=i(ue,oe);te.addEventListener("progress",BE({segment:t,progressFn:o}
46)),z.push(te);var le={};return z.forEach(function(re){re.addEventListener("loadend",NE({loadendState:le,abortFn:a}))}),function(){return tf(z)}},qE=oi("CodecUtils"),VE=function(r){var i=r.attributes||{};if(i.CODECS)return pi(i.CODECS)},n_=function(r,i){var n=i.attributes||{};return r&&r.mediaGroups&&r.mediaGroups.AUDIO&&n.AUDIO&&r.mediaGroups.AUDIO[n.AUDIO]},HE=function(r,i){if(!n_(r,i))return!0;var n=i.attributes||{},e=r.mediaGroups.AUDIO[n.AUDIO];for(var t in e)if(!e[t].uri&&!e[t].playlists)return!0;return!1},ho=function(r){var i={};return r.forEach(function(n){var e=n.mediaType,t=n.type,a=n.details;i[e]=i[e]||[],i[e].push(r0(""+t+a))}),Object.keys(i).forEach(function(n){if(i[n].length>1){qE("multiple "+n+" codecs found as attributes: "+i[n].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),i[n]=null;return}i[n]=i[n][0]}),i},Fp=function(r){var i=0;return r.audio&&i++,r.video&&i++,i},Ga=function(r,i){var n=i.attributes||{},e=ho(VE(i)||[]);if(n_(r,i)&&!e.audio&&!HE(r,i)){var t=ho(wT(r,n.AUDIO)||[]);t.audio&&(e.audio=t.audio)}return e},qs=oi("PlaylistSelector"),Np=function(r){if(!(!r||!r.playlist)){var i=r.playlist;return JSON.stringify({id:i.id,bandwidth:r.bandwidth,width:r.width,height:r.height,codecs:i.attributes&&i.attributes.CODECS||""})}},po=function(r,i){if(!r)return"";var n=K.getComputedStyle(r);return n?n[i]:""},ia=function(r,i){var n=r.slice();r.sort(function(e,t){var a=i(e,t);return a===0?n.indexOf(e)-n.indexOf(t):a})},eh=function(r,i){var n,e;return r.attributes.BANDWIDTH&&(n=r.attributes.BANDWIDTH),n=n||K.Number.MAX_VALUE,i.attributes.BANDWIDTH&&(e=i.attributes.BANDWIDTH),e=e||K.Number.MAX_VALUE,n-e},jE=function(r,i){var n,e;return r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width&&(n=r.attributes.RESOLUTION.width),n=n||K.Number.MAX_VALUE,i.attributes.RESOLUTION&&i.attributes.RESOLUTION.width&&(e=i.attributes.RESOLUTION.width),e=e||K.Number.MAX_VALUE,n===e&&r.attributes.BANDWIDTH&&i.attributes.BANDWIDTH?r.attributes.BANDWIDTH-i.attributes.BANDWIDTH:n-e},a_=function(r,i,n,e,t,a){if(r){var o={bandwidth:i,width:n,height:e,limitRenditionByPlayerDimensions:t},l=r.playlists;Pr.isAudioOnly(r)&&(l=a.getAudioTrackPlaylists_(),o.audioOnly=!0);var u=l.map(function(D){var j,X=D.attributes&&D.attributes.RESOLUTION&&D.attributes.RESOLUTION.width,J=D.attributes&&D.attributes.RESOLUTION&&D.attributes.RESOLUTION.height;return j=D.attributes&&D.attributes.BANDWIDTH,j=j||K.Number.MAX_VALUE,{bandwidth:j,width:X,height:J,playlist:D}});ia(u,function(D,j){return D.bandwidth-j.bandwidth}),u=u.filter(function(D){return!Pr.isIncompatible(D.playlist)});var d=u.filter(function(D){return Pr.isEnabled(D.playlist)});d.length||(d=u.filter(function(D){return!Pr.isDisabled(D.playlist)}));var f=d.filter(function(D){return D.bandwidth*Qt.BANDWIDTH_VARIANCE<i}),m=f[f.length-1],x=f.filter(function(D){return D.bandwidth===m.bandwidth})[0];if(t===!1){var C=x||d[0]||u[0];if(C&&C.playlist){var L="sortedPlaylistReps";return x&&(L="bandwidthBestRep"),d[0]&&(L="enabledPlaylistReps"),qs("choosing "+Np(C)+" using "+L+" with options",o),C.playlist}return qs("could not choose a playlist with options",o),null}var E=f.filter(function(D){return D.width&&D.height});ia(E,function(D,j){return D.width-j.width});var B=E.filter(function(D){return D.width===n&&D.height===e});m=B[B.length-1];var q=B.filter(function(D){return D.bandwidth===m.bandwidth})[0],z,U,F;q||(z=E.filter(function(D){return D.width>n||D.height>e}),U=z.filter(function(D){return D.width===z[0].width&&D.height===z[0].height}),m=U[U.length-1],F=U.filter(function(D){return D.bandwidth===m.bandwidth})[0]);var G;if(a.experimentalLeastPixelDiffSelector){var O=E.map(function(D){return D.pixelDiff=Math.abs(D.width-n)+Math.abs(D.height-e),D});ia(O,function(D,j){return D.pixelDiff===j.pixelDiff?j.bandwidth-D.bandwidth:D.pixelDiff-j.pixelDiff}),G=O[0]}var H=G||F||q||x||d[0]||u[0];if(H&&H.playlist){var A="sortedPlaylistReps";return G?A="leastPixelDiffRep":F?A="resolutionPlusOneRep":q?A="resolutionBestRep":x?A="bandwidthBestRep":d[0]&&(A="enabledPlaylistReps"),qs("cho
46osing "+Np(H)+" using "+A+" with options",o),H.playlist}return qs("could not choose a playlist with options",o),null}},Bp=function(){var r=this.useDevicePixelRatio&&K.devicePixelRatio||1;return a_(this.playlists.master,this.systemBandwidth,parseInt(po(this.tech_.el(),"width"),10)*r,parseInt(po(this.tech_.el(),"height"),10)*r,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)},GE=function(r){var i=-1,n=-1;if(r<0||r>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var e=this.useDevicePixelRatio&&K.devicePixelRatio||1;return i<0&&(i=this.systemBandwidth,n=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==n&&(i=r*this.systemBandwidth+(1-r)*i,n=this.systemBandwidth),a_(this.playlists.master,i,parseInt(po(this.tech_.el(),"width"),10)*e,parseInt(po(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions,this.masterPlaylistController_)}},WE=function(r){var i=r.master,n=r.currentTime,e=r.bandwidth,t=r.duration,a=r.segmentDuration,o=r.timeUntilRebuffer,l=r.currentTimeline,u=r.syncController,d=i.playlists.filter(function(L){return!Pr.isIncompatible(L)}),f=d.filter(Pr.isEnabled);f.length||(f=d.filter(function(L){return!Pr.isDisabled(L)}));var m=f.filter(Pr.hasAttribute.bind(null,"BANDWIDTH")),x=m.map(function(L){var E=u.getSyncPoint(L,t,l,n),B=E?1:2,q=Pr.estimateSegmentRequestTime(a,e,L),z=q*B-o;return{playlist:L,rebufferingImpact:z}}),C=x.filter(function(L){return L.rebufferingImpact<=0});return ia(C,function(L,E){return eh(E.playlist,L.playlist)}),C.length?C[0]:(ia(x,function(L,E){return L.rebufferingImpact-E.rebufferingImpact}),x[0]||null)},zE=function(){var r=this,i=this.playlists.master.playlists.filter(Pr.isEnabled);ia(i,function(e,t){return eh(e,t)});var n=i.filter(function(e){return!!Ga(r.playlists.master,e).video});return n[0]||null},$E=function(r){var i=0,n;return r.bytes&&(n=new Uint8Array(r.bytes),r.segments.forEach(function(e){n.set(e,i),i+=e.byteLength})),n},KE=function(r,i,n){if(!r[n]){i.trigger({type:"usage",name:"vhs-608"}),i.trigger({type:"usage",name:"hls-608"});var e=n;/^cc708_/.test(n)&&(e="SERVICE"+n.split("_")[1]);var t=i.textTracks().getTrackById(e);if(t)r[n]=t;else{var a=i.options_.vhs&&i.options_.vhs.captionServices||{},o=n,l=n,u=!1,d=a[e];d&&(o=d.label,l=d.language,u=d.default),r[n]=i.addRemoteTextTrack({kind:"captions",id:e,default:u,label:o,language:l},!1).track}}},XE=function(r){var i=r.inbandTextTracks,n=r.captionArray,e=r.timestampOffset;if(n){var t=K.WebKitDataCue||K.VTTCue;n.forEach(function(a){var o=a.stream;i[o].addCue(new t(a.startTime+e,a.endTime+e,a.text))})}},YE=function(r){Object.defineProperties(r.frame,{id:{get:function(){return ae.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),r.value.key}},value:{get:function(){return ae.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),r.value.data}},privateData:{get:function(){return ae.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),r.value.data}}})},QE=function(r){var i=r.inbandTextTracks,n=r.metadataArray,e=r.timestampOffset,t=r.videoDuration;if(n){var a=K.WebKitDataCue||K.VTTCue,o=i.metadataTrack_;if(o&&(n.forEach(function(x){var C=x.cueTime+e;typeof C!="number"||K.isNaN(C)||C<0||!(C<1/0)||x.frames.forEach(function(L){var E=new a(C,C,L.value||L.url||L.data||"");E.frame=L,E.value=L,YE(E),o.addCue(E)})}),!(!o.cues||!o.cues.length))){for(var l=o.cues,u=[],d=0;d<l.length;d++)l[d]&&u.push(l[d]);var f=u.reduce(function(x,C){var L=x[C.startTime]||[];return L.push(C),x[C.startTime]=L,x},{}),m=Object.keys(f).sort(function(x,C){return Number(x)-Number(C)});m.forEach(function(x,C){var L=f[x],E=Number(m[C+1])||t;L.forEach(function(B){B.endTime=E})})}}},JE=function(r,i,n){r.metadataTrack_||(r.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,r.metadataTrack_.inBandMetadataTrackDispatchType=i)},Ba=function(r,i,n){var e,t;if(n&&n.cues)for(e=n.cues.length;e--;)t=n.cues[e],t.startTime>=r&&t.endTime<=i&&n.removeCue(t)},ZE=function(r){var i=r.cues;if(i)for(var n=0;n<i.length;n++){for(var e=[],t=0,a=0;a<i.length;a++)i[n].startTime===i[a].startTime&&i[n].endTime===i[a].endTime&&i[n].text===i[a].text&&(t++,t>1&&e.push(i[a]));e.length&&e.forEach(function(o){return r.removeCue(o)})}},eC=function(r,i,n){if(typeof i>"u"||i===null||!r.length)return[];var e=Math.ceil((i-n+3)*Js.ONE_SECOND_IN_TS),t;for(t=0;t<r.length&&!(r[t].pts>e);t++);return r.slice(t)},tC=function(r,i,n){if(!i.length)return r;if(n)return i.slice();var e=i[0].pts,t=0;for(t;t<r.length&&!(r[t].pts>=e);t++);return r.slice(0,t).concat(i)},rC=function(r,i,n,e){for(var t=Math.ceil((i-e)*Js.ONE_SECOND_IN_TS),a=Math.ceil((n-e)*Js.ONE_SECOND_IN_TS),o=r.slice(),l=r.length;l--&&!(r[l].pts<=a););if(l===-1)return o;for(var u=l+1;u--&&!(r[u].pts<=t););return u=Math.max(u,0),o.splice(u,l-u+1),o},iC=function(r,i){if(!r&&!i||!r&&i||r&&!i)return!1;if(r===i)return!0;var n=Object.keys(r).sort(),e=Object.keys(i).sort();if(n.length!==e.length)return!1;for(var t=0;t<n.length;t++){var a=n[t];if(a!==e[t]||r[a]!==i[a])return!1}return!0},s_=22,nC=function(r,i,n){i=i||[];for(var e=[],t=0,a=0;a<i.length;a++){var o=i[a];if(r===o.timeline&&(e.push(a),t+=o.duration,t>n))return a}return e.length===0?0:e[e.length-1]},Ma=1,aC=500,Up=function(r){return typeof r=="number"&&isFinite(r)},Vs=1/60,sC=function(r,i,n){return r!=="main"||!i||!n?null:!n.hasAudio&&!n.hasVideo?"Neither audio nor video foun
46d in segment.":i.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!i.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null},oC=function(r,i,n){var e=i-Qt.BACK_BUFFER_LENGTH;r.length&&(e=Math.max(e,r.start(0)));var t=i-n;return Math.min(t,e)},Xn=function(r){var i=r.startOfSegment,n=r.duration,e=r.segment,t=r.part,a=r.playlist,o=a.mediaSequence,l=a.id,u=a.segments,d=u===void 0?[]:u,f=r.mediaIndex,m=r.partIndex,x=r.timeline,C=d.length-1,L="mediaIndex/partIndex increment";r.getMediaInfoForTime?L="getMediaInfoForTime ("+r.getMediaInfoForTime+")":r.isSyncRequest&&(L="getSyncSegmentCandidate (isSyncRequest)"),r.independent&&(L+=" with independent "+r.independent);var E=typeof m=="number",B=r.segment.uri?"segment":"pre-segment",q=E?ky({preloadSegment:e})-1:0;return B+" ["+(o+f)+"/"+(o+C)+"]"+(E?" part ["+m+"/"+q+"]":"")+(" segment start/end ["+e.start+" => "+e.end+"]")+(E?" part start/end ["+t.start+" => "+t.end+"]":"")+(" startOfSegment ["+i+"]")+(" duration ["+n+"]")+(" timeline ["+x+"]")+(" selected by ["+L+"]")+(" playlist ["+l+"]")},qp=function(r){return r+"TimingInfo"},uC=function(r){var i=r.segmentTimeline,n=r.currentTimeline,e=r.startOfSegment,t=r.buffered,a=r.overrideCheck;return!a&&i===n?null:i<n?e:t.length?t.end(t.length-1):e},Vp=function(r){var i=r.timelineChangeController,n=r.currentTimeline,e=r.segmentTimeline,t=r.loaderType,a=r.audioDisabled;if(n===e)return!1;if(t==="audio"){var o=i.lastTimelineChange({type:"main"});return!o||o.to!==e}if(t==="main"&&a){var l=i.pendingTimelineChange({type:"audio"});return!(l&&l.to===e)}return!1},lC=function(r){var i=0;return["video","audio"].forEach(function(n){var e=r[n+"TimingInfo"];if(e){var t=e.start,a=e.end,o;typeof t=="bigint"||typeof a=="bigint"?o=K.BigInt(a)-K.BigInt(t):typeof t=="number"&&typeof a=="number"&&(o=a-t),typeof o<"u"&&o>i&&(i=o)}}),typeof i=="bigint"&&i<Number.MAX_SAFE_INTEGER&&(i=Number(i)),i},Hp=function(r){var i=r.segmentDuration,n=r.maxDuration;return i?Math.round(i)>n+fn:!1},cC=function(r,i){if(i!=="hls")return null;var n=lC({audioTimingInfo:r.audioTimingInfo,videoTimingInfo:r.videoTimingInfo});if(!n)return null;var e=r.playlist.targetDuration,t=Hp({segmentDuration:n,maxDuration:e*2}),a=Hp({segmentDuration:n,maxDuration:e}),o="Segment with index "+r.mediaIndex+" "+("from playlist "+r.playlist.id+" ")+("has a duration of "+n+" ")+("when the reported duration is "+r.duration+" ")+("and the target duration is "+e+". ")+"For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return t||a?{severity:t?"warn":"info",message:o}:null},rf=(function(s){Ee(r,s);function r(n,e){var t;if(t=s.call(this)||this,!n)throw new TypeError("Initialization settings are required");if(typeof n.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!n.mediaSource)throw new TypeError("No MediaSource specified");return t.bandwidth=n.bandwidth,t.throughput={rate:0,count:0},t.roundTrip=NaN,t.resetStats_(),t.mediaIndex=null,t.partIndex=null,t.hasPlayed_=n.hasPlayed,t.currentTime_=n.currentTime,t.seekable_=n.seekable,t.seeking_=n.seeking,t.duration_=n.duration,t.mediaSource_=n.mediaSource,t.vhs_=n.vhs,t.loaderType_=n.loaderType,t.currentMediaInfo_=void 0,t.startingMediaInfo_=void 0,t.segmentMetadataTrack_=n.segmentMetadataTrack,t.goalBufferLength_=n.goalBufferLength,t.sourceType_=n.sourceType,t.sourceUpdater_=n.sourceUpdater,t.inbandTextTracks_=n.inbandTextTracks,t.state_="INIT",t.timelineChangeController_=n.timelineChangeController,t.shouldSaveSegmentTimingInfo_=!0,t.parse708captions_=n.parse708captions,t.useDtsForTimestampOffset_=n.useDtsForTimestampOffset,t.captionServices_=n.captionServices,t.experimentalExactManifestTimings=n.experimentalExactManifestTimings,t.checkBufferTimeout_=null,t.error_=void 0,t.currentTimeline_=-1,t.pendingSegment_=null,t.xhrOptions_=null,t.pendingSegments_=[],t.audioDisabled_=!1,t.isPendingTimestampOffset_=!1,t.gopBuffer_=[],t.timeMapping_=0,t.safeAppend_=ae.browser.IE_VERSION>=11,t.appendInitSegment_={audio:!0,video:!0},t.playlistOfLastInitSegment_={audio:null,video:null},t.callQueue_=[],t.loadQueue_=[],t.metadataQueue_={id3:[],caption:[]},t.waitingOnRemove_=!1,t.quotaExceededErrorRetryTimeout_=null,t.activeInitSegmentId_=null,t.initSegments_={},t.cacheEncryptionKeys_=n.cacheEncryptionKeys,t.keyCache_={},t.decrypter_=n.decrypter,t.syncController_=n.syncController,t.syncPoint_={segmentIndex:0,time:0},t.transmuxer_=t.createTransmuxer_(),t.triggerSyncInfoUpdate_=function(){return t.trigger("syncinfoupdate")},t.syncController_.on("syncinfoupdate",t.triggerSyncInfoUpdate_),t.mediaSource_.addEventListener("sourceopen",function(){t.isEndOfStream_
46()||(t.ended_=!1)}),t.fetchAtBuffer_=!1,t.logger_=oi("SegmentLoader["+t.loaderType_+"]"),Object.defineProperty(Ge(t),"state",{get:function(){return this.state_},set:function(o){o!==this.state_&&(this.logger_(this.state_+" -> "+o),this.state_=o,this.trigger("statechange"))}}),t.sourceUpdater_.on("ready",function(){t.hasEnoughInfoToAppend_()&&t.processCallQueue_()}),t.loaderType_==="main"&&t.timelineChangeController_.on("pendingtimelinechange",function(){t.hasEnoughInfoToAppend_()&&t.processCallQueue_()}),t.loaderType_==="audio"&&t.timelineChangeController_.on("timelinechange",function(){t.hasEnoughInfoToLoad_()&&t.processLoadQueue_(),t.hasEnoughInfoToAppend_()&&t.processCallQueue_()}),t}var i=r.prototype;return i.createTransmuxer_=function(){return zu.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})},i.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0},i.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&K.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},i.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},i.abort=function(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()},i.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,K.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},i.checkForAbort_=function(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e},i.error=function(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},i.endOfStream=function(){this.ended_=!0,this.transmuxer_&&zu.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},i.buffered_=function(){var e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return ae.createTimeRanges();if(this.loaderType_==="main"){var t=e.hasAudio,a=e.hasVideo,o=e.isMuxed;if(a&&t&&!this.audioDisabled_&&!o)return this.sourceUpdater_.buffered();if(a)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},i.initSegmentForMap=function(e,t){if(t===void 0&&(t=!1),!e)return null;var a=co(e),o=this.initSegments_[a];return t&&!o&&e.bytes&&(this.initSegments_[a]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),o||e},i.segmentKey=function(e,t){if(t===void 0&&(t=!1),!e)return null;var a=jy(e),o=this.keyCache_[a];this.cacheEncryptionKeys_&&t&&!o&&e.bytes&&(this.keyCache_[a]=o={resolvedUri:e.resolvedUri,bytes:e.bytes});var l={resolvedUri:(o||e).resolvedUri};return o&&(l.bytes=o.bytes),l},i.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},i.load=function(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}},i.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},i.playlist=function(e,t){if(t===void 0&&(t={}),!!e){var a=this.playlist_,o=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));var l=null;if(a&&(a.id?l=a.id:a.uri&&(l=a.uri)),this.logger_("playlist update ["+l+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!a||a.uri!==e.uri){this.mediaIndex!==null&&(e.endList?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}var u=e.mediaSequence-a.mediaSequence;if(this.logger_("live window shift ["+u+"]"),this.mediaIndex!==null)if(this.mediaIndex-=u,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{var d=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!d.parts||!d.parts.length||!d.parts[this.partIndex])){var f=this.mediaIndex;this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=f}}o&&(o.mediaIndex-=u,o.mediaIndex<0?(o.mediaIndex=null,o.partIndex=null):(o.mediaIndex>=0&&(o.segment=e.segments[o.mediaIndex]),o.partIndex>=0&&o.segment.parts&&(o.part=o.segment.parts[o.partIndex]))),this.syncController_.saveExpiredSegmentInfo(a,e)}},i.pause=function(){this.checkBufferTimeout_&&(K.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},i.paused=function(){return this.checkBufferTimeout_===null},i.resetEverything=function(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))},i.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},i.resyncLoader=function(){this.transmuxer_&&zu.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},i.remove=function(e,t,a,o){if(a===void 0&&(a=function(){}),o===void 0&&(o=!1),t===1/0&&(t=this.duration_()),t<=e){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}var l=1,u=function(){l--,l===0&&a()};(o||!this.audioDisabled_)&&(l++,this.sourceUpdater_.removeAudio(e,t,u)),(o||this.loaderType_==="main")&&(this.gopBuffer_=rC(this.gopBuffer_,e,t,this.timeMapping_),l++,this.sourceUpdater_.removeVideo(e,t,u));for(var d in this.inbandTextTracks_)Ba(e,t,this.inbandTextTracks_[d]);Ba(e,t,this.segmentMetadataTrack_),u()},i.monitorBuffer_=function(){this.checkBufferTimeout_&&K.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=K.setTimeout(this.monitorBufferTick_.bind(this),1)},i.monitorBufferTick_=function(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&K.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=K.setTimeout(this.monitorBufferTick_.bind(this),aC)},i.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var e=this.chooseNextRequest_();e&&(typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e))}},i.isEndOfStream_=function(e,t,a){if(e===void 0&&(e=this.mediaIndex),t===void 0&&(t=this.playlist_),a===void 0&&(a=this.partIndex),!t||!this.mediaSource_)return!1;var o=typeof e=="number"&&t.segments[e],l=e+1===t.segments.length,u=!o||!o.parts||a+1===o.parts.length;return t.endList&&this.mediaSource_.readyState==="open"&&l&&u},i.chooseNextRequest_=function(){var e=this.buffered_(),t=Dp(e)||0,a=Kf(e,this.currentTime_()),o=!this.hasPlayed_()&&a>=1,l=a>=this.goalBufferLength_(),u=this.playlist_.segments;if(!u.length||o||l)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_());var d={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(d.isSyncRequest)d.mediaIndex=nC(this.currentTimeline_,u,t);else if(this.mediaIndex!==null){var f=u[this.mediaIndex],m=typeof this.partIndex=="number"?this.partIndex:-1;d.startOfSegment=f.end?f.end:t,f.parts&&f.parts[m+1]?(d.mediaIndex=this.mediaIndex,d.partIndex=m+1):d.mediaIndex=this.mediaIndex+1}else{var x=Pr.getMediaInfoForTime({experimentalExactManifestTimings:this.experimentalExactManifestTimings,playlist:this.playlist_,currentTime:this.fetchAtBuffer_?t:this.currentTime_(),startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),C=x.segmentIndex,L=x.startTime,E=x.partIndex;d.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+t:"currentTime "+this.currentTime_(),d.mediaIndex=C,d.startOfSegment=L,d.partIndex=E}var B=u[d.mediaIndex],q=B&&typeof d.partIndex=="number"&&B.parts&&B.parts[d.partIndex];if(!B||typeof d.partIndex=="number"&&!q)return null;if(typeof d.partIndex!="number"&&B.parts&&(d.partIndex=0,q=B.parts[0]),!a&&q&&!q.independent)if(d.partIndex===0){var z=u[d.mediaIndex-1],U=z.parts&&z.parts.length&&z.parts[z.parts.length-1];U&&U.independent&&(d.mediaIndex-=1,d.partIndex=z.parts.length-1,d.independent="previous segment")}else B.parts[d.partIndex-1].independent&&(d.partIndex-=1,d.independent="previous part");var F=this.mediaSource_&&this.mediaSource_.readyState==="ended";return d.mediaIndex>=u.length-1&&F&&!this.seeking_()?null:this.generateSegmentInfo_(d)},i.generateSegmentInfo_=function(e){var t=e.independent,a=e.playlist,o=e.mediaIndex,l=e.startOfSegment,u=e.isSyncRequest,d=e.partIndex,f=e.forceTimestampOffset,m=e.getMediaInfoForTime,x=a.segments[o],C=typeof d=="number"&&x.parts[d],L={requestId:"segment-loader-"+Math.random(),uri:C&&C.resolvedUri||x.resolvedUri,mediaIndex:o,partIndex:C?d:null,isSyncRequest:u,startOfSegment:l,playlist:a,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:x.timeline,duration:C&&C.duration||x.duration,segment:x,part:C,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:m,independent:t},E=typeof f<"u"?f:this.isPendingTimestampOffset_;L.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:x.timeline,currentTimeline:this.currentTimeline_,startOfSegment:l,buffered:this.buffered_(),overrideCheck:E});
46var B=Dp(this.sourceUpdater_.audioBuffered());return typeof B=="number"&&(L.audioAppendStart=B-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(L.gopsToAlignWith=eC(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),L},i.timestampOffsetForSegment_=function(e){return uC(e)},i.earlyAbortWhenNeeded_=function(e){if(!(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t=this.currentTime_(),a=e.bandwidth,o=this.pendingSegment_.duration,l=Pr.estimateSegmentRequestTime(o,a,this.playlist_,e.bytesReceived),u=I2(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(!(l<=u)){var d=WE({master:this.vhs_.playlists.master,currentTime:t,bandwidth:a,duration:this.duration_(),segmentDuration:o,timeUntilRebuffer:u,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(d){var f=l-u,m=f-d.rebufferingImpact,x=.5;u<=fn&&(x=1),!(!d.playlist||d.playlist.uri===this.playlist_.uri||m<x)&&(this.bandwidth=d.playlist.attributes.BANDWIDTH*Qt.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}}}},i.handleAbort_=function(e){this.logger_("Aborting "+Xn(e)),this.mediaRequestsAborted+=1},i.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId)&&this.trigger("progress")},i.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)&&(this.checkForIllegalMediaSwitch(t)||(t=t||{},iC(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),!this.checkForAbort_(e.requestId)&&(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_())))},i.handleTimingInfo_=function(e,t,a,o){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var l=this.pendingSegment_,u=qp(t);l[u]=l[u]||{},l[u][a]=o,this.logger_("timinginfo: "+t+" - "+a+" - "+o),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},i.handleCaptions_=function(e,t){var a=this;if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){if(t.length===0){this.logger_("SegmentLoader received no captions from a caption event");return}var o=this.pendingSegment_;if(!o.hasAppendedData_){this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));return}var l=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),u={};t.forEach(function(d){u[d.stream]=u[d.stream]||{startTime:1/0,captions:[],endTime:0};var f=u[d.stream];f.startTime=Math.min(f.startTime,d.startTime+l),f.endTime=Math.max(f.endTime,d.endTime+l),f.captions.push(d)}),Object.keys(u).forEach(function(d){var f=u[d],m=f.startTime,x=f.endTime,C=f.captions,L=a.inbandTextTracks_;a.logger_("adding cues from "+m+" -> "+x+" for "+d),KE(L,a.vhs_.tech_,d),Ba(m,x,L[d]),XE({captionArray:C,inbandTextTracks:L,timestampOffset:l})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}},i.handleId3_=function(e,t,a){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var o=this.pendingSegment_;if(!o.hasAppendedData_){this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,a));return}var l=this.sourceUpdater_.videoTimestampOffset()===null?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();JE(this.inbandTextTracks_,a,this.vhs_.tech_),QE({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:l,videoDuration:this.duration_()})}},i.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(e){return e()}),this.metadataQueue_.caption.forEach(function(e){return e()}),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},i.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach(function(t){return t()})},i.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach(function(t){return t()})},i.hasEnoughInfoToLoad_=function(){if(this.loaderType_!=="audio")return!0;var e=this.pendingSegment_;return e?this.getCurrentMediaInfo_()?!Vp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}):!0:!1},i.getCurrentMediaInfo_=function(e){return e===void 0&&(e=this.pendingSegment_),e&&e.trackInfo||this.currentMediaInfo_},i.getMediaInfo_=function(e){return e===void 0&&(e=this.pendingSegment_),this.getCurrentMediaInfo_(e)||this.startingMediaInfo_},i.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null},i.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;var a=t.hasAudio,o=t.hasVideo,l=t.isMuxed;return!(o&&!e.videoTimingInfo||a&&!this.audioDisabled_&&!l&&!e.audioTimingInfo||Vp({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},i.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){if(this.callQueue_.length||!this.hasEnoughInfoToAppend_()){this.callQueue_.push(this.handleData_.bind(this,e,t));return}var a=this.pendingSegment_;if(this.setTimeMapping_(a.timeline),this.updateMediaSecondsLoaded_(a.part||a.segment),this.mediaSource_.readyState!=="closed"){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),a.segment.map=e.map),e.key&&this.segmentKey(e.ke
46y,!0),a.isFmp4=e.isFmp4,a.timingInfo=a.timingInfo||{},a.isFmp4)this.trigger("fmp4"),a.timingInfo.start=a[qp(t.type)].start;else{var o=this.getCurrentMediaInfo_(),l=this.loaderType_==="main"&&o&&o.hasVideo,u;l&&(u=a.videoTimingInfo.start),a.timingInfo.start=this.trueSegmentStart_({currentStart:a.timingInfo.start,playlist:a.playlist,mediaIndex:a.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:l,firstVideoFrameTimeForData:u,videoTimingInfo:a.videoTimingInfo,audioTimingInfo:a.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(a,t.type),this.updateSourceBufferTimestampOffset_(a),a.isSyncRequest){this.updateTimingInfoEnd_(a),this.syncController_.saveSegmentTimingInfo({segmentInfo:a,shouldSaveTimelineMapping:this.loaderType_==="main"});var d=this.chooseNextRequest_();if(d.mediaIndex!==a.mediaIndex||d.partIndex!==a.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}a.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(a,t)}}},i.updateAppendInitSegmentStatus=function(e,t){this.loaderType_==="main"&&typeof e.timestampOffset=="number"&&!e.changedTimestampOffset&&(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},i.getInitSegmentAndUpdateState_=function(e){var t=e.type,a=e.initSegment,o=e.map,l=e.playlist;if(o){var u=co(o);if(this.activeInitSegmentId_===u)return null;a=this.initSegmentForMap(o,!0).bytes,this.activeInitSegmentId_=u}return a&&this.appendInitSegment_[t]?(this.playlistOfLastInitSegment_[t]=l,this.appendInitSegment_[t]=!1,this.activeInitSegmentId_=null,a):null},i.handleQuotaExceededError_=function(e,t){var a=this,o=e.segmentInfo,l=e.type,u=e.bytes,d=this.sourceUpdater_.audioBuffered(),f=this.sourceUpdater_.videoBuffered();d.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+kn(d).join(", ")),f.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+kn(f).join(", "));var m=d.length?d.start(0):0,x=d.length?d.end(d.length-1):0,C=f.length?f.start(0):0,L=f.length?f.end(f.length-1):0;if(x-m<=Ma&&L-C<=Ma){this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. "+("Appended byte length: "+u.byteLength+", ")+("audio buffer: "+kn(d).join(", ")+", ")+("video buffer: "+kn(f).join(", ")+", ")),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),this.trigger("error");return}this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:o,type:l,bytes:u}));var E=this.currentTime_(),B=E-Ma;this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+B),this.remove(0,B,function(){a.logger_("On QUOTA_EXCEEDED_ERR, retrying append in "+Ma+"s"),a.waitingOnRemove_=!1,a.quotaExceededErrorRetryTimeout_=K.setTimeout(function(){a.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),a.quotaExceededErrorRetryTimeout_=null,a.processCallQueue_()},Ma*1e3)},!0)},i.handleAppendError_=function(e,t){var a=e.segmentInfo,o=e.type,l=e.bytes;if(t){if(t.code===s_){this.handleQuotaExceededError_({segmentInfo:a,type:o,bytes:l});return}this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(o+" append of "+l.length+"b failed for segment "+("#"+a.mediaIndex+" in playlist "+a.playlist.id)),this.trigger("appenderror")}},i.appendToSourceBuffer_=function(e){var t=e.segmentInfo,a=e.type,o=e.initSegment,l=e.data,u=e.bytes;if(!u){var d=[l],f=l.byteLength;o&&(d.unshift(o),f+=o.byteLength),u=$E({bytes:f,segments:d})}this.sourceUpdater_.appendBuffer({segmentInfo:t,type:a,bytes:u},this.handleAppendError_.bind(this,{segmentInfo:t,type:a,bytes:u}))},i.handleSegmentTimingInfo_=function(e,t,a){if(!(!this.pendingSegment_||t!==this.pendingSegment_.requestId)){var o=this.pendingSegment_.segment,l=e+"TimingInfo";o[l]||(o[l]={}),o[l].transmuxerPrependedSeconds=a.prependedContentDuration||0,o[l].transmuxedPresentationStart=a.start.presentation,o[l].transmuxedDecodeStart=a.start.decode,o[l].transmuxedPresentationEnd=a.end.presentation,o[l].transmuxedDecodeEnd=a.end.decode,o[l].baseMediaDecodeTime=a.baseMediaDecodeTime}},i.appendData_=function(e,t){var a=t.type,o=t.data;if(!(!o||!o.byteLength)&&!(a==="audio"&&this.audioDisabled_)){var l=this.getInitSegmentAndUpdateState_({type:a,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:a,initSegment:l,data:o})}},i.loadSegment_=function(e){var t=this;if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),typeof e.timestampOffset=="number"&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_()){this.loadQueue_.push(function(){var a=ai({},e,{forceTimestampOffset:!0});ai(e,t.generateSegmentInfo_(a)),t.isPendingTimestampOffset_=!1,t.updateTransmuxerAndRequestSegment_(e)});return}this.updateTransmuxerAndRequestSegment_(e)},i.updateTransmuxerAndRequestSegment_=function(e){var t=this;this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));
46var a=this.createSimplifiedSegmentObj_(e),o=this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex),l=this.mediaIndex!==null,u=e.timeline!==this.currentTimeline_&&e.timeline>0,d=o||l&&u;this.logger_("Requesting "+Xn(e)),a.map&&!a.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=UE({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:a,abortFn:this.handleAbort_.bind(this,e),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:d,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(m){var x=m.message,C=m.level,L=m.stream;t.logger_(Xn(e)+" logged from transmuxer stream "+L+" as a "+C+": "+x)}})},i.trimBackBuffer_=function(e){var t=oC(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)},i.createSimplifiedSegmentObj_=function(e){var t=e.segment,a=e.part,o={resolvedUri:a?a.resolvedUri:t.resolvedUri,byterange:a?a.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part},l=e.playlist.segments[e.mediaIndex-1];if(l&&l.timeline===t.timeline&&(l.videoTimingInfo?o.baseStartTime=l.videoTimingInfo.transmuxedDecodeEnd:l.audioTimingInfo&&(o.baseStartTime=l.audioTimingInfo.transmuxedDecodeEnd)),t.key){var u=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);o.key=this.segmentKey(t.key),o.key.iv=u}return t.map&&(o.map=this.initSegmentForMap(t.map)),o},i.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},i.saveBandwidthRelatedStats_=function(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<Vs){this.logger_("Ignoring segment's bandwidth because its duration of "+e+(" is less than the min to record "+Vs));return}this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime},i.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")},i.segmentRequestFinished_=function(e,t,a){if(this.callQueue_.length){this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,a));return}if(this.saveTransferStats_(t.stats),!!this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===bi.ABORTED)return;if(this.pause(),e.code===bi.TIMEOUT){this.handleTimeout_();return}this.mediaRequestsErrored+=1,this.error(e),this.trigger("error");return}var o=this.pendingSegment_;this.saveBandwidthRelatedStats_(o.duration,t.stats),o.endOfAllRequests=t.endOfAllRequests,a.gopInfo&&(this.gopBuffer_=tC(this.gopBuffer_,a.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(o)}},i.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);t!==null&&(this.timeMapping_=t)},i.updateMediaSecondsLoaded_=function(e){typeof e.start=="number"&&typeof e.end=="number"?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},i.shouldUpdateTransmuxerTimestampOffset_=function(e){return e===null?!1:this.loaderType_==="main"&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset()},i.trueSegmentStart_=function(e){var t=e.currentStart,a=e.playlist,o=e.mediaIndex,l=e.firstVideoFrameTimeForData,u=e.currentVideoTimestampOffset,d=e.useVideoTimingInfo,f=e.videoTimingInfo,m=e.audioTimingInfo;if(typeof t<"u")return t;if(!d)return m.start;var x=a.segments[o-1];return o===0||!x||typeof x.start>"u"||x.end!==l+u?l:f.start},i.waitForAppendsToComplete_=function(e){var t=this.getCurrentMediaInfo_(e);if(!t){this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),this.trigger("error");return}var a=t.hasAudio,o=t.hasVideo,l=t.isMuxed,u=this.loaderType_==="main"&&o,d=!this.audioDisabled_&&a&&!l;if(e.waitingOnAppends=0,!e.hasAppendedData_){!e.timingInfo&&typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),this.checkAppendsDone_(e);return}u&&e.waitingOnAppends++,d&&e.waitingOnAppends++,u&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),d&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},i.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||
46(e.waitingOnAppends--,e.waitingOnAppends===0&&this.handleAppendsDone_())},i.checkForIllegalMediaSwitch=function(e){var t=sC(this.loaderType_,this.getCurrentMediaInfo_(),e);return t?(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0):!1},i.updateSourceBufferTimestampOffset_=function(e){if(!(e.timestampOffset===null||typeof e.timingInfo.start!="number"||e.changedTimestampOffset||this.loaderType_!=="main")){var t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},i.getSegmentStartTimeForTimestampOffsetCalculation_=function(e){var t=e.videoTimingInfo,a=e.audioTimingInfo,o=e.timingInfo;return this.useDtsForTimestampOffset_?t&&typeof t.transmuxedDecodeStart=="number"?t.transmuxedDecodeStart:a&&typeof a.transmuxedDecodeStart=="number"?a.transmuxedDecodeStart:o.start:o.start},i.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t=this.getMediaInfo_(),a=this.loaderType_==="main"&&t&&t.hasVideo,o=a&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;o&&(e.timingInfo.end=typeof o.end=="number"?o.end:o.start+e.duration)},i.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_){this.state="READY",this.paused()||this.monitorBuffer_();return}var e=this.pendingSegment_;this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:this.loaderType_==="main"});var t=cC(e,this.sourceType_);if(t&&(t.severity==="warn"?ae.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_)){this.logger_("Throwing away un-appended sync request "+Xn(e));return}this.logger_("Appended "+Xn(e)),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loaderType_==="main"&&!this.audioDisabled_&&this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");var a=e.segment,o=e.part,l=a.end&&this.currentTime_()-a.end>e.playlist.targetDuration*3,u=o&&o.end&&this.currentTime_()-o.end>e.playlist.partTargetDuration*3;if(l||u){this.logger_("bad "+(l?"segment":"part")+" "+Xn(e)),this.resetEverything();return}var d=this.mediaIndex!==null;d&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()},i.recordThroughput_=function(e){if(e.duration<Vs){this.logger_("Ignoring segment's throughput because its duration of "+e.duration+(" is less than the min to record "+Vs));return}var t=this.throughput.rate,a=Date.now()-e.endOfAllRequests+1,o=Math.floor(e.byteLength/a*8*1e3);this.throughput.rate+=(o-t)/++this.throughput.count},i.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,a=t.start,o=t.end;if(!(!Up(a)||!Up(o))){Ba(a,o,this.segmentMetadataTrack_);var l=K.WebKitDataCue||K.VTTCue,u={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:a,end:o},d=JSON.stringify(u),f=new l(a,o,d);f.value=u,this.segmentMetadataTrack_.addCue(f)}}},r})(ae.EventTarget);function Fi(){}var o_=function(r){return typeof r!="string"?r:r.replace(/./,function(i){return i.toUpperCase()})},dC=["video","audio"],nf=function(r,i){var n=i[r+"Buffer"];return n&&n.updating||i.queuePending[r]},fC=function(r,i){for(var n=0;n<i.length;n++){var e=i[n];if(e.type==="mediaSource")return null;if(e.type===r)return n}return null},th=function s(r,i){if(i.queue.length!==0){var n=0,e=i.queue[n];if(e.type==="mediaSource"){!i.updating()&&i.mediaSource.readyState!=="closed"&&(i.queue.shift(),e.action(i),e.doneFn&&e.doneFn(),s("audio",i),s("video",i));return}if(r!=="mediaSource"&&!(!i.ready()||i.mediaSource.readyState==="closed"||nf(r,i))){if(e.type!==r){if(n=fC(r,i.queue),n===null)return;e=i.queue[n]}if(i.queue.splice(n,1),i.queuePending[r]=e,e.action(r,i),!e.doneFn){i.queuePending[r]=null,s(r,i);return}}}},u_=function(r,i){var n=i[r+"Buffer"],e=o_(r);
46n&&(n.removeEventListener("updateend",i["on"+e+"UpdateEnd_"]),n.removeEventListener("error",i["on"+e+"Error_"]),i.codecs[r]=null,i[r+"Buffer"]=null)},mi=function(r,i){return r&&i&&Array.prototype.indexOf.call(r.sourceBuffers,i)!==-1},Fr={appendBuffer:function(r,i,n){return function(e,t){var a=t[e+"Buffer"];if(mi(t.mediaSource,a)){t.logger_("Appending segment "+i.mediaIndex+"'s "+r.length+" bytes to "+e+"Buffer");try{a.appendBuffer(r)}catch(o){t.logger_("Error with code "+o.code+" "+(o.code===s_?"(QUOTA_EXCEEDED_ERR) ":"")+("when appending segment "+i.mediaIndex+" to "+e+"Buffer")),t.queuePending[e]=null,n(o)}}}},remove:function(r,i){return function(n,e){var t=e[n+"Buffer"];if(mi(e.mediaSource,t)){e.logger_("Removing "+r+" to "+i+" from "+n+"Buffer");try{t.remove(r,i)}catch{e.logger_("Remove "+r+" to "+i+" from "+n+"Buffer failed")}}}},timestampOffset:function(r){return function(i,n){var e=n[i+"Buffer"];mi(n.mediaSource,e)&&(n.logger_("Setting "+i+"timestampOffset to "+r),e.timestampOffset=r)}},callback:function(r){return function(i,n){r()}},endOfStream:function(r){return function(i){if(i.mediaSource.readyState==="open"){i.logger_("Calling mediaSource endOfStream("+(r||"")+")");try{i.mediaSource.endOfStream(r)}catch(n){ae.log.warn("Failed to call media source endOfStream",n)}}}},duration:function(r){return function(i){i.logger_("Setting mediaSource duration to "+r);try{i.mediaSource.duration=r}catch(n){ae.log.warn("Failed to set media source duration",n)}}},abort:function(){return function(r,i){if(i.mediaSource.readyState==="open"){var n=i[r+"Buffer"];if(mi(i.mediaSource,n)){i.logger_("calling abort on "+r+"Buffer");try{n.abort()}catch(e){ae.log.warn("Failed to abort on "+r+"Buffer",e)}}}}},addSourceBuffer:function(r,i){return function(n){var e=o_(r),t=$a(i);n.logger_("Adding "+r+"Buffer with codec "+i+" to mediaSource");var a=n.mediaSource.addSourceBuffer(t);a.addEventListener("updateend",n["on"+e+"UpdateEnd_"]),a.addEventListener("error",n["on"+e+"Error_"]),n.codecs[r]=i,n[r+"Buffer"]=a}},removeSourceBuffer:function(r){return function(i){var n=i[r+"Buffer"];if(u_(r,i),!!mi(i.mediaSource,n)){i.logger_("Removing "+r+"Buffer with codec "+i.codecs[r]+" from mediaSource");try{i.mediaSource.removeSourceBuffer(n)}catch(e){ae.log.warn("Failed to removeSourceBuffer "+r+"Buffer",e)}}}},changeType:function(r){return function(i,n){var e=n[i+"Buffer"],t=$a(r);if(mi(n.mediaSource,e)&&n.codecs[i]!==r){n.logger_("changing "+i+"Buffer codec from "+n.codecs[i]+" to "+r);try{e.changeType(t),n.codecs[i]=r}catch(a){ae.log.warn("Failed to changeType on "+i+"Buffer",a)}}}}},Nr=function(r){var i=r.type,n=r.sourceUpdater,e=r.action,t=r.doneFn,a=r.name;n.queue.push({type:i,action:e,doneFn:t,name:a}),th(i,n)},jp=function(r,i){return function(n){if(i.queuePending[r]){var e=i.queuePending[r].doneFn;i.queuePending[r]=null,e&&e(i[r+"Error_"])}th(r,i)}},l_=(function(s){Ee(r,s);function r(n){var e;return e=s.call(this)||this,e.mediaSource=n,e.sourceopenListener_=function(){return th("mediaSource",Ge(e))},e.mediaSource.addEventListener("sourceopen",e.sourceopenListener_),e.logger_=oi("SourceUpdater"),e.audioTimestampOffset_=0,e.videoTimestampOffset_=0,e.queue=[],e.queuePending={audio:null,video:null},e.delayedAudioAppendQueue_=[],e.videoAppendQueued_=!1,e.codecs={},e.onVideoUpdateEnd_=jp("video",Ge(e)),e.onAudioUpdateEnd_=jp("audio",Ge(e)),e.onVideoError_=function(t){e.videoError_=t},e.onAudioError_=function(t){e.audioError_=t},e.createdSourceBuffers_=!1,e.initializedEme_=!1,e.triggeredReady_=!1,e}var i=r.prototype;return i.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},i.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},i.hasInitializedAnyEme=function(){return this.initializedEme_},i.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},i.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}
46,i.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},i.addSourceBuffer=function(e,t){Nr({type:"mediaSource",sourceUpdater:this,action:Fr.addSourceBuffer(e,t),name:"addSourceBuffer"})},i.abort=function(e){Nr({type:e,sourceUpdater:this,action:Fr.abort(e),name:"abort"})},i.removeSourceBuffer=function(e){if(!this.canRemoveSourceBuffer()){ae.log.error("removeSourceBuffer is not supported!");return}Nr({type:"mediaSource",sourceUpdater:this,action:Fr.removeSourceBuffer(e),name:"removeSourceBuffer"})},i.canRemoveSourceBuffer=function(){return!ae.browser.IE_VERSION&&!ae.browser.IS_FIREFOX&&K.MediaSource&&K.MediaSource.prototype&&typeof K.MediaSource.prototype.removeSourceBuffer=="function"},r.canChangeType=function(){return K.SourceBuffer&&K.SourceBuffer.prototype&&typeof K.SourceBuffer.prototype.changeType=="function"},i.canChangeType=function(){return this.constructor.canChangeType()},i.changeType=function(e,t){if(!this.canChangeType()){ae.log.error("changeType is not supported!");return}Nr({type:e,sourceUpdater:this,action:Fr.changeType(t),name:"changeType"})},i.addOrChangeSourceBuffers=function(e){var t=this;if(!e||typeof e!="object"||Object.keys(e).length===0)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(function(a){var o=e[a];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(a,o);t.canChangeType()&&t.changeType(a,o)})},i.appendBuffer=function(e,t){var a=this,o=e.segmentInfo,l=e.type,u=e.bytes;if(this.processedAppend_=!0,l==="audio"&&this.videoBuffer&&!this.videoAppendQueued_){this.delayedAudioAppendQueue_.push([e,t]),this.logger_("delayed audio append of "+u.length+" until video append");return}var d=t;if(Nr({type:l,sourceUpdater:this,action:Fr.appendBuffer(u,o||{mediaIndex:-1},d),doneFn:t,name:"appendBuffer"}),l==="video"){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;var f=this.delayedAudioAppendQueue_.slice();this.logger_("queuing delayed audio "+f.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,f.forEach(function(m){a.appendBuffer.apply(a,m)})}},i.audioBuffered=function(){return mi(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:ae.createTimeRange()},i.videoBuffered=function(){return mi(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:ae.createTimeRange()},i.buffered=function(){var e=mi(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=mi(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():P2(this.audioBuffered(),this.videoBuffered())},i.setDuration=function(e,t){t===void 0&&(t=Fi),Nr({type:"mediaSource",sourceUpdater:this,action:Fr.duration(e),name:"duration",doneFn:t})},i.endOfStream=function(e,t){e===void 0&&(e=null),t===void 0&&(t=Fi),typeof e!="string"&&(e=void 0),Nr({type:"mediaSource",sourceUpdater:this,action:Fr.endOfStream(e),name:"endOfStream",doneFn:t})},i.removeAudio=function(e,t,a){if(a===void 0&&(a=Fi),!this.audioBuffered().length||this.audioBuffered().end(0)===0){a();return}Nr({type:"audio",sourceUpdater:this,action:Fr.remove(e,t),doneFn:a,name:"remove"})},i.removeVideo=function(e,t,a){if(a===void 0&&(a=Fi),!this.videoBuffered().length||this.videoBuffered().end(0)===0){a();return}Nr({type:"video",sourceUpdater:this,action:Fr.remove(e,t),doneFn:a,name:"remove"})},i.updating=function(){return!!(nf("audio",this)||nf("video",this))},i.audioTimestampOffset=function(e){return typeof e<"u"&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(Nr({type:"audio",sourceUpdater:this,action:Fr.timestampOffset(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},i.videoTimestampOffset=function(e){return typeof e<"u"&&this.videoBuffer&&this.videoTimestampOffset!==e&&(Nr({type:"video",sourceUpdater:this,action:Fr.timestampOffset(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},i.audioQueueCallback=function(e){this.audioBuffer&&Nr({type:"audio",sourceUpdater:this,action:Fr.callback(e),name:"callback"})},i.videoQueueCallback=function(e){this.videoBuffer&&Nr({type:"video",sourceUpdater:this,action:Fr.callback(e),name:"callback"})},i.dispose=function(){var e=this;this.trigger("dispose"),dC.forEach(function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"](function(){return u_(t,e)})}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},r})(ae.EventTarget),Gp=function(r){return decodeURIComponent(escape(String.fromCharCode.apply(null,r)))},Wp=new Uint8Array(`
47
48`.split("").map(function(s){return s.charCodeAt(0)})),hC=(function(s){Ee(r,s);function r(){return s.call(this,"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")||this}return r})(Bd(Error)),pC=(function(s){Ee(r,s);function r(n,e){var t;return e===void 0&&(e={}),t=s.call(this,n,e)||this,t.mediaSource_=null,t.subtitlesTrack_=null,t.loaderType_="subtitle",t.featuresNativeTextTracks_=n.featuresNativeTextTracks,t.loadVttJs=n.loadVttJs,t.shouldSaveSegmentTimingInfo_=!1,t}var i=r.prototype;return i.createTransmuxer_=function(){return null},i.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return ae.createTimeRanges();var e=this.subtitlesTrack_.cues,t=e[0].startTime,a=e[e.length-1].startTime;return ae.createTimeRanges([[t,a]])},i.initSegmentForMap=function(e,t){if(t===void 0&&(t=!1),!e)return null;var a=co(e),o=this.initSegments_[a];if(t&&!o&&e.bytes){var l=Wp.byteLength+e.bytes.byteLength,u=new Uint8Array(l);u.set(e.bytes),u.set(Wp,e.bytes.byteLength),this.initSegments_[a]=o={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:u}}return o||e},i.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},i.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},i.track=function(e){return typeof e>"u"?this.subtitlesTrack_:(this.subtitlesTrack_=e,this.state==="INIT"&&this.couldBeginLoading_()&&this.init_(),this.subtitlesTrack_)},i.remove=function(e,t){Ba(e,t,this.subtitlesTrack_)},i.fillBuffer_=function(){var e=this,t=this.chooseNextRequest_();if(t){if(this.syncController_.timestampOffsetForTimeline(t.timeline)===null){var a=function(){e.state="READY",e.paused()||e.monitorBuffer_()};this.syncController_.one("timestampoffset",a),this.state="WAITING_ON_TIMELINE";return}this.loadSegment_(t)}},i.timestampOffsetForSegment_=function(){return null},i.chooseNextRequest_=function(){return this.skipEmptySegments_(s.prototype.chooseNextRequest_.call(this))},i.skipEmptySegments_=function(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e},i.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},i.segmentRequestFinished_=function(e,t,a){var o=this;if(!this.subtitlesTrack_){this.state="READY";return}if(this.saveTransferStats_(t.stats),!this.pendingSegment_){this.state="READY",this.mediaRequestsAborted+=1;return}if(e){e.code===bi.TIMEOUT&&this.handleTimeout_(),e.code===bi.ABORTED?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(e);return}var l=this.pendingSegment_;this.saveBandwidthRelatedStats_(l.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");var u=l.segment;if(u.map&&(u.map.bytes=t.map.bytes),l.bytes=t.bytes,typeof K.WebVTT!="function"&&typeof this.loadVttJs=="function"){this.state="WAITING_ON_VTTJS",this.loadVttJs().then(function(){return o.segmentRequestFinished_(e,t,a)},function(){return o.stopForError({message:"Error loading vtt.js"})});return}u.requested=!0;try{this.parseVTTCues_(l)}catch(d){this.stopForError({message:d.message});return}if(this.updateTimeMapping_(l,this.syncController_.timelines[l.timeline],this.playlist_),l.cues.length?l.timingInfo={start:l.cues[0].startTime,end:l.cues[l.cues.length-1].endTime}:l.timingInfo={start:l.startOfSegment,end:l.startOfSegment+l.duration},l.isSyncRequest){this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY";return}l.byteLength=l.bytes.byteLength,this.mediaSecondsLoaded+=u.duration,l.cues.forEach(function(d){o.subtitlesTrack_.addCue(o.featuresNativeTextTracks_?new K.VTTCue(d.startTime,d.endTime,d.text):d)}),ZE(this.subtitlesTrack_),this.handleAppendsDone_()},i.handleData_=function(){},i.updateTimingInfoEnd_=function(){},i.parseVTTCues_=function(e){var t,a=!1;if(typeof K.WebVTT!="function")throw new hC;typeof K.TextDecoder=="function"?t=new K.TextDecoder("utf8"):(t=K.WebVTT.StringDecoder(),a=!0);var o=new K.WebVTT.Parser(K,K.vttjs,t);if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},o.oncue=e.cues.push.bind(e.cues),o.ontimestampmap=function(d){e.timestampmap=d},o.onparsingerror=function(d){ae.log.warn("Error encountered when parsing cues: "+d.message)},e.segment.map){var l=e.segment.map.bytes;a&&(l=Gp(l)),o.parse(l)}var u=e.bytes;a&&(u=Gp(u)),o.parse(u),o.flush()},i.updateTimeMapping_=function(e,t,a){var o=e.segment;if(t){if(!e.cues.length){o.empty=!0;return}var l=e.timestampmap,u=l.MPEGTS/Js.ONE_SECOND_IN_TS-l.LOCAL+t.mapping;
48if(e.cues.forEach(function(m){m.startTime+=u,m.endTime+=u}),!a.syncInfo){var d=e.cues[0].startTime,f=e.cues[e.cues.length-1].startTime;a.syncInfo={mediaSequence:a.mediaSequence+e.mediaIndex,time:Math.min(d,f-o.duration)}}}},r})(rf),mC=function(r,i){for(var n=r.cues,e=0;e<n.length;e++){var t=n[e];if(i>=t.adStartTime&&i<=t.adEndTime)return t}return null},vC=function(r,i,n){if(n===void 0&&(n=0),!!r.segments)for(var e=n,t,a=0;a<r.segments.length;a++){var o=r.segments[a];if(t||(t=mC(i,e+o.duration/2)),t){if("cueIn"in o){t.endTime=e,t.adEndTime=e,e+=o.duration,t=null;continue}if(e<t.endTime){e+=o.duration;continue}t.endTime+=o.duration}else if("cueOut"in o&&(t=new K.VTTCue(e,e+o.duration,o.cueOut),t.adStartTime=e,t.adEndTime=e+parseFloat(o.cueOut),i.addCue(t)),"cueOutCont"in o){var l=o.cueOutCont.split("/").map(parseFloat),u=l[0],d=l[1];t=new K.VTTCue(e,e+o.duration,""),t.adStartTime=e-u,t.adEndTime=t.adStartTime+d,i.addCue(t)}e+=o.duration}},gC=86400,zp=[{name:"VOD",run:function(r,i,n,e,t){if(n!==1/0){var a={time:0,segmentIndex:0,partIndex:null};return a}return null}},{name:"ProgramDateTime",run:function(r,i,n,e,t){if(!Object.keys(r.timelineToDatetimeMappings).length)return null;var a=null,o=null,l=Kd(i);t=t||0;for(var u=0;u<l.length;u++){var d=i.endList||t===0?u:l.length-(u+1),f=l[d],m=f.segment,x=r.timelineToDatetimeMappings[m.timeline];if(!(!x||!m.dateTimeObject)){var C=m.dateTimeObject.getTime()/1e3,L=C+x;if(m.parts&&typeof f.partIndex=="number")for(var E=0;E<f.partIndex;E++)L+=m.parts[E].duration;var B=Math.abs(t-L);if(o!==null&&(B===0||o<B))break;o=B,a={time:L,segmentIndex:f.segmentIndex,partIndex:f.partIndex}}}return a}},{name:"Segment",run:function(r,i,n,e,t){var a=null,o=null;t=t||0;for(var l=Kd(i),u=0;u<l.length;u++){var d=i.endList||t===0?u:l.length-(u+1),f=l[d],m=f.segment,x=f.part&&f.part.start||m&&m.start;if(m.timeline===e&&typeof x<"u"){var C=Math.abs(t-x);if(o!==null&&o<C)break;(!a||o===null||o>=C)&&(o=C,a={time:x,segmentIndex:f.segmentIndex,partIndex:f.partIndex})}}return a}},{name:"Discontinuity",run:function(r,i,n,e,t){var a=null;if(t=t||0,i.discontinuityStarts&&i.discontinuityStarts.length)for(var o=null,l=0;l<i.discontinuityStarts.length;l++){var u=i.discontinuityStarts[l],d=i.discontinuitySequence+l+1,f=r.discontinuities[d];if(f){var m=Math.abs(t-f.time);if(o!==null&&o<m)break;(!a||o===null||o>=m)&&(o=m,a={time:f.time,segmentIndex:u,partIndex:null})}}return a}},{name:"Playlist",run:function(r,i,n,e,t){if(i.syncInfo){var a={time:i.syncInfo.time,segmentIndex:i.syncInfo.mediaSequence-i.mediaSequence,partIndex:null};return a}return null}}],yC=(function(s){Ee(r,s);function r(n){var e;return e=s.call(this)||this,e.timelines=[],e.discontinuities=[],e.timelineToDatetimeMappings={},e.logger_=oi("SyncController"),e}var i=r.prototype;return i.getSyncPoint=function(e,t,a,o){var l=this.runStrategies_(e,t,a,o);return l.length?this.selectSyncPoint_(l,{key:"time",value:o}):null},i.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var a=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!a.length)return null;var o=this.selectSyncPoint_(a,{key:"segmentIndex",value:0});return o.segmentIndex>0&&(o.time*=-1),Math.abs(o.time+ja({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:o.segmentIndex,endIndex:0}))},i.runStrategies_=function(e,t,a,o){for(var l=[],u=0;u<zp.length;u++){var d=zp[u],f=d.run(this,e,t,a,o);f&&(f.strategy=d.name,l.push({strategy:d.name,syncPoint:f}))}return l},i.selectSyncPoint_=function(e,t){for(var a=e[0].syncPoint,o=Math.abs(e[0].syncPoint[t.key]-t.value),l=e[0].strategy,u=1;u<e.length;u++){var d=Math.abs(e[u].syncPoint[t.key]-t.value);d<o&&(o=d,a=e[u].syncPoint,l=e[u].strategy)}return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy"+(" ["+l+"]: [time:"+a.time+",")+(" segmentIndex:"+a.segmentIndex)+(typeof a.partIndex=="number"?",partIndex:"+a.partIndex:"")+"]"),a},i.saveExpiredSegmentInfo=function(e,t){var a=t.mediaSequence-e.mediaSequence;if(a>gC){ae.log.warn("Not saving expired segment info. Media sequence gap "+a+" is too large.");return}for(var o=a-1;o>=0;o--){var l=e.segments[o];if(l&&typeof l.start<"u"){t.syncInfo={mediaSequence:e.mediaSequence+o,time:l.start}
48,this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+","+(" mediaSequence: "+t.syncInfo.mediaSequence+"]")),this.trigger("syncinfoupdate");break}}},i.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],a=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-a}},i.saveSegmentTimingInfo=function(e){var t=e.segmentInfo,a=e.shouldSaveTimelineMapping,o=this.calculateSegmentTimeMapping_(t,t.timingInfo,a),l=t.segment;o&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:l.start}));var u=l.dateTimeObject;l.discontinuity&&a&&u&&(this.timelineToDatetimeMappings[l.timeline]=-(u.getTime()/1e3))},i.timestampOffsetForTimeline=function(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time},i.mappingForTimeline=function(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping},i.calculateSegmentTimeMapping_=function(e,t,a){var o=e.segment,l=e.part,u=this.timelines[e.timeline],d,f;if(typeof e.timestampOffset=="number")u={time:e.startOfSegment,mapping:e.startOfSegment-t.start},a&&(this.timelines[e.timeline]=u,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": "+("[time: "+u.time+"] [mapping: "+u.mapping+"]"))),d=e.startOfSegment,f=t.end+u.mapping;else if(u)d=t.start+u.mapping,f=t.end+u.mapping;else return!1;return l&&(l.start=d,l.end=f),(!o.start||d<o.start)&&(o.start=d),o.end=f,!0},i.saveDiscontinuitySyncInfo_=function(e){var t=e.playlist,a=e.segment;if(a.discontinuity)this.discontinuities[a.timeline]={time:a.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(var o=0;o<t.discontinuityStarts.length;o++){var l=t.discontinuityStarts[o],u=t.discontinuitySequence+o+1,d=l-e.mediaIndex,f=Math.abs(d);if(!this.discontinuities[u]||this.discontinuities[u].accuracy>f){var m=void 0;d<0?m=a.start-ja({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:l}):m=a.end+ja({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:l}),this.discontinuities[u]={time:m,accuracy:f}}}},i.dispose=function(){this.trigger("dispose"),this.off()},r})(ae.EventTarget),_C=(function(s){Ee(r,s);function r(){var n;return n=s.call(this)||this,n.pendingTimelineChanges_={},n.lastTimelineChanges_={},n}var i=r.prototype;return i.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},i.pendingTimelineChange=function(e){var t=e.type,a=e.from,o=e.to;return typeof a=="number"&&typeof o=="number"&&(this.pendingTimelineChanges_[t]={type:t,from:a,to:o},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},i.lastTimelineChange=function(e){var t=e.type,a=e.from,o=e.to;return typeof a=="number"&&typeof o=="number"&&(this.lastTimelineChanges_[t]={type:t,from:a,to:o},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},i.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},r})(ae.EventTarget),bC=Xy(Yy(function(){var s=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function r(U,F,G){return G={path:F,exports:{},require:function(H,A){return i(H,A??G.path)}},U(G,G.exports),G.exports}function i(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var n=r(function(U){function F(O,H){for(var A=0;A<H.length;A++){var D=H[A];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(O,D.key,D)}}function G(O,H,A){return H&&F(O.prototype,H),A&&F(O,A),O}U.exports=G,U.exports.default=U.exports,U.exports.__esModule=!0}),e=r(function(U){function F(G,O){return U.exports=F=Object.setPrototypeOf||function(A,D){return A.__proto__=D,A},U.exports.default=U.exports,U.exports.__esModule=!0,F(G,O)}U.exports=F,U.exports.default=U.exports,U.exports.__esModule=!0}),t=r(function(U){function F(G,O){G.prototype=Object.create(O.prototype),G.prototype.constructor=G,e(G,O)}U.exports=F,U.exports.default=U.exports,U.exports.__esModule=!0}),a=(function(){function U(){this.listeners={}}var F=U.prototype;return F.on=function(O,H){this.listeners[O]||(this.listeners[O]=[]),this.listeners[O].push(H)},F.off=function(O,H){if(!this.listeners[O])return!1;var A=this.listeners[O].indexOf(H);return this.listeners[O]=this.listeners[O].slice(0),this.listeners[O].splice(A,1),A>-1},F.trigger=function(O){var H=this.listeners[O];if(H)if(arguments.length===2)for(var A=H.length,D=0;D<A;++D)H[D].call(this,arguments[1]);
48else for(var j=Array.prototype.slice.call(arguments,1),X=H.length,J=0;J<X;++J)H[J].apply(this,j)},F.dispose=function(){this.listeners={}},F.pipe=function(O){this.on("data",function(H){O.push(H)})},U})();function o(U){return U.subarray(0,U.byteLength-U[U.byteLength-1])}var l=function(){var F=[[[],[],[],[],[]],[[],[],[],[],[]]],G=F[0],O=F[1],H=G[4],A=O[4],D,j,X,J=[],ne=[],se,ue,oe,te,le,re;for(D=0;D<256;D++)ne[(J[D]=D<<1^(D>>7)*283)^D]=D;for(j=X=0;!H[j];j^=se||1,X=ne[X]||1)for(te=X^X<<1^X<<2^X<<3^X<<4,te=te>>8^te&255^99,H[j]=te,A[te]=j,oe=J[ue=J[se=J[j]]],re=oe*16843009^ue*65537^se*257^j*16843008,le=J[te]*257^te*16843008,D=0;D<4;D++)G[D][j]=le=le<<24^le>>>8,O[D][te]=re=re<<24^re>>>8;for(D=0;D<5;D++)G[D]=G[D].slice(0),O[D]=O[D].slice(0);return F},u=null,d=(function(){function U(G){u||(u=l()),this._tables=[[u[0][0].slice(),u[0][1].slice(),u[0][2].slice(),u[0][3].slice(),u[0][4].slice()],[u[1][0].slice(),u[1][1].slice(),u[1][2].slice(),u[1][3].slice(),u[1][4].slice()]];var O,H,A,D=this._tables[0][4],j=this._tables[1],X=G.length,J=1;if(X!==4&&X!==6&&X!==8)throw new Error("Invalid aes key size");var ne=G.slice(0),se=[];for(this._key=[ne,se],O=X;O<4*X+28;O++)A=ne[O-1],(O%X===0||X===8&&O%X===4)&&(A=D[A>>>24]<<24^D[A>>16&255]<<16^D[A>>8&255]<<8^D[A&255],O%X===0&&(A=A<<8^A>>>24^J<<24,J=J<<1^(J>>7)*283)),ne[O]=ne[O-X]^A;for(H=0;O;H++,O--)A=ne[H&3?O:O-4],O<=4||H<4?se[H]=A:se[H]=j[0][D[A>>>24]]^j[1][D[A>>16&255]]^j[2][D[A>>8&255]]^j[3][D[A&255]]}var F=U.prototype;return F.decrypt=function(O,H,A,D,j,X){var J=this._key[1],ne=O^J[0],se=D^J[1],ue=A^J[2],oe=H^J[3],te,le,re,ce=J.length/4-2,be,Pe=4,Re=this._tables[1],ge=Re[0],De=Re[1],Qe=Re[2],Oe=Re[3],ot=Re[4];for(be=0;be<ce;be++)te=ge[ne>>>24]^De[se>>16&255]^Qe[ue>>8&255]^Oe[oe&255]^J[Pe],le=ge[se>>>24]^De[ue>>16&255]^Qe[oe>>8&255]^Oe[ne&255]^J[Pe+1],re=ge[ue>>>24]^De[oe>>16&255]^Qe[ne>>8&255]^Oe[se&255]^J[Pe+2],oe=ge[oe>>>24]^De[ne>>16&255]^Qe[se>>8&255]^Oe[ue&255]^J[Pe+3],Pe+=4,ne=te,se=le,ue=re;for(be=0;be<4;be++)j[(3&-be)+X]=ot[ne>>>24]<<24^ot[se>>16&255]<<16^ot[ue>>8&255]<<8^ot[oe&255]^J[Pe++],te=ne,ne=se,se=ue,ue=oe,oe=te},U})(),f=(function(U){t(F,U);function F(){var O;return O=U.call(this,a)||this,O.jobs=[],O.delay=1,O.timeout_=null,O}var G=F.prototype;return G.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},G.push=function(H){this.jobs.push(H),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},F})(a),m=function(F){return F<<24|(F&65280)<<8|(F&16711680)>>8|F>>>24},x=function(F,G,O){var H=new Int32Array(F.buffer,F.byteOffset,F.byteLength>>2),A=new d(Array.prototype.slice.call(G)),D=new Uint8Array(F.byteLength),j=new Int32Array(D.buffer),X,J,ne,se,ue,oe,te,le,re;for(X=O[0],J=O[1],ne=O[2],se=O[3],re=0;re<H.length;re+=4)ue=m(H[re]),oe=m(H[re+1]),te=m(H[re+2]),le=m(H[re+3]),A.decrypt(ue,oe,te,le,j,re),j[re]=m(j[re]^X),j[re+1]=m(j[re+1]^J),j[re+2]=m(j[re+2]^ne),j[re+3]=m(j[re+3]^se),X=ue,J=oe,ne=te,se=le;return D},C=(function(){function U(G,O,H,A){var D=U.STEP,j=new Int32Array(G.buffer),X=new Uint8Array(G.byteLength),J=0;for(this.asyncStream_=new f,this.asyncStream_.push(this.decryptChunk_(j.subarray(J,J+D),O,H,X)),J=D;J<j.length;J+=D)H=new Uint32Array([m(j[J-4]),m(j[J-3]),m(j[J-2]),m(j[J-1])]),this.asyncStream_.push(this.decryptChunk_(j.subarray(J,J+D),O,H,X));this.asyncStream_.push(function(){A(null,o(X))})}var F=U.prototype;return F.decryptChunk_=function(O,H,A,D){return function(){var j=x(O,H,A);D.set(j,O.byteOffset)}},n(U,null,[{key:"STEP",get:function(){return 32e3}}]),U})(),L;typeof window<"u"?L=window:typeof s<"u"?L=s:typeof self<"u"?L=self:L={};var E=L,B=function(F){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(F):F&&F.buffer instanceof ArrayBuffer},q=E.BigInt||Number;q("0x1"),q("0x100"),q("0x10000"),q("0x1000000"),q("0x100000000"),q("0x10000000000"),q("0x1000000000000"),q("0x100000000000000"),q("0x10000000000000000");var z=function(F){var G={};return Object.keys(F).forEach(function(O){var H=F[O];B(H)?G[O]={bytes:H.buffer,byteOffset:H.byteOffset,byteLength:H.byteLength}:G[O]=H}),G};self.onmessage=function(U){var F=U.data,G=new Uint8Array(F.encrypted.bytes,F.encrypted.byteOffset,F.encrypted.byteLength),O=new 
48Uint32Array(F.key.bytes,F.key.byteOffset,F.key.byteLength/4),H=new Uint32Array(F.iv.bytes,F.iv.byteOffset,F.iv.byteLength/4);new C(G,O,H,function(A,D){self.postMessage(z({source:F.source,decrypted:D}),[D.buffer])})}})),TC=Ky(bC),SC=function(r){var i=r.default?"main":"alternative";return r.characteristics&&r.characteristics.indexOf("public.accessibility.describes-video")>=0&&(i="main-desc"),i},mo=function(r,i){r.abort(),r.pause(),i&&i.activePlaylistLoader&&(i.activePlaylistLoader.pause(),i.activePlaylistLoader=null)},af=function(r,i){i.activePlaylistLoader=r,r.load()},xC=function(r,i){return function(){var n=i.segmentLoaders,e=n[r],t=n.main,a=i.mediaTypes[r],o=a.activeTrack(),l=a.getActiveGroup(),u=a.activePlaylistLoader,d=a.lastGroup_;if(!(l&&d&&l.id===d.id)&&(a.lastGroup_=l,a.lastTrack_=o,mo(e,a),!(!l||l.isMasterPlaylist))){if(!l.playlistLoader){u&&t.resetEverything();return}e.resyncLoader(),af(l.playlistLoader,a)}}},EC=function(r,i){return function(){var n=i.segmentLoaders[r],e=i.mediaTypes[r];e.lastGroup_=null,n.abort(),n.pause()}},CC=function(r,i){return function(){var n=i.masterPlaylistLoader,e=i.segmentLoaders,t=e[r],a=e.main,o=i.mediaTypes[r],l=o.activeTrack(),u=o.getActiveGroup(),d=o.activePlaylistLoader,f=o.lastTrack_;if(!(f&&l&&f.id===l.id)&&(o.lastGroup_=u,o.lastTrack_=l,mo(t,o),!!u)){if(u.isMasterPlaylist){if(!l||!f||l.id===f.id)return;var m=i.vhs.masterPlaylistController_,x=m.selectPlaylist();if(m.media()===x)return;o.logger_("track change. Switching master audio from "+f.id+" to "+l.id),n.pause(),a.resetEverything(),m.fastQualityChange_(x);return}if(r==="AUDIO"){if(!u.playlistLoader){a.setAudio(!0),a.resetEverything();return}t.setAudio(!0),a.setAudio(!1)}if(d===u.playlistLoader){af(u.playlistLoader,o);return}t.track&&t.track(l),t.resetEverything(),af(u.playlistLoader,o)}}},vo={AUDIO:function(r,i){return function(){var n=i.segmentLoaders[r],e=i.mediaTypes[r],t=i.blacklistCurrentPlaylist;mo(n,e);var a=e.activeTrack(),o=e.activeGroup(),l=(o.filter(function(f){return f.default})[0]||o[0]).id,u=e.tracks[l];if(a===u){t({message:"Problem encountered loading the default audio track."});return}ae.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(var d in e.tracks)e.tracks[d].enabled=e.tracks[d]===u;e.onTrackChanged()}},SUBTITLES:function(r,i){return function(){var n=i.segmentLoaders[r],e=i.mediaTypes[r];ae.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),mo(n,e);var t=e.activeTrack();t&&(t.mode="disabled"),e.onTrackChanged()}}},$p={AUDIO:function(r,i,n){if(i){var e=n.tech,t=n.requestOptions,a=n.segmentLoaders[r];i.on("loadedmetadata",function(){var o=i.media();a.playlist(o,t),(!e.paused()||o.endList&&e.preload()!=="none")&&a.load()}),i.on("loadedplaylist",function(){a.playlist(i.media(),t),e.paused()||a.load()}),i.on("error",vo[r](r,n))}},SUBTITLES:function(r,i,n){var e=n.tech,t=n.requestOptions,a=n.segmentLoaders[r],o=n.mediaTypes[r];i.on("loadedmetadata",function(){var l=i.media();a.playlist(l,t),a.track(o.activeTrack()),(!e.paused()||l.endList&&e.preload()!=="none")&&a.load()}),i.on("loadedplaylist",function(){a.playlist(i.media(),t),e.paused()||a.load()}),i.on("error",vo[r](r,n))}},wC={AUDIO:function(r,i){var n=i.vhs,e=i.sourceType,t=i.segmentLoaders[r],a=i.requestOptions,o=i.master.mediaGroups,l=i.mediaTypes[r],u=l.groups,d=l.tracks,f=l.logger_,m=i.masterPlaylistLoader,x=os(m.master);(!o[r]||Object.keys(o[r]).length===0)&&(o[r]={main:{default:{default:!0}}},x&&(o[r].main.default.playlists=m.master.playlists));for(var C in o[r]){u[C]||(u[C]=[]);for(var L in o[r][C]){var E=o[r][C][L],B=void 0;if(x?(f("AUDIO group '"+C+"' label '"+L+"' is a master playlist"),E.isMasterPlaylist=!0,B=null):e==="vhs-json"&&E.playlists?B=new Jn(E.playlists[0],n,a):E.resolvedUri?B=new Jn(E.resolvedUri,n,a):E.playlists&&e==="dash"?B=new ef(E.playlists[0],n,a,m):B=null,E=ae.mergeOptions({id:L,playlistLoader:B},E),$p[r](r,E.playlistLoader,i),u[C].push(E),typeof d[L]>"u"){var q=new ae.AudioTrack({id:L,kind:SC(E),enabled:!1,language:E.language,default:E.default,label:L});d[L]=q}}}t.on("error",vo[r](r,i))},SUBTITLES:function(r,i){var n=i.tech,e=i.vhs,t=i.sourceType,a=i.segmentLoaders[r],o=i.requestOptions,l=i.master.mediaGroups,u=i.mediaTypes[r],d=u.groups,f=u.tracks,m=i.masterPlaylistLoader;for(var x in l[r]){d[x]||(d[x]=[]);for(var C in l[r][x])if(!l[r][x][C].forced){var L=l[r][x][C],E=void 0;if(t==="hls")E=new Jn(L.resolvedUri,e,o);else if(t==="dash"){var B=L.playlists.filter(function(z){return z.excludeUntil!==1/0});if(!B.length)return;E=new ef(L.playlists[0],e,o,m)}else t==="vhs-json"&&(E=new Jn(L.playlists?L.playlists[0]:L.resolvedUri,e,o));if(L=ae.mergeOptions({id:C,playlistLoader:E},L),$p[r](r,L.playlistLoader,i),d[x].push(L),typeof f[C]>"u"){var q=n.addRemoteTextTrack({id:C,kind:"subtitles",default:L.default&&L.autoselect,language:L.language,label:C},!1).track;f[C]=q}}}a.on("error",vo[r](r,i))},"CLOSED-CAPTIONS":function(r,i){var n=i.tech,e=i.master.mediaGroups,t=i.mediaTypes[r],a=t.groups,o=t.tracks;for(var l in e[r]){a[l]||(a[l]=[]);for(var u in e[r][l]){var d=e[r][l][u];if(/^(?:CC|SERVICE)/.test(d.instreamId)){var f=n.options_.vhs&&n.options_.vhs.captionServices||{},m={label:u,language:d.language,instreamId:d.instreamId,default:d.default&&d.autoselect};if(f[m.instreamId]&&(m=ae.mergeOptions(m,f[m.instreamId])),m.default===void 0&&delete m.default,a[l].push(ae.mergeOptions({id:u},d)),typeof o[u]>
48"u"){var x=n.addRemoteTextTrack({id:m.instreamId,kind:"captions",default:m.default,language:m.language,label:m.label},!1).track;o[u]=x}}}}}},AC=function s(r,i){for(var n=0;n<r.length;n++)if(Qf(i,r[n])||r[n].playlists&&s(r[n].playlists,i))return!0;return!1},kC=function(r,i){return function(n){var e=i.masterPlaylistLoader,t=i.mediaTypes[r].groups,a=e.media();if(!a)return null;var o=null;a.attributes[r]&&(o=t[a.attributes[r]]);var l=Object.keys(t);if(!o)if(r==="AUDIO"&&l.length>1&&os(i.master))for(var u=0;u<l.length;u++){var d=t[l[u]];if(AC(d,a)){o=d;break}}else t.main?o=t.main:l.length===1&&(o=t[l[0]]);return typeof n>"u"?o:n===null||!o?null:o.filter(function(f){return f.id===n.id})[0]||null}},DC={AUDIO:function(r,i){return function(){var n=i.mediaTypes[r].tracks;for(var e in n)if(n[e].enabled)return n[e];return null}},SUBTITLES:function(r,i){return function(){var n=i.mediaTypes[r].tracks;for(var e in n)if(n[e].mode==="showing"||n[e].mode==="hidden")return n[e];return null}}},PC=function(r,i){var n=i.mediaTypes;return function(){var e=n[r].activeTrack();return e?n[r].activeGroup(e):null}},IC=function(r){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(C){wC[C](C,r)});var i=r.mediaTypes,n=r.masterPlaylistLoader,e=r.tech,t=r.vhs,a=r.segmentLoaders,o=a.AUDIO,l=a.main;["AUDIO","SUBTITLES"].forEach(function(C){i[C].activeGroup=kC(C,r),i[C].activeTrack=DC[C](C,r),i[C].onGroupChanged=xC(C,r),i[C].onGroupChanging=EC(C,r),i[C].onTrackChanged=CC(C,r),i[C].getActiveGroup=PC(C,r)});var u=i.AUDIO.activeGroup();if(u){var d=(u.filter(function(C){return C.default})[0]||u[0]).id;i.AUDIO.tracks[d].enabled=!0,i.AUDIO.onGroupChanged(),i.AUDIO.onTrackChanged();var f=i.AUDIO.getActiveGroup();f.playlistLoader?(l.setAudio(!1),o.setAudio(!0)):l.setAudio(!0)}n.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(C){return i[C].onGroupChanged()})}),n.on("mediachanging",function(){["AUDIO","SUBTITLES"].forEach(function(C){return i[C].onGroupChanging()})});var m=function(){i.AUDIO.onTrackChanged(),e.trigger({type:"usage",name:"vhs-audio-change"}),e.trigger({type:"usage",name:"hls-audio-change"})};e.audioTracks().addEventListener("change",m),e.remoteTextTracks().addEventListener("change",i.SUBTITLES.onTrackChanged),t.on("dispose",function(){e.audioTracks().removeEventListener("change",m),e.remoteTextTracks().removeEventListener("change",i.SUBTITLES.onTrackChanged)}),e.clearTracks("audio");for(var x in i.AUDIO.tracks)e.audioTracks().addTrack(i.AUDIO.tracks[x])},LC=function(){var r={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(i){r[i]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Fi,activeTrack:Fi,getActiveGroup:Fi,onGroupChanged:Fi,onTrackChanged:Fi,lastTrack_:null,logger_:oi("MediaGroups["+i+"]")}}),r},MC=120,Mi,OC=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],RC=function(r){return this.audioSegmentLoader_[r]+this.mainSegmentLoader_[r]},FC=function(r){var i=r.currentPlaylist,n=r.buffered,e=r.currentTime,t=r.nextPlaylist,a=r.bufferLowWaterLine,o=r.bufferHighWaterLine,l=r.duration,u=r.experimentalBufferBasedABR,d=r.log;if(!t)return ae.log.warn("We received no playlist to switch to. Please check your stream."),!1;var f="allowing switch "+(i&&i.id||"null")+" -> "+t.id;if(!i)return d(f+" as current playlist is not set"),!0;if(t.id===i.id)return!1;var m=!!Qn(n,e).length;if(!i.endList)return!m&&typeof i.partTargetDuration=="number"?(d("not "+f+" as current playlist is live llhls, but currentTime isn't in buffered."),!1):(d(f+" as current playlist is live"),!0);var x=Kf(n,e),C=u?Qt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Qt.MAX_BUFFER_LOW_WATER_LINE;if(l<C)return d(f+" as duration < max low water line ("+l+" < "+C+")"),!0;var L=t.attributes.BANDWIDTH,E=i.attributes.BANDWIDTH;if(L<E&&(!u||x<o)){var B=f+" as next bandwidth < current bandwidth ("+L+" < "+E+")";return u&&(B+=" and forwardBuffer < bufferHighWaterLine ("+x+" < "+o+")"),d(B),!0}if((!u||L>E)&&x>=a){var q=f+" as forwardBuffer >= bufferLowWaterLine ("+x+" >= "+a+")";return u&&(q+=" and next bandwidth > current bandwidth ("+L+" > "+E+")"),d(q),!0}return d("not "+f+" as no switching criteria met"),!1},NC=(function(s){Ee(r,s);function r(n){var e;e=s.call(this)||this;var t=n.src,a=n.handleManifestRedirects,o=n.withCredentials,l=n.tech,u=n.bandwidth,d=n.externVhs,f=n.useCueTags,m=n.blackl
48istDuration,x=n.enableLowInitialPlaylist,C=n.sourceType,L=n.cacheEncryptionKeys,E=n.experimentalBufferBasedABR,B=n.experimentalLeastPixelDiffSelector,q=n.captionServices;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");var z=n.maxPlaylistRetries;(z===null||typeof z>"u")&&(z=1/0),Mi=d,e.experimentalBufferBasedABR=!!E,e.experimentalLeastPixelDiffSelector=!!B,e.withCredentials=o,e.tech_=l,e.vhs_=l.vhs,e.sourceType_=C,e.useCueTags_=f,e.blacklistDuration=m,e.maxPlaylistRetries=z,e.enableLowInitialPlaylist=x,e.useCueTags_&&(e.cueTagsTrack_=e.tech_.addTextTrack("metadata","ad-cues"),e.cueTagsTrack_.inBandMetadataTrackDispatchType=""),e.requestOptions_={withCredentials:o,handleManifestRedirects:a,maxPlaylistRetries:z,timeout:null},e.on("error",e.pauseLoading),e.mediaTypes_=LC(),e.mediaSource=new K.MediaSource,e.handleDurationChange_=e.handleDurationChange_.bind(Ge(e)),e.handleSourceOpen_=e.handleSourceOpen_.bind(Ge(e)),e.handleSourceEnded_=e.handleSourceEnded_.bind(Ge(e)),e.mediaSource.addEventListener("durationchange",e.handleDurationChange_),e.mediaSource.addEventListener("sourceopen",e.handleSourceOpen_),e.mediaSource.addEventListener("sourceended",e.handleSourceEnded_),e.seekable_=ae.createTimeRanges(),e.hasPlayed_=!1,e.syncController_=new yC(n),e.segmentMetadataTrack_=l.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,e.decrypter_=new TC,e.sourceUpdater_=new l_(e.mediaSource),e.inbandTextTracks_={},e.timelineChangeController_=new _C;var U={vhs:e.vhs_,parse708captions:n.parse708captions,useDtsForTimestampOffset:n.useDtsForTimestampOffset,captionServices:q,mediaSource:e.mediaSource,currentTime:e.tech_.currentTime.bind(e.tech_),seekable:function(){return e.seekable()},seeking:function(){return e.tech_.seeking()},duration:function(){return e.duration()},hasPlayed:function(){return e.hasPlayed_},goalBufferLength:function(){return e.goalBufferLength()},bandwidth:u,syncController:e.syncController_,decrypter:e.decrypter_,sourceType:e.sourceType_,inbandTextTracks:e.inbandTextTracks_,cacheEncryptionKeys:L,sourceUpdater:e.sourceUpdater_,timelineChangeController:e.timelineChangeController_,experimentalExactManifestTimings:n.experimentalExactManifestTimings};e.masterPlaylistLoader_=e.sourceType_==="dash"?new ef(t,e.vhs_,e.requestOptions_):new Jn(t,e.vhs_,e.requestOptions_),e.setupMasterPlaylistLoaderListeners_(),e.mainSegmentLoader_=new rf(ae.mergeOptions(U,{segmentMetadataTrack:e.segmentMetadataTrack_,loaderType:"main"}),n),e.audioSegmentLoader_=new rf(ae.mergeOptions(U,{loaderType:"audio"}),n),e.subtitleSegmentLoader_=new pC(ae.mergeOptions(U,{loaderType:"vtt",featuresNativeTextTracks:e.tech_.featuresNativeTextTracks,loadVttJs:function(){return new Promise(function(O,H){function A(){l.off("vttjserror",D),O()}function D(){l.off("vttjsloaded",A),H()}l.one("vttjsloaded",A),l.one("vttjserror",D),l.addWebVttScript_()})}}),n),e.setupSegmentLoaderListeners_(),e.experimentalBufferBasedABR&&(e.masterPlaylistLoader_.one("loadedplaylist",function(){return e.startABRTimer_()}),e.tech_.on("pause",function(){return e.stopABRTimer_()}),e.tech_.on("play",function(){return e.startABRTimer_()})),OC.forEach(function(G){e[G+"_"]=RC.bind(Ge(e),G)}),e.logger_=oi("MPC"),e.triggeredFmp4Usage=!1,e.tech_.preload()==="none"?(e.loadOnPlay_=function(){e.loadOnPlay_=null,e.masterPlaylistLoader_.load()},e.tech_.one("play",e.loadOnPlay_)):e.masterPlaylistLoader_.load(),e.timeToLoadedData__=-1,e.mainAppendsToLoadedData__=-1,e.audioAppendsToLoadedData__=-1;var F=e.tech_.preload()==="none"?"play":"loadstart";return e.tech_.one(F,function(){var G=Date.now();e.tech_.one("loadeddata",function(){e.timeToLoadedData__=Date.now()-G,e.mainAppendsToLoadedData__=e.mainSegmentLoader_.mediaAppends,e.audioAppendsToLoadedData__=e.audioSegmentLoader_.mediaAppends})}),e}var i=r.prototype;return i.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__},i.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__},i.appendsToLoadedData_=function(){var e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return e===-1||t===-1?-1:e+t},i.timeToLoadedData_=function(){return this.timeToLoadedData__},i.checkABR_=function(e){e===void 0&&(e="abr");var t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)},i.switchMedia_=function(e,t,a){var o=this.media(),l=o&&(o.id||o.uri),u=e.id||e.uri;l&&l!==u&&(this.logger_("switch media "+l+" -> "+u+" from "+t),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+t})),this.masterPlaylistLoader_.media(e,a)},i.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=K.setInterval(function(){return e.checkABR_()},250)},i.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(K.clearInterval(this.abrTimer_),this.abrTimer_=null)},i.getAudioTrackPlaylists_=function(){var e=this.master(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;var a=e.mediaGroups.AUDIO,o=Object.keys(a),l;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)l=this.mediaTypes_.AUDIO.activeTrack();else{var u=a.main||o.length&&a[o[0]];for(var d in u)if(u[d].default){l={label:d};break}}if(!l)return t;var f=[];for(var m in a)if(a[m][l.label]){var x=a[m][l.label];if(x.playlists&&x.playlists.length)f.push.apply(f,x.playlists);else if(x.uri)f.push(x);else if(e.playlists.length)for(var C=0;C<e.playlists.length;C++){var L=e.playlists[C];L.attributes&&L.attributes.AUDIO&&L.attributes.AUDIO===m&&f.push(L)}}return f.length?f:t},i.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var t=e.masterPlaylistLoader_.media(),a=t.targetDuration*1.5*1e3;Xd(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=a,t.endList&&e.tech_.preload()!=="none"&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),IC({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){e.trigger("selectedinitialmedia")})}),this.masterPlaylistLoader_.on("loadedplaylist",function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var t=e.masterPlaylistLoader_.media();if(!t){e.excludeUnsupportedVariants_();var a;if(e.enableLowInitialPlaylist&&(a=e.selectInitialPlaylist()),a||(a=e.selectPlaylist()),!a||!e.shouldSwitchToMedia_(a))return;e.initialMedia_=a,e.switchMedia_(e.initialMedia_,"initial");var o=e.sourceType_==="vhs-json"&&e.initialMedia_.segments;if(!o)return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)}
48),this.masterPlaylistLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var t=e.masterPlaylistLoader_.media(),a=t.targetDuration*1.5*1e3;Xd(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=a,e.masterPlaylistLoader_.load(),e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var t=e.masterPlaylistLoader_.media();if(t.lastExcludeReason_!=="playlist-unchanged"){var a=e.stuckAtPlaylistEnd_(t);a&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck"))}}),this.masterPlaylistLoader_.on("renditiondisabled",function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})},i.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},i.triggerPresenceUsage_=function(e,t){var a=e.mediaGroups||{},o=!0,l=Object.keys(a.AUDIO);for(var u in a.AUDIO)for(var d in a.AUDIO[u]){var f=a.AUDIO[u][d];f.uri||(o=!1)}o&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(a.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),Mi.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),l.length&&Object.keys(a.AUDIO[l[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},i.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media()||this.masterPlaylistLoader_.pendingMedia_,a=this.tech_.currentTime(),o=this.bufferLowWaterLine(),l=this.bufferHighWaterLine(),u=this.tech_.buffered();return FC({buffered:u,currentTime:a,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:o,bufferHighWaterLine:l,duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},i.setupSegmentLoaderListeners_=function(){var e=this;this.mainSegmentLoader_.on("bandwidthupdate",function(){e.checkABR_("bandwidthupdate"),e.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",function(){e.experimentalBufferBasedABR&&e.mainSegmentLoader_.load()}),this.experimentalBufferBasedABR||this.mainSegmentLoader_.on("progress",function(){e.trigger("progress")}),this.mainSegmentLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){e.logger_("main segment loader ended"),e.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(a){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},MC))});var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var o=e.getCodecsOrExclude_();o&&e.sourceUpdater_.addOrChangeSourceBuffers(o)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()})},i.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},i.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},i.smoothQualityChange_=function(e){e===void 0&&(e=this.selectPlaylist()),this.fastQualityChange_(e)},i.fastQualityChange_=function(e){var t=this;if(e===void 0&&(e=this.selectPlaylist()),e===this.masterPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.mainSegmentLoader_.resetEverything(function(){ae.browser.IE_VERSION||ae.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())})},i.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}},i.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var a=this.seekable();if(!a.length)return!1;if(ae.browser.IE_VERSION&&this.tech_.readyState()===0)return this.tech_.one("loadedmetadata",function(){e.trigger("firstplay"),e.tech_.setCurrentTime(a.end(0)),e.hasPlayed_=!0}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(a.end(0))}return this.hasPlayed_=!0,this.load(),!0},i.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,function(t){})}this.trigger("sourceopen")},i.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(!(!e||!e.length)){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},i.handleDurationChange_=function(){this.tech_.trigger("durationchange")}
48,i.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var t=this.mainSegmentLoader_.getCurrentMediaInfo_();!t||t.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},i.stuckAtPlaylistEnd_=function(e){var t=this.seekable();if(!t.length)return!1;var a=this.syncController_.getExpiredTime(e,this.duration());if(a===null)return!1;var o=Mi.Playlist.playlistEnd(e,a),l=this.tech_.currentTime(),u=this.tech_.buffered();if(!u.length)return o-l<=_i;var d=u.end(u.length-1);return d-l<=_i&&o-d<=_i},i.blacklistCurrentPlaylist=function(e,t){e===void 0&&(e={});var a=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!a){this.error=e,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}a.playlistErrors_++;var o=this.masterPlaylistLoader_.master.playlists,l=o.filter(Ro),u=l.length===1&&l[0]===a;if(o.length===1&&t!==1/0)return ae.log.warn("Problem encountered with playlist "+a.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(u);if(u){var d=!1;o.forEach(function(B){if(B!==a){var q=B.excludeUntil;typeof q<"u"&&q!==1/0&&(d=!0,delete B.excludeUntil)}}),d&&(ae.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}var f;a.playlistErrors_>this.maxPlaylistRetries?f=1/0:f=Date.now()+t*1e3,a.excludeUntil=f,e.reason&&(a.lastExcludeReason_=e.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var m=this.selectPlaylist();if(!m){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}var x=e.internal?this.logger_:ae.log.warn,C=e.message?" "+e.message:"";x((e.internal?"Internal problem":"Problem")+" encountered with playlist "+a.id+"."+(C+" Switching to playlist "+m.id+".")),m.attributes.AUDIO!==a.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),m.attributes.SUBTITLES!==a.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var L=m.targetDuration/2*1e3||5*1e3,E=typeof m.lastRequest=="number"&&Date.now()-m.lastRequest<=L;return this.switchMedia_(m,"exclude",u||E)},i.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},i.delegateLoaders_=function(e,t){var a=this,o=[],l=e==="all";(l||e==="main")&&o.push(this.masterPlaylistLoader_);var u=[];(l||e==="audio")&&u.push("AUDIO"),(l||e==="subtitle")&&(u.push("CLOSED-CAPTIONS"),u.push("SUBTITLES")),u.forEach(function(d){var f=a.mediaTypes_[d]&&a.mediaTypes_[d].activePlaylistLoader;f&&o.push(f)}),["main","audio","subtitle"].forEach(function(d){var f=a[d+"SegmentLoader_"];f&&(e===d||e==="all")&&o.push(f)}),o.forEach(function(d){return t.forEach(function(f){typeof d[f]=="function"&&d[f]()})})},i.setCurrentTime=function(e){var t=Qn(this.tech_.buffered(),e);if(!(this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media())||!this.masterPlaylistLoader_.media().segments)return 0;if(t&&t.length)return e;this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),this.load()},i.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Mi.Playlist.duration(e):1/0:0},i.seekable=function(){return this.seekable_},i.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var a=this.syncController_.getExpiredTime(t,this.duration());if(a!==null){var o=this.masterPlaylistLoader_.master,l=Mi.Playlist.seekable(t,a,Mi.Playlist.liveEdgeDelay(o,t));if(l.length!==0&&!(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),a=this.syncController_.getExpiredTime(t,this.duration()),a===null||(e=Mi.Playlist.seekable(t,a,Mi.Playlist.liveEdgeDelay(o,t)),e.length===0)))){var u,d;this.seekable_&&this.seekable_.length&&(u=this.seekable_.end(0),d=this.seekable_.start(0)),e?e.start(0)>l.end(0)||l.start(0)>e.end(0)?this.seekable_=l:this.seekable_=ae.createTimeRanges([[e.start(0)>l.start(0)?e.start(0):l.start(0),e.end(0)<l.end(0)?e.end(0):l.end(0)]]):this.seekable_=l,!(this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===u&&this.seekable_.start(0)===d)&&(this.logger_("seekable updated ["+wy(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},i.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1));return}var a=this.tech_.buffered(),o=Mi.Playlist.duration(this.masterPlaylistLoader_.media());a.length>0&&(o=Math.max(o,a.end(a.length-1))),this.mediaSource.duration!==o&&this.sourceUpdater_.setDuration(o)},i.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(function(t){var a=e.mediaTypes_[t].groups;
48for(var o in a)a[o].forEach(function(l){l.playlistLoader&&l.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},i.master=function(){return this.masterPlaylistLoader_.master},i.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},i.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),a=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!t||!a)},i.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},a=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();t.video=t.main;var o=Ga(this.master(),a),l={},u=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(l.video=o.video||t.main.videoCodec||kT),t.main.isMuxed&&(l.video+=","+(o.audio||t.main.audioCodec||Fh)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||u)&&(l.audio=o.audio||t.main.audioCodec||t.audio.audioCodec||Fh,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),!l.audio&&!l.video){this.blacklistCurrentPlaylist({playlist:a,message:"Could not determine codecs for playlist.",blacklistDuration:1/0});return}var d=function(B,q){return B?js(q):Cu(q)},f={},m;if(["video","audio"].forEach(function(E){if(l.hasOwnProperty(E)&&!d(t[E].isFmp4,l[E])){var B=t[E].isFmp4?"browser":"muxer";f[B]=f[B]||[],f[B].push(l[E]),E==="audio"&&(m=B)}}),u&&m&&a.attributes.AUDIO){var x=a.attributes.AUDIO;
48this.master().playlists.forEach(function(E){var B=E.attributes&&E.attributes.AUDIO;B===x&&E!==a&&(E.excludeUntil=1/0)}),this.logger_("excluding audio group "+x+" as "+m+' does not support codec(s): "'+l.audio+'"')}if(Object.keys(f).length){var C=Object.keys(f).reduce(function(E,B){return E&&(E+=", "),E+=B+' does not support codec(s): "'+f[B].join(",")+'"',E},"")+".";this.blacklistCurrentPlaylist({playlist:a,internal:!0,message:C,blacklistDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var L=[];if(["video","audio"].forEach(function(E){var B=(pi(e.sourceUpdater_.codecs[E]||"")[0]||{}).type,q=(pi(l[E]||"")[0]||{}).type;B&&q&&B.toLowerCase()!==q.toLowerCase()&&L.push('"'+e.sourceUpdater_.codecs[E]+'" -> "'+l[E]+'"')}),L.length){this.blacklistCurrentPlaylist({playlist:a,message:"Codec switching not supported: "+L.join(", ")+".",blacklistDuration:1/0,internal:!0});return}}return l},i.tryToCreateSourceBuffers_=function(){if(!(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers())&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},i.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,a=[];Object.keys(t).forEach(function(o){var l=t[o];if(a.indexOf(l.id)===-1){a.push(l.id);var u=Ga(e.master,l),d=[];u.audio&&!Cu(u.audio)&&!js(u.audio)&&d.push("audio codec "+u.audio),u.video&&!Cu(u.video)&&!js(u.video)&&d.push("video codec "+u.video),u.text&&u.text==="stpp.ttml.im1t"&&d.push("text codec "+u.text),d.length&&(l.excludeUntil=1/0,e.logger_("excluding "+l.id+" for unsupported: "+d.join(", ")))}})},i.excludeIncompatibleVariants_=function(e){var t=this,a=[],o=this.master().playlists,l=ho(pi(e)),u=Fp(l),d=l.video&&pi(l.video)[0]||null,f=l.audio&&pi(l.audio)[0]||null;Object.keys(o).forEach(function(m){var x=o[m];if(!(a.indexOf(x.id)!==-1||x.excludeUntil===1/0)){a.push(x.id);var C=[],L=Ga(t.masterPlaylistLoader_.master,x),E=Fp(L);if(!(!L.audio&&!L.video)){if(E!==u&&C.push('codec count "'+E+'" !== "'+u+'"'),!t.sourceUpdater_.canChangeType()){var B=L.video&&pi(L.video)[0]||null,q=L.audio&&pi(L.audio)[0]||null;B&&d&&B.type.toLowerCase()!==d.type.toLowerCase()&&C.push('video codec "'+B.type+'" !== "'+d.type+'"'),q&&f&&q.type.toLowerCase()!==f.type.toLowerCase()&&C.push('audio codec "'+q.type+'" !== "'+f.type+'"')}C.length&&(x.excludeUntil=1/0,t.logger_("blacklisting "+x.id+": "+C.join(" && ")))}}})},i.updateAdCues_=function(e){var t=0,a=this.seekable();a.length&&(t=a.start(0)),vC(e,this.cueTagsTrack_,t)},i.goalBufferLength=function(){var e=this.tech_.currentTime(),t=Qt.GOAL_BUFFER_LENGTH,a=Qt.GOAL_BUFFER_LENGTH_RATE,o=Math.max(t,Qt.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*a,o)},i.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=Qt.BUFFER_LOW_WATER_LINE,a=Qt.BUFFER_LOW_WATER_LINE_RATE,o=Math.max(t,Qt.MAX_BUFFER_LOW_WATER_LINE),l=Math.max(t,Qt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*a,this.experimentalBufferBasedABR?l:o)},i.bufferHighWaterLine=function(){return Qt.BUFFER_HIGH_WATER_LINE},r})(ae.EventTarget),BC=function(r,i,n){return function(e){var t=r.master.playlists[i],a=Yf(t),o=Ro(t);return typeof e>"u"?o:(e?delete t.disabled:t.disabled=!0,e!==o&&!a&&(n(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)}},UC=function(r,i,n){var e=r.masterPlaylistController_,t=r.options_.smoothQualityChange,a=t?"smooth":"fast",o=e[a+"QualityChange_"].bind(e);if(i.attributes){var l=i.attributes.RESOLUTION;this.width=l&&l.width,this.height=l&&l.height,this.bandwidth=i.attributes.BANDWIDTH,this.frameRate=i.attributes["FRAME-RATE"]}this.codecs=Ga(e.master(),i),this.playlist=i,this.id=n,this.enabled=BC(r.playlists,i.id,o)},qC=function(r){r.representations=function(){var i=r.masterPlaylistController_.master(),n=os(i)?r.masterPlaylistController_.getAudioTrackPlaylists_():i.playlists;return n?n.filter(function(e){return!Yf(e)}).map(function(e,t){return new UC(r,e,e.id)}):[]}},Kp=["seeking","seeked","pause","playing","error"],VC=(function(){function s(i){var n=this;this.masterPlaylistController_=i.masterPlaylistController,this.tech_=i.tech,this.seekable=i.seekable,this.allowSeeksWithinUnsafeLiveWindow=i.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=i.liveRangeSafeTimeDelta,this.media=i.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=oi("PlaybackWatcher"),this.logger_("initialize");var e=function(){return n.monitorCurrentTime_()},t=function(){return n.monitorCurrentTime_()},a=function(){return n.techWaiting_()},o=function(){return n.cancelTimer_()},l=this.masterPlaylistController_,u=["main","subtitle","audio"],d={};u.forEach(function(m){d[m]={reset:function(){return n.resetSegmentDownloads_(m)},updateend:function(){return n.checkSegmentDownloads_(m)}},l[m+"SegmentLoader_"].on("appendsdone",d[m].updateend),l[m+"SegmentLoader_"].on("playlistupdate",d[m].reset),n.tech_.on(["seeked","seeking"],d[m].reset)});var f=function(x){["main","audio"].forEach(function(C){l[C+"SegmentLoader_"][x]("appended",n.seekingAppendCheck_)})};this.seekingAppendCheck_=function(){n.fixesBadSeeks_()&&(n.consecutiveUpdates=0,n.lastRecordedTime=n.tech_.currentTime(),f("off"))},this.clearSeekingAppendCheck_=function(){return f("off")},this.watchForBadSeeking_=function(){n.clearSeekingAppendCheck_(),f("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",a),this.tech_.on(Kp,o),this.tech_.on("canplay",t),this.tech_.one("play",e),this.dispose=function(){n.clearSeekingAppendCheck_(),n.logger_("dispose"),n.tech_.off("waiting",a),n.tech_.off(Kp,o),n.tech_.off("canplay",t),n.tech_.off("play",e),n.tech_.off("seeking",n.watchForBadSeeking_),n.tech_.off("seeked",n.clearSeekingAppendCheck_),u.forEach(function(m){l[m+"SegmentLoader_"].off("appendsdone",d[m].updateend),l[m+"SegmentLoader_"].off("playlistupdate",d[m].reset),n.tech_.off(["seeked","seeking"],d[m].reset)}),n.checkCurrentTimeTimeout_&&K.clearTimeout(n.checkCurrentTimeTimeout_),n.cancelTimer_()}}
48var r=s.prototype;return r.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&K.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=K.setTimeout(this.monitorCurrentTime_.bind(this),250)},r.resetSegmentDownloads_=function(n){var e=this.masterPlaylistController_[n+"SegmentLoader_"];this[n+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+n+" loader"),this[n+"StalledDownloads_"]=0,this[n+"Buffered_"]=e.buffered_()},r.checkSegmentDownloads_=function(n){var e=this.masterPlaylistController_,t=e[n+"SegmentLoader_"],a=t.buffered_(),o=L2(this[n+"Buffered_"],a);if(this[n+"Buffered_"]=a,o){this.resetSegmentDownloads_(n);return}this[n+"StalledDownloads_"]++,this.logger_("found #"+this[n+"StalledDownloads_"]+" "+n+" appends that did not increase buffer (possible stalled download)",{playlistId:t.playlist_&&t.playlist_.id,buffered:kn(a)}),!(this[n+"StalledDownloads_"]<10)&&(this.logger_(n+" loader stalled download exclusion"),this.resetSegmentDownloads_(n),this.tech_.trigger({type:"usage",name:"vhs-"+n+"-download-exclusion"}),n!=="subtitle"&&e.blacklistCurrentPlaylist({message:"Excessive "+n+" segment downloading detected."},1/0))},r.checkCurrentTime_=function(){if(!(this.tech_.paused()||this.tech_.seeking())){var n=this.tech_.currentTime(),e=this.tech_.buffered();if(this.lastRecordedTime===n&&(!e.length||n+_i>=e.end(e.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&n===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):n===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=n)}},r.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},r.fixesBadSeeks_=function(){var n=this.tech_.seeking();if(!n)return!1;var e=this.seekable(),t=this.tech_.currentTime(),a=this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow),o;if(a){var l=e.end(e.length-1);o=l}if(this.beforeSeekableWindow_(e,t)){var u=e.start(0);o=u+(u===e.end(0)?0:_i)}if(typeof o<"u")return this.logger_("Trying to seek outside of seekable at time "+t+" with "+("seekable range "+wy(e)+". Seeking to ")+(o+".")),this.tech_.setCurrentTime(o),!0;for(var d=this.masterPlaylistController_.sourceUpdater_,f=this.tech_.buffered(),m=d.audioBuffer?d.audioBuffered():null,x=d.videoBuffer?d.videoBuffered():null,C=this.media(),L=C.partTargetDuration?C.partTargetDuration:(C.targetDuration-fn)*2,E=[m,x],B=0;B<E.length;B++)if(E[B]){var q=Kf(E[B],t);if(q<L)return!1}var z=Us(f,t);return z.length===0?!1:(o=z.start(0)+_i,this.logger_("Buffered region starts ("+z.start(0)+") "+(" just beyond seek point ("+t+"). Seeking to "+o+".")),this.tech_.setCurrentTime(o),!0)},r.waiting_=function(){if(!this.techWaiting_()){var n=this.tech_.currentTime(),e=this.tech_.buffered(),t=Qn(e,n);if(t.length&&n+3<=t.end(0)){this.cancelTimer_(),this.tech_.setCurrentTime(n),this.logger_("Stopped at "+n+" while inside a buffered region "+("["+t.start(0)+" -> "+t.end(0)+"]. Attempting to resume ")+"playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"});return}}},r.techWaiting_=function(){var n=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking()||this.timer_!==null)return!0;if(this.beforeSeekableWindow_(n,e)){var t=n.end(n.length-1);return this.logger_("Fell out of live window at time "+e+". Seeking to "+("live point (seekable end) "+t)),this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var a=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,o=this.tech_.buffered(),l=this.videoUnderflow_({audioBuffered:a.audioBuffered(),videoBuffered:a.videoBuffered(),currentTime:e});if(l)return this.cancelTimer_(),this.tech_.setCurrentTime(e),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var u=Us(o,e);if(u.length>0){var d=u.start(0)-e;return this.logger_("Stopped at "+e+", setting timer for "+d+", seeking "+("to "+u.start(0))),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),d*1e3,e),!0}return!1},r.afterSeekableWindow_=function(n,e,t,a){if(a===void 0&&(a=!1),!n.length)return!1;var o=n.end(n.length-1)+_i,l=!t.endList;return l&&a&&(o=n.end(n.length-1)+t.targetDuration*3),e>o},r.beforeSeekableWindow_=function(n,e){return!!(n.length&&n.start(0)>0&&e<n.start(0)-this.liveRangeSafeTimeDelta)},r.videoUnderflow_=function(n){var e=n.videoBuffered,t=n.audioBuffered,a=n.currentTime;if(e){var o;if(e.length&&t.length){var l=Qn(e,a-3),u=Qn(e,a),d=Qn(t,a);d.length&&!u.length&&l.length&&(o={start:l.end(0),end:d.end(0)})}else{var f=Us(e,a);f.length||(o=this.gapFromVideoUnderflow_(e,a))}return o?(this.logger_("Encountered a gap in video from "+o.start+" to "+o.end+". "+("Seeking to current time "+a)),!0):!1}},r.skipTheGap_=function(n){var e=this.tech_.buffered(),t=this.tech_.currentTime(),a=Us(e,t);this.cancelTimer_(),!(a.length===0||t!==n)&&(this.logger_("skipTheGap_:","currentTime:",t,"scheduled currentTime:",n,"nextRange start:",a.start(0)),this.tech_.setCurrentTime(a.start(0)+fn),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},r.gapFromVideoUnderflow_=function(n,e){for(var t=D2(n),a=0;a<t.length;a++){var o=t.start(a),l=t.end(a);if(e-o<4&&e-o>2)return{start:o,end:l}}return null},s})(),HC={errorInterval:30,getSource:function(r){var i=this.tech({IWillNotUseThisInPlugins:!0}),n=i.currentSource_||this.currentSource();return r(n)}},jC=function s(r,i){var n=0,e=0,t=ae.mergeOptions(HC,i);r.ready(function(){r.trigger({type:"usage",name:"vhs-error-reload-initialized"}),r.trigger({type:"usage",name:"hls-error-reload-initialized"})});var a=function(){e&&r.currentTime(e)},o=function(m){m!=null&&(e=r.duration()!==1/0&&r.currentTime()||0,r.one("loadedmetadata",a),r.src(m),r.trigger({type:"usage",name:"vhs-error-reload"}),r.trigger({type:"usage",name:"hls-error-reload"}),r.play())},l=function(){if(Date.now()-n<t.errorInterval*1e3){r.trigger({type:"usage",name:"vhs-error-reload-canceled"}),r.trigger({type:"usage",name:"hls-error-reload-canceled"});return}if(!t.getSource||typeof t.getSource!="function"){ae.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return n=Date.now(),t.getSource.call(r,o)},u=function f(){r.off("loadedmetadata",a),r.off("error",l),r.off("dispose",f)},d=function(m){u(),s(r,m)};r.on("error",l),r.on("dispose",u),r.reloadSourceOnError=d},GC=function(r){jC(this,r)},c_="2.16.3",WC="6.0.1",zC="0.22.1",$C="4.8.0",KC="3.1.3",or={PlaylistLoader:Jn,Playlist:Pr,utils:iE,STANDARD_PLAYLIST_SELECTOR:Bp,INITIAL_PLAYLIST_SELECTOR:zE,lastBandwidthSelector:Bp,movingAverageBandwidthSelector:GE,comparePlaylistBandwidth:eh,comparePlaylistResolution:jE,xhr:Vy()};Object.keys(Qt).forEach(function(s){Object.defineProperty(or,s,{get:function(){return ae.log.warn("using Vhs."+s+" is UNSAFE be sure you know 
48what you are doing"),Qt[s]},set:function(i){if(ae.log.warn("using Vhs."+s+" is UNSAFE be sure you know what you are doing"),typeof i!="number"||i<0){ae.log.warn("value of Vhs."+s+" must be greater than or equal to 0");return}Qt[s]=i}})});var d_="videojs-vhs",f_=function(r,i){for(var n=i.media(),e=-1,t=0;t<r.length;t++)if(r[t].id===n.id){e=t;break}r.selectedIndex_=e,r.trigger({selectedIndex:e,type:"change"})},XC=function(r,i){i.representations().forEach(function(n){r.addQualityLevel(n)}),f_(r,i.playlists)};or.canPlaySource=function(){return ae.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var YC=function(r,i,n){if(!r)return r;var e={};i&&i.attributes&&i.attributes.CODECS&&(e=ho(pi(i.attributes.CODECS))),n&&n.attributes&&n.attributes.CODECS&&(e.audio=n.attributes.CODECS);var t=$a(e.video),a=$a(e.audio),o={};for(var l in r)o[l]={},a&&(o[l].audioContentType=a),t&&(o[l].videoContentType=t),i.contentProtection&&i.contentProtection[l]&&i.contentProtection[l].pssh&&(o[l].pssh=i.contentProtection[l].pssh),typeof r[l]=="string"&&(o[l].url=r[l]);return ae.mergeOptions(r,o)},QC=function(r,i){return r.reduce(function(n,e){if(!e.contentProtection)return n;var t=i.reduce(function(a,o){var l=e.contentProtection[o];return l&&l.pssh&&(a[o]={pssh:l.pssh}),a},{});return Object.keys(t).length&&n.push(t),n},[])},JC=function(r){var i=r.player,n=r.sourceKeySystems,e=r.audioMedia,t=r.mainPlaylists;if(!i.eme.initializeMediaKeys)return Promise.resolve();var a=e?t.concat([e]):t,o=QC(a,Object.keys(n)),l=[],u=[];return o.forEach(function(d){u.push(new Promise(function(f,m){i.tech_.one("keysessioncreated",f)})),l.push(new Promise(function(f,m){i.eme.initializeMediaKeys({keySystems:d},function(x){if(x){m(x);return}f()})}))}),Promise.race([Promise.all(l),Promise.race(u)])},ZC=function(r){var i=r.player,n=r.sourceKeySystems,e=r.media,t=r.audioMedia,a=YC(n,e,t);return a?(i.currentSource().keySystems=a,a&&!i.eme?(ae.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},h_=function(){if(!K.localStorage)return null;var r=K.localStorage.getItem(d_);if(!r)return null;try{return JSON.parse(r)}catch{return null}},e1=function(r){if(!K.localStorage)return!1;var i=h_();i=i?ae.mergeOptions(i,r):r;try{K.localStorage.setItem(d_,JSON.stringify(i))}catch{return!1}return i},t1=function(r){return r.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(r.substring(r.indexOf(",")+1)):r};or.supportsNativeHls=(function(){if(!xe||!xe.createElement)return!1;var s=xe.createElement("video");if(!ae.getTech("Html5").isSupported())return!1;var r=["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"];return r.some(function(i){return/maybe|probably/i.test(s.canPlayType(i))})})();or.supportsNativeDash=(function(){return!xe||!xe.createElement||!ae.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(xe.createElement("video").canPlayType("application/dash+xml"))})();or.supportsTypeNatively=function(s){return s==="hls"?or.supportsNativeHls:s==="dash"?or.supportsNativeDash:!1};or.isSupported=function(){return ae.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var r1=ae.getComponent("Component"),rh=(function(s){Ee(r,s);function r(n,e,t){var a;if(a=s.call(this,e,ae.mergeOptions(t.hls,t.vhs))||this,t.hls&&Object.keys(t.hls).length&&ae.log.warn("Using hls options is deprecated. Please rename `hls` to `vhs` in your options object."),typeof t.initialBandwidth=="number"&&(a.options_.bandwidth=t.initialBandwidth),a.logger_=oi("VhsHandler"),e.options_&&e.options_.playerId){var o=ae(e.options_.playerId);o.hasOwnProperty("hls")||Object.defineProperty(o,"hls",{get:function(){return ae.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),e.trigger({type:"usage",name:"hls-player-access"}),Ge(a)},configurable:!0}),o.hasOwnProperty("vhs")||Object.defineProperty(o,"vhs",{get:function(){return ae.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),e.trigger({type:"usage",name:"vhs-player-access"}),Ge(a)},configurable:!0}),o.hasOwnProperty("dash")||Object.defineProperty(o,"dash",{get:function(){return ae.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),Ge(a)},configurable:!0}),a.player_=o}if(a.tech_=e,a.source_=n,a.stats={},a.ignoreNextSeekingEvent_=!1,a.setOptions_(),a.options_.overrideNative&&e.overrideNativeAudioTracks&&e.overrideNativeVideoTracks)e.overrideNativeAudioTracks(!0),e.overrideNativeVideoTracks(!0);else if(a.options_.overrideNative&&(e.featuresNativeVideoTracks||e.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return a.on(xe,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(l){var u=xe.fullscreenElement||xe.webkitFullscreenElement||xe.mozFullScreenElement||xe.msFullscreenElement;u&&u.contains(a.tech_.el())?a.masterPlaylistController_.fastQualityChange_():a.masterPlaylistController_.checkABR_()}
48),a.on(a.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),a.on(a.tech_,"error",function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),a.on(a.tech_,"play",a.play),a}var i=r.prototype;return i.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=this.options_.handleManifestRedirects!==!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,typeof this.options_.blacklistDuration!="number"&&(this.options_.blacklistDuration=300),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){var t=h_();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=Qt.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Qt.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta","experimentalLLHLS","useNetworkInformationApi","useDtsForTimestampOffset","experimentalExactManifestTimings","experimentalLeastPixelDiffSelector"].forEach(function(a){typeof e.source_[a]<"u"&&(e.options_[a]=e.source_[a])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},i.src=function(e,t){var a=this;if(e){this.setOptions_(),this.options_.src=t1(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=or,this.options_.sourceType=n0(t),this.options_.seekTo=function(u){a.tech_.setCurrentTime(u)},this.options_.smoothQualityChange&&ae.log.warn("smoothQualityChange is deprecated and will be removed in the next major version"),this.masterPlaylistController_=new NC(this.options_);var o=ae.mergeOptions({liveRangeSafeTimeDelta:_i},this.options_,{seekable:function(){return a.seekable()},media:function(){return a.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new VC(o),this.masterPlaylistController_.on("error",function(){var u=ae.players[a.tech_.options_.playerId],d=a.masterPlaylistController_.error;typeof d=="object"&&!d.code?d.code=3:typeof d=="string"&&(d={message:d,code:3}),u.error(d)});var l=this.options_.experimentalBufferBasedABR?or.movingAverageBandwidthSelector(.55):or.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):l.bind(this),this.masterPlaylistController_.selectInitialPlaylist=or.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(d){this.masterPlaylistController_.selectPlaylist=d.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(d){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=d,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){var d=this.masterPlaylistController_.mainSegmentLoader_.bandwidth,f=K.navigator.connection||K.navigator.mozConnection||K.navigator.webkitConnection,m=1e7;if(this.options_.useNetworkInformationApi&&f){var x=f.downlink*1e3*1e3;x>=m&&d>=m?d=Math.max(d,x):d=x}return d}
48,set:function(d){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=d,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var d=1/(this.bandwidth||1),f;this.throughput>0?f=1/this.throughput:f=0;var m=Math.floor(1/(d+f));return m},set:function(){ae.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return a.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return a.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return a.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return a.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return a.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return a.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return a.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return a.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return a.masterPlaylistController_.mediaAppends_()||0},enumerable:!0},mainAppendsToLoadedData:{get:function(){return a.masterPlaylistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return a.masterPlaylistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return a.masterPlaylistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return a.masterPlaylistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return kn(a.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return a.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return a.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return a.tech_.name_},enumerable:!0},duration:{get:function(){return a.tech_.duration()},enumerable:!0},master:{get:function(){return a.playlists.master},enumerable:!0},playerDimensions:{get:function(){return a.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return kn(a.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return a.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){a.options_.useBandwidthFromLocalStorage&&e1({bandwidth:a.bandwidth,throughput:Math.round(a.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){qC(a)}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){a.setupEme_()}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=K.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},i.createKeySessions_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),JC({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(a){e.logger_("error while creating EME key session",a),e.player_.error({message:"Failed to initialize media keys for EME",code:3})})},i.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()},i.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,a=ZC({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});
48if(this.player_.tech_.on("keystatuschange",function(o){if(o.status==="output-restricted"){var l=e.masterPlaylistController_.master();if(!(!l||!l.playlists)){var u=[];if(l.playlists.forEach(function(f){f&&f.attributes&&f.attributes.RESOLUTION&&f.attributes.RESOLUTION.height>=720&&(!f.excludeUntil||f.excludeUntil<1/0)&&(f.excludeUntil=1/0,u.push(f))}),u.length){var d;(d=ae.log).warn.apply(d,['DRM keystatus changed to "output-restricted." Removing the following HD playlists that will most likely fail to play and clearing the buffer. This may be due to HDCP restrictions on the stream and the capabilities of the current device.'].concat(u)),e.masterPlaylistController_.fastQualityChange_()}}}}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),ae.browser.IE_VERSION===11||!a){this.masterPlaylistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()},i.setupQualityLevels_=function(){var e=this,t=ae.players[this.tech_.options_.playerId];
48!t||!t.qualityLevels||this.qualityLevels_||(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){XC(e.qualityLevels_,e)}),this.playlists.on("mediachange",function(){f_(e.qualityLevels_,e.playlists)}))},r.version=function(){return{"@videojs/http-streaming":c_,"mux.js":WC,"mpd-parser":zC,"m3u8-parser":$C,"aes-decrypter":KC}},i.version=function(){return this.constructor.version()},i.canChangeType=function(){return l_.canChangeType()},i.play=function(){this.masterPlaylistController_.play()},i.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},i.duration=function(){return this.masterPlaylistController_.duration()},i.seekable=function(){return this.masterPlaylistController_.seekable()},i.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&K.URL.revokeObjectURL&&(K.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),s.prototype.dispose.call(this)},i.convertToProgramTime=function(e,t){return cE({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},i.seekToProgramTime=function(e,t,a,o){return a===void 0&&(a=!0),o===void 0&&(o=2),dE({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:o,pauseAfterSeek:a,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},r})(r1),Za={name:"videojs-http-streaming",VERSION:c_,canHandleSource:function(r,i){i===void 0&&(i={});var n=ae.mergeOptions(ae.options,i);return Za.canPlayType(r.type,n)},handleSource:function(r,i,n){n===void 0&&(n={});var e=ae.mergeOptions(ae.options,n);return i.vhs=new rh(r,i,e),ae.hasOwnProperty("hls")||Object.defineProperty(i,"hls",{get:function(){return ae.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),i.vhs},configurable:!0}),i.vhs.xhr=Vy(),i.vhs.src(r.src,r.type),i.vhs},canPlayType:function(r,i){var n=n0(r);if(!n)return"";var e=Za.getOverrideNative(i),t=or.supportsTypeNatively(n),a=!t||e;return a?"maybe":""},getOverrideNative:function(r){r===void 0&&(r={});var i=r,n=i.vhs,e=n===void 0?{}:n,t=i.hls,a=t===void 0?{}:t,o=!(ae.browser.IS_ANY_SAFARI||ae.browser.IS_IOS),l=e.overrideNative,u=l===void 0?o:l,d=a.overrideNative,f=d===void 0?!1:d;return f||u}},i1=function(){return js("avc1.4d400d,mp4a.40.2")};i1()&&ae.getTech("Html5").registerSourceHandler(Za,0);ae.VhsHandler=rh;Object.defineProperty(ae,"HlsHandler",{get:function(){return ae.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),rh},configurable:!0});ae.VhsSourceHandler=Za;Object.defineProperty(ae,"HlsSourceHandler",{get:function(){return ae.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Za},configurable:!0});ae.Vhs=or;Object.defineProperty(ae,"Hls",{get:function(){return ae.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),or},configurable:!0});ae.use||(ae.registerComponent("Hls",or),ae.registerComponent("Vhs",or));ae.options.vhs=ae.options.vhs||{};ae.options.hls=ae.options.hls||{};if(!ae.getPlugin||!ae.getPlugin("reloadSourceOnError")){var n1=ae.registerPlugin||ae.plugin;n1("reloadSourceOnError",GC)}var $u={exports:{}},Ks={exports:{}},a1=Ks.exports,Xp;function s1(){return Xp||(Xp=1,(function(s,r){(function(i,n){s.exports=n()})(a1,(function(){return(function(i){var n={};function e(t){if(n[t])return n[t].exports;var a=n[t]={i:t,l:!1,exports:{}};return i[t].call(a.exports,a,a.exports,e),a.l=!0,a.exports}return e.m=i,e.c=n,e.d=function(t,a,o){e.o(t,a)||Object.defineProperty(t,a,{enumerable:!0,get:o})},e.r=function(t){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,a){if(1&a&&(t=e(t)),8&a||4&a&&typeof t=="object"&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&a&&typeof t!="string")for(var l in t)e.d(o,l,(function(u){return t[u]}).bind(null,l));return o},e.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,"a",a),a},e.o=function(t,a){return Object.prototype.hasOwnProperty.call(t,a)},e.p="",e(e.s=90)})({17:function(i,n,e){n.__esModule=!0,n.default=void 0;var t=e(18),a=(function(){function o(){}return o.getFirstMatch=function(l,u){var d=u.match(l);return d&&d.length>0&&d[1]||""},o.getSecondMatch=function(l,u){var d=u.match(l);return d&&d.length>1&&d[2]||""},o.matchAndReturnConst=function(l,u,d){if(l.test(u))return d},o.getWindowsVersionName=function(l){switch(l){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},o.getMacOSVersionName=function(l){var u=l.split(".").splice(0,2).map((function(d){return parseInt(d,10)||0}));if(u.push(0),u[0]===10)switch(u[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";
48case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},o.getAndroidVersionName=function(l){var u=l.split(".").splice(0,2).map((function(d){return parseInt(d,10)||0}));if(u.push(0),!(u[0]===1&&u[1]<5))return u[0]===1&&u[1]<6?"Cupcake":u[0]===1&&u[1]>=6?"Donut":u[0]===2&&u[1]<2?"Eclair":u[0]===2&&u[1]===2?"Froyo":u[0]===2&&u[1]>2?"Gingerbread":u[0]===3?"Honeycomb":u[0]===4&&u[1]<1?"Ice Cream Sandwich":u[0]===4&&u[1]<4?"Jelly Bean":u[0]===4&&u[1]>=4?"KitKat":u[0]===5?"Lollipop":u[0]===6?"Marshmallow":u[0]===7?"Nougat":u[0]===8?"Oreo":u[0]===9?"Pie":void 0},o.getVersionPrecision=function(l){return l.split(".").length},o.compareVersions=function(l,u,d){d===void 0&&(d=!1);var f=o.getVersionPrecision(l),m=o.getVersionPrecision(u),x=Math.max(f,m),C=0,L=o.map([l,u],(function(E){var B=x-o.getVersionPrecision(E),q=E+new Array(B+1).join(".0");return o.map(q.split("."),(function(z){return new Array(20-z.length).join("0")+z})).reverse()}));for(d&&(C=x-Math.min(f,m)),x-=1;x>=C;){if(L[0][x]>L[1][x])return 1;if(L[0][x]===L[1][x]){if(x===C)return 0;x-=1}else if(L[0][x]<L[1][x])return-1}},o.map=function(l,u){var d,f=[];if(Array.prototype.map)return Array.prototype.map.call(l,u);for(d=0;d<l.length;d+=1)f.push(u(l[d]));return f},o.find=function(l,u){var d,f;if(Array.prototype.find)return Array.prototype.find.call(l,u);for(d=0,f=l.length;d<f;d+=1){var m=l[d];if(u(m,d))return m}},o.assign=function(l){for(var u,d,f=l,m=arguments.length,x=new Array(m>1?m-1:0),C=1;C<m;C++)x[C-1]=arguments[C];if(Object.assign)return Object.assign.apply(Object,[l].concat(x));var L=function(){var E=x[u];
48typeof E=="object"&&E!==null&&Object.keys(E).forEach((function(B){f[B]=E[B]}))};for(u=0,d=x.length;u<d;u+=1)L();return l},o.getBrowserAlias=function(l){return t.BROWSER_ALIASES_MAP[l]},o.getBrowserTypeByAlias=function(l){return t.BROWSER_MAP[l]||""},o})();n.default=a,i.exports=n.default},18:function(i,n,e){n.__esModule=!0,n.ENGINE_MAP=n.OS_MAP=n.PLATFORMS_MAP=n.BROWSER_MAP=n.BROWSER_ALIASES_MAP=void 0,n.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},n.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},n.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},n.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},n.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(i,n,e){n.__esModule=!0,n.default=void 0;var t,a=(t=e(91))&&t.__esModule?t:{default:t},o=e(18);function l(d,f){for(var m=0;m<f.length;m++){var x=f[m];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(d,x.key,x)}}var u=(function(){function d(){}var f,m,x;return d.getParser=function(C,L){if(L===void 0&&(L=!1),typeof C!="string")throw new Error("UserAgent should be a string");return new a.default(C,L)},d.parse=function(C){return new a.default(C).getResult()},f=d,x=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(m=null)&&l(f.prototype,m),x&&l(f,x),d})();n.default=u,i.exports=n.default},91:function(i,n,e){n.__esModule=!0,n.default=void 0;var t=d(e(92)),a=d(e(93)),o=d(e(94)),l=d(e(95)),u=d(e(17));function d(m){return m&&m.__esModule?m:{default:m}}var f=(function(){function m(C,L){if(L===void 0&&(L=!1),C==null||C==="")throw new Error("UserAgent parameter can't be empty");this._ua=C,this.parsedResult={},L!==!0&&this.parse()}var x=m.prototype;return x.getUA=function(){return this._ua},x.test=function(C){return C.test(this._ua)},x.parseBrowser=function(){var C=this;this.parsedResult.browser={};var L=u.default.find(t.default,(function(E){if(typeof E.test=="function")return E.test(C);if(Array.isArray(E.test))return E.test.some((function(B){return C.test(B)}));throw new Error("Browser's test function is not valid")}));return L&&(this.parsedResult.browser=L.describe(this.getUA())),this.parsedResult.browser},x.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},x.getBrowserName=function(C){return C?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},x.getBrowserVersion=function(){return this.getBrowser().version},x.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},x.parseOS=function(){var C=this;this.parsedResult.os={};var L=u.default.find(a.default,(function(E){if(typeof E.test=="function")return E.test(C);if(Array.isArray(E.test))return E.test.some((function(B){return C.test(B)}));
48throw new Error("Browser's test function is not valid")}));return L&&(this.parsedResult.os=L.describe(this.getUA())),this.parsedResult.os},x.getOSName=function(C){var L=this.getOS().name;return C?String(L).toLowerCase()||"":L||""},x.getOSVersion=function(){return this.getOS().version},x.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},x.getPlatformType=function(C){C===void 0&&(C=!1);var L=this.getPlatform().type;return C?String(L).toLowerCase()||"":L||""},x.parsePlatform=function(){var C=this;this.parsedResult.platform={};var L=u.default.find(o.default,(function(E){if(typeof E.test=="function")return E.test(C);if(Array.isArray(E.test))return E.test.some((function(B){return C.test(B)}));throw new Error("Browser's test function is not valid")}));return L&&(this.parsedResult.platform=L.describe(this.getUA())),this.parsedResult.platform},x.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},x.getEngineName=function(C){return C?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},x.parseEngine=function(){var C=this;this.parsedResult.engine={};var L=u.default.find(l.default,(function(E){if(typeof E.test=="function")return E.test(C);if(Array.isArray(E.test))return E.test.some((function(B){return C.test(B)}));throw new Error("Browser's test function is not valid")}));return L&&(this.parsedResult.engine=L.describe(this.getUA())),this.parsedResult.engine},x.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},x.getResult=function(){return u.default.assign({},this.parsedResult)},x.satisfies=function(C){var L=this,E={},B=0,q={},z=0;if(Object.keys(C).forEach((function(j){var X=C[j];typeof X=="string"?(q[j]=X,z+=1):typeof X=="object"&&(E[j]=X,B+=1)})),B>0){var U=Object.keys(E),F=u.default.find(U,(function(j){return L.isOS(j)}));if(F){var G=this.satisfies(E[F]);if(G!==void 0)return G}var O=u.default.find(U,(function(j){return L.isPlatform(j)}));if(O){var H=this.satisfies(E[O]);if(H!==void 0)return H}}if(z>0){var A=Object.keys(q),D=u.default.find(A,(function(j){return L.isBrowser(j,!0)}));if(D!==void 0)return this.compareVersion(q[D])}},x.isBrowser=function(C,L){L===void 0&&(L=!1);var E=this.getBrowserName().toLowerCase(),B=C.toLowerCase(),q=u.default.getBrowserTypeByAlias(B);return L&&q&&(B=q.toLowerCase()),B===E},x.compareVersion=function(C){var L=[0],E=C,B=!1,q=this.getBrowserVersion();if(typeof q=="string")return C[0]===">"||C[0]==="<"?(E=C.substr(1),C[1]==="="?(B=!0,E=C.substr(2)):L=[],C[0]===">"?L.push(1):L.push(-1)):C[0]==="="?E=C.substr(1):C[0]==="~"&&(B=!0,E=C.substr(1)),L.indexOf(u.default.compareVersions(q,E,B))>-1},x.isOS=function(C){return this.getOSName(!0)===String(C).toLowerCase()},x.isPlatform=function(C){return this.getPlatformType(!0)===String(C).toLowerCase()},x.isEngine=function(C){return this.getEngineName(!0)===String(C).toLowerCase()},x.is=function(C,L){return L===void 0&&(L=!1),this.isBrowser(C,L)||this.isOS(C)||this.isPlatform(C)},x.some=function(C){var L=this;return C===void 0&&(C=[]),C.some((function(E){return L.is(E)}))},m})();n.default=f,i.exports=n.default},92:function(i,n,e){n.__esModule=!0,n.default=void 0;var t,a=(t=e(17))&&t.__esModule?t:{default:t},o=/version\/(\d+(\.?_?\d+)+)/i,l=[{test:[/googlebot/i],describe:function(u){var d={name:"Googlebot"},f=a.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,u)||a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/opera/i],describe:function(u){var d={name:"Opera"},f=a.default.getFirstMatch(o,u)||a.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/opr\/|opios/i],describe:function(u){var d={name:"Opera"},f=a.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,u)||a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/SamsungBrowser/i],describe:function(u){var d={name:"Samsung Internet for Android"},f=a.default.getFirstMatch(o,u)||a.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/Whale/i],describe:function(u){var d={name:"NAVER Whale Browser"},f=a.default.getFirstMatch(o,u)||a.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/PaleMoon/i],describe:function(u){var d={name:"Pale Moon"},f=a.default.getFirstMatch(o,u)||a.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/MZBrowser/i],describe:function(u){var d={name:"MZ Browser"},f=a.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,u)||a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/focus/i],describe:function(u){var d={name:"Focus"},f=a.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,u)||a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/swing/i],describe:function(u){var d={name:"Swing"},f=a.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,u)||a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/coast/i],describe:function(u){var d={name:"Opera Coast"},f=a.default.getFirstMatch(o,u)||a.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(u){var d={name:"Opera Touch"},f=a.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,u)||a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/yabrowser/i],describe:function(u){var d={name:"Yandex Browser"},f=a.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,u)||a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/ucbrowser/i],describe:function(u){var d={name:"UC Browser"},f=a.default.getFirstMatch(o,u)||a.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/Maxthon|mxios/i],describe:function(u){var d={name:"Maxthon"}
vendor: 7,805 bytes, line 48
48,f=a.default.getFirstMatch(o,u)||a.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/epiphany/i],describe:function(u){var d={name:"Epiphany"},f=a.default.getFirstMatch(o,u)||a.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/puffin/i],describe:function(u){var d={name:"Puffin"},f=a.default.getFirstMatch(o,u)||a.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/sleipnir/i],describe:function(u){var d={name:"Sleipnir"},f=a.default.getFirstMatch(o,u)||a.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/k-meleon/i],describe:function(u){var d={name:"K-Meleon"},f=a.default.getFirstMatch(o,u)||a.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/micromessenger/i],describe:function(u){var d={name:"WeChat"},f=a.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,u)||a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/qqbrowser/i],describe:function(u){var d={name:/qqbrowserlite/i.test(u)?"QQ Browser Lite":"QQ Browser"},f=a.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,u)||a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/msie|trident/i],describe:function(u){var d={name:"Internet Explorer"},f=a.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/\sedg\//i],describe:function(u){var d={name:"Microsoft Edge"},f=a.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/edg([ea]|ios)/i],describe:function(u){var d={name:"Microsoft Edge"},f=a.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/vivaldi/i],describe:function(u){var d={name:"Vivaldi"},f=a.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/seamonkey/i],describe:function(u){var d={name:"SeaMonkey"},f=a.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/sailfish/i],describe:function(u){var d={name:"Sailfish"},f=a.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,u);return f&&(d.version=f),d}},{test:[/silk/i],describe:function(u){var d={name:"Amazon Silk"},f=a.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/phantom/i],describe:function(u){var d={name:"PhantomJS"},f=a.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/slimerjs/i],describe:function(u){var d={name:"SlimerJS"},f=a.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(u){var d={name:"BlackBerry"},f=a.default.getFirstMatch(o,u)||a.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/(web|hpw)[o0]s/i],describe:function(u){var d={name:"WebOS Browser"},f=a.default.getFirstMatch(o,u)||a.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/bada/i],describe:function(u){var d={name:"Bada"},f=a.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/tizen/i],describe:function(u){var d={name:"Tizen"},f=a.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,u)||a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/qupzilla/i],describe:function(u){var d={name:"QupZilla"},f=a.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,u)||a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/firefox|iceweasel|fxios/i],describe:function(u){var d={name:"Firefox"},f=a.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/electron/i],describe:function(u){var d={name:"Electron"},f=a.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/MiuiBrowser/i],describe:function(u){var d={name:"Miui"},f=a.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/chromium/i],describe:function(u){var d={name:"Chromium"},f=a.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,u)||a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/chrome|crios|crmo/i],describe:function(u){var d={name:"Chrome"},f=a.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/GSA/i],describe:function(u){var d={name:"Google Search"},f=a.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:function(u){var d=!u.test(/like android/i),f=u.test(/android/i);return d&&f},describe:function(u){var d={name:"Android Browser"},f=a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/playstation 4/i],describe:function(u){var d={name:"PlayStation 4"},f=a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/safari|applewebkit/i],describe:function(u){var d={name:"Safari"},f=a.default.getFirstMatch(o,u);return f&&(d.version=f),d}},{test:[/.*/i],describe:function(u){var d=u.search("\\(")!==-1?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:a.default.getFirstMatch(d,u),version:a.default.getSecondMatch(d,u)}}}];n.default=l,i.exports=n.default},93:function(i,n,e){n.__esModule=!0,n.default=void 0;var t,a=(t=e(17))&&t.__esModule?t:{default:t},o=e(18),l=[{test:[/Roku\/DVP/],describe:function(u){var d=a.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,u);return{name:o.OS_MAP.Roku,version:d}}},{test:[/windows phone/i],describe:function(u){var d=a.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,u);return{name:o.OS_MAP.WindowsPhone,version:d}}},{test:[/windows /i],describe:function(u){var d=a.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,u),f=a.default.getWindowsVersionName(d);return{name:o.OS_MAP.Windows,version:d,versionName:f}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(u){var d={name:o.OS_MAP.iOS},f=a.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,u);return f&&(d.version=f),d}},{test:[/macintosh/i],describe:function(u){var d=a.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,u).replace(/[_\s]/g,"."),f=a.default.getMacOSVersionName(d),m={name:o.OS_MAP.MacOS,version:d};return f&&(m.versionName=f),m}},{test:[/(ipod|iphone|ipad)/i],describe:function(u){var d=a.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,u).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:d}}},{test:function(u){var d=!u.test(/like android/i),f=u.test(/android/i);return d&&f},describe:function(u){var d=a.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,u),f=a.default.getAndroidVersionName(d),m={name:o.OS_MAP.Android,version:d};return f&&(m.versionName=f),m}},{test:[/(web|hpw)[o0]s/i],describe:function(u){var d=a.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,u),f={name:o.OS_MAP.WebOS};return d&&d.length&&(f.version=d),f}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(u){var d=a.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,u)||a.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,u)||a.default.getFirstMatch(/\bbb(\d+)/i,u);return{name:o.OS_MAP.BlackBerry,version:d}}},{test:[/bada/i],describe:function(u){var d=a.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,u);return{name:o.OS_MAP.Bada,version:d}}},{test:[/tizen/i],describe:function(u){var d=a.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,u);return{name:o.OS_MAP.Tizen,version:d}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(u){var d=a.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,u);
48return{name:o.OS_MAP.PlayStation4,version:d}}}];n.default=l,i.exports=n.default},94:function(i,n,e){n.__esModule=!0,n.default=void 0;var t,a=(t=e(17))&&t.__esModule?t:{default:t},o=e(18),l=[{test:[/googlebot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/huawei/i],describe:function(u){var d=a.default.getFirstMatch(/(can-l01)/i,u)&&"Nova",f={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return d&&(f.model=d),f}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(u){var d=u.test(/ipod|iphone/i),f=u.test(/like (ipod|iphone)/i);return d&&!f},describe:function(u){var d=a.default.getFirstMatch(/(ipod|iphone)/i,u);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:d}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(u){var d=a.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,u),f={type:o.PLATFORMS_MAP.mobile,vendor:"Nokia"};return d&&(f.model=d),f}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(u){return u.getBrowserName(!0)==="blackberry"},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(u){return u.getBrowserName(!0)==="bada"},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(u){return u.getBrowserName()==="windows phone"},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(u){var d=Number(String(u.getOSVersion()).split(".")[0]);return u.getOSName(!0)==="android"&&d>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(u){return u.getOSName(!0)==="android"},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(u){return u.getOSName(!0)==="macos"},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(u){return u.getOSName(!0)==="windows"},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(u){return u.getOSName(!0)==="linux"},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(u){return u.getOSName(!0)==="playstation 4"},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(u){return u.getOSName(!0)==="roku"},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];n.default=l,i.exports=n.default},95:function(i,n,e){n.__esModule=!0,n.default=void 0;var t,a=(t=e(17))&&t.__esModule?t:{default:t},o=e(18),l=[{test:function(u){return u.getBrowserName(!0)==="microsoft edge"},describe:function(u){if(/\sedg\//i.test(u))return{name:o.ENGINE_MAP.Blink};var d=a.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,u);return{name:o.ENGINE_MAP.EdgeHTML,version:d}}},{test:[/trident/i],describe:function(u){var d={name:o.ENGINE_MAP.Trident},f=a.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:function(u){return u.test(/presto/i)},describe:function(u){var d={name:o.ENGINE_MAP.Presto},f=a.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:function(u){var d=u.test(/gecko/i),f=u.test(/like gecko/i);return d&&!f},describe:function(u){var d={name:o.ENGINE_MAP.Gecko},f=a.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(u){var d={name:o.ENGINE_MAP.WebKit},f=a.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,u);return f&&(d.version=f),d}}];n.default=l,i.exports=n.default}})}))})(Ks)),Ks.exports}var Ku={exports:{}},Xu={exports:{}},Yu={exports:{}},Yp;function ih(){return Yp||(Yp=1,(function(s){function r(i){"@babel/helpers - typeof";return s.exports=r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},s.exports.__esModule=!0,s.exports.default=s.exports,r(i)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports})(Yu)),Yu.exports}var Qu={exports:{}},Qp;function o1(){return Qp||(Qp=1,(function(s){var r=ih().default;function i(n,e){if(r(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var a=t.call(n,e||"default");if(r(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}s.exports=i,s.exports.__esModule=!0,s.exports.default=s.exports})(Qu)),Qu.exports}var Jp;function u1(){return Jp||(Jp=1,(function(s){var r=ih().default,i=o1();function n(e){var t=i(e,"string");return r(t)=="symbol"?t:t+""}s.exports=n,s.exports.__esModule=!0,s.exports.default=s.exports}
48)(Xu)),Xu.exports}var Zp;function l1(){return Zp||(Zp=1,(function(s){var r=u1();function i(e,t){for(var a=0;a<t.length;a++){var o=t[a];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}function n(e,t,a){return t&&i(e.prototype,t),a&&i(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}s.exports=n,s.exports.__esModule=!0,s.exports.default=s.exports})(Ku)),Ku.exports}var Ju={exports:{}},em;function c1(){return em||(em=1,(function(s){function r(n,e,t,a,o,l,u){try{var d=n[l](u),f=d.value}catch(m){return void t(m)}d.done?e(f):Promise.resolve(f).then(a,o)}function i(n){return function(){var e=this,t=arguments;return new Promise(function(a,o){var l=n.apply(e,t);function u(f){r(l,a,o,u,d,"next",f)}function d(f){r(l,a,o,u,d,"throw",f)}u(void 0)})}}s.exports=i,s.exports.__esModule=!0,s.exports.default=s.exports})(Ju)),Ju.exports}var Zu={exports:{}},el={exports:{}},tm;function p_(){return tm||(tm=1,(function(s){function r(i,n){this.v=i,this.k=n}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports})(el)),el.exports}var tl={exports:{}},rl={exports:{}},rm;function m_(){return rm||(rm=1,(function(s){function r(i,n,e,t){var a=Object.defineProperty;try{a({},"",{})}catch{a=0}s.exports=r=function(l,u,d,f){function m(x,C){r(l,x,function(L){return this._invoke(x,C,L)})}u?a?a(l,u,{value:d,enumerable:!f,configurable:!f,writable:!f}):l[u]=d:(m("next",0),m("throw",1),m("return",2))},s.exports.__esModule=!0,s.exports.default=s.exports,r(i,n,e,t)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports})(rl)),rl.exports}var im;function v_(){return im||(im=1,(function(s){var r=m_();function i(){var n,e,t=typeof Symbol=="function"?Symbol:{},a=t.iterator||"@@iterator",o=t.toStringTag||"@@toStringTag";function l(E,B,q,z){var U=B&&B.prototype instanceof d?B:d,F=Object.create(U.prototype);return r(F,"_invoke",(function(G,O,H){var A,D,j,X=0,J=H||[],ne=!1,se={p:0,n:0,v:n,a:ue,f:ue.bind(n,4),d:function(te,le){return A=te,D=0,j=n,se.n=le,u}};function ue(oe,te){for(D=oe,j=te,e=0;!ne&&X&&!le&&e<J.length;e++){var le,re=J[e],ce=se.p,be=re[2];oe>3?(le=be===te)&&(j=re[(D=re[4])?5:(D=3,3)],re[4]=re[5]=n):re[0]<=ce&&((le=oe<2&&ce<re[1])?(D=0,se.v=te,se.n=re[1]):ce<be&&(le=oe<3||re[0]>te||te>be)&&(re[4]=oe,re[5]=te,se.n=be,D=0))}if(le||oe>1)return u;throw ne=!0,te}return function(oe,te,le){if(X>1)throw TypeError("Generator is already running");for(ne&&te===1&&ue(te,le),D=te,j=le;(e=D<2?n:j)||!ne;){A||(D?D<3?(D>1&&(se.n=-1),ue(D,j)):se.n=j:se.v=j);try{if(X=2,A){if(D||(oe="next"),e=A[oe]){if(!(e=e.call(A,j)))throw TypeError("iterator result is not an object");if(!e.done)return e;j=e.value,D<2&&(D=0)}else D===1&&(e=A.return)&&e.call(A),D<2&&(j=TypeError("The iterator does not provide a '"+oe+"' method"),D=1);A=n}else if((e=(ne=se.n<0)?j:G.call(O,se))!==u)break}catch(re){A=n,D=1,j=re}finally{X=1}}return{value:e,done:ne}}})(E,q,z),!0),F}var u={};function d(){}function f(){}function m(){}e=Object.getPrototypeOf;var x=[][a]?e(e([][a]())):(r(e={},a,function(){return this}),e),C=m.prototype=d.prototype=Object.create(x);function L(E){return Object.setPrototypeOf?Object.setPrototypeOf(E,m):(E.__proto__=m,r(E,o,"GeneratorFunction")),E.prototype=Object.create(C),E}return f.prototype=m,r(C,"constructor",m),r(m,"constructor",f),f.displayName="GeneratorFunction",r(m,o,"GeneratorFunction"),r(C),r(C,o,"Generator"),r(C,a,function(){return this}),r(C,"toString",function(){return"[object Generator]"}),(s.exports=i=function(){return{w:l,m:L}},s.exports.__esModule=!0,s.exports.default=s.exports)()}s.exports=i,s.exports.__esModule=!0,s.exports.default=s.exports})(tl)),tl.exports}var il={exports:{}},nl={exports:{}},al={exports:{}},nm;function g_(){return nm||(nm=1,(function(s){var r=p_(),i=m_();function n(e,t){function a(l,u,d,f){try{var m=e[l](u),x=m.value;return x instanceof r?t.resolve(x.v).then(function(C){a("next",C,d,f)},function(C){a("throw",C,d,f)}):t.resolve(x).then(function(C){m.value=C,d(m)},function(C){return a("throw",C,d,f)})}catch(C){f(C)}}var o;this.next||(i(n.prototype),i(n.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(l,u,d){function f(){return new t(function(m,x){a(l,d,m,x)})}return o=o?o.then(f,f):f()},!0)}s.exports=n,s.exports.__esModule=!0,s.exports.default=s.exports})(al)),al.exports}var am;function y_(){return am||(am=1,(function(s){var r=v_(),i=g_();function n(e,t,a,o,l){return new i(r().w(e,t,a,o),l||Promise)}s.exports=n,s.exports.__esModule=!0,s.exports.default=s.exports}
48)(nl)),nl.exports}var sm;function d1(){return sm||(sm=1,(function(s){var r=y_();function i(n,e,t,a,o){var l=r(n,e,t,a,o);return l.next().then(function(u){return u.done?u.value:l.next()})}s.exports=i,s.exports.__esModule=!0,s.exports.default=s.exports})(il)),il.exports}var sl={exports:{}},om;function f1(){return om||(om=1,(function(s){function r(i){var n=Object(i),e=[];for(var t in n)e.unshift(t);return function a(){for(;e.length;)if((t=e.pop())in n)return a.value=t,a.done=!1,a;return a.done=!0,a}}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports})(sl)),sl.exports}var ol={exports:{}},um;function h1(){return um||(um=1,(function(s){var r=ih().default;function i(n){if(n!=null){var e=n[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],t=0;if(e)return e.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length))return{next:function(){return n&&t>=n.length&&(n=void 0),{value:n&&n[t++],done:!n}}}}throw new TypeError(r(n)+" is not iterable")}s.exports=i,s.exports.__esModule=!0,s.exports.default=s.exports})(ol)),ol.exports}var lm;function p1(){return lm||(lm=1,(function(s){var r=p_(),i=v_(),n=d1(),e=y_(),t=g_(),a=f1(),o=h1();function l(){var u=i(),d=u.m(l),f=(Object.getPrototypeOf?Object.getPrototypeOf(d):d.__proto__).constructor;function m(L){var E=typeof L=="function"&&L.constructor;return!!E&&(E===f||(E.displayName||E.name)==="GeneratorFunction")}var x={throw:1,return:2,break:3,continue:3};function C(L){var E,B;return function(q){E||(E={stop:function(){return B(q.a,2)},catch:function(){return q.v},abrupt:function(U,F){return B(q.a,x[U],F)},delegateYield:function(U,F,G){return E.resultName=F,B(q.d,o(U),G)},finish:function(U){return B(q.f,U)}},B=function(U,F,G){q.p=E.prev,q.n=E.next;try{return U(F,G)}finally{E.next=q.n}}),E.resultName&&(E[E.resultName]=q.v,E.resultName=void 0),E.sent=q.v,E.next=q.n;try{return L.call(this,E)}finally{q.p=E.prev,q.n=E.next}}}return(s.exports=l=function(){return{wrap:function(B,q,z,U){return u.w(C(B),q,z,U&&U.reverse())},isGeneratorFunction:m,mark:u.m,awrap:function(B,q){return new r(B,q)},AsyncIterator:t,async:function(B,q,z,U,F){return(m(q)?e:n)(C(B),q,z,U,F)},keys:a,values:o}},s.exports.__esModule=!0,s.exports.default=s.exports)()}s.exports=l,s.exports.__esModule=!0,s.exports.default=s.exports})(Zu)),Zu.exports}var ul,cm;function m1(){if(cm)return ul;cm=1;var s=p1()();ul=s;try{regeneratorRuntime=s}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=s:Function("r","regeneratorRuntime = r")(s)}return ul}var ll={exports:{}},cl={exports:{}},dm;function nh(){return dm||(dm=1,(function(s){function r(i,n){return s.exports=r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s.exports.__esModule=!0,s.exports.default=s.exports,r(i,n)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports})(cl)),cl.exports}var fm;function v1(){return fm||(fm=1,(function(s){var r=nh();function i(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,r(n,e)}s.exports=i,s.exports.__esModule=!0,s.exports.default=s.exports})(ll)),ll.exports}function g1(s){var r=this.constructor;return this.then(function(i){return r.resolve(s()).then(function(){return i})},function(i){return r.resolve(s()).then(function(){return r.reject(i)})})}function y1(s){var r=this;return new r(function(i,n){if(!(s&&typeof s.length<"u"))return n(new TypeError(typeof s+" "+s+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var e=Array.prototype.slice.call(s);if(e.length===0)return i([]);var t=e.length;function a(l,u){if(u&&(typeof u=="object"||typeof u=="function")){var d=u.then;if(typeof d=="function"){d.call(u,function(f){a(l,f)},function(f){e[l]={status:"rejected",reason:f},--t===0&&i(e)});return}}e[l]={status:"fulfilled",value:u},--t===0&&i(e)}for(var o=0;o<e.length;o++)a(o,e[o])})}function __(s,r){this.name="AggregateError",this.errors=s,this.message=r||""}__.prototype=Error.prototype;function _1(s){var r=this;return new r(function(i,n){if(!(s&&typeof s.length<"u"))return n(new TypeError("Promise.any accepts an array"));var e=Array.prototype.slice.call(s);if(e.length===0)return n();for(var t=[],a=0;a<e.length;a++)try{r.resolve(e[a]).then(i).catch(function(o){t.push(o),t.length===e.length&&n(new __(t,"All promises were rejected"))})}catch(o){n(o)}})}var b1=setTimeout;function b_(s){return!!(s&&typeof s.length<"u")}function T1(){}function S1(s,r){return function(){s.apply(r,arguments)}}function Dt(s){if(!(this instanceof Dt))throw new TypeError("Promises must be constructed via new");if(typeof s!="function")throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],S_(s,this)}function T_(s,r){for(;s._state===3;)s=s._value;if(s._state===0){s._deferreds.push(r);return}s._handled=!0,Dt._immediateFn(function(){var i=s._state===1?r.onFulfilled:r.onRejected;if(i===null){(s._state===1?sf:es)(r.promise,s._value);return}var n;try{n=i(s._value)}catch(e){es(r.promise,e);return}sf(r.promise,n)})}function sf(s,r){try{if(r===s)throw new TypeError("A promise cannot be resolved with itself.");if(r&&(typeof r=="object"||typeof r=="function")){var i=r.then;if(r instanceof Dt){s._state=3,s._value=r,of(s);return}else if(typeof i=="function"){S_(S1(i,r),s);return}}s._state=1,s._value=r,of(s)}catch(n){es(s,n)}}function es(s,r){s._state=2,s._value=r,of(s)}function of(s){s._state===2&&s._deferreds.length===0&&Dt._immediateFn(function(){s._handled||Dt._unhandledRejectionFn(s._value)});for(var r=0,i=s._deferreds.length;r<i;r++)T_(s,s._deferreds[r]);s._deferreds=null}function x1(s,r,i){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof r=="function"?r:null,this.promise=i}function S_(s,r){var i=!1;
48try{s(function(n){i||(i=!0,sf(r,n))},function(n){i||(i=!0,es(r,n))})}catch(n){if(i)return;i=!0,es(r,n)}}Dt.prototype.catch=function(s){return this.then(null,s)};Dt.prototype.then=function(s,r){var i=new this.constructor(T1);return T_(this,new x1(s,r,i)),i};Dt.prototype.finally=g1;Dt.all=function(s){return new Dt(function(r,i){if(!b_(s))return i(new TypeError("Promise.all accepts an array"));var n=Array.prototype.slice.call(s);if(n.length===0)return r([]);var e=n.length;function t(o,l){try{if(l&&(typeof l=="object"||typeof l=="function")){var u=l.then;if(typeof u=="function"){u.call(l,function(d){t(o,d)},i);return}}n[o]=l,--e===0&&r(n)}catch(d){i(d)}}for(var a=0;a<n.length;a++)t(a,n[a])})};Dt.any=_1;Dt.allSettled=y1;Dt.resolve=function(s){return s&&typeof s=="object"&&s.constructor===Dt?s:new Dt(function(r){r(s)})};Dt.reject=function(s){return new Dt(function(r,i){i(s)})};Dt.race=function(s){return new Dt(function(r,i){if(!b_(s))return i(new TypeError("Promise.race accepts an array"));for(var n=0,e=s.length;n<e;n++)Dt.resolve(s[n]).then(r,i)})};Dt._immediateFn=typeof setImmediate=="function"&&function(s){setImmediate(s)}||function(s){b1(s,0)};Dt._unhandledRejectionFn=function(r){typeof console<"u"&&console&&console.warn("Possible Unhandled Promise Rejection:",r)};const E1=Object.freeze(Object.defineProperty({__proto__:null,default:Dt},Symbol.toStringTag,{value:"Module"})),C1=K_(E1);var Hs={exports:{}},hm;function w1(){if(hm)return Hs.exports;hm=1;var s=typeof Reflect=="object"?Reflect:null,r=s&&typeof s.apply=="function"?s.apply:function(F,G,O){return Function.prototype.apply.call(F,G,O)},i;s&&typeof s.ownKeys=="function"?i=s.ownKeys:Object.getOwnPropertySymbols?i=function(F){return Object.getOwnPropertyNames(F).concat(Object.getOwnPropertySymbols(F))}:i=function(F){return Object.getOwnPropertyNames(F)};function n(U){console&&console.warn&&console.warn(U)}var e=Number.isNaN||function(F){return F!==F};function t(){t.init.call(this)}Hs.exports=t,Hs.exports.once=B,t.EventEmitter=t,t.prototype._events=void 0,t.prototype._eventsCount=0,t.prototype._maxListeners=void 0;var a=10;function o(U){if(typeof U!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof U)}Object.defineProperty(t,"defaultMaxListeners",{enumerable:!0,get:function(){return a}
vendor: 5,072 bytes, line 48
48,set:function(U){if(typeof U!="number"||U<0||e(U))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+U+".");a=U}}),t.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},t.prototype.setMaxListeners=function(F){if(typeof F!="number"||F<0||e(F))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+F+".");return this._maxListeners=F,this};function l(U){return U._maxListeners===void 0?t.defaultMaxListeners:U._maxListeners}t.prototype.getMaxListeners=function(){return l(this)},t.prototype.emit=function(F){for(var G=[],O=1;O<arguments.length;O++)G.push(arguments[O]);var H=F==="error",A=this._events;if(A!==void 0)H=H&&A.error===void 0;else if(!H)return!1;if(H){var D;if(G.length>0&&(D=G[0]),D instanceof Error)throw D;var j=new Error("Unhandled error."+(D?" ("+D.message+")":""));throw j.context=D,j}var X=A[F];if(X===void 0)return!1;if(typeof X=="function")r(X,this,G);else for(var J=X.length,ne=C(X,J),O=0;O<J;++O)r(ne[O],this,G);return!0};function u(U,F,G,O){var H,A,D;if(o(G),A=U._events,A===void 0?(A=U._events=Object.create(null),U._eventsCount=0):(A.newListener!==void 0&&(U.emit("newListener",F,G.listener?G.listener:G),A=U._events),D=A[F]),D===void 0)D=A[F]=G,++U._eventsCount;else if(typeof D=="function"?D=A[F]=O?[G,D]:[D,G]:O?D.unshift(G):D.push(G),H=l(U),H>0&&D.length>H&&!D.warned){D.warned=!0;var j=new Error("Possible EventEmitter memory leak detected. "+D.length+" "+String(F)+" listeners added. Use emitter.setMaxListeners() to increase limit");j.name="MaxListenersExceededWarning",j.emitter=U,j.type=F,j.count=D.length,n(j)}return U}t.prototype.addListener=function(F,G){return u(this,F,G,!1)},t.prototype.on=t.prototype.addListener,t.prototype.prependListener=function(F,G){return u(this,F,G,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(U,F,G){var O={fired:!1,wrapFn:void 0,target:U,type:F,listener:G},H=d.bind(O);return H.listener=G,O.wrapFn=H,H}t.prototype.once=function(F,G){return o(G),this.on(F,f(this,F,G)),this},t.prototype.prependOnceListener=function(F,G){return o(G),this.prependListener(F,f(this,F,G)),this},t.prototype.removeListener=function(F,G){var O,H,A,D,j;if(o(G),H=this._events,H===void 0)return this;if(O=H[F],O===void 0)return this;if(O===G||O.listener===G)--this._eventsCount===0?this._events=Object.create(null):(delete H[F],H.removeListener&&this.emit("removeListener",F,O.listener||G));else if(typeof O!="function"){for(A=-1,D=O.length-1;D>=0;D--)if(O[D]===G||O[D].listener===G){j=O[D].listener,A=D;break}if(A<0)return this;A===0?O.shift():L(O,A),O.length===1&&(H[F]=O[0]),H.removeListener!==void 0&&this.emit("removeListener",F,j||G)}return this},t.prototype.off=t.prototype.removeListener,t.prototype.removeAllListeners=function(F){var G,O,H;if(O=this._events,O===void 0)return this;if(O.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):O[F]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete O[F]),this;if(arguments.length===0){var A=Object.keys(O),D;for(H=0;H<A.length;++H)D=A[H],D!=="removeListener"&&this.removeAllListeners(D);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(G=O[F],typeof G=="function")this.removeListener(F,G);else if(G!==void 0)for(H=G.length-1;H>=0;H--)this.removeListener(F,G[H]);return this};function m(U,F,G){var O=U._events;if(O===void 0)return[];var H=O[F];return H===void 0?[]:typeof H=="function"?G?[H.listener||H]:[H]:G?E(H):C(H,H.length)}t.prototype.listeners=function(F){return m(this,F,!0)},t.prototype.rawListeners=function(F){return m(this,F,!1)},t.listenerCount=function(U,F){return typeof U.listenerCount=="function"?U.listenerCount(F):x.call(U,F)},t.prototype.listenerCount=x;function x(U){var F=this._events;if(F!==void 0){var G=F[U];if(typeof G=="function")return 1;if(G!==void 0)return G.length}return 0}t.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function C(U,F){for(var G=new Array(F),O=0;O<F;++O)G[O]=U[O];return G}function L(U,F){for(;F+1<U.length;F++)U[F]=U[F+1];U.pop()}function E(U){for(var F=new Array(U.length),G=0;G<F.length;++G)F[G]=U[G].listener||U[G];return F}function B(U,F){return new Promise(function(G,O){function H(D){U.removeListener(F,A),O(D)}function A(){typeof U.removeListener=="function"&&U.removeListener("error",H),G([].slice.call(arguments))}z(U,F,A,{once:!0}),F!=="error"&&q(U,H,{once:!0})})}function q(U,F,G){typeof U.on=="function"&&z(U,"error",F,G)}function z(U,F,G,O){if(typeof U.on=="function")O.once?U.once(F,G):U.on(F,G);else if(typeof U.addEventListener=="function")U.addEventListener(F,function H(A){O.once&&U.removeEventListener(F,H),G(A)}
48);else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof U)}return Hs.exports}var dl={exports:{}},fl={exports:{}},pm;function A1(){return pm||(pm=1,(function(s){function r(i){return s.exports=r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},s.exports.__esModule=!0,s.exports.default=s.exports,r(i)}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports})(fl)),fl.exports}var hl={exports:{}},mm;function k1(){return mm||(mm=1,(function(s){function r(i){try{return Function.toString.call(i).indexOf("[native code]")!==-1}catch{return typeof i=="function"}}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports})(hl)),hl.exports}var pl={exports:{}},ml={exports:{}},vm;function D1(){return vm||(vm=1,(function(s){function r(){try{var i=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(s.exports=r=function(){return!!i},s.exports.__esModule=!0,s.exports.default=s.exports
48)()}s.exports=r,s.exports.__esModule=!0,s.exports.default=s.exports})(ml)),ml.exports}var gm;function P1(){return gm||(gm=1,(function(s){var r=D1(),i=nh();function n(e,t,a){if(r())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var l=new(e.bind.apply(e,o));return a&&i(l,a.prototype),l}s.exports=n,s.exports.__esModule=!0,s.exports.default=s.exports})(pl)),pl.exports}var ym;function I1(){return ym||(ym=1,(function(s){var r=A1(),i=nh(),n=k1(),e=P1();function t(a){var o=typeof Map=="function"?new Map:void 0;return s.exports=t=function(u){if(u===null||!n(u))return u;if(typeof u!="function")throw new TypeError("Super expression must either be null or a function");if(o!==void 0){if(o.has(u))return o.get(u);o.set(u,d)}function d(){return e(u,arguments,r(this).constructor)}return d.prototype=Object.create(u.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),i(d,u)},s.exports.__esModule=!0,s.exports.default=s.exports,t(a)}s.exports=t,s.exports.__esModule=!0,s.exports.default=s.exports})(dl)),dl.exports}var _m;function L1(){return _m||(_m=1,(function(){var s={n:function(S){var _=S&&S.__esModule?function(){return S.default}:function(){return S};return s.d(_,{a:_}),_},d:function(S,_){for(var c in _)s.o(_,c)&&!s.o(S,c)&&Object.defineProperty(S,c,{enumerable:!0,get:_[c]})}};s.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),s.o=function(S,_){return Object.prototype.hasOwnProperty.call(S,_)},s.r=function(S){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(S,"__esModule",{value:!0})};var r={};s.r(r),s.d(r,{AuthorizationError:function(){return Gn},CaptureEventType:function(){return ru},ErrorSource:function(){return tu},ErrorType:function(){return Ts},LogLevel:function(){return Di},MediaPlayer:function(){return bs},MetadataEventType:function(){return fr},MetadataID3Type:function(){return Zi},PlayerEventType:function(){return ce},PlayerState:function(){return Tt},RemotePlayerEvent:function(){return qr},create:function(){return Ca},createWorker:function(){return bn},getVersion:function(){return _s},isPlayerSupported:function(){return jn},isVP9Supported:function(){return Qe},isWasmSupported:function(){return fi},registerIVSQualityPlugin:function(){return Es},registerIVSTech:function(){return iu}});var i=s1(),n=l1(),e=s.n(n),t=101,a=(function(){function S(){this.buffer=void 0,this.head=void 0,this.tail=void 0,this.buffer=[],this.head=0,this.tail=0}var _=S.prototype;return _.push=function(c){this.tail===this.buffer.length?this.buffer.push(c):this.buffer[this.tail]=c,this.tail++},_.pop=function(){var c,p=(c=this.buffer[this.head])!=null?c:null;return this.buffer[this.head]=null,this.head++,this.empty()&&(this.head=0,this.tail=0),p},_.size=function(){return this.tail-this.head},_.empty=function(){return this.head>=this.tail},S})();function o(S){try{return JSON.parse(S)}catch{return console.error("Failed JSON parse:",S),{}}}function l(S){return S.codecs===""||typeof MediaSource>"u"||MediaSource.isTypeSupported('video/mp4;codecs="'+S.codecs+'"')}function u(S){var _,c;return S.hidden!==void 0?(_="hidden",c="visibilitychange"):S.msHidden!==void 0?(_="msHidden",c="msvisibilitychange"):S.webkitHidden!==void 0&&(_="webkitHidden",c="webkitvisibilitychange"),{hidden:_,visibilityChange:c}}function d(S,_,c){return Math.min(c,Math.max(_,S))}function f(S){S.removeAttribute("src")}function m(S){if(typeof S.checkVisibility=="function")return S.checkVisibility({visibilityProperty:!0});var _=S.style;return _.display!=="none"&&_.visibility!=="hidden"}var x=.1,C=1<<30,L=12e4,E=3e3,B={audio:1936684398,video:1986618469};function q(S){return typeof S.webkitDecodedFrameCount=="number"?S.webkitDecodedFrameCount:typeof S.getVideoPlaybackQuality=="function"?S.getVideoPlaybackQuality().totalVideoFrames:typeof S.mozDecodedFrames=="number"?S.mozDecodedFrames:0}function z(S){return typeof S.webkitDroppedFrameCount=="number"?S.webkitDroppedFrameCount:typeof S.getVideoPlaybackQuality=="function"?S.getVideoPlaybackQuality().droppedVideoFrames:0}function U(S,_){for(var c=0;c<_.length;c++)console.info(S,"start: ",_.start(c),", end: ",_.end(c))}function F(S,_,c){for(var p=0;p<S.length;p++){var g=S.start(p),T=S.end(p);if(!(T<=_)){if(g-c>_)break;for(var P=p+1;P<S.length&&!(S.start(P)-T>c);P++)T=S.end(P);for(var N=p-1;N>=0&&!(g-S.end(N)>c);N--)g=S.start(N);return{start:Math.min(g,_),end:T}}}return{start:_,end:_}}function G(S,_,c){var p=F(S,_,c).end-_>c;if(S.length>1||!p)for(var g=0;g<S.length;g++){var T=S.start(g),P=S.end(g);if(_<T&&P-T>c)return T+c}return p?_+c:_}function O(S,_,c){return S.addEventListener(_,c),function(){S.removeEventListener(_,c)}}function H(S){if(S.src){var _=S.src;f(S),S.load(),URL.revokeObjectURL(_)}}function A(S){var _=(S||"").match(/codecs="([^.]+)\./);return _&&_[1]?_[1]:""}var D=(function(){function S(c,p,g,T,P){this.rawCodec=p,this.group=g,this.isProtected=T,this.onError=P,this.pending=void 0,this.unsubscribers=[],this.srcBuf=void 0,this.blocked=!1,this.srcBuf=c,this.pending=new a,this.unsubscribers.push(O(c,"updateend",this.process.bind(this)))}var _=S.prototype;return _.getBufferedRanges=function(){try{var c=[];if(this.srcBuf)for(var p=this.srcBuf.buffered,g=0;g<p.length;g++)c.push({start:p.start(g),end:p.end(g)});return c}catch{return[]}},_.abort=function(){this.schedule((function(c){c.abort()}))},_.changeType=function(c){this.rawCodec=(function(p){var g=(p||"").match(/codecs=".+"/);return g&&g[0]?g[0]:'codecs=""'})(c),this.schedule((function(p){p.changeType(c)}))},_.appendBuffer=function(c){this.schedule((function(p){try{p.appendBuffer(c)}catch($){if($.name!=="QuotaExceededError")throw $;var g=p.buffered,T=g.start(0),P=g.end(g.length-1),N=(T+P)/2;p.remove(N,P)}}))},_.setTimestampOffset=function(c){this.schedule((function(p){p.timestampOffset=c}))},_.remove=function(c,p){this.schedule((function(g){var T=g.buffered;if(T.length){var P=Math.max(c,T.start(0)),N=Math.min(p,T.end(T.length-1));P<N&&g.remove(P,N)}}))},_.block=function(){var c=this;return new Promise((function(p){c.schedule((function(){c.blocked=!0,p()}))}))},_.unblock=function(){this.blocked=!1,this.process()},_.destroy=function(){this.pending=new a,this.unsubscribers.forEac
48h((function(c){return c()})),this.srcBuf=void 0},_.schedule=function(c){this.pending.empty()&&this.canProcess()?this.safeExecute(c):(this.pending.push(c),this.process())},_.safeExecute=function(c){try{if(!this.srcBuf)throw new Error("srcBuf is undefined");c(this.srcBuf)}catch(p){this.onError(p,!1)}},_.process=function(){for(;!this.pending.empty()&&this.canProcess();)this.safeExecute(this.pending.pop())},_.canProcess=function(){return!(!this.srcBuf||this.srcBuf.updating||this.blocked)},e()(S,[{key:"buffer",get:function(){return this.srcBuf}},{key:"codec",get:function(){return this.rawCodec}},{key:"timestampOffset",get:function(){return this.buffer?this.buffer.timestampOffset:0}}])})(),j=(function(){function S(c,p,g){this.mediaSource=c,this.onEnded=p,this.onError=g,this.sourceBuffers=Object.create(null),this.unsubscribers=[],this.unsubscribers.push(O(c,"sourceended",this.onEnded))}S.isSupported=function(){return self.MediaSource!==void 0},S.isSupportedInWorker=function(){return S.isSupported()&&MediaSource.canConstructInDedicatedWorker&&typeof MediaSourceHandle=="function"},S.create=function(c,p){var g=new MediaSource,T=new Promise((function(P,N){var $=O(g,"sourceopen",(function(){g.readyState==="open"?(P(new S(g,c,p)),$()):N("The MediaSource was closed upon opening")}))}));return{ms:g,sink:T}};var _=S.prototype;return _.getBufferedRanges=function(c){var p,g;return(p=(g=this.sourceBuffers[B[c]])==null?void 0:g.getBufferedRanges())!=null?p:[]},_.addTrack=function(c,p,g,T){var P=this.mediaSource,N=this.sourceBuffers,$=(function(he){return"video/mp4;"+he})(p);if(N[c]){var de,fe=A(N[c].codec);return A(p)!==fe&&N[c].changeType($),(de=N[c].buffer)!=null?de:null}try{var pe=P.addSourceBuffer($);return N[c]=new D(pe,p,g,T,this.handleError.bind(this)),pe}catch(he){this.handleError(he,P.readyState==="open")}return null},_.append=function(c,p){var g;(g=this.sourceBuffers[c])==null||g.appendBuffer(p)},_.remove=function(c,p){for(var g=this.sourceBuffers,T=0,P=Object.keys(g);T<P.length;T++)g[P[T]].remove(c,p)},_.setTimestampOffset=function(c,p){var g=this.sourceBuffers[c];g&&(g.abort(),g.setTimestampOffset(p))},_.setDuration=function(c){var p=this;this.scheduleUpdate((function(){return p.mediaSource.duration=c})).catch((function(g){return p.handleError(g,!1)}))},_.setLiveSeekableRange=function(c,p){var g=this;this.scheduleUpdate((function(){return g.mediaSource.setLiveSeekableRange(c,p)})).catch((function(T){return g.handleError(T,!1)}))},_.scheduleUpdate=function(c){var p=this;c===void 0&&(c=X);var g=Object.keys(this.sourceBuffers).map((function(T){return p.sourceBuffers[T]}));return Promise.all(g.map((function(T){return T.block()}))).then(c).then((function(){return g.forEach((function(T){return T.unblock()}))}))},_.isDrmProtected=function(){return this.bufferProperties.some((function(c){return c.isProtected}))},_.isAudioOnly=function(){return this.bufferProperties.length===1&&this.bufferProperties[0].group==="audio_only"},_.destroy=function(){this.destroySourceBuffers(),this.unsubscribers.forEach((function(c){return c()})),this.unsubscribers=[]},_.handleError=function(c,p){var g=c.code||102,T=102;c.name==="NotSupportedError"&&(T=g=4),this.onError(T,g,c.message,p)},_.destroySourceBuffers=function(){for(var c=this.mediaSource;c.sourceBuffers.length>0;)try{c.removeSourceBuffer(c.sourceBuffers[0])}catch(P){this.handleError(P,!1);break}for(var p=0,g=Object.keys(this.sourceBuffers);p<g.length;p++){var T=g[p];this.sourceBuffers[T].destroy()}this.sourceBuffers=Object.create(null)},e()(S,[{key:"duration",get:function(){return this.mediaSource.duration}},{key:"bufferProperties",get:function(){var c=this.sourceBuffers;return Object.keys(c).map((function(p){var g=c[p];return{trackID:Number(p),codec:g.codec,mode:"mse",path:"",isProtected:g.isProtected,group:g.group,srcObj:null}}))}}])})(),X=function(){},J=/^(\d+)\.(\d+)\.(\d+)[+|-]?(.*)?$/,ne=/^(\d+)\.(\d+)[+|-]?(.*)?$/,se=/^(\d+)$/,ue={chrome:!1,chromecast:!1,domain:"",electron:!1,family:"",firefox:!1,host:"",major:-1,minor:-1,msEdgeLegacy:!1,msEdgeChromium:!1,msIE:!1,name:"",opera:!1,osName:"",osVersion:"",patch:-1,safari:!1,url:"",userAgent:"",mobile:!1,supportsD
48ataChannels:!1,supportsWebTransport:!1,supportsMSEInWorkers:!1},oe=null;function te(){if(oe)return oe;if(typeof window>"u"||typeof navigator>"u")return oe=ue;var S,_,c=i.getParser(navigator.userAgent),p=(S=String(c.getBrowserVersion()),_=J.exec(S)||ne.exec(S)||se.exec(S)||[],{major:parseInt(_[1],10)||0,minor:parseInt(_[2],10)||0,patch:parseInt(_[3],10)||0}),g=c.getEngine();return oe={chrome:!!c.some(["chrome"]),chromecast:navigator.userAgent.toLowerCase().indexOf("crkey")>-1,domain:window.location.host.split(".").slice(-2).join("."),electron:!!c.some(["electron"]),family:c.getBrowserName().toLowerCase(),firefox:!!c.some(["firefox"]),host:window.location.host,major:p.major,minor:p.minor,msEdgeLegacy:!!c.some(["microsoft edge"])&&g.name!=="Blink",msEdgeChromium:!!c.some(["microsoft edge"])&&g.name==="Blink",msIE:!!c.some(["internet explorer"]),name:navigator.appVersion,opera:!!c.some(["opera"]),osName:c.getOSName(),osVersion:String(c.getOSVersion()),patch:p.patch,safari:!!c.some(["safari"]),url:window.location.href,userAgent:navigator.userAgent,mobile:!(!c.some(["mobile"])&&!c.some(["tablet"])),supportsDataChannels:"RTCPeerConnection"in window,supportsWebTransport:"WebTransport"in window,supportsMSEInWorkers:j.isSupportedInWorker()}}var le=Qg(),re=s.n(le),ce=(function(S){return S.INITIALIZED="PlayerInitialized",S.QUALITY_CHANGED="PlayerQualityChanged",S.DURATION_CHANGED="PlayerDurationChanged",S.VOLUME_CHANGED="PlayerVolumeChanged",S.MUTED_CHANGED="PlayerMutedChanged",S.PLAYBACK_RATE_CHANGED="PlayerPlaybackRateChanged",S.REBUFFERING="PlayerRebuffering",S.AUDIO_BLOCKED="PlayerAudioBlocked",S.PLAYBACK_BLOCKED="PlayerPlaybackBlocked",S.ERROR="PlayerError",S.RECOVERABLE_ERROR="PlayerRecoverableError",S.ANALYTICS_EVENT="PlayerAnalyticsEvent",S.TIME_UPDATE="PlayerTimeUpdate",S.SYNC_TIME_UPDATE="PlayerSyncTimeUpdate",S.BUFFER_UPDATE="PlayerBufferUpdate",S.SEEK_COMPLETED="PlayerSeekCompleted",S.SESSION_DATA="PlayerSessionData",S.STATE_CHANGED="PlayerStateChanged",S.WORKER_ERROR="PlayerWorkerError",S.METADATA="PlayerMetadata",S.TEXT_CUE="PlayerTextCue",S.TEXT_METADATA_CUE="PlayerTextMetadataCue",S.AD_CUE="PlayerAdCue",S.STREAM_SOURCE_CUE="PlayerStreamSourceCue",S.NETWORK_UNAVAILABLE="PlayerNetworkUnavailable",S.SEGMENT_DISCONTINUITY="PlayerSegmentDiscontinuity",S.SEGMENT_METADATA="PlayerSegmentMetadata",S})({}),be=null,Pe=null;function Re(S){var _=S.type===ce.ANALYTICS_EVENT,c=S.arg&&S.arg.name==="video_error";if(_&&c){if(!be&&!Pe){var p=document.createElement("canvas");try{var g=p.getContext("webgl")||p.getContext("experimental-webgl");if(g&&"getExtension"in g){var T=g.getExtension("WEBGL_debug_renderer_info");T&&"getParameter"in g&&(be=g.getParameter(T.UNMASKED_RENDERER_WEBGL),Pe=g.getParameter(T.UNMASKED_VENDOR_WEBGL))}}catch{}}S.arg.properties.gl_renderer=be,S.arg.properties.gl_vendor=Pe}return S}var ge=(function(){function S(){var _=this;this.batteryManager=void 0,this.processor=this.processor.bind(this),S.isSupported()&&window.navigator.getBattery().then((function(c){_.batteryManager=c}))}return S.isSupported=function(){var _;return((_=window)==null||(_=_.navigator)==null?void 0:_.getBattery)!==void 0},S.prototype.processor=function(_){var c=_.type===ce.ANALYTICS_EVENT,p=_.arg&&_.arg.name==="minute-watched";return c&&p&&this.batteryManager&&(_.arg.properties.battery_percent=this.batteryManager.level),_},S})();function De(){return typeof MediaSource<"u"}function Qe(){var S=te();return S.osName==="Windows"&&(S.chrome||S.firefox||S.msEdgeChromium)&&De()?"mediaCapabilities"in navigator?navigator.mediaCapabilities.decodingInfo({type:"media-source",video:{contentType:'video/mp4;codecs="vp09.00.41.08"',width:1920,height:1080,bitrate:8e6,framerate:60}}).then((function(_){return _.supported&&_.smooth})):Promise.resolve(MediaSource.isTypeSupported('video/mp4;codecs="vp09.00.10.08"')):Promise.resolve(!1)}var Oe={keySystem:"org.w3.clearkey",uuid:"1077efec-c0b2-4d02-ace3-3c1e52e2fb4b"},ot={keySystem:"com.apple.fps.2_0",certUrl:"https://fp-keyos-twitch.licensekeyserver.com/cert/a17fd33d3843df9b17679ccf50a419b2.der",licenseUrl:"https://fp-keyos-twitch.licensekeyserver.com/getkey",uuid:"94CE86FB-07FF-4F43-ADB8-93D2FA968CA2"},vt={keySystem:"com.microsoft.playready",licenseUrl:"https://pr-keyos-twitch.licensekeyserver.com/core/rightsmanager.asmx",uuid:"9a04f079-9840-4286-ab92-e65be0885f95"},ut={keySystem:"com.widevine.alpha",licenseUrl:"https://wv-keyos-twitch.licensekeyserver.com",uuid:"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"},it={CLEARKEY:Oe,FAIRPLAY:ot,PLAYREADY:vt,WIDEVINE:ut},tt={"com.widevine.alpha":ut,"com.microsoft.playready":vt,"com.apple.fps.2_0":ot,"org.w3.clearkey":Oe},nt={value:4,message:"Your browser does not support any DRM Content Decryption Modules"},Cr={value:4,message:"There was an issue while updating DRM License"},ft={value:204,message:"Error while requesting DRM license"},er={value:201,message:"DRM license not authorized for this browser version"},Ur={value:202,message:"DRM license not available"},$e={value:203,message:"DRM license server error"},Kr={value:4,message:"Error creating key session"},Xe={value:4,message:"Encryption key not usable because of internal error in CDM"},Ie={value:4,message:"Unable to find valid CDM support on media"},ht={value:2,message:"Request for AuthXML failed"},ui={value:2,message:"Request for DRM certificate failed"};function li(S,_){(_==null||_>S.length)&&(_=S.length);for(var c=0,p=new Array(_);c<_;c++)p[c]=S[c];return p}function ci(S){return window.WebKitMediaKeys&&typeof window.WebKitMediaKeys.isTypeSupp
48orted=="function"&&window.WebKitMediaKeys.isTypeSupported(it.FAIRPLAY.keySystem)?it.FAIRPLAY.uuid:typeof navigator.requestMediaKeySystemAccess=="function"?S.safari?"":S.msIE||S.msEdgeLegacy?it.PLAYREADY.uuid:it.WIDEVINE.uuid:""}function di(S,_){if((S=Yi(S))===(_=Yi(_)))return!0;if(S.byteLength!==_.byteLength)return!1;for(var c=new DataView(S),p=new DataView(_),g=0;g<c.byteLength;g++)if(c.getUint8(g)!==p.getUint8(g))return!1;return!0}function Yi(S){return S instanceof Uint8Array||S instanceof Uint16Array?S.buffer:S}function hn(S){return _=(function(p){if(p===null)return[];for(var g=new DataView(p.buffer||p),T=[],P=0;!(P>=g.buffer.byteLength);){var N=P+g.getUint32(P);if(P+=4,g.getUint32(P)===pn("pssh")){P+=4;var $=g.getUint8(P);if($===0||$===1){P++,P+=3;for(var de="",fe=0;fe<4;fe++)de+=Yr(g.getUint8(P+fe));P+=4,de+="-";for(var pe=0;pe<2;pe++)de+=Yr(g.getUint8(P+pe));P+=2,de+="-";for(var he=0;he<2;he++)de+=Yr(g.getUint8(P+he));P+=2,de+="-";for(var ve=0;ve<2;ve++)de+=Yr(g.getUint8(P+ve));P+=2,de+="-";for(var Fe=0;Fe<6;Fe++)de+=Yr(g.getUint8(P+Fe));P+=6,de=de.toLowerCase(),P+=4,T.push(de),P=N}else P=N}else P=N}return T})(S),c=[],_.forEach((function(p){Object.keys(it).forEach((function(g){var T=it[g];T.uuid.toLowerCase()===p.toLowerCase()&&c.push(T)}))})),c;var _,c}function Xr(S,_){return new Promise((function(c,p){var g=new XMLHttpRequest;for(var T in g.open(_.method,S,!0),_.headers)Object.prototype.hasOwnProperty.call(_.headers,T)&&g.setRequestHeader(T,_.headers[T]);g.responseType=_.responseType,g.onload=function(){g.status===200&&c(g.response)},g.onloadend=function(){p(g.status)},g.send(_.body)}))}function Ze(S){var _=Qi(mn(JSON.parse(String.fromCharCode.apply(null,S)).sinf[0]),"schi");return(function(c){for(var p,g="",T=(function(P,N){var $=typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if($)return($=$.call(P)).next.bind($);if(Array.isArray(P)||($=(function(fe,pe){if(fe){if(typeof fe=="string")return li(fe,pe);var he=Object.prototype.toString.call(fe).slice(8,-1);return he==="Object"&&fe.constructor&&(he=fe.constructor.name),he==="Map"||he==="Set"?Array.from(fe):he==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(he)?li(fe,pe):void 0}})(P))||N){$&&(P=$);var de=0;return function(){return de>=P.length?{done:!0}:{done:!1,value:P[de++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
49In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})(c);!(p=T()).done;)g+=Yr(p.value);return g})(Qi(_,"tenc").subarray(8,24))}function Qi(S,_){for(var c=new DataView(S.buffer,S.byteOffset,S.byteLength),p=pn(_),g=0;g<S.byteLength;){var T=c.getUint32(g);if(c.getUint32(g+4)===p)return S.subarray(g+8,g+T);g+=T}return new Uint8Array(S)}function pn(S){return(S.charCodeAt(0)<<24)+(S.charCodeAt(1)<<16)+(S.charCodeAt(2)<<8)+S.charCodeAt(3)}function Yr(S){var _=S.toString(16);return _.length===1?"0"+_:_}function mn(S){for(var _=atob(S),c=_.length,p=new Uint8Array(c),g=0;g<c;g++)p[g]=_.charCodeAt(g);return p}function Ji(S){return decodeURIComponent(S.replace(/\+/g," "))}var fr=(function(S){return S.ID3="MetaID3",S.CAPTION="MetaCaption",S})({}),Zi=(function(S){return S.METADATA_ID="metadata.live-video.net",S.INBAND_METADATA_ID="inband.metadata.live-video.net",S})({}),qr=(function(S){return S.AVAILABLE="RemotePlayerAvailable",S.UNAVAILABLE="RemotePlayerUnavailable",S.SESSION_STARTED="RemotePlayerSessionStarted",S.SESSION_ENDED="RemotePlayerSessionEnded",S})({}),Tt=(function(S){return S.IDLE="Idle",S.READY="Ready",S.BUFFERING="Buffering",S.PLAYING="Playing",S.ENDED="Ended",S})({}),R=c1(),M=s.n(R),ee=m1(),Y=s.n(ee);function we(S){var _=S.querySelector("Challenge"),c=_?.textContent;return c?atob(c):""}function Ue(S){var _=S.querySelectorAll("HttpHeader");return Array.from(_).reduce((function(c,p){var g,T,P=(g=p.querySelector("name"))==null?void 0:g.textContent,N=(T=p.querySelector("value"))==null?void 0:T.textContent;return P&&N&&(c[P]=N),c}),{})}function ct(S){var _=String.fromCharCode.apply(null,new Uint16Array(S)),c=new DOMParser().parseFromString(_,"application/xml");return{headers:Ue(c),body:we(c)}}function Ht(S,_){(_==null||_>S.length)&&(_=S.length);for(var c=0,p=new Array(_);c<_;c++)p[c]=S[c];return p}var tr=[{initDataTypes:["cenc"],audioCapabilities:[{contentType:'audio/mp4;codecs="mp4a.40.2"'}],videoCapabilities:[{robustness:"SW_SECURE_CRYPTO",contentType:'video/mp4;codecs="avc1.42E01E"'}]}],Et=(function(){function S(c){var p=this;this.video=void 0,this.listener=void 0,this.cdmSupport=void 0,this.selectedCDM=void 0,this.mediaKeys=void 0,this.pendingSessions=void 0,this.sessions=void 0,this.authXml=void 0,this.video=c.video,this.listener=c.listener,this.cdmSupport=null,this.selectedCDM=null,this.mediaKeys=void 0,this.pendingSessions=[],this.reset(),this.video.addEventListener("encrypted",(function(g){return p.handleEncrypted(g)})),this.video.addEventListener("webkitneedkey",(function(g){return p.handleWebKitEncrypted(g)}))}var _=S.prototype;return _.configure=function(c){var p=this;if(!this.authXml){var g=new URL(c),T=g.pathname.split("/"),P=T[T.length-1].split(".")[0],N=(function(pe){var he=new 
49URL(pe).searchParams,ve={};return he.forEach((function(Fe,Le){ve[Ji(Le)]=Fe?Ji(Fe):""})),ve})(c),$=N.token,de=N.sig,fe="https://"+g.host+"/api/authxml/"+P+"?token="+encodeURIComponent($)+"&sig="+de;this.authXml=Xr(fe,{method:"GET",responseType:"text"}).catch((function(pe){p.handleError(Object.assign({code:pe},ht))}))}},_.reset=function(){this.authXml=null,this.sessions=[]},_.isProtected=function(){return this.authXml!==null},_.handleError=function(c){this.listener.onSinkError({value:c.value||4,code:c.code||0,message:c.message||""})},_.hasSession=function(c){if(!c)return!1;for(var p,g=(function(P,N){var $=typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if($)return($=$.call(P)).next.bind($);if(Array.isArray(P)||($=(function(fe,pe){if(fe){if(typeof fe=="string")return Ht(fe,pe);var he=Object.prototype.toString.call(fe).slice(8,-1);return he==="Object"&&fe.constructor&&(he=fe.constructor.name),he==="Map"||he==="Set"?Array.from(fe):he==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(he)?Ht(fe,pe):void 0}})(P))||N){$&&(P=$);var de=0;return function(){return de>=P.length?{done:!0}:{done:!1,value:P[de++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
50In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})(this.sessions);!(p=g()).done;){var T=p.value;if(T.initData&&di(T.initData,c))return!0}return!1},_.createKeySystemSupportChain=function(){if(this.cdmSupport===null||this.cdmSupport.length===0)return Promise.reject(Ie);var c=Promise.reject();return this.cdmSupport.forEach((function(p){c=c.catch((function(){return navigator.requestMediaKeySystemAccess(p.keySystem,tr)}))})),c=c.catch((function(){return Promise.reject(nt)}))},_.handleEncrypted=(function(){var c=M()(Y().mark((function p(g){var T,P;return Y().wrap((function(N){for(;;)switch(N.prev=N.next){case 0:if(!this.hasSession(g.initData)){N.next=2;break}return N.abrupt("return");case 2:if(this.sessions.push(g),g.initDataType!=="sinf"){N.next=6;break}return this.handleWebKitEncrypted(g),N.abrupt("return");case 6:if(this.cdmSupport===null&&(this.cdmSupport=hn(g.initData)),this.mediaKeys!==void 0){N.next=24;break}return this.mediaKeys=null,N.prev=9,N.next=12,this.createKeySystemSupportChain();case 12:return T=N.sent,this.selectedCDM=tt[T.keySystem],N.next=16,T.createMediaKeys();case 16:return P=N.sent,N.next=19,this.setMediaKeys(P);case 19:N.next=24;break;case 21:N.prev=21,N.t0=N.catch(9),this.handleError(N.t0);case 24:this.addSession(g);case 25:case"end":return N.stop()}}),p,this,[[9,21]])})));return function(p){return c.apply(this,arguments)}})(),_.setMediaKeys=function(c){var p=this;return this.mediaKeys=c,this.pendingSessions.forEach((function(g){return p.createSessionRequest(g).catch((function(){p.handleError(Kr)}))})),this.pendingSessions=[],this.video.setMediaKeys(this.mediaKeys)},_.addSession=function(c){var p=this;this.mediaKeys?this.createSessionRequest(c).catch((function(){p.handleError(Kr)})):this.pendingSessions.push(c)},_.createSessionRequest=function(c){var p,g=this,T=c.initDataType,P=c.initData,N=(p=this.mediaKeys)==null?void 0:p.createSession();return N?(N.addEventListener("message",(function($){return g.handleMessage($)})),N.addEventListener("keystatuseschange",(function($){return g.handleKeyStatusesChange($,P)})),N.generateRequest(T,P)):Promise.reject()},_.handleKeyStatusesChange=function(c,p){var g=this,T=c.target,P=!1;T.keyStatuses.forEach((function(N){switch(N){case"expired":P=!0;break;case"internal-error":g.handleError(Xe)}})),P&&T.close().then((function(){return g.removeSession(p)}))},_.removeSession=function(c){for(var p=0;p<this.sessions.length;p++)if(this.sessions[p].initData===c)return void this.sessions.splice(p,1)},_.handleMessage=(function(){var c=M()(Y().mark((function p(g){var T,P,N=this;return Y().wrap((function($){for(;;)switch($.prev=$.next){case 0:return T=g.target,$.next=3,this.generateLicense(g.message);case 3:(P=$.sent)&&T.update(P).catch((function(){N.handleError(Cr)}));case 5:case"end":return $.stop()}}),p,this)})));return function(p){return c.apply(this,arguments)}})(),_.generateLicense=(function(){var c=M()(Y().mark((function p(g){var T,P,N,$;return Y().wrap((function(de){for(;;)switch(de.prev=de.next){case 0:if(this.selectedCDM!==it.CLEARKEY){de.next=5;break}return T=JSON.parse(new TextDecoder().decode(g)),P=T.kids.map((function(fe){return{kty:"oct",alg:"A128KW",kid:fe,k:fe}}
50)),N=new TextEncoder().encode(JSON.stringify({keys:P})),de.abrupt("return",Promise.resolve(N));case 5:if(!this.authXml){de.next=10;break}return de.next=8,this.authXml;case 8:return $=de.sent,de.abrupt("return",this.requestLicense(g,$));case 10:this.handleError(ht);case 11:case"end":return de.stop()}}),p,this)})));return function(p){return c.apply(this,arguments)}})(),_.requestLicense=(function(){var c=M()(Y().mark((function p(g,T){var P,N,$,de=this;return Y().wrap((function(fe){for(;;)switch(fe.prev=fe.next){case 0:return N={method:"POST",responseType:"arraybuffer",body:g,headers:{customdata:T,"Content-Type":"application/octet-stream"}},this.selectedCDM===it.PLAYREADY&&($=ct(g),N.body=$.body,N.headers=Object.assign(N.headers,$.headers)),fe.abrupt("return",Xr(((P=this.selectedCDM)==null?void 0:P.licenseUrl)||"",N).catch((function(pe){var he;switch(pe){case 0:he=ft;break;case 404:he=Ur;break;case 403:he=er;break;default:he=$e}de.handleError(Object.assign({code:pe},he))})));case 3:case"end":return fe.stop()}}),p,this)})));return function(p,g){return c.apply(this,arguments)}})(),_.handleWebKitEncrypted=(function(){var c=M()(Y().mark((function p(g){var T,P=this;return Y().wrap((function(N){for(;;)switch(N.prev=N.next){case 0:return this.selectedCDM=it.FAIRPLAY,N.prev=1,N.next=4,Xr(it.FAIRPLAY.certUrl||"",{method:"GET",responseType:"arraybuffer",headers:{Pragma:"Cache-Control: no-cache","Cache-Control":"max-age=0"}});case 4:T=N.sent,this.setupWebKitMediaKeys(g,T).catch((function($){return P.handleError($)})),N.next=11;break;case 8:N.prev=8,N.t0=N.catch(1),this.handleError(Object.assign({code:N.t0}
50,ui));case 11:case"end":return N.stop()}}),p,this,[[1,8]])})));return function(p){return c.apply(this,arguments)}})(),_.setupWebKitMediaKeys=function(c,p){var g=this;if(!c.initData)return Promise.reject("Missing initData on MediaEncryptedEvent");this.video.webkitKeys||this.video.webkitSetMediaKeys(new window.WebKitMediaKeys(it.FAIRPLAY.keySystem));var T=Ze(c.initData),P=this.video.webkitKeys.createSession("video/mp4",c.initData);return P.contentId=T,new Promise((function(N,$){if(g.video.webkitKeys||$("Issue setting fairplay media keys"),!P)return $("Could not create key session");P.addEventListener("webkitkeymessage",(function(de){var fe=de.target;String.fromCharCode.apply(null,de.message)==="certificate"?fe.update(new Uint8Array(p)):g.getWebkitLicense(de.message,T).then((function(pe){var he=pe.trim();he.substr(0,5)==="<ckc>"&&he.substr(-6)==="</ckc>"&&(he=he.slice(5,-6)),fe.update(mn(he))})).catch($)})),P.addEventListener("webkitkeyadded",N),P.addEventListener("webkitkeyerror",$)}))},_.getWebkitLicense=function(c,p){return this.authXml?this.authXml.then((function(g){var T;return Xr(it.FAIRPLAY.licenseUrl||"",{method:"POST",body:"spc="+(T=c,btoa(String.fromCharCode.apply(null,new Uint16Array(T)))+"&assetId=")+p,responseType:"text",headers:{"Content-Type":"application/x-www-form-urlencoded",customdata:g}}).catch((function(P){return Promise.reject(Object.assign({code:P},ft))}))})):Promise.reject(ht)},S})(),Ir=v1(),Nt=s.n(Ir),rr=(function(){function S(){}var _=S.prototype;return _.addTrack=function(c){},_.bufferDuration=function(){return 0},_.buffered=function(){return{start:0,end:0}},_.getBufferedRanges=function(c){return[]},_.captureGesture=function(){},_.configure=function(c){},_.delete=function(){},_.endOfStream=function(){},_.enqueue=function(c){},_.getCurrentTime=function(){return 0},_.getPlaybackRate=function(){return 0},_.getVolume=function(){return 0},_.invoke=function(c){this[c.name].call(this,c.arg)},_.isMuted=function(){return!1},_.onSourceDurationChanged=function(c){},_.pause=function(){},_.play=function(){},_.reinit=function(){},_.remove=function(c){},_.seekTo=function(c){},_.setMuted=function(c){},_.setPlaybackRate=function(c){},_.setTimestampOffset=function(c){},_.setVolume=function(c){},_.changeSrc=function(c){},_.changeSrcObj=function(c){},_.onSegmentDiscontinuity=function(){},S})(),Bt="pc-chromecast-sender",jt=(function(S){function _(p){var g;return(g=S.call(this)||this).remotePlayer=void 0,g.remotePlayerController=void 0,g.listener=void 0,g.seekTime=void 0,g.currentDuration=void 0,g.listener=p,g.currentDuration=0,_.prepareCastContext().then((function(){g.remotePlayer=new cast.framework.RemotePlayer,g.remotePlayerController=new cast.framework.RemotePlayerController(g.remotePlayer)})).catch((function(){g.listener.onSessionError()})),g}Nt()(_,S),_.canCast=function(){return te().chrome},_.stopLookingForRemotePlaybackDevices=function(p){window.cast&&window.cast.framework&&cast.framework.CastContext.getInstance().removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,p)},_.lookForRemotePlaybackDevices=(function(){var p=M()(Y().mark((function g(T){var P,N;return Y().wrap((function($){for(;;)switch($.prev=$.next){case 0:return $.prev=0,$.next=3,_.prepareCastContext();case 3:return P=$.sent,N=function(de){switch(de.castState){case cast.framework.CastState.NO_DEVICES_AVAILABLE:break;case cast.framework.CastState.NOT_CONNECTED:T.onRemoteDevice(!0);break;case cast.framework.CastState.CONNECTED:var fe=P.getCurrentSession();fe&&fe.getSessionState()===cast.framework.SessionState.SESSION_RESUMED&&T.onRemoteReconnect()}},P.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,N),P.setOptions({receiverApplicationId:"B3DCF968",autoJoinPolicy:chrome.cast.AutoJoinPolicy.TAB_AND_ORIGIN_SCOPED}),$.abrupt("return",N);case 10:$.prev=10,$.t0=$.catch(0),T.onRemoteDevice(!1);case 13:case"end":return $.stop()}}),g,null,[[0,10]])})));return function(g){return p.apply(this,arguments)}})(),_.prepareCastContext=(function(){var p=M()(Y().mark((function g(){return Y().wrap((function(T){for(;;)switch(T.prev=T.next){case 0:if(!window.cast||!window.cast.framework){T.next=2;break}return T.abrupt("return",Promise.resolve(cast.framework.CastContext.getInstance()));case 2:return T.abrupt("return",new Promise((function(P,N){if(s.g.__onGCastApiAvailable=function(de){de?P(cast.framework.CastContext.getInstance()):N()},!document.getElementById(Bt)){var $=document.createElement("script");$.id=Bt,$.onerror=function(){document.body.removeChild($),s.g.__onGCastApiAvailable=function(){},N()}
50,$.async=!0,$.src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",document.body.appendChild($)}})));case 3:case"end":return T.stop()}}),g)})));return function(){return p.apply(this,arguments)}})();var c=_.prototype;return c.configure=(function(){var p=M()(Y().mark((function g(T){var P,N,$,de,fe,pe,he;return Y().wrap((function(ve){for(;;)switch(ve.prev=ve.next){case 0:return P=T.path,ve.prev=1,ve.next=4,_.prepareCastContext();case 4:if($=ve.sent,de=$.getCurrentSession()){ve.next=13;break}return ve.next=9,$.requestSession();case 9:de=$.getCurrentSession(),this.setupRemotePlayerListeners(de),ve.next=14;break;case 13:de.getSessionState()===cast.framework.SessionState.SESSION_RESUMED&&this.setupRemotePlayerListeners(de);case 14:return(fe=new chrome.cast.media.MediaInfo(P,"")).streamType=chrome.cast.media.StreamType.BUFFERED,pe=new chrome.cast.media.GenericMediaMetadata,fe.metadata=pe,fe.customData={analytics:{chromecast_sender:"player-core",platform:"web"}},this.remotePlayerController.stop(),he=new chrome.cast.media.LoadRequest(fe),this.seekTime>0&&(he.currentTime=this.seekTime,this.seekTime=0),this.currentDuration=0,ve.next=25,(N=de)==null?void 0:N.loadMedia(he);case 25:ve.next=30;break;case 27:return ve.prev=27,ve.t0=ve.catch(1),ve.abrupt("return",this.handleError(ve.t0));case 30:case"end":return ve.stop()}}),g,this,[[1,27]])})));return function(g){return p.apply(this,arguments)}})(),c.stopMedia=(function(){var p=M()(Y().mark((function g(T){var P,N;return Y().wrap((function($){for(;;)switch($.prev=$.next){case 0:return T===void 0&&(T=!0),$.next=3,_.prepareCastContext();case 3:P=$.sent,(N=P.getCurrentSession())&&N.getSessionState()!==cast.framework.SessionState.SESSION_RESUMED&&N.endSession(T);case 6:case"end":return $.stop()}}),g)})));return function(g){return p.apply(this,arguments)}})(),c.invoke=function(p){this[p.name].call(this,p.arg)},c.play=function(){this.remotePlayer&&this.remotePlayer.isPaused&&this.remotePlayerController.playOrPause()},c.pause=function(){this.remotePlayer&&!this.remotePlayer.isPaused&&this.remotePlayerController.playOrPause()},c.seekTo=function(p){this.remotePlayer&&(this.remotePlayer.playerState!==chrome.cast.media.PlayerState.IDLE?(this.remotePlayer.currentTime=p,this.remotePlayerController.seek()):this.seekTime=p)},c.getCurrentTime=function(){return this.remotePlayer?this.remotePlayer.currentTime:0},c.delete=function(){this.remotePlayer&&this.stopMedia()},c.setMuted=function(p){this.remotePlayer&&p!==this.remotePlayer.isMuted&&this.remotePlayerController.muteOrUnmute()},c.isMuted=function(){return!!this.remotePlayer&&this.remotePlayer.isMuted},c.setVolume=function(p){this.remotePlayer&&(this.remotePlayer.volumeLevel=p,this.remotePlayerController.setVolumeLevel())},c.getVolume=function(){return this.remotePlayer?this.remotePlayer.volumeLevel:0},c.getDevice=(function(){var p=M()(Y().mark((function g(){var T,P;return Y().wrap((function(N){for(;;)switch(N.prev=N.next){case 0:return N.next=2,_.prepareCastContext();case 2:return T=N.sent,P=T.getCurrentSession(),N.abrupt("return",P?.getCastDevice().friendlyName||"");case 5:case"end":return N.stop()}}),g)})));return function(){return p.apply(this,arguments)}})(),c.setupRemotePlayerListeners=function(p){var g=this,T=(function(){var he=M()(Y().mark((function ve(){var Fe,Le;return Y().wrap((function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:(Fe=p.getMediaSession())&&(Le=Fe.media,g.currentDuration===0&&Le.duration===null&&(g.currentDuration=1/0,g.listener.onSinkDurationChanged(g.currentDuration)),g.listener.onSinkTimeUpdate());case 2:case"end":return Ke.stop()}}),ve)})));return function(){return he.apply(this,arguments)}})(),P=function(){switch(g.remotePlayer.playerState){case chrome.cast.media.PlayerState.BUFFERING:g.listener.onSinkIdle();break;case chrome.cast.media.PlayerState.PLAYING:g.listener.onSinkPlaying(!1);break;case chrome.cast.media.PlayerState.IDLE:var he=p.getMediaSession();he&&he.idleReason===chrome.cast.media.IdleReason.FINISHED&&g.listener.onSinkEnded()}},N=function(){g.listener.onSinkVolumeChanged(g.remotePlayer.volumeLevel,!0)},$=function(){g.listener.onSinkMutedChanged(g.remotePlayer.isMuted)},de=function(){g.remotePlayer.duration!==0&&(g.currentDuration=g.remotePlayer.duration,g.listener.onSinkDurationChanged(g.currentDuration))},fe=function(){g.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,T),g.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED,P),g.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED,N),g.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED,$),g.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.DURATION_CHANGED,de),g.listener.onSessionStop()};p.addEventListener(cast.framework.SessionEventType.MEDIA_SESSION,(function(){g.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.CURRENT_TIME_CHANGED,T),g.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.PLAYER_STATE_CHANGED,P),g.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.VOLUME_LEVEL_CHANGED,N),g.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_MUTED_CHANGED,$),g.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.DURATION_CHANGED,de),g.listener.onSessionStarted(p.getCastDevice().friendlyName)}));var pe=p.getSessionObj();pe.addUpdateListener((function(){pe.status===chrome.cast.SessionStatus.STOPPED&&fe()})),pe.addMediaListener(fe)},c.handleError=function(p){if(chrome.cast)switch(p){case chrome.cast.ErrorCode.SESSION_ERROR:this.listener.onSessionError();break;case chrome.cast.ErrorCode.RECEIVER_UNAVAILABLE:this.listener.onRemoteDevice(!1);break;case chrome.cast.ErrorCode.LOAD_MEDIA_FAILED:this.listener.onLoadMediaError();break;case chrome.cast.ErrorCode.CANCEL:this.listener.onUserCancel();break;default:this.listener.onSinkError({value:1,code:0,message:"Error requesting chromecast session"})}else this.listener.onSinkError({value:1,code:0,message:"Error loading chromecast SDK"})},_})(rr),et=(function(S){function _(p){var g;return(g=S.call(this)||this).video=void 0,g.video=p,g}Nt()(_,S);var c=_.prototype;return c.seekTo=function(p){this.video.currentTime=p},c.setPlaybackRate=function(p){this.video.playbackRate=p},c.setVolume=function(p){this.video.volume=p},c.getVolume=function(){return this.video.volume},c.isMuted=function(){return this.video.muted},c.setMuted=function(p){this.video.muted=p},c.getPlaybackRate=function(){return this.video.playbackRate},_})(rr),Ei=(function(){function S(c,p){this.muted=void 0,this.video=void 0,this.listener=void 0,this.unsubscribes=[],this.expectingMutedChanged=!1,this.expectingVolumeChanged=!1,this.expectedRateChange=void 0,this.video=c,this.listener=p,this.muted=c.muted,this.unsubscribes.push(O(c,"volumechange",this.volumeChange.bind(this))),this.unsubscribes.push(O(c,"ratechange",this.rateChange.bind(this)))}var _=S.prototype;return _.volumeChange=function(){var c=!this.expectingVolumeChanged;this.expectingMutedChanged=!1,this.expectingVolumeChanged=!1;var p=this.video.muted;this.muted!==p?(this.muted=p,this.listener.onSinkMutedChanged(p)):this.listener.onSinkVolumeChanged(this.video.volume,c)},_.rateChange=function(){this.video.playbackRate!==this.expectedRateChange&&this.listener.onSinkPlaybackRateChanged(this.video.playbackRate)}
50,_.unsubscribe=function(){this.unsubscribes.forEach((function(c){return c()}))},_.onConfigure=function(){this.expectingVolumeChanged&&(this.listener.onSinkVolumeChanged(this.video.volume,!1),this.expectingVolumeChanged=!1),this.expectingMutedChanged&&(this.muted=this.video.muted,this.listener.onSinkMutedChanged(this.video.muted),this.expectingMutedChanged=!1),this.expectedRateChange=void 0},_.trackRPC=function(c){var p=c.name,g=c.arg;p==="setVolume"&&this.video.volume!==g?this.expectingVolumeChanged=!0:p==="setMuted"&&this.video.muted!==g?this.expectingMutedChanged=!0:p==="setPlaybackRate"&&this.video.playbackRate!==g&&(this.expectedRateChange=g)},S})(),kt=C1,Ci=s.n(kt),Lr=(typeof self<"u"?self:typeof window<"u"?window:s.g!==void 0?s.g:void 0).Promise||Ci(),Mr=(function(S){function _(p,g){var T;return(T=S.call(this)||this).paused=!0,T.listener=void 0,T.video=void 0,T.unsubscribers=void 0,T.lastVolumeChangeEvent=void 0,T.video=p,T.listener=g,T.paused=!0,T.unsubscribers=[],T.addListener("volumechange",T.recordMuteChange.bind(T)),T.recordMuteChange(),T}Nt()(_,S);var c=_.prototype;return c.pause=function(){this.paused=!0,this.video.pause()},c.setPlaybackRate=function(p){this.video.playbackRate=p},c.delete=function(){this.unsubscribers.forEach((function(p){return p()}))},c.addListener=function(p,g,T){T===void 0&&(T=this.video),this.unsubscribers.push(O(T,p,g))},c.recordMuteChange=function(){this.lastVolumeChangeEvent={time:this.video.currentTime,muted:this.video.muted}},c.checkStopped=function(p){return!this.video.paused||this.video.ended||this.video.error||this.paused||this.listener.onSinkStop(p||this.unmuteAutopause()),!1},c.unmuteAutopause=function(){var p=this.lastVolumeChangeEvent;return!this.video.muted&&!p.muted&&this.video.currentTime===p.time},_})(rr),gt=(function(S){function _(p,g){var T;return(T=S.call(this,p,g)||this).onSinkIdle=void 0,T.intervalId=void 0,T.idle=void 0,T.lastPlayhead=void 0,T.lastBufferEnd=void 0,T.idleTimeout=void 0,T.playAttempt=!1,T.seeking=!1,T.audioBufferList=void 0,T.awaitingAutoplayCompletion=!1,T.intervalId=0,T.idle=!0,T.lastPlayhead=0,T.lastBufferEnd=0,T.idleTimeout=-1,T.audioBufferList=[],T.bindEvents(),T}Nt()(_,S);var c=_.prototype;return c.bindEvents=function(){var p=this;this.addListener("play",(function(){return p.onVideoPlay()})),this.addListener("pause",(function(){return p.onVideoPause()})),this.addListener("timeupdate",(function(){return p.onVideoTimeUpdate()})),this.addListener("ended",(function(){return p.onVideoEnded()})),this.addListener("error",(function(){return p.onVideoError()})),this.addListener("playing",(function(){return p.onVideoPlaying()})),this.addListener("seeking",(function(){return p.onVideoSeeking()}))},c.delete=function(){S.prototype.delete.call(this),this.audioBufferList=[],clearInterval(this.intervalId)},c.play=function(){this.paused=!1;for(var p=this.video.buffered,g=0,T=0;T<p.length;T++){var P=p.start(T);if(this.video.currentTime<=P){g=P;break}}this.video.currentTime<g&&(console.warn("Moving to buffered region",g,this.video.currentTime),this.listener.onSinkGapJump(g-this.video.currentTime),this.seekTo(g)),this.playInternal()},c.endOfStream=function(){this.idle=!1,clearTimeout(this.idleTimeout),this.idleTimeout=-1},c.seekTo=function(p){this.video.seekable.length&&p!==this.video.currentTime&&(this.seeking=!0,this.video.currentTime=p)},c.addSourceBuffer=function(p,g){(g.indexOf("mp4a")>-1||g.indexOf("opus")>-1)&&(this.audioBufferList=[p])},c.clearSourceBuffers=function(){this.audioBufferList=[]},c.onIdle=function(){var p;this.listener.onSinkIdle(),(p=this.onSinkIdle)==null||p.call(this)},c.onVideoPlay=function(){var p=this;this.playAttempt?(this.lastPlayhead=this.video.currentTime,clearInterval(this.intervalId),this.intervalId=self.setInterval((function(){return p.heartbeat()}),E)):(this.pause(),this.listener.play()),this.playAttempt=!1},c.onVideoPause=function(){this.awaitingAutoplayCompletion||(this.checkStopped(!1),clearInterval(this.intervalId))},c.onVideoTimeUpdate=function(){clearTimeout(this.idleTimeout),this.idleTimeout=-1,this.listener.onSinkTimeUpdate();var p=F(this.video.buffered,this.video.currentTime,x);this.checkBufferUpdate(p),this.updateIdle(p)},c.onVideoEnded=function(){this.listener.onSinkEnded()},c.onVideoPlaying=function(){this.video.paused||this.listener.onSinkPlaying(this.paused)},c.onVideoSeeking=function(){this.seeking?this.seeking=!1:this.listener.seekTo(this.video.currentTime)},c.onVideoError=function(){var p,g,T=(p=this==null||(g=this.video)==null?void 0:g.error)!=null?p:{},P=T.code,N=P===void 0?-1:P,$=T.message,de=$===void 0?"":$;this.listener.onSinkError({value:N,code:N,message:de})},c.heartbeat=function(){var p=F(this.video.buffered,this.video.currentTime,x);if(this.video.paused)clearInterval(this.intervalId);else if(this.video.currentTime===this.lastPlayhead){var g=G(this.video.buffered,this.video.currentTime,x);g!==this.video.currentTime&&(this.audioBufferList.map((function(T){U("Audio Buffer",T.buffered)})),U("<video> Buffer",this.video.buffered),console.warn("jumping "+(g-this.video.currentTime)+"s gap, current position "+this.video.currentTime+", new position "+g),this.listener.onSinkGapJump(g-this.video.currentTime),this.seekTo(g)),this.updateIdle(p,g===this.video.currentTime)}else this.checkBufferUpdate(p),this.lastPlayhead=this.video.currentTime},c.checkBufferUpdate=function(p){var g=p.end;g!==this.lastBufferEnd&&(this.lastBufferEnd=g,this.listener.onSinkBufferUpdate())},c.updateIdle=function(p,g){var T=this,P=p.end,N=P===void 0?0:P;g===void 0&&(g=!1);var $=this.video,de=$.buffered,fe=$.currentTime;if($.paused)this.idle=!0;else{var pe=[N].concat(this.audioBufferList.map((function(Ke){return F(Ke.buffered,fe,x).end}))),he=Math.max.apply(null,pe);Number.isFinite(he)||(he=0);var ve=de.length,Fe=ve>0?de.end(ve-1):N,Le=he-fe<x||g&&N>Fe;Le&&!this.idle&&(console.warn("playhead",fe,"max buffer",he,"max played",Fe),clearTimeout(this.idleTimeout),this.idleTimeout=self.setTimeout((function(){return T.onBufferingTimeout()}),L),this.onIdle()),this.idle=Le}},c.onBufferingTimeout=function(){clearTimeout(this.idleTimeout),this.idleTimeout=-1,this.listener.onSinkError({value:t,code:t,message:"Buffering timeout"})},c.playInternal=function(){var p=this;this.playAttempt=!0,this.awaitingAutoplayCompletion=!0,Lr.resolve(this.video.play()).then((function(){p.awaitingAutoplayCompletion=!1}
50)).catch((function(){p.playAttempt=!1,p.checkStopped(!0)}))},_})(Mr),Fn=(function(S){function _(p,g){var T;return(T=S.call(this)||this).listener=p,T.video=g,T.playbackMonitor=void 0,T.controlsObserver=void 0,T.playbackMonitor=new gt(g,p),T.observeControlsChange(),T}Nt()(_,S);var c=_.prototype;return c.configure=function(p){var g=p.srcObj;this.video.srcObject||(this.video.srcObject=g)},c.invoke=function(p){this[p.name].call(this,p.arg)},c.play=function(){this.playbackMonitor.play()},c.pause=function(){this.playbackMonitor.pause()},c.seekTo=function(p){this.playbackMonitor.seekTo(p)},c.endOfStream=function(){this.playbackMonitor.endOfStream()},c.setVolume=function(p){this.video.volume!==p&&(this.video.volume=p)},c.getVolume=function(){return this.video.volume},c.isMuted=function(){return this.video.muted},c.setMuted=function(p){this.video.muted!==p&&(this.video.muted=p)},c.setPlaybackRate=function(p){this.playbackMonitor.setPlaybackRate(p)},c.getPlaybackRate=function(){return this.video.playbackRate},c.getCurrentTime=function(){return this.video.currentTime},c.buffered=function(){return F(this.video.buffered,this.video.currentTime,x)},c.bufferDuration=function(){var p=this.buffered(),g=p.start;return p.end-Math.max(g,this.video.currentTime)},c.captureGesture=function(){this.playbackMonitor.play(),this.playbackMonitor.pause()},c.changeSrcObj=function(p){var g=this.video,T=g.playbackRate;g.srcObject=p,g.playbackRate=T},c.delete=function(){var p;this.playbackMonitor.delete(),this.video.srcObject=null,H(this.video),(p=this.controlsObserver)==null||p.disconnect()},c.observeControlsChange=function(){var p=this.listener,g=this.video;try{(this.controlsObserver=new MutationObserver((function(){p.onSinkControlsChanged(g.controls)}))).observe(g,{attributeFilter:["controls"]}),p.onSinkControlsChanged(g.controls)}catch{}},_})(rr),It=(function(){function S(c,p,g){g===void 0&&(g=new gt(p,c)),this.listener=c,this.video=p,this.playbackMonitor=g,this.controlsObserver=void 0,this.mseSink=void 0,this.awaitSink=void 0,this.observeControlsChange(),this.awaitSink=void 0,O(p,"error",this.onVideoError.bind(this))}var _=S.prototype;return _.invoke=function(c){var p=this.awaitSink,g=this.mseSink;p&&g?["enqueue","addTrack","setTimestampOffset"].includes(c.name)?this.invokeAsync(c):this.invokeSync(c):p?this.invokeAsync(c):g&&this.invokeSync(c)},_.initSink=function(){var c=this,p=this.awaitSink;if(!this.mseSink&&!p){var g=j.create(this.onMediaSourceEnded.bind(this),this.onMediaSourceError.bind(this));this.awaitSink=new Lr((function(T,P){g.sink.then((function(N){c.handleCreateSuccess(N),T()})).catch((function(N){c.handleCreateError(N),P()}))})),this.changeSrc(URL.createObjectURL(g.ms))}},_.configure=function(c){var p=c.trackID,g=c.codec,T=c.group,P=c.isProtected;this.initSink(),this.awaitSink||!this.isContentProtectionChanging(c)&&!this.isChangingToFromAudioOnly(c)||this.queueNewSink(),this.invoke({name:"addTrack",arg:re()({},Ho,{trackID:p,codec:g,group:T,isProtected:P})})},_.queueNewSink=function(){var c=this;this.awaitSink=new Lr((function(p,g){c.deferUntilIdle().then((function(){var T=j.create(c.onMediaSourceEnded.bind(c),c.onMediaSourceError.bind(c));return c.changeSrc(URL.createObjectURL(T.ms)),T.sink})).then((function(T){c.destroyMSESink(),c.handleCreateSuccess(T),c.play(),p()})).catch((function(T){c.handleCreateError(T),g()}))}))},_.addTrack=function(c){var p=c.trackID,g=c.codec,T=c.group,P=c.isProtected,N=this.mseSink;try{var $=N?.addTrack(p,g,T,P);$&&this.playbackMonitor.addSourceBuffer($,g)}catch(de){this.handleCreateError(de)}},_.enqueue=function(c){var p,g=c.trackID,T=c.buffer;(p=this.mseSink)==null||p.append(g,T)},_.endOfStream=function(){var c,p=this;(c=this.mseSink)==null||c.scheduleUpdate().then((function(){return p.playbackMonitor.endOfStream()}))},_.setTimestampOffset=function(c){var p,g=c.trackID,T=c.offset;(p=this.mseSink)==null||p.setTimestampOffset(g,T)},_.onSourceDurationChanged=function(c){var p=this.mseSink,g=this.video;if(p){var T=p.duration,P=(function(N,$,de){var fe=N;return N===1/0||N===C?de?fe=1/0:de||(fe=C):N!==$&&(fe=N),fe})(c,T,g.controls);P!==T&&p.setDuration(P)}},_.play=function(){var c,p=this;(c=this.mseSink)==null||c.scheduleUpdate().then((function(){return p.playbackMonitor.play()}))},_.pause=function(){var c,p=this;(c=this.mseSink)==null||c.scheduleUpdate().then((function(){return p.playbackMonitor.pause()}))},_.remove=function(c){var p,g=c.start,T=c.end;(p=this.mseSink)==null||p.remove(g,T)},_.seekTo=function(c){var p=this.mseSink,g=this.playbackMonitor,T=this.video,P=F(T.buffered,T.currentTime,x),N=P.start,$=P.end;c>=N&&c<$?p?.scheduleUpdate().then((function(){return g.seekTo(c)})):g.seekTo(c)},_.setVolume=function(c){this.video.volume!==c&&(this.video.volume=c)},_.getVolume=function(){return this.video.volume},_.isMuted=function(){return this.video.muted},_.setMuted=function(c){this.video.muted!==c&&(this.video.muted=c)},_.setPlaybackRate=function(c){this.playbackMonitor.setPlaybackRate(c)},_.getPlaybackRate=function(){return this.video.playbackRate},_.getCurrentTime=function(){return this.video.currentTime},_.buffered=function(){return F(this.video.buffered,this.video.currentTime,x)},_.getBufferedRanges=function(c){var p,g;return(p=(g=this.mseSink)==null?void 0:g.getBufferedRanges(c))!=null?p:[]},_.bufferDuration=function(){var c=this.buffered(),p=c.start;return c.end-Math.max(p,this.video.currentTime)},_.captureGesture=function(){this.playbackMonitor.play(),this.playbackMonitor.pause()},_.changeSrc=function(c){(function(p,g){var T=p.playbackRate,P=p.src;P&&URL.revokeObjectURL(P),p.src=g,p.playbackRate=T})(this.video,c)},_.changeSrcObj=function(c){},_.delete=function(){var c;this.playbackMonitor.delete(),(c=this.controlsObserver)==null||c.disconnect(),this.destroyMSESink(),H(this.video)},_.invokeSync=function(c){this[c.name].call(this,c.arg)},_.invokeAsync=function(c){var p,g=this;(p=this.awaitSink)==null||p.then((function(){return g.invokeSync(c)})).catch((function(){}))},_.onMediaSourceEnded=function(){this.video.load(),this.listener.onSinkReset()},_.destroyMSESink=function(){var c=this,p=function(){c.mseSink&&c.mseSink.destroy(),c.awaitSink=void 0,c.mseSink=void 0};this.mseSink?p():this.awaitSink&&this.awaitSink.then((function(){return p()})),this.playbackMonitor&&this.playbackMonitor.clearSourceBuffers()},_.isContentProtectionChanging=function(c){var p,g;return((p=(g=this.mseSink)==null?void 0:g.isDrmProtected())!=null&&p)!==c.isProtected},_.isChangingToFromAudioOnly=function(c){var p,g;return((p=(g=this.mseSink)==null?void 0:g.isAudioOnly())!=null&&p)!==(c.group==="audio_only")},_.deferUntilIdle=function(){var c=this,p=this.mseSink,g=this.playbackMonitor;return new Lr((function(T){p&&!c.video.paused?g.onSinkIdle=function(){g.onSinkIdle=void 0,T()}:T()}))},_.handleCreateSuccess=function(c){this.mseSink=c,this.awaitSink=void 0,this.onSourceDurationChanged(C),this.mseSink.setLiveSeekableRange(0,C)},_.handleCreateError=function(c){this.listener.onSinkError({value:4,code:4,message:c.toString()})},_.onMediaSourceError=function(c,p,g,T){var P={value:c,code:p,message:g};T?this.listener.onSinkError(P):this.listener.onSinkRecoverableError(P)},_.onVideoError=function(){this.destroyMSESink()},_.observeControlsChange=function(){var c=this,p=this.video;try{(this.controlsObserver=new MutationObserver((function(){c.invoke({name:"onSourceDurationChanged",arg:p.duration})}))).observe(p,{attributeFilter:["controls"]}
50)}catch{}},_.onSegmentDiscontinuity=function(){},S})(),Ho={trackID:0,codec:'codecs="magic"',mode:"mse",isProtected:!1,path:"",group:"",srcObj:null},cs=w1(),en=(function(){function S(){this.emitter=void 0,this.emitter=new cs.EventEmitter}var _=S.prototype;return _.on=function(c,p){this.emitter.on(String(c),p)},_.removeListener=function(c,p){this.emitter.removeListener(String(c),p)},_.emit=function(c){for(var p,g=arguments.length,T=new Array(g>1?g-1:0),P=1;P<g;P++)T[P-1]=arguments[P];(p=this.emitter).emit.apply(p,[String(c)].concat(T))},_.removeAllListeners=function(){this.emitter.removeAllListeners()},S})(),wr=(function(S){return S.Pending="pending",S.Ready="ready",S.Configuring="configuring",S.Active="active",S.Error="error",S})({}),tn=(function(S){return S.Heartbeat="heartbeat",S.Configure="configure",S.Set_Log_Config="setLogConfig",S.Debug="debug",S.Destroy="destroy",S})({}),Ar=(function(S){return S.State_Changed="stateChanged",S.Manifest_Load_Analytics="manifestLoadAnalytics",S.Available_Segments="availableSegments",S})({});function Ta(S,_){(_==null||_>S.length)&&(_=S.length);for(var c=0,p=new Array(_);c<_;c++)p[c]=S[c];return p}var wi={enabled:!1,levels:{debug:!0,log:!0,info:!0,warn:!0,error:!0}},Sa=new en,rn=function(S){var _=S.name,c=function(p){if(wi.enabled&&wi.levels[p]){for(var g=new Date().toTimeString().split(" ")[0],T=arguments.length,P=new Array(T>1?T-1:0),N=1;N<T;N++)P[N-1]=arguments[N];console[p].apply(console,[g+" - ("+_+")"].concat(P))}};return{debug:function(){for(var p=arguments.length,g=new Array(p),T=0;T<p;T++)g[T]=arguments[T];return c.apply(void 0,["debug"].concat(g))},log:function(){for(var p=arguments.length,g=new Array(p),T=0;T<p;T++)g[T]=arguments[T];return c.apply(void 0,["log"].concat(g))},info:function(){for(var p=arguments.length,g=new Array(p),T=0;T<p;T++)g[T]=arguments[T];return c.apply(void 0,["info"].concat(g))},warn:function(){for(var p=arguments.length,g=new Array(p),T=0;T<p;T++)g[T]=arguments[T];return c.apply(void 0,["warn"].concat(g))},error:function(){for(var p=arguments.length,g=new Array(p),T=0;T<p;T++)g[T]=arguments[T];return c.apply(void 0,["error"].concat(g))}}},xa=rn({name:"sw-host-config"});function Ai(S,_){var c=typeof Symbol<"u"&&S[Symbol.iterator]||S["@@iterator"];if(c)return(c=c.call(S)).next.bind(c);if(Array.isArray(S)||(c=(function(g,T){if(g){if(typeof g=="string")return ds(g,T);var P=Object.prototype.toString.call(g).slice(8,-1);return P==="Object"&&g.constructor&&(P=g.constructor.name),P==="Map"||P==="Set"?Array.from(g):P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?ds(g,T):void 0}})(S))||_){c&&(S=c);var p=0;return function(){return p>=S.length?{done:!0}:{done:!1,value:S[p++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
51In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ds(S,_){(_==null||_>S.length)&&(_=S.length);for(var c=0,p=new Array(_);c<_;c++)p[c]=S[c];return p}var fs,pt=rn({name:"sw-host"}),Qr=function(){return fs},hr=(function(S){return S[S.Pending=0]="Pending",S[S.Installing=1]="Installing",S[S.Ready=2]="Ready",S[S.Error=3]="Error",S})(hr||{}),nn=function(S){var _,c=function(){return{isMSESupported:De()}};if(((_=S)?_.url||(xa.error("Service worker config must specify a url"),0):(xa.error("Service worker config is required"),0))&&(function(Ve,Be){return!(!Be.forceActivate&&Ve.isMSESupported)})(c(),S)){var p,g,T,P,N,$,de,fe,pe,he,ve,Fe,Le,Ke,lt,mt,Je,Zr,mr,nr,We,Ct,bt,Lt=new en,vr=!0,zt=hr.Pending,lr=[],Mt=[],hi=[],Vr=wr.Pending,sn=!1,Wn=(function(){var Ve=M()(Y().mark((function Be(){var I,h;return Y().wrap((function(v){for(;;)switch(v.prev=v.next){case 0:return v.prev=0,wa(hr.Installing),navigator.serviceWorker.addEventListener("message",Pi),v.prev=3,v.next=6,at(S.url);case 6:v.next=11;break;case 8:v.prev=8,v.t0=v.catch(3),pt.error("[registerAndActivate] Failed to unregister service worker instances: "+v.t0);case 11:return I=S.scope!==void 0?{scope:S.scope}:void 0,v.next=14,navigator.serviceWorker.register(S.url,I);case 14:return(h=v.sent).installing?pt.log("Service worker installing"):h.waiting?pt.log("Service worker installed"):h.active&&pt.log("Service worker active"),v.next=18,kr(h);case 18:wa(hr.Ready),v.next=25;break;case 21:v.prev=21,v.t1=v.catch(0),pt.error("Registration failed with "+v.t1),wa(hr.Error);case 25:case"end":return v.stop()}}),Be,null,[[0,21],[3,8]])})));return function(){return Ve.apply(this,arguments)}})(),at=(function(){var Ve=M()(Y().mark((function Be(I){var h;return Y().wrap((function(v){for(;;)switch(v.prev=v.next){case 0:return h=new RegExp(I),v.next=3,navigator.serviceWorker.getRegistrations().then((function(){var y=M()(Y().mark((function b(w){var k,V,W;return Y().wrap((function(Z){for(;;)switch(Z.prev=Z.next){case 0:pt.debug("[unregisterOtherWorkerInstances] registrations",w),k=Ai(w);case 2:if((V=k()).done){Z.next=16;break}if((W=V.value).active===null||!h.test(W.active.scriptURL)){Z.next=14;break}return pt.debug("[unregisterOtherWorkerInstances] unregistering:",W),Z.prev=6,Z.next=9,W.unregister();case 9:Z.next=14;break;case 11:Z.prev=11,Z.t0=Z.catch(6),pt.error("[unregisterOtherWorkerInstances] Failed to unregister service worker: "+Z.t0);case 14:Z.next=2;break;case 16:case"end":return Z.stop()}}),b,null,[[6,11]])})));return function(b){return y.apply(this,arguments)}})());case 3:case"end":return v.stop()}}),Be)})));return function(Be){return Ve.apply(this,arguments)}})(),kr=(function(){var Ve=M()(Y().mark((function Be(I){return Y().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:return h.abrupt("return",new Promise((function(v,y){I.installing!==null||I.waiting!==null?(I.installing||I.waiting).addEventListener("statechange",(function(b){var w=b.target;pt.debug("sw registration, statechange",w.state),w.state==="activated"?(pt.log("Service worker activated"),v()):w.state==="redundant"&&y()})):v()})));case 1:case"end":return h.stop()}}),Be)})));return function(Be){return Ve.apply(this,arguments)}})(),wa=function(Ve){if(pt.log("[changeHostState] host state changed from "+zt+" to "+Ve),(zt=Ve)===hr.Ready){var Be=lr.slice();lr=[];for(var I,h=Ai(Be);!(I=h()).done;)(0,I.value)();var v=Mt.slice();Mt=[];for(var y,b=Ai(v);!(y=b()).done;){var w=y.value;rt(w)}}else if(zt===hr.Error){var k=hi.slice();hi=[];for(var V,W=Ai(k);!(V=W()).done;)(0,V.value)()}},nu=function(Ve){zt===hr.Error?Ve():hi.push(Ve)},Pi=function(Ve){var Be=Ve.data;switch(Be.type){case Ar.State_Changed:var I=Be.state;Vr===wr.Configuring&&(sn=!1),I===wr.Ready&&Vr!==wr.Pending&&pt.warn("[handleMessage] worker was restarted by the browser"),Vr=I;break;case Ar.Manifest_Load_Analytics:pt.debug("Manifest_Load_Analytics",Be)}Lt.emit(Be.type,Be)},rt=(function(){var Ve=M()(Y().mark((function Be(I){var h;return Y().wrap((function(v){for(;;)switch(v.prev=v.next){case 0:return pt.log("[sendMessage] sending message: ",I),v.abrupt("return",(h=navigator.serviceWorker.controller)==null?void 0:h.postMessage(I));case 2:case"end":return v.stop()}}),Be)})));return function(Be){return Ve.apply(this,arguments)}})(),Ii=(function(){var Ve=M()(Y().mark((function Be(I){return Y().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:if(Vr!==wr.Pending){h.next=4;break}return pt.log("[sendMessageWhenReady] worker is not ready, queueing message",I),Mt.push(I),h.abrupt("return");case 4:rt(I);case 5:case"end":return h.stop()}}),Be)})));return function(Be){return Ve.apply(this,arguments)}})(),$t=function(){g&&clearTimeout(g),g=setTimeout((function(){Hr()}),1e4)},Hr=function(){vr&&Vr!==wr.Pending&&(rt({type:tn.Heartbeat}),$t())},Cs=function(Ve,Be){Lt.on(Ar.State_Changed,(function I(h){h.type===Ar.State_Changed&&h.state===Ve&&(Lt.removeListener(Ar.State_Changed,I),Be(h))}))},ws=(function(){var Ve=M()(Y().mark((function Be(){return Y().wrap((function(I){for(;;)switch(I.prev=I.next){case 0:if(zt!==hr.Ready){I.next=2;break}return I.abrupt("return");case 2:return I.abrupt("return",new Promise((function(h,v){var y;y=function(){pt.log("[ensureHostReady] host state changed to ready"),h()},zt===hr.Ready?y():lr.push(y),nu((function(){pt.log("[ensureHostReady] host state changed to error"),v()}))})));case 3:case"end":return I.stop()}}),Be)})));return function(){return Ve.apply(this,arguments)}})(),au=(function(){var Ve=M()(Y().mark((function Be(){return Y().wrap((function(I){for(;;)switch(I.prev=I.next){case 0:if(Vr===wr.Pending){I.next=2;break}return I.abrupt("return");case 2:return I.abrupt("return",new Promise((function(h,v){Cs(wr.Ready,(function(y){pt.log("[ensureWorkerReady] worker state changed to ready",y),h()}))})));case 3:case"end":return I.stop()}}),Be)})));return function(){return Ve.apply(this,arguments)}})(),Aa=(function(){var Ve=M()(Y().mark((function Be(){return Y().wrap((function(I){for(;;)switch(I.prev=I.next){case 0:return I.next=2,ws();case 2:return I.next=4,au();case 4:case"end":return I.stop()}}),Be)})));return function(){return Ve.apply(this,arguments)}})(),su=(function(){var Ve=M()(Y().mark((function Be(I){return Y().wrap((function(h){for(;;)switch(h.prev=h.next){case 0:return sn=!0,p=ou(I??{}),h.next=4,Aa();case 4:rt({type:tn.Configure,config:p});case 5:case"end":return h.stop()}}),Be)})));return function(Be){return Ve.apply(this,arguments)}})(),ou=function(Ve){return re()({},p,Ve)},uu=(function(){var Ve=M()(Y().mark((function Be(){return Y().wrap((function(I){for(;;)switch(I.prev=I.next){case 0:if(sn||Vr!==wr.Active){I.next=2;break}return I.abrupt("return");case 2:return I.next=4,Aa();case 4:return I.abrupt("return",new Promise((function(h,v){Cs(wr.Active,(function(y){pt.log("[ensureConfigured] worker state changed to active",y),h()}))})));case 5:case"end":return I.stop()}}),Be)})));return function(){return Ve.apply(this,arguments)}})(),ka=function(Ve){Ii({type:tn.Set_Log_Config,config:Ve})};return bt=c().isMSESupported?{cacheMultivariant:!1,transformTargetDuration:!1,lowLatencyMode:{enabled:!1,useLocalSegment:!1,convertPrefetchSegment:!1,preloadPrefetchSegments:!1},driftDetection:{enabled:!1,maxPlaylistPosition:0,triggerDetectionThreshold:0,minDurationBetweenCorrections:0},debug:{addMultivariantDelay:void 0,addFirstVariantDelay:void 0}}:{cacheMultivariant:!0,transformTargetDuration:!1,lowLatencyMode:{enabled:!0,useLocalSegment:!0,convertPrefetchSegment:!0,preloadPrefetchSegments:!1},driftDetection:{enabled:!0,maxPlaylistPosition:3,triggerDetectionThreshold:10,minDurationBetweenCorrections:60},debug:{addMultivariantDelay:void 0,addFirstVariantDelay:void 0}},p={cacheMultivariant:(T=S.cacheMultivariant)!=null?T:bt.cacheMultivariant,transformTargetDuration:(P=S.transformTargetDuration)!=null?P:bt.transformTargetDuration,lowLatencyMode:{enabled:(N=($=S.lowLatencyMode)==null?void 0:$.enabled)!=null?N:bt.lowLatencyMode.enabled,useLocalSegment:(de=(fe=S.lowLatencyMode)==null?void 0:fe.useLocalSegment)!=null?de:bt.lowLatencyMode.useLocalSegment,convertPrefetchSegment:(pe=(he=S.lowLatencyMode)==null?void 0:he.convertPrefetchSegment)!=null?pe
51:bt.lowLatencyMode.convertPrefetchSegment,preloadPrefetchSegments:(ve=(Fe=S.lowLatencyMode)==null?void 0:Fe.preloadPrefetchSegments)!=null?ve:bt.lowLatencyMode.preloadPrefetchSegments},driftDetection:{enabled:(Le=(Ke=S.driftDetection)==null?void 0:Ke.enabled)!=null?Le:bt.driftDetection.enabled,maxPlaylistPosition:(lt=(mt=S.driftDetection)==null?void 0:mt.maxPlaylistPosition)!=null?lt:bt.driftDetection.maxPlaylistPosition,triggerDetectionThreshold:(Je=(Zr=S.driftDetection)==null?void 0:Zr.triggerDetectionThreshold)!=null?Je:bt.driftDetection.triggerDetectionThreshold,minDurationBetweenCorrections:(mr=(nr=S.driftDetection)==null?void 0:nr.minDurationBetweenCorrections)!=null?mr:bt.driftDetection.minDurationBetweenCorrections},debug:{addMultivariantDelay:(We=S.debug)==null?void 0:We.addMultivariantDelay,addFirstVariantDelay:(Ct=S.debug)==null?void 0:Ct.addFirstVariantDelay}},pt.info("[init] instantiating with config",p),S.debug!==void 0&&(S.debug.api={delayNextMediaManifest:function(Ve){(function(Be){if(Be.api==="delayNextMediaManifest"){var I=Be.delayInMs;pt.log("[handleDebugApiMessage] delaying next manifest by "+I+"ms")}rt(re()({type:tn.Debug},Be))})({api:"delayNextMediaManifest",delayInMs:Ve})}}),Sa.on("logConfigUpdated",ka),$t(),{registerAndActivate:Wn,addListener:function(Ve,Be){Lt.on(Ve,Be)},removeListener:function(Ve,Be){Lt.removeListener(Ve,Be)},sendMessage:rt,ensureReady:Aa,configure:su,ensureConfigured:uu,getConfig:function(){return p},getDriftDetectionConfig:function(){var Ve;return(Ve=p)==null?void 0:Ve.driftDetection},setLogConfig:ka,destroy:function(){pt.log("[destroy] destroying"),vr=!1,g&&clearTimeout(g),Lt.removeAllListeners(),Sa.removeListener("logConfigUpdated",ka),navigator.serviceWorker.removeEventListener("message",Pi),rt({type:tn.Destroy})},debugPassthroughAnalytics:function(Ve){var Be;(Be=S.debug)==null||Be.onPassthroughAnalytics==null||Be.onPassthroughAnalytics(Ve)}}}},Nn=(function(){function S(){this.serverOffsetVal=S.SERVER_OFFSET_DEFAULT,this.liveLatencyVal=0,this.lastTranscodeReceive=-1}var _=S.prototype;return _.tryGenerateServerOffset=function(c){return this.serverOffsetVal!==S.SERVER_OFFSET_DEFAULT?(console.warn("[generateServerOffset] the server offset has already been generated, skipping"),!1):(this.serverOffsetVal=(function(p,g){return new Date(1e3*g).getTime()-p})(Date.now(),c),!0)},_.tryUpdateLatency=function(c){return this.serverOffsetVal!==S.SERVER_OFFSET_DEFAULT&&(c<this.lastTranscodeReceive?(console.warn("[updateLatency] received latency values too old, ignoring. previous: "+this.lastTranscodeReceive+" current: "+c),!1):(this.liveLatencyVal=(function(p,g,T){return(p+g-T)/1e3})(Date.now(),this.serverOffsetVal,c),this.lastTranscodeReceive=c,!0))},e()(S,[{key:"serverOffset",get:function(){return this.serverOffsetVal}},{key:"liveLatency",get:function(){return this.liveLatencyVal}}])})();Nn.SERVER_OFFSET_DEFAULT=-1;var hs=function(S){var _=parseFloat(S);if(!isNaN(_))return _},Ut=(function(S){return S.Live_Latency_Load="liveLatencyLoad",S.Live_Latency_Stats="liveLatencyStats",S})({}),pr=(function(S){return S.Trigger_Drift_Correction="triggerDriftCorrection",S})({}),Ea=(function(S){return S.ID3="org.id3",S.APPLE_HLS="com.apple.quicktime.HLS",S})(Ea||{}),Or=(function(S){return S.PRIV="PRIV",S.TXXX="TXXX",S.TDEN="TDEN",S.STREAM_LEVEL_SERVER_TIME="X-SERVER-TIME",S})(Or||{}),vn=rn({name:"sink"}),ps=(function(S){function _(p,g){var T;(T=S.call(this,g,p)||this).intervalId=void 0,T.bufferingTimeoutId=void 0,T.attemptingToPlay=void 0,T.hasPlayedSrc=void 0,T.hasReloadedOnDecodeError=void 0,T.unsubscribersForTrackEvents=void 0,T.latencyStatistics=void 0,T.processedInitialCues=void 0,T.serviceWorker=void 0,T.serviceWorkerHandler=void 0,T.positionTracker=void 0,T.driftDetector=void 0,T.driftDetectorHandler=void 0,T.analytics=void 0,T.analyticsHandler=void 0,T.intervalId=-1,T.bufferingTimeoutId=-1,T.attemptingToPlay=!1,T.hasPlayedSrc=!1,T.hasReloadedOnDecodeError=!1,T.unsubscribersForTrackEvents=[],T.latencyStatistics=new Nn,T.processedInitialCues=!1,T.addListener("waiting",(function(){return T.onVideoWaiting(
51)}),T.video),T.addListener("timeupdate",(function(){return T.onVideoTimeUpdate()}),T.video),T.addListener("durationchange",(function(){return T.onVideoDurationChange()}),T.video),T.addListener("error",(function(){return T.onVideoError()}),T.video),T.addListener("play",(function(){return T.onVideoPlay()}),T.video),T.addListener("pause",(function(){return T.onVideoPause()}),T.video),T.addListener("ended",(function(){return T.onVideoEnded()}),T.video),T.addListener("playing",(function(){return T.onVideoPlaying()}),T.video);var P,N,$,de,fe,pe,he,ve,Fe,Le,Ke,lt,mt,Je,Zr=u(document).visibilityChange;if(T.addListener(Zr,(function(){return T.onVisibilityChange()}),document),T.serviceWorker=Qr(),T.serviceWorkerHandler=function(We){return T.onServiceWorkerMessage(We)},T.addServiceWorkerListeners(),T.serviceWorker!==void 0){var mr;T.positionTracker=(Ke=[],lt=-1,mt=function(){return Ke.length===0||Le===void 0?(lt=-1,!1):(lt=Je(Le))!==-1},Je=function(We){var Ct=new RegExp("^"+We);if(Ke){var bt=Ke.findIndex((function(Mt){return Ct.test(Mt.pdt)}));if(bt===-1)for(var Lt=new Date(We+"Z"),vr=0;vr<Ke.length;vr++){var zt=Ke[vr],lr=new Date(zt.pdt);if(lr.getTime()<=Lt.getTime()&&lr.getTime()+1e3*zt.duration>Lt.getTime()){bt=vr;break}}if(bt!==-1)return bt}return console.warn("Couldn't find segment for PDT "+We),-1},{processAvailableSegments:function(We){return Ke=We,mt()},processTDEN:function(We){return Le=We,mt()},getCurrentPosition:function(){return lt}});var nr=(mr=T.serviceWorker)==null?void 0:mr.getDriftDetectionConfig();nr!==void 0&&nr.enabled&&(T.driftDetector=(P={maxPlaylistPosition:nr.maxPlaylistPosition,triggerDetectionThreshold:nr.triggerDetectionThreshold,minDurationBetweenCorrections:nr.minDurationBetweenCorrections},fe=new en,pe=0,he=0,ve=function(){if(N!==void 0&&$!==void 0){if(N<=P.maxPlaylistPosition)he=0;else if((he+=1)>P.triggerDetectionThreshold){console.debug("[handleDriftDetection] above detection threshold");var We=Date.now();(de===void 0||We-de>P.minDurationBetweenCorrections)&&(console.debug("[handleDriftDetection] within min duration, triggering rebuffer-to-live"),Fe(We,N,$))}}},Fe=function(We,Ct,bt){pe+=1,de=We,he=0;var Lt={type:pr.Trigger_Drift_Correction,playlistPosition:Ct,playhead:bt,rebufferCount:pe};fe.emit(pr.Trigger_Drift_Correction,Lt)},{addListener:function(We,Ct){fe.on(We,Ct)},removeListener:function(We,Ct){fe.removeListener(We,Ct)},processPlaylistPosition:function(We){N=We},processTimeUpdate:function(We){var Ct=Math.floor(We);$!==void 0&&Ct===$||($=Ct,ve())}}),T.driftDetectorHandler=function(We){return T.onDriftDetectorEvent(We)},T.addDriftDetectorListeners()),T.analytics=(function(){var We,Ct,bt,Lt,vr=new en,zt={},lr={duration:0},Mt={min:0,avg:0,max:0,last:0},hi={first:void 0,last:void 0},Vr={count:0},sn=function(){if((at=Ut.Live_Latency_Load)===Ut.Live_Latency_Load&&zt[at]===void 0&&We!==void 0&&Ct!==void 0){var at,kr=zt[Ut.Live_Latency_Load]||0;zt[Ut.Live_Latency_Load]=kr+1,vr.emit(Ut.Live_Latency_Load,{type:Ut.Live_Latency_Load,serverOffset:We,manifestLoadAnalytics:Ct})}},Wn=function(){var at=zt[Ut.Live_Latency_Stats]||0;zt[Ut.Live_Latency_Stats]=at+1,vr.emit(Ut.Live_Latency_Stats,{type:Ut.Live_Latency_Stats,playlistPosition:re()({},Mt),liveLatencyTiming:re()({},hi),driftCorrection:re()({},Vr)})};return{addListener:function(at,kr){vr.on(at,kr)},removeListener:function(at,kr){vr.removeListener(at,kr)},processServerOffset:function(at){We={serverTime:1e3*at.serverTime,clientTime:at.clientTime,serverOffset:at.serverOffset},sn()},processManifestLoadAnalytics:function(at){Ct=at,sn()},processSinkState:function(at){bt==="playing"&&at==="pause"&&Wn(),bt=at},processTimeUpdate:function(at){var kr=Math.floor(at);Lt!==void 0&&kr===Lt||(lr.duration+=1,Lt=kr,lr.duration%10==0&&Wn())},processPlaylistPosition:function(at){at<Mt.min&&(Mt.min=at),at>Mt.max&&(Mt.max=at),Mt.avg===0?Mt.avg=at:Mt.avg=(Mt.avg*lr.duration+at)/(lr.duration+1),Mt.last=at},processLiveLatencyUpdate:function(at){hi.first===void 0&&(hi.first=re()({},at)),hi.last=re()({},at)},processDriftCorrectionStart:function(){Vr.count+=1}}})(),T.analyticsHandler=function(We){return T.onAnalyticsEvent(We)},T.addAnalyticsListeners()}return T}
51Nt()(_,S);var c=_.prototype;return c.invoke=function(p){this[p.name].call(this,p.arg)},c.configure=function(p){var g=p.path;this.handleTrackEvents(),this.hasReloadedOnDecodeError=!1,this.hasPlayedSrc=!1,this.video.src=g},c.play=function(){var p=this,g=this.video.buffered;if(g.length>0){var T=g.start(g.length-1),P=g.end(g.length-1);this.video.duration===1/0&&(P<this.video.currentTime||this.video.currentTime<T)&&(this.listener.onSinkGapJump(T-this.video.currentTime),console.warn("Moving to buffered region"),this.video.currentTime=T)}this.paused=!1,this.attemptingToPlay=!0,(p.serviceWorker===void 0||p.hasPlayedSrc?Promise.resolve(p.video.play()):p.serviceWorker.ensureConfigured().catch((function(N){vn.warn("sw, ensureConfigured failed",N)})).then((function(){return Promise.resolve(p.video.play())}))).then((function(){p.attemptingToPlay=!1,p.hasPlayedSrc=!0})).catch((function(){p.attemptingToPlay=!1,p.checkStopped(!0)}))},c.pause=function(){S.prototype.pause.call(this),clearTimeout(this.intervalId)},c.seekTo=function(p){this.video.currentTime=p},c.setVolume=function(p){this.video.volume=p},c.getVolume=function(){return this.video.volume},c.buffered=function(){return F(this.video.buffered,this.video.currentTime,x)},c.decodedFrames=function(){return q(this.video)},c.droppedFrames=function(){return z(this.video)},c.delete=function(){S.prototype.delete.call(this),this.removeTrackListeners(),this.removeServiceWorkerListeners(),this.removeDriftDetectorListeners(),this.removeAnalyticsListeners(),this.video.src="",this.video.load()},c.isMuted=function(){return this.video.muted},c.setMuted=function(p){this.video.muted=p},c.getPlaybackRate=function(){return this.video.playbackRate},c.getCurrentTime=function(){return this.video.currentTime},c.bufferDuration=function(){var p=this.buffered(),g=p.start;return p.end-Math.max(g,this.video.currentTime)},c.captureGesture=function(){Promise.resolve(this.video.play()).catch((function(){})),this.video.pause()},c.addServiceWorkerListeners=function(){this.serviceWorker!==void 0&&(this.serviceWorker.addListener(Ar.Manifest_Load_Analytics,this.serviceWorkerHandler),this.serviceWorker.addListener(Ar.Available_Segments,this.serviceWorkerHandler))},c.onServiceWorkerMessage=function(p){switch(p.type){case Ar.Manifest_Load_Analytics:var g;(g=this.analytics)==null||g.processManifestLoadAnalytics(p.data);break;case Ar.Available_Segments:var T;(T=this.positionTracker)==null||T.processAvailableSegments(p.segments)}},c.removeServiceWorkerListeners=function(){this.serviceWorker!==void 0&&(this.serviceWorker.removeListener(Ar.Manifest_Load_Analytics,this.serviceWorkerHandler),this.serviceWorker.removeListener(Ar.Available_Segments,this.serviceWorkerHandler))},c.addDriftDetectorListeners=function(){var p;(p=this.driftDetector)==null||p.addListener(pr.Trigger_Drift_Correction,this.driftDetectorHandler)},c.onDriftDetectorEvent=function(p){var g;p.type===pr.Trigger_Drift_Correction&&(vn.debug("triggering drift correction",p),(g=this.analytics)==null||g.processDriftCorrectionStart(),this.resumeAtLive())},c.resumeAtLive=function(){this.pause(),this.configure({path:this.video.src}),this.play()},c.removeDriftDetectorListeners=function(){var p;(p=this.driftDetector)==null||p.removeListener(pr.Trigger_Drift_Correction,this.driftDetectorHandler)},c.addAnalyticsListeners=function(){var p,g;(p=this.analytics)==null||p.addListener(Ut.Live_Latency_Load,this.analyticsHandler),(g=this.analytics)==null||g.addListener(Ut.Live_Latency_Stats,this.analyticsHandler)},c.onAnalyticsEvent=function(p){var g;switch((g=this.serviceWorker)==null||g.debugPassthroughAnalytics(p),p.type){case Ut.Live_Latency_Load:vn.debug("analytics event, Live Latency Load",p.serverOffset,p.manifestLoadAnalytics);break;case Ut.Live_Latency_Stats:vn.debug("analytics event, Live Latency Stats",p.playlistPosition,p.liveLatencyTiming,p.driftCorrection)}},c.removeAnalyticsListeners=function(){var p,g;(p=this.analytics)==null||p.removeListener(Ut.Live_Latency_Load,this.analyticsHandler),(g=this.analytics)==null||g.removeListener(Ut.Live_Latency_Stats,this.analyticsHandler)},c.addTrackListener=function(p,g,T){this.unsubscribersForTrackEvents.push(O(T,p,g))},c.removeTrackListeners=function(){this.unsubscribersForTrackEvents.forEac
51h((function(p){return p()}))},c.checkTracksStatus=function(){for(var p=this.video.textTracks,g=0;g<p.length;g++){var T=p[g];T.kind==="metadata"&&T.mode==="disabled"&&(T.mode="hidden")}},c.handleTDENDataReceived=function(p){if(this.positionTracker!==void 0&&this.positionTracker.processTDEN(p)){var g,T,P=this.positionTracker.getCurrentPosition();(g=this.analytics)==null||g.processPlaylistPosition(P),(T=this.driftDetector)==null||T.processPlaylistPosition(P)}},c.handleTXXXSegmentDataReceived=function(p){var g,T=(function(P){var N=o(P);if("transc_r"in N)return{transc_r:parseInt(N.transc_r)}})(p);T!==void 0&&(T.transc_r>0&&this.listener.onPassthroughSinkPropertyChanged("transcodeReceiveInSecs",T.transc_r/1e3),this.latencyStatistics.tryUpdateLatency(T.transc_r)&&(this.listener.onPassthroughSinkPropertyChanged("liveLatency",this.latencyStatistics.liveLatency),(g=this.analytics)==null||g.processLiveLatencyUpdate({transc_r:T.transc_r,latency:this.latencyStatistics.liveLatency})))},c.handleInitialCues=function(p){for(var g,T,P=0;P<p.length;++P){var N=p[P];N.type===Ea.APPLE_HLS&&N.value.key===Or.STREAM_LEVEL_SERVER_TIME&&(g=hs(N.value.data))}this.processedInitialCues=!0,g!==void 0&&this.latencyStatistics.tryGenerateServerOffset(g)&&((T=this.analytics)==null||T.processServerOffset({serverTime:g,clientTime:Date.now(),serverOffset:this.latencyStatistics.serverOffset}))},c.shouldPropagateCue=function(p){var g=p.type,T=p.value;return!(g!==Ea.ID3||!T||!(T.key===Or.TXXX&&T.info!=="segmentmetadata"||T.key===Or.PRIV&&T.info===Zi.METADATA_ID||T.key===Or.PRIV&&T.info===Zi.INBAND_METADATA_ID))},c.handleCueChange=function(p){var g=this,T=new Set;this.addTrackListener("cuechange",(function(){var P;!g.processedInitialCues&&p.cues&&g.handleInitialCues(p.cues);var N=(P=p.activeCues)!=null?P:[];if(N.length>0){for(var $=new Set,de=0;de<N.length;++de){var fe=N[de];if(!T.has(fe)){fe.type;var pe=fe.value;if(pe.key===Or.TXXX&&pe.info==="segmentmetadata"&&g.handleTXXXSegmentDataReceived(pe.data),pe.key===Or.TDEN&&g.handleTDENDataReceived(pe.data),g.shouldPropagateCue(fe)){var he=pe.key===Or.PRIV?new TextDecoder("utf-8").decode(pe.data):pe.data||"",ve=pe.info||"";g.listener.onPassthroughSinkMetadata(fe.startTime,fe.endTime,he,ve,ve)}}$.add(fe)}T=$}}),p)},c.handleTrackEvents=function(){var p=this;this.removeTrackListeners(),window.DataCue===void 0&&window.WebKitDataCue===void 0||(this.addTrackListener("change",(function(){p.checkTracksStatus()}),this.video.textTracks),this.addTrackListener("addtrack",(function(g){var T=g.track;T.kind==="metadata"&&T.mode==="disabled"&&(T.mode="hidden",p.handleCueChange(T))}),this.video.textTracks))},c.onVideoWaiting=function(){var p=this;if(F(this.video.buffered,this.video.currentTime,x).end-this.video.currentTime<x){this.listener.onSinkIdle(),clearTimeout(this.bufferingTimeoutId),this.bufferingTimeoutId=self.setTimeout((function(){p.listener.onSinkError({value:t,code:t,message:"Buffering timeout"})}),L);var g=O(this.video,"timeupdate",(function(){g(),clearTimeout(p.bufferingTimeoutId)}))}var T=O(this.video,"timeupdate",(function(){p.video.readyState===4&&(T(),p.onVideoPlaying())}))},c.onVideoTimeUpdate=function(){var p,g;this.listener.onSinkTimeUpdate(),(p=this.analytics)==null||p.processTimeUpdate(this.getCurrentTime()),(g=this.driftDetector)==null||g.processTimeUpdate(this.getCurrentTime())},c.onVideoDurationChange=function(){this.listener.onSinkDurationChanged(this.video.duration)},c.onVideoError=function(){var p=this.video.error,g=p.code,T=p.message,P=T===void 0?"":T,N=this.video.src.indexOf(".m3u8")!==-1;if(g===4&&!this.hasPlayedSrc&&N)return clearTimeout(this.bufferingTimeoutId),void this.listener.onSinkError({value:404,code:404,message:P});g!==3||this.hasReloadedOnDecodeError?this.listener.onSinkError({value:g,code:g,message:P}):this.hasReloadedOnDecodeError||(this.hasReloadedOnDecodeError=!0,console.warn("Reload video element on MEDIA_ERR_DECODE 3"),this.video.load())},c.onVideoPlay=function(){var p=this,g=this.video.currentTime;clearTimeout(this.intervalId),this.intervalId=self.setTimeout((function(){return p.heartbeat(g)}),E)},c.onVideoPause=function(){var p;clearTimeout(this.intervalId),this.attemptingToPlay||((p=this.analytics)==null||p.processSinkState("pause"),this.checkStopped(!1))},c.onVideoEnded=function(){this.listener.onSinkEnded()},c.onVideoPlaying=function(){var p;(p=this.analytics)==null||p.processSinkState("playing"),this.listener.onSinkPlaying(this.paused),this.trackBufferUpdate(F(this.video.buffered,this.video.currentTime,x).end)},c.onVisibilityChange=function(){var p=u(document).hidden;document[p]&&(this.hasReloadedOnDecodeError=!1)},c.heartbeat=function(p){var g,T,P,N,$=this,de=this.video.currentTime;if(de===p){if(g=this.video,T=x,N=F(g.buffered,g.currentTime,T).end-(P=g.currentTime),!(g.ended||g.duration-P<T)&&N<T)return void this.listener.onSinkIdle();var fe=G(this.video.buffered,de,x);fe!==de&&(console.warn("jumping "+(fe-de)+"s gap"),this.listener.onSinkGapJump(fe-this.video.currentTime),this.video.currentTime=fe,de=this.video.currentTime)}this.intervalId=self.setTimeout((function(){return $.heartbeat(de)}),E)},c.trackBufferUpdate=function(p){var g=this,T=this.buffered().end;
51T!==p&&this.listener.onSinkBufferUpdate();var P=O(this.video,"timeupdate",(function(){P(),g.trackBufferUpdate(T)}))},_})(Mr),ms=(function(S){function _(){return S.apply(this,arguments)||this}return Nt()(_,S),_.prototype.onIdle=function(){this.onSinkIdle?this.onSinkIdle():this.listener.onSinkIdle()},_})(gt),jo=(function(S){function _(p,g,T){var P;return(P=S.call(this,p,g,new ms(g,p))||this).listener=p,P.video=g,P.adjustments=T,P}Nt()(_,S);var c=_.prototype;return c.configure=function(p){var g=p.trackID,T=p.codec,P=p.group,N=p.isProtected;if(this.initSink(),this.isContentProtectionChanging(p)&&this.queueNewSink(),this.isNewSinkNeeded(p)){this.queueNewSink();var $=this.getTrack(B.audio);$&&this.invoke({name:"addTrack",arg:$})}this.invoke({name:"addTrack",arg:re()({},Bn,{trackID:g,codec:T,group:P,isProtected:N})})},c.queueNewSink=function(){var p=this;this.awaitSink=new Promise((function(g,T){p.deferUntilIdle().then((function(){var P=j.create(p.onMediaSourceEnded.bind(p),p.onMediaSourceError.bind(p));return p.changeSrc(URL.createObjectURL(P.ms)),P.sink})).then((function(P){p.invokeAsync({name:"play",arg:void 0}),p.destroyMSESink(),p.handleCreateSuccess(P),g()})).catch((function(P){p.handleCreateError(P),T()}))}))},c.deferUntilIdle=function(){var p=this,g=this.mseSink,T=this.playbackMonitor;return new Promise((function(P){g&&!p.video.paused?(T.onSinkIdle=function(){},p.video.addEventListener("waiting",(function(){T.onSinkIdle=void 0,P()}),{once:!0})):P()}))},c.onSegmentDiscontinuity=function(){var p=this.adjustments,g=this.awaitSink,T=this.mseSink;p.rebuildMediaSinkOnDiscontinuity&&T&&!g&&this.queueNewSink()},c.isSinkVideoSourceQualityChangeRequired=function(p,g){return!!this.adjustments.rebuildMediaSinkOnSourceQualityChange&&p==="chunked"!=(g==="chunked")},c.isNewSinkNeeded=function(p){var g=this.adjustments,T=this.mseSink,P=this.awaitSink;if(p.trackID!==B.video||!g.rebuildMediaSinkOnSourceQualityChange||!T||P)return!1;var N=this.getTrack(B.video),$=this.getTrack(B.audio);return!(!N||!$)&&this.isSinkVideoSourceQualityChangeRequired(N.group,p.group)},c.getTrack=function(p){var g,T=this.mseSink;return(g=T?.bufferProperties.find((function(P){return P.trackID===p})))!=null?g:null},_})(It),Bn={trackID:0,codec:'codecs="magic"',mode:"mse",isProtected:!1,path:"",group:"",srcObj:null},gn=(function(){function S(c,p,g,T){this.listener=c,this.adjustments=g,this.video=void 0,this.drmManager=void 0,this.codecs=void 0,this.sink=void 0,this.observer=void 0,this.remoteDevicesListener=void 0,this.video=T,this.listener=c,this.drmManager=new Et({video:this.video,listener:c}),this.codecs=Object.create(null),this.sink=new et(this.video),p&&(this.remoteDevicesListener=jt.lookForRemotePlaybackDevices(this.listener)),this.observer=new Ei(this.video,c)}var _=S.prototype;return _.videoElement=function(){return this.video},_.delete=function(){var c;this.reset(),(c=this.remoteDevicesListener)==null||c.then((function(p){p&&jt.stopLookingForRemotePlaybackDevices(p)}))},_.configure=function(c){var p=c.mode,g=c.codec,T=c.trackID;this.sink instanceof et&&(this.sink=this.getSink(p)),g?this.codecs[T]=g:c.codec=this.codecs[T],this.sink.configure(c);var P=c.path,N=c.isProtected;P&&N&&this.drmManager.configure(P),this.observer.onConfigure()},_.applyRPC=function(c){this.observer.trackRPC(c),this.sink.invoke(c)},_.getCurrentSink=function(){return this.sink},_.reset=function(){this.sink.delete(),this.drmManager.reset(),this.sink=new et(this.video),this.listener.onSinkTimeUpdate(),this.listener.onSinkBufferUpdate()},_.isProtected=function(){return this.drmManager.isProtected()},_.captureGesture=function(){this.video.played.length||this.sink.captureGesture()},_.destroy=function(){this.observer.unsubscribe(),this.delete()},_.isLowLatencyCapable=function(){return this.sink instanceof It},_.onSegmentDiscontinuity=function(){this.sink.onSegmentDiscontinuity()},_.getSink=function(c){switch(c){case"chromecast":return new jt(this.listener);case"mse-worker":return new Fn(this.listener,this.video);case"passthrough":return new ps(this.listener,this.video);case"webview":return new jo(this.listener,this.video,this.adjustments);default:return new It(this.listener,this.video)}},S})(),Rr=(function(S){return S[S.STATE_CHANGED=0]="STATE_CHANGED",S[S.CONFIGURE=1]="CONFIGURE",S[S.RESET=2]="RESET",S[S.ADD_CUE=3]="ADD_CUE",S[S.GET_DECODE_INFO=4]="GET_DECODE_INFO",S[S.MEDIA_SINK_RPC=5]="MEDIA_SINK_RPC",S[S.GET_EXPERIMENTS=6]="GET_EXPERIMENTS",S[S.LOG_MESSAGE=7]="LOG_MESSAGE",S[S.DATA_CHANNEL_CREATE=8]="DATA_CHANNEL_CREATE",S[S.DATA_CHANNEL_CLOSE=9]="DATA_CHANNEL_CLOSE",S[S.DATA_CHANNEL_SEND=10]="DATA_CHANNEL_SEND",S[S.RTC_SET_REMOTE_DESCRIPTION=11]="RTC_SET_REMOTE_DESCRIPTION",S[S.PROPERTY_CHANGED=12]="PROPERTY_CHANGED",S[S.SYNC_TIME_CHANGED=13]="SYNC_TIME_CHANGED",S[S.BUFFERED_RANGES=14]="BUFFERED_RANGES",S[S.DESTROY=15]="DESTROY",S})({}),Go={rebuildMediaSinkOnSourceQualityChange:!1,rebuildMediaSinkOnDiscontinuity:!1,abrTranscodesOnly:!1},Un=(function(S){return S.AVC="avc1",S.HEVC="hvc1",S.AV1="av01",S})({}),qn=(function(S){return S.HEVC="b8b7cac6-956d-4819-8d35-9ae57aa5f0ce",S.AV1="d16629fa-a0bf-4a2a-b490-c1f92af05009",S.GPU="8b0cb43a-720b-4775-9f98-21da360d60b1",S})({}),Wo=(function(){function S(c,p){var g;if(c===void 0&&(c={}),this.onConfigChanged=p,this.mainConfig=void 0,this.experimentHandler=void 0,this.defaultConfig={media:{codecConfigs:[]},logLevel:"",features:{gpu:{flags:{enable_render_surface:!1,add_canvas_to_
51surface:!1,allow_canvas_visible:!1,init_transformer:!1,run_transformer:!1}}},experiments:{}},this.resetMainConfig(),this.setupExperimentHandlers(),c.logLevel&&(this.mainConfig.logLevel=c.logLevel),c.media&&Object.assign(this.mainConfig.media,c.media),c.features&&(Object.assign(this.mainConfig.features,c.features),c.features.gpu&&Object.assign((g=this.mainConfig.features.gpu)!=null?g:{},c.features.gpu)),c.experiments)for(var T=0,P=Object.values(c.experiments);T<P.length;T++){var N=P[T];N&&this.setExperiment(N.id,N.assignment)}}var _=S.prototype;return _.setupExperimentHandlers=function(){var c=this,p=this.handleExperiment((function(){return c.mainConfig.media.codecConfigs}),vs,(function(P){var N=c.mainConfig.media.codecConfigs;c.mainConfig.media.codecConfigs=N?.concat(P)})),g=this.handleExperiment((function(){return c.mainConfig.media.codecConfigs}),$o,(function(P){var N=c.mainConfig.media.codecConfigs;c.mainConfig.media.codecConfigs=N?.concat(P)})),T=this.handleExperiment((function(){return c.mainConfig.features.gpu}),(function(P,N){var $=zo(N),de=re()({},P);return $.flags&&(de.flags=re()({},de.flags,$.flags)),$.module&&(de.module=re()({},de.module,$.module)),$.render&&(de.render=re()({},de.render,$.render)),de}),(function(P){c.mainConfig.features.gpu=P}));this.experimentHandler=new Map([[qn.HEVC,p],[qn.AV1,g],[qn.GPU,T]])},_.getConfigSnapshot=function(){return re()({},this.mainConfig)},_.setExperiment=function(c,p){var g;c&&p&&(this.mainConfig.experiments[c]={id:c,assignment:p,version:0},(g=this.experimentHandler.get(c))==null||g(p))},_.delete=function(){this.resetMainConfig()},_.resetMainConfig=function(){this.mainConfig=re()({},this.defaultConfig)},_.handleExperiment=function(c,p,g){var T=this;return function(P){var N=c(),$=p(N,P);$!==N&&(g($),T.onConfigChanged())}},S})(),zo=function(S){var _={};if(!S)return _;var c=S.split("_config_"),p=(c[0],c[1]);if(!p)return _;try{_=JSON.parse(atob(p))}catch(g){console.warn("[ConfigManager]: Invalid assignment config provided",S,g)}return _};function vs(S,_){switch(_){case"control":case"holdback":return[{codecString:Un.HEVC,setting:{disableUse:!0}}];case"forceOn":return[{codecString:Un.HEVC,setting:{skipPlatformSupportChecks:!0}}];case"treatment":return[];default:return S}}function $o(S,_){switch(_){case"control":case"holdback":return[{codecString:Un.AV1,setting:{disableUse:!0}}];case"forceOn":return[{codecString:Un.AV1,setting:{skipPlatformSupportChecks:!0}}];case"treatment":return[];default:return S}}var Ko=I1(),ir=(function(S){function _(c,p,g,T){var P;return(P=S.call(this,g)||this).source=c,P.code=p,P.message=g,P.fatal=T,P}return Nt()(_,S),_})(s.n(Ko)()(Error)),Wt=(function(S){return S[S.WebGPUNotAvailable=-1e3]="WebGPUNotAvailable",S[S.WebGPUAdapterNotAvailable=-1001]="WebGPUAdapterNotAvailable",S[S.WebGPUDeviceNotAvailable=-1002]="WebGPUDeviceNotAvailable",S[S.ShaderCompilationFailed=-1100]="ShaderCompilationFailed",S[S.PipelineCreationFailed=-1101]="PipelineCreationFailed",S[S.SamplerCreationFailed=-1102]="SamplerCreationFailed",S[S.StreamCreationFailed=-1103]="StreamCreationFailed",S[S.OutOfMemory=-1200]="OutOfMemory",S[S.InvalidBuffer=-1201]="InvalidBuffer",S[S.InvalidBufferSize=-1202]="InvalidBufferSize",S[S.DeviceLost=-1300]="DeviceLost",S[S.DeviceLostTooManyRetries=-1301]="DeviceLostTooManyRetries",S[S.CanvasCreationFailed=-1400]="CanvasCreationFailed",S[S.InferenceFailed=-1500]="InferenceFailed",S[S.FetchFailed=-1600]="FetchFailed",S[S.Render=-1700]="Render",S[S.Init=-1800]="Init",S[S.BadParameters=-9999]="BadParameters",S})({}),Xo=(function(){function S(c,p,g,T){this.inputFrameStream=c,this.sink=p,this.onError=g,this.config=T,this.pipeline=void 0,this.transformer=void 0,this.pipelineStats=void 0,this.resetStats(),this.pipeline=this.createPipeline()}var _=S.prototype;return _.stats=function(){return re()({},this.pipelineStats)},_.resetStats=function(){this.pipelineStats={received:0,overBudget:0,skipped:0,failed:0,transformed:0,rendered:0,transformTime:0,renderTime:0,totalProcessingTime:0,receiveDelay:0,endToEnd:0}},_.init=(function(){var c=M()(Y().mark((function p(g){return Y().wrap((function(T){for(;;)switch(T.prev=T.next){case 0:this.transformer=g,T.prev=1,this.inputFrameStream.pipeThrough(this.pipeline),T.next=8;break;case 5:return T.prev=5,T.t0=T.catch(1),T.abrupt("return",new ir("VideoFramePipeline",Wt.StreamCreationFailed,T.t0.message,!0));case 8:return T.abrupt("return",void 0);
51case 9:case"end":return T.stop()}}),p,this,[[1,5]])})));return function(p){return c.apply(this,arguments)}})(),_.createPipeline=function(){var c,p=this,g=new TransformStream({transform:(c=M()(Y().mark((function T(P){var N,$,de,fe,pe,he,ve,Fe,Le;return Y().wrap((function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(performance.mark("Frame "+P.number+" received"),N=performance.now(),$=void 0,de=[],fe=N-P.createdTimestamp,p.pipelineStats.receiveDelay+=fe,p.pipelineStats.received++,pe=1e3/p.config.minimumFramerate-(p.config.includeReceiveDelay?fe:0),he=(function(){var lt=M()(Y().mark((function mt(){var Je,Zr,mr,nr;return Y().wrap((function(We){for(;;)switch(We.prev=We.next){case 0:return We.next=2,p.render(P,$);case 2:Je=We.sent,(Zr=Je.renderError)&&de.push(Zr),P.close(),mr=performance.now(),nr=mr-P.receivedTimestamp,p.pipelineStats.totalProcessingTime+=mr-N,p.pipelineStats.endToEnd+=nr,nr>=pe&&(console.warn("[VideoFramePipeline]: Frame "+P.number+" over budget. Budget: "+pe+" Used: "+(mr-P.receivedTimestamp)),p.pipelineStats.overBudget++),de.length&&p.pipelineStats.failed++,performance.mark("Frame "+P.number+" end"),de.forEach((function(Ct){return p.handleErrorInternal(Ct)}));case 14:case"end":return We.stop()}}),mt)})));return function(){return lt.apply(this,arguments)}})(),!(pe<=0)){Ke.next=16;break}return console.warn("[VideoPipeline]: Frame "+P.number+" is late and will be skipped. Frame receive delay: "+fe+", Initial budget: "+pe+", Min budget: 0"),p.pipelineStats.skipped++,Ke.next=15,he();case 15:return Ke.abrupt("return");case 16:return Ke.next=18,p.frameToTexture(P,pe);case 18:return ve=Ke.sent,Fe=ve.transformError,Le=ve.texture,$=Le,Fe&&de.push(Fe),Ke.next=25,he();case 25:case"end":return Ke.stop()}}),T)}))),function(T){return c.apply(this,arguments)})});return g.readable.pipeTo(new WritableStream({write:function(){}})),g},_.frameToTexture=(function(){var c=M()(Y().mark((function p(g,T){var P,N,$,de,fe,pe;return Y().wrap((function(he){for(;;)switch(he.prev=he.next){case 0:return performance.mark("Frame "+g.number+" transform start"),P=performance.now(),N=void 0,he.next=5,this.transformer.transform(g,T);case 5:return $=he.sent,de=$.texture,(fe=$.error)?(console.warn("[VideoFramePipeline]: Failed to transform frame "+g.number),N=fe):this.pipelineStats.transformed++,pe=performance.now()-P,this.pipelineStats.transformTime+=pe,performance.mark("Frame "+g.number+" transform end"),he.abrupt("return",{transformError:N,texture:de,transformTime:pe});case 13:case"end":return he.stop()}}),p,this)})));return function(p,g){return c.apply(this,arguments)}})(),_.render=(function(){var c=M()(Y().mark((function p(g,T){var P,N,$,de,fe,pe,he;return Y().wrap((function(ve){for(;;)switch(ve.prev=ve.next){case 0:return performance.mark("Frame "+g.number+" render start"),P=performance.now(),N=void 0,ve.prev=3,fe=($=T?.width)!=null?$:g.displayWidth,pe=(de=T?.height)!=null?de:g.displayHeight,this.sink.setDimensions(fe*window.devicePixelRatio,pe*window.devicePixelRatio),ve.next=9,this.sink.render(T??g);case 9:(N=ve.sent)||this.pipelineStats.rendered++,ve.next=17;break;case 13:ve.prev=13,ve.t0=ve.catch(3),console.warn("[VideoFramePipeline]: Failed to render frame "+g.number),N=ve.t0;case 17:return he=performance.now()-P,this.pipelineStats.renderTime+=he,performance.mark("Frame "+g.number+" render end"),ve.abrupt("return",{renderError:N,renderTime:he});case 21:case"end":return ve.stop()}}),p,this,[[3,13]])})));return function(p,g){return c.apply(this,arguments)}})(),_.handleErrorInternal=function(c){console.warn("[VideoFramePipeline]: Error transforming frame",c),this.onError(c)},S})(),Yo=(function(){function S(c,p){this.config=c,this.onError=p,this.active=!1,this.frameStream=void 0,this.frameWriter=void 0,this.stopCapture=void 0,this.captureStats=void 0,this.resetStats()}var _=S.prototype;return _.init=function(){try{this.frameStream=new TransformStream({},{highWaterMark:this.config.maxQueueSize}),this.frameWriter=this.frameStream.writable.getWriter()}catch(c){return new ir("VideoFrameCaptureStream",Wt.StreamCreationFailed,c.message,!0)}},_.start=function(c){this.active?console.warn("[VideoFrameCaptureStream]: Start called, but already capturing"):(this.startRVFC(c),this.active=!0)},_.stop=function(){var c;this.active=!1,(c=this.stopCapture)==null||c.call(this)},_.stats=function(){return this.captureStats},_.resetStats=function(){this.captureStats={captured:0,missed:0,blocked:0,rVFCDelay:0}},_.getStream=function(){return this.frameStream.readable},_.startRVFC=function(c){var p,g=this,T=void 0,P=-1;(p=this.stopCapture)==null||p.call(this),this.stopCapture=function(){return c.cancelVideoFrameCallback(P)};var N=(function(){var $=M()(Y().mark((function de(fe,pe){var he,ve,Fe;return Y().wrap((function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(g.active){Le.next=2;break}return Le.abrupt("return");case 2:if(Le.prev=2,performance.mark("Frame "+pe.presentedFrames+" rVFC"),ve=performance.now(),g.captureStats.rVFCDelay+=ve-fe,(Fe=new VideoFrame(c)).createdTimestamp=performance.now(),Fe.receivedTimestamp=fe,Fe.number=pe.presentedFrames,!(((he=g.frameWriter.desiredSize)!=null?he:0)<1)){Le.next=16;break}return g.captureStats.blocked++,Le.next=14,g.frameWriter.write(Fe);case 14:Le.next=17;break;case 16:g.frameWriter.write(Fe);case 17:T===void 0?T=pe.presentedFrames:pe.presentedFrames-T>1&&(g.captureStats.missed+=pe.presentedFrames-T),T=pe.presentedFrames,g.captureStats.captured++,P=c.requestVideoFrameCallback(N),Le.next=27;break;case 23:Le.prev=23,Le.t0=Le.catch(2),console.warn("[VideoFrameCaptureStream]: Error encountered capturing frame.",Le.t0),g.errorHandler(Le.t0);case 27:case"end":return Le.stop()}}),de,null,[[2,23]])})));return function(de,fe){return $.apply(this,arguments)}})();console.log("[VideoFrameCaptureStream]: Started",c),P=c.requestVideoFrameCallback(N)},_.errorHandler=function(c){this.stop(),this.onError(c)},S})(),Vn=(function(){function S(c){this.windowContext=c,this.adapter=void 0,this.adapterInfo=void 0,this.device=void 0,this.queue=void 0,this.timingInfoEnabled=void 0}var _=S.prototype;return _.init=(function(){var c=M()(Y().mark((function p(g){var T,P,N,$,de;return Y().wrap((function(fe){for(;;)switch(fe.prev=fe.next){case 0:if(g===void 0&&(g=!1),this.windowContext.navigator.gpu){fe.next=3;break}return fe.abrupt("return",new ir("WebGPUContext",Wt.WebGPUNotAvailable,"WebGPU not available",!0));case 3:return fe.next=5,this.windowContext.navigator.gpu.requestAdapter({});case 5:if(T=fe.sent){fe.next=8;break}return fe.abrupt("return",new ir("WebGPUContext",Wt.WebGPUAdapterNotAvailable,"WebGPU Adapter not available",!0));case 8:return fe.next=10,T.requestAdapterInfo();case 10:return P=fe.sent,N=[],$={}
51,this.windowContext.navigator.gpu.getPreferredCanvasFormat()==="bgra8unorm"&&T.features.has("bgra8unorm-storage")&&N.push("bgra8unorm-storage"),(g=g&&T.features.has("timestamp-query"))&&N.push("timestamp-query"),T.features.has("shader-f16")&&N.push("shader-f16"),$.requiredFeatures=N,fe.next=20,this.tryGetDevice(T,$);case 20:if(de=fe.sent){fe.next=23;break}return fe.abrupt("return",new ir("WebGPUContext",Wt.WebGPUDeviceNotAvailable,"WebGPU Device not available",!0));case 23:this.adapterInfo=P,this.timingInfoEnabled=g,this.adapter=T,this.device=de,this.queue=de.queue,console.info("[WebGPUContext]: WebGPU context initialized",this.properties());case 29:case"end":return fe.stop()}}),p,this)})));return function(p){return c.apply(this,arguments)}})(),_.properties=function(){if(!this.adapterInfo)return{architecture:"",description:"",device:"",vendor:"",adapterFeatures:"",deviceFeatures:""};var c="";this.adapter.features.forEach((function(g){c+=g+","}));var p="";return this.device.features.forEach((function(g){p+=g+","})),{architecture:this.adapterInfo.architecture,description:this.adapterInfo.description,device:this.adapterInfo.device,vendor:this.adapterInfo.vendor,adapterFeatures:c,deviceFeatures:p}},_.createBuffer=function(c,p){return this.device.pushErrorScope("out-of-memory"),this.device.createBuffer({size:c,usage:p})},_.setBufferData=(function(){var c=M()(Y().mark((function p(g,T,P){return Y().wrap((function(N){for(;;)switch(N.prev=N.next){case 0:if(P===void 0&&(P=!0),this.device.queue.writeBuffer(g,0,T),!P){N.next=5;break}return N.next=5,this.device.queue.onSubmittedWorkDone();case 5:case"end":return N.stop()}}),p,this)})));return function(p,g,T){return c.apply(this,arguments)}})(),_.createShaderModule=(function(){var c=M()(Y().mark((function p(g){var T,P;return Y().wrap((function(N){for(;;)switch(N.prev=N.next){case 0:return T=this.device.createShaderModule({code:g}),N.next=3,T.getCompilationInfo();case 3:if(!((P=N.sent).messages.length>0)){N.next=7;break}return console.error("Error compiling shader",P.messages),N.abrupt("return",{err:new ir("WebGPUContext",Wt.ShaderCompilationFailed,"Compilation failed: "+P.messages.join(),!0)});case 7:return N.abrupt("return",{module:T});case 8:case"end":return N.stop()}}),p,this)})));return function(p){return c.apply(this,arguments)}})(),_.tryGetDevice=(function(){var c=M()(Y().mark((function p(g,T){return Y().wrap((function(P){for(;;)switch(P.prev=P.next){case 0:return P.prev=0,P.next=3,g.requestDevice(T);case 3:case 11:return P.abrupt("return",P.sent);case 6:return P.prev=6,P.t0=P.catch(0),P.prev=8,P.next=11,g.requestDevice(null);case 14:return P.prev=14,P.t1=P.catch(8),P.abrupt("return",void 0);case 17:case"end":return P.stop()}}),p,null,[[0,6],[8,14]])})));return function(p,g){return c.apply(this,arguments)}})(),S})(),Hn=(function(){function S(c){this.onError=c,this.canvas=void 0,this.device=void 0,this.canvasContext=void 0,this.pipeline=void 0,this.externalPipeline=void 0,this.sampler=void 0}var _=S.prototype;return _.init=(function(){var c=M()(Y().mark((function p(g,T){var P;return Y().wrap((function(N){for(;;)switch(N.prev=N.next){case 0:return this.device=T,this.device.pushErrorScope("validation"),this.sampler=this.device.createSampler({magFilter:"linear",minFilter:"linear"}),N.next=5,this.device.popErrorScope();case 5:if(!(P=N.sent)){N.next=8;break}return N.abrupt("return",new ir("CanvasSink",Wt.SamplerCreationFailed,P.message,!0));case 8:N.prev=8,this.setCanvas(g.transferControlToOffscreen()),N.next=15;break;case 12:return N.prev=12,N.t0=N.catch(8),N.abrupt("return",new ir("CanvasSink",Wt.CanvasCreationFailed,N.t0.message,!0));case 15:return N.abrupt("return",void 0);case 16:case"end":return N.stop()}}),p,this,[[8,12]])})));return function(p,g){return c.apply(this,arguments)}})(),_.render=(function(){var c=M()(Y().mark((function p(g){var T,P,N,$,de,fe,pe,he,ve,Fe,Le,Ke,lt,mt;return Y().wrap((function(Je){for(;;)switch(Je.prev=Je.next){case 0:if(this.canvasContext){Je.next=2;break}return Je.abrupt("return",new ir("CanvasSink",Wt.Render,"Failed to get WebGPU Canvas context",!0));case 2:if(!(g instanceof VideoFrame)){Je.next=21;break}if(N=this.device.importExternalTexture({source:g}),this.externalPipeline){Je.next=16;break}return Je.next=7,this.makePipeline(this.canvas.width,this.canvas.height,!0);case 7:if($=Je.sent,de=$.pipeline,!(fe=$.error)&&de){Je.next=12;break}return Je.abrupt("return",fe);case 12:T=de,this.externalPipeline=T,Je.next=17;break;case 16:T=this.externalPipeline;case 17:pe=T.getBindGroupLayout(0),P=this.device.createBindGroup({layout:pe,entries:[{binding:0,resource:this.canvasContext.getCurrentTexture().createView()},{binding:1,resource:this.sampler},{binding:2,resource:N}]}),Je.next=37;break;case 21:if(he=g,this.pipeline){Je.next=34;break}return Je.next=25,this.makePipeline(this.canvas.width,this.canvas.height,!1);case 25:if(ve=Je.sent,Fe=ve.pipeline,!(Le=ve.error)&&Fe){Je.next=30;break}return Je.abrupt("return",Le);case 30:T=Fe,this.pipeline=T,Je.next=35;break;case 34:T=this.pipeline;case 35:Ke=T.getBindGroupLayout(0),P=this.device.createBindGroup({layout:Ke,entries:[{binding:0,resource:this.canvasContext.getCurrentTexture().createView()},{binding:1,resource:this.sampler},{binding:2,resource:he.createView()}]});case 37:this.device.pushErrorScope("validation"),lt=this.device.createCommandEncoder(),(mt=lt.beginComputePass()).setPipeline(T),mt.setBindGroup(0,P),mt.dispatchWorkgroups(Math.ceil(this.canvas.width/16),Math.ceil(this.canvas.height/16),1),mt.end(),this.device.queue.submit([lt.finish()]),this.checkForErrorsAsync();case 46:case"end":return Je.stop()}}),p,this)})));return function(p){return c.apply(this,arguments)}})(),_.setDimensions=function(c,p){c==this.canvas.width&&p==this.canvas.height||(this.canvas.width=c,this.canvas.height=p,this.pipeline=void 0,this.externalPipeline=void 0)},_.surface=function(){return this.canvas},_.setCanvas=(function(){var c=M()(Y().mark((function p(g){var T,P;return Y().wrap((function(N){for(;;)switch(N.prev=N.next){case 0:if(this.canvas=g,this.canvasContext=g.getContext("webgpu"),this.canvasContext){N.next=4;break}return N.abrupt("return",new ir("CanvasSink",Wt.Render,"Failed to get WebGPU Canvas context",!0));
51case 4:return T=navigator.gpu.getPreferredCanvasFormat(),P={device:this.device,format:T,usage:GPUTextureUsage.STORAGE_BINDING,viewFormats:[T],alphaMode:"opaque"},this.device.pushErrorScope("validation"),this.canvasContext.configure(P),N.next=10,this.device.popErrorScope();case 10:if(!N.sent){N.next=13;break}return N.abrupt("return",new ir("CanvasSink",Wt.Render,"Failed to configure Canvas context",!0));case 13:return N.abrupt("return",void 0);case 14:case"end":return N.stop()}}),p,this)})));return function(p){return c.apply(this,arguments)}})(),_.makePipeline=(function(){var c=M()(Y().mark((function p(g,T,P){var N,$,de,fe,pe,he;return Y().wrap((function(ve){for(;;)switch(ve.prev=ve.next){case 0:return N=this.getShader(g,T,P),ve.next=3,this.createShaderModule(N);case 3:if($=ve.sent,de=$.module,fe=$.error,de&&!fe){ve.next=8;break}return ve.abrupt("return",{error:fe});case 8:return this.device.pushErrorScope("validation"),pe=this.device.createComputePipeline({layout:"auto",compute:{module:de,entryPoint:"main"},label:"canvas-sink"}),ve.next=12,this.device.popErrorScope();case 12:if(!(he=ve.sent)){ve.next=15;break}return ve.abrupt("return",{error:new ir("CanvasSink",Wt.PipelineCreationFailed,""+he.message,!0)});case 15:return ve.abrupt("return",{pipeline:pe});case 16:case"end":return ve.stop()}}),p,this)})));return function(p,g,T){return c.apply(this,arguments)}})(),_.createShaderModule=(function(){var c=M()(Y().mark((function p(g){var T,P;return Y().wrap((function(N){for(;;)switch(N.prev=N.next){case 0:return T=this.device.createShaderModule({code:g}),N.next=3,T.getCompilationInfo();case 3:if(!((P=N.sent).messages.length>0)){N.next=7;break}return console.error("Error compiling shader",P.messages),N.abrupt("return",{error:new ir("CanvasSink",Wt.ShaderCompilationFailed,"Shader compilation failed: "+P.messages.join(),!0)});case 7:return N.abrupt("return",{module:T});case 8:case"end":return N.stop()}}),p,this)})));return function(p){return c.apply(this,arguments)}})(),_.getShader=function(c,p,g){var T=g?"texture_external":"texture_2d<f32>";return`
52        @group(0) @binding(0) var outputTexture: texture_storage_2d<`+navigator.gpu.getPreferredCanvasFormat()+`, write>;
53        @group(0) @binding(1) var inputSampler: sampler;
54        @group(0) @binding(2) var inputTexture: `+T+`;
55
56        @compute @workgroup_size(16,16,1)
57        fn main(@builtin(global_invocation_id) global_id : vec3<u32>) {
58            let size = vec2<f32>(`+c+", "+p+`);
59            let pos = vec2<f32>(f32(global_id.x), f32(global_id.y)) / size;
60            let color = textureSampleBaseClampToEdge(inputTexture, inputSampler, pos);
61            textureStore(outputTexture, global_id.xy, color);
62        }
63        `},_.checkForErrorsAsync=function(){var c=this;this.device.popErrorScope().then((function(p){p&&(console.warn("[CanvasSink]: WebGPU error encountered",p),c.onErrorInternal(new ir("CanvasSink",Wt.Render,"Failed to render: "+p.message,!0)))}))},_.onErrorInternal=function(c){this.onError(c)},S})(),Qo=(function(){function S(c){this.name=c}var _=S.prototype;return _.init=(function(){var c=M()(Y().mark((function p(){return Y().wrap((function(g){for(;;)switch(g.prev=g.next){case 0:case"end":return g.stop()}}),p)})));return function(){return c.apply(this,arguments)}})(),_.transform=(function(){var c=M()(Y().mark((function p(g,T){var P,N,$=this;return Y().wrap((function(de){for(;;)switch(de.prev=de.next){case 0:return P=performance.now(),de.next=3,Promise.race([this.doTransform(g),this.frameBudgetExceededPassthrough(T)]).catch((function(fe){return console.warn("["+$.name+"]: Error encountered during frame transform",fe),{frame:g,success:!1,time:P-performance.now(),error:fe}}));case 3:return N=de.sent,de.abrupt("return",N);case 5:case"end":return de.stop()}}),p,this)})));return function(p,g){return c.apply(this,arguments)}})(),_.doTransform=(function(){var c=M()(Y().mark((function p(g){var T;return Y().wrap((function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,this.transformFn(g);case 2:return T=P.sent,P.abrupt("return",{texture:T});case 4:case"end":return P.stop()}}),p,this)})));return function(p){return c.apply(this,arguments)}})(),_.frameBudgetExceededPassthrough=(function(){var c=M()(Y().mark((function p(g){var T=this;return Y().wrap((function(P){for(;;)switch(P.prev=P.next){case 0:return P.abrupt("return",new Promise((function(N){return setTimeout((function(){console.warn("["+T.name+"]: Frame budget of "+g+"ms exceeded"),N({})}),g)})));case 1:case"end":return P.stop()}}),p)})));return function(p){return c.apply(this,arguments)}})(),_.transformFn=(function(){var c=M()(Y().mark((function p(g){return Y().wrap((function(T){for(;;)switch(T.prev=T.next){case 0:return T.abrupt("return",void 0);
63case 1:case"end":return T.stop()}}),p)})));return function(p){return c.apply(this,arguments)}})(),S})(),Jo=(function(S){function _(){return S.call(this,"PassthroughTransformer")||this}return Nt()(_,S),_.prototype.transform=(function(){var c=M()(Y().mark((function p(g){return Y().wrap((function(T){for(;;)switch(T.prev=T.next){case 0:return T.abrupt("return",{});case 1:case"end":return T.stop()}}),p)})));return function(p){return c.apply(this,arguments)}})(),_})(Qo),gs=(function(){function S(c,p,g){this.windowContext=c,this.listeners=g,this.canvas=void 0,this.sourceVideo=void 0,this.pipeline=void 0,this.frameStream=void 0,this.gpuContext=void 0,this.config=void 0,this.config={pipeline:re()({},{minimumFramerate:60,includeReceiveDelay:!0},p.pipeline),capture:re()({},{maxQueueSize:2},p.capture)},console.log("[VideoTransformer]: Provided config",p,"Parsed config",this.config),this.canvas=c.document.createElement("canvas")}var _=S.prototype;return _.init=(function(){var c=M()(Y().mark((function p(){var g,T,P,N,$,de,fe,pe;return Y().wrap((function(he){for(;;)switch(he.prev=he.next){case 0:return g=performance.now(),console.log("[VideoTransformer]: Init start"),T=this.onErrorInternal.bind(this),he.prev=3,P=this.gpuContext=new Vn(this.windowContext),he.next=7,P.init(!0);case 7:if(!(N=he.sent)){he.next=10;break}return he.abrupt("return",{err:N});case 10:return $=new Hn(T),he.next=13,$.init(this.canvas,P.device);case 13:if(!(de=he.sent)){he.next=16;break}return he.abrupt("return",{err:de});case 16:if(this.frameStream=new Yo(this.config.capture,T),!(fe=this.frameStream.init())){he.next=20;break}return he.abrupt("return",{err:fe});case 20:return this.pipeline=new Xo(this.frameStream.getStream(),$,T,this.config.pipeline),he.next=23,this.pipeline.init(new Jo);case 23:if(!(pe=he.sent)){he.next=26;break}return he.abrupt("return",{err:pe});case 26:return console.log("[VideoTransformer]: Init complete in "+(performance.now()-g).toFixed(3)+"ms"),he.abrupt("return",{info:{timeMs:performance.now()-g,gpuProperties:P.properties()}});case 30:return he.prev=30,he.t0=he.catch(3),console.warn("[VideoTransformer]: Failed to init",he.t0),he.abrupt("return",{err:new ir("VideoTransformer",Wt.Init,he.t0.message,!0)});case 34:case"end":return he.stop()}}),p,this,[[3,30]])})));return function(){return c.apply(this,arguments)}})(),_.start=function(c){this.frameStream?this.active()?console.warn("[VideoTransformer]: Start called on active instance"):(this.sourceVideo=c,this.frameStream.start(c),console.log("[VideoTransformer]: Pipeline started")):console.warn("[VideoTransformer]: Start called before init")},_.stop=function(){var c;console.log("[VideoTransformer]: Stopping render pipeline"),(c=this.frameStream)==null||c.stop()},_.active=function(){var c,p;return(c=(p=this.frameStream)==null?void 0:p.active)!=null&&c},_.stats=function(){var c,p;if(!this.pipeline||!this.frameStream)return{timestamp:performance.now(),frames:{source:0,captured:0,transformed:0,rendered:0,missed:0,blocked:0,skipped:0,failed:0,overBudget:0},timings:{captureDelay:0,receiveDelay:0,transformTime:0,renderTime:0,endToEnd:0}};var g=this.pipeline.stats(),T=(g.received,g.transformTime),P=g.skipped,N=g.transformed,$=g.failed,de=g.overBudget,fe=g.rendered,pe=(g.totalProcessingTime,g.renderTime),he=g.receiveDelay,ve=g.endToEnd,Fe=this.frameStream.stats(),Le=Fe.captured,Ke=Fe.blocked,lt=Fe.missed,mt=Fe.rVFCDelay,Je=(c=(p=this.sourceVideo)==null?void 0:p.getVideoPlaybackQuality())!=null?c:{totalVideoFrames:0,droppedVideoFrames:0};return{timestamp:performance.now(),frames:{source:Je.totalVideoFrames-Je.droppedVideoFrames,captured:Le,transformed:N,rendered:fe,missed:lt,blocked:Ke,skipped:P,failed:$,overBudget:de},timings:{captureDelay:mt,receiveDelay:he,transformTime:T,renderTime:pe,endToEnd:ve}}},_.renderSurface=function(){return this.canvas},_.gpuProperties=function(){var c;return(c=this.gpuContext)==null?void 0:c.properties()},_.reset=function(){var c,p;(c=this.frameStream)==null||c.resetStats(),(p=this.pipeline)==null||p.resetStats()},_.onErrorInternal=function(c){this.stop(),this.listeners.error(c)},S})(),ys=function(S){return S.setAttribute("playsinline",""),{element:function(){return S},displayDimensions:function(){return{width:S.clientWidth,height:S.clientHeight}},videoDimensions:function(){return{width:S.videoWidth,height:S.videoHeight}},stats:function(){return{timestamp:performance.now(),droppedFrames:z(S),decodedFrames:q(S)}},visible:function(){return m(S)}}},an=function(S,_){var c=S,p=_,g=0;return{update:function(T,P){P!==p&&(g=(T-c)/(P-p)*1e3,c=T,p=P)},framerate:function(){return g}}},Zo=(function(){function S(c,p){this.initialConfig=c,this.listeners=p,this.videoTransformer=void 0,this.surface=void 0,this.statusInterval=void 0,this.source=void 0,this.config=void 0,this.disabled=!1,this.config=re()({},{statusIntervalMs:5e3},c.module)}var _=S.prototype;return _.init=(function(){var c=M()(Y().mark((function p(){var g,T,P,N;return Y().wrap((function($){for(;;)switch($.prev=$.next){case 0:if(!this.videoTransformer){$.next=3;break}return console.log("[VideoTransformerModule]: Init called on setup instance"),$.abrupt("return",void 0);case 3:return P=this.videoTransformer=new gs(window,(g=(T=this.initialConfig.module)==null?void 0:T.transformer)!=null?g:{},{error:this.onTransformerError.bind(this)}),$.next=6,P.init();case 6:if(!(N=$.sent).err){$.next=10;break}return this.onTransformerError(N.err),$.abrupt("return",void 0);case 10:return this.surface=this.createWebGpuCanvasSurface(P.render
63Surface()),this.logInitEvent(N),$.abrupt("return",this.surface);case 13:case"end":return $.stop()}}),p,this)})));return function(){return c.apply(this,arguments)}})(),_.start=function(c){this.videoTransformer?this.disabled?console.log("[VideoTransformerModule]: start called, but module is disabled"):(this.source=c,console.log("[VideoTransformerModule]: Starting"),this.videoTransformer.start(c),this.videoTransformer.active()?this.logStatusEvent(this.config.statusIntervalMs,this.videoTransformer.stats()):console.log("[VideoTransformerModule]: Failed to start")):console.log("[VideoTransformerModule]: Start called before init")},_.stop=function(){var c;(c=this.videoTransformer)==null||c.stop(),clearInterval(this.statusInterval)},_.active=function(){var c,p;return(c=(p=this.videoTransformer)==null?void 0:p.active())!=null&&c},_.stats=function(){var c,p,g=0,T=0,P=performance.now(),N=(c=this.videoTransformer)==null?void 0:c.stats().frames;return N?(g=(p=N.rendered)!=null?p:0,{timestamp:P,droppedFrames:T=N.missed+N.skipped+N.failed,decodedFrames:g}):{timestamp:P,decodedFrames:g,droppedFrames:T}},_.reset=function(){var c;(c=this.videoTransformer)==null||c.reset()},_.swapVideoSource=function(c){var p;(p=this.videoTransformer)!=null&&p.active()&&(this.videoTransformer.stop(),this.videoTransformer.start(c))},_.createWebGpuCanvasSurface=function(c){var p=(function(g){return g.style.objectFit="contain",g.style.overflowClipMargin="content-box",g.style.overflow="clip",{element:function(){return g},displayDimensions:function(){return{width:g.clientWidth,height:g.clientHeight}},videoDimensions:function(){return{width:g.clientWidth,height:g.clientHeight}},stats:function(){return{timestamp:performance.now(),droppedFrames:0,decodedFrames:0}},visible:function(){return m(g)}}})(c);return p.stats=this.stats.bind(this),p},_.logStatusEvent=function(c,p){var g,T=this,P=an(p.frames.source,p.timestamp),N=an(p.frames.captured,p.timestamp),$=an(p.frames.rendered,p.timestamp),de=function(){var fe,pe;if(T.videoTransformer){var he=T.videoTransformer.stats(),ve=he.frames,Fe=he.timings,Le=he.timestamp;P.update(ve.source,Le),N.update(ve.captured,Le),$.update(ve.rendered,Le),T.printStats(he,P.framerate(),N.framerate(),$.framerate());var Ke=re()({status_timestamp:Le,status_interval:c,surface_visible:(fe=(pe=T.surface)==null?void 0:pe.visible())!=null&&fe,frames_source:ve.source,frames_captured:ve.captured,frames_missed:ve.missed,frames_blocked:ve.blocked,frames_skipped:ve.skipped,frames_transformed:ve.transformed,frames_rendered:ve.rendered,frames_failed:ve.failed,framerate_source:P.framerate(),framerate_capture:N.framerate(),framerate_render:$.framerate(),time_capture_delay:Fe.captureDelay,time_receive_delay:Fe.receiveDelay,time_transform:Fe.transformTime,time_render:Fe.renderTime,time_end_to_end:Fe.endToEnd},T.gpuAnalyticsProperties());T.listeners.analytics({name:"onGpuStatus",data:Ke})}else{var lt;clearInterval((lt=T.statusInterval)!=null?lt:-1)}};de(),clearInterval((g=this.statusInterval)!=null?g:-1),this.statusInterval=setInterval(de,c)},_.logInitEvent=function(c){if(c.info){var p=c.info,g=p.timeMs,T=p.gpuProperties,P=re()({gpu_time_init:g,gpu_adapter_features:T.adapterFeatures,gpu_device_features:T.deviceFeatures,gpu_transformer_config:JSON.stringify(this.initialConfig)},this.gpuAnalyticsProperties());this.listeners.analytics({name:"onGpuInit",data:P})}},_.onTransformerError=function(c){this.stop();var p=re()({code:c.code,source:c.source,message:c.message,fatal:!0},this.gpuAnalyticsProperties());console.warn("[VideoTransformerModule]: Error, disabling module",c),this.disabled=!0,this.listeners.error(p),this.listeners.analytics({name:"onGpuError",data:p})},_.gpuAnalyticsProperties=function(){var c,p,g,T,P,N=(c=this.videoTransformer)==null?void 0:c.gpuProperties();return{gpu_architecture:(p=N?.architecture)!=null?p:"",gpu_description:(g=N?.description)!=null?g:"",gpu_device:(T=N?.device)!=null?T:"",gpu_vendor:(P=N?.vendor)!=null?P:""}},_.printStats=function(c,p,g,T){var P,N,$=c.frames,de=$.source,fe=$.captured,pe=$.transformed,he=$.rendered,ve=$.missed,Fe=$.blocked,Le=$.skipped,Ke=$.failed,lt=$.overBudget,mt=c.timings,Je=mt.captureDelay,Zr=mt.receiveDelay,mr=mt.transformTime/fe,nr=mt.renderTime/he,We=Zr/fe,Ct=mt.endToEnd/he,bt=Je/fe,Lt=`Stats:
64Surface visible:                       `+((P=(N=this.surface)==null?void 0:N.visible())!=null&&P)+`
65Stats Interval:                        `+this.config.statusIntervalMs+`ms
66Source Framerate:                      `+p.toFixed(1)+`
67Capture Framerate:                     `+g.toFixed(1)+`
68Render Framerate:                      `+T.toFixed(1)+`
69Source frames:                         `+de+`
70Captured frames:                       `+fe+`
71Transformed frames:                    `+pe+`
72Rendered frames:                       `+he+`
73Missed frames:                         `+ve+`
74Blocked frames:                        `+Fe+`
75Skipped frames:                        `+Le+`
76Overbudget frames:                     `+lt+`
77Failed frames:                         `+Ke+`
78Average rVFC capture delay:            `+bt.toFixed(3)+`ms
79Average frame receive delay:           `+We.toFixed(3)+`ms
80Average frame transform time:          `+mr.toFixed(3)+`ms
81Average frame render time:             `+nr.toFixed(3)+`ms
82Average frame end-to-end time:         `+Ct.toFixed(3)+`ms
83`;console.log("[VideoTransformerModule]: "+Lt)},S})(),ur=(function(S){return S.video="video",S.canvas="canvas",S.debug_both="debug_both",S})({}),eu=(function(){function S(c){this.context=c,this.video=void 0,this.canvas=void 0,this.surfaceContainer=void 0,this.lastVisibleDroppedFrames=0,this.ignoredDroppedFrames=0,this.framerateTracker=void 0,this.surfaceContainer=c.createElement("div");var p=c.createElement("video");this.video=ys(p);var g=this.video.stats();this.framerateTracker=an(g.decodedFrames,g.timestamp)}var _=S.prototype;return _.setVideo=function(c){if(this.video.element()!==c){this.activeSurface()!==ur.video&&this.hideSurface(c),this.ignoredDroppedFrames=0,this.lastVisibleDroppedFrames=0;var p=ys(c),g=p.stats();this.framerateTracker=an(g.decodedFrames,g.timestamp),this.video=p}},_.moveVideoToRenderSurface=function(){this.replaceElement(ur.video,this.video.element())},_.setCanvas=function(c){this.canvas!==c&&(this.activeSurface()!==ur.canvas&&this.hideSurface(c.element()),this.replaceElement(ur.canvas,c.element()),this.canvas=c)},_.setActiveSurface=function(c){if(c!==this.activeSurface()){if(c===ur.canvas){if(!this.canvas)return void console.warn("[RenderSurface]: Tried to set canvas surface to active, but the canvas surface is undefiend.");this.lastVisibleDroppedFrames=this.video.stats().droppedFrames-this.ignoredDroppedFrames,this.hideSurface(this.video.element()),this.showSurface(this.canvas.element())}else if(c===ur.video){var p,g;this.hideSurface((p=this.canvas)==null?void 0:p.element()),this.showSurface(this.video.element()),this.ignoredDroppedFrames=this.video.stats().droppedFrames-((g=this.lastVisibleDroppedFrames)!=null?g:0)}else if(c===ur.debug_both){var T;this.showSurface((T=this.canvas)==null?void 0:T.element()),this.showSurface(this.video.element())}}},_.surface=function(){return this.surfaceContainer},_.videoElement=function(){return this.video.element()},_.displayDimensions=function(){return this.video.displayDimensions()},_.videoDimensions=function(){return this.video.videoDimensions()},_.stats=function(){var c,p=this.video.stats(),g=p.droppedFrames-this.ignoredDroppedFrames;return this.activeSurface()!==ur.video&&(g=(c=this.lastVisibleDroppedFrames)!=null?c:0),this.framerateTracker.update(p.decodedFrames,p.timestamp),re()({},p,{droppedFrames:g})},_.framerate=function(){return this.framerateTracker.framerate()},_.activeSurface=function(){var c;return(c=this.canvas)!=null&&c.visible()?ur.canvas:ur.video},_.safeAppendSurface=function(c){try{this.surfaceContainer.appendChild(c)}catch(p){console.warn("[RenderSurface]: Failed to append surface to container",p)}},_.safeRemoveSurface=function(c){try{var p=this.surfaceContainer.querySelector(c);p&&this.surfaceContainer.removeChild(p)}catch(g){console.warn("[RenderSurface]: Failed to remove surface from container",g)}},_.replaceElement=function(c,p){this.safeRemoveSurface(c),this.safeAppendSurface(p)},_.hideSurface=function(c){c&&(c.style.visibility="hidden",c.style.position="absolute",c.style.inset="0")},_.showSurface=function(c){c&&(c.style.visibility="inherit",c.style.position="inherit",c.style.inset="inherit")},S})(),yn=(function(){function S(c,p){var g,T,P=this;this.worker=void 0,this.id=void 0,this.emitter=new en,this.seekTime=null,this.paused=!0,this.isLoaded=!1,this.autoPlayOptions=null,this.mediaSinkManager=void 0,this.experiments={},this.adjustments=void 0,this.enableRemoteSearch=void 0,this.isQualitySupported=void 0,this.onvisibilitychange=void 0,this.onmessage=function(ve){return P.onWorkerMessage(ve)},this.onOnline=function(){return P.postMessage("onOnline")},this.onOffline=function(){return P.postMessage("onOffline")},this.pauseHiddenSilentTab=void 0,this.state=void 0,this.workerMessageProcessors=[Re],this.configManager=void 0,this.videoTransformerModule=void 0,this.renderSurface=new eu(document),this.startCapture=void 0,this.stopCapture=void 0,this.requestCaptureAnalytics=void 0,this.worker=p,this.id=S.instanceId++,this.isQualitySupported=c.isQualitySupported||l,this.onvisibilitychange=function(){return P.onVisibilityChange()},this.enableRemoteSearch=c.enableRemoteSearch||!1;var N,$,de=te();if(this.pauseHiddenSilentTab=de.chrome&&de.major===63||de.opera,this.adjustments=(N=(g=(T=c.webviewHost)==null?void 0:T.adjustments)!=null?g:{},re()({}
83,Go,N)),this.mediaSinkManager=new gn(this,this.enableRemoteSearch,this.adjustments,this.renderSurface.videoElement()),ge.isSupported()){var fe=new ge;this.workerMessageProcessors.push(fe.processor)}c.serviceWorker!==void 0&&("serviceWorker"in navigator||(pt.warn("Service workers are not supported."),0))&&((function(ve){fs=nn(ve)})(c.serviceWorker),($=Qr())==null||$.registerAndActivate()),this.state={averageBitrate:0,bandwidthEstimate:0,looping:!1,autoQualityMode:!0,volume:1,liveLatency:0,liveLowLatencyEnabled:!0,liveLowLatency:!1,statistics:{}},this.resetState(),this.attachHandlers(),this.checkDebugCaptureEnabled();var pe,he=[];pe='video/mp4; codecs="hvc1.1.40000000.L60.80.0.0.0.0.0"',(De()?MediaSource.isTypeSupported(pe):document.createElement("video").canPlayType(pe)!=="")&&he.push("hevc"),(function(){var ve='video/mp4; codecs="av01.0.05M.08"';return De()?MediaSource.isTypeSupported(ve):document.createElement("video").canPlayType(ve)!==""})()&&he.push("av01"),this.configManager=new Wo({},this.onConfigChanged.bind(this)),this.onConfigChanged(),this.postMessage("create",[{mseSupported:De(),keySystem:c.keySystem!==void 0?c.keySystem:ci(de),browserContext:re()({},de,{webviewHost:c.webviewHost}),codecs:he,testOnly:c.testOnly,playerFramework:c.playerFramework,buildDistId:"npm"},this.configManager.getConfigSnapshot()])}var _=S.prototype;return _.delete=function(){var c,p=this;(c=Qr())==null||c.destroy();var g=u(document).visibilityChange;document.removeEventListener(g,this.onvisibilitychange),window.removeEventListener("online",this.onOnline),window.removeEventListener("offline",this.onOffline),this.emitter.removeAllListeners(),this.emitter.on(Rr.DESTROY,(function(){p.mediaSinkManager.destroy(),p.emitter.removeAllListeners(),p.worker.removeEventListener("message",p.onmessage)})),this.configManager.delete(),this.postMessage("delete")},_.attachHTMLVideoElement=function(c){var p,g;(p=this.mediaSinkManager)==null||p.destroy(),this.mediaSinkManager=new gn(this,this.enableRemoteSearch,this.adjustments,c),this.processVideoElementAttributes(c),this.renderSurface.setVideo(c),(g=this.videoTransformerModule)==null||g.swapVideoSource(c),this.configManager.getConfigSnapshot().features.gpu.flags.enable_render_surface&&this.renderSurface.moveVideoToRenderSurface()},_.getHTMLVideoElement=function(){return this.renderSurface.videoElement()},_.getVideoRenderSurface=function(){if(this.configManager.getConfigSnapshot().features.gpu.flags.enable_render_surface)return this.renderSurface.surface();console.log("[MediaPlayerCore]:getVideoRenderSurfce called without first enabling renderSurface usage")},_.load=function(c,p){var g;p===void 0&&(p=""),(g=Qr())==null||g.configure(),this.postMessage("load",[c,p]),this.autoPlayOptions&&this.postMessage("playIntent")},_.play=function(){this.postMessage("playIntent"),this.mediaSinkManager.captureGesture(),this.paused=!1,this.attemptPlay()},_.setAutoplay=function(c){this.autoPlayOptions=c?{attemptMutedRetry:!0}:null},_.setAutoPlayOptions=function(c){this.autoPlayOptions=c},_.getExperiments=function(){return this.experiments},_.setExperiment=function(c,p){this.setExperimentData({id:c,assignment:p,version:0,type:""})},_.setExperimentData=function(c){this.configManager.setExperiment(c.id,c.assignment),this.postMessage("setExperiment",[c])},_.pause=function(){this.paused=!0,this.postMessage("pause")},_.isPaused=function(){return this.paused},_.seekTo=function(c){this.seekTime=c,this.postMessage("seekTo",[c])},_.isSeeking=function(){return this.seekTime!==null},_.isAutoplay=function(){return!!this.autoPlayOptions},_.getDuration=function(){return this.state.duration},_.getStartOffset=function(){return this.state.startOffset||0},_.getPosition=function(){return this.seekTime===null?this.mediaSinkManager.getCurrentSink().getCurrentTime():this.seekTime},_.getSyncTime=function(){return this.state.syncTime},_.getBuffered=function(){return this.mediaSinkManager.getCurrentSink().buffered()},_.getBufferedRanges=function(){return this.postMessage("updateBufferedRanges",[]),this.state.trackBufferedRanges},_.getSinkBufferedRanges=function(){var c=this.mediaSinkManager.getCurrentSink();return{audio:c.getBufferedRanges("audio"),video:c.getBufferedRanges("video")}},_.getBufferDuration=function(){return this.state.bufferedPosition-this.getPosition()},_.getState=function(){return this.state.state},_.getVideoWidth=function(){return this.getHTMLVideoElement().videoWidth},_.getVideoHeight=function(){return this.getHTMLVideoElement().videoHeight},_.getVideoFrameRate=function(){return this.state.statistics.framerate},_.getVideoBitRate=function(){return this.state.statistics.bitrate},_.getAverageBitrate=function(){return this.state.averageBitrate},_.getBandwidthEstimate=function(){return this.state.bandwidthEstimate},_.getPath=function(){return this.state.path},_.getProtocol=function(){return this.state.protocol},_.getVersion=function(){return"1.29.0"},_.isLiveLowLatency=function(){return this.state.liveLowLatencyEnabled&&this.state.liveLowLatency},_.isLooping=function(){return this.state.looping},_.setLogLevel=function(c){(function(p){var g={debug:!1,log:!1,info:!1,warn:!1,error:!1},T=function(P,N){for(var $,de=(function(pe,he){var ve=typeof Symbol<"u"&&pe[Symbol.iterator]||pe["@@iterator"];if(ve)return(ve=ve.call(pe)).next.bind(ve);if(Array.isArray(pe)||(ve=(function(Le,Ke){if(Le){if(typeof Le=="string")return Ta(Le,Ke);var lt=Object.prototype.toString.call(Le).slice(8,-1);
83return lt==="Object"&&Le.constructor&&(lt=Le.constructor.name),lt==="Map"||lt==="Set"?Array.from(Le):lt==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(lt)?Ta(Le,Ke):void 0}})(pe))||he){ve&&(pe=ve);var Fe=0;return function(){return Fe>=pe.length?{done:!0}:{done:!1,value:pe[Fe++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
84In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})(P);!($=de()).done;){var fe=$.value;g[fe]=N}};switch(p.level){case"debug":T(["debug","log","info","warn","error"],!0);break;case"log":T(["log","info","warn","error"],!0);break;case"info":T(["info","warn","error"],!0);break;case"warn":T(["warn","error"],!0);break;case"error":T(["error"],!0)}(function(P){wi.enabled=P.enabled,wi.levels=re()({},P.levels),Sa.emit("logConfigUpdated",P)})({enabled:p.enabled,levels:g})})({enabled:!0,level:c}),this.postMessage("setLogLevel",[c])},_.setLooping=function(c){this.state.looping=c,this.postMessage("setLooping",[c])},_.isMuted=function(){return this.mediaSinkManager.getCurrentSink().isMuted()},_.setMuted=function(c){this.mediaSinkManager.getCurrentSink().setMuted(c)},_.setVolume=function(c){this.state.volume=c,this.postMessage("setVolume",[this.state.volume])},_.getVolume=function(){return this.state.volume},_.getQuality=function(){return this.state.quality},_.setQuality=function(c,p){p===void 0&&(p=!1),this.getHTMLVideoElement().controls||(this.postMessage("setQuality",[c,p]),this.state.autoQualityMode=!1)},_.getQualities=function(){return this.state.qualities},_.setAuthToken=function(c){this.postMessage("setAuthToken",[c])},_.isAutoQualityMode=function(){return this.state.autoQualityMode},_.setAutoQualityMode=function(c){this.state.autoQualityMode=c,this.postMessage("setAutoQualityMode",[c])},_.setAutoInitialBitrate=function(c){this.postMessage("setAutoInitialBitrate",[c])},_.setAutoMaxQuality=function(c){this.postMessage("setAutoMaxQuality",[c])},_.setAutoMaxBitrate=function(c){this.postMessage("setAutoMaxBitrate",[c])},_.setAutoMaxVideoSize=function(c,p){this.postMessage("setAutoMaxVideoSize",[c,p])},_.setAutoViewportSize=function(c,p){this.postMessage("setAutoViewportSize",[c,p])},_.getPlaybackRate=function(){return this.mediaSinkManager.getCurrentSink().getPlaybackRate()},_.setPlaybackRate=function(c){return this.mediaSinkManager.getCurrentSink().setPlaybackRate(c)},_.setClientId=function(c){this.postMessage("setClientId",[c])},_.setDeviceId=function(c){this.postMessage("setDeviceId",[c])},_.setLiveSpeedUpRate=function(c){this.postMessage("setLiveSpeedUpRate",[c])},_.setPlayerType=function(c){this.postMessage("setPlayerType",[c])},_.setLiveMaxLatency=function(c){this.postMessage("setLiveMaxLatency",[c])},_.setLiveLowLatencyEnabled=function(c){this.state.liveLowLatencyEnabled=c,this.postMessage("setLiveLowLatencyEnabled",[c])},_.setRebufferToLive=function(c){var p;(p=Qr())!=null&&(p=p.getDriftDetectionConfig())!=null&&p.enabled||this.postMessage("setRebufferToLive",[c])},_.setVisible=function(c){this.postMessage("setVisible",[c])},_.setInitialBufferDuration=function(c){this.postMessage("setInitialBufferDuration",[c])},_.addEventListener=function(c,p){this.emitter.on(c,p)},_.removeEventListener=function(c,p){this.emitter.removeListener(c,p)},_.getDroppedFrames=function(){return this.state.statistics.droppedFrames},_.getDecodedFrames=function(){return this.state.statistics.decodedFrames},_.getDisplayWidth=function(){return this.renderSurface.displayDimensions().width},_.getDisplayHeight=function(){return this.renderSurface.displayDimensions().height},_.getSessionId=function(){return this.state.sessionId},_.getChannelMetadata=function(){return this.state.channelMetadata},_.getSessionData=function(){return this.state.sessionData},_.getLiveLatency=function(){return this.state.liveLatency},_.isProtected=function(){return this.mediaSinkManager.isProtected()},_.startRemotePlayback=function(){this.postMessage("startRemotePlayback")},_.endRemotePlayback=function(){this.postMessage("endRemotePlayback")},_.setPlatformName=function(c){this.postMessage("setPlatformName",[c])},_.setRequestCredentials=function(c){this.postMessage("setRequestCredentials",[c])},_.setSinkType=function(c){this.postMessage("setSinkType",[c])},_.onSinkTimeUpdate=function(){if(this.seekTime===null){var c=this.mediaSinkManager.getCurrentSink(),p=this.renderSurface.stats(),g=p.droppedFrames,T=p.decodedFrames,P=this.renderSurface.displayDimensions(),N=P.height,$=P.width;this.postMessage("onClientSinkUpdate",[{currentTime:c.getCurrentTime(),decodedFrames:T,droppedFrames:g,framerate:this.renderSurface.framerate(),bufferDuration:c.bufferDuration(),displayHeight:N,displayWidth:$}]),this.setAutoViewportSize($*window.devicePixelRatio,N*window.devicePixelRatio),this.emitter.emit(ce.TIME_UPDATE,c.getCurrentTime())}},_.onSinkBufferUpdate=function(){this.emitter.emit(ce.BUFFER_UPDATE)},_.onSinkDurationChanged=function(c){this.postMessage("onClientSinkDurationChanged",[c])},_.onSinkEnded=function(){this.postMessage("onClientSinkEnded")},_.onSinkIdle=function(){this.postMessage("onClientSinkIdle")},_.onSinkPlaying=function(c){this.postMessage("onClientSinkPlaying"),c&&this.play()},_.onSinkStop=function(c){var p,g,T=u(document).hidden;if(document[T])this.postMessage("pause");else if(c){if(!this.isMuted()&&((p=(g=this.autoPlayOptions)==null?void 0:g.attemptMutedRetry)==null||p))return this.setMuted(!0),this.mediaSinkManager.getCurrentSink().play(),void this.emitter.emit(ce.AUDIO_BLOCKED);this.pause(),this.emitter.emit(ce.PLAYBACK_BLOCKED)}else this.pause()},_.onSinkReset=function(){this.postMessage("onClientSinkReset")}
84,_.onSinkError=function(c){var p=c.value,g=c.code,T=c.message;this.postMessage("onClientSinkError",[p,g,T])},_.onSinkRecoverableError=function(c){var p=c.value,g=c.code,T=c.message;this.postMessage("onClientSinkRecoverableError",[p,g,T])},_.onSinkVolumeChanged=function(c,p){this.getHTMLVideoElement().controls&&p&&this.setVolume(c),this.emitter.emit(ce.VOLUME_CHANGED,this.state.volume)},_.onSinkMutedChanged=function(c){this.postMessage("setMuted",[c]),this.emitter.emit(ce.MUTED_CHANGED)},_.onSinkPlaybackRateChanged=function(c){this.postMessage("setPlaybackRate",[c])},_.onPassthroughSinkMetadata=function(c,p,g,T,P){this.emitter.emit(ce.TEXT_METADATA_CUE,{description:T,endTime:p,startTime:c,text:g,owner:P,type:"TextMetadataCue"})},_.onPassthroughSinkPropertyChanged=function(c,p){this.postMessage("onClientSinkPassthroughPropertyChanged",[c,p])},_.onSinkControlsChanged=function(c){this.postMessage("setControls",[c])},_.onSinkGapJump=function(c){this.postMessage("onClientSinkGapJump",[c])},_.onRemoteDevice=function(c){this.emitter.emit(c?qr.AVAILABLE:qr.UNAVAILABLE)},_.onRemoteReconnect=function(){this.startRemotePlayback()},_.onSessionError=function(){this.postMessage("onClientSinkError",[1,0,"Chromecast session error"])},_.onLoadMediaError=function(){this.postMessage("onClientSinkError",[1,0,"Chromecast load media failed"])},_.onUserCancel=function(){this.endRemotePlayback(),this.emitter.emit(qr.SESSION_ENDED)},_.onSegmentDiscontinuity=function(){this.mediaSinkManager.onSegmentDiscontinuity()},_.onSessionStop=function(){this.endRemotePlayback(),this.emitter.emit(qr.SESSION_ENDED)},_.onSessionStarted=function(c){this.emitter.emit(qr.SESSION_STARTED,c)},_.attemptPlay=function(){var c=u(document).hidden;!document[c]&&this.isLoaded&&this.postMessage("play")},_.postMessage=function(c,p,g){g===void 0&&(g=[]),this.worker.postMessage({id:this.id,funcName:c,args:p},g)},_.resetState=function(){Object.assign(this.state,{state:Tt.IDLE,quality:{name:"",group:"",codecs:"",bitrate:0,width:0,height:0,framerate:0},qualities:[],duration:0,startOffset:0,sessionData:{},volume:1,statistics:{bitrate:0,framerate:0,droppedFrames:0,decodeFrames:0,renderedFrames:0},trackBufferedRanges:{audio:[],video:[]},channelMetadata:[]}),this.emitter.emit(ce.DURATION_CHANGED,0),this.seekTime=null,this.isLoaded=!1},_.attachHandlers=function(){var c=this;this.worker.addEventListener("message",this.onmessage);var p=u(document).visibilityChange;document.addEventListener(p,this.onvisibilitychange),window.addEventListener("online",this.onOnline),window.addEventListener("offline",this.onOffline);var g=this.emitter;g.on(ce.VOLUME_CHANGED,(function(){return c.onVolumeChanged()})),g.on(ce.MUTED_CHANGED,(function(){return c.onMutedChanged()})),g.on(ce.SEEK_COMPLETED,(function(){return c.onSeekCompleted()})),g.on(ce.ERROR,(function(){return c.onError()})),g.on(ce.SESSION_DATA,(function(T){return c.onSessionData(T)})),g.on(ce.SEGMENT_DISCONTINUITY,(function(){return c.onSegmentDiscontinuity()})),g.on(Rr.STATE_CHANGED,(function(T){return c.onStateChanged(T)})),g.on(Rr.MEDIA_SINK_RPC,(function(T){return c.mediaSinkManager.applyRPC(T)})),g.on(Rr.CONFIGURE,(function(T){c.mediaSinkManager.configure(T),c.setSinkType(T.mode)})),g.on(Rr.RESET,(function(){var T;(T=c.videoTransformerModule)==null||T.reset(),c.mediaSinkManager.reset()})),g.on(fr.ID3,(function(T){return c.onID3(T)})),g.on(Rr.GET_EXPERIMENTS,(function(T){c.experiments=T})),g.on(Rr.PROPERTY_CHANGED,(function(T){var P=T.key,N=T.value;c.state[P]=(function($,de){return $==="syncTime"&&(de*=1e3),de})(P,N)})),g.on(Rr.SYNC_TIME_CHANGED,(function(T){c.emitter.emit(ce.SYNC_TIME_UPDATE,1e3*T)})),g.on(Rr.BUFFERED_RANGES,(function(T){c.state.trackBufferedRanges=T})),g.on(Rr.LOG_MESSAGE,(function(T){var P=T.level,N=T.message;return console[P](N)}))},_.onVolumeChanged=function(){var c=u(document).hidden;this.pauseHiddenSilentTab&&document[c]&&this.getVolume()===0&&this.postMessage("pause")},_.onMutedChanged=function(){var c=u(document).hidden;this.pauseHiddenSilentTab&&document[c]&&this.isMuted()&&this.postMessage("pause")},_.onSeekCompleted=function(){this.seekTime=null},_.onError=function(){this.paused=!0},_.onStateChanged=function(c){var p=this;switch(c){case Tt.READY:var g=this.isQualitySupported;if(this.adjustments.abrTranscodesOnly&&this.state.qualities.length>1){var T=this.state.qualities.slice().sort((function($,de){return de.bitrate-$.bitrate}));T[0].group!=="chunked"?g=function($){return $.group!=="chunked"&&p.isQualitySupported($)}:this.setAutoMaxQuality(T[1])}var P=(function($,de){var fe=[],pe=[];return $.forEach((function(he){de(he)?fe.push(he):pe.push(he)})),{supported:fe,unsupported:pe}})(this.state.qualities,g);this.state.qualities=P.supported,P.unsupported.forEach((function($){return p.postMessage("removeQuality",[$])})),this.isLoaded=!0,this.autoPlayOptions&&this.play(),this.paused||this.attemptPlay();break;case Tt.IDLE:var N;(N=this.videoTransformerModule)==null||N.stop();break;case Tt.PLAYING:this.startVideoTransformer();break;case Tt.ENDED:this.paused=!0}this.emitter.emit(ce.STATE_CHANGED,c),this.emitter.emit(c)},_.onID3=function(c){var p=this;
84c.forEach((function(g){if(g.id==="TXXX"&&g.desc==="segmentmetadata"&&g.info.length){var T=o(g.info[0]);if(Object.prototype.hasOwnProperty.call(T,"stream_offset")){var P=Number(T.stream_offset);isNaN(P)||(p.state.startOffset=P-p.getPosition())}}}))},_.onVisibilityChange=function(){var c=u(document).hidden;this.paused||document[c]||this.attemptPlay(),this.pauseHiddenSilentTab&&!this.paused&&document[c]&&(this.isMuted()||this.getVolume()===0)&&this.postMessage("pause"),te().firefox||this.postMessage("setVisible",[!document[c]])},_.onSessionData=function(c){Object.assign(this.state,c)},_.onConfigChanged=function(){var c=this.configManager.getConfigSnapshot(),p=c.features.gpu;p&&(p.flags.enable_render_surface&&(console.log("[MediaPlayerCore]: renderSurface enabled"),this.renderSurface.moveVideoToRenderSurface()),(p.flags.init_transformer||p.flags.run_transformer)&&this.setupVideoTransformer(p)),this.postMessage("updatePlayerConfiguration",[c])},_.setupVideoTransformer=function(c){var p=this;if(!this.videoTransformerModule){var g=function(T){p.renderSurface.setActiveSurface(ur.video),console.warn("VideoTransformer error",T)};this.videoTransformerModule=new Zo(c,{error:g,analytics:function(T){p.postMessage(T.name,[T.data])}}),this.videoTransformerModule.init().then((function(T){T&&p.videoTransformerModule?(c.flags.add_canvas_to_surface&&p.renderSurface.setCanvas(T),p.getState()===Tt.PLAYING&&p.startVideoTransformer()):console.log("Transformer init failed")})).catch((function(T){var P;console.warn("Unhandled error initializing the Video Transformer",T),g({source:"unknown",code:Wt.Init,fatal:!0,message:(P=T?.message)!=null?P:"error initializing transformer",gpu_architecture:"",gpu_description:"",gpu_device:"",gpu_vendor:""})}))}},_.startVideoTransformer=function(){var c=this.configManager.getConfigSnapshot().features.gpu;if(c.flags.run_transformer&&this.videoTransformerModule&&(console.trace("Are we playing?",this.state.state),this.videoTransformerModule.start(this.getHTMLVideoElement()),this.videoTransformerModule.active())){var p,g=ur.video;c.flags.allow_canvas_visible&&(g=ur.canvas,(p=c.render)!=null&&p.debug&&(g=ur.debug_both)),this.renderSurface.setActiveSurface(g)}},_.onWorkerMessage=function(c){var p=c.data;if(p&&p.id===this.id){var g=this.workerMessageProcessors.reduce((function(N,$){return $(N)}),p),T=g.type,P=g.arg;p.arg!==void 0?this.emitter.emit(T,P):this.emitter.emit(T)}},_.processVideoElementAttributes=function(c){if(c.hasAttribute("autoplay")&&(c.removeAttribute("autoplay"),this.setAutoplay(!0)),c.hasAttribute("playbackRate")){var p,g=parseFloat((p=c.getAttribute("playbackRate"))!=null?p:"1.0");if(!isNaN(g)){var T=d(g,.25,2);this.setPlaybackRate(T)}c.removeAttribute("playbackRate")}if(c.hasAttribute("src")){var P=c.src;f(c),this.load(P)}if(c.hasAttribute("loop")&&(c.removeAttribute("loop"),this.setLooping(!0)),c.hasAttribute("muted")&&(c.removeAttribute("muted"),this.setMuted(!0)),c.hasAttribute("volume")){var N,$=parseFloat((N=c.getAttribute("volume"))!=null?N:"1.0");isNaN($)||this.setVolume(d($,0,1)),c.removeAttribute("volume")}},_.checkDebugCaptureEnabled=function(){},S})();
84yn.instanceId=0;var _n=(function(){function S(c){var p=this;this.workerPort=void 0,this.emitter=void 0,this.messageQueue=void 0,this.workerPort={postMessage:this.postMessageFromWorker.bind(this),onmessage:function(){}},this.emitter=new cs.EventEmitter,this.messageQueue=new a,this.loadScript(c,(function(g){return p.applyWorkerEnv(g)}))}var _=S.prototype;return _.postMessage=function(c){this.messageQueue?this.messageQueue.push(c):this.postMessageToWorker(c)},_.addEventListener=function(c,p){this.emitter.on(c,p)},_.removeEventListener=function(c,p){this.emitter.off(c,p)},_.onmessage=function(){},_.onmessageerror=function(){},_.onerror=function(){},_.terminate=function(){},_.dispatchEvent=function(){return!0},_.loadScript=function(c,p){var g=this,T=new XMLHttpRequest;T.open("GET",c),T.addEventListener("load",(function(){T.status>=200&&T.status<400?p(T.response):g.emitter.emit("error",new Error(T.statusText))})),T.addEventListener("error",(function(P){g.emitter.emit("error",P)})),T.send()},_.applyWorkerEnv=function(c){if(this.messageQueue){try{Function("self","messageHandler",c)(window,this.workerPort)}catch(p){return void this.emitter.emit("error",p)}for(;!this.messageQueue.empty();)this.postMessageToWorker(this.messageQueue.pop());this.messageQueue=null}},_.postMessageFromWorker=function(c){var p=this;setTimeout((function(){p.emitter.emit("message",{data:c})}),0)},_.postMessageToWorker=function(c){var p=this;setTimeout((function(){p.workerPort.onmessage({data:c})}),0)},S})();function bn(S,_,c){var p,g,T,P;return c===void 0&&(c=!1),te().msIE?p=new _n(S):(g=S,T=window.location,(P=document.createElement("a")).href=g,p=P.hostname===T.hostname&&P.port===T.port&&P.protocol===T.protocol?new Worker(S):new Worker(URL.createObjectURL(new Blob(["importScripts('"+S+"')"])))),p.postMessage({wasmBinaryUrl:_,showWorkerLogs:c}),p}var fi=typeof window<"u"&&typeof window.WebAssembly=="object"&&typeof window.WebAssembly.instantiate=="function",jn=fi;function Ca(S){var _=S.asmWorker,c=S.wasmWorker,p=S.wasmBinary;if(!jn&&!_)throw new Error("WebAssembly is not supported by the browser. This is required for playback.");var g=bn(jn?c:_,p,S.showWorkerLog);return new bs(S,g)}function _s(){return"1.29.0"}var ki,bs=(function(){function S(c,p){this.core=void 0,this.startCapture=void 0,this.stopCapture=void 0,this.requestCaptureAnalytics=void 0,this.core=new yn(c,p)}var _=S.prototype;return _.addEventListener=function(c,p){var g;(g=this.checkCore())==null||g.addEventListener(c,p)},_.attachHTMLVideoElement=function(c){var p;(p=this.checkCore())==null||p.attachHTMLVideoElement(c)},_.delete=function(){var c;(c=this.checkCore())==null||c.delete(),this.core=null},_.endRemotePlayback=function(){var c;(c=this.checkCore())==null||c.endRemotePlayback()},_.isAutoplay=function(){var c;return(c=this.checkCore())==null?void 0:c.isAutoplay()},_.isAutoQualityMode=function(){var c;return(c=this.checkCore())==null?void 0:c.isAutoQualityMode()},_.getAverageBitrate=function(){var c;return(c=this.checkCore())==null?void 0:c.getAverageBitrate()},_.getBandwidthEstimate=function(){var c;return(c=this.checkCore())==null?void 0:c.getBandwidthEstimate()},_.getBufferDuration=function(){var c;return(c=this.checkCore())==null?void 0:c.getBufferDuration()},_.getBuffered=function(){var c;return(c=this.checkCore())==null?void 0:c.getBuffered()},_.getBufferedRanges=function(){var c;return(c=this.checkCore())==null?void 0:c.getBufferedRanges()},_.getSinkBufferedRanges=function(){var c;return(c=this.checkCore())==null?void 0:c.getSinkBufferedRanges()},_.getDecodedFrames=function(){var c;return(c=this.checkCore())==null?void 0:c.getDecodedFrames()},_.getDisplayHeight=function(){var c;return(c=this.checkCore())==null?void 0:c.getDisplayHeight()},_.getDisplayWidth=function(){var c;return(c=this.checkCore())==null?void 0:c.getDisplayWidth()},_.getDroppedFrames=function(){var c;return(c=this.checkCore())==null?void 0:c.getDroppedFrames()},_.getDuration=function(){var c;return(c=this.checkCore())==null?void 0:c.getDuration()},_.getExperiments=function(){var c;return(c=this.checkCore())==null?void 0:c.getExperiments()},_.getHTMLVideoElement=function(){var c;return(c=this.checkCore())==null?void 0:c.getHTMLVideoElement()},_.getVideoRenderSurface=function(){var c;return(c=this.checkCore())==null?void 0:c.getVideoRenderSurface()},_.getLiveLatency=function(){var c;return(c=this.checkCore())==null?void 0:c.getLiveLatency()},_.getPath=function(){var c;return(c=this.checkCore())==null?void 0:c.getPath()},_.getProtocol=function(){var c;return(c=this.checkCore())==null?void 0:c.getProtocol()},_.getPlaybackRate=function(){var c;return(c=this.checkCore())==null?void 0:c.getPlaybackRate()},_.getPosition=function(){var c;return(c=this.checkCore())==null?void 0:c.getPosition()},_.getSyncTime=function(){var c;return(c=this.checkCore())==null?void 0:c.getSyncTime()},_.getQualities=function(){var c;return(c=this.checkCore())==null?void 0:c.getQualities()},_.getQuality=function(){var c;return(c=this.checkCore())==null?void 0:c.getQuality()},_.getSessionData=function(){var c;return(c=this.checkCore())==null?void 0:c.getSessionData()},_.getSessionId=function(){var c;return(c=this.checkCore())==null?void 0:c.getSessionId()},_.getChannelMetadata=function(){var c,p;return(c=(p=this.checkCore())==null?void 0:p.getChannelMetadata())!=null?c:[]},_.getStartOffset=function(){var c;return(c=this.checkCore())==null?void 0:c.getStartOffset()},_.getState=function(){var c;return(c=this.checkCore())==null?void 0:c.getState()},_.getVersion=function(){var c;return(c=this.checkCore())==null?void 0:c.getVersion()},_.getVideoBitRate=function(){var c;return(c=this.checkCore())==null?void 0:c.getVideoBitRate()},_.getVideoFrameRate=function(){var c;return(c=this.checkCore())==null?void 0:c.getVideoFrameRate()},_.getVideoHeight=function(){var c;return(c=this.checkCore())==null?void 0:c.getVideoHeight()},_.getVideoWidth=function(){var c;return(c=this.checkCore())==null?void 0:c.getVideoWidth()},_.getVolume=function(){var c;return(c=this.checkCore())==null?void 0:c.getVolume()},_.isLiveLowLatency=function(){var c;return(c=this.checkCore())==null?void 0:c.isLiveLowLatency()},_.isLooping=function(){var c;return(c=this.checkCore())==null?void 0:c.isLooping()},_.isMuted=function(){var c;return(c=this.checkCore())==null?void 0:c.isMuted()}
84,_.isPaused=function(){var c;return(c=this.checkCore())==null?void 0:c.isPaused()},_.isProtected=function(){var c;return(c=this.checkCore())==null?void 0:c.isProtected()},_.isSeeking=function(){var c;return(c=this.checkCore())==null?void 0:c.isSeeking()},_.load=function(c,p){var g;return p===void 0&&(p=""),(g=this.checkCore())==null?void 0:g.load(c,p)},_.pause=function(){var c;(c=this.checkCore())==null||c.pause()},_.play=function(){var c;(c=this.checkCore())==null||c.play()},_.removeEventListener=function(c,p){var g;(g=this.checkCore())==null||g.removeEventListener(c,p)},_.seekTo=function(c){var p;(p=this.checkCore())==null||p.seekTo(c)},_.setAuthToken=function(c){var p;(p=this.checkCore())==null||p.setAuthToken(c)},_.setAutoInitialBitrate=function(c){var p;(p=this.checkCore())==null||p.setAutoInitialBitrate(c)},_.setAutoMaxQuality=function(c){var p;(p=this.checkCore())==null||p.setAutoMaxQuality(c)},_.setAutoMaxBitrate=function(c){var p;(p=this.checkCore())==null||p.setAutoMaxBitrate(c)},_.setAutoMaxVideoSize=function(c,p){var g;(g=this.checkCore())==null||g.setAutoMaxVideoSize(c,p)},_.setAutoplay=function(c){var p;(p=this.checkCore())==null||p.setAutoplay(c)},_.setAutoPlayOptions=function(c){var p;(p=this.checkCore())==null||p.setAutoPlayOptions(c)},_.setAutoQualityMode=function(c){var p;(p=this.checkCore())==null||p.setAutoQualityMode(c)},_.setAutoViewportSize=function(c,p){var g;(g=this.checkCore())==null||g.setAutoViewportSize(c,p)},_.setClientId=function(c){var p;(p=this.checkCore())==null||p.setClientId(c)},_.setDeviceId=function(c){var p;(p=this.checkCore())==null||p.setDeviceId(c)},_.setExperiment=function(c,p){var g;(g=this.checkCore())==null||g.setExperiment(c,p)},_.setExperimentData=function(c){var p;(p=this.checkCore())==null||p.setExperimentData(c)},_.setInitialBufferDuration=function(c){var p;(p=this.checkCore())==null||p.setInitialBufferDuration(c)},_.setLiveLowLatencyEnabled=function(c){var p;(p=this.checkCore())==null||p.setLiveLowLatencyEnabled(c)},_.setLiveMaxLatency=function(c){var p;(p=this.checkCore())==null||p.setLiveMaxLatency(c)},_.setLiveSpeedUpRate=function(c){var p;(p=this.checkCore())==null||p.setLiveSpeedUpRate(c)},_.setLogLevel=function(c){var p;(p=this.checkCore())==null||p.setLogLevel(c)},_.setLooping=function(c){var p;(p=this.checkCore())==null||p.setLooping(c)},_.setMuted=function(c){var p;(p=this.checkCore())==null||p.setMuted(c)},_.setPlaybackRate=function(c){var p;(p=this.checkCore())==null||p.setPlaybackRate(c)},_.setPlayerType=function(c){var p;(p=this.checkCore())==null||p.setPlayerType(c)},_.setQuality=function(c,p){var g;p===void 0&&(p=!1),(g=this.checkCore())==null||g.setQuality(c,p)},_.setRebufferToLive=function(c){var p;(p=this.checkCore())==null||p.setRebufferToLive(c)},_.setVisible=function(c){var p;(p=this.checkCore())==null||p.setVisible(c)},_.setVolume=function(c){var p;(p=this.checkCore())==null||p.setVolume(c)},_.startRemotePlayback=function(){var c;(c=this.checkCore())==null||c.startRemotePlayback()},_.setPlatformName=function(c){var p;(p=this.checkCore())==null||p.setPlatformName(c)},_.setRequestCredentials=function(c){var p;(p=this.checkCore())==null||p.setRequestCredentials(c)},_.checkCore=function(){return this.core||console.warn("Method called on deleted player instance."),this.core},S})(),tu=(function(S){return S.UNKNOWN="Unspecified",S.FILE="File",S.SEGMENT="Segment",S.SOURCE="Source",S.DECODER="Decode",S.RENDERER="Render",S.MASTER_PLAYLIST="MasterPlaylist",S.MEDIA_PLAYLIST="MediaPlaylist",S.DRM="DRM",S})({}
84),Ts=(function(S){return S.GENERIC="Error",S.NOT_SUPPORTED="ErrorNotSupported",S.NO_SOURCE="ErrorNoSource",S.INVALID_DATA="ErrorInvalidData",S.INVALID_STATE="ErrorInvalidState",S.INVALID_PARAMETER="ErrorInvalidParameter",S.TIMEOUT="ErrorTimeout",S.NETWORK="ErrorNetwork",S.NETWORK_IO="ErrorNetworkIO",S.AUTHORIZATION="ErrorAuthorization",S.NOT_AVAILABLE="ErrorNotAvailable",S})({}),Gn=(function(S){return S[S.GEOBLOCKED=1]="GEOBLOCKED",S[S.UNSUPPORTED_DEVICE=2]="UNSUPPORTED_DEVICE",S[S.ANONYMIZER_BLOCKED=3]="ANONYMIZER_BLOCKED",S[S.CELLULAR_NETWORK_PROHIBITED=4]="CELLULAR_NETWORK_PROHIBITED",S[S.UNAUTHORIZATION_ENTITLEMENTS=5]="UNAUTHORIZATION_ENTITLEMENTS",S[S.VOD_RESTRICTED=6]="VOD_RESTRICTED",S})({}),ru=(function(S){return S.CAPTURE_ENABLED="CaptureEnabled",S.CAPTURE_BUNDLE="CaptureBundle",S.CAPTURE_ANALYTICS="CaptureAnalytics",S.FMP4_SEGMENT="FMP4Segment",S})({}),Di=(function(S){return S.DEBUG="debug",S.INFO="info",S.WARN="warn",S.ERROR="error",S})({}),qt=(function(S){return S.DURATION_CHANGE="durationchange",S.ENDED="ended",S.ERROR="error",S.LOADED_METADATA="loadedmetadata",S.LOADSTART="loadstart",S.PAUSE="pause",S.PLAY="play",S.PLAYING="playing",S.RATE_CHANGE="ratechange",S.SEEKED="seeked",S.SEEKING="seeking",S.TIME_UPDATE="timeupdate",S.VOLUME_CHANGE="volumechange",S.WAITING="waiting",S})({}),Jr=(function(S){return S[S.HAVE_NOTHING=0]="HAVE_NOTHING",S[S.HAVE_METADATA=1]="HAVE_METADATA",S[S.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",S[S.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",S[S.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA",S})(Jr||{}),yt=((ki={})[Tt.IDLE]=1,ki[Tt.READY]=1,ki[Tt.BUFFERING]=2,ki[Tt.PLAYING]=2,ki[Tt.ENDED]=1,ki),Ss="AmazonIVS";function iu(S,_){if(S===void 0||typeof S.getTech!="function")throw{message:"videojs not available, AmazonIVS tech not registered",code:1};if(!jn)throw{message:"WebAssembly support is required for AmazonIVS tech",code:2};if(!S.getTech(Ss)){var c,p={featuresProgressEvents:!0,featuresTimeupdateEvents:!0,featuresPlaybackRate:!0,featuresFullscreenResize:!0,featuresVolumeControl:!0,featuresMuteControl:!0,featuresNativeTextTracks:!1,privateContructor:function(P,N,$){this._readyState=Jr.HAVE_NOTHING,this._defaultPlaybackRate=1,this._seeking=!1,_.playerFramework={name:"videojs",version:S.VERSION},this._mediaPlayer=Ca(_),this._mediaPlayer.setAutoplay(P.autoplay===!0),this._attachVideojsListeners(),this._mediaPlayer.addEventListener(ce.METADATA,this._onCaptionEvent.bind(this));var de=this._createEl(P);P.el=de,$(this,P,N),window.vttjs&&window.vttjs.restore(),this.triggerReady(),setTimeout((function(){var fe=this.options(),pe=fe.loop,he=fe.muted;pe&&this._mediaPlayer.setLooping(!0),he&&this._mediaPlayer.setMuted(!0)}).bind(this),0)},dispose:function(){this._mediaPlayer.delete()},setPreload:function(){},autoplay:function(P){if(typeof P!="boolean")return this._mediaPlayer.autoplay;this.setAutoplay(P)},setAutoplay:function(P){this._mediaPlayer.setAutoplay(P)},preload:function(){},load:function(){},readyState:function(){return this._readyState},seeking:function(){return this._seeking},networkState:function(){if(!this._mediaPlayer)return 0;if(!this._mediaPlayer.getHTMLVideoElement().src)return 3;var P=this._mediaPlayer.getState();return yt[P]},ended:function(){return this._mediaPlayer.getState()===Tt.ENDED},seekable:function(){return S.createTimeRange(0,this._mediaPlayer.getDuration())},play:function(){this._mediaPlayer.play(),this.trigger(qt.PLAY)},pause:function(){this._mediaPlayer.pause()},setCurrentTime:function(P){this._mediaPlayer.getHTMLVideoElement().src&&(this._mediaPlayer.seekTo(P),this._seeking=!0,this.trigger(qt.SEEKING))},controls:function(){return!1},setControls:function(){return!1},muted:function(){return this._mediaPlayer.isMuted()},setMuted:function(P){this._mediaPlayer.setMuted(P)},volume:function(){return this._mediaPlayer.getVolume()},setVolume:function(P){this._mediaPlayer.setVolume(P)},defaultPlaybackRate:function(P){if(!P)return this._defaultPlaybackRate;this._defaultPlaybackRate=P},playbackRate:function(){return this._mediaPlayer.getPlaybackRate()},setPlaybackRate:function(P){this._mediaPlayer.setPlaybackRate(P)},paused:function(){return this._mediaPlayer.isPaused()},duration:function(){return this._mediaPlayer.getDuration()},currentTime:function(){return this._mediaPlayer.getPosition()},_createEl:function(P){var N=this._mediaPlayer.getHTMLVideoElement();N.setAttribute("class","vjs-tech"),P.disablePictureInPicture!==void 0&&(N.disablePictureInPicture=P.disablePictureInPicture),["preload","poster"].forEach((function(de){P[de]&&N.setAttribute(de,P[de])}).bind(this)),P.playsinline&&(N.setAttribute("webkit-playsinline",""),N.setAttribute("playsinline",""));var $=document.createElement("div");return $.appendChild(N),$},src:function(P){this.trigger(qt.LOADSTART),this._seeking=!1,this._captionTrack&&(this.textTracks().removeTrack(this._captionTrack),this._captionTrack=null),P&&this._mediaPlayer.load(P)},addEventListener:function(P,N){this._mediaPlayer.addEventListener(P,N)},removeEventListener:function(P,N){this._mediaPlayer.removeEventListener(P,N)},getMediaPlayerAPI:function(){return this._mediaPlayer},supportsFullScreen:function(){return!0},enterFullScreen:function(){var P=this._mediaPlayer.getHTMLVideoElement();(P.requestFullscreen||P.webkitRequestFullscreen||P.mozRequestFullScreen||P.msRequestFullscreen||P.webkitEnterFullscreen||function(){console.error("Fullscreen API is not available")}).call(P)},exitFullScreen:function(){(document.exitFullScreen||document.webkitExitFullscreen||document.mozCancelFullScreen||document.msExitFullscreen||function(){console.error("Exitscreen API is not available")}).call(document)},requestPictureInPicture:function(){return this._mediaPlayer.getHTMLVideoElement().requestPictureInPicture()},setDisablePictureInPicture:function(P){this._mediaPlayer.getHTMLVideoElement().disablePictureInPicture=P},disablePictureInPicture:function(){return this._mediaPlayer.getHTMLVideoElement().disablePictureInPicture},_onCaptionEvent:function(P){if(P.type==="text/json"){var N=JSON.parse(P.data);if(N.caption){var $=N.caption;this._captionTrack||(this._captionTrack=this.addTextTrack("captions",$.format),this._currentCue=null),this._currentCue&&this._captionTrack.removeCue(this._currentCue);var de=this._mediaPlayer.getHTMLVideoElement(),fe=window.VTTCue||window.vttjs.VTTCue;fe?(this._currentCue=new fe(de.currentTime,de.currentTime+2,$.text),this._captionTrack.addCue(this._currentCue)):console.warn("No VTTCue implementation available, caption may not be available")}}},_attachVideojsListeners:function(){this._mediaPlayer.addEventListener(Tt.READY,(function(){this._readyState=Jr.HAVE_METADATA,this.trigger(qt.LOADED_METADATA)}).bind(this)),this._mediaPlayer.addEventListener(Tt.IDLE,(function(){this._readyState=Jr.HAVE_NOTHING,this.trigger(qt.PAUSE)}).bind(this)),this._mediaPlayer.addEventListener(Tt.PLAYING,(function(){this._readyState<=Jr.HAVE_CURRENT_DATA&&(this._readyState=Jr.HAVE_FUTURE_DATA),this.trigger(qt.PLAY),this.trigger(qt.PLAYING)}).bind(this)),this._mediaPlayer.addEventListener(Tt.ENDED,(function(){this._readyState=Jr.HAVE_NOTHING,this.trigger(qt.ENDED)}).bind(this)),this._mediaPlayer.addEventListener(Tt.BUFFERING,(function(){this._readyState=Jr.HAVE_CURRENT_DATA}).bind(this)),this._mediaPlayer.addEventListener(ce.REBUFFERING,(function(){this._readyState=Jr.HAVE_CURRENT_DATA,this.trigger(qt.WAITING)}).bind(this)),this._mediaPlayer.addEventListener(ce.TIME_UPDATE,(function(){this.trigger(qt.TIME_UPDATE)}).bind(this)),this._mediaPlayer.addEventListener(ce.VOLUME_CHANGED,(function(){this.trigger(qt.VOLUME_CHANGE)}).bind(this)),this._mediaPlayer.addEventListener(ce.MUTED_CHANGED,(function(){this.trigger(qt.VOLUME_CHANGE)}).bind(this)),this._mediaPlayer.addEventListener(ce.ERROR,(function(){this.trigger(qt.ERROR)}).bind(this)),this._mediaPlayer.addEventListener(ce.DURATION_CHANGED,(function(){this.trigger(qt.DURATION_CHANGE)}).bind(this)),this._mediaPlayer.addEventListener(ce.SEEK_COMPLETED,(function(){this._seeking=!1,this.trigger(qt.SEEKED)}).bind(this)),this._mediaPlayer.addEventListener(ce.PLAYBACK_RATE_CHANGED,(function(){this.trigger(qt.RATE_CHANGE)}).bind(this))}},g=S.getTech("Tech");typeof S.extend=="function"?(p.constructor=function(P,N){this.privateContructor(P,N,(function($,de,fe){g.call($,de,fe)}))},c=S.extend(g,p,Ss)):((c=function(P,N){this.privateContructor(P,N,(function($,de,fe){var pe=g.prototype,he=pe.featuresProgressEvents,ve=pe.featuresTimeupdateEvents,Fe=pe.featuresPlaybackRate,Le=pe.featuresFullscreenResize,Ke=pe.featuresVolumeControl,lt=pe.featuresMuteControl,mt=pe.featuresNativeTextTracks;pe.featuresProgressEvents=!0,pe.featuresTimeupdateEvents=!0,pe.featuresPlaybackRate=!0,pe.featuresFullscreenResize=!0,pe.featuresVolumeControl=!0,pe.featuresMuteControl=!0,pe.featuresNativeTextTracks=!1,Object.assign($,new g(de,fe)),$.on(qt.PLAYING,(function(){$.hasStarted_=!0})),$.on(qt.LOADSTART,(function(){$.hasStarted_=!1})),pe.featuresProgressEvents=he,pe.featuresTimeupdateEvents=ve,pe.featuresPlaybackRate=Fe,pe.featuresFullscreenResize=Le,pe.featuresVolumeControl=Ke,pe.featuresMuteControl=lt,pe.featuresNativeTextTracks=mt}))}).prototype=Object.create(g.prototype),Object.assign(c.prototype,p)),c.supportsFullScreen=function(){return!0},c.isSupported=function(){return(navigator.appVersion||"").toLowerCase().indexOf("rv:11")===-1},c.canPlayType=function(P){return typeof P=="string"&&P.length>0&&(P.indexOf("application/x-mpegURL")>
84-1?typeof MediaSource<"u"&&MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'):document.createElement("video").canPlayType(P)!=="")},c.canPlaySource=function(){return!0},S.registerTech("AmazonIVS",c);var T=S.registerPlugin||S.plugin;T("getIVSEvents",(function(){return{PlayerEventType:ce,MetadataEventType:fr,PlayerState:Tt,ErrorType:Ts}})),T("getIVSPlayer",(function(){return this.tech(!0).getMediaPlayerAPI()}))}}var xs="enableIVSQualityPlugin";function Es(S){if(S===void 0||typeof S.getTech!="function")throw{message:"videojs not available, Amazon IVS Quality Plugin not registered",code:1};if(!S.getPlugin(xs)){var _,c=S.getComponent("MenuButton"),p=S.getComponent("MenuItem"),g={privateConstructor:function(T,P,N){N(this,T,P),this.controlText("Quality")},createItems:function(){var T=this.player(),P=T.getIVSPlayer(),N=[],$=new p(T,{selectable:!0,label:"Auto",qualityGroup:"auto"});$.selected(P.isAutoQualityMode()),$.on(["click","tap"],(function(){P.setAutoQualityMode(!0)})),$.on(["click","tap"],this._clickHandler.bind(this,$)),N.push($);var de=P.getQuality(),fe=P.getQualities();return fe&&fe.length>0&&fe.forEach((function(pe){var he=new p(T,{selectable:!0,label:pe.name,qualityGroup:pe.group}),ve=(function(Fe){P.setQuality(Fe)}).bind(null,pe);he.on(["click","tap"],ve),he.on(["click","tap"],this._clickHandler.bind(this,he)),P.isAutoQualityMode()||he.selected(de.group===pe.group),N.push(he)}).bind(this)),P.addEventListener(ce.QUALITY_CHANGED,(function(pe){var he;if(!P.isAutoQualityMode()){var ve=(he=T.controlBar)==null?void 0:he.getChild("QualityMenuButton");ve?.items.forEach((function(Fe){var Le=Fe.options().qualityGroup;pe&&Le&&Fe.selected(pe.group===Le)}))}})),this.qualityItems=N,N},buildCSSClass:function(){return"vjs-icon-hd vjs-icon-placeholder "+c.prototype.buildCSSClass.call(this)},_clickHandler:function(T){this.items.forEach((function(P){P!==T&&P.selected(!1)}))}};typeof S.extend=="function"?(g.constructor=function(T,P){this.privateConstructor(T,P,(function(N,$,de){c.call(N,$,de)}))},_=S.extend(c,g)):((_=function(T,P){this.privateConstructor(T,P,(function(N,$,de){var fe="quality-control";de.name=fe;var pe=new c($,de);pe.getChild(fe).addClass("vjs-icon-hd vjs-icon-placeholder"),Object.assign(N,pe),N.items=N.createItems(),N.items.forEach((function(he){N.menu.addItem(he)}))}))}).prototype=Object.create(c.prototype),Object.assign(_.prototype,g)),S.registerComponent("QualityMenuButton",_),(S.registerPlugin||S.plugin)(xs,(function(){var T=this;T.getIVSPlayer().addEventListener(Tt.READY,(function(){var P,N,$=(P=T.controlBar)==null?void 0:P.getChild("QualityMenuButton");$&&($.dispose(),T.controlBar.removeChild($)),(N=T.controlBar)==null||N.addChild("QualityMenuButton")}))}))}}$u.exports=r})()),$u.exports}var bm=L1(),vl,Tm;function x_(){if(Tm)return vl;Tm=1;var s=typeof on=="object"&&on&&on.Object===Object&&on;return vl=s,vl}var gl,Sm;function Ki(){if(Sm)return gl;Sm=1;var s=x_(),r=typeof self=="object"&&self&&self.Object===Object&&self,i=s||r||Function("return this")();return gl=i,gl}var yl,xm;function Fo(){if(xm)return yl;xm=1;var s=Ki(),r=s.Symbol;return yl=r,yl}var _l,Em;function M1(){if(Em)return _l;Em=1;var s=Fo(),r=Object.prototype,i=r.hasOwnProperty,n=r.toString,e=s?s.toStringTag:void 0;function t(a){var o=i.call(a,e),l=a[e];try{a[e]=void 0;var u=!0}catch{}var d=n.call(a);return u&&(o?a[e]=l:delete a[e]),d}return _l=t,_l}var bl,Cm;function O1(){if(Cm)return bl;Cm=1;var s=Object.prototype,r=s.toString;function i(n){return r.call(n)}return bl=i,bl}var Tl,wm;function us(){if(wm)return Tl;wm=1;var s=Fo(),r=M1(),i=O1(),n="[object Null]",e="[object Undefined]",t=s?s.toStringTag:void 0;function a(o){return o==null?o===void 0?e:n:t&&t in Object(o)?r(o):i(o)}return Tl=a,Tl}var Sl,Am;function ah(){if(Am)return Sl;Am=1;function s(r){var i=typeof r;return r!=null&&(i=="object"||i=="function")}return Sl=s,Sl}var xl,km;function E_(){if(km)return xl;km=1;var s=us(),r=ah(),i="[object AsyncFunction]",n="[object Function]",e="[object GeneratorFunction]",t="[object Proxy]";function a(o){if(!r(o))return!1;var l=s(o);return l==n||l==e||l==i||l==t}return xl=a,xl}var El,Dm;function R1(){if(Dm)return El;Dm=1;var s=Ki(),r=s["__core-js_shared__"];return El=r,El}var Cl,Pm;function F1(){if(Pm)return Cl;Pm=1;var s=R1(),r=(function(){var n=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||"");
vendor: 5,698 bytes, line 84
84return n?"Symbol(src)_1."+n:""})();function i(n){return!!r&&r in n}return Cl=i,Cl}var wl,Im;function C_(){if(Im)return wl;Im=1;var s=Function.prototype,r=s.toString;function i(n){if(n!=null){try{return r.call(n)}catch{}try{return n+""}catch{}}return""}return wl=i,wl}var Al,Lm;function N1(){if(Lm)return Al;Lm=1;var s=E_(),r=F1(),i=ah(),n=C_(),e=/[\\^$.*+?()[\]{}|]/g,t=/^\[object .+?Constructor\]$/,a=Function.prototype,o=Object.prototype,l=a.toString,u=o.hasOwnProperty,d=RegExp("^"+l.call(u).replace(e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(m){if(!i(m)||r(m))return!1;var x=s(m)?d:t;return x.test(n(m))}return Al=f,Al}var kl,Mm;function B1(){if(Mm)return kl;Mm=1;function s(r,i){return r?.[i]}return kl=s,kl}var Dl,Om;function Rn(){if(Om)return Dl;Om=1;var s=N1(),r=B1();function i(n,e){var t=r(n,e);return s(t)?t:void 0}return Dl=i,Dl}var Pl,Rm;function U1(){if(Rm)return Pl;Rm=1;var s=Rn(),r=(function(){try{var i=s(Object,"defineProperty");return i({},"",{}),i}catch{}})();return Pl=r,Pl}var Il,Fm;function q1(){if(Fm)return Il;Fm=1;var s=U1();function r(i,n,e){n=="__proto__"&&s?s(i,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):i[n]=e}return Il=r,Il}var Ll,Nm;function V1(){if(Nm)return Ll;Nm=1;function s(r,i,n,e){for(var t=-1,a=r==null?0:r.length;++t<a;){var o=r[t];i(e,o,n(o),r)}return e}return Ll=s,Ll}var Ml,Bm;function H1(){if(Bm)return Ml;Bm=1;function s(r){return function(i,n,e){for(var t=-1,a=Object(i),o=e(i),l=o.length;l--;){var u=o[r?l:++t];if(n(a[u],u,a)===!1)break}return i}}return Ml=s,Ml}var Ol,Um;function j1(){if(Um)return Ol;Um=1;var s=H1(),r=s();return Ol=r,Ol}var Rl,qm;function G1(){if(qm)return Rl;qm=1;function s(r,i){for(var n=-1,e=Array(r);++n<r;)e[n]=i(n);return e}return Rl=s,Rl}var Fl,Vm;function ls(){if(Vm)return Fl;Vm=1;function s(r){return r!=null&&typeof r=="object"}return Fl=s,Fl}var Nl,Hm;function W1(){if(Hm)return Nl;Hm=1;var s=us(),r=ls(),i="[object Arguments]";function n(e){return r(e)&&s(e)==i}return Nl=n,Nl}var Bl,jm;function w_(){if(jm)return Bl;jm=1;var s=W1(),r=ls(),i=Object.prototype,n=i.hasOwnProperty,e=i.propertyIsEnumerable,t=s((function(){return arguments})())?s:function(a){return r(a)&&n.call(a,"callee")&&!e.call(a,"callee")};return Bl=t,Bl}var Ul,Gm;function Xi(){if(Gm)return Ul;Gm=1;var s=Array.isArray;return Ul=s,Ul}var Ua={exports:{}},ql,Wm;function z1(){if(Wm)return ql;Wm=1;function s(){return!1}return ql=s,ql}Ua.exports;var zm;function A_(){return zm||(zm=1,(function(s,r){var i=Ki(),n=z1(),e=r&&!r.nodeType&&r,t=e&&!0&&s&&!s.nodeType&&s,a=t&&t.exports===e,o=a?i.Buffer:void 0,l=o?o.isBuffer:void 0,u=l||n;s.exports=u})(Ua,Ua.exports)),Ua.exports}var Vl,$m;function k_(){if($m)return Vl;$m=1;var s=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function i(n,e){var t=typeof n;return e=e??s,!!e&&(t=="number"||t!="symbol"&&r.test(n))&&n>-1&&n%1==0&&n<e}return Vl=i,Vl}var Hl,Km;function sh(){if(Km)return Hl;Km=1;var s=9007199254740991;function r(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=s}return Hl=r,Hl}var jl,Xm;function $1(){if(Xm)return jl;Xm=1;var s=us(),r=sh(),i=ls(),n="[object Arguments]",e="[object Array]",t="[object Boolean]",a="[object Date]",o="[object Error]",l="[object Function]",u="[object Map]",d="[object Number]",f="[object Object]",m="[object RegExp]",x="[object Set]",C="[object String]",L="[object WeakMap]",E="[object ArrayBuffer]",B="[object DataView]",q="[object Float32Array]",z="[object Float64Array]",U="[object Int8Array]",F="[object Int16Array]",G="[object Int32Array]",O="[object Uint8Array]",H="[object Uint8ClampedArray]",A="[object Uint16Array]",D="[object Uint32Array]",j={};j[q]=j[z]=j[U]=j[F]=j[G]=j[O]=j[H]=j[A]=j[D]=!0,j[n]=j[e]=j[E]=j[t]=j[B]=j[a]=j[o]=j[l]=j[u]=j[d]=j[f]=j[m]=j[x]=j[C]=j[L]=!1;function X(J){return i(J)&&r(J.length)&&!!j[s(J)]}return jl=X,jl}var Gl,Ym;function K1(){if(Ym)return Gl;Ym=1;function s(r){return function(i){return r(i)}}return Gl=s,Gl}var qa={exports:{}};qa.exports;var Qm;function X1(){return Qm||(Qm=1,(function(s,r){var i=x_(),n=r&&!r.nodeType&&r,e=n&&!0&&s&&!s.nodeType&&s,t=e&&e.exports===n,a=t&&i.process,o=(function(){try{var l=e&&e.require&&e.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}})();s.exports=o})(qa,qa.exports)),qa.exports}var Wl,Jm;function D_(){if(Jm)return Wl;Jm=1;var s=$1(),r=K1(),i=X1(),n=i&&i.isTypedArray,e=n?r(n):s;return Wl=e,Wl}var zl,Zm;function Y1(){if(Zm)return zl;Zm=1;var s=G1(),r=w_(),i=Xi(),n=A_(),e=k_(),t=D_(),a=Object.prototype,o=a.hasOwnProperty;function l(u,d){var f=i(u),m=!f&&r(u),x=!f&&!m&&n(u),C=!f&&!m&&!x&&t(u),L=f||m||x||C,E=L?s(u.length,String):[],B=E.length;for(var q in u)(d||o.call(u,q))&&!(L&&(q=="length"||x&&(q=="offset"||q=="parent")||C&&(q=="buffer"||q=="byteLength"||q=="byteOffset")||e(q,B)))&&E.push(q);return E}return zl=l,zl}var $l,ev;function Q1(){if(ev)return $l;ev=1;var s=Object.prototype;function r(i){var n=i&&i.constructor,e=typeof n=="function"&&n.prototype||s;return i===e}return $l=r,$l}var Kl,tv;function J1(){if(tv)return Kl;tv=1;function s(r,i){return function(n){return r(i(n))}}return Kl=s,Kl}var Xl,rv;function Z1(){if(rv)return Xl;rv=1;var s=J1(),r=s(Object.keys,Object);return Xl=r,Xl}var Yl,iv;function ew(){if(iv)return Yl;iv=1;var s=Q1(),r=Z1(),i=Object.prototype,n=i.hasOwnProperty;function e(t){if(!s(t))return r(t);var a=[];for(var o in Object(t))n.call(t,o)&&o!="constructor"&&a.push(o);return a}return Yl=e,Yl}var Ql,nv;function P_(){if(nv)return Ql;nv=1;var s=E_(),r=sh();function i(n){return n!=null&&r(n.length)&&!s(n)}return Ql=i,Ql}var Jl,av;function oh(){if(av)return Jl;av=1;var s=Y1(),r=ew(),i=P_();function n(e){return i(e)?s(e):r(e)}return Jl=n,Jl}var Zl,sv;
vendor: 1,070 bytes, line 84
84function tw(){if(sv)return Zl;sv=1;var s=j1(),r=oh();function i(n,e){return n&&s(n,e,r)}return Zl=i,Zl}var ec,ov;function rw(){if(ov)return ec;ov=1;var s=P_();function r(i,n){return function(e,t){if(e==null)return e;if(!s(e))return i(e,t);for(var a=e.length,o=n?a:-1,l=Object(e);(n?o--:++o<a)&&t(l[o],o,l)!==!1;);return e}}return ec=r,ec}var tc,uv;function iw(){if(uv)return tc;uv=1;var s=tw(),r=rw(),i=r(s);return tc=i,tc}var rc,lv;function nw(){if(lv)return rc;lv=1;var s=iw();function r(i,n,e,t){return s(i,function(a,o,l){n(t,a,e(a),l)}),t}return rc=r,rc}var ic,cv;function aw(){if(cv)return ic;cv=1;function s(){this.__data__=[],this.size=0}return ic=s,ic}var nc,dv;function I_(){if(dv)return nc;dv=1;function s(r,i){return r===i||r!==r&&i!==i}return nc=s,nc}var ac,fv;function No(){if(fv)return ac;fv=1;var s=I_();function r(i,n){for(var e=i.length;e--;)if(s(i[e][0],n))return e;return-1}return ac=r,ac}var sc,hv;function sw(){if(hv)return sc;hv=1;var s=No(),r=Array.prototype,i=r.splice;function n(e){var t=this.__data__,a=s(t,e);if(a<0)return!1;var o=t.length-1;
vendor: 12,611 bytes, line 84
84return a==o?t.pop():i.call(t,a,1),--this.size,!0}return sc=n,sc}var oc,pv;function ow(){if(pv)return oc;pv=1;var s=No();function r(i){var n=this.__data__,e=s(n,i);return e<0?void 0:n[e][1]}return oc=r,oc}var uc,mv;function uw(){if(mv)return uc;mv=1;var s=No();function r(i){return s(this.__data__,i)>-1}return uc=r,uc}var lc,vv;function lw(){if(vv)return lc;vv=1;var s=No();function r(i,n){var e=this.__data__,t=s(e,i);return t<0?(++this.size,e.push([i,n])):e[t][1]=n,this}return lc=r,lc}var cc,gv;function Bo(){if(gv)return cc;gv=1;var s=aw(),r=sw(),i=ow(),n=uw(),e=lw();function t(a){var o=-1,l=a==null?0:a.length;for(this.clear();++o<l;){var u=a[o];this.set(u[0],u[1])}}return t.prototype.clear=s,t.prototype.delete=r,t.prototype.get=i,t.prototype.has=n,t.prototype.set=e,cc=t,cc}var dc,yv;function cw(){if(yv)return dc;yv=1;var s=Bo();function r(){this.__data__=new s,this.size=0}return dc=r,dc}var fc,_v;function dw(){if(_v)return fc;_v=1;function s(r){var i=this.__data__,n=i.delete(r);return this.size=i.size,n}return fc=s,fc}var hc,bv;function fw(){if(bv)return hc;bv=1;function s(r){return this.__data__.get(r)}return hc=s,hc}var pc,Tv;function hw(){if(Tv)return pc;Tv=1;function s(r){return this.__data__.has(r)}return pc=s,pc}var mc,Sv;function uh(){if(Sv)return mc;Sv=1;var s=Rn(),r=Ki(),i=s(r,"Map");return mc=i,mc}var vc,xv;function Uo(){if(xv)return vc;xv=1;var s=Rn(),r=s(Object,"create");return vc=r,vc}var gc,Ev;function pw(){if(Ev)return gc;Ev=1;var s=Uo();function r(){this.__data__=s?s(null):{},this.size=0}return gc=r,gc}var yc,Cv;function mw(){if(Cv)return yc;Cv=1;function s(r){var i=this.has(r)&&delete this.__data__[r];return this.size-=i?1:0,i}return yc=s,yc}var _c,wv;function vw(){if(wv)return _c;wv=1;var s=Uo(),r="__lodash_hash_undefined__",i=Object.prototype,n=i.hasOwnProperty;function e(t){var a=this.__data__;if(s){var o=a[t];return o===r?void 0:o}return n.call(a,t)?a[t]:void 0}return _c=e,_c}var bc,Av;function gw(){if(Av)return bc;Av=1;var s=Uo(),r=Object.prototype,i=r.hasOwnProperty;function n(e){var t=this.__data__;return s?t[e]!==void 0:i.call(t,e)}return bc=n,bc}var Tc,kv;function yw(){if(kv)return Tc;kv=1;var s=Uo(),r="__lodash_hash_undefined__";function i(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=s&&e===void 0?r:e,this}return Tc=i,Tc}var Sc,Dv;function _w(){if(Dv)return Sc;Dv=1;var s=pw(),r=mw(),i=vw(),n=gw(),e=yw();function t(a){var o=-1,l=a==null?0:a.length;for(this.clear();++o<l;){var u=a[o];this.set(u[0],u[1])}}return t.prototype.clear=s,t.prototype.delete=r,t.prototype.get=i,t.prototype.has=n,t.prototype.set=e,Sc=t,Sc}var xc,Pv;function bw(){if(Pv)return xc;Pv=1;var s=_w(),r=Bo(),i=uh();function n(){this.size=0,this.__data__={hash:new s,map:new(i||r),string:new s}}return xc=n,xc}var Ec,Iv;function Tw(){if(Iv)return Ec;Iv=1;function s(r){var i=typeof r;return i=="string"||i=="number"||i=="symbol"||i=="boolean"?r!=="__proto__":r===null}return Ec=s,Ec}var Cc,Lv;function qo(){if(Lv)return Cc;Lv=1;var s=Tw();function r(i,n){var e=i.__data__;return s(n)?e[typeof n=="string"?"string":"hash"]:e.map}return Cc=r,Cc}var wc,Mv;function Sw(){if(Mv)return wc;Mv=1;var s=qo();function r(i){var n=s(this,i).delete(i);return this.size-=n?1:0,n}return wc=r,wc}var Ac,Ov;function xw(){if(Ov)return Ac;Ov=1;var s=qo();function r(i){return s(this,i).get(i)}return Ac=r,Ac}var kc,Rv;function Ew(){if(Rv)return kc;Rv=1;var s=qo();function r(i){return s(this,i).has(i)}return kc=r,kc}var Dc,Fv;function Cw(){if(Fv)return Dc;Fv=1;var s=qo();function r(i,n){var e=s(this,i),t=e.size;return e.set(i,n),this.size+=e.size==t?0:1,this}return Dc=r,Dc}var Pc,Nv;function lh(){if(Nv)return Pc;Nv=1;var s=bw(),r=Sw(),i=xw(),n=Ew(),e=Cw();function t(a){var o=-1,l=a==null?0:a.length;for(this.clear();++o<l;){var u=a[o];this.set(u[0],u[1])}}return t.prototype.clear=s,t.prototype.delete=r,t.prototype.get=i,t.prototype.has=n,t.prototype.set=e,Pc=t,Pc}var Ic,Bv;function ww(){if(Bv)return Ic;Bv=1;var s=Bo(),r=uh(),i=lh(),n=200;function e(t,a){var o=this.__data__;if(o instanceof s){var l=o.__data__;if(!r||l.length<n-1)return l.push([t,a]),this.size=++o.size,this;o=this.__data__=new i(l)}return o.set(t,a),this.size=o.size,this}return Ic=e,Ic}var Lc,Uv;function L_(){if(Uv)return Lc;Uv=1;var s=Bo(),r=cw(),i=dw(),n=fw(),e=hw(),t=ww();function a(o){var l=this.__data__=new s(o);this.size=l.size}return a.prototype.clear=r,a.prototype.delete=i,a.prototype.get=n,a.prototype.has=e,a.prototype.set=t,Lc=a,Lc}var Mc,qv;function Aw(){if(qv)return Mc;qv=1;var s="__lodash_hash_undefined__";function r(i){return this.__data__.set(i,s),this}return Mc=r,Mc}var Oc,Vv;function kw(){if(Vv)return Oc;Vv=1;function s(r){return this.__data__.has(r)}return Oc=s,Oc}var Rc,Hv;function Dw(){if(Hv)return Rc;Hv=1;var s=lh(),r=Aw(),i=kw();function n(e){var t=-1,a=e==null?0:e.length;for(this.__data__=new s;++t<a;)this.add(e[t])}return n.prototype.add=n.prototype.push=r,n.prototype.has=i,Rc=n,Rc}var Fc,jv;function Pw(){if(jv)return Fc;jv=1;function s(r,i){for(var n=-1,e=r==null?0:r.length;++n<e;)if(i(r[n],n,r))return!0;return!1}return Fc=s,Fc}var Nc,Gv;function Iw(){if(Gv)return Nc;Gv=1;function s(r,i){return r.has(i)}return Nc=s,Nc}var Bc,Wv;function M_(){if(Wv)return Bc;Wv=1;var s=Dw(),r=Pw(),i=Iw(),n=1,e=2;function t(a,o,l,u,d,f){var m=l&n,x=a.length,C=o.length;if(x!=C&&!(m&&C>x))return!1;var L=f.get(a),E=f.get(o);if(L&&E)return L==o&&E==a;var B=-1,q=!0,z=l&e?new s:void 0;for(f.set(a,o),f.set(o,a);++B<x;){var U=a[B],F=o[B];if(u)var G=m?u(F,U,B,o,a,f):u(U,F,B,a,o,f);if(G!==void 0){if(G)continue;q=!1;break}if(z){if(!r(o,function(O,H){if(!i(z,H)&&(U===O||d(U,O,l,u,f)))return z.push(H)})){q=!1;break}}else if(!(U===F||d(U,F,l,u,f))){q=!1;break}}return f.delete(a),f.delete(o),q}return Bc=t,Bc}var Uc,zv;function Lw(){if(zv)return Uc;zv=1;var s=Ki(),r=s.Uint8Array;return Uc=r,Uc}var qc,$v;function Mw(){if($v)return qc;$v=1;function s(r){var i=-1,n=Array(r.size);return r.forEach(function(e,t){n[++i]=[t,e]}),n}return qc=s,qc}var Vc,Kv;function Ow(){if(Kv)return Vc;Kv=1;function s(r){var i=-1,n=Array(r.size);return r.forEach(function(e){n[++i]=e}),n}return Vc=s,Vc}var Hc,Xv;function Rw(){if(Xv)return Hc;Xv=1;var s=Fo(),r=Lw(),i=I_(),n=M_(),e=Mw(),t=Ow(),a=1,o=2,l="[object Boolean]",u="[object Date]",d="[object Error]",f="[object Map]",m="[object Number]",x="[object RegExp]",C="[object Set]",L="[object String]",E="[object Symbol]",B="[object ArrayBuffer]",q="[object DataView]",z=s?s.prototype:void 0,U=z?z.valueOf:void 0;function F(G,O,H,A,D,j,X){switch(H){case q:if(G.byteLength!=O.byteLength||G.byteOffset!=O.byteOffset)return!1;G=G.buffer,O=O.buffer;case B:return!(G.byteLength!=O.byteLength||!j(new r(G),new r(O)));case l:case u:case m:return i(+G,+O);case d:return G.name==O.name&&G.message==O.message;case x:case L:return G==O+"";case f:var J=e;case C:var ne=A&a;if(J||(J=t),G.size!=O.size&&!ne)return!1;var se=X.get(G);if(se)return se==O;A|=o,X.set(G,O);var ue=n(J(G),J(O),A,D,j,X);return X.delete(G),ue;case E:if(U)return U.call(G)==U.call(O)}return!1}return Hc=F,Hc}var jc,Yv;function Fw(){if(Yv)return jc;Yv=1;function s(r,i){for(var n=-1,e=i.length,t=r.length;++n<e;)r[t+n]=i[n];return r}return jc=s,jc}var Gc,Qv;function Nw(){if(Qv)return Gc;Qv=1;var s=Fw(),r=Xi();function i(n,e,t){var a=e(n);return r(n)?a:s(a,t(n))}return Gc=i,Gc}var Wc,Jv;function Bw(){if(Jv)return Wc;Jv=1;function s(r,i){for(var n=-1,e=r==null?0:r.length,t=0,a=[];++n<e;){var o=r[n];i(o,n,r)&&(a[t++]=o)}return a}return Wc=s,Wc}var zc,Zv;function Uw(){if(Zv)return zc;Zv=1;function s(){return[]}return zc=s,zc}var $c,eg;function qw(){if(eg)return $c;eg=1;var s=Bw(),r=Uw(),i=Object.prototype,n=i.propertyIsEnumerable,e=Object.getOwnPropertySymbols,t=e?function(a){return a==null?[]:(a=Object(a),s(e(a),function(o){return n.call(a,o)}))}:r;return $c=t,$c}var Kc,tg;function Vw(){if(tg)return Kc;tg=1;var s=Nw(),r=qw(),i=oh();function n(e){return s(e,i,r)}return Kc=n,Kc}var Xc,rg;function Hw(){if(rg)return Xc;rg=1;var s=Vw(),r=1,i=Object.prototype,n=i.hasOwnProperty;function e(t,a,o,l,u,d){var f=o&r,m=s(t),x=m.length,C=s(a),L=C.length;if(x!=L&&!f)return!1;for(var E=x;E--;){var B=m[E];if(!(f?B in a:n.call(a,B)))return!1}var q=d.get(t),z=d.get(a);if(q&&z)return q==a&&z==t;var U=!0;d.set(t,a),d.set(a,t);for(var F=f;++E<x;){B=m[E];var G=t[B],O=a[B];if(l)var H=f?l(O,G,B,a,t,d):l(G,O,B,t,a,d);if(!(H===void 0?G===O||u(G,O,o,l,d):H)){U=!1;break}F||(F=B=="constructor")}if(U&&!F){var A=t.constructor,D=a.constructor;A!=D&&"constructor"in t&&"constructor"in a&&!(typeof A=="function"&&A instanceof A&&typeof D=="function"&&D instanceof D)&&(U=!1)}return d.delete(t),d.delete(a),U}return Xc=e,Xc}var Yc,ig;function jw(){if(ig)return Yc;ig=1;var s=Rn(),r=Ki(),i=s(r,"DataView");return Yc=i,Yc}var Qc,ng;function Gw(){if(ng)return Qc;ng=1;var s=Rn(),r=Ki(),i=s(r,"Promise");return Qc=i,Qc}var Jc,ag;function Ww(){if(ag)return Jc;ag=1;var s=Rn(),r=Ki(),i=s(r,"Set");return Jc=i,Jc}var Zc,sg;function zw(){if(sg)return Zc;sg=1;var s=Rn(),r=Ki(),i=s(r,"WeakMap");return Zc=i,Zc}var ed,og;function $w(){if(og)return ed;og=1;var s=jw(),r=uh(),i=Gw(),n=Ww(),e=zw(),t=us(),a=C_(),o="[object Map]",l="[object Object]",u="[object Promise]",d="[object Set]",f="[object WeakMap]",m="[object DataView]",x=a(s),C=a(r),L=a(i),E=a(n),B=a(e),q=t;return(s&&q(new s(new ArrayBuffer(1)))!=m||r&&q(new r)!=o||i&&q(i.resolve())!=u||n&&q(new n)!=d||e&&q(new e)!=f)&&(q=function(z){var U=t(z),F=U==l?z.constructor:void 0,G=F?a(F):"";if(G)switch(G){case x:return m;case C:return o;case L:return u;case E:return d;case B:return f}return U}),ed=q,ed}var td,ug;function Kw(){if(ug)return td;ug=1;var s=L_(),r=M_(),i=Rw(),n=Hw(),e=$w(),t=Xi(),a=A_(),o=D_(),l=1,u="[object Arguments]",d="[object Array]",f="[object Object]",m=Object.prototype,x=m.hasOwnProperty;function C(L,E,B,q,z,U){var F=t(L),G=t(E),O=F?d:e(L),H=G?d:e(E);O=O==u?f:O,H=H==u?f:H;var A=O==f,D=H==f,j=O==H;if(j&&a(L)){if(!a(E))return!1;F=!0,A=!1}if(j&&!A)return U||(U=new s),F||o(L)?r(L,E,B,q,z,U):i(L,E,O,B,q,z,U);if(!(B&l)){var X=A&&x.call(L,"__wrapped__"),J=D&&x.call(E,"__wrapped__");if(X||J){var ne=X?L.value():L,se=J?E.value():E;return U||(U=new s),z(ne,se,B,q,U)}}return j?(U||(U=new s),n(L,E,B,q,z,U)):!1}return td=C,td}var rd,lg;function O_(){if(lg)return rd;lg=1;var s=Kw(),r=ls();function i(n,e,t,a,o){return n===e?!0:n==null||e==null||!r(n)&&!r(e)?n!==n&&e!==e:s(n,e,t,a,i,o)}return rd=i,rd}var id,cg;function Xw(){if(cg)return id;cg=1;var s=L_(),r=O_(),i=1,n=2;function e(t,a,o,l){var u=o.length,d=u,f=!l;if(t==null)return!d;for(t=Object(t);u--;){var m=o[u];if(f&&m[2]?m[1]!==t[m[0]]:!(m[0]in t))return!1}for(;++u<d;){m=o[u];var x=m[0],C=t[x],L=m[1];if(f&&m[2]){if(C===void 0&&!(x in t))return!1}else{var E=new s;if(l)var B=l(C,L,x,t,a,E);if(!(B===void 0?r(L,C,i|n,l,E):B))return!1}}return!0}return id=e,id}var nd,dg;function R_(){if(dg)return nd;dg=1;var s=ah();function r(i){return i===i&&!s(i)}return nd=r,nd}var ad,fg;function Yw(){if(fg)return ad;fg=1;var s=R_(),r=oh();function i(n){for(var e=r(n),t=e.length;t--;){var a=e[t],o=n[a];e[t]=[a,o,s(o)]}return e}return ad=i,ad}var sd,hg;function F_(){if(hg)return sd;hg=1;function s(r,i){return function(n){return n==null?!1:n[r]===i&&(i!==void 0||r in Object(n))}}return sd=s,sd}var od,pg;function Qw(){if(pg)return od;pg=1;var s=Xw(),r=Yw(),i=F_();function n(e){var t=r(e);return t.length==1&&t[0][2]?i(t[0][0],t[0][1]):function(a){return a===e||s(a,e,t)}}return od=n,od}var ud,mg;function ch(){if(mg)return ud;mg=1;var s=us(),r=ls(),i="[object Symbol]";function n(e){return typeof e=="symbol"||r(e)&&s(e)==i}return ud=n,ud}var ld,vg;function dh(){if(vg)return ld;vg=1;var s=Xi(),r=ch(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function e(t,a){if(s(t))return!1;var o=typeof t;return o=="number"||o=="symbol"||o=="boolean"||t==null||r(t)?!0:n.test(t)||!i.test(t)||a!=null&&t in Object(a)}return ld=e,ld}var cd,gg;function Jw(){if(gg)return cd;gg=1;var s=lh(),r="Expected a function";function i(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError(r);var t=function(){var a=arguments,o=e?e.apply(this,a):a[0],l=t.cache;if(l.has(o))return l.get(o);var u=n.apply(this,a);return t.cache=l.set(o,u)||l,u};return t.cache=new(i.Cache||s),t}return i.Cache=s,cd=i,cd}var dd,yg;function Zw(){if(yg)return dd;yg=1;var s=Jw(),r=500;function i(n){var e=s(n,function(a){return t.size===r&&t.clear(),a}),t=e.cache;return e}return dd=i,dd}var fd,_g;function eA(){if(_g)return fd;_g=1;var s=Zw(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,n=s(function(e){var t=[];
vendor: 5,997 bytes, line 84
84return e.charCodeAt(0)===46&&t.push(""),e.replace(r,function(a,o,l,u){t.push(l?u.replace(i,"$1"):o||a)}),t});return fd=n,fd}var hd,bg;function tA(){if(bg)return hd;bg=1;function s(r,i){for(var n=-1,e=r==null?0:r.length,t=Array(e);++n<e;)t[n]=i(r[n],n,r);return t}return hd=s,hd}var pd,Tg;function rA(){if(Tg)return pd;Tg=1;var s=Fo(),r=tA(),i=Xi(),n=ch(),e=s?s.prototype:void 0,t=e?e.toString:void 0;function a(o){if(typeof o=="string")return o;if(i(o))return r(o,a)+"";if(n(o))return t?t.call(o):"";var l=o+"";return l=="0"&&1/o==-1/0?"-0":l}return pd=a,pd}var md,Sg;function iA(){if(Sg)return md;Sg=1;var s=rA();function r(i){return i==null?"":s(i)}return md=r,md}var vd,xg;function N_(){if(xg)return vd;xg=1;var s=Xi(),r=dh(),i=eA(),n=iA();function e(t,a){return s(t)?t:r(t,a)?[t]:i(n(t))}return vd=e,vd}var gd,Eg;function Vo(){if(Eg)return gd;Eg=1;var s=ch();function r(i){if(typeof i=="string"||s(i))return i;var n=i+"";return n=="0"&&1/i==-1/0?"-0":n}return gd=r,gd}var yd,Cg;function B_(){if(Cg)return yd;Cg=1;var s=N_(),r=Vo();function i(n,e){e=s(e,n);for(var t=0,a=e.length;n!=null&&t<a;)n=n[r(e[t++])];return t&&t==a?n:void 0}return yd=i,yd}var _d,wg;function nA(){if(wg)return _d;wg=1;var s=B_();function r(i,n,e){var t=i==null?void 0:s(i,n);return t===void 0?e:t}return _d=r,_d}var bd,Ag;function aA(){if(Ag)return bd;Ag=1;function s(r,i){return r!=null&&i in Object(r)}return bd=s,bd}var Td,kg;function sA(){if(kg)return Td;kg=1;var s=N_(),r=w_(),i=Xi(),n=k_(),e=sh(),t=Vo();function a(o,l,u){l=s(l,o);for(var d=-1,f=l.length,m=!1;++d<f;){var x=t(l[d]);if(!(m=o!=null&&u(o,x)))break;o=o[x]}return m||++d!=f?m:(f=o==null?0:o.length,!!f&&e(f)&&n(x,f)&&(i(o)||r(o)))}return Td=a,Td}var Sd,Dg;function oA(){if(Dg)return Sd;Dg=1;var s=aA(),r=sA();function i(n,e){return n!=null&&r(n,e,s)}return Sd=i,Sd}var xd,Pg;function uA(){if(Pg)return xd;Pg=1;var s=O_(),r=nA(),i=oA(),n=dh(),e=R_(),t=F_(),a=Vo(),o=1,l=2;function u(d,f){return n(d)&&e(f)?t(a(d),f):function(m){var x=r(m,d);return x===void 0&&x===f?i(m,d):s(f,x,o|l)}}return xd=u,xd}var Ed,Ig;function lA(){if(Ig)return Ed;Ig=1;function s(r){return r}return Ed=s,Ed}var Cd,Lg;function cA(){if(Lg)return Cd;Lg=1;function s(r){return function(i){return i?.[r]}}return Cd=s,Cd}var wd,Mg;function dA(){if(Mg)return wd;Mg=1;var s=B_();function r(i){return function(n){return s(n,i)}}return wd=r,wd}var Ad,Og;function fA(){if(Og)return Ad;Og=1;var s=cA(),r=dA(),i=dh(),n=Vo();function e(t){return i(t)?s(n(t)):r(t)}return Ad=e,Ad}var kd,Rg;function hA(){if(Rg)return kd;Rg=1;var s=Qw(),r=uA(),i=lA(),n=Xi(),e=fA();function t(a){return typeof a=="function"?a:a==null?i:typeof a=="object"?n(a)?r(a[0],a[1]):s(a):e(a)}return kd=t,kd}var Dd,Fg;function pA(){if(Fg)return Dd;Fg=1;var s=V1(),r=nw(),i=hA(),n=Xi();function e(t,a){return function(o,l){var u=n(o)?s:r,d=a?a():{};return u(o,t,i(l,2),d)}}return Dd=e,Dd}var Pd,Ng;function mA(){if(Ng)return Pd;Ng=1;var s=q1(),r=pA(),i=r(function(n,e,t){s(n,t,e)});return Pd=i,Pd}var vA=mA();const gA=Gi(vA),yA="data:image/svg+xml,%3csvg%20id='Layer_2'%20enable-background='new%200%200%2064%2064'%20height='512'%20viewBox='0%200%2064%2064'%20width='512'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Close_8_'%3e%3cg%20id='Close_9_'%3e%3cg%20id='Sound_off_8_'%20opacity='.871'%3e%3cg%20id='Sound_On_10_'%3e%3cpath%20d='m5%2045.97v-27.94c0-7.2%205.83-13.03%2013.03-13.03h27.94c7.2%200%2013.03%205.83%2013.03%2013.03v27.94c0%207.2-5.83%2013.03-13.03%2013.03h-27.94c-7.2%200-13.03-5.83-13.03-13.03z'%20fill='%23f2c224'/%3e%3cpath%20d='m43.24%2055.41h-22.48c-6.95%200-12.61-5.66-12.61-12.61v-21.6c0-6.95%205.66-12.61%2012.61-12.61h22.47c6.95%200%2012.61%205.66%2012.61%2012.61v21.6c.01%206.95-5.65%2012.61-12.6%2012.61zm-22.48-44.82c-5.85%200-10.61%204.76-10.61%2010.61v21.6c0%205.85%204.76%2010.61%2010.61%2010.61h22.47c5.85%200%2010.61-4.76%2010.61-10.61v-21.6c0-5.85-4.76-10.61-10.61-10.61z'%20fill='%23fff'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3cg%20fill='%23fff'%3e%3cpath%20d='m23.6%2044.47c-1.09%201.09-2.98%201.09-4.06%200-.54-.54-.84-1.26-.84-2.03s.3-1.49.84-2.03l6.81-6.81-1.59-1.6-6.81%206.81c-2%202-2%205.24%200%207.24%201%201%202.31%201.5%203.62%201.5s2.62-.5%203.62-1.5l6.81-6.81-1.59-1.59z'/%3e%3cpath%20d='m40.4%2019.54c.54-.54%201.26-.84%202.03-.84s1.49.3%202.03.84c1.12%201.12%201.12%202.94%200%204.06l-6.81%206.81%201.59%201.59%206.81-6.81c2-2%202-5.24%200-7.24s-5.24-2-7.24%200l-6.81%206.81%201.59%201.59z'/%3e%3cpath%20d='m19.54%2023.6c-.54-.54-.84-1.26-.84-2.03s.3-1.49.84-2.03c1.09-1.09%202.98-1.09%204.06%200l6.81%206.81%201.59-1.59-6.81-6.81c-2-1.99-5.24-2-7.24%200-.97.97-1.5%202.25-1.5%203.62s.53%202.65%201.5%203.62l6.81%206.81%201.59-1.59z'/%3e%3cpath%20d='m39.24%2032-1.59%201.59%206.81%206.81c1.12%201.12%201.12%202.94%200%204.06-1.09%201.09-2.98%201.09-4.06%200l-6.81-6.81-1.59%201.59%206.81%206.81c1%201%202.31%201.5%203.62%201.5s2.62-.5%203.62-1.5c2-2%202-5.24%200-7.24z'/%3e%3cpath%20d='m36.53%2030.88h2.24v2.24h-2.24z'%20transform='matrix(.707%20-.707%20.707%20.707%20-11.6%2035.997)'/%3e%3cpath%20d='m30.88%2036.53h2.24v2.24h-2.24z'%20transform='matrix(.707%20-.707%20.707%20.707%20-17.251%2033.656)'/%3e%3cpath%20d='m25.23%2030.88h2.24v2.24h-2.24z'%20transform='matrix(.707%20-.707%20.707%20.707%20-14.91%2028.005)'/%3e%3cpath%20d='m30.88%2025.23h2.24v2.24h-2.24z'%20transform='matrix(.707%20-.707%20.707%20.707%20-9.259%2030.347)'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",_A="data:image/svg+xml,%3csvg%20id='Capa_1'%20enable-background='new%200%200%20512%20512'%20height='512'%20viewBox='0%200%20512%20512'%20width='512'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%3e%3ccircle%20cx='256'%20cy='208.43'%20fill='%23ff4f6b'%20r='208.43'/%3e%3cpath%20d='m422.328%20298.783h-332.656c-6.935%200-13.263%202.583-18.087%206.834%2034.934%2066.151%20104.403%20111.243%20184.415%20111.243s149.481-45.092%20184.415-111.243c-4.824-4.25-11.152-6.834-18.087-6.834z'%20fill='%23fb2b3a'/%3e%3ccircle%20cx='256'%20cy='208.43'%20fill='%23fff'%20r='177.525'/%3e%3cg%3e%3cpath%20d='m103.247%20298.783c30.9
846%2052.142%2087.838%2087.172%20152.753%2087.172s121.793-35.029%20152.753-87.172z'%20fill='%23f9f7f8'/%3e%3cpath%20d='m422.329%20512h-332.658c-15.12%200-27.377-12.257-27.377-27.377v-127.557c0-15.12%2012.257-27.377%2027.377-27.377h332.657c15.12%200%2027.377%2012.257%2027.377%2027.377v127.557c.001%2015.12-12.256%2027.377-27.376%2027.377z'%20fill='%23ff4f6b'/%3e%3cpath%20d='m422.328%20329.689h-30.905c15.12%200%2027.377%2012.257%2027.377%2027.377v127.557c0%2015.12-12.257%2027.377-27.377%2027.377h30.905c15.12%200%2027.377-12.257%2027.377-27.377v-127.557c.001-15.12-12.256-27.377-27.377-27.377z'%20fill='%23fb2b3a'/%3e%3cg%20fill='%23fff'%3e%3cpath%20d='m153.474%20465.61c-.015%200-.029%200-.044%200-8.696.048-21.202.096-29.054.088v-97.434c0-4.268-3.459-7.726-7.726-7.726-4.268%200-7.726%203.459-7.726%207.726v105.072c0%203.764%202.711%206.98%206.421%207.616.549.094%201.185.203%2012.588.203%205.558%200%2013.676-.026%2025.586-.093%204.267-.024%207.707-3.502%207.683-7.77-.027-4.252-3.482-7.682-7.728-7.682z'/%3e%3cpath%20d='m194.539%20360.537c-4.268%200-7.726%203.459-7.726%207.726v105.161c0%204.268%203.459%207.726%207.726%207.726%204.268%200%207.726-3.459%207.726-7.726v-105.16c.001-4.268-3.458-7.727-7.726-7.727z'/%3e%3cpath%20d='m395.351%20465.218h-36.18v-36.648h32.943c4.268%200%207.726-3.459%207.726-7.726s-3.459-7.726-7.726-7.726h-32.943v-36.648h36.18c4.268%200%207.726-3.459%207.726-7.726s-3.459-7.726-7.726-7.726h-43.906c-4.268%200-7.726%203.459-7.726%207.726v104.201c0%204.268%203.459%207.726%207.726%207.726h43.906c4.268%200%207.726-3.459%207.726-7.726s-3.458-7.727-7.726-7.727z'/%3e%3cpath%20d='m312.815%20361.125c-4.045-1.346-8.423.846-9.768%204.896l-29.362%2088.386-30.782-88.677c-1.398-4.032-5.803-6.171-9.832-4.766-4.031%201.399-6.165%205.801-4.766%209.832l35.973%20103.636c1.431%204.026%205.249%206.718%209.517%206.718h.068c4.296-.029%208.111-2.781%209.511-6.899l34.336-103.359c1.347-4.049-.846-8.422-4.895-9.767z'/%3e%3c/g%3e%3c/g%3e%3cpath%20d='m216.716%20266.571v-116.282c0-11.777%2013.401-18.543%2022.877-11.551l78.799%2058.141c7.776%205.737%207.776%2017.364%200%2023.102l-78.799%2058.141c-9.476%206.992-22.877.226-22.877-11.551z'%20fill='%23ff4f6b'/%3e%3cpath%20d='m318.393%20196.879-78.799-58.141c-8.038-5.931-18.894-1.962-22.007%206.565%2042.497%2031.356%2042.497%2094.897%200%20126.252%203.113%208.527%2013.97%2012.496%2022.007%206.565l78.799-58.141c7.776-5.736%207.776-17.362%200-23.1z'%20fill='%23fb2b3a'/%3e%3c/g%3e%3c/svg%3e",bA={key:0,class:"live-event-container"},TA={class:"live-event-title-section"},SA=["src"],xA=Si({__name:"LiveEventStream",setup(s){const r=He(!1),i=He(!1),n=He({playsinline:!0,autoplay:!0,controls:!0,techOrder:["AmazonIVS"],fluid:!0,responsive:!0,liveui:!0,disablePictureInPicture:!1,enableDocumentPictureInPicture:!0,controlBar:{liveDisplay:!0,pictureInPictureToggle:!0}}),e=ab(),{minimize:t,liveEventPlaybackUrl:a}=un(e),o=df(),l=()=>{t.value&&a.value?o.register({id:"live-event",icon:_A,action:function(){F()},priority:80}):o.unregister("live-event")};Va(()=>t.value,()=>{l()},{immediate:!0}),Va(()=>a.value,()=>{l()},{immediate:!0});const u=sr(()=>!!a.value),d=sr(()=>i.value),f=sr(()=>a.value);let m=null;const x=He(null),C=O=>`${window.location.origin}${O}`,L=()=>{bm.registerIVSTech(ae,{wasmWorker:C("/assets/amazon-ivs-wasmworker.min.js"),wasmBinary:C("/assets/amazon-ivs-wasmworker.min.wasm")}),bm.registerIVSQualityPlugin(ae)};let E;const B=He(),q=async()=>{sb().initialSocket()},z=()=>{L(),x.value&&(m?m.src(f.value):m=ae(x.value,n.value,()=>{m.enableIVSQualityPlugin(),m.on("loadedmetadata",A=>{if(H){B.value=H.getQualities();let D=gA(B.value,"name");D["720p"]&&H.setAutoMaxQuality(D["720p"])}}),m.on("enterpictureinpicture",A=>{i.value=!0}),m.on("leavepictureinpicture",A=>{i.value=!1});const O=m.getIVSEvents(),H=m.getIVSPlayer();H.setAutoplay(!0),H.setRebufferToLive(!0),H.addEventListener(O.PlayerState.IDLE,()=>{E&&clearTimeout(E)}),H.addEventListener(O.PlayerState.READY,()=>{}),H.addEventListener(O.PlayerState.PLAYING,A=>{E&&clearTimeout(E),r.value=!0}),H.addEventListener(O.PlayerEventType.ERROR,A=>{r.value=!1,A.type===O.ErrorType.NOT_AVAILABLE&&(E=setTimeout(()=>{m.src(f.value)},10*1e3)),A.type===O.ErrorType.NETWORK&&(E=setTimeout(()=>{m.src(f.value)},10*1e3))}),H.addEventListener(O.PlayerEventType.REBUFFERING,A=>{}),m.src(f.value)}))};Va(()=>f.value,(O,H)=>{!H&&O&&As(()=>{z()}),H&&!O&&As(()=>{m&&(m.dispose(),m=null)})});const U=()=>
84{e.setMinimize(!0),As(()=>{G()})},F=()=>{e.setMinimize(!1),As(()=>{z()})},G=()=>{m&&(m.dispose(),m=null)};return qi(()=>{z(),q()}),cf(()=>{o.unregister("live-event"),G()}),(O,H)=>Se(u)?(Me(),qe(vi,{key:0},[Se(t)?dt("",!0):X_((Me(),qe("div",bA,[_e("div",TA,[dt("",!0)]),_e("div",{class:"live-event-close-button",onClick:U},[_e("img",{src:Se(yA),class:"live-event-close-button-icon",alt:"close live event"},null,8,SA)]),_e("video",{id:"video-player",ref_key:"videoPlayer",ref:x,class:"video-js vjs-big-play-centered"},null,512)],512)),[[Y_,!Se(d)]])],64)):dt("",!0)}}),EA=Object.assign(xA,{__name:"LiveEventStream"}),CA=Q_("/images/button-icon/icn-ufa-slot.gif"),wA={key:0,class:"minimize-icon-container"},AA={class:"omni-chat-icon"},kA={class:"omni-chat-badge"},DA=["onClick"],PA=["src"],IA={key:0,class:"minimize-icon-container"},LA=["src"],MA={class:"minimize-icon-container"},OA=Si({__name:"FloatingButton",setup(s){const{locale:r}=yo(),i=Mn(),{unreadCount:n,isChatOpen:e,openChat:t}=J_(),a=df(),{list:o}=un(a),l=za(),{isShowGridMenuButton:u}=un(l),d=He(!1),f=sr(()=>r.value==="th"?"/images/predict-champion/predict-champion-floating-th.gif":"/images/predict-champion/predict-champion-floating-en.gif"),m=L=>{L.action&&typeof L.action=="function"&&L.action()},x=()=>{i.push({name:Xt.PREDICT_CHAMPION})},C=async()=>{const L=window.open("/basic/url-redirect","_blank");if(L)try{const{url:E,errorCode:B,errorMessage:q}=await Z_.getGameSiteUrl("ufaslot");E?L.location.href="/basic/url-redirect?url="+encodeURIComponent(E):L.location.href="/basic/url-redirect?errorCode="+encodeURIComponent(B||"")+"&errorMessage="+encodeURIComponent(q||"")}catch{L.location.href="/basic/url-redirect?errorCode=500&errorMessage="+encodeURIComponent("Something went wrong")}};return(L,E)=>(Me(),qe(vi,null,[Yt(Ld,{name:"chat-bubble-pop"},{default:Ni(()=>[Se(n)>0&&!Se(e)?(Me(),qe("div",wA,[_e("div",{class:"minimize-view-button omni-chat-bubble cursor-pointer",style:{"margin-bottom":"0px"},onClick:E[0]||(E[0]=(...B)=>Se(t)&&Se(t)(...B))},[_e("div",AA,[E[1]||(E[1]=_e("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_e("circle",{cx:"16",cy:"16",r:"16",fill:"#6366f1"}),_e("path",{d:"M8 11a2 2 0 012-2h12a2 2 0 012 2v8a2 2 0 01-2 2H12l-4 3v-3a2 2 0 01-2-2v-8z",fill:"white"})],-1)),_e("span",kA,At(Se(n)>9?"9+":Se(n)),1)])])])):dt("",!0)]),_:1}),(Me(!0),qe(vi,null,wn(Se(o),(B,q)=>(Me(),qe("div",{key:B.id,class:"minimize-icon-container"},[_e("div",{class:"minimize-view-button cursor-pointer",style:ln({"margin-bottom":`${(q+(Se(n)>0&&!Se(e)?1:0))*85}px`}),onClick:z=>m(B)},[_e("img",{src:B.icon,alt:"show live event"},null,8,PA)],12,DA)]))),128)),Se(d)&&Se(u)(Se(zr).PREDICT_CHAMPION)?(Me(),qe("div",IA,[_e("div",{class:"minimize-view-button predict-champion-button cursor-pointer",style:ln({"margin-bottom":`${(Se(o).length+(Se(n)>0&&!Se(e)?1:0))*85}px`}),onClick:x},[_e("img",{src:Se(f),alt:"predict champion"},null,8,LA)],4)])):dt("",!0),_e("div",MA,[_e("div",{class:"minimize-view-button cursor-pointer",style:ln({"margin-bottom":`${(Se(o).length+(Se(d)&&Se(u)(Se(zr).PREDICT_CHAMPION)?1:0)+(Se(n)>0&&!Se(e)?1:0))*85}px`}),onClick:C},E[2]||(E[2]=[_e("img",{src:CA,alt:"ufa slot"},null,-1)]),4)])],64))}}),RA=Object.assign(xi(OA,[["__scopeId","data-v-0b19fb0d"]]),{__name:"FloatingButton"}),FA={class:"absolute top-0 left-0 h-full w-full px-3"},NA={class:"absolute top-0 left-0 h-full w-full flex justify-center items-center"},BA=["src"],UA={class:"text-[#FBDEB2] mt-2 py-1 text-center text-xs line-clamp-2"},qA=Si({__name:"CustomButtonHome",props:{iconSrc:{default:""},labelName:{default:"Button"},menuName:{default:null},activeTab:{default:"profile"},fullIcon:{type:Boolean,default:!1},noBackground:{type:Boolean,default:!1}},emits:["click"],setup(s,{emit:r}){const{locale:i}=yo(),n=s,e=r,t=()=>{const a=n.menuName;if(a){const o=Mn();a===Xt.PROFILES?o.push({name:Xt.PROFILES,query:{activeTab:n.activeTab}}):o.push({name:a})}else e("click")};return(a,o)=>(Me(),qe("div",{class:"w-full cursor-pointer relative pb-[130%]",onClick:Xs(t,["stop"])},[_e("div",FA,[_e("div",{class:gi(["flex flex-shrink-0 items-center justify-center relative w-full pb-[100%]",{buttonBox:!a.noBackgroun
84d}])},[_e("div",NA,[_e("div",{class:gi(a.fullIcon?"w-full h-full":"w-[50%] h-[50%]")},[_e("img",{class:"w-full h-full",style:{"object-fit":"contain"},src:a.iconSrc,alt:"icn",onClick:Xs(t,["stop"])},null,8,BA)],2)])],2),_e("div",UA,At(a.labelName),1),eb(a.$slots,"overlay",{},void 0,!0)])]))}}),VA=Object.assign(xi(qA,[["__scopeId","data-v-138f483e"]]),{__name:"CustomButtonHome"}),HA=Si({__name:"UNewsQuizGetReward",setup(s){const r=He(!1),i=He(0),n=He(""),e=Mn();async function t(){try{const o=await Vi.uNewsQuizUserUnClaimReward();if(o.succ&&o.data){const l=o.data;l.totalReward>0&&(r.value=!0,i.value=l.rewards[0]?.ucoinAmount??0,n.value=l.rewards[0]?.rewardId??"")}}catch{}}async function a(){r.value=!1,await Vi.uNewsQuizUserClaimReward(n.value),await e.push({path:"/"+ea.REWARDS_HISTORY,query:{tab:"earning"}})}return qi(()=>{t()}),(o,l)=>{const u=Kg;return Me(),ii(u,{modelValue:Se(r),"onUpdate:modelValue":l[0]||(l[0]=d=>Ys(r)?r.value=d:null),type:"success",title:o.$t("unewsQuiz.getReward.title"),message:o.$t("unewsQuiz.getReward.description",{amount:("numberWithCommasIgnoreDecimal"in o?o.numberWithCommasIgnoreDecimal:Se(Wg))(Se(i))}),"confirm-label":o.$t("unewsQuiz.getReward.btn.ok"),dismissible:!1,onConfirm:a},null,8,["modelValue","title","message","confirm-label"])}}}),jA=Object.assign(HA,{__name:"UNewsQuizGetReward"}),GA=Si({__name:"UNewsTournamentGetReward",setup(s){const r=He(!1),i=He(0),n=Mn();async function e(){try{const a=await Vi.uNewsTournamentUserUnClaimReward();if(a.succ&&a.data){const o=a.data;o.totalReward>0&&o.totalPrize>0&&(r.value=!0,i.value=o.totalPrize)}}catch{}}async function t(){r.value=!1,await Vi.uNewsTournamentUserClaimReward(),await n.push({path:"/"+ea.REWARDS_HISTORY,query:{tab:"earning"}})}return qi(()=>{e()}),(a,o)=>{const l=Kg;return Me(),ii(l,{modelValue:Se(r),"onUpdate:modelValue":o[0]||(o[0]=u=>Ys(r)?r.value=u:null),type:"success",title:a.$t("unewsTournament.getReward.title"),message:a.$t("unewsTournament.getReward.description",{amount:("numberWithCommasIgnoreDecimal"in a?a.numberWithCommasIgnoreDecimal:Se(Wg))(Se(i))}),"confirm-label":a.$t("unewsTournament.getReward.btn.ok"),dismissible:!1,onConfirm:t},null,8,["modelValue","title","message","confirm-label"])}}}),WA=Object.assign(GA,{__name:"UNewsTournamentGetReward"});class U_{static async getCardBalance(){try{const r=await Vi.getPredictionCampaignCardBalance();return r.succ&&r.data?r.data:null}catch{return null}}static async getGlobalSettings(r){try{const i=await Vi.getPredictionCampaignGlobalSettings(r);return i.succ&&i.data?i.data.predictionCampaign:null}catch{return null}}}const q_=He(null),V_=He(null),Wa=He(null);async function zA(s){Wa.value=(async()=>{q_.value=await U_.getGlobalSettings(s),V_.value=s})();try{await Wa.value}finally{Wa.value=null}}async function $A(s){Wa.value&&await Wa.value,V_.value!==s&&await zA(s)}function H_(){return{campaign:q_,ensureLoaded:$A}}const KA=["src"],XA={class:"absolute inset-0 flex flex-col items-center justify-center px-4"},YA={class:"translate-x-[10%] w-full"},QA={class:"text-center text-[10pt] font-normal leading-[100%]"},JA={class:"text-white"},ZA={class:"text-[#FFD77F]"},ek={class:"flex items-end justify-center gap-2 mt-2"},tk={class:"flex flex-col items-center"},rk={class:"pc-wc-num tabular-nums"},ik={class:"pc-wc-unit"},nk={class:"flex flex-col items-center"},ak={class:"pc-wc-num tabular-nums"},sk={class:"pc-wc-unit"},ok={class:"flex flex-col items-center"},uk={class:"pc-wc-num tabular-nums"},lk={class:"pc-wc-unit"},ck={class:"flex flex-col items-center"},dk={class:"pc-wc-num tabular-nums"},fk={class:"pc-wc-unit"},hk={key:1,class:"relative w-[95%]"},pk=["src"],mk={class:"absolute inset-0 flex items-center pl-[20%] pr-[26%] sm:pr-[24%]"},vk={class:"flex flex-1 flex-col items-start"},gk={class:"ml-8 pc-wcb-grad-1 whitespace-nowrap"},yk={class:"ml-8 mt-1 flex items-baseline gap-1"},_k={class:"pc-wcb-grad-2 tabular-nums"},bk={class:"pc-wcb-grad-3"},Tk=["src"],Sk=Si({__name:"Countdown",setup(s){const r=Mn(),{locale:i}=yo(),{nowMs:n,ensureSynced:e}=ob(),{campaign:t,ensureLoaded:a}=H_(),o=sr(()=>i.value==="th"?"/images/predict-champion/predict-champion-th-submit.avif":"/images/predict-champion/predict-champion-en-submit.avif"),l=za(),{isShowGridMenuButton:u}=un(l),d=()=>{r.push({name:Xt.PREDICT_CHAMPION})},f=He(0);async function m(){const F=await U_.getCardBalance();F&&(f.value=F.balance)}async function x(){const F=i.value==="th"?"th":"en";await a(F)}const C=sr(()=>{const F=t.value?.eventStartAt;return F?new Date(F).getTime():null}),L=He(n()),E=sr(()=>!t.value?.enable||!C.value?!1:L.value<C.value),B=F=>String(F).padStart(2,"0"),q=tb({dd:"00",hh:"00",mm:"00",ss:"00"});function z(){if(L.value=n(),!C.value){Object.assign(q,{dd:"00",hh:"00",mm:"00",ss:"00"});return}const F=C.value-L.value;if(F<=0){Object.assign(q,{dd:"00",hh:"00",mm:"00",ss:"00"});return}q.dd=B(Math.floor(F/864e5)),q.hh=B(Math.floor(F%864e5/36e5)),q.mm=B(Math.floor(F%36e5/6e4)),q.ss=B(Math.floor(F%6e4/1e3))}let U=null;return qi(async()=>{m(),await Promise.all([x(),e()]),z(),U=$g(z,1e3)}),cf(()=>{U&&clearInterval(U)}),(F,G)=>(Me(),qe(vi,null,[Se(E)&&Se(u)(Se(zr).PREDICT_CHAMPION)?(Me(),qe("div",{key:0,class:"relative w-[95%] cursor-pointer",onClick:d},[_e("img",{src:Se(t)?.banners.countdown.imageUrl,alt:"",class:"block h-auto w-full object-cover"},null,8,KA),_e("div",XA,[_e("div",YA,[_e("div",QA,[_e("span",JA,At(Se(t)?.banners.countdown.title),1),_e("span",ZA,At(Se(t)?.banners.countdown.event),1)]),_e("div",ek,[_e("div",tk,[_e("div",rk,At(Se(q).dd),1),_e("div",ik,At(F.$t("predictChampion.countdown.days")),1)]),G[0]||(G[0]=du('<div class="flex flex-col items-center" data-v-53601785><div class="pc-wc-colon" data-v-53601785><span class="pc-wc-dot" data-v-53601785></span><span class="pc-wc-dot" data-v-53601785></span></div><div class="pc-wc-unit invisible" data-v-53601785>:</div></div>',1)),_e("div",nk,[_e("div",ak,At(Se(q).hh),1),_e("div",sk,At(F.$t("predictChampion.countdown.hour")),1)]),G[1]||(G[1]=du('<div class="flex flex-col items-center" data-v-53601785><div class="pc-wc-colon" data-v-53601785><span class="pc-wc-dot" data-v-53601785></span><span class="pc-wc-dot" data-v-53601785></span></div><div class="pc-wc-unit invisible" data-v-53601785>:</div></div>',1)),_e("div",ok,[_e("div",uk,At(Se(q).mm),1),_e("div",lk,At(F.$t("predictChampion.countdown.min")),1)]),G[2]||(G[2]=du('<div class="flex flex-col items-center" data-v-53601785><div class="pc-wc-colon" data-v-53601785><span class="pc-wc-dot" data-v-53601785></span><span class="pc-wc-dot" data-v-53601785></span></div><div class="pc-wc-unit invisible" data-v-53601785>:</div></div>
84',1)),_e("div",ck,[_e("div",dk,At(Se(q).ss),1),_e("div",fk,At(F.$t("predictChampion.countdown.sec")),1)])])])])])):dt("",!0),!Se(E)&&Se(u)(Se(zr).PREDICT_CHAMPION)&&Se(t)?.enable?(Me(),qe("div",hk,[_e("img",{src:Se(t)?.banners.countdown.imageUrl,alt:"",class:"block w-full h-auto select-none"},null,8,pk),_e("div",mk,[_e("div",vk,[_e("div",gk,At(F.$t("predictChampion.remainingCards")),1),_e("div",yk,[_e("span",_k,At(("numberWithCommas"in F?F.numberWithCommas:Se(rb))(Se(f))),1),_e("span",bk,At(F.$t("predictChampion.cardUnit")),1)])])]),_e("button",{type:"button",class:"absolute right-5 bottom-5 cursor-pointer hover:brightness-110 active:brightness-95 transition",onClick:d},[_e("img",{src:("getPublicUrl"in F?F.getPublicUrl:Se(Kt))(Se(o)),alt:"",class:"block h-auto w-[100px] object-contain"},null,8,Tk)])])):dt("",!0)],64))}}),xk=Object.assign(xi(Sk,[["__scopeId","data-v-53601785"]]),{__name:"Countdown"});var Zn=function(){return Zn=Object.assign||function(s){for(var r,i=1,n=arguments.length;i<n;i++)for(var e in r=arguments[i])Object.prototype.hasOwnProperty.call(r,e)&&(s[e]=r[e]);return s},Zn.apply(this,arguments)};function j_(s,r,i){for(var n,e=0,t=r.length;e<t;e++)!n&&e in r||(n||(n=Array.prototype.slice.call(r,0,e)),n[e]=r[e]);return s.concat(n||Array.prototype.slice.call(r))}function Bg(s){return Array.prototype.slice.call(s)}function Ug(s,r){var i=Math.floor(s);return i===r||i+1===r?s:r}function qg(){return Date.now()}function Id(s,r,i){if(r="data-keen-slider-"+r,i===null)return s.removeAttribute(r);s.setAttribute(r,i||"")}function go(s,r){return r=r||document,typeof s=="function"&&(s=s(r)),Array.isArray(s)?s:typeof s=="string"?Bg(r.querySelectorAll(s)):s instanceof HTMLElement?[s]:s instanceof NodeList?Bg(s):[]}function Oa(s){s.raw&&(s=s.raw),s.cancelable&&!s.defaultPrevented&&s.preventDefault()}function Ra(s){s.raw&&(s=s.raw),s.stopPropagation&&s.stopPropagation()}function G_(){var s=[];return{add:function(r,i,n,e){r.addListener?r.addListener(n):r.addEventListener(i,n,e),s.push([r,i,n,e])},input:function(r,i,n,e){this.add(r,i,(function(t){return function(a){a.nativeEvent&&(a=a.nativeEvent);var o=a.changedTouches||[],l=a.targetTouches||[],u=a.detail&&a.detail.x?a.detail:null;return t({id:u?u.identifier?u.identifier:"i":l[0]?l[0]?l[0].identifier:"e":"d",idChanged:u?u.identifier?u.identifier:"i":o[0]?o[0]?o[0].identifier:"e":"d",raw:a,x:u&&u.x?u.x:l[0]?l[0].screenX:u?u.x:a.pageX,y:u&&u.y?u.y:l[0]?l[0].screenY:u?u.y:a.pageY})}})(n),e)},purge:function(){s.forEach((function(r){r[0].removeListener?r[0].removeListener(r[2]):r[0].removeEventListener(r[1],r[2],r[3])})),s=[]}}}function fh(s,r,i){return Math.min(Math.max(s,r),i)}function ri(s){return(s>0?1:0)-(s<0?1:0)||+s}function Vg(s){var r=s.getBoundingClientRect();return{height:Ug(r.height,s.offsetHeight),width:Ug(r.width,s.offsetWidth)}}function _r(s,r,i,n){var e=s&&s[r];return e==null?i:n&&typeof e=="function"?e():e}function Wr(s){return Math.round(1e6*s)/1e6}function Ek(s){var r,i,n,e,t,a;function o(m){a||(a=m),l(!0);var x=m-a;x>n&&(x=n);var C=e[i];if(C[3]<x)return i++,o(m);var L=C[2],E=C[4],B=C[0],q=C[1]*(0,C[5])(E===0?1:(x-L)/E);if(q&&s.track.to(B+q),x<n)return d();a=null,l(!1),u(null),s.emit("animationEnded")}function l(m){r.active=m}function u(m){r.targetIdx=m}function d(){var m;m=o,t=window.requestAnimationFrame(m)}function f(){var m;m=t,window.cancelAnimationFrame(m),l(!1),u(null),a&&s.emit("animationStopped"),a=null}return r={active:!1,start:function(m){if(f(),s.track.details){var x=0,C=s.track.details.position;i=0,n=0,e=m.map((function(L){var E,B=Number(C),q=(E=L.earlyExit)!==null&&E!==void 0?E:L.duration,z=L.easing,U=L.distance*z(q/L.duration)||0;C+=U;var F=n;return n+=q,x+=U,[B,L.distance,F,n,L.duration,z]})),u(s.track.distToIdx(x)),d(),s.emit("animationStarted")}},stop:f,targetIdx:null}}function Ck(s){var r,i,n,e,t,a,o,l,u,d,f,m,x,C,L=1/0,E=[],B=null,q=0;function z(ne){X(q+ne)}function U(ne){var se=F(q+ne).abs;return H(se)?se:null}function F(ne){var se=Math.floor(Math.abs(Wr(ne/i))),ue=Wr((ne%i+i)%i);ue===i&&(ue=0);var oe=ri(ne),te=o.indexOf(j_([],o).reduce((function(re,ce){return Math.abs(ce-ue)<Math.abs(re-ue)?ce:re}
vendor: 7,313 bytes, line 84
84))),le=te;return oe<0&&se++,te===a&&(le=0,se+=oe>0?1:-1),{abs:le+se*a*oe,origin:te,rel:le}}function G(ne,se,ue){var oe;if(se||!D())return O(ne,ue);if(!H(ne))return null;var te=F(ue??q),le=te.abs,re=ne-te.rel,ce=le+re;oe=O(ce);var be=O(ce-a*ri(re));return(be!==null&&Math.abs(be)<Math.abs(oe)||oe===null)&&(oe=be),Wr(oe)}function O(ne,se){if(se==null&&(se=Wr(q)),!H(ne)||ne===null)return null;ne=Math.round(ne);var ue=F(se),oe=ue.abs,te=ue.rel,le=ue.origin,re=j(ne),ce=(se%i+i)%i,be=o[le],Pe=Math.floor((ne-(oe-te))/a)*i;return Wr(be-ce-be+o[re]+Pe+(le===a?i:0))}function H(ne){return A(ne)===ne}function A(ne){return fh(ne,u,d)}function D(){return e.loop}function j(ne){return(ne%a+a)%a}function X(ne){var se;se=ne-q,E.push({distance:se,timestamp:qg()}),E.length>6&&(E=E.slice(-6)),q=Wr(ne);var ue=J().abs;if(ue!==B){var oe=B!==null;B=ue,oe&&s.emit("slideChanged")}}function J(ne){var se=ne?null:(function(){if(a){var ue=D(),oe=ue?(q%i+i)%i:q,te=(ue?q%i:q)-t[0][2],le=0-(te<0&&ue?i-Math.abs(te):te),re=0,ce=F(q),be=ce.abs,Pe=ce.rel,Re=t[Pe][2],ge=t.map((function(De,Qe){var Oe=le+re;(Oe<0-De[0]||Oe>1)&&(Oe+=(Math.abs(Oe)>i-1&&ue?i:0)*ri(-Oe));var ot=Qe-Pe,vt=ri(ot),ut=ot+be;ue&&(vt===-1&&Oe>Re&&(ut+=a),vt===1&&Oe<Re&&(ut-=a),f!==null&&ut<f&&(Oe+=i),m!==null&&ut>m&&(Oe-=i));var it=Oe+De[0]+De[1],tt=Math.max(Oe>=0&&it<=1?1:it<0||Oe>1?0:Oe<0?Math.min(1,(De[0]+Oe)/De[0]):(1-Oe)/De[0],0);return re+=De[0]+De[1],{abs:ut,distance:e.rtl?-1*Oe+1-De[0]:Oe,portion:tt,size:De[0]}}));return be=A(be),Pe=j(be),{abs:A(be),length:n,max:C,maxIdx:d,min:x,minIdx:u,position:q,progress:ue?oe/i:q/n,rel:Pe,slides:ge,slidesLength:i}}})();return r.details=se,s.emit("detailsChanged"),se}return r={absToRel:j,add:z,details:null,distToIdx:U,idxToDist:G,init:function(ne){if((function(){if(e=s.options,t=(e.trackConfig||[]).map((function(te){return[_r(te,"size",1),_r(te,"spacing",0),_r(te,"origin",0)]})),a=t.length){i=Wr(t.reduce((function(te,le){return te+le[0]+le[1]}),0));var ue,oe=a-1;n=Wr(i+t[0][2]-t[oe][0]-t[oe][2]-t[oe][1]),o=t.reduce((function(te,le){if(!te)return[0];var re=t[te.length-1],ce=te[te.length-1]+(re[0]+re[2])+re[1];return ce-=le[2],te[te.length-1]>ce&&(ce=te[te.length-1]),ce=Wr(ce),te.push(ce),(!ue||ue<ce)&&(l=te.length-1),ue=ce,te}),null),n===0&&(l=0),o.push(Wr(i))}})(),!a)return J(!0);var se;(function(){var ue=s.options.range,oe=s.options.loop;f=u=oe?_r(oe,"min",-1/0):0,m=d=oe?_r(oe,"max",L):l;var te=_r(ue,"min",null),le=_r(ue,"max",null);te!==null&&(u=te),le!==null&&(d=le),x=u===-1/0?u:s.track.idxToDist(u||0,!0,0),C=d===L?d:G(d,!0,0),le===null&&(m=d),_r(ue,"align",!1)&&d!==L&&t[j(d)][2]===0&&(C-=1-t[j(d)][0],d=U(C-q)),x=Wr(x),C=Wr(C)})(),se=ne,Number(se)===se?z(O(A(ne))):J()},to:X,velocity:function(){var ne=qg(),se=E.reduce((function(ue,oe){var te=oe.distance,le=oe.timestamp;return ne-le>200||(ri(te)!==ri(ue.distance)&&ue.distance&&(ue={distance:0,lastTimestamp:0,time:0}),ue.time&&(ue.distance+=te),ue.lastTimestamp&&(ue.time+=le-ue.lastTimestamp),ue.lastTimestamp=le),ue}),{distance:0,lastTimestamp:0,time:0});return se.distance/se.time||0}}}function wk(s){var r,i,n,e,t,a,o,l;function u(B){return 2*B}function d(B){return fh(B,o,l)}function f(B){return 1-Math.pow(1-B,3)}function m(){return n?s.track.velocity():0}function x(){E();var B=s.options.mode==="free-snap",q=s.track,z=m();e=ri(z);var U=s.track.details,F=[];if(z||!B){var G=C(z),O=G.dist,H=G.dur;if(H=u(H),O*=e,B){var A=q.idxToDist(q.distToIdx(O),!0);A&&(O=A)}F.push({distance:O,duration:H,easing:f});var D=U.position,j=D+O;if(j<t||j>a){var X=j<t?t-D:a-D,J=0,ne=z;if(ri(X)===e){var se=Math.min(Math.abs(X)/Math.abs(O),1),ue=(function(le){return 1-Math.pow(1-le,1/3)})(se)*H;F[0].earlyExit=ue,ne=z*(1-se)}else F[0].earlyExit=0,J+=X;var oe=C(ne,100),te=oe.dist*e;s.options.rubberband&&(F.push({distance:te,duration:u(oe.dur),easing:f}),F.push({distance:-te+J,duration:500,easing:f}))}s.animator.start(F)}else s.moveToIdx(d(U.abs),!0,{duration:500,easing:function(le){return 1+--le*le*le*le*le}})}function C(B,q){q===void 0&&(q=1e3);var z=147e-9+(B=Math.abs(B))/q;return{dist:Math.pow(B,2)/z,dur:B/z}}function L(){var B=s.track.details;B&&(t=B.min,a=B.max,o=B.minIdx,l=B.maxIdx)}function E(){s.animator.stop()}s.on("updated",L),s.on("optionsChanged",L),s.on("created",L),s.on("dragStarted",(function(){n=!1,E(),r=i=s.track.details.abs})),s.on("dragChecked",(function(){n=!0})),s.on("dragEnded",(function(){var B=s.options.mode;B==="snap"&&(function(){var q=s.track,z=s.track.details,U=z.position,F=ri(m());(U>a||U<t)&&(F=0);var G=r+F;z.slides[q.absToRel(G)].portion===0&&(G-=F),r!==i&&(G=i),ri(q.idxToDist(G,!0))!==F&&(G+=F),G=d(G);var O=q.idxToDist(G,!0);s.animator.start([{distance:O,duration:500,easing:function(H){return 1+--H*H*H*H*H}}])})(),B!=="free"&&B!=="free-snap"||x()})),s.on("dragged",(function(){i=s.track.details.abs}))}function Ak(s){var r,i,n,e,t,a,o,l,u,d,f,m,x,C,L,E,B,q,z=G_();function U(J){if(a&&l===J.id){var ne=H(J);if(u){if(!O(J))return G(J);d=ne,u=!1,s.emit("dragChecked")}if(E)return d=ne;Oa(J);var se=(function(oe){if(B===-1/0&&q===1/0)return oe;var te=s.track.details,le=te.length,re=te.position,ce=fh(oe,B-re,q-re);if(le===0)return 0;if(!s.options.rubberband)return ce;if(re<=q&&re>=B||re<B&&i>0||re>q&&i<0)return oe;var be=(re<B?re-B:re-q)/le,Pe=e*le,Re=Math.abs(be*Pe),ge=Math.max(0,1-Re/t*2);return ge*ge*oe})(o(d-ne)/e*n);i=ri(se);var ue=s.track.details.position;(ue>B&&ue<q||ue===B&&i>0||ue===q&&i<0)&&Ra(J),f+=se,!m&&Math.abs(f*e)>5&&(m=!0),s.track.add(se),d=ne,s.emit("dragged")}}function F(J){!a&&s.track.details&&s.track.details.length&&(f=0,a=!0,m=!1,u=!0,l=J.id,O(J),d=H(J),s.emit("dragStarted"))}function G(J){a&&l===J.idChanged&&(a=!1,s.emit("dragEnded"))}function O(J){var ne=A(),se=ne?J.y:J.x,ue=ne?J.x:J.y,oe=x!==void 0&&C!==void 0&&Math.abs(C-ue)<=Math.abs(x-se);return x=se,C=ue,oe}function H(J){return A()?J.y:J.x}function A(){return s.options.vertical}function D(){e=s.size,t=A()?window.innerHeight:window.innerWidth;var J=s.track.details;J&&(B=J.min,q=J.max)}function j(J){m&&(Ra(J),Oa(J))}function X(){if(z.purge(),s.options.drag&&!s.options.disabled){var J;J=s.options.dragSpeed||1,o=typeof J=="function"?J:function(se){return se*J},n=s.options.rtl?-1:1,D(),r=s.container,(function(){var se="data-keen-slider-clickable";go("[".concat(se,"]:not([").concat(se,"=false])"),r).map((function(ue){z.add(ue,"dragstart",Ra),z.add(ue,"mousedown",Ra),z.add(ue,"touchstart",Ra)}))})(),z.add(r,"dragstart",(function(se){Oa(se)})),z.add(r,"click",j,{capture:!0}),z.input(r,"ksDragStart",F),z.input(r,"ksDrag",U),z.input(r,"ksDragEnd",G),z.input(r,"mousedown",F),z.input(r,"mousemove",U),z.input(r,"mouseleave",G),z.input(r,"mouseup",G),z.input(r,"touchstart",F,{passive:!0}),z.input(r,"touchmove",U,{passive:!1}),z.input(r,"touchend",G),z.input(r,"touchcancel",G),z.add(window,"wheel",(function(se){a&&Oa(se)}));var ne="data-keen-slider-scrollable";go("[".concat(ne,"]:not([").concat(ne,"=false])"),s.container).map((function(se){return(function(ue){var oe;z.input(ue,"touchstart",(function(te){oe=H(te),E=!0,L=!0}),{passive:!0}),z.input(ue,"touchmove",(function(te){var le=A(),re=le?ue.scrollHeight-ue.clientHeight:ue.scrollWidth-ue.clientWidth,ce=oe-H(te),be=le?ue.scrollTop:ue.scrollLeft,Pe=le&&ue.style.overflowY==="scroll"||!le&&ue.style.overflowX==="scroll";if(oe=H(te),(ce<0&&be>0||ce>
840&&be<re)&&L&&Pe)return E=!0;L=!1,Oa(te),E=!1})),z.input(ue,"touchend",(function(){E=!1}))})(se)}))}}s.on("updated",D),s.on("optionsChanged",X),s.on("created",X),s.on("destroyed",z.purge)}function kk(s){var r,i,n=null;function e(x,C,L){s.animator.active?a(x,C,L):requestAnimationFrame((function(){return a(x,C,L)}))}function t(){e(!1,!1,i)}function a(x,C,L){var E=0,B=s.size,q=s.track.details;if(q&&r){var z=q.slides;r.forEach((function(U,F){if(x)!n&&C&&l(U,null,L),u(U,null,L);else{if(!z[F])return;var G=z[F].size*B;!n&&C&&l(U,G,L),u(U,z[F].distance*B-E,L),E+=G}}))}}function o(x){return s.options.renderMode==="performance"?Math.round(x):x}function l(x,C,L){var E=L?"height":"width";C!==null&&(C=o(C)+"px"),x.style["min-"+E]=C,x.style["max-"+E]=C}function u(x,C,L){if(C!==null){C=o(C);var E=L?C:0;C="translate3d(".concat(L?0:C,"px, ").concat(E,"px, 0)")}x.style.transform=C,x.style["-webkit-transform"]=C}function d(){r&&(a(!0,!0,i),r=null),s.on("detailsChanged",t,!0)}function f(){e(!1,!0,i)}function m(){d(),i=s.options.vertical,s.options.disabled||s.options.renderMode==="custom"||(n=_r(s.options.slides,"perView",null)==="auto",s.on("detailsChanged",t),(r=s.slides).length&&f())}s.on("created",m),s.on("optionsChanged",m),s.on("beforeOptionsChanged",(function(){d()})),s.on("updated",f),s.on("destroyed",d)}function Dk(s,r){return function(i){var n,e,t,a,o,l=G_();function u(O){var H;Id(i.container,"reverse",(H=i.container,window.getComputedStyle(H,null).getPropertyValue("direction")!=="rtl"||O?null:"")),Id(i.container,"v",i.options.vertical&&!O?"":null),Id(i.container,"disabled",i.options.disabled&&!O?"":null)}function d(){f()&&E()}function f(){var O=null;if(a.forEach((function(A){A.matches&&(O=A.__media)})),O===n)return!1;n||i.emit("beforeOptionsChanged"),n=O;var H=O?t.breakpoints[O]:t;return i.options=Zn(Zn({},t),H),u(),F(),G(),q(),!0}function m(O){var H=Vg(O);return(i.options.vertical?H.height:H.width)/i.size||1}function x(){return i.options.trackConfig.length}function C(O){for(var H in n=!1,t=Zn(Zn({},r),O),l.purge(),e=i.size,a=[],t.breakpoints||[]){var A=window.matchMedia(H);A.__media=H,a.push(A),l.add(A,"change",d)}l.add(window,"orientationchange",U),l.add(window,"resize",z),f()}function L(O){i.animator.stop();var H=i.track.details;i.track.init(O??(H?H.abs:0))}function E(O){L(O),i.emit("optionsChanged")}function B(O,H){if(O)return C(O),void E(H);F(),G();var A=x();q(),x()!==A?E(H):L(H),i.emit("updated")}function q(){var O=i.options.slides;if(typeof O=="function")return i.options.trackConfig=O(i.size,i.slides);for(var H=i.slides,A=H.length,D=typeof O=="number"?O:_r(O,"number",A,!0),j=[],X=_r(O,"perView",1,!0),J=_r(O,"spacing",0,!0)/i.size||0,ne=X==="auto"?J:J/X,se=_r(O,"origin","auto"),ue=0,oe=0;oe<D;oe++){var te=X==="auto"?m(H[oe]):1/X-J+ne,le=se==="center"?.5-te/2:se==="auto"?0:se;j.push({origin:le,size:te,spacing:J}),ue+=te}if(ue+=J*(D-1),se==="auto"&&!i.options.loop&&X!==1){var re=0;j.map((function(ce){var be=ue-re;return re+=ce.size+J,be>=1||(ce.origin=1-be-(ue>1?0:1-ue)),ce}))}i.options.trackConfig=j}function z(){F();var O=i.size;i.options.disabled||O===e||(e=O,B())}function U(){z(),setTimeout(z,500),setTimeout(z,2e3)}function F(){var O=Vg(i.container);i.size=(i.options.vertical?O.height:O.width)||1}function G(){i.slides=go(i.options.selector,i.container)}i.container=(o=go(s,document)).length?o[0]:null,i.destroy=function(){l.purge(),i.emit("destroyed"),u(!0)},i.prev=function(){i.moveToIdx(i.track.details.abs-1,!0)},i.next=function(){i.moveToIdx(i.track.details.abs+1,!0)},i.update=B,C(i.options)}}var Pk=function(s,r,i){try{return(function(n,e){var t,a={};return t={emit:function(o){a[o]&&a[o].forEach((function(u){u(t)}));var l=t.options&&t.options[o];l&&l(t)},moveToIdx:function(o,l,u){var d=t.track.idxToDist(o,l);if(d){var f=t.options.defaultAnimation;t.animator.start([{distance:d,duration:_r(u||f,"duration",500),easing:_r(u||f,"easing",(function(m){return 1+--m*m*m*m*m}))}])}},on:function(o,l,u){u===void 0&&(u=!1),a[o]||(a[o]=[]);var d=a[o].indexOf(l);d>-1?u&&delete a[o][d]:u||a[o].push(l)},options:n},(function(){if(t.track=Ck(t),t.animator=Ek(t),e)for(var o=0,l=e;o<l.length;o++)(0,l[o])(t);t.track.init(t.options.initial||0),t.emit("created")})(),t})(r,j_([Dk(s,{drag:!0,mode:"snap",renderMode:"precision",rubberband:!0,selector:".keen-slider__slide"}),kk,Ak,wk],i||[],!0))}catch(n){console.error(n)}};function Ik(s,r){var i=He(),n=He();return Ys(s)&&Va(s,(function(e,t){n.value&&n.value.update(e)})),qi((function(){i.value&&(n.value=new Pk(i.value,Ys(s)?s.value:s,r))})),lf((function(){n.value&&n.value.destroy()})),[i,n]}const Lk={key:0,class:"bg-yellow-500/10 border border-yellow-500/20 rounded-[14px] px-4 py-3.5 flex items-start gap-3"},Mk={class:"flex-1 min-w-0"},Ok={class:"text-[13px] text-yellow-300/80 leading-snug mb-2.5"},Rk={key:1,class:"bg-yellow-500/10 border border-yellow-500/20 rounded-[14px] px-4 py-3.5 flex items-start gap-3"},Fk={class:"flex-1 min-w-0"},Nk={class:"text-[13px] text-yellow-300/80 leading-snug mb-2.5"}
84,Bk={key:2,class:"bg-[#E3BB72]/8 border border-[#E3BB72]/20 rounded-[14px] px-4 py-3.5 flex items-start gap-3"},Uk={class:"flex-1 min-w-0"},qk={class:"text-[13px] text-white/70 leading-snug mb-2.5"},Vk={class:"home-menu-container"},Hk={class:"flex flex-col"},jk={class:"flex flex-1"},Gk={class:"flex flex-1"},Wk={class:"flex flex-1"},zk={class:"flex flex-col flex-wrap h-full pr-4"},$k={class:"flex w-full"},Kk={key:0,class:"flex justify-center"},Xk=["onClick"],Yk={key:3,class:"p-4"},Qk={class:"announcement-container flex flex-col"},Jk=["innerHTML"],Zk=Si({__name:"index",setup(s){const{locale:r,t:i}=yo(),{showMobileLayout:n}=uf(),e=za(),t=Gg(),{isRefreshingProfile:a,requireFirstDeposit:o,isUnderReview:l,isNeedFillProfile:u,displayUsername:d}=un(t),f=ub(),{isRefreshingDepositRequest:m,haveOngoingDeposit:x,onGoingDepositHaveWaitConfirmCount:C}=un(f),L=lb(),E=sr(()=>!a.value&&!m.value),B=sr(()=>u.value),q=sr(()=>!u.value&&o.value&&!C.value&&!x.value),z=sr(()=>l.value),U=sr(()=>X.value&&J.value&&t.isActivated&&t.referralCode);async function F(){window.open("https://ufanews.digital")}async function G(){window.open("https://ufanews.digital/livescore")}async function O(){window.open("https://ufanews.digital/highlights")}const H=Mn();function A(){H.push("/"+ea.SETUP_ACCOUNT_INDEX)}let D=za(),{isShowGridMenuButton:j,isEnableFeatureMembership:X,isEnableFeatureUCoin:J}=un(D);const{campaign:ne,ensureLoaded:se}=H_();let ue=He(!1),oe=He(!1);const te=sr(()=>{let tt;return u.value?tt=ea.SETUP_ACCOUNT_INDEX:tt=ea.DEPOSIT,[{enable:!0,iconSrc:Kt("/images/button-icon/icn-btn-deposit.svg"),labelName:i("menu.submenu.deposit"),menuName:tt,slotContent:o.value?jr("div",{class:"absolute top-[-12px] right-[-13px]"},[jr("img",{class:"w-[50px] h-[20px]",src:"/images/layout/icn-fire-min.gif",alt:""}),jr("div",{class:`absolute ${r.value==="th","right-[5px] top-[-3px]"}`},[jr("span",{class:"text-white text-xs font-medium"},"Start")])]):null},{enable:!0,iconSrc:Kt("/images/button-icon/icn-btn-withdrawal.svg"),labelName:i("menu.submenu.withdrawal"),menuName:Xt.WITHDRAWAL},{enable:!0,iconSrc:Kt("/images/button-icon/icn-btn-history.svg"),labelName:i("menu.submenu.history"),menuName:Xt.HISTORY},{enable:!0,iconSrc:Kt("/images/button-icon/icn-btn-settings.svg"),labelName:i("menu.settings"),menuName:Xt.PROFILES,activeTab:"setting"},{enable:!0,iconSrc:Kt("/images/button-icon/icn-menu-apb.gif"),labelName:i("menu.apb"),fullIcon:!0,noBackground:!0,menuName:Xt.APB},{enable:j.value(zr.PREDICT_CHAMPION)&&!!ne.value?.enable,iconSrc:ne.value?.menuButtonImageUrl,labelName:ne.value?.menuButtonTitle,menuName:Xt.PREDICT_CHAMPION,fullIcon:!!ne.value?.menuButtonImageUrl,noBackground:!!ne.value?.menuButtonImageUrl,slotContent:jr("div",{class:"absolute top-[0] right-[0] w-full h-full"},[jr("img",{class:"absolute right-[0] w-[50%] h-auto",src:"/images/button-icon/new-animate.gif",alt:""})])},{enable:j.value(zr.UACTIVITY),iconSrc:Kt("/images/button-icon/icn-btn-uquiz.svg"),labelName:i("menu.submenu.uquiz"),menuName:Xt.UACTIVITY,slotContent:jr("div",{class:"absolute top-[0] right-[0] w-full h-full"},[jr("img",{class:"absolute right-[0] w-[50%] h-auto",src:"/images/button-icon/new-animate.gif",alt:""})])},{enable:!1,iconSrc:Kt("/images/button-icon/icn-btn-announcement.svg"),labelName:i("menu.promotion"),menuName:Xt.PROMOTION},{enable:!1,iconSrc:"/images/button-icon/icn-btn-announcement.svg",labelName:i("menu.announcement"),menuName:Xt.ANNOUNCEMENT},{enable:!1,iconSrc:Kt("/images/button-icon/icn-btn-membership.svg"),labelName:i("menu.membership"),menuName:Xt.RANK},{enable:!1,iconSrc:Kt("/images/button-icon/icn-btn-lucky-spin.svg"),labelName:i("menu.luckySpin"),menuName:Xt.LUCKY_SPIN},{enable:j.value(zr.UPRETTY),iconSrc:oe.value?ut.value:Kt("/images/button-icon/icn-btn-upretty.png"),labelName:i("menu.upretty"),menuName:Xt.UPRETTY,fullIcon:!0,noBackground:!0,slotContent:oe.value?jr("div",{class:"absolute top-[-12px] right-[-13px] w-[50px] h-[20px]"},[jr("img",{class:"w-[50px] h-[20px]",src:"/images/layout/icn-fire-min.gif",alt:""}),jr("div",{class:"absolute right-2 top-[-2px]"},[jr("span",{class:"text-white text-xs font-medium"},"Live")])]):null},{enable:j.value(zr.UFANEWS),iconSrc:Kt("/images/button-icon/icn-btn-ufanews.png"),labelName:i("menu.ufanews"),fullIcon:!0,noBackgroun
84d:!0,action:()=>F()},{enable:!1,iconSrc:Kt("/images/button-icon/icn-btn-livescore.svg"),labelName:i("menu.ufanewsLivescore"),action:()=>G()},{enable:j.value(zr.UFANEWS_HIGHLIGHT),iconSrc:Kt("/images/button-icon/icn-btn-highlights.svg"),labelName:i("menu.ufanewsHighlight"),action:()=>O()},{enable:!1,iconSrc:"/images/button-icon/icn-btn-bank.svg",labelName:i("menu.bank"),menuName:Xt.PROFILES,activeTab:"bank"},{enable:U.value,iconSrc:Kt("/images/button-icon/icn-btn-referral.svg"),labelName:i("menu.referral"),menuName:Xt.REFERRAL},{enable:j.value(zr.REWARDS),iconSrc:Kt("/images/menu/icn-menu-rewards-on.svg"),labelName:i("menu.rewards"),menuName:Xt.REWARDS}].filter(nt=>nt.enable)}),le=He(0),[re,ce]=Ik({loop:!1,mode:"snap",rtl:!1,slides:{perView:"auto"},initial:le.value,slideChanged:tt=>{le.value=tt.track.details.rel}}),be=He();qi(()=>{setTimeout(()=>{be.value&&(ce.value?.slides.push(be.value),ce.value?.update())},500)}),cf(()=>{be.value&&(ce.value?.slides.pop(),ce.value?.update())});const Pe=sr(()=>ce.value?[...Array(Math.ceil(te.value.length/12)).keys()]:[]);async function Re(){const tt=await Vi.getUprettyLiveStatus({showLoading:!1});if(tt.data){const{online:nt,haveLive:Cr}=tt.data||{};ue.value=nt,oe.value=Cr}}const ge=He(!1),De=sr(()=>{const tt=new Date().toLocaleDateString();return!t.getDoNotShowAnnouncementModalDate()||tt>t.getDoNotShowAnnouncementModalDate()}),Qe=()=>{t.getShowAnnouncementModal()?De.value&&(ge.value=!0):ge.value=t.getShowAnnouncementModal()},Oe=tt=>{tt.btn&&(ge.value=!1)};async function ot(){await f.refreshOnGoingDepositRequest({background:!0}),await L.refreshBankAccountList(),await Re(),await Qe(),ut.value=it()??""}qi(()=>{ot(),j.value(zr.PREDICT_CHAMPION)&&se(r.value==="th"?"th":"en"),window.scrollTo({top:0,behavior:"smooth"})});const vt=He([Kt("/images/button-icon/icn-btn-upretty-animation-2.gif")]),ut=He(""),it=()=>{const tt=Math.floor(Math.random()*vt.value.length);return vt.value[tt]};return(tt,nt)=>{const Cr=gb,ft=Jb,er=nb,Ur=EA,$e=RA,Kr=ib,Xe=VA;return Se(n)?(Me(),qe("div",{key:0,class:"min-h-full bg-cover bg-center pb-[120px]",style:ln({backgroundImage:`url(${("getPublicUrl"in tt?tt.getPublicUrl:Se(Kt))("/images/home-bg.webp")})`})},[Yt(Cr),Se(De)&&Se(ge)?(Me(),ii(ft,{key:0,onCloseModalClick:Oe})):dt("",!0),Yt(er),Yt(Ur),Yt($e),Yt(jA),Yt(WA),Se(E)?(Me(),qe("div",{key:1,class:gi(Se(yh)?"":"mx-5 relative mb-6 mt-[-48px]")},[Se(q)?(Me(),qe("div",Lk,[nt[0]||(nt[0]=_e("div",{class:"w-1.5 h-1.5 rounded-full bg-yellow-400 flex-shrink-0 mt-1.5 animate-pulse"},null,-1)),_e("div",Mk,[_e("p",Ok,At(tt.$t("info.waitFirstDepositFromUser")),1),_e("button",{type:"button",class:"text-[12px] font-semibold text-[#E3BB72] border border-[#E3BB72]/30 rounded-[8px] px-3 py-1.5 active:bg-white/5 transition-colors",onClick:A},At(tt.$t("info.waitFirstDepositFromUserActionBtn")),1)])])):Se(z)?(Me(),qe("div",Rk,[nt[1]||(nt[1]=_e("div",{class:"w-1.5 h-1.5 rounded-full bg-yellow-400 flex-shrink-0 mt-1.5 animate-pulse"},null,-1)),_e("div",Fk,[_e("p",Nk,At(tt.$t("info.userIsUnderReviewPleaseWait")),1),_e("button",{type:"button",class:"text-[12px] font-semibold text-[#E3BB72] border border-[#E3BB72]/30 rounded-[8px] px-3 py-1.5 active:bg-white/5 transition-colors",onClick:A},At(tt.$t("info.userIsNotActivatedGoToProcessActionBtn")),1)])])):Se(B)?(Me(),qe("div",Bk,[nt[2]||(nt[2]=_e("div",{class:"w-1.5 h-1.5 rounded-full bg-[#E3BB72] flex-shrink-0 mt-1.5"},null,-1)),_e("div",Uk,[_e("p",qk,At(tt.$t("info.userIsNeedMoreActionToActivateAccount")),1),Yt(Kr,{variant:"primary",label:tt.$t("info.userIsNotActivatedGoToProcessActionBtn"),class:"!h-[32px] !text-[12px] !rounded-[8px] !w-auto !px-3",onClick:A},null,8,["label"])])])):dt("",!0)],2)):dt("",!0),Se(j)(Se(zr).PREDICT_CHAMPION)&&Se(ne)?.enable?(Me(),qe("div",{key:2,class:gi(["flex justify-center",Se(yh)?"mx-4 mt-2":"mt-4"])},[Yt(xk)],2)):dt("",!0),_e("div",Vk,[_e("div",{ref_key:"container",ref:re,class:"keen-slider"},[_e("div",{class:gi(["keen-slider__slide pt-[20px]",Se(te).length>12?"pl-4":"p-4"]),style:ln({minWidth:Se(te).length>12?"calc(100% - calc(100% / 16 + 16px)) !important":"100%",maxWidth:Se(te).length>12?"calc(100% - calc(100% / 16 + 16px)) !important":"100%"})},[_e("div",Hk,[_e("div",jk,[(Me(!0),qe(vi,null,wn(Se(te).slice(0,4),(Ie,ht)=>(Me(),qe("div",{key:ht,class:"flex basis-1/4"},[Yt(Xe,{"icon-src":Ie.iconSrc,"label-name":Ie.labelName,"menu-name":Ie.menuName,"full-icon":Ie.fullIcon,"active-tab":Ie.activeTab,"no-background":Ie.noBackgroun
84d},ks({_:2},[Ie.slotContent?{name:"overlay",fn:Ni(()=>[(Me(),ii(Ds(()=>Ie.slotContent)))]),key:"0"}:void 0]),1032,["icon-src","label-name","menu-name","full-icon","active-tab","no-background"])]))),128))]),_e("div",Gk,[(Me(!0),qe(vi,null,wn(Se(te).slice(4,8),(Ie,ht)=>(Me(),qe("div",{key:ht,class:"flex basis-1/4"},[Yt(Xe,{"icon-src":Ie.iconSrc,"label-name":Ie.labelName,"menu-name":Ie.menuName,"full-icon":Ie.fullIcon,"active-tab":Ie.activeTab,"no-background":Ie.noBackground,onClick:Ie.action},ks({_:2},[Ie.slotContent?{name:"overlay",fn:Ni(()=>[(Me(),ii(Ds(()=>Ie.slotContent)))]),key:"0"}:void 0]),1032,["icon-src","label-name","menu-name","full-icon","active-tab","no-background","onClick"])]))),128))]),_e("div",Wk,[(Me(!0),qe(vi,null,wn(Se(te).slice(8,12),(Ie,ht)=>(Me(),qe("div",{key:ht,class:"flex basis-1/4"},[Yt(Xe,{"icon-src":Ie.iconSrc,"label-name":Ie.labelName,"menu-name":Ie.menuName,"full-icon":Ie.fullIcon,"active-tab":Ie.activeTab,"no-background":Ie.noBackground,onClick:Ie.action},ks({_:2},[Ie.slotContent?{name:"overlay",fn:Ni(()=>[(Me(),ii(Ds(()=>Ie.slotContent)))]),key:"0"}:void 0]),1032,["icon-src","label-name","menu-name","full-icon","active-tab","no-background","onClick"])]))),128))])])],6),Se(te).length>12?(Me(),qe("div",{key:0,ref_key:"slider2",ref:be,class:"keen-slider__slide pt-[20px]",style:ln({minWidth:`calc(((((100% - calc(100% / 16 + 32px))/4)*${Math.ceil((Se(te).length-12)/3)})) + 16px)`,maxWidth:`calc(((((100% - calc(100% / 16 + 32px))/4)*${Math.ceil((Se(te).length-12)/3)})) + 16px)`})},[_e("div",zk,[(Me(!0),qe(vi,null,wn(Se(te).slice(12,Se(te).length),(Ie,ht)=>(Me(),qe("div",{key:ht,class:"flex basis-2/6"},[_e("div",$k,[Yt(Xe,{"icon-src":Ie.iconSrc,"label-name":Ie.labelName,"menu-name":Ie.menuName,"full-icon":Ie.fullIcon,"active-tab":Ie.activeTab,"no-background":Ie.noBackground,onClick:Ie.action},ks({_:2},[Ie.slotContent?{name:"overlay",fn:Ni(()=>[(Me(),ii(Ds(()=>Ie.slotContent)))]),key:"0"}:void 0]),1032,["icon-src","label-name","menu-name","full-icon","active-tab","no-background","onClick"])])]))),128))])],4)):dt("",!0)],512),Se(ce)&&Se(te).length>12?(Me(),qe("div",Kk,[(Me(!0),qe(vi,null,wn(Se(Pe),(Ie,ht)=>(Me(),qe("button",{key:ht,class:gi([{"bg-[#E3BB72] bg-opacity-100":Se(le)===ht,"bg-white bg-opacity-20":Se(le)!==ht},"h-[8px] w-[8px] rounded-full m-1"]),onClick:ui=>Se(ce).moveToIdx(ht)},null,10,Xk))),128))])):dt("",!0)]),Se(e).getSiteAnnouncementMessage()?(Me(),qe("div",Yk,[nt[3]||(nt[3]=_e("div",{class:"pt-6"},null,-1)),_e("div",Qk,[_e("div",{class:"text-white p-6",innerHTML:Se(e).getSiteAnnouncementMessage()},null,8,Jk)])])):dt("",!0)],4)):dt("",!0)}}}),hD=xi(Zk,[["__scopeId","data-v-ded9d484"]]);export{hD as default};

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.