@clickview/lite 0.0.24-rc.2 → 0.0.24-rc.3
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/css/0.chunk.css +5 -1
- package/dist/css/11.chunk.css +3 -3
- package/dist/css/13.chunk.css +1 -1
- package/dist/css/15.chunk.css +1 -1
- package/dist/css/19.chunk.css +1 -1
- package/dist/css/2.chunk.css +1 -1
- package/dist/css/21.chunk.css +1 -1
- package/dist/css/22.chunk.css +1 -1
- package/dist/css/3.chunk.css +1 -1
- package/dist/css/4.chunk.css +9 -5
- package/dist/css/5.chunk.css +1 -1
- package/dist/css/6.chunk.css +1 -1
- package/dist/css/lite-app.css +2 -2
- package/dist/en.json +1 -1
- package/dist/libs/shared/src/apps/notifications/utils/NotificationsHelper.d.ts +1 -1
- package/dist/libs/shared/src/apps/playlists/components/playlist-list/PlaylistItem.d.ts +1 -1
- package/dist/libs/shared/src/apps/playlists/components/playlist-list/PlaylistList.d.ts +1 -1
- package/dist/libs/shared/src/components/progress-bars/clips/ClipThumbnailProgressBar.d.ts +8 -0
- package/dist/libs/shared/src/components/progress-bars/interactives/InteractiveProgressBar.d.ts +11 -0
- package/dist/libs/shared/src/components/progress-bars/videos/VideoWatchProgressBar.d.ts +7 -0
- package/dist/libs/shared/src/components/tags/TagItem.d.ts +4 -1
- package/dist/libs/shared/src/components/tags/TagList.d.ts +4 -2
- package/dist/libs/shared/src/components/thumbnails/video/VideoThumbnail.d.ts +27 -3
- package/dist/libs/shared/src/components/thumbnails/video/expandable/ExpandableVideoThumbnail.d.ts +2 -2
- package/dist/libs/shared/src/components/thumbnails/video/static/StaticVideoThumbnail.d.ts +2 -2
- package/dist/libs/shared/src/components/video-list/components/video-item-description/VideoItemDescription.d.ts +6 -0
- package/dist/libs/shared/src/components/video-owner-text/VideoOwnerText.d.ts +7 -0
- package/dist/libs/shared/src/components/widgets/fixed-widget/FixedWidget.d.ts +3 -1
- package/dist/libs/shared/src/components/widgets/items/clip-widget-item/ClipWidgetItem.d.ts +9 -0
- package/dist/libs/shared/src/components/widgets/items/interactive-widget-item/InteractiveWidgetItem.d.ts +9 -0
- package/dist/libs/shared/src/enums/WidgetContents.d.ts +3 -1
- package/dist/libs/shared/src/interfaces/models/Clip.d.ts +2 -1
- package/dist/libs/shared/src/interfaces/models/Interactive.d.ts +4 -0
- package/dist/libs/shared/src/utils/ImageHelper.d.ts +1 -1
- package/dist/projects/lite/src/app.d.ts +1 -2
- package/dist/projects/lite/src/shared/components/play-page/PlayPage.d.ts +3 -1
- package/dist/projects/lite/src/shared/components/synopsis/Synopsis.d.ts +2 -0
- package/dist/projects/lite/src/shared/components/video-details/VideoDetails.d.ts +5 -2
- package/dist/scripts/0-cfa3c1b0a5.chunk.js +1 -0
- package/dist/scripts/{1-5af663fcc9.chunk.js → 1-fcddc988fa.chunk.js} +2 -2
- package/dist/scripts/11-8199a0620c.chunk.js +1 -0
- package/dist/scripts/{12-bf551c0ffd.chunk.js → 12-5e2e627728.chunk.js} +1 -1
- package/dist/scripts/13-52373ab0da.chunk.js +1 -0
- package/dist/scripts/14-e0c853d9cf.chunk.js +1 -0
- package/dist/scripts/15-c21b52794e.chunk.js +1 -0
- package/dist/scripts/{16-ea1085907a.chunk.js → 16-03e21941a9.chunk.js} +1 -1
- package/dist/scripts/{17-1712b02ae2.chunk.js → 17-9f20c6fc7c.chunk.js} +1 -1
- package/dist/scripts/18-d7e835ec85.chunk.js +1 -0
- package/dist/scripts/19-5185f97d31.chunk.js +1 -0
- package/dist/scripts/2-5cbf4f9833.chunk.js +1 -0
- package/dist/scripts/{20-e195ba7feb.chunk.js → 20-88fb1d2e9e.chunk.js} +1 -1
- package/dist/scripts/21-ee1080911a.chunk.js +1 -0
- package/dist/scripts/22-bc1c8c588e.chunk.js +1 -0
- package/dist/scripts/23-5bbe1c904b.chunk.js +1 -0
- package/dist/scripts/{24-0c41868bc3.chunk.js → 24-79f6b1a47f.chunk.js} +1 -1
- package/dist/scripts/{25-d3e7343543.chunk.js → 25-d1fc256680.chunk.js} +1 -1
- package/dist/scripts/{26-aec5d88a5c.chunk.js → 26-c0012465b2.chunk.js} +1 -1
- package/dist/scripts/{27-c430b3c156.chunk.js → 27-4f953965fb.chunk.js} +1 -1
- package/dist/scripts/{28-b2656010cc.chunk.js → 28-cbe6e59b1b.chunk.js} +1 -1
- package/dist/scripts/{29-6ffc1189f4.chunk.js → 29-d1a95310c9.chunk.js} +1 -1
- package/dist/scripts/{3-92a40ea400.chunk.js → 3-84421ad646.chunk.js} +2 -2
- package/dist/scripts/{30-43276242df.chunk.js → 30-f9e5764518.chunk.js} +1 -1
- package/dist/scripts/{31-565f564561.chunk.js → 31-c680607a64.chunk.js} +1 -1
- package/dist/scripts/{32-477093814b.chunk.js → 32-16c8b96582.chunk.js} +1 -1
- package/dist/scripts/{33-72f5d771df.chunk.js → 33-0a42a7cf15.chunk.js} +1 -1
- package/dist/scripts/{34-3df9552f89.chunk.js → 34-23b38422bc.chunk.js} +1 -1
- package/dist/scripts/{35-1790246737.chunk.js → 35-38460ad224.chunk.js} +1 -1
- package/dist/scripts/36-924f30853a.chunk.js +1 -0
- package/dist/scripts/{37-2da3d3b718.chunk.js → 37-597100b970.chunk.js} +1 -1
- package/dist/scripts/{38-1fb62f6c66.chunk.js → 38-1976271346.chunk.js} +1 -1
- package/dist/scripts/{39-73f8197efb.chunk.js → 39-12d73b82f8.chunk.js} +1 -1
- package/dist/scripts/4-459d12a2d8.chunk.js +1 -0
- package/dist/scripts/{40-7703efe0c2.chunk.js → 40-965b796ed1.chunk.js} +1 -1
- package/dist/scripts/{41-a4318db6d0.chunk.js → 41-ad61bbfdfd.chunk.js} +1 -1
- package/dist/scripts/{42-2da84e18d5.chunk.js → 42-f18944f7cc.chunk.js} +1 -1
- package/dist/scripts/{43-71c3910ccc.chunk.js → 43-f049e35885.chunk.js} +1 -1
- package/dist/scripts/{44-1f76a76ba2.chunk.js → 44-d241f1e55e.chunk.js} +1 -1
- package/dist/scripts/{45-4d471cce5a.chunk.js → 45-03da818999.chunk.js} +1 -1
- package/dist/scripts/{46-30f4ca365b.chunk.js → 46-b986b182c8.chunk.js} +1 -1
- package/dist/scripts/{47-597b3ff93b.chunk.js → 47-b6a95ef8b0.chunk.js} +1 -1
- package/dist/scripts/{48-3123cdfac3.chunk.js → 48-e0553e8d96.chunk.js} +1 -1
- package/dist/scripts/{49-e7a6ba04ee.chunk.js → 49-9e6e8d190d.chunk.js} +1 -1
- package/dist/scripts/{5-703a8b45ad.chunk.js → 5-02b60a891f.chunk.js} +1 -1
- package/dist/scripts/{50-b2fd47cbfe.chunk.js → 50-eefea95327.chunk.js} +1 -1
- package/dist/scripts/{51-f9524c8357.chunk.js → 51-b8367dcf1a.chunk.js} +1 -1
- package/dist/scripts/{52-aac06efa42.chunk.js → 52-1f1d6241e7.chunk.js} +1 -1
- package/dist/scripts/{53-1628cbf719.chunk.js → 53-7c1f640995.chunk.js} +1 -1
- package/dist/scripts/{54-4ed11743c9.chunk.js → 54-ff24fa0c07.chunk.js} +1 -1
- package/dist/scripts/{55-bf8c298136.chunk.js → 55-5b8d47a770.chunk.js} +1 -1
- package/dist/scripts/{56-48b2b2ac0d.chunk.js → 56-f15b316e3a.chunk.js} +1 -1
- package/dist/scripts/{57-7cf567f9b4.chunk.js → 57-66d77c6598.chunk.js} +1 -1
- package/dist/scripts/{58-efa6e00731.chunk.js → 58-4f6f65da1c.chunk.js} +1 -1
- package/dist/scripts/{59-89e07f1150.chunk.js → 59-8cfed87f13.chunk.js} +1 -1
- package/dist/scripts/{6-e0e1c43154.chunk.js → 6-aed42357a2.chunk.js} +1 -1
- package/dist/scripts/{60-75cfd570c8.chunk.js → 60-1c76a0aea8.chunk.js} +1 -1
- package/dist/scripts/{61-dfa3b880e3.chunk.js → 61-cd6dc8fd99.chunk.js} +1 -1
- package/dist/scripts/{62-4a1b5b1784.chunk.js → 62-d7cbe9da67.chunk.js} +1 -1
- package/dist/scripts/{63-1535b8719b.chunk.js → 63-67958a6e97.chunk.js} +1 -1
- package/dist/scripts/{64-ee3fc5ec7e.chunk.js → 64-1f651e86b3.chunk.js} +1 -1
- package/dist/scripts/{65-c16ad842bb.chunk.js → 65-aa9d312f19.chunk.js} +1 -1
- package/dist/scripts/{66-b227851a02.chunk.js → 66-71e6e980c9.chunk.js} +1 -1
- package/dist/scripts/{67-2e0d661c52.chunk.js → 67-edfc0ba1e9.chunk.js} +1 -1
- package/dist/scripts/{7-16928fdb95.chunk.js → 7-cc3c3948dd.chunk.js} +1 -1
- package/dist/scripts/8-0836ba68e7.chunk.js +1 -0
- package/dist/scripts/bundle-21cac05750.min.js +15 -0
- package/dist/scripts/bundles.json +2 -2
- package/dist/scripts/polyfills-2652c5c06e.min.js +1 -0
- package/package.json +2 -2
- package/dist/libs/shared/src/components/thumbnails/video/VideoThumbnailWatchProgressBar.d.ts +0 -8
- package/dist/projects/lite/src/shared/components/clips/ClipItem.d.ts +0 -8
- package/dist/projects/lite/src/shared/components/clips/Clips.d.ts +0 -7
- package/dist/projects/lite/src/shared/components/interactives/InteractiveItem.d.ts +0 -7
- package/dist/projects/lite/src/shared/components/interactives/Interactives.d.ts +0 -7
- package/dist/projects/lite/src/shared/components/play-page/Buttons.d.ts +0 -7
- package/dist/scripts/0-2ea5310eb2.chunk.js +0 -1
- package/dist/scripts/11-c8b3ac44fc.chunk.js +0 -1
- package/dist/scripts/13-6613a4c2af.chunk.js +0 -1
- package/dist/scripts/14-7c42508212.chunk.js +0 -1
- package/dist/scripts/15-d657e88078.chunk.js +0 -1
- package/dist/scripts/18-b4a5ce3692.chunk.js +0 -1
- package/dist/scripts/19-c7da5876af.chunk.js +0 -1
- package/dist/scripts/2-aefb6c699c.chunk.js +0 -1
- package/dist/scripts/21-a865caa4cb.chunk.js +0 -1
- package/dist/scripts/22-656077d311.chunk.js +0 -1
- package/dist/scripts/23-53286e574e.chunk.js +0 -1
- package/dist/scripts/36-585c0c33f6.chunk.js +0 -1
- package/dist/scripts/4-5c78554edf.chunk.js +0 -1
- package/dist/scripts/8-0bef5fb574.chunk.js +0 -1
- package/dist/scripts/bundle-ae5ddf6b5c.min.js +0 -15
- package/dist/scripts/polyfills-b5f1f84a81.min.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[56],{
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[56],{1308:function(e,n,t){"use strict";t.r(n);var r=t(0),a=t(90),i=t(61),o=t(14),c=t(7),s=t(40),l=t(3),u=t(878),f=t(157),p=t(823),d=t(127);var m=t(1068),y=t(237),b=t(1011),v=t(51),w=t(73),g=t(155),j=t(115),h=t(928);function k(e){var n=e.classification,t=e.videos,a=e.imageCdnUrl,i=e.showMore,o=e.followed,c=g.a.createBannerUrl(n.banner,{fallbackBaseUrl:a,fallbackCategoryName:n.name,type:j.b.Banners},{size:j.a.Small,resizeType:j.c.Cover});return r.createElement("div",{className:"mb-3"},r.createElement(b.a,{classification:n,backgroundUrl:c,getClassificationAppLink:e.appLinks.getClassificationAppLink,followed:o,follow:e.follow,showFollowSpinner:e.showFollowSpinner}),r.createElement(h.a,{playlistId:"0",isUserSignedIn:!0,onSortComplete:function(){},videos:t,getVideoAppLink:e.appLinks.getVideoAppLink,getSeriesAppLink:e.appLinks.getSeriesAppLink}),i&&r.createElement("div",{className:"show-more"},r.createElement(v.a,{className:"info-link",appLink:e.appLinks.getClassificationUpdateAppLink(n)},r.createElement(w.b,{namespace:"contentUpdates.contentUpdatesView",phrase:"showMore",options:{classificationName:n.name}}))))}function S(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function O(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,i=void 0;try{for(var o,c=e[Symbol.iterator]();!(r=(o=c.next()).done)&&(t.push(o.value),!n||t.length!==n);r=!0);}catch(e){a=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw i}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return A(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return A(e,n)}(e,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.")}()}function A(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}t.d(n,"ContentUpdatesView",(function(){return L}));function L(e){var n=O(r.useState({}),2),t=n[0],v=n[1],w=Object(i.useDispatch)(),g=Object(p.a)();Object(y.a)(c.a.getPhrase("contentUpdates.contentUpdatesView","pageTitle"));var j=a().subtract(1,"year").toISOString(),h=a().toISOString(),A=o.a.useBasicFetch(f.a.config),L=o.a.useBasicFetch(m.a.getContentUpdates(j,h)),U=o.a.useBasicFetch(u.a.mySubjectPreferences()),C=[];L.data&&L.data.forEach((function(e){return C.push(e.classificationId)}));var E=function(e,n){var t=Object(i.useDispatch)();return Object(i.useSelector)((function(r){var a;if(!(null===(a=e)||void 0===a?void 0:a.length))return null;for(var i=d.a.uniq(e),c={},s={},l=0;l<i.length;l+=25){var u=i.slice(l,l+25),f=n(u),p=o.a.getResponse(r,f.key);s[l]=!!p.data,p.shouldFetch&&o.a.fetch(t,f),p.data&&p.data.forEach((function(e){return c[e.id]=e}))}return Object.keys(s).every((function(e){return s[e]}))?c:null}))}(C,(function(e){return m.a.getClassifications(e)}));function P(e,n){v((function(n){return Object.assign(Object.assign({},n),S({},e,!0))}));var t=function(){var t,r;v((function(n){return Object.assign(Object.assign({},n),S({},e,!1))})),s.a.logUserAction({id:e,name:null===(t=E[e])||void 0===t?void 0:t.name},{location:l.j.ContentUpdatesClassificationBanner,workflowPhase:l.o.Complete,descriptor:n?l.m.On:l.m.Off,actionType:l.n.Follow,entity:l.d.Classification}),g.success(c.a.getPhrase("contentUpdates.contentUpdatesView",n?"followed":"unfollowed",{classification:null===(r=E[e])||void 0===r?void 0:r.name}))},r=function(){v((function(n){return Object.assign(Object.assign({},n),S({},e,!1))})),g.error(c.a.getPhrase("contentUpdates.contentUpdatesView","error"))},a=n?u.a.followSubjects([e],t,r):u.a.unfollowSubjects([e],t,r);o.a.fetch(w,a)}if(!(L.data&&A.data&&U.data&&E))return r.createElement(r.Fragment,null);var T=function(e,n){return e&&n?e.map((function(e){return{showMore:e.videos.length>3,classification:n[e.classificationId],videos:e.videos.map((function(e){return e.classification=n[e.classificationId],e})).filter((function(e){return e}))}})):null}(L.data,E),I=U.data.map((function(e){return e.id}));return r.createElement("div",{className:"bg-white px-3"},r.createElement(b.c,{dashboardAppLink:e.appLinks.dashboardAppLink}),T.map((function(n){return r.createElement(k,{classification:n.classification,videos:n.videos,imageCdnUrl:A.data.imageCdnUrl,showMore:n.showMore,key:n.classification.id,appLinks:e.appLinks,followed:I.includes(n.classification.id),follow:P,showFollowSpinner:t[n.classification.id]})})))}},878:function(e,n,t){"use strict";t.d(n,"a",(function(){return g}));var r=t(79),a=t(21);function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,n){if(!e)return;if("string"==typeof e)return o(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return o(e,n)}(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 o(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var c=t(46).a.CLASSIFICATION,s=function(){return"/api/domain/v1/subjects/preferences?query=".concat(c,"&type=subject")},l=function(){return"/api/domain/v1/subjects/classifications/following?query=".concat(c)},u=function(){return"/api/domain/v1/subjects/classifications/following"},f=function(e){return r.a.urlBuilder("/api/domain/v1/subjects/classifications/following",{id:e})},p=function(){return"/api/domain/v1/subjects/audiences?type=subject"},d=function(){return"/api/domain/v1/subjects/audiences/following"},m=function(){return"/api/domain/v1/subjects/audiences/following"},y=function(e){return r.a.urlBuilder("/api/domain/v1/subjects/audiences/following",{id:e})},b=function(e){return"/api/domain/v1/subjects/presentations".concat(e?"?type=".concat(e):"")},v=function(e){return"/api/domain/v1/subjects/presentations/available".concat(e?"?type=".concat(e):"")},w=function(e){return"/api/domain/v1/subjects/presentations/".concat(e)},g={currentPresentations:function(e){return{url:b(e),key:"current:presentations".concat(e?":".concat(e):""),expiryTime:1/0}},availablePresentations:function(e){return{url:v(e),key:"available:presentations:".concat(e),expiryTime:1/0}},setPresentation:function(e,n,t){return{url:w(e.id),key:"set:".concat(n,":presentation"),type:a.a.POST,data:{},invalidationKeys:["current:presentations:".concat(n),"current:presentations","subject:preference:options","my:subject:preferences","level:preference:options","my:level:preferences"],success:t}},allSubjectPreferences:function(){return{url:s(),key:"subject:preference:options",expiryTime:1/0}},mySubjectPreferences:function(e){return{url:l(),key:"my:subject:preferences",normalize:!1,expiryTime:1/0,success:e,formatData:function(e){return e.filter((function(e){return e.canBePreferred}))}}},followSubjects:function(e,n,t,r){return{url:u(),key:"follow:subjects",data:e,type:a.a.POST,success:n,error:t,always:r,invalidationKeys:[].concat(i(e.map((function(e){return"classification:".concat(e)}))),["my:subject:preferences"])}},unfollowSubjects:function(e,n,t,r){return{url:f(e),key:"unfollow:subjects",type:a.a.DELETE,success:n,error:t,always:r,invalidationKeys:[].concat(i(e.map((function(e){return"classification:".concat(e)}))),["my:subject:preferences"])}},allLevelPreferences:function(){return{url:p(),key:"level:preference:options",normalize:!1,expiryTime:1/0}},myLevelPreferences:function(e){return{url:d(),key:"my:level:preferences",normalize:!1,expiryTime:1/0,success:e}},followLevels:function(e,n,t,r){return{url:m(),key:"follow:levels",data:e,type:a.a.POST,success:n,error:t,always:r,invalidationKeys:["my:level:preferences"]}},unfollowLevels:function(e,n,t,r){return{url:y(e),key:"unfollow:levels",type:a.a.DELETE,success:n,error:t,always:r,invalidationKeys:["my:level:preferences"]}}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[57],{
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[57],{1276:function(e,t,n){"use strict";n.r(t),n.d(t,"DeleteClassroomGroupView",(function(){return h}));var r=n(0),o=n.n(r),a=n(61),c=n(14),i=n(7),u=n(238),s=n(823),l=n(243),p=n(73),f=n(241),m=n(40);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(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 b(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 g="classrooms.deleteClassroomGroup",y=i.a.encloseNamespace(g);function h(e){var t=d(o.a.useState(!1),2),n=t[0],r=t[1],i=c.a.useBasicFetch(f.a.getClassroom(e.classroomId)),b=Object(a.useDispatch)(),h=Object(s.a)(),v=i.data?i.data.groups.find((function(t){return t.id===e.groupId})):null;return o.a.createElement(u.a,{title:y("title"),showLoadingSpinner:!v,closePopup:e.closePopup},o.a.createElement("p",null,o.a.createElement(p.b,{namespace:g,phrase:"areYouSure",options:{name:v.name}})),o.a.createElement(l.a,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:y("cancel")},{variant:"danger",onClick:function(){r(!0),c.a.fetch(b,f.a.deleteGroup(e.groupId,e.classroomId,(function(){r(!1),m.a.logUserAction({groupId:e.groupId},e.analyticsOptions),h.success(y("success",{name:v.name})),e.closePopup()}),(function(){h.success(y("error",{name:v.name}))})))},buttonText:y("delete"),isSpinnerButton:!0,showSpinner:n}]}))}},823:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(153),o=n(48),a=n(52),c=function(){var e=Object(r.a)(a.a.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:o.a.Warning,heading:o.c.Warning,message:t})}}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[58],{
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[58],{1271:function(e,t,n){"use strict";n.r(t),n.d(t,"DeleteClassroomView",(function(){return v}));var r=n(0),a=n.n(r),o=n(61),i=n(7),c=n(14),s=n(238),u=n(823),l=n(243),f=n(73),m=n(241),p=n(40);function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(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 b(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 y=i.a.encloseNamespace("classrooms.deleteClassroom");function v(e){var t=d(a.a.useState(!1),2),n=t[0],r=t[1],i=Object(o.useDispatch)(),b=Object(u.a)(),v=c.a.useBasicFetch(m.a.getClassroom(e.id));var h=n||!v.data;return a.a.createElement(s.a,{title:y("title"),closePopup:e.closePopup,showLoadingSpinner:h},v.data&&a.a.createElement(a.a.Fragment,null,a.a.createElement("p",null,a.a.createElement(f.b,{namespace:"classrooms.deleteClassroom",phrase:"confirmation",options:{name:v.data.name}})),a.a.createElement(l.a,{buttons:[{variant:"link",onClick:e.closePopup,buttonText:y("cancel")},{variant:"danger",onClick:function(){r(!0),c.a.fetch(i,m.a.deleteClassroom(e.id,(function(){r(!1),p.a.logUserAction({id:e.id},e.analyticsOptions),b.success(y("success",{name:v.data.name})),e.closePopup()})))},buttonText:y("remove"),isSpinnerButton:!0,showSpinner:n}]})))}},823:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(153),a=n(48),o=n(52),i=function(){var e=Object(r.a)(o.a.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:a.a.Warning,heading:a.c.Warning,message:t})}}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[59],{
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[59],{1273:function(t,e,n){"use strict";n.r(e),n.d(e,"RemoveStudentsFromClassroomView",(function(){return h}));var r=n(0),a=n.n(r),o=n(61),s=n(7),c=n(14),i=n(238),u=n(243),l=n(73),m=n(823),d=n(241),f=n(40);function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,a=!1,o=void 0;try{for(var s,c=t[Symbol.iterator]();!(r=(s=c.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){a=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(t,e)}(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 v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var b="classrooms.removeStudentsFromClassroom",y=s.a.encloseNamespace(b);function h(t){var e,n=p(a.a.useState(!1),2),r=n[0],s=n[1],v=c.a.useBasicFetch(d.a.getClassroom(t.classroomId)),h=Object(o.useDispatch)(),g=Object(m.a)(),w={smartCount:t.studentIds.length,classroomName:null===(e=v.data)||void 0===e?void 0:e.name};var S=v.data?y("title",w):"";return a.a.createElement(i.a,{title:S,closePopup:t.closePopup,showLoadingSpinner:!v.data},v.data&&a.a.createElement(a.a.Fragment,null,a.a.createElement("p",null,a.a.createElement(l.b,{namespace:b,phrase:"confirm",options:w})),a.a.createElement(u.a,{buttons:[{variant:"link",onClick:t.closePopup,buttonText:y("cancel")},{variant:"danger",onClick:function(){s(!0),c.a.fetch(h,d.a.removeStudents(t.studentIds,t.classroomId,(function(){s(!1),f.a.logUserAction({id:t.classroomId,studentCount:t.studentIds.length},t.analyticsOptions),g.success(y("success",w)),t.closePopup()})))},buttonText:y("remove"),isSpinnerButton:!0,showSpinner:r}]})))}},823:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(153),a=n(48),o=n(52),s=function(){var t=Object(r.a)(o.a.ALERT);return{success:function(e){t.success(e)()},error:function(e){t.error(e)()},warning:function(e){t.createAlert({type:a.a.Warning,heading:a.c.Warning,message:e})}}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[6],{1070:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var a=e(0),r=e(35);function o(t,n,e){var o=function(){e||(window.innerHeight+document.documentElement.scrollTop<document.documentElement.scrollHeight-400||t())};Object(a.useEffect)((function(){var t=r.a.throttle(o,200);return n&&window.addEventListener("scroll",t),function(){return window.removeEventListener("scroll",t)}}),[n])}},1071:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var a=e(0);function r(t){var n=t.imageUrl,e=t.heading,r=t.description;return a.createElement("div",{className:"empty-state-container"},a.createElement("div",{className:"content-container"},n&&a.createElement("img",{src:n}),a.createElement("h1",null,e),r&&a.createElement("p",{dangerouslySetInnerHTML:{__html:r}})))}},1072:function(t,n,e){"use strict";e.d(n,"a",(function(){return l}));var a=e(0),r=e(33),o=e(55),i=e(13),c=e(1247),s=e.n(c);function l(t){return a.createElement("div",{className:"p-3 text-center ".concat(s.a.container)},t.isFetching?a.createElement(r.Spinner,{as:"span",animation:"border",role:"status",className:s.a.spinner}):a.createElement(o.a,{svgName:i.b.ChevronDown,className:"svg-container cursor-pointer",size:o.b.Large,onClick:t.onClick}))}},1247:function(t,n,e){t.exports={container:"_1_KC6",spinner:"VXlcl"}},827:function(t,n,e){t.exports={buttonList:"_2v9CT",dropdownToggle:"AYBvQ"}},828:function(t,n,e){"use strict";var a=e(0),r=e(33),o=e(242),i=e(40),c=e(55),s=e(51),l=e(13),u=e(827),p=e.n(u),f=e(35);function y(t){var n="dropdown-item";return t&&(n+=" ".concat(t)),n}function d(t){if(t.action.appLink)return a.createElement(s.a,{appLink:t.action.appLink,onClick:t.action.onClick,className:y(t.action.className),analyticsData:t.action.analyticsData,analyticsOptions:t.action.analyticsOptions},t.action.label);return a.createElement("span",{className:"cursor-pointer ".concat(y(t.action.className)),onClick:function(n){t.action.analyticsData&&t.action.analyticsOptions&&i.a.logUserAction(t.action.analyticsData,t.action.analyticsOptions),f.a.isFunction(t.action.onClick)&&t.action.onClick(n)}},t.action.label)}function m(t){if(!t.actions||!t.actions.length)return a.createElement(a.Fragment,null);var n="actions-dropdown-".concat(o.a.getRandomInt()),e="px-0 ".concat(p.a.dropdownToggle);return t.dropdownToggleClassName&&(e+=" ".concat(t.dropdownToggleClassName)),a.createElement(r.Dropdown,{className:t.className?t.className:"",alignRight:!0},a.createElement(r.Dropdown.Toggle,{as:"button",type:"button",id:n,className:e},a.createElement(c.a,{svgName:l.b.More,size:c.b.Small})),a.createElement(r.Dropdown.Menu,null,t.actions.map((function(t,n){return a.createElement(d,{key:n,action:t})}))))}m.defaultProps={dropdownToggleClassName:"btn btn-light"};var v=e(235),g=e(156);function b(t){var n="ml-2";t.className&&(n+=" ".concat(t.className));var e=t.showSpinner?a.createElement(r.Spinner,{as:"span",animation:"border",role:"status",size:"sm"}):t.children;if(t.tooltip)return a.createElement(g.a,{title:t.tooltip},a.createElement(v.a,{appLink:t.appLink,svgName:t.svgName,onClick:t.onClick,className:n,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions},e));if(t.svgName)return a.createElement(v.a,{onClick:t.onClick,appLink:t.appLink,svgName:t.svgName,className:n,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions},e);if(t.appLink)return a.createElement(s.a,{onClick:t.onClick,appLink:t.appLink,className:n,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions},e);return a.createElement("button",{onClick:function(n){t.analyticsData&&t.analyticsOptions&&i.a.logUserAction(t.analyticsData,t.analyticsOptions),f.a.isFunction(t.onClick)&&t.onClick(n)},className:n},e)}function h(t){var n=[],e=[];t.actions.forEach((function(t){t.button?n.push(t):e.push(t)}));var r="d-flex";return t.className&&(r+=" ".concat(t.className)),a.createElement("div",{className:r},a.createElement(a.Fragment,null,!!n.length&&a.createElement("span",{className:p.a.buttonList},n.map((function(t,n){return a.createElement(a.Fragment,{key:n},t.label?a.createElement(b,{appLink:t.appLink,onClick:t.onClick,svgName:t.svgName,className:t.className,tooltip:t.tooltip,showSpinner:t.showSpinner,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions},t.label):a.createElement(v.a,{appLink:t.appLink,onClick:t.onClick,svgName:t.svgName,className:t.className,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions}))}))),t.sortComponent?t.sortComponent:"",!!e.length&&a.createElement(m,{actions:e,className:!!n.length&&"ml-2",dropdownToggleClassName:t.actionsDropdownClassName})))}e.d(n,"a",(function(){return h}))},838:function(t,n,e){"use strict";e.d(n,"a",(function(){return y}));var a=e(244),r=e(85),o=e(863);function i(t){return(i="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})(t)}function c(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function s(t,n){for(var e=0;e<n.length;e++){var a=n[e];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function l(t,n){return(l=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function u(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,a=f(t);if(n){var r=f(this).constructor;e=Reflect.construct(a,arguments,r)}else e=a.apply(this,arguments);return p(this,e)}}function p(t,n){return!n||"object"!==i(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var y=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&l(t,n)}(p,t);var n,e,a,i=u(p);function p(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a.Newest,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.a.OwnedByMe;return c(this,p),(t=i.call(this,{collectionPrefix:"user:playlists",cursor:e,sort:n})).type=a,t}return n=p,(e=[{key:"toString",value:function(){return[this.collectionPrefix,this.sort,this.cursor,this.type].filter(Boolean).join(":")}}])&&s(n.prototype,e),a&&s(n,a),p}(a.a)},859:function(t,n,e){"use strict";var a=e(21),r=e(46),o=e(862);e(838);function i(t){return(i="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})(t)}function c(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function s(t,n){return(s=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function l(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,a=p(t);if(n){var r=p(this).constructor;e=Reflect.construct(a,arguments,r)}else e=a.apply(this,arguments);return u(this,e)}}function u(t,n){return!n||"object"!==i(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f,y=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&s(t,n)}(e,t);var n=l(e);function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return c(this,e),n.call(this,{collectionPrefix:"playlist:videos",id:t,cursor:a})}return e}(e(244).a);!function(t){t[t.Queued=1]="Queued",t[t.Processing=2]="Processing",t[t.Processed=3]="Processed",t[t.Errored=4]="Errored"}(f||(f={}));var d=function(t,n){return function(e){var a=Object.assign({},e);return a.hasOwnProperty(t)&&(a[t]=Object.assign(Object.assign({},a[t]),n)),a}},m=function(t){return function(n){var e=Object.assign({},n);return e.hasOwnProperty(t)&&delete e[t],e}},v=function(t,n){return function(e){var a=Object.assign({},e);return a.hasOwnProperty(t)?(a[t].videos||(a[t].videos={}),a[t].videos.count=a[t].videos.count?a[t].videos.count+n:n,a):e}};e.d(n,"a",(function(){return w}));var g=function(t){return t?"&cursor=".concat(t):""},b=function(t){return Number.isInteger(t)?"&maxRatingValue=".concat(t):""},h=function(t,n){return"".concat(t).concat(n?":".concat(n):"")},w={getPlaylist:function(t,n,e){return{url:"/api/domain/v2/objects/".concat(t,"?query=").concat(r.a.PLAYLIST),key:"playlist:".concat(t),success:n,error:e}},getSharedPlaylist:function(t,n,e,a){var o="/api/domain/v2/share/".concat(t);return{url:"".concat(o,"?query=").concat(r.a.PLAYLIST).concat(b(n)),key:"shared:playlist:".concat(t),success:e,error:a}},getUserPlaylists:function(t){var n=t.sort,e=t.type;return{url:"/api/domain/v2/me/playlists/".concat(e,"?sort=").concat(n,"&query={limit:100}")+"".concat(r.a.PLAYLIST_COLLECTION).concat(g(t.cursor)),key:t.toString(),formatData:function(t){return Object.assign(Object.assign({},t),{data:t.data.map((function(t){return t.owner?Object.assign(Object.assign({},t),{owner:Object.assign(Object.assign({},t.owner),{avatar:t.owner.avatar.url})}):t}))})}}},getPlaylistVideos:function(t,n,e){var a="orderBy:orderindex,limit:100";return Number.isInteger(n)&&(a+=",rating.value:0...".concat(n)),{url:"/api/domain/v2/objects/".concat(t,"/videos?query={").concat(a,"}")+"".concat(r.a.VIDEO_COLLECTION).concat(g(e)),key:h("playlist:".concat(t,":videos"),e)}},getSharedPlaylistVideos:function(t,n,e){return{url:"/api/domain/v2/share/".concat(t,"/videos?query={orderBy:orderindex,limit:100}")+"".concat(r.a.SHARED_PLAYLIST_VIDEO_COLLECTION)+"".concat(g(e)).concat(b(n)),key:h("shared:playlist:".concat(t,":videos"),e)}},getVideoPlaylists:function(t,n,e){return{url:"/api/domain/v2/objects/".concat(t,"/playlists?query={limit:100,owner.id:[").concat(n,"]}"),key:h("video:playlists:".concat(t),e)}},createPlaylist:function(t,n,e,r){return{key:"create:playlist",url:"/api/domain/v2/objects/".concat(t,"/playlists"),data:n,type:a.a.POST,success:e,error:r,invalidationKeys:"user:playlists"}},updatePlaylist:function(t,n,e,r){return{key:"update:playlist",url:"/api/domain/v2/objects/".concat(t),data:n,type:a.a.PUT,success:e,error:r,updateState:{keys:"playlist:".concat(t),updateData:d("playlist:".concat(t),n)}}},deletePlaylist:function(t,n,e){return{key:"delete:playlist",url:"/api/domain/v2/objects/".concat(t),type:a.a.DELETE,success:n,error:e,invalidationKeys:"user:playlists",updateState:{keys:"playlist:".concat(t),updateData:m("playlist:".concat(t))}}},addToPlaylist:function(t,n,e,r){var o=["user:playlists",new y(t).toString()];return n.forEach((function(t){o.push("video:playlists:".concat(t))})),{key:"add:to:playlist",url:"/api/domain/v2/objects/".concat(t,"/associate"),data:n,type:a.a.POST,success:e,error:r,invalidationKeys:o,updateState:{keys:"playlist:".concat(t),updateData:v("playlist:".concat(t),n.length)}}},reorderVideos:function(t,n,e,r){return{key:"reorder:playlist",url:"/api/domain/v2/objects/".concat(t,"/videos/reorder"),data:n,type:a.a.PUT,success:e,error:r,invalidationKeys:"user:playlists",updateState:{keys:"playlist:".concat(t,":videos"),updateData:function(e){return o.a.updateState("playlist:".concat(t,":videos"),n,e)}}}},removePlaylistVideo:function(t,n,e,r){return{key:"remove:playlist:video",url:"/api/domain/v2/objects/".concat(t,"/dissociate?memberId=").concat(n),type:a.a.DELETE,success:e,error:r,invalidationKeys:["user:playlists","playlist:".concat(t,":videos")]}},getIsFollowingPlaylist:function(t,n){return{url:"/api/domain/v2/objects/".concat(n,"/followedPlaylists?query={id:").concat(t,"}"),key:"playlist:".concat(t,":following:").concat(n),formatData:function(n){var e,a;return{objectId:t,isFollowing:!!(null===(a=null===(e=n)||void 0===e?void 0:e.data)||void 0===a?void 0:a.length)}},normalize:!1}},followPlaylist:function(t,n,e,r,o){return{url:"/api/domain/v2/objects/".concat(n),key:"follow:playlist:".concat(t),data:{followedPlaylists:t},type:a.a.PUT,invalidationKeys:["user:playlists","playlist:".concat(t,":following:").concat(n)],success:e,error:r,always:o}},unfollowPlaylist:function(t,n,e,r,o){return{url:"/api/domain/v2/objects/".concat(n,"/followedplaylists/").concat(t),key:"unfollow:playlist:".concat(t),type:a.a.DELETE,invalidationKeys:["user:playlists","playlist:".concat(t,":following:").concat(n)],success:e,error:r,always:o}},getPlaylistPrivacy:function(t){return{key:"playlist:privacy:".concat(t),url:"/api/domain/v1/playlists/".concat(t,"/privacy"),formatData:function(n){return{id:t,privacy:n}}}},updatePlaylistPrivacy:function(t,n,e,r,o){return{key:"update:playlist:privacy:".concat(t),url:"/api/domain/v1/playlists/".concat(t,"/privacy"),type:a.a.PUT,data:{privacy:n},formatData:function(){return{id:t,privacy:n}},success:e,error:r,always:o}},getMigrationTask:function(t,n){return{url:"/api/playlist-app/migration-task",key:"migration:task",formatData:function(t){return t||{status:f.Processed}},success:t,error:n}}}},862:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var a=e(127),r=e(57);function o(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return i(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,a=new Array(n);e<n;e++)a[e]=t[e];return a}var c={reorder:function(t,n,e){if(n===e)return{reorderedItems:t,reorderRequest:null};var r=a.a.moveItem(t,n,e),o=e<t.length-1?r[e+1].id:null;return{reorderedItems:r,reorderRequest:{sourceMemberId:r[e].id,destinationMemberId:o}}},updateState:function(t,n,e){for(var i=[],c=r.a.deepClone(e),s=[t],l=e[t],u=!!l&&!!l.data&&l.data.length;l&&Array.isArray(l.data);){i.push.apply(i,o(l.data));var p=l.pagination&&l.pagination.cursors&&l.pagination.cursors.next,f=!!p&&"".concat(t,":").concat(p);(l=p&&e[f])&&s.push(f)}if(!i.length)return e;var y=a.a.findIndex(i,(function(t){return t.id===n.sourceMemberId})),d=[].concat(i),m=d.splice(y,1),v=n.destinationMemberId?a.a.findIndex(d,(function(t){return t.id===n.destinationMemberId})):d.length;return d.splice(v,0,m[0]),s.forEach((function(t){var n=d.splice(0,u);c[t].data=n})),c}}},863:function(t,n,e){"use strict";var a;e.d(n,"a",(function(){return a})),function(t){t.OwnedByMe="owned_by_me",t.Followed="followed",t.All="all"}(a||(a={}))},930:function(t,n,e){"use strict";e.d(n,"a",(function(){return u}));var a=e(0),r=e(61),o=e(14),i=e(35);function c(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return s(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return s(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,a=new Array(n);e<n;e++)a[e]=t[e];return a}var l=function(t){return t&&t.data&&t.data.pagination&&t.data.pagination.cursors&&t.data.pagination.cursors.next};function u(t){return Object(r.useSelector)(Object(a.useMemo)((function(){return function(n){for(var e=t,a=i.a.isFunction(t)&&o.a.getResponse(n,e()),r=a&&a.isFetching,s=a&&a.shouldFetch,u=a&&a.data&&a.data.data,p=l(a);p&&(r=(a=o.a.getResponse(n,e(p))).isFetching,!a.shouldFetch);){var f=a.data&&a.data.data;f&&u.push.apply(u,c(f)),p=l(a)}return{shouldInitialFetch:s,items:u,nextCursor:p,isFetching:r}}}),[t]))}}}]);
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[6],{1071:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var a=e(0),r=e(35);function o(t,n,e){var o=function(){e||(window.innerHeight+document.documentElement.scrollTop<document.documentElement.scrollHeight-400||t())};Object(a.useEffect)((function(){var t=r.a.throttle(o,200);return n&&window.addEventListener("scroll",t),function(){return window.removeEventListener("scroll",t)}}),[n])}},1072:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var a=e(0);function r(t){var n=t.imageUrl,e=t.heading,r=t.description;return a.createElement("div",{className:"empty-state-container"},a.createElement("div",{className:"content-container"},n&&a.createElement("img",{src:n}),a.createElement("h1",null,e),r&&a.createElement("p",{dangerouslySetInnerHTML:{__html:r}})))}},1073:function(t,n,e){"use strict";e.d(n,"a",(function(){return l}));var a=e(0),r=e(33),o=e(55),i=e(13),c=e(1250),s=e.n(c);function l(t){return a.createElement("div",{className:"p-3 text-center ".concat(s.a.container)},t.isFetching?a.createElement(r.Spinner,{as:"span",animation:"border",role:"status",className:s.a.spinner}):a.createElement(o.a,{svgName:i.b.ChevronDown,className:"svg-container cursor-pointer",size:o.b.Large,onClick:t.onClick}))}},1250:function(t,n,e){t.exports={container:"_1_KC6",spinner:"VXlcl"}},826:function(t,n,e){t.exports={buttonList:"_2v9CT",dropdownToggle:"AYBvQ"}},827:function(t,n,e){"use strict";var a=e(0),r=e(33),o=e(240),i=e(40),c=e(55),s=e(51),l=e(13),u=e(826),p=e.n(u),f=e(35);function y(t){var n="dropdown-item";return t&&(n+=" ".concat(t)),n}function d(t){if(t.action.appLink)return a.createElement(s.a,{appLink:t.action.appLink,onClick:t.action.onClick,className:y(t.action.className),analyticsData:t.action.analyticsData,analyticsOptions:t.action.analyticsOptions},t.action.label);return a.createElement("span",{className:"cursor-pointer ".concat(y(t.action.className)),onClick:function(n){t.action.analyticsData&&t.action.analyticsOptions&&i.a.logUserAction(t.action.analyticsData,t.action.analyticsOptions),f.a.isFunction(t.action.onClick)&&t.action.onClick(n)}},t.action.label)}function m(t){if(!t.actions||!t.actions.length)return a.createElement(a.Fragment,null);var n="actions-dropdown-".concat(o.a.getRandomInt()),e="px-0 ".concat(p.a.dropdownToggle);return t.dropdownToggleClassName&&(e+=" ".concat(t.dropdownToggleClassName)),a.createElement(r.Dropdown,{className:t.className?t.className:"",alignRight:!0},a.createElement(r.Dropdown.Toggle,{as:"button",type:"button",id:n,className:e},a.createElement(c.a,{svgName:l.b.More,size:c.b.Small})),a.createElement(r.Dropdown.Menu,null,t.actions.map((function(t,n){return a.createElement(d,{key:n,action:t})}))))}m.defaultProps={dropdownToggleClassName:"btn btn-light"};var v=e(235),g=e(156);function b(t){var n="ml-2";t.className&&(n+=" ".concat(t.className));var e=t.showSpinner?a.createElement(r.Spinner,{as:"span",animation:"border",role:"status",size:"sm"}):t.children;if(t.tooltip)return a.createElement(g.a,{title:t.tooltip},a.createElement(v.a,{appLink:t.appLink,svgName:t.svgName,onClick:t.onClick,className:n,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions},e));if(t.svgName)return a.createElement(v.a,{onClick:t.onClick,appLink:t.appLink,svgName:t.svgName,className:n,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions},e);if(t.appLink)return a.createElement(s.a,{onClick:t.onClick,appLink:t.appLink,className:n,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions},e);return a.createElement("button",{onClick:function(n){t.analyticsData&&t.analyticsOptions&&i.a.logUserAction(t.analyticsData,t.analyticsOptions),f.a.isFunction(t.onClick)&&t.onClick(n)},className:n},e)}function h(t){var n=[],e=[];t.actions.forEach((function(t){t.button?n.push(t):e.push(t)}));var r="d-flex";return t.className&&(r+=" ".concat(t.className)),a.createElement("div",{className:r},a.createElement(a.Fragment,null,!!n.length&&a.createElement("span",{className:p.a.buttonList},n.map((function(t,n){return a.createElement(a.Fragment,{key:n},t.label?a.createElement(b,{appLink:t.appLink,onClick:t.onClick,svgName:t.svgName,className:t.className,tooltip:t.tooltip,showSpinner:t.showSpinner,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions},t.label):a.createElement(v.a,{appLink:t.appLink,onClick:t.onClick,svgName:t.svgName,className:t.className,analyticsData:t.analyticsData,analyticsOptions:t.analyticsOptions}))}))),t.sortComponent?t.sortComponent:"",!!e.length&&a.createElement(m,{actions:e,className:!!n.length&&"ml-2",dropdownToggleClassName:t.actionsDropdownClassName})))}e.d(n,"a",(function(){return h}))},837:function(t,n,e){"use strict";e.d(n,"a",(function(){return y}));var a=e(244),r=e(85),o=e(864);function i(t){return(i="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})(t)}function c(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function s(t,n){for(var e=0;e<n.length;e++){var a=n[e];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function l(t,n){return(l=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function u(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,a=f(t);if(n){var r=f(this).constructor;e=Reflect.construct(a,arguments,r)}else e=a.apply(this,arguments);return p(this,e)}}function p(t,n){return!n||"object"!==i(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var y=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&l(t,n)}(p,t);var n,e,a,i=u(p);function p(){var t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.a.Newest,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.a.OwnedByMe;return c(this,p),(t=i.call(this,{collectionPrefix:"user:playlists",cursor:e,sort:n})).type=a,t}return n=p,(e=[{key:"toString",value:function(){return[this.collectionPrefix,this.sort,this.cursor,this.type].filter(Boolean).join(":")}}])&&s(n.prototype,e),a&&s(n,a),p}(a.a)},860:function(t,n,e){"use strict";var a=e(21),r=e(46),o=e(863);e(837);function i(t){return(i="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})(t)}function c(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function s(t,n){return(s=Object.setPrototypeOf||function(t,n){return t.__proto__=n,t})(t,n)}function l(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var e,a=p(t);if(n){var r=p(this).constructor;e=Reflect.construct(a,arguments,r)}else e=a.apply(this,arguments);return u(this,e)}}function u(t,n){return!n||"object"!==i(n)&&"function"!=typeof n?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):n}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f,y=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),n&&s(t,n)}(e,t);var n=l(e);function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return c(this,e),n.call(this,{collectionPrefix:"playlist:videos",id:t,cursor:a})}return e}(e(244).a);!function(t){t[t.Queued=1]="Queued",t[t.Processing=2]="Processing",t[t.Processed=3]="Processed",t[t.Errored=4]="Errored"}(f||(f={}));var d=function(t,n){return function(e){var a=Object.assign({},e);return a.hasOwnProperty(t)&&(a[t]=Object.assign(Object.assign({},a[t]),n)),a}},m=function(t){return function(n){var e=Object.assign({},n);return e.hasOwnProperty(t)&&delete e[t],e}},v=function(t,n){return function(e){var a=Object.assign({},e);return a.hasOwnProperty(t)?(a[t].videos||(a[t].videos={}),a[t].videos.count=a[t].videos.count?a[t].videos.count+n:n,a):e}};e.d(n,"a",(function(){return w}));var g=function(t){return t?"&cursor=".concat(t):""},b=function(t){return Number.isInteger(t)?"&maxRatingValue=".concat(t):""},h=function(t,n){return"".concat(t).concat(n?":".concat(n):"")},w={getPlaylist:function(t,n,e){return{url:"/api/domain/v2/objects/".concat(t,"?query=").concat(r.a.PLAYLIST),key:"playlist:".concat(t),success:n,error:e}},getSharedPlaylist:function(t,n,e,a){var o="/api/domain/v2/share/".concat(t);return{url:"".concat(o,"?query=").concat(r.a.PLAYLIST).concat(b(n)),key:"shared:playlist:".concat(t),success:e,error:a}},getUserPlaylists:function(t){var n=t.sort,e=t.type;return{url:"/api/domain/v2/me/playlists/".concat(e,"?sort=").concat(n,"&query={limit:100}")+"".concat(r.a.PLAYLIST_COLLECTION).concat(g(t.cursor)),key:t.toString(),formatData:function(t){return Object.assign(Object.assign({},t),{data:t.data.map((function(t){return t.owner?Object.assign(Object.assign({},t),{owner:Object.assign(Object.assign({},t.owner),{avatar:t.owner.avatar.url})}):t}))})}}},getPlaylistVideos:function(t,n,e){var a="orderBy:orderindex,limit:100";return Number.isInteger(n)&&(a+=",rating.value:0...".concat(n)),{url:"/api/domain/v2/objects/".concat(t,"/videos?query={").concat(a,"}")+"".concat(r.a.VIDEO_COLLECTION).concat(g(e)),key:h("playlist:".concat(t,":videos"),e)}},getSharedPlaylistVideos:function(t,n,e){return{url:"/api/domain/v2/share/".concat(t,"/videos?query={orderBy:orderindex,limit:100}")+"".concat(r.a.SHARED_PLAYLIST_VIDEO_COLLECTION)+"".concat(g(e)).concat(b(n)),key:h("shared:playlist:".concat(t,":videos"),e)}},getVideoPlaylists:function(t,n,e){return{url:"/api/domain/v2/objects/".concat(t,"/playlists?query={limit:100,owner.id:[").concat(n,"]}"),key:h("video:playlists:".concat(t),e)}},createPlaylist:function(t,n,e,r){return{key:"create:playlist",url:"/api/domain/v2/objects/".concat(t,"/playlists"),data:n,type:a.a.POST,success:e,error:r,invalidationKeys:"user:playlists"}},updatePlaylist:function(t,n,e,r){return{key:"update:playlist",url:"/api/domain/v2/objects/".concat(t),data:n,type:a.a.PUT,success:e,error:r,updateState:{keys:"playlist:".concat(t),updateData:d("playlist:".concat(t),n)}}},deletePlaylist:function(t,n,e){return{key:"delete:playlist",url:"/api/domain/v2/objects/".concat(t),type:a.a.DELETE,success:n,error:e,invalidationKeys:"user:playlists",updateState:{keys:"playlist:".concat(t),updateData:m("playlist:".concat(t))}}},addToPlaylist:function(t,n,e,r){var o=["user:playlists",new y(t).toString()];return n.forEach((function(t){o.push("video:playlists:".concat(t))})),{key:"add:to:playlist",url:"/api/domain/v2/objects/".concat(t,"/associate"),data:n,type:a.a.POST,success:e,error:r,invalidationKeys:o,updateState:{keys:"playlist:".concat(t),updateData:v("playlist:".concat(t),n.length)}}},reorderVideos:function(t,n,e,r){return{key:"reorder:playlist",url:"/api/domain/v2/objects/".concat(t,"/videos/reorder"),data:n,type:a.a.PUT,success:e,error:r,invalidationKeys:"user:playlists",updateState:{keys:"playlist:".concat(t,":videos"),updateData:function(e){return o.a.updateState("playlist:".concat(t,":videos"),n,e)}}}},removePlaylistVideo:function(t,n,e,r){return{key:"remove:playlist:video",url:"/api/domain/v2/objects/".concat(t,"/dissociate?memberId=").concat(n),type:a.a.DELETE,success:e,error:r,invalidationKeys:["user:playlists","playlist:".concat(t,":videos")]}},getIsFollowingPlaylist:function(t,n){return{url:"/api/domain/v2/objects/".concat(n,"/followedPlaylists?query={id:").concat(t,"}"),key:"playlist:".concat(t,":following:").concat(n),formatData:function(n){var e,a;return{objectId:t,isFollowing:!!(null===(a=null===(e=n)||void 0===e?void 0:e.data)||void 0===a?void 0:a.length)}},normalize:!1}},followPlaylist:function(t,n,e,r,o){return{url:"/api/domain/v2/objects/".concat(n),key:"follow:playlist:".concat(t),data:{followedPlaylists:t},type:a.a.PUT,invalidationKeys:["user:playlists","playlist:".concat(t,":following:").concat(n)],success:e,error:r,always:o}},unfollowPlaylist:function(t,n,e,r,o){return{url:"/api/domain/v2/objects/".concat(n,"/followedplaylists/").concat(t),key:"unfollow:playlist:".concat(t),type:a.a.DELETE,invalidationKeys:["user:playlists","playlist:".concat(t,":following:").concat(n)],success:e,error:r,always:o}},getPlaylistPrivacy:function(t){return{key:"playlist:privacy:".concat(t),url:"/api/domain/v1/playlists/".concat(t,"/privacy"),formatData:function(n){return{id:t,privacy:n}}}},updatePlaylistPrivacy:function(t,n,e,r,o){return{key:"update:playlist:privacy:".concat(t),url:"/api/domain/v1/playlists/".concat(t,"/privacy"),type:a.a.PUT,data:{privacy:n},formatData:function(){return{id:t,privacy:n}},success:e,error:r,always:o}},getMigrationTask:function(t,n){return{url:"/api/playlist-app/migration-task",key:"migration:task",formatData:function(t){return t||{status:f.Processed}},success:t,error:n}}}},863:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var a=e(127),r=e(57);function o(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return i(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return i(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,a=new Array(n);e<n;e++)a[e]=t[e];return a}var c={reorder:function(t,n,e){if(n===e)return{reorderedItems:t,reorderRequest:null};var r=a.a.moveItem(t,n,e),o=e<t.length-1?r[e+1].id:null;return{reorderedItems:r,reorderRequest:{sourceMemberId:r[e].id,destinationMemberId:o}}},updateState:function(t,n,e){for(var i=[],c=r.a.deepClone(e),s=[t],l=e[t],u=!!l&&!!l.data&&l.data.length;l&&Array.isArray(l.data);){i.push.apply(i,o(l.data));var p=l.pagination&&l.pagination.cursors&&l.pagination.cursors.next,f=!!p&&"".concat(t,":").concat(p);(l=p&&e[f])&&s.push(f)}if(!i.length)return e;var y=a.a.findIndex(i,(function(t){return t.id===n.sourceMemberId})),d=[].concat(i),m=d.splice(y,1),v=n.destinationMemberId?a.a.findIndex(d,(function(t){return t.id===n.destinationMemberId})):d.length;return d.splice(v,0,m[0]),s.forEach((function(t){var n=d.splice(0,u);c[t].data=n})),c}}},864:function(t,n,e){"use strict";var a;e.d(n,"a",(function(){return a})),function(t){t.OwnedByMe="owned_by_me",t.Followed="followed",t.All="all"}(a||(a={}))},932:function(t,n,e){"use strict";e.d(n,"a",(function(){return u}));var a=e(0),r=e(61),o=e(14),i=e(35);function c(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return s(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return s(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,a=new Array(n);e<n;e++)a[e]=t[e];return a}var l=function(t){return t&&t.data&&t.data.pagination&&t.data.pagination.cursors&&t.data.pagination.cursors.next};function u(t){return Object(r.useSelector)(Object(a.useMemo)((function(){return function(n){for(var e=t,a=i.a.isFunction(t)&&o.a.getResponse(n,e()),r=a&&a.isFetching,s=a&&a.shouldFetch,u=a&&a.data&&a.data.data,p=l(a);p&&(r=(a=o.a.getResponse(n,e(p))).isFetching,!a.shouldFetch);){var f=a.data&&a.data.data;f&&u.push.apply(u,c(f)),p=l(a)}return{shouldInitialFetch:s,items:u,nextCursor:p,isFetching:r}}}),[t]))}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[60],{
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[60],{1291:function(e,n,t){"use strict";t.r(n),t.d(n,"CancelUploadView",(function(){return h}));var r=t(0),a=t(9),c=t(153),o=t(7),i=t(48),l=t(17),s=t(238),u=t(243),p=t(823),f=t(44),d=t(73),g=t(28),b=t(5),m=t(251);function y(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,a=!1,c=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done)&&(t.push(o.value),!n||t.length!==n);r=!0);}catch(e){a=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(a)throw c}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return v(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return v(e,n)}(e,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.")}()}function v(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var A=o.a.encloseNamespace("upload.cancelUpload");function h(e){var n=e.id,t=e.status,o=e.name,v=y(r.useState(!1),2),h=v[0],w=v[1],P=Object(c.a)(g.b.CombineUploads),U=Object(p.a)(),E=t===m.b.Uploading,S=function(){var n=E?"cancelUploadingAlertHeading":"cancelProcessingAlertHeading",t=E?"cancelUploadingAlertMessage":"cancelProcessingAlertMessage";U.success({type:i.a.Success,heading:A(n),message:A(t,{videoName:o})}),e.closePopup()},O=[{variant:"link",onClick:function(){return e.closePopup()},buttonText:"No"},{variant:"primary",onClick:function(){(w(!0),E)?(P.cancelUpload(n),a.Radio.channel(l.c.VIDEO_UPLOAD).on(f.a.UPLOAD_CANCELLED,(function(){return S()}))):(P.cancelProcessing(n),a.Radio.channel(b.b.COMBINE_UPLOADS).on(f.a.PROCESSING_CANCELLED,(function(){return S()})))},buttonText:"Yes",isSpinnerButton:!0,showSpinner:h}],C=t===m.b.Processing?"cancelProcessingTitle":"cancelUploadingTitle",L=t===m.b.Processing?"cancelProcessingMessage":"cancelUploadingMessage";return r.createElement(s.a,{title:A(C),closePopup:function(){return e.closePopup()}},r.createElement("p",null,r.createElement(d.b,{namespace:"upload.cancelUpload",phrase:L,options:{videoName:o}})),r.createElement(u.a,{buttons:O}))}},823:function(e,n,t){"use strict";t.d(n,"a",(function(){return o}));var r=t(153),a=t(48),c=t(52),o=function(){var e=Object(r.a)(c.a.ALERT);return{success:function(n){e.success(n)()},error:function(n){e.error(n)()},warning:function(n){e.createAlert({type:a.a.Warning,heading:a.c.Warning,message:n})}}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[61],{
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[61],{1278:function(t,e,r){"use strict";r.r(e),r.d(e,"PlaySharedView",(function(){return f}));var n=r(0),a=r(14),o=r(89),i=r(237),c=r(1074),u=r(991),l=r(92);function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,a=!1,o=void 0;try{for(var i,c=t[Symbol.iterator]();!(n=(i=c.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(t){a=!0,o=t}finally{try{n||null==c.return||c.return()}finally{if(a)throw o}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(t,e)}(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}function f(t){var e,r=s(Object(o.a)(l.a.WEB_PLAYER_DATA),2)[1],d=a.a.useBasicFetch(u.a.sharedResource(t.shortCode));return Object(i.a)(null===(e=d.data)||void 0===e?void 0:e.name),n.useEffect((function(){d.data&&r("video",d.data)}),[!!d.data]),d.data?n.createElement("div",{className:"px-3"},n.createElement(c.a,{video:d.data})):n.createElement(n.Fragment,null)}},991:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(21),a=r(161),o={getShareData:function(t){if(t)return{url:"/api/domain/v1/share",key:"share:".concat(t),type:n.a.POST,data:{id:t,privacy:null}}},sharedResource:function(t){return{url:"/api/domain/v2/share/".concat(t,"?query=").concat(a.a.VIDEO),key:"shared:resource:".concat(t)}}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[62],{
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[62],{1283:function(e,t,n){"use strict";n.r(t),n.d(t,"DialogView",(function(){return s}));var o=n(0),c=n(35),i=n(243),l=n(238);function s(e){var t=e.buttons.map((function(t){return{buttonText:t.text,className:t.className,onClick:function(){t.success?c.a.isFunction(e.onDone)&&e.onDone():c.a.isFunction(e.onFail)&&e.onFail(),t.close&&e.closePopup()},type:t.type}}));return o.createElement(l.a,{title:e.title,closePopup:e.closePopup},o.createElement("p",null,e.text),o.createElement(i.a,{buttons:t}))}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[63],{
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[63],{1277:function(e,t,i){"use strict";i.r(t),i.d(t,"ClassificationUpdateView",(function(){return r}));var a=i(0),n=i(90),s=i(14),p=i(7),c=i(1068),d=i(237),o=i(928),l=i(1011);function r(e){var t,i,r,u=e.classificationId,k=n().subtract(1,"year").toISOString(),f=n().toISOString(),g=s.a.useBasicFetch(c.a.getClassification(u)),L=s.a.useBasicFetch(c.a.getContentUpdates(k,f)),v=null===(t=L.data)||void 0===t?void 0:t.find((function(e){return e.classificationId===u}));return Object(d.a)(null!=(r=null===(i=g.data)||void 0===i?void 0:i.name)?r:p.a.getPhrase("contentUpdates.classificationUpdate","defaultPageTitle")),L.data&&g.data?a.createElement("div",{className:"bg-white px-3"},a.createElement(l.b,{classification:g.data,dashboardAppLink:e.appLinks.dashboardAppLink,contentUpdatesAppLink:e.appLinks.contentUpdatesAppLink}),a.createElement(o.a,{canEdit:!1,playlistId:"0",isUserSignedIn:!0,onSortComplete:function(){},videos:v.videos,getVideoAppLink:e.appLinks.getVideoAppLink,getSeriesAppLink:e.appLinks.getSeriesAppLink})):a.createElement(a.Fragment,null)}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[64],{
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[64],{1284:function(e,t,n){"use strict";n.r(t),n.d(t,"DevErrorView",(function(){return c}));var r=n(0),a=n(33),l=n(237);function c(e){var t=e.error;return Object(l.a)("Dev Error"),t?r.createElement("div",{className:"px-3"},r.createElement("h1",null,t.name),r.createElement(a.Alert,{variant:"danger"},r.createElement("h2",null,t.message)),r.createElement(a.Alert,{variant:"warning"},r.createElement("h3",null,"Call stack"),r.createElement("code",null,t.stack))):r.createElement(r.Fragment,null)}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[65],{
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[65],{1287:function(e,a,t){"use strict";t.r(a),t.d(a,"EditPlaylistView",(function(){return P}));var i=t(0),n=t(61),s=t(7),l=t(14),c=t(3),o=t(40),p=t(237),d=t(860),r=t(238),u=t(823),y=t(1075),w=s.a.encloseNamespace("playlists.editPlaylist");function P(e){var a=Object(n.useDispatch)(),t=Object(u.a)(),s=l.a.useBasicFetch(d.a.getPlaylist(e.playlistId));Object(p.a)(s.data&&w("title",{name:s.data.name}),[s]);return i.createElement(r.a,{title:w("heading"),closePopup:e.closePopup,showLoadingSpinner:!s.data},!!s.data&&i.createElement(y.a,{playlist:s.data,savePlaylist:function(i){l.a.fetch(a,d.a.updatePlaylist(e.playlistId,i,(function(a){t.success(w("success",{name:a.name})),o.a.logUserAction({id:a.id},o.a.mergeOptions(e.analyticsOptions,{actionType:c.n.Edit,entity:c.d.Playlist,workflowPhase:c.o.Complete})),e.closePopup()}),(function(){t.error(w("error",{name:s.data.name})),e.closePopup()})))},onClickCancel:e.closePopup,cancelButtonClass:"secondary"}))}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[66],{
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[66],{1286:function(e,a,t){"use strict";t.r(a),t.d(a,"NewPlaylistView",(function(){return g}));var i=t(0),c=t(61),n=t(2),s=t(14),l=t(7),o=t(3),p=t(40),r=t(237),u=t(154),w=t(860),P=t(238),d=t(823),y=t(10),f=t(1075),k=t(47),m=l.a.encloseNamespace("playlists.newPlaylist");function g(e){var a=Object(c.useDispatch)(),t=Object(d.a)();Object(r.a)(m("title"));var l=s.a.useBasicFetch(u.a.currentUser());return i.createElement(P.a,{title:m("title"),closePopup:e.closePopup,showLoadingSpinner:!l.data},!!l.data&&i.createElement(f.a,{savePlaylist:function(i){s.a.fetch(a,w.a.createPlaylist(l.data.id,i,(function(a){t.success(m("success",{name:i.name})),p.a.logUserAction({id:a.id},p.a.mergeOptions(e.analyticsOptions,{actionType:o.n.Create,entity:o.d.Playlist,workflowPhase:o.o.Complete})),e.closePopup(),n.a.AppLinkHelper.trigger({application:e.application,action:y.a.Playlists.PLAYLIST,args:[a.id,k.a.slugify(a.name)]})}),(function(){t.error(m("error")),e.closePopup()})))},onClickCancel:e.closePopup,cancelButtonClass:"link"}))}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[67],{
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[67],{822:function(t,e){!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=function(t){for(var e=window.document,n=i(e);n;)n=i(e=n.ownerDocument);return e}(),e=[],n=null,o=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return n||(n=function(t,n){o=t&&n?l(t,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},e.forEach((function(t){t._checkForIntersections()}))}),n},s._resetCrossOriginUpdater=function(){n=null,o=null},s.prototype.observe=function(t){if(!this._observationTargets.some((function(e){return e.element==t}))){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},s.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t})),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},s.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter((function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]}))},s.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}}));return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},s.prototype._monitorIntersections=function(e){var n=e.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(e)){var o=this._checkForIntersections,r=null,s=null;if(this.POLL_INTERVAL?r=n.setInterval(o,this.POLL_INTERVAL):(h(n,"resize",o,!0),h(e,"scroll",o,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(s=new n.MutationObserver(o)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push((function(){var t=e.defaultView;t&&(r&&t.clearInterval(r),c(t,"resize",o,!0)),c(e,"scroll",o,!0),s&&s.disconnect()})),e!=(this.root&&this.root.ownerDocument||t)){var u=i(e);u&&this._monitorIntersections(u.ownerDocument)}}},s.prototype._unmonitorIntersections=function(e){var n=this._monitoringDocuments.indexOf(e);if(-1!=n){var o=this.root&&this.root.ownerDocument||t;if(!this._observationTargets.some((function(t){var n=t.element.ownerDocument;if(n==e)return!0;for(;n&&n!=o;){var r=i(n);if((n=r&&r.ownerDocument)==e)return!0}return!1}))){var r=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),r(),e!=o){var s=i(e);s&&this._unmonitorIntersections(s.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e<t.length;e++)t[e]()},s.prototype._checkForIntersections=function(){if(this.root||!n||o){var t=this._rootIsInDom(),e=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(o){var i=o.element,s=u(i),h=this._rootContainsTarget(i),c=o.entry,a=t&&h&&this._computeTargetAndRootIntersection(i,s,e),l=o.entry=new r({time:window.performance&&performance.now&&performance.now(),target:i,boundingClientRect:s,rootBounds:n&&!this.root?null:e,intersectionRect:a});c?t&&h?this._hasCrossedThreshold(c,l)&&this._queuedEntries.push(l):c&&c.isIntersecting&&this._queuedEntries.push(l):this._queuedEntries.push(l)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},s.prototype._computeTargetAndRootIntersection=function(e,i,r){if("none"!=window.getComputedStyle(e).display){for(var s,h,c,a,f,d,g,m,v=i,_=p(e),w=!1;!w&&_;){var b=null,y=1==_.nodeType?window.getComputedStyle(_):{};if("none"==y.display)return null;if(_==this.root||9==_.nodeType)if(w=!0,_==this.root||_==t)n&&!this.root?!o||0==o.width&&0==o.height?(_=null,b=null,v=null):b=o:b=r;else{var I=p(_),E=I&&u(I),T=I&&this._computeTargetAndRootIntersection(I,E,r);E&&T?(_=I,b=l(E,T)):(_=null,v=null)}else{var R=_.ownerDocument;_!=R.body&&_!=R.documentElement&&"visible"!=y.overflow&&(b=u(_))}if(b&&(s=b,h=v,c=void 0,a=void 0,f=void 0,d=void 0,g=void 0,m=void 0,c=Math.max(s.top,h.top),a=Math.min(s.bottom,h.bottom),f=Math.max(s.left,h.left),d=Math.min(s.right,h.right),m=a-c,v=(g=d-f)>=0&&m>=0&&{top:c,bottom:a,left:f,right:d,width:g,height:m}||null),!v)break;_=_&&p(_)}return v}},s.prototype._getRootRect=function(){var e;if(this.root)e=u(this.root);else{var n=t.documentElement,o=t.body;e={top:0,left:0,right:n.clientWidth||o.clientWidth,width:n.clientWidth||o.clientWidth,bottom:n.clientHeight||o.clientHeight,height:n.clientHeight||o.clientHeight}}return this._expandRectByRootMargin(e)},s.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map((function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100})),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},s.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,o=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==o)for(var i=0;i<this.thresholds.length;i++){var r=this.thresholds[i];if(r==n||r==o||r<n!=r<o)return!0}},s.prototype._rootIsInDom=function(){return!this.root||f(t,this.root)},s.prototype._rootContainsTarget=function(e){return f(this.root||t,e)&&(!this.root||this.root.ownerDocument==e.ownerDocument)},s.prototype._registerInstance=function(){e.indexOf(this)<0&&e.push(this)},s.prototype._unregisterInstance=function(){var t=e.indexOf(this);-1!=t&&e.splice(t,1)},window.IntersectionObserver=s,window.IntersectionObserverEntry=r}function i(t){try{return t.defaultView&&t.defaultView.frameElement||null}catch(t){return null}}function r(t){this.time=t.time,this.target=t.target,this.rootBounds=a(t.rootBounds),this.boundingClientRect=a(t.boundingClientRect),this.intersectionRect=a(t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,o=this.intersectionRect,i=o.width*o.height;this.intersectionRatio=n?Number((i/n).toFixed(4)):this.isIntersecting?1:0}function s(t,e){var n,o,i,r=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(r.root&&1!=r.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),o=this.THROTTLE_TIMEOUT,i=null,function(){i||(i=setTimeout((function(){n(),i=null}),o))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(r.rootMargin),this.thresholds=this._initThresholds(r.threshold),this.root=r.root||null,this.rootMargin=this._rootMarginValues.map((function(t){return t.value+t.unit})).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function h(t,e,n,o){"function"==typeof t.addEventListener?t.addEventListener(e,n,o||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function c(t,e,n,o){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,o||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,n)}function u(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function a(t){return!t||"x"in t?t:{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function l(t,e){var n=e.top-t.top,o=e.left-t.left;return{top:n,left:o,height:e.height,width:e.width,bottom:n+e.height,right:o+e.width}}function f(t,e){for(var n=e;n;){if(n==t)return!0;n=p(n)}return!1}function p(e){var n=e.parentNode;return 9==e.nodeType&&e!=t?i(e):n&&11==n.nodeType&&n.host?n.host:n&&n.assignedSlot?n.assignedSlot.parentNode:n}}()}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[7],{1075:function(t,e,n){"use strict";var r=n(0),a=n(826),o=n(7),i=n(73),c=n(832),l=n(849),u=n(850),s=n(886),f="playlists.validation",y=s.object().shape({name:s.string().max(250,(function(){return o.a.getPhrase(f,"nameExceeds")})).required((function(){return o.a.getPhrase(f,"nameRequired")})),description:s.string().max(65535,(function(){return o.a.getPhrase(f,"descriptionExceeds")}))});n.d(e,"a",(function(){return m}));var d=o.a.encloseNamespace("playlists.playlistDetails");function p(t){var e=Object(c.b)();return r.createElement(a.c,null,r.createElement(l.b,{label:d("nameLabel"),type:"text",name:"name",id:"name",placeholder:d("namePlaceholder"),autoFocus:!0,value:e.values.name}),r.createElement(l.b,{label:d("descriptionLabel"),component:"textarea",name:"description",id:"description",placeholder:d("descriptionPlaceholder"),value:e.values.description}),r.createElement("div",{className:"btn-container d-flex justify-content-end"},r.createElement("button",{type:"button",className:"btn btn-".concat(t.cancelButtonClass," mr-2"),onClick:t.onClickCancel},r.createElement(i.b,{namespace:"playlists.playlistDetails",phrase:"cancel"})),r.createElement(u.a,{isNew:t.isNew})))}function m(t){var e=t.playlist,n=(e=void 0===e?{}:e).name,a=void 0===n?"":n,o=e.description,i=void 0===o?"":o,l=e.id,u=void 0===l?null:l,s=t.savePlaylist,f=t.onClickCancel,d=t.cancelButtonClass;return r.createElement(c.a,{initialValues:{name:a,description:i},validationSchema:y,onSubmit:s},r.createElement(p,{isNew:!u,onClickCancel:f,cancelButtonClass:d}))}},824:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(153),a=n(48),o=n(52),i=function(){var t=Object(r.a)(o.a.ALERT);return{success:function(e){t.success(e)()},error:function(e){t.error(e)()},warning:function(e){t.createAlert({type:a.a.Warning,heading:a.c.Warning,message:e})}}}},832:function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return u}));var r=n(0),a=n(826),o=n(35),i=n(57),c=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(t);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]])}return n};function l(t){var e=t.castInitialValues,n=t.castValuesOnSubmit,l=t.initialValues,u=t.onSubmit,s=t.resetOnSubmit,f=c(t,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit","resetOnSubmit"]),y=e&&t.validationSchema?t.validationSchema.cast(function t(e){var n=i.a.deepClone(e);return Object.keys(n).forEach((function(e){n.hasOwnProperty(e)&&(i.a.isObject(n[e])?n[e]=t(n[e]):null===n[e]&&delete n[e])})),n}(l)):l,d={allowInitialSubmit:t.allowInitialSubmit};return r.createElement(a.d,Object.assign({enableReinitialize:!0},f,{initialValues:y,onSubmit:function(e,r){var a=r.setSubmitting,o=r.resetForm,i=n&&t.validationSchema?t.validationSchema.cast(e):e;u(i,(function(){s&&o(),a(!1)}))},initialStatus:d}),o.a.isFunction(t.children)?function(e){return t.children(e)}:r.Children.count(t.children)?t.children:null)}function u(){return Object(a.f)()}l.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},838:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var r=n(244),a=n(85),o=n(863);function i(t){return(i="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})(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=y(t);if(e){var a=y(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(f,t);var e,n,r,i=s(f);function f(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a.Newest,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.a.OwnedByMe;return c(this,f),(t=i.call(this,{collectionPrefix:"user:playlists",cursor:n,sort:e})).type=r,t}return e=f,(n=[{key:"toString",value:function(){return[this.collectionPrefix,this.sort,this.cursor,this.type].filter(Boolean).join(":")}}])&&l(e.prototype,n),r&&l(e,r),f}(r.a)},841:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(826),a={getCustomFormControlClassName:function(t,e,n,a){var o="form-control";return Object(r.e)(e,n)&&Object(r.e)(t,n)&&(o+=" is-invalid"),a&&(o+=" ".concat(a)),o}}},849:function(t,e,n){"use strict";var r=n(0),a=n(826),o=n(33),i=n(35),c=n(841);function l(t){var e=Object(a.f)().values[t.fieldName];return"string"!=typeof e?r.createElement(r.Fragment,null):r.createElement("div",{className:"float-right text-muted"},e.length,"/",t.limit)}var u=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(t);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]])}return n};function s(t){var e=t.label,n=u(t,["label"]);return r.createElement(o.Form.Group,null,r.createElement("div",{className:"custom-control custom-checkbox"},r.createElement(y,Object.assign({className:"custom-control-input"},n)),r.createElement(o.Form.Label,{className:"custom-control-label",htmlFor:n.id},e)))}n.d(e,"a",(function(){return y})),n.d(e,"b",(function(){return d}));var f=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(t);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]])}return n};function y(t){var e=t.children,n=f(t,["children"]);return r.createElement(a.b,Object.assign({},n),i.a.isFunction(e)?function(t){return e(t)}:r.Children.count(e)?e:null)}function d(t){var e=t.label,n=t.className,i=t.showCharacterCounter,u=f(t,["label","className","showCharacterCounter"]),d=Object(a.f)(),p=d.errors,m=d.touched;return"checkbox"===u.type?r.createElement(s,Object.assign({},t)):r.createElement(o.Form.Group,null,!!e&&r.createElement(o.Form.Label,{htmlFor:u.id},e),r.createElement(y,Object.assign({className:c.a.getCustomFormControlClassName(p,m,u.name,n)},u)),!!i&&!!u.maxLength&&r.createElement(l,{fieldName:u.name,limit:u.maxLength}),r.createElement(a.a,{name:u.name},(function(t){return r.createElement(o.Form.Control.Feedback,{type:"invalid"},t)})))}},850:function(t,e,n){"use strict";var r=n(0),a=n(826);function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=t[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){a=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(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 i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var c=n(246),l=n(73);n.d(e,"a",(function(){return u}));function u(t){var e=Object(a.f)(),n=function(t){var e,n=o(r.useState(!1),2),a=n[0],i=n[1];return r.useEffect((function(){var e;t.isValid&&(t.dirty||(null===(e=t.initialStatus)||void 0===e?void 0:e.allowInitialSubmit))?i(!0):i(!1)}),[t.isValid,null===(e=t.initialStatus)||void 0===e?void 0:e.allowInitialSubmit,t.dirty,t.values]),r.useEffect((function(){t.isSubmitting&&i(!1)}),[t.isSubmitting]),a}(e);r.useEffect((function(){function t(t){13===t.keyCode&&n&&e.validateForm().then((function(t){Object.keys(t).length||e.submitForm()}))}return window.addEventListener("keypress",t),function(){return window.removeEventListener("keypress",t)}}),[n]);var i="save";return t.isNew&&(i="create"),t.hasNext&&(i="next"),r.createElement(c.a,{variant:t.variant||"primary",showSpinner:e.isSubmitting,type:"submit",disabled:!n},t.submitText?r.createElement(r.Fragment,null,t.submitText):r.createElement(l.b,{namespace:"shared.formButtons",phrase:i}))}},859:function(t,e,n){"use strict";var r=n(21),a=n(46),o=n(862);n(838);function i(t){return(i="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})(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f(t);if(e){var a=f(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var y,d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(n,t);var e=u(n);function n(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return c(this,n),e.call(this,{collectionPrefix:"playlist:videos",id:t,cursor:r})}return n}(n(244).a);!function(t){t[t.Queued=1]="Queued",t[t.Processing=2]="Processing",t[t.Processed=3]="Processed",t[t.Errored=4]="Errored"}(y||(y={}));var p=function(t,e){return function(n){var r=Object.assign({},n);return r.hasOwnProperty(t)&&(r[t]=Object.assign(Object.assign({},r[t]),e)),r}},m=function(t){return function(e){var n=Object.assign({},e);return n.hasOwnProperty(t)&&delete n[t],n}},b=function(t,e){return function(n){var r=Object.assign({},n);return r.hasOwnProperty(t)?(r[t].videos||(r[t].videos={}),r[t].videos.count=r[t].videos.count?r[t].videos.count+e:e,r):n}};n.d(e,"a",(function(){return O}));var v=function(t){return t?"&cursor=".concat(t):""},h=function(t){return Number.isInteger(t)?"&maxRatingValue=".concat(t):""},g=function(t,e){return"".concat(t).concat(e?":".concat(e):"")},O={getPlaylist:function(t,e,n){return{url:"/api/domain/v2/objects/".concat(t,"?query=").concat(a.a.PLAYLIST),key:"playlist:".concat(t),success:e,error:n}},getSharedPlaylist:function(t,e,n,r){var o="/api/domain/v2/share/".concat(t);return{url:"".concat(o,"?query=").concat(a.a.PLAYLIST).concat(h(e)),key:"shared:playlist:".concat(t),success:n,error:r}},getUserPlaylists:function(t){var e=t.sort,n=t.type;return{url:"/api/domain/v2/me/playlists/".concat(n,"?sort=").concat(e,"&query={limit:100}")+"".concat(a.a.PLAYLIST_COLLECTION).concat(v(t.cursor)),key:t.toString(),formatData:function(t){return Object.assign(Object.assign({},t),{data:t.data.map((function(t){return t.owner?Object.assign(Object.assign({},t),{owner:Object.assign(Object.assign({},t.owner),{avatar:t.owner.avatar.url})}):t}))})}}},getPlaylistVideos:function(t,e,n){var r="orderBy:orderindex,limit:100";return Number.isInteger(e)&&(r+=",rating.value:0...".concat(e)),{url:"/api/domain/v2/objects/".concat(t,"/videos?query={").concat(r,"}")+"".concat(a.a.VIDEO_COLLECTION).concat(v(n)),key:g("playlist:".concat(t,":videos"),n)}},getSharedPlaylistVideos:function(t,e,n){return{url:"/api/domain/v2/share/".concat(t,"/videos?query={orderBy:orderindex,limit:100}")+"".concat(a.a.SHARED_PLAYLIST_VIDEO_COLLECTION)+"".concat(v(n)).concat(h(e)),key:g("shared:playlist:".concat(t,":videos"),n)}},getVideoPlaylists:function(t,e,n){return{url:"/api/domain/v2/objects/".concat(t,"/playlists?query={limit:100,owner.id:[").concat(e,"]}"),key:g("video:playlists:".concat(t),n)}},createPlaylist:function(t,e,n,a){return{key:"create:playlist",url:"/api/domain/v2/objects/".concat(t,"/playlists"),data:e,type:r.a.POST,success:n,error:a,invalidationKeys:"user:playlists"}},updatePlaylist:function(t,e,n,a){return{key:"update:playlist",url:"/api/domain/v2/objects/".concat(t),data:e,type:r.a.PUT,success:n,error:a,updateState:{keys:"playlist:".concat(t),updateData:p("playlist:".concat(t),e)}}},deletePlaylist:function(t,e,n){return{key:"delete:playlist",url:"/api/domain/v2/objects/".concat(t),type:r.a.DELETE,success:e,error:n,invalidationKeys:"user:playlists",updateState:{keys:"playlist:".concat(t),updateData:m("playlist:".concat(t))}}},addToPlaylist:function(t,e,n,a){var o=["user:playlists",new d(t).toString()];return e.forEach((function(t){o.push("video:playlists:".concat(t))})),{key:"add:to:playlist",url:"/api/domain/v2/objects/".concat(t,"/associate"),data:e,type:r.a.POST,success:n,error:a,invalidationKeys:o,updateState:{keys:"playlist:".concat(t),updateData:b("playlist:".concat(t),e.length)}}},reorderVideos:function(t,e,n,a){return{key:"reorder:playlist",url:"/api/domain/v2/objects/".concat(t,"/videos/reorder"),data:e,type:r.a.PUT,success:n,error:a,invalidationKeys:"user:playlists",updateState:{keys:"playlist:".concat(t,":videos"),updateData:function(n){return o.a.updateState("playlist:".concat(t,":videos"),e,n)}}}},removePlaylistVideo:function(t,e,n,a){return{key:"remove:playlist:video",url:"/api/domain/v2/objects/".concat(t,"/dissociate?memberId=").concat(e),type:r.a.DELETE,success:n,error:a,invalidationKeys:["user:playlists","playlist:".concat(t,":videos")]}},getIsFollowingPlaylist:function(t,e){return{url:"/api/domain/v2/objects/".concat(e,"/followedPlaylists?query={id:").concat(t,"}"),key:"playlist:".concat(t,":following:").concat(e),formatData:function(e){var n,r;return{objectId:t,isFollowing:!!(null===(r=null===(n=e)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length)}},normalize:!1}},followPlaylist:function(t,e,n,a,o){return{url:"/api/domain/v2/objects/".concat(e),key:"follow:playlist:".concat(t),data:{followedPlaylists:t},type:r.a.PUT,invalidationKeys:["user:playlists","playlist:".concat(t,":following:").concat(e)],success:n,error:a,always:o}},unfollowPlaylist:function(t,e,n,a,o){return{url:"/api/domain/v2/objects/".concat(e,"/followedplaylists/").concat(t),key:"unfollow:playlist:".concat(t),type:r.a.DELETE,invalidationKeys:["user:playlists","playlist:".concat(t,":following:").concat(e)],success:n,error:a,always:o}},getPlaylistPrivacy:function(t){return{key:"playlist:privacy:".concat(t),url:"/api/domain/v1/playlists/".concat(t,"/privacy"),formatData:function(e){return{id:t,privacy:e}}}},updatePlaylistPrivacy:function(t,e,n,a,o){return{key:"update:playlist:privacy:".concat(t),url:"/api/domain/v1/playlists/".concat(t,"/privacy"),type:r.a.PUT,data:{privacy:e},formatData:function(){return{id:t,privacy:e}},success:n,error:a,always:o}},getMigrationTask:function(t,e){return{url:"/api/playlist-app/migration-task",key:"migration:task",formatData:function(t){return t||{status:y.Processed}},success:t,error:e}}}},862:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(127),a=n(57);function o(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var c={reorder:function(t,e,n){if(e===n)return{reorderedItems:t,reorderRequest:null};var a=r.a.moveItem(t,e,n),o=n<t.length-1?a[n+1].id:null;return{reorderedItems:a,reorderRequest:{sourceMemberId:a[n].id,destinationMemberId:o}}},updateState:function(t,e,n){for(var i=[],c=a.a.deepClone(n),l=[t],u=n[t],s=!!u&&!!u.data&&u.data.length;u&&Array.isArray(u.data);){i.push.apply(i,o(u.data));var f=u.pagination&&u.pagination.cursors&&u.pagination.cursors.next,y=!!f&&"".concat(t,":").concat(f);(u=f&&n[y])&&l.push(y)}if(!i.length)return n;var d=r.a.findIndex(i,(function(t){return t.id===e.sourceMemberId})),p=[].concat(i),m=p.splice(d,1),b=e.destinationMemberId?r.a.findIndex(p,(function(t){return t.id===e.destinationMemberId})):p.length;return p.splice(b,0,m[0]),l.forEach((function(t){var e=p.splice(0,s);c[t].data=e})),c}}},863:function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t.OwnedByMe="owned_by_me",t.Followed="followed",t.All="all"}(r||(r={}))}}]);
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[7],{1075:function(t,e,n){"use strict";var r=n(0),a=n(825),o=n(7),i=n(73),c=n(831),l=n(850),u=n(851),s=n(885),f="playlists.validation",y=s.object().shape({name:s.string().max(250,(function(){return o.a.getPhrase(f,"nameExceeds")})).required((function(){return o.a.getPhrase(f,"nameRequired")})),description:s.string().max(65535,(function(){return o.a.getPhrase(f,"descriptionExceeds")}))});n.d(e,"a",(function(){return m}));var d=o.a.encloseNamespace("playlists.playlistDetails");function p(t){var e=Object(c.b)();return r.createElement(a.c,null,r.createElement(l.b,{label:d("nameLabel"),type:"text",name:"name",id:"name",placeholder:d("namePlaceholder"),autoFocus:!0,value:e.values.name}),r.createElement(l.b,{label:d("descriptionLabel"),component:"textarea",name:"description",id:"description",placeholder:d("descriptionPlaceholder"),value:e.values.description}),r.createElement("div",{className:"btn-container d-flex justify-content-end"},r.createElement("button",{type:"button",className:"btn btn-".concat(t.cancelButtonClass," mr-2"),onClick:t.onClickCancel},r.createElement(i.b,{namespace:"playlists.playlistDetails",phrase:"cancel"})),r.createElement(u.a,{isNew:t.isNew})))}function m(t){var e=t.playlist,n=(e=void 0===e?{}:e).name,a=void 0===n?"":n,o=e.description,i=void 0===o?"":o,l=e.id,u=void 0===l?null:l,s=t.savePlaylist,f=t.onClickCancel,d=t.cancelButtonClass;return r.createElement(c.a,{initialValues:{name:a,description:i},validationSchema:y,onSubmit:s},r.createElement(p,{isNew:!u,onClickCancel:f,cancelButtonClass:d}))}},823:function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(153),a=n(48),o=n(52),i=function(){var t=Object(r.a)(o.a.ALERT);return{success:function(e){t.success(e)()},error:function(e){t.error(e)()},warning:function(e){t.createAlert({type:a.a.Warning,heading:a.c.Warning,message:e})}}}},831:function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return u}));var r=n(0),a=n(825),o=n(35),i=n(57),c=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(t);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]])}return n};function l(t){var e=t.castInitialValues,n=t.castValuesOnSubmit,l=t.initialValues,u=t.onSubmit,s=t.resetOnSubmit,f=c(t,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit","resetOnSubmit"]),y=e&&t.validationSchema?t.validationSchema.cast(function t(e){var n=i.a.deepClone(e);return Object.keys(n).forEach((function(e){n.hasOwnProperty(e)&&(i.a.isObject(n[e])?n[e]=t(n[e]):null===n[e]&&delete n[e])})),n}(l)):l,d={allowInitialSubmit:t.allowInitialSubmit};return r.createElement(a.d,Object.assign({enableReinitialize:!0},f,{initialValues:y,onSubmit:function(e,r){var a=r.setSubmitting,o=r.resetForm,i=n&&t.validationSchema?t.validationSchema.cast(e):e;u(i,(function(){s&&o(),a(!1)}))},initialStatus:d}),o.a.isFunction(t.children)?function(e){return t.children(e)}:r.Children.count(t.children)?t.children:null)}function u(){return Object(a.f)()}l.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},837:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var r=n(244),a=n(85),o=n(864);function i(t){return(i="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})(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=y(t);if(e){var a=y(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return f(this,n)}}function f(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(f,t);var e,n,r,i=s(f);function f(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.a.Newest,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.a.OwnedByMe;return c(this,f),(t=i.call(this,{collectionPrefix:"user:playlists",cursor:n,sort:e})).type=r,t}return e=f,(n=[{key:"toString",value:function(){return[this.collectionPrefix,this.sort,this.cursor,this.type].filter(Boolean).join(":")}}])&&l(e.prototype,n),r&&l(e,r),f}(r.a)},841:function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(825),a={getCustomFormControlClassName:function(t,e,n,a){var o="form-control";return Object(r.e)(e,n)&&Object(r.e)(t,n)&&(o+=" is-invalid"),a&&(o+=" ".concat(a)),o}}},850:function(t,e,n){"use strict";var r=n(0),a=n(825),o=n(33),i=n(35),c=n(841);function l(t){var e=Object(a.f)().values[t.fieldName];return"string"!=typeof e?r.createElement(r.Fragment,null):r.createElement("div",{className:"float-right text-muted"},e.length,"/",t.limit)}var u=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(t);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]])}return n};function s(t){var e=t.label,n=u(t,["label"]);return r.createElement(o.Form.Group,null,r.createElement("div",{className:"custom-control custom-checkbox"},r.createElement(y,Object.assign({className:"custom-control-input"},n)),r.createElement(o.Form.Label,{className:"custom-control-label",htmlFor:n.id},e)))}n.d(e,"a",(function(){return y})),n.d(e,"b",(function(){return d}));var f=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(t);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]])}return n};function y(t){var e=t.children,n=f(t,["children"]);return r.createElement(a.b,Object.assign({},n),i.a.isFunction(e)?function(t){return e(t)}:r.Children.count(e)?e:null)}function d(t){var e=t.label,n=t.className,i=t.showCharacterCounter,u=f(t,["label","className","showCharacterCounter"]),d=Object(a.f)(),p=d.errors,m=d.touched;return"checkbox"===u.type?r.createElement(s,Object.assign({},t)):r.createElement(o.Form.Group,null,!!e&&r.createElement(o.Form.Label,{htmlFor:u.id},e),r.createElement(y,Object.assign({className:c.a.getCustomFormControlClassName(p,m,u.name,n)},u)),!!i&&!!u.maxLength&&r.createElement(l,{fieldName:u.name,limit:u.maxLength}),r.createElement(a.a,{name:u.name},(function(t){return r.createElement(o.Form.Control.Feedback,{type:"invalid"},t)})))}},851:function(t,e,n){"use strict";var r=n(0),a=n(825);function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=t[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!e||n.length!==e);r=!0);}catch(t){a=!0,o=t}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(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 i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var c=n(246),l=n(73);n.d(e,"a",(function(){return u}));function u(t){var e=Object(a.f)(),n=function(t){var e,n=o(r.useState(!1),2),a=n[0],i=n[1];return r.useEffect((function(){var e;t.isValid&&(t.dirty||(null===(e=t.initialStatus)||void 0===e?void 0:e.allowInitialSubmit))?i(!0):i(!1)}),[t.isValid,null===(e=t.initialStatus)||void 0===e?void 0:e.allowInitialSubmit,t.dirty,t.values]),r.useEffect((function(){t.isSubmitting&&i(!1)}),[t.isSubmitting]),a}(e);r.useEffect((function(){function t(t){13===t.keyCode&&n&&e.validateForm().then((function(t){Object.keys(t).length||e.submitForm()}))}return window.addEventListener("keypress",t),function(){return window.removeEventListener("keypress",t)}}),[n]);var i="save";return t.isNew&&(i="create"),t.hasNext&&(i="next"),r.createElement(c.a,{variant:t.variant||"primary",showSpinner:e.isSubmitting,type:"submit",disabled:!n},t.submitText?r.createElement(r.Fragment,null,t.submitText):r.createElement(l.b,{namespace:"shared.formButtons",phrase:i}))}},860:function(t,e,n){"use strict";var r=n(21),a=n(46),o=n(863);n(837);function i(t){return(i="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})(t)}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){return(l=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=f(t);if(e){var a=f(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var y,d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&l(t,e)}(n,t);var e=u(n);function n(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return c(this,n),e.call(this,{collectionPrefix:"playlist:videos",id:t,cursor:r})}return n}(n(244).a);!function(t){t[t.Queued=1]="Queued",t[t.Processing=2]="Processing",t[t.Processed=3]="Processed",t[t.Errored=4]="Errored"}(y||(y={}));var p=function(t,e){return function(n){var r=Object.assign({},n);return r.hasOwnProperty(t)&&(r[t]=Object.assign(Object.assign({},r[t]),e)),r}},m=function(t){return function(e){var n=Object.assign({},e);return n.hasOwnProperty(t)&&delete n[t],n}},b=function(t,e){return function(n){var r=Object.assign({},n);return r.hasOwnProperty(t)?(r[t].videos||(r[t].videos={}),r[t].videos.count=r[t].videos.count?r[t].videos.count+e:e,r):n}};n.d(e,"a",(function(){return O}));var v=function(t){return t?"&cursor=".concat(t):""},h=function(t){return Number.isInteger(t)?"&maxRatingValue=".concat(t):""},g=function(t,e){return"".concat(t).concat(e?":".concat(e):"")},O={getPlaylist:function(t,e,n){return{url:"/api/domain/v2/objects/".concat(t,"?query=").concat(a.a.PLAYLIST),key:"playlist:".concat(t),success:e,error:n}},getSharedPlaylist:function(t,e,n,r){var o="/api/domain/v2/share/".concat(t);return{url:"".concat(o,"?query=").concat(a.a.PLAYLIST).concat(h(e)),key:"shared:playlist:".concat(t),success:n,error:r}},getUserPlaylists:function(t){var e=t.sort,n=t.type;return{url:"/api/domain/v2/me/playlists/".concat(n,"?sort=").concat(e,"&query={limit:100}")+"".concat(a.a.PLAYLIST_COLLECTION).concat(v(t.cursor)),key:t.toString(),formatData:function(t){return Object.assign(Object.assign({},t),{data:t.data.map((function(t){return t.owner?Object.assign(Object.assign({},t),{owner:Object.assign(Object.assign({},t.owner),{avatar:t.owner.avatar.url})}):t}))})}}},getPlaylistVideos:function(t,e,n){var r="orderBy:orderindex,limit:100";return Number.isInteger(e)&&(r+=",rating.value:0...".concat(e)),{url:"/api/domain/v2/objects/".concat(t,"/videos?query={").concat(r,"}")+"".concat(a.a.VIDEO_COLLECTION).concat(v(n)),key:g("playlist:".concat(t,":videos"),n)}},getSharedPlaylistVideos:function(t,e,n){return{url:"/api/domain/v2/share/".concat(t,"/videos?query={orderBy:orderindex,limit:100}")+"".concat(a.a.SHARED_PLAYLIST_VIDEO_COLLECTION)+"".concat(v(n)).concat(h(e)),key:g("shared:playlist:".concat(t,":videos"),n)}},getVideoPlaylists:function(t,e,n){return{url:"/api/domain/v2/objects/".concat(t,"/playlists?query={limit:100,owner.id:[").concat(e,"]}"),key:g("video:playlists:".concat(t),n)}},createPlaylist:function(t,e,n,a){return{key:"create:playlist",url:"/api/domain/v2/objects/".concat(t,"/playlists"),data:e,type:r.a.POST,success:n,error:a,invalidationKeys:"user:playlists"}},updatePlaylist:function(t,e,n,a){return{key:"update:playlist",url:"/api/domain/v2/objects/".concat(t),data:e,type:r.a.PUT,success:n,error:a,updateState:{keys:"playlist:".concat(t),updateData:p("playlist:".concat(t),e)}}},deletePlaylist:function(t,e,n){return{key:"delete:playlist",url:"/api/domain/v2/objects/".concat(t),type:r.a.DELETE,success:e,error:n,invalidationKeys:"user:playlists",updateState:{keys:"playlist:".concat(t),updateData:m("playlist:".concat(t))}}},addToPlaylist:function(t,e,n,a){var o=["user:playlists",new d(t).toString()];return e.forEach((function(t){o.push("video:playlists:".concat(t))})),{key:"add:to:playlist",url:"/api/domain/v2/objects/".concat(t,"/associate"),data:e,type:r.a.POST,success:n,error:a,invalidationKeys:o,updateState:{keys:"playlist:".concat(t),updateData:b("playlist:".concat(t),e.length)}}},reorderVideos:function(t,e,n,a){return{key:"reorder:playlist",url:"/api/domain/v2/objects/".concat(t,"/videos/reorder"),data:e,type:r.a.PUT,success:n,error:a,invalidationKeys:"user:playlists",updateState:{keys:"playlist:".concat(t,":videos"),updateData:function(n){return o.a.updateState("playlist:".concat(t,":videos"),e,n)}}}},removePlaylistVideo:function(t,e,n,a){return{key:"remove:playlist:video",url:"/api/domain/v2/objects/".concat(t,"/dissociate?memberId=").concat(e),type:r.a.DELETE,success:n,error:a,invalidationKeys:["user:playlists","playlist:".concat(t,":videos")]}},getIsFollowingPlaylist:function(t,e){return{url:"/api/domain/v2/objects/".concat(e,"/followedPlaylists?query={id:").concat(t,"}"),key:"playlist:".concat(t,":following:").concat(e),formatData:function(e){var n,r;return{objectId:t,isFollowing:!!(null===(r=null===(n=e)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length)}},normalize:!1}},followPlaylist:function(t,e,n,a,o){return{url:"/api/domain/v2/objects/".concat(e),key:"follow:playlist:".concat(t),data:{followedPlaylists:t},type:r.a.PUT,invalidationKeys:["user:playlists","playlist:".concat(t,":following:").concat(e)],success:n,error:a,always:o}},unfollowPlaylist:function(t,e,n,a,o){return{url:"/api/domain/v2/objects/".concat(e,"/followedplaylists/").concat(t),key:"unfollow:playlist:".concat(t),type:r.a.DELETE,invalidationKeys:["user:playlists","playlist:".concat(t,":following:").concat(e)],success:n,error:a,always:o}},getPlaylistPrivacy:function(t){return{key:"playlist:privacy:".concat(t),url:"/api/domain/v1/playlists/".concat(t,"/privacy"),formatData:function(e){return{id:t,privacy:e}}}},updatePlaylistPrivacy:function(t,e,n,a,o){return{key:"update:playlist:privacy:".concat(t),url:"/api/domain/v1/playlists/".concat(t,"/privacy"),type:r.a.PUT,data:{privacy:e},formatData:function(){return{id:t,privacy:e}},success:n,error:a,always:o}},getMigrationTask:function(t,e){return{url:"/api/playlist-app/migration-task",key:"migration:task",formatData:function(t){return t||{status:y.Processed}},success:t,error:e}}}},863:function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(127),a=n(57);function o(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var c={reorder:function(t,e,n){if(e===n)return{reorderedItems:t,reorderRequest:null};var a=r.a.moveItem(t,e,n),o=n<t.length-1?a[n+1].id:null;return{reorderedItems:a,reorderRequest:{sourceMemberId:a[n].id,destinationMemberId:o}}},updateState:function(t,e,n){for(var i=[],c=a.a.deepClone(n),l=[t],u=n[t],s=!!u&&!!u.data&&u.data.length;u&&Array.isArray(u.data);){i.push.apply(i,o(u.data));var f=u.pagination&&u.pagination.cursors&&u.pagination.cursors.next,y=!!f&&"".concat(t,":").concat(f);(u=f&&n[y])&&l.push(y)}if(!i.length)return n;var d=r.a.findIndex(i,(function(t){return t.id===e.sourceMemberId})),p=[].concat(i),m=p.splice(d,1),b=e.destinationMemberId?r.a.findIndex(p,(function(t){return t.id===e.destinationMemberId})):p.length;return p.splice(b,0,m[0]),l.forEach((function(t){var e=p.splice(0,s);c[t].data=e})),c}}},864:function(t,e,n){"use strict";var r;n.d(e,"a",(function(){return r})),function(t){t.OwnedByMe="owned_by_me",t.Followed="followed",t.All="all"}(r||(r={}))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp_clickview_lite=window.webpackJsonp_clickview_lite||[]).push([[8],{1318:function(t,e,r){"use strict";r.r(e);var n=r(0),o=r(61),a=r(14),i=r(89),c=r(154),u=r(830),s=(r(21),function(t){return{url:"/api/domain/v1/themes/".concat(t),key:"themes:".concat(t)}}),d=r(237),v=r(40),l=r(3),f=r(823),y=r(7),m=r(239),p=r(1074),b=r(92),h=r(349),g=r(350),j=r(994),w=r(849);function O(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var i,c=t[Symbol.iterator]();!(n=(i=c.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{n||null==c.return||c.return()}finally{if(o)throw a}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return A(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A(t,e)}(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 A(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}r.d(e,"PlayView",(function(){return E}));var F={notFound:h.a,forbidden:{privacy:g.a}};function E(t){var e,r,h,g=Object(o.useDispatch)(),A=Object(f.a)(),E=O(Object(i.a)(b.a.WEB_PLAYER_DATA),2),I=E[0],k=E[1],P=a.a.useBasicFetch(m.a.video(t.id)),T=a.a.useBasicFetch(c.a.currentUser()),S=a.a.useBasicFetch((null===(r=null===(e=P.data)||void 0===e?void 0:e.glance)||void 0===r?void 0:r.theme)?s(P.data.glance.theme):null);return Object(d.a)(null===(h=P.data)||void 0===h?void 0:h.name),Object(j.a)(P,F,T.data),Object(w.a)([P.data]),n.useEffect((function(){var e;if(P.data){k("video",P.data);var r=(null===(e=I.video)||void 0===e?void 0:e.id)!==P.data.id,n=Number.isInteger(t.startTime)&&t.startTime!==I.startTime;(r||n)&&k("startTime",t.startTime||0)}}),[!!P.data,t.startTime]),P.data&&T.data?n.createElement("div",{className:"px-3"},n.createElement(p.a,{video:P.data,glanceTheme:S.data,setFavourite:function(t,e,r){a.a.fetch(g,u.a.updateIsVideoFavourited(t.id,T.data.id,e,(function(){v.a.logUserAction({id:t.id},{entity:l.d.Video,actionType:l.n.Favourite,descriptor:e?l.m.On:l.m.Off,location:l.j.PlayPage,workflowPhase:l.o.Complete}),A.success(y.a.getPhrase("shared.play",e?"favourited":"unfavourited",{video:t.name}))}),r))}})):n.createElement(n.Fragment,null)}},830:function(t,e,r){"use strict";r.d(e,"a",(function(){return u}));var n=r(21),o=r(46),a=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r};function i(t,e,r,o){return{url:"/api/domain/v2/objects/".concat(e),key:"favourite:video:".concat(e,":").concat(t),data:{favouriteVideos:t},type:n.a.PUT,invalidationKeys:["favourite:videos:".concat(e),"video:is:favourited:".concat(e)],success:r,error:o}}function c(t,e,r,o){return{url:"/api/domain/v2/objects/".concat(e,"/favouriteVideos/").concat(t),key:"favourite:video:".concat(e,":").concat(t),type:n.a.DELETE,invalidationKeys:["favourite:videos:".concat(e),"video:is:favourited:".concat(e)],success:r,error:o}}var u={favouriteVideos:function(t,e){var r="".concat(o.a.VIDEO_COLLECTION).concat(function(t){return t?"&cursor=".concat(t):""}(e));return{url:"/api/domain/v2/objects/".concat(t,"/favouriteVideos?query=").concat(r),key:"favourite:videos:".concat(t).concat(e?":".concat(e):"")}},updateIsVideoFavourited:function(t,e,r,n,o){return(r?i:c)(t,e,n,o)},isFavourited:function(t,e){var r=e.slice().sort(),n=r.map((function(t){return"id=".concat(t)}));if(n.length)return{url:"/api/domain/v2/objects?query=favouritedBy{id:".concat(t,"}&").concat(n.join("&")),key:"video:is:favourited:".concat(t,":by:id:").concat(r.join(",")),formatData:function(t){var e;if(!(null===(e=t)||void 0===e?void 0:e.length))return t;return t.map((function(t){var e,r,n=t.favouritedBy,o=a(t,["favouritedBy"]);return Object.assign(Object.assign({},o),{isFavourited:!!(null===(r=null===(e=n)||void 0===e?void 0:e.data)||void 0===r?void 0:r.length)})}))}}}}},842:function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n={userVideoHistory:function(t,e,r,n,o,a){var i="video:history:".concat(t,":").concat(e),c="/api/videoviews/v1/customers/".concat(t,"/users/").concat(e,"/videos/history");return r&&(i+=":".concat(r),c+="?cursor=".concat(r)),{key:i,url:c,success:n,error:o,always:a}},videoHistory:function(t,e,r,n,o,a){var i=r.sort().map((function(t){return"videoId=".concat(t)}));return{key:"video:history:".concat(t,":").concat(e,":videos:").concat(i.join("&")),url:"/api/videoviews/v1/customers/".concat(t,"/users/").concat(e,"/videos/history?").concat(i.join("&")),formatData:function(t){var e;return(null===(e=t)||void 0===e?void 0:e.length)?t.map((function(t){return{id:t.videoId,lastProgressPoint:t.lastProgressPoint}})):t},success:n,error:o,always:a}}}},849:function(t,e,r){"use strict";r.d(e,"a",(function(){return l}));var n=r(14),o=r(154),a=r(830),i=r(239),c=r(842);function u(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(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 d={ratings:!0,favourites:!0,watchHistory:!0};function v(t,e){var r,o=n.a.useGetResponse(null===(r=e)||void 0===r?void 0:r.key),a=n.a.useGetFetch(e);t&&e&&o.shouldFetch&&a()}function l(t){var e,r,s,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f=Object.assign(Object.assign({},d),l),y=f.ratings,m=f.favourites,p=f.watchHistory,b=n.a.useBasicFetch(o.a.currentUser()),h=t&&(Array.isArray(t)?t.filter(Boolean).map((function(t){return t.id})):t.data.filter(Boolean).map((function(t){return t.id}))),g=b.data,j=[];y&&(j=[].concat(u(j),[!!(null===(e=h)||void 0===e?void 0:e.length)&&i.a.videoRatings(h)])),m&&(j=[].concat(u(j),[!!(null===(r=h)||void 0===r?void 0:r.length)&&g&&a.a.isFavourited(g.id,h)])),p&&(j=[].concat(u(j),[!!(null===(s=h)||void 0===s?void 0:s.length)&&g&&c.a.videoHistory(g.customerId,g.id,h)])),j.forEach((function(e){return v(!!t,e)}))}},994:function(t,e,r){"use strict";r.d(e,"a",(function(){return d}));var n=r(2),o=r(160),a=r(116),i=r(253),c=r(254),u=r(255),s={notFound:a.a,forbidden:{rating:c.a,yearLevel:c.a,region:u.a,privacy:c.a},badRequest:i.a};function d(t,e,r){var a=Object.assign(Object.assign({},s),e);t.statusCode&&t.statusCode!==o.a.Ok&&(t.statusCode!==o.a.NotFound?t.statusCode!==o.a.Forbidden?n.a.ErrorHelper.throw(new a.badRequest):n.a.ErrorHelper.throw(new a.forbidden.privacy):n.a.ErrorHelper.throw(new a.notFound))}}}]);
|