@clickview/lite 0.40.3 → 0.40.5

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.
package/dist/bundles.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "appBundle": "bundle-31a8384c9c.min.js",
2
+ "appBundle": "bundle-41b5813bca.min.js",
3
3
  "cssBundle": "lite-app-0db7b97603.css",
4
4
  "polyfillBundle": "polyfills-5c0684cd85.min.js"
5
5
  }
@@ -1,2 +1,2 @@
1
- /*! For license information please see 3095-3194bffd37-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:()=>o}),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),o={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,o=r.AllLevels,i=r.AllSubjectsAndAllLevels,c="topics"===t;switch(e){case n:default:return c?a:o;case a:return c?n:i;case o:return c?i:n;case i:return c?o:a}}}},80143:(e,t,n)=>{n.d(t,{n:()=>o});var r=n(32735),a=n(69454);function o(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),o=n(55171);function i(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),o=r.m.last(e);return a.name===o.name?a.name:"Advanced"===o.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,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.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&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return i(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)?i(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,i="";switch(+r.m.first(e).presentationId){case o.e.PresentationIds.DEFAULT:case o.e.PresentationIds.AU_SECONDARY:case o.e.PresentationIds.US_ELEMENTARY:case o.e.PresentationIds.AU_PRIMARY:case o.e.PresentationIds.STREAMABLE_LEARNING:if(1===e.length)return e[0];i=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)})),o=r.find((function(e){return e!==(null==a?void 0:a.name)}));if(e.length>1&&(o+="s"),a&&n.length)return"".concat(o," ").concat(a.name.charAt(0)," - ").concat(n.pop());var i=function(e){var t,n,r,a,o=!1,i=[];for(e=e.sort((function(e,t){return e-t})),r=0;r<e.length;r++)a=r+1,o||(t=e[r]),n=e[a],e[r]+1===n?o=!0:o?(i.push("".concat(t," - ").concat(e[r])),o=!1):(i.push("".concat(e[r])),o=!1);return i}(n);return"".concat(o," ").concat(i.join(", "))}(e);break;case o.e.PresentationIds.SCOTLAND_PRIMARY:case o.e.PresentationIds.INTERNATIONAL_PRIMARY:case o.e.PresentationIds.INTERNATIONAL_SECONDARY:if(1===e.length)return e[0];i=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 o=e[0].name,i=e[e.length-1].name,c=function(e){return e.split(r)[0]},l="".concat(c(o)," - ").concat(c(i));return"start"===a?"".concat(r," ").concat(l):"".concat(l," ").concat(r)}(e);break;case o.e.PresentationIds.ENGLISH_SECONDARY:i=l(e);break;case o.e.PresentationIds.SCOTLAND_SECONDARY:t=e,n=r.m.first(t),a=r.m.last(t),i=n.name===a.name?n.name:"Senior Phase"===a.name?"".concat(n.name," - Senior"):"Third - Fourth Level";break;case o.e.PresentationIds.ENGLAND_PRIMARY:i=function(e){var t=r.m.first(e),n=r.m.last(e),a=r.m.first(t.name.split(" ")),o=r.m.first(n.name.split(" ")),i=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(i);var l="",s="";return l="Reception"===a?"R":"KS".concat(i),s="KS".concat(c),"Lower"===a&&"Upper"===o?"L ".concat(l," - U ").concat(s):("Lower"===a&&(l="Lower ".concat(l)),"Upper"===o&&(s="Upper ".concat(s)),"Key"===o&&(s=n.name),"".concat(l," - ").concat(s))}(e);case o.e.PresentationIds.US_MIDDLE:case o.e.PresentationIds.US_HIGH:}return i?{name:i}: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 o=r.name.localeCompare(a.name);return 0===o?o:o>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()},o=n.reduce((function(e,t){return e[r(t)]=t,e}),{});return e.filter((function(e){return o[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}}},12058:(e,t,n)=>{n.d(t,{X:()=>a});var r=n(32735);function a(e){return r.createElement("p",{className:e.className},e.children)}},75919:(e,t,n)=>{n.d(t,{N:()=>o});var r=n(32735);const a={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function o(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}o.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),o=n(55171),i=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(o.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:i.h2.Small})}))})))}))},2248:(e,t,n)=>{n.d(t,{L:()=>v});var r=n(32735),a=n(60376),o=n(83914),i=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 h(){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 v(e){var t,n,v=(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:o.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")},v.xs?r.createElement(i.bc,null):r.createElement(i.$S,null)),r.createElement("div",{className:"form-control w-75 d-flex justify-content-start"},r.createElement(o.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(h,null),r.createElement(h,null),r.createElement(h,null),r.createElement(h,null),r.createElement(h,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(o.x,{svgName:u.vn.School,size:o.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),o=n(5438),i=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(o.u,{video:e.video,type:"cosmetic",hideDuration:!0,imageOptions:{size:i.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,o=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(o).fill(0).map((function(e,t){return r.createElement(s,{key:t})}))))}},14495:(e,t,n)=>{n.r(t),n.d(t,{OnboardingSelectVideosView:()=>X});var r=n(32735),a=n(57900),o=n(2948),i=n(20354),c=n(65858),l=n(83345),s=n(89454),u=n(79967),d=n(99742),m=n(86702),f=n(82817),h=n(86698),v=n(89682),p=n(11607),y=n(5438),g=n(54610),b=n(80143);const E={selected:"ZG5MR"};function N(e){var t,n=(0,b.n)(null===(t=e.video.subjectPresentationAudiences)||void 0===t?void 0:t.data,e.audiences);return r.createElement(p.L,{onClick:function(){return e.onSelectVideo(e.video)}},r.createElement(y.u,{type:"cosmetic",video:e.video,imageOptions:{size:g.h2.Medium},audience:n,checkMarkStatus:e.isSelected?v.h.Complete:v.h.Incomplete,setCheckMarkStatus:function(){return e.onSelectVideo(e.video),Promise.resolve()},extraClasses:"border border-2 rounded-3 overflow-hidden ".concat(e.isSelected?"border-success":"border-transparent"),imageClassName:e.isSelected?"".concat(E.selected):"",hideDuration:!0}))}function S(e){return r.createElement("ul",{className:"list-unstyled"},e.classificationVideosGrouping.map((function(t){return r.createElement("li",{key:t.classificationId,className:"pb-3"},r.createElement("h2",{className:"h6"},t.classificationName),r.createElement("ul",{className:"row list-unstyled g-2"},t.videos.map((function(n){return r.createElement("li",{key:n.id,className:"col-sm-6 col-md-4 col-lg-6 col-xl-6"},r.createElement(N,{video:n,onSelectVideo:function(n){return e.onSelectVideo(n,t.classificationId,t.classificationName)},audiences:e.audiences,isSelected:e.isSelected(n.id)}))}))))})))}var w=n(75359),A=n(12058),x=n(40695),L=n(75919),I=n(63478),j=n(24250),k=n(62007),O=n(75896),P=n(60736),C=n(49602),D=n(61699),_=n(1575),T=n(37802);function R(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,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.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&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||M(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 M(e,t){if(e){if("string"==typeof e)return V(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)?V(e,t):void 0}}function V(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 B=n(73190),U=n(90815);const G={loaderText:"pg4Oj"};function z(e){return z="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},z(e)}function F(){F=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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 o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),c=new O(r||[]);return a(i,"_invoke",{value:L(e,n,c)}),i}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",h="executing",v="completed",p={};function y(){}function g(){}function b(){}var E={};s(E,i,(function(){return this}));var N=Object.getPrototypeOf,S=N&&N(N(P([])));S&&S!==n&&r.call(S,i)&&(E=S);var w=b.prototype=y.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==z(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,n,r){var a=m;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var c=r.delegate;if(c){var l=I(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=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var s=d(t,n,r);if("normal"===s.type){if(a=r.done?v:f,s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=v,r.method="throw",r.arg=s.arg)}}}function I(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,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,p;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function j(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 k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=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 o.next=o}}throw new TypeError(z(t)+" is not iterable")}return g.prototype=b,a(w,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"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}},A(x.prototype),s(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(w),s(w,l,"Generator"),s(w,i,(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,O.prototype={constructor:O,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(k),!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 o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.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 o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},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),k(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;k(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 Y(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,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.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&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||H(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 H(e,t){if(e){if("string"==typeof e)return K(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)?K(e,t):void 0}}function K(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 W=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(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(i,c)}l((r=r.apply(e,t||[])).next())}))},Q=6e3,Z=3,q="onboarding.selectVideos";function X(){var e=(0,B.Q)(),t=e.onClickBack,n=e.exitOnboarding,v=e.completeStepAsync,p=e.onSaveError,y=(0,U.H)().logEvent,g=Y((0,o.D)(m.y.ONBOARDING_VIDEOS_V2,[],{storage:a.Z1.LocalStorage}),2),b=g[0],E=g[1],N=i.a.useBasicFetch(s.O.presentationAudiences()),z=(0,h.y)().preferredPresentation,X=(0,f.M)().activeCurriculum,$=function(){var e,t,n=(0,h.y)().preferredPresentation,r=(0,T.r)(null),a=r.bulkOnboardingPreferencesState,o=r.isLoadingSettings,c=i.a.useBasicFetch(D.o.mySubjectPreferences()),l=P.A[n.id]||{},s=Object.entries(l).reduce((function(e,t){var n=R(t,2),r=n[0],a=n[1].name;return e[r]=a,e}),{}),u=C.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=R(e,2),r=n[0],a=n[1];d.push.apply(d,function(e){if(Array.isArray(e))return V(e)}(t=a.videoIds)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||M(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=i.a.useBasicFetchAll(O.m.chunk(O.m.uniq(d),25).map((function(e){return _.R.videos(e)}))),v=O.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&&!o,data:Object.values(p)}}(),J=Y(r.useState($.hasCompleted),2),ee=J[0],te=J[1],ne=(0,u.k)(),re=ne.lg||ne.xl||ne.xxl;r.useEffect((function(){var e=window.setTimeout((function(){te(!0)}),Q);return function(){window.clearTimeout(e)}}),[]);var ae=$.hasCompleted&&N.hasCompleted,oe=!ee||!ae,ie=oe?{hasCustomButtons:!0}:{hasCustomButtons:!1,onClickNext:function(){return W(this,void 0,void 0,F().mark((function e(){return F().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(c.Vw.Click,c.Ix.Next,{videos:b.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:z.id,presentationDescription:z.description}),e.prev=1,e.next=4,v();case 4:e.next=10;break;case 6:return e.prev=6,e.t0=e.catch(1),p(),e.abrupt("return",Promise.reject());case 10:case"end":return e.stop()}}),e,null,[[1,6]])})))},onClickBack:t,onClickComeBackLater:n,disableNext:b.length<Z};return oe&&!re?r.createElement(I.B,{variant:"dark-blue"},r.createElement("div",{className:"w-100 d-flex align-items-center px-4 text-center flex-column text-white ".concat(G.loaderText)},r.createElement("h1",{className:"h3 mb-4"},r.createElement(l.x,{namespace:q,phrase:"loadingHeading"})),r.createElement("p",{className:"h6"},r.createElement(l.x,{namespace:q,phrase:"searching"}))),r.createElement(j.R,{variant:"dark-blue",screenSize:"100%",hideThumbnailMask:!0})):r.createElement(x.z,{namespace:q},r.createElement(x.z.Left,{className:"bg-dark-blue d-flex flex-column align-items-end justify-content-center"},oe?r.createElement(j.R,{variant:"dark-blue",screenSize:"50%"}):r.createElement(L.N,{contentPosition:"right",annotationUrl:b.length>=Z?d.W.OnboardingV2.SelectVideos.LOOKING_GOOD:d.W.OnboardingV2.SelectVideos.BEFORE_SELECTION,annotationPosition:b.length>=Z?"bottom-left":"top-left"},r.createElement(k.u,{presentation:z,curriculum:X,videos:b.map((function(e){return e.data}))}))),r.createElement(x.z.Right,Object.assign({},ie),oe?r.createElement(r.Fragment,null,r.createElement(w.W,null,r.createElement(l.x,{phrase:"loadingHeading"})),r.createElement("p",null,r.createElement(l.x,{phrase:"searching"}))):r.createElement(r.Fragment,null,r.createElement(w.W,null,r.createElement(l.x,{phrase:"heading"})),r.createElement(A.X,null,r.createElement(l.x,{phrase:"info"})),r.createElement(S,{classificationVideosGrouping:$.data,onSelectVideo:function(e,t,n){var r;y(c.Vw.Select,c.Ix.SelectVideo,{videoId:e.id,videoName:e.name,videoSubjectId:t,videoSubjectName:n,presentationId:z.id,presentationDescription:z.description}),b.some((function(t){return t.data.id.toString()===e.id.toString()}))?E(b.filter((function(t){return t.data.id.toString()!==e.id.toString()}))):E([].concat(function(e){if(Array.isArray(e))return K(e)}(r=b)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||H(r)||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.")}(),[{data:e,classificationId:t,classificationName:n}]))},audiences:N.data,isSelected:function(e){return b.some((function(t){return t.data.id.toString()===e.toString()}))}}))))}}}]);
1
+ /*! For license information please see 3095-675ebeaa15-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:()=>o}),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),o={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,o=r.AllLevels,i=r.AllSubjectsAndAllLevels,c="topics"===t;switch(e){case n:default:return c?a:o;case a:return c?n:i;case o:return c?i:n;case i:return c?o:a}}}},80143:(e,t,n)=>{n.d(t,{n:()=>o});var r=n(32735),a=n(69454);function o(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),o=n(55171);function i(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),o=r.m.last(e);return a.name===o.name?a.name:"Advanced"===o.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,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.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&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return i(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)?i(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,i="";switch(+r.m.first(e).presentationId){case o.e.PresentationIds.DEFAULT:case o.e.PresentationIds.AU_SECONDARY:case o.e.PresentationIds.US_ELEMENTARY:case o.e.PresentationIds.AU_PRIMARY:case o.e.PresentationIds.STREAMABLE_LEARNING:if(1===e.length)return e[0];i=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)})),o=r.find((function(e){return e!==(null==a?void 0:a.name)}));if(e.length>1&&(o+="s"),a&&n.length)return"".concat(o," ").concat(a.name.charAt(0)," - ").concat(n.pop());var i=function(e){var t,n,r,a,o=!1,i=[];for(e=e.sort((function(e,t){return e-t})),r=0;r<e.length;r++)a=r+1,o||(t=e[r]),n=e[a],e[r]+1===n?o=!0:o?(i.push("".concat(t," - ").concat(e[r])),o=!1):(i.push("".concat(e[r])),o=!1);return i}(n);return"".concat(o," ").concat(i.join(", "))}(e);break;case o.e.PresentationIds.SCOTLAND_PRIMARY:case o.e.PresentationIds.INTERNATIONAL_PRIMARY:case o.e.PresentationIds.INTERNATIONAL_SECONDARY:if(1===e.length)return e[0];i=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 o=e[0].name,i=e[e.length-1].name,c=function(e){return e.split(r)[0]},l="".concat(c(o)," - ").concat(c(i));return"start"===a?"".concat(r," ").concat(l):"".concat(l," ").concat(r)}(e);break;case o.e.PresentationIds.ENGLISH_SECONDARY:i=l(e);break;case o.e.PresentationIds.SCOTLAND_SECONDARY:t=e,n=r.m.first(t),a=r.m.last(t),i=n.name===a.name?n.name:"Senior Phase"===a.name?"".concat(n.name," - Senior"):"Third - Fourth Level";break;case o.e.PresentationIds.ENGLAND_PRIMARY:i=function(e){var t=r.m.first(e),n=r.m.last(e),a=r.m.first(t.name.split(" ")),o=r.m.first(n.name.split(" ")),i=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(i);var l="",s="";return l="Reception"===a?"R":"KS".concat(i),s="KS".concat(c),"Lower"===a&&"Upper"===o?"L ".concat(l," - U ").concat(s):("Lower"===a&&(l="Lower ".concat(l)),"Upper"===o&&(s="Upper ".concat(s)),"Key"===o&&(s=n.name),"".concat(l," - ").concat(s))}(e);case o.e.PresentationIds.US_MIDDLE:case o.e.PresentationIds.US_HIGH:}return i?{name:i}: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 o=r.name.localeCompare(a.name);return 0===o?o:o>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()},o=n.reduce((function(e,t){return e[r(t)]=t,e}),{});return e.filter((function(e){return o[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}}},12058:(e,t,n)=>{n.d(t,{X:()=>a});var r=n(32735);function a(e){return r.createElement("p",{className:e.className},e.children)}},75919:(e,t,n)=>{n.d(t,{N:()=>o});var r=n(32735);const a={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function o(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}o.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),o=n(55171),i=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(o.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:i.h2.Small})}))})))}))},2248:(e,t,n)=>{n.d(t,{L:()=>v});var r=n(32735),a=n(60376),o=n(83914),i=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 h(){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 v(e){var t,n,v=(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:o.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")},v.xs?r.createElement(i.bc,null):r.createElement(i.$S,null)),r.createElement("div",{className:"form-control w-75 d-flex justify-content-start"},r.createElement(o.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(h,null),r.createElement(h,null),r.createElement(h,null),r.createElement(h,null),r.createElement(h,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(o.x,{svgName:u.vn.School,size:o.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),o=n(5438),i=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(o.u,{video:e.video,type:"cosmetic",hideDuration:!0,imageOptions:{size:i.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,o=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(o).fill(0).map((function(e,t){return r.createElement(s,{key:t})}))))}},14495:(e,t,n)=>{n.r(t),n.d(t,{OnboardingSelectVideosView:()=>X});var r=n(32735),a=n(57900),o=n(2948),i=n(20354),c=n(65858),l=n(83345),s=n(89454),u=n(79967),d=n(99742),m=n(86702),f=n(82817),h=n(86698),v=n(89682),p=n(11607),y=n(5438),g=n(54610),b=n(80143);const E={selected:"ZG5MR"};function N(e){var t,n=(0,b.n)(null===(t=e.video.subjectPresentationAudiences)||void 0===t?void 0:t.data,e.audiences);return r.createElement(p.L,{onClick:function(){return e.onSelectVideo(e.video)}},r.createElement(y.u,{type:"cosmetic",video:e.video,imageOptions:{size:g.h2.Medium},audience:n,checkMarkStatus:e.isSelected?v.h.Complete:v.h.Incomplete,setCheckMarkStatus:function(){return e.onSelectVideo(e.video),Promise.resolve()},extraClasses:"border border-2 rounded-3 overflow-hidden ".concat(e.isSelected?"border-success":"border-transparent"),imageClassName:e.isSelected?"".concat(E.selected):"",hideDuration:!0}))}function S(e){return r.createElement("ul",{className:"list-unstyled"},e.classificationVideosGrouping.map((function(t){return r.createElement("li",{key:t.classificationId,className:"pb-3"},r.createElement("h2",{className:"h6"},t.classificationName),r.createElement("ul",{className:"row list-unstyled g-2"},t.videos.map((function(n){return r.createElement("li",{key:n.id,className:"col-sm-6 col-md-4 col-lg-6 col-xl-6"},r.createElement(N,{video:n,onSelectVideo:function(n){return e.onSelectVideo(n,t.classificationId,t.classificationName)},audiences:e.audiences,isSelected:e.isSelected(n.id)}))}))))})))}var w=n(75359),A=n(12058),x=n(40695),L=n(75919),I=n(63478),j=n(24250),k=n(62007),O=n(75896),P=n(60736),C=n(49602),D=n(61699),_=n(1575),T=n(37802);function R(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,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.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&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||M(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 M(e,t){if(e){if("string"==typeof e)return V(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)?V(e,t):void 0}}function V(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 B=n(73190),U=n(90815);const G={loaderText:"pg4Oj"};function z(e){return z="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},z(e)}function F(){F=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.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 o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),c=new O(r||[]);return a(i,"_invoke",{value:L(e,n,c)}),i}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",h="executing",v="completed",p={};function y(){}function g(){}function b(){}var E={};s(E,i,(function(){return this}));var N=Object.getPrototypeOf,S=N&&N(N(P([])));S&&S!==n&&r.call(S,i)&&(E=S);var w=b.prototype=y.prototype=Object.create(E);function A(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){function n(a,o,i,c){var l=d(e[a],e,o);if("throw"!==l.type){var s=l.arg,u=s.value;return u&&"object"==z(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(u).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return o=o?o.then(a,a):a()}})}function L(t,n,r){var a=m;return function(o,i){if(a===h)throw new Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(r.method=o,r.arg=i;;){var c=r.delegate;if(c){var l=I(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=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=h;var s=d(t,n,r);if("normal"===s.type){if(a=r.done?v:f,s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=v,r.method="throw",r.arg=s.arg)}}}function I(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,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var o=d(a,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,p;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function j(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 k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=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 o.next=o}}throw new TypeError(z(t)+" is not iterable")}return g.prototype=b,a(w,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=s(b,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"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}},A(x.prototype),s(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,a,o){void 0===o&&(o=Promise);var i=new x(u(e,n,r,a),o);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},A(w),s(w,l,"Generator"),s(w,i,(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,O.prototype={constructor:O,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(k),!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 o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.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 o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(i)},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),k(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;k(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 Y(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,o,i,c=[],l=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.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&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return c}}(e,t)||H(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 H(e,t){if(e){if("string"==typeof e)return K(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)?K(e,t):void 0}}function K(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 W=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function c(e){try{l(r.throw(e))}catch(e){o(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(i,c)}l((r=r.apply(e,t||[])).next())}))},Q=6e3,Z=3,q="onboarding.selectVideos";function X(){var e=(0,B.Q)(),t=e.onClickBack,n=e.exitOnboarding,v=e.completeStepAsync,p=e.onSaveError,y=(0,U.H)().logEvent,g=Y((0,o.D)(m.y.ONBOARDING_VIDEOS_V2,[],{storage:a.Z1.LocalStorage}),2),b=g[0],E=g[1],N=i.a.useBasicFetch(s.O.presentationAudiences()),z=(0,h.y)().preferredPresentation,X=(0,f.M)().activeCurriculum,$=function(){var e,t,n=(0,h.y)().preferredPresentation,r=(0,T.r)(null),a=r.bulkOnboardingPreferencesState,o=r.isLoadingSettings,c=i.a.useBasicFetch(D.o.mySubjectPreferences()),l=P.A[n.id]||{},s=Object.entries(l).reduce((function(e,t){var n=R(t,2),r=n[0],a=n[1].name;return e[r]=a,e}),{}),u=C.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=R(e,2),r=n[0],a=n[1];d.push.apply(d,function(e){if(Array.isArray(e))return V(e)}(t=a.videoIds)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||M(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=i.a.useBasicFetchAll(O.m.chunk(O.m.uniq(d),25).map((function(e){return _.R.videos(e)}))),v=O.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&&!o,data:Object.values(p)}}(),J=Y(r.useState($.hasCompleted),2),ee=J[0],te=J[1],ne=(0,u.k)(),re=ne.lg||ne.xl||ne.xxl;r.useEffect((function(){var e=window.setTimeout((function(){te(!0)}),Q);return function(){window.clearTimeout(e)}}),[]);var ae=$.hasCompleted&&N.hasCompleted,oe=!ee||!ae,ie=oe?{hasCustomButtons:!0}:{hasCustomButtons:!1,onClickNext:function(){return W(this,void 0,void 0,F().mark((function e(){return F().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(c.Vw.Click,c.Ix.Next,{videos:b.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:z.id,presentationName:z.name,presentationDescription:z.description}),e.prev=1,e.next=4,v();case 4:e.next=10;break;case 6:return e.prev=6,e.t0=e.catch(1),p(),e.abrupt("return",Promise.reject());case 10:case"end":return e.stop()}}),e,null,[[1,6]])})))},onClickBack:t,onClickComeBackLater:n,disableNext:b.length<Z};return oe&&!re?r.createElement(I.B,{variant:"dark-blue"},r.createElement("div",{className:"w-100 d-flex align-items-center px-4 text-center flex-column text-white ".concat(G.loaderText)},r.createElement("h1",{className:"h3 mb-4"},r.createElement(l.x,{namespace:q,phrase:"loadingHeading"})),r.createElement("p",{className:"h6"},r.createElement(l.x,{namespace:q,phrase:"searching"}))),r.createElement(j.R,{variant:"dark-blue",screenSize:"100%",hideThumbnailMask:!0})):r.createElement(x.z,{namespace:q},r.createElement(x.z.Left,{className:"bg-dark-blue d-flex flex-column align-items-end justify-content-center"},oe?r.createElement(j.R,{variant:"dark-blue",screenSize:"50%"}):r.createElement(L.N,{contentPosition:"right",annotationUrl:b.length>=Z?d.W.OnboardingV2.SelectVideos.LOOKING_GOOD:d.W.OnboardingV2.SelectVideos.BEFORE_SELECTION,annotationPosition:b.length>=Z?"bottom-left":"top-left"},r.createElement(k.u,{presentation:z,curriculum:X,videos:b.map((function(e){return e.data}))}))),r.createElement(x.z.Right,Object.assign({},ie),oe?r.createElement(r.Fragment,null,r.createElement(w.W,null,r.createElement(l.x,{phrase:"loadingHeading"})),r.createElement("p",null,r.createElement(l.x,{phrase:"searching"}))):r.createElement(r.Fragment,null,r.createElement(w.W,null,r.createElement(l.x,{phrase:"heading"})),r.createElement(A.X,null,r.createElement(l.x,{phrase:"info"})),r.createElement(S,{classificationVideosGrouping:$.data,onSelectVideo:function(e,t,n){var r;y(c.Vw.Select,c.Ix.SelectVideo,{videoId:e.id,videoName:e.name,videoSubjectId:t,videoSubjectName:n,presentationId:z.id,presentationName:z.name,presentationDescription:z.description}),b.some((function(t){return t.data.id.toString()===e.id.toString()}))?E(b.filter((function(t){return t.data.id.toString()!==e.id.toString()}))):E([].concat(function(e){if(Array.isArray(e))return K(e)}(r=b)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||H(r)||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.")}(),[{data:e,classificationId:t,classificationName:n}]))},audiences:N.data,isSelected:function(e){return b.some((function(t){return t.data.id.toString()===e.toString()}))}}))))}}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 537-d271286d5d-lite.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[537],{2192:(e,t,n)=>{n.d(t,{M:()=>p,Q:()=>g});var r=n(32735),a=n(45157),c=n(36848),o=n(60376),l=n(5465),i=n(83914),s=n(83345),u=n(54610),m=n(67453),d=n(35223),f=n(92038),v=function(e){var t=e.name,n=e.multiline,a="".concat(f.Z.comingSoonPanel," \n d-flex flex-column align-items-center justify-content-center px-3 text-center"),c="";return n?c+=" ".concat(f.Z.clamped," clamp-2"):(a+=" text-nowrap",c+=" text-truncate"),r.createElement("div",{className:a},r.createElement("small",{className:"text-muted"},r.createElement(s.x,{namespace:"shared.subjectWidgetItem",phrase:"comingSoon"})),r.createElement("p",{className:"".concat(f.Z.name," h6")},r.createElement("span",{className:c},t)))},h=function(e){var t=e.name,n=e.multiline,a=e.subtitle,c="px-3 d-flex flex-column justify-content-center",o="".concat(f.Z.name," h6");return n?o+=" clamp-3 text-start":(c+=" text-nowrap text-truncate",o+=" text-truncate mb-0 pb-1"),r.createElement("div",{className:c},a&&r.createElement("div",{className:"text-secondary clamp-1 ".concat(f.Z.text)},a),r.createElement("div",{className:o,title:t},t))};function p(e){var t=m.j.createUrl(e.coverUrl,{size:e.isLarge?u.h2.Medium:u.h2.Small}),n={name:e.data.name,multiline:e.isLarge||e.multiline,subtitle:e.subtitle};return r.createElement("div",{className:"border d-flex position-relative ".concat(e.className," ").concat(f.Z.widgetItem," ").concat(e.isSelected?"border-success border-2":""),id:"".concat(e.data.id,"-").concat(a.Y.getRandomInt())},e.isSelected&&r.createElement("div",{className:"".concat(f.Z.selectedMask," border-2")}),r.createElement("div",{className:"".concat(f.Z.imagePanel," ").concat(e.isLarge?f.Z.large:"")},e.isSelected&&!e.hideCheckmark&&r.createElement("div",{className:f.Z.selected},r.createElement(o.f,{svgName:d.vn.Check,svgSize:i.S.Large,textVariant:"white",variant:"green"})),r.createElement("div",{className:"".concat(f.Z.image," ").concat(e.imageClassName),style:e.coverUrl?{backgroundImage:"url('".concat(t,"')")}:{}}),!e.hideFallback&&r.createElement(l.oy,{type:l.mS.Subject,extraClasses:e.isLarge?f.Z.large:""})),e.isComingSoon?r.createElement(v,Object.assign({},n)):r.createElement(h,Object.assign({},n)))}function g(e){var t,n=e.getChildAppLink?e.getChildAppLink(e.data):null;return r.createElement(r.Fragment,null,n?r.createElement(c.F,{className:f.Z.appLink,appLink:n,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,appLinkOptions:null===(t=e.getChildAppLinkOptions)||void 0===t?void 0:t.call(e)},r.createElement(p,Object.assign({},e))):r.createElement(p,Object.assign({},e)))}},12058:(e,t,n)=>{n.d(t,{X:()=>a});var r=n(32735);function a(e){return r.createElement("p",{className:e.className},e.children)}},75919:(e,t,n)=>{n.d(t,{N:()=>c});var r=n(32735);const a={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function c(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}c.defaultProps={contentPosition:"center"}},39375:(e,t,n)=>{n.d(t,{Y:()=>u});var r=n(32735),a=n(54610),c=n(67453),o=n(2248);const l={magicTab:"H5jzm",subjectPlaceholder:"r1L6T",placeholderCover:"z9CFT",promotedTopicPlaceholder:"PbYs6",promotedTopicPlaceholderText:"hZ8Nf"};function i(e){return r.createElement("li",{className:"col-4"},r.createElement("div",{className:"d-flex border rounded-3 overflow-hidden ".concat(l.subjectPlaceholder)},e.coverUrl?r.createElement("div",{className:l.placeholderCover},r.createElement("img",{className:"img-fluid",src:c.j.createUrl(e.coverUrl,{size:a.h2.Small})})):r.createElement("div",{className:"".concat(l.placeholderCover," bg-light-blue")})))}function s(){return r.createElement("li",{className:"col-4"},r.createElement("div",{className:"bg-light-blue rounded-3 w-100 p-1 ".concat(l.promotedTopicPlaceholder)}))}function u(e){var t,n,a,c=Math.max(12-(null!==(n=null===(t=e.subjects)||void 0===t?void 0:t.length)&&void 0!==n?n:0),0);return r.createElement(o.L,{presentation:e.presentation,curriculum:e.curriculum,editingCurriculum:e.editingCurriculum},r.createElement("div",{className:"px-3 pt-3 w-100 d-flex flex-column align-items-center"},r.createElement("div",{className:"rounded-3 border overflow-hidden d-flex mb-2"},r.createElement("div",{className:"bg-light ".concat(l.magicTab)}),r.createElement("div",{className:"".concat(l.magicTab)})),r.createElement("ul",{className:"list-unstyled mb-0 row w-100 g-xl-2 g-lg-1 mb-2"},null===(a=e.subjects)||void 0===a?void 0:a.map((function(e){var t;return r.createElement(i,{key:e.id,coverUrl:null===(t=e.cover)||void 0===t?void 0:t.url})})),new Array(c).fill(0).map((function(e,t){return r.createElement(i,{key:t})}))),r.createElement("ul",{className:"list-unstyled mb-0 row w-100 g-xl-2 g-lg-1"},r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null))))}},2248:(e,t,n)=>{n.d(t,{L:()=>h});var r=n(32735),a=n(60376),c=n(83914),o=n(2786),l=n(83345),i=n(72639),s=n(79967),u=n(35223),m=n(10144);const d={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(d.leftNavIcon," rounded-circle")}),r.createElement("div",{className:"".concat(d.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(d.shadow)},r.createElement("div",{className:"d-flex align-items-center h-100 w-50 ".concat(d.curriculumContainer)},r.createElement("div",{className:"bg-white rounded-3 border p-3 w-100"},r.createElement("h2",{className:"h6 text-start"},r.createElement(l.x,{namespace:f,phrase:"curriculum"})),e.curriculum?r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(d.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(d.iconPlaceholder)},r.createElement(a.f,{svgSize:c.S.Large,textVariant:"secondary",svgName:u.vn.GraduationCap})),r.createElement(l.x,{namespace:f,phrase:"selectCurriculum"}))))),r.createElement("div",{className:"bg-dark d-flex px-3 py-2 ".concat(d.blackBar)},r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle ".concat(d.dot)})),r.createElement("div",{className:"border-bottom px-3 py-2 d-flex align-items-center ".concat(d.topNav)},r.createElement("div",{className:"".concat(d.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(c.x,{svgName:u.vn.Search})),!!e.curriculum&&r.createElement("div",{className:"".concat(d.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(d.belowHeader)},r.createElement("div",{className:"".concat(d.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 d.presentationPlaceholderIcon;switch(m.i.getMappedPresentationLevel(e.presentation.learningLevel)){case i.p.Level_1:return"bg-indigo ".concat(d.presentationIcon);case i.p.Level_3:return"bg-blue ".concat(d.presentationIcon);default:case i.p.Level_2:return"bg-green ".concat(d.presentationIcon)}}()," text-white rounded")},r.createElement(c.x,{svgName:u.vn.School,size:c.S.Large})),e.presentation?r.createElement("span",{className:"fw-semibold text-truncate ".concat(d.presentationName)},e.presentation.name):r.createElement("div",{className:"".concat(d.presentationPlaceholderText," fw-semibold")},r.createElement(l.x,{namespace:f,phrase:"schoolLevel"}))))))),r.createElement("div",{className:"w-100 h-100 overflow-hidden"},e.children)))}},1039:(e,t,n)=>{n.r(t),n.d(t,{OnboardingSchoolLevelView:()=>P});var r=n(32735),a=n(57900),c=n(2948),o=n(65858),l=n(11607),i=n(83345),s=n(2192),u=n(38143),m=n(99742),d=n(86698),f=n(75359),v=n(12058),h=n(40695),p=n(75919),g=n(39375),y=n(73190),E=n(90815);const b={cover:"p3PFT",presentationList:"PT_ec"};function x(e){return x="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},x(e)}function N(){N=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},c="function"==typeof Symbol?Symbol:{},o=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",i=c.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 c=t&&t.prototype instanceof g?t:g,o=Object.create(c.prototype),l=new _(r||[]);return a(o,"_invoke",{value:j(e,n,l)}),o}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",f="suspendedYield",v="executing",h="completed",p={};function g(){}function y(){}function E(){}var b={};s(b,o,(function(){return this}));var w=Object.getPrototypeOf,L=w&&w(w(T([])));L&&L!==n&&r.call(L,o)&&(b=L);var k=E.prototype=g.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(a,c,o,l){var i=m(e[a],e,c);if("throw"!==i.type){var s=i.arg,u=s.value;return u&&"object"==x(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,l)}),(function(e){n("throw",e,o,l)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,l)}))}l(i.arg)}var c;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return c=c?c.then(a,a):a()}})}function j(t,n,r){var a=d;return function(c,o){if(a===v)throw new Error("Generator is already running");if(a===h){if("throw"===c)throw o;return{value:e,done:!0}}for(r.method=c,r.arg=o;;){var l=r.delegate;if(l){var i=C(l,r);if(i){if(i===p)continue;return i}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=v;var s=m(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 C(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,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),p;var c=m(a,t.iterator,n.arg);if("throw"===c.type)return n.method="throw",n.arg=c.arg,n.delegate=null,p;var o=c.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 O(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 I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function T(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,c=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 c.next=c}}throw new TypeError(x(t)+" is not iterable")}return y.prototype=E,a(k,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:y,configurable:!0}),y.displayName=s(E,i,"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,E):(e.__proto__=E,s(e,i,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},S(P.prototype),s(P.prototype,l,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,a,c){void 0===c&&(c=Promise);var o=new P(u(e,n,r,a),c);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},S(k),s(k,i,"Generator"),s(k,o,(function(){return this})),s(k,"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=T,_.prototype={constructor:_,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(I),!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 l.type="throw",l.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var c=this.tryEntries.length-1;c>=0;--c){var o=this.tryEntries[c],l=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var i=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(i&&s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(i){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 c=a;break}}c&&("break"===e||"continue"===e)&&c.tryLoc<=t&&t<=c.finallyLoc&&(c=null);var o=c?c.completion:{};return o.type=e,o.arg=t,c?(this.method="next",this.next=c.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),I(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;I(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}function w(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,c,o,l=[],i=!0,s=!1;try{if(c=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=c.call(n)).done)&&(l.push(r.value),l.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{if(!i&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return L(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)?L(e,t):void 0}}(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 L(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 k=function(e,t,n,r){return new(n||(n=Promise))((function(a,c){function o(e){try{i(r.next(e))}catch(e){c(e)}}function l(e){try{i(r.throw(e))}catch(e){c(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}i((r=r.apply(e,t||[])).next())}))},S="onboarding.schoolLevel";function P(){var e=(0,y.Q)(),t=e.onClickBack,n=e.exitOnboarding,x=e.completeStepAsync,L=e.onSaveError,P=(0,E.H)().logEvent,j=(0,d.y)(),C=j.availablePresentations,O=j.preferredPresentation,I=j.setPresentation,_=w((0,c.D)(u.g.AUDIENCE_FILTER,void 0,{storage:a.Z1.SessionStorage}),2)[1],T=w(r.useState(O),2),A=T[0],Z=T[1];return r.createElement(h.z,{namespace:S},r.createElement(h.z.Left,{className:"bg-dark-blue d-flex flex-column align-items-end justify-content-center"},r.createElement(p.N,{contentPosition:"right",annotationUrl:m.W.OnboardingV2.SchoolLevel.ANNOTATION,annotationPosition:"bottom-left"},r.createElement(g.Y,{presentation:A}))),r.createElement(h.z.Right,{hasCustomButtons:!1,onClickNext:function(){return k(this,void 0,void 0,N().mark((function e(){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return P(o.Vw.Click,o.Ix.Next,{presentationId:A.id,presentationName:A.name},{preferredPresentationOverride:A}),_(null),e.prev=2,e.next=5,I(A,"activeAndPreferred");case 5:return e.next=7,x({preferredPresentationOverride:A});case 7:e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(2),L(),e.abrupt("return",Promise.reject());case 13:case"end":return e.stop()}}),e,null,[[2,9]])})))},onClickBack:t,onClickComeBackLater:n,disableNext:!A},r.createElement(f.W,null,r.createElement(i.x,{phrase:"heading"})),r.createElement(v.X,null,r.createElement(i.x,{phrase:"dontWorry"})),r.createElement("ul",{className:"list-unstyled mb-3 ".concat(b.presentationList)},C.map((function(e){var t;return r.createElement("li",{key:e.id,className:"mb-2"},r.createElement(l.L,{onClick:function(){return function(e){P(o.Vw.Select,o.Ix.SelectPresentation,{presentationId:e.id,presentationName:e.name}),Z(e)}(e)}},r.createElement(s.M,{data:e,coverUrl:null===(t=e.cover)||void 0===t?void 0:t.url,imageClassName:b.cover,isSelected:e.id===(null==A?void 0:A.id)})))})))))}},92038:(e,t,n)=>{n.d(t,{Z:()=>r});const r={appLink:"fFjKN",name:"A_by9",selectedMask:"xSQtR",widgetItem:"Ys9W_",text:"JfAoy",imagePanel:"aUNDc",partialLargeImage:"RuLxv",selected:"BViJb",image:"LkTep",dragHandle:"CJqvP",large:"R5clw",comingSoonPanel:"Wa2PG",editSubjectsItem:"gGNFD",allSubjectsItem:"IHdlJ",logoContainer:"Nzaes",draggingItem:"zUOye",partialLargeFallback:"FmJP9",partialIcon:"sdZuo"}}}]);
1
+ /*! For license information please see 537-116bf8a4f1-lite.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[537],{2192:(e,t,n)=>{n.d(t,{M:()=>h,Q:()=>g});var r=n(32735),a=n(45157),c=n(36848),o=n(60376),l=n(5465),i=n(83914),s=n(83345),u=n(54610),m=n(67453),d=n(35223),f=n(92038),v=function(e){var t=e.name,n=e.multiline,a="".concat(f.Z.comingSoonPanel," \n d-flex flex-column align-items-center justify-content-center px-3 text-center"),c="";return n?c+=" ".concat(f.Z.clamped," clamp-2"):(a+=" text-nowrap",c+=" text-truncate"),r.createElement("div",{className:a},r.createElement("small",{className:"text-muted"},r.createElement(s.x,{namespace:"shared.subjectWidgetItem",phrase:"comingSoon"})),r.createElement("p",{className:"".concat(f.Z.name," h6")},r.createElement("span",{className:c},t)))},p=function(e){var t=e.name,n=e.multiline,a=e.subtitle,c="px-3 d-flex flex-column justify-content-center",o="".concat(f.Z.name," h6");return n?o+=" clamp-3 text-start":(c+=" text-nowrap text-truncate",o+=" text-truncate mb-0 pb-1"),r.createElement("div",{className:c},a&&r.createElement("div",{className:"text-secondary clamp-1 ".concat(f.Z.text)},a),r.createElement("div",{className:o,title:t},t))};function h(e){var t=m.j.createUrl(e.coverUrl,{size:e.isLarge?u.h2.Medium:u.h2.Small}),n={name:e.data.name,multiline:e.isLarge||e.multiline,subtitle:e.subtitle};return r.createElement("div",{className:"border d-flex position-relative ".concat(e.className," ").concat(f.Z.widgetItem," ").concat(e.isSelected?"border-success border-2":""),id:"".concat(e.data.id,"-").concat(a.Y.getRandomInt())},e.isSelected&&r.createElement("div",{className:"".concat(f.Z.selectedMask," border-2")}),r.createElement("div",{className:"".concat(f.Z.imagePanel," ").concat(e.isLarge?f.Z.large:"")},e.isSelected&&!e.hideCheckmark&&r.createElement("div",{className:f.Z.selected},r.createElement(o.f,{svgName:d.vn.Check,svgSize:i.S.Large,textVariant:"white",variant:"green"})),r.createElement("div",{className:"".concat(f.Z.image," ").concat(e.imageClassName),style:e.coverUrl?{backgroundImage:"url('".concat(t,"')")}:{}}),!e.hideFallback&&r.createElement(l.oy,{type:l.mS.Subject,extraClasses:e.isLarge?f.Z.large:""})),e.isComingSoon?r.createElement(v,Object.assign({},n)):r.createElement(p,Object.assign({},n)))}function g(e){var t,n=e.getChildAppLink?e.getChildAppLink(e.data):null;return r.createElement(r.Fragment,null,n?r.createElement(c.F,{className:f.Z.appLink,appLink:n,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,appLinkOptions:null===(t=e.getChildAppLinkOptions)||void 0===t?void 0:t.call(e)},r.createElement(h,Object.assign({},e))):r.createElement(h,Object.assign({},e)))}},12058:(e,t,n)=>{n.d(t,{X:()=>a});var r=n(32735);function a(e){return r.createElement("p",{className:e.className},e.children)}},75919:(e,t,n)=>{n.d(t,{N:()=>c});var r=n(32735);const a={annotation:"LkdHB",above:"ROdbm",below:"OzyHx",left:"W9EBF",right:"zhio2",divider:"cdR_p",imageContainer:"QZZMF"};function c(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}c.defaultProps={contentPosition:"center"}},39375:(e,t,n)=>{n.d(t,{Y:()=>u});var r=n(32735),a=n(54610),c=n(67453),o=n(2248);const l={magicTab:"H5jzm",subjectPlaceholder:"r1L6T",placeholderCover:"z9CFT",promotedTopicPlaceholder:"PbYs6",promotedTopicPlaceholderText:"hZ8Nf"};function i(e){return r.createElement("li",{className:"col-4"},r.createElement("div",{className:"d-flex border rounded-3 overflow-hidden ".concat(l.subjectPlaceholder)},e.coverUrl?r.createElement("div",{className:l.placeholderCover},r.createElement("img",{className:"img-fluid",src:c.j.createUrl(e.coverUrl,{size:a.h2.Small})})):r.createElement("div",{className:"".concat(l.placeholderCover," bg-light-blue")})))}function s(){return r.createElement("li",{className:"col-4"},r.createElement("div",{className:"bg-light-blue rounded-3 w-100 p-1 ".concat(l.promotedTopicPlaceholder)}))}function u(e){var t,n,a,c=Math.max(12-(null!==(n=null===(t=e.subjects)||void 0===t?void 0:t.length)&&void 0!==n?n:0),0);return r.createElement(o.L,{presentation:e.presentation,curriculum:e.curriculum,editingCurriculum:e.editingCurriculum},r.createElement("div",{className:"px-3 pt-3 w-100 d-flex flex-column align-items-center"},r.createElement("div",{className:"rounded-3 border overflow-hidden d-flex mb-2"},r.createElement("div",{className:"bg-light ".concat(l.magicTab)}),r.createElement("div",{className:"".concat(l.magicTab)})),r.createElement("ul",{className:"list-unstyled mb-0 row w-100 g-xl-2 g-lg-1 mb-2"},null===(a=e.subjects)||void 0===a?void 0:a.map((function(e){var t;return r.createElement(i,{key:e.id,coverUrl:null===(t=e.cover)||void 0===t?void 0:t.url})})),new Array(c).fill(0).map((function(e,t){return r.createElement(i,{key:t})}))),r.createElement("ul",{className:"list-unstyled mb-0 row w-100 g-xl-2 g-lg-1"},r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null),r.createElement(s,null))))}},2248:(e,t,n)=>{n.d(t,{L:()=>p});var r=n(32735),a=n(60376),c=n(83914),o=n(2786),l=n(83345),i=n(72639),s=n(79967),u=n(35223),m=n(10144);const d={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(d.leftNavIcon," rounded-circle")}),r.createElement("div",{className:"".concat(d.leftNavText," rounded-pill")}))}function p(e){var t,n,p=(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(d.shadow)},r.createElement("div",{className:"d-flex align-items-center h-100 w-50 ".concat(d.curriculumContainer)},r.createElement("div",{className:"bg-white rounded-3 border p-3 w-100"},r.createElement("h2",{className:"h6 text-start"},r.createElement(l.x,{namespace:f,phrase:"curriculum"})),e.curriculum?r.createElement("div",{className:"d-flex align-items-center"},r.createElement("div",{className:"".concat(d.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(d.iconPlaceholder)},r.createElement(a.f,{svgSize:c.S.Large,textVariant:"secondary",svgName:u.vn.GraduationCap})),r.createElement(l.x,{namespace:f,phrase:"selectCurriculum"}))))),r.createElement("div",{className:"bg-dark d-flex px-3 py-2 ".concat(d.blackBar)},r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle me-2 ".concat(d.dot)}),r.createElement("div",{className:"rounded-circle ".concat(d.dot)})),r.createElement("div",{className:"border-bottom px-3 py-2 d-flex align-items-center ".concat(d.topNav)},r.createElement("div",{className:"".concat(d.logo," me-4")},p.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(c.x,{svgName:u.vn.Search})),!!e.curriculum&&r.createElement("div",{className:"".concat(d.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(d.belowHeader)},r.createElement("div",{className:"".concat(d.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 d.presentationPlaceholderIcon;switch(m.i.getMappedPresentationLevel(e.presentation.learningLevel)){case i.p.Level_1:return"bg-indigo ".concat(d.presentationIcon);case i.p.Level_3:return"bg-blue ".concat(d.presentationIcon);default:case i.p.Level_2:return"bg-green ".concat(d.presentationIcon)}}()," text-white rounded")},r.createElement(c.x,{svgName:u.vn.School,size:c.S.Large})),e.presentation?r.createElement("span",{className:"fw-semibold text-truncate ".concat(d.presentationName)},e.presentation.name):r.createElement("div",{className:"".concat(d.presentationPlaceholderText," fw-semibold")},r.createElement(l.x,{namespace:f,phrase:"schoolLevel"}))))))),r.createElement("div",{className:"w-100 h-100 overflow-hidden"},e.children)))}},1039:(e,t,n)=>{n.r(t),n.d(t,{OnboardingSchoolLevelView:()=>P});var r=n(32735),a=n(57900),c=n(2948),o=n(65858),l=n(11607),i=n(83345),s=n(2192),u=n(38143),m=n(99742),d=n(86698),f=n(75359),v=n(12058),p=n(40695),h=n(75919),g=n(39375),y=n(73190),E=n(90815);const b={cover:"p3PFT",presentationList:"PT_ec"};function x(e){return x="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},x(e)}function N(){N=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},c="function"==typeof Symbol?Symbol:{},o=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",i=c.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 c=t&&t.prototype instanceof g?t:g,o=Object.create(c.prototype),l=new _(r||[]);return a(o,"_invoke",{value:j(e,n,l)}),o}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",f="suspendedYield",v="executing",p="completed",h={};function g(){}function y(){}function E(){}var b={};s(b,o,(function(){return this}));var w=Object.getPrototypeOf,L=w&&w(w(T([])));L&&L!==n&&r.call(L,o)&&(b=L);var k=E.prototype=g.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(a,c,o,l){var i=m(e[a],e,c);if("throw"!==i.type){var s=i.arg,u=s.value;return u&&"object"==x(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,o,l)}),(function(e){n("throw",e,o,l)})):t.resolve(u).then((function(e){s.value=e,o(s)}),(function(e){return n("throw",e,o,l)}))}l(i.arg)}var c;a(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,a){n(e,r,t,a)}))}return c=c?c.then(a,a):a()}})}function j(t,n,r){var a=d;return function(c,o){if(a===v)throw new Error("Generator is already running");if(a===p){if("throw"===c)throw o;return{value:e,done:!0}}for(r.method=c,r.arg=o;;){var l=r.delegate;if(l){var i=C(l,r);if(i){if(i===h)continue;return i}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=v;var s=m(t,n,r);if("normal"===s.type){if(a=r.done?p:f,s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=p,r.method="throw",r.arg=s.arg)}}}function C(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,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var c=m(a,t.iterator,n.arg);if("throw"===c.type)return n.method="throw",n.arg=c.arg,n.delegate=null,h;var o=c.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,h):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function O(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 I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function T(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,c=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 c.next=c}}throw new TypeError(x(t)+" is not iterable")}return y.prototype=E,a(k,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:y,configurable:!0}),y.displayName=s(E,i,"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,E):(e.__proto__=E,s(e,i,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},S(P.prototype),s(P.prototype,l,(function(){return this})),t.AsyncIterator=P,t.async=function(e,n,r,a,c){void 0===c&&(c=Promise);var o=new P(u(e,n,r,a),c);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},S(k),s(k,i,"Generator"),s(k,o,(function(){return this})),s(k,"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=T,_.prototype={constructor:_,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(I),!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 l.type="throw",l.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var c=this.tryEntries.length-1;c>=0;--c){var o=this.tryEntries[c],l=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var i=r.call(o,"catchLoc"),s=r.call(o,"finallyLoc");if(i&&s){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(i){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 c=a;break}}c&&("break"===e||"continue"===e)&&c.tryLoc<=t&&t<=c.finallyLoc&&(c=null);var o=c?c.completion:{};return o.type=e,o.arg=t,c?(this.method="next",this.next=c.finallyLoc,h):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),h},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),I(n),h}},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;I(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}function w(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,c,o,l=[],i=!0,s=!1;try{if(c=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=c.call(n)).done)&&(l.push(r.value),l.length!==t);i=!0);}catch(e){s=!0,a=e}finally{try{if(!i&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return L(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)?L(e,t):void 0}}(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 L(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 k=function(e,t,n,r){return new(n||(n=Promise))((function(a,c){function o(e){try{i(r.next(e))}catch(e){c(e)}}function l(e){try{i(r.throw(e))}catch(e){c(e)}}function i(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,l)}i((r=r.apply(e,t||[])).next())}))},S="onboarding.schoolLevel";function P(){var e=(0,y.Q)(),t=e.onClickBack,n=e.exitOnboarding,x=e.completeStepAsync,L=e.onSaveError,P=(0,E.H)().logEvent,j=(0,d.y)(),C=j.availablePresentations,O=j.preferredPresentation,I=j.setPresentation,_=w((0,c.D)(u.g.AUDIENCE_FILTER,void 0,{storage:a.Z1.SessionStorage}),2)[1],T=w(r.useState(O),2),A=T[0],Z=T[1];return r.createElement(p.z,{namespace:S},r.createElement(p.z.Left,{className:"bg-dark-blue d-flex flex-column align-items-end justify-content-center"},r.createElement(h.N,{contentPosition:"right",annotationUrl:m.W.OnboardingV2.SchoolLevel.ANNOTATION,annotationPosition:"bottom-left"},r.createElement(g.Y,{presentation:A}))),r.createElement(p.z.Right,{hasCustomButtons:!1,onClickNext:function(){return k(this,void 0,void 0,N().mark((function e(){return N().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return P(o.Vw.Click,o.Ix.Next,{presentationId:A.id,presentationName:A.name,presentationDescription:A.description},{preferredPresentationOverride:A}),_(null),e.prev=2,e.next=5,I(A,"activeAndPreferred");case 5:return e.next=7,x({preferredPresentationOverride:A});case 7:e.next=13;break;case 9:return e.prev=9,e.t0=e.catch(2),L(),e.abrupt("return",Promise.reject());case 13:case"end":return e.stop()}}),e,null,[[2,9]])})))},onClickBack:t,onClickComeBackLater:n,disableNext:!A},r.createElement(f.W,null,r.createElement(i.x,{phrase:"heading"})),r.createElement(v.X,null,r.createElement(i.x,{phrase:"dontWorry"})),r.createElement("ul",{className:"list-unstyled mb-3 ".concat(b.presentationList)},C.map((function(e){var t;return r.createElement("li",{key:e.id,className:"mb-2"},r.createElement(l.L,{onClick:function(){return function(e){P(o.Vw.Select,o.Ix.SelectPresentation,{presentationId:e.id,presentationName:e.name,presentationDescription:e.description}),Z(e)}(e)}},r.createElement(s.M,{data:e,coverUrl:null===(t=e.cover)||void 0===t?void 0:t.url,imageClassName:b.cover,isSelected:e.id===(null==A?void 0:A.id)})))})))))}},92038:(e,t,n)=>{n.d(t,{Z:()=>r});const r={appLink:"fFjKN",name:"A_by9",selectedMask:"xSQtR",widgetItem:"Ys9W_",text:"JfAoy",imagePanel:"aUNDc",partialLargeImage:"RuLxv",selected:"BViJb",image:"LkTep",dragHandle:"CJqvP",large:"R5clw",comingSoonPanel:"Wa2PG",editSubjectsItem:"gGNFD",allSubjectsItem:"IHdlJ",logoContainer:"Nzaes",draggingItem:"zUOye",partialLargeFallback:"FmJP9",partialIcon:"sdZuo"}}}]);