@clickview/lite 0.24.1 → 0.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/scripts/{1453-83808dbae2-lite.chunk.js → 1453-7c825c62aa-lite.chunk.js} +1 -1
  3. package/dist/scripts/{178-a00dee1d69-lite.chunk.js → 178-40d15ea7e1-lite.chunk.js} +1 -1
  4. package/dist/scripts/{2199-ca784077c0-lite.chunk.js → 2199-90dc10b09f-lite.chunk.js} +1 -1
  5. package/dist/scripts/{2215-50744e3c3e-lite.chunk.js → 2215-110bb3a167-lite.chunk.js} +1 -1
  6. package/dist/scripts/{3784-d191f991c6-lite.chunk.js → 3784-a09455a786-lite.chunk.js} +1 -1
  7. package/dist/scripts/{4029-55a6143f0d-lite.chunk.js → 4029-0b484f0110-lite.chunk.js} +1 -1
  8. package/dist/scripts/4898-13e7e3458a-lite.chunk.js +1 -0
  9. package/dist/scripts/{5746-7e35a750f7-lite.chunk.js → 5746-c0c97922e2-lite.chunk.js} +1 -1
  10. package/dist/scripts/{6438-476fa3fd75-lite.chunk.js → 6438-c4d6fab140-lite.chunk.js} +1 -1
  11. package/dist/scripts/{6477-f42f00fe20-lite.chunk.js → 6477-273ac1ee81-lite.chunk.js} +1 -1
  12. package/dist/scripts/{6708-7c79fa4ec6-lite.chunk.js → 6708-6f81e87fd7-lite.chunk.js} +1 -1
  13. package/dist/scripts/{7059-7f85066400-lite.chunk.js → 7059-a7452fac0b-lite.chunk.js} +1 -1
  14. package/dist/scripts/7145-f661236131-lite.chunk.js +1 -0
  15. package/dist/scripts/{7351-ae828b1b36-lite.chunk.js → 7351-3762736ad3-lite.chunk.js} +1 -1
  16. package/dist/scripts/{7806-e69c13ac5c-lite.chunk.js → 7806-611b3521ea-lite.chunk.js} +1 -1
  17. package/dist/scripts/{7966-9e7a490d8d-lite.chunk.js → 7966-02c7c80ac1-lite.chunk.js} +1 -1
  18. package/dist/scripts/{8882-bcb1c6ecc2-lite.chunk.js → 8882-68ef7041ad-lite.chunk.js} +1 -1
  19. package/dist/scripts/9961-b739358dd0-lite.chunk.js +1 -0
  20. package/dist/scripts/{bundle-965eda2279.min.js → bundle-89d30faca9.min.js} +2 -2
  21. package/package.json +1 -1
  22. package/dist/scripts/4898-5c792e192b-lite.chunk.js +0 -1
  23. package/dist/scripts/7145-481ec54a03-lite.chunk.js +0 -1
  24. package/dist/scripts/9961-c7ef6b8f26-lite.chunk.js +0 -1
  25. /package/dist/scripts/{bundle-965eda2279.min.js.LICENSE.txt → bundle-89d30faca9.min.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickview/lite",
3
- "version": "0.24.1",
3
+ "version": "0.24.2",
4
4
  "description": "ClickView Lite",
5
5
  "main": "dist/scripts/bundle.js",
6
6
  "types": "dist/projects/lite/src/index.d.ts",
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[4898],{54644:(e,t,n)=>{n.d(t,{v:()=>r});var a=n(97395),r={getContentUpdates:function(e,t,n){return{url:a._.urlBuilder("/api/domain/v1/subjects/content-updates",{from:t,to:n,limit:6,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/subjects/presentations/".concat(e,"/content-updates"),{from:t,to:n,limit:6,query:"(videoCollection)"}),key:"content:updates",normalizeOptions:{namespace:"contentupdates"},formatData:function(e){return e.map((function(e){return{id:e.classificationId,videos:e.videos}}))}}},getClassifications:function(e){return{url:a._.urlBuilder("/api/domain/v1/subjects",{id:e,query:"banner"}),publicUrl:a._.urlBuilder("/api/subjects/classifications",{id:e,query:"banner"}),key:"classifications:".concat(e.join(","))}},getClassification:function(e){return{url:"/api/domain/v1/subjects/".concat(e,"?query=banner"),publicUrl:"/api/subjects/classifications/".concat(e,"?query=banner"),key:"classification:".concat(e)}},getClassificationUpdates:function(e,t,n){return{url:a._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/content-updates"),{from:t,to:n,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/subjects/classifications/".concat(e,"/content-updates"),{from:t,to:n,query:"(videoCollection)"}),key:"classification:update:".concat(e,":").concat(t,":").concat(n)}},getContentUpdateVideos:function(e,t){return{url:a._.urlBuilder("/api/domain/v1/subjects/content-updates/videos",{from:e,to:t,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/subjects/content-updates/videos",{from:e,to:t,query:"(videoCollection)"}),key:"content:update:videos:".concat(e,":").concat(t)}},videos:function(e,t){return{url:"/api/domain/v1/videos?ids=".concat(e.join(","),"&with=(videoCollection)"),key:"videos:by:id:".concat(e.join(",")),success:t}}}},3278:(e,t,n)=>{n.d(t,{z:()=>f});var a=n(1024),r=n.n(a),i=n(23481),o=n(83345),l=n(53957),c=n(38502),s=n(65858),u=n(55460);const d={pillTab:"bMJM0"};var p="discover.header";function f(e){var t,n,a,f,m,v;if(!e.type)return r().createElement(r().Fragment,null);if(e.type===l.DashboardUserType.Learner||e.hasStudentExperience)return r().createElement("div",{className:"py-3"},r().createElement("h1",{className:"h2 mb-0"},r().createElement(o.x,{namespace:p,phrase:"heading"})));var y=[{name:i.T.getPhrase(p,"forYou"),appLink:null===(t=e.appLinks)||void 0===t?void 0:t.forYou,active:"forYou"===e.active,analyticsData:{name:i.T.getPhrase(p,"forYou"),url:u.AppLinkHelper.getHref(null===(n=e.appLinks)||void 0===n?void 0:n.forYou)},analyticsOptions:{actionType:s.UserAction.Click,entity:s.EntityType.Url,location:s.LocationContext.MagicTabs}},{name:i.T.getPhrase(p,"whatsNew"),appLink:null===(a=e.appLinks)||void 0===a?void 0:a.whatsNew,active:"whatsNew"===e.active,analyticsData:{name:i.T.getPhrase(p,"whatsNew"),url:u.AppLinkHelper.getHref(null===(f=e.appLinks)||void 0===f?void 0:f.whatsNew)},analyticsOptions:{actionType:s.UserAction.Click,entity:s.EntityType.Url,location:s.LocationContext.MagicTabs}}];return e.showCalendar&&y.push({name:i.T.getPhrase(p,"calendar"),appLink:null===(m=e.appLinks)||void 0===m?void 0:m.calendar,active:"calendar"===e.active,analyticsData:{name:i.T.getPhrase(p,"calendar"),url:u.AppLinkHelper.getHref(null===(v=e.appLinks)||void 0===v?void 0:v.calendar)},analyticsOptions:{actionType:s.UserAction.Click,entity:s.EntityType.Url,location:s.LocationContext.MagicTabs}}),r().createElement("div",{className:"py-3 text-center"},r().createElement(c.r,{tabs:y,className:d.pillTab}))}},38502:(e,t,n)=>{n.d(t,{r:()=>u});var a=n(1024),r=n.n(a),i=n(11607),o=n(8493),l=n(49985),c=n(87432),s=n(76246);function u(e){var t;return r().createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},r().createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(c.Z.pillTabSelector)},e.tabs.map((function(e){return r().createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?r().createElement(o.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"cursor-pointer d-flex justify-content-center text-decoration-none text-reset px-2 ".concat(c.Z.pillItem)},e.name,"number"==typeof e.count&&r().createElement("div",{className:"pl-2"},r().createElement(s.C,{type:s.g.Count,data:e.count}))):r().createElement(i.L,{className:"".concat(c.Z.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&l.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&r().createElement("div",{className:"pl-2"},r().createElement(s.C,{type:s.g.Count,data:e.count}))))}))))}},74696:(e,t,n)=>{n.d(t,{S:()=>s});var a=n(1024),r=n.n(a),i=n(99910),o=n(79967),l=n(9977);const c={partialName:"SicQQ",partialDescription:"dPGMq",partialThumbnail:"vZrnb",partialDragHandle:"iq73R"};function s(e){return r().createElement(r().Fragment,null,Array(e.numVideos).fill(null).map((function(t,n){return r().createElement(u,Object.assign({key:n},e))})))}function u(e){var t=(0,o.k)(),n="sm"===l.O.getSize(t,"md"),a=e.withReordering&&!t.xs;return r().createElement(i.Row,{noGutters:!0,className:"".concat(n?"":"py-2")},r().createElement(i.Col,Object.assign({},l.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(n?"pb-2 pr-2":"mb-1 px-2")}),r().createElement(i.Row,null,!!a&&r().createElement("div",{className:"d-flex align-items-center justify-content-center col-2"},r().createElement("div",{className:"partial-loading-background ".concat(c.partialDragHandle)})),r().createElement(i.Col,{xs:l.O.getThumbnailColSize(a)},r().createElement("div",{className:"partial-loading-background ".concat(n?"rounded":"rounded-lg"," ").concat(c.partialThumbnail)})))),r().createElement(i.Col,Object.assign({},l.O.getDetailsColumns(),{className:n?"pb-2":"px-2"}),r().createElement("div",{className:"partial-loading-background mb-1 ".concat(c.partialName)}),r().createElement("div",{className:"partial-loading-background ".concat(c.partialDescription)})))}s.defaultProps={numVideos:15}},39902:(e,t,n)=>{n.d(t,{f:()=>s});var a=n(1024),r=n.n(a),i=n(58566),o=n(20354);function l(e,t){if(e){if("string"==typeof e)return c(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)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function s(e,t){var n,a,s=(n=r().useState([]),a=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(n,a)||l(n,a)||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.")}()),u=s[0],d=s[1];r().useEffect((function(){if(null==e?void 0:e.length){var t=function(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(u);t.push([]),e.forEach((function(e){t.find((function(t){return t.find((function(t){return t===e}))}))||t[t.length-1].push(e)})),d(t.filter((function(e){return e.length})))}}),[e?e.join(","):null]);var p=(0,i.useDispatch)(),f=(0,i.useSelector)((function(e){return e}));if(r().useEffect((function(){u.forEach((function(e){var n=t(e);o.a.getResponse(f,n.key).shouldFetch&&o.a.fetch(p,n)}))}),[null==u?void 0:u.length]),!(null==u?void 0:u.length))return{items:null,isFetching:!1};var m={},v={};return u.forEach((function(e,n){var a=t(e),r=o.a.getResponse(f,a.key);v[n]=r,r.data&&r.data.forEach((function(e){return m[e.id]=e}))})),{items:Object.keys(v).some((function(e){return!!v[e].data}))?m:null,isFetching:!!Object.keys(v).some((function(e){return v[e].isFetching}))}}},74590:(e,t,n)=>{n.d(t,{N:()=>f});var a=n(1024),r=n.n(a),i=n(35242),o=n(55171),l=n(25925),c=n(37802),s=n(86698);function u(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 a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(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)?d(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 d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var p=[o.e.PresentationIds.US_ELEMENTARY];function f(){var e=(0,c.r)(null),t=e.hasSpecialEventCalendar,n=e.isLoadingSettings,a=(0,s.y)(l.R.Subject).presentation,o=!n&&!t,d=(null==a?void 0:a.id)&&!p.includes(+a.id),f=u(r().useState(!o&&!d),2),m=f[0],v=f[1],y=u(r().useState(n||!(null==a?void 0:a.id)),2),b=y[0],h=y[1];return r().useEffect((function(){o||d?v(!1):b||v(!0),h(n||!(null==a?void 0:a.id))}),[t,null==a?void 0:a.id,b]),i.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:m,isLoading:b}}},37808:(e,t,n)=>{n.d(t,{aq:()=>v,YW:()=>b});var a=n(1024),r=n(83345),i=n(8493),o=n(99910),l=n(2948),c=n(57900),s=n(38143),u=n(58130),d=n(10874);const p={banner:"B7jhq"};function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var m="contentUpdates.classificationBanner";function v(e){var t,n,v=e.classification,y=e.backgroundUrl,b=e.followed,h=e.follow,g=e.showFollowSpinner,E=(t=(0,l.D)(s.g.AUDIENCE_FILTER,void 0,{storage:c.Z1.SessionStorage}),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 a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return f(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)?f(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];return a.createElement("div",{className:"banner mb-2 d-flex justify-content-between align-items-center rounded ".concat(p.banner),style:{backgroundImage:"url('".concat(y,"')")}},a.createElement(i.F,{className:"text-white text-shadow",appLink:e.getClassificationAppLink(v,E)},a.createElement("h2",{className:"h3 mb-0"},v.name)),e.canFollow&&a.createElement(d.h,{className:"btn follow-btn ".concat(b?"btn-outline-dark":"btn-dark"),svgName:b?u.vn.Check:u.vn.Bell,onClick:function(){return h(v.id,v.name,!b)}},g?a.createElement(o.Spinner,{as:"span",animation:"border",role:"status",size:"sm"}):a.createElement(r.x,{namespace:m,phrase:b?"unfollow":"follow"})))}var y="playlists.liteClassificationUpdateBreadcrumbs";function b(e){var t=e.classification;return a.createElement(a.Fragment,null,a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb p-0 mb-0"},a.createElement("li",{className:"breadcrumb-item"},a.createElement(i.F,{appLink:e.dashboardAppLink},a.createElement(r.x,{namespace:y,phrase:"dashboard"}))),a.createElement("li",{className:"breadcrumb-item"},a.createElement(i.F,{appLink:e.contentUpdatesAppLink},a.createElement(r.x,{namespace:y,phrase:"whatsNew"}))),a.createElement("li",{className:"breadcrumb-item active","aria-current":"page"},t.name))))}},80004:(e,t,n)=>{n.r(t),n.d(t,{ContentUpdatesView:()=>J});var a=n(1024),r=n.n(a),i=n(33192),o=n(58566),l=n(20354),c=n(23481),s=n(53957),u=n(61699),d=n(39151),p=n(69883),f=n(39902),m=n(54644),v=n(51365),y=n(3278),b=n(83345),h=n(22902),g=n(16714),E=n(8493),w=n(97037),k=n(31949),S=n(1666),C=n(25925),j=n(49985),N=n(65858),A=n(65986),L=n(97291),O=n(97816),T=n(14070),F=n(86698),U=n(44110),x=n(41063),I=n(74590),D=n(67453),P=n(54610),B=n(4632),M=n(37808),Y="contentUpdates.contentUpdatesView";function _(e){var t=e.classification,n=e.videos,r=e.imageCdnUrl,i=e.showMore,o=e.followed;if(!t)return a.createElement(a.Fragment,null);var l=D.j.createBannerUrl(t.banner,{fallbackBaseUrl:r,fallbackCategoryName:t.name,type:P.__.Banners},{size:P.h2.Medium,resizeType:P.Nq.Cover});return a.createElement("div",{className:"mb-3"},a.createElement(M.aq,{classification:t,backgroundUrl:l,getClassificationAppLink:e.appLinks.getClassificationAppLink,followed:o,follow:e.follow,canFollow:e.canFollow,showFollowSpinner:e.showFollowSpinner}),a.createElement(B.E4,{videos:n,yearGroups:e.yearGroups,getVideoAppLink:e.appLinks.getVideoAppLink,getSeriesAppLink:e.appLinks.getSeriesAppLink,setFavourite:e.setFavourite,canFavourite:e.canFavourite,presentationAudiences:e.audiences}),i&&a.createElement("div",{className:"show-more"},a.createElement(E.F,{className:"info-link",appLink:e.appLinks.getClassificationUpdateAppLink(t)},a.createElement(b.x,{namespace:Y,phrase:"showMore",options:{classificationName:t.name}}))))}var R=n(74696);const q={partialBanner:"bxaA6"};function H(){return r().createElement(r().Fragment,null,Array(4).fill(null).map((function(e,t){return r().createElement("div",{key:t,className:"mb-3"},r().createElement("div",{className:"partial-loading-background mb-2 ".concat(q.partialBanner)}),r().createElement(R.S,null),";")})))}var V=n(68677);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 G(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==z(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==z(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===z(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var W=5,$="contentUpdates.contentUpdatesView";function J(e){var t,n,r,D,P,B,M,Y=(B=a.useState({}),M=2,function(e){if(Array.isArray(e))return e}(B)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(B,M)||function(e,t){if(e){if("string"==typeof e)return Z(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(e,t):void 0}}(B,M)||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.")}()),R=Y[0],q=Y[1],z=(0,o.useDispatch)(),J=(0,p.Z)();(0,V.M)({title:c.T.getPhrase($,"pageTitle")});var Q=(0,h.T)().hasPermissions,K=Q(g.C.FollowSubjects),X=i().subtract(1,"year").endOf("day").format("YYYY-MM-DD"),ee=i().endOf("day").format("YYYY-MM-DD"),te=l.a.useBasicFetch(d.L.config()),ne=l.a.useBasicFetch(k.N.currentUser()),ae=l.a.useBasicFetch((null===(t=ne.data)||void 0===t?void 0:t.isAuthenticated)&&S.h.yearGroups(ne.data.customerId)),re=(0,F.y)(C.R.Subject).presentation,ie=m.v.getContentUpdates(null==re?void 0:re.id,X,ee),oe=l.a.useBasicFetch(re&&ie),le=l.a.useBasicFetch(K&&u.o.mySubjectPreferences()),ce=(0,U.i)(),se=[],ue=[];oe.data&&oe.data.forEach((function(e){se.push(e.id),ue=ue.concat(e.videos)}));var de=(0,f.f)(se,(function(e){return m.v.getClassifications(e)})).items,pe=(0,A._)(A.i.VideoItem);(0,O.V)(ue,{hasCurriculumLinks:!0,flightNamespace:null===(n=ie.normalizeOptions)||void 0===n?void 0:n.namespace});var fe=(0,w.c)(N.LocationContext.VideoThumbnail,null===(r=ie.normalizeOptions)||void 0===r?void 0:r.namespace),me=fe.setFavourite,ve=fe.canFavourite;function ye(e,t,n){q((function(t){return Object.assign(Object.assign({},t),G({},e,!0))}));var a=function(){var a;q((function(t){return Object.assign(Object.assign({},t),G({},e,!1))})),j.k.logUserAction({id:e,name:t},{location:N.LocationContext.ContentUpdatesClassificationBanner,workflowPhase:N.WorkflowPhase.Complete,descriptor:n?N.ToggleDescriptor.On:N.ToggleDescriptor.Off,actionType:N.UserAction.Follow,entity:N.EntityType.Classification}),J.success(c.T.getPhrase($,n?"followed":"unfollowed",{classification:null===(a=de[e])||void 0===a?void 0:a.name,escapeText:!0}))},r=function(){q((function(t){return Object.assign(Object.assign({},t),G({},e,!1))})),J.error(c.T.getPhrase($,"error"))},i=n?u.o.followSubjects([e],a,r):u.o.unfollowSubjects([e],a,r);l.a.fetch(z,i)}var be=(0,I.N)(),he=be.showCalendar,ge=be.isLoading,Ee=!(!(oe.hasCompleted&&te.hasCompleted&&ce.hasCompleted)||K&&!le.hasCompleted||!de||ge),we=function(e,t){return e&&t?e.map((function(e){return{showMore:e.videos.length>W,classification:t[e.id],videos:e.videos.slice(0,W).map((function(e){return e.classification=t[e.id],e})).filter((function(e){return e}))}})).filter((function(e){return e.classification})):null}(oe.data,de),ke=null!==(P=null===(D=le.data)||void 0===D?void 0:D.map((function(e){return e.id})))&&void 0!==P?P:[],Se=Q(g.C.ManageSubjectPreferences),Ce=(0,x.b)();return a.createElement(v.M.Provider,{value:pe},a.createElement("div",{className:"bg-white px-3"},!ge&&a.createElement(y.z,{type:s.DashboardUserType.Staff,appLinks:{forYou:e.appLinks.dashboardAppLink,whatsNew:e.appLinks.whatsNewAppLink,calendar:e.appLinks.calendarAppLink},showCalendar:he,active:"whatsNew"}),a.createElement("h1",null,a.createElement(b.x,{namespace:$,phrase:"heading"})),(Se||Ce)&&a.createElement("p",null,Se&&a.createElement(a.Fragment,null,a.createElement(b.x,{namespace:$,phrase:"onlyRelevant"})," ",a.createElement(E.F,{className:"info-link",appLink:{application:L.O.SETTINGS,action:T.e.Settings.TOPIC_PREFERENCES}},a.createElement(b.x,{namespace:$,phrase:"updatePreferences"}))),Ce&&a.createElement("span",{className:"d-block"},a.createElement(E.F,{className:"info-link",appLink:{application:L.O.SETTINGS,action:T.e.Settings.CONTENT_REVIEW}},a.createElement(b.x,{namespace:$,phrase:"contentReview"})))),Ee?a.createElement(a.Fragment,null,we.map((function(t,n){var r,i;return a.createElement(_,{key:n,classification:t.classification,videos:t.videos,yearGroups:ae.data,imageCdnUrl:te.data.imageCdnUrl,showMore:t.showMore,appLinks:e.appLinks,followed:ke.includes(null===(r=t.classification)||void 0===r?void 0:r.id),follow:ye,showFollowSpinner:R[null===(i=t.classification)||void 0===i?void 0:i.id],canFollow:K,setFavourite:me,canFavourite:ve,audiences:ce.data})}))):a.createElement(H,null)))}},87821:(e,t,n)=>{n.d(t,{p:()=>r});var a=n(33192),r={userVideoHistory:function(e,t,n,r){var i="video:history",o="{gateway}/v1/users/me/watch-history";return e&&(i+=":".concat(e),o+="?cursor=".concat(e)),{key:i,url:o,formatData:function(e){return{data:e.data.map((function(e){var t=a.utc(e.lastTimeWatched).local().format(),n=a(t).format("YYYY-MM-DD");return Object.assign(Object.assign({},e),{lastTimeWatched:t,lastDateWatched:n})})),pagination:e.pagination}},success:t,error:n,always:r}},videoHistory:function(e,t,n,a,r){var i=e.sort().map((function(e){return"videoId=".concat(e)}));return{key:"video:history:videos:".concat(i.join("&")),url:"{gateway}/v1/videos/history?".concat(i.join("&")),normalizeOptions:{namespace:t},formatData:function(e){return(null==e?void 0:e.length)?e.map((function(e){return{id:e.videoId,lastProgressPoint:e.lastProgressPoint}})):e},success:n,error:a,always:r}}}},44110:(e,t,n)=>{n.d(t,{i:()=>l});var a=n(20354),r=n(25925),i=n(89454),o=n(86698),l=function(){var e=(0,o.y)(r.R.Subject).presentation;return a.a.useBasicFetch(!!e&&i.O.presentationAudiences(e.id))}},97816:(e,t,n)=>{n.d(t,{V:()=>m});var a=n(1024),r=n.n(a),i=n(20354),o=n(31949),l=n(1575),c=n(21750),s=n(87821),u=n(63419);function d(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return p(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)?p(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var f={ratings:!1,favourites:!1,watchHistory:!1,hasCurriculumLinks:!1};function m(e){var t,n,a,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=Object.assign(Object.assign({},f),p),v=m.ratings,y=m.favourites,b=m.watchHistory,h=m.hasCurriculumLinks,g=i.a.useBasicFetch(o.N.currentUser()),E=e&&(Array.isArray(e)?e.filter(Boolean).map((function(e){return e.id})):e.data.filter(Boolean).map((function(e){return e.id}))),w=g.data;t=r().useMemo((function(){if(!(null==w?void 0:w.isAuthenticated))return[];var e=[];return v&&(e=[].concat(d(e),[!!(null==E?void 0:E.length)&&l.R.videoRatings(E,p.flightNamespace)])),y&&(e=[].concat(d(e),[!!(null==E?void 0:E.length)&&w&&u.P.isFavourited(w.id,E,p.flightNamespace)])),b&&(e=[].concat(d(e),[!!(null==E?void 0:E.length)&&w&&s.p.videoHistory(E,p.flightNamespace)])),h&&(e=[].concat(d(e),[!!(null==E?void 0:E.length)&&c.x.hasCurriculumLinks(E,null,p.flightNamespace)])),e.filter(Boolean)}),[null==E?void 0:E.length]),n=!!e,a=i.a.useGetFetch(),r().useEffect((function(){n&&t.length&&t.forEach((function(e){a(e)}))}),[t.length])}},87432:(e,t,n)=>{n.d(t,{Z:()=>a});const a={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[7145],{3278:(e,t,a)=>{a.d(t,{z:()=>m});var n=a(1024),r=a.n(n),i=a(23481),o=a(83345),s=a(53957),c=a(38502),l=a(65858),d=a(55460);const u={pillTab:"bMJM0"};var p="discover.header";function m(e){var t,a,n,m,v,f;if(!e.type)return r().createElement(r().Fragment,null);if(e.type===s.DashboardUserType.Learner||e.hasStudentExperience)return r().createElement("div",{className:"py-3"},r().createElement("h1",{className:"h2 mb-0"},r().createElement(o.x,{namespace:p,phrase:"heading"})));var h=[{name:i.T.getPhrase(p,"forYou"),appLink:null===(t=e.appLinks)||void 0===t?void 0:t.forYou,active:"forYou"===e.active,analyticsData:{name:i.T.getPhrase(p,"forYou"),url:d.AppLinkHelper.getHref(null===(a=e.appLinks)||void 0===a?void 0:a.forYou)},analyticsOptions:{actionType:l.UserAction.Click,entity:l.EntityType.Url,location:l.LocationContext.MagicTabs}},{name:i.T.getPhrase(p,"whatsNew"),appLink:null===(n=e.appLinks)||void 0===n?void 0:n.whatsNew,active:"whatsNew"===e.active,analyticsData:{name:i.T.getPhrase(p,"whatsNew"),url:d.AppLinkHelper.getHref(null===(m=e.appLinks)||void 0===m?void 0:m.whatsNew)},analyticsOptions:{actionType:l.UserAction.Click,entity:l.EntityType.Url,location:l.LocationContext.MagicTabs}}];return e.showCalendar&&h.push({name:i.T.getPhrase(p,"calendar"),appLink:null===(v=e.appLinks)||void 0===v?void 0:v.calendar,active:"calendar"===e.active,analyticsData:{name:i.T.getPhrase(p,"calendar"),url:d.AppLinkHelper.getHref(null===(f=e.appLinks)||void 0===f?void 0:f.calendar)},analyticsOptions:{actionType:l.UserAction.Click,entity:l.EntityType.Url,location:l.LocationContext.MagicTabs}}),r().createElement("div",{className:"py-3 text-center"},r().createElement(c.r,{tabs:h,className:u.pillTab}))}},38502:(e,t,a)=>{a.d(t,{r:()=>d});var n=a(1024),r=a.n(n),i=a(11607),o=a(8493),s=a(49985),c=a(87432),l=a(76246);function d(e){var t;return r().createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},r().createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(c.Z.pillTabSelector)},e.tabs.map((function(e){return r().createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?r().createElement(o.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"cursor-pointer d-flex justify-content-center text-decoration-none text-reset px-2 ".concat(c.Z.pillItem)},e.name,"number"==typeof e.count&&r().createElement("div",{className:"pl-2"},r().createElement(l.C,{type:l.g.Count,data:e.count}))):r().createElement(i.L,{className:"".concat(c.Z.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&s.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&r().createElement("div",{className:"pl-2"},r().createElement(l.C,{type:l.g.Count,data:e.count}))))}))))}},74590:(e,t,a)=>{a.d(t,{N:()=>m});var n=a(1024),r=a.n(n),i=a(35242),o=a(55171),s=a(25925),c=a(37802),l=a(86698);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i,o,s=[],c=!0,l=!1;try{if(i=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;c=!1}else for(;!(c=(n=i.call(a)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{if(!c&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?u(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 u(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var p=[o.e.PresentationIds.US_ELEMENTARY];function m(){var e=(0,c.r)(null),t=e.hasSpecialEventCalendar,a=e.isLoadingSettings,n=(0,l.y)(s.R.Subject).presentation,o=!a&&!t,u=(null==n?void 0:n.id)&&!p.includes(+n.id),m=d(r().useState(!o&&!u),2),v=m[0],f=m[1],h=d(r().useState(a||!(null==n?void 0:n.id)),2),y=h[0],g=h[1];return r().useEffect((function(){o||u?f(!1):y||f(!0),g(a||!(null==n?void 0:n.id))}),[t,null==n?void 0:n.id,y]),i.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:v,isLoading:y}}},5776:(e,t,a)=>{a.r(t),a.d(t,{CuratedDiscoverView:()=>te});var n=a(1024),r=a.n(n),i=a(20354),o=a(2948),s=a(57900),c=a(23481),l=a(53957),d=a(75896),u=a(85064),p=a(21366),m=a(3278),v=a(23232),f=a(83345),h=a(36532),y=a(58130),g="subjects.discoverDashboardEmptyState";function b(e){var t,a,n=(null===(t=e.dashboard)||void 0===t?void 0:t.status)===l.DashboardStatus.Archived;return r().createElement(v.u,null,r().createElement(v.u.Image,{src:e.imageUrl}),r().createElement(v.u.Heading,null,r().createElement(f.x,{namespace:g,phrase:"heading"})),r().createElement(v.u.Info,null,r().createElement(f.x,{namespace:g,phrase:"info"})),r().createElement(h.u,{title:n?c.T.getPhrase(g,"archivedCtaTooltip"):"",spanHack:!0},r().createElement(v.u.Cta,{text:c.T.getPhrase(g,"add"),appLink:null===(a=e.addWidgetApplink)||void 0===a?void 0:a.call(e),className:"btn btn-dark",icon:y.vn.Plus,disabled:n})))}function E(e){var t,a,n=d.m.sortBy(null===(t=e.dashboard)||void 0===t?void 0:t.widgets,"index");function i(t,a,n){var r=p.S.getWidgetParams(a,n,p.S.getDashboardTargetType(e.dashboard));return e.getWidgetContentRequest(t,r)}var o=e.isReadonly&&!(null==n?void 0:n.length);return r().createElement(r().Fragment,null,r().createElement(m.z,{type:null===(a=e.dashboard)||void 0===a?void 0:a.userType,appLinks:e.headerAppLinks,hasStudentExperience:e.hasStudentExperience,showCalendar:e.showCalendar,active:"forYou"}),n.map((function(t){return r().createElement(u.L,{key:t.id,id:t.id,imageCdnUrl:e.imageCdnUrl,getContentRequest:i,audiences:e.audiences,name:t.name,description:t.description,templateId:t.templateId,metadata:t.metadata,presentation:e.presentation,setFavourite:e.setFavourite,canFavourite:e.canFavourite,appLinks:e.widgetAppLinks,isScrollToTargetWidget:(null==e?void 0:e.scrollToWidgetId)===t.id,widgetTypeId:t.widgetId,canManageDiscoverPreferences:e.canManageDiscoverPreferences,onSubmitFeedback:e.onSubmitFeedback,updatePreferences:e.updatePreferences,yearGroups:e.yearGroups,lazyLoad:e.lazyLoad})})),o&&r().createElement(b,{dashboard:e.dashboard,isReadonly:e.isReadonly,imageUrl:e.emptyImageUrl,addWidgetApplink:e.widgetAppLinks.widgetWizard}))}var T=a(39151),S=a(69454),C=a(38143),A=a(87348),L=a(10874),I=a(97291),k=a(14070),D=a(99742);const N={banner:"Vqx6B"};var O="shared.upgradeVideoBanner";function w(){return n.createElement("div",{className:"py-4 px-3 rounded h4 ".concat(N.banner," border"),style:{backgroundImage:'url("'.concat(D.W.Upgrade.VIDEO_BANNER,'")')}},n.createElement(f.x,{namespace:O,phrase:"message"}),n.createElement(L.h,{svgName:y.vn.Play,appLink:{application:I.O.DEFAULT,action:k.e.Default.LITE_UPGRADE_VIDEO},className:"btn btn-outline-dark ml-3 align-middle"},n.createElement(f.x,{namespace:O,phrase:"button"})))}var U=a(31949),P=a(97037),F=a(80889),x=a(22902),_=a(16714),j=a(1666),R=a(68677),B=a(65858),M=a(49985),H=a(52333),W=a(18921),Y=a(74590),z=a(28400),G=a(42617),V=a(21750),q=a(89454),J=a(25925),Z=a(67753),$=a(86698),Q="classification-latest-releases",K=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,n=(0,x.T)().hasPermissions,r=t.presentationId&&t.dashboardId&&"true"===t.preview,o=n(_.C.StudentExperience),s=i.a.useBasicFetch(e&&r&&U.N.groups(e)),c=(0,$.y)(J.R.Subject,null,a,!0).presentation,d=i.a.useBasicFetch(t.presentationId&&V.x.presentationById(t.presentationId)),u=(!r||s.hasCompleted)&&!!c,p=function(){var e,a;if(!u)return{presentationId:null==c?void 0:c.id};if(!r)return{presentationId:null==c?void 0:c.id};var n=[G.j.Curator,G.j.Content,G.j.Developer];return(null===(a=null===(e=s.data)||void 0===e?void 0:e.data)||void 0===a?void 0:a.find((function(e){return n.includes(e.name)})))?{dashboardId:t.dashboardId,presentationId:t.presentationId}:{presentationId:null==c?void 0:c.id}}(),m=p.presentationId,v=p.dashboardId,f=i.a.useBasicFetch(u&&F._.discoverDashboard(m,function(){if(!v)return o?l.DashboardUserType.Learner:l.DashboardUserType.Staff}(),v?[l.DashboardStatus.Published,l.DashboardStatus.Draft,l.DashboardStatus.Archived]:[l.DashboardStatus.Published],v)),h=v?d.data:c;return{dashboard:f,presentation:h,audiences:i.a.useBasicFetch(h&&q.O.presentationAudiences(h.id)),isPreviewing:!!v}};function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var ee=c.T.encloseNamespace("dashboard.dashboard");function te(e){var t,a,n,c=i.a.useBasicFetch(T.L.config()),d=i.a.useBasicFetch(U.N.currentUser()),u=(0,x.T)(),p=u.hasLocalPermissions,m=u.hasPermissions,v=i.a.useBasicFetch(p(_.E.ManageDiscoverPreferences)&&d.data&&j.h.customer(d.data.customerId)),f=i.a.useBasicFetch((null===(t=d.data)||void 0===t?void 0:t.isAuthenticated)&&j.h.yearGroups(d.data.customerId)),h=K(null===(a=d.data)||void 0===a?void 0:a.id,e.queryParams,e.presentationSlug),y=h.dashboard,g=h.presentation,b=h.audiences,L=(0,A.Q)(),D=i.a.useGetFetchAsync(),N=(0,P.c)(B.LocationContext.Dashboard),O=N.setFavourite,G=N.canFavourite;(0,R.M)({title:ee("pageTitle"),description:ee("pageDescription")});var V,q,J,$=(V=(0,o.D)(C.g.AUDIENCE_FILTER,void 0,{storage:s.Z1.SessionStorage}),q=1,function(e){if(Array.isArray(e))return e}(V)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i,o,s=[],c=!0,l=!1;try{if(i=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;c=!1}else for(;!(c=(n=i.call(a)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{if(!c&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(l)throw r}}return s}}(V,q)||function(e,t){if(e){if("string"==typeof e)return X(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?X(e,t):void 0}}(V,q)||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],te=(J=S.T.getAudienceParams($),{classification:function(e){return{application:I.O.SUBJECT,action:k.e.Subjects.CLASSIFICATION,args:[null==e?void 0:e.id,z.m.slugify(null==e?void 0:e.name)],params:J||{}}},classificationTopics:function(){return{application:I.O.SUBJECT,action:k.e.Subjects.CLASSIFICATION_TOPICS,params:J||{}}},videoType:function(e){return Z.W.getAppLink(e)},series:function(e){return{application:I.O.SERIES,action:k.e.Series.SERIES,args:e?[e.id,z.m.slugify(e.name)]:[]}},playlist:function(e){return{application:I.O.PLAYLISTS,action:k.e.Playlists.PLAYLIST,args:[e.id,z.m.slugify(e.name)]}},latestReleases:function(){return{application:I.O.CONTENT_UPDATES,action:k.e.ContentUpdates.CONTENT_UPDATES}},allTopics:function(){return{application:I.O.SUBJECT,action:k.e.Subjects.CLASSIFICATION_ALL}},classificationLatestReleases:function(e){return e.id===Q?{application:I.O.CONTENT_UPDATES,action:k.e.ContentUpdates.CONTENT_UPDATES}:{application:I.O.CONTENT_UPDATES,action:k.e.ContentUpdates.CLASSIFICATION_UPDATE,args:[e.id,z.m.slugify(e.name)]}},widgetVideoList:function(e,t){return{application:I.O.DASHBOARD,action:k.e.Dashboard.DASHBOARD,args:[e,z.m.slugify(t)]}}}),ae=(0,Y.N)().showCalendar;return r().createElement("div",{className:"bg-white px-4"},L.isUpgrading&&(null===(n=y.data)||void 0===n?void 0:n.userType)===l.DashboardUserType.Staff&&r().createElement(w,null),r().createElement(E,{currentUser:d.data,dashboard:y.data,widgetAppLinks:te,headerAppLinks:{forYou:{application:I.O.DASHBOARD,action:k.e.Dashboard.HOME},whatsNew:{application:I.O.CONTENT_UPDATES,action:k.e.ContentUpdates.CONTENT_UPDATES},calendar:{application:I.O.CALENDAR,action:k.e.Calendar.CALENDAR}},presentation:g,imageCdnUrl:c.data.imageCdnUrl,getWidgetContentRequest:F._.dashboardWidgetContent,setFavourite:O,audiences:b.data,canFavourite:G,updatePreferences:function(e,t){return D(F._.updateWidgetPreferences(e,t,d.data))},canManageDiscoverPreferences:p(_.E.ManageDiscoverPreferences),onSubmitFeedback:m(_.C.CanSubmitFeedback)&&function(e){var t=D(H.n.sendDiscoverFooterFeedback(e,d.data,v.data,g,y.data,m(_.C.StudentExperience)));return M.k.logUserAction({feedbackType:e.type,content:e.content,presentationId:g.id,dashboardId:y.data.id},{actionType:B.UserAction.Submit,location:B.LocationContext.DiscoverFooter,entity:B.EntityType.Feedback,workflowPhase:B.WorkflowPhase.Complete}),t},hasStudentExperience:m(_.C.StudentExperience),yearGroups:f.data,lazyLoad:!W.f.isBot(),showCalendar:ae}))}},87432:(e,t,a)=>{a.d(t,{Z:()=>n});const n={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[9961],{3278:(e,t,n)=>{n.d(t,{z:()=>v});var a=n(1024),r=n.n(a),o=n(23481),i=n(83345),c=n(53957),l=n(38502),s=n(65858),u=n(55460);const d={pillTab:"bMJM0"};var m="discover.header";function v(e){var t,n,a,v,p,f;if(!e.type)return r().createElement(r().Fragment,null);if(e.type===c.DashboardUserType.Learner||e.hasStudentExperience)return r().createElement("div",{className:"py-3"},r().createElement("h1",{className:"h2 mb-0"},r().createElement(i.x,{namespace:m,phrase:"heading"})));var h=[{name:o.T.getPhrase(m,"forYou"),appLink:null===(t=e.appLinks)||void 0===t?void 0:t.forYou,active:"forYou"===e.active,analyticsData:{name:o.T.getPhrase(m,"forYou"),url:u.AppLinkHelper.getHref(null===(n=e.appLinks)||void 0===n?void 0:n.forYou)},analyticsOptions:{actionType:s.UserAction.Click,entity:s.EntityType.Url,location:s.LocationContext.MagicTabs}},{name:o.T.getPhrase(m,"whatsNew"),appLink:null===(a=e.appLinks)||void 0===a?void 0:a.whatsNew,active:"whatsNew"===e.active,analyticsData:{name:o.T.getPhrase(m,"whatsNew"),url:u.AppLinkHelper.getHref(null===(v=e.appLinks)||void 0===v?void 0:v.whatsNew)},analyticsOptions:{actionType:s.UserAction.Click,entity:s.EntityType.Url,location:s.LocationContext.MagicTabs}}];return e.showCalendar&&h.push({name:o.T.getPhrase(m,"calendar"),appLink:null===(p=e.appLinks)||void 0===p?void 0:p.calendar,active:"calendar"===e.active,analyticsData:{name:o.T.getPhrase(m,"calendar"),url:u.AppLinkHelper.getHref(null===(f=e.appLinks)||void 0===f?void 0:f.calendar)},analyticsOptions:{actionType:s.UserAction.Click,entity:s.EntityType.Url,location:s.LocationContext.MagicTabs}}),r().createElement("div",{className:"py-3 text-center"},r().createElement(l.r,{tabs:h,className:d.pillTab}))}},38502:(e,t,n)=>{n.d(t,{r:()=>u});var a=n(1024),r=n.n(a),o=n(11607),i=n(8493),c=n(49985),l=n(87432),s=n(76246);function u(e){var t;return r().createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},r().createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(l.Z.pillTabSelector)},e.tabs.map((function(e){return r().createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?r().createElement(i.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"cursor-pointer d-flex justify-content-center text-decoration-none text-reset px-2 ".concat(l.Z.pillItem)},e.name,"number"==typeof e.count&&r().createElement("div",{className:"pl-2"},r().createElement(s.C,{type:s.g.Count,data:e.count}))):r().createElement(o.L,{className:"".concat(l.Z.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&c.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&r().createElement("div",{className:"pl-2"},r().createElement(s.C,{type:s.g.Count,data:e.count}))))}))))}},2284:(e,t,n)=>{var a;n.d(t,{W:()=>a}),function(e){e.Draft="Draft",e.ComingSoon="ComingSoon",e.Published="Published"}(a||(a={}))},29917:(e,t,n)=>{n.d(t,{r:()=>d});var a=n(1024),r=n.n(a),o=n(23481),i=n(58130),c=n(83914),l=n(36532);const s={tag:"k1Yjy",tooltip:"Cgeav"};var u="specialEventCalendar.comingSoonTag";function d(e){return r().createElement(l.u,{title:o.T.getPhrase(u,"tooltip"),spanHackClassName:"d-block ".concat(s.tooltip),spanHack:!0},r().createElement("div",{className:"d-flex text-dark align-items-center ".concat(s.tag," ").concat(e.className)},r().createElement(c.x,{svgName:i.vn.Timer}),!e.onlyIcon&&o.T.getPhrase(u,"comingSoon")))}},13037:(e,t,n)=>{n.d(t,{b:()=>E});var a=n(1024),r=n.n(a),o=n(23481),i=n(110),c=n(49985),l=n(65858),s=n(8493),u=n(42735),d=n(54610),m=n(67453),v=n(79967),p=n(2284),f=n(61557),h=n(29917);const y={modalWidth:"v5TkI",banner:"LlPSp",bannerContent:"upY3A",pill:"B7ypp"};var g="specialEventCalendar.eventsListItem";function E(e){var t,n=(0,v.k)(),a=e.getAppLink(e.event.content.id,e.event.name),E=e.event.content.metadata.backgroundColor,b=m.j.createUrl(null===(t=e.event.content.banner)||void 0===t?void 0:t.url,{size:d.h2.Large}),D=!!e.event.endDate,O=e.event.content.status===p.W.ComingSoon,M={actionType:l.UserAction.Click,entity:l.EntityType.SpecialEvent,location:e.inPopup?l.LocationContext.CalendarPopup:l.LocationContext.CalendarDay},C={topicId:e.event.content.id,eventId:e.event.specialEventId,presentationId:e.presentationId,date:i.O.format(new Date(e.event.startDate),"YYYY-MM-DD"),status:e.event.content.status};return r().createElement("div",{onClick:function(){O&&c.k.logUserAction(C,M)}},r().createElement(s.F,{appLink:!O&&a,className:"".concat(O?"":"cursor-pointer"," text-decoration-none"),onClick:e.onClick,analyticsOptions:M,analyticsData:C},r().createElement("div",{className:"banner rounded-lg position-relative ".concat(y.banner),style:{backgroundColor:E,backgroundImage:"url('".concat(b,"')")}},r().createElement("div",{className:"".concat(y.bannerContent," px-3")},r().createElement("div",{className:"text-white"},O&&r().createElement(h.r,{className:"pr-2 font-weight-500 mb-1 rounded-pill justify-content-start ".concat(y.pill)}),D&&r().createElement("div",{className:"mb-1"},f.T.getDisplayDate(e.event.startDate,e.event.endDate)),r().createElement("h2",{className:"h4 clamp-1 text-white text-shadow",title:e.event.name},e.event.name)),r().createElement("div",{className:"flex-shrink-0"},!O&&r().createElement(u.K,{className:"btn btn-outline-dark font-weight-500"},o.T.getPhrase(g,n.xs?"mobileButtonLabel":"buttonLabel")))))),r().createElement("div",{className:"mt-2 mb-3"},e.event.description||e.event.content.description))}},39780:(e,t,n)=>{n.d(t,{N:()=>r});var a=n(97395),r={calendarEvents:function(e,t,n){return{url:a._.urlBuilder("{gateway}/v1/discover/special-events/content",{from:e,to:t,presentationId:n}),publicUrl:a._.urlBuilder("/api/discover/special-events/content",{from:e,to:t,presentationId:n}),key:"presentation:".concat(n,":events:from:").concat(e,":to").concat(t)}}}},74590:(e,t,n)=>{n.d(t,{N:()=>v});var a=n(1024),r=n.n(a),o=n(35242),i=n(55171),c=n(25925),l=n(37802),s=n(86698);function u(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 a,r,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=(a=o.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(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)?d(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 d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var m=[i.e.PresentationIds.US_ELEMENTARY];function v(){var e=(0,l.r)(null),t=e.hasSpecialEventCalendar,n=e.isLoadingSettings,a=(0,s.y)(c.R.Subject).presentation,i=!n&&!t,d=(null==a?void 0:a.id)&&!m.includes(+a.id),v=u(r().useState(!i&&!d),2),p=v[0],f=v[1],h=u(r().useState(n||!(null==a?void 0:a.id)),2),y=h[0],g=h[1];return r().useEffect((function(){i||d?f(!1):y||f(!0),g(n||!(null==a?void 0:a.id))}),[t,null==a?void 0:a.id,y]),o.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:p,isLoading:y}}},61557:(e,t,n)=>{n.d(t,{T:()=>c});var a=n(28400),r=n(110),o=n(97291),i=n(14070),c={getTopicAppLink:function(e,t){return{application:o.O.SUBJECT,action:i.e.Subjects.CLASSIFICATION,args:[e,a.m.slugify(t)]}},getDisplayDate:function(e,t){return t?e.slice(5,7)!==t.slice(5,7)?"".concat(r.O.format(e,"D MMM")," - ").concat(r.O.format(t,"D MMM")):"".concat(r.O.format(e,"D")," - ").concat(r.O.format(t,"D")," ").concat(r.O.format(e,"MMM")):r.O.format(e,"D MMM")},getEventsInMonth:function(e,t){return e.filter((function(e){return r.O.format(e.startDate,"YYYY-MM")===r.O.format(t,"YYYY-MM")}))},getOrdinalDate:function(e){return"".concat(r.O.localeData().ordinal(r.O.get(e,"date"))," ").concat(r.O.format(e,"MMMM"))}}},19961:(e,t,n)=>{n.r(t),n.d(t,{CalendarView:()=>Te});var a=n(1024),r=n.n(a),o=n(81886),i=n(23481),c=n(110),l=n(25925),s=n(53957),u=n(3278),d=n(68677),m=n(97291),v=n(14070),p=n(86698),f=n(79967),h=n(8493),y=n(65858),g=n(83914),E=n(58130),b=n(11607),D=n(33192),O=n.n(D),M=n(75896),C=new Date("2023-01-01"),k=12;function w(e,t){for(var n=c.O.startOf(e,"month"),a=c.O.getWeekday(n),r=[],o=t?0===a?6:a-1:a,i=t?1:0;i<=o;i++){var l=n,s=c.O.weekday(l,a-i);r.push(Object.assign(s,{notCurrentMonth:!0}))}return r.reverse()}function N(e,t){for(var n=c.O.endOf(e,"month"),a=c.O.getWeekday(n),r=[],o=t?7-(0===a?7:a):7-a,i=1;i<=o;i+=1){var l=c.O.add(n,i,"days");r.push(Object.assign(l,{notCurrentMonth:!0}))}return r}function Y(e){var t=c.O.startOf(e,"month");return 1===c.O.getWeekday(t)?t:M.m.first(w(e,!0))}function A(e){var t=c.O.endOf(e,"month");return 0===c.O.getWeekday(t)?t:M.m.last(N(e,!0))}function S(e){return[Y(e),A(e)]}var L=new Date;const I={actions:"DpKMU",chevron:"IE4Ui",left:"AFmnx",right:"N1Rz_"};var T="specialEventCalendar.calendarNav";function x(e){var t="previous"===e.action?E.vn.ChevronLeft:E.vn.ChevronRight,n="previous"===e.action?I.left:I.right;return r().createElement(b.L,{className:"".concat(I.chevron," ").concat(n," border border-dark rounded-circle bg-white d-flex align-items-center justify-content-center"),onClick:e.onClick},r().createElement(g.x,{svgName:t,size:g.S.Medium,className:"svg-container d-inline-block ".concat(I.svg)}))}var j=new Date;function H(e){var t=(0,f.k)();function n(e){var t=c.O.format(e,"MMMM").toLocaleLowerCase(),n=(new Date).getFullYear(),a=e.getFullYear(),r={application:m.O.CALENDAR,action:v.e.Calendar.CALENDAR_MONTH,args:[t]};return n!==a&&(r.params={year:a}),r}var a,o,l=(a=e.monthDate,o=c.O.diffBetween(c.O.startOf(a,"month"),c.O.startOf(L,"month"),"months"),{showPrev:c.O.isAfter(a,C,"month"),showNext:o<k}),s=l.showPrev,u=l.showNext,d={actionType:y.UserAction.Click,entity:y.EntityType.SpecialEvent,location:y.LocationContext.CalendarNav};function p(e){return c.O.format(e,"YYYY-MM-DD")}return r().createElement("div",{className:"d-flex justify-content-between align-items-center"},r().createElement("h1",{className:"mb-0 h2"},c.O.format(e.monthDate,t.xs?"MMM YYYY":"MMMM YYYY")),r().createElement("div",{className:"d-flex ".concat(I.actions)},s&&r().createElement(h.F,{appLink:n(c.O.startOf(c.O.subtract(e.monthDate,1,"month"),"month")),className:"d-flex",analyticsOptions:d,analyticsData:{action:"previous",date:p(c.O.startOf(c.O.add(e.monthDate,1,"month"),"month"))}},r().createElement(x,{action:"previous",onClick:function(){var t=c.O.subtract(e.monthDate,1,"month");e.setViewingMonthDate(t)}})),r().createElement(h.F,{appLink:{application:m.O.CALENDAR,action:v.e.Calendar.CALENDAR},className:"d-flex",analyticsOptions:d,analyticsData:{action:"today",date:p(c.O.startOf(j,"month"))}},r().createElement(b.L,{className:"".concat(I.todayWrapper," btn btn-outline-dark font-weight-500"),onClick:function(){c.O.format(j,"YYYY-MM-DD")!==c.O.format(e.monthDate,"YYYY-MM-DD")&&e.setViewingMonthDate()}},i.T.getPhrase(T,"today"))),u&&r().createElement(h.F,{appLink:n(c.O.startOf(c.O.add(e.monthDate,1,"month"),"month")),className:"d-flex",analyticsOptions:d,analyticsData:{action:"next",date:p(c.O.startOf(c.O.add(e.monthDate,1,"month"),"month"))}},r().createElement(x,{action:"next",onClick:function(){var t=c.O.add(e.monthDate,1,"month");e.setViewingMonthDate(t)}}))))}var U=n(99910),P=n(27867),R=n(49985),F=n(54610),W=n(67453),_=n(2284),B=n(55171),V=n(61557),z=n(49439);const J={cellDate:"MvrIK",label:"UFPJm",isHovering:"d4VLP",numberWrapper:"PyWl_"};function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Q=i.T.encloseNamespace("specialEventCalendar.calendarCellDate");function Z(e){var t=c.O.isToday(e.date),n="".concat(J.cellDate," d-flex flex-nowrap");t&&(n+=" bg-dark text-white"),e.notCurrentMonth&&!e.isHovering&&(n+=" text-secondary"),e.hasEvent&&(n+=" text-white"),e.className&&(n+=" ".concat(e.className));var a,o,i=(a=(0,z.L)({delay:250}),o=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,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=(a=o.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(a,o)||function(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}}(a,o)||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.")}()),l=i[0],s=i[1];return r().createElement("div",{className:"".concat(n," ").concat(s?J.isHovering:""),ref:l},r().createElement("div",{className:"".concat(J.numberWrapper," ").concat("d-flex text-center justify-content-center align-items-center flex-shrink-0")},c.O.format(e.date,"D")),t&&r().createElement("div",{className:"".concat(J.label," justify-content-start align-items-center")},Q("today")))}var $=n(29917);const X={hardcodedCover:"o0bws",tag:"UIeoi",date:"p1FoI",backgroundImage:"_33D7",eventCard:"MPgib",wrapper:"yvPrI",left:"KBv2n",right:"dowd6",noAnimation:"HWvit",cover:"hoJcZ",hasMultiDays:"lRYHZ",isHovering:"ENu03",tagWrap:"VKCBZ",appear:"zh9Ja",displayDate:"i5dV5",title:"od2i9",titleText:"oNtXC",circle:"Y9ovs",active:"DSUJW",arrow:"RjkfI",bottomBar:"RlRw7",bottomPlaceholder:"Hs06S",multiEventFilter:"O2Dl3"};function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,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=(a=o.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return G(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)?G(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 G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function ee(e){var t,n,a=q(r().useState(0),2),o=a[0],i=a[1],l=e.eventsOnDay.length>1,s=e.eventsOnDay.find((function(e,t){return t===o})),u=!!s.endDate,d=s.content.metadata.backgroundColor,p=B.e.SpecialEvents[s.content.id],f=p?W.j.createUrl(p.iconUrl,{size:F.h2.Medium}):W.j.createUrl(null===(t=s.content.icon)||void 0===t?void 0:t.url,{size:F.h2.Small}),D=W.j.createUrl(null===(n=s.content.cover)||void 0===n?void 0:n.url,{size:F.h2.Small}),O=V.T.getTopicAppLink(s.content.id,s.name),M=s.content.status===_.W.ComingSoon,C={application:m.O.CALENDAR,action:v.e.Calendar.SPECIAL_EVENT_LIST,params:Object.assign(Object.assign({},e.monthQuery),{date:e.date.toString()})},k=q(r().useState(e.hasInited?X.appear:""),2),w=k[0],N=k[1];r().useEffect((function(){if(!e.hasInited){var t=Math.floor(600*Math.random()+400);window.setTimeout((function(){N(X.appear),window.setTimeout((function(){e.setHasInited(!0)}),400)}),t)}}),[e.hasInited]),r().useEffect((function(){e.isHovering&&e.setHoveredEvent(s)}),[e.isHovering,s]),r().useEffect((function(){return function(){var t;(null===(t=e.hoveredEvent)||void 0===t?void 0:t.specialEventId)===s.specialEventId&&e.setHoveredEvent(null)}}),[e.hoveredEvent,s]);var Y=null;l?Y=C:M||(Y=O);var A=function(){var t={date:c.O.format(e.date,"YYYY-MM-DD"),presentationId:e.presentationId,eventCount:e.eventsOnDay.length};return l?(t.eventId=e.eventsOnDay.map((function(e){return e.specialEventId})).join(","),t.topicId=e.eventsOnDay.map((function(e){return e.content.id})).join(",")):(t.eventId=s.specialEventId,t.topicId=s.content.id,t.eventStatus=s.content.status),t}(),S={actionType:y.UserAction.Click,entity:y.EntityType.SpecialEvent,location:y.LocationContext.CalendarDay};function L(e){return c.O.format(e,"YYYY-MM-DD")}return r().createElement("div",{onClick:function(){M&&R.k.logUserAction(A,S)}},r().createElement(h.F,{appLink:Y,className:"d-flex justify-content-end",analyticsOptions:S,analyticsData:A},r().createElement("div",{className:"".concat(X.tagWrap," p-1")},M&&r().createElement($.r,{className:"justify-content-center p-0 rounded-circle ".concat(X.tag," ").concat(w),onlyIcon:!0})),r().createElement(Z,{date:e.date,notCurrentMonth:e.notCurrentMonth,className:"".concat(X.date," ").concat(w),hasEvent:!0,isHovering:e.isHovering}),r().createElement("div",{className:"postion-relative ".concat(X.wrapper)},r().createElement("div",{style:{backgroundImage:"url('".concat(f||D,"')")},className:"position-absolute ".concat(p?X.hardcodedCover:X.backgroundImage," ").concat(f?"":X.cover," ").concat(M?X.comingSoon:""," ").concat(w," ").concat(e.hasInited?X.noAnimation:""," ").concat(e.isHovering?"rounded-lg ".concat(X.isHovering):""," ").concat(u?X.hasMultiDays:""," ").concat(e.isMultiEventDate?X.multiEventFilter:"")}),r().createElement("div",{style:{backgroundColor:d},className:"position-absolute d-flex flex-column justify-content-end align-items-center text-white px-1 pt-2 pb-1 ".concat(X.eventCard," ").concat(w," ").concat(e.isHovering?"rounded-lg":""," ").concat(e.isMultiEventDate?X.multiEventFilter:"")},u&&r().createElement("div",{className:"".concat(X.displayDate)},V.T.getDisplayDate(s.startDate,s.endDate)),r().createElement("div",{className:"text-center ".concat(X.title," ").concat(l?"mb-1":"mb-2")},r().createElement("div",{className:"".concat(X.titleText," ").concat(e.isHovering?"":"clamp-2"," ").concat(e.isHovering?"mb-0":""," h6"),title:s.name},s.name)),l&&0!==o&&r().createElement("div",{className:"position-absolute bg-white rounded-circle ".concat(X.left)},r().createElement(b.L,{onClick:function(t){t.stopPropagation(),t.preventDefault(),i((function(e){return e-1})),R.k.logUserAction({date:L(e.date),action:"previous",eventCount:e.eventsOnDay.length},S)}},r().createElement(g.x,{svgName:E.vn.ChevronLeft,className:"d-inline-block svg-container text-dark ".concat(X.arrow)}))),l&&o!==e.eventsOnDay.length-1&&r().createElement("div",{className:"position-absolute bg-white rounded-circle ".concat(X.right)},r().createElement(b.L,{onClick:function(t){t.stopPropagation(),t.preventDefault(),i((function(e){return e+1})),R.k.logUserAction({date:L(e.date),action:"next",eventCount:e.eventsOnDay.length},S)}},r().createElement(g.x,{svgName:E.vn.ChevronRight,className:"d-inline-block svg-container text-dark ".concat(X.arrow)}))),l&&r().createElement("div",{className:"d-flex ".concat(X.bottomBar," ").concat(l?"":X.bottomPlaceholder)},e.eventsOnDay.map((function(t,n){var a=n===o;return r().createElement(b.L,{key:n,className:"".concat(X.circle," ").concat(a?X.active:""," ").concat(e.isHovering?"mb-2":"mb-1"),onClick:function(t){t.stopPropagation(),t.preventDefault(),i(n),R.k.logUserAction({date:L(e.date),action:"jump",eventCount:e.eventsOnDay.length},S)}})})))))))}const te={wrapper:"ID5BX",notCurrentMonth:"KThJz",weekend:"Le3vK",cell:"GY1K5",animationWrapper:"hioeW",zoom:"hUhLq",multiEventCell:"OhwMa",fadeIn:"hDM5I"};function ne(e){var t,n,a,o=e.hoverPositionConfig?e.hoverPositionConfig.originalWidth/e.hoverPositionConfig.width:1,i=r().useMemo((function(){var t,n,a,r;return(null===(t=e.hoveredEvent)||void 0===t?void 0:t.endDate)&&!c.O.isSame(e.date,null===(n=e.hoveredEvent)||void 0===n?void 0:n.startDate)&&c.O.isBetween(c.O.format(e.date,"YYYY-MM-DD"),null===(a=e.hoveredEvent)||void 0===a?void 0:a.startDate,null===(r=e.hoveredEvent)||void 0===r?void 0:r.endDate)}),[e.hoveredEvent]),l=null===(t=e.hoveredEvent)||void 0===t?void 0:t.content.metadata.backgroundColor;return r().createElement("div",{className:"".concat(te.cell," ").concat(e.isHovering?te.animationWrapper:""," font-weight-500"),style:{"--scale":o,transformOrigin:null===(n=e.hoverPositionConfig)||void 0===n?void 0:n.transformOrigin}},r().createElement(Z,{date:e.date,notCurrentMonth:e.notCurrentMonth}),i&&r().createElement("div",{style:{backgroundColor:l},className:te.multiEventCell}),(null===(a=e.eventsOnDay)||void 0===a?void 0:a.length)>0&&r().createElement(ee,Object.assign({},e,{isMultiEventDate:i})))}function ae(e){var t,n=e.date,a=e.notCurrentMonth,o="position-relative border border-light-blue ".concat(te.wrapper);(function(e){return 0===c.O.getWeekday(e)||6===c.O.getWeekday(e)})(n)&&(o+=" ".concat(te.weekend)),a&&(o+=" ".concat(te.notCurrentMonth));var i=(null===(t=e.events)||void 0===t?void 0:t.filter((function(t){return c.O.isSame(e.date,t.startDate)})))||[],l=Object.assign(Object.assign({},e),{eventsOnDay:i});return r().createElement("td",{className:o},(null==i?void 0:i.length)>0?r().createElement(P.K,{hoverableComponent:ne,componentProps:l,hoverScale:1.35}):r().createElement(ne,Object.assign({},l,{isHovering:!1})))}var re=n(83345),oe=n(23232),ie=n(99742),ce="specialEvent.eventsEmptyState",le=i.T.encloseNamespace(ce);function se(e){return r().createElement(re.D.Provider,{value:ce},r().createElement(oe.u,null,r().createElement(oe.u.Image,{src:ie.W.EmptyStates.CALENDAR.NO_EVENTS}),r().createElement(oe.u.Heading,null,r().createElement(re.x,{phrase:"heading"})),r().createElement(oe.u.Info,null,r().createElement(re.x,{namespace:ce,phrase:"info"}),r().createElement(h.F,{appLink:e.appLink},r().createElement("span",{className:"text-blue"},le("link"))))))}var ue=n(13037);const de={date:"dn7Hd",first:"axdj4"};function me(e){var t={};e.events.forEach((function(e){var n=e.startDate;t[n]?t[n].push(e):t[n]=[e]}));var n=Object.keys(t);return n.sort((function(e,t){return c.O.isBefore(e,t)?-1:0})),r().createElement("div",{className:"py-1"},n.map((function(n,a){return r().createElement("div",{key:n},r().createElement("div",{className:"h4 mt-4 ".concat(de.date," ").concat(0===a?de.first:"")},V.T.getOrdinalDate(n)),t[n].map((function(t){return r().createElement(ue.b,{key:t.content.id,getAppLink:V.T.getTopicAppLink,event:t,presentationId:e.presentationId})})))})))}const ve={header:"xLOrx",thead:"ef_XJ"};function pe(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 a,r,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=(a=o.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return fe(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)?fe(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 fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function he(e){var t=(0,f.k)(),n=V.T.getEventsInMonth(e.events||[],e.viewingMonth),a=pe(r().useState(!1),2),o=a[0],i=a[1],c=pe(r().useState(null),2),l=c[0],s=c[1];return t.xs||t.sm||t.md?e.eventsLoaded?(null==n?void 0:n.length)?r().createElement(me,{events:n,presentationId:e.presentationId}):r().createElement(se,{appLink:{application:m.O.CONTENT_UPDATES,action:v.e.ContentUpdates.CONTENT_UPDATES}}):r().createElement("div",{className:"d-flex justify-content-center align-items-center"},r().createElement(U.Spinner,{as:"div",animation:"border",role:"status"})):r().createElement("table",{className:"user-select-none w-100 mt-3 overflow-hidden rounded-top-lg"},r().createElement("thead",{className:"border border-light-blue ".concat(ve.thead)},r().createElement("tr",{className:"font-weight-500 bg-light-blue ".concat(ve.header)},e.weekDaysHeader.map((function(e){return r().createElement("th",{key:e,className:"px-2 h4"},e)})))),r().createElement("tbody",null,e.weekDays.map((function(t){return r().createElement("tr",{key:t[0].toString()},t.map((function(t){return r().createElement(ae,{key:t.toString(),date:t,notCurrentMonth:!!t.notCurrentMonth,events:e.events,monthQuery:e.monthQuery,hasInited:o,setHasInited:i,presentationId:e.presentationId,hoveredEvent:l,setHoveredEvent:s})})))}))))}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var ge=new Date;function Ee(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ge,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=function(e){var t=e?[1,2,3,4,5,6,0]:[0,1,2,3,4,5,6],n=new Date;return t.map((function(e){return c.O.format(c.O.weekday(n,e),"ddd")}))}(a),l=r().useRef({}),s=(e=r().useState([]),t=2,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 a,r,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=(a=o.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ye(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)?ye(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.")}()),u=s[0],d=s[1],p=c.O.format(n,"YYYY-MM");r().useEffect((function(){var e=l.current[p];if(e)d(e.weeksTable);else{var t=function(e,t){for(var n=[],a={},r=w(e,t).concat(function(e){for(var t=c.O.daysInMonth(e),n=[],a=1;a<=t;a++){var r=c.O.set(e,"date",a);n.push(Object.assign(r,{notCurrentMonth:!1}))}return n}(e)).concat(N(e,t)),o=function(e){var t=r.slice(i,i+7);t.forEach((function(t,n){a[c.O.format(t,"YYYY-MM-DD")]={row:e,col:n}})),n.push(t),e++,l=e},i=0,l=0;i<r.length;i+=7)o(l);return{datePositionMap:a,weeksTable:n}}(n,a),r=t.weeksTable,o=t.datePositionMap;l.current[p]={weeksTable:r,datePositionMap:o},d(r)}}),[c.O.format(n,"YYYY-MM")]);var f=M.m.first(M.m.first(u)),h=M.m.last(M.m.last(u));return{weekDaysHeader:i,weekDays:u,monthDate:n,setMonthDate:function(e){if(e){if(p!==c.O.format(e,"YYYY-MM")){var t=c.O.format(e,"MMMM").toLocaleLowerCase(),a=(new Date).getFullYear(),r=n.getFullYear(),i={application:m.O.CALENDAR,action:v.e.Calendar.CALENDAR_MONTH,args:[t]};a!==r&&(i.params={year:r}),o.Q.AppLinkHelper.trigger(i)}}else o.Q.AppLinkHelper.trigger({application:m.O.CALENDAR,action:v.e.Calendar.CALENDAR})},startDate:f,endDate:h}}var be=n(20354),De=n(39780);function Oe(e){return function(e){if(Array.isArray(e))return ke(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ce(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Me(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 a,r,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=(a=o.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(e,t)||Ce(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 Ce(e,t){if(e){if("string"==typeof e)return ke(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)?ke(e,t):void 0}}function ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var we=n(74590),Ne="specialEvent.eventsErrorState",Ye=i.T.encloseNamespace(Ne);function Ae(e){return r().createElement(re.D.Provider,{value:Ne},r().createElement(oe.u,null,r().createElement(oe.u.Image,{src:ie.W.EmptyStates.CALENDAR.INVALID_DATE}),r().createElement(oe.u.Heading,null,r().createElement(re.x,{phrase:"heading"})),r().createElement(oe.u.Info,null,r().createElement(re.x,{namespace:Ne,phrase:"info"}),r().createElement("br",null),r().createElement(h.F,{appLink:e.appLink},r().createElement("span",{className:"text-blue"},Ye("link"))))))}var Se={whatsNew:{application:m.O.CONTENT_UPDATES,action:v.e.ContentUpdates.CONTENT_UPDATES},forYou:{application:m.O.DASHBOARD,action:v.e.Dashboard.HOME},calendar:{application:m.O.CALENDAR,action:v.e.Calendar.CALENDAR}},Le=i.T.encloseNamespace("specialEventCalendar.calendarView"),Ie=c.O.format(new Date,"MMMM-YYYY").toLocaleLowerCase();function Te(e){var t=(0,p.y)(l.R.Subject).presentation,n=(0,we.N)(),a=n.showCalendar,i=n.isLoading,m=function(e){if(!e)return!0;if(!c.O.formatIsValid(e,"MMMM-YYYY",!0))return!1;var t=O()(e,"MMMM-YYYY").toDate();return c.O.isSame(t,C,"month")||c.O.isAfter(t,C,"month")}(e.month);(0,d.M)({title:Le("pageTitle")}),r().useEffect((function(){i||a||o.Q.AppLinkHelper.trigger(Se.forYou,{replace:!0})}),[a,i]);var v,f=(v=e.month)?O()(v,"MMMM-YYYY").toDate():c.O.parseDateString(),h=Ee(f),y=h.monthDate,g=h.setMonthDate,E=h.weekDays,b=h.weekDaysHeader,D=h.startDate,k=h.endDate,w=function(e){var t=(0,p.y)(l.R.Subject).presentation,n=null==t?void 0:t.id,a=Me(S(e),2),r=a[0],o=a[1],i=Me(S(c.O.add(e,1,"month")),2),s=i[0],u=i[1],d=Me(S(c.O.subtract(e,1,"month")),2),m=d[0],v=d[1],f=be.a.useBasicFetch(r&&o&&n&&De.N.calendarEvents(c.O.format(r,"YYYY-MM-DD"),c.O.format(o,"YYYY-MM-DD"),n)),h=be.a.useBasicFetch(s&&u&&n&&De.N.calendarEvents(c.O.format(s,"YYYY-MM-DD"),c.O.format(u,"YYYY-MM-DD"),n)),y=be.a.useBasicFetch(m&&v&&n&&De.N.calendarEvents(c.O.format(m,"YYYY-MM-DD"),c.O.format(v,"YYYY-MM-DD"),n));return{events:M.m.uniq([].concat(Oe(y.data||[]),Oe(f.data||[]),Oe(h.data||[])),(function(e){return e.specialEventId})),loaded:f.hasCompleted}}(f),N=w.events,Y=w.loaded;return null===e.month||m?i||!(null==t?void 0:t.id)?r().createElement(r().Fragment,null):r().createElement("div",{className:"bg-white px-3"},r().createElement(u.z,{type:s.DashboardUserType.Staff,appLinks:Se,showCalendar:a,active:"calendar"}),r().createElement(H,{monthDate:y,setViewingMonthDate:g}),r().createElement(he,{weekDays:E,weekDaysHeader:b,events:N,monthQuery:{from:null==D?void 0:D.toString(),to:null==k?void 0:k.toString()},viewingMonth:f,eventsLoaded:Y,presentationId:t.id})):r().createElement(Ae,{appLink:Object.assign(Object.assign({},Se.calendar),{args:[Ie]})})}},87432:(e,t,n)=>{n.d(t,{Z:()=>a});const a={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);