@clickview/library-editor 1.16.1-rc.5 → 1.16.1-rc.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{1492-library-editor-cdf829452c.chunk.css → 1492-library-editor-d960f77061.chunk.css} +1 -1
  3. package/dist/css/{1601-library-editor-f2f7a579a7.chunk.css → 1601-library-editor-de229ab88c.chunk.css} +1 -1
  4. package/dist/css/{6833-library-editor-f1ee14ab97.chunk.css → 2364-library-editor-486eff8042.chunk.css} +9 -10
  5. package/dist/css/{4000-library-editor-4c9381e16c.chunk.css → 2417-library-editor-cafbdbc710.chunk.css} +0 -1
  6. package/dist/css/{4274-library-editor-a2f3b0f9f6.chunk.css → 5885-library-editor-493f263741.chunk.css} +9 -10
  7. package/dist/css/{6220-library-editor-cfb71135bb.chunk.css → 6220-library-editor-65c477d56a.chunk.css} +1 -1
  8. package/dist/css/{6999-library-editor-d855c3a356.chunk.css → 6999-library-editor-44511049a7.chunk.css} +1 -1
  9. package/dist/css/{7634-library-editor-154066beaa.chunk.css → 7634-library-editor-48de91de99.chunk.css} +1 -1
  10. package/dist/css/{library-editor-app-bb91d6169b.css → library-editor-app-fa41d2b6e3.css} +1 -1
  11. package/dist/languages/en.json +1 -1
  12. package/dist/scripts/1192-6b7b34a7bc.chunk.js +1 -0
  13. package/dist/scripts/{1601-1ef0e562fc.chunk.js → 1601-5e29bc01b5.chunk.js} +1 -1
  14. package/dist/scripts/{1671-4282889aff.chunk.js → 1671-af75174d28.chunk.js} +1 -1
  15. package/dist/scripts/{6833-787f52fa1c.chunk.js → 2364-ad53a1c059.chunk.js} +1 -1
  16. package/dist/scripts/2417-fed945706c.chunk.js +1 -0
  17. package/dist/scripts/{4274-249cf11627.chunk.js → 5885-76389b96f9.chunk.js} +1 -1
  18. package/dist/scripts/bundle-b6bdcfafe8.min.js +2 -0
  19. package/package.json +2 -2
  20. package/dist/css/9379-library-editor-d4c68a200b.chunk.css +0 -1
  21. package/dist/scripts/4000-9ac17853ea.chunk.js +0 -1
  22. package/dist/scripts/755-cce83281c5.chunk.js +0 -1
  23. package/dist/scripts/9379-c0daa11abc.chunk.js +0 -1
  24. package/dist/scripts/bundle-3053027fad.min.js +0 -2
  25. /package/dist/scripts/{1492-e352aa8d88.chunk.js → 1492-2d03a594be.chunk.js} +0 -0
  26. /package/dist/scripts/{1601-1ef0e562fc.chunk.js.LICENSE.txt → 1601-5e29bc01b5.chunk.js.LICENSE.txt} +0 -0
  27. /package/dist/scripts/{6220-3273db4569.chunk.js → 6220-d350eee4ba.chunk.js} +0 -0
  28. /package/dist/scripts/{6999-9284afd732.chunk.js → 6999-f4c8c5a8b5.chunk.js} +0 -0
  29. /package/dist/scripts/{7634-bcbee3cbfc.chunk.js → 7634-119e6c8a1f.chunk.js} +0 -0
  30. /package/dist/scripts/{bundle-3053027fad.min.js.LICENSE.txt → bundle-b6bdcfafe8.min.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1192],{23689:function(e,t,n){"use strict";n.d(t,{i:function(){return f}});var r=n(1024),a=n(48088),i=n(21679),o=n(11306),c=n(53808),l=n(10791),s=function(e,t){var n=e.dataServiceName,r=e.eventPrefix,s=e.fetchData,u=e.setData,d=e.onError,m=e.deleteEventPrefix;if(c.q.isFunction(s)){if(c.q.isFunction(u)){var v=d&&c.q.isFunction(d),f=i.u.getInstance(n),p=a.Radio.channel(f.channelName),g="".concat(r,":request"),y="".concat(r,":sync"),h="".concat(r,":error"),b="".concat(r,":invalidate"),E=m&&"".concat(m,":sync"),w=function(){return t(!1)},N=function(){return t(!0)},C=function(){return t(!1)},S=function(){return p.off(b,C)};p.once(g,w),p.once(y,N),p.once(b,C),v&&p.once(h,d),E&&p.once(E,S);var O=s(f);return O&&(t(!0),e.setData(O)),function(){i.u.releaseInstance(n),p.off(g,w),p.off(y,N),p.off(b,C),v&&p.off(h,d),E&&p.off(E,S)}}l.ErrorHelper.throw(new o.H("A setData function must be passed to fetch"))}else l.ErrorHelper.throw(new o.H("A fetchData function must be passed to fetch"))};function u(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(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 d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||m(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=r.useState(!1),i=d(a,2),o=i[0],c=i[1];r.useEffect((function(){c(!1)}),u(t)),r.useEffect((function(){if(n)return s(e,c)}),[o,n])}},38182:function(e,t,n){"use strict";n.d(t,{q:function(){return l}});var r=n(1024),a=n.n(r),i=n(68003),o=n(87013),c=n(88483);function l(e){var t,n,r=e.imageUrl||(t=e.imageCdnUrl,(n=e.initials)?o.j.createUrl(i._.safeUrlConcat(t,"/v1/profile-images?initials=".concat(n)),{size:c.h2.Small}):"");return a().createElement("div",{className:"position-relative h-100 w-100"},a().createElement("div",{className:"".concat("Gvwzj"," ").concat((null==e?void 0:e.extraClasses)||""),style:{backgroundImage:"url('".concat(r,"')")}}," "),e.showDot&&a().createElement("div",{className:"".concat("JJHBJ"," rounded-circle bg-danger")}))}},45458:function(e,t,n){"use strict";n.d(t,{C:function(){return v},g:function(){return r}});var r,a=n(1024),i=n(57857),o=n(21974),c=n(27866),l=n(63946),s=n(39396),u=n(63791),d=n(50028),m=i.T.encloseNamespace("shared.badges");function v(e){var t=e.type,n=e.data;if(!function(e,t){var n,a,i;return"boolean"==typeof t?!!t:e===r.Rating?t&&!!t.value:e===r.Resources?!!(null==t?void 0:t.length)||!!(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.length):e===r.Interactive?!!(null==t?void 0:t.length)||!!(null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.length):e===r.Captions?!!(null==t?void 0:t.length)||!!(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.length):e===r.Status?"number"==typeof t:!!t}(t,n))return a.createElement(a.Fragment,null);var i=function(e,t){var n="";return e===r.Duration&&(n="duration-badge"),e===r.Interactive&&(n="interactive-badge"),e===r.Rating&&(n="rating-badge ".concat(o.u.mapRatingToClass(t.value))),e===r.ProductionYear&&(n="production-year-badge"),e===r.Resources&&(n="resources-badge"),e===r.Captions?"p-0":e===r.Status?"badge ".concat(function(e){switch(e){case d.X.Published:return"badge-success";case d.X.Archive:case d.X.Rejected:return"badge-danger";case d.X.Draft:return"draft-badge";case d.X.Pending:case d.X.Processing:return"badge-warning"}}(t)):e===r.Trending?"trending-badge px-2 d-flex align-items-center":"".concat("badge"," ").concat(n)}(t,n),v=function(e,t){return e===r.Interactive?m("interactive"):e===r.Duration?c.T.ToDisplayDuration(t):e===r.Rating?t.code:e===r.ProductionYear?t:e===r.Resources?m("resources"):e===r.Captions?a.createElement(s.x,{svgName:u.vn.CloseCaptionBadge}):e===r.Status?d.X[t]:e===r.Trending?a.createElement(a.Fragment,null,a.createElement(s.x,{svgName:u.vn.Trending}),a.createElement("span",{className:"pl-1"},t)):void 0}(t,n),f=function(e,t){return e===r.Rating?{title:t.name,placement:"top"}:null}(t,n);return f?a.createElement("span",{className:"badge-wrapper"},a.createElement(l.u,Object.assign({},f,{spanHack:!0}),a.createElement("span",{className:"".concat(i," d-flex justify-content-center")},v))):a.createElement("span",{className:"".concat(i," badge-wrapper")},v)}!function(e){e.Duration="duration",e.Interactive="interactive",e.Rating="rating",e.ProductionYear="production-year",e.Resources="resources",e.Captions="captions",e.Status="status",e.Trending="trending"}(r||(r={}))},41777:function(e,t,n){"use strict";n.d(t,{u:function(){return d}});var r=n(1024),a=n.n(r);function i(e){var t;return a().createElement("img",{alt:"",role:"presentation",src:e.src,className:"".concat("NsLci"," ").concat(null!==(t=e.className)&&void 0!==t?t:"")})}var o=n(31647),c=n(53808),l=n(17439),s=n(54753);function u(e){var t=e.className||"btn btn-dark";return e.disabled&&(t+=" disabled"),e.icon?a().createElement(l.h,{className:t,onClick:e.onClick,appLink:e.appLink,svgName:e.icon,href:e.href,openInNewTab:e.openInNewTab,disabled:e.disabled},e.text):!e.appLink||c.q.isFunction(e.onClick)||e.disabled?e.href&&!e.disabled?a().createElement("a",{className:t,href:e.href,target:e.openInNewTab?"_blank":null},e.text):a().createElement("button",{disabled:e.disabled,onClick:function(){e.disabled||(c.q.isFunction(e.onClick)&&e.onClick(),e.appLink&&o.Q.AppLinkHelper.trigger(e.appLink))},className:t},e.text):a().createElement(s.F,{appLink:e.appLink,className:t},e.text)}function d(e){var t;return a().createElement("div",{className:"text-center d-flex flex-column align-items-center ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.children)}d.defaultProps={className:"pt-5"},d.Image=function(e){return a().createElement(i,Object.assign({},e))},d.Cta=function(e){return a().createElement(u,Object.assign({},e))},d.Heading=function(e){return a().createElement("h2",{className:e.className||"h6"},e.children)},d.Info=function(e){return e.injectHtml?a().createElement("p",{className:e.className||"mb-3 w-50",dangerouslySetInnerHTML:{__html:e.children}}):a().createElement("p",{className:e.className||"mb-3 w-50"},e.children)}},17439:function(e,t,n){"use strict";n.d(t,{h:function(){return s}});var r=n(1024),a=n(31647),i=n(53808),o=n(52076),c=n(39396),l=n(54753);function s(e){var t="".concat(e.className," ").concat("aGxoe");e.children?t+=" ".concat("_cjiV"):t+=" ".concat("T1CzO"),e.disabled&&(t+=" disabled");var n=r.createElement(c.x,{svgName:e.svgName,className:"svg-container ".concat("q6vwS"),size:e.svgSize});return e.appLink||e.href?e.href?r.createElement("a",{className:t,href:e.href,onClick:function(t){t.preventDefault(),e.analyticsData&&e.analyticsOptions&&o.k.logUserAction(e.analyticsData,e.analyticsOptions),i.q.isFunction(e.onClick)&&e.onClick(t),a.Q.LocationUtils.PageLoad(e.href,e.openInNewTab)}},n,e.children):r.createElement(l.F,{appLink:e.appLink,className:t,onClick:e.onClick,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled},n,e.children):r.createElement("button",{className:t,onClick:function(t){e.analyticsData&&e.analyticsOptions&&o.k.logUserAction(e.analyticsData,e.analyticsOptions),i.q.isFunction(e.onClick)&&e.onClick(t)},disabled:e.disabled},n,e.children)}},72564:function(e,t,n){"use strict";n.d(t,{Q:function(){return u},M:function(){return d}});var r=n(1024),a=n(63151),i=function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n},o=n(54753),c=n(22218),l="b0KLR",s="ts6Yo";function u(e){var t=e.video,n=t.season;if(!t.episodeNumber||!n)return r.createElement(r.Fragment,null);var a=i(n.number,2),o=i(t.episodeNumber,2);return r.createElement("span",{className:"d-inline-block ".concat(e.appLink?"YR5Q7":"")},e.withSeriesTitle&&r.createElement(r.Fragment,null," "),!!a&&"S".concat(a," • "),"E",o)}function d(e){var t,n=e.appLink,d=e.video,m=e.className,v=void 0===m?"":m,f=null==d?void 0:d.series;if(!f||!f.id)return r.createElement(r.Fragment,null);var p=n&&Object.assign(Object.assign({},n),{args:[f.id,a.m.slugify(f.name)]}),g=Object.assign(Object.assign({},e.analyticsData),{id:null==f?void 0:f.id,name:null==f?void 0:f.name,videoId:null==d?void 0:d.id,videoName:null==d?void 0:d.name}),y=Object.assign(Object.assign({},e.analyticsOptions),{entity:c.py.Series,actionType:c.Vw.Click,descriptor:c._S.Title}),h=function(e,t,n){if(!e)return"";if(!t||!n)return e.toUpperCase();var r=i(t,2),a=i(n,2);return"".concat(e.toUpperCase()," S").concat(r," • E").concat(a)}(f.name,null===(t=d.season)||void 0===t?void 0:t.number,d.episodeNumber);return p?r.createElement("div",null,r.createElement(o.F,{appLink:p,className:"text-uppercase d-block text-truncate mb-0 ".concat(l," ").concat("sm"===e.size?"".concat(s," font-weight-normal"):""," ").concat(v),analyticsData:g,analyticsOptions:y,title:h},f.name,r.createElement(u,Object.assign({},e,{withSeriesTitle:!0})))):r.createElement("div",{className:"text-uppercase text-truncate mb-0 ".concat(l," ").concat("sm"===e.size?"".concat(s," font-weight-normal"):""," ").concat(v),title:h},f.name,r.createElement(u,Object.assign({},e,{withSeriesTitle:!0})))}},34564:function(e,t,n){"use strict";n.d(t,{z:function(){return u}});var r=n(1024),a=n.n(r),i=n(54753),o=n(89603),c=n(63791),l=n(39396),s=n(91807);function u(e){var t,n,r=e.tag,u=e.appLink,d=e.onClick,m=e.disabled,v=e.tagClass,f=void 0===v?"tag":v,p=r.name.toLowerCase(),g=null===(t=r.tagType)||void 0===t?void 0:t.toLowerCase(),y="badge-pill py-1 px-2 my-1 mr-1 ".concat(f," ").concat(function(e){switch(e){case o.Q.Pedagogy:case o.Q.Skill:return"pedagogy-tag text-white";case o.Q.Hidden:return"hidden-tag";case o.Q.Normal:default:return""}}(g)),h=g===o.Q.Normal&&!!(null===(n=e.themeColours)||void 0===n?void 0:n.secondary);h&&(y+=" text-white"),!u&&!d||m||(y+=" cursor-pointer"),m&&(y+=" "+s.Z.disabled),e.onRemove&&(y+=" "+s.Z.badge);var b=h?{backgroundColor:e.themeColours.secondary}:{};return u?a().createElement(i.F,{onClick:d,appLink:u,className:y,title:p,style:b},a().createElement("span",{className:"text-truncate text-nowrap"},p)):a().createElement("span",{onClick:d,className:y,title:p,style:b},a().createElement("span",{className:"text-truncate text-nowrap"},p,e.onRemove&&a().createElement("button",{onClick:e.onRemove,className:"".concat(s.Z.close," close font-size-normal")},a().createElement(l.x,{size:l.S.Small,svgName:c.vn.Close,className:"d-inline-block svg-container"}))))}},24828:function(e,t,n){"use strict";n.d(t,{o:function(){return r}});var r=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},8371:function(e,t,n){"use strict";var r;n.d(t,{b:function(){return r}}),function(e){e.AU="cv-ap-southeast-1",e.NZ="cv-ap-southeast-2",e.UK="cv-eu-west-1",e.US="cv-na-west-1"}(r||(r={}))},74421:function(e,t,n){"use strict";var r;n.d(t,{E:function(){return r}}),function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience",e[e.TallPoster=60]="TallPoster",e[e.Classroom=67]="Classroom",e[e.ClassroomGroup=68]="ClassroomGroup"}(r||(r={}))},90547:function(e,t,n){"use strict";var r;n.d(t,{r:function(){return r}}),function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(r||(r={}))},86257:function(e,t,n){"use strict";var r;n.d(t,{L:function(){return r}}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={}))},89603:function(e,t,n){"use strict";var r,a;n.d(t,{Q:function(){return r}}),function(e){e.Normal="normal",e.Pedagogy="pedagogy",e.Hidden="hidden",e.Skill="skill"}(r||(r={})),function(e){e[e.Normal=0]="Normal",e[e.Pedagogy=1]="Pedagogy",e[e.Hidden=2]="Hidden"}(a||(a={}))},90335:function(e,t,n){"use strict";var r;n.d(t,{D:function(){return r}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series"}(r||(r={}))},82378:function(e,t,n){"use strict";n.d(t,{i:function(){return i}});var r=n(1024),a=n(94223);function i(e,t){var n=e,i=t,o=(0,a.P)(e&&function(e){return n(e).key});return(0,r.useEffect)((function(){o&&o.shouldInitialFetch&&t&&i()}),[null==o?void 0:o.shouldInitialFetch,t]),(0,r.useEffect)((function(){o&&o.nextCursor&&!o.isFetching&&t&&i(o.nextCursor)}),[null==o?void 0:o.nextCursor,null==o?void 0:o.isFetching,t]),o}},32557:function(e,t,n){"use strict";n.d(t,{X:function(){return f},L:function(){return p}});var r=n(1024),a=n.n(r),i=n(85887),o=n(53808),c=function(){var e=a().useRef(!0);return a().useEffect((function(){return function(){e.current=!1}}),[]),e};function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return 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}}(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 s(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 u={className:"",delay:0,style:null},d={screenX:0,screenY:0};function m(e,t){var n;e.current&&(t.className&&(null===(n=e.current.classList)||void 0===n||n.add(t.className)),t.style&&Object.keys(t.style).forEach((function(n){e.current.style[n]=t.style[n]})))}function v(e,t){var n;e.current&&(t.className&&(null===(n=e.current.classList)||void 0===n||n.remove(t.className)),t.style&&Object.keys(t.style).forEach((function(t){e.current.style[t]=null})))}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,t=c(),n=r.useState(e),a=l(n,2),s=a[0],d=a[1],f=r.useState(!1),p=l(f,2),g=p[0],y=p[1],h=r.useRef(null);r.useEffect((function(){i.t.isEqual(e,s)||d(e)}),[e]);var b=o.q.throttle((function(){m(h,s),t.current&&y(!0)}),s.delay,{leading:!1}),E=function(){o.q.isFunction(b.cancel)&&b.cancel(),v(h,s),t.current&&y(!1)};return r.useLayoutEffect((function(){var e=h.current;if(e)return e.addEventListener("mouseenter",b),e.addEventListener("mouseleave",E),function(){e.removeEventListener("mouseenter",b),e.removeEventListener("mouseleave",E)}}),[h.current,s]),[h,g]}function p(e){var t=l(r.useState(e),2),n=t[0],a=t[1],c=r.useRef(Object.assign({},d)),s=r.useRef(!1),u=r.useRef(0),f=r.useRef(null),p=l(r.useState(!1),2),g=p[0],y=p[1];function h(){u.current&&(window.clearTimeout(u.current),u.current=0)}function b(){s.current=!0}function E(e){if(s.current){var t,r,a=Object.assign({},c.current);c.current.screenX=e.screenX,c.current.screenY=e.screenY,function(e,t){return Math.abs(e.screenX-t.screenX)>5||Math.abs(e.screenY-t.screenY)>5}(a,e)&&h(),t=function(){m(f,n),y(!0)},r=n.delay||275,u.current||(u.current=window.setTimeout(t,r))}}function w(){h(),v(f,n),s.current=!1,y(!1)}return r.useEffect((function(){i.t.isEqual(e,n)||a(e)}),[e]),r.useLayoutEffect((function(){if(f.current){var e=o.q.throttle(E,25,{leading:!1});return f.current.addEventListener("mouseenter",b),f.current.addEventListener("mousemove",e),f.current.addEventListener("mouseleave",w),function(){f.current&&(f.current.removeEventListener("mouseenter",b),f.current.removeEventListener("mousemove",e),f.current.removeEventListener("mouseleave",w))}}}),[f.current,n]),[f,g]}},29267:function(e,t,n){"use strict";n.d(t,{Y:function(){return o}});var r=n(64038);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return 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}}(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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.prevent,n=e.rootMargin,i=e.triggerOnce,o=void 0===i||i,c=r.useInView({triggerOnce:o,rootMargin:n}),l=a(c,3),s=l[0],u=l[1],d=l[2];return!0!==t&&void 0!==window.IntersectionObserver||(u=!0,s=null),{ref:s,inView:u,initialized:!!d}}},5256:function(e,t,n){"use strict";n.d(t,{a:function(){return i}});var r=n(1024);function a(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}function i(e){var t,n,i=(t=(0,r.useState)(window.matchMedia(e).matches),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return a(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)?a(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=i[0],c=i[1];return(0,r.useEffect)((function(){var t=window.matchMedia(e);t.matches!==o&&c(t.matches);var n=function(){return c(t.matches)};return t.addListener(n),function(){return t.removeListener(n)}}),[e]),o}},94223:function(e,t,n){"use strict";n.d(t,{P:function(){return l}});var r=n(1024),a=n(58566),i=n(86120),o=n(53808);function c(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}function l(e,t,n){function l(e){if(e)return o.q.isFunction(t)?t(e):e.data}function s(e){var t,r;if(e)return n?n(e):null===(r=null===(t=e.pagination)||void 0===t?void 0:t.cursors)||void 0===r?void 0:r.next}return(0,a.useSelector)((0,r.useMemo)((function(){return function(t){if(o.q.isFunction(e)){for(var n=e,r=o.q.isFunction(e)&&n(),a=r&&i.a.getResponse(t,r),u=a&&a.isFetching,d=a&&a.statusCode,m=a&&a.hasCompleted,v=a&&a.shouldFetch,f=l(a&&a.data),p=s(a&&a.data),g=function(e){var t;if(e)return null===(t=e)||void 0===t?void 0:t.count}(a&&a.data);p&&(u=(a=i.a.getResponse(t,n(p))).isFetching,d=a.statusCode,m=a.hasCompleted,!a.shouldFetch);){var y=l(a.data);y&&f.push.apply(f,function(e){if(Array.isArray(e))return c(e)}(E=y)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(E)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(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.")}());var h=s(a.data);p=h===p?null:h}var b={shouldInitialFetch:v,items:f,nextCursor:p,isFetching:u,statusCode:d,hasCompleted:m};return"number"==typeof g&&(b.totalItems=g),b}var E}}),[e]))}n(35656).o.Ok},6697:function(e,t,n){"use strict";n.d(t,{y:function(){return a}});var r=n(57857),a={getEnglishName:function(e,t){var n,a,i=e.language;return a=(null==t?void 0:t.filter((function(e){return e.language!==i}))).length>0?CVLanguages.getFullEnglishName(i):CVLanguages.getEnglishName(i),(null===(n=e.metadata)||void 0===n?void 0:n.autoGenerated)?r.T.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:a}):a}}},21974:function(e,t,n){"use strict";n.d(t,{u:function(){return u}});var r=n(57857),a=n(63791),i=n(75459),o=n(86257);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===c(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s="shared.shared-utils",u={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e,t){switch(e.type){case i.r.HostedLibrary:case i.r.CustomLibrary:return e.name;case i.r.Exchange:return r.T.getPhrase(s,"exchange");case i.r.Workspace:return r.T.getPhrase(s,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case i.r.HostedLibrary:case i.r.CustomLibrary:return"bg-info";case i.r.Exchange:return"bg-green";case i.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t,n=(l(t={},o.L.Pdf,a.vn.FilePDF),l(t,o.L.Image,a.vn.FileImg),l(t,o.L.PowerPoint,a.vn.FilePowerpoint),l(t,o.L.Document,a.vn.FileWord),l(t,o.L.Excel,a.vn.FileExcel),l(t,o.L.Zip,a.vn.FileZip),l(t,o.L.File,a.vn.File),t)[e];return n||(n=a.vn.Folder),n},mapTypeToClass:function(e){switch(e){case o.L.Pdf:return"icon-red";case o.L.Image:return"icon-purple";case o.L.Document:return"icon-blue";case o.L.Excel:return"icon-green";case o.L.PowerPoint:return"icon-orange";case o.L.Zip:return"icon-teal";case o.L.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case o.L.Pdf:return r.T.getPhrase(s,"pdf");case o.L.Image:return r.T.getPhrase(s,"image");case o.L.Document:return r.T.getPhrase(s,"document");case o.L.Excel:return r.T.getPhrase(s,"spreadsheet");case o.L.PowerPoint:return r.T.getPhrase(s,"presentation");case o.L.Zip:return r.T.getPhrase(s,"zipArchive");case o.L.File:return r.T.getPhrase(s,"file");default:return""}}}},18830:function(e,t,n){"use strict";n.d(t,{M:function(){return s}});var r=n(57857),a=n(74421),i=n(70065),o=n(50028),c=n(89603),l=r.T.encloseNamespace("shared.shared-utils"),s={isVideo:function(e){return(null==e?void 0:e.typeId)===a.E.Video},isClip:function(e){return(null==e?void 0:e.typeId)===a.E.Clip},isInteractive:function(e){return(null==e?void 0:e.typeId)===a.E.Interactive},isVideoType:function(e){return s.isVideo(e)||s.isInteractive(e)||s.isClip(e)},hasSeries:function(e){var t;return!!(null===(t=null==e?void 0:e.series)||void 0===t?void 0:t.id)},getVideoProgress:function(e){var t,n;return(null==e?void 0:e.lastProgressPoint)?null==e?void 0:e.lastProgressPoint:(null===(t=null==e?void 0:e._videoProgress)||void 0===t?void 0:t.progress)?null===(n=null==e?void 0:e._videoProgress)||void 0===n?void 0:n.progress:0},getThumbnail:function(e){var t,n,r,a;return s.isVideo(e)?e.thumbnail:s.isClip(e)?null===(t=e.video)||void 0===t?void 0:t.thumbnail:s.isInteractive(e)?e.thumbnail||(null===(n=e.video)||void 0===n?void 0:n.thumbnail)||(null===(a=null===(r=e.clip)||void 0===r?void 0:r.video)||void 0===a?void 0:a.thumbnail):void 0},getDuration:function(e){var t,n;if(s.isVideo(e))return e.duration;if(s.isInteractive(e)){if(null===(t=e.video)||void 0===t?void 0:t.duration)return e.video.duration;if(null===(n=e.clip)||void 0===n?void 0:n.id)return 1e3*(e.clip.endTime-e.clip.startTime)}return s.isClip(e)?1e3*(e.endTime-e.startTime):void 0},getAnalyticsEntity:function(e){return s.isVideo(e)?i.EntityType.Video:s.isInteractive(e)?i.EntityType.Interactive:s.isClip(e)?i.EntityType.Clip:void 0},getCanBeConsumed:function(e){var t,n;return e&&s.isVideoType(e)?e._canBeConsumed?{canNavigate:"login-required"===(null===(t=e._canBeConsumed)||void 0===t?void 0:t.reason)&&s.isVideo(e)||!0===e._canBeConsumed.value,canConsume:e._canBeConsumed.value,reason:null===(n=e._canBeConsumed)||void 0===n?void 0:n.reason}:{canNavigate:!0,canConsume:!0}:{canNavigate:!1,canConsume:!1}},getPrivacyReasoning:function(e){var t=s.getCanBeConsumed(e),n=t.canConsume,r=t.canNavigate,a=t.reason;if(!n&&!r)switch(a){case"rating-not-allowed":return l("ratingNotAllowed");case"video-deleted":return s.isClip(e)?l("clipParentDeleted"):s.isInteractive(e)?l("interactiveParentDeleted"):l("videoDeleted");case"clickview-private":return l("clickViewPrivate");case"private":default:return l("genericCannotAccess");case"login-required":return s.isClip(e)?l("clipLoginRequired"):s.isInteractive(e)?l("interactiveLoginRequired"):l("videoLoginRequired")}return s.isInteractive(e)&&e.status===o.X.Draft?l("draftInteractive"):""},getTitle:function(e){if(e.name)return e.name;var t=s.getCanBeConsumed(e),n=t.canConsume,r=t.reason;return l(n||"private"!==r?n||"video-deleted"!==r?"privateVideo":"videoUnavailable":"privateVideo")},getParentVideo:function(e){var t;return s.isVideo(e)?e:s.isClip(e)?e.video:s.isInteractive(e)?e.video||(null===(t=e.clip)||void 0===t?void 0:t.video):void 0},showWhyThisVideo:function(e){var t,n;return!!s.isVideo(e)&&(null===(n=null===(t=e.tags)||void 0===t?void 0:t.data)||void 0===n?void 0:n.some((function(e){return e.tagType===c.Q.Pedagogy||e.tagType===c.Q.Skill})))},showWhatsIncluded:function(e){var t,n,r,a,i,o;if(!s.isVideo(e))return!1;var c=!!(null===(n=null===(t=e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length),l=!!(null===(a=null===(r=e.resources)||void 0===r?void 0:r.data)||void 0===a?void 0:a.length),u=!!(null===(o=null===(i=e.subtitles)||void 0===i?void 0:i.data)||void 0===o?void 0:o.length);return c||l||u}}},22231:function(e,t,n){"use strict";function r(e,t){return t[e.charCodeAt(0)%t.length]}n.d(t,{x:function(){return r}})},97896:function(e,t,n){"use strict";n.d(t,{x:function(){return I}});var r=n(1024),a=n.n(r),i=n(66703),o=n(45458),c=n(56285),l=n(50997),s=n(89707),u=n(72564);function d(e){var t,n;return(null===(n=null===(t=e.items)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)?a().createElement("p",{className:"mb-0"},e.items.data.map((function(e,t){return a().createElement("span",{key:t},e.name)}))):null}function m(e){return a().createElement(a().Fragment,null,a().createElement("div",{className:"col-3"},a().createElement("label",null,a().createElement(i.x,{namespace:"libraryRequests.videoDetails",phrase:e.phrase}))),a().createElement("div",{className:"col-9 mb-3"},e.children))}function v(e){var t,n,r,i,v,f,p,g,y,h,b,E,w,N,C=e.libraryRequest.object;return a().createElement("div",{className:"row"},((null==C?void 0:C.name)||e.libraryRequest.name)&&a().createElement(m,{phrase:"title"},(null==C?void 0:C.name)||e.libraryRequest.name),!!C&&a().createElement(a().Fragment,null,!!C.series&&a().createElement(m,{phrase:"series"},a().createElement("a",{target:"_blank",href:(E=C.series,w=e.config,N="series/".concat(E.id),s.k.getMainProductUrl(w,N,N)),className:"".concat("Z5BW7"," text-reset")},C.series.name,a().createElement(u.Q,{video:C,withSeriesTitle:!0}))),!!(null===(t=C.rating)||void 0===t?void 0:t.code)&&a().createElement(m,{phrase:"rating"},a().createElement("div",{className:"d-flex"},a().createElement(o.C,{type:o.g.Rating,data:C.rating}))),!!C.description&&a().createElement(m,{phrase:"description"},a().createElement("span",{className:"pre-wrap"},C.description)),!!C.productionYear&&a().createElement(m,{phrase:"productionYear"},C.productionYear),!!(null===(r=null===(n=C.producers)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length)&&a().createElement(m,{phrase:"producers"},a().createElement(d,{items:C.producers})),!!(null===(v=null===(i=C.directors)||void 0===i?void 0:i.data)||void 0===v?void 0:v.length)&&a().createElement(m,{phrase:"directors"},a().createElement(d,{items:C.directors})),!!(null===(p=null===(f=C.productionCompanies)||void 0===f?void 0:f.data)||void 0===p?void 0:p.length)&&a().createElement(m,{phrase:"productionCompanies"},a().createElement(d,{items:C.productionCompanies})),!!(null===(y=null===(g=C.distributors)||void 0===g?void 0:g.data)||void 0===y?void 0:y.length)&&a().createElement(m,{phrase:"distributors"},a().createElement(d,{items:C.distributors})),!e.hideBroadcastInfo&&!!(null===(h=C.channel)||void 0===h?void 0:h.name)&&a().createElement(m,{phrase:"channel"},null===(b=C.channel)||void 0===b?void 0:b.name),!e.hideBroadcastInfo&&!!C.dateBroadcast&&a().createElement(m,{phrase:"broadcastDate"},c.O.format(C.dateBroadcast,l.K4.FULL_YEAR))))}var f=n(53808);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n(89375);var g=r.createContext({});function y(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return h(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)?h(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(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}function b(e){var t=e.view,n=e.options,a=void 0===n?{}:n,i=e.className,o=void 0===i?"":i,c=e.dependencies,l=void 0===c?[]:c,s=r.useMemo((function(){return new t(a)}),l);!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=r.useContext(g).setPageTitle;r.useEffect((function(){"boolean"!=typeof e&&f.q.isFunction(n)&&(e||(e=""),n(e))}),[e].concat(y(t)))}(s.title);var u=function(e,t){var n,a=r.useRef(null);return r.useEffect((function(){if(e){var t=a.current;return e.render(),t.hasChildNodes()?t.replaceChild(e.el,t.firstChild):t.appendChild(e.el),e.triggerMethod&&e.triggerMethod("attach"),e.trigger("rendered"),function(){f.q.isFunction(e.close)?e.close():f.q.isFunction(e.destroy)&&e.destroy()}}}),function(e){if(Array.isArray(e))return p(e)}(n=t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a}(s,[s]);return t?r.createElement("div",{ref:u,className:o}):r.createElement(r.Fragment,null)}var E=n(70065),w=n(61356),N=n(71192);function C(e){var t;return a().createElement("div",{className:"col-12 mb-3 p-0"},a().createElement(b,{view:w.c,options:{model:new N.n(e.video,{parse:!0}),webPlayerUrl:e.webPlayerUrl,analyticsOptions:{location:E.LocationContext.VideoRequest},currentUser:e.currentUser,createViewKey:e.createViewKey,playerApiUrl:e.playerApiUrl},dependencies:[null===(t=e.video)||void 0===t?void 0:t.id]}))}var S=n(82602),O=n(38182),k=n(83891),P=n(57857),j="libraryRequests.comments",T=P.T.encloseNamespace(j);function x(e){var t,n,r,i,o,c,l=e.comment,s="".concat(null===(t=l.user)||void 0===t?void 0:t.name," ").concat(null===(n=l.user)||void 0===n?void 0:n.surname);return l.user||(s=T("deletedUser")),a().createElement("div",{className:"d-flex ".concat("LyFKD")},a().createElement("div",{className:"".concat("hwnEk"," mr-2 flex-shrink-0")},a().createElement(O.q,{imageUrl:null===(i=null===(r=l.user)||void 0===r?void 0:r.avatar)||void 0===i?void 0:i.url,imageCdnUrl:e.imageCdnUrl,initials:k.l.getInitials(null===(o=l.user)||void 0===o?void 0:o.name,null===(c=l.user)||void 0===c?void 0:c.surname)})),a().createElement("div",null,a().createElement("span",{className:"font-weight-bold pr-2"},s),a().createElement("span",{className:"text-muted"},(0,S.WU)(l.dateCreated)),a().createElement("p",{className:"mb-0"},l.message)))}function A(e){var t;return(null===(t=e.comments)||void 0===t?void 0:t.length)?a().createElement("div",{className:"pb-3 border-bottom mb-3"},a().createElement("h2",{className:"h5"},a().createElement(i.x,{namespace:j,phrase:"comments"})),a().createElement("div",{className:"border rounded p-2"},e.comments.map((function(t,n){return a().createElement(x,{key:n,comment:t,imageCdnUrl:e.imageCdnUrl})})))):a().createElement(a().Fragment,null)}var L=n(8371);function I(e){return a().createElement("div",{className:"bg-white rounded p-3"},a().createElement(A,{comments:e.comments,imageCdnUrl:e.config.get("imageCdnUrl")}),a().createElement("h2",{className:"h5"},a().createElement(i.x,{namespace:"libraryRequests.info",phrase:"videoDetails"})),a().createElement(C,{video:e.libraryRequest.object,webPlayerUrl:e.config.get("webPlayerUrl"),currentUser:e.currentUser,createViewKey:e.createViewKey,playerApiUrl:e.config.get("playerApiUrl")}),a().createElement(v,{libraryRequest:e.libraryRequest,hideBroadcastInfo:e.currentUser.get("instanceRegion")===L.b.US,config:e.config}))}},49824:function(e,t,n){"use strict";n.d(t,{j:function(){return i}});var r=n(1024),a=n.n(r);function i(){return a().createElement("div",{className:"bg-white rounded p-3"},a().createElement("div",{className:"partial-loading-background mb-2",style:{height:"1.25rem",width:"9rem"}}),a().createElement("div",{className:"col-12 mb-3 p-0"},a().createElement("div",{className:"responsive-img partial-loading-background rounded"})),a().createElement("div",{className:"row"},a().createElement("div",{className:"col-3"},a().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"3.4rem"}})),a().createElement("div",{className:"col-9 mb-3"},a().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"9rem"}})),a().createElement("div",{className:"col-3"},a().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"5rem"}})),a().createElement("div",{className:"col-9 mb-3"},a().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"2rem"}})),a().createElement("div",{className:"col-3"},a().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"7rem"}})),a().createElement("div",{className:"col-9 mb-3"},a().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"16rem"}}))))}},32027:function(e,t,n){"use strict";n.d(t,{q:function(){return Ot}});var r=n(1024),a=n.n(r),i=n(98495),o=n(82602),c=n(70065),l=n(57857),s=n(53808),u=n(63791),d=n(39396),m=n(2491),v=n(40221),f=n(37360),p=n(18830),g={isFavouritedByCurrentUser:function(e){var t;return!(1!==(null===(t=null==e?void 0:e.favouritedBy)||void 0===t?void 0:t.data.length))},isFavouritedByUser:function(e,t){var n;return!!v.m.findWhere(null===(n=null==e?void 0:e.favouritedBy)||void 0===n?void 0:n.data,{id:null==t?void 0:t.id})},updateVideoState:function(e,t,n){return{id:e.id,favouritedBy:{data:n?[{id:t.id}]:[],pagination:{limit:25,cursors:{next:"",previous:""}}}}},showFavouriteButton:function(e,t){var n;return!(!(null===(n=p.M.getCanBeConsumed(e))||void 0===n?void 0:n.canConsume)||!t&&!f.V.isTabletOrMobile()&&!g.isFavouritedByCurrentUser(e))}},y=n(58424);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var b=l.T.encloseNamespace("shared.favouriteButton");function E(e){var t,n,a=(0,m.Z)(),i=g.isFavouritedByCurrentUser(e.video),o=(t=r.useState(i),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return h(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)?h(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=o[0],l=o[1];r.useEffect((function(){l(i)}),[i]);var v="".concat("d-flex align-items-center justify-content-center"," cursor-pointer ").concat("CFRo3"," ").concat(c?"t0svX":"");return e.className&&(v+=" ".concat(e.className)),s.q.isFunction(e.setFavourite)&&s.q.isFunction(e.canFavourite)&&e.canFavourite(e.video)?r.createElement(y.L,{className:v,onClick:function(){var t=!c;l(t),e.setFavourite(e.video,t,null,(function(){a.error(b(p.M.isClip(e.video)?t?"favouriteClipError":"unfavouriteClipError":p.M.isInteractive(e.video)?t?"favouriteInteractiveError":"unfavouriteInteractiveError":t?"favouriteVideoError":"unfavouriteVideoError")),l(!t)}),e.analyticsData,e.analyticsOptions)}},r.createElement(d.x,{svgName:u.vn.Heart,className:"svg-container ".concat("ZMMQu")}),r.createElement(d.x,{svgName:u.vn.HeartOutline,className:"svg-container ".concat("truFo")})):r.createElement(r.Fragment,null)}var w=n(85887),N=n(29267),C="fVSzb";function S(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 O=r.memo((function(e){var t,n,a=e.forceLoad,i=e.extraClasses,o=void 0===i?"":i,c=e.errorFallbackImageSrc,l=e.src,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}(e,["forceLoad","extraClasses","errorFallbackImageSrc","src"]),u=(0,N.Y)({rootMargin:"500px"}),d=u.ref,m=u.inView,v=(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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return 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.")}()),f=v[0],p=v[1];function g(){return f&&c?c:e.src}if(r.useEffect((function(){if(a||m){var e=new Image;return e.onerror=function(){p(!0),c&&(e.src=c)},e.src=l,function(){return e.onerror=null}}}),[m]),f&&!c)return r.createElement(r.Fragment,null);if(!d)return r.createElement("img",Object.assign({className:"".concat(C," ").concat(o),alt:"",src:g()},s));var y=Object.assign(Object.assign({alt:""},s),m||a?{src:g()}:{});return a||(y.ref=d),r.createElement("img",Object.assign({className:"".concat(C," ").concat(o)},y))})),k=n(54753),P=n(87013),j=n(88483);function T(e){var t="vdd4V",n="";return e.imageType===j.__.Thumbnails&&(n="thumbnail ".concat("Ez0E7")),e.imageType===j.__.TallPosters&&(n="H9bQA"),e.imageType===j.__.Covers&&(n="Nudts"),e.imageType===j.__.Banners&&(n="IOvDH"),e.imageType===j.__.Posters&&(n="iiY56"),e.imageType===j.__.Pdf&&(n="aDJiJ"),e.imageType===j.__.Link&&(n="wDpui"),n&&(t+=" ".concat(n)),e.className&&(t+=" ".concat(e.className)),t}function x(e){var t=e.data,n=e.imageOptions,a=e.appLink,i=e.preload,o=e.analyticsOptions,c=e.analyticsData,l=e.imageClassName,s="";"string"==typeof t?s=t:w.t.isObject(t)&&(s=t.url);var u=s&&n?P.j.createUrl(s,n):s;return r.createElement("div",{className:T(e),style:e.imageStyle},r.createElement(k.F,{appLink:a,analyticsData:c,analyticsOptions:o},e.children,u&&r.createElement(O,{src:u,forceLoad:i,extraClasses:l,errorFallbackImageSrc:e.errorFallbackImageSrc})))}var A=n(72564);function L(e){var t="d-flex align-items-center badge-list ".concat("jEh7m");return e.className&&(t+=" ".concat(e.className)),r.createElement("div",{className:t},e.children)}var I=n(45458);function R(e){var t=p.M.getVideoProgress(e.video),n=t&&e.video.duration&&t/e.video.duration*1e5;return n?r.createElement("div",{className:"bg-primary h-100",style:{width:"".concat(n,"%")}}):r.createElement(r.Fragment,null)}function F(e){return p.M.isVideo(e.video)?a().createElement("div",{className:"YnXtZ"},a().createElement(R,{video:e.video})):a().createElement(a().Fragment,null)}function M(){return a().createElement("div",{className:"".concat("w4cg8"," bg-white cursor-default d-flex align-items-center justify-content-center")},a().createElement(d.x,{svgName:u.vn.Lock}))}var D,V,U,_=n(63946),q="atIHN",B=n(22231),z=n(24828);function H(e){var t,n=e.type,a=e.mediaType,i=e.extraClasses,o=e.containerClassSize;if(n===D.Video)return r.createElement("div",{className:"".concat("LolCW"," ").concat(e.extraClasses," bg-light-blue")});if(n===D.Folder)return r.createElement("div",{className:"".concat("mdrT5"," ").concat(e.extraClasses," ").concat((0,B.x)(e.name,z.o))});var c=function(e){return e===D.SeriesItem?"epoLB":e===D.Playlist?"ZbKBN":e===D.Series||e===D.TallSubject?"I1mTo":e===D.Subject?"".concat("kNG8Z"," svg-container d-inline-block"):""}(n),l=function(e){return e===D.SeriesItem?u.vn.Play:e===D.Playlist?u.vn.Image:e===D.Series?u.vn.Series:e===D.Subject||e===D.TallSubject?u.vn.Subject:""}(n),s=function(e){return e===D.Subject?d.S.ExtraLarge:d.S.Standard}(n),m="".concat(function(e,t,n){if(t===D.Subject){var r=n===U.Large?"z_sHT":"QIbxu";return"".concat("m20L7"," ").concat(r)}return e===V.Svg?t===D.SeriesItem?"".concat(q," rounded-lg"):q:"ZvbeV"}(a,n,o));return i&&(m+=" ".concat(e.extraClasses)),r.createElement("div",{className:m},a===V.Svg?r.createElement(d.x,{svgName:l,className:"".concat(c," ").concat(null!==(t=e.svgContainerClassName)&&void 0!==t?t:""),tagName:"div",size:s}):r.createElement("div",{className:"nKsWZ",style:{backgroundImage:"url('".concat(l,"')")}}))}!function(e){e[e.Playlist=0]="Playlist",e[e.Series=1]="Series",e[e.SeriesItem=2]="SeriesItem",e[e.Subject=3]="Subject",e[e.TallSubject=4]="TallSubject",e[e.Video=5]="Video",e[e.Folder=6]="Folder"}(D||(D={})),function(e){e[e.Svg=0]="Svg",e[e.Image=1]="Image"}(V||(V={})),function(e){e[e.Large=0]="Large",e[e.Small=1]="Small"}(U||(U={})),H.defaultProps={mediaType:V.Svg,containerClassSize:U.Large};var X="Pi49o";function Q(e){var t="text-white rounded-circle align-items-center justify-content-center d-flex",n=p.M.isClip(e.video),r=p.M.isInteractive(e.video),i="sm"===e.size?d.S.Small:d.S.Standard;return a().createElement(a().Fragment,null,n&&a().createElement("div",{className:"".concat(t," ").concat("iLucN"," ").concat("sm"===e.size?X:"")},a().createElement(d.x,{size:i,svgName:u.vn.Clip})),r&&a().createElement("div",{className:"".concat(t," ").concat("yJcaM"," ").concat("sm"===e.size?X:"")},a().createElement(d.x,{size:i,svgName:u.vn.Interactive})))}Q.default={size:"std"};var Z,Y="XAfZW";function W(e,t){var n="mb-1";return t&&(n+="puKcM"),n}function K(e){var t=e.video,n=e.appLink,r=e.imageOptions,i=e.setFavourite,o=e.canFavourite,l=e.preload,s=e.hovering,m=p.M.getCanBeConsumed(e.video).canNavigate,v=Object.assign(Object.assign({},e.analyticsOptions),{entity:p.M.getAnalyticsEntity(t)}),f=g.showFavouriteButton(e.video,s),y=p.M.isVideo(t),h=!y;return a().createElement(_.u,{title:p.M.getPrivacyReasoning(e.video),spanHack:!0,spanHackClassName:""},a().createElement("div",{className:"position-relative rounded-lg overflow-hidden"},f&&a().createElement("div",{className:Y},a().createElement(E,{setFavourite:i,canFavourite:o,video:t,analyticsData:e.analyticsData,analyticsOptions:v})),!m&&a().createElement("div",{className:Y},a().createElement(M,null)),h&&a().createElement("div",{className:"ft_ST"},a().createElement(Q,{video:t})),a().createElement(x,{data:p.M.getThumbnail(t),appLink:m?n:null,imageType:j.__.Thumbnails,imageOptions:r,preload:l,className:"rXzR8",analyticsData:Object.assign(Object.assign({},e.analyticsData),{id:t.id,name:t.name}),analyticsOptions:Object.assign(Object.assign({},v),{actionType:c.UserAction.Click,descriptor:c.ClickDescriptor.Thumbnail})},!(!s||!m)&&a().createElement(d.x,{className:"dndOA",svgName:u.vn.PlayCircle}),a().createElement(H,{type:D.Video}),a().createElement("div",{className:"qu3A3"},a().createElement("div",{className:"NTrtm"},a().createElement("div",{className:"".concat(W(0,s))},y&&p.M.hasSeries(t)&&a().createElement(A.M,{className:"text-shadow clamp-1",video:t,appLink:null,analyticsOptions:null}),a().createElement("span",{className:"h6 text-reset text-shadow clamp-1"},p.M.getTitle(t))),a().createElement(F,{video:t}),s&&a().createElement(L,{className:"align-items-center mb-n1 mt-1"},a().createElement(I.C,{type:I.g.Duration,data:p.M.getDuration(e.video)}),p.M.isVideo(t)&&a().createElement(a().Fragment,null,a().createElement(I.C,{type:I.g.Rating,data:t.rating}),t.hasSubtitle&&a().createElement("span",{className:"badge p-0"},a().createElement(d.x,{svgName:u.vn.CloseCaptionBadge})),a().createElement(I.C,{type:I.g.Interactive,data:t.hasInteractives})),a().createElement(I.C,{type:I.g.Duration,data:p.M.getDuration(e.video)})))))))}!function(e){e[e.Below=1]="Below",e[e.Overlay=2]="Overlay",e[e.Independent=3]="Independent"}(Z||(Z={}));var G;function $(e){var t=e.type,n=function(e){return e===G.Video?"b8kJW":e===G.Playlist?"eo2p2":""}(t),a=function(e){return e===G.Video?u.vn.PlayCircle:e===G.Playlist?u.vn.AddToPlaylists:""}(t);return r.createElement("div",{className:"lpwag"},r.createElement("div",{className:"qpc7L"}),r.createElement(d.x,{svgName:a,className:n}))}!function(e){e[e.Video=0]="Video",e[e.Playlist=1]="Playlist",e[e.Series=2]="Series"}(G||(G={}));var J=n(9579),ee=n(74421),te={unchecked:"maxOx",checked:"k3CBB"};function ne(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 re=l.T.encloseNamespace("shared.toggleActivityStatusButton");function ae(e){var t,n,a=(0,m.Z)(),i=(t=r.useState(e.activityStatus===J.T.Complete),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return ne(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)?ne(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=i[0],c=i[1];r.useEffect((function(){c(e.activityStatus===J.T.Complete)}),[e.activityStatus]);var l="cursor-pointer rounded-circle ".concat(o?te.checked:te.unchecked);return e.className&&(l+=" ".concat(e.className)),e.shareId&&e.activityStatus&&e.activityStatus!==J.T.None&&s.q.isFunction(e.setActivityStatus)?r.createElement("div",{className:l,onClick:function(){var t=!o;c(t);var n=t?J.T.Complete:J.T.Incomplete;e.setActivityStatus(e.shareId,e.sharedEntity,n,null,(function(){a.error(re(function(){switch(e.sharedEntity.typeId){case ee.E.Video:return t?"completeVideoActivityError":"uncompleteVideoActivityError";case ee.E.Clip:return t?"completeClipActivityError":"uncompleteClipActivityError";case ee.E.Interactive:return t?"completeInteractiveActivityError":"uncompleteInteractiveActivityError";case ee.E.Playlist:return t?"completePlaylistActivityError":"uncompletePlaylistActivityError";case ee.E.Series:return t?"completeSeriesActivityError":"uncompleteSeriesActivityError"}}())),c(!t)}))}},r.createElement(d.x,{svgName:u.vn.Check,size:d.S.Large,className:"svg-container ".concat(te.checkMark)})):r.createElement(r.Fragment,null)}var ie="efxnE",oe="vWvGn";function ce(e){return p.M.getCanBeConsumed(e.video).canNavigate?function(e){var t;return!(null===(t=p.M.getCanBeConsumed(e.video))||void 0===t?void 0:t.canConsume)||!(!s.q.isFunction(e.setFavourite)||!s.q.isFunction(e.canFavourite))||!!s.q.isFunction(e.setActivityStatus)}(e)?a().createElement("div",{className:"".concat(ie," d-flex align-items-center")},a().createElement(E,{setFavourite:e.setFavourite,canFavourite:e.canFavourite,video:e.video,className:oe,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions}),a().createElement(ae,{activityStatus:e.activityStatus,setActivityStatus:e.setActivityStatus,sharedEntity:e.sharedEntity,shareId:e.shareId,className:oe})):a().createElement(a().Fragment,null):a().createElement("div",{className:ie},a().createElement(M,null))}var le=n(32557);function se(e){return e.audience?r.createElement("div",{className:"audience-label border rounded-pill d-inline-block px-2 mt-1 text-nowrap \n ".concat("border-"+e.border," ").concat(e.className?e.className:"")},e.audience.name):r.createElement(r.Fragment,null)}var ue={titleOverlay:"krg9f",clip:"MPRU6",large:"g5_ww",interactive:"Zzo3e",titleBelow:"tZjPt",overlayContainer:"EElm1",audienceSizeBadges:"OayBh",videoTypeBadge:"pwC3i",badgeContainer:"VAx36",gradient:"LS_EH"};function de(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}function me(e){var t=ue.badgeContainer;return p.M.isVideo(e)?t+=" "+ue.video:p.M.isClip(e)?t+=" "+ue.clip:p.M.isInteractive(e)&&(t+=" "+ue.interactive),t}function ve(e){var t,n=e.video,r=e.seriesAppLink,i=e.textPosition,o=e.appLink,s=i===Z.Overlay,u=p.M.getCanBeConsumed(e.video).canNavigate,d="";return s?(d=ue.titleOverlay,u&&(p.M.isClip(n)&&(d+=" "+ue.clip),p.M.isInteractive(n)&&(d+=" "+ue.interactive))):d=ue.titleBelow,a().createElement("div",{className:d},p.M.isVideo(n)&&p.M.hasSeries(n)&&a().createElement(A.M,{className:s?"text-shadow clamp-1":"clamp-2",video:n,appLink:s?null:r,analyticsOptions:{location:c.LocationContext.VideoThumbnail}}),s||!u?a().createElement("span",{className:"h6 text-reset text-shadow clamp-1"},null!==(t=n.name)&&void 0!==t?t:l.T.getPhrase("shared.staticVideoThumbnail","videoUnavailable")):a().createElement(k.F,{className:"h6 text-reset clamp-2",appLink:o},n.name))}function fe(e){var t,n,r=e.video,i=e.appLink,o=e.textPosition,l=e.imageOptions,s=e.setFavourite,u=e.preload,d=(t=(0,le.X)(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return de(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)?de(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.")}()),m=d[0],v=d[1],f=p.M.getCanBeConsumed(r).canNavigate,y="position-relative";y+=i&&f?" cursor-pointer":" cursor-default",e.extraClasses&&(y+=" ".concat(e.extraClasses)),o===Z.Overlay&&(y+=" rounded overflow-hidden");var h=Object.assign(Object.assign({},e.analyticsOptions),{entity:p.M.getAnalyticsEntity(r)}),b="rounded-lg overflow-hidden";o===Z.Overlay&&(b+=" "+ue.gradient);var E=!!i&&!e.hideMask&&f,w=p.M.getPrivacyReasoning(e.video),N=function(){if(!e.hideRating&&p.M.isVideo(e.video))return e.video.rating}(),C=!p.M.isVideo(e.video);return a().createElement(_.u,{title:w,spanHack:!0,spanHackClassName:""},a().createElement("div",{className:y,ref:m},a().createElement(ce,{video:r,shareId:e.shareId,sharedEntity:e.sharedEntity,activityStatus:e.activityStatus,setActivityStatus:e.setActivityStatus,setFavourite:s,canFavourite:function(){var t;return(null===(t=e.canFavourite)||void 0===t?void 0:t.call(e,e.video))&&g.showFavouriteButton(r,v)},analyticsData:e.analyticsData,analyticsOptions:h}),a().createElement(x,{data:p.M.getThumbnail(r),appLink:f?i:null,imageType:j.__.Thumbnails,imageOptions:l,preload:u,className:b,analyticsData:Object.assign(Object.assign({},e.analyticsData),{id:r.id,name:r.name}),analyticsOptions:Object.assign(Object.assign({},h),{actionType:c.UserAction.Click,descriptor:c.ClickDescriptor.Thumbnail})},E&&a().createElement($,{type:G.Video}),a().createElement(H,{type:D.Video}),a().createElement("div",{className:ue.overlayContainer},o===Z.Overlay&&a().createElement(ve,Object.assign({},e)),a().createElement(F,{video:r}),C&&a().createElement("div",{className:ue.videoTypeBadge},a().createElement(Q,{video:r,size:e.videoTypeBadgeSize})),(!e.hideDuration||e.audience||!e.hideRating&&N)&&a().createElement(L,{className:"".concat(e.audienceSizeBadges?ue.audienceSizeBadges:""," ").concat(me(e.video))},a().createElement(se,{audience:e.audience,className:"bg-white text-dark mr-1",border:"dark"}),!e.hideRating&&N&&a().createElement(I.C,{type:I.g.Rating,data:N}),!e.hideDuration&&a().createElement(I.C,{type:I.g.Duration,data:p.M.getDuration(e.video)})))),o===Z.Below&&a().createElement(ve,Object.assign({},e))))}var pe=/\d/,ge=n(73516),ye=/([0-9]+)/gi,he=/\s|\+/gi,be={getSortedPresentationAudiences:function(e,t){var n=e.filter((function(e){return!!e})).map((function(e){return e.id.toString()}));return t.filter((function(e){return n.includes(e.masterId.toString())}))},getMergedPresentationAudienceString:function(e){if(1===e.length)return e[0];var t,n,r,a,i,o,c,l,s,u="";switch(+v.m.first(e).presentationId){case ge.e.PresentationIds.DEFAULT:case ge.e.PresentationIds.AU_SECONDARY:case ge.e.PresentationIds.US_ELEMENTARY:case ge.e.PresentationIds.AU_PRIMARY:u=function(e){var t=e.map((function(e){return e.name})).join(" "),n=t.split(" ").filter((function(e){return!isNaN(+e)})).map((function(e){return+e}))||[],r=t.split(" ").filter((function(e){return isNaN(+e)}))||[],a=e.find((function(e){return!pe.test(e.name)})),i=r.find((function(e){return e!==(null==a?void 0:a.name)}));if(e.length>1&&(i+="s"),a&&n.length)return"".concat(i," ").concat(a.name.charAt(0)," - ").concat(n.pop());var o=function(e){var t,n,r,a,i=!1,o=[];for(e=e.sort((function(e,t){return e-t})),r=0;r<e.length;r++)a=r+1,i||(t=e[r]),n=e[a],e[r]+1===n?i=!0:i?(o.push("".concat(t," - ").concat(e[r])),i=!1):(o.push("".concat(e[r])),i=!1);return o}(n);return"".concat(i," ").concat(o.join(", "))}(e);break;case ge.e.PresentationIds.SCOTLAND_PRIMARY:case ge.e.PresentationIds.SCOTLAND_SECONDARY:case ge.e.PresentationIds.INTERNATIONAL_PRIMARY:case ge.e.PresentationIds.INTERNATIONAL_SECONDARY:u=function(e){var t=e.map((function(e){return e.name})),n={};t.forEach((function(e,t){if(0!==t){var r=e.split(" ");Object.keys(n).forEach((function(e){r.includes(e)||delete n[e]}))}else e.split(" ").forEach((function(e,t){n[e]=0===t?"start":"end"}))}));var r=Object.keys(n)[0],a=n[r];if(!r)return e[0].name;var i=e[0].name,o=e[e.length-1].name,c=function(e){return e.split(r)[0]},l="".concat(c(i)," - ").concat(c(o));return"start"===a?"".concat(r," ").concat(l):"".concat(l," ").concat(r)}(e);break;case ge.e.PresentationIds.ENGLAND_PRIMARY:t=e,n=v.m.first(t),r=v.m.last(t),a=n.name.split(" ").find((function(e){return!isNaN(+e)})),i=r.name.split(" ").find((function(e){return!isNaN(+e)})),o="KS".concat(a),c="KS".concat(i),l=v.m.first(n.name.split(" ")),s=v.m.first(r.name.split(" ")),"key"!==l.toLowerCase()&&(o=a?"".concat(l," ").concat(o):n.name),"key"!==s.toLowerCase()&&(c="".concat(s," ").concat(c)),u="".concat(o," - ").concat(c);case ge.e.PresentationIds.US_MIDDLE:case ge.e.PresentationIds.US_HIGH:}return u?{name:u}:null},sortMembersWithDuplicateNamesByAudience:function(e){var t=function(e){return e.length?(e.forEach((function(e){var r=+v.m.first(e.name.match(ye));if(!t)return t=e,void(n=r);r<n&&(t=e)})),t):null;var t,n},n={},r=[];return e.forEach((function(e){if(!n[e.name])return n[e.name]=1,void r.push(e);r.push(e),n[e.name]++;var a=r.splice(r.length-n[e.name]).sort((function(e,n){var r=t(e.subjectPresentationAudiences.data),a=t(n.subjectPresentationAudiences.data);if(!r&&a)return 1;if(!a)return-1;var i=r.name.localeCompare(a.name);return 0===i?i:i>0?-1:1}));r=r.concat(a)})),r},getActiveAudiencesFromParams:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(w.t.isObject(t)&&!w.t.isEmpty(t)&&e&&e.length&&be.shouldShowAudiences(e)){var n=t.a;if(n){"string"==typeof n&&(n=[n]);var r=function(e){return e.replace(he,"").toLowerCase()},a=n.reduce((function(e,t){return e[r(t)]=t,e}),{});return e.filter((function(e){return a[r(e.name)]}))}}},getAudienceParams:function(e){return(null==e?void 0:e.length)?{a:e.map((function(e){return e.name}))}:null},shouldShowAudiences:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return!!e&&e.length>1}},Ee=function(e){var t=e.mergedAudience,n=e.video;return t?a().createElement("div",{className:"mt-n1 ".concat("hvsne")},a().createElement(se,{audience:t,border:"dark"})):p.M.isVideo(n)&&(null==n?void 0:n.rating)?a().createElement(I.C,{type:I.g.Rating,data:n.rating}):null};function we(e){var t,n,r,i,o=e.video,l=e.appLink,s=e.seriesAppLink,u=p.M.getCanBeConsumed(o),d=null===(t=null==o?void 0:o.subjectPresentationAudiences)||void 0===t?void 0:t.data,m=(n=d,r=e.presentationAudiences,i=a().useMemo((function(){return(null==n?void 0:n.length)&&r&&be.shouldShowAudiences(r)?be.getSortedPresentationAudiences(n,r):null}),[n]),a().useMemo((function(){return(null==i?void 0:i.length)?be.getMergedPresentationAudienceString(i):null}),[i]));return a().createElement("div",{className:"mt-2 d-flex justify-content-between"},a().createElement("div",{className:"d-flex flex-column ".concat("rULXI")},p.M.isVideo(o)&&p.M.hasSeries(o)&&a().createElement(A.M,{className:"text-truncate ".concat("h9k1p"),video:o,appLink:s,analyticsOptions:{location:c.LocationContext.VideoThumbnail}}),a().createElement(k.F,{className:"h6 text-reset clamp-2",appLink:u.canConsume?l:null},o.name)),a().createElement("div",{className:"".concat("QaDDX"," ml-2")},a().createElement(Ee,{video:o,mergedAudience:m})))}var Ne,Ce,Se=n(30314),Oe=(Ne=function(e,t){return Ne=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Ne(e,t)},function(e,t){function n(){this.constructor=e}Ne(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),ke="html",Pe="svg",je=function(e){var t,n,r,a={};if(e===ke)r=document.createElement("div");else{if(e!==Pe)throw new Error('Invalid element type "'+e+'" for createPortalNode: must be "html" or "svg".');r=document.createElementNS("http://www.w3.org/2000/svg","g")}var i={element:r,elementType:e,setPortalProps:function(e){a=e},getInitialPortalProps:function(){return a},mount:function(r,a){if(a!==n){if(i.unmount(),r!==t&&!function(e,t){if(t===ke)return e instanceof HTMLElement;if(t===Pe)return e instanceof SVGElement;throw new Error('Unrecognized element type "'+t+'" for validateElementType.')}(r,e))throw new Error('Invalid element type for portal: "'+e+'" portalNodes must be used with '+e+" elements, but OutPortal is within <"+r.tagName+">.");r.replaceChild(i.element,a),t=r,n=a}},unmount:function(e){e&&e!==n||t&&n&&(t.replaceChild(n,i.element),t=void 0,n=void 0)}};return i},Te=function(e){function t(t){var n=e.call(this,t)||this;return n.addPropsChannel=function(){Object.assign(n.props.node,{setPortalProps:function(e){n.setState({nodeProps:e})}})},n.state={nodeProps:n.props.node.getInitialPortalProps()},n}return Oe(t,e),t.prototype.componentDidMount=function(){this.addPropsChannel()},t.prototype.componentDidUpdate=function(){this.addPropsChannel()},t.prototype.render=function(){var e=this,t=this.props,n=t.children,a=t.node;return Se.createPortal(r.Children.map(n,(function(t){return r.isValidElement(t)?r.cloneElement(t,e.state.nodeProps):t})),a.element)},t}(r.PureComponent),xe=(function(e){function t(t){var n=e.call(this,t)||this;return n.placeholderNode=r.createRef(),n.passPropsThroughPortal(),n}Oe(t,e),t.prototype.passPropsThroughPortal=function(){var e=Object.assign({},this.props,{node:void 0});this.props.node.setPortalProps(e)},t.prototype.componentDidMount=function(){var e=this.props.node;this.currentPortalNode=e;var t=this.placeholderNode.current,n=t.parentNode;e.mount(n,t),this.passPropsThroughPortal()},t.prototype.componentDidUpdate=function(){var e=this.props.node;this.currentPortalNode&&e!==this.currentPortalNode&&(this.currentPortalNode.unmount(this.placeholderNode.current),this.currentPortalNode=e);var t=this.placeholderNode.current,n=t.parentNode;e.mount(n,t),this.passPropsThroughPortal()},t.prototype.componentWillUnmount=function(){this.props.node.unmount(this.placeholderNode.current)},t.prototype.render=function(){return r.createElement("div",{ref:this.placeholderNode})}}(r.PureComponent),je.bind(null,ke)),Ae=(je.bind(null,Pe),n(31647)),Le=n(11306),Ie=a().createContext({}),Re=n(90547),Fe=n(5256);function Me(){var e=(0,Fe.a)(Re.r.XS),t=(0,Fe.a)(Re.r.SM),n=(0,Fe.a)(Re.r.MD),r=(0,Fe.a)(Re.r.LG),a=(0,Fe.a)(Re.r.XL),i=(0,Fe.a)(Re.r.XXL),o=Re.r.LG;return e&&(o=Re.r.XS),t&&(o=Re.r.SM),n&&(o=Re.r.MD),r&&(o=Re.r.LG),a&&(o=Re.r.XL),i&&(o=Re.r.XXL),o}!function(e){e.Left="8px",e.Right="calc(100% - 8px) 50%",e.Center="center"}(Ce||(Ce={}));function De(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ve(e,t):void 0}}(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 Ve(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}function Ue(e){var t,n,r=e.hoverableComponent,i=e.componentProps,o=e.minHoverWidth,c=a().useContext(Ie).setPreviewContentNode;void 0===c&&Ae.Q.ErrorHelper.throw(new Le.H("Please use VideoPreviewContext inside a VideoPreviewContextProvider"));var l=Me(),s=a().useMemo((function(){return xe()}),[]),u=De((0,le.L)({delay:0}),2),d=u[0],m=u[1],v=De((0,le.X)(),2),f=v[0],p=v[1],g=a().useRef(null),y=a().useRef(!1),h=m||p;a().useEffect((function(){y.current!==h&&(c(h?s:null),y.current=h)}),[h]);var b=(null===(n=null===(t=g.current)||void 0===t?void 0:t.getBoundingClientRect)||void 0===n?void 0:n.call(t))||{},E=b.x,w=b.y,N=b.width,C=b.height,S=a().useMemo((function(){return function(e,t,n){var r=e.x,a=e.y,i=e.width,o=e.height,c=1.2,l=document.getElementById("content-width-reference");if(!l)return{};var s,u=i*c,d=o*c,m=c;s=r-i*(c-1)/2;var v=a-o*(c-1)/2+window.scrollY;u<n&&(s-=(n-u)/2,d=o*(m=(u=n)/i));var f=s,p=Ce.Center;return s-l.offsetLeft<8&&(f=r-4,p=Ce.Left),l.offsetWidth+l.offsetLeft-(s+u)<8&&(f=r-i*(m-1)+8,p=Ce.Right),{left:f,top:v,height:d,width:u,transformOrigin:p,position:"absolute",realScale:m}}({x:E,y:w,width:N,height:C},0,o)}),[E,w,N,C,l]),O=r;return a().createElement("div",{ref:g},a().createElement("div",{ref:d},a().createElement(O,Object.assign({isHovering:!1},i))),h&&a().createElement(Te,{node:s},a().createElement("div",{className:"".concat("jO7pW"),style:S,ref:f},a().createElement(O,Object.assign({isHovering:!0,hoverPositionConfig:S},i)))))}Ue.ReferenceContainer=function(e){return a().createElement("div",{id:"content-width-reference"},e.children)};function _e(e){return a().createElement("div",{className:"p-1 pr-2 badge-pill d-inline-flex align-items-center mr-1 cursor-pointer ".concat("OjHQZ"," ").concat(e.active?"kD1xM":"")},a().createElement(d.x,{className:"".concat("SS2zL"," rounded-circle bg-").concat(e.iconVariant," text-white"),svgName:e.svgName}),a().createElement("span",{className:"pl-1 text-nowrap"},e.text))}var qe=a().forwardRef((function(e,t){return a().createElement("div",{ref:t},a().createElement(_e,{svgName:u.vn.Video,iconVariant:"blue",text:l.T.getPhrase("shared.whatsIncluded","whatsIncluded"),active:e.active}))})),Be=a().forwardRef((function(e,t){return a().createElement("div",{ref:t},a().createElement(_e,{svgName:u.vn.StarOutline,iconVariant:"navy",text:l.T.getPhrase("shared.whyThisVideo","whyThisVideo"),active:e.active}))})),ze=n(89603),He=n(66703),Xe=n(34564),Qe=n(91807);function Ze(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}function Ye(e){var t;switch(null===(t=e.tagType)||void 0===t?void 0:t.toLowerCase()){case ze.Q.Pedagogy:return 0;case ze.Q.Skill:return 1;default:return 2}}function We(e){if(!e.tags)return a().createElement(a().Fragment,null);var t,n=(t=e.tags,function(e){if(Array.isArray(e))return Ze(e)}(t)||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 Ze(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)?Ze(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.")}()).sort((function(e,t){return Ye(e)-Ye(t)}));return a().createElement("div",{className:Qe.Z.tagList},n.map((function(t){var n="function"==typeof e.getAppLink?e.getAppLink(t):null,r="function"==typeof e.onRemove?function(){return e.onRemove(t)}:null;return a().createElement(Xe.z,{key:t.id,tag:t,appLink:n,themeColours:e.themeColours,onRemove:r})})))}var Ke="KQ5Wt",Ge="shared.whyThisVideo";function $e(e){var t,n,r,i,o,c,l=null!==(r=null===(n=null===(t=e.video.tags)||void 0===t?void 0:t.data)||void 0===n?void 0:n.filter((function(e){return e.tagType===ze.Q.Pedagogy})))&&void 0!==r?r:[],s=null!==(c=null===(o=null===(i=e.video.tags)||void 0===i?void 0:i.data)||void 0===o?void 0:o.filter((function(e){return e.tagType===ze.Q.Skill})))&&void 0!==c?c:[];return a().createElement(a().Fragment,null,!!l.length&&a().createElement("h3",{className:"font-size-normal font-weight-500"},a().createElement(He.x,{namespace:Ge,phrase:"pedagogy"})),l.map((function(e){return a().createElement("div",{key:e.name,className:"px-2 py-3 rounded-lg ".concat(Ke)},a().createElement(Xe.z,{tag:e}),e.description&&a().createElement("p",{className:"mb-n2 pt-2"},e.description))})),!!s.length&&a().createElement(a().Fragment,null,a().createElement("h3",{className:"font-size-normal font-weight-500"},a().createElement(He.x,{namespace:Ge,phrase:"skills"})),a().createElement("div",{className:"p-2 rounded-lg ".concat(Ke)},a().createElement(We,{tags:s}))))}var Je=n(68003),et=n(52076),tt=n(86257),nt="I9E5O",rt={width:200,resizeType:j.Nq.Cover};function at(e,t){var n,r,a;if("thumbnail"in t&&(null===(n=t.thumbnail)||void 0===n?void 0:n.url))return P.j.createUrl(null===(r=t.thumbnail)||void 0===r?void 0:r.url,Object.assign({},rt));var i=Je._.safeUrlConcat(e,"/v1/previews");return"metadata"in t?t.metadata.type===tt.L.Pdf?P.j.createResourceImage(i,t.url,rt):t.metadata.type===tt.L.Image?P.j.createUrl(t.url,{size:j.h2.Medium,resizeType:j.Nq.Cover}):(null===(a=t.pdf)||void 0===a?void 0:a.url)?P.j.createResourceImage(i,t.pdf.url,rt):(t.metadata.type,tt.L.Zip,"/images/zip-resource.png"):P.j.createResourceImage(i,t.url,Object.assign({},rt))}function it(e){var t;return"metadata"in e?e.metadata.type===tt.L.Pdf?j.__.Pdf:e.metadata.type===tt.L.Image?j.__.Thumbnails:(null===(t=e.pdf)||void 0===t?void 0:t.url)?j.__.Pdf:(e.metadata.type,tt.L.Zip,j.__.Thumbnails):j.__.Link}function ot(e){var t,n,r,i,o,l,s,u=null,d=0;"metadata"in e.data&&(u=e.data.metadata,d=null!==(r=null===(n=null===(t=e.data.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==r?r:0);var m="".concat(null!==(o=null===(i=e.theme)||void 0===i?void 0:i.containerClass)&&void 0!==o?o:""," pt-3 px-3 rounded-lg d-flex flex-column align-items-center")+" justify-content-end ".concat(function(e){switch(e){case"atom-guide":return"X39wU";case"student-activity":return"X9pMl";case"teacher-pack":return"_tdVE";case"additional-materials":return"qRVUo";default:return"_18JaV"}}(null==u?void 0:u.resourceType)," ").concat("s1dNr"," ").concat(e.applyHoverState?"xRYhX":""," ");return a().createElement("div",{className:m},!e.hideHeading&&a().createElement(_.u,{title:e.data.name},a().createElement("h3",{className:"text-center text-break h5 mb-3 ".concat("g5NWS")},a().createElement("span",{className:"clamp-1"},e.data.name))),a().createElement("div",{className:"".concat(null!==(s=null===(l=e.theme)||void 0===l?void 0:l.thumbnailContainerClass)&&void 0!==s?s:""," w-75 overflow-hidden ").concat("EDiGi"," ").concat(nt)},a().createElement(x,{data:at(e.imageCdnUrl,e.data),imageType:it(e.data),imageStyle:{transform:"rotate(".concat(d,"deg)")},analyticsOptions:{location:c.LocationContext.SlidingListItem},errorFallbackImageSrc:e.imageErrorFallbackUrl,imageClassName:(null==u?void 0:u.type)===tt.L.Image?"".concat("KYtZL"," ").concat(nt):"",preload:!0})))}a().memo((function(e){var t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}(e,[]),n=Me(),r=n===Re.r.SM||n===Re.r.XS,i=Object.assign(Object.assign({},e.analyticsData),e.data),o=Object.assign(Object.assign({},e.analyticsOptions),{actionType:c.UserAction.Click,entity:e.data.typeId===ee.E.Resource?c.EntityType.Resource:c.EntityType.Link});function l(){et.k.logUserAction(i,o)}var s,u,d,m=!(r||(s=e.data,"resource"!==s.type||!("metadata"in s)||s.metadata.type!==tt.L.Image&&(s.metadata.type===tt.L.Pdf?!s.url:!(null===(u=s.pdf)||void 0===u?void 0:u.url)))),v=!!e.data.url;return t.applyHoverState=m||v,a().createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat("tqUFn")},(d="d-block no-decoration","link"===e.data.type?a().createElement("a",{href:e.data.url,target:"_blank",className:d,onClick:l},a().createElement(ot,Object.assign({},t))):m?a().createElement(k.F,{appLink:e.getAppLink(e.data),className:d,analyticsData:i,analyticsOptions:o},a().createElement(ot,Object.assign({},t))):v?a().createElement("a",{href:e.data.url,className:d,onClick:l},a().createElement(ot,Object.assign({},t))):a().createElement("div",{className:d},a().createElement(ot,Object.assign({},t)))))}));var ct=n(6697);function lt(e){return a().createElement("div",{className:"".concat("c4Hun"," p-2 rounded-lg")},a().createElement("div",{className:"d-flex align-items-center"},a().createElement("div",{className:"".concat("telfV"," bg-").concat(e.iconVariant," text-white rounded-circle")},a().createElement(d.x,{svgName:e.svgName})),a().createElement("div",{className:"pl-2 font-weight-500"},e.text)),e.children)}var st=l.T.encloseNamespace("shared.whatsIncluded");function ut(e){var t,n,r,i,o,c,l,s=null===(n=null===(t=e.video.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length,m=null===(i=null===(r=e.video.resources)||void 0===r?void 0:r.data)||void 0===i?void 0:i.length,v=null!==(l=null===(c=null===(o=e.video.subtitles)||void 0===o?void 0:o.data)||void 0===c?void 0:c.map((function(t){var n,r;return ct.y.getEnglishName(t,null!==(r=null===(n=e.video.subtitles)||void 0===n?void 0:n.data)&&void 0!==r?r:[])})))&&void 0!==l?l:[];return a().createElement(a().Fragment,null,s>0&&a().createElement(lt,{text:st("totalInteractives",{smartCount:s}),svgName:u.vn.Interactive,iconVariant:"green"}),m>0&&a().createElement(lt,{text:st("totalResources",{smartCount:m}),svgName:u.vn.Resources,iconVariant:"indigo"},a().createElement("div",{className:"row no-gutters mx-n1 pt-2"},e.video.resources.data.slice(0,3).map((function(t){return a().createElement("div",{key:t.id,className:"col-4 px-1"},a().createElement(ot,{data:t,imageCdnUrl:e.imageCdnUrl,theme:{containerClass:"bdBNU",thumbnailContainerClass:"QN5kl"},hideHeading:!0}))})))),!!(null==v?void 0:v.length)&&a().createElement(lt,{text:st("videoSettings"),svgName:u.vn.Cog,iconVariant:"dark"},a().createElement("div",{className:"d-flex align-items-center pt-1"},a().createElement(d.x,{svgName:u.vn.CloseCaptionBadge}),a().createElement("div",{className:"pl-1"},v.join(", ")))))}var dt={badgeContainer:"Qx6jT",videoTypeBadge:"qz_5t",preview:"whbhf",details:"vMaXP",videoGuidanceTags:"KJrT1",dropdown:"oZXV7",show:"EiQ04",topRightContainer:"FAuzc"};function mt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return vt(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)?vt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vt(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 ft=function(e){var t=e.video,n=e.appLink,r=e.imageOptions,o=e.preload,l=e.setFavourite,s=e.canFavourite,u=e.isHovering,d=e.hoverPositionConfig,m=p.M.getCanBeConsumed(t).canNavigate,v=!p.M.isVideo(t),f=mt(a().useState("none"),2),y=f[0],h=f[1],b=mt(a().useState(!1),2),w=b[0],N=b[1],C=mt((0,le.X)(),2),S=C[0],O=C[1],k=mt((0,le.X)(),2),P=k[0],T=k[1],A=a().useMemo((function(){return p.M.showWhyThisVideo(t)}),[t]),R=a().useMemo((function(){return p.M.showWhatsIncluded(t)}),[t]);a().useEffect((function(){O&&"why-this-video"!==y?h("why-this-video"):T&&"whats-included"!==y&&h("whats-included")}),[O,T,y]);var V="position-relative bg-white";e.extraClasses&&(V+=" ".concat(e.extraClasses)),u&&(V+=" rounded-lg shadow-lg");var U=Object.assign(Object.assign({},e.analyticsOptions),{entity:p.M.getAnalyticsEntity(t)}),q=g.showFavouriteButton(e.video,u),B=R||A,z="none"!==y;return a().createElement("div",{className:V},q&&a().createElement("div",{className:dt.topRightContainer},a().createElement(E,{setFavourite:l,canFavourite:s,video:t,analyticsData:e.analyticsData,analyticsOptions:U})),!m&&a().createElement("div",{className:dt.topRightContainer},a().createElement(_.u,{title:p.M.getPrivacyReasoning(e.video),spanHack:!0,spanHackClassName:""},a().createElement(M,null))),a().createElement("div",{style:{width:null==d?void 0:d.width,height:null==d?void 0:d.height,transform:"all 1s cubic-bezier(.86,0,.07,1)"}},a().createElement(x,{data:p.M.getThumbnail(t),appLink:m?n:null,imageType:j.__.Thumbnails,imageOptions:r,preload:o,className:"overflow-hidden ".concat(u?dt.preview:"rounded-lg ".concat(dt.original)),analyticsData:Object.assign(Object.assign({},e.analyticsData),{id:t.id,name:t.name}),analyticsOptions:Object.assign(Object.assign({},U),{actionType:c.UserAction.Click,descriptor:c.ClickDescriptor.Thumbnail})},a().createElement(H,{type:D.Video}),a().createElement(F,{video:t}),a().createElement("div",{className:"p-absolute w-100 h-100 p-1 text-white"},v&&a().createElement("div",{className:dt.videoTypeBadge},a().createElement(Q,{video:t})),!e.hideDuration&&a().createElement(L,{className:dt.badgeContainer},a().createElement(I.C,{type:I.g.Duration,data:p.M.getDuration(e.video)}))))),u&&a().createElement("div",{className:"".concat(u?dt.details:"")},a().createElement("div",{className:"".concat(w?"box-shadow":""," ").concat(u?dt.videoGuidanceTags:"")},a().createElement(we,Object.assign({},e)),B&&u&&a().createElement("div",{className:"d-flex justify-content-start align-items-center pt-2"},A&&a().createElement(Be,{ref:S,active:"why-this-video"===y}),R&&a().createElement(qe,{ref:P,active:"whats-included"===y}))),B&&u&&a().createElement(i.ZP,{autoHeight:!0,autoHeightMax:192,onUpdate:function(e){var t=e.top;w&&0===t?N(!1):!w&&t>0&&N(!0)}},a().createElement("div",{className:"".concat(dt.dropdown," ").concat(z?dt.show:"")},"why-this-video"===y&&a().createElement($e,{video:e.video}),"whats-included"===y&&a().createElement(ut,{video:e.video,imageCdnUrl:e.imageCdnUrl})))))};function pt(e){return a().createElement(a().Fragment,null,a().createElement(Ue,{hoverableComponent:ft,componentProps:e,minHoverWidth:340}),a().createElement(we,Object.assign({},e)))}function gt(e){var t=Object.assign({},e);switch(e.type){case"static":return r.createElement(fe,Object.assign({},t));case"expandable":return r.createElement(K,Object.assign({},t));case"popout":return r.createElement(pt,Object.assign({},t));default:return}}gt.defaultProps={hideRating:!0};var yt=n(99910),ht=n(64038);function bt(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}function Et(e){var t,n,a=(t=ht.useInView(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return bt(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)?bt(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],o=a[1];return r.useEffect((function(){var t;e.fetchOnScroll&&o&&!e.isFetching&&(null===(t=e.fetchNext)||void 0===t||t.call(e,e.nextCursor))}),[o,e.isFetching]),r.createElement("div",{className:"p-3 text-center ".concat("VwD1b"),ref:i},e.isFetching?r.createElement(yt.Spinner,{as:"span",animation:"border",role:"status",className:"eJ85e"}):r.createElement(d.x,{svgName:u.vn.ChevronDown,className:"svg-container cursor-pointer",size:d.S.Large,onClick:function(){var t;return null===(t=e.fetchNext)||void 0===t?void 0:t.call(e,e.nextCursor)}}))}Et.defaultProps={fetchOnScroll:!1};var wt=n(50072),Nt=n(65402),Ct=n(70868);function St(e){var t,n,r=e.libraryRequest,i=r.sender&&"".concat(r.sender.name," ").concat(r.sender.surname),l=(null===(t=r.object)||void 0===t?void 0:t.name)||r.name;return a().createElement(k.F,{className:"d-flex py-3 px-3 text-decoration-none ".concat("GyyRT"," ").concat(e.active?"aVNhj":""),appLink:Object.assign(Object.assign({},e.appLink),{args:[r.id],params:e.queryParams}),onClick:function(){return Ct.t.preventScrollTop()}},a().createElement("div",{className:"col-5 px-0"},a().createElement(gt,{video:null!==(n=r.object)&&void 0!==n?n:{},type:"static",imageOptions:{size:j.h2.Small},textPosition:Z.Independent,analyticsOptions:{location:c.LocationContext.LibraryRequestDetails},hideMask:!0})),a().createElement("div",{className:"col-7 pr-0"},a().createElement("div",{className:"d-flex justify-content-between w-100"},a().createElement("div",{className:"overflow-hidden"},a().createElement(A.M,{video:r.object,analyticsOptions:{location:c.LocationContext.LibraryRequestDetails}}),!!l&&a().createElement("h5",{className:"m-0 mb-0 h6",title:l},a().createElement("span",{className:"text-truncate pb-1 d-block ".concat("NjJLh")},l))),r.status!==wt.l.Pending&&a().createElement("div",{className:"flex-shrink-0 ml-1"},a().createElement(Nt.h,{status:r.status}))),!!i&&a().createElement("div",null,a().createElement(He.x,{namespace:"libraryRequests.leftNav",phrase:"requestedBy",options:{fullName:i}})),a().createElement("div",null,(0,o.WU)(r.dateCreated))))}function Ot(e){return a().createElement("div",{className:"".concat("uQ6as"," bg-white rounded overflow-hidden")},a().createElement(i.ZP,{hideTracksWhenNotNeeded:!0},e.libraryRequests.map((function(t,n){return a().createElement(St,{libraryRequest:t,key:n,active:e.selectedId===t.id,appLink:e.appLink,queryParams:e.queryParams})})),(e.nextCursor||e.isFetching)&&a().createElement(Et,{isFetching:e.isFetching,fetchNext:e.fetchNext,nextCursor:e.nextCursor,fetchOnScroll:!0})))}},7044:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var r=n(1024),a=n.n(r);function i(){return a().createElement("div",{className:"d-flex p-3"},a().createElement("div",{className:"col-5 px-0"},a().createElement("div",{className:"responsive-img partial-loading-background rounded"})),a().createElement("div",{className:"col-7 pr-0"},a().createElement("div",{className:"partial-loading-background mb-1",style:{height:"1.25rem",width:"9rem"}}),a().createElement("div",{className:"partial-loading-background",style:{height:"1rem",width:"4rem"}})))}function o(){return a().createElement("div",{className:"bg-white rounded"},Array(5).fill(null).map((function(e,t){return a().createElement(i,{key:t})})))}},17950:function(e,t,n){"use strict";n.d(t,{F:function(){return h}});var r=n(1024),a=n.n(r),i=n(57857),o=n(90335),c=n(53808),l=n(54753);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===s(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d="shared.videoSortSelect",m=c.q.memoize((function(){var e;return u(e={},o.D.RecentlyAdded,{name:i.T.getPhrase(d,"recentlyAdded")}),u(e,o.D.AtoZ,{name:i.T.getPhrase(d,"atoz")}),u(e,o.D.ZtoA,{name:i.T.getPhrase(d,"ztoa")}),u(e,o.D.Newest,{name:i.T.getPhrase(d,"newest")}),u(e,o.D.Oldest,{name:i.T.getPhrase(d,"oldest")}),u(e,o.D.Series,{name:i.T.getPhrase(d,"series")}),e}));function v(e){var t=e.sortTypes||m();return r.createElement("div",{className:"dropdown"},r.createElement("a",{className:"btn btn-".concat(e.variant," ml-2 dropdown-toggle"),type:"button",id:"sort-select","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},t[e.type].name),r.createElement("div",{className:"dropdown-menu dropdown-menu-right","aria-labelledby":"sort-select"},Object.keys(t).map((function(n){var a="dropdown-item";return n===e.type&&(a+=" active"),r.createElement(l.F,{key:n,className:a,appLink:e.getSortAppLink(n),analyticsData:{sort:t[n].name},analyticsOptions:e.analyticsOptions},t[n].name)}))))}v.defaultProps={variant:"light"};var f=n(70065);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function g(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===p(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=i.T.encloseNamespace("libraryRequests.sort");function h(e){var t,n=(g(t={},o.D.Newest,{name:y("newest")}),g(t,o.D.Oldest,{name:y("oldest")}),t);return a().createElement(v,{variant:"outline-dark",type:e.queryParams.sort||o.D.Newest,getSortAppLink:function(t){return Object.assign(Object.assign({},e.appLink),{params:Object.assign(Object.assign({},e.queryParams),{sort:t})})},sortTypes:n,analyticsOptions:{location:f.LocationContext.LibraryRequestDetails,entity:f.EntityType.LibraryRequest,actionType:f.UserAction.Sort,workflowPhase:f.WorkflowPhase.Complete}})}},65402:function(e,t,n){"use strict";n.d(t,{h:function(){return u},$:function(){return s}});var r=n(1024),a=n.n(r),i=n(39396),o=n(63791),c=n(50072),l=n(57857).T.encloseNamespace("libraryRequests.statusIcon");function s(e){switch(e){case c.l.Approved:return l("approved");case c.l.Closed:return l("closed");case c.l.Rejected:return l("rejected")}return""}function u(e){var t="",n="".concat("O2Czg"," text-white d-inline-block svg-container rounded-circle ");switch(e.status){case c.l.Approved:t=o.vn.Check,n+="bg-success";break;case c.l.Closed:t=o.vn.Minus,n+="bg-secondary";break;case c.l.Rejected:t=o.vn.Close,n+="bg-danger"}return a().createElement(i.x,{svgName:t,className:n,size:i.S.Small,title:s(e.status),tooltipSpanHack:!0,tooltipPlacement:"top"})}},9416:function(e,t,n){"use strict";n.d(t,{A:function(){return m}});var r=n(1024),a=n.n(r),i=n(58424),o=n(54753),c="hUJx1",l=n(52076);function s(e){var t;return a().createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},a().createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat("Hdi6o")},e.tabs.map((function(e){return a().createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?a().createElement(o.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"cursor-pointer d-block text-decoration-none text-reset px-2 ".concat(c)},e.name):a().createElement(i.L,{className:"".concat(c," px-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&l.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name))}))))}var u=n(50997),d=n(57857).T.encloseNamespace("libraryRequests.tabs");function m(e){var t=[{name:d("pending"),appLink:{application:u.OV.LIBRARY_REQUESTS,action:u.eX.LibraryRequests.PENDING_REQUESTS,args:[""]},active:"pending"===e.active},{name:d("past"),appLink:{application:u.OV.LIBRARY_REQUESTS,action:u.eX.LibraryRequests.PAST_REQUESTS,args:[""]},active:"past"===e.active}];return a().createElement("div",{className:"mb-3"},a().createElement(s,{tabs:t}))}},50072:function(e,t,n){"use strict";var r;n.d(t,{l:function(){return r}}),function(e){e.Pending="Pending",e.Approved="Approved",e.Rejected="Rejected",e.Closed="Closed"}(r||(r={}))},41026:function(e,t,n){"use strict";n.d(t,{K:function(){return l}});var r=n(1024),a=n.n(r),i=n(57857),o=n(89375),c=i.T.encloseNamespace("libraryRequests.libraryRequestTitle");function l(e){var t,n=(null===(t=null==e?void 0:e.object)||void 0===t?void 0:t.name)||(null==e?void 0:e.name),r=c("title")+(n?" - ".concat(n):"");a().useEffect((function(){return o.j.setPageTitle(r)}),[r])}},59198:function(e,t,n){"use strict";n.d(t,{s:function(){return o}});var r=n(25796),a=n(86120),i=n(82378);function o(e){var t=a.a.useGetFetch(),n=function(t){return r.y.comments(e,t)};return(0,i.i)(!!e&&n,(function(e){return t(n(e))}))}},85739:function(e,t,n){"use strict";n.d(t,{p:function(){return l}});var r=n(1024),a=n.n(r),i=n(86120),o=n(94223),c=n(25796);function l(e,t){var n=i.a.useGetFetch(),r=function(n){return c.y.libraryRequests(e,t,n)},l=function(e){return n(r(e))},s=(0,o.P)(r&&function(e){return r(e).key});return a().useEffect((function(){s&&s.shouldInitialFetch&&l()}),[e,t]),Object.assign(Object.assign({},s),{fetchNext:l})}},30328:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var r=n(31647),a=n(1024),i=n.n(a);function o(e){var t=e.id,n=e.appLink,a=e.requests;i().useEffect((function(){!t&&(null==a?void 0:a.length)&&r.Q.AppLinkHelper.trigger(Object.assign(Object.assign({},n),{args:[a[0].id]}),{replace:!0})}),[t,null==a?void 0:a.length])}},64429:function(e,t,n){"use strict";n.d(t,{m:function(){return l}});var r=n(1024),a=n.n(r),i=n(50072),o=n(31647),c=n(50997);function l(e,t,n){a().useEffect((function(){e&&(e.status===i.l.Pending&&"pending"!==t&&o.Q.AppLinkHelper.trigger({application:c.OV.LIBRARY_REQUESTS,action:c.eX.LibraryRequests.PENDING_REQUESTS,args:[e.id],params:n},{replace:!0}),e.status!==i.l.Pending&&"pending"===t&&o.Q.AppLinkHelper.trigger({application:c.OV.LIBRARY_REQUESTS,action:c.eX.LibraryRequests.PAST_REQUESTS,args:[e.id],params:n},{replace:!0}))}),[e,t])}},61356:function(e,t,n){"use strict";n.d(t,{c:function(){return C}});var r=n(39479),a=n(48088),i=n(31647),o=n(70065),c=n(52076),l=n(88483),s=n(2772),u=n(10101),d=n(61843),m=n(48090),v=n(89167),f=n(37339),p=n.n(f),g=n(264),y=n(36280);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,a=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key,"string"),"symbol"===h(a)?a:String(a)),r)}var a}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function w(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(C,e);var t,n,i,f,h=(i=C,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=N(i);if(f){var n=N(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return w(this,e)});function C(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,C),(t=h.call(this,e))._viewKeyRequested=!1,t}return t=C,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"VideoPreviewComponent"}},{key:"template",get:function(){return p()}},{key:"instanceChannelName",get:function(){return d.N0.generateUniqueChannelName(this)}},{key:"defaults",get:function(){return{captureAnalytics:!0}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.Im,selector:".lazy-img",callback:function(){a.Radio.channel(e.instanceChannelName).trigger("show:play:icon")},minBrowserSupportVersion:m.v9}]}},{key:"regions",value:function(){return{player:{el:".video-player-region",replaceElement:!1},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"bindListeners",value:function(){this.options.channelName&&this.listenTo(this.options.channelName,"update:chapter:time",this.onUpdateWebplayer)}},{key:"onUpdateWebplayer",value:function(e){return g.g.hasLite?this.playerViewKey?this.player?void this.seekToChapter(e):(this.listenToOnce(this.options.channelName,"player:loaded",r.bind(this.seekToChapter,this,e)),void this.renderVideoPreview()):(this.listenToOnce(this.options.channelName,"player:loaded",r.bind(this.seekToChapter,this,e)),void this.requestViewKey()):this.webPlayer?void this.seekToChapter(e):(this.listenToOnce(this.options.channelName,"webplayer:loaded",r.bind(this.seekToChapter,this,e)),void this.renderVideoPreview())}},{key:"seekToChapter",value:function(e){this.player?this.player.currentTime(e):this.webPlayer.seekTo(e)}},{key:"requestViewKey",value:function(){var e=this;this.playerViewKey||this._viewKeyRequested||(this._viewKeyRequested=!0,this.options.createViewKey(this.model.get("id"),(function(t){e.playerViewKey=t,e.renderVideoPreview()})))}},{key:"onClick",value:function(){this.model.get("id")&&(g.g.hasLite?this.requestViewKey():this.webPlayer||this.renderVideoPreview())}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new s.Z({model:this.model,thumbnailOptions:{size:l.h2.Medium},playIcon:!0,lazyload:!0,channelName:this.instanceChannelName}))}},{key:"renderVideoPreview",value:function(){if(this.playerViewKey)return this.player=new y.l({model:this.playerViewKey,playerApiUrl:this.options.playerApiUrl,channelName:this.options.channelName}),void this.showChildView("player",this.player);this.webPlayer=new v.Q({model:this.model,webPlayerUrl:this.options.webPlayerUrl,parentChannelName:this.options.channelName,autoplay:!0,analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{entity:o.EntityType.Video}),captureAnalytics:this.options.captureAnalytics,currentUser:this.options.currentUser}),this.showChildView("player",this.webPlayer)}},{key:"onRender",value:function(){this.playerViewKey?this.renderVideoPreview():this.renderThumbnail()}}])&&b(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),C}(i.Q.Component)},37339:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,a){return"cursor-pointer "},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,a){var i;return e.propertyIsEnumerable,'<div class="video-player-region '+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.id:t,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?i:"")+'responsize-img">\n <div class="thumbnail-region"></div>\n</div>'},useData:!0})},91807:function(e,t){"use strict";t.Z={tagList:"Zw6d9",disabled:"jlL1c",partialTag:"too_N",badge:"OjtN8",close:"X9joI"}},82602:function(e,t,n){"use strict";n.d(t,{WU:function(){return s}});var r=["second","minute","hour","day","week","month","year"],a=["秒","分钟","小时","天","周","个月","年"],i={},o=function(e,t){i[e]=t},c=[60,60,24,7,365/7/12,12];function l(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 r=function(e,t){return(+(t?l(t):new Date)-+l(e))/1e3}(e,n&&n.relativeDate);return function(e,t){for(var n=e<0?1:0,r=e=Math.abs(e),a=0;e>=c[a]&&a<c.length;a++)e/=c[a];return(e=Math.floor(e))>(0==(a*=2)?9:1)&&(a+=1),t(e,a,r)[n].replace("%s",e.toString())}(r,function(e){return i[e]||i.en_US}(t))};o("en_US",(function(e,t){if(0===t)return["just now","right now"];var n=r[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]})),o("zh_CN",(function(e,t){if(0===t)return["刚刚","片刻后"];var n=a[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}))}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 1601-1ef0e562fc.chunk.js.LICENSE.txt */
1
+ /*! For license information please see 1601-5e29bc01b5.chunk.js.LICENSE.txt */
2
2
  (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1601],{70680:function(e,t,n){"use strict";n.d(t,{r:function(){return v}});var r=n(31647),i=n(88172),o=n(61843),a=n(57857),s=n(26457),c=n(40622),l=n(97781),u=n.n(l);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key,"string"),"symbol"===h(i)?i:String(i)),r)}var i}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function d(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(m,e);var t,n,l,h,v=(l=m,h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(l);if(h){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),v.call(this,e)}return t=m,(n=[{key:"initialize",value:function(){this.spinnerModel=new r.Q.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,c.LibraryEditorActions.MergeChapters,this.onClickMergeChapters)}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return u()}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(i.ZV.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==s.Um.New&&this.model.get("status")!==s.Um.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:a.T.getPhrase(this.lang,"mergeChapters"),subtitles:a.T.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:a.T.getPhrase(this.lang,"enabledCustomSubtitles")},t=new i.Py({buttonText:e[this.options.type],extraButtonClass:"btn-dark ".concat("XKFne"),model:this.spinnerModel,spinnerOptions:{size:o.Ey.Small,type:o.dR.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:c.LibraryEditorActions.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:a.T.getPhrase(this.lang,"chaptersHeading"),line1:a.T.getPhrase(this.lang,"chaptersInfo1"),line2:a.T.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:a.T.getPhrase(this.lang,"subtitlesHeading"),line1:a.T.getPhrase(this.lang,"subtitlesInfo1"),line2:a.T.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:a.T.getPhrase(this.lang,"cvSubtitlesHeading"),line1:a.T.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:a.T.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&a.T.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(i.ZV.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===s.Um.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(r.Q.Component)},21053:function(e,t,n){"use strict";n.d(t,{W:function(){return m}});var r=n(48088),i=n(31647),o={svgContainer:"mtegw"},a=n(43791),s=n.n(a),c=n(48090),l=n(35630),u=n(57085),h=n(57857);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key,"string"),"symbol"===p(i)?i:String(i)),r)}var i}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(m,e);var t,n,i,a,p=(i=m,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v(i);if(a){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),p.call(this,e)}return t=m,(n=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return s()}},{key:"viewOptions",value:function(){return{styles:o}}},{key:"onSave",value:function(){r.Radio.channel(c.OV.LIBRARY_EDITOR).trigger(c.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:h.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:h.T.getPhrase(this.lang,"chapters")};case"resources":return{name:h.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new l.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new u.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.Q.Component)},16704:function(e,t,n){"use strict";n.r(t),n.d(t,{EditChaptersView:function(){return M}});var r=n(39479),i=n(31647),o=n(21679),a=n(57857),s=n(99748),c=n(59054),l=n(99952),u=n(74749),h=n(61843),p=n(48090),f=n(48404),d=n(29457),y=n(70065),v=n(52076),m=n(89167),g=n(13156),b=n(19226),w=n(36280),C=n(264),E=n(21053),k=n(70680),P=n(45114),T=n(70693),O=n(56906),S=n(40622),L=n(7190),_=n(26457),x=n(61159),R=n.n(x),j=n(95061);function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function I(){I=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var o=t&&t.prototype instanceof p?t:p,a=Object.create(o.prototype),s=new T(i||[]);return r(a,"_invoke",{value:C(e,n,s)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h={};function p(){}function f(){}function d(){}var y={};c(y,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(O([])));m&&m!==t&&n.call(m,o)&&(y=m);var g=d.prototype=p.prototype=Object.create(y);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function i(r,o,a,s){var c=u(e[r],e,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==V(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(h).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(c.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function C(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=u(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=d,r(g,"constructor",{value:d,configurable:!0}),r(d,"constructor",{value:f,configurable:!0}),f.displayName=c(d,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,c(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,a,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new w(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(g),c(g,s,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=O,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==V(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==V(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key,"string"),"symbol"===V(i)?i:String(i)),r)}var i}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}function U(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function q(e){return q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},q(e)}var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(B,e);var t,n,x,V,M=(x=B,V=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=q(x);if(V){var n=q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return U(this,e)});function B(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,B),(t=M.call(this,e))._viewKeyRequested=!1,t}return t=B,(n=[{key:"initialize",value:function(){this.bindListeners(),this.initializeDataServices(),h.Si.initBackButton()}},{key:"name",get:function(){return"EditVideoChaptersView"}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editChapters"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"template",get:function(){return R()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:d.LP.EditVideoTabs},webplayer:{replaceElement:!0,el:".webplayer-region",partialLoading:d.LP.WebPlayer},addChapter:{replaceElement:!0,el:".add-chapter-region",partialLoading:d.LP.EditVideoChaptersForm},chapterList:{replaceElement:!0,el:".chapter-list-region",partialLoading:d.LP.EditVideoChapterList}}}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.Vk.CHAPTER,"".concat(p.M_.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError),this.listenTo(this.channelName,S.LibraryEditorActions.CreateChapter,this.onCreateChapter),this.listenTo(this.channelName,S.LibraryEditorActions.UpdateChapter,this.onUpdateChapter),this.listenTo(this.channelName,S.LibraryEditorActions.DeleteChapter,this.onDeleteChapter),this.listenTo(this.channelName,S.LibraryEditorActions.UpdateChapterTime,this.onTimeInputUpdate),this.listenTo(this.channelName,S.LibraryEditorActions.SeekToChapter,this.onSeekToChapter),this.listenTo(this.channelName,S.LibraryEditorActions.MergeChapters,this.onMergeChapters)}},{key:"initializeDataServices",value:function(){this.videoDataService=o.u.getInstance(p.Or.Video,this),this.chapterDataService=o.u.getInstance(p.Or.Chapter,this),this.playerDataService=o.u.getInstance(p.Or.Player,this)}},{key:"onVideoDataError",value:function(e){switch(e.type){case s.h.NotFound:i.Q.ErrorHelper.throw(new O.l1);break;case s.h.Forbidden:i.Q.ErrorHelper.throw(new O.aV)}}},{key:"onConcatenateDataError",value:function(e){e.type===s.h.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"updateChapters",value:function(){var e=this;if(C.g.hasLite){var t=this.chapters.toJSON().reverse().reduce((function(t,n){var r,i=t[t.length-1];return[].concat(function(e){if(Array.isArray(e))return D(e)}(r=t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[{timestamp:n.startTime,endTimestamp:(null==i?void 0:i.timestamp)||e.player.duration(),name:n.name}])}),[]).reverse();this.player.setChapters(t)}}},{key:"onCreateChapter",value:function(e){0===this.chapters.length&&0!==e.startTime&&this.createChapter({name:a.T.getPhrase(this.lang,"intro"),startTime:0}),this.createChapter(e)}},{key:"createChapter",value:function(e){var t=this,n=new u.W(e);this.chapters.add(n),n.set("loading",!0),this.chapterDataService.createChapter(this.model.get("id"),e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.renderChapterForm(),t.updateChapters(),t.logAction(e,y.UserAction.Create)}))}},{key:"onUpdateChapter",value:function(e){var t=this,n=this.chapters.find((function(t){return t.get("id")===e.id}));n.set("loading",!0);var r=g.J.updatedChaptersAlert(this.model.get("name"));this.chapterDataService.updateChapter(n.id,e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.updateChapters(),t.logAction(e,y.UserAction.Edit)}),r)}},{key:"onDeleteChapter",value:function(e){var t=this;e.set("loading",!0),this.chapterDataService.deleteChapter(e.id,(function(){t.logAction(e,y.UserAction.Delete),t.chapters.remove(e),t.updateChapters()}))}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"onTimeInputUpdate",value:function(e){e>=0&&e<=h.X4.millisecondsToSeconds(this.model.get("duration"))&&(this.player?this.player.currentTime(e):this.webPlayer.seekTo(e))}},{key:"logAction",value:function(e,t){var n=Object.assign({videoId:this.model.get("id")},e.pick("id","name","startTime"));v.k.logUserAction(n,{actionType:t,entity:y.EntityType.Chapter,location:y.LocationContext.EditVideoChapters})}},{key:"onSeekToChapter",value:function(e){return t=this,n=void 0,r=void 0,i=I().mark((function t(){var n,r;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e<0)){t.next=2;break}return t.abrupt("return");case 2:if(!this.player){t.next=9;break}return t.next=5,this.player.getChapters();case 5:return n=t.sent,r=n[e],this.player.currentTime(r.timestamp),t.abrupt("return");case 9:this.webPlayer.seekToChapter(e);case 10:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(e,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}c((i=i.apply(t,n||[])).next())}));var t,n,r,i}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[_.Um.SingleFile,_.Um.ConcatenationFailed];r.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==_.Um.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.render()}))}},{key:"renderChapterList",value:function(){this.showChildView("chapterList",new T.Q({collection:this.chapters,duration:this.model.get("duration"),channelName:this.channelName,showActions:!this.hasPhysicalChapters.get("value"),editable:!this.hasPhysicalChapters.get("value"),showHeader:!0}))}},{key:"renderChapterForm",value:function(){this.showChildView("addChapter",new P.L({model:new u.W,collection:this.chapters,creating:!0,duration:this.model.get("duration"),channelName:this.channelName,playerViewModelKey:"".concat(p._2.NAME,"-").concat(this.model.get("id"))}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("addChapter",new k.r({type:"chapters",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderEditComponents",value:function(){if(this.hasPhysicalChapters.get("value"))return this.renderConcatenationRequest(),void this.mapPhysicalChapters();this.renderChapterForm(),this.renderChapterList()}},{key:"renderTabs",value:function(){var e=h.BK.canEditVideo(this.model);this.showChildView("tabs",new E.W({model:this.model,tabs:h.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-chapters-applink",context:"chapters",folder:this.folder,libraries:this.libraries}))}},{key:"renderWebPlayer",value:function(){if(this.playerViewKey)return this.player=new w.l({model:this.playerViewKey,playerApiUrl:this.config.get("playerApiUrl"),channelName:this.channelName,inactivityTimeout:0}),void this.showChildView("webplayer",this.player);this.webPlayer=new m.Q({model:this.model,webPlayerUrl:this.config.get("webPlayerUrl"),captureAnalytics:!1,currentUser:this.currentUser}),this.showChildView("webplayer",this.webPlayer)}},{key:"mapPhysicalChapters",value:function(){var e=this;this.renderPartialLoading("chapterList");var t=function(t){e.chapters=new l.q(L.$k.mapPhysicalChapters(t)),e.renderChapterList()};this.player?this.player.getChapters().then(t):this.webPlayer.query("getChapters",t)}},{key:"redirectToVideoDetails",value:function(){i.Q.AppLinkHelper.trigger({application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.VIDEO_DETAILS,args:[this.model.get("id")]},{replace:!0})}},{key:"fetchData",value:function(){var e=this;if(this.model=this.videoDataService.getVideo(this.options.videoId),this.model){if(!h.BK.canEditVideo(this.model))return void this.redirectToVideoDetails();this.chapters=this.model.chapters,this.folder=this.model.categories.first(),C.g.hasLite&&!this._viewKeyRequested&&(this._viewKeyRequested=!0,this.playerDataService.createViewKey(this.model.get("id"),c.f.MasterObject,(function(t){e.playerViewKey=t,e.render()})))}this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||C.g.hasLite&&!this.playerViewKey||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"requiredResources",get:function(){return{config:f.p.config,currentUser:b.K.currentUser,libraries:j.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"onRender",value:function(){this.renderTabs(),this.renderWebPlayer(),this.renderEditComponents(),this.startPollingConcatenation()}}])&&A(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),B}(i.Q.View)},97781:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.progress:o,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?o:""},2:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.escapeExpression;return' <span class="m-3 text-muted">'+a(e.lambda(null!=(o=null!=t?t.options:t)?o.progress:o,t))+'</span>\n <p class="pt-2">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\n"},4:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.failed:o,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?o:""},5:function(e,t,n,r,i){return e.propertyIsEnumerable,'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return"<h4>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.heading:o,t))+"</h4>\n<p>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.line1:o,t))+"</p>\n<p>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.line2:o,t))+'</p>\n<div class="btn-region"></div>\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.processing:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?o:"")},useData:!0})},43791:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(o=null!=(o=n.name||(null!=t?t.name:t))?o:e.hooks.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):o)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region pl-2"></div>'},useData:!0})},61159:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="tab-region w-100"></div>\n<div class="row">\n <div class="col-6 pt-3">\n <div class="webplayer-region"></div>\n <div class="add-chapter-region"></div>\n </div>\n <div class="col-6 mb-2 pt-3">\n <div class="chapter-list-region"></div>\n </div>\n</div>'},useData:!0})}}]);