"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9841],{9841:function(e,t,o){o.r(t),o.d(t,{default:function(){return ty}});var n=o(67294),i=o(51803),r=o(33194),s=o(50029),a=o(92777),l=o(82262),c=o(10748),u=o(45959),d=o(63553),p=o(37247),h=o(59499),f=o(64687),v=o.n(f),g=o(54887),m=o(25934),y=o(12562),x=o(27812),w=o(38070),b=o(10577),k=o.n(b),S=o(94184),Z=o.n(S),C=o(82701),P=o(85697),j=o(40422),T=o(85893);function L(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function R(e){for(var t=1;t *{height:100%;position:absolute;}.layer-buffer{background-color:#455060;transition:width 0.1s ease;z-index:3;}.layer-seek{background-color:rgba(255,255,255,0.35);opacity:0.5;z-index:4;}.layer-progress{background-color:#ffbc00;z-index:5;}.layer-quiz{width:100%;z-index:6;.quiz-tick{position:absolute;height:100%;width:3px;background-color:#fff;opacity:0.5;z-index:6;}}.scrubber{top:35%;width:1px;height:1px;border:1px solid transparent;border-radius:50%;transition:transform 0.1s ease;z-index:7;}}.mobile-time{@media (max-width:768px){display:flex;}width:100%;display:none;flex-flow:row nowrap;justify-content:space-between;position:absolute;top:-25px;.time-text{font-size:14px;}}"]),O=new r.Z,F=function(e){(0,u.Z)(i,e);var t,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,p.Z)(i);if(t){var n=(0,p.Z)(this).constructor;e=Reflect.construct(o,arguments,n)}else e=o.apply(this,arguments);return(0,d.Z)(this,e)});function i(){var e;(0,a.Z)(this,i);for(var t=arguments.length,r=Array(t),s=0;s=0&&e.setState({hoverPosition:o})}),(0,h.Z)((0,c.Z)(e),"unsetHoverPosition",function(){e.state.draggingScrubber||e.setState({hoverPosition:0})}),(0,h.Z)((0,c.Z)(e),"seekOnScrubberRelease",function(){var t=e.state.dragPosition/e.timelineRef.current.offsetWidth,o=Math.round(e.props.durationSeconds*t);o>0&&("PLAYING"===e.props.playerState&&O.sendOneOffHeartbeat("departure"),O.seekTo(o)),e.setState({draggingScrubber:!1})}),(0,h.Z)((0,c.Z)(e),"seekOnTimelineClick",function(){var t=e.secondsHovered>=0&&e.secondsHovered<=e.props.durationSeconds;!e.state.draggingScrubber&&t&&("PLAYING"===e.props.playerState&&O.sendOneOffHeartbeat("departure"),O.seekTo(e.secondsHovered),e.setState({clickPosition:e.state.hoverPosition}))}),e}return(0,l.Z)(i,[{key:"componentDidMount",value:function(){this.timelineRectangle=this.timelineRef.current.getBoundingClientRect(),document.body.addEventListener("touchmove",function(e){e.preventDefault()}),window.addEventListener("resize",this.handleResize),this.setupScrubberDragListener(),this.setupScrubberReleaseListener()}},{key:"componentDidUpdate",value:function(e){this.state.draggingScrubber||e.played===this.props.played||null===this.state.dragPosition&&null===this.state.clickPosition||this.resetPositions()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mouseup",this.windowMouseUpListener),window.removeEventListener("touchend",this.windowTouchEndListener),window.removeEventListener("mousemove",this.windowMouseMoveListener),window.removeEventListener("touchmove",this.windowTouchMoveListener),window.removeEventListener("resize",this.handleResize)}},{key:"setupScrubberDragListener",value:function(){var e=this,t=function(t){if(e.state.draggingScrubber){var o=Math.round(t.clientX-e.timelineRectangle.left),n=Math.round(e.timelineRectangle.right-t.clientX);o>0&&n>0&&e.setState({dragPosition:o,hoverPosition:o})}};this.windowMouseMoveListener=window.addEventListener("mousemove",function(e){return t(e)}),this.windowTouchMoveListener=window.addEventListener("touchmove",function(e){return t(e.touches[0])})}},{key:"setupScrubberReleaseListener",value:function(){var e=this,t=function(){e.state.draggingScrubber&&e.seekOnScrubberRelease()};this.windowMouseUpListener=window.addEventListener("mouseup",t),this.windowTouchEndListener=window.addEventListener("touchend",t)}},{key:"convertSecondsToClock",value:function(e){var t=Math.floor(e/3600),o=Math.floor((e-3600*t)/60),n=Math.round(e-3600*t-60*o),i="".concat(t?"".concat(t,":").concat(o<10?"0":""):"");return"".concat(i).concat(o,":").concat(n<10?"0".concat(n):n)}},{key:"renderHoverTooltip",value:function(){var e=this.state.windowWidth<=768?10:27,t=this.state.hoverPosition,o=this.distMouseFromLeft-this.timelineRectangle.left<=e,n=this.timelineRectangle.right-this.distMouseFromLeft<=e;o?t=e:n&&(t=this.timelineRef.current.offsetWidth-e);var i=this.state.hoverPosition/this.timelineRef.current.offsetWidth;this.secondsHovered=Math.round(this.props.durationSeconds*i);var r=this.convertSecondsToClock(this.secondsHovered),s=this.state.draggingScrubber?"dragging-tooltip":"";return(0,T.jsx)("div",{tooltip:r,className:s,style:{left:"".concat(t,"px")}})}},{key:"renderQuizLayer",value:function(){var e=this,t=Object.keys(this.props.quizQuestions);return(0,T.jsx)("div",{className:"layer-quiz",children:t.map(function(t,o){return(0,T.jsx)("div",{className:"quiz-tick",style:{left:"".concat(t/e.props.durationSeconds*100,"%")}},"quiz-tick-".concat(o))})})}},{key:"render",value:function(){var e=this,t=this.state,o=t.hoverPosition,n=t.draggingScrubber,i=null!==this.timelineRef.current&&this.timelineRef.current.offsetWidth;return(0,T.jsxs)(z,{ref:this.timelineRef,className:"timeline ".concat(n?"dragging-scrubber":""),onMouseMove:this.setHoverPosition,onBlur:this.setHoverPosition,onMouseOut:this.unsetHoverPosition,onClick:this.seekOnTimelineClick,role:"button",children:[(0,T.jsxs)("div",{className:"mobile-time",children:[(0,T.jsx)("div",{className:"time-text",children:this.convertSecondsToClock(this.props.playedSeconds)}),(0,T.jsx)("div",{className:"time-text",children:this.convertSecondsToClock(this.props.durationSeconds)})]}),(0,T.jsxs)("div",{className:"layer-background",children:[(0,T.jsx)("div",{className:"layer-buffer",style:{width:"".concat(100*this.props.loaded,"%")}}),this.props.showQuizQuestions&&this.renderQuizLayer(),(0,T.jsx)("div",{className:"layer-seek",style:{width:"".concat(o,"px"),maxWidth:"".concat(i,"px")}}),(0,T.jsx)("div",{id:"layerProgress",className:"layer-progress",style:{width:this.getProgressPosition()}}),(0,T.jsx)("div",{id:"scrubber",className:"scrubber",onMouseEnter:this.setHoverPosition,onMouseDown:function(){return e.setState({draggingScrubber:!0})},onTouchStart:function(){return e.setState({draggingScrubber:!0})},style:{left:this.getProgressPosition()},role:"button"}),null!==o&&this.renderHoverTooltip()]})]})}}]),i}(n.PureComponent);(0,h.Z)(F,"defaultProps",{played:0,loaded:0,durationSeconds:0,quizQuestions:{}});var V=M(["*","cast.*"],function(e){return{played:(0,P.Z)(e,"progress.played"),loaded:(0,P.Z)(e,"progress.loaded"),playedSeconds:(0,P.Z)(e,"progress.playedSeconds"),durationSeconds:(0,P.Z)(e,"durationSeconds"),quizQuestions:(0,P.Z)(e,"quizQuestions"),showQuizQuestions:(0,P.Z)(e,"showQuizQuestions"),playerState:(0,P.Z)(e,"playerState")}},F),A=I.ZP.div.withConfig({displayName:"PlayPauseContainer",componentId:"sc-zyg50u-0"})(["border:none;background-color:transparent;padding:0;margin:0;[tooltip='Play']{left:12px;}[tooltip='Pause']{left:18px;}svg{display:block;width:30px;height:25px;path,line{fill:#9aadc7;}path,line{transition:all 0.1s ease 0s;&.pause-right,&.pause-left{transform-origin:center center;}&.play-arrow{transform-origin:25% 50%;}}&.play{.pause-right,.pause-left{transform:scaleY(0);opacity:0;}}&.pause{.pause-right,.pause-left{transform:scaleY(1);}.play-arrow{transform:scaleX(0);opacity:0;}}}&:hover{cursor:pointer;svg{path,line{fill:#fff;stroke:#fff;}}[tooltip]::before,[tooltip]::after{opacity:1;background-color:#687588;}}"]),E=new r.Z,B=function(e){(0,u.Z)(n,e);var t,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,p.Z)(n);if(t){var i=(0,p.Z)(this).constructor;e=Reflect.construct(o,arguments,i)}else e=o.apply(this,arguments);return(0,d.Z)(this,e)});function n(){var e;(0,a.Z)(this,n);for(var t=arguments.length,i=Array(t),r=0;r *{transition:all 0.1s;}#x-lines{stroke-dasharray:19.946;stroke-dashoffset:19.946;}#volume-line-1,#volume-line-2{fill:none;}&.mute{#volume-line-1{opacity:0;stroke-dasharray:0 19.177;stroke-dashoffset:-9 !important;}#volume-line-2{opacity:0;stroke-dasharray:0 27.791 !important;stroke-dashoffset:-14 !important;}#x-lines{stroke-dasharray:0;stroke-dashoffset:0;}}}}.volume-slider{display:flex;align-items:center;width:100px;height:30px;opacity:0;z-index:-1;transition:opacity 0.1s ease;background-color:#1b2733;&:hover,&.dragging{opacity:1;z-index:1;}.track-background{background-color:#455060;border-radius:5px;width:90px;height:7px;.track{height:100%;border-radius:5px 0 0 5px;background-color:#fff;.scrubber{position:relative;transform:translateY(-27%);width:15px;height:15px;border-radius:10px;background-color:#fff;}}}}"]),U=new r.Z,W=M(["*","cast.*"],function(e){return{volume:(0,P.Z)(e,"volume",0),muted:(0,P.Z)(e,"muted",!1)}},function(e){(0,u.Z)(i,e);var t,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,p.Z)(i);if(t){var n=(0,p.Z)(this).constructor;e=Reflect.construct(o,arguments,n)}else e=o.apply(this,arguments);return(0,d.Z)(this,e)});function i(){var e;(0,a.Z)(this,i);for(var t=arguments.length,r=Array(t),s=0;s0&&e.setState({lastScrubberPosition:n}),e.setVolumeFromMouseEvent(t)}}),(0,h.Z)((0,c.Z)(e),"setVolumeFromMouseEvent",function(t){var o=e.volumeTrackRef.current.getBoundingClientRect(),n=t.clientX-o.left,i=o.right-t.clientX;if(n>=0&&i>=0){var r=parseFloat((n/e.volumeTrackRef.current.offsetWidth).toFixed(2));r<=.08&&(r=0),e.props.volume>0&&0===r&&U.setMute(!0),0===e.props.volume&&r>0&&U.setMute(!1),U.setVolume(r)}}),(0,h.Z)((0,c.Z)(e),"getVolumePctFromScrubberPos",function(t){return parseFloat((t/e.volumeTrackRef.current.getBoundingClientRect().width).toFixed(2))}),(0,h.Z)((0,c.Z)(e),"toggleMuteOnButtonClick",function(){if(0===e.props.volume){U.setMute(!1);var t=e.getVolumePctFromScrubberPos(e.state.lastScrubberPosition);t<=.08&&(t=.5),U.setVolume(t)}else U.setMute(!0),U.setVolume(0)}),(0,h.Z)((0,c.Z)(e),"renderVolumeButton",function(){var t=e.props.hoveringSlider||e.state.draggingScrubber?"hovering-slider hover":"",o=(0,P.Z)(e.props,"browser.name","");return(0,T.jsxs)("button",{id:"volumeButton",className:"volume-button ".concat(t),onClick:e.toggleMuteOnButtonClick,onFocus:function(){return e.props.setHoveringSlider(!0)},onBlur:function(){return e.props.setHoveringSlider(!1)},ref:e.volumeButtonRef,children:[(0,T.jsx)("div",{tooltip:e.props.muted||0===e.props.volume?"Unmute":"Mute"}),"safari"===o||"ios"===o?e.renderStaticSvgs():e.renderVolumeSvg()]})}),(0,h.Z)((0,c.Z)(e),"renderVolumeSlider",function(){var t=e.state.scrubberPosition>0?e.state.scrubberPosition+1:0,o=null!==e.scrubberRef.current?e.scrubberRef.current.offsetWidth/2:0,n=e.state.draggingScrubber?"dragging":"";return(0,T.jsx)("div",{className:"volume-slider ".concat(n),onMouseEnter:function(){return e.props.setHoveringSlider(!0)},onMouseLeave:function(){return e.props.setHoveringSlider(!1)},children:(0,T.jsx)("div",{ref:e.volumeTrackRef,className:"track-background",onClick:e.setVolumeOnTrackClick,role:"button",children:(0,T.jsx)("div",{className:"track",style:{width:t},children:(0,T.jsx)("div",{className:"scrubber",ref:e.scrubberRef,style:{left:e.state.scrubberPosition-o},onMouseDown:function(){return e.setState({draggingScrubber:!0})},role:"button"})})})})}),(0,h.Z)((0,c.Z)(e),"renderVolumeSvg",function(){var t=9+e.state.scrubberPosition/100*10.177,o=11+e.state.scrubberPosition/100*16.791;return(0,T.jsxs)("svg",{version:"1.1",id:"Layer_1",className:e.props.muted||0===e.props.volume?"mute":"",xmlns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 35 35",enableBackground:"new 0 0 35 35",space:"preserve",children:[(0,T.jsx)("path",{id:"volume-speaker",fill:"#9aadc7",d:"M17.6,31.6c-0.3,0-0.6-0.1-0.8-0.3l-7.3-6.6H4.1c-0.7,0-1.3-0.6-1.3-1.3V11.6c0-0.7,0.6-1.3,1.3-1.3h5.4 l7.3-6.6c0.4-0.3,0.9-0.4,1.3-0.2c0.5,0.2,0.7,0.6,0.7,1.1v25.7c0,0.5-0.3,0.9-0.7,1.1C17.9,31.6,17.7,31.6,17.6,31.6z M5.3,22.2 h4.6c0.3,0,0.6,0.1,0.8,0.3l5.5,5v-20l-5.5,5c-0.2,0.2-0.5,0.3-0.8,0.3H5.3V22.2z"}),(0,T.jsx)("path",{id:"volume-line-2",fill:"none",stroke:"#9aadc7",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeDasharray:o,strokeDashoffset:(-27.791+o)/2,d:"M26.642,4.238C29.307,7.98,30.88,12.555,30.88,17.5c0,4.763-1.456,9.185-3.945,12.848"}),(0,T.jsx)("path",{id:"volume-line-1",fill:"none",stroke:"#9aadc7",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeDasharray:t,strokeDashoffset:(-19.177+t)/2,d:"M22.631,8.248c1.7,2.681,2.7,5.849,2.7,9.252c0,3.275-0.929,6.33-2.514,8.946"}),(0,T.jsx)("path",{id:"x-lines",fill:"none",stroke:"#9aadc7",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",d:"M23.536,13.974l7.052,7.052 M30.588,13.974l-7.052,7.052"})]})}),(0,h.Z)((0,c.Z)(e),"renderStaticVolumeSvg",function(){return(0,T.jsxs)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 35 35",enableBackground:"new 0 0 35 35",xmlSpace:"preserve",children:[(0,T.jsx)("path",{id:"volume-speaker",fill:"#9aadc7",d:"M17.6,31.6c-0.3,0-0.6-0.1-0.8-0.3l-7.3-6.6H4.1c-0.7,0-1.3-0.6-1.3-1.3V11.6c0-0.7,0.6-1.3,1.3-1.3h5.4 l7.3-6.6c0.4-0.3,0.9-0.4,1.3-0.2c0.5,0.2,0.7,0.6,0.7,1.1v25.7c0,0.5-0.3,0.9-0.7,1.1C17.9,31.6,17.7,31.6,17.6,31.6z M5.3,22.2 h4.6c0.3,0,0.6,0.1,0.8,0.3l5.5,5v-20l-5.5,5c-0.2,0.2-0.5,0.3-0.8,0.3H5.3V22.2z"}),(0,T.jsx)("path",{id:"volume-line-2",fill:"none",stroke:"#9aadc7",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",d:"M26.935,30.348c2.489-3.663,3.945-8.085,3.945-12.848c0-4.945-1.573-9.52-4.238-13.262"}),(0,T.jsx)("path",{id:"volume-line-1",fill:"none",stroke:"#9aadc7",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",d:"M22.817,26.446c1.585-2.616,2.514-5.671,2.514-8.946c0-3.403-1-6.571-2.7-9.252"})]})}),(0,h.Z)((0,c.Z)(e),"renderStaticMuteSvg",function(){return(0,T.jsxs)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 35 35",enableBackground:"new 0 0 35 35",xmlSpace:"preserve",children:[(0,T.jsx)("path",{id:"volume-speaker",fill:"#9aadc7",d:"M17.6,31.6c-0.3,0-0.6-0.1-0.8-0.3l-7.3-6.6H4.1c-0.7,0-1.3-0.6-1.3-1.3V11.6c0-0.7,0.6-1.3,1.3-1.3h5.4 l7.3-6.6c0.4-0.3,0.9-0.4,1.3-0.2c0.5,0.2,0.7,0.6,0.7,1.1v25.7c0,0.5-0.3,0.9-0.7,1.1C17.9,31.6,17.7,31.6,17.6,31.6z M5.3,22.2 h4.6c0.3,0,0.6,0.1,0.8,0.3l5.5,5v-20l-5.5,5c-0.2,0.2-0.5,0.3-0.8,0.3H5.3V22.2z"}),(0,T.jsx)("path",{id:"static-x-lines",fill:"none",stroke:"#9aadc7",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",d:"M23.536,13.974l7.052,7.052 M30.588,13.974l-6.952,7.052"})]})}),(0,h.Z)((0,c.Z)(e),"renderStaticSvgs",function(){return e.props.muted||0===e.props.volume?e.renderStaticMuteSvg():e.renderStaticVolumeSvg()}),(0,h.Z)((0,c.Z)(e),"renderVolumeControls",function(){return(0,T.jsxs)(_,{className:"volume-controls",children:[e.renderVolumeButton(),e.renderVolumeSlider()]})}),e}return(0,l.Z)(i,[{key:"componentDidMount",value:function(){this.setScrubberPositionFromVolume(),this.setupScrubberDragListener(),this.setupScrubberReleaseListener(),this.volumeButtonRef.current&&this.volumeButtonRef.current.addEventListener("keydown",this.handleVolumeKeypress)}},{key:"componentDidUpdate",value:function(){this.setScrubberPositionFromVolume()}},{key:"componentWillUnmount",value:function(){window.removeEventListener("mousemove",this.handleVolumeScrubber),window.removeEventListener("mouseup",this.handleScrubberRelease),this.volumeButtonRef.current&&this.volumeButtonRef.current.removeEventListener("keydown",this.handleVolumeKeypress)}},{key:"setupScrubberDragListener",value:function(){this.windowMouseMoveListener=window.addEventListener("mousemove",this.handleScrubberDrag)}},{key:"setupScrubberReleaseListener",value:function(){this.windowMouseUpListener=window.addEventListener("mouseup",this.handleScrubberRelease)}},{key:"setScrubberPositionFromVolume",value:function(){var e=this.volumeTrackRef.current,t=(this.props.volume<.08?.08:this.props.volume)*(null!==e?e.offsetWidth:0);t!==this.state.scrubberPosition&&this.setState({scrubberPosition:t})}},{key:"setLastScrubberPosition",value:function(){var e=this.state.scrubberPosition>0?{draggingScrubber:!1,lastScrubberPosition:this.state.scrubberPosition}:{draggingScrubber:!1};this.setState(e)}},{key:"render",value:function(){return this.renderVolumeControls()}}]),i}(n.PureComponent)),Y=(0,T.jsx)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 35 35",enableBackground:"new 0 0 35 35",space:"preserve",className:"chromecast-empty",children:(0,T.jsxs)("g",{children:[(0,T.jsx)("path",{fill:"#9aadc7",d:"M30.046,28.995H18.965c-0.69,0-1.25-0.56-1.25-1.25s0.56-1.25,1.25-1.25h9.831v-18H4.205v3.241 c0,0.69-0.56,1.25-1.25,1.25s-1.25-0.56-1.25-1.25V7.245c0-0.69,0.56-1.25,1.25-1.25h27.091c0.69,0,1.25,0.56,1.25,1.25v20.5 C31.296,28.436,30.736,28.995,30.046,28.995z"}),(0,T.jsx)("path",{fill:"#9aadc7",d:"M13.518,28.995c-0.69,0-1.25-0.56-1.25-1.25c0-5.136-4.178-9.314-9.314-9.314c-0.69,0-1.25-0.559-1.25-1.25 s0.56-1.25,1.25-1.25c6.514,0,11.814,5.299,11.814,11.814C14.768,28.436,14.208,28.995,13.518,28.995z"}),(0,T.jsx)("path",{fill:"#9aadc7",d:"M8.734,28.995c-0.69,0-1.25-0.56-1.25-1.25c0-2.498-2.032-4.53-4.53-4.53c-0.69,0-1.25-0.56-1.25-1.25 s0.56-1.25,1.25-1.25c3.876,0,7.03,3.153,7.03,7.03C9.984,28.436,9.424,28.995,8.734,28.995z"}),(0,T.jsx)("path",{fill:"#9aadc7",d:"M2.96,29.005c-0.69,0-1.255-0.564-1.255-1.255s0.564-1.255,1.255-1.255s1.265,0.564,1.265,1.255 S3.65,29.005,2.96,29.005z"})]})}),G=function(e){return(0,T.jsxs)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 35 35",enableBackground:"new 0 0 35 35",xmlSpace:"preserve",children:[(0,T.jsxs)("g",{id:"cast_screen",children:[(0,T.jsx)("path",{fill:e,d:"M30.046,28.995H18.965c-0.69,0-1.25-0.56-1.25-1.25s0.56-1.25,1.25-1.25h9.831v-18H4.205v3.241 c0,0.69-0.56,1.25-1.25,1.25s-1.25-0.56-1.25-1.25V7.245c0-0.69,0.56-1.25,1.25-1.25h27.091c0.69,0,1.25,0.56,1.25,1.25v20.5 C31.296,28.436,30.736,28.995,30.046,28.995z"}),(0,T.jsx)("path",{fill:e,d:"M13.518,28.995c-0.69,0-1.25-0.56-1.25-1.25c0-5.136-4.178-9.314-9.314-9.314c-0.69,0-1.25-0.559-1.25-1.25 s0.56-1.25,1.25-1.25c6.514,0,11.814,5.299,11.814,11.814C14.768,28.436,14.208,28.995,13.518,28.995z"}),(0,T.jsx)("path",{fill:e,d:"M8.734,28.995c-0.69,0-1.25-0.56-1.25-1.25c0-2.498-2.032-4.53-4.53-4.53c-0.69,0-1.25-0.56-1.25-1.25 s0.56-1.25,1.25-1.25c3.876,0,7.03,3.153,7.03,7.03C9.984,28.436,9.424,28.995,8.734,28.995z"}),(0,T.jsx)("path",{fill:e,d:"M3.256,29.005c-0.853,0-1.551-0.697-1.551-1.551s0.697-1.551,1.551-1.551S4.82,26.6,4.82,27.454 S4.109,29.005,3.256,29.005z"})]}),(0,T.jsx)("path",{id:"cast_screen",fill:e,d:"M16.765,23.995c-1.329-4.842-5.217-8.729-10.06-10.057v-2.943h19.591v13H16.765z"})]})},X=I.ZP.div.withConfig({displayName:"ChromecastContainer",componentId:"sc-10foczw-0"})(["border:none;background-color:transparent;padding:0;margin:0;.tooltip-right{&[tooltip]{right:70px;}}svg{display:block;width:30px;height:25px;}&:hover{cursor:pointer;svg{path{fill:#fff;}}[tooltip]::before,[tooltip]::after{opacity:1;background-color:#687588;}}&.casting{svg{path{fill:#ffbc00;}}}"]),K=new r.Z,$=function(e){(0,u.Z)(i,e);var t,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,p.Z)(i);if(t){var n=(0,p.Z)(this).constructor;e=Reflect.construct(o,arguments,n)}else e=o.apply(this,arguments);return(0,d.Z)(this,e)});function i(e){var t;return(0,a.Z)(this,i),t=o.call(this,e),(0,h.Z)((0,c.Z)(t),"initializeCastApi",function(){console.log("Initializing Cast Api...");try{var e=new chrome.cast.SessionRequest(chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID),o=new chrome.cast.ApiConfig(e,t.sessionListener,t.receiverListener);chrome.cast.initialize(o,t.onChromecastInitSuccess,t.onChromecastInitError)}catch(e){console.warn("Could not initialize chrome cast api",e)}}),(0,h.Z)((0,c.Z)(t),"sessionListener",function(e){t.setSession(e)}),(0,h.Z)((0,c.Z)(t),"receiverListener",function(e){e===chrome.cast.ReceiverAvailability.AVAILABLE&&console.log("Receiver is available")}),(0,h.Z)((0,c.Z)(t),"onChromecastInitSuccess",function(){console.log("Chromecast Init Success")}),(0,h.Z)((0,c.Z)(t),"onChromecastInitError",function(e){console.log("Chromecast Init Error",e)}),(0,h.Z)((0,c.Z)(t),"onRequestSessionSuccess",function(e){t.setSession(e);var o=new chrome.cast.media.MediaInfo(t.props.hlsUrl),n=new chrome.cast.media.LoadRequest(o);n.currentTime=t.props.playedSeconds,window.session.loadMedia(n,t.loadMediaSuccess,t.loadMediaError)}),(0,h.Z)((0,c.Z)(t),"onRequestSessionError",function(e){console.log("request session error: ",e)}),(0,h.Z)((0,c.Z)(t),"loadMediaSuccess",function(e){window.media=e}),(0,h.Z)((0,c.Z)(t),"loadMediaError",function(e){console.log("Error code: ",e)}),(0,h.Z)((0,c.Z)(t),"startCasting",function(){try{var e=new chrome.cast.SessionRequest(chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID);chrome.cast.requestSession(t.onRequestSessionSuccess,t.onRequestSessionError,e)}catch(e){console.warn("Cast API not available",e)}}),(0,h.Z)((0,c.Z)(t),"stopCasting",function(){if(window.media){var e=window.media.currentTime;K.seekTo(e),K.stopCasting(),window.session.stop()}}),(0,h.Z)((0,c.Z)(t),"sessionUpdateListener",function(e){e||t.stopCasting()}),(0,h.Z)((0,c.Z)(t),"setSession",function(e){var o=(0,P.Z)(e,"receiver.friendlyName","unknown device");K.startCasting(o),window.session=e,window.session.addUpdateListener(t.sessionUpdateListener),null===window.media&&window.session.media[0]&&(window.media=window.session.media[0])}),(0,h.Z)((0,c.Z)(t),"handleClick",function(){t.props.casting?t.stopCasting():t.startCasting()}),(0,h.Z)((0,c.Z)(t),"getCastingOnIcon",function(){return(0,T.jsxs)(n.Fragment,{children:[(0,T.jsx)("div",{className:"tooltip-right",tooltip:"Stop Casting"}),t.props.isMobile?G("#FFBC00"):G("#FFF")]})}),(0,h.Z)((0,c.Z)(t),"getCastingOffIcon",function(){return(0,T.jsxs)(n.Fragment,{children:[(0,T.jsx)("div",{tooltip:"Cast to TV"}),t.props.isMobile?G("#FFF"):Y]})}),(0,h.Z)((0,c.Z)(t),"getCastingIcon",function(){return t.props.casting?t.getCastingOnIcon():t.getCastingOffIcon()}),window.__onGCastApiAvailable=function(e){e&&t.initializeCastApi()},window.session||(window.session=null),window.media||(window.media=null),t}return(0,l.Z)(i,[{key:"componentDidMount",value:function(){var e="https://www.gstatic.com/cvhttps://www.cbtnuggets.com/js/sender/v1/cast_sender.js?loadCastFramework=1";if(window.addEventListener("beforeunload",this.stopCasting),!this.isScriptAdded(e)){var t=document.createElement("script");t.type="text/javascript",t.src=e,document.querySelector("head").appendChild(t)}}},{key:"componentDidUpdate",value:function(e){var t=this.props,o=t.casting,n=t.hlsUrl,i=t.playerState;o&&n!==e.hlsUrl&&this.stopCasting(),null!==window.session&&(this.props.playerVolume!==e.playerVolume&&window.session.setReceiverVolumeLevel(this.props.playerVolume),this.props.playerMuted&&window.session.setReceiverMuted(!this.props.playerMuted)),o&&("PAUSED"===i&&null!==window.media?window.media.pause(new chrome.cast.media.PauseRequest):"PLAYING"===i&&null!==window.media&&window.media.play(new chrome.cast.media.PlayRequest))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.stopCasting)}},{key:"isScriptAdded",value:function(e){var t,o=document.getElementsByTagName("script");if(!o.length)return!1;for(var n=o.length;n>=0;n--)if((null===(t=o[n])||void 0===t?void 0:t.src)===e)return!0;return!1}},{key:"render",value:function(){return(0,T.jsx)(X,{id:"chromecast",className:"chromecast",onClick:this.handleClick,children:this.getCastingIcon()})}}]),i}(n.PureComponent);(0,h.Z)($,"defaultProps",{hlsUrl:"",casting:!1,playerState:"PAUSED",playedSeconds:0,isMobile:!1});var J=M(["startCasting","stopCasting","progress","cast.*"],function(e){return{casting:(0,P.Z)(e,"casting"),playerVolume:(0,P.Z)(e,"volume"),playerMuted:(0,P.Z)(e,"muted",!1),playerState:(0,P.Z)(e,"playerState"),playedSeconds:(0,P.Z)(e,"progress.playedSeconds"),hlsUrl:(0,P.Z)(e,"hlsUrl")}},$),ee=(0,T.jsx)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 35 35",enableBackground:"new 0 0 35 35",space:"preserve",children:(0,T.jsxs)("g",{children:[(0,T.jsx)("path",{fill:"#9aadc7",d:"M30.1,3.6h-9.4c-0.7,0-1.2,0.6-1.2,1.2s0.6,1.2,1.2,1.2h6.4l-9.2,9.2c-0.5,0.5-0.5,1.3,0,1.8s1.3,0.5,1.8,0 l9.3-9.3v6.4c0,0.7,0.6,1.2,1.2,1.2s1.2-0.6,1.2-1.2V4.9C31.4,4.2,30.8,3.6,30.1,3.6z"}),(0,T.jsx)("path",{fill:"#9aadc7",d:"M30.1,19.5c-0.7,0-1.2,0.6-1.2,1.2v8.2H6.1V6.1h8.2c0.7,0,1.2-0.6,1.2-1.2S15,3.6,14.3,3.6H4.9 c-0.7,0-1.2,0.6-1.2,1.2v25.3c0,0.7,0.6,1.2,1.2,1.2h25.3c0.7,0,1.2-0.6,1.2-1.2v-9.4C31.4,20,30.8,19.5,30.1,19.5z"})]})}),et=(0,T.jsx)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 35 35",enableBackground:"new 0 0 35 35",space:"preserve",children:(0,T.jsxs)("g",{children:[(0,T.jsx)("path",{fill:"#FFFFFF",d:"M30.1,3.6h-9.4c-0.7,0-1.2,0.6-1.2,1.2s0.6,1.2,1.2,1.2h6.4l-9.2,9.2c-0.5,0.5-0.5,1.3,0,1.8s1.3,0.5,1.8,0 l9.3-9.3v6.4c0,0.7,0.6,1.2,1.2,1.2s1.2-0.6,1.2-1.2V4.9C31.4,4.2,30.8,3.6,30.1,3.6z"}),(0,T.jsx)("path",{fill:"#FFFFFF",d:"M30.1,19.5c-0.7,0-1.2,0.6-1.2,1.2v8.2H6.1V6.1h8.2c0.7,0,1.2-0.6,1.2-1.2S15,3.6,14.3,3.6H4.9 c-0.7,0-1.2,0.6-1.2,1.2v25.3c0,0.7,0.6,1.2,1.2,1.2h25.3c0.7,0,1.2-0.6,1.2-1.2v-9.4C31.4,20,30.8,19.5,30.1,19.5z"})]})}),eo=(0,T.jsxs)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 35 35",enableBackground:"new 0 0 35 35",space:"preserve",children:[(0,T.jsx)("path",{id:"pop-arrow",fill:"#9aadc7",d:"M18.825,17.375l9.4,0c0.7,0,1.2-0.6,1.2-1.2s-0.6-1.2-1.2-1.2l-6.4,0l9.2-9.2 c0.5-0.5,0.5-1.3,0-1.8s-1.3-0.5-1.8,0l-9.3,9.3l0-6.4c0-0.7-0.6-1.2-1.2-1.2s-1.2,0.6-1.2,1.2l0,9.2 C17.525,16.775,18.125,17.375,18.825,17.375z"}),(0,T.jsx)("path",{fill:"#9aadc7",d:"M30.1,19.5c-0.7,0-1.2,0.6-1.2,1.2v8.2H6.1V6.1h8.2c0.7,0,1.2-0.6,1.2-1.2S15,3.6,14.3,3.6H4.9 c-0.7,0-1.2,0.6-1.2,1.2v25.3c0,0.7,0.6,1.2,1.2,1.2h25.3c0.7,0,1.2-0.6,1.2-1.2v-9.4C31.4,20,30.8,19.5,30.1,19.5z"})]}),en=I.ZP.button.withConfig({displayName:"PopoutContainer",componentId:"sc-5at7fc-0"})(["border:none;background-color:transparent;padding:0;margin:0;svg{display:block;width:30px;height:25px;}&:hover{cursor:pointer;svg{path{fill:#fff;}}[tooltip]::before,[tooltip]::after{opacity:1;background-color:#687588;}}"]),ei=new r.Z,er=function(e){(0,u.Z)(n,e);var t,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,p.Z)(n);if(t){var i=(0,p.Z)(this).constructor;e=Reflect.construct(o,arguments,i)}else e=o.apply(this,arguments);return(0,d.Z)(this,e)});function n(){var e;(0,a.Z)(this,n);for(var t=arguments.length,i=Array(t),r=0;re.length)&&(t=e.length);for(var o=0,n=Array(t);o0){var a=o[r-1];ex.setQuality(String(a))}}}),(0,h.Z)((0,c.Z)(e),"getOptions",function(){var t=e.props,o=t.supportedResolutions,n=t.isMobile,i=[];if(i.push((0,T.jsx)("button",{id:"QualitySelect-auto",className:"toggle-item ".concat(e.isActive("auto")),onClick:function(){e.handleClick("auto")},children:"AUTO"},"auto")),!o||(0,y.Z)(o))return i;var r,s=function(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,t){if(e){if("string"==typeof e)return ey(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if("Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return ey(e,t)}}(e))){o&&(e=o);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return s=e.done,e},e:function(e){a=!0,r=e},f:function(){try{s||null==o.return||o.return()}finally{if(a)throw r}}}}((0,em.Z)(o));try{for(s.s();!(r=s.n()).done;)!function(){var t=r.value,o=String(t);(!n||n&&ew[t])&&i.push((0,T.jsx)("button",{id:"QualitySelect-".concat(o,"p"),className:"toggle-item ".concat(e.isActive(o)),onClick:function(){e.handleClick(o)},children:"".concat(o,"p")},o))}()}catch(e){s.e(e)}finally{s.f()}return i}),(0,h.Z)((0,c.Z)(e),"isActive",function(t){return e.props.activeQuality===t?"active":""}),(0,h.Z)((0,c.Z)(e),"handleClick",function(e){ex.setQuality(e)}),e}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){this.setActiveResolution()}},{key:"componentDidUpdate",value:function(e){e.supportedResolutions!==this.props.supportedResolutions&&this.setActiveResolution()}},{key:"render",value:function(){return(0,T.jsxs)("div",{className:"setting-item",id:"videoQuality",children:[(0,T.jsx)("div",{className:"setting-label",children:"Quality"}),(0,T.jsx)("div",{className:"setting-control",children:(0,T.jsx)("div",{className:"options-toggle",children:this.getOptions()})})]})}}]),n}(n.PureComponent);(0,h.Z)(eb,"defaultProps",{activeQuality:(0,ep.Oz)("quality")||"auto",supportedResolutions:[]});var ek=M("*",function(e){return{activeQuality:(0,P.Z)(e,"quality")}},eb),eS=I.ZP.div.withConfig({displayName:"SettingsContainer",componentId:"sc-hp95f7-0"})([".toggle-item{border:none;background-color:transparent;padding:0;margin:0;transform:scale(1.2);}.settings-button{border:none;background-color:transparent;padding:0;margin-top:5px;svg{display:block;position:relative;width:30px;height:25px;}&.open{svg{transform:scale(1.15);path{fill:#fff;}}& ~ .settings-panel{display:block;}}&:hover{cursor:pointer;svg{path{fill:#fff;}}[tooltip]::before,[tooltip]::after{opacity:1;background-color:#687588;}}}.settings-panel{display:none;padding:20px 20px 10px 20px;position:absolute;bottom:45px;right:0;background-color:#1b2733;border-top-left-radius:4px;z-index:20;.setting-item{padding:15px 0px;display:flex;align-items:center;border-bottom:1px solid #687588;&:first-child{padding-top:0;}.setting-label{font-weight:bold;color:#fff;white-space:nowrap;margin-right:20px;}.setting-control{margin-left:auto;.options-toggle{display:flex;float:right;.toggle-item{min-width:40px;text-align:center;color:#9aadc7;border-bottom:2px solid transparent;margin-left:5px;padding-bottom:2px;cursor:pointer;&.active{color:#fff;font-weight:bold;border-bottom-color:#ffbc00;}}}.rocker-label{position:relative;width:45px;height:15px;margin-bottom:0;padding-right:32px;transform:translateY(3px);.setting-checkbox{display:none;transform:translate(3px,-3px);line-height:normal;box-sizing:border-box;padding:0;&:checked + .rocker{background-color:#ffbc00;&::before{transform:translateX(26px);}}}.rocker{position:absolute;width:40px;height:15px;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#455060;-webkit-transition:0.2s;transition:0.2s;&.round{border-radius:34px;&::before{border-radius:50%;}}&::before{position:absolute;content:'';height:21px;width:21px;top:-3px;left:-2px;bottom:2px;background-color:white;-webkit-transition:0.2s;transition:0.2s;}}}}}}"]),eZ=new r.Z,eC=M("*",function(e){return{showCaptions:(0,P.Z)(e,"showCaptions",!1),showQuizQuestions:(0,P.Z)(e,"showQuizQuestions",!1),autoPlayEnabled:(0,P.Z)(e,"autoPlayEnabled",!1),showDebugLogs:(0,P.Z)(e,"showDebugLogs"),isPopout:(0,P.Z)(e,"isPopout")}},function(e){(0,u.Z)(i,e);var t,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,p.Z)(i);if(t){var n=(0,p.Z)(this).constructor;e=Reflect.construct(o,arguments,n)}else e=o.apply(this,arguments);return(0,d.Z)(this,e)});function i(){var e;(0,a.Z)(this,i);for(var t=arguments.length,r=Array(t),s=0;s1&&(i=1),i=Number(i.toFixed(1)),eP.setVolume(i),i>0&&eP.setMute(!1);break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:if(t.shiftKey)return;var r=t.which-48;eP.seekToPercentage(r/10);break;case 36:if(t.shiftKey)return;eP.seekTo(0);break;case 35:if(t.shiftKey)return;var s=e.props.durationSeconds-1;eP.seekTo(s);break;case 74:case 37:e.props.isStopped||e.props.hoveringSlider||(e.props.isPlaying&&eP.sendOneOffHeartbeat("departure"),eP.rewind());break;case 76:case 39:e.props.isStopped||e.props.hoveringSlider||(e.props.isPlaying&&eP.sendOneOffHeartbeat("departure"),eP.forward());break;case 67:eP.toggleShowCaptions();break;case 70:eP.toggleFullScreen();break;case 77:0===e.props.volume?eP.setVolume(.5):eP.setVolume(0),eP.setMute(!e.props.muted);break;case 84:var a=e.props.toggleTheaterMode;a&&a();break;case 80:if(e.props.isPopout)return;eP.setHasPopout(!e.props.hasPopout),eP.pause()}}),e}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyPress)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyPress)}},{key:"render",value:function(){return null}}]),n}(n.PureComponent);(0,h.Z)(eT,"defaultProps",{isPlaying:!1,volume:0,durationSeconds:0,muted:!1,hasPopout:!1,speed:1});var eL=M("*",function(e){return{isPlaying:"PLAYING"===(0,P.Z)(e,"playerState","NOT_STARTED"),isStopped:"NOT_STARTED"===(0,P.Z)(e,"playerState","NOT_STARTED"),volume:(0,P.Z)(e,"volume"),durationSeconds:(0,P.Z)(e,"durationSeconds"),muted:(0,P.Z)(e,"muted"),isPopout:(0,P.Z)(e,"isPopout"),speed:(0,P.Z)(e,"speed")}},eT),eR=I.ZP.div.withConfig({displayName:"ControlBarContainer",componentId:"sc-1aeh59z-0"})(["display:flex;position:relative;width:100%;height:5.5rem;margin-top:-8px;flex-flow:column nowrap;background-color:#1b2733;border-radius:0;font-size:15px;transition:all 0.25s,height 0s,opacity 0s;@media (max-width:768px){display:none;}&.show-control-bar{transform:translateY(-45px);}&.fullscreen{margin-top:-5px;transform:translateY(5px);&.show-control-bar{transform:translateY(-50px);}&.ios-safari{transform:translateY(0);}}&.popped-out{.buttons{padding:3px 13px 0px 13px;}}.control-bar-buttons{display:flex;flex:1;flex-flow:row nowrap;align-items:center;justify-content:space-between;padding:13px 10px 7px 10px;.buttons-left,.buttons-right{display:flex;flex-flow:row nowrap;align-items:center;height:100%;}.buttons-left{& > *{margin-right:5px;}.player-time{color:#9aadc7;margin-left:-33%;user-select:none;&.is-tablet-player-time{margin-left:10px;}}}.buttons-right > *{margin-left:10px;}[tooltip]::before,[tooltip]::after{top:-20px;left:15px;}}svg{display:block;width:30px;height:25px;}[tooltip]{position:absolute;pointer-events:none;height:100%;z-index:3;&::before{content:'';position:absolute;top:-100%;left:50%;transform:translateX(-50%) !important;opacity:0;}&::after{content:attr(tooltip);position:absolute;padding:8px;top:-100%;left:50%;color:#fff;background-color:#444;font-weight:bold;border-radius:4px;transform:translateX(-50%) translateY(-110%) !important;white-space:nowrap;user-select:none;opacity:0;}}"]),eN=function(e){(0,u.Z)(i,e);var t,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,p.Z)(i);if(t){var n=(0,p.Z)(this).constructor;e=Reflect.construct(o,arguments,n)}else e=o.apply(this,arguments);return(0,d.Z)(this,e)});function i(){var e;(0,a.Z)(this,i);for(var t=arguments.length,r=Array(t),s=0;s\');background-color:#eff2f6;background-size:cover;background-position:center;background-repeat:no-repeat;overflow:visible;@media (max-width:408px){padding:1rem;.mobile-clamp{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){background-size:auto 260%;}&.active{opacity:0;pointer-events:none;}&.darkStyle{background-image:none;background-color:',";justify-content:center;h1{color:",";}.video-count-title{margin-top:2.4rem;color:",";}.play-svg{path{fill:",";}circle{stroke:",";}}}.play-svg,.animated-play-svg{border:none;background-color:transparent;width:10rem;transition:all 0.25s ease-out;opacity:0.8;&:hover{cursor:pointer;transform:scale(1.2);opacity:1;}}.retired-message{text-align:center;}.animated-play-svg{.play-triangle{fill:",";}.circle-background{fill:none;stroke:",";stroke-width:8;stroke-miterlimit:10;}.circle-loading{fill:none;stroke:#ffbc00;stroke-width:9;stroke-miterlimit:10;transition:stroke-dasharray 1s linear 0s;}}.loading-spinner-svg{--border-width:4px;--color:rgba(255,188,0,1);--color-trans:rgba(255,188,0,0.5);height:90px;width:90px;border-radius:50%;--mask:radial-gradient(farthest-side,transparent calc(100% - var(--border-width) - 0.5px),#000 calc(100% - var(--border-width) + 0.5px));-webkit-mask:var(--mask);mask:var(--mask);background:linear-gradient(to top,var(--color),var(--color-trans)) 100% 0/50% 100% no-repeat,linear-gradient(var(--color-trans) 50%,transparent 90%) 0 0/50% 100% no-repeat;animation:spin 1s linear infinite;@keyframes spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}}.collection-title{text-align:center;font-weight:bold;font-size:2.7rem;color:",";margin-top:0;}.video-count-title{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;max-width:90%;.video-count{font-weight:700;margin-bottom:0.5rem;}.video-title{text-align:center;}}.cancel-button{bottom:10px;transform:translateY(-50%);color:",";font-size:12px;user-select:none;&:hover{cursor:pointer;text-decoration:underline;}}.end-of-collection{display:flex;flex-flow:column nowrap;height:max-content;align-items:center;margin:auto;.end-of-video{max-width:100%;text-align:center;.end-of-video-title{width:100%;padding-left:10px;color:",";font-size:26px;font-weight:bold;font-family:'Helvetica Neue',Arial;margin-bottom:20px;text-align:center;}.end-of-video-subtitle{display:flex;flex-flow:column nowrap;align-items:center;justify-content:center;font-size:18px;padding-left:10px;.subtitle-text{margin-bottom:20px;}.end-of-video-link{font-size:18px;color:",";cursor:pointer;line-height:23px;&:hover{text-decoration:underline;}}}.subscription-btn{margin-top:2.5rem;}}}"],function(e){return e.backgroundImage},function(e){return e.theme.colors.black},function(e){return e.theme.colors.white},function(e){return e.theme.colors.white},function(e){return e.theme.colors.primaryBrand},function(e){return e.theme.colors.primaryBrand},function(e){return e.theme.colors.blue},function(e){return e.theme.colors.blue},function(e){return e.theme.colors.secondary},function(e){return e.theme.colors.blue},function(e){return e.theme.colors.secondary},function(e){return e.theme.colors.blue}),eW=I.ZP.div.withConfig({displayName:"MobileOverlayContainer",componentId:"sc-dk6j0b-1"})(["@media (max-width:","){&.show{opacity:1;z-index:1;}}& > *{-webkit-tap-highlight-color:transparent;}display:flex !important;justify-content:center;position:absolute;top:0;left:0;width:calc(100% - 15px);height:100%;background-color:rgba(0,0,0,0.75);color:white;opacity:0;transition:opacity 0.25s;z-index:-1;margin:0 7.5px;&:not(.fullscreen){.top-row{margin-bottom:60px;}}.full-screen{width:100%;height:100%;max-width:35px;svg{width:100%;height:100%;path{fill:#fff;}}}.play-pause{max-width:60px;svg{width:100%;height:100%;path,line{fill:#fff;stroke:#fff;}}}.rewind{width:100%;height:100%;max-width:35px;svg{width:100%;height:100%;path{fill:#fff;}}}.forward{width:100%;height:100%;max-width:35px;svg{width:100%;height:100%;path{fill:#fff;}}}.setting-item{display:flex;flex-flow:column nowrap;align-items:center;.setting-label{@media (max-width:$media-phone-small){font-size:16px;}font-size:18px;font-weight:bold;padding-bottom:4%;}.setting-control{@media (max-width:$media-phone-small){font-size:14px;}font-size:16px;.options-toggle{display:flex;flex-flow:row nowrap;.toggle-item{min-width:40px;text-align:center;color:#fff;border:0;border-bottom:2px solid transparent;margin-left:10px;padding-bottom:2px;cursor:pointer;background-color:transparent;&.active{font-weight:bold;border-bottom-color:#ffbc00;}}}}}.timeline{width:calc(100% - 40px);margin-left:20px;top:-15px;&:hover,&.dragging-scrubber{top:-17px;height:15px;}.layer-background,.layer-background > *{border-radius:5px;.scrubber{border-radius:50%;transform:scale(5) translateX(-10%) translateY(-5%);background-color:#ffbc00;}}.dragging-tooltip{position:absolute;pointer-events:none;height:100%;&::before{content:'';position:absolute;top:-100%;left:50%;transform:translateX(-50%);opacity:0;}&::after{content:attr(tooltip);position:absolute;padding:8px;top:-100%;left:50%;color:#fff;background-color:#222;font-weight:bold;border-radius:4px;transform:translateX(-50%) translateY(-165%);white-space:nowrap;user-select:none;opacity:0;}}}.top-row{width:100%;display:flex;flex-flow:column nowrap;justify-content:center;align-items:center;&.casting{@media (max-width:","){justify-content:flex-start;}@media (max-width:","){justify-content:center;.chromecast-status{display:none;}}}.chromecast-status{padding:20px;.chromecast-status-stop-casting{color:#1c91c0;font-weight:bold;padding-left:10px;&:hover{cursor:pointer;text-decoration:underline;}}}.playback-controls-container{width:85%;display:flex;flex-flow:row nowrap;justify-content:space-around;align-items:center;@media (max-width:","){.play{height:40px;width:40px;}}.rewind,.forward{height:35px;width:35px;}}.speed-quality-container{display:flex;flex-flow:column nowrap;}}.bottom-row{width:100%;flex:0 1 50px;display:flex;position:absolute;bottom:0;right:0;flex-flow:row nowrap;align-items:center;justify-content:flex-end;.icon{padding:7.5px;&:last-child{margin-right:10px;}svg{height:25px;width:25px;}}}"],function(e){return e.theme.breakpoints.mediaTabletMax},function(e){return e.theme.breakpoints.phone590},function(e){return e.theme.breakpoints.smphone},function(e){return e.theme.breakpoints.smphone}),eY=I.ZP.div.withConfig({displayName:"BannerOverlayContainer",componentId:"sc-dk6j0b-2"})(["width:calc(100% - 15px);display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;position:absolute;top:0;left:0;background-color:white;border:1px solid rgb(233,233,233);border-top:none;transition:height 0.5s;padding:0.75rem;z-index:2;margin:0 7.5px;&.auto-start-failed{background-color:#fcf8e5;border:1px solid #f8ebcf;}@media (max-width:","){.auto-start-message,.offline-message{font-size:12px;}}.auto-start-message{color:#866d42;width:max-content;margin:0 auto;.message{margin-bottom:0.25rem;}.instructions{font-weight:bold;}.instructions-link{color:",";&:hover{text-decoration:underline;cursor:pointer;}}}.offline-message-container{width:100%;display:flex;flex-flow:row nowrap;justify-content:space-between;@media (max-width:","){.offline-message{b,span{font-size:14px;}}}.offline-message{margin:auto;.reload-link{color:#1c91c0;&:hover{text-decoration:underline;cursor:pointer;}}}.close-button{width:20px;height:20px;svg{margin:auto;width:20px;height:20px;fill:rgba(0,0,0,0.2);}&:hover{cursor:pointer;svg{fill:rgba(0,0,0,0.5);}}}}.quiz-dropdown{display:flex;justify-content:space-between;width:100%;.quiz-dropdown-left{display:flex;flex:1;flex-flow:column nowrap;margin-right:2rem;.quiz-dropdown-count{font-size:0.85rem;margin-bottom:2px;font-size:0.75rem;color:#777;}.quiz-dropdown-question{font-size:0.9rem;font-weight:700;line-height:1.25rem;overflow:hidden;}}.quiz-dropdown-right{display:flex;width:max-content;flex-flow:row nowrap;justify-content:flex-end;align-items:center;.quiz-dropdown-countdown-skip{height:max-content;width:max-content;margin-right:0.5rem;font-size:0.75rem;color:#777;.quiz-dropdown-skip{color:#428bca;&:hover{text-decoration:underline;cursor:pointer;}}}.quiz-dropdown-button{height:max-content;width:max-content;padding:5px 10px;font-size:0.75rem;background-color:#ffbc00;}}@media (max-width:","){&{display:block;.quiz-dropdown-left{.quiz-dropdown-question{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}}.quiz-dropdown-right{flex-direction:row-reverse;margin-top:5px;.quiz-dropdown-countdown-skip{margin-left:5px;}}}}}"],function(e){return e.theme.breakpoints.smphone},function(e){return e.theme.colors.blue},function(e){return e.theme.breakpoints.smphone},function(e){return e.theme.breakpoints.smtablet}),eG=new r.Z,eX=function(e){(0,u.Z)(i,e);var t,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,p.Z)(i);if(t){var n=(0,p.Z)(this).constructor;e=Reflect.construct(o,arguments,n)}else e=o.apply(this,arguments);return(0,d.Z)(this,e)});function i(){var e;(0,a.Z)(this,i);for(var t=arguments.length,r=Array(t),s=0;s"," Settings for This Website ",">"," Auto-Play ",">"," Allow All Auto-Play"]});break;case"firefox":e=(0,T.jsxs)("div",{className:"instructions",children:["Firefox menu ",">"," Preferences ",">"," Privacy & Security ",">"," Permissions ",">"," Uncheck: Block websites from automatically playing sound"]});break;case"edge":e=(0,T.jsxs)("div",{className:"instructions",children:["Edge menu ",">"," Settings ",">"," Advanced ",">"," Media Autoplay: Allow"]});break;case"ie":e=(0,T.jsxs)("div",{className:"instructions",children:["Go to ",(0,T.jsx)("i",{children:"Tools"})," ",">"," ",(0,T.jsx)("i",{children:"Manage add-ons"}),". Select ",(0,T.jsx)("i",{children:"Toolbars and Extensions"}),". Select __ ",(0,T.jsx)("i",{children:"Shockwave Flash Object"}),". Add www.cbtnuggets.com to the list of sites to allow the add-on to run."]});break;case"chrome":e=(0,T.jsxs)("div",{className:"instructions",children:["To start the video, click ",(0,T.jsx)("i",{children:"Play"}),". If you have questions, please contact"," ",(0,T.jsx)("a",{className:"instructions-link",href:"/contactus",target:"_blank",children:"Learner Support"}),"."]})}return"chrome"===t?(0,T.jsxs)("div",{className:"auto-start-message",children:[(0,T.jsx)("div",{className:"message",children:"It looks like autoplay might not be working for you."}),e]}):(0,T.jsxs)("div",{className:"auto-start-message",children:[(0,T.jsx)("div",{className:"message",children:"It looks like autoplay might not be working for you. To fix this, follow these steps in your browser:"}),e]})}},{key:"renderOfflineBanner",value:function(){return(0,T.jsxs)("div",{className:"offline-message-container",children:[(0,T.jsxs)("div",{className:"offline-message",children:[(0,T.jsx)("b",{children:"Heads Up!"})," ",(0,T.jsx)("span",{children:"Your viewing data is currently not being recorded."})," ",(0,T.jsx)("span",{className:"reload-link",onClick:function(){return window.location.reload()},role:"button",children:"Try refreshing your browser"})]}),(0,T.jsx)("div",{className:"close-button",onClick:function(){return e0.dismissBanner("connectivity")},role:"button",children:e$})]})}},{key:"renderQuizQuestion",value:function(){var e=this.props,t=e.quizQuestions,o=e.currentQuizQuestion;return(0,T.jsxs)("div",{className:"quiz-dropdown",children:[(0,T.jsxs)("div",{className:"quiz-dropdown-left",children:[(0,T.jsx)("div",{className:"quiz-dropdown-count",children:"Quiz question ".concat(o.order," of ").concat(Object.keys(t).length)}),(0,T.jsx)("div",{className:"quiz-dropdown-question",children:o.text})]}),(0,T.jsxs)("div",{className:"quiz-dropdown-right",children:[(0,T.jsxs)("div",{className:"quiz-dropdown-countdown-skip",children:[(0,T.jsx)("span",{className:"quiz-dropdown-countdown",children:"".concat(this.props.quizDropdownTimeRemaining,"s - ")}),(0,T.jsx)("span",{className:"quiz-dropdown-skip",onClick:this.props.resetQuizQuestionPrompt,role:"button",children:"Skip this question"})]}),(0,T.jsx)(eJ.Z.PrimaryDarkSmall,{onClick:this.handleAnswerClick,children:"Answer"})]})]})}},{key:"renderBanner",value:function(){var e=this.props,t=e.autoStartFailed,o=e.offline,n=e.quizQuestion,i=e.isFreePlayer;return t?this.renderAutoStartFailedBanner():o&&!i?this.renderOfflineBanner():n&&!i?this.renderQuizQuestion():void 0}},{key:"render",value:function(){var e=this.props.autoStartFailed?"auto-start-failed":"";return(0,T.jsx)(eY,{className:"".concat(e),children:this.renderBanner()})}}]),n}(n.PureComponent);(0,h.Z)(e1,"defaultProps",{quizQuestions:{},currentQuizQuestion:{},quizDropdownTimeRemaining:0,isFreePlayer:!1});var e2=o(97500),e5=o(429),e3=o(27717),e6=o(91345),e4=o(96018),e7=o(17099),e9=I.ZP.div.withConfig({displayName:"IconWrapper",componentId:"sc-l8mgde-0"})(["display:flex;margin-right:0.5rem;"]),e8=function(){return(0,T.jsx)(e9,{children:(0,T.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"18px",height:"18px",viewBox:"0 0 24 24",version:"1.1",children:[(0,T.jsx)("title",{children:"open_in_new"}),(0,T.jsx)("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd",children:(0,T.jsxs)("g",{id:"open_in_new",children:[(0,T.jsx)("polygon",{id:"Path",points:"0 0 24 0 24 24 0 24"}),(0,T.jsx)("path",{d:"M19,19 L5,19 L5,5 L12,5 L12,3 L5,3 C3.89,3 3,3.9 3,5 L3,19 C3,20.1 3.89,21 5,21 L19,21 C20.1,21 21,20.1 21,19 L21,12 L19,12 L19,19 Z M14,3 L14,5 L17.59,5 L7.76,14.83 L9.17,16.24 L19,6.41 L19,10 L21,10 L21,3 L14,3 Z",id:"Shape",fill:"#1b2733","fill-rule":"nonzero"})]})})]})})},te=I.ZP.div.withConfig({displayName:"ButtonWrapper",componentId:"sc-b5oe5e-0"})(["display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end;"]),tt=function(e){var t,o=e.slug;e.videoView;var i=(0,n.useContext)(e7.V).isLoggedIn,r=(0,n.useState)(!1),a=r[0],l=r[1],c=(0,n.useState)(!1),u=c[0],d=c[1],p=(t=(0,s.Z)(v().mark(function e(){var t,n,i,r,s;return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l(!0),t="www.cbtnuggets.com"===window.location.host?"cbtnuggets":"qanuggets",e.next=4,e6.od.get("https://accounts.".concat(t,".com/adept/token")).then(function(e){var t=e.data;return t&&t.url}).catch(function(e){return console.error(e)});case 4:n=e.sent,i="&next=/cbtnuggets/".concat(o),r=n.replace("https://learn.sean.adept.at","https://learn.adept.at"),n?(s="".concat(r).concat(i),window.location.href=s):(l(!1),d(!0));case 8:case"end":return e.stop()}},e)})),function(){return t.apply(this,arguments)});return i?(0,T.jsxs)(te,{children:[(0,T.jsxs)(e4.Z.Primary,{disabled:a,onClick:p,children:[(0,T.jsx)(e8,{}),"Switch to new course view"]}),u?(0,T.jsx)("p",{children:"Something went wrong, try again soon."}):null]}):(0,T.jsx)(te,{children:(0,T.jsx)(e5.Z.ButtonLink.Primary,{href:"/signup","data-at":"signup",children:"Start a free week"})})},to=new r.Z,tn=function(e){(0,u.Z)(i,e);var t,o=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,p.Z)(i);if(t){var n=(0,p.Z)(this).constructor;e=Reflect.construct(o,arguments,n)}else e=o.apply(this,arguments);return(0,d.Z)(this,e)});function i(){var e;(0,a.Z)(this,i);for(var t=arguments.length,n=Array(t),r=0;r0&&e.setState({manifestLoadCountdown:e.state.manifestLoadCountdown-1e3})}),(0,h.Z)((0,c.Z)(e),"clearManifestLoadingInterval",function(){clearInterval(e.manifestLoadingInterval),e.manifestLoadingInterval=null,e.resetManifestLoadCount()}),(0,h.Z)((0,c.Z)(e),"getFormattedManifestLoadCount",function(){return Math.ceil(e.state.manifestLoadCountdown/1e3)}),(0,h.Z)((0,c.Z)(e),"handleStartVideoClick",(0,s.Z)(v().mark(function t(){return v().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,to.setActivePlayer(e.props.playerId);case 2:e.props.adeptCourseSlug&&to.setAdeptCourseSlug(e.props.adeptCourseSlug),to.isFreePlayer?to.getFreeManifest():to.createLicense(!0);case 5:case"end":return t.stop()}},t)}))),(0,h.Z)((0,c.Z)(e),"renderPlayBtnOrLoadingSpinner",function(){var t=e.props,o=t.videoReady,n=t.licenseCreateStatus,i=t.licenseTakeoverStatus,r=t.manifestFetchTimedOut,s=t.autoStart;return r||("SUCCESS"!==n||o)&&("NOT_STARTED"!==n||!s)&&"LOADING"!==n&&"LOADING"!==i?(0,T.jsx)("button",{id:"overlayPlayButton",className:"play-svg",onClick:e.handleStartVideoClick,title:"Play video",children:e.renderPlaySvg("#455060")}):(0,T.jsx)("div",{id:"overlayLoadingSpinner",className:"loading-spinner-svg"})}),(0,h.Z)((0,c.Z)(e),"renderVideoNumberOrStatusMsg",function(){var t=e.props,o=t.videoReady,n=t.licenseCreateStatus,i=t.licenseTakeoverStatus,r=t.manifestFetchTimedOut,s={NOT_STARTED:e.renderVideoCount(),LOADING:"Retrieving video URL...",FAILURE:"LOADING"===i?"Taking over active session...":"Failed to retrieve video URL",SUCCESS:r?"The server took too long to respond":o?e.renderVideoCount():"Retrieving video data..."};return(0,T.jsx)("div",{className:"video-count",children:s[n]})}),(0,h.Z)((0,c.Z)(e),"renderStatusMsg",function(){var t=e.props,o=t.videoReady,n=t.licenseCreateStatus,i=t.licenseTakeoverStatus,r=t.manifestFetchTimedOut;return(0,T.jsx)("div",{className:"video-count",children:{NOT_STARTED:"",LOADING:"Retrieving video URL...",FAILURE:"LOADING"===i?"Taking over active session...":"Failed to retrieve video URL",SUCCESS:r?"The server took too long to respond":o?"":"Retrieving video data..."}[n]})}),(0,h.Z)((0,c.Z)(e),"renderVideoTitleOrRetryMsg",function(){var t=e.props,o=t.selectedVideoTitle,n=t.licenseCreateStatus,i=t.manifestFetchTimedOut,r=t.licenseTakeoverStatus,s=t.manifestLoadingTimeOut,a=t.videoReady;return"SUCCESS"!==n||i||a||!(s>1e4)?"LOADING"!==r&&("FAILURE"===n||i)?(0,T.jsxs)("div",{className:"video-title mobile-clamp",children:["To try again, click the ",(0,T.jsx)("i",{children:"Play"})," button. In most cases, this will solve the problem."]}):(0,T.jsx)("div",{className:"video-title mobile-clamp",children:o}):(null===e.manifestLoadingInterval&&(e.manifestLoadingInterval=setInterval(e.decrementManifestLoadCount,1e3)),(0,T.jsx)("div",{className:"video-title mobile-clamp",children:"Retrying in ".concat(e.getFormattedManifestLoadCount()," seconds")}))}),(0,h.Z)((0,c.Z)(e),"renderRetryMsg",function(){var t=e.props,o=t.licenseCreateStatus,n=t.manifestFetchTimedOut,i=t.licenseTakeoverStatus,r=t.manifestLoadingTimeOut,s=t.videoReady;return"SUCCESS"!==o||n||s||!(r>1e4)?"LOADING"!==i&&("FAILURE"===o||n)?(0,T.jsxs)("div",{className:"video-title mobile-clamp",children:["To try again, click the ",(0,T.jsx)("i",{children:"Play"})," button. In most cases, this will solve the problem."]}):void 0:(null===e.manifestLoadingInterval&&(e.manifestLoadingInterval=setInterval(e.decrementManifestLoadCount,1e3)),(0,T.jsx)("div",{className:"video-title mobile-clamp",children:"Retrying in ".concat(e.getFormattedManifestLoadCount()," seconds")}))}),(0,h.Z)((0,c.Z)(e),"renderVideoCount",function(){var t=e.props,o=t.selectedVideoTitle,n=t.videoNumber,i=t.videosLength;if(i>0&&!(0,y.Z)(o))return"Video ".concat(n," of ").concat(i,":")}),(0,h.Z)((0,c.Z)(e),"renderPlaySvg",function(e){return(0,T.jsxs)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 200 200",enableBackground:"new 0 0 200 200",space:"preserve",children:[(0,T.jsx)("path",{id:"play-arrow",fill:e,d:"M81.206,130.546v-61.16c0-3.628,3.628-5.701,6.997-3.628l46.648,30.58c2.592, 2.073,2.592,5.701,0,7.515l-46.648,30.58C85.093,136.247,81.206,133.915,81.206,130.546z"}),(0,T.jsx)("circle",{fill:"none",stroke:e,strokeWidth:"8",strokeMiterlimit:"10",cx:"100",cy:"100",r:"90"})]})}),(0,h.Z)((0,c.Z)(e),"renderAnimatedPlaySvg",function(){var t=2*Math.PI*90,o=1-e.props.nextVideoCountdownMsCurrent/e.props.NEXT_VIDEO_COUNTDOWN_MS;return(0,T.jsxs)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 200 200",enableBackground:"new 0 0 200 200",space:"preserve",children:[(0,T.jsx)("path",{className:"play-triangle",d:"M81.2,130.5V69.4c0-3.6,3.6-5.7,7-3.6l46.6,30.6c2.6,2.1,2.6,5.7,0,7.5l-46.6,30.6C85.1,136.2,81.2,133.9,81.2,130.5z"}),(0,T.jsx)("circle",{className:"circle-background",cx:"100",cy:"100",r:90}),(0,T.jsx)("circle",{id:"bar",className:"circle-loading",cx:"100",cy:"100",r:90,style:{strokeDasharray:"".concat(o*t,", ").concat(t)},transform:"rotate(-90, 100, 100)"})]})}),e}return(0,l.Z)(i,[{key:"componentDidUpdate",value:function(e){this.handleClearInterval(e)}},{key:"renderRetiredVideoOverlay",value:function(){var e=this.props.skillTitle;return(0,T.jsxs)("div",{children:[(0,T.jsx)("h1",{className:"collection-title mobile-clamp",children:e}),(0,T.jsxs)("div",{className:"retired-message",children:["This skill has been retired.",(0,T.jsx)("a",{href:"/it-training",children:" Find something new."})]})]})}},{key:"renderStartVideoOverlay",value:function(){return(0,T.jsxs)(n.Fragment,{children:[(0,T.jsx)("h1",{className:"collection-title mobile-clamp",children:"Watch the first video free"}),this.renderPlayBtnOrLoadingSpinner(),(0,T.jsxs)("div",{className:"video-count-title",children:[this.renderStatusMsg(),this.renderRetryMsg()]})]})}},{key:"renderBetweenVideosOverlay",value:function(){var e=this,t=this.props,o=t.collectionTitle,i=t.nextVideoTitle,r=t.autoPlayEnabled,s=t.nextVideoCountdownCancelled,a=t.nextVideoCountdownMsCurrent,l=t.NEXT_VIDEO_COUNTDOWN_MS;return r&&!s&&a===l&&this.props.startNextVideoCountdown(),(0,T.jsxs)(n.Fragment,{children:[(0,T.jsx)("h1",{className:"collection-title mobile-clamp",children:o}),(0,T.jsx)("div",{id:"overlayPlayButtonAnimated",className:"animated-play-svg",onClick:function(){return e.props.goToNextVideo()},role:"button",children:this.renderAnimatedPlaySvg()}),(0,T.jsxs)("div",{className:"video-count-title",children:[(0,T.jsx)("div",{className:"video-count",children:"Next Up:"}),(0,T.jsx)("div",{className:"video-title mobile-clamp",children:i})]}),r&&!s&&(0,T.jsx)("div",{id:"cancelNextVideo",className:"cancel-button",onClick:function(){return e.props.cancelNextVideoCountdown()},role:"button",children:"CANCEL"})]})}},{key:"renderEndOfCollectionOverlay",value:function(){var e=this.props.isLMI;return(0,T.jsx)("div",{className:"end-of-collection",children:(0,T.jsxs)("div",{className:"end-of-video",children:[(0,T.jsx)("div",{className:"end-of-video-title",children:"You’ve watched the last video in this collection."}),e?null:(0,T.jsxs)("div",{className:"end-of-video-subtitle",children:["What will you learn next?",(0,T.jsxs)("a",{className:"end-of-video-link",href:"/learn/search",children:[" ","Find something new"]})]})]})})}},{key:"renderLoggedOutEndOfVideoOverlay",value:function(){return(0,T.jsx)("div",{className:"end-of-collection",children:(0,T.jsxs)("div",{className:"end-of-video",children:[(0,T.jsx)("div",{className:"end-of-video-title",children:"Watch now with a free week."}),(0,T.jsx)("div",{children:(0,T.jsx)(e5.Z.ButtonLink.Primary,{href:"/signup",children:"Watch now"})}),(0,T.jsx)("p",{children:(0,T.jsx)(e3.Z.Arrow,{onClick:function(e){return(0,e2.B)()},children:(0,T.jsx)("span",{children:"Have a team? Let's chat"})})})]})})}},{key:"renderExpiredSubscriptionOverlay",value:function(){return(0,T.jsx)("div",{className:"end-of-collection",children:(0,T.jsxs)("div",{className:"end-of-video",children:[(0,T.jsx)("div",{className:"end-of-video-title",children:"Your subscription has expired."}),(0,T.jsxs)("div",{className:"end-of-video-subtitle",children:[(0,T.jsx)("div",{className:"subtitle-text",children:"This video is only available to subscribers with an active subscription."}),(0,T.jsx)(e5.Z.ButtonLink.DarkLarge,{href:"/youraccount/plan-and-payment",children:"Reactivate your subscription"})]})]})})}},{key:"renderUpgradeYourAccountOverlay",value:function(){return(0,T.jsx)("div",{className:"end-of-collection",children:(0,T.jsxs)("div",{className:"end-of-video",children:[(0,T.jsx)("div",{className:"end-of-video-title",children:"Upgrade your account to watch this video."}),(0,T.jsxs)("div",{className:"end-of-video-subtitle",children:[(0,T.jsxs)("div",{className:"subtitle-text",children:["This video is only available to paid subscribers. Upgrade your account now to access our entire library and unlock all of our features, like ",(0,T.jsx)("a",{href:"/virtual-labs",children:" virtual labs"})," and ",(0,T.jsx)("a",{href:"/it-training-videos/exams",children:"practice exams."})]}),(0,T.jsx)("div",{children:(0,T.jsx)(e5.Z.ButtonLink.DarkLarge,{href:"/upgrade",children:"Upgrade account"})})]})]})})}},{key:"renderNonViewerOverlay",value:function(){return(0,T.jsx)("div",{className:"end-of-collection",children:(0,T.jsxs)("div",{className:"end-of-video",children:[(0,T.jsx)("div",{className:"end-of-video-title",children:"Videos are only available to subscribers with viewing access enabled."}),(0,T.jsxs)("div",{className:"end-of-video-subtitle",children:[(0,T.jsx)("div",{children:"You can edit your access in the Learner Management section of your account."}),(0,T.jsxs)("div",{children:["If you need help, please contact your account owner or ",(0,T.jsx)("a",{href:"/contactus",children:"Learner Support"}),"."]})]})]})})}},{key:"render",value:function(){var e,t=this.props,o=t.videoReady,n=t.videoEnded,i=t.videoNumber,r=t.videosLength,s=t.playerState,a=t.isViewer,l=t.isNextVideoInPreReleaseState,c=t.isCurrentVideoInPreReleaseState,u=t.hasActiveSubscription,d=t.hasAccessToVideo,p=t.isCurrentSkillRetired,h=t.isFreemiumSkill,f=t.isFreePlayer,v=(t.courseSlug,t.isAdeptOnly),g=t.isLoggedIn,m=!1;return a||h?!1===d?f?(0,T.jsx)(eU,{children:this.renderLoggedOutEndOfVideoOverlay()}):(0,T.jsx)(eU,{children:this.renderUpgradeYourAccountOverlay()}):!1===u?(0,T.jsx)(eU,{children:this.renderExpiredSubscriptionOverlay()}):v&&g?(0,T.jsx)(eU,{className:"darkStyle",children:(0,T.jsx)(tt,{slug:this.props.adeptCourseSlug})}):(p?e=this.renderRetiredVideoOverlay():(n||c)&&!f?e=ie.length)&&(t=e.length);for(var o=0,n=Array(t);o=n}),c=l?"nrn:collection:".concat(l.collectionId):null,u=o.find(function(e){return e.id===c});s=u?"Pre-release"===u.state:null}var d=i?"Pre-release"===i.state:null;e.setState({isCurrentVideoInPreReleaseState:d,isNextVideoInPreReleaseState:s})}),(0,h.Z)((0,c.Z)(e),"resetQuizQuestionPrompt",function(){e.quizDropdownInterval&&clearInterval(e.quizDropdownInterval),e.setState({showQuizDropdown:!1,quizDropdownTimeRemaining:15}),tl.resetCurrentQuizQuestion()}),(0,h.Z)((0,c.Z)(e),"goToNextVideo",function(){var t,o=e.props,n=o.history,i=o.videoNumber,r=o.collectionId,s=o.isPopout,a=o.isLMI,l="autostart=1";if(s)t="/learn/popout-player",window.videoNumber=i+1;else if(a){t="/learn/lmi";var c=new URLSearchParams(location.search);c.get("autostart")&&c.delete("autostart"),l=l.concat("&",c.toString())}else t="/learn/it-training";r.startsWith("nrn:playlist:")?n.push({pathname:"".concat(t,"/").concat(s?"":"playlist/").concat(r,"/").concat(i+1),search:l}):n.push({pathname:"".concat(t,"/").concat(r,"/").concat(i+1),search:l})}),(0,h.Z)((0,c.Z)(e),"goToNextVideoOnTimeoutEnd",function(t){var o=e.state.nextVideoCountdownMsCurrent,n=t.nextVideoCountdownMsCurrent;0===o&&n>0&&setTimeout(function(){0===e.state.nextVideoCountdownMsCurrent&&e.goToNextVideo()},1e3)}),(0,h.Z)((0,c.Z)(e),"goToVideo",function(t,o){var n,i=e.props,r=i.history,s=i.collectionId,a=i.isPopout,l=i.isLMI,c="autostart=1".concat(o?"#pos=".concat(o):"");if(a)n="/learn/popout-player";else if(l){n="/learn/lmi";var u=new URLSearchParams(location.search);u.get("autostart")&&u.delete("autostart"),c=c.concat("&",u.toString())}else n="/learn/it-training";s.startsWith("nrn:playlist:")?r.push({pathname:"".concat(n,"/playlist/").concat(s,"/").concat(t),search:c}):r.push({pathname:"".concat(n,"/").concat(s,"/").concat(t),search:c})}),(0,h.Z)((0,c.Z)(e),"startMobileOverlayTimeout",function(){clearTimeout(e.mobileOverlayTimeout),e.mobileOverlayTimeout=setTimeout(function(){e.setState({showMobileOverlay:!1})},3e3)}),(0,h.Z)((0,c.Z)(e),"clearMobileOverlayTimeout",function(){clearTimeout(e.mobileOverlayTimeout)}),(0,h.Z)((0,c.Z)(e),"startNextVideoCountdown",function(){clearInterval(e.nextVideoCountdownInterval),e.nextVideoCountdownInterval=setInterval(function(){e.state.nextVideoCountdownMsCurrent>0&&e.setState(function(e){return{nextVideoCountdownMsCurrent:e.nextVideoCountdownMsCurrent-500}})},500)}),(0,h.Z)((0,c.Z)(e),"clearNextVideoCountdown",function(){clearInterval(e.nextVideoCountdownInterval),e.setState({nextVideoCountdownMsCurrent:3e3})}),(0,h.Z)((0,c.Z)(e),"setVideoUnready",function(){e.setState({videoReady:!1})}),(0,h.Z)((0,c.Z)(e),"setQualityLevels",function(){e.hlsInstance=e.player.current.getInternalPlayer("hls");var t=null===(o=e.hlsInstance)||void 0===o?void 0:o.levels;if(t&&!(t.length<1)){var o,n,i=t.map(function(e,t){return e.level||(e.level=t),e}),r={main:{},baseline:{}},s=[],a=function(e,t){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,t){if(e){if("string"==typeof e)return ts(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);if("Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o)return Array.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return ts(e,t)}}(e))){o&&(e=o);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return s=e.done,e},e:function(e){a=!0,r=e},f:function(){try{s||null==o.return||o.return()}finally{if(a)throw r}}}}(i);try{for(a.s();!(n=a.n()).done;){var l=n.value,c=l.height;l.attrs.CODECS.includes("avc1.77")||l.videoCodec.includes("avc1.4d")?r.main[c]=l:r.baseline[c]=l,s.length&&s[s.length-1]===c||s.push(c)}}catch(e){a.e(e)}finally{a.f()}for(var u=[],d=[],p=0;p0&&tl.setMute(!1)),r&&tl.setSpeed(r),s&&tl.setQuality(s),void 0!==u&&u!==e.props.autoPlayEnabled&&tl.toggleAutoPlay(),void 0!==a&&a!==e.props.showCaptions&&tl.toggleShowCaptions(),void 0!==l&&l!==e.props.showQuizQuestions&&tl.toggleQuizQuestions(),e.state.showPopoutCloseLink&&e.setState({showPopoutCloseLink:!1})}),(0,h.Z)((0,c.Z)(e),"cancelNextVideoCountdown",function(){e.clearNextVideoCountdown(),e.setState({nextVideoCountdownCancelled:!0})}),(0,h.Z)((0,c.Z)(e),"getVideoStartPosition",function(){var t=e.props,o=t.hashPosition,n=t.startPosition,i=t.videoId,r=(0,ep.Oz)("progress"),s=(0,P.Z)(r,"".concat(i,".position"),0),a=(0,P.Z)(r,"".concat(i,".updatedAt"),0),l=Date.now()-a;return o>0?o:s>0&&l<3e5?s:n>0?n:0}),(0,h.Z)((0,c.Z)(e),"onPlayerError",function(t,o){"hlsError"===t&&o&&"manifestLoadTimeOut"===o.details&&e.state.manifestLoadingTimeOut<2e4&&e.setState({manifestLoadingTimeOut:2e4}),tl.handlePlayerError(t,o)}),e}return(0,l.Z)(r,[{key:"componentDidMount",value:function(){this.setupFullScreenListener(),this.setupWindowUnloadListeners(),this.setupPopoutListener(),this.setReleasedVideos(),null===this.windowMouseMoveListener&&this.setupMouseMoveListener(),this.props.isPopout&&this.props.setPopout(!0)}},{key:"componentDidUpdate",value:function(e,t){var o=this,n=this.props,i=n.playerState,r=n.playedSeconds,s=n.autoStart,a=n.speed,l=n.quality,c=n.hasPopout,u=n.startPosition,d=n.isFullScreen,p=n.showQuizQuestions,h=n.playlistCollections,f=n.videoNumber,v=this.state,g=v.videoReady,m=v.videoEnded,y=v.showMobileOverlay,x=v.showQuizDropdown,w=v.quizDropdownTimeRemaining;if(this.handleNewVideo(e),this.handleAutoStart(),this.handleQualityChange(e),this.handleQuizDropdown(e),this.goToNextVideoOnTimeoutEnd(t),e.playlistCollections!==h&&this.setReleasedVideos(),e.videoNumber!==f&&this.setVideoStates(),"NOT_STARTED"!==e.playerState&&"NOT_STARTED"===i&&this.setVideoUnready(),!e.videoReady&&g&&this.resetManifestLoadingTimeout(),!e.hasPopout&&c&&this.openPopoutPlayer(),t.videoEnded&&!m&&this.nextVideoCountdownInterval&&this.clearNextVideoCountdown(),Math.abs(r-e.playedSeconds)>1&&this.seekTo(r),u!==e.startPosition&&u>0&&tl.initSeekPosition(u),d!==e.isFullScreen&&this.toggleFullScreen(),y&&!t.showMobileOverlay&&this.startMobileOverlayTimeout(),x&&!t.showQuizDropdown&&this.handleQuizDropdownInterval(),a!==e.speed&&"PLAYING"===i&&tl.sendOneOffHeartbeat("speed change"),e.showQuizQuestions!==p&&this.resetQuizQuestionPrompt(),0===w&&this.resetQuizQuestionPrompt(),"NOT_STARTED"===i&&g&&s&&this.playerWrapper.current.click(),g&&!this.initialPlayerAlertShown?setTimeout(function(){o.handlePlayerAlertTimeouts(e),o.initialPlayerAlertShown=!0},1e3):g&&this.handlePlayerAlertTimeouts(e),this.player.current&&this.player.current.getInternalPlayer("hls")){var b=this.player.current.getInternalPlayer("hls"),k=this.getQualityIndexForQuality(l,b.currentLevel);if(-1!==k&&b.currentLevel!==k&&(b.currentLevel=k),k0&&e.setState(function(e){return{quizDropdownTimeRemaining:e.quizDropdownTimeRemaining-1}})},1e3)}},{key:"handleCaptionAlertTimeout",value:function(){var e=this;clearTimeout(this.captionAlertTimeout),this.setState({showCaptionAlert:!0},function(){e.captionAlertTimeout=setTimeout(function(){e.setState({showCaptionAlert:!1})},2e3)})}},{key:"handleAutoPlayAlertTimeout",value:function(){var e=this;clearTimeout(this.autoPlayAlertTimeout),this.setState({showAutoPlayAlert:!0},function(){e.autoPlayAlertTimeout=setTimeout(function(){e.setState({showAutoPlayAlert:!1})},2e3)})}},{key:"handleQuizQuestionsAlertTimeout",value:function(){var e=this;clearTimeout(this.QuizQuestionsAlertTimeout),this.setState({showQuizQuestionsAlert:!0},function(){e.QuizQuestionsAlertTimeout=setTimeout(function(){e.setState({showQuizQuestionsAlert:!1})},2e3)})}},{key:"getHighestQualityIndex",value:function(){var e=this.qualityLevels;if(e.length)return Math.max.apply(Math,(0,x.Z)(e.map(function(e){return e}))).level}},{key:"openPopoutPlayer",value:(o=(0,s.Z)(v().mark(function e(){var t,o,n,i,r=this;return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=(t=this.props).collectionId,n=t.videoNumber,i=Math.floor(t.playedSeconds),e.next=4,tl.releaseLicense();case 4:this.popoutWindow=window.open("/learn/popout-player/".concat(o,"/").concat(n,"?autostart=1#pos=").concat(i),"CBT Nuggets Pop-out Player","width=900,height=650"),this.isIE11||this.popoutWindow.addEventListener("load",function(){r.props.setPopout(!0),r.popoutWindow.addEventListener("beforeunload",r.handlePopoutPlayerClose)});case 6:case"end":return e.stop()}},e,this)})),function(){return o.apply(this,arguments)})},{key:"closePopoutPlayer",value:function(){this.popoutWindow&&this.popoutWindow.close(),this.props.setPopout(!1),tl.setHasPopout(!1)}},{key:"getQualityIndexForQuality",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;if(this.qualityLevels.length&&-1!==t){var o=e;"auto"===e&&(o=this.player.current.getInternalPlayer("hls").levels[t].height);var n=this.qualityLevels.find(function(e){return e.height===parseInt(o)});if(n)return n.level}return -1}},{key:"renderCaptionAlert",value:function(){var e=this.state.showCaptionAlert?"show-alert":"";return(0,T.jsx)("div",{className:"caption-alert ".concat(e),children:"Closed captions ".concat(this.props.showCaptions?"On":"Off")})}},{key:"renderAutoPlayAlert",value:function(){var e=this.state.showAutoPlayAlert?"show-alert":"";return(0,T.jsx)("div",{className:"caption-alert ".concat(e),children:"Autoplay ".concat(this.props.autoPlayEnabled?"On":"Off")})}},{key:"renderQuizQuestionsAlert",value:function(){var e=this.state.showQuizQuestionsAlert?"show-alert":"";return(0,T.jsx)("div",{className:"caption-alert ".concat(e),children:"Quiz questions ".concat(this.props.showQuizQuestions?"On":"Off")})}},{key:"renderVideo",value:function(){var e=this.isSafari?"PLAYING"===this.props.playerState&&this.state.safariBrowserReady:"PLAYING"===this.props.playerState,t=!!this.props.hasPopout||!!this.props.casting||this.props.muted,o=(0,y.Z)(this.hlsInstance)?1:this.props.speed,n=this.getQualityIndexForQuality(this.props.quality),i=this.useCookiesWithVideoRequests(this.props.hlsUrl);return(0,T.jsx)(w.ZP,{playbackRate:o,ref:this.player,url:this.props.hlsUrl,width:"100%",height:"100%",className:"react-player",playing:e,progressInterval:250,volume:this.props.volume,muted:t,onReady:this.onReady,onStart:this.onStart,onPlay:this.onPlay,onPause:this.onPause,onProgress:this.onProgress,onDuration:this.onDuration,onSeek:this.onSeek,onEnded:this.onEnded,onClick:this.playPause,onError:this.onPlayerError,config:{file:{hlsOptions:{xhrSetup:function(e){e.withCredentials=i},startPosition:this.getVideoStartPosition(),startLevel:n,nudgeOffset:1,manifestLoadingTimeOut:this.state.manifestLoadingTimeOut},attributes:{playsInline:1,className:"react-player-video"}}}})}},{key:"renderCaptions",value:function(){var e,t=this.props.showCaptions,o=this.state.videoReady,n=null===(e=document.querySelector(".react-player"))||void 0===e?void 0:e.children[0],i=function(){if(!n)return null;var e,t=n.textTracks[0];null!=t&&t.mode&&(t.mode="hidden");var o=null!==(e=null==t?void 0:t.activeCues)&&void 0!==e?e:null,i=null!=o&&o.length?o[0]:null;if(o&&i)return(null==i?void 0:i.text).replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")};if(t&&o&&i())return(0,T.jsx)("div",{className:"caption",children:(0,T.jsx)("p",{className:"caption-line",children:i()})})}},{key:"renderControlBar",value:function(){var e=this,t=this.props,o=t.isPopout,n=t.playerId,i=t.theaterMode,r=t.setTheaterMode,s=t.playerState,a=t.hlsUrl,l=t.speed,c=t.isFreePlayer,u=this.state,d=u.videoReady,p=u.supportedResolutions;return("NOT_STARTED"!==s&&d?"active":"")?(0,T.jsx)(eM,{seekTo:function(t){return e.seekTo(t)},videoReady:d,videoUrl:a,isPopout:o,browser:ta,isMobile:this.isMobile,isIosChromeOrFirefox:this.isIosChromeOrFirefox,playerId:n,theaterMode:i,setTheaterMode:r,supportedResolutions:p,speed:l,isFreePlayer:c,showControlBar:this.state.showControlBar}):null}},{key:"renderPopoutOverlay",value:function(){return(0,T.jsxs)("div",{className:"popout-overlay",children:[(0,T.jsx)("div",{className:"popout-svg",children:et}),(0,T.jsx)("div",{className:"popout-text",children:"This video is playing in a different window."}),this.state.showPopoutCloseLink&&(0,T.jsx)("div",{className:"popout-link",onClick:this.popInClickHandler,role:"button",children:"Play here instead"})]})}},{key:"renderLicenseRevokedOverlay",value:function(){var e="LOADING"===this.props.licenseCreateStatus,t="LOADING"===this.props.licenseTakeoverStatus,o=e||t?(0,T.jsx)("div",{className:"popout-text-small",children:"Restarting video..."}):(0,T.jsx)("div",{className:"popout-link",onClick:function(){return tl.takeoverLicense()},role:"button",children:"Play here instead"});return(0,T.jsxs)("div",{className:"popout-overlay",children:[(0,T.jsx)("div",{className:"popout-svg",children:et}),(0,T.jsx)("div",{className:"popout-text",children:"A CBT Nuggets video is playing in a different window."}),o]})}},{key:"renderCastingOverlay",value:function(){return(0,T.jsxs)("div",{className:"casting-overlay",children:[(0,T.jsx)("div",{className:"casting-svg",children:G("#FFF")}),(0,T.jsxs)("div",{className:"casting-text",children:["This video is playing on ",this.props.castingDeviceName,"."]}),(0,T.jsx)("div",{className:"stop-casting-link",onClick:this.stopCasting,role:"button",children:"Stop Casting"})]})}},{key:"renderBannerOverlay",value:function(){var e=this.state,t=e.showQuizDropdown,o=e.quizDropdownTimeRemaining,n=this.props,i=n.isTrackingProgress,r=n.dismissedBanners,s=n.currentQuizQuestion,a=n.quizQuestions,l=n.autoStartFailed,c=n.playerId,u=n.isFreePlayer;return l&&!this.isMobile?(0,T.jsx)(e1,{playerId:c,autoStartFailed:!0,browser:ta,isFreePlayer:u}):!1!==i||r.includes("connectivity")?t?(0,T.jsx)(e1,{quizQuestion:!0,playerId:c,currentQuizQuestion:s,quizQuestions:a,quizDropdownTimeRemaining:o,resetQuizQuestionPrompt:this.resetQuizQuestionPrompt,isFreePlayer:u}):void 0:(0,T.jsx)(e1,{playerId:c,offline:!0,isFreePlayer:u})}},{key:"renderMainOverlay",value:function(){var e=this.props,t=e.videosLength,o=e.videoNumber,n=e.hasActiveSubscription,i=e.hasAccessToVideo,r=e.autoStart,s=e.playerId,a=e.isViewer,l=e.isLMI,c=e.selectedVideoCollection,u=e.skillTags,d=e.isFreePlayer,p=e.courseSlug,h=e.adeptCourseSlug,f=e.isAdeptOnly,v=e.isLoggedIn,g=!1;return c?g=!(0,j.Z)(c.tags.find(function(e){return(null==e?void 0:e.display)==="FREE"})):u&&(g=!(0,j.Z)(u.find(function(e){return(null==e?void 0:e.display)==="FREE"}))),(0,T.jsx)(ti,{playerId:s,videoReady:this.state.videoReady,videoEnded:this.state.videoEnded,videosLength:t,videoNumber:o,nextVideoCountdownCancelled:this.state.nextVideoCountdownCancelled,nextVideoCountdownMsCurrent:this.state.nextVideoCountdownMsCurrent,startNextVideoCountdown:this.startNextVideoCountdown,cancelNextVideoCountdown:this.cancelNextVideoCountdown,goToNextVideo:this.goToNextVideo,NEXT_VIDEO_COUNTDOWN_MS:3e3,hasActiveSubscription:n,hasAccessToVideo:i,manifestLoadingTimeOut:this.state.manifestLoadingTimeOut,autoStart:r,isViewer:a,isNextVideoInPreReleaseState:this.state.isNextVideoInPreReleaseState,isCurrentVideoInPreReleaseState:this.state.isCurrentVideoInPreReleaseState,isCurrentSkillRetired:(null==c?void 0:c.state)==="Retired",skillTitle:null==c?void 0:c.title,isFreemiumSkill:g,isLMI:l,isFreePlayer:d,courseSlug:p,adeptCourseSlug:h,isAdeptOnly:f,isLoggedIn:v})}},{key:"renderMobileOverlay",value:function(){var e=this.props,t=e.playerId,o=e.isFreePlayer,n=e.courseSlug,i=this.state,r=i.showMobileOverlay,s=i.supportedResolutions;return r?(0,T.jsx)(eK,{playerId:t,showMobileOverlay:r,startMobileOverlayTimeout:this.startMobileOverlayTimeout,clearMobileOverlayTimeout:this.clearMobileOverlayTimeout,isIosChromeOrFirefox:this.isIosChromeOrFirefox,browser:ta,isMobile:this.isMobile,supportedResolutions:s,isFreePlayer:o,courseSlug:n}):null}},{key:"renderPlayerAlerts",value:function(){return(0,T.jsxs)(n.Fragment,{children:[this.renderCaptionAlert(),this.renderAutoPlayAlert(),this.renderQuizQuestionsAlert()]})}},{key:"renderPlayer",value:function(){var e=this,t=this.props,o=t.isPopout,n=t.playerState,i=t.hasPopout,r=t.casting,s=t.isFullScreen,a=t.hasActiveSubscription,l=t.hasAccessToVideo,c=t.licenseRevoked,u=Z()("player-wrapper",{casting:r,popout:o,active:"NOT_STARTED"!==n&&this.state.videoReady,"fullscreen-safari":"safari"===ta.name&&!this.isMobile&&s,"fullscreen-chrome-firefox":("chrome"===ta.name||"firefox"===ta.name)&&s,"fullscreen-ie11":"ie"===ta.name&&s,"fullscreen-edge":"edge"===ta.name&&s});return(0,T.jsxs)("div",{ref:this.playerWrapper,className:u,onClick:function(){return e.setState({showMobileOverlay:!0})},onTouchStart:function(){return e.setState({showMobileOverlay:!0})},role:"button",children:[this.renderBannerOverlay(),this.renderPlayerAlerts(),(a||l)&&!this.state.isCurrentVideoInPreReleaseState&&this.renderVideo(),this.renderCaptions(),this.renderControlBar(),this.renderMainOverlay(),i&&this.renderPopoutOverlay(),!i&&c&&this.renderLicenseRevokedOverlay(),r&&this.renderCastingOverlay(),this.renderMobileOverlay()]})}},{key:"render",value:function(){var e="NOT_STARTED"!==this.props.playerState&&this.state.videoReady?"active":"",t=this.props.isPopout?"popout":"";return(0,T.jsx)(tr,{className:"margin-adjusted-container ".concat(e," ").concat(t," custom-video-container"),children:this.renderPlayer()})}}]),r}(n.PureComponent);(0,h.Z)(tc,"defaultProps",{hlsUrl:"",playerState:"NOT_STARTED",playedSeconds:0,startPosition:0,captions:[],showCaptions:!1,showQuizQuestions:!1,isFullScreen:!1,hasPopout:!1,volume:.5,muted:!1,isLMI:!1,isFreePlayer:!1});var tu=M(["*","cast.*"],function(e){return{playerState:e.playerState,playedSeconds:(0,P.Z)(e,"progress.playedSeconds"),showCaptions:e.showCaptions,showQuizQuestions:e.showQuizQuestions,captions:e.captions,volume:e.volume,muted:e.muted,speed:e.speed,quality:e.quality,isFullScreen:e.isFullScreen,hlsUrl:e.hlsUrl,startPosition:e.startPosition,hasPopout:e.hasPopout,quizQuestions:e.quizQuestions,currentQuizQuestion:e.currentQuizQuestion,casting:e.casting,castingDeviceName:e.castingDeviceName,license:e.license,isTrackingProgress:e.isTrackingProgress,dismissedBanners:e.dismissedBanners,manifest:e.manifest,autoStartFailed:e.autoStartFailed,autoPlayEnabled:e.autoPlayEnabled,nextVideoTitle:e.nextVideoTitle,isPopout:e.isPopout,durationSeconds:e.durationSeconds,licenseRevoked:e.licenseRevoked,licenseCreateStatus:e.licenseCreateStatus,showDebugLogs:e.showDebugLogs,videoId:e.videoId}},tc),td=function(e,t){var o=e.collectionId,n=e.videoNumber,i=e.isPopout,r=e.nextVideoTitle,s=e.selectedVideoTitle,a=e.collectionTitle,l=e.videoId;return{playerId:t,collectionId:o,videoNumber:n,context:e.context,videoNrn:"",hlsUrl:"",playerState:"NOT_STARTED",casting:!1,hasPopout:!1,isPopout:void 0!==i&&i||!1,quizQuestions:[],currentQuizQuestion:{},chromecastMedia:null,chromecastSession:null,dismissedBanners:[],autoStartFailed:!1,collectionTitle:a,selectedVideoTitle:s,nextVideoTitle:r,playedSeconds:0,sendClickEvent:e.sendClickEvent,playerMountedAtTime:Date.now(),videoId:l,licenseRevoked:!1,manifestFetchTimedOut:!1}},tp=new r.Z,th=function(e){(0,u.Z)(r,e);var t,o,n,i=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,p.Z)(r);if(t){var n=(0,p.Z)(this).constructor;e=Reflect.construct(o,arguments,n)}else e=o.apply(this,arguments);return(0,d.Z)(this,e)});function r(e){(0,a.Z)(this,r),o=i.call(this,e),(0,h.Z)((0,c.Z)(o),"playerId",(0,m.Z)()),(0,h.Z)((0,c.Z)(o),"checkForNewVideo",(t=(0,s.Z)(v().mark(function e(t){var n,i,r,s,a,l,c,u,d,p,h;return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(n=o.props).videoId,r=n.context,s=t.videoId,a=t.context,l="1"===g.Z.parse(location.search).autostart,c=tp.getLicense(),!(i!==s||r!==a)){e.next=13;break}if(d=(u=tp.getPlayer(o.playerId)).pemVideoId,p=u.pemContext,tp.setLicenseStatus("CREATE","NOT_STARTED"),tp.resetActivePlayer(),((0,y.Z)(d)||(0,y.Z)(p))&&(h={videoId:i,context:r},tp.updatePlayer(o.playerId,h)),(0,y.Z)(c)){e.next=12;break}return e.next=12,tp.releaseLicense();case 12:l&&o.getLicenseAndManifest();case 13:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)})),(0,h.Z)((0,c.Z)(o),"checkForNewQuiz",function(e){if(o.props.quizQuestions!==e.quizQuestions){var t={};o.props.quizQuestions.forEach(function(e,o){t[e.present_pos]={text:e.text,order:o+1,id:e.question_id}}),tp.updatePlayer(o.playerId,{quizQuestions:t})}}),(0,h.Z)((0,c.Z)(o),"checkForVideoTitles",function(e){if(e.selectedVideoTitle!==o.props.selectedVideoTitle){var t=o.props,n=t.collectionTitle,i=t.selectedVideoTitle,r=t.nextVideoTitle;tp.updatePlayer(o.playerId,{collectionTitle:n,selectedVideoTitle:i,nextVideoTitle:r})}}),(0,h.Z)((0,c.Z)(o),"checkForUserCreds",function(e){e.groupId!==o.props.groupId&&tp.setGroupId(o.props.groupId),e.memberId!==o.props.memberId&&tp.setMemberId(o.props.memberId)});var t,o,n=td(e,o.playerId);return o.initializePlayer(n),tp.setGroupId(e.groupId),tp.setMemberId(e.memberId),o}return(0,l.Z)(r,[{key:"componentDidUpdate",value:function(e){this.props.isPopout||this.checkForNewQuiz(e),this.props.videosLength>1&&this.checkForNewVideo(e),this.checkForUserCreds(e),this.checkForVideoTitles(e)}},{key:"initializePlayer",value:(o=(0,s.Z)(v().mark(function e(t){return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(tp.registerPlayer(t),tp.putPlayerOnWindow(t),this.props.isPopout&&this.props.setPopout(!0),"1"!==g.Z.parse(location.search).autostart){e.next=8;break}return e.next=7,tp.setActivePlayer(this.playerId);case 7:this.getLicenseAndManifest();case 8:case"end":return e.stop()}},e,this)})),function(e){return o.apply(this,arguments)})},{key:"getLicenseAndManifest",value:(n=(0,s.Z)(v().mark(function e(){var t,o,n;return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(t=this.props).videoId,n=t.context,!(!(0,y.Z)(o)&&!(0,y.Z)(n))){e.next=6;break}return tp.resetActivePlayerMountedAtTime(),e.next=6,tp.createLicense(!0);case 6:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"render",value:function(){var e=this.props,t=e.collectionId,o=e.videoNumber,n=e.isPopout,i=e.setPopout,r=e.history,s=e.videosLength,a=e.hasActiveSubscription,l=e.hasAccessToVideo,c=e.isViewer,u=e.isLMI,d=e.videoId,p=e.sidebarCollapsed,h=e.setSidebarCollapsed,f=e.selectedVideoCollection,v=e.playlistCollections,g=e.skillTags;return(0,T.jsx)(tu,{playerId:this.playerId,theaterMode:p,setTheaterMode:h,collectionId:t,videoNumber:o,autoStart:!1,isPopout:void 0!==n&&n,setPopout:i,history:r,videosLength:s,hashPosition:0,hasActiveSubscription:a,hasAccessToVideo:l,isViewer:c,isLMI:u,videoId:d,selectedVideoCollection:f,playlistCollections:v,skillTags:g})}}]),r}(n.PureComponent);(0,h.Z)(th,"defaultProps",{quizQuestions:[],setPopout:function(){},videoNumber:1,videosLength:1,nextVideoTitle:"",isPopout:!1,selectedVideoTitle:"",collectionTitle:"",isLMI:!1});var tf=new r.Z,tv=function(e){(0,u.Z)(r,e);var t,o,n,i=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,o=(0,p.Z)(r);if(t){var n=(0,p.Z)(this).constructor;e=Reflect.construct(o,arguments,n)}else e=o.apply(this,arguments);return(0,d.Z)(this,e)});function r(e){(0,a.Z)(this,r),o=i.call(this,e),(0,h.Z)((0,c.Z)(o),"playerId",(0,m.Z)()),(0,h.Z)((0,c.Z)(o),"checkForNewVideo",(t=(0,s.Z)(v().mark(function e(t){var n,i,r,s,a,l,c,u,d,p;return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i=(n=o.props).videoId,r=n.context,s=t.videoId,a=t.context,l="1"===g.Z.parse(location.search).autostart,(i!==s||r!==a)&&(u=(c=tf.getPlayer(o.playerId)).pemVideoId,d=c.pemContext,tf.resetActivePlayer(),((0,y.Z)(u)||(0,y.Z)(d))&&(p={videoId:i,context:r},tf.updatePlayer(o.playerId,p)),l&&o.getManifest());case 4:case"end":return e.stop()}},e)})),function(e){return t.apply(this,arguments)})),(0,h.Z)((0,c.Z)(o),"checkForVideoTitles",function(e){if(e.selectedVideoTitle!==o.props.selectedVideoTitle){var t=o.props,n=t.collectionTitle,i=t.selectedVideoTitle,r=t.nextVideoTitle;tf.updatePlayer(o.playerId,{collectionTitle:n,selectedVideoTitle:i,nextVideoTitle:r})}});var t,o,n=td(e,o.playerId);return o.initializePlayer(n),o}return(0,l.Z)(r,[{key:"componentDidUpdate",value:function(e){this.props.videosLength>1&&this.checkForNewVideo(e),this.checkForVideoTitles(e)}},{key:"initializePlayer",value:(o=(0,s.Z)(v().mark(function e(t){return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(tf.setIsFreePlayer(!0),tf.registerPlayer(t),tf.putPlayerOnWindow(t),this.props.isPopout&&this.props.setPopout(!0),"1"!==g.Z.parse(location.search).autostart){e.next=9;break}return e.next=8,tf.setActivePlayer(this.playerId);case 8:this.getManifest();case 9:case"end":return e.stop()}},e,this)})),function(e){return o.apply(this,arguments)})},{key:"getManifest",value:(n=(0,s.Z)(v().mark(function e(){var t,o,n;return v().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(t=this.props).videoId,n=t.context,!(!(0,y.Z)(o)&&!(0,y.Z)(n))){e.next=5;break}return tf.resetActivePlayerMountedAtTime(),e.next=5,tf.getFreeManifest();case 5:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})},{key:"render",value:function(){var e=this.props,t=e.collectionId,o=e.videoNumber,n=e.isPopout,i=e.setPopout,r=e.history,s=e.videosLength,a=(e.hasActiveSubscription,e.hasAccessToVideo),l=(e.isViewer,e.isLMI,e.videoId),c=e.sidebarCollapsed,u=e.setSidebarCollapsed,d=e.selectedVideoCollection,p=e.playlistCollections,h=e.skillTags,f=e.courseSlug,v=e.adeptCourseSlug,g=e.isAdeptOnly,m=e.isLoggedIn;return(0,T.jsx)(tu,{playerId:this.playerId,theaterMode:c,setTheaterMode:u,collectionId:t,videoNumber:o,autoStart:!1,isPopout:void 0!==n&&n,setPopout:i,history:r,videosLength:s,hashPosition:0,hasActiveSubscription:!0,hasAccessToVideo:a,isViewer:!0,isLMI:!1,videoId:l,selectedVideoCollection:d,playlistCollections:p,skillTags:h,isFreePlayer:!0,courseSlug:f,adeptCourseSlug:v,isAdeptOnly:g,isLoggedIn:m})}}]),r}(n.PureComponent);(0,h.Z)(tv,"defaultProps",{setPopout:function(){},videoNumber:1,videosLength:1,nextVideoTitle:"",isPopout:!1,selectedVideoTitle:"",collectionTitle:"",hasAccessToVideo:!1,setSidebarCollapsed:function(){}});var tg=I.ZP.div.withConfig({displayName:"VideoPlayerContainer",componentId:"sc-1lcyy1m-0"})([""]);I.ZP.div.withConfig({displayName:"VideoPlayerPlaceholder",componentId:"sc-1lcyy1m-1"})(["min-width:100%;min-height:49.1rem;background-color:#ccc;"]);var tm=I.ZP.p.withConfig({displayName:"VideoPlayerNowPlaying",componentId:"sc-1lcyy1m-2"})([""]),ty=function(e){var t,o=e.activeVideo,s=e.activeSkill,a=e.courseData,l=e.isLoggedIn,c=(0,n.useState)(o),u=c[0],d=c[1],p=(0,n.useState)(s),h=p[0],f=p[1],v=(0,n.useState)(!1),g=v[0],m=v[1],y=(0,n.useState)(!1),x=y[0],w=y[1],b=(0,n.useState)(!1),k=b[0],S=b[1],Z=(0,n.useState)(!1),C=Z[0],P=Z[1],j=new r.Z,L=1;s.videos.forEach(function(e,t){e.id===(null==o?void 0:o.id)&&(L=t+1)}),(0,n.useEffect)(function(){P(!0)},[]),(0,n.useEffect)(function(){var e;j.setLicenseStatus("CREATE","NOT_STARTED"),j.resetActivePlayer(),w((null==a||null===(e=a.skills[0])||void 0===e?void 0:e.id)===(null==s?void 0:s.id)),m(1===L),S((null==o?void 0:o.id)!==(null==u?void 0:u.id))},[o]),(0,n.useEffect)(function(){f(s),d(o)},[k]);var R={courseSlug:null==a?void 0:a.slug,videosLength:null==h||null===(t=h.videos)||void 0===t?void 0:t.length,hasAccessToVideo:g&&x,videoTitle:null==u?void 0:u.name,skillTitle:null==u?void 0:u.name,context:null==a?void 0:a.studioId,videoId:null==o?void 0:o.cbtComponentId,adeptCourseSlug:null==a?void 0:a.adeptCourseSlug,isAdeptOnly:null==a?void 0:a.isAdeptOnly,isLoggedIn:void 0!==l&&l,videoNumber:L};return(0,T.jsxs)(tg,{id:"videoPlayer",children:[C?(0,T.jsx)(tv,{collectionId:R.courseSlug,videoNumber:R.videoNumber,videosLength:R.videosLength,history:{},hasActiveSubscription:!0,hasAccessToVideo:R.hasAccessToVideo,selectedVideoTitle:R.videoTitle,collectionTitle:R.skillTitle,context:R.context,videoId:R.videoId,sendClickEvent:function(){},sidebarCollapsed:!1,isViewer:!0,courseSlug:R.courseSlug,adeptCourseSlug:R.adeptCourseSlug,isAdeptOnly:R.isAdeptOnly,isLoggedIn:R.isLoggedIn}):(0,T.jsx)(i.Z.Rectangle,{height:"375px"}),(0,T.jsxs)(tm,{children:[R.hasAccessToVideo?(0,T.jsx)("strong",{children:"Now playing:"}):""," ",null==o?void 0:o.name]})]})}},97500:function(e,t,o){o.d(t,{B:function(){return n}});var n=function(e){e&&e.preventDefault();try{document.getElementsByClassName("helpButtonEnabled uiButton")[0].click()}catch(e){console.warn(e,"Error starting chat, script possibly not loaded yet.")}}}}]);