@clickview/lite 0.21.0-rc.2 → 0.21.0
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 +2 -2
- package/dist/css/{9845-lite-639bd55dfe.chunk.css → 834-lite-bf090a41c1.chunk.css} +2 -2
- package/dist/css/{lite-app-08a760bae8.css → lite-app-a17f37d854.css} +1 -1
- package/dist/languages/en.json +1 -1
- package/dist/scripts/2199-3a9e8fa21a-lite.chunk.js +1 -0
- package/dist/scripts/{2512-5bf7e24def-lite.chunk.js → 2512-8aebcc22ad-lite.chunk.js} +1 -1
- package/dist/scripts/{2883-c7df1884ce-lite.chunk.js → 2883-6a10e0042f-lite.chunk.js} +1 -1
- package/dist/scripts/4898-819c12ce24-lite.chunk.js +1 -0
- package/dist/scripts/{6477-aef0792f87-lite.chunk.js → 6477-ea205b40df-lite.chunk.js} +1 -1
- package/dist/scripts/7950-44f07724fd-lite.chunk.js +2 -0
- package/dist/scripts/834-65a3767bdc-lite.chunk.js +1 -0
- package/dist/scripts/8359-a820574782-lite.chunk.js +1 -0
- package/dist/scripts/8681-eab57e5c95-lite.chunk.js +2 -0
- package/dist/scripts/9455-1be4596b49-lite.chunk.js +1 -0
- package/dist/scripts/bundle-b512089c91.min.js +2 -0
- package/package.json +2 -2
- package/dist/scripts/2199-717012cfce-lite.chunk.js +0 -1
- package/dist/scripts/4898-5f14766d50-lite.chunk.js +0 -1
- package/dist/scripts/7950-6d1981f1a6-lite.chunk.js +0 -2
- package/dist/scripts/8359-a2e42d7181-lite.chunk.js +0 -1
- package/dist/scripts/8681-2240dc0f8e-lite.chunk.js +0 -2
- package/dist/scripts/9455-581e0db3f5-lite.chunk.js +0 -1
- package/dist/scripts/9845-9952f1a765-lite.chunk.js +0 -1
- package/dist/scripts/bundle-6274bc5b82.min.js +0 -2
- /package/dist/scripts/{7950-6d1981f1a6-lite.chunk.js.LICENSE.txt → 7950-44f07724fd-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8681-2240dc0f8e-lite.chunk.js.LICENSE.txt → 8681-eab57e5c95-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-6274bc5b82.min.js.LICENSE.txt → bundle-b512089c91.min.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clickview/lite",
|
|
3
|
-
"version": "0.21.0
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"description": "ClickView Lite",
|
|
5
5
|
"main": "dist/scripts/bundle.js",
|
|
6
6
|
"types": "dist/projects/lite/src/index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@clickview/braze-client": "1.0.5",
|
|
35
|
-
"@clickview/styles": "1.
|
|
35
|
+
"@clickview/styles": "1.21.0",
|
|
36
36
|
"@googlemaps/js-api-loader": "1.15.1",
|
|
37
37
|
"@microsoft/immersive-reader-sdk": "1.0.0",
|
|
38
38
|
"@microsoft/teams-js": "1.5.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[2199],{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),c=n.n(a),o=n(23481),r=n(58130),l=n(83914),i=n(36532);const s={tag:"k1Yjy",tooltip:"Cgeav"};var m="specialEventCalendar.comingSoonTag";function d(e){return c().createElement(i.u,{title:o.T.getPhrase(m,"tooltip"),spanHackClassName:"d-block ".concat(s.tooltip),spanHack:!0},c().createElement("div",{className:"d-flex text-dark align-items-center ".concat(s.tag," ").concat(e.className)},c().createElement(l.x,{svgName:r.vn.Timer}),!e.onlyIcon&&o.T.getPhrase(m,"comingSoon")))}},13037:(e,t,n)=>{n.d(t,{b:()=>f});var a=n(1024),c=n.n(a),o=n(23481),r=n(8493),l=n(42735),i=n(54610),s=n(67453),m=n(79967),d=n(2284),u=n(61557),p=n(29917);const v={modalWidth:"v5TkI",banner:"LlPSp",bannerContent:"upY3A",pill:"B7ypp"};var g="specialEventCalendar.eventsListItem";function f(e){var t=(0,m.k)(),n=e.getAppLink(e.event.content.id,e.event.name),a=e.event.content.metadata.backgroundColor,f=s.j.createUrl(e.event.content.banner.url,{size:i.h2.Large}),b=!!e.event.endDate,M=e.event.content.status===d.W.ComingSoon;return c().createElement("div",null,c().createElement(r.F,{appLink:!M&&n,className:"".concat(M?"":"cursor-pointer"," text-decoration-none"),onClick:e.onClick},c().createElement("div",{className:"banner rounded-lg position-relative ".concat(v.banner),style:{backgroundColor:a,backgroundImage:"url('".concat(f,"')")}},c().createElement("div",{className:"".concat(v.bannerContent," px-3")},c().createElement("div",{className:"text-white"},M&&c().createElement(p.r,{className:"pr-2 font-weight-500 mb-1 rounded-pill justify-content-start ".concat(v.pill)}),b&&c().createElement("div",{className:"mb-1"},u.T.getDisplayDate(e.event.startDate,e.event.endDate)),c().createElement("h2",{className:"h4 clamp-1 text-white text-shadow",title:e.event.name},e.event.name)),c().createElement("div",{className:"flex-shrink-0"},!M&&c().createElement(l.K,{className:"btn btn-outline-dark font-weight-500"},o.T.getPhrase(g,t.xs?"mobileButtonLabel":"buttonLabel")))))),c().createElement("div",{className:"mt-2 mb-3"},e.event.description||e.event.content.description))}},39780:(e,t,n)=>{n.d(t,{N:()=>c});var a=n(97395),c={calendarEvents:function(e,t,n){return{url:a._.urlBuilder("{gateway}/v1/discover/special-events/content",{from:e,to:t,presentationId:n}),key:"presentation:".concat(n,":events:from:").concat(e,":to").concat(t)}}}},61557:(e,t,n)=>{n.d(t,{T:()=>l});var a=n(28400),c=n(110),o=n(97291),r=n(14070),l={getTopicAppLink:function(e,t){return{application:o.O.SUBJECT,action:r.e.Subjects.CLASSIFICATION,args:[e,a.m.slugify(t)]}},getDisplayDate:function(e,t){return t?e.slice(5,7)!==t.slice(5,7)?"".concat(c.O.format(e,"D MMM")," - ").concat(c.O.format(t,"D MMM")):"".concat(c.O.format(e,"D")," - ").concat(c.O.format(t,"D")," ").concat(c.O.format(e,"MMM")):c.O.format(e,"D MMM")},getEventsInMonth:function(e,t){return e.filter((function(e){return c.O.format(e.startDate,"YYYY-MM")===c.O.format(t,"YYYY-MM")}))},getOrdinalDate:function(e){return"".concat(c.O.localeData().ordinal(c.O.get(e,"date"))," ").concat(c.O.format(e,"MMMM"))}}},72199:(e,t,n)=>{n.r(t),n.d(t,{SpecialEventListView:()=>h});var a=n(1024),c=n.n(a),o=n(20354),r=n(54976),l=n.n(r),i=n(23481),s=n(110),m=n(9111),d=n(13876),u=n(13037),p=n(39780),v=n(61557),g=n(25925),f=n(21750);const b={modalWidth:"LrMq0",buttons:"jAfM0"};var M="specialEventCalendar.eventListPopup",k=400,E=300;function h(e){var t,n=o.a.useBasicFetch(f.x.presentation(g.R.Subject)),a=new Date(e.from),r=new Date(e.to),h=o.a.useBasicFetch(n.data&&p.N.calendarEvents(s.O.format(a,"YYYY-MM-DD"),s.O.format(r,"YYYY-MM-DD"),n.data.id)),D=(null===(t=h.data)||void 0===t?void 0:t.filter((function(t){return t.startDate===s.O.format(new Date(e.date),"YYYY-MM-DD")})))||[];return c().createElement(m.G,{title:"Events on ".concat(v.T.getOrdinalDate(e.date)),closePopup:e.closePopup,dialogClassName:b.modalWidth,bodyClassName:"p-0",showLoadingSpinner:!h.data},c().createElement(l(),{autoHeight:!0,autoHeightMin:E,autoHeightMax:k},c().createElement("div",{className:"px-3 pt-2"},D.map((function(t){return c().createElement(u.b,{key:t.content.id,getAppLink:v.T.getTopicAppLink,event:t,onClick:e.closePopup})})))),c().createElement("div",{className:"ml-3"},c().createElement(d.u,{className:b.buttons},c().createElement(d.u.Cancel,{variant:"outline-dark",className:"mb-3",onClick:e.closePopup,text:i.T.getPhrase(M,"close")}))))}}}]);
|
|
@@ -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:()=>m});var a=n(1024),r=n.n(a),i=n(20354),o=n(35242),l=n(55171),c=n(21750),s=n(25925),u=n(37802);function d(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 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,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 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=[l.e.PresentationIds.AU_PRIMARY,l.e.PresentationIds.US_ELEMENTARY,l.e.PresentationIds.ENGLAND_PRIMARY];function m(){var e,t,n,a=(0,u.r)(null),l=a.hasSpecialEventCalendar,p=a.isLoadingSettings,m=i.a.useBasicFetch(c.x.presentation(s.R.Subject)),v=!p&&!l,y=(null===(e=m.data)||void 0===e?void 0:e.id)&&!f.includes(+m.data.id),b=d(r().useState(!v&&!y),2),h=b[0],g=b[1],E=d(r().useState(p||!(null===(t=m.data)||void 0===t?void 0:t.id)),2),w=E[0],k=E[1];return r().useEffect((function(){var e;v||y?g(!1):w||g(!0),k(p||!(null===(e=m.data)||void 0===e?void 0:e.id))}),[l,null===(n=m.data)||void 0===n?void 0:n.id,w]),o.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:h,isLoading:w}}},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(23049),u=n(53957),d=n(61699),p=n(39151),f=n(69883),m=n(39902),v=n(54644),y=n(51365),b=n(3278),h=n(83345),g=n(22902),E=n(16714),w=n(8493),k=n(97037),S=n(31949),C=n(1666),j=n(25925),A=n(49985),N=n(65858),L=n(65986),O=n(97291),T=n(97816),F=n(14070),U=n(86698),x=n(44110),I=n(41063),P=n(74590),D=n(67453),B=n(54610),M=n(4632),R=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:B.__.Banners},{size:B.h2.Medium,resizeType:B.Nq.Cover});return a.createElement("div",{className:"mb-3"},a.createElement(R.aq,{classification:t,backgroundUrl:l,getClassificationAppLink:e.appLinks.getClassificationAppLink,followed:o,follow:e.follow,canFollow:e.canFollow,showFollowSpinner:e.showFollowSpinner}),a.createElement(M.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(w.F,{className:"info-link",appLink:e.appLinks.getClassificationUpdateAppLink(t)},a.createElement(h.x,{namespace:Y,phrase:"showMore",options:{classificationName:t.name}}))))}var q=n(74696);const H={partialBanner:"bxaA6"};function V(){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(H.partialBanner)}),r().createElement(q.S,null),";")})))}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,B,M,R,Y=(M=a.useState({}),R=2,function(e){if(Array.isArray(e))return e}(M)||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}}(M,R)||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}}(M,R)||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.")}()),q=Y[0],H=Y[1],z=(0,o.useDispatch)(),J=(0,f.Z)();(0,s.o)(c.T.getPhrase($,"pageTitle"));var Q=(0,g.T)().hasPermissions,K=Q(E.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(p.L.config()),ne=l.a.useBasicFetch(S.N.currentUser()),ae=l.a.useBasicFetch((null===(t=ne.data)||void 0===t?void 0:t.isAuthenticated)&&C.h.yearGroups(ne.data.customerId)),re=(0,U.y)(j.R.Subject).presentation,ie=v.v.getContentUpdates(null==re?void 0:re.id,X,ee),oe=l.a.useBasicFetch(re&&ie),le=l.a.useBasicFetch(K&&d.o.mySubjectPreferences()),ce=(0,x.i)(),se=[],ue=[];oe.data&&oe.data.forEach((function(e){se.push(e.id),ue=ue.concat(e.videos)}));var de=(0,m.f)(se,(function(e){return v.v.getClassifications(e)})).items,pe=(0,L._)(L.i.VideoItem);(0,T.V)(ue,{hasCurriculumLinks:!0,flightNamespace:null===(n=ie.normalizeOptions)||void 0===n?void 0:n.namespace});var fe=(0,k.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){H((function(t){return Object.assign(Object.assign({},t),G({},e,!0))}));var a=function(){var a;H((function(t){return Object.assign(Object.assign({},t),G({},e,!1))})),A.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(){H((function(t){return Object.assign(Object.assign({},t),G({},e,!1))})),J.error(c.T.getPhrase($,"error"))},i=n?d.o.followSubjects([e],a,r):d.o.unfollowSubjects([e],a,r);l.a.fetch(z,i)}var be=(0,P.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!==(B=null===(D=le.data)||void 0===D?void 0:D.map((function(e){return e.id})))&&void 0!==B?B:[],Se=Q(E.C.ManageSubjectPreferences),Ce=(0,I.b)();return a.createElement(y.M.Provider,{value:pe},a.createElement("div",{className:"bg-white px-3"},!ge&&a.createElement(b.z,{type:u.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(h.x,{namespace:$,phrase:"heading"})),(Se||Ce)&&a.createElement("p",null,Se&&a.createElement(a.Fragment,null,a.createElement(h.x,{namespace:$,phrase:"onlyRelevant"})," ",a.createElement(w.F,{className:"info-link",appLink:{application:O.O.SETTINGS,action:F.e.Settings.TOPIC_PREFERENCES}},a.createElement(h.x,{namespace:$,phrase:"updatePreferences"}))),Ce&&a.createElement("span",{className:"d-block"},a.createElement(w.F,{className:"info-link",appLink:{application:O.O.SETTINGS,action:F.e.Settings.CONTENT_REVIEW}},a.createElement(h.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:q[null===(i=t.classification)||void 0===i?void 0:i.id],canFollow:K,setFavourite:me,canFavourite:ve,audiences:ce.data})}))):a.createElement(V,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,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 7950-6d1981f1a6-lite.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[7950],{49935:(e,t,n)=>{n.d(t,{Oo:()=>m,b2:()=>d});var r=n(1024),a=n(8493),i=n(5859),o=n(86764),c=n(3747),l=n(83914),s=n(58130),u=function(e){var t=e.breadcrumb,n=t.name,i=t.appLink,o=t.active,c=e.withBackIcon;return r.createElement("li",{className:"breadcrumb-item".concat(o?" active":"")},o?r.createElement("strong",null,n):r.createElement(a.F,{appLink:i},c&&r.createElement(l.x,{svgName:s.vn.ChevronLeft,size:l.S.Small}),r.createElement("span",{className:c?"ml-2":""},n)))},m=function(e){var t=e.breadcrumbs,n=(0,c.a)(o.r.XS),a=null==t?void 0:t.length;return!a||n&&a<2?r.createElement(r.Fragment,null):n?r.createElement("ol",{className:"breadcrumb m-0 p-0"},r.createElement(u,{breadcrumb:t[a-2],withBackIcon:!0})):r.createElement("ol",{className:"breadcrumb m-0 p-0"},t.map((function(e,t){return r.createElement(u,{key:t,breadcrumb:e})})))},d=r.memo((function(e){var t=e.numItems,n=void 0===t?3:t;return(0,c.a)(o.r.XS)?r.createElement("div",{className:"partial-loading-background",style:{height:"1.3125rem",width:"6rem"}}):r.createElement("nav",{"aria-label":"breadcrumb"},r.createElement("ol",{className:"breadcrumb m-0 p-0"},i.u.getPartialLoadingItems({numItems:n}).map((function(e,t){var n=e.width;return r.createElement("li",{key:t,className:"breadcrumb-item"},r.createElement("span",{className:"d-inline-block partial-loading-background",style:{width:n},dangerouslySetInnerHTML:{__html:" "}}))}))))}))},98461:(e,t,n)=>{n.d(t,{d:()=>o});var r=n(1024),a=n(49985),i=n(55460);function o(e){var t=e.href,n=e.className,o=e.newTab,c=e.children,l={onClick:function(n){var r;n.preventDefault(),null===(r=e.onClick)||void 0===r||r.call(e,n),e.analyticsData&&e.analyticsOptions&&a.k.logUserAction(Object.assign({href:t},e.analyticsData),e.analyticsOptions),i.LocationUtils.PageLoad(t,o)},href:t,className:n};return r.createElement("a",Object.assign({},l),c)}},38502:(e,t,n)=>{n.d(t,{r:()=>u});var r=n(1024),a=n.n(r),i=n(11607),o=n(8493),c=n(49985),l=n(87432),s=n(76246);function u(e){var t;return a().createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},a().createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(l.Z.pillTabSelector)},e.tabs.map((function(e){return a().createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?a().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(l.Z.pillItem)},e.name,"number"==typeof e.count&&a().createElement("div",{className:"pl-2"},a().createElement(s.C,{type:s.g.Count,data:e.count}))):a().createElement(i.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&&a().createElement("div",{className:"pl-2"},a().createElement(s.C,{type:s.g.Count,data:e.count}))))}))))}},5859:(e,t,n)=>{function r(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}n.d(t,{u:()=>i});var a={numItems:5,minWidth:50,maxWidth:100},i={getPartialLoadingItems:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(Object.assign({},a),t);return(e=Array(n.numItems),function(e){if(Array.isArray(e))return r(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 r(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)?r(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.")}()).map((function(){return{width:"".concat(Math.max(Math.floor(Math.random()*n.maxWidth),n.minWidth),"px")}}))}}},23224:(e,t,n)=>{n.d(t,{j:()=>f});var r=n(1024),a=n.n(r),i=n(55460),o=n(23481),c=n(65858),l=n(38502),s=n(97291),u=n(14070),m="settings.restrictedVideosTabs",d=o.T.encloseNamespace(m),p={restrictedVideos:{application:s.O.SETTINGS,action:u.e.Settings.VIDEO_RESTRICTIONS},contentReview:{application:s.O.SETTINGS,action:u.e.Settings.CONTENT_REVIEW},contentReviewSettings:{application:s.O.SETTINGS,action:u.e.Settings.CONTENT_REVIEW_SETTINGS}};function f(e){return a().createElement("div",{className:"mb-3"},a().createElement(l.r,{tabs:[{name:d("restrictedVideos"),appLink:p.restrictedVideos,active:"restricted-videos"===e.active,analyticsData:{name:d("restrictedVideos"),url:i.AppLinkHelper.getHref(p.restrictedVideos)},analyticsOptions:{actionType:c.UserAction.Click,entity:c.EntityType.Url,location:c.LocationContext.MagicTabs}},{name:d("contentReview"),appLink:p.contentReview,active:"content-review"===e.active,analyticsData:{name:o.T.getPhrase(m,"contentReview"),url:i.AppLinkHelper.getHref(p.contentReview)},analyticsOptions:{actionType:c.UserAction.Click,entity:c.EntityType.Url,location:c.LocationContext.MagicTabs}},{name:d("contentReviewSettings"),appLink:p.contentReviewSettings,active:"content-review-settings"===e.active,analyticsData:{name:o.T.getPhrase(m,"contentReviewSettings"),url:i.AppLinkHelper.getHref(p.contentReviewSettings)},analyticsOptions:{actionType:c.UserAction.Click,entity:c.EntityType.Url,location:c.LocationContext.MagicTabs}}]}))}},81803:(e,t,n)=>{n.d(t,{d:()=>v});var r=n(1024),a=n.n(r),i=n(81886),o=n(23481),c=n(49935),l=n(22902),s=n(97291),u=n(14070),m=n(96368);function d(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 p="settings.settingsLayout",f=function(e){var t=(0,l.T)().hasPermissions,n=(0,m.e)();if(e)return t(e);var r=i.Q.AppLinkHelper.getCurrentAppLink();return r.application!==s.O.SETTINGS||n.some((function(e){return e.modules.some((function(e){return"appLink"in e&&e.appLink.action===r.action}))}))};function v(e){var t=f(e.requiredPermissions);if(a().useEffect((function(){t||i.Q.AppLinkHelper.trigger({application:s.O.SETTINGS,action:u.e.Settings.HOME},{replace:!0})}),[t]),!t)return a().createElement(a().Fragment,null);var n,r=e.breadcrumbs.map((function(t,n){return{name:t,appLink:{application:s.O.SETTINGS,action:u.e.Settings.HOME},active:n===e.breadcrumbs.length-1}}));return a().createElement("div",{className:"px-3"},a().createElement("h1",{className:"h2"},e.heading),a().createElement("div",{className:"pb-3"},a().createElement(c.Oo,{breadcrumbs:[{name:o.T.getPhrase(p,"settingsBreadcrumb"),appLink:{application:s.O.SETTINGS,action:u.e.Settings.HOME}}].concat((n=r,function(e){if(Array.isArray(e))return d(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||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}}(n)||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.")}()))})),e.description&&a().createElement(a().Fragment,null,a().createElement("p",null,e.description),a().createElement("hr",null)),e.children)}},17749:(e,t,n)=>{n.d(t,{g:()=>a});var r=n(99940),a={getLibraryReviewPeriod:function(){return{url:"{gateway}/v1/library-reviews",key:"coming:soon:settings",normalize:!1}},setLibraryReviewPeriod:function(e){return{url:"{gateway}/v1/library-reviews",key:"update:coming:soon:settings",invalidationKeys:"coming:soon:settings",type:r.k.POST,data:{reviewPeriod:e},normalize:!1}},deleteLibraryReviewPeriod:function(){return{url:"{gateway}/v1/library-reviews",key:"delete:coming:soon:settings",invalidationKeys:"coming:soon:settings",type:r.k.DELETE,normalize:!1}}}},51672:(e,t,n)=>{n.r(t),n.d(t,{ContentReviewSettingsView:()=>D});var r=n(1024),a=n.n(r),i=n(81886),o=n(20354),c=n(50242),l=n(23481),s=n(69883),u=n(16714),m=n(97291),d=n(14070),p=n(81803),f=n(83345),v=n(2102),h="settings.contentReviewSettings",y=l.T.encloseNamespace(h),g=[{phrase:"14days",value:14},{phrase:"21days",value:21},{phrase:"30days",value:30}];function b(e){return a().createElement("div",{className:"mb-3 d-flex"},a().createElement("div",null,a().createElement("p",{className:(t="font-weight-bold mb-1",e.isSettingEnabled?t:"".concat(t," text-muted"))},a().createElement(f.x,{namespace:h,phrase:"reviewHeading"})),a().createElement("p",{className:"mb-1 text-muted"},a().createElement(f.x,{namespace:h,phrase:"reviewDescription",options:{days:e.selected}}))),a().createElement("div",{className:"flex-shrink-0 ml-2"},a().createElement("select",{id:"review-days",name:"review-days",autoComplete:"off",className:"form-control",value:e.selected||"",disabled:!e.isSettingEnabled||e.disabled,onChange:function(t){e.onChange(parseInt(t.target.value))}},g.map((function(e,t){return a().createElement("option",{value:e.value,key:t},y(e.phrase))})))));var t}var E=n(98461),w=n(83523),S="settings.contentReviewSettings";function N(e){return a().createElement("div",{className:"row mb-3"},a().createElement("div",{className:"col-10"},a().createElement("p",{className:"font-weight-bold mb-1"},a().createElement(f.x,{namespace:S,phrase:"subHeading"})),a().createElement("p",{className:"mb-1 text-muted"},a().createElement(f.x,{namespace:S,phrase:"description"})),a().createElement("p",{className:"mb-0"},a().createElement(E.d,{href:"#replace-link",className:"info-link"},a().createElement(f.x,{namespace:S,phrase:"learnMore"})))),a().createElement("div",{className:"col"},a().createElement(w.Z,{on:e.isEnabled,onClick:e.toggleSwitch,disabled:e.disabled,showStateWhenDisabled:!0})))}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||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}}(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 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 x="settings.contentReviewSettings";function O(e){var t=L(a().useState(e.isEnabled),2),n=t[0],r=t[1],i=L(a().useState(e.reviewDays),2),o=i[0],c=i[1],l=e.reviewDays!==o||e.isEnabled!==n;return a().createElement("div",{className:"row"},a().createElement("div",{className:"col col-md-8 col-lg-6"},a().createElement(N,{disabled:e.isLoading,isEnabled:n,toggleSwitch:function(){n||o||c(14),r((function(e){return!e}))}}),a().createElement(b,{disabled:e.isLoading,selected:o,isSettingEnabled:n,onChange:function(e){return c(e)}}),a().createElement(v.m,{onClick:function(){l&&e.handleOnSave(n,o)},showSpinner:e.isLoading,className:"btn btn-dark",disabled:e.isLoading||!l},a().createElement(f.x,{namespace:x,phrase:"saveButton"}))))}var T=n(17749);const A={oneLine:"BlwYh",twoLine:"xfqid"};function I(){return a().createElement("div",{className:"row no-gutters"},a().createElement("div",{className:"col col-md-7 col-lg-5"},a().createElement("div",{className:"row mb-3"},a().createElement("div",{className:"col-10"},a().createElement("div",{className:"partial-loading-background w-50 mb-1 ".concat(A.oneLine)}),a().createElement("div",{className:"partial-loading-background w-100 mb-1 ".concat(A.twoLine)}),a().createElement("div",{className:"partial-loading-background w-100 ".concat(A.oneLine)})),a().createElement("div",{className:"col"},a().createElement("div",{className:"partial-loading-background w-100 ".concat(A.oneLine)}))),a().createElement("div",{className:"row mb-2"},a().createElement("div",{className:"col-9"},a().createElement("div",{className:"partial-loading-background w-50 mb-1 ".concat(A.oneLine)}),a().createElement("div",{className:"partial-loading-background w-100 mb-1 ".concat(A.twoLine)})),a().createElement("div",{className:"col"},a().createElement("div",{className:"partial-loading-background w-100 ".concat(A.twoLine)}))),a().createElement("div",{className:"partial-loading-background w-25 ".concat(A.twoLine)})))}var j=n(23224);function C(e){return C="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},C(e)}function _(){_=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",o=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,a){var i=t&&t.prototype instanceof d?t:d,o=Object.create(i.prototype),c=new k(a||[]);return r(o,"_invoke",{value:w(e,n,c)}),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var m={};function d(){}function p(){}function f(){}var v={};l(v,i,(function(){return this}));var h=Object.getPrototypeOf,y=h&&h(h(x([])));y&&y!==t&&n.call(y,i)&&(v=y);var g=f.prototype=d.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function a(r,i,o,c){var l=u(e[r],e,i);if("throw"!==l.type){var s=l.arg,m=s.value;return m&&"object"==C(m)&&n.call(m,"__await")?t.resolve(m.__await).then((function(e){a("next",e,o,c)}),(function(e){a("throw",e,o,c)})):t.resolve(m).then((function(e){s.value=e,o(s)}),(function(e){return a("throw",e,o,c)}))}c(l.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){a(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function w(e,t,n){var r="suspendedStart";return function(a,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===a)throw i;return{value:void 0,done:!0}}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var c=S(o,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=u(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function S(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=u(r,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,m;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,m):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function N(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 L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function x(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=f,r(g,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:p,configurable:!0}),p.displayName=l(f,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,c,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},b(E.prototype),l(E.prototype,o,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,r,a,i){void 0===i&&(i=Promise);var o=new E(s(t,n,r,a),i);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(g),l(g,c,"Generator"),l(g,i,(function(){return this})),l(g,"toString",(function(){return"[object Generator]"})),e.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}},e.values=x,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):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),m},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),L(n),m}},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;L(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),m}},e}function P(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 R=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function c(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,c)}l((r=r.apply(e,t||[])).next())}))},G=l.T.encloseNamespace("settings.contentReviewSettings");function D(){var e,t,n,r=o.a.useGetFetchAsync(),l=(0,s.Z)(),f=(t=a().useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return 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}}(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.")}()),v=f[0],h=f[1],y=o.a.useBasicFetch(T.g.getLibraryReviewPeriod()),g=!(y.hasError||y.statusCode===c.o.NotFound);return a().createElement(p.d,{heading:G("heading"),breadcrumbs:[G("heading")],requiredPermissions:u.C.ManageVideoAccess},a().createElement(j.j,{active:"content-review-settings"}),y.hasCompleted?a().createElement(O,{isLoading:v,isEnabled:g,reviewDays:null===(e=y.data)||void 0===e?void 0:e.reviewPeriod,handleOnSave:function(e,t){return R(this,void 0,void 0,_().mark((function n(){return _().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(e){n.next=3;break}return i.Q.AppLinkHelper.trigger({application:m.O.SETTINGS,action:d.e.Settings.TURN_OFF_CONTENT_REVIEW}),n.abrupt("return");case 3:return h(!0),n.prev=4,n.next=7,r(T.g.setLibraryReviewPeriod(t));case 7:l.success(G("success")),n.next=13;break;case 10:n.prev=10,n.t0=n.catch(4),l.error(G("error"));case 13:h(!1);case 14:case"end":return n.stop()}}),n,null,[[4,10]])})))}}):a().createElement(I,null))}},41063:(e,t,n)=>{n.d(t,{b:()=>o});var r=n(22902),a=n(37802),i=n(16714);function o(){var e=(0,r.T)().hasPermissions;return(0,a.r)(null).manageVideoAccess&&e(i.C.ManageVideoAccess)}},87432:(e,t,n)=>{n.d(t,{Z:()=>r});const r={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[8359],{54644:(e,t,a)=>{a.d(t,{v:()=>i});var n=a(97395),i={getContentUpdates:function(e,t,a){return{url:n._.urlBuilder("/api/domain/v1/subjects/content-updates",{from:t,to:a,limit:6,query:"(videoCollection)"}),publicUrl:n._.urlBuilder("/api/subjects/presentations/".concat(e,"/content-updates"),{from:t,to:a,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:n._.urlBuilder("/api/domain/v1/subjects",{id:e,query:"banner"}),publicUrl:n._.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,a){return{url:n._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/content-updates"),{from:t,to:a,query:"(videoCollection)"}),publicUrl:n._.urlBuilder("/api/subjects/classifications/".concat(e,"/content-updates"),{from:t,to:a,query:"(videoCollection)"}),key:"classification:update:".concat(e,":").concat(t,":").concat(a)}},getContentUpdateVideos:function(e,t){return{url:n._.urlBuilder("/api/domain/v1/subjects/content-updates/videos",{from:e,to:t,query:"(videoCollection)"}),publicUrl:n._.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,a)=>{a.d(t,{z:()=>m});var n=a(1024),i=a.n(n),r=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 i().createElement(i().Fragment,null);if(e.type===s.DashboardUserType.Learner||e.hasStudentExperience)return i().createElement("div",{className:"py-3"},i().createElement("h1",{className:"h2 mb-0"},i().createElement(o.x,{namespace:p,phrase:"heading"})));var y=[{name:r.T.getPhrase(p,"forYou"),appLink:null===(t=e.appLinks)||void 0===t?void 0:t.forYou,active:"forYou"===e.active,analyticsData:{name:r.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:r.T.getPhrase(p,"whatsNew"),appLink:null===(n=e.appLinks)||void 0===n?void 0:n.whatsNew,active:"whatsNew"===e.active,analyticsData:{name:r.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&&y.push({name:r.T.getPhrase(p,"calendar"),appLink:null===(v=e.appLinks)||void 0===v?void 0:v.calendar,active:"calendar"===e.active,analyticsData:{name:r.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}}),i().createElement("div",{className:"py-3 text-center"},i().createElement(c.r,{tabs:y,className:u.pillTab}))}},38502:(e,t,a)=>{a.d(t,{r:()=>d});var n=a(1024),i=a.n(n),r=a(11607),o=a(8493),s=a(49985),c=a(87432),l=a(76246);function d(e){var t;return i().createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},i().createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(c.Z.pillTabSelector)},e.tabs.map((function(e){return i().createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?i().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&&i().createElement("div",{className:"pl-2"},i().createElement(l.C,{type:l.g.Count,data:e.count}))):i().createElement(r.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&&i().createElement("div",{className:"pl-2"},i().createElement(l.C,{type:l.g.Count,data:e.count}))))}))))}},74590:(e,t,a)=>{a.d(t,{N:()=>v});var n=a(1024),i=a.n(n),r=a(20354),o=a(35242),s=a(55171),c=a(21750),l=a(25925),d=a(37802);function u(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,i,r,o,s=[],c=!0,l=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;c=!1}else for(;!(c=(n=r.call(a)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return p(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)?p(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 p(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 m=[s.e.PresentationIds.AU_PRIMARY,s.e.PresentationIds.US_ELEMENTARY,s.e.PresentationIds.ENGLAND_PRIMARY];function v(){var e,t,a,n=(0,d.r)(null),s=n.hasSpecialEventCalendar,p=n.isLoadingSettings,v=r.a.useBasicFetch(c.x.presentation(l.R.Subject)),f=!p&&!s,y=(null===(e=v.data)||void 0===e?void 0:e.id)&&!m.includes(+v.data.id),b=u(i().useState(!f&&!y),2),g=b[0],h=b[1],E=u(i().useState(p||!(null===(t=v.data)||void 0===t?void 0:t.id)),2),C=E[0],S=E[1];return i().useEffect((function(){var e;f||y?h(!1):C||h(!0),S(p||!(null===(e=v.data)||void 0===e?void 0:e.id))}),[s,null===(a=v.data)||void 0===a?void 0:a.id,C]),o.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:g,isLoading:C}}},3865:(e,t,a)=>{a.d(t,{_:()=>l});var n=a(97395),i=a(62803),r=a(4434),o=function(e,t){return"widget:".concat(e,":").concat(t)},s=function(e){return n._.urlBuilder("/api/domain/v3/dashboards/widgets",{libraryType:e})},c=function(e){return"{gateway}/v1/objects/".concat(e,"?query=videos[").concat(r.H.WIDGET_VIDEO_COLLECTION,"]{orderBy:orderindex}")},l={widgets:function(e){return{url:s(e),key:"widgets:v3:".concat(e)}},playlist:function(e,t){return{url:c(e),key:o(e,t)}},getPlaylistVideos:function(e,t){var a={query:"(videos[".concat(i.v.VIDEO_COLLECTION,"]){orderBy:orderindex,limit:100}")};return t&&(a.cursor=t),{url:n._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),a),key:"widget:videos:".concat(e,":").concat(t)}}}},40286:(e,t,a)=>{a.r(t),a.d(t,{DiscoverViewWrapper:()=>Ie});var n,i=a(1024),r=a.n(i),o=a(37802),s=a(65858),c=a(39479),l=a(33192),d=a(20354),u=a(2948),p=a(23481),m=a(23049),v=a(57900),f=a(75896),y=a(53957);!function(e){e[e.HostedLibrary=0]="HostedLibrary",e[e.Exchange=1]="Exchange",e[e.MoviesAndTvLibrary=2]="MoviesAndTvLibrary"}(n||(n={}));var b=a(58704),g=a(31949),h=a(5281),E=a(96519),C=a(21750),S=a(38143),T=a(69454),A=a(54644),L=a(22902),I=a(16714),O=a(45739),D=a(97037),k=a(14070),N=a(97291),U=a(25925),w=a(39151),F=a(28400),P=a(87348),j=a(64628),x=a(41523),B=a(65203),_=a(93475),R=a(3865),M=a(83345),H=a(10874),Y=a(58130),q=a(99742);const V={banner:"Vqx6B"};var W="shared.upgradeVideoBanner";function G(){return i.createElement("div",{className:"py-4 px-3 rounded h4 ".concat(V.banner," border"),style:{backgroundImage:'url("'.concat(q.W.Upgrade.VIDEO_BANNER,'")')}},i.createElement(M.x,{namespace:W,phrase:"message"}),i.createElement(H.h,{svgName:Y.vn.Play,appLink:{application:N.O.DEFAULT,action:k.e.Default.LITE_UPGRADE_VIDEO},className:"btn btn-outline-dark ml-3 align-middle"},i.createElement(M.x,{namespace:W,phrase:"button"})))}var z=a(490),J=a(9408),Z=a(3278),$=a(1666),Q=a(74590);function K(e){return function(e){if(Array.isArray(e))return ee(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||X(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e,t){if(e){if("string"==typeof e)return ee(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)?ee(e,t):void 0}}function ee(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 te=p.T.encloseNamespace("dashboard.dashboard"),ae="explore-all-topics",ne={video:{application:N.O.VIDEOS,action:k.e.Videos.PLAY_VIDEO},collection:{application:N.O.DASHBOARD,action:k.e.Dashboard.DASHBOARD},series:{application:N.O.SERIES,action:k.e.Series.SERIES},classification:{application:N.O.SUBJECT,action:k.e.Subjects.CLASSIFICATION},contentUpdates:{application:N.O.CONTENT_UPDATES,action:k.e.ContentUpdates.CONTENT_UPDATES},allClassifications:{application:N.O.SUBJECT,action:k.e.Subjects.CLASSIFICATION_ALL},discover:{application:N.O.DASHBOARD,action:k.e.Dashboard.HOME},calendar:{application:N.O.CALENDAR,action:k.e.Calendar.CALENDAR}};function ie(e,t,a){return d.a.useBasicFetch(a?R._.playlist(e,null==t?void 0:t.id):null)}function re(){var e,t,a,r,o,p,k,N,M,H=(0,D.c)(s.LocationContext.ExpandableVideoThumbnail),Y=H.setFavourite,q=H.canFavourite,V=d.a.useBasicFetch(w.L.config()),W=d.a.useBasicFetch(C.x.presentation(U.R.Subject)),ee=d.a.useBasicFetch(C.x.availablePresentations(U.R.Subject)),re=d.a.useBasicFetch(g.N.currentUser()),oe=d.a.useBasicFetch((null===(e=re.data)||void 0===e?void 0:e.isAuthenticated)&&$.h.yearGroups(re.data.customerId)),se=(k=(null==(p=re.data)?void 0:p.countryCode)&&R._.widgets(n.HostedLibrary),d.a.useBasicFetch(k).data),ce=function(e,t){var a,n=d.a.useBasicFetch(w.L.config()),i=O.i.getFeaturedTopic(null==t?void 0:t.id,null===(a=n.data)||void 0===a?void 0:a.featuredTopics);return d.a.useBasicFetch((null==i?void 0:i.id)&&C.x.classification(i.id,null==e?void 0:e.id))}(re.data,W.data),le=function(e){var t,a,n=null,i=!e.isFetching,r=d.a.useBasicFetch(i&&C.x.classifications());return(null===(t=r.data)||void 0===t?void 0:t.length)&&(n=(null===(a=e.data)||void 0===a?void 0:a.id)?r.data.filter((function(t){return t.id!==e.data.id})):r.data),Object.assign(Object.assign({},r),{data:n})}(ce),de=(N=l().subtract(1,"year").endOf("day").format("YYYY-MM-DD"),M=l().endOf("day").format("YYYY-MM-DD"),d.a.useBasicFetch(A.v.getContentUpdateVideos(N,M))),ue=O.i.getPresentationLevelImage(null===(t=W.data)||void 0===t?void 0:t.learningLevel,"new-release-banner"),pe=f.m.last(ue.split("/")),me=(0,L.T)().hasPermissions,ve=(0,P.Q)();(0,m.o)(te("pageTitle"));var fe,ye,be=(fe=(0,u.D)(S.g.AUDIENCE_FILTER,void 0,{storage:v.Z1.SessionStorage}),ye=1,function(e){if(Array.isArray(e))return e}(fe)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,i,r,o,s=[],c=!0,l=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;c=!1}else for(;!(c=(n=r.call(a)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(fe,ye)||X(fe,ye)||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],ge=(0,Q.N)(),he=ge.showCalendar,Ee=ge.isLoading;return i.createElement("div",{className:"bg-white px-3"},ve.isUpgrading&&!me(I.C.StudentExperience)&&i.createElement(G,null),!Ee&&i.createElement(Z.z,{type:me(I.C.StudentExperience)?y.DashboardUserType.Learner:y.DashboardUserType.Staff,appLinks:{forYou:ne.discover,whatsNew:ne.contentUpdates,calendar:ne.calendar},showCalendar:he,active:"forYou"}),i.createElement("div",{className:"pb-3"},le.hasCompleted?i.createElement(j.f,{appLinks:{allTopics:function(){return ne.allClassifications},classification:function(e){return Object.assign(Object.assign({},ne.classification),{args:[e.id,F.m.slugify(e.name)],params:T.T.getAudienceParams(be)})}},name:me(I.C.StudentExperience)?te("topicsHeadingLearner"):te("topicsHeadingStaff"),content:[{id:ae,name:O.i.getExploreAllTopicsTitle(null===(a=W.data)||void 0===a?void 0:a.name,null===(r=ee.data)||void 0===r?void 0:r.length),tallPoster:{url:O.i.getPresentationLevelImage(null===(o=W.data)||void 0===o?void 0:o.learningLevel,"tall-poster")}}].concat(K(le.data))}):i.createElement(x.J,null)),!!ce.data&&i.createElement("div",{className:"pb-3"},i.createElement(z.U,{appLinks:{classification:function(){return Object.assign(Object.assign({},ne.classification),{args:[ce.data.id,ce.data.slug]})}},content:[ce.data],name:ce.data.name,yearGroups:oe.data})),ce.isFetching&&i.createElement("div",{className:"pb-3"},i.createElement(J.D,null)),!me(I.C.StudentExperience)&&i.createElement("div",{className:"pb-3"},de.hasCompleted?i.createElement(B.o,{content:de.data,appLinks:{latestReleases:function(){return ne.contentUpdates},videoType:function(e){return Object.assign(Object.assign({},ne.video),{args:[e.id,F.m.slugify(e.name)]})},series:function(){return ne.series}},name:te("latestReleases"),setFavourite:Y,canFavourite:q,metadata:{appLink:y.CuratedDashboardAppLink.LatestReleases,imageId:pe},imageCdnUrl:V.data.imageCdnUrl,limitTotalItems:!0,yearGroups:oe.data}):i.createElement(_.B,null)),se&&i.createElement(i.Fragment,null,se.map((function(e,t){return i.createElement("div",{key:t,className:"pb-3"},i.createElement(h.k,{type:e.type,contents:b.z.Videos,fetch:c.partial(ie,e.collectionId.toString(),re.data),setData:function(e){var t;return null===(t=null==e?void 0:e.videos)||void 0===t?void 0:t.data},lazyLoad:!0,childComponent:E.E,extraChildComponentProps:{seriesAppLink:ne.series,setFavourite:Y,canFavourite:q},appLink:ne.collection,getChildAppLink:function(e){return Object.assign(Object.assign({},ne.video),{args:[e.id,F.m.slugify(e.name)]})},minimumItemCount:3,limitTotalItems:!0}))}))))}var oe=a(61226),se=a(21366),ce=a(23232),le=a(36532),de="subjects.discoverDashboardEmptyState";function ue(e){var t,a,n=(null===(t=e.dashboard)||void 0===t?void 0:t.status)===y.DashboardStatus.Archived;return r().createElement(ce.u,null,r().createElement(ce.u.Image,{src:e.imageUrl}),r().createElement(ce.u.Heading,null,r().createElement(M.x,{namespace:de,phrase:"heading"})),r().createElement(ce.u.Info,null,r().createElement(M.x,{namespace:de,phrase:"info"})),r().createElement(le.u,{title:n?p.T.getPhrase(de,"archivedCtaTooltip"):"",spanHack:!0},r().createElement(ce.u.Cta,{text:p.T.getPhrase(de,"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 pe(e){var t,a,n=f.m.sortBy(null===(t=e.dashboard)||void 0===t?void 0:t.widgets,"index");function i(t,a,n){var i=se.S.getWidgetParams(a,n,se.S.getDashboardTargetType(e.dashboard));return e.getWidgetContentRequest(t,i)}var o=e.isReadonly&&!(null==n?void 0:n.length);return r().createElement(r().Fragment,null,r().createElement(Z.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(oe.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(ue,{dashboard:e.dashboard,isReadonly:e.isReadonly,imageUrl:e.emptyImageUrl,addWidgetApplink:e.widgetAppLinks.widgetWizard}))}var me=a(80889),ve=a(49985),fe=a(52333),ye=a(18921),be=a(42617),ge=a(89454),he=a(67753),Ee=a(86698),Ce="classification-latest-releases",Se=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=(0,L.T)().hasPermissions,n=t.presentationId&&t.dashboardId&&"true"===t.preview,i=a(I.C.StudentExperience),r=d.a.useBasicFetch(e&&n&&g.N.groups(e)),o=(0,Ee.y)(U.R.Subject).presentation,s=d.a.useBasicFetch(t.presentationId&&C.x.presentationById(t.presentationId)),c=(!n||r.hasCompleted)&&!!o,l=function(){var e,a;if(!c)return{presentationId:null==o?void 0:o.id};if(!n)return{presentationId:null==o?void 0:o.id};var i=[be.j.Curator,be.j.Content,be.j.Developer];return(null===(a=null===(e=r.data)||void 0===e?void 0:e.data)||void 0===a?void 0:a.find((function(e){return i.includes(e.name)})))?{dashboardId:t.dashboardId,presentationId:t.presentationId}:{presentationId:null==o?void 0:o.id}}(),u=l.presentationId,p=l.dashboardId,m=d.a.useBasicFetch(c&&me._.discoverDashboard(u,function(){if(!p)return i?y.DashboardUserType.Learner:y.DashboardUserType.Staff}(),p?[y.DashboardStatus.Published,y.DashboardStatus.Draft,y.DashboardStatus.Archived]:[y.DashboardStatus.Published],p)),v=p?s.data:o;return{dashboard:m,presentation:v,audiences:d.a.useBasicFetch(v&&ge.O.presentationAudiences(v.id)),isPreviewing:!!p}};function Te(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 Ae=p.T.encloseNamespace("dashboard.dashboard");function Le(e){var t,a,n,i=d.a.useBasicFetch(w.L.config()),o=d.a.useBasicFetch(g.N.currentUser()),c=(0,L.T)(),l=c.hasLocalPermissions,p=c.hasPermissions,f=d.a.useBasicFetch(l(I.E.ManageDiscoverPreferences)&&o.data&&$.h.customer(o.data.customerId)),b=d.a.useBasicFetch((null===(t=o.data)||void 0===t?void 0:t.isAuthenticated)&&$.h.yearGroups(o.data.customerId)),h=Se(null===(a=o.data)||void 0===a?void 0:a.id,e.queryParams),E=h.dashboard,C=h.presentation,A=h.audiences,O=(0,P.Q)(),U=d.a.useGetFetchAsync(),j=(0,D.c)(s.LocationContext.Dashboard),x=j.setFavourite,B=j.canFavourite;(0,m.o)(Ae("pageTitle"));var _,R,M,H=(_=(0,u.D)(S.g.AUDIENCE_FILTER,void 0,{storage:v.Z1.SessionStorage}),R=1,function(e){if(Array.isArray(e))return e}(_)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,i,r,o,s=[],c=!0,l=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;c=!1}else for(;!(c=(n=r.call(a)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=a.return&&(o=a.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(_,R)||function(e,t){if(e){if("string"==typeof e)return Te(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)?Te(e,t):void 0}}(_,R)||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],Y=(M=T.T.getAudienceParams(H),{classification:function(e){return{application:N.O.SUBJECT,action:k.e.Subjects.CLASSIFICATION,args:[null==e?void 0:e.id,F.m.slugify(null==e?void 0:e.name)],params:M||{}}},classificationTopics:function(){return{application:N.O.SUBJECT,action:k.e.Subjects.CLASSIFICATION_TOPICS,params:M||{}}},videoType:function(e){return he.W.getAppLink(e)},series:function(e){return{application:N.O.SERIES,action:k.e.Series.SERIES,args:e?[e.id,F.m.slugify(e.name)]:[]}},playlist:function(e){return{application:N.O.PLAYLISTS,action:k.e.Playlists.PLAYLIST,args:[e.id,F.m.slugify(e.name)]}},latestReleases:function(){return{application:N.O.CONTENT_UPDATES,action:k.e.ContentUpdates.CONTENT_UPDATES}},allTopics:function(){return{application:N.O.SUBJECT,action:k.e.Subjects.CLASSIFICATION_ALL}},classificationLatestReleases:function(e){return e.id===Ce?{application:N.O.CONTENT_UPDATES,action:k.e.ContentUpdates.CONTENT_UPDATES}:{application:N.O.CONTENT_UPDATES,action:k.e.ContentUpdates.CLASSIFICATION_UPDATE,args:[e.id,F.m.slugify(e.name)]}},widgetVideoList:function(e,t){return{application:N.O.DASHBOARD,action:k.e.Dashboard.DASHBOARD,args:[e,F.m.slugify(t)]}}}),q=(0,Q.N)().showCalendar;return r().createElement("div",{className:"bg-white px-4"},O.isUpgrading&&(null===(n=E.data)||void 0===n?void 0:n.userType)===y.DashboardUserType.Staff&&r().createElement(G,null),r().createElement(pe,{currentUser:o.data,dashboard:E.data,widgetAppLinks:Y,headerAppLinks:{forYou:{application:N.O.DASHBOARD,action:k.e.Dashboard.HOME},whatsNew:{application:N.O.CONTENT_UPDATES,action:k.e.ContentUpdates.CONTENT_UPDATES},calendar:{application:N.O.CALENDAR,action:k.e.Calendar.CALENDAR}},presentation:C,imageCdnUrl:i.data.imageCdnUrl,getWidgetContentRequest:me._.dashboardWidgetContent,setFavourite:x,audiences:A.data,canFavourite:B,updatePreferences:function(e,t){return U(me._.updateWidgetPreferences(e,t,o.data))},canManageDiscoverPreferences:l(I.E.ManageDiscoverPreferences),onSubmitFeedback:p(I.C.CanSubmitFeedback)&&function(e){var t=U(fe.n.sendDiscoverFooterFeedback(e,o.data,f.data,C,E.data,p(I.C.StudentExperience)));return ve.k.logUserAction({feedbackType:e.type,content:e.content,presentationId:C.id,dashboardId:E.data.id},{actionType:s.UserAction.Submit,location:s.LocationContext.DiscoverFooter,entity:s.EntityType.Feedback,workflowPhase:s.WorkflowPhase.Complete}),t},hasStudentExperience:p(I.C.StudentExperience),yearGroups:b.data,lazyLoad:!ye.f.isBot(),showCalendar:q}))}function Ie(e){var t=(0,o.r)(s.LocationContext.Classification),a=t.hasCuratedDiscoverDashboards;return t.isLoadingSettings?r().createElement(r().Fragment,null):a?r().createElement(Le,Object.assign({},e)):r().createElement(re,null)}},87432:(e,t,a)=>{a.d(t,{Z:()=>n});const n={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 8681-2240dc0f8e-lite.chunk.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[8681],{17464:(t,e,r)=>{r.d(e,{c:()=>a});var n=r(1024),o=r(7121);function a(t){var e="d-flex align-items-center badge-list ".concat(o.Z.minHeight);return t.className&&(e+=" ".concat(t.className)),n.createElement("div",{className:e},t.children)}},84678:(t,e,r)=>{r.d(e,{L:()=>i});var n=r(1024),o=r.n(n),a=r(76246);function i(t){return o().createElement(a.C,{type:a.g.Restriction,data:{restrictions:t.restrictions,yearGroups:t.yearGroups},inline:!0})}},21491:(t,e,r)=>{r.d(e,{I:()=>i});var n=r(99940),o=r(97395),a=r(62803),i={getRestrictions:function(t){return{key:"restrictions:".concat(t),url:o._.urlBuilder("{gateway}/v1/objects/restrictions",{id:t})}},addRestriction:function(t){return{type:n.k.POST,key:"restrictions:".concat(t.objectTypeId,":").concat(t.objectId,":add"),url:"{gateway}/v1/restrictions",data:[t],invalidationKeys:["restrictions"]}},deleteRestrictions:function(t){return{url:o._.urlBuilder("{gateway}/v1/restrictions",{objectId:t}),key:"restrictions:delete",type:n.k.DELETE,invalidationKeys:["restrictions"]}},getRestrictedObjects:function(t,e){var r={type:t,"query.video":a.v.VIDEO_COLLECTION,"query.interactive":a.v.INTERACTIVE,"query.clip":a.v.CLIP_COLLECTION};return e&&(r.cursor=e),{url:o._.urlBuilder("{gateway}/v1/restrictions/objects",r),key:"restrictions:objects:".concat(t.sort().join(","),":").concat(e)}},approveAll:function(){return{url:"{gateway}/v1/library-reviews/restrictions",key:"restrictions:approve:all",type:n.k.DELETE}}}},48681:(t,e,r)=>{r.r(e),r.d(e,{ManageAccessPopupView:()=>Y});var n=r(1024),o=r.n(n),a=r(20354),i=r(23481),c=r(83345),u=r(9111),l=r(76246),s=r(11607),f=r(31949),d=r(1666),p=r(13876),v=r(5345),h=r(21491),y=r(58130),m=r(28329),g=r(49439),b=r(83914);const E={firstItem:"RcBIB",lastItem:"_YfTU",opacity100:"QV8wx",opacity50:"WoP6Y",yearGroupButton:"DOT14"};var w="shared.verticalYearGroupSelector";function S(t){return t.isDisabled?o().createElement("span",{className:"text-muted"},o().createElement(c.x,{namespace:w,phrase:"isDisabled"})," ",o().createElement("span",{className:E.opacity50},o().createElement(l.C,{data:t.contentRating,type:l.g.Rating,inline:!0}))," ",o().createElement(c.x,{namespace:w,phrase:"ratingRestricted"})):t.isSelected?o().createElement(c.x,{namespace:w,phrase:"isSelected"}):o().createElement(c.x,{namespace:w,phrase:"canAccess"})}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function I(t){var e,r,n=(e=(0,g.X)({delay:1}),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return x(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}(e,r)||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.")}()),a=n[0],i=n[1];return o().useEffect((function(){t.isDisabled||t.onHover(i)}),[i]),o().createElement("div",{className:"row align-items-center mx-auto"},o().createElement(s.L,{ref:a,onClick:t.onClick,className:"btn px-2 py-1 border ".concat(E.yearGroupButton," ").concat(t.getButtonClass())},o().createElement(b.x,{size:b.S.Standard,svgName:t.getButtonSvg()})),o().createElement("div",{className:"col-3"},t.item.name),o().createElement("div",{className:"col"},o().createElement(S,{contentRating:t.contentRating,isDisabled:t.isDisabled,isSelected:t.isSelected})))}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var k=i.T.encloseNamespace("shared.verticalYearGroupSelector");function j(t){var e,r,n=(e=o().useState(),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(e,r)||function(t,e){if(t){if("string"==typeof t)return L(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(t,e):void 0}}(e,r)||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.")}()),a=n[0],i=n[1],c=(0,m.N)(a,20),u={name:k("staff"),value:Number.MAX_SAFE_INTEGER};function l(t,e){i(e?t:void 0)}function s(t){return!!c&&t<=c}function f(e){return!!t.selection&&e.value<=t.selection.value}function d(e){var r,n,o=null!==(r=t.yearGroups[e])&&void 0!==r?r:u;(null===(n=t.selection)||void 0===n?void 0:n.value)===o.value&&(o=e?t.yearGroups[e-1]:void 0),o&&p(o)&&(o=void 0),t.onSelect(o)}function p(e){return"rating"in e&&e.rating.value<=t.contentRating.value}function v(e,r){var n=s(e),o=f(r),a=p(r),i=0===e,c=e===t.yearGroups.length,u="rounded-0 border-bottom-0";return!n||a||o||(u+=" hovering"),i&&(u="rounded-top border-bottom-0 ".concat(E.firstItem)),c&&(u="rounded-bottom ".concat(E.lastItem)),"".concat(u,o||a?" btn-dark":" btn-outline-dark")}function h(t,e){var r=s(t),n=f(e),o=p(e);return r||n||o?y.vn.Lock:y.vn.VisibleOn}return o().createElement("div",{className:"pb-2"},t.yearGroups.map((function(e,r){return o().createElement(I,{key:e.id,item:e,contentRating:t.contentRating,isActive:s(r),isSelected:f(e),onClick:function(){return d(r)},onHover:function(t){return l(r,t)},getButtonClass:function(){return v(r,e)},getButtonSvg:function(){return h(r,e)},isDisabled:p(e)})})),o().createElement(I,{item:u,contentRating:t.contentRating,isActive:s(t.yearGroups.length),isSelected:f(u),onClick:function(){return d(t.yearGroups.length)},onHover:function(e){return l(t.yearGroups.length,e)},getButtonClass:function(){return v(t.yearGroups.length,u)},getButtonSvg:function(){return h(t.yearGroups.length,u)},isDisabled:!1}))}var N=r(69883),A=r(4594),O=r(11025),G=r(60139),C=r(97291),_=r(14070),T=r(84678),R=r(17464);function P(t){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},P(t)}function B(){B=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var a=e&&e.prototype instanceof d?e:d,i=Object.create(a.prototype),c=new L(o||[]);return n(i,"_invoke",{value:w(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var f={};function d(){}function p(){}function v(){}var h={};u(h,a,(function(){return this}));var y=Object.getPrototypeOf,m=y&&y(y(k([])));m&&m!==e&&r.call(m,a)&&(h=m);var g=v.prototype=d.prototype=Object.create(h);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function o(n,a,i,c){var u=s(t[n],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==P(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){o("next",t,i,c)}),(function(t){o("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return o("throw",t,i,c)}))}c(u.arg)}var a;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return a=a?a.then(n,n):n()}})}function w(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=S(i,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=s(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function k(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:j}}function j(){return{value:void 0,done:!0}}return p.prototype=v,n(g,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:p,configurable:!0}),p.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,c,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(E.prototype),u(E.prototype,i,(function(){return this})),t.AsyncIterator=E,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var i=new E(l(e,r,n,o),a);return t.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(g),u(g,c,"Generator"),u(g,a,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=k,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(I),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,f):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:k(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function F(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return D(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D(t,e):void 0}}(t,e)||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(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var M=function(t,e,r,n){return new(r||(r=Promise))((function(o,a){function i(t){try{u(n.next(t))}catch(t){a(t)}}function c(t){try{u(n.throw(t))}catch(t){a(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(i,c)}u((n=n.apply(t,e||[])).next())}))},U="shared.manageAccessPopup",V=i.T.encloseNamespace(U);function Y(t){var e,r,n=a.a.useGetFetchAsync(),i=F(o().useState(),2),y=i[0],m=i[1],g=F(o().useState(),2),b=g[0],E=g[1],w=F(o().useState(!1),2),S=w[0],x=w[1],I=(0,N.Z)(),L=a.a.useBasicFetch(f.N.currentUser()),k=a.a.useBasicFetch((null===(e=L.data)||void 0===e?void 0:e.isAuthenticated)&&d.h.yearGroups(L.data.customerId)),P=O.M.getVideoRequest(t.objectId,t.objectTypeId),D=a.a.useBasicFetch(P),Y=a.a.useBasicFetch(h.I.getRestrictions(t.objectId));o().useEffect((function(){var t;if(Y.hasCompleted&&k.hasCompleted&&D.hasCompleted){var e=null===(t=Y.data)||void 0===t?void 0:t.find((function(t){return t.type===v.c.User}));if(e){var r=k.data.find((function(t){return t.value===e.yearGroup}));if(r)return E(r),void m(r);var n={name:null,value:Number.MAX_SAFE_INTEGER};E(n),m(n)}}}),[Y.data,k.data,D.data]);var X=Y.hasCompleted&&D.hasCompleted&&(!(null===(r=L.data)||void 0===r?void 0:r.isAuthenticated)||k.hasCompleted),q=X&&O.M.getRating(D.data),H=X&&k.data.filter((function(t){return t.rating.value<=q.value})),K=X&&k.data.filter((function(t){return!H.includes(t)&&t.value<=(null==b?void 0:b.value)}));return o().createElement(u.G,{title:V("title"),closePopup:t.closePopup,showLoadingSpinner:!X},X&&o().createElement(o().Fragment,null,o().createElement("div",{className:"mb-3"},o().createElement("p",null,o().createElement(c.x,{namespace:U,phrase:"infoStart"})," ",o().createElement(l.C,{data:q,type:l.g.Rating,inline:!0})," ",!!H.length&&o().createElement(c.x,{namespace:U,phrase:"infoEnd",options:{yearGroup:H[H.length-1].name}})),o().createElement("p",null,o().createElement(c.x,{namespace:U,phrase:"prompt"})),o().createElement(j,{selection:b,yearGroups:k.data,contentRating:q,onSelect:function(t){E(t)}}),b&&o().createElement(R.c,{className:"pt-1 mb-2"},o().createElement(T.L,{restrictions:{value:[{type:v.c.User,yearGroup:b.value===Number.MAX_SAFE_INTEGER?null:b.value}]},yearGroups:k.data})),!!b&&o().createElement(s.L,{onClick:function(){E(void 0)},className:"d-inline info-link"},o().createElement(c.x,{namespace:U,phrase:"clear",options:{smartCount:null==K?void 0:K.length}}))),o().createElement(p.u,null,o().createElement(p.u.Cancel,{text:V("cancel"),onClick:t.closePopup}),o().createElement(p.u.Submit,{text:V("update"),onClick:function(){b?function(){M(this,void 0,void 0,B().mark((function e(){var r,o;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(!0),(r=b.value)===Number.MAX_SAFE_INTEGER&&(r=null),o={targetId:L.data.customerId,targetTypeId:A.E.Customer,objectId:D.data.id,objectTypeId:D.data.typeId,ownerId:L.data.id,type:v.c.User,yearGroup:r},e.prev=4,e.next=7,n(h.I.addRestriction(o));case 7:return e.next=9,n(P);case 9:I.success({heading:G.R6.Success,type:G.NK.Success,message:V("success",{name:D.data.name}),appLink:{application:C.O.SETTINGS,action:_.e.Settings.VIDEO_RESTRICTIONS},appLinkText:V("successAppLink"),appLinkClassName:"info-link"}),t.closePopup(),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),I.error(V("error"));case 16:x(!1);case 17:case"end":return e.stop()}}),e,null,[[4,13]])})))}():function(){M(this,void 0,void 0,B().mark((function e(){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return x(!0),e.prev=1,e.next=4,n(h.I.deleteRestrictions(D.data.id));case 4:return e.next=6,n(P);case 6:I.success(V("removedSuccess")),t.closePopup(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(1),I.error(V("error"));case 13:x(!0);case 14:case"end":return e.stop()}}),e,null,[[1,10]])})))}()},variant:"dark",showSpinner:S,disabled:(null==y?void 0:y.value)===(null==b?void 0:b.value)}))))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[9455],{49927:(e,t,n)=>{n.d(t,{u:()=>i});var a=n(57900),r=n(70064),o=function(e){return"recent:playlists:added:to:".concat(e)},i={getRecentlyAddedTo:function(e){return r.V.getRecentItem(o(e),a.SG)},addRecentlyAddedTo:function(e,t){return r.V.addRecentItem(o(e),a.SG,t)},removeRecentlyAddedTo:function(e,t){r.V.removeRecentItem(o(e),t,a.SG)}}},2381:(e,t,n)=>{n.d(t,{q:()=>i});var a=n(5173),r=n(23481),o="playlists.validation",i=a.Ry().shape({name:a.Z_().max(250,(function(){return r.T.getPhrase(o,"nameExceeds")})).required((function(){return r.T.getPhrase(o,"nameRequired")})),description:a.Z_().max(16e3,(function(){return r.T.getPhrase(o,"descriptionExceeds")})).nullable()})},66081:(e,t,n)=>{n.d(t,{d:()=>h});var a=n(1024),r=n.n(a),o=n(23481),i=n(64249),l=n(13876),c=n(94696),s=n(83345),u=n(38647),m=n(57900);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="share.shareRestrictionWarning",f=o.T.encloseNamespace(p),y=1209600;function h(e){var t,n,a=e.entity,o=e.entityType,h=e.yearGroups,g=e.onClickContinue,v=e.target,b=(t=r().useState(!1),n=2,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,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=o.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&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return l}}(t,n)||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}}(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.")}()),E=b[0],S=b[1],x=["video","clip","interactive"].includes(e.entityType);return r().createElement(r().Fragment,null,x&&r().createElement("p",{className:"mb-2"},r().createElement(s.x,{namespace:p,phrase:"message",options:{entityType:o}})),x?r().createElement(r().Fragment,null,r().createElement("p",{className:"h6 align-middle mb-0"},a.name,r().createElement(u.m,{video:a,yearGroups:h,size:"sm"})),r().createElement("div",{className:"mb-2"},r().createElement(c.B,{video:a,yearGroups:h}))):r().createElement("p",null,r().createElement(s.x,{namespace:p,phrase:"shareVideoList",options:{entityType:o}})),r().createElement("p",null,r().createElement(s.x,{namespace:p,phrase:"share"===v?"shareVideo":"addToPlaylist",options:{entityType:o}})),r().createElement(l.u,null,r().createElement(l.u.Checkbox,{id:"dont-show-again",checked:E,onToggle:function(){return S(!E)},label:"Don't show this again for 2 weeks"}),r().createElement(l.u.Submit,{variant:"dark",text:f("submit"),onClick:function(){if(E){var t="".concat(i.I.RESTRICTION_CACHE_KEY,":").concat(e.currentUser.id);m.SG.cacheSet(t,!0,y)}g()}})))}},17464:(e,t,n)=>{n.d(t,{c:()=>o});var a=n(1024),r=n(7121);function o(e){var t="d-flex align-items-center badge-list ".concat(r.Z.minHeight);return e.className&&(t+=" ".concat(e.className)),a.createElement("div",{className:t},e.children)}},23201:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(1024),r=n(92802),o=n(33936),i=n(83345),l=n(2102),c="shared.formButtons";function s(e){var t=(0,r.u6)(),n=(0,o.l)(t);return a.createElement(l.m,{variant:e.variant||"primary",type:"submit",disabled:!n,size:e.size,className:e.className?e.className:"",showSpinner:t.isSubmitting},e.submitText?a.createElement(a.Fragment,null,e.submitText):a.createElement(i.x,{namespace:c,phrase:e.isNew?"create":"save"}))}},38365:(e,t,n)=>{n.d(t,{n:()=>E,W:()=>S});var a=n(1024),r=n(92802),o=n(99910),i=n(1048),l=n(79014),c=n(73814),s=n(8493),u=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n};function m(e){var t=e.label,n=e.checkboxLabelClassName,r=e.checkboxLabelFontWeight,i=e.className,l=u(e,["label","checkboxLabelClassName","checkboxLabelFontWeight","className"]);return a.createElement(o.Form.Group,null,a.createElement("div",{className:"custom-control custom-checkbox ".concat(i)},a.createElement(E,Object.assign({className:"custom-control-input"},l)),a.createElement(o.Form.Label,{className:"custom-control-label cursor-pointer ".concat("normal"===r?"font-weight-normal":""," \n ").concat(n),htmlFor:l.id},t),e.checkboxAppLink&&e.checkboxAppLinkText&&a.createElement(a.Fragment,null,a.createElement("span",null," "),a.createElement(s.F,{appLink:e.checkboxAppLink,className:"info-link"},e.checkboxAppLinkText))))}var d=n(83914),p=n(58130),f=n(83345);function y(e){var t=(0,r.u6)().values[e.fieldName];return"string"!=typeof t?a.createElement(a.Fragment,null):a.createElement("div",{className:"float-right text-muted font-weight-normal"},t.length,"/",e.limit," characters")}const h={revealPassword:"jCfI0",passwordInput:"RBJnf",passwordContainer:"d78lK",passwordContainerDisabled:"asbVo",infoTooltip:"wzyOG"};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}var v=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n},b="shared.formField";function E(e){var t,n,o=e.children,c=v(e,["children"]),s=(t=a.useState(e.type),n=2,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,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=o.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&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return l}}(t,n)||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}}(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.")}()),u=s[0],m=s[1],f=l.q.isFunction(o)?function(e){return o(e)}:a.Children.count(o)?o:null;if("password"!==c.type)return a.createElement(r.gN,Object.assign({},i.t.omit(c,["formSize"])),f);var y="position-relative ".concat(h.passwordContainer);return c.className&&(y+=" ".concat(c.className)),c.disabled&&(y+=" ".concat(h.passwordContainerDisabled)),a.createElement("div",{className:y},a.createElement(r.gN,Object.assign({},i.t.omit(c,["formSize","type","className"]),{type:u,className:"".concat(h.passwordInput," border-0 w-100 h-100 outline-none rounded")}),f),"password"===c.type&&a.createElement(d.x,{svgName:"password"===u?p.vn.VisibleOn:p.vn.VisibleOff,className:"svg-container cursor-pointer ".concat(h.revealPassword),onClick:function(){m("password"===u?"text":"password")}}))}function S(e){var t=e.label,n=e.className,l=e.showCharacterCounter,s=e.showRequiredStar,u=e.infoTooltip,g=e.infoTooltipPlacement,S=e.infoText,x=e.formSize,C=e.showOptionalLabel,w=v(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoTooltipPlacement","infoText","formSize","showOptionalLabel"]),P=(0,r.u6)(),N=P.errors,k=P.touched,O=function(){};if("checkbox"===w.type){var T=i.t.omit(e,["formSize"]);return e.disabled&&(T.onChange=O),a.createElement(m,Object.assign({},T))}var A=Object.assign(Object.assign({},w),{className:c.w.getCustomFormControlClassName(N,k,w.name,x,n)});return e.disabled&&(A.onChange=O),a.createElement(o.Form.Group,null,!!t&&a.createElement(o.Form.Label,{htmlFor:w.id,className:"d-flex align-items-center"},t,s&&a.createElement("span",{className:"text-danger"},"*"),u&&a.createElement(d.x,{className:"svg-container text-muted ".concat(h.infoTooltip),svgName:p.vn.Info,title:u,tooltipPlacement:g,tooltipSpanHack:!0}),C&&a.createElement("span",{className:"text-muted"}," ",a.createElement(f.x,{namespace:b,phrase:"optional"})),!!l&&!!w.maxLength&&a.createElement("div",{className:"ml-auto"},a.createElement(y,{fieldName:w.name,limit:w.maxLength}))),a.createElement(E,Object.assign({},A)),!!S&&a.createElement(o.Form.Text,{className:"text-muted"},S),a.createElement(r.Bc,{name:w.name},(function(e){return a.createElement(o.Form.Control.Feedback,{type:"invalid"},e)})))}E.defaultProps={autoComplete:"off"},S.defaultProps={autoComplete:"off",infoTooltipPlacement:"top"}},82644:(e,t,n)=>{n.d(t,{b:()=>u,n:()=>s});var a=n(1024),r=n(92802),o=n(79014),i=n(1048);function l(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 c=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n};function s(e){var t=e.castInitialValues,n=e.castValuesOnSubmit,s=e.initialValues,u=e.onSubmit,m=c(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),d=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=i.t.deepClone(e);return function e(n){Object.keys(t).forEach((function(a){t.hasOwnProperty(a)&&(i.t.isObject(n[a])?e(n[a]):null===t[a]&&delete t[a])}))}(t),t}(s)):s,p={allowInitialSubmit:e.allowInitialSubmit};return a.createElement(r.J9,Object.assign({enableReinitialize:!0},m,{initialValues:d,onSubmit:function(t,a){var r=a.setSubmitting,o=a.resetForm,i=a.setFieldError,c=n&&e.validationSchema?e.validationSchema.cast(t):t;u(c,(function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.reset&&o(),n.errors)for(var a=0,c=Object.entries(n.errors);a<c.length;a++){var s=(e=c[a],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,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=o.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&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}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.")}()),u=s[0],m=s[1];i(u,m)}r(!1)}))},initialStatus:p}),o.q.isFunction(e.children)?function(t){return e.children(t)}:a.Children.count(e.children)?e.children:null)}function u(){return(0,r.u6)()}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},89589:(e,t,n)=>{n.d(t,{x:()=>s});var a=n(1024),r=n.n(a),o=n(83345),i=n(28329);const l={emptyState:"bKTf0"};var c="shared.typeaheadEmptyState";function s(e){var t=e.query,n=void 0===t?"":t,a=e.imageUrl,s=(0,i.N)(n,300);return r().createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},r().createElement("img",{alt:"",role:"presentation",src:a,className:"pb-2 ".concat(l.emptyState)}),r().createElement("h2",{className:"h6"},r().createElement(o.x,{namespace:c,phrase:"noResults",options:{query:s,smartCount:s.length}})))}},97481:(e,t,n)=>{n.d(t,{d:()=>s});var a=n(1024),r=n.n(a),o=n(83345),i=n(11607);const l={emptyState:"k5mEG"};var c="shared.typeaheadErrorState";function s(e){return r().createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},r().createElement("img",{alt:"",role:"presentation",src:e.imageUrl,className:"pb-2 ".concat(l.emptyState)}),r().createElement("h2",{className:"h6"},r().createElement(o.x,{namespace:c,phrase:"error"})),r().createElement(i.L,{onClick:function(t){t.stopPropagation(),e.onClickTryAgain()},className:"btn btn-link info-link p-0"},r().createElement(o.x,{namespace:c,phrase:"tryAgain"})))}},38647:(e,t,n)=>{n.d(t,{m:()=>u});var a=n(1024),r=n.n(a),o=n(58130),i=n(36532),l=n(83914),c=n(11025),s=n(26361);function u(e){if(!e.yearGroups)return r().createElement(r().Fragment,null);var t=s.l.mapRestrictionToText(e.video._restrictions,e.yearGroups);return c.M.getCanBeConsumed(e.video).canConsume&&t?r().createElement(i.u,{spanHack:!0,spanHackClassName:e.className||"pl-1",title:t,placement:e.tooltipPlacement||"top"},r().createElement(l.x,{svgName:o.vn.Lock,size:"sm"===e.size?l.S.Small:l.S.Standard})):r().createElement(r().Fragment,null)}},84678:(e,t,n)=>{n.d(t,{L:()=>i});var a=n(1024),r=n.n(a),o=n(76246);function i(e){return r().createElement(o.C,{type:o.g.Restriction,data:{restrictions:e.restrictions,yearGroups:e.yearGroups},inline:!0})}},94696:(e,t,n)=>{n.d(t,{B:()=>s});var a=n(1024),r=n.n(a),o=n(11025),i=n(17464),l=n(84678),c=n(26361);function s(e){var t=c.l.hasRestrictions(e.video),n=o.M.getCanBeConsumed(e.video).canConsume;return t&&e.yearGroups&&n?r().createElement(i.c,{className:"pt-1"},r().createElement(l.L,{restrictions:e.video._restrictions,yearGroups:e.yearGroups})):r().createElement(r().Fragment,null)}},73814:(e,t,n)=>{n.d(t,{w:()=>r});var a=n(92802),r={getCustomFormControlClassName:function(e,t,n,r,o){var i="form-control";return"sm"===r&&(i+=" form-control-sm"),"lg"===r&&(i+=" form-control-lg"),(0,a.u9)(t,n)&&(0,a.u9)(e,n)&&(i+=" is-invalid"),o&&(i+=" ".concat(o)),i}}},79455:(e,t,n)=>{n.r(t),n.d(t,{AddToPlaylistView:()=>de});var a=n(1024),r=n.n(a),o=n(58566),i=n(23481),l=n(20354),c=n(60139),s=n(28400),u=n(9111),m=n(83345),d=n(3010),p=n(31949),f=n(49927),y=n(76611),h=n(45719),g=n(70006),v=n(69883),b=n(49985),E=n(65858),S=n(99910),x=n(75896),C=n(79014),w=n(2136),P=n(83914),N=n(58130),k=n(7733),O=n(89589),T=n(97481),A=n(9085),I=n(99742),j=n(92802),L=n(2381),F=n(38365),R=n(82644),V=n(23201),U=n(73814),G="playlists.newPlaylistForm",B=i.T.encloseNamespace(G);function z(){var e=(0,R.b)(),t=(0,j.u6)(),n=t.errors,a=t.touched,o=U.w.getCustomFormControlClassName(n,a,"name");return r().createElement(j.l0,null,r().createElement(S.Form.Label,{htmlFor:"name"},r().createElement(m.x,{namespace:G,phrase:"label"})),r().createElement("div",{className:"input-group"},r().createElement(F.n,{type:"text",name:"name",id:"name",placeholder:B("placeholder"),autoFocus:!0,value:e.values.name,className:o}),r().createElement("div",{className:"input-group-append"},r().createElement(V.A,{isNew:!0,submitText:B("submit"),variant:"outline-dark",className:"border border-secondary"})),r().createElement(j.Bc,{name:"name"},(function(e){return r().createElement(S.Form.Control.Feedback,{type:"invalid"},e)}))))}function q(e){return r().createElement(R.n,{initialValues:{name:""},validationSchema:L.q,onSubmit:e.onSubmit},r().createElement(z,null))}const _={suggestionContainer:"zksPa",colourBox:"vO4kB"};function H(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,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=o.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&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return W(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)?W(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 W(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 D="playlists.selectPlaylist",M=36,Y=31,K=3,Z=8;function $(e){var t=C.q.isFunction(e.isVideoInPlaylist)&&e.isVideoInPlaylist(e.playlist),n=H(a.useState(t),2),r=n[0],o=n[1];a.useEffect((function(){r!==t&&o(t)}),[t]);var l=t?_.mask:"cursor-pointer",c=(0,A.x)(e.playlist.name,k.o);return a.createElement("span",{className:"".concat(l," d-flex align-items-center"),onClick:function(){return o(!t)}},a.createElement("div",{className:"".concat(_.colourBox," ").concat(c," d-inline-block rounded flex-shrink-0")},r&&a.createElement(P.x,{svgName:N.vn.Check,size:P.S.Large,title:i.T.getPhrase(D,"checkTooltip"),tooltipSpanHack:!0})),a.createElement("span",{className:"ml-2 text-break"},e.playlist.name))}function J(e){var t=H(a.useState(""),2),n=t[0],r=t[1],o=H(a.useState(!1),2),l=o[0],c=o[1],s="";n&&(s+=" border-bottom pb-2");var u,d,p=x.m.sortBy(e.playlists,"name");return a.createElement(a.Fragment,null,a.createElement(w.E,{onQueryChange:function(e){return r(e.trim())},onSuggestionSelected:e.onSelectPlaylist,shouldUpdateQueryOnSelection:!1,suggestionsHeading:i.T.getPhrase(D,"suggestionsHeading"),local:p,initialLocalSuggestions:p,activationLength:1,placeholder:i.T.getPhrase(D,"placeholder"),theme:{container:s,suggestionsContainer:"mt-2 ".concat(_.suggestionContainer),suggestionsContainerOpen:""},searchIconPlacement:"left",alwaysRenderSuggestions:!0,suggestionLimit:!1,getEmptyStateComponent:function(e){return a.createElement(O.x,{query:e,imageUrl:I.W.EmptyStates.TYPEAHEAD_RESULTS})},getErrorStateComponent:function(e){return a.createElement(T.d,{onClickTryAgain:e,imageUrl:I.W.TYPEAHEAD_ERROR})},getSuggestionComponent:function(t){return a.createElement($,{playlist:t,isVideoInPlaylist:e.isVideoInPlaylist})},autoFocusInput:!0,customScrollbarProps:{style:{height:(u=p.length,d=K,u>K&&(d=u),u>Z&&(d=Z),M+d*Y+"px")}}}),a.createElement("div",{className:"border-top pt-3 px-3 mx-n3"},l?a.createElement(q,{onSubmit:function(t){return e.createPlaylist(t.name)}}):a.createElement(S.Button,{variant:"link",className:"text-info p-0",onClick:function(){return c(!0)}},a.createElement(m.x,{namespace:D,phrase:"createPlaylist"}))))}var Q=n(65185),X=n(59991),ee=n(97291),te=n(14070),ne=n(64249),ae=n(1666),re=n(66081),oe=n(11025);function ie(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 le="playlists.addToPlaylist",ce=i.T.encloseNamespace(le);function se(e){return oe.M.isClip(e)?"clip":oe.M.isInteractive(e)?"interactive":"video"}var ue=function(e){return X.C.getUserPlaylists(new g.l(y.o.AtoZ,e))},me=function(e,t){return function(n){return X.C.getVideoPlaylists(e,t,n)}};function de(e){var t,n,r,i=(0,o.useDispatch)(),y=(0,v.Z)(),g=(n=a.useState(null),r=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,o,i,l=[],c=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=o.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&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return l}}(n,r)||function(e,t){if(e){if("string"==typeof e)return ie(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)?ie(e,t):void 0}}(n,r)||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.")}()),S=g[0],x=g[1],C=l.a.useBasicFetch(p.N.currentUser()),w=l.a.useBasicFetch(X.C.getVideoCandidate(e.videoId)),P=(0,h.P)((function(e){return ue(e).key})),N=(0,h.P)((function(t){return!!C.data&&me(e.videoId,C.data.id)(t).key})),k=l.a.useBasicFetch((null===(t=C.data)||void 0===t?void 0:t.isAuthenticated)&&ae.h.yearGroups(C.data.customerId)),O=!!N.items&&N.items.map((function(e){return e.id}));(0,d.i)(ue,(function(e){l.a.getFetch(i)(ue(e))})),(0,d.i)(!!C.data&&me(e.videoId,C.data.id),!!C.data&&function(t){l.a.getFetch(i)(me(e.videoId,C.data.id)(t))}),ne.I.useRestrictionWarning(w.data,(function(e){return x(e?"restriction-warning":"main")}));var T=function(t,n){l.a.fetch(i,X.C.addToPlaylist(t.id,[w.data],(function(){y.success({heading:Q.R.Success,type:c.NK.Success,message:ce(n?"successNew":"success",{video:w.data.name,playlist:t.name,escapeText:!0}),appLink:{application:ee.O.PLAYLISTS,action:te.e.Playlists.PLAYLIST,args:[t.id,s.m.slugify(t.name)]},appLinkText:ce("goToPlaylist",{playlist:t.name}),appLinkClassName:"info-link"}),b.k.logUserAction({id:w.data.id,playlistId:t.id},{actionType:E.UserAction.Associate,entity:E.EntityType.Video,descriptor:E.AssocDescriptor.Playlist,workflowPhase:E.WorkflowPhase.Complete,location:E.LocationContext.Popup}),f.u.addRecentlyAddedTo(C.data.id,{id:t.id}),n&&e.closePopup()}),(function(e){"playlist-limit-exceeded"===e.responseJSON.type?y.error(ce("playlistLimitExceeded")):y.error(ce("addError",{video:w.data.name,playlist:t.name,escapeText:!0}))})))},A=!!w.data&&!!P.items&&!P.nextCursor&&!!C.data&&!!N.items&&!N.nextCursor&&k.hasCompleted;return a.createElement(u.G,{title:ce("heading"),closePopup:e.closePopup,showLoadingSpinner:!A||null===S},A?"restriction-warning"===S?a.createElement(re.d,{currentUser:C.data,entity:w.data,entityType:se(w.data),yearGroups:k.data,onClickContinue:function(){return x("main")},target:"add-to-playlist"}):a.createElement(a.Fragment,null,a.createElement("div",{className:"mb-2"},a.createElement(m.x,{namespace:le,phrase:"selectPlaylist",options:{video:w.data.name}})),a.createElement(J,{playlists:P.items,currentUserId:C.data.id,onSelectPlaylist:function(t){O.includes(t.id)?function(t){l.a.fetch(i,X.C.removePlaylistVideo(t.id,w.data.id,w.data.typeId,(function(){y.success({heading:Q.R.Success,type:c.NK.Success,message:ce("successRemove",{video:w.data.name,playlist:t.name,escapeText:!0}),appLink:{application:ee.O.PLAYLISTS,action:te.e.Playlists.PLAYLIST,args:[t.id,s.m.slugify(t.name)]},appLinkText:ce("goToPlaylist",{playlist:t.name}),appLinkClassName:"info-link"}),b.k.logUserAction({id:w.data.id,playlistId:t.id},{actionType:E.UserAction.Dissociate,entity:E.EntityType.Video,descriptor:E.AssocDescriptor.Playlist,workflowPhase:E.WorkflowPhase.Complete,location:E.LocationContext.Popup})}),(function(){y.error(ce("removeError",{video:w.data.name,playlist:t.name,escapeText:!0})),e.closePopup()})))}(t):T(t)},isVideoInPlaylist:function(e){return O.includes(e.id)},createPlaylist:function(t){l.a.fetch(i,X.C.createPlaylist(C.data.id,{name:t},(function(e){e&&e.id&&(b.k.logUserAction({id:e.id},{actionType:E.UserAction.Create,entity:E.EntityType.Playlist,workflowPhase:E.WorkflowPhase.Complete,location:E.LocationContext.Popup}),T(e,!0))}),(function(){y.error(ce("createError",{video:w.data.name,playlist:t,escapeText:!0})),e.closePopup()})))}})):a.createElement(a.Fragment,null))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[9845],{3278:(e,t,n)=>{n.d(t,{z:()=>f});var a=n(1024),r=n.n(a),o=n(23481),c=n(83345),i=n(53957),l=n(38502),s=n(65858),u=n(55460);const m={pillTab:"bMJM0"};var d="discover.header";function f(e){var t,n,a,f,p,v;if(!e.type)return r().createElement(r().Fragment,null);if(e.type===i.DashboardUserType.Learner||e.hasStudentExperience)return r().createElement("div",{className:"py-3"},r().createElement("h1",{className:"h2 mb-0"},r().createElement(c.x,{namespace:d,phrase:"heading"})));var h=[{name:o.T.getPhrase(d,"forYou"),appLink:null===(t=e.appLinks)||void 0===t?void 0:t.forYou,active:"forYou"===e.active,analyticsData:{name:o.T.getPhrase(d,"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(d,"whatsNew"),appLink:null===(a=e.appLinks)||void 0===a?void 0:a.whatsNew,active:"whatsNew"===e.active,analyticsData:{name:o.T.getPhrase(d,"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&&h.push({name:o.T.getPhrase(d,"calendar"),appLink:null===(p=e.appLinks)||void 0===p?void 0:p.calendar,active:"calendar"===e.active,analyticsData:{name:o.T.getPhrase(d,"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(l.r,{tabs:h,className:m.pillTab}))}},38502:(e,t,n)=>{n.d(t,{r:()=>u});var a=n(1024),r=n.n(a),o=n(11607),c=n(8493),i=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(c.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&&i.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:()=>m});var a=n(1024),r=n.n(a),o=n(23481),c=n(58130),i=n(83914),l=n(36532);const s={tag:"k1Yjy",tooltip:"Cgeav"};var u="specialEventCalendar.comingSoonTag";function m(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(i.x,{svgName:c.vn.Timer}),!e.onlyIcon&&o.T.getPhrase(u,"comingSoon")))}},13037:(e,t,n)=>{n.d(t,{b:()=>h});var a=n(1024),r=n.n(a),o=n(23481),c=n(8493),i=n(42735),l=n(54610),s=n(67453),u=n(79967),m=n(2284),d=n(61557),f=n(29917);const p={modalWidth:"v5TkI",banner:"LlPSp",bannerContent:"upY3A",pill:"B7ypp"};var v="specialEventCalendar.eventsListItem";function h(e){var t=(0,u.k)(),n=e.getAppLink(e.event.content.id,e.event.name),a=e.event.content.metadata.backgroundColor,h=s.j.createUrl(e.event.content.banner.url,{size:l.h2.Large}),y=!!e.event.endDate,g=e.event.content.status===m.W.ComingSoon;return r().createElement("div",null,r().createElement(c.F,{appLink:!g&&n,className:"".concat(g?"":"cursor-pointer"," text-decoration-none"),onClick:e.onClick},r().createElement("div",{className:"banner rounded-lg position-relative ".concat(p.banner),style:{backgroundColor:a,backgroundImage:"url('".concat(h,"')")}},r().createElement("div",{className:"".concat(p.bannerContent," px-3")},r().createElement("div",{className:"text-white"},g&&r().createElement(f.r,{className:"pr-2 font-weight-500 mb-1 rounded-pill justify-content-start ".concat(p.pill)}),y&&r().createElement("div",{className:"mb-1"},d.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"},!g&&r().createElement(i.K,{className:"btn btn-outline-dark font-weight-500"},o.T.getPhrase(v,t.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}),key:"presentation:".concat(n,":events:from:").concat(e,":to").concat(t)}}}},74590:(e,t,n)=>{n.d(t,{N:()=>p});var a=n(1024),r=n.n(a),o=n(20354),c=n(35242),i=n(55171),l=n(21750),s=n(25925),u=n(37802);function m(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,c,i=[],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)&&(i.push(a.value),i.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(s)throw r}}return i}}(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 f=[i.e.PresentationIds.AU_PRIMARY,i.e.PresentationIds.US_ELEMENTARY,i.e.PresentationIds.ENGLAND_PRIMARY];function p(){var e,t,n,a=(0,u.r)(null),i=a.hasSpecialEventCalendar,d=a.isLoadingSettings,p=o.a.useBasicFetch(l.x.presentation(s.R.Subject)),v=!d&&!i,h=(null===(e=p.data)||void 0===e?void 0:e.id)&&!f.includes(+p.data.id),y=m(r().useState(!v&&!h),2),g=y[0],b=y[1],E=m(r().useState(d||!(null===(t=p.data)||void 0===t?void 0:t.id)),2),D=E[0],O=E[1];return r().useEffect((function(){var e;v||h?b(!1):D||b(!0),O(d||!(null===(e=p.data)||void 0===e?void 0:e.id))}),[i,null===(n=p.data)||void 0===n?void 0:n.id,D]),c.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:g,isLoading:D}}},61557:(e,t,n)=>{n.d(t,{T:()=>i});var a=n(28400),r=n(110),o=n(97291),c=n(14070),i={getTopicAppLink:function(e,t){return{application:o.O.SUBJECT,action:c.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"))}}},99845:(e,t,n)=>{n.r(t),n.d(t,{CalendarView:()=>be});var a=n(1024),r=n.n(a),o=n(81886),c=n(23049),i=n(23481),l=n(53957),s=n(3278),u=n(97291),m=n(14070),d=n(110),f=n(79967),p=n(8493),v=n(75795),h=n(83914),y=n(58130),g=n(11607);const b={actions:"AN06o",chevron:"Nq52s",left:"c5fYo",right:"vogYk"};var E="specialEventCalendar.calendarHeader",D=6,O=12;function k(e){var t="previous"===e.action?y.vn.ChevronLeft:y.vn.ChevronRight,n="previous"===e.action?b.left:b.right;return r().createElement(g.L,{className:"".concat(b.chevron," ").concat(n," border border-dark rounded-circle bg-white d-flex align-items-center justify-content-center"),onClick:e.onClick},r().createElement(h.x,{svgName:t,size:h.S.Medium,className:"svg-container d-inline-block ".concat(b.svg)}))}var N=new Date;function w(e){var t=(0,f.k)();function n(e){var t=v.O.getCurrentRoute().appLink,n=t.params?Object.assign({},t.params):{};return n.monthDate=d.O.format(e,"MM-DD-YYYY"),Object.assign(Object.assign({},t),{params:n})}var a=d.O.diffBetween(d.O.startOf(e.monthDate,"month"),d.O.startOf(N,"month"),"months"),o=a>-1*D,c=a<O;return r().createElement("div",{className:"d-flex justify-content-between align-items-center"},r().createElement("h1",{className:"mb-0 h2"},d.O.format(e.monthDate,t.xs?"MMM YYYY":"MMMM YYYY")),r().createElement("div",{className:"d-flex ".concat(b.actions)},o&&r().createElement(p.F,{appLink:n(d.O.startOf(d.O.subtract(e.monthDate,1,"month"),"month")),className:"d-flex"},r().createElement(k,{action:"previous",onClick:function(){var t=d.O.subtract(e.monthDate,1,"month");e.setViewingMonthDate(t)}})),r().createElement(p.F,{appLink:n(N),className:"d-flex"},r().createElement(g.L,{className:"".concat(b.todayWrapper," btn btn-outline-dark font-weight-500"),onClick:function(){d.O.format(N,"YYYY-MM-DD")!==d.O.format(e.monthDate,"YYYY-MM-DD")&&e.setViewingMonthDate(N)}},i.T.getPhrase(E,"today"))),c&&r().createElement(p.F,{appLink:n(d.O.startOf(d.O.add(e.monthDate,1,"month"),"month")),className:"d-flex"},r().createElement(k,{action:"next",onClick:function(){var t=d.O.add(e.monthDate,1,"month");e.setViewingMonthDate(t)}}))))}var M=n(99910),C=n(54610),Y=n(67453),S=n(2284),A=n(61557);const T={cellDate:"MvrIK",label:"UFPJm",numberWrapper:"PyWl_"};var L=i.T.encloseNamespace("specialEventCalendar.calendarCellDate");function x(e){var t=d.O.isToday(e.date),n="".concat(T.cellDate," d-flex flex-nowrap");return t&&(n+=" bg-dark text-white"),e.notCurrentMonth&&(n+=" text-secondary"),e.hasEvent&&(n+=" text-white"),e.className&&(n+=" ".concat(e.className)),r().createElement("div",{className:n},r().createElement("div",{className:"".concat(T.numberWrapper," ").concat("d-flex text-center justify-content-center align-items-center flex-shrink-0")},d.O.format(e.date,"D")),t&&r().createElement("div",{className:"".concat(T.label," justify-content-start align-items-center")},L("today")))}var I=n(29917);const j={tag:"UIeoi",date:"p1FoI",backgroundImage:"_33D7",eventCard:"MPgib",wrapper:"yvPrI",left:"KBv2n",right:"dowd6",noAnimation:"HWvit",cover:"hoJcZ",tagWrap:"VKCBZ",appear:"zh9Ja",comingSoon:"_VwjY",displayDate:"i5dV5",title:"od2i9",circle:"Y9ovs",active:"DSUJW",arrow:"RjkfI",bottomBar:"RlRw7",bottomPlaceholder:"Hs06S"};function P(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,c,i=[],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)&&(i.push(a.value),i.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return U(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)?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 n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function H(e){var t,n,a=P(r().useState(0),2),o=a[0],c=a[1],i=e.eventsOnDay.length>1,l=e.eventsOnDay.find((function(e,t){return t===o})),s=!!l.endDate,d=l.content.metadata.backgroundColor,f=null===(t=l.content.icon)||void 0===t?void 0:t.url,v=Y.j.createUrl(f,{size:C.h2.Small}),b=Y.j.createUrl(null===(n=l.content.cover)||void 0===n?void 0:n.url,{size:C.h2.Small}),E=A.T.getTopicAppLink(l.content.id,l.name),D=l.content.status===S.W.ComingSoon,O={application:u.O.CALENDAR,action:m.e.Calendar.SPECIAL_EVENT_LIST,params:Object.assign(Object.assign({},e.monthQuery),{date:e.date.toString()})},k=P(r().useState(e.hasInited?j.appear:""),2),N=k[0],w=k[1];r().useEffect((function(){if(!e.hasInited){var t=Math.floor(600*Math.random()+400);window.setTimeout((function(){w(j.appear),e.setHasInited(!0)}),t)}}),[e.hasInited]);var M=null;return i?M=O:D||(M=E),r().createElement(p.F,{appLink:M,className:"d-flex justify-content-end"},r().createElement("div",{className:"".concat(j.tagWrap," p-1")},D&&r().createElement(I.r,{className:"justify-content-center p-0 rounded-circle ".concat(j.tag," ").concat(N),onlyIcon:!0})),r().createElement(x,{date:e.date,notCurrentMonth:e.notCurrentMonth,className:"".concat(j.date," ").concat(N),hasEvent:!0}),r().createElement("div",{className:"postion-relative ".concat(j.wrapper)},r().createElement("div",{style:{backgroundImage:"url('".concat(v||b,"')")},className:"position-absolute ".concat(j.backgroundImage," ").concat(v?"":j.cover," ").concat(D?j.comingSoon:""," ").concat(N," ").concat(e.hasInited?j.noAnimation:"")}),r().createElement("div",{style:{backgroundColor:d},className:"position-absolute d-flex flex-column justify-content-end align-items-center text-white px-1 py-2 ".concat(j.eventCard," ").concat(N)},s&&r().createElement("div",{className:"".concat(j.displayDate," mb-1")},A.T.getDisplayDate(l.startDate,l.endDate)),r().createElement("div",{className:"text-center ".concat(j.title," mb-1")},s?r().createElement("div",{className:"clamp-1 h6",title:l.name},l.name):r().createElement("div",{className:"clamp-2 h6",title:l.name},l.name)),i&&0!==o&&r().createElement("div",{className:"position-absolute bg-white rounded-circle ".concat(j.left)},r().createElement(g.L,{onClick:function(e){e.stopPropagation(),e.preventDefault(),c((function(e){return e-1}))}},r().createElement(h.x,{svgName:y.vn.ChevronLeft,className:"d-inline-block svg-container text-dark ".concat(j.arrow)}))),i&&o!==e.eventsOnDay.length-1&&r().createElement("div",{className:"position-absolute bg-white rounded-circle ".concat(j.right)},r().createElement(g.L,{onClick:function(e){e.stopPropagation(),e.preventDefault(),c((function(e){return e+1}))}},r().createElement(h.x,{svgName:y.vn.ChevronRight,className:"d-inline-block svg-container text-dark ".concat(j.arrow)}))),r().createElement("div",{className:"d-flex ".concat(j.bottomBar," ").concat(i?"":j.bottomPlaceholder)},e.eventsOnDay.map((function(e,t){var n=t===o;return r().createElement(g.L,{key:t,className:"".concat(j.circle," ").concat(n?j.active:""),onClick:function(e){e.stopPropagation(),e.preventDefault(),c(t)}})}))))))}const R={wrapper:"ID5BX",notCurrentMonth:"KThJz",weekend:"Le3vK",cell:"GY1K5"};function W(e){var t=e.date,n=e.notCurrentMonth,a=e.eventsOnDay,o="position-relative border border-light-blue ".concat(R.wrapper);(function(e){return 0===d.O.getWeekday(e)||6===d.O.getWeekday(e)})(t)&&(o+=" ".concat(R.weekend)),n&&(o+=" ".concat(R.notCurrentMonth));var c=a.length>0;return r().createElement("td",{className:o},r().createElement("div",{className:R.cell},r().createElement(x,{date:t,notCurrentMonth:n}),c&&r().createElement(H,Object.assign({},e))))}var _=n(83345),B=n(23232),F=n(99742),V="specialEvent.eventsEmptyState",J=i.T.encloseNamespace(V);function z(e){return r().createElement(_.D.Provider,{value:V},r().createElement(B.u,null,r().createElement(B.u.Image,{src:F.W.EmptyStates.CALENDAR.NO_EVENTS}),r().createElement(B.u.Heading,null,r().createElement(_.x,{phrase:"heading"})),r().createElement(B.u.Info,null,r().createElement(_.x,{namespace:V,phrase:"info"}),r().createElement(p.F,{appLink:e.appLink},r().createElement("span",{className:"text-blue"},J("link"))))))}var K=n(13037);const Q={date:"dn7Hd",first:"axdj4"};function Z(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 d.O.isBefore(e,t)?-1:0})),r().createElement("div",{className:"py-1"},n.map((function(e,n){return r().createElement("div",{key:e},r().createElement("div",{className:"h4 mt-4 ".concat(Q.date," ").concat(0===n?Q.first:"")},A.T.getOrdinalDate(e)),t[e].map((function(e){return r().createElement(K.b,{key:e.content.id,getAppLink:A.T.getTopicAppLink,event:e})})))})))}const $={header:"xLOrx",thead:"ef_XJ"};function q(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 G(e){var t,n,a=(0,f.k)(),o=A.T.getEventsInMonth(e.events||[],e.viewingMonth),c=(t=r().useState(!1),n=2,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,o,c,i=[],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)&&(i.push(a.value),i.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(s)throw r}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return q(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)?q(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.")}()),i=c[0],l=c[1];return a.xs||a.sm||a.md?e.eventsLoaded?(null==o?void 0:o.length)?r().createElement(Z,{events:o}):r().createElement(z,{appLink:{application:u.O.CONTENT_UPDATES,action:m.e.ContentUpdates.CONTENT_UPDATES}}):r().createElement("div",{className:"d-flex justify-content-center align-items-center"},r().createElement(M.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($.thead)},r().createElement("tr",{className:"font-weight-500 bg-light-blue ".concat($.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(),className:"font-weight-500"},t.map((function(t){var n,a=(null===(n=e.events)||void 0===n?void 0:n.filter((function(e){return e.startDate===d.O.format(t,"YYYY-MM-DD")})))||[];return r().createElement(W,{key:t.toString(),date:t,notCurrentMonth:!!t.notCurrentMonth,eventsOnDay:a,monthQuery:e.monthQuery,hasInited:i,setHasInited:l})})))}))))}var X=n(75896);function ee(e,t){for(var n=d.O.startOf(e,"month"),a=d.O.getWeekday(n),r=[],o=t?0===a?6:a-1:a,c=t?1:0;c<=o;c++){var i=n,l=d.O.weekday(i,a-c);r.push(Object.assign(l,{notCurrentMonth:!0}))}return r.reverse()}function te(e,t){for(var n=d.O.endOf(e,"month"),a=d.O.getWeekday(n),r=[],o=t?7-(0===a?7:a):7-a,c=1;c<=o;c+=1){var i=d.O.add(n,c,"days");r.push(Object.assign(i,{notCurrentMonth:!0}))}return r}function ne(e){var t=d.O.startOf(e,"month");return 1===d.O.getWeekday(t)?t:X.m.first(ee(e,!0))}function ae(e){var t=d.O.endOf(e,"month");return 0===d.O.getWeekday(t)?t:X.m.last(te(e,!0))}function re(e){return[ne(e),ae(e)]}function oe(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 ce=new Date;function ie(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ce,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],c=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 d.O.format(d.O.weekday(n,e),"ddd")}))}(a),i=r().useRef({}),l=(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,c,i=[],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)&&(i.push(a.value),i.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(s)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return oe(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)?oe(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.")}()),s=l[0],f=l[1],p=d.O.format(n,"YYYY-MM");r().useEffect((function(){var e=i.current[p];if(e)f(e.weeksTable);else{var t=function(e,t){for(var n=[],a={},r=ee(e,t).concat(function(e){for(var t=d.O.daysInMonth(e),n=[],a=1;a<=t;a++){var r=d.O.set(e,"date",a);n.push(Object.assign(r,{notCurrentMonth:!1}))}return n}(e)).concat(te(e,t)),o=function(e){var t=r.slice(c,c+7);t.forEach((function(t,n){a[d.O.format(t,"YYYY-MM-DD")]={row:e,col:n}})),n.push(t),e++,i=e},c=0,i=0;c<r.length;c+=7)o(i);return{datePositionMap:a,weeksTable:n}}(n,a),r=t.weeksTable,o=t.datePositionMap;i.current[p]={weeksTable:r,datePositionMap:o},f(r)}}),[d.O.format(n,"YYYY-MM")]);var v=X.m.first(X.m.first(s)),h=X.m.last(X.m.last(s));return{weekDaysHeader:c,weekDays:s,monthDate:n,setMonthDate:function(e){p!==d.O.format(e,"YYYY-MM")&&o.Q.AppLinkHelper.trigger({application:u.O.CALENDAR,action:m.e.Calendar.CALENDAR,params:{monthDate:d.O.format(n,"MM-DD-YYYY")}})},startDate:v,endDate:h}}var le=n(20354),se=n(25925),ue=n(21750),me=n(39780);function de(e){return function(e){if(Array.isArray(e))return ve(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pe(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 fe(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,c,i=[],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)&&(i.push(a.value),i.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(s)throw r}}return i}}(e,t)||pe(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 pe(e,t){if(e){if("string"==typeof e)return ve(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)?ve(e,t):void 0}}function ve(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 he=n(74590),ye={whatsNew:{application:u.O.CONTENT_UPDATES,action:m.e.ContentUpdates.CONTENT_UPDATES},forYou:{application:u.O.DASHBOARD,action:m.e.Dashboard.HOME},calendar:{application:u.O.CALENDAR,action:m.e.Calendar.CALENDAR}},ge=i.T.encloseNamespace("specialEventCalendar.calendarView");function be(e){(0,c.o)(ge("pageTitle"));var t=(0,he.N)(),n=t.showCalendar,a=t.isLoading;r().useEffect((function(){a||n||o.Q.AppLinkHelper.trigger(ye.forYou,{replace:!0})}),[n,a]);var i=e.monthDate?new Date(e.monthDate):new Date,u=ie(i),m=u.monthDate,f=u.setMonthDate,p=u.weekDays,v=u.weekDaysHeader,h=u.startDate,y=u.endDate,g=function(e){var t,n=null===(t=le.a.useBasicFetch(ue.x.presentation(se.R.Subject)).data)||void 0===t?void 0:t.id,a=fe(re(e),2),r=a[0],o=a[1],c=fe(re(d.O.add(e,1,"month")),2),i=c[0],l=c[1],s=fe(re(d.O.subtract(e,1,"month")),2),u=s[0],m=s[1],f=le.a.useBasicFetch(r&&o&&n&&me.N.calendarEvents(d.O.format(r,"YYYY-MM-DD"),d.O.format(o,"YYYY-MM-DD"),n)),p=le.a.useBasicFetch(i&&l&&n&&me.N.calendarEvents(d.O.format(i,"YYYY-MM-DD"),d.O.format(l,"YYYY-MM-DD"),n)),v=le.a.useBasicFetch(u&&m&&n&&me.N.calendarEvents(d.O.format(u,"YYYY-MM-DD"),d.O.format(m,"YYYY-MM-DD"),n));return{events:X.m.uniq([].concat(de(v.data||[]),de(f.data||[]),de(p.data||[])),(function(e){return e.specialEventId})),loaded:f.hasCompleted}}(i),b=g.events,E=g.loaded;return a?r().createElement(r().Fragment,null):r().createElement("div",{className:"bg-white px-3"},r().createElement(s.z,{type:l.DashboardUserType.Staff,appLinks:ye,showCalendar:n,active:"calendar"}),r().createElement(w,{monthDate:m,setViewingMonthDate:f}),r().createElement(G,{weekDays:p,weekDaysHeader:v,events:b,monthQuery:{from:null==h?void 0:h.toString(),to:null==y?void 0:y.toString()},viewingMonth:i,eventsLoaded:E}))}},87432:(e,t,n)=>{n.d(t,{Z:()=>a});const a={pillTabSelector:"Hdi6o",pillItem:"hUJx1"}}}]);
|