@viewlift/player-backup 2.0.177-backup → 2.0.179-backup

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/cjs/{autoNextVideo-2085c497.js → autoNextVideo-bc0a05c7.js} +1 -1
  2. package/cjs/bundle.css +5 -5
  3. package/cjs/{features-a73e5a86.js → features-a7f997c8.js} +1 -1
  4. package/cjs/generic-bf563349.js +1 -0
  5. package/cjs/{index-2dcf677b.js → index-27232eb2.js} +1 -1
  6. package/cjs/{index-cffe2d41.js → index-a09c567a.js} +1 -1
  7. package/cjs/index.js +1 -1
  8. package/cjs/{multicamv2-544f03f0.js → multicamv2-165f4041.js} +1 -1
  9. package/cjs/{multicamv2-864c5b70.js → multicamv2-e8cc251e.js} +1 -1
  10. package/cjs/{nextEpisodeButton-48d3552a.js → nextEpisodeButton-808f7163.js} +1 -1
  11. package/cjs/{playlist-08274536.js → playlist-64d1771d.js} +1 -1
  12. package/cjs/{series-1f5de79f.js → series-e2d11a22.js} +1 -1
  13. package/cjs/{series-v2-d8ea49db.js → series-v2-18b3d56c.js} +1 -1
  14. package/cjs/{series-v2-5fa17e42.js → series-v2-d8fca819.js} +1 -1
  15. package/cjs/{skin-2e8f08b9.js → skin-0f7b10cc.js} +1 -1
  16. package/cjs/{skin-f858aecb.js → skin-16961a6a.js} +1 -1
  17. package/cjs/{skin-0ea8fc5a.js → skin-3ecf0fab.js} +1 -1
  18. package/cjs/{skin-48475e60.js → skin-5d81e632.js} +1 -1
  19. package/cjs/{skin-764adc22.js → skin-889b74f7.js} +1 -1
  20. package/cjs/{skin-6626094d.js → skin-c617bf47.js} +1 -1
  21. package/cjs/{skin-da915d8c.js → skin-ca9323ac.js} +1 -1
  22. package/cjs/{util-671b0bcf.js → util-f0568233.js} +1 -1
  23. package/cjs/{videoSelector-7d1d3f8a.js → videoSelector-6802eba9.js} +1 -1
  24. package/cjs/{videoSelector-ed36a28d.js → videoSelector-e6f77035.js} +1 -1
  25. package/esm/{autoNextVideo-a7610b13.js → autoNextVideo-f2ccde1b.js} +1 -1
  26. package/esm/bundle.css +5 -5
  27. package/esm/{features-d501d205.js → features-c923566c.js} +1 -1
  28. package/esm/generic-84709fe2.js +1 -0
  29. package/esm/{index-1d0c78b9.js → index-af14ddfb.js} +1 -1
  30. package/esm/{index-23e8568d.js → index-b9eca306.js} +1 -1
  31. package/esm/index.js +1 -1
  32. package/esm/{multicamv2-3388f3a6.js → multicamv2-5cae5a81.js} +1 -1
  33. package/esm/{multicamv2-cb1564c5.js → multicamv2-eafe4114.js} +1 -1
  34. package/esm/{nextEpisodeButton-1662c917.js → nextEpisodeButton-351ed2c3.js} +1 -1
  35. package/esm/{playlist-f4355fad.js → playlist-3ed2b64c.js} +1 -1
  36. package/esm/{series-7b60bec2.js → series-1c512f54.js} +1 -1
  37. package/esm/{series-v2-0a86d417.js → series-v2-5200d6c0.js} +1 -1
  38. package/esm/{series-v2-c0be9e78.js → series-v2-872d21bf.js} +1 -1
  39. package/esm/{skin-55eae6d3.js → skin-25684313.js} +1 -1
  40. package/esm/{skin-0c88b0ea.js → skin-34089dc0.js} +1 -1
  41. package/esm/{skin-d8e1c7dc.js → skin-4a9da864.js} +1 -1
  42. package/esm/{skin-1bc59f9a.js → skin-85b48402.js} +1 -1
  43. package/esm/{skin-da0c5ace.js → skin-8ab40032.js} +1 -1
  44. package/esm/{skin-f5cf4088.js → skin-b96bbf35.js} +1 -1
  45. package/esm/{skin-95af97fb.js → skin-df244736.js} +1 -1
  46. package/esm/{util-2cff93e3.js → util-25a64b95.js} +1 -1
  47. package/esm/{videoSelector-cb712785.js → videoSelector-ad1cb7d6.js} +1 -1
  48. package/esm/{videoSelector-300977a9.js → videoSelector-b5c4e8fd.js} +1 -1
  49. package/package.json +1 -1
  50. package/cjs/generic-61792002.js +0 -1
  51. package/esm/generic-b3cb59a6.js +0 -1
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import{g as t}from"./player_instance-34118a5b.js";import{j as n,g as r,a as i}from"./currentVideoInfo-a8a254c2.js";import{s as o}from"./autoNextVideo-a7610b13.js";import{e as a}from"./icons-37daa6b3.js";import{p as l,d as u,t as s}from"./skin-d5091b86.js";import c from"@babel/runtime/helpers/typeof";import d from"video.js";import p from"@babel/runtime/helpers/asyncToGenerator";import m from"@babel/runtime/regenerator";import v from"@babel/runtime/helpers/defineProperty";import f from"@babel/runtime/helpers/slicedToArray";var g,h,b,y,x=[],w=!1,E=function(i,o){var s;if(w=!1,null!=o&&null!==(s=o.series)&&void 0!==s&&s.enable){var c;x=[];var d=r();null==d||d.map((function(t){var n;return(n=x).push.apply(n,e(t.episodes))})),null==o||null===(c=o.series)||void 0===c||c.cb}else{var p,m;x=(null==o||null===(p=o.relatedVideos)||void 0===p?void 0:p.content)||[],null==o||null===(m=o.relatedVideos)||void 0===m||m.cb}var v=t(i);v.on("timeupdate",(function(){var e,t;if(!w){var r=Math.floor(v.currentTime()),i=v.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n()<=(null===(t=x)||void 0===t?void 0:t.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}}));var f,g=x.filter((function(e,t){return t==n()}));if((null==g?void 0:g.length)>0)if(null!==(f=document.getElementsByClassName("next-ep-preview"))&&void 0!==f&&f[0]){var h,b,y,E,N,j,k,C,O,T,I,B;(null===(h=document.getElementsByClassName("next-ep-preview"))||void 0===h?void 0:h[0]).style.visibility="hidden";var L=null===(b=document.getElementsByClassName("next-ep-title"))||void 0===b?void 0:b[0],S=null===(y=document.getElementsByClassName("next-ep-img"))||void 0===y?void 0:y[0],M=null===(E=document.getElementsByClassName("next-ep-content"))||void 0===E?void 0:E[0],P=null===(N=g[0])||void 0===N?void 0:N.title;(null===(j=P)||void 0===j?void 0:j.length)>60&&(P=P.substr(0,60)+"..."),L.textContent="".concat(P),S.src=(null===(k=g[0])||void 0===k||null===(C=k.gist)||void 0===C||null===(O=C.imageGist)||void 0===O?void 0:O.r16x9)||(null==g||null===(T=g[0])||void 0===T?void 0:T.img)||(null===(I=window)||void 0===I||null===(B=I.customData)||void 0===B?void 0:B.fallbackImage),M.onclick=function(){return A(i)}}else{var R,D,$,X,F,U,_,G,q=document.createElement("div");q.className="next-ep-preview",q.style.visibility="hidden",document.getElementById(i).append(q);var V=document.createElement("div");V.className="next-heading-wrapper";var W=document.createElement("div");W.className="next-ep-header",W.textContent="Next up";var z=document.createElement("div");z.className="next-ep-close",z.onclick=function(){q.style.visibility="hidden",w=!0},z.appendChild(l(a())),V.append(W),V.append(z);var H=null===(R=g[0])||void 0===R?void 0:R.title,Q=document.createElement("img");Q.className="next-ep-img",Q.src=(null===(D=g[0])||void 0===D||null===($=D.gist)||void 0===$||null===(X=$.imageGist)||void 0===X?void 0:X.r16x9)||(null==g||null===(F=g[0])||void 0===F?void 0:F.img)||(null===(U=window)||void 0===U||null===(_=U.customData)||void 0===_?void 0:_.fallbackImage);var Y=document.createElement("div");Y.className="next-ep-title",(null===(G=H)||void 0===G?void 0:G.length)>60&&(H=H.substr(0,60)+"..."),Y.textContent="".concat(H);var J=document.createElement("div");J.className="next-ep-content",J.append(Q),J.append(Y),J.onclick=u((function(){null==q||q.remove(),w=!0,A(i)}),400),q.append(V),q.append(J)}},A=function(e,r){var i=t(e),a=Math.floor(i.currentTime());if(Math.floor(i.duration())!=a){i.pause(e);var l=n();o(l,e,x)}};function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}g={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},h=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===c(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},b=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},y=function e(t){return"HTML"!==t.nodeName&&"static"===b(t)("position")?e(t.offsetParent):t},d.registerPlugin("thumbnails",(function(e){var t,n,r,i,o,a,l,u;function s(){document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",s),u()}n=h({},g,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),t.appendChild(r),r.src=n[0].src,r.className="vjs-thumbnail",h(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",(function(e){a=i.duration()})),i.on("loadedmetadata",(function(e){a=i.duration()})),(o=i.controlBar.progressControl).el().appendChild(t),l=function(e){var i,l,u,s,c,d,p,m,v,f;for(l in u=0,v=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,p=((f=y(o.el()).getBoundingClientRect()).width||f.right)+v,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=y(o.el()).getBoundingClientRect().left+v,i=Math.floor((s-o.el().offsetLeft)/o.width()*a),n)i>l&&(u=Math.max(u,l));(c=n[u]).src&&r.src!=c.src&&(r.src=c.src),c.style&&r.style!=c.style&&h(r.style,c.style),s+(m=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=b(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,c.width||n[0].width)/2)>p?s-=s+m-p:s<m&&(s=m),t.style.left=s+"px"},o.on("mousemove",l),o.on("touchmove",l),o.on("pointerdown",(function(e){document.addEventListener("pointermove",l),document.addEventListener("pointerup",s)})),u=function(e){t.style.left="-1000px"},o.on("mouseout",u),o.on("touchcancel",u),o.on("touchend",u),i.on("userinactive",u)}));var k="my-player";function C(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function O(){return(O=p(m.mark((function e(t){var n,r,i,o,a,l,u,s,c,d,p,v,g,h,b,y,x,w,E,A,N,j,k,C;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,o=t.layout.split("x").map(Number),a=f(o,2),l=a[0],u=a[1],s=i.width/u,c=i.height/l,d=[],p=0;p<l;p++)for(v=0;v<u;v++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,v*s,p*c,s,c,0,0,s,c),h=g.toDataURL("image/png"),d.push({uri:h,duration:t.duration}),t._tiles=d;return e.abrupt("return",d);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=f(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(j=N.app_data)||void 0===j||null===(k=j.appcmsMain)||void 0===k||null===(C=k.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}}),e,null,[[2,20]])})))).apply(this,arguments)}function T(e,t){return I.apply(this,arguments)}function I(){return(I=p(m.mark((function e(t,n){var r,i;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",C(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,11]])})))).apply(this,arguments)}function B(e,n,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),o=t(k);if(i&&o){var a=i.getBoundingClientRect(),l=(e.clientX-a.left)/a.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,o=t.length-1;for(;i<=o;){var a=Math.floor((i+o)/2),l=t[a];if(l===e)return l;l<e?i=a+1:o=a-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[o])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*o.duration()),r),s=n[u];s&&!s.loading&&(s.loading=!0,function(e){return O.apply(this,arguments)}(s).then((function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri})))}}function L(e){return S.apply(this,arguments)}function S(){return(S=p(m.mark((function e(t){var n,r,i,o;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach((function(e,t){for(var r=e.layout.split("x").map(Number),i=f(r,2),o=i[0]*i[1],a=e.duration,l=0;l<o;l++){var u,s=Math.round((t*o+l)*a);n[s]=j(j({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},v(u,"left","-60px"),v(u,"border","1px solid transparent"),v(u,"borderRadius","4px"),u)})}})),r=Object.keys(n).map(Number).sort((function(e,t){return e-t})),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",s((function(e){return B(e,n,r)}),500)),null==(o=document.querySelector(".vjs-progress-control.vjs-control"))||o.addEventListener("pointerdown",(function(e){document.addEventListener("pointermove",s((function(e){return B(e,n,r)}),500))})),e.abrupt("return",n);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var M=function(){var e=p(m.mark((function e(t,n){var r,i,o,a,l,u,s,c;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:i=e.sent,o=i.split("\n").map((function(e){return e.trim()})),a=[],l=null,u=0;case 10:if(!(u<(null==o?void 0:o.length))){e.next=27;break}if(!(s=o[u]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach((function(e){var t=e.split("="),n=f(t,2),r=n[0],i=n[1];r&&i&&(l[r.trim().toLowerCase()]=i.trim())})),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(l.uri=s.includes("http")?s:t+s,a.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function P(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function R(e,t){return D.apply(this,arguments)}function D(){return(D=p(m.mark((function e(n,r){var o,a,l,u,s,c,d,p,v,g,h,b,y,x,w,E,A,N,j,C,O,T,I,B,L,S,M,R,D,F,U,_,G,q,V,W,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,oe,ae,le,ue,se,ce,de,pe,me,ve;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=r,o=t(r),a=n.split("/"),l=a.findIndex((function(e){return"dash"===e.toLowerCase()})),u=P(-1!==l?a.slice(0,l+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return p=e.sent,e.next=11,p.text();case 11:v=e.sent,g=new DOMParser,h=g.parseFromString(v,"application/xml"),b=(null==o?void 0:o.duration())||(null===(s=i())||void 0===s||null===(c=s.video)||void 0===c?void 0:c.runtime),y=(null==h||null===(d=h.querySelector("MPD > BaseURL"))||void 0===d?void 0:d.textContent)||u+"/",x=h.getElementsByTagName("AdaptationSet"),w=0;case 18:if(!(w<x.length)){e.next=72;break}if(("image"!==(E=x[w]).getAttribute("contentType")||"image/png"!==E.getAttribute("mimeType"))&&"image/jpeg"!==E.getAttribute("mimeType")){e.next=69;break}if(N=E.getElementsByTagName("SegmentTemplate")[0],j=null===(A=N.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!N||!j){e.next=48;break}if(T=j.getElementsByTagName("S"),I=parseInt(null===(C=T[0])||void 0===C?void 0:C.getAttribute("t")),B=parseInt(null===(O=T[0])||void 0===O?void 0:O.getAttribute("d")),L=E.getElementsByTagName("Representation")[0],S=L.getElementsByTagName("EssentialProperty")[0],M=S.getAttribute("value"),R=null==M?void 0:M.split("x"),D=f(R,2),F=D[0],U=D[1],!N){e.next=46;break}if(N.getAttribute("media"),_=N.getAttribute("timescale"),G=(_?B/_:B)/(F*U),q=L.getAttribute("id"),V=Math.round(b/G),W=Math.ceil(V/(F*U)),z=N.getAttribute("media"),parseInt(N.getAttribute("startNumber")),!isNaN(parseInt(W))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],w=0;w<W;w++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:G,layout:M,uri:Y+Q.replace("$Time$",I+w*B).replace("$RepresentationID$",q)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=E.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=f(ee,2),ne=te[0],re=te[1],!N){e.next=69;break}if(N.getAttribute("media"),ie=N.getAttribute("duration"),oe=N.getAttribute("timescale"),ae=(oe?ie/oe:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(b/ae),se=Math.ceil(ue/(ne*re)),ce=N.getAttribute("media"),de=parseInt(N.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],me=$(ce),w=0;w<se;w++)ve=me?X(me,w+de):ce,pe.push({duration:ae,layout:Z,uri:y+ve.replace("$Number$",w+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:w++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}}),e,null,[[5,76]])})))).apply(this,arguments)}function $(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function X(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function F(e){return U.apply(this,arguments)}function U(){return(U=p(m.mark((function e(n){var r,i,o,a,l,u,s,c,d,p,v,f,g,h,b,y;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t(n),s=u.currentSource(),c=s.src,c=null!==(r=c)&&void 0!==r&&r.includes("blob")?null===(i=window)||void 0===i||null===(o=i.player)||void 0===o?void 0:o.getSource():c,null===(a=c)||void 0===a||!a.includes("m3u8")){e.next=19;break}return e.next=6,T(c,n);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return p=(null==d?void 0:d[0])||null,v=p.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,M(f,v);case 12:return g=e.sent,e.next=15,L(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,R(c,n);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,L(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var o=document.createElement("div");o.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",o.append(a),r.el().appendChild(o),r.on("useractive",(function(){o.classList.remove("vjs-fade")})),r.on("userinactive",(function(){r.paused()||o.classList.add("vjs-fade")})),r.on("fullscreenchange",(function(){r.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}}export{E as a,_ as b,F as i};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import{g as t}from"./player_instance-34118a5b.js";import{j as n,g as r,a as i}from"./currentVideoInfo-a8a254c2.js";import{s as o}from"./autoNextVideo-f2ccde1b.js";import{e as a}from"./icons-37daa6b3.js";import{p as l,d as u,t as s}from"./skin-d5091b86.js";import c from"@babel/runtime/helpers/typeof";import d from"video.js";import p from"@babel/runtime/helpers/asyncToGenerator";import m from"@babel/runtime/regenerator";import v from"@babel/runtime/helpers/defineProperty";import f from"@babel/runtime/helpers/slicedToArray";var g,h,b,y,x=[],w=!1,E=function(i,o){var s;if(w=!1,null!=o&&null!==(s=o.series)&&void 0!==s&&s.enable){var c;x=[];var d=r();null==d||d.map((function(t){var n;return(n=x).push.apply(n,e(t.episodes))})),null==o||null===(c=o.series)||void 0===c||c.cb}else{var p,m;x=(null==o||null===(p=o.relatedVideos)||void 0===p?void 0:p.content)||[],null==o||null===(m=o.relatedVideos)||void 0===m||m.cb}var v=t(i);v.on("timeupdate",(function(){var e,t;if(!w){var r=Math.floor(v.currentTime()),i=v.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-r<=10&&n()<=(null===(t=x)||void 0===t?void 0:t.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}}));var f,g=x.filter((function(e,t){return t==n()}));if((null==g?void 0:g.length)>0)if(null!==(f=document.getElementsByClassName("next-ep-preview"))&&void 0!==f&&f[0]){var h,b,y,E,N,j,k,C,O,T,I,B;(null===(h=document.getElementsByClassName("next-ep-preview"))||void 0===h?void 0:h[0]).style.visibility="hidden";var L=null===(b=document.getElementsByClassName("next-ep-title"))||void 0===b?void 0:b[0],S=null===(y=document.getElementsByClassName("next-ep-img"))||void 0===y?void 0:y[0],M=null===(E=document.getElementsByClassName("next-ep-content"))||void 0===E?void 0:E[0],P=null===(N=g[0])||void 0===N?void 0:N.title;(null===(j=P)||void 0===j?void 0:j.length)>60&&(P=P.substr(0,60)+"..."),L.textContent="".concat(P),S.src=(null===(k=g[0])||void 0===k||null===(C=k.gist)||void 0===C||null===(O=C.imageGist)||void 0===O?void 0:O.r16x9)||(null==g||null===(T=g[0])||void 0===T?void 0:T.img)||(null===(I=window)||void 0===I||null===(B=I.customData)||void 0===B?void 0:B.fallbackImage),M.onclick=function(){return A(i)}}else{var R,D,$,X,F,U,_,G,q=document.createElement("div");q.className="next-ep-preview",q.style.visibility="hidden",document.getElementById(i).append(q);var V=document.createElement("div");V.className="next-heading-wrapper";var W=document.createElement("div");W.className="next-ep-header",W.textContent="Next up";var z=document.createElement("div");z.className="next-ep-close",z.onclick=function(){q.style.visibility="hidden",w=!0},z.appendChild(l(a())),V.append(W),V.append(z);var H=null===(R=g[0])||void 0===R?void 0:R.title,Q=document.createElement("img");Q.className="next-ep-img",Q.src=(null===(D=g[0])||void 0===D||null===($=D.gist)||void 0===$||null===(X=$.imageGist)||void 0===X?void 0:X.r16x9)||(null==g||null===(F=g[0])||void 0===F?void 0:F.img)||(null===(U=window)||void 0===U||null===(_=U.customData)||void 0===_?void 0:_.fallbackImage);var Y=document.createElement("div");Y.className="next-ep-title",(null===(G=H)||void 0===G?void 0:G.length)>60&&(H=H.substr(0,60)+"..."),Y.textContent="".concat(H);var J=document.createElement("div");J.className="next-ep-content",J.append(Q),J.append(Y),J.onclick=u((function(){null==q||q.remove(),w=!0,A(i)}),400),q.append(V),q.append(J)}},A=function(e,r){var i=t(e),a=Math.floor(i.currentTime());if(Math.floor(i.duration())!=a){i.pause(e);var l=n();o(l,e,x)}};function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}g={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},h=function e(){var t,n,r,i,o;for(r in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(o in i=t[r])i.hasOwnProperty(o)&&("object"===c(i[o])?n[o]=e(n[o],i[o]):n[o]=i[o]);return n},b=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},y=function e(t){return"HTML"!==t.nodeName&&"static"===b(t)("position")?e(t.offsetParent):t},d.registerPlugin("thumbnails",(function(e){var t,n,r,i,o,a,l,u;function s(){document.removeEventListener("pointermove",l),document.removeEventListener("pointerup",s),u()}n=h({},g,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),t.appendChild(r),r.src=n[0].src,r.className="vjs-thumbnail",h(r.style,n[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",(function(e){a=i.duration()})),i.on("loadedmetadata",(function(e){a=i.duration()})),(o=i.controlBar.progressControl).el().appendChild(t),l=function(e){var i,l,u,s,c,d,p,m,v,f;for(l in u=0,v=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,p=((f=y(o.el()).getBoundingClientRect()).width||f.right)+v,d=e.pageX,e.changedTouches&&(d=e.changedTouches[0].pageX),s=d||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,s-=y(o.el()).getBoundingClientRect().left+v,i=Math.floor((s-o.el().offsetLeft)/o.width()*a),n)i>l&&(u=Math.max(u,l));(c=n[u]).src&&r.src!=c.src&&(r.src=c.src),c.style&&r.style!=c.style&&h(r.style,c.style),s+(m=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=b(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(r,c.width||n[0].width)/2)>p?s-=s+m-p:s<m&&(s=m),t.style.left=s+"px"},o.on("mousemove",l),o.on("touchmove",l),o.on("pointerdown",(function(e){document.addEventListener("pointermove",l),document.addEventListener("pointerup",s)})),u=function(e){t.style.left="-1000px"},o.on("mouseout",u),o.on("touchcancel",u),o.on("touchend",u),i.on("userinactive",u)}));var k="my-player";function C(e){var t=e.split("\n"),n=[];return t.forEach((function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),r={resolution:null,uri:null};t.forEach((function(e){e.includes("RESOLUTION")&&(r.resolution=e.split("=")[1]),e.includes("URI")&&(r.uri=e.split("=")[1].replace(/"/g,""))})),n.push(r)}})),n}function O(){return(O=p(m.mark((function e(t){var n,r,i,o,a,l,u,s,c,d,p,v,g,h,b,y,x,w,E,A,N,j,k,C;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return r=e.sent,e.next=11,createImageBitmap(r);case 11:for(i=e.sent,o=t.layout.split("x").map(Number),a=f(o,2),l=a[0],u=a[1],s=i.width/u,c=i.height/l,d=[],p=0;p<l;p++)for(v=0;v<u;v++)(g=document.createElement("canvas")).width=s,g.height=c,g.getContext("2d").drawImage(i,v*s,p*c,s,c,0,0,s,c),h=g.toDataURL("image/png"),d.push({uri:h,duration:t.duration}),t._tiles=d;return e.abrupt("return",d);case 20:for(e.prev=20,e.t0=e.catch(2),b=t.layout.split("x").map(Number),y=f(b,2),x=y[0],w=y[1],E=[],A=0;A<x*w;A++)E.push({uri:null===(N=window)||void 0===N||null===(j=N.app_data)||void 0===j||null===(k=j.appcmsMain)||void 0===k||null===(C=k.images)||void 0===C?void 0:C.placeholderCover,duration:t.duration});return e.abrupt("return",E);case 26:case"end":return e.stop()}}),e,null,[[2,20]])})))).apply(this,arguments)}function T(e,t){return I.apply(this,arguments)}function I(){return(I=p(m.mark((function e(t,n){var r,i;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=n,e.prev=1,e.next=4,fetch(t);case 4:return r=e.sent,e.next=7,r.text();case 7:return i=e.sent,e.abrupt("return",C(i));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}}),e,null,[[1,11]])})))).apply(this,arguments)}function B(e,n,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),o=t(k);if(i&&o){var a=i.getBoundingClientRect(),l=(e.clientX-a.left)/a.width,u=function(e,t){var n,r;if(!t||0===t.length)return null;var i=0,o=t.length-1;for(;i<=o;){var a=Math.floor((i+o)/2),l=t[a];if(l===e)return l;l<e?i=a+1:o=a-1}var u=null!==(n=t[i])&&void 0!==n?n:1/0,s=null!==(r=t[o])&&void 0!==r?r:-1/0;return Math.abs(u-e)<Math.abs(s-e)?u:s}(Math.round(l*o.duration()),r),s=n[u];s&&!s.loading&&(s.loading=!0,function(e){return O.apply(this,arguments)}(s).then((function(e){var t=e[s.tileIndex],n=document.querySelector(".vjs-thumbnail-holder img");n&&t.uri&&(n.src=t.uri),s.loading=!1,s.src=t.uri})))}}function L(e){return S.apply(this,arguments)}function S(){return(S=p(m.mark((function e(t){var n,r,i,o;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},t.forEach((function(e,t){for(var r=e.layout.split("x").map(Number),i=f(r,2),o=i[0]*i[1],a=e.duration,l=0;l<o;l++){var u,s=Math.round((t*o+l)*a);n[s]=j(j({},e),{},{duration:e.duration,tileIndex:l,loading:!1,style:(u={left:"-60px",height:"85px",width:"130px"},v(u,"left","-60px"),v(u,"border","1px solid transparent"),v(u,"borderRadius","4px"),u)})}})),r=Object.keys(n).map(Number).sort((function(e,t){return e-t})),null==(i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||i.addEventListener("mousemove",s((function(e){return B(e,n,r)}),500)),null==(o=document.querySelector(".vjs-progress-control.vjs-control"))||o.addEventListener("pointerdown",(function(e){document.addEventListener("pointermove",s((function(e){return B(e,n,r)}),500))})),e.abrupt("return",n);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var M=function(){var e=p(m.mark((function e(t,n){var r,i,o,a,l,u,s,c;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return r=e.sent,e.next=5,r.text();case 5:i=e.sent,o=i.split("\n").map((function(e){return e.trim()})),a=[],l=null,u=0;case 10:if(!(u<(null==o?void 0:o.length))){e.next=27;break}if(!(s=o[u]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},c=s.split(":")[1]||"",c.split(",").forEach((function(e){var t=e.split("="),n=f(t,2),r=n[0],i=n[1];r&&i&&(l[r.trim().toLowerCase()]=i.trim())})),e.next=24;break;case 19:if(!s.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(s.includes("jpg")||s.includes("png")||s.includes("jpeg"))&&(l.uri=s.includes("http")?s:t+s,a.push(l),l=null);case 24:u++,e.next=10;break;case 27:return e.abrupt("return",a);case 28:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function P(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function R(e,t){return D.apply(this,arguments)}function D(){return(D=p(m.mark((function e(n,r){var o,a,l,u,s,c,d,p,v,g,h,b,y,x,w,E,A,N,j,C,O,T,I,B,L,S,M,R,D,F,U,_,G,q,V,W,z,H,Q,Y,J,K,Z,ee,te,ne,re,ie,oe,ae,le,ue,se,ce,de,pe,me,ve;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=r,o=t(r),a=n.split("/"),l=a.findIndex((function(e){return"dash"===e.toLowerCase()})),u=P(-1!==l?a.slice(0,l+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return p=e.sent,e.next=11,p.text();case 11:v=e.sent,g=new DOMParser,h=g.parseFromString(v,"application/xml"),b=(null==o?void 0:o.duration())||(null===(s=i())||void 0===s||null===(c=s.video)||void 0===c?void 0:c.runtime),y=(null==h||null===(d=h.querySelector("MPD > BaseURL"))||void 0===d?void 0:d.textContent)||u+"/",x=h.getElementsByTagName("AdaptationSet"),w=0;case 18:if(!(w<x.length)){e.next=72;break}if(("image"!==(E=x[w]).getAttribute("contentType")||"image/png"!==E.getAttribute("mimeType"))&&"image/jpeg"!==E.getAttribute("mimeType")){e.next=69;break}if(N=E.getElementsByTagName("SegmentTemplate")[0],j=null===(A=N.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!N||!j){e.next=48;break}if(T=j.getElementsByTagName("S"),I=parseInt(null===(C=T[0])||void 0===C?void 0:C.getAttribute("t")),B=parseInt(null===(O=T[0])||void 0===O?void 0:O.getAttribute("d")),L=E.getElementsByTagName("Representation")[0],S=L.getElementsByTagName("EssentialProperty")[0],M=S.getAttribute("value"),R=null==M?void 0:M.split("x"),D=f(R,2),F=D[0],U=D[1],!N){e.next=46;break}if(N.getAttribute("media"),_=N.getAttribute("timescale"),G=(_?B/_:B)/(F*U),q=L.getAttribute("id"),V=Math.round(b/G),W=Math.ceil(V/(F*U)),z=N.getAttribute("media"),parseInt(N.getAttribute("startNumber")),!isNaN(parseInt(W))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],w=0;w<W;w++)Y="/"==(Q=z)[0]?new URL(u).origin:u+"/",H.push({duration:G,layout:M,uri:Y+Q.replace("$Time$",I+w*B).replace("$RepresentationID$",q)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(J=E.getElementsByTagName("Representation")[0],K=J.getElementsByTagName("EssentialProperty")[0],Z=K.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=f(ee,2),ne=te[0],re=te[1],!N){e.next=69;break}if(N.getAttribute("media"),ie=N.getAttribute("duration"),oe=N.getAttribute("timescale"),ae=(oe?ie/oe:ie)/(ne*re),le=J.getAttribute("id"),ue=Math.round(b/ae),se=Math.ceil(ue/(ne*re)),ce=N.getAttribute("media"),de=parseInt(N.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(pe=[],me=$(ce),w=0;w<se;w++)ve=me?X(me,w+de):ce,pe.push({duration:ae,layout:Z,uri:y+ve.replace("$Number$",w+de).replace("$RepresentationID$",le)});return e.abrupt("return",pe);case 69:w++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}}),e,null,[[5,76]])})))).apply(this,arguments)}function $(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function X(e,t){var n=e.match(/%0(\d+)d/);if(!n)return e;var r=parseInt(n[1],10),i=String(t).padStart(r,"0");return e.replace(/\$Number%0\d+d\$/,i)}function F(e){return U.apply(this,arguments)}function U(){return(U=p(m.mark((function e(n){var r,i,o,a,l,u,s,c,d,p,v,f,g,h,b,y;return m.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=t(n),s=u.currentSource(),c=s.src,c=null!==(r=c)&&void 0!==r&&r.includes("blob")?null===(i=window)||void 0===i||null===(o=i.player)||void 0===o?void 0:o.getSource():c,null===(a=c)||void 0===a||!a.includes("m3u8")){e.next=19;break}return e.next=6,T(c,n);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return p=(null==d?void 0:d[0])||null,v=p.uri,f=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,M(f,v);case 12:return g=e.sent,e.next=15,L(g);case 15:h=e.sent,u.thumbnails(h);case 17:e.next=28;break;case 19:if(null===(l=c)||void 0===l||!l.includes("mpd")){e.next=28;break}return e.next=22,R(c,n);case 22:if(!((null==(b=e.sent)?void 0:b.length)>0)){e.next=28;break}return e.next=26,L(b);case 26:y=e.sent,u.thumbnails(y);case 28:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e,n){var r=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var o=document.createElement("div");o.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",o.append(a),r.el().appendChild(o),r.on("useractive",(function(){o.classList.remove("vjs-fade")})),r.on("userinactive",(function(){r.paused()||o.classList.add("vjs-fade")})),r.on("fullscreenchange",(function(){r.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}}export{E as a,_ as b,F as i};
package/esm/index.js CHANGED
@@ -1 +1 @@
1
- import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./generic-b3cb59a6.js";import"./player_instance-34118a5b.js";import"video.js";export{V as default}from"./index-1d0c78b9.js";import"./util-2cff93e3.js";import"./captions-f507e8ee.js";import"./resolution-1c59b0f3.js";import"./skin-d5091b86.js";import"./localisation-0bf399a1.js";import"js-cookie";import"./currentVideoInfo-a8a254c2.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/typeof";import"./icons-37daa6b3.js";import"./helper-349e076f.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";
1
+ import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./generic-84709fe2.js";import"./player_instance-34118a5b.js";import"video.js";export{V as default}from"./index-af14ddfb.js";import"./util-25a64b95.js";import"./captions-f507e8ee.js";import"./resolution-1c59b0f3.js";import"./skin-d5091b86.js";import"./localisation-0bf399a1.js";import"js-cookie";import"./currentVideoInfo-a8a254c2.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/typeof";import"./icons-37daa6b3.js";import"./helper-349e076f.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{i as s,e as i,j as l}from"./icons-37daa6b3.js";import{C as c,y as m}from"./generic-b3cb59a6.js";import{g as d,s as p,k as u}from"./skin-d5091b86.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./currentVideoInfo-a8a254c2.js";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function v(e){var t=h();return function(){var r,n=o(e);if(t){var s=o(this).constructor;r=Reflect.construct(n,arguments,s)}else r=n.apply(this,arguments);return a(this,r)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var f=n.getComponent("Component"),y=function(a){r(h,f);var o=v(h);function h(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(r=o.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.streams=a.streams,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r}return t(h,[{key:"createEl",value:function(){var e=n.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=n.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return n.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-b7cec0cf.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),r=n.dom.createEl("div",{className:"stream-container hidden"});n.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=r.classList)&&void 0!==a&&a.contains("hidden")?(d(),r.classList.remove("hidden"),t.classList.add("open"),p(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var a=document.getElementById(this.playerId);if(a){var o=window.getComputedStyle(a,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(o,"px"),a.style.overflow="hidden",n.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=n.dom.createEl("div",{className:"stream-selector-head"}),o=n.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});o.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var s=n.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=n.dom.createEl("div",{className:"stream-selector-content"}),p=n.dom.createEl("div",{className:"stream-tray"}),v=parseInt(sessionStorage.getItem("selectedStreamIndex")||0),h=function(e){var r,a,o,s=n.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});v==e&&(s.classList.add("selected"),s.style.border="2px solid #D2393B"),s.onclick=function(){for(var r=n.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");s.classList.add("selected"),s.style.border="2px solid #D2393B",c(t.playerId,t.streams[e].id).then((function(e){m(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},s.style.backgroundImage="url(".concat(t.streams[e].img,")");var i=document.createElement("img");i.className="stream-thumbnail-image",i.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(a=window)||void 0===a||null===(o=a.customData)||void 0===o?void 0:o.fallbackImage)),s.append(i),n.dom.appendContent(p,s),n.dom.appendContent(d,p)},f=0;f<this.streams.length;f++)h(f);n.dom.appendContent(a,o),n.dom.appendContent(a,s),n.dom.appendContent(e,a),n.dom.appendContent(e,d),u(this.playerId,e)}}]),h}();export{y as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import n from"video.js";import{i as s,e as i,j as l}from"./icons-37daa6b3.js";import{C as c,y as m}from"./generic-84709fe2.js";import{g as d,s as p,k as u}from"./skin-d5091b86.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./currentVideoInfo-a8a254c2.js";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function v(e){var t=h();return function(){var r,n=o(e);if(t){var s=o(this).constructor;r=Reflect.construct(n,arguments,s)}else r=n.apply(this,arguments);return a(this,r)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var f=n.getComponent("Component"),y=function(a){r(h,f);var o=v(h);function h(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(r=o.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.streams=a.streams,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r}return t(h,[{key:"createEl",value:function(){var e=n.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=n.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return n.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-b7cec0cf.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),r=n.dom.createEl("div",{className:"stream-container hidden"});n.dom.$(".stream-selector-icon",this.el()).onclick=function(){var a;null!==(a=r.classList)&&void 0!==a&&a.contains("hidden")?(d(),r.classList.remove("hidden"),t.classList.add("open"),p(e.playerId,r)):(r.classList.add("hidden"),t.classList.remove("open"))};var a=document.getElementById(this.playerId);if(a){var o=window.getComputedStyle(a,null).getPropertyValue("height").slice(0,-2);r.style.height="".concat(o,"px"),a.style.overflow="hidden",n.dom.appendContent(t,r),this.addFunctionality(r)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=n.dom.createEl("div",{className:"stream-selector-head"}),o=n.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});o.onclick=function(){e.classList.add("hidden"),r.classList.remove("open")};for(var s=n.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=n.dom.createEl("div",{className:"stream-selector-content"}),p=n.dom.createEl("div",{className:"stream-tray"}),v=parseInt(sessionStorage.getItem("selectedStreamIndex")||0),h=function(e){var r,a,o,s=n.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});v==e&&(s.classList.add("selected"),s.style.border="2px solid #D2393B"),s.onclick=function(){for(var r=n.dom.$$(".stream"),a=0;a<r.length;a++)r[a].style.border="none",r[a].classList.remove("selected");s.classList.add("selected"),s.style.border="2px solid #D2393B",c(t.playerId,t.streams[e].id).then((function(e){m(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},s.style.backgroundImage="url(".concat(t.streams[e].img,")");var i=document.createElement("img");i.className="stream-thumbnail-image",i.src="".concat((null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img)||(null===(a=window)||void 0===a||null===(o=a.customData)||void 0===o?void 0:o.fallbackImage)),s.append(i),n.dom.appendContent(p,s),n.dom.appendContent(d,p)},f=0;f<this.streams.length;f++)h(f);n.dom.appendContent(a,o),n.dom.appendContent(a,s),n.dom.appendContent(e,a),n.dom.appendContent(e,d),u(this.playerId,e)}}]),h}();export{y as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import o from"video.js";import{i as s,e as i,j as l}from"./icons-37daa6b3.js";import{C as c,y as m}from"./generic-b3cb59a6.js";import{g as d}from"./skin-d5091b86.js";import{g as p}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./currentVideoInfo-a8a254c2.js";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function u(e){var t=h();return function(){var r,o=n(e);if(t){var s=n(this).constructor;r=Reflect.construct(o,arguments,s)}else r=o.apply(this,arguments);return a(this,r)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var v=o.getComponent("Component"),f=function(a){r(h,v);var n=u(h);function h(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(r=n.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.streams=a.streams,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r}return t(h,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-1fb5149a.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"stream-container hidden"});o.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(d(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=document.getElementById(this.playerId);if(r){var a=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(a,"px"),r.style.overflow="hidden",o.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=o.dom.createEl("div",{className:"stream-selector-head"}),n=o.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});n.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var s=o.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=o.dom.createEl("div",{className:"stream-selector-content"}),u=o.dom.createEl("div",{className:"stream-tray"}),h=function(e){var r,a=o.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(a.classList.add("selected"),a.style.border="4px solid #D2393B"),a.onclick=function(){for(var r=o.dom.$$(".stream"),n=0;n<r.length;n++)r[n].style.border="none",r[n].classList.remove("selected");a.classList.add("selected"),a.style.border="4px solid #D2393B",c(t.playerId,t.streams[e].id).then((function(e){m(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},a.style.backgroundImage="url(".concat(t.streams[e].img,")");var n=document.createElement("img");n.className="stream-thumbnail-image",n.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),n.alt="No Thumbnail Available",a.append(n),o.dom.appendContent(u,a),o.dom.appendContent(d,u)},v=0;v<this.streams.length;v++)h(v);o.dom.appendContent(a,n),o.dom.appendContent(a,s),o.dom.appendContent(e,a),o.dom.appendContent(e,d),p(this.playerId).on("fullscreenchange",(function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")}))}}]),h}();export{f as default};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import n from"@babel/runtime/helpers/getPrototypeOf";import o from"video.js";import{i as s,e as i,j as l}from"./icons-37daa6b3.js";import{C as c,y as m}from"./generic-84709fe2.js";import{g as d}from"./skin-d5091b86.js";import{g as p}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./currentVideoInfo-a8a254c2.js";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function u(e){var t=h();return function(){var r,o=n(e);if(t){var s=n(this).constructor;r=Reflect.construct(o,arguments,s)}else r=o.apply(this,arguments);return a(this,r)}}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}var v=o.getComponent("Component"),f=function(a){r(h,v);var n=u(h);function h(t){var r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(r=n.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.streams=a.streams,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r}return t(h,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"stream-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"stream-selector-icon",innerHTML:"".concat(s())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./multicamv2-1fb5149a.js").then((function(e){var t=document.createElement("style");t.id="multicam-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"stream-container hidden"});o.dom.$(".stream-selector-icon",this.el()).onclick=function(){var r;null!==(r=t.classList)&&void 0!==r&&r.contains("hidden")?(d(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var r=document.getElementById(this.playerId);if(r){var a=window.getComputedStyle(r,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(a,"px"),r.style.overflow="hidden",o.dom.appendContent(e,t),this.addFunctionality(t)}}},{key:"addFunctionality",value:function(e){var t=this,r=this.el(),a=o.dom.createEl("div",{className:"stream-selector-head"}),n=o.dom.createEl("div",{className:"stream-selector-cross-icon",innerHTML:"".concat(i())});n.onclick=function(){e.classList.add("hidden"),r.classList.remove("open"),e.style.right="-350px"};for(var s=o.dom.createEl("div",{className:"stream-selector-title",innerHTML:"Streams"}),d=o.dom.createEl("div",{className:"stream-selector-content"}),u=o.dom.createEl("div",{className:"stream-tray"}),h=function(e){var r,a=o.dom.createEl("div",{className:"stream -".concat(e),innerHTML:"".concat(l())});0==e&&(a.classList.add("selected"),a.style.border="4px solid #D2393B"),a.onclick=function(){for(var r=o.dom.$$(".stream"),n=0;n<r.length;n++)r[n].style.border="none",r[n].classList.remove("selected");a.classList.add("selected"),a.style.border="4px solid #D2393B",c(t.playerId,t.streams[e].id).then((function(e){m(t.playerId),console.log(e)})).catch((function(e){console.log(e)}))},a.style.backgroundImage="url(".concat(t.streams[e].img,")");var n=document.createElement("img");n.className="stream-thumbnail-image",n.src="".concat(null==t||null===(r=t.streams[e])||void 0===r?void 0:r.img),n.alt="No Thumbnail Available",a.append(n),o.dom.appendContent(u,a),o.dom.appendContent(d,u)},v=0;v<this.streams.length;v++)h(v);o.dom.appendContent(a,n),o.dom.appendContent(a,s),o.dom.appendContent(e,a),o.dom.appendContent(e,d),p(this.playerId).on("fullscreenchange",(function(){var r=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(r,"px")}))}}]),h}();export{f as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as l}from"./icons-37daa6b3.js";import{C as s}from"./generic-b3cb59a6.js";import{s as a}from"./currentVideoInfo-a8a254c2.js";import{f as d}from"./skin-d5091b86.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function p(e){var t=u();return function(){var n,r=i(e);if(t){var l=i(this).constructor;n=Reflect.construct(r,arguments,l)}else n=r.apply(this,arguments);return o(this,n)}}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}var c=r.getComponent("Component"),m=function(o){n(s,c);var i=p(s);function s(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,s),(n=i.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(s,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l(window.controlsColor?window.controlsColor:"white"))});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./nextEpisodeButton-a1556cdf.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),n=r.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),o=r.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=r.dom.createEl("div",{className:"next-eps-image"}),l=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,l),r.dom.appendContent(t,n),r.dom.appendContent(t,o),this.toggleContentOnHover(e,t),r.dom.appendContent(e,t)}},{key:"toggleContentOnHover",value:function(e,t){e.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")}))}}]),s}(),v=function(e,t){var n=f(e,t.video.gist.id),o=x(e[n],t.video.gist.id),i=h(e[n],o);C(i.nextEp)},f=function(e,t){for(var n=-1,o=0;o<e.length;o++)for(var i=0;i<e[o].episodes.length;i++)if(e[o].episodes[i].id===t){n=o;break}return n},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;if(!(e&&t>=0))return{prevEp:null,nextEp:null};var n=e.episodes.length,o=t-1>=0?t-1:n-1,i=(t+1)%n,r=n>1?e.episodes[o]:null,l=n>1?e.episodes[i]:null;return o===i&&(0===o?l=null:r=null),{prevEp:r,nextEp:l,prevEpIdx:o,nextEpIdx:i}},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=null;return e?(e.episodes.forEach((function(e,o){e.gist.id===t&&(n=o)})),n):null},C=function(e){var t,n;r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t;s("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id).then((function(e){a(e.response)}))};var o=r.dom.$(".next-eps-image"),i=d("<img src=".concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==o||o.append(l);for(var p=r.dom.$(".next-eps-description"),u=d("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.description,"</div>"));null!=u&&u.firstChild;)null==p||p.appendChild(u.firstChild)};export{m as default,v as initaliseFunctionality};
1
+ import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{P as l}from"./icons-37daa6b3.js";import{C as s}from"./generic-84709fe2.js";import{s as a}from"./currentVideoInfo-a8a254c2.js";import{f as d}from"./skin-d5091b86.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function p(e){var t=u();return function(){var n,r=i(e);if(t){var l=i(this).constructor;n=Reflect.construct(r,arguments,l)}else n=r.apply(this,arguments);return o(this,n)}}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}var c=r.getComponent("Component"),m=function(o){n(s,c);var i=p(s);function s(t){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,s),(n=i.call(this,t,o)).playerId=o.playerId,n.seriesData=o.sres,n.currentVideoData=o.res,n.initialiseStructure(),n.loadCSS(),n}return t(s,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"play-next"}),t=r.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l(window.controlsColor?window.controlsColor:"white"))});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./nextEpisodeButton-a1556cdf.js").then((function(e){var t=document.createElement("style");t.id="multicam",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),n=r.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),o=r.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=r.dom.createEl("div",{className:"next-eps-image"}),l=r.dom.createEl("div",{className:"next-eps-description"});r.dom.appendContent(o,i),r.dom.appendContent(o,l),r.dom.appendContent(t,n),r.dom.appendContent(t,o),this.toggleContentOnHover(e,t),r.dom.appendContent(e,t)}},{key:"toggleContentOnHover",value:function(e,t){e.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),t.addEventListener("mouseover",(function(){r.dom.removeClass(t,"nextepisode-hidden")})),e.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")})),t.addEventListener("mouseout",(function(){r.dom.addClass(t,"nextepisode-hidden")}))}}]),s}(),v=function(e,t){var n=f(e,t.video.gist.id),o=x(e[n],t.video.gist.id),i=h(e[n],o);C(i.nextEp)},f=function(e,t){for(var n=-1,o=0;o<e.length;o++)for(var i=0;i<e[o].episodes.length;i++)if(e[o].episodes[i].id===t){n=o;break}return n},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;if(!(e&&t>=0))return{prevEp:null,nextEp:null};var n=e.episodes.length,o=t-1>=0?t-1:n-1,i=(t+1)%n,r=n>1?e.episodes[o]:null,l=n>1?e.episodes[i]:null;return o===i&&(0===o?l=null:r=null),{prevEp:r,nextEp:l,prevEpIdx:o,nextEpIdx:i}},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=null;return e?(e.episodes.forEach((function(e,o){e.gist.id===t&&(n=o)})),n):null},C=function(e){var t,n;r.dom.$(".next-eps"),r.dom.$(".play-next").onclick=function(){var t;s("my-player",null==e||null===(t=e.gist)||void 0===t?void 0:t.id).then((function(e){a(e.response)}))};var o=r.dom.$(".next-eps-image"),i=d("<img src=".concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==o||o.append(l);for(var p=r.dom.$(".next-eps-description"),u=d("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.description,"</div>"));null!=u&&u.firstChild;)null==p||p.appendChild(u.firstChild)};export{m as default,v as initaliseFunctionality};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,e as r}from"./icons-37daa6b3.js";import{C as c}from"./generic-b3cb59a6.js";import{k as d}from"./currentVideoInfo-a8a254c2.js";import{a as p}from"./autoNextVideo-a7610b13.js";import{g as m}from"./skin-d5091b86.js";import{g as u}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/slicedToArray";import"./util-2cff93e3.js";import"@babel/runtime/helpers/typeof";function v(e){var t=y();return function(){var n,o=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return l(this,n)}}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var h=a.getComponent("Component"),f=function(l){o(y,h);var i=v(y);function y(e){var n,o,l,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,y),(a=i.call(this,e,s)).playerId=s.playerId,a.seriesData=s.sres,a.videos=null==s||null===(n=s.playlist)||void 0===n?void 0:n.content,a.cb=(null==s||null===(o=s.playlist)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==s||null===(l=s.playlist)||void 0===l?void 0:l.autoNext)||!1,a.currentVideoData=s.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&p({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(y,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.js").then((function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"selection-container hidden"});a.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(m(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),a.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,o=this.el(),l=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),o.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),p=a.dom.createEl("div",{className:"playlist-selector-content"}),m=function(t){var o,l,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(o=n.videos[t])||void 0===o?void 0:o.title)||"")}),m=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,r),a.dom.appendContent(s,m),a.dom.appendContent(i,s),a.dom.appendContent(p,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.description)||"")}),y=a.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(n.videos[t].img,")"),a.dom.appendContent(u,y),a.dom.appendContent(u,v),a.dom.appendContent(i,u),a.dom.appendContent(p,i),u.onclick=function(e){e.stopPropagation(),d(t+1),c(n.playerId,n.videos[t].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},s.onclick=function(t){var n,o,l,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(i.style.backgroundColor="#0000007d",null==s||null===(o=s.classList)||void 0===o||o.remove("hidden")):(null==s||null===(l=s.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)m(v);a.dom.appendContent(l,i),a.dom.appendContent(l,s),a.dom.appendContent(t,l),a.dom.appendContent(t,p),u(this.playerId).on("fullscreenchange",(function(){var e=document.getElementById(n.playerId);if(e){var o=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px")}}))}}]),y}();export{f as default};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,e as r}from"./icons-37daa6b3.js";import{C as c}from"./generic-84709fe2.js";import{k as d}from"./currentVideoInfo-a8a254c2.js";import{a as p}from"./autoNextVideo-f2ccde1b.js";import{g as m}from"./skin-d5091b86.js";import{g as u}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/slicedToArray";import"./util-25a64b95.js";import"@babel/runtime/helpers/typeof";function v(e){var t=y();return function(){var n,o=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(o,arguments,a)}else n=o.apply(this,arguments);return l(this,n)}}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var h=a.getComponent("Component"),f=function(l){o(y,h);var i=v(y);function y(e){var n,o,l,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,y),(a=i.call(this,e,s)).playerId=s.playerId,a.seriesData=s.sres,a.videos=null==s||null===(n=s.playlist)||void 0===n?void 0:n.content,a.cb=(null==s||null===(o=s.playlist)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==s||null===(l=s.playlist)||void 0===l?void 0:l.autoNext)||!1,a.currentVideoData=s.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&p({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(y,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.js").then((function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"selection-container hidden"});a.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(m(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),a.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,o=this.el(),l=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),o.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),p=a.dom.createEl("div",{className:"playlist-selector-content"}),m=function(t){var o,l,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(o=n.videos[t])||void 0===o?void 0:o.title)||"")}),m=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,r),a.dom.appendContent(s,m),a.dom.appendContent(i,s),a.dom.appendContent(p,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.description)||"")}),y=a.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(n.videos[t].img,")"),a.dom.appendContent(u,y),a.dom.appendContent(u,v),a.dom.appendContent(i,u),a.dom.appendContent(p,i),u.onclick=function(e){e.stopPropagation(),d(t+1),c(n.playerId,n.videos[t].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},s.onclick=function(t){var n,o,l,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(i.style.backgroundColor="#0000007d",null==s||null===(o=s.classList)||void 0===o||o.remove("hidden")):(null==s||null===(l=s.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)m(v);a.dom.appendContent(l,i),a.dom.appendContent(l,s),a.dom.appendContent(t,l),a.dom.appendContent(t,p),u(this.playerId).on("fullscreenchange",(function(){var e=document.getElementById(n.playerId);if(e){var o=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px")}}))}}]),y}();export{f as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{T as d,z as p,C as u,y as v}from"./generic-b3cb59a6.js";import{E as m}from"./icons-37daa6b3.js";import{s as f}from"./currentVideoInfo-a8a254c2.js";import{f as h}from"./skin-d5091b86.js";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";var g=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function b(e){var t=y();return function(){var i,n=o(e);if(t){var s=o(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return r(this,i)}}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var C,w=c.getComponent("Component"),L=function(e){s(o,w);var r=b(o);function o(e){var i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,o),i=r.call(this,e,s),a(n(i),"seriesData",[]),i.seriesData=s.seriesData,C=s.playerId;var l=i.el();return E(l,i.seriesData),i.loadCSS(),i}return i(o,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){import("./series-041152aa.js").then((function(e){var t=document.createElement("style");t.id="series",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),o}();function k(){return(k=e(l.mark((function e(t,i,n,s){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:p(C),g(C),u(C,i).then((function(e){f(e.response),v(C)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(e,t,i,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),o=document.getElementById("episode-container");e.id;for(var a=e.episodes.map((function(e,t){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(t+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=o&&o.firstChild;)o.removeChild(o.firstChild);for(var l=h(a);null!=l&&l.firstChild;)o.appendChild(l.firstChild);!function(e){d(e).then((function(e){var t=e.data,i=document.querySelectorAll("#progress-div");i&&t.map((function(e,t){e&&e.watchedPercentage&&i[t]&&(i[t].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),p=document.querySelectorAll("#episode-title"),u=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),m=e.id,f=e.episodes;v.addEventListener("click",(function(){return function(e,t){e.classList.remove("hide-container"),t.classList.add("hide-container")}(s,r)}));for(var g=function(t){c[t].addEventListener("click",(function(){return function(e,t,i){var n=t.querySelector(".meta-details");t.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),i.forEach((function(t,n){n!==e&&(i[n].classList.remove("episode-active"),i[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(t,p[t],p)})),u[t].addEventListener("click",(function(){return function(e,t,i,n){return k.apply(this,arguments)}(t,f[t].id,i,p)})),e.episodes[t].id==m&&p[t].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)}function E(e,t){for(var i='<div class="hover-div"></div>\n '.concat(m(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,t){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(t),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=h(i);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}export{E as customSeasonList,j as handleSeasonChange,L as seriesModule};
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import r from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import l from"@babel/runtime/regenerator";import c from"video.js";import{T as d,z as p,C as u,y as v}from"./generic-84709fe2.js";import{E as m}from"./icons-37daa6b3.js";import{s as f}from"./currentVideoInfo-a8a254c2.js";import{f as h}from"./skin-d5091b86.js";import"axios";import"./player_instance-34118a5b.js";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";var g=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function b(e){var t=y();return function(){var i,n=o(e);if(t){var s=o(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return r(this,i)}}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var C,w=c.getComponent("Component"),L=function(e){s(o,w);var r=b(o);function o(e){var i,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(this,o),i=r.call(this,e,s),a(n(i),"seriesData",[]),i.seriesData=s.seriesData,C=s.playerId;var l=i.el();return E(l,i.seriesData),i.loadCSS(),i}return i(o,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){import("./series-041152aa.js").then((function(e){var t=document.createElement("style");t.id="series",t.append("".concat(e.default)),document.head.appendChild(t)}))}}]),o}();function k(){return(k=e(l.mark((function e(t,i,n,s){return l.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:p(C),g(C),u(C,i).then((function(e){f(e.response),v(C)}));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(e,t,i,n){var s=document.getElementById("season-list"),r=document.getElementById("episode-list"),o=document.getElementById("episode-container");e.id;for(var a=e.episodes.map((function(e,t){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(t+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")})).join("");null!=o&&o.firstChild;)o.removeChild(o.firstChild);for(var l=h(a);null!=l&&l.firstChild;)o.appendChild(l.firstChild);!function(e){d(e).then((function(e){var t=e.data,i=document.querySelectorAll("#progress-div");i&&t.map((function(e,t){e&&e.watchedPercentage&&i[t]&&(i[t].style.width=e.watchedPercentage+"px")}))})).catch((function(e){}))}(n),s.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),p=document.querySelectorAll("#episode-title"),u=document.querySelectorAll(".meta-details"),v=document.querySelector("#episodes-back-btn"),m=e.id,f=e.episodes;v.addEventListener("click",(function(){return function(e,t){e.classList.remove("hide-container"),t.classList.add("hide-container")}(s,r)}));for(var g=function(t){c[t].addEventListener("click",(function(){return function(e,t,i){var n=t.querySelector(".meta-details");t.classList.toggle("episode-active"),n.classList.toggle("metadetails-active"),i.forEach((function(t,n){n!==e&&(i[n].classList.remove("episode-active"),i[n].querySelector(".meta-details").classList.remove("metadetails-active"))}))}(t,p[t],p)})),u[t].addEventListener("click",(function(){return function(e,t,i,n){return k.apply(this,arguments)}(t,f[t].id,i,p)})),e.episodes[t].id==m&&p[t].classList.add("highlight-active-eps")},b=0;b<c.length;b++)g(b)}function E(e,t){for(var i='<div class="hover-div"></div>\n '.concat(m(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map((function(e,t){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")})).join("")}(t),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var n=h(i);null!=n&&n.firstChild;)e.appendChild(n.firstChild)}export{E as customSeasonList,j as handleSeasonChange,L as seriesModule};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as r,e as d,B as c}from"./icons-37daa6b3.js";import{C as u}from"./generic-b3cb59a6.js";import{b as m,l as v,i as p,g as h,e as f}from"./currentVideoInfo-a8a254c2.js";import{g as b,s as y,p as C,k as g,i as E}from"./skin-d5091b86.js";import{a as N}from"./autoNextVideo-a7610b13.js";import{g as k}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/slicedToArray";import"./util-2cff93e3.js";import"@babel/runtime/helpers/typeof";function I(e){var t=S();return function(){var s,o=l(e);if(t){var n=l(this).constructor;s=Reflect.construct(o,arguments,n)}else s=o.apply(this,arguments);return i(this,s)}}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}var x=a.getComponent("Component"),L=function(i){n(S,x);var l=I(S);function S(s){var n,i,a,r,d,c,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,S),(c=l.call(this,s,u)).playerId=u.playerId,c.seriesData=u.sres,c.videos=null==u||null===(n=u.sres)||void 0===n?void 0:n.seasons,c.currentVideoData=u.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==u||null===(i=u.series)||void 0===i?void 0:i.cb,c.autoPlayNext=(null==u||null===(a=u.series)||void 0===a?void 0:a.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=m(),null!==(r=o(c))&&void 0!==r&&r.autoPlayNext&&null!=u&&null!==(d=u.series)&&void 0!==d&&d.enable){var h,f,b,y,C=null==u||null===(h=u.sres)||void 0===h?void 0:h.seasons,g=[];C.map((function(t){g.push.apply(g,e(t.episodes))})),v(g),p(null===(f=c.options_)||void 0===f||null===(b=f.res)||void 0===b||null===(y=b.video)||void 0===y?void 0:y.id),N({playerId:c.playerId,content:g,cb:c.cb,series:null==u?void 0:u.sres})}return c}return s(S,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-6e9853f8.js").then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(b(),e.classList.remove("hidden"),s.classList.add("open"),y(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1);setTimeout((function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus()}),100)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"true"});s.setAttribute("aria-labelledby","seasons"),a.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(n,"px"),a.dom.appendContent(t,s),o.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var o=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=this.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=C(d());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(d()),tabIndex:-1});n.onclick=function(){t.handleSeriesCloseIcon(n,e,s)},n.onkeydown=function(o){"Enter"===o.key&&t.handleSeriesCloseIcon(n,e,s)};var i=a.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=a.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),r=a.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();a.dom.appendContent(o,l),a.dom.appendContent(r,c),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,r),g(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;k(this.playerId);for(var t=h(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i,l,r,d=document.createElement("label");d.className="season-holder",d.ariaLabel=null===(n=t[o])||void 0===n?void 0:n.title,d.role="button",d.type="button",d.setAttribute("aria-LabelledBy",null===(i=t[o])||void 0===i?void 0:i.title),d.setAttribute("for","season-".concat(o));var c=document.createElement("div");c.className="season - ".concat(o),c.textContent=null===(l=t[o])||void 0===l?void 0:l.title,c.id=null===(r=t[o])||void 0===r?void 0:r.title;var u=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});u.setAttribute("type","radio"),e.selectedSeason==o&&(u.checked=!0),u.onclick=function(t){f.set(o),e.showSeasonDetails(o)},d.onkeydown=function(t){"Enter"===t.key&&(f.set(o),e.showSeasonDetails(o))},a.dom.appendContent(d,u),a.dom.appendContent(d,c),a.dom.appendContent(s,d)},n=0;n<t.length;n++)o(n);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,o=this;p(null===(s=e[t])||void 0===s?void 0:s.id),u(this.playerId,e[t].id).then((function(e){null!=o&&o.cb&&o.cb(e)})).catch((function(e){null!=o&&o.cb&&o.cb(e)}))}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map((function(e){var t,s,n,i,l,a,r,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(n=s.imageGist)||void 0===n?void 0:n.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}}));for(var n=function(n){var i,l,r,d,c,u=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:n,innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[n])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var v=a.dom.createEl("div",{className:"series-section-image"}),p=(null===(r=t[n])||void 0===r?void 0:r.description)||"";(null===(d=p)||void 0===d?void 0:d.length)>170&&(p=p.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(p||"")});var h=a.dom.createEl("img",{className:"series-image"});h.src="".concat(E(null===(c=t[n])||void 0===c?void 0:c.img)),h.alt="Episode ".concat(n+1),a.dom.appendContent(v,h),a.dom.appendContent(u,v),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){e.stopPropagation(),o.loadSeriesAssetById(t,n)},u.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),o.loadSeriesAssetById(t,n))},m.onclick=function(t){var s,o,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(u.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=h()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=C(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),S}();export{L as default};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as r,e as d,B as c}from"./icons-37daa6b3.js";import{C as u}from"./generic-84709fe2.js";import{b as m,l as v,i as p,g as h,e as f}from"./currentVideoInfo-a8a254c2.js";import{g as b,s as y,p as C,k as g,i as E}from"./skin-d5091b86.js";import{a as N}from"./autoNextVideo-f2ccde1b.js";import{g as k}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/slicedToArray";import"./util-25a64b95.js";import"@babel/runtime/helpers/typeof";function I(e){var t=S();return function(){var s,o=l(e);if(t){var n=l(this).constructor;s=Reflect.construct(o,arguments,n)}else s=o.apply(this,arguments);return i(this,s)}}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}var x=a.getComponent("Component"),L=function(i){n(S,x);var l=I(S);function S(s){var n,i,a,r,d,c,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,S),(c=l.call(this,s,u)).playerId=u.playerId,c.seriesData=u.sres,c.videos=null==u||null===(n=u.sres)||void 0===n?void 0:n.seasons,c.currentVideoData=u.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==u||null===(i=u.series)||void 0===i?void 0:i.cb,c.autoPlayNext=(null==u||null===(a=u.series)||void 0===a?void 0:a.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=m(),null!==(r=o(c))&&void 0!==r&&r.autoPlayNext&&null!=u&&null!==(d=u.series)&&void 0!==d&&d.enable){var h,f,b,y,C=null==u||null===(h=u.sres)||void 0===h?void 0:h.seasons,g=[];C.map((function(t){g.push.apply(g,e(t.episodes))})),v(g),p(null===(f=c.options_)||void 0===f||null===(b=f.res)||void 0===b||null===(y=b.video)||void 0===y?void 0:y.id),N({playerId:c.playerId,content:g,cb:c.cb,series:null==u?void 0:u.sres})}return c}return s(S,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-6e9853f8.js").then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(b(),e.classList.remove("hidden"),s.classList.add("open"),y(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1);setTimeout((function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus()}),100)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"true"});s.setAttribute("aria-labelledby","seasons"),a.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(n,"px"),a.dom.appendContent(t,s),o.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var o=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=this.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=C(d());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(d()),tabIndex:-1});n.onclick=function(){t.handleSeriesCloseIcon(n,e,s)},n.onkeydown=function(o){"Enter"===o.key&&t.handleSeriesCloseIcon(n,e,s)};var i=a.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=a.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),r=a.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();a.dom.appendContent(o,l),a.dom.appendContent(r,c),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,r),g(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;k(this.playerId);for(var t=h(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i,l,r,d=document.createElement("label");d.className="season-holder",d.ariaLabel=null===(n=t[o])||void 0===n?void 0:n.title,d.role="button",d.type="button",d.setAttribute("aria-LabelledBy",null===(i=t[o])||void 0===i?void 0:i.title),d.setAttribute("for","season-".concat(o));var c=document.createElement("div");c.className="season - ".concat(o),c.textContent=null===(l=t[o])||void 0===l?void 0:l.title,c.id=null===(r=t[o])||void 0===r?void 0:r.title;var u=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});u.setAttribute("type","radio"),e.selectedSeason==o&&(u.checked=!0),u.onclick=function(t){f.set(o),e.showSeasonDetails(o)},d.onkeydown=function(t){"Enter"===t.key&&(f.set(o),e.showSeasonDetails(o))},a.dom.appendContent(d,u),a.dom.appendContent(d,c),a.dom.appendContent(s,d)},n=0;n<t.length;n++)o(n);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,o=this;p(null===(s=e[t])||void 0===s?void 0:s.id),u(this.playerId,e[t].id).then((function(e){null!=o&&o.cb&&o.cb(e)})).catch((function(e){null!=o&&o.cb&&o.cb(e)}))}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map((function(e){var t,s,n,i,l,a,r,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(n=s.imageGist)||void 0===n?void 0:n.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}}));for(var n=function(n){var i,l,r,d,c,u=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:n,innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[n])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var v=a.dom.createEl("div",{className:"series-section-image"}),p=(null===(r=t[n])||void 0===r?void 0:r.description)||"";(null===(d=p)||void 0===d?void 0:d.length)>170&&(p=p.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(p||"")});var h=a.dom.createEl("img",{className:"series-image"});h.src="".concat(E(null===(c=t[n])||void 0===c?void 0:c.img)),h.alt="Episode ".concat(n+1),a.dom.appendContent(v,h),a.dom.appendContent(u,v),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){e.stopPropagation(),o.loadSeriesAssetById(t,n)},u.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),o.loadSeriesAssetById(t,n))},m.onclick=function(t){var s,o,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(u.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=h()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=C(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),S}();export{L as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as d,B as c}from"./icons-37daa6b3.js";import{C as u}from"./generic-b3cb59a6.js";import{b as m,l as p,i as v,g as h,e as f}from"./currentVideoInfo-a8a254c2.js";import{g as C,p as g}from"./skin-d5091b86.js";import{a as y}from"./autoNextVideo-a7610b13.js";import{g as b}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/slicedToArray";import"./util-2cff93e3.js";import"@babel/runtime/helpers/typeof";function N(e){var t=E();return function(){var o,n=l(e);if(t){var s=l(this).constructor;o=Reflect.construct(n,arguments,s)}else o=n.apply(this,arguments);return i(this,o)}}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}var k=a.getComponent("Component"),S=function(i){s(E,k);var l=N(E);function E(o){var s,i,a,r,d,c,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,E),(c=l.call(this,o,u)).playerId=u.playerId,c.seriesData=u.sres,c.videos=null==u||null===(s=u.sres)||void 0===s?void 0:s.seasons,c.currentVideoData=u.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==u||null===(i=u.series)||void 0===i?void 0:i.cb,c.autoPlayNext=(null==u||null===(a=u.series)||void 0===a?void 0:a.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=m(),null!==(r=n(c))&&void 0!==r&&r.autoPlayNext&&null!=u&&null!==(d=u.series)&&void 0!==d&&d.enable){var h,f,C,g,b=null==u||null===(h=u.sres)||void 0===h?void 0:h.seasons,N=[];b.map((function(t){N.push.apply(N,e(t.episodes))})),p(N),v(null===(f=c.options_)||void 0===f||null===(C=f.res)||void 0===C||null===(g=C.video)||void 0===g?void 0:g.id),y({playerId:c.playerId,content:N,cb:c.cb,series:null==u?void 0:u.sres})}return c}return o(E,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-87343239.js").then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,o=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(C(),e.classList.remove("hidden"),o.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"series-selection-container hidden"});a.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(o)};var n=document.getElementById(this.playerId);if(n){var s=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);o.style.height="".concat(s,"px"),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o)}}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"series-selector-head"}),s=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});s.onclick=function(){if("series-selector-cross-icon"===s.className)e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===s.className){var n=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),s.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var i=t.createSeasonLister();for(a.dom.appendContent(n,i),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var l=g(d());s.appendChild(l)}};var i=a.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(n,s),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,l),b(this.playerId).on("fullscreenchange",(function(){var o=document.getElementById(t.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}}))}},{key:"createSeasonLister",value:function(){var e=this;b(this.playerId);for(var t=h(),o=a.dom.createEl("div",{className:"season-container"}),n=function(n){var s,i=document.createElement("label");i.className="season-holder",i.setAttribute("for","season-".concat(n));var l=document.createElement("div");l.className="season - ".concat(n),l.textContent=null===(s=t[n])||void 0===s?void 0:s.title;var r=a.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});r.setAttribute("type","radio"),e.selectedSeason==n&&(r.checked=!0),r.onclick=function(t){f.set(n),e.showSeasonDetails(n)},a.dom.appendContent(i,r),a.dom.appendContent(i,l),a.dom.appendContent(o,i)},s=0;s<t.length;s++)n(s);return o}},{key:"getSeasonDetailsContainer",value:function(t,o){var n=this;t=t.map((function(e){var t,o,s,i,l;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(o=e.gist)||void 0===o||null===(s=o.imageGist)||void 0===s?void 0:s.r16x9,watchedPercentage:(null==n||null===(i=n.watchMap)||void 0===i||null===(l=i.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}}));for(var s=function(s){var i,l,r,d,c,m,p,h=a.dom.createEl("div",{className:"series-container"}),f=a.dom.createEl("div",{className:"series-section",index:s}),C=a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[s])||void 0===i?void 0:i.title)||"")}),g=a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[s].watchedPercentage,"%' class='series-progress-bar-value'></div>")});a.dom.appendContent(f,C),a.dom.appendContent(f,g),a.dom.appendContent(h,f),a.dom.appendContent(o,h);var y=a.dom.createEl("div",{className:"series-section-expanded hidden"}),b=(null===(l=t[s])||void 0===l?void 0:l.description)||"";(null===(r=b)||void 0===r?void 0:r.length)>170&&(b=b.substr(0,170)+"...");var N=a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(b||"")}),E=a.dom.createEl("img",{className:"series-image"});E.src="".concat((null===(d=t[s])||void 0===d?void 0:d.img)||(null===(c=window)||void 0===c||null===(m=c.customData)||void 0===m?void 0:m.fallbackImage)),E.alt="".concat(null===(p=t[s])||void 0===p?void 0:p.title),a.dom.appendContent(y,E),a.dom.appendContent(y,N),a.dom.appendContent(h,y),a.dom.appendContent(o,h),y.onclick=function(e){var o;e.stopPropagation(),v(null===(o=t[s])||void 0===o?void 0:o.id),u(n.playerId,t[s].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},f.onclick=function(t){var o,n,s,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(o=l.classList)&&void 0!==o&&o.contains("hidden")?(h.style.backgroundColor="#0000007d",null==l||null===(n=l.classList)||void 0===n||n.remove("hidden")):(null==l||null===(s=l.classList)||void 0===s||s.add("hidden"),h.style.backgroundColor="unset")}},i=0;i<t.length;i++)s(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var o=h()[e].episodes;this.getSeasonDetailsContainer(o,t);var n=a.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var s=g(c());n.appendChild(s),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),E}();export{S as default};
1
+ import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as d,B as c}from"./icons-37daa6b3.js";import{C as u}from"./generic-84709fe2.js";import{b as m,l as p,i as v,g as h,e as f}from"./currentVideoInfo-a8a254c2.js";import{g as C,p as g}from"./skin-d5091b86.js";import{a as y}from"./autoNextVideo-f2ccde1b.js";import{g as b}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/slicedToArray";import"./util-25a64b95.js";import"@babel/runtime/helpers/typeof";function N(e){var t=E();return function(){var o,n=l(e);if(t){var s=l(this).constructor;o=Reflect.construct(n,arguments,s)}else o=n.apply(this,arguments);return i(this,o)}}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}var k=a.getComponent("Component"),S=function(i){s(E,k);var l=N(E);function E(o){var s,i,a,r,d,c,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,E),(c=l.call(this,o,u)).playerId=u.playerId,c.seriesData=u.sres,c.videos=null==u||null===(s=u.sres)||void 0===s?void 0:s.seasons,c.currentVideoData=u.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==u||null===(i=u.series)||void 0===i?void 0:i.cb,c.autoPlayNext=(null==u||null===(a=u.series)||void 0===a?void 0:a.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=m(),null!==(r=n(c))&&void 0!==r&&r.autoPlayNext&&null!=u&&null!==(d=u.series)&&void 0!==d&&d.enable){var h,f,C,g,b=null==u||null===(h=u.sres)||void 0===h?void 0:h.seasons,N=[];b.map((function(t){N.push.apply(N,e(t.episodes))})),p(N),v(null===(f=c.options_)||void 0===f||null===(C=f.res)||void 0===C||null===(g=C.video)||void 0===g?void 0:g.id),y({playerId:c.playerId,content:N,cb:c.cb,series:null==u?void 0:u.sres})}return c}return o(E,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-87343239.js").then((function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"toggleOpenClose",value:function(e){var t,o=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(C(),e.classList.remove("hidden"),o.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"series-selection-container hidden"});a.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(o)};var n=document.getElementById(this.playerId);if(n){var s=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);o.style.height="".concat(s,"px"),a.dom.appendContent(t,o),n.style.overflow="hidden",this.addFunctionality(o)}}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=a.dom.createEl("div",{className:"series-selector-head"}),s=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});s.onclick=function(){if("series-selector-cross-icon"===s.className)e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===s.className){var n=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),s.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var i=t.createSeasonLister();for(a.dom.appendContent(n,i),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var l=g(d());s.appendChild(l)}};var i=a.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(n,s),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,l),b(this.playerId).on("fullscreenchange",(function(){var o=document.getElementById(t.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}}))}},{key:"createSeasonLister",value:function(){var e=this;b(this.playerId);for(var t=h(),o=a.dom.createEl("div",{className:"season-container"}),n=function(n){var s,i=document.createElement("label");i.className="season-holder",i.setAttribute("for","season-".concat(n));var l=document.createElement("div");l.className="season - ".concat(n),l.textContent=null===(s=t[n])||void 0===s?void 0:s.title;var r=a.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});r.setAttribute("type","radio"),e.selectedSeason==n&&(r.checked=!0),r.onclick=function(t){f.set(n),e.showSeasonDetails(n)},a.dom.appendContent(i,r),a.dom.appendContent(i,l),a.dom.appendContent(o,i)},s=0;s<t.length;s++)n(s);return o}},{key:"getSeasonDetailsContainer",value:function(t,o){var n=this;t=t.map((function(e){var t,o,s,i,l;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(o=e.gist)||void 0===o||null===(s=o.imageGist)||void 0===s?void 0:s.r16x9,watchedPercentage:(null==n||null===(i=n.watchMap)||void 0===i||null===(l=i.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}}));for(var s=function(s){var i,l,r,d,c,m,p,h=a.dom.createEl("div",{className:"series-container"}),f=a.dom.createEl("div",{className:"series-section",index:s}),C=a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[s])||void 0===i?void 0:i.title)||"")}),g=a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[s].watchedPercentage,"%' class='series-progress-bar-value'></div>")});a.dom.appendContent(f,C),a.dom.appendContent(f,g),a.dom.appendContent(h,f),a.dom.appendContent(o,h);var y=a.dom.createEl("div",{className:"series-section-expanded hidden"}),b=(null===(l=t[s])||void 0===l?void 0:l.description)||"";(null===(r=b)||void 0===r?void 0:r.length)>170&&(b=b.substr(0,170)+"...");var N=a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(b||"")}),E=a.dom.createEl("img",{className:"series-image"});E.src="".concat((null===(d=t[s])||void 0===d?void 0:d.img)||(null===(c=window)||void 0===c||null===(m=c.customData)||void 0===m?void 0:m.fallbackImage)),E.alt="".concat(null===(p=t[s])||void 0===p?void 0:p.title),a.dom.appendContent(y,E),a.dom.appendContent(y,N),a.dom.appendContent(h,y),a.dom.appendContent(o,h),y.onclick=function(e){var o;e.stopPropagation(),v(null===(o=t[s])||void 0===o?void 0:o.id),u(n.playerId,t[s].id).then((function(e){null!=n&&n.cb&&n.cb(e)})).catch((function(e){null!=n&&n.cb&&n.cb(e)}))},f.onclick=function(t){var o,n,s,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(o=l.classList)&&void 0!==o&&o.contains("hidden")?(h.style.backgroundColor="#0000007d",null==l||null===(n=l.classList)||void 0===n||n.remove("hidden")):(null==l||null===(s=l.classList)||void 0===s||s.add("hidden"),h.style.backgroundColor="unset")}},i=0;i<t.length;i++)s(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var o=h()[e].episodes;this.getSeasonDetailsContainer(o,t);var n=a.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var s=g(c());n.appendChild(s),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),E}();export{S as default};
@@ -1 +1 @@
1
- import{h as l,d as e,e as o,o as i,p as n,q as t,r as a,s as r}from"./features-d501d205.js";import{g as u}from"./player_instance-34118a5b.js";import{a as s,i as d,b as v}from"./index-23e8568d.js";import{P as p,c,O as m,R as b,S as h}from"./generic-b3cb59a6.js";import"videojs-contrib-quality-menu";import{i as f,r as y}from"./index-1d0c78b9.js";import{c as g}from"./helper-349e076f.js";import{c as j,a as w,b as C}from"./currentVideoInfo-a8a254c2.js";import B from"video.js";import{c as T,d as k}from"./icons-37daa6b3.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./resolution-1c59b0f3.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./skin-d5091b86.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-a7610b13.js";import"./util-2cff93e3.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"./captions-f507e8ee.js";import"video.js/dist/video-js.min.css";function L(e,o){var i=u(e);i&&(i.on("loadeddata",(function(){var l,n,t,a,r,v=g(o),c=j();i.qualityLevels()&&i.qualityLevels().length&&function(l){var e=u(l);e&&(null==e||e.qualityMenu,e.qualityMenu({useResolutionLabels:!0}))}(e),!(null!=o&&null!==(l=o.series)&&void 0!==l&&l.enable||null!==(n=window)&&void 0!==n&&null!==(t=n.app_data)&&void 0!==t&&null!==(a=t.appcmsMain)&&void 0!==a&&null!==(r=a.features)&&void 0!==r&&r.auto_play)||null!=o&&o.liveVideo||s(e,o),null!=o&&o.liveVideo||p()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||"cea398b9-09ab-4331-958f-8c3d6a356b88"===siteId||d(e),v&&c&&c.length?f(e):y()})),i.one("play",(function(){var o,i,n,t;null!==(o=window)&&void 0!==o&&null!==(i=o.customData)&&void 0!==i&&i.iframeOverlayUrl&&l(e,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)})))}function M(l,s){u(l).addClass("skin_vlone"),L(l,s),function(l,u){var s,d,p,f,y,j,B,L,M,V,_,q,A,E,x,R,I=(null==u?void 0:u.liveVideo)||!1,O=(null==u||null===(s=u.res)||void 0===s?void 0:s.contentType)||"video",P=(null==u||null===(d=u.res)||void 0===d||null===(p=d[O])||void 0===p?void 0:p.isSSAIEnabled)||!1,S=c(null==u?void 0:u.res,l)||{};S.src;var D=(null==u?void 0:u.skin_settings)||{};g(u),null!=D&&D.skipBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)&&e(l,"VL_ONE",T());(null!=D&&D.rewindBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)||1==(null==u?void 0:u.liveui))&&o(l,"VL_ONE",k());(null==u||null===(f=u.relatedVideos)||void 0===f||null===(y=f.content)||void 0===y?void 0:y.length)>0&&i(l,null==u?void 0:u.relatedVideos);null!=u&&null!==(j=u.series)&&void 0!==j&&j.enable&&n(l,u);(null==u||null===(B=u.streams)||void 0===B?void 0:B.length)>1&&t(l,null==u?void 0:u.streams);if(v(l,u),m(l,u),"MEDIA_TAILOR"==(null===(L=window)||void 0===L||null===(M=L.app_data)||void 0===M||null===(V=M.appcmsMain)||void 0===V||null===(_=V.adsConfig)||void 0===_?void 0:_.vodAdSticherProvider)&&null!==(q=window)&&void 0!==q&&null!==(A=q.app_data)&&void 0!==A&&null!==(E=A.appcmsMain)&&void 0!==E&&null!==(x=E.adsConfig)&&void 0!==x&&x.vodAdClientSideTracking&&P)if(I)b(l);else{var H,N=null;if(null!=u&&null!==(H=u.series)&&void 0!==H&&H.enable){var G,U,$,z,F,Y=null===(G=w())||void 0===G||null===(U=G.video)||void 0===U||null===($=U.gist)||void 0===$?void 0:$.id,J=C(),K=(null==J?void 0:J.get(Y))||{t:0,p:0},Q=K.t,W=K.p;"function"==typeof(null===(z=window)||void 0===z||null===(F=z.watchHistory)||void 0===F?void 0:F.cb)&&window.watchHistory.cb({watchedTime:Q}),W<95&&(N=Q)}else{var X=u.watchHistoryResumeTime;u.watchedPercentage<95&&(N=X)}h(l,N)}null!=u&&u.isDvrEnabled&&null!=u&&null!==(R=u.dvrConfig)&&void 0!==R&&R.enable&&(a(l,u),r(l,u))}(l,s),V(l,s),function(l){var e,o,i,n=u(l),t=null;if(!n)return;var a=n.controlBar.getChild("VolumePanel"),r=null===(e=a.getChild("MuteToggle"))||void 0===e?void 0:e.el(),s=null==a||null===(o=a.el())||void 0===o?void 0:o.querySelector(".vjs-volume-bar"),d=null==a||null===(i=a.el())||void 0===i?void 0:i.querySelector(".vjs-volume-level");if(!a||!s||!d)return;function v(l){l.preventDefault(),t&&(clearTimeout(t),t=null),c(m(l.touches[0]))}function p(l){l.preventDefault(),c(m(l.changedTouches[0])),t=setTimeout((function(){a.el().classList.remove("vjs-hover")}),2e3)}function c(l){var e=Math.min(Math.max(l,0),100);d.style.height=e+"%",s.setAttribute("aria-valuenow",e),s.setAttribute("aria-valuetext",e+"%"),n.volume(e/100)}function m(l){var e=s.getBoundingClientRect(),o=l.clientY-e.top,i=e.height;return 100-Math.min(Math.max(o/i*100,0),100)}r.addEventListener("touchend",(function(){null!=a&&a.el()&&(a.el().classList.toggle("vjs-hover"),n.muted(!1),t&&(clearTimeout(t),t=null),t=setTimeout((function(){a.el().classList.remove("vjs-hover")}),2e3))})),s.addEventListener("touchmove",v,{passive:!1}),s.addEventListener("touchstart",v,{passive:!1}),s.addEventListener("touchend",p,{passive:!1})}(l)}var V=function(l,e){var o,i,n,t,a,r,s,d,v,p,c,m,b=u(l),h=(null==e?void 0:e.theme)||{},f=B.dom.$(".vjs-play-progress"),y=B.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");y&&(y.style.color="".concat(null===(o=window)||void 0===o||null===(i=o.app_data)||void 0===i||null===(n=i.appcmsMain)||void 0===n||null===(t=n.brand)||void 0===t||null===(a=t.cta)||void 0===a||null===(r=a.primary)||void 0===r?void 0:r.backgroundColor)),f&&(f.style.background="".concat(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(v=d.appcmsMain)||void 0===v||null===(p=v.brand)||void 0===p||null===(c=p.cta)||void 0===c||null===(m=c.primary)||void 0===m?void 0:m.backgroundColor));var g=b.getChild("BigPlayButton")||null;(null==h?void 0:h.progressBarColor)&&f&&(f.style.background=h.progressBarColor),(null==h?void 0:h.playButtonBackgroundColor)&&g&&(g.el().style.background=h.playButtonBackgroundColor),(null==h?void 0:h.playButtonColor)&&y&&(y.style.color=h.playButtonColor),(null==h?void 0:h.playButtonType)&&("square"==(null==h?void 0:h.playButtonType)?g.el().style.borderRadius=".3em":g.el().style.borderRadius="1.3em")};export{M as initialiseSkin};
1
+ import{h as l,d as e,e as o,o as i,p as n,q as t,r as a,s as r}from"./features-c923566c.js";import{g as u}from"./player_instance-34118a5b.js";import{a as s,i as d,b as v}from"./index-b9eca306.js";import{P as p,c,O as m,R as b,S as h}from"./generic-84709fe2.js";import"videojs-contrib-quality-menu";import{i as f,r as y}from"./index-af14ddfb.js";import{c as g}from"./helper-349e076f.js";import{c as j,a as w,b as C}from"./currentVideoInfo-a8a254c2.js";import B from"video.js";import{c as T,d as k}from"./icons-37daa6b3.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./resolution-1c59b0f3.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./skin-d5091b86.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-f2ccde1b.js";import"./util-25a64b95.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"./captions-f507e8ee.js";import"video.js/dist/video-js.min.css";function L(e,o){var i=u(e);i&&(i.on("loadeddata",(function(){var l,n,t,a,r,v=g(o),c=j();i.qualityLevels()&&i.qualityLevels().length&&function(l){var e=u(l);e&&(null==e||e.qualityMenu,e.qualityMenu({useResolutionLabels:!0}))}(e),!(null!=o&&null!==(l=o.series)&&void 0!==l&&l.enable||null!==(n=window)&&void 0!==n&&null!==(t=n.app_data)&&void 0!==t&&null!==(a=t.appcmsMain)&&void 0!==a&&null!==(r=a.features)&&void 0!==r&&r.auto_play)||null!=o&&o.liveVideo||s(e,o),null!=o&&o.liveVideo||p()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||"cea398b9-09ab-4331-958f-8c3d6a356b88"===siteId||d(e),v&&c&&c.length?f(e):y()})),i.one("play",(function(){var o,i,n,t;null!==(o=window)&&void 0!==o&&null!==(i=o.customData)&&void 0!==i&&i.iframeOverlayUrl&&l(e,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)})))}function M(l,s){u(l).addClass("skin_vlone"),L(l,s),function(l,u){var s,d,p,f,y,j,B,L,M,V,_,q,A,E,x,R,I=(null==u?void 0:u.liveVideo)||!1,O=(null==u||null===(s=u.res)||void 0===s?void 0:s.contentType)||"video",P=(null==u||null===(d=u.res)||void 0===d||null===(p=d[O])||void 0===p?void 0:p.isSSAIEnabled)||!1,S=c(null==u?void 0:u.res,l)||{};S.src;var D=(null==u?void 0:u.skin_settings)||{};g(u),null!=D&&D.skipBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)&&e(l,"VL_ONE",T());(null!=D&&D.rewindBtn&&0==(null==u?void 0:u.liveVideo)&&0==(null==u?void 0:u.liveui)||1==(null==u?void 0:u.liveui))&&o(l,"VL_ONE",k());(null==u||null===(f=u.relatedVideos)||void 0===f||null===(y=f.content)||void 0===y?void 0:y.length)>0&&i(l,null==u?void 0:u.relatedVideos);null!=u&&null!==(j=u.series)&&void 0!==j&&j.enable&&n(l,u);(null==u||null===(B=u.streams)||void 0===B?void 0:B.length)>1&&t(l,null==u?void 0:u.streams);if(v(l,u),m(l,u),"MEDIA_TAILOR"==(null===(L=window)||void 0===L||null===(M=L.app_data)||void 0===M||null===(V=M.appcmsMain)||void 0===V||null===(_=V.adsConfig)||void 0===_?void 0:_.vodAdSticherProvider)&&null!==(q=window)&&void 0!==q&&null!==(A=q.app_data)&&void 0!==A&&null!==(E=A.appcmsMain)&&void 0!==E&&null!==(x=E.adsConfig)&&void 0!==x&&x.vodAdClientSideTracking&&P)if(I)b(l);else{var H,N=null;if(null!=u&&null!==(H=u.series)&&void 0!==H&&H.enable){var G,U,$,z,F,Y=null===(G=w())||void 0===G||null===(U=G.video)||void 0===U||null===($=U.gist)||void 0===$?void 0:$.id,J=C(),K=(null==J?void 0:J.get(Y))||{t:0,p:0},Q=K.t,W=K.p;"function"==typeof(null===(z=window)||void 0===z||null===(F=z.watchHistory)||void 0===F?void 0:F.cb)&&window.watchHistory.cb({watchedTime:Q}),W<95&&(N=Q)}else{var X=u.watchHistoryResumeTime;u.watchedPercentage<95&&(N=X)}h(l,N)}null!=u&&u.isDvrEnabled&&null!=u&&null!==(R=u.dvrConfig)&&void 0!==R&&R.enable&&(a(l,u),r(l,u))}(l,s),V(l,s),function(l){var e,o,i,n=u(l),t=null;if(!n)return;var a=n.controlBar.getChild("VolumePanel"),r=null===(e=a.getChild("MuteToggle"))||void 0===e?void 0:e.el(),s=null==a||null===(o=a.el())||void 0===o?void 0:o.querySelector(".vjs-volume-bar"),d=null==a||null===(i=a.el())||void 0===i?void 0:i.querySelector(".vjs-volume-level");if(!a||!s||!d)return;function v(l){l.preventDefault(),t&&(clearTimeout(t),t=null),c(m(l.touches[0]))}function p(l){l.preventDefault(),c(m(l.changedTouches[0])),t=setTimeout((function(){a.el().classList.remove("vjs-hover")}),2e3)}function c(l){var e=Math.min(Math.max(l,0),100);d.style.height=e+"%",s.setAttribute("aria-valuenow",e),s.setAttribute("aria-valuetext",e+"%"),n.volume(e/100)}function m(l){var e=s.getBoundingClientRect(),o=l.clientY-e.top,i=e.height;return 100-Math.min(Math.max(o/i*100,0),100)}r.addEventListener("touchend",(function(){null!=a&&a.el()&&(a.el().classList.toggle("vjs-hover"),n.muted(!1),t&&(clearTimeout(t),t=null),t=setTimeout((function(){a.el().classList.remove("vjs-hover")}),2e3))})),s.addEventListener("touchmove",v,{passive:!1}),s.addEventListener("touchstart",v,{passive:!1}),s.addEventListener("touchend",p,{passive:!1})}(l)}var V=function(l,e){var o,i,n,t,a,r,s,d,v,p,c,m,b=u(l),h=(null==e?void 0:e.theme)||{},f=B.dom.$(".vjs-play-progress"),y=B.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");y&&(y.style.color="".concat(null===(o=window)||void 0===o||null===(i=o.app_data)||void 0===i||null===(n=i.appcmsMain)||void 0===n||null===(t=n.brand)||void 0===t||null===(a=t.cta)||void 0===a||null===(r=a.primary)||void 0===r?void 0:r.backgroundColor)),f&&(f.style.background="".concat(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(v=d.appcmsMain)||void 0===v||null===(p=v.brand)||void 0===p||null===(c=p.cta)||void 0===c||null===(m=c.primary)||void 0===m?void 0:m.backgroundColor));var g=b.getChild("BigPlayButton")||null;(null==h?void 0:h.progressBarColor)&&f&&(f.style.background=h.progressBarColor),(null==h?void 0:h.playButtonBackgroundColor)&&g&&(g.el().style.background=h.playButtonBackgroundColor),(null==h?void 0:h.playButtonColor)&&y&&(y.style.color=h.playButtonColor),(null==h?void 0:h.playButtonType)&&("square"==(null==h?void 0:h.playButtonType)?g.el().style.borderRadius=".3em":g.el().style.borderRadius="1.3em")};export{M as initialiseSkin};
@@ -1 +1 @@
1
- import{y as e,z as t}from"./generic-b3cb59a6.js";import{g as r}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"./currentVideoInfo-a8a254c2.js";import"./captions-f507e8ee.js";import"./skin-d5091b86.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function o(o){import("./skin-2c638dc1.js").then((function(e){var t=document.createElement("style");t.id="carousel_homepage",t.append("".concat(e.default)),document.head.appendChild(t)})),i(),function(o){var i=document.getElementById("".concat(o)),n=r(o);i&&i.addEventListener("touchstart",(function(){n.paused()?e(o):t(o)}))}(o)}var i=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};export{o as initaliseSkin};
1
+ import{y as e,z as t}from"./generic-84709fe2.js";import{g as r}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"./currentVideoInfo-a8a254c2.js";import"./captions-f507e8ee.js";import"./skin-d5091b86.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function o(o){import("./skin-2c638dc1.js").then((function(e){var t=document.createElement("style");t.id="carousel_homepage",t.append("".concat(e.default)),document.head.appendChild(t)})),i(),function(o){var i=document.getElementById("".concat(o)),n=r(o);i&&i.addEventListener("touchstart",(function(){n.paused()?e(o):t(o)}))}(o)}var i=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};export{o as initaliseSkin};
@@ -1 +1 @@
1
- import{g as e}from"./player_instance-34118a5b.js";import{f as r,n as t}from"./features-d501d205.js";import{g as i}from"./resolution-1c59b0f3.js";import{r as o}from"./captions-f507e8ee.js";import"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./generic-b3cb59a6.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./currentVideoInfo-a8a254c2.js";import"./skin-d5091b86.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/assertThisInitialized";function n(n,s){import("./skin-271fa63f.js").then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,n){e(t).on("loadeddata",(function(){var e;(null===(e=i(t))||void 0===e?void 0:e.length)>0&&r(t,n),null!=n&&n.disableCaptions&&o(t)}))}(n,s),function(r,i){var o=e(r);o.controls(!1),t(r)}(n)}export{n as initialiseSkin};
1
+ import{g as e}from"./player_instance-34118a5b.js";import{f as r,n as t}from"./features-c923566c.js";import{g as i}from"./resolution-1c59b0f3.js";import{r as o}from"./captions-f507e8ee.js";import"video.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./generic-84709fe2.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./currentVideoInfo-a8a254c2.js";import"./skin-d5091b86.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/assertThisInitialized";function n(n,s){import("./skin-271fa63f.js").then((function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)})),function(t,n){e(t).on("loadeddata",(function(){var e;(null===(e=i(t))||void 0===e?void 0:e.length)>0&&r(t,n),null!=n&&n.disableCaptions&&o(t)}))}(n,s),function(r,i){var o=e(r);o.controls(!1),t(r)}(n)}export{n as initialiseSkin};
@@ -1 +1 @@
1
- import{a as e,b as t,c as o,d as s,e as i}from"./features-d501d205.js";import{O as n}from"./generic-b3cb59a6.js";import{S as r,M as l,a,N as m,b as d,R as u}from"./icons-37daa6b3.js";import{g as p}from"./player_instance-34118a5b.js";import{b as c}from"./skin-d5091b86.js";import{a as b}from"./currentVideoInfo-a8a254c2.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./resolution-1c59b0f3.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/slicedToArray";function v(v,f){p(v).addClass("skin_default"),n(v,f),import("./skin-71be210e.js").then((function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,t){0==t.liveVideo&&0==t.liveui&&s(e,"default",d());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&i(e,"default",u())}(v,f),function(s,i){var n=p(s),l=(null==i?void 0:i.sres)||null;n.on("loadeddata",(function(){e(s,"default",r()),l&&import("./nextEpisodeButton-1662c917.js").then((function(e){e.initaliseFunctionality(i.sres.seasons,b())}))})),n.one("loadedmetadata",(function(){var e;l&&(t(s,null==i||null===(e=i.sres)||void 0===e?void 0:e.seasons,i),o(i.sres,i.res,s))}))}(v,f),function(e,t){var o,s,i,n,r=p(e),d=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],b=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(d&&(d.style.display="none"),u&&(u.style.display="none"),b&&(b.style.display="none"));null===(o=r.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(c(l(window.controlsColor))),null===(i=r.controlBar.getChild("FullscreenToggle"))||void 0===i||null===(n=i.el())||void 0===n||n.appendChild(c(a(window.controlsColor)));var v=r.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(c(m()));var f=document.createElement("div");f.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(f,v.querySelector(".vjs-menu-item"))}(v,f)}export{v as initialiseSkin};
1
+ import{a as e,b as t,c as o,d as s,e as i}from"./features-c923566c.js";import{O as n}from"./generic-84709fe2.js";import{S as r,M as l,a,N as m,b as d,R as u}from"./icons-37daa6b3.js";import{g as p}from"./player_instance-34118a5b.js";import{b as c}from"./skin-d5091b86.js";import{a as b}from"./currentVideoInfo-a8a254c2.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./resolution-1c59b0f3.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"./captions-f507e8ee.js";import"@babel/runtime/helpers/slicedToArray";function v(v,f){p(v).addClass("skin_default"),n(v,f),import("./skin-71be210e.js").then((function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,t){0==t.liveVideo&&0==t.liveui&&s(e,"default",d());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&i(e,"default",u())}(v,f),function(s,i){var n=p(s),l=(null==i?void 0:i.sres)||null;n.on("loadeddata",(function(){e(s,"default",r()),l&&import("./nextEpisodeButton-351ed2c3.js").then((function(e){e.initaliseFunctionality(i.sres.seasons,b())}))})),n.one("loadedmetadata",(function(){var e;l&&(t(s,null==i||null===(e=i.sres)||void 0===e?void 0:e.seasons,i),o(i.sres,i.res,s))}))}(v,f),function(e,t){var o,s,i,n,r=p(e),d=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],b=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(d&&(d.style.display="none"),u&&(u.style.display="none"),b&&(b.style.display="none"));null===(o=r.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(c(l(window.controlsColor))),null===(i=r.controlBar.getChild("FullscreenToggle"))||void 0===i||null===(n=i.el())||void 0===n||n.appendChild(c(a(window.controlsColor)));var v=r.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(c(m()));var f=document.createElement("div");f.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(f,v.querySelector(".vjs-menu-item"))}(v,f)}export{v as initialiseSkin};
@@ -1 +1 @@
1
- import{f as l,d as e,e as i,j as n,k as t,l as o,m as s}from"./features-d501d205.js";import{f as r}from"./icons-37daa6b3.js";import{g as C}from"./player_instance-34118a5b.js";import{p as a,e as u}from"./skin-d5091b86.js";import{g as d}from"./resolution-1c59b0f3.js";import{a as v,i as c,b as p}from"./index-23e8568d.js";import{P as h,d as m}from"./generic-b3cb59a6.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./currentVideoInfo-a8a254c2.js";import"./autoNextVideo-a7610b13.js";import"./util-2cff93e3.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"./captions-f507e8ee.js";function f(f,b){C(f).addClass("skin_news"),function(){"Chrome"==m()&&import("./chromett-a3cbb2e1.js").then((function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)}));import("./skin-9fece9a0.js").then((function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)}))}(),function(e,i){var n=C(e);n&&n.on("loadeddata",(function(){var n,t,o,s,r,C;(null===(n=d(e))||void 0===n?void 0:n.length)>0&&l(e,i),!(null!=i&&null!==(t=i.series)&&void 0!==t&&t.enable||null!==(o=window)&&void 0!==o&&null!==(s=o.app_data)&&void 0!==s&&null!==(r=s.appcmsMain)&&void 0!==r&&null!==(C=r.features)&&void 0!==C&&C.auto_play)||null!=i&&i.liveVideo||v(e,i),null!=i&&i.liveVideo||h()||c(e)}))}(f,b),function(l,e){var i,n,t,o,s,r,d,v,c,p,h,m,f,b,B,y,L,j,g=C(l);null===(i=g.controlBar)||void 0===i||i.removeChild("VolumePanel"),null===(n=g.controlBar)||void 0===n||n.addChild("VolumePanel",{inline:!1},1);var E=null===(t=g.controlBar)||void 0===t?void 0:t.getChild("ProgressControl"),w=document.createElement("div");w.className="custom-spaced-progress-bar",E&&w.append(E.el());null===(o=g.controlBar)||void 0===o||null===(s=o.el())||void 0===s||s.append(w);var V='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>';g.el().insertBefore(a(V),null!==(r=g.el().firstChild)&&void 0!==r?r:null);var x=(null==g||null===(d=g.controlBar)||void 0===d||null===(v=d.getChild("PlayToggle"))||void 0===v||null===(c=v.el())||void 0===c?void 0:c.firstChild)||null;if(x){x.style.height="24px",x.style.width="24px";var M=u(x,g.paused()?"#vjs-icon-play":"#vjs-icon-pause");g.on("pause",(function(){return M.setAttributeNS(null,"href","#vjs-icon-play")})),g.on("play",(function(){return M.setAttributeNS(null,"href","#vjs-icon-pause")}))}var k=(null==g||null===(p=g.controlBar)||void 0===p||null===(h=p.getChild("FullscreenToggle"))||void 0===h||null===(m=h.el())||void 0===m?void 0:m.firstChild)||null;if(k){k.style.height="24px",k.style.width="24px";var Z=u(k,"#vjs-icon-fullscreen");g.on("fullscreenchange",(function(){var l=g.isFullscreen_;null==Z||Z.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}var S=(null==g||null===(f=g.controlBar)||void 0===f||null===(b=f.getChild("VolumePanel"))||void 0===b?void 0:b.el())||null;if(S){var N=S.querySelector(".vjs-mute-control .vjs-icon-placeholder");N.classList.add("vjs-svg-icon"),N.style.height="24px",N.style.width="24px";var A=u(N,g.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");g.on("volumechange",(function(l){var e=g.volume();console.log(e,g.muted()),0==e||g.muted()?A.setAttributeNS(null,"href","#vjs-icon-mute"):e>0&&e<=.3?A.setAttributeNS(null,"href","#vjs-icon-volume1"):e>=.3&&e<=.7?A.setAttributeNS(null,"href","#vjs-icon-volume2"):A.setAttributeNS(null,"href","#vjs-icon-volume3")}))}var _=(null==g||null===(B=g.controlBar)||void 0===B||null===(y=B.getChild("PictureInPictureToggle"))||void 0===y?void 0:y.el())||null;if(_){var H=null==_?void 0:_.querySelector(".vjs-icon-placeholder");H.style.height="16px",H.style.width="25px";var P=u(H,"#vjs-icon-pip");g.on("enterpictureinpicture",(function(){P.setAttributeNS(null,"href","#vjs-icon-pip")}))}var T=(null==g||null===(L=g.controlBar)||void 0===L||null===(j=L.getChild("SubsCapsButton"))||void 0===j?void 0:j.el())||null;if(T){var I=T.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");I.classList.add("vjs-svg-icon"),I.style.height="16px",I.style.width="29px";var q=u(I,"#vjs-icon-caps");q.setAttributeNS(null,"href","#vjs-icon-captions-off"),g.textTracks().on("change",(function(l){for(var e=g.textTracks(),i=!1,n=0;n<e.length;n++){var t=e[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}i?q.setAttributeNS(null,"href","#vjs-icon-captions"):q.setAttributeNS(null,"href","#vjs-icon-captions-off")}))}}(f),function(l,C){var a,u,d,v,c,p,h=(null==C?void 0:C.skin_settings)||{};null==h||h.slowMoBtn,null!=h&&h.skipBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)&&e(l,"VL_ONE",SkipSvgV2());(null!=h&&h.rewindBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)||1==(null==C?void 0:C.liveui))&&i(l,"VL_ONE",r());(null==C||null===(a=C.relatedVideos)||void 0===a||null===(u=a.content)||void 0===u?void 0:u.length)>0&&n(l,null==C?void 0:C.relatedVideos);(null==C||null===(d=C.streams)||void 0===d?void 0:d.length)>1&&t(l,null==C?void 0:C.streams);(null==C||null===(v=C.playlist)||void 0===v||null===(c=v.content)||void 0===c?void 0:c.length)>0&&o(l,null==C?void 0:C.playlist);null!=C&&null!==(p=C.series)&&void 0!==p&&p.enable&&s(l,C)}(f,b),p(f,b)}export{f as initialiseSkin};
1
+ import{f as l,d as e,e as i,j as n,k as t,l as o,m as s}from"./features-c923566c.js";import{f as r}from"./icons-37daa6b3.js";import{g as C}from"./player_instance-34118a5b.js";import{p as a,e as u}from"./skin-d5091b86.js";import{g as d}from"./resolution-1c59b0f3.js";import{a as v,i as c,b as p}from"./index-b9eca306.js";import{P as h,d as m}from"./generic-84709fe2.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./currentVideoInfo-a8a254c2.js";import"./autoNextVideo-f2ccde1b.js";import"./util-25a64b95.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";import"./captions-f507e8ee.js";function f(f,b){C(f).addClass("skin_news"),function(){"Chrome"==m()&&import("./chromett-a3cbb2e1.js").then((function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)}));import("./skin-9fece9a0.js").then((function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)}))}(),function(e,i){var n=C(e);n&&n.on("loadeddata",(function(){var n,t,o,s,r,C;(null===(n=d(e))||void 0===n?void 0:n.length)>0&&l(e,i),!(null!=i&&null!==(t=i.series)&&void 0!==t&&t.enable||null!==(o=window)&&void 0!==o&&null!==(s=o.app_data)&&void 0!==s&&null!==(r=s.appcmsMain)&&void 0!==r&&null!==(C=r.features)&&void 0!==C&&C.auto_play)||null!=i&&i.liveVideo||v(e,i),null!=i&&i.liveVideo||h()||c(e)}))}(f,b),function(l,e){var i,n,t,o,s,r,d,v,c,p,h,m,f,b,B,y,L,j,g=C(l);null===(i=g.controlBar)||void 0===i||i.removeChild("VolumePanel"),null===(n=g.controlBar)||void 0===n||n.addChild("VolumePanel",{inline:!1},1);var E=null===(t=g.controlBar)||void 0===t?void 0:t.getChild("ProgressControl"),w=document.createElement("div");w.className="custom-spaced-progress-bar",E&&w.append(E.el());null===(o=g.controlBar)||void 0===o||null===(s=o.el())||void 0===s||s.append(w);var V='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>';g.el().insertBefore(a(V),null!==(r=g.el().firstChild)&&void 0!==r?r:null);var x=(null==g||null===(d=g.controlBar)||void 0===d||null===(v=d.getChild("PlayToggle"))||void 0===v||null===(c=v.el())||void 0===c?void 0:c.firstChild)||null;if(x){x.style.height="24px",x.style.width="24px";var M=u(x,g.paused()?"#vjs-icon-play":"#vjs-icon-pause");g.on("pause",(function(){return M.setAttributeNS(null,"href","#vjs-icon-play")})),g.on("play",(function(){return M.setAttributeNS(null,"href","#vjs-icon-pause")}))}var k=(null==g||null===(p=g.controlBar)||void 0===p||null===(h=p.getChild("FullscreenToggle"))||void 0===h||null===(m=h.el())||void 0===m?void 0:m.firstChild)||null;if(k){k.style.height="24px",k.style.width="24px";var Z=u(k,"#vjs-icon-fullscreen");g.on("fullscreenchange",(function(){var l=g.isFullscreen_;null==Z||Z.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")}))}var S=(null==g||null===(f=g.controlBar)||void 0===f||null===(b=f.getChild("VolumePanel"))||void 0===b?void 0:b.el())||null;if(S){var N=S.querySelector(".vjs-mute-control .vjs-icon-placeholder");N.classList.add("vjs-svg-icon"),N.style.height="24px",N.style.width="24px";var A=u(N,g.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");g.on("volumechange",(function(l){var e=g.volume();console.log(e,g.muted()),0==e||g.muted()?A.setAttributeNS(null,"href","#vjs-icon-mute"):e>0&&e<=.3?A.setAttributeNS(null,"href","#vjs-icon-volume1"):e>=.3&&e<=.7?A.setAttributeNS(null,"href","#vjs-icon-volume2"):A.setAttributeNS(null,"href","#vjs-icon-volume3")}))}var _=(null==g||null===(B=g.controlBar)||void 0===B||null===(y=B.getChild("PictureInPictureToggle"))||void 0===y?void 0:y.el())||null;if(_){var H=null==_?void 0:_.querySelector(".vjs-icon-placeholder");H.style.height="16px",H.style.width="25px";var P=u(H,"#vjs-icon-pip");g.on("enterpictureinpicture",(function(){P.setAttributeNS(null,"href","#vjs-icon-pip")}))}var T=(null==g||null===(L=g.controlBar)||void 0===L||null===(j=L.getChild("SubsCapsButton"))||void 0===j?void 0:j.el())||null;if(T){var I=T.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");I.classList.add("vjs-svg-icon"),I.style.height="16px",I.style.width="29px";var q=u(I,"#vjs-icon-caps");q.setAttributeNS(null,"href","#vjs-icon-captions-off"),g.textTracks().on("change",(function(l){for(var e=g.textTracks(),i=!1,n=0;n<e.length;n++){var t=e[n];if(("captions"===t.kind||"subtitles"===t.kind)&&"showing"===t.mode){i=!0;break}}i?q.setAttributeNS(null,"href","#vjs-icon-captions"):q.setAttributeNS(null,"href","#vjs-icon-captions-off")}))}}(f),function(l,C){var a,u,d,v,c,p,h=(null==C?void 0:C.skin_settings)||{};null==h||h.slowMoBtn,null!=h&&h.skipBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)&&e(l,"VL_ONE",SkipSvgV2());(null!=h&&h.rewindBtn&&0==(null==C?void 0:C.liveVideo)&&0==(null==C?void 0:C.liveui)||1==(null==C?void 0:C.liveui))&&i(l,"VL_ONE",r());(null==C||null===(a=C.relatedVideos)||void 0===a||null===(u=a.content)||void 0===u?void 0:u.length)>0&&n(l,null==C?void 0:C.relatedVideos);(null==C||null===(d=C.streams)||void 0===d?void 0:d.length)>1&&t(l,null==C?void 0:C.streams);(null==C||null===(v=C.playlist)||void 0===v||null===(c=v.content)||void 0===c?void 0:c.length)>0&&o(l,null==C?void 0:C.playlist);null!=C&&null!==(p=C.series)&&void 0!==p&&p.enable&&s(l,C)}(f,b),p(f,b)}export{f as initialiseSkin};
@@ -1 +1 @@
1
- import{f as l,g as e,h as o,d as i,e as n,i as t,j as r,k as a,l as d,m as s}from"./features-d501d205.js";import{M as u,a as m,c as v,d as p}from"./icons-37daa6b3.js";import{g as c}from"./player_instance-34118a5b.js";import{b as h}from"./skin-d5091b86.js";import{g as f}from"./resolution-1c59b0f3.js";import{g as b}from"./captions-f507e8ee.js";import{a as g,i as C,b as j}from"./index-23e8568d.js";import{P as y,d as V}from"./generic-b3cb59a6.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./currentVideoInfo-a8a254c2.js";import"./autoNextVideo-a7610b13.js";import"./util-2cff93e3.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";function w(w,B){c(w).addClass("skin_defaultv2"),function(){"Chrome"==V()&&import("./chromett-a3cbb2e1.js").then((function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)}));import("./skin-fbab87d5.js").then((function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)}))}(),function(i,n){var t=c(i);t&&(t.on("loadeddata",(function(){var o,t,r,a,d,s,u;(null===(o=f(i))||void 0===o?void 0:o.length)>0&&l(i,n),(null===(t=b(i))||void 0===t?void 0:t.length)>0&&e(i,n),!(null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null!==(a=window)&&void 0!==a&&null!==(d=a.app_data)&&void 0!==d&&null!==(s=d.appcmsMain)&&void 0!==s&&null!==(u=s.features)&&void 0!==u&&u.auto_play)||null!=n&&n.liveVideo||g(i,n),null!=n&&n.liveVideo||y()||C(i)})),t.one("play",(function(){var l,e,n,t;null!==(l=window)&&void 0!==l&&null!==(e=l.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(i,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)})))}(w,B),function(l,e){var o,i,n,t,r,a,d,s,v,p,f,b,g,C=c(l);null===(o=C.controlBar)||void 0===o||o.removeChild("VolumePanel"),null===(i=C.controlBar)||void 0===i||i.addChild("VolumePanel",{inline:!1},1);var j=null===(n=C.controlBar)||void 0===n?void 0:n.getChild("ProgressControl"),y=null===(t=C.controlBar)||void 0===t?void 0:t.getChild("CurrentTimeDisplay"),V=null===(r=C.controlBar)||void 0===r?void 0:r.getChild("SeekToLive"),w=document.createElement("div");w.className="custom-spaced-progress-bar",j&&y&&V&&w.append(j.el(),y.el(),V.el());null===(a=C.controlBar)||void 0===a||null===(d=a.el())||void 0===d||d.append(w),null==C||null===(s=C.controlBar)||void 0===s||null===(v=s.getChild("FullscreenToggle"))||void 0===v||null===(p=v.el())||void 0===p||p.appendChild(h(u(window.controlsColor))),null==C||null===(f=C.controlBar)||void 0===f||null===(b=f.getChild("FullscreenToggle"))||void 0===b||null===(g=b.el())||void 0===g||g.appendChild(h(m(window.controlsColor)));var B=document.getElementsByClassName("vjs-time-control");e.liveVideo&&B[0]&&(B[0].style.display="none")}(w,B),function(l,e){var o,u,m,c,h,f,b=(null==e?void 0:e.skin_settings)||{},g=0!=(null==b?void 0:b.slowMoBtn);0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)&&i(l,"defaultV2",v());(0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)||1==(null==e?void 0:e.liveui))&&n(l,"defaultV2",p());!e.liveVideo&&g&&t(l);(null==e||null===(o=e.relatedVideos)||void 0===o||null===(u=o.content)||void 0===u?void 0:u.length)>0&&r(l,null==e?void 0:e.relatedVideos);(null==e||null===(m=e.streams)||void 0===m?void 0:m.length)>1&&a(l,null==e?void 0:e.streams);(null==e||null===(c=e.playlist)||void 0===c||null===(h=c.content)||void 0===h?void 0:h.length)>0&&d(l,null==e?void 0:e.playlist);null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable&&s(l,e)}(w,B),j(w,B)}export{w as initialiseSkin};
1
+ import{f as l,g as e,h as o,d as i,e as n,i as t,j as r,k as a,l as d,m as s}from"./features-c923566c.js";import{M as u,a as m,c as v,d as p}from"./icons-37daa6b3.js";import{g as c}from"./player_instance-34118a5b.js";import{b as h}from"./skin-d5091b86.js";import{g as f}from"./resolution-1c59b0f3.js";import{g as b}from"./captions-f507e8ee.js";import{a as g,i as C,b as j}from"./index-b9eca306.js";import{P as y,d as V}from"./generic-84709fe2.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./currentVideoInfo-a8a254c2.js";import"./autoNextVideo-f2ccde1b.js";import"./util-25a64b95.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"js-cookie";function w(w,B){c(w).addClass("skin_defaultv2"),function(){"Chrome"==V()&&import("./chromett-a3cbb2e1.js").then((function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)}));import("./skin-fbab87d5.js").then((function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)}))}(),function(i,n){var t=c(i);t&&(t.on("loadeddata",(function(){var o,t,r,a,d,s,u;(null===(o=f(i))||void 0===o?void 0:o.length)>0&&l(i,n),(null===(t=b(i))||void 0===t?void 0:t.length)>0&&e(i,n),!(null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null!==(a=window)&&void 0!==a&&null!==(d=a.app_data)&&void 0!==d&&null!==(s=d.appcmsMain)&&void 0!==s&&null!==(u=s.features)&&void 0!==u&&u.auto_play)||null!=n&&n.liveVideo||g(i,n),null!=n&&n.liveVideo||y()||C(i)})),t.one("play",(function(){var l,e,n,t;null!==(l=window)&&void 0!==l&&null!==(e=l.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(i,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)})))}(w,B),function(l,e){var o,i,n,t,r,a,d,s,v,p,f,b,g,C=c(l);null===(o=C.controlBar)||void 0===o||o.removeChild("VolumePanel"),null===(i=C.controlBar)||void 0===i||i.addChild("VolumePanel",{inline:!1},1);var j=null===(n=C.controlBar)||void 0===n?void 0:n.getChild("ProgressControl"),y=null===(t=C.controlBar)||void 0===t?void 0:t.getChild("CurrentTimeDisplay"),V=null===(r=C.controlBar)||void 0===r?void 0:r.getChild("SeekToLive"),w=document.createElement("div");w.className="custom-spaced-progress-bar",j&&y&&V&&w.append(j.el(),y.el(),V.el());null===(a=C.controlBar)||void 0===a||null===(d=a.el())||void 0===d||d.append(w),null==C||null===(s=C.controlBar)||void 0===s||null===(v=s.getChild("FullscreenToggle"))||void 0===v||null===(p=v.el())||void 0===p||p.appendChild(h(u(window.controlsColor))),null==C||null===(f=C.controlBar)||void 0===f||null===(b=f.getChild("FullscreenToggle"))||void 0===b||null===(g=b.el())||void 0===g||g.appendChild(h(m(window.controlsColor)));var B=document.getElementsByClassName("vjs-time-control");e.liveVideo&&B[0]&&(B[0].style.display="none")}(w,B),function(l,e){var o,u,m,c,h,f,b=(null==e?void 0:e.skin_settings)||{},g=0!=(null==b?void 0:b.slowMoBtn);0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)&&i(l,"defaultV2",v());(0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)||1==(null==e?void 0:e.liveui))&&n(l,"defaultV2",p());!e.liveVideo&&g&&t(l);(null==e||null===(o=e.relatedVideos)||void 0===o||null===(u=o.content)||void 0===u?void 0:u.length)>0&&r(l,null==e?void 0:e.relatedVideos);(null==e||null===(m=e.streams)||void 0===m?void 0:m.length)>1&&a(l,null==e?void 0:e.streams);(null==e||null===(c=e.playlist)||void 0===c||null===(h=c.content)||void 0===h?void 0:h.length)>0&&d(l,null==e?void 0:e.playlist);null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable&&s(l,e)}(w,B),j(w,B)}export{w as initialiseSkin};
@@ -1 +1 @@
1
- import{y as e,z as r}from"./generic-b3cb59a6.js";import{g as t}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"./currentVideoInfo-a8a254c2.js";import"./captions-f507e8ee.js";import"./skin-d5091b86.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function o(e){n(e),i(e)}var i=function(o){var i=t(o),n=document.getElementById("".concat(o));n&&n.addEventListener("touchstart",(function(){i.paused()?e(o):r(o)}))},n=function(e){var r=t(e);r.requestFullscreen=function(){},r.controlBar.hide()};export{o as initaliseSkin};
1
+ import{y as e,z as r}from"./generic-84709fe2.js";import{g as t}from"./player_instance-34118a5b.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"axios";import"js-cookie";import"./currentVideoInfo-a8a254c2.js";import"./captions-f507e8ee.js";import"./skin-d5091b86.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";function o(e){n(e),i(e)}var i=function(o){var i=t(o),n=document.getElementById("".concat(o));n&&n.addEventListener("touchstart",(function(){i.paused()?e(o):r(o)}))},n=function(e){var r=t(e);r.requestFullscreen=function(){},r.controlBar.hide()};export{o as initaliseSkin};