@clickview/lite 0.10.1-rc.2 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickview/lite",
3
- "version": "0.10.1-rc.2",
3
+ "version": "0.11.0",
4
4
  "description": "ClickView Lite",
5
5
  "main": "dist/scripts/bundle.js",
6
6
  "types": "dist/projects/lite/src/index.d.ts",
@@ -32,7 +32,7 @@
32
32
  "@types/react-window": "1.8.3"
33
33
  },
34
34
  "dependencies": {
35
- "@clickview/styles": "1.10.1-rc.2",
35
+ "@clickview/styles": "1.11.0",
36
36
  "@microsoft/immersive-reader-sdk": "1.0.0",
37
37
  "@microsoft/teams-js": "1.5.2",
38
38
  "@typeform/embed-react": "1.2.6",
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[2246],{94644:(e,t,a)=>{a.d(t,{r:()=>s});var r=a(81886),n=a(50242),i=a(67058),o=a(49075),u=a(14553),d=a(49267),l={notFound:i.d,forbidden:{rating:u.q,yearLevel:u.q,region:d.a,privacy:u.q},badRequest:o._};function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var i;i="number"==typeof e?e:e.status;var o=Object.assign(Object.assign({},l),t);i&&r.Q.ErrorHelper.isStatusCodeError(i)&&(i!==n.o.NotFound?i!==n.o.Forbidden?a.badRequest||r.Q.ErrorHelper.throw(new o.badRequest):a.forbidden||r.Q.ErrorHelper.throw(new o.forbidden.privacy):a.notFound||r.Q.ErrorHelper.throw(new o.notFound))}}},91286:(e,t,a)=>{a.d(t,{v:()=>o});var r=a(1024),n=a(94644);function i(e){return e.map((function(e){return e.statusCode})).join(":")}function o(e,t,a){var o=Array.isArray(e)?e:[e];(0,r.useEffect)((function(){o.forEach((function(e){(0,n.r)(e.statusCode,t,a)}))}),[i(o),t,a])}},82146:(e,t,a)=>{a.r(t),a.d(t,{PlayView:()=>N});var r=a(1024),n=a(58566),i=a(20354),o=a(2948),u=a(75896),d=a(23049),l=a(31949),s=(a(99940),a(97395)),c=a(47812),v=a(65858),f=a(39151),m=a(61990),p=a(33803),h=a(91286),y=a(60051),b=a(22902),g=a(1575),w=a(61699),C=a(25925),F=a(64567),P=a(61704),E=a(86702),k=a(36873),A=a(97037),q=a(49948),x=a(97816),B=a(50456),I=a(32690),j=a(15311),O=a(82817),S=a(78417),_=a(50242),R=a(7179);function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}var z={notFound:m.l,forbidden:{privacy:p.G}};function N(e){var t,a,m,p,N,U,D,H,K,M,Q,T=e.queryParams,V=T.context,G=T.contextId,W=T.playNext,Y=(M=(0,o.D)(E.y.WEB_PLAYER_DATA),Q=2,function(e){if(Array.isArray(e))return e}(M)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,n,i=[],o=!0,u=!1;try{for(a=a.call(e);!(o=(r=a.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){u=!0,n=e}finally{try{o||null==a.return||a.return()}finally{if(u)throw n}}return i}}(M,Q)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?L(e,t):void 0}}(M,Q)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),$=Y[0],J=Y[1],X=(0,A.c)(v.LocationContext.PlayPage).setFavourite,Z=(0,b.T)().hasPermissions,ee=(0,j.r)().hasProduct,te=(0,R.P)().setDeepLink,ae=i.a.useBasicFetch(g.R.video(e.id),{optimize:!0}),re=i.a.useBasicFetch(c.k.createViewKey(e.id,y.f.MasterObject),{optimize:!0}),ne=i.a.useBasicFetch(l.N.currentUser(),{optimize:!0}),ie=i.a.useBasicFetch(f.L.config(),{optimize:!0}),oe=i.a.useBasicFetch((null===(a=null===(t=ae.data)||void 0===t?void 0:t.glance)||void 0===a?void 0:a.theme)?(H=ae.data.glance.theme,K=ae.data.glance.type,{url:s._.urlBuilder("/api/domain/v1/themes",{name:H,type:K}),key:"themes:".concat(H,":").concat(K)}):null,{optimize:!0}),ue=i.a.useBasicFetch(ae.statusCode===_.o.Forbidden&&g.R.video(e.id,S.r.StripMetadata)),de=(0,O.M)(e.id),le=(0,k.k)(ae.data,ne.data,V,G),se=(0,q.l)(e.id),ce=(0,n.useDispatch)();return(0,d.o)(null===(m=ae.data)||void 0===m?void 0:m.name),(0,h.v)(ae,z,{forbidden:!0}),(0,B.l)((null===(p=le.videos)||void 0===p?void 0:p.length)?u.m.first(le.videos):null,e.queryParams),(0,I.P)(ae.data,e.queryParams),(0,x.V)(null!==(N=le.videos)&&void 0!==N?N:[],{hasCurriculumLinks:!0}),te(e.id,"videos"),(0,F.b)(ue),r.useEffect((function(){var e;if(ae.data&&re.data&&se.hasCompleted)return J("video",ae.data),J("viewKey",re.data.viewKey),J("shareId",null),J("activityStatus",null),(null===(e=null==se?void 0:se.items)||void 0===e?void 0:e.length)&&J("pointsOfInterest",se.items),function(){J("pointsOfInterest",null)}}),[!!ae.data,null===(U=re.data)||void 0===U?void 0:U.viewKey,null===(D=ae.data)||void 0===D?void 0:D.favouritedBy,null==se?void 0:se.hasCompleted]),r.useEffect((function(){J("contextId",G||null),J("context",V||null)}),[G,V]),ae.data&&re.data&&ne.data&&ie.data&&(null==$?void 0:$.video)&&(null==se?void 0:se.hasCompleted)?r.createElement("div",{className:"px-3"},r.createElement(P.j,{video:ae.data,curriculums:de,updateCurriculum:function(e,t){i.a.fetch(ce,w.o.setPresentation(e,C.R.Curriculum,null,t))},glanceTheme:oe.data,relatedVideos:le,setFavourite:X,imageCdnUrl:ie.data.imageCdnUrl,currentUser:ne.data,pointsOfInterest:se.items,hasPermissions:Z,hasProduct:ee,playNext:W})):r.createElement(r.Fragment,null)}N.defaultProps={queryParams:{}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[2560],{16035:(e,t,n)=>{n.d(t,{z:()=>s});var r=n(1024),a=n.n(r),i=n(8493),o=n(44829),l=n(58130),c=n(83914),u=n(91807);function s(e){var t,n=e.tag,r=e.appLink,s=e.onClick,d=e.disabled,m=e.tagClass,v=void 0===m?"tag":m,p=n.name.toLowerCase(),f="badge-pill py-1 px-2 my-1 mr-1 ".concat(v," ").concat(function(e){switch(e){case o.Q.Pedagogy:return"pedagogy-tag text-white";case o.Q.Hidden:return"hidden-tag";case o.Q.Normal:default:return""}}(n.tagType)),g=n.tagType===o.Q.Normal&&!!(null===(t=e.themeColours)||void 0===t?void 0:t.secondary);g&&(f+=" text-white"),!r&&!s||d||(f+=" cursor-pointer"),d&&(f+=" "+u.Z.disabled),e.onRemove&&(f+=" "+u.Z.badge);var h=g?{backgroundColor:e.themeColours.secondary}:{};return r?a().createElement(i.F,{onClick:s,appLink:r,className:f,title:p,style:h},a().createElement("span",{className:"text-truncate text-nowrap"},p)):a().createElement("span",{onClick:s,className:f,title:p,style:h},a().createElement("span",{className:"text-truncate text-nowrap"},p,e.onRemove&&a().createElement("button",{onClick:e.onRemove,className:"".concat(u.Z.close," close font-size-normal")},a().createElement(c.x,{size:c.S.Small,svgName:l.vn.Close,className:"d-inline-block svg-container"}))))}},91743:(e,t,n)=>{n.d(t,{P:()=>s});var r=n(1024),a=n.n(r),i=n(16035),o=n(44829),l=n(91807);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 u(e){return e.tagType===o.Q.Pedagogy?0:1}function s(e){if(!e.tags)return a().createElement(a().Fragment,null);var t,n=(t=e.tags,function(e){if(Array.isArray(e))return c(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 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}}(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 u(e)-u(t)}));return a().createElement("div",{className:l.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(i.z,{key:t.id,tag:t,appLink:n,themeColours:e.themeColours,onRemove:r})})))}},15446:(e,t,n)=>{n.d(t,{C:()=>d});var r=n(1024),a=n.n(r),i=n(8493),o=n(57760),l=n(68626),c=n(3133),u=n(54610),s=n(65858);var d=a().memo((function(e){var t;return a().createElement("div",{className:"flex-shrink-0 px-1 ".concat("hzP5u")},a().createElement("div",{className:"row m-0 border rounded p-2 h-100"},a().createElement("div",{className:"col-6 p-0"},a().createElement(o.u,{video:e.data,appLink:e.getAppLink(e.data),type:"static",imageOptions:{size:u.h2.Small},textPosition:l.z.Independent,analyticsOptions:{location:s.LocationContext.SlidingListItem},preload:!0})),a().createElement("div",{className:"col-6 p-0"},a().createElement("div",{className:"pl-2"},a().createElement(i.F,{appLink:e.getAppLink(e.data)},a().createElement("h3",{className:"h6 mb-1"},a().createElement("span",{className:"clamp-2"},e.data.name))),a().createElement(c.R,{owner:e.data.owner,isClickViewContent:null===(t=e.data._isClickViewContent)||void 0===t?void 0:t.value,imageCdnUrl:e.imageCdnUrl})))))}))},44829:(e,t,n)=>{var r,a;n.d(t,{Q:()=>r}),function(e){e.Normal="normal",e.Pedagogy="pedagogy",e.Hidden="hidden"}(r||(r={})),function(e){e[e.Normal=0]="Normal",e[e.Pedagogy=1]="Pedagogy",e[e.Hidden=2]="Hidden"}(a||(a={}))},3010:(e,t,n)=>{n.d(t,{i:()=>i});var r=n(1024),a=n(45719);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}},45719:(e,t,n)=>{n.d(t,{F:()=>c,P:()=>u});var r=n(1024),a=n(58566),i=n(20354),o=n(79014);function l(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 c={items:[],shouldInitialFetch:!1,nextCursor:null,isFetching:!1,statusCode:n(50242).o.Ok,hasCompleted:!0,totalItems:0};function u(e,t,n){function c(e){if(e)return o.q.isFunction(t)?t(e):e.data}function u(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),s=a&&a.isFetching,d=a&&a.statusCode,m=a&&a.hasCompleted,v=a&&a.shouldFetch,p=c(a&&a.data),f=u(a&&a.data),g=function(e){var t;if(e)return null===(t=e)||void 0===t?void 0:t.count}(a&&a.data);f&&(s=(a=i.a.getResponse(t,n(f))).isFetching,d=a.statusCode,m=a.hasCompleted,!a.shouldFetch);){var h=c(a.data);h&&p.push.apply(p,function(e){if(Array.isArray(e))return l(e)}(b=h)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(b)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(b)||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 y=u(a.data);f=y===f?null:y}var E={shouldInitialFetch:v,items:p,nextCursor:f,isFetching:s,statusCode:d,hasCompleted:m};return"number"==typeof g&&(E.totalItems=g),E}var b}}),[e]))}},69344:(e,t,n)=>{n.d(t,{m:()=>l});var r=n(1024),a=n(23481),i=n(11025);var o=a.T.encloseNamespace("shared.pictureInPicturePlaceholder");function l(e){var t,n;return r.createElement("div",{className:"position-relative responsive-img ".concat("qnTH4"),style:{backgroundImage:"url('".concat(null!==(n=null===(t=i.M.getThumbnail(e.video))||void 0===t?void 0:t.url)&&void 0!==n?n:"","')")}},r.createElement("p",{className:"m-0 text-white ".concat("kwerS")},o("playingPiP")),r.createElement("div",{className:"xDWEz"}))}},61704:(e,t,n)=>{n.d(t,{j:()=>ye});var r=n(1024),a=n.n(r),i=n(17082),o=n(2948),l=n(23481),c=n(28400),u=n(79014),s=n(10038),d=n(83345),m=n(83657),v=n(11518),p=n(58704),f=n(47862),g=n(15446),h=n(54976),y=n.n(h),E=n(75896),b=n(69883),C=n(45261),k=n(91053);var A=function(){return a().createElement(a().Fragment,null,a().createElement("div",{className:"partial-loading-background badge-pill py-1 px-2 d-inline-block mr-1 mb-2 ".concat("vDcrq")}),a().createElement("div",null,a().createElement("div",{className:"partial-loading-background mb-1 ".concat("GXhoW")}),a().createElement("div",{className:"mb-2 d-flex"},a().createElement("div",{className:"mr-1 align-self-start ".concat("goKaS")},a().createElement("div",{className:"partial-loading-background badge-pill py-1 px-2 d-inline-block w-100 h-100"})),a().createElement("div",{className:"partial-loading-background ".concat("vFew6")}))))};function S(){return a().createElement("div",null,a().createElement("div",{className:"mb-3"},a().createElement(A,null)),a().createElement("div",{className:"mb-3"},a().createElement(A,null)),a().createElement("div",null,a().createElement(A,null)))}var N=n(22161);function x(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=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){l=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(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 w="shared.curriculumLinks",I=l.T.encloseNamespace(w);function P(e){var t=e.curriculums,n=t.currentCurriculum,r=t.availableCurriculums,i=t.curriculumLinks,o=t.isLoading,l=x(a().useState(null!=n?n:E.m.first(r)),2),c=l[0],u=l[1],s=x(a().useState(o||!c),2),m=s[0],v=s[1],p=(0,b.Z)();return a().useEffect((function(){!o&&m&&v(!1)}),[o]),a().createElement("div",{className:"rounded border mb-3 position-relative"},a().createElement(y(),{autoHeight:!0,autoHeightMax:e.height},a().createElement("div",{className:"p-3"},a().createElement("h2",{className:"h6 mr-2 h-100"},a().createElement(d.x,{namespace:w,phrase:"heading"})),a().createElement(k.B,{availableCurriculums:r,onChangeCurriculum:function(t){var n,a,i=t.target.value,o=r.find((function(e){return e.id.toString()===i}));(null==o?void 0:o.id)&&(null===(n=null==c?void 0:c.id)||void 0===n?void 0:n.toString())!==(null===(a=null==o?void 0:o.id)||void 0===a?void 0:a.toString())&&(v(!0),u(o),e.updateCurriculum(o,(function(){u(c),v(!1),p.error(I("updateFailed"))})))},selectedCurriculum:c,className:N.Z.dropdown}),m?a().createElement(S,null):a().createElement(C.h,{curriculumLinks:i,emptyStateUrl:e.emptyStateUrl}))),!!e.onClickSeeLess&&a().createElement("button",{type:"button",className:"close ".concat(N.Z.closeButton),"aria-label":"Close",onClick:e.onClickSeeLess},a().createElement("span",{"aria-hidden":"true"},"×")))}var T=n(73749),F=n(76246),D=n(99551),R=n(1048),O=n(11607),U=n(67453),j=n(91743),M=n(54610),V=n(12271),H=n(73758);function _(e,t,n){var a=function(){H.n.unsubscribe(e,t)};return(0,r.useEffect)((function(){return n?H.n.subscribeOnce(e,t):H.n.subscribe(e,t),function(){a()}}),[]),a}var z=n(93264);const W={container:"BImYH",background:"aAY0j",topLeft:"azcIT",bottomLeft:"mBkCx",topRight:"tcN5n",bottomRight:"sHsOr",detailsBtn:"jyxT7",content:"PeWbM",highlightPoi:"un8Q0"};function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Z=/(\[.*\]\(cv:\/\/poi\?id=[0-9]+\))/g,Q=/[0-9]+/,Y=/\[.*\]/,q=/[\[\]]/g;var G="shared.videoAtAGlance";function $(e){var t=function(e,t,n){var a,i,o,l=(i=(0,r.useState)(""),o=2,function(e){if(Array.isArray(e))return e}(i)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){l=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw a}}return i}}(i,o)||function(e,t){if(e){if("string"==typeof e)return B(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)?B(e,t):void 0}}(i,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=l[0],u=l[1];return(0,r.useEffect)((function(){n&&u(function(e,t){var n=function(e,t){return(null==t?void 0:t.length)?e.content.replace(Z,(function(e){var n=e.match(Q);if(!(null==n?void 0:n.length))return e;var r=t.find((function(e){return e.id.toString()===n[0]})),a=e.match(Y);if(!r||!(null==a?void 0:a.length))return e;var i='<span class="'.concat(W.timestamp,' mr-2">').concat(z.T.ToDisplayDuration(1e3*r.startTime),"</span>"),o=a[0];return o=(o=o.replace(q,""))||r.description,o="[".concat(i," ").concat(o,"]"),e.replace(Y,o)})):e.content}(e,t);return V(n).split('a href="cv://poi').join('a class="d-flex" href="cv://poi')}(e.glance,t))}),[null===(a=e.glance)||void 0===a?void 0:a.content,!!t]),c}(e.video,e.pointsOfInterest,e.hasGlanceData),n=function(e){var t=(0,r.useRef)();function n(){var t=this.getAttribute("href");if((null==t?void 0:t.includes("cv://poi"))&&(null==e?void 0:e.length)){var n=t.split("cv://poi?id=")[1];if(n){var r=e.find((function(e){return e.id.toString()===n}));r&&H.n.trigger("glance:poi:mouseover",r)}}}function a(){H.n.trigger("glance:poi:mouseleave")}function i(){var e;return null===(e=t.current)||void 0===e?void 0:e.querySelectorAll('[href*="cv://poi"]')}return _("player:poi:mouseover",(function(e){var n,r=null==e?void 0:e.id;r&&(null===(n=function(e){var n;return null===(n=t.current)||void 0===n?void 0:n.querySelector('[href="cv://poi?id='.concat(e,'"]'))}(r))||void 0===n||n.classList.add(W.highlightPoi))})),_("player:poi:mouseleave",(function(){var e;null===(e=i())||void 0===e||e.forEach((function(e){return e.classList.remove(W.highlightPoi)}))})),(0,r.useEffect)((function(){if(t.current){var e=i();return e.forEach((function(e){return e.addEventListener("mouseover",n)})),e.forEach((function(e){return e.addEventListener("mouseleave",a)})),function(){e.forEach((function(e){return e.removeEventListener("mouseover",n)})),e.forEach((function(e){return e.removeEventListener("mouseleave",a)}))}}}),[t.current]),t}(e.pointsOfInterest);if(!e.hasGlanceData&&e.hasDetails)return e.onClickShowDescription&&e.onClickShowDescription(),r.createElement(r.Fragment,null);if(!e.theme)return r.createElement(r.Fragment,null);var a,i,o,l,c,u=(null===(o=null===(i=null==(a=e.theme)?void 0:a.data)||void 0===i?void 0:i.colours)||void 0===o?void 0:o.primary)&&(null===(c=null===(l=null==a?void 0:a.data)||void 0===l?void 0:l.colours)||void 0===c?void 0:c.secondary)?a.data.colours:{primary:"#F5F4FF",secondary:"#9294FF"},s=e.hasDetails&&e.onClickShowDescription;return r.createElement("div",{className:"rounded border px-3 px-sm-5 py-3 mb-3 position-relative d-flex justify-content-center ".concat(W.container),style:{backgroundColor:u.primary}},r.createElement("div",{className:"".concat(W.content," d-flex align-items-center pt-4 pt-sm-0")},r.createElement("div",null,r.createElement("h2",{className:"h4"},r.createElement(d.x,{namespace:G,phrase:"videoAtAGlance"})),s&&r.createElement(O.L,{onClick:e.onClickShowDescription,className:"".concat(W.detailsBtn," position-absolute cursor-pointer mr-4 font-weight-500 text-info")},r.createElement(d.x,{namespace:G,phrase:"readFullDescription"})),r.createElement("div",{ref:n,onClick:function(t){return function(e,t,n){e.preventDefault();var r=e.target.getAttribute("href");if((null==r?void 0:r.includes("cv://poi"))&&(null==t?void 0:t.length)){var a=r.split("cv://poi?id=")[1],i=t.find((function(e){return e.id.toString()===a}));n&&i&&n(i.startTime)}}(t,e.pointsOfInterest,e.setStartTime)},dangerouslySetInnerHTML:{__html:t}}),function(){var t,n,a,i;return(null===(n=null===(t=e.video.tags)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)?r.createElement("div",{className:"py-1"},r.createElement(j.P,{tags:null===(i=null===(a=e.video)||void 0===a?void 0:a.tags)||void 0===i?void 0:i.data,themeColours:u,getAppLink:function(t){return e.getTagAppLink?e.getTagAppLink(t):null}})):r.createElement(r.Fragment,null)}(),r.createElement("div",{className:"mt-2"},e.hasCurriculumLinks&&e.onClickShowCurriculumLinks&&r.createElement(O.L,{onClick:e.onClickShowCurriculumLinks,className:"cursor-pointer d-inline-block font-weight-500 text-info"},r.createElement(d.x,{namespace:G,phrase:"seeCurriculumLinks"}))))),function(){var t,n,a,i=null!==(a=null===(n=null===(t=e.theme)||void 0===t?void 0:t.data)||void 0===n?void 0:n.images)&&void 0!==a?a:{};return R.t.keys(i).filter((function(e){return!R.t.isEmpty(i[e])})).map((function(e){var t,n,a=U.j.createUrl(null===(t=i[e])||void 0===t?void 0:t.url,{size:M.h2.Medium});return r.createElement("div",{key:null===(n=i[e])||void 0===n?void 0:n.fileId,className:"".concat(W[e]," ").concat(W.background),style:{backgroundImage:"url('".concat(a,"')")}})}))}())}var X=n(96022),K=n(16714),J=n(12754),ee=n(65858),te=n(43853),ne=n(99719),re=n(14070),ae=n(97291),ie=n(86702),oe=n(90102),le=n(69344),ce=n(65986),ue=n(99742),se=n(78166),de=n(22490);function me(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){l=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw a}}return i}}(e,t)||pe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ve(e){return function(e){if(Array.isArray(e))return fe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pe(e,t){if(e){if("string"==typeof e)return fe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fe(e,t):void 0}}function fe(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 ge="shared.playPage",he=l.T.encloseNamespace(ge);function ye(e){var t,n,r,l,h,y,E,b,C,k,A,S,N,x,L,w,I,R,O=e.video,U=e.glanceTheme,j=e.imageCdnUrl,M=me(a().useState(!1),2),V=M[0],H=M[1],_=a().useRef(!1),z=a().useRef(null),W=a().useRef(null),B=(null===(t=null==O?void 0:O.glance)||void 0===t?void 0:t.content)&&"text/markdown"===O.glance.format,Z=e.hasPermissions(K.C.StudentExperience),Q=O.rating,Y=O.productionYear,q=O.interactives,G=O.resources,pe=O.productionCompanies,fe=O.distributors,ye=O.producers,Ee=O.directors,be=O.tags,Ce=O.links,ke=!!((null===(n=null==pe?void 0:pe.data)||void 0===n?void 0:n.length)||(null===(r=null==fe?void 0:fe.data)||void 0===r?void 0:r.length)||(null===(l=null==ye?void 0:ye.data)||void 0===l?void 0:l.length)||(null===(h=null==Ee?void 0:Ee.data)||void 0===h?void 0:h.length)),Ae=!!((null==Q?void 0:Q.value)||Y||(null===(y=null==q?void 0:q.data)||void 0===y?void 0:y.length)||(null===(E=null==G?void 0:G.data)||void 0===E?void 0:E.length)||(null===(b=null==Ce?void 0:Ce.data)||void 0===b?void 0:b.length)),Se=!!O.series,Ne=!!O.description||Ae||ke||!!(null===(C=null==be?void 0:be.data)||void 0===C?void 0:C.length),xe=me((0,o.D)(ie.y.WEB_PLAYER_DATA),2),Le=xe[0],we=xe[1],Ie=me(a().useState({view:B&&!Z?"v@g":"details",referrer:null}),2),Pe=Ie[0],Te=Ie[1],Fe=function(e,t){var n=!e.isAuthenticated||!t(J.x.Primary);return{getTagAppLink:function(e){return n?null:{application:ae.O.SEARCH,action:re.e.Search.HOME,params:{tagOrClassification:e.name}}},getSeriesAppLink:function(e){return n?null:{application:ae.O.DEFAULT,action:re.e.Default.SERIES,args:[e.id,c.m.slugify(e.name)]}}}}(e.currentUser,e.hasProduct),De=(0,ce._)(ce.i.PlayPage);function Re(){if(z.current&&W.current){var e=z.current.getBoundingClientRect().width,t=W.current.getBoundingClientRect().width>e/2;t&&!V?H(!0):!t&&V&&H(!1)}}function Oe(){var t;return!(null===(t=e.currentUser)||void 0===t?void 0:t.isAuthenticated)||!e.hasProduct(J.x.Primary)||!!Z}(0,te.T)(),a().useEffect((function(){return we("isOnPlayPage",!0),we("allowFloatingPlayer",!0),function(){we("isOnPlayPage",!1)}}),[]);var Ue=function(e,t,n){var r,a,i,o,l=null!==(a=null===(r=e.resources)||void 0===r?void 0:r.data)&&void 0!==a?a:[],c=null!==(o=null===(i=e.links)||void 0===i?void 0:i.data)&&void 0!==o?o:[],u=l.filter((function(e){var r,a;return!(!t.isAuthenticated||n)||"additional-materials"===(null===(r=e.metadata)||void 0===r?void 0:r.resourceType)||"student-activity"===(null===(a=e.metadata)||void 0===a?void 0:a.resourceType)}));return[].concat(ve(u),ve(c))}(O,e.currentUser,Z),je=u.q.throttle(Re,300);return(0,s.H)(je,null,[V]),a().useEffect(Re,[z,W,V]),a().createElement(d.D.Provider,{value:ge},a().createElement("div",{className:"mb-2"},!Le.showFloatingPlayer&&a().createElement(i.t0,{node:Le.portalNode}),a().createElement("div",{className:Le.showFloatingPlayer?"":"d-none"},a().createElement(le.m,{video:O}))),a().createElement("div",{className:"".concat(Se||Ae?"mb-3":"mb-2"," position-relative"),ref:z},a().createElement("div",{className:"d-inline-block",ref:W},!!O.series&&a().createElement(X.M,{video:O,appLink:Fe.getSeriesAppLink(O.series),className:"".concat("SaFrA"," text-truncate mw-100"),analyticsOptions:{location:ee.LocationContext.PlayPage}}),a().createElement("h1",{className:"h4 d-inline-block mb-2 mt-n1 mw-100 ".concat(Se||Ae?"":"mb-0 pt-2")},O.name)),Ae&&a().createElement(D.c,{className:"QHYXF"},a().createElement(F.C,{type:F.g.Rating,data:O.rating}),a().createElement(F.C,{type:F.g.ProductionYear,data:O.productionYear}),!!(null==Ue?void 0:Ue.length)&&a().createElement(F.C,{type:F.g.Resources,data:[].concat(ve(null!==(A=null===(k=O.resources)||void 0===k?void 0:k.data)&&void 0!==A?A:[]),ve(null!==(N=null===(S=O.links)||void 0===S?void 0:S.data)&&void 0!==N?N:[]))})),(null===(x=e.currentUser)||void 0===x?void 0:x.isAuthenticated)&&e.hasProduct(J.x.Primary)&&a().createElement("div",{className:"ml-2 ".concat("YpwOS"," ").concat(V?"c0fZQ":"")},a().createElement(m.e,{actions:De(O),actionsDropdownClassName:"btn btn-outline-dark"}))),"v@g"===Pe.view&&a().createElement($,{theme:U,video:O,pointsOfInterest:e.pointsOfInterest,hasGlanceData:B,hasDetails:Ne,onClickShowDescription:function(){return Te({view:"details",referrer:"v@g"})},onClickShowCurriculumLinks:function(){return Te({view:"curriculumLinks",referrer:"v@g"})},hasCurriculumLinks:!!e.curriculums.customerHasCurriculumLinks,setStartTime:function(e){return we("startTime",e)},getTagAppLink:Fe.getTagAppLink}),"details"===Pe.view&&a().createElement(ne.X,{video:O,hasPPDD:ke,onLaunchImmersiveReader:function(){var e,t;_.current=!(null===(e=null==Le?void 0:Le.playerRef)||void 0===e?void 0:e.isPaused()),null===(t=null==Le?void 0:Le.playerRef)||void 0===t||t.pause()},onExitImmersiveReader:function(){var e;_.current&&(null===(e=null==Le?void 0:Le.playerRef)||void 0===e||e.play())},canViewGlance:B&&!Z,canViewCurriculumLinks:!!e.curriculums.customerHasCurriculumLinks&&!Z,onClickShowSynopsis:function(){return Te({view:"v@g",referrer:"details"})},onClickSeeCurriculumLinks:function(){return Te({view:"curriculumLinks",referrer:"details"})},getTagAppLink:Fe.getTagAppLink}),"curriculumLinks"===Pe.view&&a().createElement(P,{height:oe.x,curriculums:e.curriculums,updateCurriculum:e.updateCurriculum,onClickSeeLess:function(){return Te({view:Pe.referrer,referrer:"curriculumLinks"})},emptyStateUrl:ue.W.EmptyStates.CURRICULUM_LINKS}),!!(null==Ue?void 0:Ue.length)&&a().createElement("div",{className:"mx-n1"},a().createElement(v.kM,{name:he("resources",{count:Ue.length}),contents:p.z.Resources,collection:Ue,prefetched:!0,childComponent:T.R,extraChildComponentProps:{imageCdnUrl:j,imageErrorFallbackUrl:ue.W.Fallbacks.RESOURCE_THUMBNAIL},getChildAppLink:function(e){return{application:ae.O.DEFAULT,action:re.e.Default.PREVIEW_PDF,args:[e.id]}},analyticsData:{widgetId:"resources"}})),!!(null===(w=null===(L=O.interactives)||void 0===L?void 0:L.data)||void 0===w?void 0:w.length)&&!Oe()&&a().createElement("div",{className:"mx-n1"},a().createElement(v.kM,{name:he("interactives",{count:O.interactives.data.length}),contents:p.z.Interactives,collection:O.interactives.data,prefetched:!0,getChildAppLink:function(e){return{application:ae.O.INTERACTIVES,action:re.e.Interactives.VIEW_INTERACTIVE,args:[e.id,c.m.slugify(e.name)]}},childComponent:f.K,extraChildComponentProps:{video:O,questionsAppLink:{application:ae.O.INTERACTIVES,action:re.e.Interactives.PREVIEW_QUESTIONS},imageCdnUrl:e.imageCdnUrl},analyticsData:{widgetId:"interactives"}})),!!(null===(R=null===(I=O.clips)||void 0===I?void 0:I.data)||void 0===R?void 0:R.length)&&!Oe()&&a().createElement("div",{className:"mx-n1"},a().createElement(v.kM,{name:he("clips",{count:O.clips.data.length}),contents:p.z.Clips,collection:O.clips.data,prefetched:!0,getChildAppLink:function(e){return{application:ae.O.DEFAULT,action:re.e.Default.PLAY_CLIP,args:[e.id,c.m.slugify(e.name)]}},childComponent:g.C,extraChildComponentProps:{video:O,imageCdnUrl:e.imageCdnUrl},analyticsData:{widgetId:"clips"}})),a().createElement(se.Z,{currentVideo:O,relatedVideos:e.relatedVideos,currentUser:e.currentUser,setFavourite:e.setFavourite,getVideoAppLink:function(t){return de.W.getAppLink(t,{context:Le.context,contextId:Le.contextId,playNext:e.playNext,shareId:e.shareId})}}))}},99719:(e,t,n)=>{n.d(t,{X:()=>E});var r=n(1024),a=n(54976),i=n.n(a),o=n(23481),l=n(28400),c=n(83345),u=n(65858),s=n(91743),d=n(11607),m=n(25723),v=n(11025),p=n(90102);var f="shared.videoDetails",g=o.T.encloseNamespace(f);function h(e){var t=e.label,n=e.items,a=e.className;if(!(n&&n.data&&n.data.length))return r.createElement(r.Fragment,null);var i=n.data.map((function(e){return e.name})).join(", ");return r.createElement("div",{className:a},t,": ",i)}function y(e){var t,n,a,i,o,l,u,d,m,p,f=e.video;return v.M.isVideo(f)?r.createElement("div",{className:f.description?"col-md-5 pl-md-3 pt-3 pt-md-0":"col-12"},r.createElement("h2",{className:"h6 mb-1"},r.createElement(c.x,{phrase:"details"})),e.hasPPDD&&v.M.isVideo(e.video)&&r.createElement("div",{className:"pb-2"},r.createElement(h,{label:g("productionCompanies",{smartCount:null===(n=null===(t=f.productionCompanies)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length}),items:f.productionCompanies}),r.createElement(h,{label:g("distributors",{smartCount:null===(i=null===(a=f.distributors)||void 0===a?void 0:a.data)||void 0===i?void 0:i.length}),items:f.distributors}),r.createElement(h,{label:g("producers",{smartCount:null===(l=null===(o=f.producers)||void 0===o?void 0:o.data)||void 0===l?void 0:l.length}),items:f.producers}),r.createElement(h,{label:g("directors",{smartCount:null===(d=null===(u=f.directors)||void 0===u?void 0:u.data)||void 0===d?void 0:d.length}),items:f.directors})),!!(null===(p=null===(m=f.tags)||void 0===m?void 0:m.data)||void 0===p?void 0:p.length)&&r.createElement(s.P,{tags:f.tags.data,getAppLink:e.getTagAppLink})):r.createElement(r.Fragment,null)}function E(e){var t,n,a=e.video,o=e.maxHeight,s=void 0===o?p.x:o,g=!!e.video.description,h=e.hasPPDD||v.M.isVideo(e.video)&&!!(null===(n=null===(t=e.video.tags)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length);return g||h?r.createElement(c.D.Provider,{value:f},r.createElement("div",{className:"rounded border p-3 mb-3 position-relative"},r.createElement(i(),{autoHeight:!0,autoHeightMax:s},r.createElement("div",{className:"row no-gutters"},g&&r.createElement("div",{className:h?"".concat("uotsN"," pr-3 col-md-7"):"col-12"},r.createElement("div",{className:"d-flex align-items-center"},r.createElement("h2",{className:"h6 mb-1"},r.createElement(c.x,{phrase:"description"})),r.createElement(m.m,{text:a.description,title:a.name,className:"pl-2",onLaunch:e.onLaunchImmersiveReader,onExit:e.onExitImmersiveReader,analyticsOptions:{location:u.LocationContext.PlayPage,entity:u.EntityType.Video,actionType:u.UserAction.Click,descriptor:u.ClickDescriptor.LaunchImmersiveReader},analyticsData:{id:a.id,type:"description"}})),r.createElement("p",{className:"mb-0",dangerouslySetInnerHTML:{__html:l.m.linkifyText(e.video.description)}}),e.canViewCurriculumLinks&&r.createElement(d.L,{onClick:e.onClickSeeCurriculumLinks,className:"cursor-pointer d-inline-block font-weight-500 text-info mt-2"},r.createElement(c.x,{namespace:f,phrase:"seeCurriculumLinks"}))),h&&r.createElement(y,Object.assign({},e)))),e.canViewGlance&&r.createElement("button",{type:"button",className:"close ".concat("j5mgW"),"aria-label":"Close",onClick:e.onClickShowSynopsis},r.createElement("span",{"aria-hidden":"true"},"×")))):r.createElement(r.Fragment,null)}},90102:(e,t,n)=>{n.d(t,{x:()=>r});var r=368},49948:(e,t,n)=>{n.d(t,{l:()=>s});var r=n(58566),a=n(20354),i=n(3010),o=n(45719),l=n(1575),c=n(22902),u=n(16714);function s(e){var t=(0,r.useDispatch)(),n=(0,c.T)().hasPermissions;function s(t){return l.R.pointsOfInterest(e,t)}n(u.C.StudentExperience)&&(e=null),(0,i.i)(!!e&&s,!!e&&function(e){a.a.getFetch(t)(s(e))});var d=(0,o.P)(!!e&&function(e){return s(e).key});return n(u.C.StudentExperience)?o.F:d}},50456:(e,t,n)=>{n.d(t,{l:()=>c});var r=n(1024),a=n(2948),i=n(86702),o=n(22490);function l(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 c(e,t,n){var c,u,s=(c=(0,a.D)(i.y.WEB_PLAYER_DATA),u=2,function(e){if(Array.isArray(e))return e}(c)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){l=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw a}}return i}}(c,u)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(c,u)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];(0,r.useEffect)((function(){if(null==e?void 0:e.id)return t.playNext&&s("playNext",!0),s("nextVideo",e),s("nextVideoAppLink",function(e){return o.W.getAppLink(e,{context:t.context,contextId:t.contextId,playNext:t.playNext,shareId:n})}(e)),function(){s("playNext",!1),s("nextVideo",null),s("nextVideoAppLink",null)}}),[t,e])}},91807:(e,t,n)=>{n.d(t,{Z:()=>r});const r={tagList:"Zw6d9",disabled:"jlL1c",partialTag:"too_N",badge:"OjtN8",close:"X9joI"}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[8416],{93978:(e,t,a)=>{a.r(t),a.d(t,{PlaySharedVideoView:()=>F});var r=a(1024),i=a(58566),n=a(20354),o=a(2948),d=a(23049),s=a(75896),u=a(39151),l=a(47812),c=a(60051),v=a(1575),h=a(22902),m=a(65858),y=a(30439),f=a(4594),I=a(25925),p=a(61699),b=a(64567),g=a(15311),w=a(97037),P=a(61704),x=a(86702),j=a(36873),k=a(32690),A=a(49948),S=a(50456),C=a(97816),V=a(16857),E=a(82817),U=a(7179);function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,r=new Array(t);a<t;a++)r[a]=e[a];return r}function F(e){var t,a,F,O,B,L,R,_=e.queryParams,K=(L=(0,o.D)(x.y.WEB_PLAYER_DATA),R=2,function(e){if(Array.isArray(e))return e}(L)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var r,i,n=[],o=!0,d=!1;try{for(a=a.call(e);!(o=(r=a.next()).done)&&(n.push(r.value),!t||n.length!==t);o=!0);}catch(e){d=!0,i=e}finally{try{o||null==a.return||a.return()}finally{if(d)throw i}}return n}}(L,R)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?q(e,t):void 0}}(L,R)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),T=K[0],D=K[1],M=(0,w.c)(m.LocationContext.VideoThumbnail).setFavourite,N=(0,h.T)().hasPermissions,z=(0,g.r)().hasProduct,W=(0,U.P)().setDeepLink,Y=n.a.useBasicFetch(v.R.sharedVideo(e.objectId,e.shareId)),$=n.a.useBasicFetch(y.o.getShareObject(e.shareId),{optimize:!0}),G=$.data&&($.data.objectTypeId===f.E.Video?l.k.createViewKey(e.shareId,c.f.Share):l.k.createViewKey(e.objectId,c.f.MasterObject,e.shareId)),H=n.a.useBasicFetch(G),J=n.a.useBasicFetch(u.L.config(),{optimize:!0}),Q=(0,j.k)(Y.data,e.currentUser,_.context,_.contextId),X=(0,A.l)(e.currentUser.isAuthenticated&&(null===(t=Y.data)||void 0===t?void 0:t.id));(0,d.o)(null===(a=Y.data)||void 0===a?void 0:a.name),(0,k.P)(Y.data,e.queryParams),(0,S.l)((null===(F=Q.videos)||void 0===F?void 0:F.length)?s.m.first(Q.videos):null,e.queryParams,e.shareId),(0,C.V)(null!==(O=Q.videos)&&void 0!==O?O:[],{hasCurriculumLinks:!0}),(0,b.b)(Y,{private:V.m}),W(e.objectId,"videos",e.shareId);var Z=(0,i.useDispatch)(),ee=(0,E.M)(e.objectId),te=!e.currentUser.isAuthenticated||(null==X?void 0:X.hasCompleted);return r.useEffect((function(){var t,a,r;if(Y.data&&H.data&&$.data)return D("video",Y.data),D("viewKey",H.data.viewKey),D("shareId",e.shareId),(null===(t=e.queryParams)||void 0===t?void 0:t.context)&&D("context",e.queryParams.context),(null===(a=e.queryParams)||void 0===a?void 0:a.contextId)&&D("contextId",e.queryParams.contextId),$.data.ownerInstanceRegion&&D("sharerInstanceRegion",$.data.ownerInstanceRegion),(null===(r=null==X?void 0:X.items)||void 0===r?void 0:r.length)&&D("pointsOfInterest",X.items),e.activityStatus&&D("activityStatus",e.activityStatus),function(){D("pointsOfInterest",null)}}),[!!Y.data,!!H.data,!!$.data,e.shareId,null===(B=Y.data)||void 0===B?void 0:B.favouritedBy,te]),(null==T?void 0:T.video)&&J.data&&(null==T?void 0:T.viewKey)&&Y.data&&te&&$.data&&!ee.isLoading?r.createElement("div",{className:"px-3"},r.createElement(P.j,{video:T.video,curriculums:ee,updateCurriculum:function(e,t){n.a.fetch(Z,p.o.setPresentation(e,I.R.Curriculum,null,t))},imageCdnUrl:J.data.imageCdnUrl,relatedVideos:Q,currentUser:e.currentUser,setFavourite:M,pointsOfInterest:null==X?void 0:X.items,hasPermissions:N,playNext:e.playNext,shareId:e.shareId,hasProduct:z})):r.createElement(r.Fragment,null)}}}]);