1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1355],{69091:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/courses/[slug]",function(){return s(15588)}])},60601:function(e,t,s){"use strict";var n=s(85893),a=s(10473),o=s(78917),r=s(1053),i=s(10997),l=s(18986),u=s(55221),c=s(25594),d=s(72),m=s(12186),b=s(45697),_=s.n(b),p=s(67294),h=s(91649),C=s.n(h);let g=e=>{let{children:t,preview:s,meta:m,contact:b,social:_,events:h,algolia:g,breadcrumbs:x,schema:v,generalMeta:f,header:j}=e,w=x?[...x]:[];w.unshift({title:"Home",href:"/"});let y=(0,p.useRef)(null);return(0,d.Z)(y),(0,n.jsxs)("div",{className:C().modernLayoutWrapper,children:[(0,n.jsxs)("div",{ref:y,className:C().stickynav,children:[(0,n.jsx)(l.Z,{events:h,algolia:g}),(0,n.jsx)(u.Z,{}),(0,n.jsx)(a.Z,{schema:v,meta:m,contact:b,social:_})]}),(0,n.jsxs)("main",{id:"main",className:"flex-1",children:[(0,n.jsx)(o.Z,{preview:s}),(0,n.jsx)(()=>j(),{}),t]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(c.Z,{show:!!(null==f?void 0:f.subscribeNewsletter)}),(0,n.jsx)(r.Z,{}),(0,n.jsx)(i.Z,{meta:m,contact:b,social:_,breadcrumbs:w})]})]})};g.propTypes={...m.h6,children:_().any.isRequired,preview:_().bool,breadcrumbs:_().arrayOf(_().shape({title:_().string,url:_().string})),schema:_().arrayOf(_().object),generalMeta:_().shape({subscribeNewsletter:_().bool}),header:_().func},g.defaultProps={...m.BQ,children:null,preview:!1,breadcrumbs:null,
1schema:null,header:null},t.Z=g},62514:function(e,t,s){"use strict";s.d(t,{Z:function(){return _}});var n=s(85893),a=s(45031),o=s(94184),r=s.n(o),i=s(45697),l=s.n(i),u=s(67294),c=s(19723),d=s(73435),m=s.n(d);let b=e=>{let{tabs:t,tabIndex:s,onTabSelect:o,buttonsClassName:i,hasNavHeader:l}=e,d=(0,a.kS)("small"),b=(0,a.kS)("tablet"),_=(0,a.kS)("desktop");(0,c.xb)();let[p,h]=(0,u.useState)(0),C=t&&t.filter(e=>e.title&&e.content?e:"");return(0,u.useEffect)(()=>{if(l){let e=document.querySelector("#navigation-header");e&&h("".concat(e.clientHeight,"px"))}},[d,b,_]),(0,n.jsx)(n.Fragment,{children:C&&C.length&&(0,n.jsxs)(c.mQ,{className:m().tabbedContent,selectedTabClassName:m().tabActive,defaultIndex:s,onSelect:o,children:[(0,n.jsxs)(c.td,{className:r()(m().buttons,i),style:{top:p},children:[(0,n.jsx)("div",{className:m().tabLine}),C.map(e=>(0,n.jsx)(c.OK,{className:m().button,disabled:e.isDisabled,children:e.title},e.title))]}),C.map(e=>(0,n.jsx)(c.x4,{className:m().panel,children:e.content},e.title))]})})};b.propTypes={tabs:l().array.isRequired,tabIndex:l().number,onTabSelect:l().func,buttonsClassName:l().string,hasNavHeader:l().bool},b.defaultProps={tabIndex:0,onTabSelect:()=>null,buttonsClassName:"",hasNavHeader:!1};var _=b},15588:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSP:function(){return Q},default:function(){return K},getCourseData:function(){return z}});var n=s(85893),a=s(60601),o=s(39860),r=s(62514),i=s(63541),l=s(56620),u=s(90926),c=s(28071),d=s(81456),m=s(78246),b=s(10102),_=s(94184),p=s.n(_),h=s(5152),C=s.n(h),g=s(11163),x=s(45697),v=s.n(x),f=s(67294),j=s(42208),w=s.n(j);let y=C()(()=>Promise.resolve().then(s.bind(s,25219)),{loadableGenerated:{webpack:()=>[25219]}}),T=C()(()=>s.e(9673).then(s.bind(s,69673)),{loadableGenerated:{webpack:()=>[69673]}}),N=C()(()=>s.e(3822).then(s.bind(s,23822)),{loadableGenerated:{webpack:()=>[23822]}}),S=C()(()=>s.e(1326).then(s.bind(s,21326)),{loadableGenerated:{webpack:()=>[21326]}}),L=e=>{let{className:t,titleTag:s,content:a,course:o,isEducator:r,isCourseOwner:i}=e,_=(0,g.useRouter)(),{toast:h}=(0,c.V)(),{setLaunchPopup:C,setFileAction:x,setActiveContent:v,setSelectedId:j,setCourseForm:L,setCourseFormError:H,setSectionForm:k,setSectionFormError:I,setSubmitted:A,setSelectedCount:D,setCourseTemplates:Z,resetAllStates:P}=(0,f.useContext)(m.Z),E=(0,f.useRef)(),[G,M]=(0,f.useState)(!1),[O,R]=(0,f.useState)(!1),B=()=>M(!0),U=()=>M(!1),W=()=>{U(),E.current.removeEventListener("mouseleave",W)},V=e=>{P(),e===d.oS.delete?R(!0):(j(e===d.oS.share?o.lookupCode:o.id),L({name:(null==o?void 0:o.name)||"",summary:(null==o?void 0:o.summary)||"",instructions:(null==o?void 0:o.instructions)||"",course:o,origin:"course-details"}),C(!0),x(e),v(e===d.oS.share?d.fh.sharePageUrl:d.fh.enterCourseDetails),H(d.Hh),A(!1),D(0))},F=async()=>{let e=await (0,b.Z)((null==o?void 0:o.id)||"");(null==e?void 0:e.success)&&_.push("/courses"),h((null==e?void 0:e.success)?"Course has been successfully deleted.":"Course deletion was unsuccessful. Please try again.",d.$e)};return(0,n.jsxs)("header",{className:p()(w().headerCourse,t),children:[(0,n.jsxs)("div",{className:p()("container",w().container),children:[(0,n.jsxs)("div",{className:w().content,children:[(0,n.jsxs)("div",{className:w().tagGroup,ref:E,children:[(0,n.jsx)(u.Z,{className:w().tag,text:"Course",size:"sm"}),r&&i&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(y,{className:w().actionMenuToggle,icon:"moreHoriz",iconOnly:!0,size:"lg",text:"Show actions menu",type:"iconNaked",onClick:()=>{G?U():(B(),E.current.addEventListener("mouseleave",W))}}),(0,n.jsx)(T,{className:w().actionMenu,menuItems:[{title:"Edit Course",onClick:()=>{V(d.oS.edit),U()}},{title:"Duplicate Course",onClick:()=>{V(d.oS.duplicate),U()}},{title:"Delete Course",onClick:()=>{R(!0),U()}}],isOpen:G})]})]}),(0,n.jsxs)("div",{className:w().detailsGroup,children:[(0,n.jsx)(l.default,{className:w().title,tag:s,children:(null==o?void 0:o.name)||""}),(0,n.jsx)("div",{className:"flex items-center gap-8",children:(0,n.jsx)("span",{className:w().createdItems,children:"".concat((null==a?void 0:a.length)||0," Items")})})]})]}),(0,n.jsx)("div",{className:w().controls,children:r&&(0,n.jsx)(S,{isEducator:r,isCourseOwner:i,showConfirmDeletePopup:O,setShowConfirmDeletePopup:R,handleCourseActions:V,handleSectionActions:e=>{P(),x(e),v(d.fh.selectCourse),C(!0),k(d.vo),I(d.Hh),D(0),Z({incourse:[],assignment:[]}
1)},handleDeleteCourse:F})})]}),O&&(0,n.jsx)(N,{id:"course-delete-confirm",title:"Confirm Delete",subtitle:"Are you sure you want to delete this Course?",button1Label:"Cancel",button1Click:()=>R(!1),button2Label:"Delete",button2Click:F,isActive:O})]})};L.propTypes={actions:v().element,breadcrumbs:v().element,badgeText:v().string,className:v().string,image:v().string,multipleImages:v().arrayOf(v().shape({sourceUrl:v().string,altText:v().string})),altText:v().string,title:v().string,titleTag:v().oneOf(["h1","h2","h3","h4","h5","h6"]),videoUrl:v().string,numberOfViews:v().number,content:v().arrayOf(v().shape).isRequired,course:v().objectOf(v().shape).isRequired,isEducator:v().bool,isCourseOwner:v().bool},L.defaultProps={numLessons:0,titleTag:"h1",isEducator:!1,isCourseOwner:!1};var H=s(12186),k=s(13582),I=s.n(k),A=s(39395),D=s(174);let Z=async(e,t)=>await D.w3.delete("".concat(D.ux.courses,"/").concat(e,"/assignments/").concat(t)).then(e=>null==e?void 0:e.data).catch(e=>e.response.data);var P=s(21811),E=s.n(P);let G=C()(()=>Promise.resolve().then(s.bind(s,25219)),{loadableGenerated:{webpack:()=>[25219]}}),M=C()(()=>s.e(1829).then(s.bind(s,51829)),{loadableGenerated:{webpack:()=>[51829]}}),O=C()(()=>s.e(3822).then(s.bind(s,23822)),{loadableGenerated:{webpack:()=>[23822]}}),R=C()(()=>s.e(7610).then(s.bind(s,67610)),{loadableGenerated:{webpack:()=>[67610]}}),B=e=>{let{isEducator:t,isCourseOwner:s,content:a,course:o,tabTitle:r}=e,{setLaunchPopup:i,setFileAction:l,setActionType:u,setActiveContent:b,setSelectedId:_,setAssignmentForm:h,setAssignmentFormError:C,setSubmitted:x,setSelectedCount:v,resetAllStates:j}=(0,f.useContext)(m.Z),w=(0,g.useRouter)(),{toast:y}=(0,c.V)(),[T,N]=(0,f.useState)(!1),[S,L]=(0,f.useState)(""),H=e=>w.push("/assignments/".concat(e)),k=async(e,t)=>{let s=await Z(e,t);y((null==s?void 0:s.success)?"Assignment Template has been successfully removed from the Course.":"Assignment Template removal was unsuccessful. Please try again.",d.$e),w.push(w.asPath)},I=(e,t,s)=>{s.preventDefault(),s.stopPropagation(),j(),e===d.oS.delete?(N(!0),L(t.id)):e===d.oS.remove?k(t.courseId,t.id):(_(t.id),h({name:(null==t?void 0:t.name)||"",courseId:(null==t?void 0:t.courseId)||"",summary:(null==t?void 0:t.summary)||"",instructions:(null==t?void 0:t.instructions)||"",assignment:t,origin:"assignment-home"}),i(!0),l(e),u("template"),b(d.fh.enterDetails),C(d.KU),x(!1),v(0))},D=()=>{j(),l(d.oS.new),u("template"),b(d.fh.mainScreen),i(!0),h({...d.Bx,course:o}),C(d.KU),v(0)},P=async()=>{let e=await (0,A.Z)(S||"");(null==e?void 0:e.success)&&w.push(w.asPath),B(),y((null==e?void 0:e.success)?"Assignment Template has been successfully deleted.":"Assignment Template deletion was unsuccessful. Please try again.",d.$e)},B=()=>{N(!1),L("")};return(0,n.jsxs)("div",{className:E().contentWrapper,children:[(0,n.jsx)("div",{className:E().contentHeader,children:(0,n.jsx)("div",{className:E().contentSubHeader,children:(0,n.jsx)(()=>(0,n.jsxs)(n.Fragment,{children:[a.length>0?(0,n.jsx)("span",{className:E().headerText,children:a.length>1?"".concat(a.length," Items"):"".concat(a.length," Item")}):(0,n.jsx)("span",{}),t&&s&&(0,n.jsx)("div",{className:"flex flex-row gap-8",children:(0,n.jsx)(G,{text:"Add Assignment Template",size:"sm",onClick:D,type:"outlineBlue",className:E().button})})]}),{})})}),(0,n.jsx)("div",{className:E().contentSubWrapper,children:0===a.length?(0,n.jsx)(R,{message:"There's no ".concat((null==r?void 0:r.toLowerCase())||""," assignments yet!")}):(0,n.jsx)("div",{className:p()(E().mainContent),children:a.map(e=>(0,n.jsx)(M,{...e,onClickCard:()=>H(e.id),onEditAssignment:t=>I(d.oS.edit,e,t),onDuplicateAssignment:t=>I(d.oS.duplicate,e,t),onCreateAssignment:t=>I(d.oS.createOpposite,e,t),onDeleteAssignment:t=>I(d.oS.delete,e,t),onRemoveAssignment:t=>I(d.oS.remove,e,t),showActionMenu:t&&s},e.id))})}),T&&(0,n.jsx)(O,{id:"assignment-delete-confirm",title:"Confirm Delete",subtitle:"Are you sure you want to delete this Course?",button1Label:"Cancel",button1Click:B,button2Label:"Delete",button2Click:P,isActive:T})]})};B.propTypes={courseId:v().string,isEducator:v().bool,isCourseOwner:v().bool,content:v().array,setContent:v().func,course:v().objectOf(v().shape),tabTitle:v().string};let U=C()(()=>s.e(8284).then(s.bind(s,35429)),{loadableGenerated:{webpack:()=>[35429]}}),W=C()(()=>s.e(3357).then(s.bind(s,53148)),{loadableGenerated:{webpack:()=>[53148]}}),V=C()(()=>s.e(1377).then(s.bind(s,1377)),{loadableGenerated:{webpack:()=>[1377]},loading:()=>(0,n.jsx)("div",{className:I().loadingContainer,children:"Loading..."})}),F=e=>{let{course:t,isEducator:s,isCourseOwner:l,generalMeta:u,...c}=e,{assignments:d,id:b}=t,{launchPopup:_,fileAction:p,activeContent:h,setActiveContent:C,submitted:g,setSubmitted:x,selectedAction:v,drawerActions:j,setDrawerActions:w,isLoading:y,setIsLoading:T,selectedCount:N,setPlaylists:S,setDataLoading:H,actionClicked:k,setActionClicked:I,resetAllStates:A}=(0,f.useContext)(m.Z),[D,Z]=(0,f.useState)(d),[P,E]=(0,f.useState)(0);(0,f.useEffect)(()=>{S((null==e?void 0:e.playlists)||null),H((null==e?void 0:e.dataLoading)||!1)},[null==e?void 0:e.playlists,null==e?void 0:e.dataLoading]),(0,f.useEffect)(()=>{(0,i.E2)({fileAction:p,activeContent:h,setActiveContent:C,selectedAction:v,submitted:g,setSubmitted:x,setDrawerActions:w,actionClicked:k,setActionClicked:I,isLoading:y})},[h,y,g,k]);
1let G=j.btnLabel1||j.btnLabel2||j.nodeB?{render:!0,component:()=>(0,n.jsx)(W,{btnLabel1:j.btnLabel1,btnAction1:()=>j.btnAction1(),btnDisabled1:j.btnDisabled1,btnLabel2:j.btnLabel2,btnAction2:()=>j.btnAction2(),btnDisabled2:j.btnDisabled2,nodeB:j.nodeB})}:{render:!1,component:()=>null},M=[{title:"Assignment Templates",content:(0,n.jsx)(B,{courseId:b,isEducator:s,isCourseOwner:l,content:d,setContent:Z,course:t}),isDisabled:!1},{title:"Course Details",content:(0,n.jsx)(V,{summary:(null==t?void 0:t.summary)||"",instructions:(null==t?void 0:t.instructions)||""}),isDisabled:!1}];return(0,n.jsxs)(a.Z,{...c,generalMeta:u,header:()=>(0,n.jsx)(L,{breadcrumbs:(0,n.jsx)(o.Z,{className:"mb-36"}),course:t,content:D,isEducator:s,isCourseOwner:l}),children:[(0,n.jsx)(r.Z,{tabs:M,tabIndex:P,onTabSelect:e=>{e!==P&&(T(!0),E(e))},hasNavHeader:!0}),_&&(0,n.jsx)(U,{id:"courses-popup",isActive:_,title:j.drawerTitle,className:"h-auto",onDismiss:A,renderFooter:G,selectedCount:N,children:j.component()})]})};F.propTypes={...H.h6,course:v().objectOf(v().shape),isEducator:v().bool,isCourseOwner:v().bool,generalMeta:v().shape({subscribeNewsletter:v().bool})},F.defaultProps={...H.BQ};var q=s(6154),Q=!0;let z=async(e,t)=>{var s;let n=await q.Z.get("/api/salesforce/assignments").then(e=>null!==(s=null==e?void 0:e.data)&&void 0!==s?s:null).catch(()=>null);e(null!=n?n:{playlists:null}),t(!1)},J=e=>{let{isEducator:t}=e,[s,a]=(0,f.useState)({}),[o,r]=(0,f.useState)(!0);return(0,f.useEffect)(()=>{t&&z(a,r)},[t]),(0,n.jsx)(F,{...e,...s,dataLoading:o})};J.propTypes={isEducator:v().bool},J.defaultProps={isEducator:!1};var K=J},39395:function(e,t,s){"use strict";var n=s(174);let a=async e=>await n.w3.delete("".concat(n.ux.assignments,"/").concat(e)).then(e=>null==e?void 0:e.data).catch(e=>{var t;return null===(t=e.response)||void 0===t?void 0:t.data});t.Z=a},174:function(e,t,s){"use strict";s.d(t,{w3:function(){return u},ux:function(){return l}});var n=s(17109);async function a(){return await (0,n.F)()}var o=s(6154),r=s(28662);let i="/api/v1",l={assignments:"".concat(i,"/assignments"),contents:"".concat(i,"/contents"),courses:"".concat(i,"/courses"),sections:"".concat(i,"/sections"),users:"".concat(i,"/users")},u=o.Z.create({baseURL:"https://bri-assignment.org",headers:{"Content-Type":"application/json"},responseType:"json"});async function c(e){let t=await a();return(null==t?void 0:t.accessToken)&&(e.headers.Authorization="Bearer ".concat(null==t?void 0:t.accessToken)),e}u.interceptors.request.use(c),(0,r.ZP)(u,{retries:4,retryDelay:r.ZP.exponentialDelay})},10102:function(e,t,s){"use strict";var n=s(174);let a=async e=>await n.w3.delete("".concat(n.ux.courses,"/").concat(e)).then(e=>null==e?void 0:e.data).catch(e=>e.response.data);t.Z=a},73435:function(e){e.exports={tabbedContent:"ModernTabbedContent_tabbedContent__Um1AQ",buttons:"ModernTabbedContent_buttons__iPt1f",button:"ModernTabbedContent_button__ka_CB",tabActive:"ModernTabbedContent_tabActive__8k8xG",panel:"ModernTabbedContent_panel__Fpy5z",tabLine:"ModernTabbedContent_tabLine__Pf9aJ"}},13582:function(e){e.exports={loadingContainer:"Course_loadingContainer__A1mpn"}},21811:function(e){e.exports={contentWrapper:"CourseItemList_contentWrapper__4E413",contentSubWrapper:"C
1ourseItemList_contentSubWrapper__Yj05x",contentHeader:"CourseItemList_contentHeader__nm9sD",contentSubHeader:"CourseItemList_contentSubHeader__32DWN",headerText:"CourseItemList_headerText__vM5VM",sameDateTimeText:"CourseItemList_sameDateTimeText__yQ7bO",mainContent:"CourseItemList_mainContent__6iJ6e",modal:"CourseItemList_modal__9Pspc",modalHeader:"CourseItemList_modalHeader__XnSHc",modalContent:"CourseItemList_modalContent__SVZYy",itemsGroup:"CourseItemList_itemsGroup__Gj6Xc",button:"CourseItemList_button__7o1_U",dragButton:"CourseItemList_dragButton__eEyVp",dragging:"CourseItemList_dragging__JWP6l",actionGroup:"CourseItemList_actionGroup__ZsP_V",actionMenu:"CourseItemList_actionMenu__NxEZ0"}},42208:function(e){e.exports={headerCourse:"HeaderCourses_headerCourse__HKdAV",container:"HeaderCourses_container__1tQcS",content:"HeaderCourses_content__RwJJR",linkText:"HeaderCourses_linkText__Yjac8",tagGroup:"HeaderCourses_tagGroup__U_7SI",tag:"HeaderCourses_tag__GARRB",actionMenuToggle:"HeaderCourses_actionMenuToggle__SnxUF",actionMenu:"HeaderCourses_actionMenu__MLx0R",detailsGroup:"HeaderCourses_detailsGroup___lkQ9",createdItems:"HeaderCourses_createdItems__hIF3d",dot:"HeaderCourses_dot___NHdk",divider:"HeaderCourses_divider__tIo3q",dateTimeCoverage:"HeaderCourses_dateTimeCoverage__Lw5P8",dateTime:"HeaderCourses_dateTime__Ffa_I",dateTimeLabel:"HeaderCourses_dateTimeLabel__x67xw",dateTimeValue:"HeaderCourses_dateTimeValue__MpUGM",title:"HeaderCourses_title__5CJsd",controls:"HeaderCourses_controls__2UH6y",panel:"HeaderCourses_panel__rT5bO",buttons:"HeaderCourses_buttons__qDMaQ",button:"HeaderCourses_button__WWRvR"}}},function(e){e.O(0,[296,1664,1106,5268,9723,8383,1646,3541,9774,2888,179],function(){return e(e.s=69091)}),_N_E=e.O()}]);
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.