1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[68797],{19798:(e,r,i)=>{"use strict";i.d(r,{A:()=>q});var t=i(50979),s=i(74723),n=i(25963),a=i(24900),o=i(35935),l=i(94285),m=i(30369),d=i(32557),c=i(21055),p=i(42527),u=i(57696),h=i(54698),g=i(33092),x=i(90815),f=i(70875),w=i(65091);let y="instructor",v="mark-video-as-removed";"".concat(y,"-").concat(v);let b=e=>({context:{namespace:y,functionName:v},data:e}),j=async e=>{let r,{fermionAuthTokenForCodedamn:i,authToken:t,data:s,fermionSchoolId:n}=e;try{r=await g.Ay.request({method:"POST",baseURL:(0,x.Pb)(),data:{fermionSchoolId:n,authToken:t,fermionAuthTokenForCodedamn:i,data:[b(s)]}}).then(e=>e.data).then(e=>{var r;return(null==(r=e.at(0))?void 0:r.output)||null})}catch(e){throw{errorMessage:(null==e?void 0:e.message)||"Something went wrong while making this request. Please try again or contact [email protected]",isNetworkError:!0}}if(!r)throw{errorMessage:"Something went wrong while making this request. Please try again or contact [email protected]",isNetworkError:!1};if("ok"===r.status)return r.data;throw{...r,isNetworkError:!1}},k=async e=>{let{schoolHostname:r,data:i,forceOverrideAuthToken:t,shouldEnableBatching:s=!0}=e,n=t||(0,f.G0)()||null,a=(0,w.wx)({schoolHostname:r})||null,o=(0,f.$q)()||null;if(!s)return await j({fermionAuthTokenForCodedamn:o,fermionSchoolId:a,data:i,authToken:n});{let e=(0,x.zL)(i);return await x.l3.fetch({batchingUniqueKey:e,fermionSchoolId:a,authToken:n,fermionAuthTokenForCodedamn:o,data:b(i)}).then(e=>e)}},N=async e=>{let{data:r,forceOverrideAuthToken:i,shouldEnableBatching:t=!0,forceOverrideSchoolHostname:s}=e;try{let e;if(null!=s)e=s;else if("undefined"!=typeof document)e=window.location.hostname;else throw Error("Unable to figure out schoolHostname which is required to get config. Please make sure the API functions are called properly on server side");let n=await k({data:r,shouldEnableBatching:t,forceOverrideAuthToken:i,schoolHostname:e});return{status:"ok",data:n}}catch(e){return{status:"error",errorMessage:(0,x._R)(e).errorMessage}}};var C=function(e){return e.CcFailed="CcFailed",e.CcProcessing="CcProcessing",e.Deleted="Deleted",e.Failed="Failed",e.Processing="Processing",e.Ready="Ready",e.ReadyWaitingForCc="ReadyWaitingForCc",e.ReadyWithCc="ReadyWithCc",e.Uploaded="Uploaded",e.Uploading="Uploading",e}({}),_=i(29841);let q=e=>{let{onVideoSelect:r}=e,[i,g]=(0,n.useState)(""),[x,f]=(0,n.useState)(null),[w,y]=(0,n.useState)(!1),[v,b]=(0,n.useState)(!0);function j(){if(v)return void e.closeLibrary();window.confirm("Do you want to close the window and cancel any pending uploads?")&&e.closeLibrary()}let{data:k}=(0,h.K)({});(0,n.useEffect)(()=>{null!=k&&f(k.videoData)},[k]);let q=function(e,r){if(!e)return null;if(""===r.trim())return e;let i=[];for(let t=0;t<e.length;t++){let s=e[t],n=s.videoTitle.toLowerCase(),a=r.toLowerCase();n.includes(a)&&i.push(s)}return i}(x,i);async function E(e){if("yes"===await (0,p.U)({title:"Remove Video",message:"Are you sure you want to remove this video from your library?"})){let r=await N({data:{videoId:e}});if("error"===r.status)(0,d.A2)(r.errorMessage);else{let r=null==q?void 0:q.filter(r=>r.videoId!==e);return f(null!=r?r:null),(0,d.v0)("Video removed successfully")}}}return(0,t.jsxs)(u.j,{isOpen:!0,onClose:()=>j(),className:"max-w-5xl bg-white text-black",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-gray-200 bg-white p-4 sm:px-6",children:[(0,t.jsx)("h3",{className:"text-lg font-bold leading-6 text-gray-900 md:text-xl",children:w?"Upload Videos":"Video Library"}),(0,t.jsx)(a.zhF,{onClick:()=>j(),className:"shrink-0 cursor-pointer text-gray-600 hover:text-black"})]}),w?(0,t.jsxs)("div",{children:[(0,t.jsx)("button",{className:"px-6 py-2 text-sm font-medium text-indigo-600 underline-offset-2 hover:underline",onClick:()=>{y(!1)},children:"â Back to video library"}),(0,t.jsx)(c.K,{setSafeToClose:e=>b(e)})]}):(0,t.jsxs)("div",{className:"min-h-[500px] p-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"relative mt-1 rounded-md shadow-sm",children:[(0,t.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",children:(0,t.jsx)(a.fUO,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})}),(0,t.jsx)("input",{type:"text",className:"block w-full rounded-md border-gray-300 pl-10 focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm",placeholder:"Search video library...",value:i,onChange:e=>g(e.target.value)})]}),(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-md border border-transparent bg-indigo-600 px-3 py-2 text-sm font-medium leading-4 text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",onClick:()=>{y(!0)},children:[(0,t.jsx)(a.u8N,{className:"h-4 w-4 flex-shrink-0"}),"Upload Video(s)"]})]}),null===q?(0,t.jsx)("div",{className:"flex h-96 w-full items-center justify-center",children:(0,t.jsx)(l.A,{})}):null,(null==q?void 0:q.length)===0?(0,t.jsxs)("div",{className:"mt-6 flex h-96 flex-col items-center justify-center gap-3 rounded-lg border border-dashed bg-gray-50 text-gray-600",children:[(0,t.jsx)(o.wER,{className:"h-14 w-14"}),(0,t.jsx)("h1",{className:"text-center",children:"No videos found. Upload more videos to see them here."}),(0,t.jsx)("div",{className:"flex items-center gap-3",children:(0,t.jsxs)(_.$,{onClick:()=>{y(!0)},children:[(0,t.jsx)(a.u8N,{className:"h-4 w-4 flex-shrink-0"}),"Upload Video(s)"]})})]}):null,null!==q&&q.length>0&&(0,t.jsx)("div",{className:"mt-6 max-h-[400px] divide-y overflow-y-auto rounded-lg border px-4",children:q.map(e=>(0,t.jsxs)("div",{className:"flex w-full items-center justify-between px-2 py-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("p",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"mr-2",children:e.videoTitle}),[C.Uploaded,C.Uploading,C.Processing,C.Ready,C.Failed].includes(e.status)&&(0,t.jsx)("span",{className:"".concat(e.status===C.Ready?"bg-green-800/90":"bg-red-800/90"," rounded px-2 py-0.5 text-xs capitalize text-white"),children:e.status===C.Uploaded?"Waiting for processing":e.status}),[C.Ready,C.CcProcessing,C.CcFailed].includes(e.status)&&(0,t.jsx)("span",{className:"".concat(e.status===C.CcFailed?"bg-red-800/90":"bg-yellow-600/90"," rounded px-2 py-0.5 text-xs capitalize text-white"),children:e.status===C.Ready?"Waiting for cc processing":e.status}),e.status===C.ReadyWithCc&&(0,t.jsx)("span",{className:"rounded bg-green-900 px-2 py-0.5 text-xs capitalize text-white",children:"Ready With CC"})]}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:(0,s.Ay)((0,m.
1iK)(e.videoId)).format("DD MMM YYYY [â¢] hh:mm:ss A")})]}),(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md border border-transparent bg-red-600 px-3 py-2 text-sm font-medium leading-4 text-white shadow-sm hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 disabled:bg-gray-500",onClick:()=>{E(e.videoId).catch(e=>console.error(e))},disabled:![C.Ready,C.Failed,C.CcProcessing,C.ReadyWithCc,C.CcFailed].includes(e.status),children:"Remove"}),(0,t.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md border border-transparent bg-indigo-600 px-3 py-2 text-sm font-medium leading-4 text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 disabled:bg-gray-500",onClick:()=>r(e.videoId),disabled:![C.Ready,C.CcProcessing,C.ReadyWithCc,C.CcFailed].includes(e.status),children:"Use video"})]})]},e.videoId))})]})]})}},20365:(e,r,i)=>{"use strict";i.d(r,{I:()=>s,Z:()=>n});var t=i(65091);let s=82;function n(e){let r=(0,t.d)({hostname:e.realHostname}),i=e.src.startsWith("/")?"".concat(new URL(r.realUrl).origin).concat(e.src):e.src;if(e.isOpenGraphImage)return i;{var n,a;if(i.startsWith("https://wsrv.nl/"))return i;let r=i.toLowerCase().endsWith(".gif"),t=r?"&n=-1":"";if(r)return i;let o="&output=webp";if(e.outputFormat&&(o="&output=".concat(e.outputFormat)),!e.strictDimensions)return"https://wsrv.nl/?url=".concat(encodeURIComponent(i),"&w=").concat(e.width,"&q=").concat(null!=(a=e.quality)?a:s).concat(o).concat(t);if(void 0==e.height)throw Error("height and width are required with strictDimensions");return"https://wsrv.nl/?url=".concat(encodeURIComponent(i),"&w=").concat(e.width,"&fit=cover&h=").concat(e.height,"&q=").concat(null!=(n=e.quality)?n:s).concat(o).concat(t)}}},21055:(e,r,i)=>{"use strict";i.d(r,{K:()=>U,A:()=>M});
1var t=i(50979),s=i(54079),n=i(25963),a=i(24900),o=i(57696),l=i(94285),m=i(32557),d=i(33092),c=i(90815),p=i(70875),u=i(65091);let h="instructor",g="set-course-video-upload-complete";"".concat(h,"-").concat(g);let x=e=>({context:{namespace:h,functionName:g},data:e}),f=async e=>{let r,{fermionAuthTokenForCodedamn:i,authToken:t,data:s,fermionSchoolId:n}=e;try{r=await d.Ay.request({method:"POST",baseURL:(0,c.Pb)(),data:{fermionSchoolId:n,authToken:t,fermionAuthTokenForCodedamn:i,data:[x(s)]}}).then(e=>e.data).then(e=>{var r;return(null==(r=e.at(0))?void 0:r.output)||null})}catch(e){throw{errorMessage:(null==e?void 0:e.message)||"Something went wrong while making this request. Please try again or contact [email protected]",isNetworkError:!0}}if(!r)throw{errorMessage:"Something went wrong while making this request. Please try again or contact [email protected]",isNetworkError:!1};if("ok"===r.status)return r.data;throw{...r,isNetworkError:!1}},w=async e=>{let{schoolHostname:r,data:i,forceOverrideAuthToken:t,shouldEnableBatching:s=!0}=e,n=t||(0,p.G0)()||null,a=(0,u.wx)({schoolHostname:r})||null,o=(0,p.$q)()||null;if(!s)return await f({fermionAuthTokenForCodedamn:o,fermionSchoolId:a,data:i,authToken:n});{let e=(0,c.zL)(i);return await c.l3.fetch({batchingUniqueKey:e,fermionSchoolId:a,authToken:n,fermionAuthTokenForCodedamn:o,data:x(i)}).then(e=>e)}},y=async e=>{let{data:r,forceOverrideAuthToken:i,shouldEnableBatching:t=!0,forceOverrideSchoolHostname:s}=e;try{let e;if(null!=s)e=s;else if("undefined"!=typeof document)e=window.location.hostname;else throw Error("Unable to figure out schoolHostname which is required to get config. Please make sure the API functions are called properly on server side");let n=await w({data:r,shouldEnableBatching:t,forceOverrideAuthToken:i,schoolHostname:e});return{status:"ok",data:n}}catch(e){return{status:"error",errorMessage:(0,c._R)(e).errorMessage}}},v="instructor",b="get-signed-url-for-course-video-upload";"".concat(v,"-").concat(b);let j=e=>({context:{namespace:v,functionName:b},data:e}),k=async e=>{let r,{fermionAuthTokenForCodedamn:i,authToken:t,data:s,fermionSchoolId:n}=e;try{r=await d.Ay.request({method:"POST",baseURL:(0,c.Pb)(),data:{fermionSchoolId:n,authToken:t,fermionAuthTokenForCodedamn:i,data:[j(s)]}}).then(e=>e.data).then(e=>{var r;return(null==(r=e.at(0))?void 0:r.output)||null})}catch(e){throw{errorMessage:(null==e?void 0:e.message)||"Something went wrong while making this request. Please try again or contact [email protected]",isNetworkError:!0}}if(!r)throw{errorMessage:"Something went wrong while making this request. Please try again or contact [email protected]",isNetworkError:!1};if("ok"===r.status)return r.data;throw{...r,isNetworkError:!1}},N=async e=>{let{schoolHostname:r,data:i,forceOverrideAuthToken:t,shouldEnableBatching:s=!0}=e,n=t||(0,p.G0)()||null,a=(0,u.wx)({schoolHostname:r})||null,o=(0,p.$q)()||null;if(!s)return await k({fermionAuthTokenForCodedamn:o,fermionSchoolId:a,data:i,authToken:n});{let e=(0,c.zL)(i);return await c.l3.fetch({batchingUniqueKey:e,fermionSchoolId:a,authToken:n,fermionAuthTokenForCodedamn:o,data:j(i)}).then(e=>e)}},C=async e=>{let{data:r,forceOverrideAuthToken:i,shouldEnableBatching:t=!0,forceOverrideSchoolHostname:s}=e;try{let e;if(null!=s)e=s;else if("undefined"!=typeof document)e=window.location.hostname;else throw Error("Unable to figure out schoolHostname which is required to get config. Please make sure the API functions are called properly on server side");let n=await N({data:r,shouldEnableBatching:t,forceOverrideAuthToken:i,schoolHostname:e});return{status:"ok",data:n}}catch(e){return{status:"error",errorMessage:(0,c._R)(e).errorMessage}}};var _=i(54698);function q(e){return(0,t.jsxs)("div",{className:"flex w-full items-center",children:[(0,t.jsx)("div",{className:"mr-1 w-full flex-grow",children:(0,t.jsx)("div",{className:"h-1 w-full bg-gray-200",children:(0,t.jsx)("div",{className:"h-1 bg-indigo-600",style:{width:"".concat(e.value,"%")}})})}),(0,t.jsx)("div",{className:"w-14 flex-shrink-0",children:(0,t.jsx)("p",{className:"",children:"".concat(Math.round(e.value),"%")})})]})}let E=e=>{let{file:r,markUploaded:i}
1=e,[o,l]=(0,n.useState)("idle"),[d,c]=(0,n.useState)(0);return(0,n.useEffect)(()=>{!async function(){try{l("uploading");let e=await C({data:{rawName:r.name}});if("error"===e.status)return(0,m.A2)(e.errorMessage);let{signedUrl:t,videoId:n}=e.data;await s.A.request({method:"PUT",url:t,data:r,headers:{"Content-Type":"binary/octet-stream"},onUploadProgress:e=>{let r=Math.min(e.loaded/(e.total||1e6)*100,100);c(Math.floor(r))}}),await y({data:{videoId:n}}),l("uploaded"),i()}catch(e){(0,m.A2)((null==e?void 0:e.message)||e||"Something went wrong! Please contact [email protected]"),l("failed")}}()},[]),(0,t.jsxs)("div",{className:"flex w-full items-center justify-center space-x-2 rounded bg-gray-50 p-1 px-4",children:[(0,t.jsx)("p",{className:"w-full max-w-[180px] overflow-hidden truncate overflow-ellipsis whitespace-nowrap",children:r.name}),(0,t.jsx)("div",{className:"flex flex-grow items-center px-8",children:(0,t.jsx)(q,{value:d})}),"uploaded"===o?(0,t.jsx)(a.L7X,{className:"h-5 w-5 shrink-0",color:"#14c514"}):"failed"===o?(0,t.jsx)(a.r2$,{className:"h-5 w-5 shrink-0",color:"red"}):(0,t.jsx)(a.zV$,{className:"h-5 w-5 animate-pulse"})]})};E=(0,n.memo)(E,()=>!0);let U=e=>{var r;let[i,s]=(0,n.useState)(!1),o=(0,n.useState)({count:0})[0],m=(0,n.useRef)(null),[d,c]=(0,n.useState)(0);(0,n.useEffect)(()=>{d!==o.count?e.setSafeToClose(!1):e.setSafeToClose(!0)},[d,o]);let p=(0,n.useRef)(null),u=[];if(i&&p.current&&(null==(r=p.current.files)?void 0:r[0])){for(let e=0;e<p.current.files.length;e++)u.push((0,t.jsx)(E,{markUploaded:()=>c(e=>e+1),file:p.current.files[e]},p.current.files[e].name+"_"+p.current.files[e].size));o.count=p.current.files.length}let h=d===o.count,{refetch:g}=(0,_.K)({});return(0,n.useEffect)(()=>{h&&g()},[h]),(0,t.jsxs)("div",{className:"relative mx-auto flex min-h-[500px] w-full max-w-6xl flex-col items-center justify-center self-stretch",children:[(0,t.jsx)("input",{ref:p,type:"file",disabled:i,className:"absolute left-0 top-0 h-full w-full cursor-pointer opacity-0",onDragLeave:()=>{var e;return null==(e=m.current)?void 0:e.classList.remove("drag-hover")},onDragEnter:()=>{var e;return null==(e=m.current)?void 0:e.classList.add("drag-hover")},multiple:!0,accept:"video/*",id:"multifile-video-upload",onChange:()=>{s(!0),e.setSafeToClose(!1)}}),i?(0,t.jsxs)("div",{className:"mt-4",children:[h?null:(0,t.jsx)(l.A,{className:"mb-8 h-20 w-20 animate-spin"}),(0,t.jsxs)("p",{className:"mx-auto w-fit font-bold",children:[(0,t.jsx)("span",{className:"text-indigo-600",children:"Uploaded:"})," ",d,"/",o.count]}),(0,t.jsx)("h3",{className:"mt-2 text-sm font-medium text-gray-900",children:h?"Upload complete":(0,t.jsxs)(t.Fragment,{children:["Please do not close this page while your videos are being Uploaded",(0,t.jsx)("span",{className:"animate-pulse",children:"..."})]})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{ref:m,className:"pointer-events-none absolute inset-0 h-full w-full scale-75 rounded-3xl border-2 border-dashed border-transparent bg-indigo-700 bg-opacity-0 transition-all duration-150"}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)(a.u8N,{className:"mx-auto h-24 w-24 text-gray-600"}),(0,t.jsx)("h3",{className:"mt-2 text-sm font-medium text-gray-900",children:"Drag & Drop videos to upload"}),(0,t.jsxs)("p",{className:"mx-auto mt-2 max-w-xl text-sm text-gray-500",children:["Once uploaded, depending on your total duration and size,",(0,t.jsx)("span",{className:"inline md:block",children:"It might take a few hours to process your videos and make them available here."})]}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsxs)("button",{type:"button",className:"inline-flex items-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",onClick:()=>{var e;null==(e=document.getElementById("multifile-video-upload"))||e.click()},children:[(0,t.jsx)(a.u8N,{className:"-ml-1 mr-2 h-5 w-5","aria-hidden":"true"}),"Select Video(s) To Upload"]})})]})]}),(0,t.jsx)("ul",{role:"list",className:"mx-auto mt-8 flex w-full max-w-2xl flex-col gap-0.5",children:u.map(e=>(0,t.jsx)("li",{className:"w-full grow overflow-hidden py-1",children:e},e.key))})]})},M=e=>
1{let[r,i]=(0,n.useState)(!0);function s(){if(r)return void e.close();window.confirm("Do you want to close the window and cancel any pending uploads?")&&e.close()}return(0,t.jsxs)(o.j,{isOpen:!0,onClose:s,className:"max-w-5xl bg-white text-black",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-gray-200 bg-white p-4 sm:px-6",children:[(0,t.jsx)("h3",{className:"text-lg font-bold leading-6 text-gray-900 md:text-xl",children:"Upload Videos"}),(0,t.jsx)(a.zhF,{onClick:s,className:"shrink-0 cursor-pointer text-gray-600 hover:text-black"})]}),(0,t.jsx)(U,{setSafeToClose:e=>i(e)}),(0,t.jsx)("style",{global:!0,children:"\n.drag-hover {\n --tw-bg-opacity: 0.2;\n transform: scaleX(.9) scaleY(.9);\n border-color: rgb(99 102 241 / 1);\n}\n "})]})}},24306:(e,r,i)=>{"use strict";i.d(r,{O:()=>g,Q:()=>h});var t=i(50979),s=i(33311),n=i(96342),a=i(75800),o=i(52614),l=i(73984),m=i(25963),d=i(371),c=i(82303);let p=e=>{let{courseSlug:r}=e;return[{name:"Back To Dashboard",icon:d.atu,href:"/instructor/dashboard"},{name:"Details",icon:d.Ecc,href:"/instructor/interactive-course-manager/".concat(r,"/edit")},{name:"Curriculum",icon:d.KXd,href:"/instructor/interactive-course-manager/".concat(r,"/manage")},{name:"Comments",icon:d.$Au,href:"/instructor/interactive-course-manager/".concat(r,"/comments")},{name:"Coupons",icon:d.R1C,href:"/instructor/interactive-course-manager/".concat(r,"/coupons")}]};function u(){return(0,t.jsxs)("svg",{className:"h-7 w-7",viewBox:"0 0 53 58",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,t.jsx)("mask",{id:"mask0_1275_84",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"29",width:"53",height:"29",children:(0,t.jsx)("rect",{y:"29",width:"53",height:"29",fill:"#D9D9D9"})}),(0,t.jsx)("g",{mask:"url(#mask0_1275_84)",children:(0,t.jsx)("path",{d:"M44 42.5L35.0351 37.1669C31.0351 42.6669 25 42 22 39.5C18.5003 36.7534 15.7595 25.3619 22 19C24.9828 15.9591 31.3219 14.982 35.0351 20.5L43.5 15C41.6667 11.8333 35.5351 6.00174 27.5351 6.00174C20.3685 5.88981 6.20348 10.5673 7.03507 30.166C7.83807 49.0909 21.0115 52.5116 27.5351 52.5C35.5351 52.4858 42.1667 45.6666 44 42.5Z",fill:"#EA3F40"})}),(0,t.jsx)("mask",{id:"mask1_1275_84",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"53",height:"29",children:(0,t.jsx)("rect",{width:"53",height:"29",transform:"matrix(1 0 0 -1 0 29)",fill:"#D9D9D9"})}),(0,t.jsx)("g",{mask:"url(#mask1_1275_84)",children:(0,t.jsx)("path",{d:"M44 15.5L35.0351 20.8331C31.0351 15.3331 25 16 22 18.5C18.5003 21.2466 15.7595 32.6381 22 39C24.9828 42.0409 31.3219 43.018 35.0351 37.5L43.5 43C41.6667 46.1667 35.5351 51.9983 27.5351 51.9983C20.3685 52.1102 6.20348 47.4327 7.03507 27.834C7.83807 8.90914 21.0115 5.48845 27.5351 5.5C35.5351 5.51417 42.1667 12.3334 44 15.5Z",fill:"#EA3F40"})})]})}let h=e=>{let{courseSlug:r}=e,{pathname:i}=(0,c.a8)();return(0,t.jsxs)("div",{className:"flex flex-1 h-screen overflow-hidden z-[51] flex-col border-r text-gray-900 dark:text-gray-100 bg-gray-100 dark:bg-gray-800 border-gray-200 dark:border-gray-700 sticky top-0 w-64",children:[(0,t.jsxs)("div",{className:"inline-flex h-14 items-center gap-1 px-4 py-2 text-2xl font-bold justify-start",children:[(0,t.jsx)(a.N_,{safeHrefPathname:"/dashboard",children:u()}),(0,t.jsx)("div",{className:"inline-flex -translate-y-0.5 items-center gap-2",children:(0,t.jsx)(a.N_,{safeHrefPathname:"/dashboard",children:(0,t.jsx)("span",{className:"text-xl font-semibold",children:"codedamn"})})})]}),(0,t.jsx)("nav",{className:"relative z-20 mt-1 flex flex-shrink-0 flex-col overflow-y-auto overflow-x-hidden px-3 py-2",children:(0,t.jsx)("div",{className:"space-y-0.5",children:p({courseSlug:r}).map(e=>{let r=i===e.href,o=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.icon,{className:(0,n.default)("-ml-1 mr-3 flex-shrink-0 group-hover:text-gray-800 dark:group-hover:text-gray-200 h-[18px] w-[18px]",r?"text-gray-800 dark:text-gray-200":"text-gray-600 dark:text-gray-500"),"aria-hidden":"true"}),(0,t.jsx)("span",{className:"group flex items-center gap-1.5 truncate",children:e.name})]}),l=(0,n.default)("group flex items-center rounded-md px-3 py-2 font-medium text-sm justify-start",r?"bg-black/5 text-gray-900 dark:bg-white/5 dark:text-white":(0,n.default)("text-gray-600 hover:text-gray-800 dark:text-gray-400 dark:hover:text-gray-200"));return(0,t.jsx)(s.v,{content:e.name,children:(0,t.jsx)(a.N_,{unsafeHref:e.href,className:l,children:o})},e.href)})})})]})},g=e=>{let{courseSlug:r}=e,{pathname:i}=(0,c.a8)(),[s,d]=(0,m.useState)(!1);return(0,t.jsx)("div",{className:"flex-1 flex flex-col bg-gray-100 border-gray-200",children:(0,t.jsxs)("div",{className:"flex-1 flex flex-col py-2 overflow-y-auto",children:[(0,t.jsxs)("div",{className:"flex items-center flex-shrink-0 px-2 font-[300] text-2xl tracking-tighter",children:[(0,t.jsx)("div",{className:"px-2 cursor-pointer flex-shrink-0",onClick:()=>d(e=>!e),children:s?(0,t.jsx)(o.WQq,{}):(0,t.jsx)(l.NYi,{})}),(0,t.jsxs)("div",{className:"inline-flex h-14 items-center gap-1 px-4 py-2 text-2xl font-bold justify-start",children:[(0,t.jsx)(a.N_,{safeHrefPathname:"/dashboard",children:u()}),(0,t.jsx)("div",{className:"inline-flex -translate-y-0.5 items-center gap-2",children:(0,t.jsx)(a.N_,{safeHrefPathname:"/dashboard",children:(0,t.jsx)("span",{className:"text-xl font-semibold",children:"codedamn"})})})]})]}),(0,t.jsx)("nav",{className:(0,n.default)("mt-3 flex-1 px-2 bg-gray-100 space-y-1",s?"block":"hidden"),"aria-label":"Sidebar",children:p({courseSlug:r}).map(e=>{let r=e.href===i;return(0,t.jsxs)(a.N_,{unsafeHref:e.href,className:(0,n.default)(r?"bg-gray-200":"","group hover:bg-gray-200 flex items-center px-2 py-2 text-sm rounded-md"),children:[(0,t.jsx)(e.icon,{className:(0,n.default)(r?"text-gray-800":"text-gray-800 group-hover:text-gray-900","mr-3 flex-shrink-0 h-[18px] w-[18px]"),"aria-hidden":"true"}),(0,t.jsx)("span",{className:"flex-1",children:e.name})]},e.name)})})]})})}},33311:(e,r,i)=>{"use strict";i.d(r,{v:()=>n});var t=i(50979),s=i(74467);i(81003);let n=e=>(0,t.jsx)(s.Ay,{zIndex:0x5f5e0ff,...e})},34838:(e,r,i)=>{"use strict";i.d(r,{A:()=>a});var t=i(25963),s=i(82303);function n(e){let{template:r,pathname:i}=e,t=r.split("/").filter(e=>e.trim()),s=i.split("/").filter(e=>e.trim());if(s.length!==t.length)return{};let n={};for(let e=0;e<s.length;e++){let r=s[e],i=t[e],a=i.match(/^\[(.*?)\]$/);if(a)n[a[1]]=r;else if(r!==i)return{}}return n}let a=(e,r)=>{let{pathname:i}=(0,s.a8)(),[a,o]=(0,t.useState)(n({template:e,pathname:i}));return(0,t.useEffect)(()=>{o(n({template:e,pathname:i}))},[i,e]),null==r?a:r(a)}},36607:(e,r,i)=>{"use strict";i.d(r,{T:()=>x});var t=i(91020),s=i(33092),n=i(90815),a=i(70875),o=i(65091);let l="instructor",m="get-course-details",d="".concat(l,"-").concat(m),c=e=>({context:{namespace:l,functionName:m},data:e}),p=async e=>{let r,{fermionAuthTokenForCodedamn:i,authToken:t,data:a,fermionSchoolId:o}=e;try{r=await s.Ay.request({method:"POST",baseURL:(0,n.Pb)(),data:{fermionSchoolId:o,authToken:t,fermionAuthTokenForCodedamn:i,data:[c(a)]}}).then(e=>e.data).then(e=>{var r;return(null==(r=e.at(0))?void 0:r.output)||null})}catch(e){throw{errorMessage:(null==e?void 0:e.message)||"Something went wrong while making this request. Please try again or c
1ontact [email protected]",isNetworkError:!0}}if(!r)throw{errorMessage:"Something went wrong while making this request. Please try again or contact [email protected]",isNetworkError:!1};if("ok"===r.status)return r.data;throw{...r,isNetworkError:!1}},u=async e=>{let{schoolHostname:r,data:i,forceOverrideAuthToken:t,shouldEnableBatching:s=!0}=e,l=t||(0,a.G0)()||null,m=(0,o.wx)({schoolHostname:r})||null,d=(0,a.$q)()||null;if(!s)return await p({fermionAuthTokenForCodedamn:d,fermionSchoolId:m,data:i,authToken:l});{let e=(0,n.zL)(i);return await n.l3.fetch({batchingUniqueKey:e,fermionSchoolId:m,authToken:l,fermionAuthTokenForCodedamn:d,data:c(i)}).then(e=>e)}};var h=i(9852),g=i(25963);let x=(e,r)=>{let i=(0,h.hZ)(),s=(0,g.useMemo)(()=>new URL(i.requestUrl).hostname,[i.requestUrl]);return(0,t.I)({queryKey:[d,c(e)],queryFn:()=>u({data:e,schoolHostname:s}),...null!=r?r:{}})}},38850:()=>{},42527:(e,r,i)=>{"use strict";i.d(r,{U:()=>m});var t=i(50979),s=i(74229),n=i(57696),a=i(371),o=i(96342),l=i(29841);function m(e){let{title:r,message:i,shouldRenderInDarkMode:m,customButtonProps:d,customIconJsx:c}=e;return new Promise(e=>{let p=document.createElement("div");document.body.appendChild(p);let u=s.createRoot(p);u.render((0,t.jsxs)(n.j,{isOpen:!0,onClose:()=>{e("closed"),u.unmount()},className:(0,o.default)("m-4 max-w-sm px-6 py-4 md:m-auto md:max-w-lg",m?"dark bg-gray-900":"bg-white"),children:[(0,t.jsx)("div",{className:"absolute right-0 top-0 hidden pr-4 pt-4 sm:block",children:(0,t.jsxs)("button",{tabIndex:-1,type:"button",className:"rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:bg-gray-900",onClick:()=>{e("closed"),u.unmount()},children:[(0,t.jsx)("span",{className:"sr-only",children:"Close"}),(0,t.jsx)(a.IeJ,{className:"h-6 w-6","aria-hidden":"true"})]})}),(0,t.jsxs)("div",{className:"sm:flex sm:items-start",children:[c||(0,t.jsx)("div",{className:"mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full sm:mx-0 sm:h-10 sm:w-10",children:(0,t.jsx)(a.qVV,{className:"h-8 w-8 text-primary-600 dark:text-primary-100","aria-hidden":"true"})}),(0,t.jsxs)("div",{className:"mt-3 text-center sm:ml-4 sm:mt-0 sm:text-left",children:[(0,t.jsx)("h3",{className:"text-lg font-medium leading-6 text-gray-900 dark:text-white",children:r}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)("p",{className:"text-sm text-gray-500",children:i})})]})]}),(0,t.jsxs)("div",{className:"mt-5 flex flex-col-reverse justify-end gap-3 sm:mt-4 sm:flex-row",children:[(0,t.jsx)(l.$,{tabIndex:(null==d?void 0:d.autoFocusOn)==="cancel"?1:2,variant:(null==d?void 0:d.isProceedButtonDestructive)?"default":"outline",onClick:()=>{e("no"),u.unmount()},"data-testid":"material-cancel",className:(0,o.default)("w-full justify-center sm:w-fit",d&&!d.cancelBtnLabel?"hidden":""),children:(null==d?void 0:d.cancelBtnLabel)||"Cancel"}),(0,t.jsx)(l.$,{tabIndex:(null==d?void 0:d.autoFocusOn)==="cancel"?2:1,variant:(null==d?void 0:d.isProceedButtonDestructive)?"destructive":"default",onClick:()=>{e("yes"),u.unmount()},"data-testid":"material-ok",className:"w-full justify-center sm:w-fit",children:(null==d?void 0:d.proceedBtnLabel)||"Proceed"})]})]}))})}},49609:(e,r,i)=>{var t={"./prism-abap.min":[40791,40791],"./prism-abnf.min":[31642,31642],"./prism-actionscript.min":[42684,42684],"./prism-ada.min":[39407,39407],"./prism-agda.min":[80158,80158],"./prism-al.min":[32452,32452],"./prism-antlr4.min":[26244,26244],"./prism-apacheconf.min":[61113,61113],"./prism-apex.min":[34069,34069],"./prism-apl.min":[21308,21308],"./prism-applescript.min":[15356,15356],"./prism-aql.min":[46565,46565],"./prism-arduino.min":[77167,77167],"./prism-arff.min":[61282,61282],"./prism-armasm.min":[16596,16596],"./prism-arturo.min":[83090,83090],"./prism-asciidoc.min":[50874,50874],"./prism-asm6502.min":[8003,8003],"./prism-asmatmel.min":[22853,22853],"./prism-aspnet.min":[94286,94286],"./prism-autohotkey.min":[78588,78588],"./prism-autoit.min":[35631,35631],"./prism-avisynth.min":[6013,6013],"./prism-avro-idl.min":[39099,39099],"./prism-awk.min":[45210,45210],"./prism-bash.min":[52891,52891],"./prism-basic.min":[73897,73897],"./prism-batch.min":[26543,26543],"./prism-bbcode.min":[27440,27440],"./prism-bbj.min":[12323,67561],"./prism-bicep.min":[64692,64692],"./prism-birb.min":[70884,70884],"./prism-bison.min":[55620,55620],"./prism-bnf.min":[80177,80177],"./prism-bqn.min":[10658,10658],"./prism-brainfuck.min":[89552,89552],"./prism-brightscript.min":[72478,72478],"./prism-bro.min":[71338,71338],"./prism-bsl.min":[37790,37790],"./prism-c.min":[72950,72950],"./prism-cfscript.min":[32499,32499],"./prism-chaiscript.min":[53747,53747],"./prism-cil.min":[74755,74755],"./prism-cilkc.min":[81073,81073],"./prism-cilkcpp.min":[2217,2217],"./prism-clike.min":[43325,43325],"./prism-clojure.min":[4343,4343],"./prism-cmake.min":[63580,63580],"./prism-cobol.min":[39664,39664],"./prism-coffeescript.min":[4618,4618],"./prism-concurnas.min":[66731,66731],"./prism-cooklang.min":[55381,55381],"./prism-coq.min":[78918,78918],"./prism-core.min":[3290,3290],"./prism-cpp.min":[92486,92486],"./prism-crystal.min":[15405,15405],"./prism-csharp.min":[66102,66102],"./prism-cshtml.min":[6362,6362],"./prism-csp.min":[58589,58589],"./prism-css-extras.min":[46188,46188],"./prism-css.min":[15684,15684],"./prism-csv.min":[33211,33211],"./prism-cue.min":[81380,81380],"./prism-cypher.min":[11982,11982],"./prism-d.min":[24055,24055],"./prism-dart.min":[8028,8028],"./prism-dataweave.min":[13929,13929],"./prism-dax.min":[24766,24766],"./prism-dhall.min":[72172,72172],"./prism-diff.min":[62478,62478],"./prism-django.min":[49434,49434],"./prism-dns-zone-file.min":[21198,21198],"./prism-docker.min":[8185,8185],"./prism-dot.min":[38436,38436],"./prism-ebnf.min":[94926,94926],"./prism-editorconfig.min":[12322,12322],"./prism-eiffel.min":[30862,30862],"./prism-ejs.min":[76835,76835],"./prism-elixir.min":[69598,69598],"./prism-elm.min":[65855,65855],"./prism-erb.min":[53160,53160],"./prism-erlang.min":[20382,20382],"./prism-etlua.min":[63342,63342],"./prism-excel-formula.min":[48803,48803],"./prism-factor.min":[28626,28626],"./prism-false.min":[70892,70892],"./prism-firestore-security-rules.min":[68745,68745],"./prism-flow.min":[95185,95185],"./prism-fortran.min":[52457,52457],"./prism-fsharp.min":[46167,46167],"./prism-ftl.min":[51477,51477],"./prism-gap.min":[69131,69131],"./prism-gcode.min":[71087,71087],"./prism-gdscript.min":[47937,47937
1],"./prism-gedcom.min":[54408,54408],"./prism-gettext.min":[19188,19188],"./prism-gherkin.min":[39033,39033],"./prism-git.min":[55007,55007],"./prism-glsl.min":[39125,39125],"./prism-gml.min":[5907,5907],"./prism-gn.min":[51020,51020],"./prism-go-module.min":[29482,29482],"./prism-go.min":[70655,70655],"./prism-gradle.min":[20762,20762],"./prism-graphql.min":[7678,7678],"./prism-groovy.min":[80331,80331],"./prism-haml.min":[17415,17415],"./prism-handlebars.min":[72009,72009],"./prism-haskell.min":[91411,91411],"./prism-haxe.min":[63301,63301],"./prism-hcl.min":[43700,43700],"./prism-hlsl.min":[40874,40874],"./prism-hoon.min":[22117,22117],"./prism-hpkp.min":[27818,27818],"./prism-hsts.min":[59381,59381],"./prism-http.min":[46977,46977],"./prism-ichigojam.min":[17756,17756],"./prism-icon.min":[31124,31124],"./prism-icu-message-format.min":[59210,59210],"./prism-idris.min":[28526,28526],"./prism-iecst.min":[63779,63779],"./prism-ignore.min":[23911,23911],"./prism-inform7.min":[65753,65753],"./prism-ini.min":[35121,35121],"./prism-io.min":[37093,37093],"./prism-j.min":[69065,69065],"./prism-java.min":[50849,50849],"./prism-javadoc.min":[73457,73457],"./prism-javadoclike.min":[73714,73714],"./prism-javascript.min":[42462,42462],"./prism-javastacktrace.min":[71784,71784],"./prism-jexl.min":[26256,26256],"./prism-jolie.min":[46500,46500],"./prism-jq.min":[70528,70528],"./prism-js-extras.min":[86570,86570],"./prism-js-templates.min":[78300,78300],"./prism-jsdoc.min":[40304,40304],"./prism-json.min":[73607,73607],"./prism-json5.min":[50758,50758],"./prism-jsonp.min":[67405,67405],"./prism-jsstacktrace.min":[77491,77491],"./prism-jsx.min":[48930,48930],"./prism-julia.min":[54897,77278],"./prism-keepalived.min":[42851,42851],"./prism-keyman.min":[57020,57020],"./prism-kotlin.min":[24216,24216],"./prism-kumir.min":[37743,37743],"./prism-kusto.min":[85819,85819],"./prism-latex.min":[36271,36271],"./prism-latte.min":[32117,32117],"./prism-less.min":[80108,80108],"./prism-lilypond.min":[63006,63006],"./prism-linker-script.min":[46614,46614],"./prism-liquid.min":[489,489],"./prism-lisp.min":[1209,1209],"./prism-livescript.min":[81196,81196],"./prism-llvm.min":[29752,29752],"./prism-log.min":[5861,5861],"./prism-lolcode.min":[32561,32561],"./prism-lua.min":[65941,65941],"./prism-magma.min":[60618,60618],"./prism-makefile.min":[68533,68533],"./prism-markdown.min":[14200,14200],"./prism-markup-templating.min":[13977,13977],"./prism-markup.min":[185,185],"./prism-mata.min":[84912,84912],"./prism-matlab.min":[48408,48408],"./prism-maxscript.min":[5762,5762],"./prism-mel.min":[83781,83781],"./prism-mermaid.min":[35716,35716],"./prism-metafont.min":[78561,78561],"./prism-mizar.min":[21328,21328],"./prism-mongodb.min":[61909,61909],"./prism-monkey.min":[73756,73756],"./prism-moonscript.min":[14759,14759],"./prism-n1ql.min":[40073,40073],"./prism-n4js.min":[83792,83792],"./prism-nand2tetris-hdl.min":[68628,68628],"./prism-naniscript.min":[58642,58642],"./prism-nasm.min":[54888,54888],"./prism-neon.min":[9025,9025],"./prism-nevod.min":[98369,98369],"./prism-nginx.min":[28779,28779],"./prism-nim.min":[90683,90683],"./prism-nix.min":[65268,65268],"./prism-nsis.min":[58846,58846],"./prism-objectivec.min":[80533,80533],"./prism-ocaml.min":[96311,96311],"./prism-odin.min":[82533,82533],"./prism-opencl.min":[54722,54722],"./prism-openqasm.min":[22459,22459],"./prism-oz.min":[13688,13688],"./prism-parigp.min":[49216,49216],"./prism-parser.min":[29358,29358],"./prism-pascal.min":[25281,25281],"./prism-pascaligo.min":[56326,56326],"./prism-pcaxis.min":[56209,56209],"./prism-peoplecode.min":[4535,4535],"./prism-perl.min":[93900,93900],"./prism-php-extras.min":[11625,11625],"./prism-php.min":[11723,11723],"./prism-phpdoc.min":[82447,82447],"./prism-plant-uml.min":[13357,13357],"./prism-plsql.min":[48615,48615],"./prism-powerquery.min":[61822,61822],"./prism-powershell.min":[15884,15884],"./prism-processing.min":[93106,93106],"./prism-prolog.min":[28030,28030],"./prism-promql.min":[45670,45670],"./prism-properties.min":[6664,6664],"./prism-protobuf.min":[88866,88866],"./prism-psl.min":[14940,14940],"./prism-pug.min":[14175,14175],"./prism-puppet.min":[26475,26475],"./prism-pure.min":[38183,38183],"./prism-purebasic.min":[91447,91447],"./prism-purescript.min":[87648,87648],"./prism-python.min":[83747,83747],"./prism-q.min":[91176,91176],"./prism-qml.min":[83561,83561],"./prism-qore.min":[22456,22456],"./prism-qsharp.min":[1660,1660],"./prism-r.min":[57841,57841],"./prism-racket.min":[87063,87063],"./prism-reason.min":[33149,33149],"./prism-regex.min":[77004,77004],"./prism-rego.min":[18474,18474],"./prism-renpy.min":[68097,68097],"./prism-rescript.min":[6871,6871],"./prism-rest.min":[73955,73955],"./prism-rip.min":[84920,84920],"./prism-roboconf.min":[23679,23679],"./prism-robotframework.min":[69573,69573],"./prism-ruby.min":[30105,30105],"./prism-rust.min":[35731,35731],"./prism-sas.min":[80986,80986],"./prism-sass.min":[88835,88835],"./prism-scala.min":[4489,4489],"./prism-scheme.min":[49190,49190],"./prism-scss.min":[52077,52077],"./prism-shell-session.min":[66628,66628],"./prism-smali.min":[82775,82775],"./prism-smalltalk.min":[33598,33598],"./prism-smarty.min":[12293,12293],"./prism-sml.min":[88039,88039],"./prism-solidity.min":[73140,73140],"./prism-solution-file.min":[48299,48299],"./prism-soy.min":[9758,9758],"./prism-sparql.min":[79860,79860],"./prism-splunk-spl.min":[61234,61234],"./prism-sqf.min":[38185,38185],"./prism-sql.min":[81147,81147],"./prism-squirrel.min":[48186,48186],"./prism-stan.min":[57777,57777],"./prism-stata.min":[74022,74022],"./prism-stylus.min":[37259,37259],"./prism-supercollider.min":[36196,36196],"./prism-swift.min":[51404,51404],"./prism-systemd.min":[34684,34684],"./prism-t4-cs.min":[93714,93714],"./prism-t4-templating.min":[40913,40913],"./prism-t4-vb.min":[88380,88380],"./prism-tap.min":[66534,66534],"./prism-tcl.min":[8672,8672],"./prism-textile.min":[44366,44366],"./prism-toml.min":[15681,15681],"./prism-tremor.min":[68872,68872],"./prism-tsx.min":[38444,38444],"./prism-tt2.min":[54465,54465],"./prism-turtle.min":[44827,44827],"./prism-twig.min":[56780,56780],"./prism-typescript.min":[85126,85126],"./prism-typoscript.min":[24620,24620],"./prism-unrealscript.min":[61381,61381],"./prism-uorazor.min":[36307,36307],"./prism-uri.min":[56937,56937],"./prism-v.min":[50189,50189],"./prism-vala.min":[40307,40307],"./prism-vbnet.min":[25664,25664],"./prism-velocity.min":[34038,34038],"./prism-verilog.min":[17369,17369],"./prism-vhdl.min":[17839,17839],"./prism-vim.min":[7235,7235],"./prism-visual-basic.min":[66718,66718],"./prism-warpscript.min":[26764,26764],"./prism-wasm.min":[3705,3705],"./prism-web-idl.min":[74059,74059],"./prism-wgsl.min":[53616,53616],"./prism-wiki.min":[65429,65429],"./prism-wolfram.min":[69155,69155],"./prism-wren.min":[52507,52507],"./prism-xeora.min":[58250,58250],"./prism-xml-doc.min":[56301,56301],"./prism-xojo.min":[48271,48271],"./prism-xquery.min":[11321,11321],"./prism-yaml.min":[24250,24250],"./prism-yang.min":[55752,5
15752],"./prism-zig.min":[59557,59557]};function s(e){if(!i.o(t,e))return Promise.resolve().then(()=>{var r=Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r});var r=t[e],s=r[0];return i.e(r[1]).then(()=>i.t(s,23))}s.keys=()=>Object.keys(t),s.id=49609,e.exports=s},54698:(e,r,i)=>{"use strict";i.d(r,{K:()=>x});var t=i(91020),s=i(33092),n=i(90815),a=i(70875),o=i(65091);let l="instructor",m="get-video-library",d="".concat(l,"-").concat(m),c=e=>({context:{namespace:l,functionName:m},data:e}),p=async e=>{let r,{fermionAuthTokenForCodedamn:i,authToken:t,data:a,fermionSchoolId:o}=e;try{r=await s.Ay.request({method:"POST",baseURL:(0,n.Pb)(),data:{fermionSchoolId:o,authToken:t,fermionAuthTokenForCodedamn:i,data:[c(a)]}}).then(e=>e.data).then(e=>{var r;return(null==(r=e.at(0))?void 0:r.output)||null})}catch(e){throw{errorMessage:(null==e?void 0:e.message)||"Something went wrong while making this request. Please try again or contact [email protected]",isNetworkError:!0}}if(!r)throw{errorMessage:"Something went wrong while making this request. Please try again or contact [email protected]",isNetworkError:!1};if("ok"===r.status)return r.data;throw{...r,isNetworkError:!1}},u=async e=>{let{schoolHostname:r,data:i,forceOverrideAuthToken:t,shouldEnableBatching:s=!0}=e,l=t||(0,a.G0)()||null,m=(0,o.wx)({schoolHostname:r})||null,d=(0,a.$q)()||null;if(!s)return await p({fermionAuthTokenForCodedamn:d,fermionSchoolId:m,data:i,authToken:l});{let e=(0,n.zL)(i);return await n.l3.fetch({batchingUniqueKey:e,fermionSchoolId:m,authToken:l,fermionAuthTokenForCodedamn:d,data:c(i)}).then(e=>e)}};var h=i(9852),g=i(25963);let x=(e,r)=>{let i=(0,h.hZ)(),s=(0,g.useMemo)(()=>new URL(i.requestUrl).hostname,[i.requestUrl]);return(0,t.I)({queryKey:[d,c(e)],queryFn:()=>u({data:e,schoolHostname:s}),...null!=r?r:{}})}},55677:(e,r,i)=>{"use strict";i.d(r,{A:()=>n});var t=i(8991),s=i.n(t);s().manual=!0;let n=s()},70983:(e,r,i)=>{"use strict";i.r(r),i.d(r,{MarkdownEditor:()=>N});var t=i(50979),s=i(18367),n=i.n(s),a=i(25963),o=i(34987),l=i(62471),m=i(22528),d=i(32557),c=i(55677);i(38850),i(77484);var p=i(96342),u=i(33092),h=i(90815),g=i(70875),x=i(65091);let f="service",w="get-presigned-url-for-uploading-instructor-markdown-editor-files";"".concat(f,"-").concat(w);let y=e=>({context:{namespace:f,functionName:w},data:e}),v=async e=>{let r,{fermionAuthTokenForCodedamn:i,authToken:t,data:s,fermionSchoolId:n}=e;try{r=await u.Ay.request({method:"POST",baseURL:(0,h.Pb)(),data:{fermionSchoolId:n,authToken:t,fermionAuthTokenForCodedamn:i,data:[y(s)]}}).then(e=>e.data).then(e=>{var r;return(null==(r=e.at(0))?void 0:r.output)||null})}catch(e){throw{errorMessage:(null==e?void 0:e.message)||"Something went wrong while making this request. Please try again or contact [email protected]",isNetworkError:!0}}if(!r)throw{errorMessage:"Something went wrong while making this request. Please try again or contact [email protected]",isNetworkError:!1};if("ok"===r.status)return r.data;throw{...r,isNetworkError:!1}},b=async e=>{let{schoolHostname:r,data:i,forceOverrideAuthToken:t,shouldEnableBatching:s=!0}=e,n=t||(0,g.G0)()||null,a=(0,x.wx)({schoolHostname:r})||null,o=(0,g.$q)()||null;if(!s)return await v({fermionAuthTokenForCodedamn:o,fermionSchoolId:a,data:i,authToken:n});{let e=(0,h.zL)(i);return await h.l3.fetch({batchingUniqueKey:e,fermionSchoolId:a,authToken:n,fermionAuthTokenForCodedamn:o,data:y(i)}).then(e=>e)}},j=async e=>{let{data:r,forceOverrideAuthToken:i,shouldEnableBatching:t=!0,forceOverrideSchoolHostname:s}=e;try{let e;if(null!=s)e=s;else if("undefined"!=typeof document)e=window.location.hostname;else throw Error("Unable to figure out schoolHostname which is required to get config. Please make sure the API functions are called properly on server side");let n=await b({data:r,shouldEnableBatching:t,forceOverrideAuthToken:i,schoolHostname:e});return{status:"ok",data:n}}catch(e){return{status:"error",errorMessage:(0,h._R)(e).errorMessage}}},k=n()(()=>Promise.all([i.e(50463),i.e(46549),i.e(65454)]).then(i.bind(i,46549)),{loadableGenerated:{webpack:()=>[46549]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"mb-4 w-full rounded-md border border-gray-100 dark:border-gray-800",children:(0,t.jsxs)("div",{className:"flex animate-pulse flex-col gap-2",children:[(0,t.jsx)("div",{className:"flex-1 space-y-6",children:(0,t.jsx)("div",{className:"h-10 rounded bg-gray-100 dark:bg-gray-900"})}),(0,t.jsx)("div",{className:"aspect-5 h-auto w-full rounded bg-gray-100 dark:bg-gray-900"})]})})}),N=e=>{let r=(0,a.useId)();(0,a.useEffect)(()=>{(async function(){for await(let e of["jsx","apacheconf","c","diff","java","javascript","kotlin","python","solidity","typescript","yaml"])await i(49609)("./prism-".concat(e,".min"))})().catch(console.error)},[]);let s=(0,a.useMemo)(()=>{let r={spellChecker:!1,sideBySideFullscreen:!1,placeholder:e.placeholder||"",hideIcons:["side-by-side"],showIcons:["preview"],async
1imageUploadFunction(e,r,i){let t=await j({data:{}});if("error"===t.status)(0,d.A2)(t.errorMessage);else try{await fetch(t.data.presignedUrl,{method:"PUT",body:e,headers:{"Content-Type":e.type}}),r(t.data.regularUrl)}catch(e){console.error("Error uploading",e),i("Failed to upload file")}},previewRender:r=>o.renderToString((0,t.jsx)("div",{className:(0,p.default)("prose !max-w-none","dark"===e.mode&&"prose-invert"),children:(0,t.jsx)(l.o,{remarkPlugins:[m.A],components:{code(e){let{className:r,children:i,...s}=e;return/language-(\w+)/.exec(r||"")?(0,t.jsx)("code",{...s,className:r,children:i}):(0,t.jsx)("code",{...s,className:"language-html "+(r||""),children:i})},...e.disallowHeadings?{h1:"p",h2:"p",h3:"p",h4:"p"}:{}},children:r})}))};return e.hideToolbar&&(r.toolbar=!1),e.maxHeight&&(r.maxHeight=e.maxHeight),e.uploadImage&&(r.uploadImage=!0),r},[e.mode,e.disallowHeadings,e.hideToolbar,e.maxHeight,e.placeholder,e.uploadImage]);return(0,t.jsx)("div",{className:(0,p.default)("[&_div.editor-preview_pre]:!my-[0.5em] [&_div.editor-preview_pre]:!whitespace-pre [&_div.editor-preview_pre]:!bg-[#2d2d2d] [&_div.editor-preview_pre]:!p-[1em] [&_div.editor-preview_pre]:!text-[1em] [&_div.editor-preview_pre]:!leading-snug","[&_div.editor-preview_code]:!bg-[#2d2d2d] [&_div.editor-preview_code]:!px-[0.25rem] [&_div.editor-preview_code]:!py-[0.1rem] [&_div.editor-preview_code]:!font-semibold",e.focusEnabled?"rounded-md focus-within:ring-2 focus-within:ring-indigo-600":"","dark"===e.mode?"dark":""),id:r,children:(0,t.jsx)(k,{className:"dark:[&_div.CodeMirror-cursor]:border-l dark:[&_div.CodeMirror-cursor]:border-white dark:[&_div.CodeMirror-selected]:!bg-gray-600/30 dark:[&_div.EasyMDEContainer_div.CodeMirror-wrap]:!bg-gray-900 dark:[&_div.EasyMDEContainer_div.CodeMirror-wrap]:!text-white dark:[&_div.EasyMDEContainer_div.CodeMirror-wrap]:![caret-color:white] [&_div.EasyMDEContainer_div.CodeMirror-wrap_div.CodeMirror-vscrollbar]:!hidden dark:[&_div.EasyMDEContainer_div.CodeMirror]:!border-gray-600 dark:[&_div.EasyMDEContainer_div.editor-preview-side]:!border-gray-600 dark:[&_div.EasyMDEContainer_div.editor-preview-side]:!bg-gray-900 [&_div.EasyMDEContainer_div.editor-toolbar_button.active]:!bg-transparent hover:[&_div.EasyMDEContainer_div.editor-toolbar_button]:!bg-transparent active:[&_div.EasyMDEContainer_div.editor-toolbar_button]:!bg-transparent dark:[&_div.EasyMDEContainer_div.editor-toolbar_i]:!border-gray-600 dark:[&_div.editor-toolbar.fullscreen]:!bg-gray-900 dark:[&_div.editor-toolbar]:!border-gray-600",value:e.value,options:s,onChange:i=>{let t=document.getElementById(r);t&&setTimeout(()=>{c.A.highlightAllUnder(t)},0),e.onChange(i)}})})}},83798:(e,r,i)=>{"use strict";i.d(r,{A:()=>p});var t=i(50979),s=i(51355),n=i.n(s),a=i(25963),o=i(20365),l=i(9852),m=i(70875),d=i(65091);let c=()=>{try{if(m.X3)return(0,l.hZ)();return(0,d.d)({hostname:window.location.hostname})}catch(e){return console.error("Error getting context",e),null}},p=e=>{let r=c(),[i,s]=(0,a.useState)(()=>null==r?e.src:(0,o.Z)({src:e.src,width:(Number(e.width)||1920)*(e.width>=720?1:2),height:(Number(e.height)||1920)*(e.width>=720?1:2),quality:Number(e.quality)||o.I,strictDimensions:e.strictDimensions,outputFormat:e.outputFormat,realHostname:new URL(r.realUrl).hostname}));(0,a.useEffect)(()=>{"string"==typeof e.src&&(null==r?void 0:r.realUrl)!=null&&s((0,o.Z)({src:e.src,width:(Number(e.width)||1920)*(e.width>=720?1:2),height:(Number(e.height)||1920)*(e.width>=720?1:2),quality:Number(e.quality)||o.I,strictDimensions:e.strictDimensions,outputFormat:e.outputFormat,realHostname:new URL(r.realUrl).hostname}))},[null==r?void 0:r.realUrl,e.height,e.outputFormat,e.quality,e.src,e.strictDimensions,e.width]);let{strictDimensions:l,...m}=e;return(0,t.jsx)(n(),{alt:m.alt||"image alt text",loader:e=>{let{src:r}=e;return r},unoptimized:!0,...m,onError:()=>{s(e.src)},src:i})}},94285:(e,r,i)=>{"use strict";i.d(r,{A:()=>s});var t=i(50979);let s=e=>{let{mode:r,className:i}=e;return(0,t.jsx)("div",{className:"flex items-center justify-center","data-testid":"explorer-loading-animation",children:(0,t.jsxs)("svg",{className:i||"-ml-1 mr-3 h-12 w-12 animate-spin ".concat("dark"===r?"text-white":"text-gray-900"),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,t.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,t.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})}}}]);
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.