@clickview/lite 0.24.0-rc.0 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundles.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "appBundle": "bundle-00609742f5.min.js",
2
+ "appBundle": "bundle-965eda2279.min.js",
3
3
  "cssBundle": "lite-app-1a072a1fa7.css",
4
4
  "polyfillBundle": "polyfills-7acbc0c997.min.js"
5
5
  }
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[1160],{91200:(e,t,n)=>{n.d(t,{Y:()=>o});var a=n(1024),r=n(99910),i=n(84231);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function o(e){var t,n=function(e){if(Array.isArray(e))return l(e)}(t=Array(e.numItems))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(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.")}(),o=e.itemClassName||"";return a.createElement(a.Fragment,null,e.showHeading&&a.createElement("div",{className:"".concat(i.Z.partialHeading," mb-1 partial-loading-background")}),a.createElement(r.Row,{noGutters:!0,className:"mx-n1 mb-n2"},n.map((function(e,t){return a.createElement(r.Col,{key:t,xs:6,sm:4,lg:3,className:"".concat(o," px-1 pb-2")},a.createElement("div",{className:"".concat(i.Z.playlistItem," partial-loading-background rounded-lg")}))}))))}o.defaultProps={numItems:8}},48745:(e,t,n)=>{n.d(t,{t:()=>j});var a=n(1024),r=n.n(a),i=n(82602),l=n(110),o=n(23481),c=n(67453),s=n(54610),u=n(8493),d=n(78276),m=n(5465),v=n(40955),p=n(20789),f=n(55452),y=n(89725);function g(e){var t,n,r,i=e.playlist._liteOwner;if(null===(t=e.playlist._isClickViewPlaylist)||void 0===t?void 0:t.value)return a.createElement(y.F,null);if(!(null==i?void 0:i.id)||!(null===(n=e.currentUser)||void 0===n?void 0:n.id))return a.createElement(a.Fragment,null);if(i.id.toString()===e.currentUser.id.toString())return a.createElement(a.Fragment,null);var l="string"==typeof i.avatar?i.avatar:null===(r=i.avatar)||void 0===r?void 0:r.url;return a.createElement(p.q,{imageUrl:l,imageCdnUrl:e.imageCdnUrl,initials:f.l.getInitials(i.name,i.surname)})}var h=n(80143),b=n(83345);const E={fontSmall:"OYBRp"};var w="playlists.playlistCount";function C(e){var t=function(e){var t,n,a,r,i,l;return!!e&&(null!==(n=null===(t=e.videos)||void 0===t?void 0:t.count)&&void 0!==n?n:0)+(null!==(r=null===(a=e.interactives)||void 0===a?void 0:a.count)&&void 0!==r?r:0)+(null!==(l=null===(i=e.clips)||void 0===i?void 0:i.count)&&void 0!==l?l:0)}(e.playlist);return!1===t||Number.isNaN(t)?r().createElement(r().Fragment,null):r().createElement("span",{className:E.fontSmall},r().createElement(b.x,{namespace:w,phrase:"count",options:{smartCount:t}}))}var A=n(9085),S=n(65858),N=n(84231),O="playlists.playlistList";function j(e){var t,n,r=c.j.createUrl(e.data.cover&&e.data.cover.url,{size:s.h2.Medium,resizeType:s.Nq.Cover}),p=e.data.subjectPresentationAudiences&&e.data.subjectPresentationAudiences.data,f=(0,h.n)(p,e.presentationAudiences),y=N.Z.playlistItem,b=!!r||!!e.showFallbackImage;b&&(y+=" ".concat(N.Z.playlistItemGradient)),!b&&e.bgColourClassNames&&(y+=" ".concat(N.Z.playlistItem," ").concat((0,A.x)(e.data.name,e.bgColourClassNames))),"round"===e.itemStyle&&(y+=" rounded-lg overflow-hidden"),"round-left"===e.itemStyle&&(y+=" rounded-left-lg overflow-hidden");var E=Object.assign(Object.assign({},e.analyticsData),{id:null===(t=e.data)||void 0===t?void 0:t.id,name:null===(n=e.data)||void 0===n?void 0:n.name}),w=Object.assign(Object.assign({},e.analyticsOptions),{entity:S.EntityType.Playlist});return a.createElement(u.F,{appLink:e.appLink,analyticsData:E,analyticsOptions:w,title:function(){var t;return!e.data.contentModifiedDate||(null===(t=e.data._isClickViewPlaylist)||void 0===t?void 0:t.value)?"":o.T.getPhrase(O,"lastUpdated",{timeago:(0,i.WU)(l.O.convertUTCToLocal(e.data.contentModifiedDate))})}()},a.createElement(d.Z,{data:r,className:y},!!e.showFallbackImage&&a.createElement(m.oy,{type:m.mS.Playlist}),a.createElement("div",{className:"text-white ".concat(N.Z.playlistMetadata)},!!e.showCount&&a.createElement(C,{playlist:e.data}),a.createElement("h5",{className:"mb-0 ".concat(e.titleClassName||"")},a.createElement("span",{className:"clamp-2"},e.data.name)),!!p&&!!p.length&&!!f&&a.createElement(v.P,{className:"".concat(e.audienceLabelClass?e.audienceLabelClass:""," mt-1"),audience:f,border:"white"})),!!e.showOwner&&!!e.imageCdnUrl&&a.createElement("div",{className:N.Z.ownerAvatarContainer},a.createElement(g,{playlist:e.data,currentUser:e.currentUser,imageCdnUrl:e.imageCdnUrl}))))}j.defaultProps={itemStyle:"square"}},31273:(e,t,n)=>{n.d(t,{P:()=>c});var a=n(1024),r=n(99910),i=n(65858),l=n(48745),o={actionType:i.UserAction.Click,entity:i.EntityType.Playlist,location:i.LocationContext.PlaylistListItem,descriptor:i.ClickDescriptor.Cover};function c(e){return a.createElement(r.Row,{noGutters:!0,className:"mx-n1"},e.playlists.map((function(t){return a.createElement(r.Col,{key:t.id,xs:6,sm:4,lg:3,className:"mb-2 px-1 ".concat(e.itemContainerClassName?e.itemContainerClassName:"")},a.createElement(l.t,{data:t,appLink:e.getPlaylistAppLink(t),imageCdnUrl:e.imageCdnUrl,currentUser:e.currentUser,presentationAudiences:e.presentationAudiences,bgColourClassNames:e.bgColourClassNames,showCount:e.showCount,showOwner:e.showOwner,showFallbackImage:e.showFallbackImage,titleClassName:e.itemTitleClassName,itemStyle:e.itemStyle,analyticsData:e.analyticsData,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),o)}))})))}},98981:(e,t,n)=>{n.d(t,{YA:()=>a.Y,tN:()=>r.t});var a=n(91200),r=(n(31273),n(48745))},3626:(e,t,n)=>{n.d(t,{J:()=>C});var a=n(1024),r=n.n(a),i=n(99910),l=n(58564),o=n(96022),c=n(17464),s=n(76246),u=n(40955),d=n(68626),m=n(54610),v=n(65858),p=n(49985),f=n(80143),y=n(85784),g=n(11025),h=n(47325),b=n(90927),E=n(70872);const w={partialHeroThumbnail:"z0_Sm",partialSeriesText:"xuWtC",partialVideoTitleText:"fXYdC",partialBadge:"FlUpr",partialDescription:"YgWxP",partialSubject:"QBKwQ",partialHeading:"S__E9",guidance:"Ax9h2",description:"zejMP",details:"MRyVe"};function C(e){var t,n=e.video,a=e.presentationAudiences,C=e.videoAppLink,A=e.seriesAppLink,S=e.hideInteractiveBadge,N=null===(t=null==n?void 0:n.subjectPresentationAudiences)||void 0===t?void 0:t.data,O=(0,f.n)(N,a),j=(null==n?void 0:n.series)&&!!(null==n?void 0:n.series.id),x=p.k.mergeOptions(e.analyticsOptions,{location:v.LocationContext.ClassificationHero,entity:g.M.getAnalyticsEntity(n)});return n?r().createElement(i.Row,null,r().createElement(i.Col,{xs:12,md:6},r().createElement(l.u,{analyticsData:e.analyticsData,analyticsOptions:x,video:n,appLink:C,seriesAppLink:j?A:null,imageOptions:{size:m.h2.Medium},textPosition:d.z.Independent,type:"static",setFavourite:e.setFavourite,canFavourite:e.canFavourite,audience:"thumbnail"===e.badgePosition?O:null,newDurationStyle:e.newDurationStyle,hideRating:"thumbnail"!==e.badgePosition||!!O})),r().createElement(i.Col,{xs:12,md:6,className:"".concat(w.details," position-relative")},r().createElement(y.Q,{analyticsData:e.analyticsData,analyticsOptions:x,video:n}),j&&r().createElement(o.M,{analyticsData:e.analyticsData,analyticsOptions:x,video:n,appLink:A,className:"text-reset"}),r().createElement(E.u,{video:n,analyticsData:e.analyticsData,analyticsOptions:x,appLink:C,linkClassName:"d-inline-block",textClassName:"h4",yearGroups:e.yearGroups}),"info-panel"===e.badgePosition&&r().createElement(c.c,{className:"pb-1"},!S&&r().createElement(s.C,{type:s.g.Interactive,data:n.interactives}),r().createElement(s.C,{type:s.g.Rating,data:n.rating}),r().createElement(s.C,{type:s.g.ProductionYear,data:n.productionYear})),r().createElement("p",{className:"mb-1"},r().createElement("span",{className:w.description},n.description)),"info-panel"===e.badgePosition&&r().createElement(u.P,{audience:O,className:"mt-1",border:"dark"}),e.showVideoGuidance&&r().createElement("div",{className:"d-flex ".concat(w.guidance)},r().createElement(b.N,{video:n}),r().createElement(h.I,{video:n,imageCdnUrl:e.imageCdnUrl})))):r().createElement(r().Fragment,null)}C.defaultProps={newDurationStyle:!0,badgePosition:"thumbnail"}},34004:(e,t,n)=>{n.d(t,{r:()=>p});var a=n(1024),r=n.n(a),i=n(49439),l=n(78276),o=n(5465),c=n(40955),s=n(76246),u=n(54610),d=n(80143);const m={labelContainer:"ieonz",hoverActive:"vqHCl",mask:"qEOPN",hoverTitle:"byN4t",hoverDescription:"OW8x1"};function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function p(e){var t,n,a=(t=(0,i.L)({className:m.hoverActive}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,l,o=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(o.push(a.value),o.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw r}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=a[0],f=a[1],y=e.series&&e.series.subjectPresentationAudiences&&e.series.subjectPresentationAudiences.data||[],g=(0,d.n)(y,e.presentationAudiences),h=!!(y&&y.length&&g);return r().createElement("div",{ref:p},f&&r().createElement("div",{className:"py-3 text-white text-center mb-3 ".concat(m.mask)},r().createElement("h3",{className:"font-weight-500 ".concat(m.hoverTitle)},r().createElement("span",{className:"clamp-3"},e.series.name)),!!e.series.description&&r().createElement("p",{className:"".concat(m.hoverDescription," mb-0")},e.series.description)),r().createElement(l.Z,{data:e.series.tallPoster,imageType:u.__.TallPosters,preload:e.preloadImage,imageOptions:{size:u.h2.Large},imageClassName:e.imageClass?e.imageClass:"rounded-lg"},r().createElement(o.oy,{type:o.mS.Series}),r().createElement("div",{className:"position-absolute text-white ".concat(m.labelContainer)},h?r().createElement(c.P,{audience:g,border:"white"}):r().createElement(s.C,{type:s.g.Rating,data:e.series.rating}))))}},87648:(e,t,n)=>{n.d(t,{$:()=>l});var a=n(1024),r=n.n(a);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var l=function(e){var t,n,a=(t=r().useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,l,o=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(o.push(a.value),o.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw r}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=a[0],o=a[1];return r().useEffect((function(){o(!!e)}),[e]),{active:l,setActive:o}}},47721:(e,t,n)=>{n.d(t,{j:()=>m});var a=n(1024),r=n.n(a),i=n(54976),l=n.n(i),o=n(83914);const c={container:"h9Cyj",header:"kiea4",icon:"C3rvx"};function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var u=285,d=u-70;function m(e){var t,n,a=(t=r().useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,l,o=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(o.push(a.value),o.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw r}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=a[0],m=a[1];return r().createElement("div",{className:"".concat(c.container," bg-white rounded-lg box-shadow overflow-hidden"),style:{maxHeight:"".concat(u,"px")}},r().createElement("div",null,r().createElement("div",{className:"".concat(c.header," d-flex align-items-center px-3 py-2 ").concat(i?"box-shadow":"")},r().createElement("div",{className:"".concat(c.icon," bg-").concat(e.iconVariant," text-white rounded-circle")},r().createElement(o.x,{svgName:e.svgName,size:o.S.Large})),r().createElement("h2",{className:"h6 mb-0 pl-2"},e.heading)),r().createElement(l(),{onUpdate:function(e){var t=e.top;i&&0===t?m(!1):!i&&t>0&&m(!0)},autoHeight:!0,autoHeightMax:d},r().createElement("div",{className:"pb-3 px-3"},e.children))))}},956:(e,t,n)=>{n.d(t,{C:()=>s});var a=n(1024),r=n.n(a),i=n(30314),l=n(49439);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var c=10,s=r().forwardRef((function(e,t){var n,a,s,u,d=r().useRef(),m=document.body.getBoundingClientRect(),v=null===(n=t.current)||void 0===n?void 0:n.getBoundingClientRect(),p=null===(a=d.current)||void 0===a?void 0:a.getBoundingClientRect(),f=(s=(0,l.X)(),u=2,function(e){if(Array.isArray(e))return e}(s)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,l,o=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(o.push(a.value),o.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw r}}return o}}(s,u)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(s,u)||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.")}()),y=f[0],g=f[1];if(r().useEffect((function(){e.setActive(g)}),[g]),!t.current)return r().createElement(r().Fragment,null);var h=e.childComponent,b=(e.show||g)&&!!d.current;return(0,i.createPortal)(r().createElement("div",{ref:y,className:"gZ3Ae",style:function(){if(!b||!p)return{};var e=(null==p?void 0:p.height)+20,t=v.left-m.left-(240-v.width/2),n=m.right-p.width;t>n&&(t-=t-n+c),t<c&&(t+=Math.abs(t)+c);var a=v.top-m.top-p.height-20;return a<window.scrollY+c&&a+v.height+e+e<window.scrollY+window.innerHeight-c&&(a+=v.height+e),{left:t,top:a,height:e,padding:"".concat(c,"px 0"),visibility:"visible"}}()},r().createElement(h,Object.assign({ref:d,isShowing:b},e.childProps))),document.body)}))},47325:(e,t,n)=>{n.d(t,{I:()=>g});var a=n(1024),r=n.n(a),i=n(49439),l=n(11025),o=n(6296),c=n(23481),s=n(58130),u=n(47721),d=n(75931),m=c.T.encloseNamespace("shared.whatsIncluded"),v=r().forwardRef((function(e,t){return r().createElement("div",{ref:t},r().createElement(u.j,{iconVariant:"blue",heading:m("whatsIncluded"),svgName:s.vn.Video},r().createElement(d.V,{video:e.video,imageCdnUrl:e.imageCdnUrl,isShowing:e.isShowing})))})),p=n(956),f=n(87648);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function g(e){var t,n,a=(t=(0,i.L)({delay:50}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,l,o=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(o.push(a.value),o.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw r}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=a[0],s=a[1],u=(0,f.$)(s),d=u.active,m=u.setActive;return r().useMemo((function(){return l.M.showWhatsIncluded(e.video)}),[e.video])?r().createElement(r().Fragment,null,r().createElement(o.V,{ref:c,active:d,setActive:m}),r().createElement(p.C,{childComponent:v,childProps:{video:e.video,imageCdnUrl:e.imageCdnUrl},show:d,ref:c,setActive:m})):r().createElement(r().Fragment,null)}},90927:(e,t,n)=>{n.d(t,{N:()=>g});var a=n(1024),r=n.n(a),i=n(49439),l=n(16226),o=n(23481),c=n(58130),s=n(47721),u=n(38803),d=o.T.encloseNamespace("shared.whyThisVideo"),m=r().forwardRef((function(e,t){return r().createElement("div",{ref:t},r().createElement(s.j,{iconVariant:"navy",heading:d("whyThisVideo"),svgName:c.vn.StarOutline},r().createElement(u.p,{video:e.video})))})),v=n(956),p=n(11025),f=n(87648);function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function g(e){var t,n,a=(t=(0,i.L)({delay:50}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,l,o=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(o.push(a.value),o.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(l=n.return(),Object(l)!==l))return}finally{if(s)throw r}}return o}}(t,n)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=a[0],c=a[1],s=(0,f.$)(c),u=s.active,d=s.setActive;return r().useMemo((function(){return p.M.showWhyThisVideo(e.video)}),[e.video])?r().createElement(r().Fragment,null,r().createElement(l.A,{ref:o,active:u,setActive:d}),r().createElement(v.C,{childComponent:m,childProps:{video:e.video},show:u,ref:o,setActive:d})):r().createElement(r().Fragment,null)}},91028:(e,t,n)=>{n.d(t,{V:()=>y});var a=n(1024),r=n(52641),i=n(67453),l=n(54610),o=n(8493),c=n(5465),s=n(83345),u=n(2284),d=n(65858),m=n(17836),v=function(e){var t=e.name,n=e.multiline,r="".concat(m.Z.comingSoonPanel," \n d-flex flex-column align-items-center justify-content-center px-3 text-center"),i="";return n?i+=" ".concat(m.Z.clamped," clamp-2"):(r+=" text-nowrap",i+=" text-truncate"),a.createElement("div",{className:r},a.createElement("small",{className:"text-muted"},a.createElement(s.x,{namespace:"shared.subjectWidgetItem",phrase:"comingSoon"})),a.createElement("p",{className:"".concat(m.Z.name," h6")},a.createElement("span",{className:i},t)))},p=function(e){var t=e.name,n=e.multiline,r=e.subtitle,i="px-3 text-center d-flex flex-column justify-content-center",l="".concat(m.Z.name," h6");return n?l+=" clamp-2 text-left":(i+=" text-nowrap text-truncate",l+=" text-truncate mb-0 pb-1"),a.createElement("div",{className:i},r&&a.createElement("div",{className:"text-secondary clamp-1 ".concat(m.Z.text)},r),a.createElement("div",{className:l,title:n?"":t},t))};function f(e){var t,n,o,s=(null===(t=e.data)||void 0===t?void 0:t.status)===u.W.ComingSoon,d=i.j.createUrl(null===(n=e.data.cover)||void 0===n?void 0:n.url,{size:e.isLarge?l.h2.Medium:l.h2.Small}),f=function(e,t){var n;if((null==t?void 0:t.length)>=r._.MULTI_PRESENTATION_THRESHOLD)return null===(n=null==t?void 0:t.find((function(t){return t.id===e})))||void 0===n?void 0:n.name}(null==e?void 0:e.data.presentationId,null==e?void 0:e.availablePresentations),y={name:e.data.name,multiline:e.isLarge||e.multiline,subtitle:(null===(o=e.getSubtitle)||void 0===o?void 0:o.call(e,e.data))||f};return a.createElement("div",{className:"border d-flex position-relative ".concat(m.Z.widgetItem),id:e.data.id},a.createElement("div",{className:"".concat(m.Z.imagePanel," ").concat(e.isLarge?m.Z.large:"")},a.createElement("div",{className:m.Z.image,style:d?{backgroundImage:"url('".concat(d,"')")}:{}}),a.createElement(c.oy,{type:c.mS.Subject,extraClasses:e.isLarge?m.Z.large:""})),s?a.createElement(v,Object.assign({},y)):a.createElement(p,Object.assign({},y)))}var y=a.memo((function(e){var t,n,r,i,l,c=e.getChildAppLink?e.getChildAppLink(e.data):null,s=(null===(t=e.data)||void 0===t?void 0:t.status)===u.W.ComingSoon,v=Object.assign(Object.assign({},e.analyticsData),{id:null===(n=e.data)||void 0===n?void 0:n.id,name:null===(r=e.data)||void 0===r?void 0:r.name,presentationId:null===(i=e.data)||void 0===i?void 0:i.presentationId,comingSoon:!!s}),p=Object.assign(Object.assign({location:d.LocationContext.ClassificationListItem},e.analyticsOptions),{actionType:d.UserAction.Click,entity:d.EntityType.Classification,descriptor:d.ClickDescriptor.Cover}),y={data:e.data,isLarge:e.isLarge,availablePresentations:e.availablePresentations,getSubtitle:e.getSubtitle,multiline:e.multiline};return c?a.createElement(o.F,{className:m.Z.appLink,appLink:c,analyticsData:v,analyticsOptions:p,appLinkOptions:null===(l=e.getChildAppLinkOptions)||void 0===l?void 0:l.call(e)},a.createElement(f,Object.assign({},y))):a.createElement(f,Object.assign({},y))}))},2284:(e,t,n)=>{var a;n.d(t,{W:()=>a}),function(e){e.Draft="Draft",e.ComingSoon="ComingSoon",e.Published="Published"}(a||(a={}))},84231:(e,t,n)=>{n.d(t,{Z:()=>a});const a={playlistItem:"CaRJx",playlistItemGradient:"BI7p2",playlistMetadata:"eDk1l",partialHeading:"w4lWh",ownerAvatarContainer:"JImqE"}},17836:(e,t,n)=>{n.d(t,{Z:()=>a});const a={appLink:"AiJnp",name:"YvZtY",widgetItem:"h7_j7",text:"eu1no",imagePanel:"RYgR7",partialLargeImage:"g9eTq",image:"RNQOy",dragHandle:"duGE3",large:"YdRuN",comingSoonPanel:"Qjdcy",editSubjectsItem:"JD4tV",allSubjectsItem:"TxMRU",logoContainer:"KzrsJ",draggingItem:"eOdAc",partialLargeFallback:"_Lyi1",partialIcon:"Aft7O"}},82602:(e,t,n)=>{n.d(t,{WU:()=>s});var a=["second","minute","hour","day","week","month","year"],r=["秒","分钟","小时","天","周","个月","年"],i={},l=function(e,t){i[e]=t},o=[60,60,24,7,365/7/12,12];function c(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}var s=function(e,t,n){var a=function(e,t){return(+(t?c(t):new Date)-+c(e))/1e3}(e,n&&n.relativeDate);return function(e,t){for(var n=e<0?1:0,a=e=Math.abs(e),r=0;e>=o[r]&&r<o.length;r++)e/=o[r];return(e=Math.floor(e))>(0==(r*=2)?9:1)&&(r+=1),t(e,r,a)[n].replace("%s",e.toString())}(a,function(e){return i[e]||i.en_US}(t))};l("en_US",(function(e,t){if(0===t)return["just now","right now"];var n=a[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]})),l("zh_CN",(function(e,t){if(0===t)return["刚刚","片刻后"];var n=r[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}))}}]);