1(this["webpackJsonpclassplus-web-react"]=this["webpackJsonpclassplus-web-react"]||[]).push([[59],{1137:function(e,t,a){e.exports=a.p+"static/media/emptyBatch.98a93259.svg"},1243:function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));const o=`https://${a(152).a}-cloudn.classplus.co/web/bannerAssests/`},1244:function(e,t,a){e.exports=a.p+"static/media/roundTick.e3e93fb3.svg"},1271:function(e,t,a){"use strict";a.d(t,"a",(function(){return k}));var o=a(1),n=a.n(o),l=a(1243),r=(a(1706),a(1244),a(47)),i=a(1707),s=a.n(i),c=a(1708),d=a.n(c),m=a(1709),u=a.n(m),p=a(1710),f=a.n(p),g=a(1711),h=a.n(g),b=n.a.memo((function(e){return n.a.createElement("div",{className:h.a.SearchForm+" SearchForm"},n.a.createElement("img",{src:a(1712)}),n.a.createElement("form",{autoComplete:"off",onSubmit:e=>e.preventDefault()},n.a.createElement("input",{className:h.a.searchButton,placeholder:e.placeholder?e.placeholder:"Search",onChange:e.onChange,onClick:e.onClick?e.onClick:()=>{},type:"text",value:e.value})))})),v=a(1023),C=a.n(v),_=a(1713),E=a.n(_),y=a(179);const x=l.a+"Close.svg",I=async(e,t,a,o)=>{let n;"fromListing"===o?(n=await Object(y.f)({id:e,folderId:t}),a({courseContent:n.data.data})):(n=await Object(y.d)({courseId:e,folderId:t}),a({courseContent:n.data.data.folderDetailsResult}))},N=e=>{let{item:t,type:a,selectedCourse:l,setSelectedCourse:r,setFolderName:i,setFolderData:s,setCourseId:c,courseId:d,isFolder:m,setCourseFolderId:u,isGlobalFolderList:p,setFolders:f,setGlobalFolderName:g,navigation:h,setNavigation:b,isFirst:v,setIsFirst:C,setGlobalFolderId:_}=e;return Object(o.useEffect)(()=>{console.log(h,"navigation")},[h]),n.a.createElement("div",{className:"ModalContainer__Modal__Body__ItemContainer"},n.a.createElement("div",{className:"ModalContainer__Modal__Body__ItemContainer-item"},n.a.createElement("label",{style:{display:"flex",cursor:"pointer"}},n.a.createElement("input",{style:{marginRight:"20px"},type:a,value:t.id||t.folderId,checked:"radio"===a?t.id?t.id===l:t.folderId===l:l.includes(t.folderId),onChange:()=>{if("radio"===a)g&&g(t.folderName),r(t.id||t.folderId),_(t.folderId),c(t.id||t.courseId);else if(r){const e=[...l];e.includes(t.folderId)?r(e.filter(e=>e!==t.folderId)):r([...e,t.folderId])}}})," ",n.a.createElement("div",null,(null===t||void 0===t?void 0:t.name)||(null===t||void 0===t?void 0:t.folderName)))),n.a.createElement("div",{style:{cursor:"pointer"}},0!==t.hasSubFolders&&"radio"===a&&n.a.createElement("img",{src:E.a,onClick:()=>{C(!0),p?(b([...h,{folderId:t.folderId,name:t.folderName,isfromListing:!1}]),m?(i(t.folderName),I(d,t.folderId,s),u(t.folderId)):(c(t.folderId),I(d,t.folderId,s),i(t.folderName))):(b([...h,{folderId:t.folderId,name:t.name,isfromListing:!0,courseId:t.courseId}]),m?(i(t.name),I(d||t.courseId,t.id||t.folderId,s,"fromListing"),u(t.id)):(c(t.id),I(t.id||t.courseId,t.folderId,s,"fromListing"),i(t.name)))}})))};function k(e){var t,a,l,i;let{title:c,body:m,body2:p,acceptText:g,rejectText:h,acceptAction:v,rejectAction:_,crossAction:E,infoLabelText:y,searchBarPlaceholder:k,type:F="radio",count:L=0,name:S,selectedCourse:A,setSelectedCourse:j,fetchData:M,courseList:w,isGlobalFolderList:O=!1,setFolders:D,setGlobalFolderName:T,hasMore:G=!0,setHasMore:B,optionsArray:R,selectedOption:H=0,changeSelectedOption:z,globalFolderName:P,globalFolderNameFunc:U,clearCourseList:W,linkMultipleFolders:q,selectedGlobalFolders:V,isGoLive:Y=!0,selectedCourses:Q=[]}=e;const[K,J]=Object(o.useState)(0),[X,Z]=Object(o.useState)(20),[$,ee]=Object(o.useState)(""),[te,ae]=Object(o.useState)(""),[oe,ne]=Object(o.useState)([]),[le,re]=Object(o.useState)(""),[ie,se]=Object(o.useState)(0),[ce,de]=Object(o.useState)(0),[me,ue]=Object(o.useState)([]),[pe,fe]=Object(o.useState)(!1);Object(o.useEffect)(()=>{ne(w)},[w]),((e,t,a)=>{const o=n.a.useCallback(e,a);n.a.useEffect(()=>{const e=setTimeout(()=>o(),t);return()=>clearTimeout(e)},[o,t])})(()=>{J(0),M({offset:K,limit:X,search:$,isBack:!0}),fe(!0)},500,[$]),Object(o.useEffect)(()=>{console.log(me,"navigation")},[me]);const ge=()=>{null!==V&&void 0!==V&&V.length?q(le,ie,0,V):v(le,0,ce)};return n.a.createElement("div",{className:"ModalContainer",style:{background:"rgba(0,0,0,0.6)",display:"grid",placeItems:"center",position:"fixed",top:"0",left:"0",width:"100vw",height:"100vh",zIndex:"9000"}},n.a.createElement("div",{className:"ModalContainer__Modal"},n.a.createElement("div",{className:"ModalContainer__Modal__Top",style:{display:"flex",justifyContent:"space-between",alignItems:"center",flexDirection:"row"}},n.a.createElement("div",{className:"ModalContainer__Modal__Top--Label"},n.a.createElement("img",{src:s.a,style:{paddingRight:"12px",cursor:"pointer"},onClick:_})," ",c),n.a.createElement("div",{style:{display:"flex",flexDirection:"row"}},n.a.createElement("div",{style:{marginRight:"35px",color:"#009AE0",fontWeight:"500",cursor:"pointer"},onClick:()=>{ae(""),j(""),ee(""),T("")}},"CLEAR"),n.a.createElement("div",{className:"ModalContainer__Modal__Top--Close",onClick:E||_,style:{right:"26px",top:"28px"}},n.a.createElement("img",{src:x,alt:""})))),(null===R||void 0===R?void 0:R.length)>0&&n.a.createElement("div",{className:"ModalContainer__Modal__optionsArray"},R.map(e=>n.a.createElement("div",{key:e.id,className:"ModalContainer__Modal__option"},n.a.createElement("input",{id:e.id,type:"radio",checked:e.id===H,className:"ModalContainer__Modal__option__input",onChange:()=>z(e.id)}),n.a.createElement("label",{className:"ModalContainer__Modal__option__label",htmlFor:e.id},e.name)))),0===H?n.a.createElement("div",null,n.a.createElement(b,{placeholder:k,onChange:e=>{ee(e.target.value)},value:$})):null,(null===oe||void 0===oe||null===(t=oe.courseContent)||void 0===t?void 0:t.length)>0||(null===w||void 0===w?void 0:w.length)>0&&0===H?n.a.createElement(n.a.Fragment,null,y&&n.a.createElement("div",{className:"ModalContainer__Modal__infoLabel"},n.a.createElement("img",{src:u.a,style:{marginRight:"10px",marginLeft:"10px"}}),y),n.a.createElement("div",{className:"ModalContainer__Modal__Body",style:{background:"white"}},n.a.createElement("div",{style:{fontWeight:"500",fontSize:"16px",borderBottom:"1px solid #E5E5E5",paddingBottom:"8px"}},n.a.createElement("div",{style:{display:"flex",alignItems:"center"}},n.a.createElement("img",{src:f.a,style:{cursor:"pointer"},onClick:()=>{(e=>{if(J(0),de(""),se(""),j(""),T(""),fe(!1),me.length>0){let e="",t="",a=!1,o="";if(pe&&me.length>=2){let n=[...me];n.pop();let l=n.pop();e=null===l||void 0===l?void 0:l.folderId,t=null===l||void 0===l?void 0:l.name,a=null===l||void 0===l?void 0:l.isfromListing,o=null===l||void 0===l?void 0:l.courseId,ue(n),fe(!0)}else{if(me.length>=1){let n=[...me],l=n.pop();return e=null===l||void 0===l?void 0:l.folderId,t="",a=null===l||void 0===l?void 0:l.isfromListing,o=null===l||void 0===l?void 0:l.courseId,ue(n),fe(!0),B&&B(!0),void M({offset:0,limit:X,search:$,isBack:!0})}{let n=[...me],l=n.pop();e=null===l||void 0===l?void 0:l.folderId,t=null===l||void 0===l?void 0:l.name,a=null===l||void 0===l?void 0:l.isfromListing,o=null===l||void 0===l?void 0:l.courseId,ue(n),fe(!0)}}a?I(o,e,ne,"fromListing"):I(le,e,ne),ae(t)}else B&&B(!0),M({offset:0,limit:X,search:$,isBack:!0}),W&&W(),ae("")}
1)()}})," ",(null===(a=me[(null===me||void 0===me?void 0:me.length)-1])||void 0===a?void 0:a.name)||te||S,"\xa0",n.a.createElement("span",{style:{fontWeight:"400",color:"#00000099"}}))),null!==oe&&void 0!==oe&&oe.courseContent?n.a.createElement(C.a,{dataLength:null===oe||void 0===oe?void 0:oe.courseContent.length,hasMore:!1,loader:0!==(null===oe||void 0===oe||null===(l=oe.courseContent)||void 0===l?void 0:l.length)&&n.a.createElement(r.k,{centered:!0},n.a.createElement(r.k.Column,{stretched:!0,width:10},n.a.createElement(r.r,{active:!0,inline:"centered"}))),height:"35vh"},null===oe||void 0===oe||null===(i=oe.courseContent)||void 0===i?void 0:i.map((e,t)=>n.a.createElement(N,{type:F,selectedCourse:A,setSelectedCourse:j,item:e,setGlobalFolderName:T,key:t,setFolderName:ae,setFolderData:ne,setCourseId:re,isFolder:!0,setCourseFolderId:de,setGlobalFolderId:se,courseId:le,isGlobalFolderList:O,setFolders:D,setNavigation:ue,navigation:me,isFirst:pe,setIsFirst:fe}))):n.a.createElement(C.a,{dataLength:L,next:()=>{J(K+X),M({offset:K+20,limit:X,search:$,isScroll:!0})},hasMore:G,loader:0!==(null===w||void 0===w?void 0:w.length)&&n.a.createElement(r.k,{centered:!0},n.a.createElement(r.k.Column,{stretched:!0,width:10},n.a.createElement(r.r,{active:!0,inline:"centered"}))),height:"35vh"},null===w||void 0===w?void 0:w.map((e,t)=>n.a.createElement(N,{type:F,selectedCourse:A,setSelectedCourse:j,item:e,setGlobalFolderName:T,key:t,setFolderName:ae,setFolderData:ne,isFolder:!1,courseId:le,setCourseId:re,setCourseFolderId:de,setGlobalFolderId:se,isGlobalFolderList:O,setFolders:D,setNavigation:ue,navigation:me,isFirst:pe,setIsFirst:fe})))),n.a.createElement("div",{className:"Confirmation__Modal__Bottom",style:{background:"white"}},n.a.createElement("button",{className:"Confirmation__Modal__Bottom--Accept",style:A?{}:{backgroundColor:"#E5E5E5"},onClick:ge,disabled:1===H&&""===P},g))):1===H?n.a.createElement(n.a.Fragment,null,n.a.createElement("div",{className:"ModalContainer__Modal__newFolderOption"},n.a.createElement("div",{className:"ModalContainer__Modal__newFolderOption__heading"},"Folder name"),n.a.createElement("input",{className:"ModalContainer__Modal__newFolderOption__input",placeholder:"Enter Folder Name",value:P,onChange:e=>U(e.target.value)})),n.a.createElement("div",{className:"Confirmation__Modal__Bottom",style:{background:"white"}},n.a.createElement("button",{className:`Confirmation__Modal__Bottom--Accept ${""===P&&"ModalContainer__Modal__Bottom--disabled"} `,onClick:ge,disabled:""===P},g))):n.a.createElement("div",{className:"ModalContainer__emptyState"},n.a.createElement("img",{src:d.a,className:"ModalContainer__emptyState__image"}),n.a.createElement("p",{className:"ModalContainer__emptyState__Text"},Y?"No global folder is linked with the selected courses you want to go live in.":"No global folders found matching your search keyword."))))}},1377:function(e,t,a){"use strict";a.d(t,"j",(function(){return n})),a.d(t,"g",(function(){return l})),a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return i})),a.d(t,"f",(function(){return s})),a.d(t,"e",(function(){return c})),a.d(t,"h",(function(){return d})),a.d(t,"c",(function(){return m})),a.d(t,"k",(function(){return u})),a.d(t,"i",(function(){return p})),a.d(t,"d",(function(){return f}));var o=a(81);const n=e=>({type:o.o,payload:e}),l=e=>({type:o.h,payload:e}),r=e=>({type:o.a,payload:e}),i=e=>({type:o.b,payload:e}),s=e=>({type:o.f,payload:e}),c=e=>({type:o.e,payload:e}),d=e=>({type:o.l,payload:e}),m=e=>({type:o.c,payload:e}),u=e=>({type:o.p,payload:e}),p=e=>({type:o.n,payload:e}),f=()=>({type:o.d})},1706:function(e,t,a){},1707:function(e,t,a){e.exports=a.p+"static/media/back_arrow.125e1e80.svg"},1708:function(e,t,a){e.exports=a.p+"static/media/emptyState.f14ca690.svg"},1709:function(e,t,a){e.exports=a.p+"static/media/infoIcon.2a3d8961.svg"},1710:function(e,t,a){e.exports=a.p+"static/media/backIcon.1e0ddede.svg"},1711:function(e,t,a){e.exports={SearchForm:"Search_SearchForm__J2TKV",Tag:"Search_Tag__owg4-",searchButton:"Search_searchButton__1tl5f"}},1712:function(e,t,a){e.exports=a.p+"static/media/search.763fc6cc.svg"},1713:function(e,t,a){e.exports=a.p+"static/media/arrowRight.b14ae532.svg"},1848:function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var o=a(1),n=a.n(o),l=a(1243),r=(a(1849),a(1850)),i=a.n(r),s=a(1244),c=a.n(s);const d=l.a+"Close.svg";function m(e){let{title:t,body:a,body2:o,acceptText:l,rejectText:r,acceptAction:s,rejectAction:m,crossAction:u}=e;return n.a.createElement("div",{className:"Confirmation",style:{background:"rgba(0,0,0,0.6)",display:"grid",placeItems:"center",position:"fixed",top:"0",left:"0",width:"100vw",height:"100vh",zIndex:"1000"}},n.a.createElement("div",{className:"Confirmation__Modal"},n.a.createElement("div",{className:"Confirmation__Modal__Top--Close",onClick:u||m},n.a.createElement("img",{src:d,alt:""})),n.a.createElement("div",{className:"Confirmation__Modal__Top"},n.a.createElement("div",{className:"Confirmation__Modal__Top--Label",style:{alignItems:"center"}},n.a.createElement("img",{src:i.a,style:{paddingBottom:"20px"},width:80}),t),n.a.createElement("div",{style:{fontWeight:"400",fontSize:"14px",color:"#666666",paddingTop:"8px"}},a)),n.a.createElement("div",{className:"Confirmation__Modal__Body",style:{background:"white",alignItems:"flex-start"}},null!==o&&void 0!==o&&o.length?n.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"flex-start",flexDirection:"column"}},o.map((e,t)=>n.a.createElement("div",{className:"Confirmation2__Modal2__Body2--list",key:e.order,style:{display:"flex"}},n.a.createElement("img",{style:{marginRight:"12px"},src:c.a,alt:"tick"}),n.a.createElement("div",null,e.courseName)))):n.a.createElement("div",null,"No Courses Linked Found")),n.a.createElement("div",{className:"Confirmation__Modal__Bottom",style:{background:"white"}},n.a.createElement("button",{className:"Confirmation__Modal__Bottom--Accept",onClick:s},l),n.a.createElement("button",{className:"Confirmation__Modal__Bottom--Reject",onClick:m},r))))}},1849:function(e,t,a){},1850:function(e,t,a){e.exports=a.p+"static/media/danger.04c03619.svg"},1851:function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var o,n=a(1),l=a.n(n);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)({}).hasOwnProperty.call(a,o)&&(e[o]=a[o])}return e}).apply(null,arguments)}const i=e=>{let{svgRef:t,title:a,...n}=e;return l.a.createElement("svg",r({width:16,height:6,viewBox:"0 0 16 6",fill:"none",ref:t},n),a?l.a.createElement("title",null,a):null,o||(o=l.a.createElement("path",{d:"M16 0H0V2H16V0ZM0 6H16V4H0V6Z",fill:"#D2D2D2"})))},s=l.a.forwardRef((e,t)=>
1l.a.createElement(i,r({svgRef:t},e)));a.p},2708:function(e,t,a){},2948:function(e,t,a){},2949:function(e,t,a){e.exports=a.p+"static/media/globalFolder.67ea7f76.svg"},2950:function(e,t,a){},2951:function(e,t,a){e.exports={showContentCheckbox:"libraryListing_showContentCheckbox__3thk1",contentCheckbox:"libraryListing_contentCheckbox__1VYWu",folderContainer:"libraryListing_folderContainer__3zQ0j",contentsHeaderCheckboxCont:"libraryListing_contentsHeaderCheckboxCont__1E33h",contentsHeaderCheckbox:"libraryListing_contentsHeaderCheckbox__22wR_",contentsHeaderCheckboxLabel:"libraryListing_contentsHeaderCheckboxLabel__27oUz",contentContainer:"libraryListing_contentContainer__2019j",contentCheckboxCont:"libraryListing_contentCheckboxCont__120Sx",contentContainerDrag:"libraryListing_contentContainerDrag__2v0m0",grabHandle:"libraryListing_grabHandle__3sBNK",contentSection:"libraryListing_contentSection__1kF7g",contentMultiSelectOptionsCont:"libraryListing_contentMultiSelectOptionsCont__2iU9b",contentMultiSelectOptionsDropDwn:"libraryListing_contentMultiSelectOptionsDropDwn__E8ZZf",contentThreeDotDrpDwnMenu:"libraryListing_contentThreeDotDrpDwnMenu__30VRG",contentThreeDotDrpDwnMenuEditIcon:"libraryListing_contentThreeDotDrpDwnMenuEditIcon__3kjeF",contentThreeDotDrpDwnMenuLockIcon:"libraryListing_contentThreeDotDrpDwnMenuLockIcon__HOSng",contentThreeDotDrpDwnMenuUnLockIcon:"libraryListing_contentThreeDotDrpDwnMenuUnLockIcon__1Vdak",contentScheduleLabel:"libraryListing_contentScheduleLabel__nsVDF",courseHomePublishText:"libraryListing_courseHomePublishText__2Jw5J",courseHomePublishContainer:"libraryListing_courseHomePublishContainer__2BCSG",courseHomePublishIcon:"libraryListing_courseHomePublishIcon__WwzQD"}},2952:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABLCAYAAACGGCK3AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAS9SURBVHgB7dzfT1tlGAfw7+npL+hgZWxzLC6cxYAjSmBLjHozatRsJgvD/QNA9B64NF7QJd4PE6+MsRAvvJRNE7wDdsOF0UE0UWYMxSlkbGAFOkrX9vV93to6NGaE9X132vN8knJ63nMSyPs97/s+57QBYIwxxhhjjDHGGGOMMcYYq20WNFhK9EUjdr4PByAspAo5e75lcDIJD9ISyNpE75LcODi4ZLqwefb04EwKHuNDha0m+hw8WRjEqfc1DsODKh5IpcihO7SUiEXhMa4NRIo22IevwWPcHAgKQgzcS/TF4CGuDoQIX34UHuL6QORqErv3Wa9nQql42UtVlu0rLKHC5B+aEvIFY0RS/taFfME3ZvKeyI8qIcOgistg1WU58kdMXlyX5fY0DKmCKeupc2AQB+IyHIjLcCAuw4G4jPEqy7J9qG9ugmVVz7Xw4Ot3xL/bLEvE6y58ehUVZrxXQpFIVYXxf4Sw4n98MVDxMtx4z9jBAGpFOIzqDsQOBOWUZaNW1L01nkSFmQ2khkaHfJQzAw04kIMSYgIaGAuEqqtaCiSTKUxCA2OB0PpRQ643vT2u5cmzsUD8odoJxBJCy+gg5kZIiKer/TASiCp3a+Bm8G/apitipJf8YZ6u9svMCOHqat+0B0Llrs9fNZ8UP47W6YpoD6SWyl3d0xXRHkigLoxaoXu6ItrnErevH/aR52EfP4ub+Q4s54oPb1uxgvORNeR++RKFnfulU7VPV0RrIG6+GbQC9UifuoSPNl/G2OwmUrs52Vrq/CCcBgcDbe/h/dZvZDA3gGxa++ggWqcsfygEN6IwVs6M4I3vOxH/LoW+1nrV7jT4y69YS1gda5vrwGrHCOwTr8zDAK2BuHW6CjzXi9dvBpHKFjB96Rn0tBTXufi5w0j0NCO5lUN/+yHcutKi2q/MhbHWNtgPA7QF4vPbrvwwyqprxgfrL6lOn3zzmBoJEz9vq1FBIdB+7GQYV79Nobs5qAKaX8/ik5/Sw0KIGDTTFogddOf6QaNj/PY2BmTndzUXR8nMSgbDLzSWz6EpbGY1I48JFRCdO/bDpjoEzbQF4tb1YzZ9vDwlEbr6SdfRfy6gnpbQnmP97REV3NSdzGVopqXKsizLtevHrzgJqqZoSqLv8CS3c6q9tE+o88nI3AaiQV95f20n70AzLSOkGp5dqU6WH4xThz+6r9pCe9tK+yZoGSFuna5Iq794b3ft1SNyfQipteK1r+6qxZsWcUJttK4keo6Wz6H9ppClvfT13Ag5b/+oRsWEXNhJKYTZld3yOQvrD/ccm7idVlVYb2u99kAqPkLCTjQlMr5BWSLCjfIPt53hzsbRuFwzimVuSJW5k8sPMNTZoM6hioqqq2jQwsJGVlVlo+fUY5WKf3WUSXe2cmPO578Jet26vyumV3YEPk7KbUYkFrfV+/HFLTH9e0aUzpPGYICWf63hdrJzo4t/5qYvTt3tphKY7jNonSgptdHIoKlq6sKxhTNNwZisHrU/XPRkIIRCkZu4fF41RGsEhfAoqqyGXmzAu+2RD589FIibCIN4NpASGYwjN/EbyztdG9lCN7WdCNvJi6fC1+XbSRnEDBhjjDHGGGOMMcYYY//xF23wlsgTE/WoAAAAAElFTkSuQmCC"},2953:function(e,t,a){e.exports=a.p+"static/media/u_link.381b2286.svg"},2954:function(e,t,a){e.exports=a.p+"static/media/trash-2.a8b118f8.svg"},2955:function(e,t,a){e.exports=a.p+"static/media/Group 74.5dedce09.svg"},2956:function(e,t,a){e.exports=a.p+"static/media/link.bcc76d52.svg"},2957:function(e,t,a){e.exports=a.p+"static/media/delete.bd9723d7.svg"},3433:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return V}));var o=a(1),n=a.n(o),l=a(2249),r=a(1037),i=a(1019),s=a(260),c=a(140),d=a(2796),m=a(47),u=(a(2948),a(2708),a(2949)),p=a.n(u);var f=function(){const{t:e}=Object(l.a)();return n.a.createElement("div",{className:"conainter"},n.a.createElement("div",{className:"addContentEmpty"},n.a.createElement("div",{className:"addContent__content--empty--svg"},n.a.createElement("img",{src:p.a,alt:"emptyList"})),n.a.createElement("div",{className:"addContent__content--empty--text"},n.a.createElement("h2",null,e("components.ContentStore.CourseHome.notUploadedYet","You don\u2019t have any content uploaded yet")),n.a.createElement("p",null,e
1("components.ContentStore.CourseHome.clickAddGlobalFolder","Click on the Add Global Folder button to upload content")))))},g=a(1137),h=a.n(g);var b=function(){const{t:e}=Object(l.a)();return n.a.createElement("div",{className:"conainter"},n.a.createElement("div",{className:"addContentEmpty"},n.a.createElement("div",{className:"addContent__content--empty--svg"},n.a.createElement("img",{src:h.a,alt:"emptyList"})),n.a.createElement("div",{className:"addContent__content--empty--text"},n.a.createElement("h2",null,e("containers.GlobalLibrary.LibraryListing.noResultFound","No Result Found")),n.a.createElement("p",null,e("containers.GlobalLibrary.LibraryListing.clickAddGlobalFolder","Click on the Add Global Folder button to upload content")))))},v=a(1243),C=(a(2950),a(1244)),_=a.n(C);const E=v.a+"Close.svg";function y(e){let{title:t,body:a,body2:o,acceptText:l,rejectText:r,acceptAction:i,rejectAction:s,crossAction:c}=e;return n.a.createElement("div",{className:"Confirmation2",style:{background:"rgba(0,0,0,0.6)",display:"grid",placeItems:"center",position:"fixed",top:"0",left:"0",width:"100vw",height:"100vh",zIndex:"1000"}},n.a.createElement("div",{className:"Confirmation2__Modal2"},n.a.createElement("div",{className:"Confirmation2__Modal2__Top2"},n.a.createElement("div",{className:"Confirmation2__Modal2__Top2--Label2"},t),n.a.createElement("div",{className:"Confirmation2__Modal2__Top2--Close2",onClick:c||s},n.a.createElement("img",{src:E,alt:""}))),n.a.createElement("div",{className:"Confirmation2__Modal2__Body2",style:{background:"white"}},n.a.createElement("div",{style:{fontWeight:"500",fontSize:"16px"}},a),null!==o&&void 0!==o&&o.length?n.a.createElement("div",{style:{marginTop:"24px"}},o.map((e,t)=>n.a.createElement("div",{className:"Confirmation2__Modal2__Body2--list",key:t},n.a.createElement("img",{style:{marginRight:"12px"},src:_.a,alt:"tick"}),n.a.createElement("div",null,e.courseName)))):n.a.createElement("div",null,"No Courses Linked Found"))))}var x=a(1848),I=a(1214),N=(a(1851),a(18)),k=a(2951),F=a.n(k),L=a(1377),S=a(2952),A=a.n(S),j=a(2953),M=a.n(j),w=a(2954),O=a.n(w),D=a(2955),T=a.n(D);var G=Object(c.connect)((e,t)=>({folderList:e.globalFolder.folderList,selectedFolder:e.globalFolder.selectedFolder}),(e,t)=>({selectFolder:t=>{e(Object(L.j)(t))},addNewFolderApi:t=>{e(Object(L.b)(t))}}))(Object(d.a)((function(e){const{t:t}=Object(l.a)(),[a,r]=Object(o.useState)(0),[i,s]=Object(o.useState)(""),[c,d]=Object(o.useState)("");Object(o.useEffect)(()=>{e.folderList[e.folderList.length-1].dummy&&s(e.folderList[e.folderList.length-1].name)},[e.folderList]);const u=t=>{const a=t.keyCode||t.charCode,o=t.target.value;13===a&&(c?e.onEditCourse({courseId:c.courseId,name:o,resourceId:c.folderId,folderId:c.folderId}):e.addNewFolderApi({name:o}),d(""),s(""),e.setDisableAddButton(!1)),27===a&&(s(""),e.removeTempFolder(),e.setDisableAddButton(!1))},p=a=>{var o;return a.dummy||a.folderId===c.folderId?n.a.createElement("div",{className:"addContent__content--folder"},n.a.createElement("div",{className:"flexrow",style:{width:"100%"}},n.a.createElement("div",{style:{display:"flex",justifyContent:"center",width:"120px",height:"90px"}},n.a.createElement("img",{src:A.a,alt:"Folder"})),n.a.createElement("div",{className:"addContent__content--details",style:{padding:"1.3rem 0",width:"85%"}},n.a.createElement("div",{className:"addContent__content--details--sub"},n.a.createElement("input",{onKeyUp:u,onChange:e=>s(e.target.value),className:"addContent__content--folder--input",placeholder:t("components.ContentStore.CourseHome.folderPlaceholder","Enter Folder Name and then press enter"),required:!0,value:i||c.name}))))):n.a.createElement("div",{onClick:()=>N.history.push(`/store/course/${a.courseId}/${a.folderId}?section=content&fromListing=true`),className:"addContent__content--folder forHover "+F.a.contentSection},n.a.createElement("div",{className:"flexrow maxwidth85"},n.a.createElement("div",{style:{display:"flex",justifyContent:"center",height:"90px",width:"120px"}},n.a.createElement("img",{src:A.a,alt:"Folder"})),n.a.createElement("div",{className:"addContent__content--details ",style:{padding:"1.3rem 0"}},n.a.createElement("p",{className:"addContent__content--details--heading",onClick:()=>N.history.push("/global-library")},function(e,t){let a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return e?e.length<t?e:`${e.substr(0,t)}${a&&"..."}`:""}(a.name,40)),n.a.createElement("div",{style:{marginTop:"8px",cursor:"pointer",color:"#0072CE"},onClick:t=>{e.onClickCourses(a),t.stopPropagation()}},a.courseCount," courses"))),null!==e&&void 0!==e&&null!==(o=e.selected)&&void 0!==o&&o.length?null:n.a.createElement("div",{className:"addContent__content--actions",onClick:()=>this.lockUnlock(a)},n.a.createElement("div",{className:"lockContainer"}),g(a,1)))},f=(e,t,a,o)=>{let n=o[t].order,l=0,r=o.length===t+1,i=0;return 0!==e.order&&(l=a>t?o[t-1]&&o[t-1].order||0:o[t+1]&&o[t+1].order||0,r?i+=o[t].order+1e4:i=(l+n)/2),{...e,order:parseInt(i)}},g=(t,a)=>n.a.createElement(m.h,{item:!0,icon:"ellipsis vertical",style:{float:"right"},className:F.a.contentThreeDotDrpDwnMenu},n.a.createElement(m.h.Menu,null,n.a.createElement(m.h.Item,{onClick:()=>{d(t)}},n.a.createElement("div",{style:{display:"flex",alignItems:"center"}},n.a.createElement("img",{src:T.a,style:{marginRight:"5px"}})," Edit")),n.a.createElement(m.h.Item,{onClick:()=>{e.linkToCourse(t)}},n.a.createElement("div",{style:{display:"flex",alignItems:"center"}},n.a.createElement("img",{src:M.a,style:{marginRight:"5px"}})," Link to Course")),n.a.createElement(m.h.Item,{onClick:()=>{e.onDeleteFolder(t)}},n.a.createElement("div",{style:{display:"flex",alignItems:"center"}},n.a.createElement("img",{src:O.a,style:{marginRight:"5px"}}
1)," Delete"))));return n.a.createElement("div",{className:F.a.folderContainer},n.a.createElement("div",{style:{height:"fit-content"}},n.a.createElement("div",{className:"borderNone"},n.a.createElement(I.a,{onDragEnd:t=>{t.destination&&t.destination.index!==t.source.index&&((e,t,a)=>{let o=Array.from(e);Array.from(o);const n=f(o[t],a,t,o);o.splice(t,1),o.splice(a,0,n);let l=!1,r=o[a-1]&&o[a-1]-o[a]||10,i=o[a+1]&&o[a]-o[a+1]||10;0===n.order&&r>9&&i>9&&(l=!0),o=l?o.map((e,t)=>({...e,index:t,order:1e4*(t+1)})):o.map((e,t)=>({...e,index:t}));const{type:s,id:c,order:d,isLockedForStudent:m}=n;if(!l){}})(e.folderList,t.source.index,t.destination.index)}},n.a.createElement(I.c,{droppableId:"droppable",isDropDisabled:!0},(t,o)=>{var l;return n.a.createElement("div",Object.assign({},t.droppableProps,{ref:t.innerRef,className:`${F.a.contents} ${a?F.a.showContentCheckbox:""}`}),(null===e||void 0===e?void 0:e.folderList)&&(null===e||void 0===e||null===(l=e.folderList)||void 0===l?void 0:l.map((t,a)=>(console.log(t,"this is 1 item"),n.a.createElement(I.b,{key:t.folderId,draggableId:t.folderId,index:a,isDragDisabled:!0},(a,o)=>n.a.createElement("div",Object.assign({ref:a.innerRef},a.draggableProps,a.dragHandleProps,{className:`${F.a.contentContainer} ${o.isDragging?F.a.contentContainerDrag:""}`}),n.a.createElement("div",{className:F.a.contentCheckboxCont},e.folderList[e.folderList.length-1].dummy?null:n.a.createElement(m.d,{className:F.a.contentCheckbox,checked:e.selected.includes(t.folderId),onChange:()=>{e.setMultiSelectCourseId(t.courseId),(t=>{let a=[...e.selected];a.includes(t)?a.splice(a.indexOf(t),1):a.push(t),e.setSelected(a)})(t.folderId)}})),p(t)))))),t.placeholder)})))))}))),B=a(1271),R=a(179),H=a(2956),z=a.n(H),P=a(2957),U=a.n(P),W=a(5);var q=Object(d.a)(Object(c.connect)((e,t)=>({folderList:e.globalFolder.folderList,linkedCourses:e.globalFolder.linkedCourses,selectedFolder:e.globalFolder.selectedFolder,courseList:e.globalFolder.courseList,totalCount:e.globalFolder.coursesListCount,orgId:e.persistedData.organization.id}),e=>({getFolderList:t=>e(Object(L.g)(t)),addTempFolder:t=>e(Object(L.a)(t)),removeTempFolder:t=>e(Object(L.i)(t)),getCourseList:t=>e(Object(L.f)(t)),deleteCourse:t=>e(Object(L.e)(t)),getGlobalFolderLinkedCourses:t=>e(Object(L.h)(t)),changeGlobalFolderName:t=>e(Object(L.c)(t)),clearCourseList:()=>e(Object(L.d)())}))((function(e){let{folderList:t,linkedCourses:a,selectedFolder:r,getCourseList:i,clearCourseList:s,orgId:c,...d}=e;const{t:u}=Object(l.a)(),[p,g]=Object(o.useState)(""),[h,v]=Object(o.useState)(!1),[C,_]=Object(o.useState)(!1),[E,I]=Object(o.useState)(!1),[N,k]=Object(o.useState)(),[F,L]=Object(o.useState)(""),[S,A]=Object(o.useState)([]),[j,M]=Object(o.useState)(0),[w,O]=Object(o.useState)(!1),[D,T]=Object(o.useState)(""),[H,P]=Object(o.useState)(!1),[q,V]=Object(o.useState)(""),[Y,Q]=Object(o.useState)(!1),[K,J]=Object(o.useState)(null);return((e,t,a)=>{const o=n.a.useCallback(e,a);n.a.useEffect(()=>{const e=setTimeout(()=>o(),t);return()=>clearTimeout(e)},[o,t])})(()=>{d.getFolderList({offset:0,limit:10,search:p})},500,[p]),n.a.createElement("div",{className:"container1"},h&&n.a.createElement(y,{title:`Courses Linked (${(null===a||void 0===a?void 0:a.length)||0})`,body:D,body2:a,crossAction:()=>v(!1),rejectAction:()=>v(!1)}),C&&n.a.createElement(x.a,{acceptText:"Continue",rejectText:"Cancel",title:"Caution!",body:"This folder will be deleted from the following courses too",body2:a,crossAction:()=>{_(!1),O(!1)},rejectAction:()=>{_(!1),O(!1)},acceptAction:()=>{w?d.deleteCourse({data:S}):d.deleteCourse({data:[F.folderId]}),_(!1),A([]),O(!1)}}),H&&n.a.createElement(x.a,{acceptText:"Continue",rejectText:"Cancel",title:"Caution!",body:"This folder will be edited in the following courses too",body2:a,crossAction:()=>{P(!1),O(!1)},rejectAction:()=>{P(!1),O(!1)},acceptAction:()=>{d.changeGlobalFolderName(F),P(!1),L("")}}),E&&n.a.createElement(B.a,{title:"Select Courses",infoLabelText:"All content added/deleted/edited in this folder will be reflected in the selected course in future",searchBarPlaceholder:"Search Course",acceptText:"Save",type:"radio",name:"Courses",count:d.totalCount,selectedCourse:N,setGlobalFolderName:V,setSelectedCourse:k,rejectAction:()=>{I(!1),s()},crossAction:()=>{I(!1),s()},fetchData:e=>{let{offset:t,limit:a,search:o}=e;i({offset:t,limit:a,search:o,folderId:F.folderId||S})},courseList:d.courseList,acceptAction:e=>{e&&Object(R.j)(e,F.folderId?[F.folderId]:S[0].folderId,F.courseId,N===e?0:N).then(e=>{W.toastr.success("Success","Folder linked successfully"),I(!1),d.getFolderList({offset:0,limit:10,search:p}),s()}).catch(e=>{var t,a;W.toastr.error("Error",null===e||void 0===e||null===(t=e.response)||void 0===t||null===(a=t.data)||void 0===a?void 0:a.message)})},selectedGlobalFolders:S,linkMultipleFolders:(e,t,a,o)=>{Object(R.j)(e,o,j,N===e?0:N).then(e=>{W.toastr.success("Success","Folder linked successfully"),I(!1),d.getFolderList({offset:0,limit:10,search:p}),s()}).catch(e=>{var t,a;W.toastr.error("Error",null===e||void 0===e||null===(t=e.response)||void 0===t||null===(a=t.data)||void 0===a?void 0:a.message)}),A([])},folderState:F,clearCourseList:s,isGoLive:!1}),n.a.createElement("div",{className:"heading"},n.a.createElement("div",{style:{fontSize:"24px",fontWeight:"500"}},"Global library"),n.a.createElement("div",null,n.a.createElement("button",{className:"btn btn-primary btnClass",disabled:Y,onClick:()=>{(()=>{let e=Math.floor(1e4*Math.random())+1e4;J(e),d.addTempFolder({name:"Untitled",contentType:1,dummy:!0,folderId:e,index:4}),setTimeout(()=>{window.scrollTo(0,document.body.scrollHeight+200)},200),Q(!0)})()},style:Y?{cursor:"not-allowed"}
1:{cursor:"pointer"}},"+ Add Global Folder"))),n.a.createElement("div",{className:"mainBody"},n.a.createElement("div",{className:"header"},n.a.createElement("div",{className:"headerText"},0===S.length?n.a.createElement("div",null,"Folders (",t.length,") "):n.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",fontSize:"16px"}},n.a.createElement(m.d,{className:"contentCheckbox",checked:S.length===t.length,onChange:()=>(()=>{if(S.length===t.length)A([]);else{let e=[];for(let a=0;a<t.length;a++)e.push(t[a].folderId);A(e)}})()})," ",n.a.createElement("div",{style:{marginLeft:"25px"}},"Selected (",S.length,")"))),0===r.length&&0===S.length?n.a.createElement("div",{className:"seachBar"},n.a.createElement(m.p,{transparent:!0,icon:"search",value:p,onChange:(e,t)=>{let{value:a}=t;g(a)},iconPosition:"left",placeholder:u("containers.GlobalLibrary.LibraryListing.searchFolder","Search Folder"),style:{"font-size":"14px","line-height":"17px",color:"#989898"},disabled:0===t.length&&""===p})):n.a.createElement("div",{className:"headerOptions"},n.a.createElement("div",{className:"headerOption",style:{marginRight:"20px"},onClick:()=>{I(!0),O(!0)}},n.a.createElement("img",{style:{marginRight:"5px"},src:z.a}),"Link to Course"),n.a.createElement("div",{className:"headerOption",onClick:()=>{_(!0),O(!0),d.getGlobalFolderLinkedCourses(S)}},n.a.createElement("img",{style:{marginRight:"5px"},src:U.a}),"Delete")))),""!==p&&0===t.length?n.a.createElement(b,null):0===t.length?n.a.createElement(f,null):n.a.createElement(G,{onClickCourses:e=>{console.log(e,"this is course data"),T(e.name),d.getGlobalFolderLinkedCourses(e.folderId),v(!0)},onDeleteFolder:e=>{d.getGlobalFolderLinkedCourses(e.folderId),L(e),_(!0)},linkToCourse:e=>{I(!0),L(e)},onEditCourse:e=>{d.getGlobalFolderLinkedCourses(e.folderId),P(!0),L(e)},selected:S,setSelected:A,setMultiSelectCourseId:M,setDisableAddButton:Q,disableAddButton:Y,removeTempFolder:()=>{d.removeTempFolder(K),Q(!1)}}))})));function V(){const{t:e}=Object(l.a)();return n.a.createElement(n.a.Fragment,null,n.a.createElement("div",null,n.a.createElement(r.Helmet,null,n.a.createElement("title",null,e("containers.globalLibrary.PageTitle","Global Library"))),n.a.createElement(i.a,null,n.a.createElement(s.a,{exact:!0,path:"/global-library",component:q}))))}}}]);
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.