@clickview/lite 0.43.0 → 0.43.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[2199],{84963:(e,t,n)=>{n.d(t,{r:()=>d});var a=n(32735),c=n(23481),o=n(83914),i=n(76177),l=n(35223);const r={tag:"XRj8d",tooltip:"X6mLk"};var s="specialEventCalendar.comingSoonTag";function d(e){return a.createElement(i.u,{title:c.T.getPhrase(s,"tooltip"),spanHackClassName:"d-block ".concat(r.tooltip),spanHack:!0},a.createElement("div",{className:"d-flex text-dark align-items-center ".concat(r.tag," ").concat(e.className)},a.createElement(o.x,{svgName:l.vn.Timer}),!e.onlyIcon&&c.T.getPhrase(s,"comingSoon")))}},6107:(e,t,n)=>{n.d(t,{b:()=>g});var a=n(32735),c=n(110),o=n(49985),i=n(65858),l=n(84963),r=n(12324),s=n(42735),d=n(36848),m=n(75163),v=n(2284),u=n(54610),p=n(67453);const f={modalWidth:"SgHYb",banner:"PLw1p",pill:"UNBr0",logo:"xv_tc"};function g(e){var t,n,g,E,D,M=e.getAppLink(e.event.content.id,e.event.name),b=null===(t=e.getBackgroundColor)||void 0===t?void 0:t.call(e,e.event.content),k=null===(n=e.getIconUrl)||void 0===n?void 0:n.call(e,e.event.content),Y=null===(g=e.getBannerUrl)||void 0===g?void 0:g.call(e,e.event.content),h=!!e.event.endDate,N=e.event.content.status===v.W.ComingSoon,C=null===(E=e.getStartTime)||void 0===E?void 0:E.call(e,e.event.content),w=null===(D=e.getActionLabel)||void 0===D?void 0:D.call(e),O={actionType:i.Vw.Click,entity:i.py.SpecialEvent,location:e.inPopup?i.LZ.CalendarPopup:i.LZ.CalendarDay},y={topicId:e.event.content.id,eventId:e.event.specialEventId,presentationId:e.presentationId,date:c.O.format(new Date(e.event.startDate),"YYYY-MM-DD"),status:e.event.content.status};return a.createElement("div",null,C&&a.createElement("h6",null,C),a.createElement("div",{onClick:function(){N&&o.k.logUserAction(y,O)}},a.createElement(d.F,{appLink:!N&&M,className:"".concat(N?"":"cursor-pointer"," text-decoration-none"),onClick:e.onClick,analyticsOptions:O,analyticsData:y},a.createElement("div",{className:"banner rounded-3 position-relative ".concat(f.banner),style:{backgroundColor:b,backgroundImage:"url('".concat(p.j.createUrl(Y,{size:u.h2.Large}),"')")}},a.createElement("div",{className:"d-flex justify-content-between align-items-center w-100 h-100 px-3"},a.createElement("div",{className:"d-flex align-items-center"},k&&a.createElement("div",{className:"".concat(f.logo," rounded-circle overflow-hidden me-2")},a.createElement(m.Z,{data:k})),a.createElement("div",{className:"text-white"},N&&a.createElement(l.r,{className:"pe-2 fw-semibold mb-1 rounded-pill justify-content-start ".concat(f.pill)}),h&&a.createElement("div",{className:"mb-1"},r.T.getDisplayDate(e.event.startDate,e.event.endDate)),a.createElement("h2",{className:"h4 clamp-1 text-white text-shadow",title:e.event.name},e.event.name))),a.createElement("div",{className:"flex-shrink-0"},!N&&a.createElement(s.K,{className:"btn btn-outline-dark fw-semibold"},w))))),a.createElement("div",{className:"mt-2 mb-3"},e.event.description||e.event.content.description)))}},7870:(e,t,n)=>{n.d(t,{N:()=>l});var a=n(97395),c=n(75896),o=n(110),i=n(73582),l={calendarEvents:function(e,t,n){return{url:a._.urlBuilder("{gateway}/v1/discover/special-events/content",{from:e,to:t,presentationId:n}),publicUrl:a._.urlBuilder("/api/discover/special-events/content",{from:e,to:t,presentationId:n}),key:"presentation:".concat(n,":events:from:").concat(e,":to").concat(t)}},nextTopicSpecialEvent:function(e,t){var n={presentationId:t,limit:1,from:o.O.format(new Date,"YYYY-MM-DD"),objectType:i.VH.Classification};return{url:a._.urlBuilder("{gateway}/v1/discover/special-events/object/".concat(e,"/next-events"),n),publicUrl:a._.urlBuilder("/api/discover/special-events/object/".concat(e,"/next-events"),n),key:"presentation:".concat(t,":events:classification:").concat(e),formatData:function(e){return c.m.first(e)}}}}},12324:(e,t,n)=>{n.d(t,{T:()=>c});var a=n(110),c={getDisplayDate:function(e,t){return t?e.slice(5,7)!==t.slice(5,7)?"".concat(a.O.format(e,"D MMM")," - ").concat(a.O.format(t,"D MMM")):"".concat(a.O.format(e,"D")," - ").concat(a.O.format(t,"D")," ").concat(a.O.format(e,"MMM")):a.O.format(e,"D MMM")},getEventsInMonth:function(e,t){return e.filter((function(e){return a.O.format(e.startDate,"YYYY-MM")===a.O.format(t,"YYYY-MM")}))},getOrdinalDate:function(e){return"".concat(a.O.getLocalDateOrdinal(a.O.get(e,"date"))," ").concat(a.O.format(e,"MMMM"))}}},2284:(e,t,n)=>{var a;n.d(t,{W:()=>a}),function(e){e.Draft="Draft",e.ComingSoon="ComingSoon",e.Published="Published"}(a||(a={}))},72199:(e,t,n)=>{n.r(t),n.d(t,{SpecialEventListView:()=>k});var a=n(32735),c=n(98495),o=n(23481),i=n(20354),l=n(110),r=n(28400),s=n(6107),d=n(7870),m=n(12324),v=n(9111),u=n(13876),p=n(14070),f=n(97291),g=n(86698);const E={modalWidth:"LrMq0",buttons:"jAfM0"};var D="specialEventCalendar.eventListPopup",M=400,b=300;function k(e){var t,n=(0,g.y)({redirectOnError:!0}).activePresentation,k=new Date(e.from),Y=new Date(e.to),h=i.a.useBasicFetch((null==n?void 0:n.id)&&d.N.calendarEvents(l.O.format(k,"YYYY-MM-DD"),l.O.format(Y,"YYYY-MM-DD"),n.id)),N=(null===(t=h.data)||void 0===t?void 0:t.filter((function(t){return t.startDate===l.O.format(new Date(e.date),"YYYY-MM-DD")})))||[];return(null==n?void 0:n.id)?a.createElement(v.G,{title:"Events on ".concat(m.T.getOrdinalDate(e.date)),closePopup:e.closePopup,dialogClassName:E.modalWidth,bodyClassName:"p-0",showLoadingSpinner:!h.data},a.createElement(c.ZP,{autoHeight:!0,autoHeightMin:b,autoHeightMax:M},a.createElement("div",{className:"px-3 pt-2"},N.map((function(t){return a.createElement(s.b,{key:t.content.id,getAppLink:function(e,t){return{application:f.O.SUBJECT,action:p.e.Subjects.CLASSIFICATION,args:[e,r.m.slugify(t)]}},event:t,onClick:e.closePopup,inPopup:!0,presentationId:n.id})})))),a.createElement("div",{className:"ms-3"},a.createElement(u.u,{className:E.buttons},a.createElement(u.u.Cancel,{variant:"outline-dark",className:"mb-3",onClick:e.closePopup,text:o.T.getPhrase(D,"close")})))):a.createElement(a.Fragment,null)}}}]);
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[2199],{84963:(e,t,n)=>{n.d(t,{r:()=>d});var a=n(32735),o=n(23481),c=n(83914),l=n(76177),i=n(35223);const r={tag:"XRj8d",tooltip:"X6mLk"};var s="specialEventCalendar.comingSoonTag";function d(e){return a.createElement(l.u,{title:o.T.getPhrase(s,"tooltip"),spanHackClassName:"d-block ".concat(r.tooltip),spanHack:!0},a.createElement("div",{className:"d-flex text-dark align-items-center ".concat(r.tag," ").concat(e.className)},a.createElement(c.x,{svgName:i.vn.Timer}),!e.onlyIcon&&o.T.getPhrase(s,"comingSoon")))}},6107:(e,t,n)=>{n.d(t,{b:()=>g});var a=n(32735),o=n(110),c=n(49985),l=n(65858),i=n(84963),r=n(12324),s=n(42735),d=n(36848),m=n(75163),u=n(2284),v=n(54610),p=n(67453);const f={modalWidth:"SgHYb",banner:"PLw1p",pill:"UNBr0",logo:"xv_tc"};function g(e){var t,n,g,E,D,b=e.getAppLink(e.event.content.id,e.event.name),M=null===(t=e.getBackgroundColor)||void 0===t?void 0:t.call(e,e.event.content),k=null===(n=e.getIconUrl)||void 0===n?void 0:n.call(e,e.event.content),Y=null===(g=e.getBannerUrl)||void 0===g?void 0:g.call(e,e.event.content),h=!!e.event.endDate,N=e.event.content.status===u.W.ComingSoon,C=null===(E=e.getStartTime)||void 0===E?void 0:E.call(e,e.event.content),w=null===(D=e.getActionLabel)||void 0===D?void 0:D.call(e),O={actionType:l.Vw.Click,entity:l.py.SpecialEvent,location:e.inPopup?l.LZ.CalendarPopup:l.LZ.CalendarDay},y={topicId:e.event.content.id,eventId:e.event.specialEventId,presentationId:e.presentationId,date:o.O.format(new Date(e.event.startDate),"YYYY-MM-DD"),status:e.event.content.status};return a.createElement("div",null,C&&a.createElement("h6",null,C),a.createElement("div",{onClick:function(){N&&c.k.logUserAction(y,O)}},a.createElement(d.F,{appLink:!N&&b,className:"".concat(N?"":"cursor-pointer"," text-decoration-none"),onClick:e.onClick,analyticsOptions:O,analyticsData:y},a.createElement("div",{className:"banner rounded-3 position-relative ".concat(f.banner),style:{backgroundColor:M,backgroundImage:"url('".concat(p.j.createUrl(Y,{size:v.h2.Large}),"')")}},a.createElement("div",{className:"d-flex justify-content-between align-items-center w-100 h-100 px-3"},a.createElement("div",{className:"d-flex align-items-center"},k&&a.createElement("div",{className:"".concat(f.logo," rounded-circle overflow-hidden me-2")},a.createElement(m.Z,{data:k})),a.createElement("div",{className:"text-white"},N&&a.createElement(i.r,{className:"pe-2 fw-semibold mb-1 rounded-pill justify-content-start ".concat(f.pill)}),h&&a.createElement("div",{className:"mb-1"},r.T.getDisplayDate(e.event.startDate,e.event.endDate)),a.createElement("h2",{className:"h4 clamp-1 text-white text-shadow",title:e.event.name},e.event.name))),a.createElement("div",{className:"flex-shrink-0"},!N&&a.createElement(s.K,{className:"btn btn-outline-dark fw-semibold"},w))))),a.createElement("div",{className:"mt-2 mb-3"},e.event.description||e.event.content.description)))}},7870:(e,t,n)=>{n.d(t,{N:()=>i});var a=n(97395),o=n(75896),c=n(110),l=n(73582),i={calendarEvents:function(e,t,n){return{url:a._.urlBuilder("{gateway}/v1/discover/special-events/content",{from:e,to:t,presentationId:n}),publicUrl:a._.urlBuilder("/api/discover/special-events/content",{from:e,to:t,presentationId:n}),key:"presentation:".concat(n,":events:from:").concat(e,":to").concat(t)}},nextTopicSpecialEvent:function(e,t){var n={presentationId:t,limit:1,from:c.O.format(new Date,"YYYY-MM-DD"),objectType:l.VH.Classification};return{url:a._.urlBuilder("{gateway}/v1/discover/special-events/object/".concat(e,"/next-events"),n),publicUrl:a._.urlBuilder("/api/discover/special-events/object/".concat(e,"/next-events"),n),key:"presentation:".concat(t,":events:classification:").concat(e),formatData:function(e){return o.m.first(e)}}}}},12324:(e,t,n)=>{n.d(t,{T:()=>o});var a=n(110),o={getDisplayDate:function(e,t){return t?e.slice(5,7)!==t.slice(5,7)?"".concat(a.O.format(e,"D MMM")," - ").concat(a.O.format(t,"D MMM")):"".concat(a.O.format(e,"D")," - ").concat(a.O.format(t,"D")," ").concat(a.O.format(e,"MMM")):a.O.format(e,"D MMM")},getEventsInMonth:function(e,t){return e.filter((function(e){return a.O.format(e.startDate,"YYYY-MM")===a.O.format(t,"YYYY-MM")}))},getOrdinalDate:function(e){return"".concat(a.O.getLocalDateOrdinal(a.O.get(e,"date"))," ").concat(a.O.format(e,"MMMM"))}}},2284:(e,t,n)=>{var a;n.d(t,{W:()=>a}),function(e){e.Draft="Draft",e.ComingSoon="ComingSoon",e.Published="Published"}(a||(a={}))},72199:(e,t,n)=>{n.r(t),n.d(t,{SpecialEventListView:()=>Y});var a=n(32735),o=n(98495),c=n(23481),l=n(20354),i=n(110),r=n(28400),s=n(6107),d=n(7870),m=n(12324),u=n(9111),v=n(13876),p=n(14070),f=n(97291),g=n(86698);const E={modalWidth:"LrMq0",buttons:"jAfM0"};var D="specialEventCalendar.eventListPopup",b=c.T.encloseNamespace(D),M=400,k=300;function Y(e){var t,n=(0,g.y)({redirectOnError:!0}).activePresentation,Y=new Date(e.from),h=new Date(e.to),N=l.a.useBasicFetch((null==n?void 0:n.id)&&d.N.calendarEvents(i.O.format(Y,"YYYY-MM-DD"),i.O.format(h,"YYYY-MM-DD"),n.id)),C=(null===(t=N.data)||void 0===t?void 0:t.filter((function(t){return t.startDate===i.O.format(new Date(e.date),"YYYY-MM-DD")})))||[];return(null==n?void 0:n.id)?a.createElement(u.G,{title:"Events on ".concat(m.T.getOrdinalDate(e.date)),closePopup:e.closePopup,dialogClassName:E.modalWidth,bodyClassName:"p-0",showLoadingSpinner:!N.data},a.createElement(o.ZP,{autoHeight:!0,autoHeightMin:k,autoHeightMax:M},a.createElement("div",{className:"px-3 pt-2"},C.map((function(t){return a.createElement(s.b,{key:t.content.id,getAppLink:function(e,t){return{application:f.O.SUBJECT,action:p.e.Subjects.CLASSIFICATION,args:[e,r.m.slugify(t)]}},event:t,onClick:e.closePopup,inPopup:!0,presentationId:n.id,getActionLabel:function(){return b("buttonLabel")},getBannerUrl:function(e){var t;return null===(t=e.banner)||void 0===t?void 0:t.url}})})))),a.createElement("div",{className:"ms-3"},a.createElement(v.u,{className:E.buttons},a.createElement(v.u.Cancel,{variant:"outline-dark",className:"mb-3",onClick:e.closePopup,text:c.T.getPhrase(D,"close")})))):a.createElement(a.Fragment,null)}}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 3095-dfe7a98802-lite.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3095],{49602:(e,t,n)=>{var r;n.d(t,{b:()=>i}),function(e){e[e.None=0]="None",e[e.AllSubjects=1]="AllSubjects",e[e.AllLevels=2]="AllLevels",e[e.AllSubjectsAndAllLevels=3]="AllSubjectsAndAllLevels"}(r||(r={}));var a=n(25925),i={hasManyPresentationTypes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0,n=0;return null==e||e.forEach((function(e){e.type===a.R.Subject?t++:e.type===a.R.Curriculum&&n++})),{hasManySubjectPresentations:t>1,hasManyCurriculumPresentations:n>1}},getBulkPreferencesState:function(e){return e===r.AllSubjectsAndAllLevels?{levels:!0,subjects:!0}:{levels:e===r.AllLevels,subjects:e===r.AllSubjects}},hasBulkSelectedLevels:function(e){return e===r.AllLevels||e===r.AllSubjectsAndAllLevels},hasBulkSelectedTopics:function(e){return e===r.AllSubjects||e===r.AllSubjectsAndAllLevels},getNextBulkState:function(e,t){var n=r.None,a=r.AllSubjects,i=r.AllLevels,o=r.AllSubjectsAndAllLevels,c="topics"===t;switch(e){case n:default:return c?a:i;case a:return c?n:o;case i:return c?o:n;case o:return c?i:a}}}},80143:(e,t,n)=>{n.d(t,{n:()=>i});var r=n(32735),a=n(69454);function i(e,t){var n=r.useMemo((function(){return(null==e?void 0:e.length)&&t&&a.T.shouldShowAudiences(t)?a.T.getSortedPresentationAudiences(e,t):null}),[e]);return r.useMemo((function(){return(null==n?void 0:n.length)?a.T.getMergedPresentationAudienceString(n):null}),[n])}},69454:(e,t,n)=>{n.d(t,{T:()=>d});var r=n(75896),a=n(1048),i=n(55171);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=/\d/,l=function(e){var t,n,a=r.m.first(e),i=r.m.last(e);return a.name===i.name?a.name:"Advanced"===i.name?"lower"===(t=a.name.split(" "),n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0].toLowerCase()?"Lower Sec - Adv":"Upper Sec - Adv":"Lower - Upper Sec"},s=/([0-9]+)/gi,u=/\s|\+/gi,d={getSortedPresentationAudiences:function(e,t){var n=e.filter((function(e){return!!e})).map((function(e){return e.id.toString()}));return t.filter((function(e){return n.includes(e.masterId.toString())}))},getMergedPresentationAudienceString:function(e){var t,n,a,o="";switch(+r.m.first(e).presentationId){case i.e.PresentationIds.DEFAULT:case i.e.PresentationIds.AU_SECONDARY:case i.e.PresentationIds.US_ELEMENTARY:case i.e.PresentationIds.AU_PRIMARY:case i.e.PresentationIds.STREAMABLE_LEARNING:if(1===e.length)return e[0];o=function(e){var t=e.map((function(e){return e.name})).join(" "),n=t.split(" ").filter((function(e){return!isNaN(+e)})).map((function(e){return+e}))||[],r=t.split(" ").filter((function(e){return isNaN(+e)}))||[],a=e.find((function(e){return!c.test(e.name)})),i=r.find((function(e){return e!==(null==a?void 0:a.name)}));if(e.length>1&&(i+="s"),a&&n.length)return"".concat(i," ").concat(a.name.charAt(0)," - ").concat(n.pop());var o=function(e){var t,n,r,a,i=!1,o=[];for(e=e.sort((function(e,t){return e-t})),r=0;r<e.length;r++)a=r+1,i||(t=e[r]),n=e[a],e[r]+1===n?i=!0:i?(o.push("".concat(t," - ").concat(e[r])),i=!1):(o.push("".concat(e[r])),i=!1);return o}(n);return"".concat(i," ").concat(o.join(", "))}(e);break;case i.e.PresentationIds.SCOTLAND_PRIMARY:case i.e.PresentationIds.INTERNATIONAL_PRIMARY:case i.e.PresentationIds.INTERNATIONAL_SECONDARY:if(1===e.length)return e[0];o=function(e){var t=e.map((function(e){return e.name})),n={};t.forEach((function(e,t){if(0!==t){var r=e.split(" ");Object.keys(n).forEach((function(e){r.includes(e)||delete n[e]}))}else e.split(" ").forEach((function(e,t){n[e]=0===t?"start":"end"}))}));var r=Object.keys(n)[0],a=n[r];if(!r)return e[0].name;var i=e[0].name,o=e[e.length-1].name,c=function(e){return e.split(r)[0]},l="".concat(c(i)," - ").concat(c(o));return"start"===a?"".concat(r," ").concat(l):"".concat(l," ").concat(r)}(e);break;case i.e.PresentationIds.ENGLISH_SECONDARY:o=l(e);break;case i.e.PresentationIds.SCOTLAND_SECONDARY:t=e,n=r.m.first(t),a=r.m.last(t),o=n.name===a.name?n.name:"Senior Phase"===a.name?"".concat(n.name," - Senior"):"Third - Fourth Level";break;case i.e.PresentationIds.ENGLAND_PRIMARY:o=function(e){var t=r.m.first(e),n=r.m.last(e),a=r.m.first(t.name.split(" ")),i=r.m.first(n.name.split(" ")),o=t.name.split(" ").find((function(e){return!isNaN(+e)})),c=n.name.split(" ").find((function(e){return!isNaN(+e)}));if(t===n)return"Key"===a||"Reception"===a?t.name:"".concat(a," KS").concat(o);var l="",s="";return l="Reception"===a?"R":"KS".concat(o),s="KS".concat(c),"Lower"===a&&"Upper"===i?"L ".concat(l," - U ").concat(s):("Lower"===a&&(l="Lower ".concat(l)),"Upper"===i&&(s="Upper ".concat(s)),"Key"===i&&(s=n.name),"".concat(l," - ").concat(s))}(e);case i.e.PresentationIds.US_MIDDLE:case i.e.PresentationIds.US_HIGH:}return o?{name:o}:null},sortMembersWithDuplicateNamesByAudience:function(e){var t=function(e){return e.length?(e.forEach((function(e){var a=+r.m.first(e.name.match(s));if(!t)return t=e,void(n=a);a<n&&(t=e)})),t):null;var t,n},n={},a=[];return e.forEach((function(e){if(!n[e.name])return n[e.name]=1,void a.push(e);a.push(e),n[e.name]++;var r=a.splice(a.length-n[e.name]).sort((function(e,n){var r=t(e.subjectPresentationAudiences.data),a=t(n.subjectPresentationAudiences.data);if(!r&&a)return 1;if(!a)return-1;var i=r.name.localeCompare(a.name);return 0===i?i:i>0?-1:1}));a=a.concat(r)})),a},getActiveAudiencesFromParams:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(a.t.isObject(t)&&!a.t.isEmpty(t)&&e&&e.length&&d.shouldShowAudiences(e)){var n=t.a;if(n){"string"==typeof n&&(n=[n]);var r=function(e){return e.replace(u,"").toLowerCase()},i=n.reduce((function(e,t){return e[r(t)]=t,e}),{});return e.filter((function(e){return i[r(e.name)]}))}}},getAudienceParams:function(e){return(null==e?void 0:e.length)?{a:e.map((function(e){return e.name}))}:null},shouldShowAudiences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return!!e&&e.length>1}}},75919:(e,t,n)=>{n.d(t,{N:()=>i});var r=n(32735);const a={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function i(e){return r.createElement("div",{className:(t="d-flex align-items-center text-center position-relative w-100 ".concat(a.imageContainer),"center"===e.contentPosition&&(t+=" px-5 justify-content-center"),"right"===e.contentPosition&&(t+=" me-n5 justify-content-end"),t)},!!e.annotationUrl&&r.createElement("div",{className:function(){var t=a.annotation;switch(e.annotationPosition){case"top-left":t+=" ".concat(a.above," ").concat(a.left);break;case"top-right":t+=" ".concat(a.above," ").concat(a.right);break;case"bottom-left":t+=" ".concat(a.below," ").concat(a.left);break;case"bottom-right":t+=" ".concat(a.below," ").concat(a.right)}return e.annotationClassName&&(t+=" ".concat(e.annotationClassName)),t}()},r.createElement("img",{className:"img-fluid",src:e.annotationUrl})),e.children,"right"===e.contentPosition&&r.createElement("div",{className:a.divider}));var t}i.defaultProps={contentPosition:"center"}},63478:(e,t,n)=>{n.d(t,{B:()=>a});var r=n(32735);function a(e){return r.createElement("div",{className:"w-100 h-100 position-fixed bg-".concat(e.variant)},e.children)}},24250:(e,t,n)=>{n.d(t,{R:()=>u});var r=n(32735),a=n(75896),i=n(55171),o=n(54610),c=n(79967),l=n(67453);function s(e,t){return"mobile"===t?function(e){var t=e%10,n={top:"".concat(4*e,"%")};switch(t){case 0:return n.left="12.5%",n.animationDelay="0.5s",n;case 1:return n.right="7.5%",n.animationDelay="1s",n;case 2:return n.left="10%",n;case 3:return n.right="2.5%",n.animationDelay="0.5s",n;case 4:return n.left="2.5%",n.animationDelay="1.5s",n;case 5:return n.right="10%",n;case 6:return n.left="12.5%",n.animationDelay="1.5s",n;case 7:return n.right="7.5%",n.animationDelay="0.5s",n;case 8:return n.left="5%",n.animationDelay="1s",n;case 9:return n.right="2.5%",n.animationDelay="1s",n;default:return n.left="10%",n.animationDelay="1.5s",n}}(e):"50%"===t?function(e){var t=e%10,n={top:"".concat(4*e,"%")};switch(t){case 0:return n.left="25%",n.animationDelay="0.5s",n;case 1:return n.right="15%",n.animationDelay="1s",n;case 2:return n.left="20%",n;case 3:return n.right="5%",n.animationDelay="0.5s",n;case 4:return n.left="5%",n.animationDelay="1.5s",n;case 5:return n.right="20%",n;case 6:return n.left="25%",n.animationDelay="1.5s",n;case 7:return n.right="15%",n.animationDelay="0.5s",n;case 8:return n.left="10%",n.animationDelay="1s",n;case 9:return n.right="5%",n.animationDelay="1s",n;default:return n.left="20%",n.animationDelay="1.5s",n}}(e):function(e){var t=e%10,n={top:"".concat(4*e,"%")};switch(t){case 0:return n.left="25%",n.animationDelay="0.5s",n;case 1:return n.right="30%",n.animationDelay="1s",n;case 2:return n.left="40%",n;case 3:return n.right="10%",n.animationDelay="0.5s",n;case 4:return n.left="10%",n.animationDelay="1.5s",n;case 5:return n.right="40%",n;case 6:return n.left="30%",n.animationDelay="1.5s",n;case 7:return n.right="30%",n.animationDelay="0.5s",n;case 8:return n.left="10%",n.animationDelay="1s",n;case 9:return n.right="10%",n.animationDelay="1s",n;default:return n.left="40%",n.animationDelay="1.5s",n}}(e)}var u=r.memo((function(e){var t=a.m.shuffle(i.e.Onboarding.LOADING_THUMBNAILS),n=(0,c.k)();return r.createElement("div",{className:"".concat("n2Qe4"," ").concat("50%"===e.screenSize?"w-50":"w-100")},t.map((function(t,a){return r.createElement("div",{key:a,className:"".concat("ZlA2t"," position-absolute rounded-3 overflow-hidden"),style:s(a,n.xs?"mobile":e.screenSize)},!e.hideThumbnailMask&&r.createElement("div",{className:"".concat("jNop3"," ").concat("blue"===e.variant?"jVOWE":"YNfFq")}),r.createElement("img",{className:"img-fluid",src:l.j.createUrl(t,{size:o.h2.Small})}))})))}))},2248:(e,t,n)=>{n.d(t,{L:()=>h});var r=n(32735),a=n(60376),i=n(83914),o=n(2786),c=n(83345),l=n(72639),s=n(79967),u=n(35223),d=n(10144);const m={dot:"AlRQD",logo:"L42gR",blackBar:"ESCxm",topNav:"a3G_4",leftNav:"YxGVV",belowHeader:"jc_cg",leftNavIcon:"U6i6r",leftNavText:"LnYlW",presentationPlaceholderIcon:"Ljaju",presentationIcon:"QdwPq",presentationPlaceholderText:"af06V",curriculumIcon:"N7T4T",curriculumIconSmall:"_6xrUg",curriculumContainer:"Z65qX",iconPlaceholder:"CKOXL",shadow:"zygeJ",presentationName:"Oj7Dt"};var f="onboarding.mockLayout";function v(){return r.createElement("div",{className:"d-flex align-items-center justify-content-center mb-2 px-3"},r.createElement("div",{className:"".concat(m.leftNavIcon," rounded-circle")}),r.createElement("div",{className:"".concat(m.leftNavText," rounded-pill")}))}function h(e){var t,n,h=(0,s.k)();return r.createElement("div",{className:"border border-dark border-2 bg-white rounded-3 user-select-none overflow-hidden position-relative h-100 w-100"},!!e.editingCurriculum&&r.createElement("div",{className:"w-100 h-100 position-absolute ".concat(m.shadow)},r.createElement("div",{className:"d-flex align-items-center h-100 w-50 ".concat(m.curriculumContainer)},r.createElement("div",{className:"bg-white rounded-3 border p-3 w-100"},r.createElement("h2",{className:"h6 text-start"},r.createElement(c.x,{namespace:f,phrase:"curriculum"})),e.curriculum?r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(m.curriculumIcon," rounded-circle me-2 border")},r.createElement(a.f,{imageUrl:null===(t=e.curriculum.cover)||void 0===t?void 0:t.url})),r.createElement("div",{className:"text-start"},e.curriculum.name)):r.createElement("div",{className:"d-flex align-items-center text-muted"},r.createElement("div",{className:"me-2 rounded-circle p-1 ".concat(m.iconPlaceholder)},r.createElement(a.f,{svgSize:i.S.Large,textVariant:"secondary",svgName:u.vn.GraduationCap})),r.createElement(c.x,{namespace:f,phrase:"selectCurriculum"}))))),r.createElement("div",{className:"bg-dark d-flex px-3 py-2 ".concat(m.blackBar)},r.createElement("div",{className:"rounded-circle me-2 ".concat(m.dot)}),r.createElement("div",{className:"rounded-circle me-2 ".concat(m.dot)}),r.createElement("div",{className:"rounded-circle ".concat(m.dot)})),r.createElement("div",{className:"border-bottom px-3 py-2 d-flex align-items-center ".concat(m.topNav)},r.createElement("div",{className:"".concat(m.logo," me-4")},h.xs?r.createElement(o.bc,null):r.createElement(o.$S,null)),r.createElement("div",{className:"form-control w-75 d-flex justify-content-start"},r.createElement(i.x,{svgName:u.vn.Search})),!!e.curriculum&&r.createElement("div",{className:"".concat(m.curriculumIconSmall," rounded-circle ms-2 me-n1 border")},r.createElement(a.f,{imageUrl:null===(n=e.curriculum.cover)||void 0===n?void 0:n.url}))),r.createElement("div",{className:"d-flex ".concat(m.belowHeader)},r.createElement("div",{className:"".concat(m.leftNav," border-end")},r.createElement("div",{className:"d-flex flex-column pt-3 h-100"},r.createElement(v,null),r.createElement(v,null),r.createElement(v,null),r.createElement(v,null),r.createElement(v,null),r.createElement("div",{className:"d-flex align-items-end h-100 w-100"},r.createElement("div",{className:"border-top p-3 w-100"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(function(){if(!e.presentation)return m.presentationPlaceholderIcon;switch(d.i.getMappedPresentationLevel(e.presentation.learningLevel)){case l.p.Level_1:return"bg-indigo ".concat(m.presentationIcon);case l.p.Level_3:return"bg-blue ".concat(m.presentationIcon);default:case l.p.Level_2:return"bg-green ".concat(m.presentationIcon)}}()," text-white rounded")},r.createElement(i.x,{svgName:u.vn.School,size:i.S.Large})),e.presentation?r.createElement("span",{className:"fw-semibold text-truncate ".concat(m.presentationName)},e.presentation.name):r.createElement("div",{className:"".concat(m.presentationPlaceholderText," fw-semibold")},r.createElement(c.x,{namespace:f,phrase:"schoolLevel"}))))))),r.createElement("div",{className:"w-100 h-100 overflow-hidden"},e.children)))}},62007:(e,t,n)=>{n.d(t,{u:()=>u});var r=n(32735),a=n(5465),i=n(5438),o=n(54610),c=n(2248);const l={banner:"CQxNy",title:"NzV5V",description1:"kjCZi",description2:"cBeyJ",placeholder:"Ks_Tl",playlistName:"eFPqz",thumbnailCol:"dgCQ7",videoInfoCol:"pzfE2"};function s(e){return r.createElement("li",{className:"row mb-2"},r.createElement("div",{className:"col-lg-4 col-5 ".concat(l.thumbnailCol)},e.video?r.createElement(i.u,{video:e.video,type:"cosmetic",hideDuration:!0,imageOptions:{size:o.h2.Small}}):r.createElement(a.oy,{type:a.mS.Video,extraClasses:"position-relative rounded-3 ".concat(l.placeholder)})),r.createElement("div",{className:"col-lg-8 col-7 ".concat(l.videoInfoCol)},r.createElement("div",{className:"".concat(l.title," rounded-pill bg-grey mb-1")}),r.createElement("div",{className:"".concat(l.description1," rounded-pill bg-grey mb-1")}),r.createElement("div",{className:"".concat(l.description2," rounded-pill bg-grey mb-1")})))}function u(e){var t,n,a,i=e.hidePlaceholders?0:Math.max(6-(null!==(n=null===(t=e.videos)||void 0===t?void 0:t.length)&&void 0!==n?n:0),0);return r.createElement(c.L,{presentation:e.presentation,curriculum:e.curriculum},r.createElement("div",{className:"bg-teal ".concat(l.banner," position-relative")},e.name&&r.createElement("div",{className:"h5 text-white mb-0 ".concat(l.playlistName)},e.name)),r.createElement("ul",{className:"list-unstyled mb-0 w-100 p-2"},null===(a=e.videos)||void 0===a?void 0:a.map((function(e){return r.createElement(s,{key:e.id,video:e})})),new Array(i).fill(0).map((function(e,t){return r.createElement(s,{key:t})}))))}},14495:(e,t,n)=>{n.r(t),n.d(t,{ONBOARDING_MAX_VIDEOS:()=>ne,OnboardingSelectVideosView:()=>ae});var r=n(32735),a=n(57900),i=n(2948),o=n(20354),c=n(65858),l=n(83345),s=n(89454),u=n(79967),d=n(84703),m=n(99742),f=n(86702),v=n(82817),h=n(86698),p=n(23481),g=n(89682),y=n(11607),b=n(5438),E=n(76177),N=n(54610),S=n(80143);const w={selected:"ZG5MR"};var x="onboarding.classificationVideos";function A(e){var t,n=(0,S.n)(null===(t=e.video.subjectPresentationAudiences)||void 0===t?void 0:t.data,e.audiences),a="border border-2 rounded-3 overflow-hidden";return e.isSelected?a+=" border-success":a+=" border-transparent",r.createElement(y.L,{onClick:function(){return e.onSelectVideo(e.video)},disabled:e.disabled},r.createElement(b.u,{type:"cosmetic",video:e.video,imageOptions:{size:N.h2.Medium},audience:n,checkMarkStatus:e.isSelected?g.h.Complete:g.h.Incomplete,setCheckMarkStatus:e.disabled?null:function(){return e.onSelectVideo(e.video),Promise.resolve()},extraClasses:a,imageClassName:e.isSelected?"".concat(w.selected):"",hideDuration:!0}))}function I(e){function t(t,n){return t?e.onSelectAll(n):e.onDeselectAll(n),Promise.resolve()}var n=e.totalSelected>=ne;return r.createElement("ul",{className:"list-unstyled"},e.classificationVideosGrouping.map((function(a){var i=a.videos.filter((function(t){return e.isSelected(t.id)})),o=i.length===a.videos.length,c=!o&&e.totalSelected+a.videos.length-i.length>ne;return r.createElement("li",{key:a.classificationId,className:"pb-3"},r.createElement("div",{className:"d-flex justify-content-between align-items-center mb-2"},r.createElement("h2",{className:"h5 mb-1 align-self-end"},a.classificationName),r.createElement(E.u,{title:c?p.T.getPhrase(x,"maxVideos",{limit:ne}):"",spanHack:!0,spanHackClassName:""},r.createElement("div",{className:"d-flex align-items-center"},r.createElement(y.L,{disabled:c,onClick:function(){return t(!o,a)},className:"me-2 text-nowrap ".concat(c?"text-muted":"")},r.createElement(l.x,{namespace:x,phrase:"selectAll"})),r.createElement(g.I,{status:o?g.h.Complete:g.h.Incomplete,setStatus:function(e){return t(e===g.h.Complete,a)},style:"outline",disabled:c})))),r.createElement("ul",{className:"row list-unstyled g-2"},a.videos.map((function(t){var i=e.isSelected(t.id),o=n&&!i;return r.createElement("li",{key:t.id,className:"col-sm-6 col-md-4 col-lg-6 col-xl-6"},r.createElement(E.u,{title:o?p.T.getPhrase(x,"maxVideos",{limit:ne}):"",spanHack:!0,spanHackClassName:""},r.createElement(A,{video:t,onSelectVideo:function(t){return e.onSelectVideo(t,a.classificationId,a.classificationName)},audiences:e.audiences,isSelected:e.isSelected(t.id),disabled:o})))}))))})))}var j=n(75359),L=n(12058),O=n(40695),k=n(75919),P=n(63478),C=n(24250),D=n(62007),T=n(75896),_=n(60736),R=n(49602),V=n(61699),M=n(1575),U=n(37802);function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||G(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){if(e){if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F=n(73190),H=n(90815);const Y={loaderText:"pg4Oj",annotation:"D3Acz"};function K(e){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K(e)}function W(){W=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),c=new k(r||[]);return a(o,"_invoke",{value:I(e,n,c)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var m="suspendedStart",f="suspendedYield",v="executing",h="completed",p={};function g(){}function y(){}function b(){}var E={};s(E,o,(function(){return this}));var N=Object.getPrototypeOf,S=N&&N(N(P([])));S&&S!==n&&r.call(S,o)&&(E=S);var w=b.prototype=g.prototype=Object.create(E);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(a,i,o,c){var l=d(e[a],e,i);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==K(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,c)}),(function(e){n("throw",e,o,c)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return i=i?i.then(a,a):a()}})}function I(t,n,r){var a=m;return function(i,o){if(a===v)throw new Error("Generator is already running");if(a===h){if("throw"===i)throw o;return{value:e,done:!0}}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===m)throw a=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=v;var s=d(t,n,r);if("normal"===s.type){if(a=r.done?h:f,s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=h,r.method="throw",r.arg=s.arg)}}}function j(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,j(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var i=d(a,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,p;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(K(t)+" is not iterable")}return y.prototype=b,a(w,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:y,configurable:!0}),y.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},x(A.prototype),s(A.prototype,c,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,a,i){void 0===i&&(i=Promise);var o=new A(u(e,n,r,a),i);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(w),s(w,l,"Generator"),s(w,o,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],c=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(l&&s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;O(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}function Q(e,t,n){var r;return r=function(e,t){if("object"!=K(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=K(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==K(r)?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){return function(e){if(Array.isArray(e))return $(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||X(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||X(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e,t){if(e){if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$(e,t):void 0}}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var J=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function c(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,c)}l((r=r.apply(e,t||[])).next())}))},ee=6e3,te=3,ne=100,re="onboarding.selectVideos";function ae(e){var t=(0,F.Q)(e.redirectUrl),n=t.onClickBack,p=t.exitOnboarding,g=t.completeStepAsync,y=t.onSaveError,b=(0,H.H)().logEvent,E=q((0,i.D)(f.y.ONBOARDING_VIDEOS_V2,[],{storage:a.Z1.LocalStorage}),2),N=E[0],S=E[1],w=o.a.useBasicFetch(s.O.presentationAudiences()),x=(0,h.y)().preferredPresentation,A=(0,v.M)().activeCurriculum,K=function(){var e,t,n=(0,h.y)().preferredPresentation,r=(0,U.r)(null),a=r.bulkOnboardingPreferencesState,i=r.isLoadingSettings,c=o.a.useBasicFetch(V.o.mySubjectPreferences()),l=_.A[n.id]||{},s=Object.entries(l).reduce((function(e,t){var n=B(t,2),r=n[0],a=n[1].name;return e[r]=a,e}),{}),u=R.b.hasBulkSelectedTopics(a)?l:null!==(t=null===(e=c.data)||void 0===e?void 0:e.reduce((function(e,t){return l[t.id]?(e[t.id]=l[t.id],e):e}),{}))&&void 0!==t?t:{},d=[],m={};Object.entries(u).forEach((function(e){var t,n=B(e,2),r=n[0],a=n[1];d.push.apply(d,function(e){if(Array.isArray(e))return z(e)}(t=a.videoIds)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||G(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a.videoIds.forEach((function(e){m[e]||(m[e]=[]),m[e].push(r)}))}));var f=o.a.useBasicFetchAll(T.m.chunk(T.m.uniq(d),25).map((function(e){return M.R.videos(e)}))),v=T.m.flatten(f.data||[]),p={};return null==v||v.forEach((function(e){m[e.id].forEach((function(t){p[t]||(p[t]={classificationId:t,classificationName:s[t],videos:[]}),p[t].videos.push(e)}))})),{hasCompleted:c.hasCompleted&&f.hasCompleted&&!i,data:Object.values(p)}}(),X=q(r.useState(K.hasCompleted),2),$=X[0],ae=X[1],ie=(0,u.k)(),oe=ie.lg||ie.xl||ie.xxl,ce=(0,d.n)();r.useEffect((function(){var e=window.setTimeout((function(){ae(!0)}),ee);return function(){window.clearTimeout(e)}}),[]);var le=K.hasCompleted&&w.hasCompleted,se=!$||!le,ue=se?{hasCustomButtons:!0}:{hasCustomButtons:!1,onClickNext:function(){return J(this,void 0,void 0,W().mark((function e(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(c.Vw.Click,c.Ix.Next,{videos:N.map((function(e){var t;return{id:e.data.id,name:e.data.name,thumbnailUrl:null===(t=e.data.thumbnail)||void 0===t?void 0:t.url,videoSubjectId:e.classificationId,videoSubjectName:e.classificationName}})),presentationId:x.id,presentationName:x.name,presentationDescription:x.description}),e.prev=1,e.next=4,g();case 4:e.next=10;break;case 6:return e.prev=6,e.t0=e.catch(1),y(),e.abrupt("return",Promise.reject());case 10:case"end":return e.stop()}}),e,null,[[1,6]])})))},onClickBack:n,onClickComeBackLater:p,disableNext:N.length<te||N.length>ne};return se&&!oe?r.createElement(P.B,{variant:"dark-blue"},r.createElement("div",{className:"w-100 d-flex align-items-center px-4 text-center flex-column text-white ".concat(Y.loaderText)},r.createElement("h1",{className:"h3 mb-4"},r.createElement(l.x,{namespace:re,phrase:"loadingHeading"})),r.createElement("p",{className:"h6 text-center"},r.createElement(l.x,{namespace:re,phrase:"searching"}))),r.createElement(C.R,{variant:"dark-blue",screenSize:"100%",hideThumbnailMask:!0})):r.createElement(O.z,{namespace:re},r.createElement(O.z.Left,{className:"bg-dark-blue d-flex flex-column align-items-end justify-content-center"},se?r.createElement(C.R,{variant:"dark-blue",screenSize:"50%"}):r.createElement(k.N,{contentPosition:"right",annotationUrl:N.length>=te?m.W.OnboardingV2.SelectVideos.LOOKING_GOOD:m.W.OnboardingV2.SelectVideos.BEFORE_SELECTION,annotationPosition:N.length>=te?"bottom-left":"top-left",annotationClassName:Y.annotation},r.createElement(D.u,{presentation:x,curriculum:A,videos:N.map((function(e){return e.data}))}))),r.createElement(O.z.Right,Object.assign({},ue),se?r.createElement(r.Fragment,null,r.createElement(j.W,{className:"text-center"},r.createElement(l.x,{phrase:ce?"loadingHeadingKdm":"loadingHeading"})),r.createElement("p",{className:"text-center"},r.createElement(l.x,{phrase:"searching"}))):r.createElement(r.Fragment,null,r.createElement(j.W,null,r.createElement(l.x,{phrase:ce?"headingKdm":"heading"})),r.createElement(L.X,null,r.createElement(l.x,{phrase:"info"})),r.createElement(I,{classificationVideosGrouping:K.data,onSelectVideo:function(e,t,n){b(c.Vw.Select,c.Ix.SelectVideo,{videoId:e.id,videoName:e.name,videoSubjectId:t,videoSubjectName:n,presentationId:x.id,presentationName:x.name,presentationDescription:x.description}),N.some((function(t){return t.data.id.toString()===e.id.toString()}))?S(N.filter((function(t){return t.data.id.toString()!==e.id.toString()}))):S([].concat(Z(N),[{data:e,classificationId:t,classificationName:n}]))},audiences:w.data,onSelectAll:function(e){b(c.Vw.Click,c.Ix.SelectAllVideos,{subjectId:e.classificationId,subjectName:e.classificationName,videos:e.videos.map((function(t){var n;return{id:t.id,name:t.name,thumbnailUrl:null===(n=t.thumbnail)||void 0===n?void 0:n.url,videoSubjectId:e.classificationId,videoSubjectName:e.classificationName}})),presentationId:x.id,presentationDescription:x.description});var t=N.reduce((function(e,t){return Object.assign(Object.assign({},e),Q({},t.data.id,!0))}),{});S([].concat(Z(N),Z(e.videos.filter((function(e){return!t[e.id]})).map((function(t){return{data:t,classificationId:e.classificationId,classificationName:e.classificationName}})))))},onDeselectAll:function(e){b(c.Vw.Click,c.Ix.DeselectAllVideos,{subjectId:e.classificationId,subjectName:e.classificationName,videos:e.videos.map((function(t){var n;return{id:t.id,name:t.name,thumbnailUrl:null===(n=t.thumbnail)||void 0===n?void 0:n.url,videoSubjectId:e.classificationId,videoSubjectName:e.classificationName}})),presentationId:x.id,presentationDescription:x.description});var t=e.videos.reduce((function(e,t){return Object.assign(Object.assign({},e),Q({},t.id,!0))}),{});S(N.filter((function(e){return!t[e.data.id]})))},isSelected:function(e){return N.some((function(t){return t.data.id.toString()===e.toString()}))},totalSelected:N.length}))))}}}]);
1
+ /*! For license information please see 3095-3540fb41a0-lite.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3095],{49602:(e,t,n)=>{var r;n.d(t,{b:()=>i}),function(e){e[e.None=0]="None",e[e.AllSubjects=1]="AllSubjects",e[e.AllLevels=2]="AllLevels",e[e.AllSubjectsAndAllLevels=3]="AllSubjectsAndAllLevels"}(r||(r={}));var a=n(25925),i={hasManyPresentationTypes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=0,n=0;return null==e||e.forEach((function(e){e.type===a.R.Subject?t++:e.type===a.R.Curriculum&&n++})),{hasManySubjectPresentations:t>1,hasManyCurriculumPresentations:n>1}},getBulkPreferencesState:function(e){return e===r.AllSubjectsAndAllLevels?{levels:!0,subjects:!0}:{levels:e===r.AllLevels,subjects:e===r.AllSubjects}},hasBulkSelectedLevels:function(e){return e===r.AllLevels||e===r.AllSubjectsAndAllLevels},hasBulkSelectedTopics:function(e){return e===r.AllSubjects||e===r.AllSubjectsAndAllLevels},getNextBulkState:function(e,t){var n=r.None,a=r.AllSubjects,i=r.AllLevels,o=r.AllSubjectsAndAllLevels,c="topics"===t;switch(e){case n:default:return c?a:i;case a:return c?n:o;case i:return c?o:n;case o:return c?i:a}}}},80143:(e,t,n)=>{n.d(t,{n:()=>i});var r=n(32735),a=n(69454);function i(e,t){var n=r.useMemo((function(){return(null==e?void 0:e.length)&&t&&a.T.shouldShowAudiences(t)?a.T.getSortedPresentationAudiences(e,t):null}),[e]);return r.useMemo((function(){return(null==n?void 0:n.length)?a.T.getMergedPresentationAudienceString(n):null}),[n])}},69454:(e,t,n)=>{n.d(t,{T:()=>d});var r=n(75896),a=n(1048),i=n(55171);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=/\d/,l=function(e){var t,n,a=r.m.first(e),i=r.m.last(e);return a.name===i.name?a.name:"Advanced"===i.name?"lower"===(t=a.name.split(" "),n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0].toLowerCase()?"Lower Sec - Adv":"Upper Sec - Adv":"Lower - Upper Sec"},s=/([0-9]+)/gi,u=/\s|\+/gi,d={getSortedPresentationAudiences:function(e,t){var n=e.filter((function(e){return!!e})).map((function(e){return e.id.toString()}));return t.filter((function(e){return n.includes(e.masterId.toString())}))},getMergedPresentationAudienceString:function(e){var t,n,a,o="";switch(+r.m.first(e).presentationId){case i.e.PresentationIds.DEFAULT:case i.e.PresentationIds.AU_SECONDARY:case i.e.PresentationIds.US_ELEMENTARY:case i.e.PresentationIds.AU_PRIMARY:case i.e.PresentationIds.STREAMABLE_LEARNING:if(1===e.length)return e[0];o=function(e){var t=e.map((function(e){return e.name})).join(" "),n=t.split(" ").filter((function(e){return!isNaN(+e)})).map((function(e){return+e}))||[],r=t.split(" ").filter((function(e){return isNaN(+e)}))||[],a=e.find((function(e){return!c.test(e.name)})),i=r.find((function(e){return e!==(null==a?void 0:a.name)}));if(e.length>1&&(i+="s"),a&&n.length)return"".concat(i," ").concat(a.name.charAt(0)," - ").concat(n.pop());var o=function(e){var t,n,r,a,i=!1,o=[];for(e=e.sort((function(e,t){return e-t})),r=0;r<e.length;r++)a=r+1,i||(t=e[r]),n=e[a],e[r]+1===n?i=!0:i?(o.push("".concat(t," - ").concat(e[r])),i=!1):(o.push("".concat(e[r])),i=!1);return o}(n);return"".concat(i," ").concat(o.join(", "))}(e);break;case i.e.PresentationIds.SCOTLAND_PRIMARY:case i.e.PresentationIds.INTERNATIONAL_PRIMARY:case i.e.PresentationIds.INTERNATIONAL_SECONDARY:if(1===e.length)return e[0];o=function(e){var t=e.map((function(e){return e.name})),n={};t.forEach((function(e,t){if(0!==t){var r=e.split(" ");Object.keys(n).forEach((function(e){r.includes(e)||delete n[e]}))}else e.split(" ").forEach((function(e,t){n[e]=0===t?"start":"end"}))}));var r=Object.keys(n)[0],a=n[r];if(!r)return e[0].name;var i=e[0].name,o=e[e.length-1].name,c=function(e){return e.split(r)[0]},l="".concat(c(i)," - ").concat(c(o));return"start"===a?"".concat(r," ").concat(l):"".concat(l," ").concat(r)}(e);break;case i.e.PresentationIds.ENGLISH_SECONDARY:o=l(e);break;case i.e.PresentationIds.SCOTLAND_SECONDARY:t=e,n=r.m.first(t),a=r.m.last(t),o=n.name===a.name?n.name:"Senior Phase"===a.name?"".concat(n.name," - Senior"):"Third - Fourth Level";break;case i.e.PresentationIds.ENGLAND_PRIMARY:o=function(e){var t=r.m.first(e),n=r.m.last(e),a=r.m.first(t.name.split(" ")),i=r.m.first(n.name.split(" ")),o=t.name.split(" ").find((function(e){return!isNaN(+e)})),c=n.name.split(" ").find((function(e){return!isNaN(+e)}));if(t===n)return"Key"===a||"Reception"===a?t.name:"".concat(a," KS").concat(o);var l="",s="";return l="Reception"===a?"R":"KS".concat(o),s="KS".concat(c),"Lower"===a&&"Upper"===i?"L ".concat(l," - U ").concat(s):("Lower"===a&&(l="Lower ".concat(l)),"Upper"===i&&(s="Upper ".concat(s)),"Key"===i&&(s=n.name),"".concat(l," - ").concat(s))}(e);case i.e.PresentationIds.US_MIDDLE:case i.e.PresentationIds.US_HIGH:}return o?{name:o}:null},sortMembersWithDuplicateNamesByAudience:function(e){var t=function(e){return e.length?(e.forEach((function(e){var a=+r.m.first(e.name.match(s));if(!t)return t=e,void(n=a);a<n&&(t=e)})),t):null;var t,n},n={},a=[];return e.forEach((function(e){if(!n[e.name])return n[e.name]=1,void a.push(e);a.push(e),n[e.name]++;var r=a.splice(a.length-n[e.name]).sort((function(e,n){var r=t(e.subjectPresentationAudiences.data),a=t(n.subjectPresentationAudiences.data);if(!r&&a)return 1;if(!a)return-1;var i=r.name.localeCompare(a.name);return 0===i?i:i>0?-1:1}));a=a.concat(r)})),a},getActiveAudiencesFromParams:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(a.t.isObject(t)&&!a.t.isEmpty(t)&&e&&e.length&&d.shouldShowAudiences(e)){var n=t.a;if(n){"string"==typeof n&&(n=[n]);var r=function(e){return e.replace(u,"").toLowerCase()},i=n.reduce((function(e,t){return e[r(t)]=t,e}),{});return e.filter((function(e){return i[r(e.name)]}))}}},getAudienceParams:function(e){return(null==e?void 0:e.length)?{a:e.map((function(e){return e.name}))}:null},shouldShowAudiences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return!!e&&e.length>1}}},75919:(e,t,n)=>{n.d(t,{N:()=>i});var r=n(32735);const a={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function i(e){return r.createElement("div",{className:(t="d-flex align-items-center text-center position-relative w-100 ".concat(a.imageContainer),"center"===e.contentPosition&&(t+=" px-5 justify-content-center"),"right"===e.contentPosition&&(t+=" me-n5 justify-content-end"),t)},!!e.annotationUrl&&r.createElement("div",{className:function(){var t=a.annotation;switch(e.annotationPosition){case"top-left":t+=" ".concat(a.above," ").concat(a.left);break;case"top-right":t+=" ".concat(a.above," ").concat(a.right);break;case"bottom-left":t+=" ".concat(a.below," ").concat(a.left);break;case"bottom-right":t+=" ".concat(a.below," ").concat(a.right)}return e.annotationClassName&&(t+=" ".concat(e.annotationClassName)),t}()},r.createElement("img",{className:"img-fluid",src:e.annotationUrl})),e.children,"right"===e.contentPosition&&r.createElement("div",{className:a.divider}));var t}i.defaultProps={contentPosition:"center"}},63478:(e,t,n)=>{n.d(t,{B:()=>a});var r=n(32735);function a(e){return r.createElement("div",{className:"w-100 h-100 position-fixed bg-".concat(e.variant)},e.children)}},24250:(e,t,n)=>{n.d(t,{R:()=>u});var r=n(32735),a=n(75896),i=n(55171),o=n(54610),c=n(79967),l=n(67453);function s(e,t){return"mobile"===t?function(e){var t=e%10,n={top:"".concat(4*e,"%")};switch(t){case 0:return n.left="12.5%",n.animationDelay="0.5s",n;case 1:return n.right="7.5%",n.animationDelay="1s",n;case 2:return n.left="10%",n;case 3:return n.right="2.5%",n.animationDelay="0.5s",n;case 4:return n.left="2.5%",n.animationDelay="1.5s",n;case 5:return n.right="10%",n;case 6:return n.left="12.5%",n.animationDelay="1.5s",n;case 7:return n.right="7.5%",n.animationDelay="0.5s",n;case 8:return n.left="5%",n.animationDelay="1s",n;case 9:return n.right="2.5%",n.animationDelay="1s",n;default:return n.left="10%",n.animationDelay="1.5s",n}}(e):"50%"===t?function(e){var t=e%10,n={top:"".concat(4*e,"%")};switch(t){case 0:return n.left="25%",n.animationDelay="0.5s",n;case 1:return n.right="15%",n.animationDelay="1s",n;case 2:return n.left="20%",n;case 3:return n.right="5%",n.animationDelay="0.5s",n;case 4:return n.left="5%",n.animationDelay="1.5s",n;case 5:return n.right="20%",n;case 6:return n.left="25%",n.animationDelay="1.5s",n;case 7:return n.right="15%",n.animationDelay="0.5s",n;case 8:return n.left="10%",n.animationDelay="1s",n;case 9:return n.right="5%",n.animationDelay="1s",n;default:return n.left="20%",n.animationDelay="1.5s",n}}(e):function(e){var t=e%10,n={top:"".concat(4*e,"%")};switch(t){case 0:return n.left="25%",n.animationDelay="0.5s",n;case 1:return n.right="30%",n.animationDelay="1s",n;case 2:return n.left="40%",n;case 3:return n.right="10%",n.animationDelay="0.5s",n;case 4:return n.left="10%",n.animationDelay="1.5s",n;case 5:return n.right="40%",n;case 6:return n.left="30%",n.animationDelay="1.5s",n;case 7:return n.right="30%",n.animationDelay="0.5s",n;case 8:return n.left="10%",n.animationDelay="1s",n;case 9:return n.right="10%",n.animationDelay="1s",n;default:return n.left="40%",n.animationDelay="1.5s",n}}(e)}var u=r.memo((function(e){var t=a.m.shuffle(i.e.Onboarding.LOADING_THUMBNAILS),n=(0,c.k)();return r.createElement("div",{className:"".concat("n2Qe4"," ").concat("50%"===e.screenSize?"w-50":"w-100")},t.map((function(t,a){return r.createElement("div",{key:a,className:"".concat("ZlA2t"," position-absolute rounded-3 overflow-hidden"),style:s(a,n.xs?"mobile":e.screenSize)},!e.hideThumbnailMask&&r.createElement("div",{className:"".concat("jNop3"," ").concat("blue"===e.variant?"jVOWE":"YNfFq")}),r.createElement("img",{className:"img-fluid",src:l.j.createUrl(t,{size:o.h2.Small})}))})))}))},2248:(e,t,n)=>{n.d(t,{L:()=>h});var r=n(32735),a=n(60376),i=n(83914),o=n(2786),c=n(83345),l=n(72639),s=n(79967),u=n(35223),d=n(10144);const m={dot:"AlRQD",logo:"L42gR",blackBar:"ESCxm",topNav:"a3G_4",leftNav:"YxGVV",belowHeader:"jc_cg",leftNavIcon:"U6i6r",leftNavText:"LnYlW",presentationPlaceholderIcon:"Ljaju",presentationIcon:"QdwPq",presentationPlaceholderText:"af06V",curriculumIcon:"N7T4T",curriculumIconSmall:"_6xrUg",curriculumContainer:"Z65qX",iconPlaceholder:"CKOXL",shadow:"zygeJ",presentationName:"Oj7Dt"};var f="onboarding.mockLayout";function v(){return r.createElement("div",{className:"d-flex align-items-center justify-content-center mb-2 px-3"},r.createElement("div",{className:"".concat(m.leftNavIcon," rounded-circle")}),r.createElement("div",{className:"".concat(m.leftNavText," rounded-pill")}))}function h(e){var t,n,h=(0,s.k)();return r.createElement("div",{className:"border border-dark border-2 bg-white rounded-3 user-select-none overflow-hidden position-relative h-100 w-100"},!!e.editingCurriculum&&r.createElement("div",{className:"w-100 h-100 position-absolute ".concat(m.shadow)},r.createElement("div",{className:"d-flex align-items-center h-100 w-50 ".concat(m.curriculumContainer)},r.createElement("div",{className:"bg-white rounded-3 border p-3 w-100"},r.createElement("h2",{className:"h6 text-start"},r.createElement(c.x,{namespace:f,phrase:"curriculum"})),e.curriculum?r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(m.curriculumIcon," rounded-circle me-2 border")},r.createElement(a.f,{imageUrl:null===(t=e.curriculum.cover)||void 0===t?void 0:t.url})),r.createElement("div",{className:"text-start"},e.curriculum.name)):r.createElement("div",{className:"d-flex align-items-center text-muted"},r.createElement("div",{className:"me-2 rounded-circle p-1 ".concat(m.iconPlaceholder)},r.createElement(a.f,{svgSize:i.S.Large,textVariant:"secondary",svgName:u.vn.GraduationCap})),r.createElement(c.x,{namespace:f,phrase:"selectCurriculum"}))))),r.createElement("div",{className:"bg-dark d-flex px-3 py-2 ".concat(m.blackBar)},r.createElement("div",{className:"rounded-circle me-2 ".concat(m.dot)}),r.createElement("div",{className:"rounded-circle me-2 ".concat(m.dot)}),r.createElement("div",{className:"rounded-circle ".concat(m.dot)})),r.createElement("div",{className:"border-bottom px-3 py-2 d-flex align-items-center ".concat(m.topNav)},r.createElement("div",{className:"".concat(m.logo," me-4")},h.xs?r.createElement(o.bc,null):r.createElement(o.$S,null)),r.createElement("div",{className:"form-control w-75 d-flex justify-content-start"},r.createElement(i.x,{svgName:u.vn.Search})),!!e.curriculum&&r.createElement("div",{className:"".concat(m.curriculumIconSmall," rounded-circle ms-2 me-n1 border")},r.createElement(a.f,{imageUrl:null===(n=e.curriculum.cover)||void 0===n?void 0:n.url}))),r.createElement("div",{className:"d-flex ".concat(m.belowHeader)},r.createElement("div",{className:"".concat(m.leftNav," border-end")},r.createElement("div",{className:"d-flex flex-column pt-3 h-100"},r.createElement(v,null),r.createElement(v,null),r.createElement(v,null),r.createElement(v,null),r.createElement(v,null),r.createElement("div",{className:"d-flex align-items-end h-100 w-100"},r.createElement("div",{className:"border-top p-3 w-100"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(function(){if(!e.presentation)return m.presentationPlaceholderIcon;switch(d.i.getMappedPresentationLevel(e.presentation.learningLevel)){case l.p.Level_1:return"bg-indigo ".concat(m.presentationIcon);case l.p.Level_3:return"bg-blue ".concat(m.presentationIcon);default:case l.p.Level_2:return"bg-green ".concat(m.presentationIcon)}}()," text-white rounded")},r.createElement(i.x,{svgName:u.vn.School,size:i.S.Large})),e.presentation?r.createElement("span",{className:"fw-semibold text-truncate ".concat(m.presentationName)},e.presentation.name):r.createElement("div",{className:"".concat(m.presentationPlaceholderText," fw-semibold")},r.createElement(c.x,{namespace:f,phrase:"schoolLevel"}))))))),r.createElement("div",{className:"w-100 h-100 overflow-hidden"},e.children)))}},62007:(e,t,n)=>{n.d(t,{u:()=>u});var r=n(32735),a=n(5465),i=n(5438),o=n(54610),c=n(2248);const l={banner:"CQxNy",title:"NzV5V",description1:"kjCZi",description2:"cBeyJ",placeholder:"Ks_Tl",playlistName:"eFPqz",thumbnailCol:"dgCQ7",videoInfoCol:"pzfE2"};function s(e){return r.createElement("li",{className:"row mb-2"},r.createElement("div",{className:"col-lg-4 col-5 ".concat(l.thumbnailCol)},e.video?r.createElement(i.u,{video:e.video,type:"cosmetic",hideDuration:!0,imageOptions:{size:o.h2.Small}}):r.createElement(a.oy,{type:a.mS.Video,extraClasses:"position-relative rounded-3 ".concat(l.placeholder)})),r.createElement("div",{className:"col-lg-8 col-7 ".concat(l.videoInfoCol)},r.createElement("div",{className:"".concat(l.title," rounded-pill bg-grey mb-1")}),r.createElement("div",{className:"".concat(l.description1," rounded-pill bg-grey mb-1")}),r.createElement("div",{className:"".concat(l.description2," rounded-pill bg-grey mb-1")})))}function u(e){var t,n,a,i=e.hidePlaceholders?0:Math.max(6-(null!==(n=null===(t=e.videos)||void 0===t?void 0:t.length)&&void 0!==n?n:0),0);return r.createElement(c.L,{presentation:e.presentation,curriculum:e.curriculum},r.createElement("div",{className:"bg-teal ".concat(l.banner," position-relative")},e.name&&r.createElement("div",{className:"h5 text-white mb-0 ".concat(l.playlistName)},e.name)),r.createElement("ul",{className:"list-unstyled mb-0 w-100 p-2"},null===(a=e.videos)||void 0===a?void 0:a.map((function(e){return r.createElement(s,{key:e.id,video:e})})),new Array(i).fill(0).map((function(e,t){return r.createElement(s,{key:t})}))))}},14495:(e,t,n)=>{n.r(t),n.d(t,{ONBOARDING_MAX_VIDEOS:()=>ne,OnboardingSelectVideosView:()=>ae});var r=n(32735),a=n(57900),i=n(2948),o=n(20354),c=n(65858),l=n(83345),s=n(89454),u=n(79967),d=n(84703),m=n(99742),f=n(86702),v=n(82817),h=n(86698),p=n(23481),g=n(89682),y=n(11607),b=n(5438),E=n(76177),N=n(54610),S=n(80143);const w={selected:"ZG5MR"};var x="onboarding.classificationVideos";function A(e){var t,n=(0,S.n)(null===(t=e.video.subjectPresentationAudiences)||void 0===t?void 0:t.data,e.audiences),a="border border-2 rounded-3 overflow-hidden";return e.isSelected?a+=" border-success":a+=" border-transparent",r.createElement(y.L,{onClick:function(){return e.onSelectVideo(e.video)},disabled:e.disabled},r.createElement(b.u,{type:"cosmetic",video:e.video,imageOptions:{size:N.h2.Medium},audience:n,checkMarkStatus:e.isSelected?g.h.Complete:g.h.Incomplete,setCheckMarkStatus:e.disabled?null:function(){return e.onSelectVideo(e.video),Promise.resolve()},extraClasses:a,imageClassName:e.isSelected?"".concat(w.selected):"",hideDuration:!0}))}function I(e){function t(t,n){return t?e.onSelectAll(n):e.onDeselectAll(n),Promise.resolve()}var n=e.totalSelected>=ne;return r.createElement("ul",{className:"list-unstyled"},e.classificationVideosGrouping.map((function(a){var i=a.videos.filter((function(t){return e.isSelected(t.id)})),o=i.length===a.videos.length,c=!o&&e.totalSelected+a.videos.length-i.length>ne;return r.createElement("li",{key:a.classificationId,className:"pb-3"},r.createElement("div",{className:"d-flex justify-content-between align-items-center mb-2"},r.createElement("h2",{className:"h5 mb-1 align-self-end"},a.classificationName),r.createElement(E.u,{title:c?p.T.getPhrase(x,"maxVideos",{limit:ne}):"",spanHack:!0,spanHackClassName:""},r.createElement("div",{className:"d-flex align-items-center"},r.createElement(y.L,{disabled:c,onClick:function(){return t(!o,a)},className:"me-2 text-nowrap ".concat(c?"text-muted":"")},r.createElement(l.x,{namespace:x,phrase:"selectAll"})),r.createElement(g.I,{status:o?g.h.Complete:g.h.Incomplete,setStatus:function(e){return t(e===g.h.Complete,a)},style:"outline",disabled:c})))),r.createElement("ul",{className:"row list-unstyled g-2"},a.videos.map((function(t){var i=e.isSelected(t.id),o=n&&!i;return r.createElement("li",{key:t.id,className:"col-sm-6 col-md-4 col-lg-6 col-xl-6"},r.createElement(E.u,{title:o?p.T.getPhrase(x,"maxVideos",{limit:ne}):"",spanHack:!0,spanHackClassName:""},r.createElement(A,{video:t,onSelectVideo:function(t){return e.onSelectVideo(t,a.classificationId,a.classificationName)},audiences:e.audiences,isSelected:e.isSelected(t.id),disabled:o})))}))))})))}var j=n(75359),L=n(12058),O=n(40695),k=n(75919),P=n(63478),C=n(24250),D=n(62007),T=n(75896),_=n(60736),R=n(49602),V=n(61699),M=n(1575),U=n(37802);function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||G(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){if(e){if("string"==typeof e)return z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z(e,t):void 0}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var F=n(73190),H=n(90815);const Y={loaderText:"pg4Oj",annotation:"D3Acz"};function K(e){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K(e)}function W(){W=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),c=new k(r||[]);return a(o,"_invoke",{value:I(e,n,c)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var m="suspendedStart",f="suspendedYield",v="executing",h="completed",p={};function g(){}function y(){}function b(){}var E={};s(E,o,(function(){return this}));var N=Object.getPrototypeOf,S=N&&N(N(P([])));S&&S!==n&&r.call(S,o)&&(E=S);var w=b.prototype=g.prototype=Object.create(E);function x(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(a,i,o,c){var l=d(e[a],e,i);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==K(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,c)}),(function(e){n("throw",e,o,c)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return i=i?i.then(a,a):a()}})}function I(t,n,r){var a=m;return function(i,o){if(a===v)throw new Error("Generator is already running");if(a===h){if("throw"===i)throw o;return{value:e,done:!0}}for(r.method=i,r.arg=o;;){var c=r.delegate;if(c){var l=j(c,r);if(l){if(l===p)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===m)throw a=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=v;var s=d(t,n,r);if("normal"===s.type){if(a=r.done?h:f,s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=h,r.method="throw",r.arg=s.arg)}}}function j(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,j(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var i=d(a,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,p;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(K(t)+" is not iterable")}return y.prototype=b,a(w,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:y,configurable:!0}),y.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},x(A.prototype),s(A.prototype,c,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,a,i){void 0===i&&(i=Promise);var o=new A(u(e,n,r,a),i);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(w),s(w,l,"Generator"),s(w,o,(function(){return this})),s(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(r,a){return c.type="throw",c.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],c=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(l&&s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var a=r.arg;O(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}function Q(e,t,n){var r;return r=function(e,t){if("object"!=K(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=K(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==K(r)?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e){return function(e){if(Array.isArray(e))return $(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||X(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||X(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e,t){if(e){if("string"==typeof e)return $(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$(e,t):void 0}}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var J=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function c(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,c)}l((r=r.apply(e,t||[])).next())}))},ee=6e3,te=3,ne=100,re="onboarding.selectVideos";function ae(e){var t=(0,F.Q)(e.redirectUrl),n=t.onClickBack,p=t.exitOnboarding,g=t.completeStepAsync,y=t.onSaveError,b=(0,H.H)().logEvent,E=q((0,i.D)(f.y.ONBOARDING_VIDEOS_V2,[],{storage:a.Z1.LocalStorage}),2),N=E[0],S=E[1],w=o.a.useBasicFetch(s.O.presentationAudiences()),x=(0,h.y)().preferredPresentation,A=(0,v.M)().activeCurriculum,K=function(){var e,t,n=(0,h.y)().preferredPresentation,r=(0,U.r)(null),a=r.bulkOnboardingPreferencesState,i=r.isLoadingSettings,c=o.a.useBasicFetch(V.o.mySubjectPreferences()),l=_.A[n.id]||{},s=Object.entries(l).reduce((function(e,t){var n=B(t,2),r=n[0],a=n[1].name;return e[r]=a,e}),{}),u=R.b.hasBulkSelectedTopics(a)?l:null!==(t=null===(e=c.data)||void 0===e?void 0:e.reduce((function(e,t){return l[t.id]?(e[t.id]=l[t.id],e):e}),{}))&&void 0!==t?t:{};Object.keys(u).length||(u=l);var d=[],m={};Object.entries(u).forEach((function(e){var t,n=B(e,2),r=n[0],a=n[1];d.push.apply(d,function(e){if(Array.isArray(e))return z(e)}(t=a.videoIds)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||G(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a.videoIds.forEach((function(e){m[e]||(m[e]=[]),m[e].push(r)}))}));var f=o.a.useBasicFetchAll(T.m.chunk(T.m.uniq(d),25).map((function(e){return M.R.videos(e)}))),v=T.m.flatten(f.data||[]),p={};return null==v||v.forEach((function(e){m[e.id].forEach((function(t){p[t]||(p[t]={classificationId:t,classificationName:s[t],videos:[]}),p[t].videos.push(e)}))})),{hasCompleted:c.hasCompleted&&f.hasCompleted&&!i,data:Object.values(p)}}(),X=q(r.useState(K.hasCompleted),2),$=X[0],ae=X[1],ie=(0,u.k)(),oe=ie.lg||ie.xl||ie.xxl,ce=(0,d.n)();r.useEffect((function(){var e=window.setTimeout((function(){ae(!0)}),ee);return function(){window.clearTimeout(e)}}),[]);var le=K.hasCompleted&&w.hasCompleted,se=!$||!le,ue=se?{hasCustomButtons:!0}:{hasCustomButtons:!1,onClickNext:function(){return J(this,void 0,void 0,W().mark((function e(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(c.Vw.Click,c.Ix.Next,{videos:N.map((function(e){var t;return{id:e.data.id,name:e.data.name,thumbnailUrl:null===(t=e.data.thumbnail)||void 0===t?void 0:t.url,videoSubjectId:e.classificationId,videoSubjectName:e.classificationName}})),presentationId:x.id,presentationName:x.name,presentationDescription:x.description}),e.prev=1,e.next=4,g();case 4:e.next=10;break;case 6:return e.prev=6,e.t0=e.catch(1),y(),e.abrupt("return",Promise.reject());case 10:case"end":return e.stop()}}),e,null,[[1,6]])})))},onClickBack:n,onClickComeBackLater:p,disableNext:N.length<te||N.length>ne};return se&&!oe?r.createElement(P.B,{variant:"dark-blue"},r.createElement("div",{className:"w-100 d-flex align-items-center px-4 text-center flex-column text-white ".concat(Y.loaderText)},r.createElement("h1",{className:"h3 mb-4"},r.createElement(l.x,{namespace:re,phrase:"loadingHeading"})),r.createElement("p",{className:"h6 text-center"},r.createElement(l.x,{namespace:re,phrase:"searching"}))),r.createElement(C.R,{variant:"dark-blue",screenSize:"100%",hideThumbnailMask:!0})):r.createElement(O.z,{namespace:re},r.createElement(O.z.Left,{className:"bg-dark-blue d-flex flex-column align-items-end justify-content-center"},se?r.createElement(C.R,{variant:"dark-blue",screenSize:"50%"}):r.createElement(k.N,{contentPosition:"right",annotationUrl:N.length>=te?m.W.OnboardingV2.SelectVideos.LOOKING_GOOD:m.W.OnboardingV2.SelectVideos.BEFORE_SELECTION,annotationPosition:N.length>=te?"bottom-left":"top-left",annotationClassName:Y.annotation},r.createElement(D.u,{presentation:x,curriculum:A,videos:N.map((function(e){return e.data}))}))),r.createElement(O.z.Right,Object.assign({},ue),se?r.createElement(r.Fragment,null,r.createElement(j.W,{className:"text-center"},r.createElement(l.x,{phrase:ce?"loadingHeadingKdm":"loadingHeading"})),r.createElement("p",{className:"text-center"},r.createElement(l.x,{phrase:"searching"}))):r.createElement(r.Fragment,null,r.createElement(j.W,null,r.createElement(l.x,{phrase:ce?"headingKdm":"heading"})),r.createElement(L.X,null,r.createElement(l.x,{phrase:"info"})),r.createElement(I,{classificationVideosGrouping:K.data,onSelectVideo:function(e,t,n){b(c.Vw.Select,c.Ix.SelectVideo,{videoId:e.id,videoName:e.name,videoSubjectId:t,videoSubjectName:n,presentationId:x.id,presentationName:x.name,presentationDescription:x.description}),N.some((function(t){return t.data.id.toString()===e.id.toString()}))?S(N.filter((function(t){return t.data.id.toString()!==e.id.toString()}))):S([].concat(Z(N),[{data:e,classificationId:t,classificationName:n}]))},audiences:w.data,onSelectAll:function(e){b(c.Vw.Click,c.Ix.SelectAllVideos,{subjectId:e.classificationId,subjectName:e.classificationName,videos:e.videos.map((function(t){var n;return{id:t.id,name:t.name,thumbnailUrl:null===(n=t.thumbnail)||void 0===n?void 0:n.url,videoSubjectId:e.classificationId,videoSubjectName:e.classificationName}})),presentationId:x.id,presentationDescription:x.description});var t=N.reduce((function(e,t){return Object.assign(Object.assign({},e),Q({},t.data.id,!0))}),{});S([].concat(Z(N),Z(e.videos.filter((function(e){return!t[e.id]})).map((function(t){return{data:t,classificationId:e.classificationId,classificationName:e.classificationName}})))))},onDeselectAll:function(e){b(c.Vw.Click,c.Ix.DeselectAllVideos,{subjectId:e.classificationId,subjectName:e.classificationName,videos:e.videos.map((function(t){var n;return{id:t.id,name:t.name,thumbnailUrl:null===(n=t.thumbnail)||void 0===n?void 0:n.url,videoSubjectId:e.classificationId,videoSubjectName:e.classificationName}})),presentationId:x.id,presentationDescription:x.description});var t=e.videos.reduce((function(e,t){return Object.assign(Object.assign({},e),Q({},t.id,!0))}),{});S(N.filter((function(e){return!t[e.data.id]})))},isSelected:function(e){return N.some((function(t){return t.data.id.toString()===e.toString()}))},totalSelected:N.length}))))}}}]);