1(this["webpackJsonpclassplus-web-react"]=this["webpackJsonpclassplus-web-react"]||[]).push([[56],{1036:function(e,t,a){e.exports={Container:"LiveVideo_Container__vwOqC",HeaderText:"LiveVideo_HeaderText__3H0CE",Header:"LiveVideo_Header__k88T5",SingleContentImgText:"LiveVideo_SingleContentImgText__3PgOw",SingleContentImgText2:"LiveVideo_SingleContentImgText2__3s2ge",promotedCourseContainer:"LiveVideo_promotedCourseContainer__1JvWO",SingleContentImgText1:"LiveVideo_SingleContentImgText1__3djYB",SingleContentContainer:"LiveVideo_SingleContentContainer__3GYhJ",ScheduleContentContainer:"LiveVideo_ScheduleContentContainer__17b9v",SingleContentName:"LiveVideo_SingleContentName__DcZn6",SingleCountAttendanceCount:"LiveVideo_SingleCountAttendanceCount__2frrN",AddButton:"LiveVideo_AddButton__1y09d",liveButton:"LiveVideo_liveButton__3AwG5",GoliveButton:"LiveVideo_GoliveButton__327DR",GoliveButtonHeader:"LiveVideo_GoliveButtonHeader__1Voml",modal:"LiveVideo_modal__1F55d",modalContent:"LiveVideo_modalContent__2mKO5",animatetop:"LiveVideo_animatetop__U8cp3",goLiveModalFooter:"LiveVideo_goLiveModalFooter__3HYCy",goLiveModalTitle:"LiveVideo_goLiveModalTitle__31z7d",goLiveModalAllowTitle:"LiveVideo_goLiveModalAllowTitle__2Mo7l",allowEveryoneContainer:"LiveVideo_allowEveryoneContainer__3Au89",goLiveModalMenuText:"LiveVideo_goLiveModalMenuText__2uehV",paddingCheat:"LiveVideo_paddingCheat__2LmPB",goLiveModalButton:"LiveVideo_goLiveModalButton__J3Uk4",disableGoLiveModalButton:"LiveVideo_disableGoLiveModalButton__oVfVP",shakyText:"LiveVideo_shakyText__2yCxI",shake:"LiveVideo_shake__rYfQZ",goLiveModalTitleInput:"LiveVideo_goLiveModalTitleInput__3S5TU",percentageBarContainer:"LiveVideo_percentageBarContainer__fM2ul",percentageBar:"LiveVideo_percentageBar__2wgMp",timeLeft:"LiveVideo_timeLeft__1Xk5J",studentNumberContainer:"LiveVideo_studentNumberContainer__3SmQU",GoLiveTutorContainer:"LiveVideo_GoLiveTutorContainer__2yQ6C",GoLiveTutorHeader:"LiveVideo_GoLiveTutorHeader__2ZILF",GoLiveTutorHeaderText:"LiveVideo_GoLiveTutorHeaderText__1JI_B",GoLiveTutorHeaderTextFlex:"LiveVideo_GoLiveTutorHeaderTextFlex__3eBF7",GoLiveTutorHeaderTextFlexChild1:"LiveVideo_GoLiveTutorHeaderTextFlexChild1__1k2h3",GoLiveTutorHeaderTextFlexChild2:"LiveVideo_GoLiveTutorHeaderTextFlexChild2__uDolV",GoLiveTutorHeaderLabel:"LiveVideo_GoLiveTutorHeaderLabel__ZKGKa",GoLiveTutorHeaderButton:"LiveVideo_GoLiveTutorHeaderButton__1DbQj",GoLiveStudentTimeText:"LiveVideo_GoLiveStudentTimeText__26XbE",GoLiveStudentLiveNow:"LiveVideo_GoLiveStudentLiveNow__3jHzK",iframe:"LiveVideo_iframe__2SrcZ",scheduleBox:"LiveVideo_scheduleBox__1Pd-A",rdtPicker:"LiveVideo_rdtPicker__1Hi8y",liveSuccessModal:"LiveVideo_liveSuccessModal__Q7WSd",justifyCentre:"LiveVideo_justifyCentre__WAkKF",liveSuccessModalHeader:"LiveVideo_liveSuccessModalHeader__tUvsG",liveSuccessModalText:"LiveVideo_liveSuccessModalText__2Sq1-",dataFetch:"LiveVideo_dataFetch__3gyHl",videoListEmpty:"LiveVideo_videoListEmpty__SjqcV",videoListEmptyHeadText:"LiveVideo_videoListEmptyHeadText__11I8V",videoListEmptySubText:"LiveVideo_videoListEmptySubText__IRD7M",playIcon:"LiveVideo_playIcon__21DJ4",duration:"LiveVideo_duration__2CXha",overviewCard:"LiveVideo_overviewCard__3XHlP",scheduleGoLive:"LiveVideo_scheduleGoLive__3r2Et",scheduleGoLiveText:"LiveVideo_scheduleGoLiveText__3chG-",selectedCoursesArea:"LiveVideo_selectedCoursesArea__ub7Ku",selectedCoursesList:"LiveVideo_selectedCoursesList__2tkyu",selectedCourseName:"LiveVideo_selectedCourseName__PsJmc",addMore:"LiveVideo_addMore__2-L-B",GoLiveCardButtonWrapper:"LiveVideo_GoLiveCardButtonWrapper__3f2y4",ScheduleLiveClassCardButton:"LiveVideo_ScheduleLiveClassCardButton__2XUVo",ScheduleLiveClassCardButton2:"LiveVideo_ScheduleLiveClassCardButton2__3qxyI",goLiveMOdalDeleteButton:"LiveVideo_goLiveMOdalDeleteButton__ELwgs",goLiveModalDeleteButton:"LiveVideo_goLiveModalDeleteButton__WmwAM",goLiveModalRechargeReminder:"LiveVideo_goLiveModalRechargeReminder__3-7HJ",studentCount:"LiveVideo_studentCount__3iNO8",goLiveModalAdvance:"LiveVideo_goLiveModalAdvance__37JnW",goLiveModalAdvanceHeader:"LiveVideo_goLiveModalAdvanceHeader__3BRQj",goLiveModalAdvanceLabel:"LiveVideo_goLiveModalAdvanceLabel__2gw5r",goLiveModalAdvanceArrow:"LiveVideo_goLiveModalAdvanceArrow__cFgWp",smsNotifcation:"LiveVideo_smsNotifcation__2Ttjl",smsNotifcationHeader:"LiveVideo_smsNotifcationHeader__vdtUk",sendSMS:"LiveVideo_sendSMS__1CCH_",sendSmsText:"LiveVideo_sendSmsText__1_2U5",ScheduleTrialLiveClass:"LiveVideo_ScheduleTrialLiveClass__3B_HL",ScheduleTrialLiveClassLeft:"LiveVideo_ScheduleTrialLiveClassLeft__wmVa1",ScheduleTrialLiveClassNew:"LiveVideo_ScheduleTrialLiveClassNew__3gH-D",ScheduleTrialLiveClassArrow:"LiveVideo_ScheduleTrialLiveClassArrow__AIgpH",TrialEmblem:"LiveVideo_TrialEmblem__IqArr",TrialEmblemLeft:"LiveVideo_TrialEmblemLeft__1lobs",TrialEmblemLeftImage:"LiveVideo_TrialEmblemLeftImage__2sZz8",liveModalToggleContainer:"LiveVideo_liveModalToggleContainer__3q4w8",liveModalToggleOn:"LiveVideo_liveModalToggleOn__1m4Vv",liveModalToggleOff:"LiveVideo_liveModalToggleOff__1DlOZ",modalInputContainer:"LiveVideo_modalInputContainer__1OnNl",modalInputClear:"LiveVideo_modalInputClear__3YdMF",forceCloseLiveClassHeader:"LiveVideo_forceCloseLiveClassHeader__2_lF3",forceCloseLiveClassBody:"LiveVideo_forceCloseLiveClassBody__1XHE4",forceCloseLiveClassBodyText1:"LiveVideo_forceCloseLiveClassBodyText1__2rPRK",forceCloseLiveClassBodyText2:"LiveVideo_forceCloseLiveClassBodyText2__3ojN5",forceCloseLiveClassBodyBtn:"LiveVideo_forceCloseLiveClassBodyBtn__34CTZ",downloadBtn:"LiveVideo_downloadBtn__3gnuM",selectFolderContainer:"LiveVideo_selectFolderContainer__1751d",folderSelectContainer:"LiveVideo_folderSelectContainer__3W62L",newTag:"LiveVideo_newTag__3q6Ky",dropDown:"LiveVideo_dropDown__2zf_0"}},1169:function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var i=a(1036),n=a.n(i),s=a(1),o=a.n(s),l=a(1024),r=a.n(l);function d(e){let{status:t,headerText:a,bodyText:i,onClose:s,action:l,actionButtonText:d,disableActionBtn:c}=e;return t?o.a.createElement("div",{id:"myModal",className:n.a.modal},o.a.createElement("div",{style:{width:"50rem"},className:n.a.modalContent},o.a.createElement("div",{className:n.a.Header},o.a.createElement("div",{className:n.a.HeaderText},a),o.a.createElement("div",null,o.a.createElement("img",{className:"cursorPointer",onClick:s,src:r.a,width:"16px",height:"16px"}))),o.a.createElement("div",{style:{fontSize:"16px"},className:"p-3"},i),o.a.createElement("div",{className:n.a.goLiveModalFooter,style:{justifyContent:"flex-end"}},o.a.createElement("button",{onClick:l,className:n.a.goLiveModalButton,disabled:c},d)))):""}},1177:function(e,t,a){e.exports=a.p+"static/media/clockArchive.971b35cb.svg"},1250:function(e,t,a){e.exports=a.p+"static/media/remove.13965d7f.svg"},1251:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADBSURBVHgB7ZOxDcMgFEQxhedwRvEmVIiREBWbZJQwBqJAybdIFJEPHG3sa0Bnc0/AIcSlv9fCmVrrB40ppd17H3oBSqltXdc7zZ1zt/q77Kw9FlIAEN78hwVIKffXEHqQKjyUNT9ij4hkjNlyzp+A7+Piwq21YQrQgpCPhg8BHKTYUDgEYCACDSdJASjGCHmchjuoL7TYxxx5J8tM+LuKrXZNAXpV7FUYAiA9RyHsJSM9J69+8VxWr0XDKlaQS2fVEwPdnRSzkNDcAAAAAElFTkSuQmCC"},1265:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var i=a(18),n=a(11),s=a.n(n),o=a(4);async function l(e,t){const a=null===t||void 0===t?void 0:t.liveSessionId,n=null===t||void 0===t?void 0:t.contentHashId,l=null===t||void 0===t?void 0:t.isAgora;let r={};r=a?{liveSessionId:n}:{contentId:n};let d=function(){let{persistedData:e}=i.store.getState();return e&&e.token}();null!==t&&void 0!==t&&t.url&&t.url.split("?auth_key")[0];return new Promise((e,t)=>
1{s.a.get(o.B.API_GRAPH_JWPLAYER+"/cams/uploader/video/jw-signed-url",{params:{...r,isAgora:l},headers:{"x-access-token":d}}).then(t=>{var a=t.data;e(a)}).catch(e=>{t(e)})})}},1287:function(e,t,a){e.exports=a.p+"static/media/SVGPlayButton3.65dfe222.svg"},1288:function(e,t,a){e.exports=a.p+"static/media/contentRestrict.3609dc37.svg"},1469:function(e,t,a){},1547:function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var i,n=a(1),s=a.n(n);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}const l=e=>{let{svgRef:t,title:a,...n}=e;return s.a.createElement("svg",o({width:20,height:20,viewBox:"0 0 20 20",fill:"none",ref:t},n),a?s.a.createElement("title",null,a):null,i||(i=s.a.createElement("path",{opacity:.869094,fillRule:"evenodd",clipRule:"evenodd",d:"M13.753 3.40922L12.6646 2.31667C12.244 1.89444 11.5609 1.89444 11.1389 2.31667L10.0963 3.36322L12.5369 5.81309L13.753 4.59235C14.0793 4.26484 14.0793 3.7367 13.753 3.40922ZM9.46047 4.00007L11.9011 6.44991L5.72323 12.6512L3.28401 10.2014L9.46047 4.00007ZM2.34277 13.9765C2.14285 14.0253 1.96238 13.8455 2.00679 13.6448L2.62319 10.8647L5.06241 13.3145L2.34277 13.9765Z",fill:"black"})))},r=s.a.forwardRef((e,t)=>s.a.createElement(l,o({svgRef:t},e)));a.p},1732:function(e,t){},1735:function(e,t){},1736:function(e,t,a){"use strict";var i=a(1),n=a.n(i),s=(a(1737),a(1251)),o=a.n(s),l=a(2249);t.a=e=>{const{t:t}=Object(l.a)();return n.a.createElement("div",{className:"AlertModal"},n.a.createElement("div",{className:"AlertModal__Container"},n.a.createElement("div",{className:"AlertModal__Container--Header"},n.a.createElement("div",{className:"AlertModal__Container--Header__Para"},t("routes.batches.batchAssignments.listHeader.alertModal.alertHeading","Alert"),"!"),n.a.createElement("img",{className:"AlertModal__Container--Header__Img",src:o.a,alt:"",onClick:e.onCancel})),n.a.createElement("div",{className:"AlertModal__Container--Body"},e.para),n.a.createElement("div",{className:"AlertModal__Container--Footer"},n.a.createElement("button",{onClick:e.onCancel,className:"AlertModal__Container--Footer__Btn1"},t("routes.batches.batchAssignments.listHeader.alertModal.cancelButton","Cancel")),n.a.createElement("button",{onClick:e.onClickAdd,className:"AlertModal__Container--Footer__Btn2"},e.btn))))}},1737:function(e,t,a){},2052:function(e,t,a){"use strict";a.r(t);var i=a(1),n=a.n(i),s=(a(2053),a(151)),o=a(140),l=(a(11),a(4),a(2071),a(1265),a(49)),r=a(1731),d=a(135);class c extends n.a.Component{constructor(){var e;super(...arguments),e=this,this.state={jwObject:null,loading:!0,error:null,viewsCount:0,seekDuration:0,maxDuration:0,playbackSpeed:0,prevSeekDuration:2,currentSeekDuration:0,lastSeek:null,currentTime:null,delta:0,duration:0,videoWatched:!1,signedUrl:null,drmEnabled:!1},this.startTimer=null,this.player=null,this.pollInterval=null,this.onOnlineListener=()=>{window.addEventListener("online",e=>{var t;const{item:a}=this.props;var i;null!==this&&void 0!==this&&null!==(t=this.state)&&void 0!==t&&t.error&&this.props.reloadPlayer(a.vidKey,a,null===this||void 0===this||null===(i=this.state)||void 0===i?void 0:i.currentTime)})},this.setupBeforeUnloadListener=()=>{window.addEventListener("beforeunload",e=>{e.preventDefault()})},this.updateVideoDetails=function(t,a){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{user:n,item:s,courseId:o,isExhaustedDisabled:l,ocsId:r}=e.props,d={courseId:o,contentId:s.id,contentType:2,activityType:t,duration:Math.floor(1e3*a),lastSeek:Math.floor(1e3*e.state.currentTime),subscriberId:r||null};l||1==n.type&&e.props.makeApiCall("/v2/course/content/updateSubscriberActivity","POST",d,()=>{i&&setTimeout(()=>{!e.props.isExhaustedDisabled&&e.props.getFolderContent()},200)},()=>{})},this.pollIntervalDuration=()=>{let e=this.player.playbackRate();return 1==e?1e4:1.25==e?8e3:1.5==e?6666:2==e?5e3:1.75==e?5714:1e4},this.onThreeSeconds=e=>{this.startTimer=setTimeout(()=>{this.updateVideoDetails("count",5)},2e3),this.pollInterval=setInterval(()=>{this.setState(e=>({duration:e.currentTime-e.lastSeek+e.delta}),()=>{})},this.pollIntervalDuration())},this.onReady=(e,t)=>{const{item:a,connectionErrorTime:i}=this.props;this.player=t,this.setState({start:Date.now(),lastSeek:0});const n=i||this.props.item.lastSeek/1e3;this.player&&this.player.currentTime(n)},this.onPlay=e=>{},this.onPause=e=>{clearTimeout(this.startTimer),clearInterval(this.pollInterval),this.setState(e=>({duration:e.currentTime-e.lastSeek+e.delta}),()=>{}),this.startTimer=null,this.pollInterval=null},this.onResume=async e=>{const{videoWatched:t}=this.state,{reloadPlayer:a}=this.props;if(t){if(a(e.vidKey,e),this.pollInterval||this.startTimer)return;
1this.state.duration<5&&(this.startTimer=setTimeout(()=>{this.updateVideoDetails("count",5)},5e3-this.state.duration)),this.pollInterval=setInterval(()=>{this.setState(e=>({duration:e.currentTime-e.lastSeek+e.delta}))},this.pollIntervalDuration())}else{if(this.pollInterval||this.startTimer)return;this.state.duration<5&&(this.startTimer=setTimeout(()=>{this.updateVideoDetails("count",5)},5e3-this.state.duration)),this.pollInterval=setInterval(()=>{this.setState(e=>({duration:e.currentTime-e.lastSeek+e.delta}))},this.pollIntervalDuration())}},this.playerClose=()=>{var e=this.state.currentTime-this.state.lastSeek+this.state.delta;e>5&&this.updateVideoDetails("view",e,!0),clearTimeout(this.startTimer),clearInterval(this.pollInterval)},this.onTime=e=>{Math.abs(this.state.currentTime-this.player.currentTime())>5?this.setState({delta:this.state.delta+Math.abs(this.state.currentTime-this.state.lastSeek),lastSeek:this.player.currentTime()},()=>{this.setState({currentTime:this.player.currentTime()})}):this.setState({currentTime:this.player.currentTime()})},this.onOneHundredPercent=e=>{const{setVideoWatched:t}=this.props;this.setState({videoWatched:!0})},this.exhaustCondition=()=>{const{item:e,student:t}=this.props;return!(e.isOwn&&!t)&&(!t||!(this.state.duration-9.9<e.videoDurationAvailable/1e3||-1==e.videoDurationAvailable))},this.waterMarkIntegrate=()=>{const{user:e}=this.props;let t=document.getElementsByClassName("jw-wrapper jw-reset")[0],a=document.createElement("div"),i=document.createElement("div"),n=document.createElement("div");a.setAttribute("class","watermark"),a.setAttribute("id","watermark"),i.innerText=e.name,i.setAttribute("class","watermarkName"),n.innerText=e.mobile,n.setAttribute("class","watermarkNumber"),a.append(i),a.append(n),t.append(a),this.changeWaterMarkPosition=setInterval(this.waterMarkPosition,1e3)},this.waterMarkPosition=()=>{const e=document.getElementById("watermark");if(null!==e&&void 0!==e&&e.style&&this.showRandomWaterMark){const t=79*Math.random()+1,a=79*Math.random()+1;e.style.left=t+"%",e.style.top=a+"%",e.style.visibility="visible",this.showRandomWaterMark=!1,clearInterval(this.changeWaterMarkPosition),this.changeWaterMarkPosition=setInterval(this.waterMarkPosition,1e3)}else null!==e&&void 0!==e&&e.style&&!this.showRandomWaterMark&&(e.style.visibility="hidden",this.showRandomWaterMark=!0,clearInterval(this.changeWaterMarkPosition),this.changeWaterMarkPosition=setInterval(this.waterMarkPosition,4e3))},this.checkWatermark=()=>{const{item:e}=this.props,t=document.getElementsByClassName("watermark");let a=document.getElementsByClassName("jw-wrapper jw-reset")[0];!t.length&&a&&(this.waterMarkIntegrate(),clearInterval(this.waterMarkChecker),this.waterMarkChecker=setInterval(this.checkWatermark,1e4))},this.handleTamper=()=>{if(this.player&&!this.player.isDisposed_){try{this.player.dispose()}catch(e){console.warn("Dispose failed",e)}this.player=null}this.props.handleIframeClose&&this.props.handleIframeClose(),console.warn("Tampering detected! Playback stopped.")}}detectOS(){const e=navigator.userAgent.toLowerCase();return e.includes("win")?"Windows":e.includes("mac")?"macOS":e.includes("linux")?"Linux":"Unknown"}detectScreenName(){let e="";const t=window.location.href;return t.includes("overview")?e="Course Overview":t.includes("content")?e="Course Content":t.includes("liveClasses")?e="Live Class Recording":t.includes("batches")&&(e="Batches"),e}componentDidMount(){var e,t,a,i,n;const s=null===(e=this.props)||void 0===e?void 0:e.user,o=null===(t=this.props)||void 0===t?void 0:t.organization,{name:l,type:r,id:c}=s,{name:u,premiumStatus:m,id:v}=o;Object(d.b)("video_playback_click",{cp_user_id:c,username:l,user_type:r,org_id:v,org_name:u,cp_sdk_source:"web",premium_status:m,is_user_id_even:c%2===0,os_version:this.detectOS(),screen_name:this.detectScreenName()});const p=window.alert;window.alert=e=>{"string"===typeof e&&e.includes("Tampering detected!")?this.handleTamper():p(e)};const{item:h,signedUrl:_}=this.props;var f,y,g,C,L,b;(console.log("[Player.js] [componentDidMount()] signedUrl: ",null===(a=this.props.signedUrl)||void 0===a?void 0:a.drmUrls),null!==(i=this.props.signedUrl)&&void 0!==i&&null!==(n=i.drmUrls)&&void 0!==n&&n.manifestUrl)?this.setState({drmEnabled:!0,signedUrl:{manifestUrl:null===(f=this.props)||void 0===f||null===(y=f.signedUrl)||void 0===y||null===(g=y.drmUrls)||void 0===g?void 0:g.manifestUrl,licenseUrl:null===(C=this.props)||void 0===C||null===(L=C.signedUrl)||void 0===L||null===(b=L.drmUrls)||void 0===b?void 0:b.licenseUrl}}):this.setState({signedUrl:null===_||void 0===_?void 0:_.url});this.setState({loading:!1}),this.onOnlineListener(),this.setupBeforeUnloadListener()}componentWillUnmount(){if(clearInterval(this.waterMarkChecker),clearInterval(this.changeWaterMarkPosition),this.player&&!this.player.isDisposed_){try{this.player.dis
1pose()}catch{}this.player=null}this.playerClose(),window.removeEventListener("online",e=>{var t;null!==this&&void 0!==this&&null!==(t=this.state)&&void 0!==t&&t.error&&this.setState({error:null})})}componentDidUpdate(e,t){const{item:a,organization:i}=this.props,n=document.getElementsByClassName("watermark");let s=document.getElementsByClassName("jw-wrapper jw-reset")[0];t.loading&&!this.state.loading&&!n.length&&null!==i&&void 0!==i&&i.isWatermarkActive&&(this.waterMarkChecker=setInterval(this.checkWatermark,1e3),s&&this.waterMarkIntegrate())}render(){var e,t,a,i;const s=this.props.organization;console.log("this.signedUrl?.drmUrls :: ::",this.state.drmEnabled),console.log("this.signedUrl?.drmUrls :: ::",this.state.signedUrl);const{item:o,student:d,isExhaustedDisabled:c,user:u}=this.props,{jwObject:m,loading:v,error:p}=this.state;let h;m&&(h=m.playlist[0].sources.find(e=>"application/vnd.apple.mpegurl"==e.type).file);const _=this.state.signedUrl?this.state.signedUrl:o.url;let f;return s.isWatermarkImg&&(f=s.wmUrl||s.appIcon),v?"Loading...":p||n.a.createElement("div",{style:{width:"640px",height:"360px"}},!this.exhaustCondition()||c?o.videoType==l.u.jwHosted?n.a.createElement(r.a,{options:{autoplay:!0,controls:!0,responsive:!0,fluid:!0,poster:o.thumbnailUrl,playbackRates:[.5,1,1.25,1.5,1.75,2],sources:[{src:_}],aspectRatio:"16:9"},drmUrls:this.state.drmEnabled&&this.state.signedUrl,watermark:f,onReady:e=>this.onReady(o.vidKey,e),onPlay:e=>this.onPlay(o.vidKey),onPause:e=>this.onPause(o.vidKey),onTimeUpdate:e=>this.onTime(o.vidKey),onResume:e=>this.onResume(o),onEnded:e=>this.onOneHundredPercent(o.vidKey),onFirstThreeSecondPassed:e=>this.onThreeSeconds(o.vidKey),user:u,showMovingWatermark:null===(e=this.props)||void 0===e||null===(t=e.organization)||void 0===t?void 0:t.isWatermarkActive}):n.a.createElement(r.a,{options:{autoplay:!0,controls:!0,responsive:!0,fluid:!0,poster:o.thumbnailUrl,playbackRates:[.5,1,1.25,1.5,1.75,2],sources:[{src:_}],aspectRatio:"16:9"},drmUrls:this.state.drmEnabled&&this.state.signedUrl,watermark:f,onReady:e=>this.onReady(o.vidKey,e),onPlay:e=>this.onPlay(o.vidKey),onPause:e=>this.onPause(o.vidKey),onTimeUpdate:e=>this.onTime(o.vidKey),onResume:e=>this.onResume(o.vidKey),onFirstThreeSecondPassed:e=>this.onThreeSeconds(o.vidKey),user:u,showMovingWatermark:null===(a=this.props)||void 0===a||null===(i=a.organization)||void 0===i?void 0:i.isWatermarkActive}):this.props.handleOpenWatchExhaustedModal())}}t.default=Object(o.connect)((function(e){return{user:e.persistedData&&e.persistedData.user,organization:e.persistedData&&e.persistedData.organization}}),{makeApiCall:s.b})(c)},2053:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var a=0;a<t.length;a++){var i=t[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,a,i){return a&&e(t.prototype,a),i&&e(t,i),t}}(),n=a(1),s=_(n),o=_(a(1807)),l=_(a(2054)),r=_(a(2062)),d=_(a(2063)),c=_(a(2064)),u=_(a(2066)),m=_(a(2067)),v=_(a(2068)),p=_(a(2069)),h=_(a(2070));function _(e){return e&&e.__esModule?e:{default:e}}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return a.state={adHasPlayed:!1,hasPlayed:!1,hasFired:{}},a.eventHandlers=(0,l.default)(a),a.uniqueScriptId="jw-player-script",e.useMultiplePlayerScripts&&(a.uniqueScriptId+="-"+e.playerId),a.videoRef=null,a._initialize=a._initialize.bind(a),a._setVideoRef=a._setVideoRef.bind(a),a}return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}
1(t,e),i(t,[{key:"componentDidMount",value:function(){var e=!!window.jwplayer,t=document.getElementById(this.uniqueScriptId),a=this.props.useMultiplePlayerScripts;a||!e?a&&t?this._initialize():t?t.onload=(0,r.default)(t,this._initialize):(0,u.default)({context:document,onLoadCallback:this._initialize,scriptSrc:this.props.playerScript,uniqueScriptId:this.uniqueScriptId}):this._initialize()}},{key:"shouldComponentUpdate",value:function(e){var t=this.props.file!==e.file,a=!(0,o.default)(this.props.playlist,e.playlist);return t||a}},{key:"componentDidUpdate",value:function(){window.jwplayer&&window.jwplayer(this.videoRef)&&this._initialize()}},{key:"componentWillUnmount",value:function(){(0,m.default)(this.videoRef,window)}},{key:"_initialize",value:function(){var e=this.props,t=e.playerId;e.useMultiplePlayerScripts&&(0,v.default)({context:window,playerId:t});var a=window.jwplayer(this.videoRef);if(a){var i=(0,d.default)(this.props);(0,c.default)({component:this,player:a,playerOpts:i})}}},{key:"_setVideoRef",value:function(e){this.videoRef=e}},{key:"render",value:function(){return s.default.createElement("div",{className:this.props.className},s.default.createElement("div",{id:this.props.playerId,ref:this._setVideoRef}))}}]),t}(n.Component);f.defaultProps=p.default,f.displayName="ReactJWPlayer",f.propTypes=h.default,t.default=f},2054:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=c(a(2055)),n=c(a(2056)),s=c(a(2057)),o=c(a(2058)),l=c(a(2059)),r=c(a(2060)),d=c(a(2061));function c(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){return{onAdPlay:i.default.bind(e),onBeforePlay:n.default.bind(e),onFullScreen:s.default.bind(e),onMute:o.default.bind(e),onPlay:l.default.bind(e),onTime:r.default.bind(e),onVideoLoad:d.default.bind(e)}}},2055:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){this.state.adHasPlayed?this.props.onAdResume(e):(this.props.onAdPlay(e),this.setState({adHasPlayed:!0}))}},2056:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var a=t.getPlaylistItem();this.state.hasPlayed||this.state.adHasPlayed||"function"!==typeof this.props.generatePrerollUrl||t.playAd(this.props.generatePrerollUrl(a))}},2057:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){e.fullscreen?this.props.onEnterFullScreen(e):this.props.onExitFullScreen(e)}},2058:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){e.mute?this.props.onMute(e):this.props.onUnmute(e)}},2059:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){"autostart"===e.playReason?(this.setState({hasPlayed:!0}),this.props.onAutoStart(e)):!this.state.hasPlayed||"buffering"!==e.oldstate&&"paused"!==e.oldstate?(this.props.onPlay(e),this.setState({hasPlayed:!0})):this.props.onResume(e)}},2060:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=this.state.hasFired,a=e.position,i=e.duration,n=!1;this.props.onTime(e),!t.threeSeconds&&a>3&&(this.props.onThreeSeconds(),t.threeSeconds=!0,n=!0),!t.tenSeconds&&a>10&&(this.props.onTenSeconds(),t.tenSeconds=!0,n=!0),!t.thirtySeconds&&a>30&&(this.props.onThirtySeconds(),t.thirtySeconds=!0,n=!0),!t.twentyFivePercent&&a/i*100>25&&(this.props.onTwentyFivePercent(),t.twentyFivePercent=!0,n=!0),!t.fiftyPercent&&a/i*100>50&&(this.props.onFiftyPercent(),t.fiftyPercent=!0,n=!0),!t.seventyFivePercent&&a/i*100>75&&(this.props.onSeventyFivePercent(),t.seventyFivePercent=!0,n=!0),!t.ninetyFivePercent&&a/i*100>95&&(this.props.onNinetyFivePercent(),t.ninetyFivePercent=!0,n=!0),n&&this.setState({hasFired:t})}},2061:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){this.setState({hasFired:{}}),this.props.onVideoLoad(e)}},2062:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var a=e.onload||function(){};return function(){a(),t()}}},2063:function(e,t,a){"use strict";
1Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e};t.default=function(e){var t=e.aspectRatio,a=e.customProps,n=void 0===a?{}:a,s=e.file,o=e.generatePrerollUrl,l=e.image,r=e.isAutoPlay,d=e.isMuted,c=e.licenseKey,u=e.playlist,m=!!o,v={};return c&&(v.key=c),u?v.playlist=u:s&&(v.file=s),t&&"inherit"!==t&&(v.aspectratio=t),m&&(v.advertising={client:"googima",admessage:"Ad \u2014 xxs left",autoplayadsmuted:!0}),"undefined"!==typeof r&&(v.autostart=!!r),"undefined"!==typeof d&&(v.mute=!!d),l&&(v.image=l),i(v,n)}},2064:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=a(2065),s=(i=n)&&i.__esModule?i:{default:i};t.default=function(e){var t=e.component,a=e.player,i=e.playerOpts;a.setup(i);var n={};Object.keys(t.props).forEach((function(e){var a=(0,s.default)(e);a&&(n[a]=t.props[e])})),n.adPlay=t.eventHandlers.onAdPlay,n.beforeComplete=t.props.onOneHundredPercent,n.beforePlay=function(e){t.eventHandlers.onBeforePlay(e,a)},n.fullscreen=t.eventHandlers.onFullScreen,n.mute=t.eventHandlers.onMute,n.play=t.eventHandlers.onPlay,n.playlistItem=t.eventHandlers.onVideoLoad,n.time=t.eventHandlers.onTime,Object.keys(n).forEach((function(e){a.on(e,n[e])}))}},2065:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t;if("on"===e.slice(0,2)){var a=e.slice(2),i=(t=a,Array.isArray(t)?t:Array.from(t)),n=i[0],s=i.slice(1);return""+n.toLowerCase()+s.join("")}return null}},2066:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.context,a=e.onLoadCallback,i=e.scriptSrc,n=e.uniqueScriptId,s=t.createElement("script");s.id=n,s.src=i,s.onload=a,t.head.appendChild(s)}},2067:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var a=t.jwplayer&&t.jwplayer(e);a&&a.remove()}},2068:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e){var t=e.context,a=e.playerId,i=t.__JW_PLAYER_CONFIGS__=t.__JW_PLAYER_CONFIGS__||{},n=i[a];n?t.jwplayer.defaults=n:i[a]=t.jwplayer.defaults}},2069:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){},n={aspectRatio:"inherit",file:"",isAutoPlay:void 0,isMuted:void 0,onAdPlay:i,onAdResume:i,onAdSkipped:i,onAdComplete:i,onEnterFullScreen:i,onExitFullScreen:i,onMute:i,onUnmute:i,onAutoStart:i,onResume:i,onPlay:i,onClose:i,onReady:i,onError:i,onAdPause:i,onPause:i,onVideoLoad:i,onOneHundredPercent:i,onThreeSeconds:i,onTenSeconds:i,onThirtySeconds:i,onTwentyFivePercent:i,onFiftyPercent:i,onSeventyFivePercent:i,onNinetyFivePercent:i,onTime:i,onBuffer:i,onBufferChange:i,playlist:"",useMultiplePlayerScripts:!1};t.default=n},2070:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i,n=a(8),s=(i=n)&&i.__esModule?i:{default:i};var o={aspectRatio:s.default.oneOf(["inherit","1:1","16:9"]),className:s.default.string,customProps:s.default.object,file:s.default.string,generatePrerollUrl:s.default.func,image:s.default.string,isAutoPlay:s.default.bool,isMuted:s.default.bool,licenseKey:s.default.string,onAdPause:s.default.func,onAdPlay:s.default.func,onAdResume:s.default.func,onAdSkipped:s.default.func,onAdComplete:s.default.func,onAutoStart:s.default.func,onEnterFullScreen:s.default.func,onError:s.default.func,onExitFullScreen:s.default.func,onFiftyPercent:s.default.func,onMute:s.default.func,onNinetyFivePercent:s.default.func,onOneHundredPercent:s.default.func,onPause:s.default.func,onPlay:s.default.func,onReady:s.default.func,onResume:s.default.func,onSeventyFivePercent:s.default.func,onTenSeconds:s.default.func,onThirtySeconds:s.default.func,onThreeSeconds:s.default.func,onTwentyFivePercent:s.default.func,onUnmute:s.default.func,onVideoLoad:s.default.func,onBuffer:s.default.func,onBufferChange:s.default.func,playerId:s.default.string.isRequired,playerScript:s.default.string.isRequired,playlist:s.default.oneOfType([s.default.string,s.default.array]),useMultiplePlayerScripts:s.default.bool};t.default=o},2071:function(e,t,a){},2129:function(e,t,a){e.exports=a.p+"static/media/liveEmpty.8e7c8c55.svg"},2280:function(e,t,a){"use strict";a.r(t);var i=a(1),n=a.n(i),s=a(47),o=a(1036),l=a.n(o),r=a(1250),d=a.n(r),c=a(1287),u=a.n(c),m=a(140),v=(a(1469),a(1024)),p=a.n(v),h=a(1177),_=a.n(h),f=a(151);var y,g,C,L=Object(m.connect)((function(e){return{user:e.persistedData&&e.persistedData.user}}),{makeApiCall:f.b})((function(e){const{handleClose:t,sessionId:a,isAgora:s,makeApiCall:o}=e,[l,r]=Object(i.useState)();return Object(i.useEffect)(()=>{o(`/v2/course/live/videos?sessionId=${a}&isAgora=${s}`,"GET",void 0,e=>{r(e&&e.data)},()=>t)},[]),n.a.createElement("div",{className:"LiveClassDetails"},n.a.createElement("div",{className:"LiveClassDetails__Container"},n.a.createElement("div",{className:"LiveClassDetails__Container__Head"},n.a.createElement("div",{className:"LiveClassDetails__Container__Head--Title"},"Live Class Details"),n.a.createElement("img",{src:p.a,alt:"X",onClick:t})),n.a.createElement("div",{className:"LiveClassDetails__Container__Body"},n.a.createElement("div",{className:"LiveClassDetails__Container__Body__Top"},n.a.createElement("div",{className:"LiveClassDetails__Container__Body__Top--Text"},n.a.createElement("span",{className:"LiveClassDetails__Container__Body__Top--Text--Title"},l&&l.classTitle),l&&l.emblem&&n.a.createElement("span",{className:"LiveClassDetails__Container__Body__Top--Text--Emblem",style:{backgroundColor:l.emblem.bgColor,color:l.emblem.textColor}},l.emblem.text)),l&&l.date?n.a.createElement("div",{className:"LiveClassDetails__Container__Body__Top--Date"},n.a.createElement("img",{src:_.a,alt:"O"}),l&&l.dateString):""),l&&l.studentsEnrolledMessage?n.a.createElement("div",{className:"LiveClassDetails__Container__Body__Bottom--Student"},l.studentsEnrolledMessage):"",n.a.createElement("div",{className:"LiveClassDetails__Container__Body__Bottom"},l&&l.liveInfo&&l.liveInfo.map((e,t)=>n.a.createElement("div",{className:"LiveClassDetails__Container__Body__Bottom--Item",key:t},n.a.createElement("div",{className:"LiveClassDetails__Container__Body__Bottom--Item--Top"},n.a.createElement("img",{src:e.icon,alt:e.title})," ",e.title),n.a.createElement("div",{className:"LiveClassDetails__Container__Body__Bottom--Item--Bottom"},e.text)))))))})),b=a(91),E=a(25),S=a.n(E),T=a(2249),w=a(49);function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e}).apply(null,arguments)}const V=e=>{let{svgRef:t,title:a,...i}=e;return n.a.createElement("svg",x({width:14,height:14,viewBox:"0 0 14 14",fill:"none",ref:t},i),a?n.a.createElement("title",null,a):null,y||(y=n.a.createElement("path",{d:"M13 9V11.6667C13 12.0203 12.8595 12.3594
112.6095 12.6095C12.3594 12.8595 12.0203 13 11.6667 13H2.33333C1.97971 13 1.64057 12.8595 1.39052 12.6095C1.14048 12.3594 1 12.0203 1 11.6667V9",stroke:"#009AE0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),g||(g=n.a.createElement("path",{d:"M3.66666 5.66602L6.99999 8.99935L10.3333 5.66602",stroke:"#009AE0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),C||(C=n.a.createElement("path",{d:"M7 9V1",stroke:"#009AE0",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})))},M=n.a.forwardRef((e,t)=>n.a.createElement(V,x({svgRef:t},e)));a.p;var A=a(83),k=a(68),I=a(1547),P=a(458),N=a(5);var D=Object(m.connect)((function(e){return{user:e.persistedData&&e.persistedData.user}}),{makeApiCall:f.b})((function(e){let{handleClose:t,data:a,makeApiCall:o,fetchLiveClassList:r}=e;const d=Object(i.useRef)(null),[c,u]=Object(i.useState)(null),[m,v]=Object(i.useState)(null===a||void 0===a?void 0:a.name);return n.a.createElement("div",{className:"LiveClassDetails"},n.a.createElement("div",{className:"LiveClassDetails__Container",style:{width:" 720px"}},n.a.createElement("div",{className:"LiveClassDetails__Container__Head"},n.a.createElement("div",{className:"LiveClassDetails__Container__Head--Title"},"Edit Video"),n.a.createElement("img",{src:p.a,alt:"X",onClick:t})),n.a.createElement("div",{className:"LiveClassDetails__Container__Body"},n.a.createElement("div",{className:"LiveClassDetails__Container__Body__Top"},n.a.createElement("div",{className:"LiveClassDetails__Container__Body__Top--Text",style:{display:"flex",flexDirection:"column",gap:"8px"}},n.a.createElement("span",{className:"LiveClassDetails__Container__Body__Top--Text--Title"},"Video Name"),n.a.createElement("input",{placeholder:"Enter a title here",value:m,onChange:e=>v(e.target.value),className:l.a.goLiveModalTitleInput,type:"text"})),n.a.createElement("div",{className:"LiveClassDetails__Container__Body__Top--Text",style:{display:"flex",flexDirection:"column",gap:"8px"}},n.a.createElement("span",{className:"LiveClassDetails__Container__Body__Top--Text--Title"},"Video Thumbnail"),n.a.createElement("div",{style:{display:"flex",gap:"16px",alignItems:"end"}}," ",n.a.createElement("img",{src:c?c.previewUrl:null===a||void 0===a?void 0:a.thumbnailUrl,className:"LiveClassDetails__Container__Body__Top--Text--Image",style:{width:"260px"}}),n.a.createElement(s.b,{style:{backgroundColor:"#FFFFFF",border:"1px solid #009AE0",marginRight:"12px",boxSizing:"border-box",borderRadius:"3px"},onClick:()=>d.current.click()},n.a.createElement("p",{style:{color:"#009AE0"}}," ","Select Image"," "))," "),n.a.createElement("input",{style:{cursor:"pointer",visibility:"hidden",width:"0.1px",height:"0.1px"},type:"file",onChange:e=>(e=>{const t=e.target.files[0];t.previewUrl=URL.createObjectURL(t),u(t)})(e),ref:d,accept:"image/*"}))),n.a.createElement("div",{className:"LiveClassDetails__Container__Body__Bottom",style:{display:"flex",justifyContent:"end",gap:"4px"}},n.a.createElement(s.b,{onClick:t,style:{backgroundColor:"#FFFFFF",border:"1px solid #009AE0",marginRight:"12px",boxSizing:"border-box",borderRadius:"3px"}},n.a.createElement("p",{style:{color:"#009AE0"}},"Discard")),n.a.createElement(s.b,{onClick:async()=>{let e=null===a||void 0===a?void 0:a.thumbnailUrl;try{if(c){const t=await Object(P.a)([c]);t.length&&(e=t[0].url)}o("wl/v1/liveClass/video","PATCH",{liveSessionId:null===a||void 0===a?void 0:a.liveSessionId,updatedName:m,thumbnailUrl:e},e=>{N.toastr.success(e.message),r(!0),t()},e=>{console.log(e,"err")},!0)}catch(i){console.log(i)}},disabled:!m,style:{backgroundColor:"#00A9E0",borderRadius:"3px"}},n.a.createElement("p",{style:{color:"#FFFFFF"}}," Save"))))))})),B=a(1021),O=a(466),j=a.n(O),R=a(467),H=a.n(R);var F=Object(m.connect)(e=>{var t,a,i,n;return{userType:null===e||void 0===e||null===(t=e.persistedData)||void 0===t||null===(a=t.user)||void 0===a?void 0:a.type,mmServiceEnabledOnCourses:null===e||void 0===e||null===(i=e.persistedData)||void 0===i||null===(n=i.organization)||void 0===n?void 0:n.mmServiceEnabledOnCourses}},{makeApiCall:f.b})((function(e){var t;const{data:a,handleIframeOpen:o,handleDeleteCloseButton:r,type:c,dateTimeStamp:m,dis
1patch:v,courseId:p,fetchLiveClassList:h,userType:_,mmServiceEnabledOnCourses:f,makeApiCall:y}=e;function g(){Object(w.p)(a.videoType)&&o(a)}const[C,E]=n.a.useState(!1),[x,V]=n.a.useState(!1),[P,N]=n.a.useState(!1),[O,R]=Object(i.useState)([]),F=()=>{E(!C)},{t:U}=Object(T.a)(),[W,G]=Object(i.useState)(!1);return n.a.createElement("div",{className:l.a.SingleContentContainer},n.a.createElement("div",{className:l.a.SingleContentImgText},n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("img",{width:"120px",height:"90px",onClick:()=>g(),className:"cursorPointer",src:a.thumbnailUrl}),n.a.createElement("img",{src:u.a,onClick:()=>g(),alt:"iframeplay",className:l.a.playIcon}),!!a.duration&&n.a.createElement("span",{onClick:()=>g(),className:l.a.duration},a.duration)),n.a.createElement("div",{className:"pl-3"},n.a.createElement("div",null,n.a.createElement("div",{className:l.a.SingleContentName},a.name),c===b.b.COURSE?n.a.createElement("div",{className:l.a.SingleContentTrialTag,style:{marginBottom:"12px"}},a&&a.emblemTrial&&a.emblemTrial.text?n.a.createElement("span",{style:{backgroundColor:a.emblemTrial.bgColor,color:"#fff",padding:"4px 8px",borderRadius:"16px",marginRight:"8px",fontSize:"10px"}},a.emblemTrial.text):"",n.a.createElement("span",null,a&&a.createdByText)):a&&a.emblem2&&a.emblem2.text?n.a.createElement("div",{style:{color:a.emblem2.color,display:"flex",alignItems:"center",fontSize:"14px"},className:"pb-3"},n.a.createElement("img",{height:14,src:a.emblem2.icon}),n.a.createElement("span",{style:{color:a.emblem2.color},className:l.a.SingleCountAttendanceCount},a.emblem2.text," ")):"",c===b.b.COURSE?n.a.createElement("div",{className:"pb-3"},n.a.createElement("span",null,a&&a.emblem1&&S()(a.emblem1.text).format(m?null===m||void 0===m?void 0:m.toUpperCase():"YYYY/MM/DD")),a&&a.emblem1&&a.emblem1.text&&a&&a.emblem2&&a.emblem2.text?" \u2022 ":"",n.a.createElement("span",null,a&&a.emblem2&&a.emblem2.text)," ",a&&a.emblem2&&a.emblem2.text&&a.emblem3&&a.emblem3.text?" \u2022 ":"",a.emblem3&&a.emblem3.text?n.a.createElement("span",null,null===a||void 0===a?void 0:a.createdAt):null):a&&a.emblem3&&a.emblem3.text&&a.createdAt?n.a.createElement("div",{style:{color:a.emblem3.color,display:"flex",alignItems:"center",fontSize:"14px"}},n.a.createElement("img",{height:14,src:a.emblem3.icon}),n.a.createElement("span",{style:{color:a.emblem3.color},className:l.a.SingleCountAttendanceCount},a.createdAt)," "):""))),n.a.createElement("div",{style:{width:"10rem",justifyContent:"flex-end",alignItems:"center",alignSelf:"flex-start"},className:l.a.SingleContentImgText},p&&a.isDownloadAllowed?n.a.createElement(s.v,{trigger:n.a.createElement("button",{className:l.a.downloadBtn,disabled:W,onClick:()=>(e=>{Object(A.d)(k.dc,{video_id:null===e||void 0===e?void 0:e.id}),G(!0),v(y(`v2/course/live/video/download?sessionId=${e.id}&liveStackType=${e.isAgora}&courseId=${p}`,"GET",void 0,e=>{e.data&&(window.location.href=e.data),G(!1)},()=>G(!1)))})(a)},n.a.createElement(M,null),n.a.createElement("span",null,U("components.liveVideo.singleComponent.Download","Download"))),content:a.downloadTimeLeftText,position:"bottom left"}):null,n.a.createElement("div",{className:"ml-3"},!!a.isDeletable&&n.a.createElement(s.h,{item:!0,icon:"ellipsis vertical",style:{float:"right"}},n.a.createElement(s.h.Menu,null,n.a.createElement("div",{onClick:()=>V(!0),className:"menutoggle--items--content"},n.a.createElement(I.a,null),n.a.createElement("span",{className:"menutoggle--items--content--span"},U("components.liveVideo.singleComponent.edit","Edit"))),c===b.b.COURSE&&n.a.createElement("div",{onClick:()=>F(),className:"menutoggle--items--content"},n.a.createElement("span",{className:"infoIcon",style:{width:"16px",height:"16px",fontWeight:"400",border:"1px solid rgba(0,0,0,0.6)",borderRadius:"50%",fontSize:"14px",color:"rgba(0,0,0,0.6)",display:"flex",justifyContent:"center",alignItems:"center",marginRight:"0"}},"i")," ",n.a.createElement("span",{className:"menutoggle--items--content--span"},U("components.liveVideo.singleComponent.view","View Details"))),n.a.createElement("div",{onClick:()=>r(a),className:"menutoggle--items--content"},n.a.createElement("img",{src:d.a,alt:"remove button"})," ",n.a.createElement("span",{className:"menutoggle--items--content--span"},U("components.liveVideo.singleComponent.delete","Delete Video"))))))),C&&n.a.createElement(L,{isAgora:a.isAgora,sessionId:a.id,handleClose:F}),x&&n.a.createElement(D,{handleClose:()=>V(!1),data:a,fetchLiveClassList:h}),null!==a&&void 0!==a&&a.attachments&&1===_?n.a.createElement("button",{className:"LiveClassDetails__StudentNotes__Button",onClick:()=>(e=>{N(!0);let t="wl/v1/liveClass/attachments?liveSessionId="+e;f&&_===w.t.student&&(t="mm/v3/session/notes?liveSessionId="+e),y(t,"G
1ET",void 0,e=>{R(e)},e=>console.log(e))})(null===a||void 0===a?void 0:a.liveSessionId)},"View Study Notes"):null,n.a.createElement(B.a,{open:P,onClose:()=>N(!1)},n.a.createElement(s.u.Header,null,"Study Notes"),n.a.createElement(s.u.Content,null,n.a.createElement(s.k,{relaxed:!0,columns:4},null===O||void 0===O||null===(t=O.data)||void 0===t?void 0:t.map((e,t)=>n.a.createElement(n.a.Fragment,null,n.a.createElement(s.l,null,n.a.createElement("a",{className:"LiveClassDetails__StudentNotes__notesContainer",href:null===e||void 0===e?void 0:e.url,target:"_blank"},n.a.createElement("div",{className:"LiveClassDetails__StudentNotes__notesImage"},(e=>{switch(e){case"pdf":return n.a.createElement("img",{src:H.a,width:40,height:40,alt:"pdf"});default:return n.a.createElement("img",{src:j.a,width:40,height:40,alt:"img"})}})(null===e||void 0===e?void 0:e.mediaType)),n.a.createElement("p",{key:t,className:"LiveClassDetails__StudentNotes__notesName"},null===e||void 0===e?void 0:e.name)))))))))})),U=a(464),W=a(457),G=a.n(W),z=a(2052),K=a(1288),Y=a.n(K),J=a(2129),q=a.n(J),Q=a(1169),X=a(1023),Z=a.n(X),$=a(67),ee=a(38),te=a(1028),ae=a(1414),ie=a(116),ne=a(1265),se=a(1736),oe=a(2780),le=a(15),re=a(253);let de=Object(ie.a)();class ce extends i.Component{constructor(e){super(e),this.fetchLiveClassList=e=>{e&&this.setState({dataFetching:!0,offset:0});const{type:t,courseId:a}=this.props,{limit:i,offset:n,batchId:s}=this.state,o=Object(re.l)("getLiveVideos",null,{entityType:t,batchId:s,courseId:a,limit:i,offset:n});this.props.makeApiCall(o.url,o.method,void 0,e=>{this.setState({liveClassCard:e.data.liveClassCard,canGoLive:e.data.canGoLive,totalCount:e.data.totalCount,videoList:0==n?e.data.list:[...this.state.videoList,...e.data.list],offset:n+i,hasMore:!!(e.data.list&&e.data.list.length>19),dataFetching:!1})})},this.fetchBatchDetail=()=>{const{userType:e,batchCode:t}=this.props;let a=3==e?`/batches/${t}/details`:`students/batches/${t}/details`;this.props.makeApiCall(a,"GET",void 0,e=>{this.props.saveBatchOverview(e.data),this.fetchLiveClassList()})},this.fetchBatchOverview=()=>{this.props.batchCode&&this.props.makeApiCall(`/v2/batches/${this.props.batchCode}/overview`,"GET",void 0,this.fetchBatchSuccessHandle,()=>{},!1,{appendStudentId:!0})},this.fetchBatchSuccessHandle=e=>{this.setState({studentsCount:e.data.currentStudentsCount,batchId:e.data.batchId},()=>{this.props.location&&this.props.location.state&&this.props.location.state.isOnboarding&&(this.state.studentsCount?this.setState({goLiveModalStatus:!0,isOnboarding:!0}):this.setState({alertModal:!0})),this.fetchBatchDetail(),this.props.saveBatchOverview(e.data)})},this.handleLive=()=>{this.setState(e=>({iframeeModalStatus:!e.iframeeModalStatus}))},this.handleGoLiveModal=()=>{const{liveClassCard:e}=this.state;Object(le.k)(e)!=le.a.AGORA_SCHEDULED&&0!==Object(le.B)(e,le.a.MM_SCHEDULED)?(Object($.a)(ee.gb),this.setState(e=>({goLiveModalStatus:!e.goLiveModalStatus}))):N.toastr.info(this.props.useNewLiveService?Object(le.p)(e):Object(le.i)(e))},this.handleOpenWatchExhaustedModal=()=>{this.setState({modalIframeId:NaN,openWatchExhaustedModal:!0})},this.handleCloseWatchExhaustedModal=()=>{this.setState({openWatchExhaustedModal:!1,modalIframeId:NaN})},this.handleIframeClose=()=>{this.setState({modalIframeId:NaN,openWatchExhaustedModal:!1})},this.handleIframeOpen=async e=>{let t;1===e.host&&(t=await Object(ne.a)(e.vidKey,e)),this.setState({modalIframeId:e.id,content:e,signedUrl:t})},this.watchExhausted=()=>{const{t:e}=this.props;return n.a.createElement(s.u,{size:"small",open:this.state.openWatchExhaustedModal,onClose:this.handleCloseWatchExhaustedModal,closeOnDimmerClick:!1},n.a.createElement(s.u.Content,{style:{textAlign:"center"}},n.a.createElement("img",{src:p.a,alt:"Close",className:"addContent__SVGClose",onClick:()=>this.handleCloseWatchExhaustedModal()}),n.a.createElement("img",{style:{marginTop:"3rem"},src:Y.a,alt:"ContentRestrict"}),n.a.createElement("h3",null,e("components.liveVideo.liveVideo.blocked","Content Locked")),n.a.createElement("p",null,e("components.liveVideo.liveVideo.exhausted","You have exhausted the watch limit set by your tutor for this video"))))},this.showPlayer=()=>{var e,t,a;const{modalIframeId:i,content:o}=this.state;let l=o;return n.a.createElement(s.u,{open:!!i,basic:!0},n.a.createElement(s.u.Content,{style:{display:"flex",justifyContent:"center",alignItems:"flex-start"}}
1,n.a.createElement("div",{className:"iframeContent"},n.a.createElement(z.default,{signedUrl:this.state.signedUrl,isExhaustedDisabled:!0,item:l,handleOpenWatchExhaustedModal:this.handleOpenWatchExhaustedModal,courseId:this.props.courseId,handleIframeClose:this.handleIframeClose,student:this.state.student,ocsId:null===(e=this.props)||void 0===e||null===(t=e.courseDetails)||void 0===t||null===(a=t.metaData)||void 0===a?void 0:a.ocsId})),n.a.createElement(s.n,{size:"large",className:"float-right",name:"close",style:{"margin-left":"1rem",cursor:"pointer","margin-top":"-30px"},onClick:this.handleIframeClose})))},this.handleDeleteCloseButton=e=>{this.setState(t=>({deleteModalStatus:!t.deleteModalStatus,deleteVideo:e}))},this.handleViewDetails=e=>{this.setState({showLiveClassDetails:!this.state.showLiveClassDetails,liveClassDetailsData:e})},this.handleDeleteButton=()=>{const{deleteVideo:e}=this.state;let t=le.b.AGORA;void 0!=e.isAgora&&(t=e.isAgora);const a=Object(re.l)("deleteVideo",null,{deleteVideoId:e.id,isAgora:t,sessionId:e.liveSessionId});this.props.makeApiCall(a.url,a.method,this.props.courseId&&{courseId:this.props.courseId},()=>{this.setState({dataFetching:!0,deleteModalStatus:!1,offset:0},()=>{this.fetchLiveClassList()})})},this.handleAddStudent=()=>{this.setState({showNoStudentsPrompt:!0})},this.state={dataFetching:!0,goLiveModalStatus:!1,iframeeModalStatus:!1,videoList:[],deleteModalStatus:!1,hasMore:!0,limit:20,offset:0,isLoading:!1,totalCount:0,studentsCount:0,showNoStudentsPrompt:!1,batchId:"",alertModal:!1,isOnboarding:!1,showLiveClassDetails:!1,liveClassDetailsData:""}}componentDidMount(){const{type:e}=this.props;2!=e?this.fetchBatchOverview():this.fetchLiveClassList()}componentDidUpdate(e){const{batchInfo:t}=this.props,{dataFetching:a}=this.state;e.batchInfo||!t||a||this.fetchLiveClassList()}render(){const{videoList:e,deleteModalStatus:t,dataFetching:a}=this.state,{courseId:i,userType:o,permissions:r,t:d}=this.props;return a?n.a.createElement(s.k,{centered:!0},n.a.createElement(s.k.Column,{stretched:!0,width:10},n.a.createElement(s.r,{active:!0,inline:"centered"}))):!e||e.length||a?r&&!r.resourceManagementPermission&&3==o?n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{style:{fontSize:"24px",display:"flex",justifyContent:"space-between",alignItems:"center",width:"62%",marginBottom:"32px"}},d("components.liveVideo.liveVideo.heading2","Live Classes")),n.a.createElement("div",{className:l.a.videoListEmpty+" p-5",style:{width:this.props.width?this.props.width:"62%",marginLeft:this.props.marginLeft?this.props.marginLeft:"unset",height:"600px"}},n.a.createElement("div",null,n.a.createElement("img",{height:"120",src:q.a})),3==o&&n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:l.a.videoListEmptyHeadText,style:{padding:"1rem 0"}},d("components.liveVideo.liveVideo.noRecordings","You don\u2019t have any live recordings yet!")),n.a.createElement("div",{className:l.a.videoListEmptySubText},d("components.liveVideo.liveVideo.teach","Now you can go live for your students and teach them anytime, anywhere!")),n.a.createElement(ae.a,{batchCode:this.props.batchCode,batchId:this.state.batchId,showNoStudentsPrompt:this.state.showNoStudentsPrompt,onClose:()=>{this.setState({showNoStudentsPrompt:!1})},content:"You currently have no students to take a live class. Please add students to the batch before you go live."}))||n.a.createElement("div",{className:l.a.videoListEmptyHeadText},d("components.liveVideo.liveVideo.videoEmpty","No Video found")))):n.a.createElement("div",{style:{width:this.props.width?this.props.width:"65vw",marginLeft:this.props.marginLeft?this.props.marginLeft:"unset"}},n.a.createElement("div",{className:l.a.Header,style:{padding:"2rem 0"}},n.a.createElement("div",{className:l.a.HeaderText},d("components.liveVideo.liveVideo.heading3","Live Classes")," ",this.state.totalCount>0?`(${this.state.totalCount})`:"")),n.a.createElement("div",{className:l.a.Container},n.a.createElement(Z.a,{next:()=>this.fetchLiveClassList(),hasMore:this.state.hasMore,loader:a&&n.a.createElement(s.k,{centered:!0},n.a.createElement(s.k.Column,{stretched:!0,width:10},n.a.createElement(s.r,{active:!0,inline:"centered"}))),style:{overflow:"inherit",minHeight:"70vh"}},e&&e.map((e,t)=>n.a.createElement(F,{key:t,handleDeleteCloseButton:this.handleDeleteCloseButton,handleIframeOpen:this.handleIframeOpen,data:e,handleLive:this.handleLive,handleViewDetails:this.handleViewDetails,type:this.props.type,dateTimeStamp:this.props.dateTimeStamp,courseId:i,fetchLiveClassList:this.fetchLiveClassList})))),n.a.createElement(ae.a,{batchCode:this.props.batchCode,batchId:this.state.batchId,showNoStudentsPrompt:this.state.showNoStudentsPrompt,onClose:()=>{this.setState({showNoStudentsPrompt:!1})},content:d("components.liveVideo.liveVideo.noStudentModal","You currently have no students to take a live class. Please add students to the batch before you go live.")}),n.a.createElement(Q.a,{status:t,headerText:d("components.liveVideo.liveVideo.removeConfirm","Remove Confirmation"),bodyText:d("components.liveVideo.liveVideo.remove","Are you sure you want to delete this live session?"),onClose:this.handleDeleteCloseButton,action:this.handleDeleteButton,actionButtonText:d("components.liveVideo.liveVideo.removeCta","Yes, Remove")}),this.showPlayer()):n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{style:{fontSize:"24px",display:"flex",justifyContent:"space-between",alignItems:"center",marginLeft:"28px"}},this.state.alertModal&&n.a.createElement(se.a,{para:d("components.liveVideo.liveVideo.alertPara2","You currently have no students to take a live class. Please add students to the batch before you go live."),btn:d("components.liveVideo.liveVideo.alertCta2","Add Students"),onClickAdd:()=>{this.setState({alertModal:!1}),this.props.history.push(`/batches/${this.state.batchId}/${this.props.batchCode}/students`)}}),d("components.liveVideo.liveVideo.heading","Live Classes")),n.a.createElement("div",{className:l.a.videoListEmpty,style:{width:this.props.width?this.props.width:"62%",marginLeft:this.props.marginLeft?this.props.marginLeft:"unset",marginTop:"32px",borderRadius:"2px",boxShadow:"0px 1px 4px rgba(0, 0, 0, 0.12)",background:"#fff",height:"600px",border:"none"}},n.a.createElement("div",null,n.a.createElement("img",{width:"160",src:q.a,style:{paddingBottom:"1rem"}})),3==o&&n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:l.a.videoListEmptyHeadText,style:{padding:"1rem 0"}},d("components.liveVideo.liveVideo.heading","You don\u2019t have any live recordings yet!")),n.a.createElement("div",{className:l.a.videoListEmptySubText},d("components.liveVideo.liveVideo.emptySubheading","Now you can go live for your students and teach them anytime, anywhere!")),n.a.createElement(ae.a,{batchCode:this.props.batchCode,batchId:this.state.batchId,showNoStudentsPrompt:this.state.showNoStudentsPrompt,onClose:()=>{this.setState({showNoStudentsPrompt:!1})},content:d("components.liveVideo.liveVideo.noStudent","You currently have no students to take a live class. Please add students to the batch before you go live.")}))||n.a.createElement("div",{className:l.a.videoListEmptyHeadText}
1,d("components.liveVideo.liveVideo.noVideo","No Video found"))))}}t.default=G()(Object(m.connect)((function(e){var t,a;return{userType:e.persistedData&&e.persistedData.user.type,batchInfo:e.batchDetail&&e.batchDetail.data&&e.batchDetail.data.batchDetails&&e.batchDetail.data.batchDetails[0],premiumStatus:e.persistedData&&e.persistedData.premiumStatus,permissions:e.batchSettings&&e.batchSettings.permissions,dateTimeStamp:null===e||void 0===e||null===(t=e.persistedData)||void 0===t||null===(a=t.organization)||void 0===a?void 0:a.dateTimeStamp,useNewLiveService:Object(le.e)()}}),{makeApiCall:f.b,saveBatchOverview:U.d})(Object(oe.a)()(Object(te.a)(ce,de))))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.