(self["webpackChunkclassroom"]=self["webpackChunkclassroom"]||[]).push([[952],{7974:function(t,e,n){"use strict";n.d(e,{Gd:function(){return l},HP:function(){return d},NK:function(){return g},Vo:function(){return o},Z9:function(){return i},cW:function(){return p},hR:function(){return a},lM:function(){return u},lt:function(){return c},mD:function(){return h},u_:function(){return f},up:function(){return s}});var r=n(1688);const i=(t,e)=>r.b5.axioseRquest({signal:e.signal,method:"post",url:"/api-teacher/lessonCourseware/queryLessonCourseware",data:{subjectId:t,page:1,rows:9999}}),o=()=>r.b5.axioseRquest({method:"get",url:"/api-teacher/lessonCourseware/getLessonCoursewareSubjectList"}),s=t=>r.b5.axioseRquest({signal:t.abortController.signal,method:"get",url:`/api-teacher/lessonCourseware/getLessonCoursewareCourseList/${t.id}`,params:t.data}),a=t=>r.b5.axioseRquest({method:"get",url:"/api-teacher/lessonCourseware/getLessonCourseDetail/"+t}),l=()=>r.iD.axioseRquest({method:"post",url:"/api-teacher/courseSchedule/myCourseware"}),c=t=>r.iD.axioseRquest({signal:t.abortController.signal,method:"post",url:`/api-teacher/courseSchedule/myCoursewareDetail/${t.id}`,params:t.data}),u=t=>r.iD.axioseRquest({method:"get",url:"/api-teacher/lessonCoursewareDetail/detail/"+t}),h=()=>r.R$.axioseRquest({method:"get",url:"/api-teacher/tenantGroupAlbum/buyAlbumInfo"}),p=()=>r.R$.axioseRquest({method:"get",url:"/api-tenant/open/subject/queryPage?page=1&rows=9999&queryType=list"}),d=(t,e,n)=>r.R$.axioseRquest({signal:n.signal,method:"post",url:"/api-teacher/tenantAlbumMusic/page",data:{subjectType:"COURSEWARE",albumId:e,page:1,rows:9999,subjectId:t}}),f=t=>r.R$.axioseRquest({signal:t.abortController.signal,method:"get",url:`/api-teacher/tenantAlbumMusic/getLessonCoursewareCourseList/${t.id}`,params:t.data}),g=t=>r.R$.axioseRquest({method:"get",url:"/api-teacher/tenantAlbumMusic/getLessonCourseDetail/"+t})},7530:function(t,e,n){"use strict";n.d(e,{_:function(){return i},j:function(){return o}});var r=n(1688);const i=t=>r.b5.axioseRquest({method:"post",url:"/api-teacher/teacherCourseSchedule/getRecentCourseSchedule"+(t?"?courseId="+t:"")}),o=()=>r.iD.axioseRquest({method:"post",url:"/api-teacher/courseSchedule/remind"})},1943:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return Me}});n(8743);var r=n(6768),i=n(4232),o=n(144),s=n(5130),a=n(7018),l=n(725),c=n(4520),u=n(8616),h=n(8893),p=n(9582),d=n(2617),f=n(851),g=n(378),m=n(9428),y=n(8320),v=n(9536),_=n(1356),b=n(6726),T=n.n(b),E=n(6097);function C(t,e=2,n="0"){if(t=String(t),t.length>=2)return t;for(let r=0,i=e-t.length;r((0,r.Qi)("data-v-5e29fc36"),t=t(),(0,r.jt)(),t),B={class:"sliderSection"},R={class:"timeController"},I={class:"playController"},P={class:"leftPlayController"},D=["src"],j=["src"],O={class:"sliderSpeedCon"},M={class:"thumb"},x=k((()=>(0,r.Lk)("div",{class:"rightPlayController"},[(0,r.Lk)("div",{class:"videoName"})],-1)));var L=(0,r.pM)({__name:"videoPlay",props:{disableEvents:{type:Boolean},isShowController:{type:Boolean},autoPlay:{type:Boolean}},emits:["ready","ended","playbackRate","loadedmetadata"],setup(t,{expose:e,emit:a}){const l=t,c="video"+(0,E.kk)();let u,h=!1;const p=(0,o.KR)(""),d=(0,o.Kh)({currentTime:0,duration:0,currentTimeSilder:0,isDrag:!1}),f=(0,o.KR)(),g=(0,o.KR)();let m;function b(){m&&clearTimeout(m),m=setTimeout((()=>{g.value?.hide()}),5e3)}const C=(0,o.Kh)({type:"pause",loop:!1,minSpeed:.5,maxSpeed:1.5,speedStep:.1,palySpeed:1});(0,r.wB)((()=>C.palySpeed),(()=>{b()}));const k=(0,o.KR)(!0);let L,G;function N(){u=T()(c,{controls:!1,loop:!1}),u.ready((()=>{console.log("播放器初始化完成"),h=!0,a("ready")})),u.on("loadstart",(()=>{u.playbackRate(C.palySpeed)})),u.on("loadedmetadata",(()=>{console.log("loadedmetadata"),l?.autoPlay&&u.play(),a("loadedmetadata")})),u.on("durationchange",(()=>{d.duration=u.duration()})),u.on("timeupdate",(()=>{d.currentTime=u.currentTime(),d.isDrag||(d.currentTimeSilder=d.currentTime)})),u.on("play",(()=>{C.type="play"})),u.on("pause",(()=>{C.type="pause"})),u.on("ended",(()=>{a("ended")}))}function Z({src:t,name:e}){p.value=e,G&&clearInterval(G),h?F(t):G=setInterval((()=>{h&&(clearInterval(G),F(t))}),60)}function F(t){u?.src(t),tt()}function U(t){u.currentTime(t||d.currentTimeSilder),d.isDrag=!1}function V(t){d.isDrag=!0,d.currentTimeSilder=t}function Q(t){U(d.currentTime+("fast"===t?5:-5)),tt()}function H(){"pause"===C.type?u.play():u.pause(),tt()}function Y(){u.pause(),tt()}(0,r.nT)((()=>{k.value=l.isShowController})),(0,r.sV)((()=>{N()})),(0,r.hi)((()=>{u?.dispose()}));let K=null;function $(){C.loop?u.loop(!1):u.loop(!0),C.loop=u.loop(),C.loop?(K&&K.close(),K=(0,A.nk)({message:"已打开循环播放",icon:"",customClass:"defaultMessage"})):(K&&K.close(),K=(0,A.nk)({message:"已关闭循环播放",icon:"",customClass:"defaultMessage"}))}function q(t){C.palySpeed=t,u.playbackRate(t),a("playbackRate")}function z(t){const e=parseFloat((C.palySpeed+t).toFixed(1));e>C.maxSpeed||e{const a=(0,r.g2)("el-popover");return(0,r.uX)(),(0,r.CE)("div",{onKeydown:X,onMousemove:J,onClick:W,class:(0,i.C4)(["videoPlay",{isHideController:!k.value}]),tabindex:"-1"},[(0,r.Lk)("video",{class:"videoPlayBox",id:c,preload:"auto",playsinline:"","webkit-playsinline":""}),(0,r.Lk)("div",{class:"videoController",onClick:e[2]||(e[2]=(0,s.D$)((()=>{}),["stop"])),onTouchstart:e[3]||(e[3]=(0,s.D$)((()=>{}),["stop"]))},[(0,r.Lk)("div",B,[(0,r.Lk)("div",R,(0,i.v_)(`${(0,o.R1)(S)(d.currentTime)} / ${(0,o.R1)(S)(d.duration)}`),1),(0,r.bF)((0,o.R1)(w.A),{class:"sliderController",keyboard:!1,value:d.currentTimeSilder,tooltip:k.value,step:.01,"onUpdate:value":V,"on-dragend":U,max:d.duration,"format-tooltip":t=>(0,o.R1)(S)(t)},null,8,["value","tooltip","max","format-tooltip"])]),(0,r.Lk)("div",I,[(0,r.Lk)("div",P,[(0,r.Lk)("img",{onClick:H,src:n(6893)(`./${"play"===C.type?"iconPause":"iconPlay"}.png`)},null,8,D),(0,r.Lk)("img",{onClick:$,class:"loopImg",src:n(6893)(`./${C.loop?"iconLoopActive":"iconLoop"}.png`)},null,8,j),(0,r.Lk)("img",{ref_key:"btnSpendDom",ref:f,src:y},null,512),(0,r.bF)(a,{onShow:b,ref_key:"popoverSpendDom",ref:g,"virtual-ref":f.value,trigger:"click",placement:"top",teleported:!1,"popper-class":"palySpeedPopover","virtual-triggering":""},{default:(0,r.k6)((()=>[(0,r.Lk)("div",O,[(0,r.Lk)("img",{onClick:e[0]||(e[0]=t=>z(C.speedStep)),src:v}),(0,r.bF)((0,o.R1)(w.A),{class:"sliderSpeed",tooltip:!1,keyboard:!1,value:C.palySpeed,"onUpdate:value":q,vertical:"",step:C.speedStep,max:C.maxSpeed,min:C.minSpeed},{thumb:(0,r.k6)((()=>[(0,r.Lk)("div",M,(0,i.v_)(C.palySpeed.toFixed(1)+"X"),1)])),_:1},8,["value","step","max","min"]),(0,r.Lk)("img",{onClick:e[1]||(e[1]=t=>z(-C.speedStep)),src:_})])])),_:1},8,["virtual-ref"])]),x])],32)],34)}}}),G=n(1241);const N=(0,G.A)(L,[["__scopeId","data-v-5e29fc36"]]);var Z=N,F=Z,U=n(7974),V=n(8952),Q=n(1688);const H=t=>Q.iD.axioseRquest({method:"post",url:"/api-teacher/courseSchedule/getCoursewarePlayTime?courseScheduleId="+t,params:{playFrom:"WEB"}}),Y=(t,e)=>Q.iD.axioseRquest({method:"post",url:`/api-teacher/courseSchedule/coursewarePlayTime?courseScheduleId=${t}&playTime=${e}`,params:{playFrom:"WEB"}}),K=t=>Q.iD.axioseRquest({method:"post",url:"/api-teacher/courseSchedule/checkWebCourse/"+t}),$=t=>Q.iD.axioseRquest({method:"post",url:"/api-teacher/lessonCoursewareDetail/refLevel",data:t}),q=t=>Q.R$.axioseRquest({method:"post",url:"/api-teacher/tenantAlbumMusic/refLevel",data:t}),z=t=>Q.b5.axioseRquest({method:"post",url:"/api-teacher/lessonCourseware/refLevel",data:t});var W=n(9119),X=n(9979),J=n(1387),tt=n(2933),et=n.p+"img/icon-load.027b4b78.gif",nt=n(6041);const rt=t=>((0,r.Qi)("data-v-d73516f6"),t=t(),(0,r.jt)(),t),it={class:"courseCollapseHead"},ot=rt((()=>(0,r.Lk)("div",{class:"courseCollapseHeadArrow"},[(0,r.Lk)("div",{class:"headArrow"}),(0,r.Lk)("div",{class:"headArrowActive"})],-1))),st={class:"courseCollapseHeadTit"},at=["onClick"],lt=rt((()=>(0,r.Lk)("div",{class:"imgIcon"},null,-1))),ct={class:"ellipsisBox"},ut=["innerHTML"],ht={class:"iconArrow"},pt={key:0,src:et};var dt=(0,r.pM)({__name:"courseCollapse",props:{activeCollapse:{},courseList:{},search:{},isChild:{type:Boolean}},emits:["handleClick"],setup(t,{emit:e}){const n=t,s=(0,o.KR)(n.search);(0,r.wB)((()=>n.activeCollapse),(()=>{a.value=l()})),(0,r.wB)((()=>n.search),(()=>{s.value=n.search}));const a=(0,o.KR)(l());function l(){const t=n.courseList.find((t=>(n.activeCollapse?.parentData?.ids||[]).includes(t.id)));return t?.id||""}function c(t){e("handleClick",t)}function u(t){if(!t||!s.value)return t;const e=s.value;return t.replace(e,`${e}`)}return(t,e)=>{const l=(0,r.g2)("courseCollapse",!0),h=(0,r.g2)("el-collapse-item"),p=(0,r.g2)("el-collapse");return(0,r.uX)(),(0,r.Wv)(p,{class:"courseCollapse",accordion:"",modelValue:a.value,"onUpdate:modelValue":e[0]||(e[0]=t=>a.value=t)},{default:(0,r.k6)((()=>[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(n.courseList,(e=>((0,r.uX)(),(0,r.Wv)(h,{key:e.id,name:e.id,class:(0,i.C4)({isChild:n.isChild})},{title:(0,r.k6)((()=>[(0,r.Lk)("div",it,[ot,(0,r.Lk)("div",st,[(0,r.bF)((0,o.R1)(nt.A),{title:e.name},null,8,["title"])])])])),default:(0,r.k6)((()=>[(0,r.Lk)("div",{class:(0,i.C4)(["courseCollapseCon",{courseListCon:e.materialList}])},[e.materialList?((0,r.uX)(!0),(0,r.CE)(r.FK,{key:0},(0,r.pI)(e.materialList,(e=>((0,r.uX)(),(0,r.CE)("div",{class:(0,i.C4)(["courseList",{isActive:t.activeCollapse?.id===e.id&&t.activeCollapse?.knowledgePointId===e.knowledgePointId}]),key:e.id,onClick:t=>c(e)},[(0,r.Lk)("div",{class:(0,i.C4)(["courseTitleCon",e.typeCode||e.type])},[lt,(0,r.Lk)("div",ct,[(0,r.Lk)("span",{innerHTML:u(e.name)},null,8,ut)])],2),(0,r.Lk)("div",ht,[t.activeCollapse?.id===e.id&&t.activeCollapse?.knowledgePointId===e.knowledgePointId?((0,r.uX)(),(0,r.CE)("img",pt)):(0,r.Q3)("",!0)])],10,at)))),128)):((0,r.uX)(),(0,r.Wv)(l,{key:1,isChild:!0,search:s.value,courseList:e.children||[],activeCollapse:t.activeCollapse,onHandleClick:c},null,8,["search","courseList","activeCollapse"]))],2)])),_:2},1032,["name","class"])))),128))])),_:1},8,["modelValue"])}}});const ft=(0,G.A)(dt,[["__scopeId","data-v-d73516f6"]]);var gt=ft,mt=gt;const yt={class:"courseMenuCollapse"},vt=["name","onClick"],_t={class:"cover"},bt=["src"],Tt={key:0,class:"current"},Et={class:"text"},Ct={style:{maxWidth:"180px"}};var St=(0,r.pM)({__name:"courseMenuCollapse",props:{courseMenuList:{}},emits:["handleClick"],setup(t,{emit:e}){const n=t;function o(t){e("handleClick",t)}return(t,e)=>{const s=(0,r.g2)("el-tooltip");return(0,r.uX)(),(0,r.CE)("div",yt,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(n.courseMenuList,(t=>((0,r.uX)(),(0,r.CE)("div",{class:(0,i.C4)(["courseMenuItem",t.useFlag?"current":""]),key:t.id,name:t.id,onClick:e=>o(t)},[(0,r.Lk)("div",_t,[(0,r.Lk)("img",{src:t.coverImg},null,8,bt),t.useFlag?((0,r.uX)(),(0,r.CE)("div",Tt,"当前")):(0,r.Q3)("",!0)]),(0,r.Lk)("div",Et,[(0,r.bF)(s,{"popper-class":"singleton-tooltip",offset:5,showArrow:!1,placement:"top"},{content:(0,r.k6)((()=>[(0,r.Lk)("div",Ct,(0,i.v_)(t.lessonCoursewareName),1)])),default:(0,r.k6)((()=>[(0,r.Lk)("div",{ref_for:!0,ref:"tooltipDom",class:"tooltipAutoShow"},(0,i.v_)(t.lessonCoursewareName),513)])),_:2},1024)])],10,vt)))),128))])}}});const wt=(0,G.A)(St,[["__scopeId","data-v-071219f4"]]);var At=wt,kt=At;const Bt=t=>((0,r.Qi)("data-v-734b0228"),t=t(),(0,r.jt)(),t),Rt=Bt((()=>(0,r.Lk)("div",{class:"drop"},null,-1))),It={class:"time"},Pt=5;var Dt=(0,r.pM)({__name:"playRecordTime",props:{coursewareTotalTime:{},isCurrentCoursewareMenu:{type:Boolean},modeId:{}},setup(t){const e=t;let n;const s=(0,o.KR)(0);let a=0;function l(){(0,W.TQ)(H,e.modeId).then((t=>{200===t.code&&(s.value+=t.data||0)}))}function c(){n=setInterval((()=>{if(s.value>=e.coursewareTotalTime)return n&&clearInterval(n),void(a>0&&u(e.modeId,a));a++,s.value++,a===Pt&&(u(e.modeId,a),a=0)}),1e3)}function u(t,e){(0,W.TQ)(Y,t,e).then((()=>{}))}return(0,r.hi)((()=>{n&&clearInterval(n)})),(0,r.wB)((()=>e.isCurrentCoursewareMenu),(()=>{e.isCurrentCoursewareMenu?c():(u(e.modeId,a),a=0,n&&clearInterval(n))})),l(),e.isCurrentCoursewareMenu&&c(),(t,n)=>((0,r.uX)(),(0,r.CE)("div",{class:(0,i.C4)(["playRecordTime",t.isCurrentCoursewareMenu?"":"hide"])},[Rt,(0,r.Lk)("div",It,(0,i.v_)(`${(0,o.R1)(S)(s.value)}/${(0,o.R1)(S)(e.coursewareTotalTime)}`),1)],2))}});const jt=(0,G.A)(Dt,[["__scopeId","data-v-734b0228"]]);var Ot=jt,Mt=Ot,xt=n(4691),Lt=n(7530),Gt=n(4386),Nt=n(7504),Zt=n(6093),Ft=n(2291),Ut=n(4494),Vt=n(706);const Qt={class:"dialogConfirm"},Ht=["src"],Yt={class:"textCon"},Kt=["innerHTML"],$t={key:1,class:"dialogBtn"};var qt=(0,r.pM)({__name:"coursewarePlayTip",props:{modalData:{}},emits:["onClose","onCancel","onOk"],setup(t,{emit:e}){const n=t,i=(0,r.EW)((()=>{const{btnShow:t}=n.modalData;return!(!t[0]&&!t[1])}));function o(){e("onClose")}function s(){e("onCancel")}function a(){e("onOk")}return(t,e)=>{const l=(0,r.g2)("ElScrollbar");return(0,r.uX)(),(0,r.CE)("div",Qt,[(0,r.Lk)("div",{class:"close",onClick:o}),n.modalData.headImg?((0,r.uX)(),(0,r.CE)("img",{key:0,class:"headImg",src:n.modalData.headImg},null,8,Ht)):(0,r.Q3)("",!0),(0,r.Lk)("div",Yt,[(0,r.bF)(l,{class:"elScrollbar"},{default:(0,r.k6)((()=>[(0,r.Lk)("div",{class:"text",innerHTML:n.modalData.text},null,8,Kt)])),_:1})]),i.value?((0,r.uX)(),(0,r.CE)("div",$t,[n.modalData.btnShow[1]?((0,r.uX)(),(0,r.CE)("img",{key:0,onClick:s,src:Ut})):(0,r.Q3)("",!0),n.modalData.btnShow[0]?((0,r.uX)(),(0,r.CE)("img",{key:1,onClick:a,src:Vt})):(0,r.Q3)("",!0)])):(0,r.Q3)("",!0)])}}});const zt=(0,G.A)(qt,[["__scopeId","data-v-683a49b0"]]);var Wt=zt,Xt=({text:t,onCancel:e,onOk:n,onClose:r,btnShow:i,headImg:o})=>{(0,Ft.Ay)({maskClose:!0,template:Wt,width:840,height:570,btnShow:[],modalData:{text:t,btnShow:i||[!0,!0],headImg:o},className:"usecoursewarePlayTip",onCancel:e,onOk:n,onClose:r})},Jt=n(9922),te=n(609),ee=n(7723);const ne=t=>((0,r.Qi)("data-v-316b9bb1"),t=t(),(0,r.jt)(),t),re={key:0,class:"imgPlayBox"},ie={key:1,class:"songPlayBox"},oe=["src"],se={class:"leftTools posTools"},ae=ne((()=>(0,r.Lk)("img",{src:a},null,-1))),le=[ae],ce=ne((()=>(0,r.Lk)("img",{src:l},null,-1))),ue=[ce],he=ne((()=>(0,r.Lk)("img",{src:c},null,-1))),pe=[he],de=ne((()=>(0,r.Lk)("img",{src:u},null,-1))),fe=[de],ge=ne((()=>(0,r.Lk)("img",{src:h},null,-1))),me=[ge],ye={class:"topTools"},ve={class:"leftMenu"},_e={class:"title-section"},be={class:"title"},Te={class:"content"},Ee={class:"midMenu"},Ce=ne((()=>(0,r.Lk)("img",{src:d},null,-1))),Se=[Ce],we=["onClick"],Ae=ne((()=>(0,r.Lk)("img",{class:"directory",src:g},null,-1))),ke=ne((()=>(0,r.Lk)("div",{class:"tit"},"知识点目录",-1))),Be=["onClick"],Re=ne((()=>(0,r.Lk)("img",{class:"directory",src:m},null,-1))),Ie=ne((()=>(0,r.Lk)("div",{class:"tit"},"课程类型",-1))),Pe=["onClick"];var De=(0,r.pM)({__name:"coursewarePlay",setup(t){const e=(0,J.lq)(),a=(0,J.rd)(),l=(0,X.A)(),c=(0,o.KR)(),u=(0,o.KR)(),h=(0,o.KR)(""),d=(0,o.IJ)([]),g=(0,o.IJ)([]),m=(0,o.IJ)([]),y=(0,o.IJ)([]),v=(0,o.KR)([]),_=(0,o.KR)([]),b=(0,o.IJ)(!0),T=(0,o.KR)(e.params.id),C=(0,o.KR)(!1);let S;const w=(0,o.Kh)({loading:!1,loadingCourseWare:!1,isSearch:!1,lessonCoursewareId:null,queryStr:e.query.search,source:e.query.source,search:e.query.search,tempSearch:e.query.search}),A=(0,o.KR)(),k=(0,r.EW)((()=>v.value[I.value])),B=(0,r.EW)((()=>k.value?.typeCode||k.value?.type)),R=(0,r.EW)((()=>{if("SONG"!==B.value)return"";const t={GYT:`${Nt.bq}?id=${k.value?.content}&modelType=practice&modeType=json&Authorization=${(0,Gt.gf)()}&isYjt=1`,GYM:`${Nt.ie}#/?id=${k.value?.content}&Authorization=${(0,Gt.gf)()}&platform=pc&isHideBack=true&isHideMusicList=true&isYjt=1&systemType=teacher`,KLX:`${Nt.O7}#/?id=${k.value?.content}&Authorization=${(0,Gt.gf)()}&platform=pc&isHideBack=true&isHideMusicList=true&isYjt=1&systemType=teacher`};return t[l.roles]})),I=(0,o.KR)(0),P=(0,o.KR)(!1),D=(0,o.KR)(!1),j=(0,o.KR)(!1),O=(0,o.KR)(0);async function M(t){const n={GYT:U.lM,GYM:U.hR,KLX:U.NK};await(0,W.xl)(n[l.roles],t||e.params.id).then((t=>{if(200===t.code){const{lockFlag:e,knowledgePointList:n,lessonTargetDesc:r,lessonCoursewareId:i}=t.data||{};if(e)return void tt.s.alert("课件已锁定","温馨提示",{confirmButtonText:"退出",type:"error"}).then((()=>{vt()})).catch((()=>{vt()}));if((n||[]).length<1)return void tt.s.alert("没有找到课件","温馨提示",{confirmButtonText:"退出",type:"error"}).then((()=>{vt()})).catch((()=>{vt()}));h.value=r?r.replace(/\n/g,"
"):"",w.lessonCoursewareId=i,N(n)}})),w.queryStr=null,w.lessonCoursewareId&&x("onlySearch",w.lessonCoursewareId)}async function x(t,n){const r={GYT:U.lt,GYM:U.up,KLX:U.u_};S&&S.abort(),S=new AbortController,w.loadingCourseWare=!0,await(0,W.TQ)(r[l.roles],{id:n||e.params.id,data:{search:w.queryStr,detailFlag:"1"},abortController:S}).then((e=>{if(w.loadingCourseWare=!1,200===e.code){const n=e.data||[];for(let t=0;t"):"",e.children=e.knowledgePointList||[],e.knowledgePointList=[]}if("onlySearch"===t)return void Z(n);N(n,w.isSearch);const r=v.value[I.value],i=r?r.parentData.ids[0]:"";if(i){const t=g.value.find((t=>t.id===i));t&&(h.value=t.lessonTargetDesc)}}w.isSearch=!1}))}function L(t){const n={GYT:$,GYM:z,KLX:q};(0,W.xl)(n[l.roles],{lessonCoursewareDetailId:t||e.params.id,courseScheduleId:e.query.modeId}).then((t=>{200===t.code&&(d.value=t.data||[])}))}(0,r.wB)(k,(()=>{"VIDEO"===B.value&&(0,r.dY)((()=>{at({src:k.value?.content,name:k.value?.name})})),gt()})),"search"===e.query.source?x():(M(),L());let G=[];function N(t,n){G=[];const r=Q(t);if(n)G[0]&&(A.value={...G[0],id:null});else{if(O.value=0,g.value=r,e.query.materialId){const t=G.findIndex((t=>e.query.materialId===t.id+""&&e.query.knowledgePointId===t.knowledgePointId+""));t>-1&&(I.value=t)}v.value=(0,E.A4)(G)}y.value=r,_.value=(0,E.A4)(G)}function Z(t){G=[];const e=Q(t);w.isSearch?(G[0]&&(A.value={...G[0],id:null}),y.value=e):(m.value=e,P.value&&(y.value=e))}function Q(t,e){return t.map((t=>t.children?Object.assign(t,{children:Q(t.children,{ids:[...e?.ids||[],t.id],name:t.name})}):Object.assign(t,{materialList:t.materialList.map((n=>(n.parentData={ids:[...e?.ids||[],t.id],name:t.name},G.push(n),n)))})))}function H(t){st(),rt();const e=t+I.value;if(!(e<0||e>v.value.length-1)){if("search"===w.source){const t=v.value[e],n=t?t.parentData?.ids[0]:"";if(n){const t=g.value.find((t=>t.id===n));t&&(h.value=t.lessonTargetDesc)}}I.value=e}}function Y(t){if("search"===w.source){w.search=w.tempSearch?JSON.parse(JSON.stringify(w.tempSearch)):"",g.value=(0,E.A4)(y.value),v.value=(0,E.A4)(_.value);const e=v.value.findIndex((e=>t.id===e.id&&t.knowledgePointId===e.knowledgePointId)),n=v.value[e],r=n?n.parentData?.ids[0]:"";if(r){const t=g.value.find((t=>t.id===r));t&&(h.value=t.lessonTargetDesc)}I.value=e,P.value=!1}else{const e=a.resolve({path:`/coursewarePlay/${w.lessonCoursewareId}`,query:{materialId:t.id,source:"search",knowledgePointId:t.knowledgePointId,search:w.tempSearch?JSON.parse(JSON.stringify(w.tempSearch)):""}}),n=window.location.origin+window.location.pathname+e.href;window.open(n)}}function et(t){const e=t.typeCode||t.type;"VIDEO"!==e&&st(),w.search=w.tempSearch?JSON.parse(JSON.stringify(w.tempSearch)):"",g.value=(0,E.A4)(y.value),v.value=(0,E.A4)(_.value);const n=v.value.findIndex((e=>t.id===e.id&&t.knowledgePointId===e.knowledgePointId));if("search"===w.source){const t=v.value[n],e=t?t.parentData?.ids[0]:"";if(e){const t=g.value.find((t=>t.id===e));t&&(h.value=t.lessonTargetDesc)}}I.value=n,D.value=!1}async function nt(t){T.value!==t.id&&(te.A.loading(!0),T.value=t.id,b.value=t.id===e.params.id,G=[],C.value=!0,w.isSearch=!1,await M(t.id),L(t.id),j.value=!1,I.value=0,(0,r.dY)((()=>{D.value=!0})),te.A.loading(!1))}function rt(){u.value?.contentWindow?.postMessage({api:"setPlayState"},"*"),gt()}function it(){c.value?.handlePlay(),gt()}function ot(t){c.value?.speedCurrentTime(t),gt()}function st(){c.value?.pauseVideo(),gt()}function at({src:t,name:e}){c.value?.playVideo({src:t,name:e}),gt()}function lt(t){t.preventDefault()}function ct(t){const e=t.key;D.value||j.value||P.value||(" "===e?((0,Ft.YZ)(),D.value=!1,"VIDEO"===B.value&&it()):"ArrowLeft"===e?((0,Ft.YZ)(),D.value=!1,"VIDEO"===B.value&&ot("slow")):"ArrowRight"===e?((0,Ft.YZ)(),D.value=!1,"VIDEO"===B.value&&ot("fast")):"ArrowDown"===e?((0,Ft.YZ)(),D.value=!1,H(1)):"ArrowUp"===e&&((0,Ft.YZ)(),D.value=!1,H(-1)))}function ut(t){"VIDEO"===B.value&&st(),"menu"===t?j.value=!0:"point"===t?(y.value=(0,E.A4)(g.value),A.value=null,D.value=!0):"search"===t&&("search"===w.source?(y.value=(0,E.A4)(g.value),A.value=null,w.queryStr=w.search?JSON.parse(JSON.stringify(w.search)):""):(y.value=(0,E.A4)(m.value),A.value={},w.tempSearch="",w.queryStr=""),P.value=!0)}function ht(){gt()}function pt(){"VIDEO"===B.value&&dt.value&&it(),gt()}(0,Zt.Q)(!0,!1),(0,r.sV)((()=>{document.addEventListener("keydown",ct),document.addEventListener("contextmenu",lt),gt()})),(0,r.hi)((()=>{document.removeEventListener("keydown",ct),document.removeEventListener("contextmenu",lt)}));const dt=(0,o.KR)(!0);let ft;function gt(){dt.value=!0,ft&&clearTimeout(ft),ft=setTimeout(yt,3e3)}function yt(){dt.value=!1}function vt(){a.options.history.state?.back?a.go(-1):window.close()}function _t(){e.query.modeId?"GYM"===l.roles?(0,W.Vi)(Lt._,e.query.modeId).then((t=>{200===t.code&&(3===t.data?.signOutStatusEnum?(0,Jt.A)({headImg:n(8984),text:"请确认是否结束课程,结束后请到APP进行签退。",btnShow:[!0,!0],onOk(){vt()}}):vt())})):"GYT"===l.roles&&(0,W.Vi)(K,e.query.modeId).then((t=>{200===t.code&&(!1===t.data?.signOut?(0,Jt.A)({headImg:n(8984),text:"请确认是否结束课程,结束后请到APP进行签退。",btnShow:[!0,!0],onOk(){vt()}}):vt())})):vt()}(0,r.wB)((()=>dt.value),(()=>{dt.value?ee.xZ.value=!1:(ee.xZ.value=!0,ee.dT.value=!1)})),(0,r.wB)((()=>[ee.g7.value,ee.zt.value]),(()=>{(ee.g7.value||ee.zt.value)&&(st(),rt())}));const bt=(0,r.EW)((()=>{const t=k.value?.materialRefs;return t?["GYM","KLX"].includes(l.roles)?t[0]?.resourceIdStr:t[0]?.resourceId:void 0})),Tt=(0,o.KR)(!1),Et=(0,o.KR)("");function Ct(t){const e={GYT:`${Nt.bq}?id=${t}&modelType=practice&modeType=json&Authorization=${(0,Gt.gf)()}&isYjt=1&&isHideBack=false`,GYM:`${Nt.ie}#/?id=${t}&Authorization=${(0,Gt.gf)()}&platform=pc&isYjt=1&systemType=teacher&isHideMusicList=true`,KLX:`${Nt.O7}#/?id=${t}&Authorization=${(0,Gt.gf)()}&platform=pc&isYjt=1&systemType=teacher&isHideMusicList=true`};Tt.value=!0,Et.value=e[l.roles]}function St(){Tt.value=!1,Et.value=""}function wt(t,e){Xt({headImg:n(3852)(`./${"phaseGoals"===t?"ts3":"ts4"}.png`),text:e,btnShow:[!1,!1]}),st()}function At(){w.loadingCourseWare||(w.isSearch=!0,w.tempSearch=w.queryStr?JSON.parse(JSON.stringify(w.queryStr)):"","search"===w.source?x():x("onlySearch",w.lessonCoursewareId))}return(t,a)=>{const g=(0,r.g2)("ElImage"),m=(0,r.g2)("el-empty"),_=(0,r.g2)("ElScrollbar"),T=(0,r.g2)("el-drawer"),E=(0,r.gN)("loading");return(0,r.uX)(),(0,r.CE)("div",{class:(0,i.C4)(["coursewarePlay",[!dt.value&&"hideController","SONG"===B.value&&"fileType_song"]])},[(0,r.Lk)("div",{class:"coursewarePlayCon",onMousemove:ht,onClick:pt,onTouchstart:pt},[(0,r.bo)((0,r.bF)((0,o.R1)(F),{ref_key:"videoPlayDom",ref:c,onEnded:a[0]||(a[0]=t=>H(1)),onLoadedmetadata:a[1]||(a[1]=()=>{C.value=!1}),autoPlay:!0,onPlaybackRate:gt,disableEvents:!0,isShowController:dt.value},null,8,["isShowController"]),[[s.aG,"VIDEO"===B.value]]),"IMG"===B.value?((0,r.uX)(),(0,r.CE)("div",re,[(0,r.bF)(g,{"hide-on-click-modal":!0,fit:"contain",src:k.value?.content,class:"imgPlay"},null,8,["src"])])):(0,r.Q3)("",!0),"SONG"===B.value?((0,r.uX)(),(0,r.CE)("div",ie,[((0,r.uX)(),(0,r.CE)("iframe",{ref_key:"songPlayDom",ref:u,key:k.value?.content,class:"songIframe",onMousemove:ht,src:R.value,frameborder:"0"},null,40,oe))])):(0,r.Q3)("",!0)],32),(0,r.Lk)("div",se,["search"!==w.source?((0,r.uX)(),(0,r.CE)("div",{key:0,class:"posBtn",onClick:a[2]||(a[2]=t=>ut("menu"))},le)):(0,r.Q3)("",!0),(0,r.Lk)("div",{class:"posBtn",onClick:a[3]||(a[3]=t=>ut("search"))},ue),"search"!==w.source?((0,r.uX)(),(0,r.CE)("div",{key:1,class:"posBtn",onClick:a[4]||(a[4]=t=>ut("point"))},pe)):(0,r.Q3)("",!0),(0,r.Lk)("div",{class:(0,i.C4)(["posBtn",I.value>0?"":"disabled"]),onClick:a[5]||(a[5]=()=>{I.value>0&&H(-1)})},fe,2),(0,r.Lk)("div",{class:(0,i.C4)(["posBtn",I.value{I.value{st(),Ct(bt.value)}),class:"goPracticeBtn"})):(0,r.Q3)("",!0),(0,r.Lk)("div",ye,[(0,r.Lk)("div",ve,[(0,r.Lk)("img",{onClick:vt,class:"backImg",src:p}),(0,r.Lk)("div",_e,[(0,r.Lk)("div",be,(0,i.v_)(k.value?.parentData.name||""),1),(0,r.Lk)("div",Te,[(0,r.Lk)("p",null,(0,i.v_)(k.value?.name||""),1),h.value?((0,r.uX)(),(0,r.CE)("span",{key:0,onClick:a[8]||(a[8]=t=>wt("phaseGoals",h.value))},"阶段目标")):(0,r.Q3)("",!0),k.value?.checkItem?((0,r.uX)(),(0,r.CE)("span",{key:1,onClick:a[9]||(a[9]=t=>wt("checkItem",k.value?.checkItem))},"检查事项")):(0,r.Q3)("",!0)])])]),(0,r.Lk)("div",Ee,[(0,o.R1)(e).query.modeId&&O.value&&"GYT"===(0,o.R1)(l).roles?((0,r.uX)(),(0,r.Wv)((0,o.R1)(Mt),{key:0,modeId:(0,o.R1)(e).query.modeId,isCurrentCoursewareMenu:b.value,coursewareTotalTime:O.value},null,8,["modeId","isCurrentCoursewareMenu","coursewareTotalTime"])):(0,r.Q3)("",!0)]),(0,r.Lk)("div",{class:"rightMenu"},[(0,r.Lk)("div",{class:"posCloseBtn",onClick:_t},Se)])]),(0,r.bF)(T,{class:"elDrawer elDrawerHeader",direction:"ltr",modelValue:P.value,"onUpdate:modelValue":a[11]||(a[11]=t=>P.value=t),"show-close":!1},{header:(0,r.k6)((({close:t})=>[(0,r.bF)((0,o.R1)(V.A),{class:"queryIpt",modelValue:w.queryStr,"onUpdate:modelValue":a[10]||(a[10]=t=>w.queryStr=t),height:36,placeholder:"请输入素材关键词",clearable:"",disabled:w.loadingCourseWare,onHandleQuery:At,onKeyup:(0,s.jR)(At,["enter"])},null,8,["modelValue","disabled","onKeyup"]),(0,r.Lk)("img",{class:"close",onClick:t,src:f},null,8,we)])),default:(0,r.k6)((()=>[(0,r.bo)(((0,r.uX)(),(0,r.Wv)(_,{class:"elScrollbar"},{default:(0,r.k6)((()=>[y.value.length||w.loadingCourseWare?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.Wv)(m,{key:0,class:"empty",image:n(3512),description:"暂无搜索结果"},null,8,["image"])),P.value?((0,r.uX)(),(0,r.Wv)((0,o.R1)(mt),{key:"courseSearch",activeCollapse:A.value||k.value,courseList:y.value,search:w.tempSearch||w.search,onHandleClick:Y},null,8,["activeCollapse","courseList","search"])):(0,r.Q3)("",!0)])),_:1})),[[E,w.loadingCourseWare]])])),_:1},8,["modelValue"]),(0,r.bF)(T,{class:"elDrawer",direction:"ltr",modelValue:D.value,"onUpdate:modelValue":a[12]||(a[12]=t=>D.value=t),"show-close":!1},{header:(0,r.k6)((({close:t})=>[Ae,ke,(0,r.Lk)("img",{class:"close",onClick:t,src:f},null,8,Be)])),default:(0,r.k6)((()=>[(0,r.bo)(((0,r.uX)(),(0,r.Wv)(_,{class:"elScrollbar"},{default:(0,r.k6)((()=>[y.value.length||w.loading?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.Wv)(m,{key:0,class:"empty",image:n(3512),description:"暂无搜索结果"},null,8,["image"])),D.value?((0,r.uX)(),(0,r.Wv)((0,o.R1)(mt),{key:"course",activeCollapse:k.value,courseList:y.value,onHandleClick:et},null,8,["activeCollapse","courseList"])):(0,r.Q3)("",!0)])),_:1})),[[E,w.loading]])])),_:1},8,["modelValue"]),(0,r.bF)(T,{class:"elDrawer elCourseMenu",direction:"ltr",modelValue:j.value,"onUpdate:modelValue":a[13]||(a[13]=t=>j.value=t),"show-close":!1},{header:(0,r.k6)((({close:t})=>[Re,Ie,(0,r.Lk)("img",{class:"close",onClick:t,src:f},null,8,Pe)])),default:(0,r.k6)((()=>[(0,r.bF)(_,{class:"elScrollbar"},{default:(0,r.k6)((()=>[(0,r.bF)((0,o.R1)(kt),{courseMenuList:d.value,onHandleClick:nt},null,8,["courseMenuList"])])),_:1})])),_:1},8,["modelValue"]),(0,r.bF)((0,o.R1)(xt.A),{modelValue:Tt.value,"onUpdate:modelValue":a[14]||(a[14]=t=>Tt.value=t),practiceUrl:Et.value,onClose:St},null,8,["modelValue","practiceUrl"])],2)}}});const je=(0,G.A)(De,[["__scopeId","data-v-316b9bb1"]]);var Oe=je,Me=Oe},6726:function(module,__unused_webpack_exports,__webpack_require__){__webpack_require__(8743),__webpack_require__(3492),__webpack_require__(4467),__webpack_require__(6736),__webpack_require__(6380),__webpack_require__(1059),__webpack_require__(2838),__webpack_require__(9078),function(t,e){module.exports=e()}(0,(function(){function unwrapExports(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t["default"]:t}function createCommonjsModule(t,e){return e={exports:{}},t(e,e.exports),e.exports}function each(t,e){keys(t).forEach((function(n){return e(t[n],n)}))}function reduce(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return keys(t).reduce((function(n,r){return e(n,t[r],r)}),n)}function assign(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i=document_1.createElement(t);return Object.getOwnPropertyNames(e).forEach((function(t){var n=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(log$2.warn(tsml(_templateObject,t,n)),i.setAttribute(t,n)):"textContent"===t?textContent(i,n):i[t]=n})),Object.getOwnPropertyNames(n).forEach((function(t){i.setAttribute(t,n[t])})),r&&appendContent(i,r),i}function textContent(t,e){return"undefined"==typeof t.textContent?t.innerText=e:t.textContent=e,t}function prependTo(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function hasClass(t,e){return throwIfWhitespace(e),t.classList?t.classList.contains(e):classRegExp(e).test(t.className)}function addClass(t,e){return t.classList?t.classList.add(e):hasClass(t,e)||(t.className=(t.className+" "+e).trim()),t}function removeClass(t,e){return t.classList?t.classList.remove(e):(throwIfWhitespace(e),t.className=t.className.split(/\s+/).filter((function(t){return t!==e})).join(" ")),t}function toggleClass(t,e,n){var r=hasClass(t,e);if("function"==typeof n&&(n=n(t,e)),"boolean"!=typeof n&&(n=!r),n!==r)return n?addClass(t,e):removeClass(t,e),t}function setAttributes(t,e){Object.getOwnPropertyNames(e).forEach((function(n){var r=e[n];null===r||void 0===r||!1===r?t.removeAttribute(n):t.setAttribute(n,!0===r?"":r)}))}function getAttributes(t){var e={};if(t&&t.attributes&&t.attributes.length>0)for(var n=t.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,o=n[r].value;"boolean"!=typeof t[i]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+",")||(o=null!==o),e[i]=o}return e}function getAttribute(t,e){return t.getAttribute(e)}function setAttribute(t,e,n){t.setAttribute(e,n)}function removeAttribute(t,e){t.removeAttribute(e)}function blockTextSelection(){document_1.body.focus(),document_1.onselectstart=function(){return!1}}function unblockTextSelection(){document_1.onselectstart=function(){return!0}}function getBoundingClientRect(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach((function(t){void 0!==e[t]&&(n[t]=e[t])})),n.height||(n.height=parseFloat(computedStyle(t,"height"))),n.width||(n.width=parseFloat(computedStyle(t,"width"))),n}}function findPosition(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var n=document_1.documentElement,r=document_1.body,i=n.clientLeft||r.clientLeft||0,o=window_1.pageXOffset||r.scrollLeft,s=e.left+o-i,a=n.clientTop||r.clientTop||0,l=window_1.pageYOffset||r.scrollTop,c=e.top+l-a;return{left:Math.round(s),top:Math.round(c)}}function getPointerPosition(t,e,n){var r={},i=findPosition(t),o=t.offsetWidth,s=t.offsetHeight,a=i.top,l=i.left,c=e.pageY,u=e.pageX;if(e.changedTouches&&(u=e.changedTouches[0].pageX,c=e.changedTouches[0].pageY),n){var h=[c,u];u=h[0],c=h[1]}return r.y=Math.max(0,Math.min(1,(a-c+s)/s)),r.x=Math.max(0,Math.min(1,(u-l)/o)),r}function isTextNode(t){return isObject$1(t)&&3===t.nodeType}function emptyEl(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function normalizeContent(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map((function(t){return"function"==typeof t&&(t=t()),isEl(t)||isTextNode(t)?t:"string"==typeof t&&/\S/.test(t)?document_1.createTextNode(t):void 0})).filter((function(t){return t}))}function appendContent(t,e){return normalizeContent(e).forEach((function(e){return t.appendChild(e)})),t}function insertContent(t,e){return appendContent(emptyEl(t),e)}function isSingleLeftClick(t){return void 0===t.button&&void 0===t.buttons||0===t.button&&void 0===t.buttons||9===IE_VERSION||0===t.button&&1===t.buttons}function newGUID(){return _guid++}function getData(t){var e=t[elIdAttr];return e||(e=t[elIdAttr]=newGUID()),elData[e]||(elData[e]={}),elData[e]}function hasData(t){var e=t[elIdAttr];return!!e&&!!Object.getOwnPropertyNames(elData[e]).length}function removeData(t){var e=t[elIdAttr];if(e){delete elData[e];try{delete t[elIdAttr]}catch(n){t.removeAttribute?t.removeAttribute(elIdAttr):t[elIdAttr]=null}}}function _cleanUpEvents(t,e){var n=getData(t);0===n.handlers[e].length&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&removeData(t)}function _handleMultipleEvents(t,e,n,r){n.forEach((function(n){t(e,n,r)}))}function fixEvent(t){function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped){var r=t||window_1.event;for(var i in t={},r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(t[i]=r[i]));if(t.target||(t.target=t.srcElement||document_1),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&void 0!==t.clientX){var o=document_1.documentElement,s=document_1.body;t.pageX=t.clientX+(o&&o.scrollLeft||s&&s.scrollLeft||0)-(o&&o.clientLeft||s&&s.clientLeft||0),t.pageY=t.clientY+(o&&o.scrollTop||s&&s.scrollTop||0)-(o&&o.clientTop||s&&s.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}function on(t,e,n){if(Array.isArray(e))return _handleMultipleEvents(on,t,e,n);var r=getData(t);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),n.guid||(n.guid=newGUID()),r.handlers[e].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(e,n){if(!r.disabled){e=fixEvent(e);var i=r.handlers[e.type];if(i)for(var o=i.slice(0),s=0,a=o.length;s-1&&(i={passive:!0}),t.addEventListener(e,r.dispatcher,i)}else t.attachEvent&&t.attachEvent("on"+e,r.dispatcher)}function off(t,e,n){if(hasData(t)){var r=getData(t);if(r.handlers){if(Array.isArray(e))return _handleMultipleEvents(off,t,e,n);var i=function(t,e){r.handlers[e]=[],_cleanUpEvents(t,e)};if(void 0!==e){var o=r.handlers[e];if(o){if(!n)return void i(t,e);if(n.guid)for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:{},n=e.eventBusKey;if(n){if(!t[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');t.eventBusEl_=t[n]}else t.eventBusEl_=createEl("span",{className:"vjs-event-bus"});return assign(t,EventedMixin),t.on("dispose",(function(){t.off(),window_1.setTimeout((function(){t.eventBusEl_=null}),0)})),t}function stateful(t,e){return assign(t,StatefulMixin),t.state=assign({},t.state,e),"function"==typeof t.handleStateChanged&&isEvented(t)&&t.on("statechanged",t.handleStateChanged),t}function toTitleCase(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function titleCaseEquals(t,e){return toTitleCase(t)===toTitleCase(e)}function mergeOptions(){for(var t={},e=arguments.length,n=Array(e),r=0;r-1}function listCacheSet(t,e){var n=this.__data__,r=_assocIndexOf(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ListCache(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1)t=t.replace(".sdp",".flv"),e.push(t.replace(".sdp",".m3u8"));else{var n=t.replace("webrtc://","https://").replace("?",".flv?");-1===n.indexOf("?")&&-1===n.indexOf(".flv")&&(n+=".flv"),hlsSrc=t.replace("webrtc://","https://").replace("?",".m3u8?"),-1===hlsSrc.indexOf("?")&&-1===hlsSrc.indexOf(".m3u8")&&(hlsSrc+=".m3u8"),e.push(hlsSrc)}return e}function replaceHost(t,e){var n=/^http(s)?:\/\/(.*?)\//,r=t.match(n);return t.replace(r[2],e)}function getViewportSize(){var t=document,e=t.documentElement,n=t.body;return{width:e&&e.clientWidth||n&&n.offsetWidth||window.innerWidth||0,height:e&&e.clientHeight||n&&n.offsetHeight||window.innerHeight||0}}function getTimeStamp(){return(new Date).getTime()}function getTimeStampBySecond(){return Date.parse(new Date)/1e3}function loadCssText(t,e){var n=document.getElementById(t);if(n)n.innerHTML=e;else{var r=document.createElement("style");r.id=t,r.type="text/css",r.appendChild(document.createTextNode(e)),document.getElementsByTagName("head")[0].appendChild(r)}}function releaseCssText(t){var e=document.getElementById(t);e&&e.remove()}function loadScript(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=document.createElement("script");if(i.onload=i.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||("function"==typeof e&&e(),i.onload=i.onreadystatechange=null,i.parentNode&&!r&&i.parentNode.removeChild(i))},n)for(var o in n)if(n.hasOwnProperty(o)){var s=n[o];null===s?i.removeAttribute(s):i.setAttribute(o,s)}i.src=t,document.getElementsByTagName("head")[0].appendChild(i)}function serializeParams(t){var e=[],n=function(t,n){n="function"==typeof n?n():n,n=null===n||void 0===n?"":n,e[e.length]=encodeURIComponent(t)+"="+encodeURIComponent(n)};return function t(r,i){var o=void 0,s=void 0,a=void 0;if(r)if(Array.isArray(i))for(o=0,s=i.length;o/g,">").replace(/\"/g,""").replace(/\'/g,"'").replace(/\//g,"/"):""}function isWebrtcUrl(t){return/webrtc:\/\//.test(t)||/\.sdp/.test(t)}function getperformance(){return window.performance||window.msPerformance||window.webkitPerformance||{}}function arrangeWebrtcSource(t,e){var n=getParams("tabr_bitrates",t),r=getParams("tabr_start_bitrate",t),i="auto"===getParams("tabr_control",t);t=t.replace("&tabr_control=auto","");var o=[],s=[];if(n&&r){var a;if(s=n.split(",").map((function(n){var i,s=e.webrtcConfig.abrLabels[n]||n;return o.push(s),i={},i[s]=[{src:t.replace("tabr_start_bitrate="+r,"tabr_start_bitrate="+n)}],i})),i)s.push((a={},a[e.webrtcConfig.abrLabels.auto||"AUTO"]=[{src:t+"&tabr_control=auto"}],a)),o.push(e.webrtcConfig.abrLabels.auto||"AUTO");var l={};s.forEach((function(t){for(var e in t)l[e]=t[e]})),e.showOrder=o,e.defaultRes=i?e.webrtcConfig.abrLabels.auto||"AUTO":e.webrtcConfig.abrLabels[r]||r||o[0];var c={};o.forEach((function(t){c[t]=e.webrtcConfig.abrLabels[t]||t})),e.labels=c,e.label=c,e.sources=[],e.multiResolution={sources:l}}}function rangeCheck(t,e,n){if("number"!=typeof e||e<0||e>n)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+n+").")}function getRange(t,e,n,r){return rangeCheck(t,r,n.length-1),n[r][e]}function createTimeRangesObj(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:getRange.bind(null,"start",0,t),end:getRange.bind(null,"end",1,t)}}function createTimeRanges(t,e){return Array.isArray(t)?createTimeRangesObj(t):void 0===t||void 0===e?createTimeRangesObj():createTimeRangesObj([[t,e]])}function bufferedPercent(t,e){var n=0,r=void 0,i=void 0;if(!e)return 0;t&&t.length||(t=createTimeRanges(0,0));for(var o=0;oe&&(i=e),n+=i-r;return n/e}function MediaError(t){if(t instanceof MediaError)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:isObject$1(t)&&("number"==typeof t.code&&(this.code=t.code),assign(this,t)),this.message||(this.message=MediaError.defaultMessages[this.code]||"")}function SafeParseTuple(t,e){var n,r=null;try{n=JSON.parse(t,e)}catch(i){r=i}return[r,n]}function isPromise(t){return void 0!==t&&"function"==typeof t.then}function silencePromise(t){isPromise(t)&&t.then(null,(function(t){}))}function isFunction$3(t){if(!t)return!1;var e=toString$3.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}function extend$1(){for(var t={},e=0;e0&&(u=setTimeout((function(){if(!c){c=!0,a.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}}),t.timeout)),a.setRequestHeader)for(l in f)f.hasOwnProperty(l)&&a.setRequestHeader(l,f[l]);else if(t.headers&&!isEmpty(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(a.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(a),a.send(d||null),a}function getXml(t){if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;return""!==t.responseType||e?null:t.responseXML}function noop(){}function ParsingError(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function parseTimeStamp(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+(0|r)/1e3}var n=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?e(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?e(n[1],n[2],0,n[4]):e(0,n[1],n[2],n[4]):null}function Settings(){this.values=_objCreate(null)}function parseOptions(t,e,n,r){var i=r?t.split(r):[t];for(var o in i)if("string"==typeof i[o]){var s=i[o].split(n);if(2===s.length){var a=s[0],l=s[1];e(a,l)}}}function parseCue(t,e,n){function r(){var e=parseTimeStamp(t);if(null===e)throw new ParsingError(ParsingError.Errors.BadTimeStamp,"Malformed timestamp: "+o);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function i(){t=t.replace(/^\s+/,"")}var o=t;if(i(),e.startTime=r(),i(),"--\x3e"!==t.substr(0,3))throw new ParsingError(ParsingError.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);t=t.substr(3),i(),e.endTime=r(),i(),function(t,e){var r=new Settings;parseOptions(t,(function(t,e){switch(t){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===e){r.set(t,n[i].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":var o=e.split(","),s=o[0];r.integer(t,s),r.percent(t,s)&&r.set("snapToLines",!1),r.alt(t,s,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","middle","end"]);break;case"position":o=e.split(","),r.percent(t,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","middle","end"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start","middle","end","left","right"])}}),/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical",""),e.line=r.get("line","auto"),e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align","middle"),e.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},e.align),e.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},e.align)}(t,e)}function parseContent(t,e){function n(t){return ESCAPE[t]}for(var r,i=t.document.createElement("div"),o=i,s=[];null!==(r=function(){if(!e)return null;var t=e.match(/^([^<]*)(<[^>]+>?)?/);return function(t){return e=e.substr(t.length),t}(t[1]?t[1]:t[2])}());)if("<"!==r[0])o.appendChild(t.document.createTextNode(function(t){for(;c=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t=t.replace(c[0],n);return t}(r)));else{if("/"===r[1]){s.length&&s[s.length-1]===r.substr(2).replace(">","")&&(s.pop(),o=o.parentNode);continue}var a,l=parseTimeStamp(r.substr(1,r.length-2));if(l){a=t.document.createProcessingInstruction("timestamp",l),o.appendChild(a);continue}var c=r.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!c)continue;if(!(a=function(e,n){var r=TAG_NAME[e];if(!r)return null;var i=t.document.createElement(r);i.localName=r;var o=TAG_ANNOTATION[e];return o&&n&&(i[o]=n.trim()),i}(c[1],c[3])))continue;if(!function(t,e){return!NEEDS_PARENT[e.localName]||NEEDS_PARENT[e.localName]===t.localName}(o,a))continue;c[2]&&(a.className=c[2].substr(1).replace("."," ")),s.push(c[1]),o.appendChild(a),o=a}return i}function isStrongRTLChar(t){for(var e=0;e=n[0]&&t<=n[1])return!0}return!1}function determineBidi(t){function e(t,e){for(var n=e.childNodes.length-1;n>=0;n--)t.push(e.childNodes[n])}function n(t){if(!t||!t.length)return null;var r=t.pop(),i=r.textContent||r.innerText;if(i){var o=i.match(/^.*(\n|\r)/);return o?(t.length=0,o[0]):i}return"ruby"===r.tagName?n(t):r.childNodes?(e(t,r),n(t)):void 0}var r,i=[],o="";if(!t||!t.childNodes)return"ltr";for(e(i,t);o=n(i);)for(var s=0;s=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,n=e.textTrackList,r=0,i=0;ih&&(u=u<0?-1:1,u*=Math.ceil(h/c)*c),s<0&&(u+=""===o.vertical?n.height:n.width,a=a.reverse()),i.move(p,u)}else{var d=i.lineHeight/n.height*100;switch(o.lineAlign){case"middle":s-=d/2;break;case"end":s-=d}switch(o.vertical){case"":e.applyStyles({top:e.formatStyle(s,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(s,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(s,"%")})}a=["+y","-x","+x","-y"],i=new BoxPosition(e)}var f=function(t,e){for(var i,o=new BoxPosition(t),s=1,a=0;al&&(i=new BoxPosition(t),s=l),t=new BoxPosition(o)}return i||o}(i,a);e.move(f.toCSSCompatValues(n))}function WebVTT$1(){}function findDirectionSetting(t){return"string"==typeof t&&!!directionSetting[t.toLowerCase()]&&t.toLowerCase()}function findAlignSetting(t){return"string"==typeof t&&!!alignSetting[t.toLowerCase()]&&t.toLowerCase()}function extend$2(t){for(var e=1;e100)throw new Error("Position must be between 0 and 100.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"positionAlign",extend$2({},o,{get:function(){return y},set:function(t){var e=findAlignSetting(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"size",extend$2({},o,{get:function(){return v},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");v=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"align",extend$2({},o,{get:function(){return _},set:function(t){var e=findAlignSetting(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");_=e,this.hasBeenReset=!0}})),r.displayState=void 0,i)return r}function findScrollSetting(t){return"string"==typeof t&&!!scrollSetting[t.toLowerCase()]&&t.toLowerCase()}function isValidPercentValue(t){return"number"==typeof t&&t>=0&&t<=100}function VTTRegion(){var t=100,e=3,n=0,r=100,i=0,o=100,s="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!isValidPercentValue(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(t){if(!isValidPercentValue(t))throw new Error("RegionAnchorX must be between 0 and 100.");r=t}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(t){if(!isValidPercentValue(t))throw new Error("RegionAnchorY must be between 0 and 100.");n=t}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!isValidPercentValue(t))throw new Error("ViewportAnchorY must be between 0 and 100.");o=t}},viewportAnchorX:{enumerable:!0,get:function(){return i},set:function(t){if(!isValidPercentValue(t))throw new Error("ViewportAnchorX must be between 0 and 100.");i=t}},scroll:{enumerable:!0,get:function(){return s},set:function(t){var e=findScrollSetting(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");s=e}}})}function createTrackHelper(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;var s=new ALL.text.TrackClass(i);return o.addTrack(s),s}function use(t,e){middlewares[t]=middlewares[t]||[],middlewares[t].push(e)}function setSource(t,e,n){t.setTimeout((function(){return setSourceHelper(e,middlewares[e.type],n,t)}),1)}function setTech(t,e){t.forEach((function(t){return t.setTech&&t.setTech(e)}))}function get$3(t,e,n){return t.reduceRight(middlewareIterator(n),e[n]())}function set$1(t,e,n,r){return e[n](t.reduce(middlewareIterator(n),r))}function middlewareIterator(t){return function(e,n){return n[t]?n[t](e):e}}function setSourceHelper(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],r=arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=e[0],a=e.slice(1);if("string"==typeof s)setSourceHelper(t,middlewares[s],n,r,i,o);else if(s){var l=s(r);l.setSource(assign({},t),(function(e,s){if(e)return setSourceHelper(t,a,n,r,i,o);i.push(l),setSourceHelper(s,t.type===s.type?a:middlewares[s.type],n,r,i,o)}))}else a.length?setSourceHelper(t,a,n,r,i,o):o?n(t,i):setSourceHelper(t,middlewares["*"],n,r,i,!0)}function constructColor(t,e){return"rgba("+parseInt(t[1]+t[1],16)+","+parseInt(t[2]+t[2],16)+","+parseInt(t[3]+t[3],16)+","+e+")"}function tryUpdateStyle(t,e,n){try{t.style[e]=n}catch(i){return}}function formatTime(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;t=t<0?0:t;var n=Math.floor(t%60),r=Math.floor(t/60%60),i=Math.floor(t/3600),o=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(i=r=n="-"),i=i>0||s>0?i+":":"",r=((i||o>=10)&&r<10?"0"+r:r)+":",n=n<10?"0"+n:n,i+r+n}function formatDate(t,e){if(!t)return"";var n=new Date(t),r=n.getFullYear(),i=n.getMonth()+1,o=n.getDate(),s=n.getHours(),a=n.getMinutes();return n.getSeconds(),r+"/"+i+"/"+o+" "+s+":"+(a<10?"0"+a:a)}function parseOptionValue(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}function getSelectedOptionValue(t,e){return parseOptionValue(t.options[t.options.selectedIndex].value,e)}function setSelectedOption(t,e,n){if(e)for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",n=t,r="draw-"+e;return['\n \n \n ','\n \n \n ','\n \n \n '][n]}function trimmedEndIndex(t){for(var e=t.length;e--&&reWhitespace.test(t.charAt(e)););return e}function baseTrim(t){return t?t.slice(0,_trimmedEndIndex(t)+1).replace(reTrimStart,""):t}function toNumber(t){if("number"==typeof t)return t;if(isSymbol_1(t))return NAN;if(isObject_1(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=isObject_1(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=_baseTrim(t);var n=reIsBinary.test(t);return n||reIsOctal.test(t)?freeParseInt(t.slice(2),n?2:8):reIsBadHex.test(t)?NAN:+t}function debounce(t,e,n){function r(e){var n=p,r=d;return p=d=void 0,v=e,g=t.apply(r,n)}function i(t){return v=t,m=setTimeout(a,e),_?r(t):g}function o(t){var n=t-y,r=t-v,i=e-n;return b?nativeMin(i,f-r):i}function s(t){var n=t-y,r=t-v;return void 0===y||n>=e||n<0||b&&r>=f}function a(){var t=now_1();if(s(t))return l(t);m=setTimeout(a,o(t))}function l(t){return m=void 0,T&&p?r(t):(p=d=void 0,g)}function c(){void 0!==m&&clearTimeout(m),v=0,p=y=d=m=void 0}function u(){return void 0===m?g:l(now_1())}function h(){var t=now_1(),n=s(t);if(p=arguments,d=this,y=t,n){if(void 0===m)return i(y);if(b)return clearTimeout(m),m=setTimeout(a,e),r(y)}return void 0===m&&(m=setTimeout(a,e)),g}var p,d,f,g,m,y,v=0,_=!1,b=!1,T=!0;if("function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT$2);return e=toNumber_1(e)||0,isObject_1(n)&&(_=!!n.leading,b="maxWait"in n,f=b?nativeMax(toNumber_1(n.maxWait)||0,e):f,T="trailing"in n?!!n.trailing:T),h.cancel=c,h.flush=u,h}function throttle$1(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError(FUNC_ERROR_TEXT$1);return isObject_1(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),debounce_1(t,e,{leading:r,maxWait:e,trailing:i})}function mountFlvProvider(t){if(videojs.browser.IS_IOS&&videojs.browser.IS_MQQ)return!1;if(!videojs.browser.IS_TBS&&!videojs.browser.IS_MQQB&&(!IS_IOS||!videojs.browser.IS_SAFARI)&&!videojs.browser.IE_VERSION||t)try{var e=videojs.getTech&&videojs.getTech("Html5");e&&e.registerSourceHandler(FlvSourceHandler,0)}catch(n){}}function mountWebRTCProvider(t){if(!videojs.browser.isWebRTCSupported())return!1;try{var e=videojs.getTech&&videojs.getTech("Html5");e&&e.registerSourceHandler(sourceHandler,0)}catch(n){}}function FlashRtmpDecorator(t){return t.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},t.streamFromParts=function(t,e){return t+"&"+e},t.streamToParts=function(t){var e={connection:"",stream:""};if(!t)return e;var n=t.search(/&(?!\w+=)/),r=void 0;return-1!==n?r=n+1:0===(n=r=t.lastIndexOf("/")+1)&&(n=r=t.length),e.connection=t.substring(0,n),e.stream=t.substring(r,t.length),e},t.isStreamingType=function(e){return e in t.streamingFormats},t.RTMP_RE=/^rtmp[set]?:\/\//i,t.isStreamingSrc=function(e){return t.RTMP_RE.test(e)},t.rtmpSourceHandler={},t.rtmpSourceHandler.canPlayType=function(e){return t.isStreamingType(e)?"maybe":""},t.rtmpSourceHandler.canHandleSource=function(e,n){var r=t.rtmpSourceHandler.canPlayType(e.type);return r||(t.isStreamingSrc(e.src)?"maybe":"")},t.rtmpSourceHandler.handleSource=function(e,n,r){var i=t.streamToParts(e.src);n.setRtmpConnection(i.connection),n.setRtmpStream(i.stream)},t.registerSourceHandler(t.rtmpSourceHandler),t}function _createSetter(t){var e=t.charAt(0).toUpperCase()+t.slice(1);_api["set"+e]=function(e){return this.el_.vjs_setProperty(t,e)}}function _createGetter(t){_api[t]=function(){return this.el_.vjs_getProperty(t)}}function TCPlayer(t,e,n){var r=void 0,i=(new Date).getTime(),o=videojs.dom;if("string"==typeof t)r=document.querySelector("#"+t);else{if(!t||!t.nodeName)throw new TypeError("The ID or element supplied is not valid.");r=t}if("video"!=r.nodeName.toLowerCase()&&"audio"!=r.nodeName.toLowerCase())throw new TypeError("The element type must be