@clickview/lite 0.104.0-rc.0 → 0.104.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/.vite/manifest.json +686 -686
  2. package/dist/bundles.json +1 -1
  3. package/dist/en.json +1 -1
  4. package/dist/scripts/{BYC-9gzd.chunk.js → 6BvA1WyF.chunk.js} +2 -2
  5. package/dist/scripts/{BYC-9gzd.chunk.js.map → 6BvA1WyF.chunk.js.map} +1 -1
  6. package/dist/scripts/B1hsuVfV2.chunk.js +2 -0
  7. package/dist/scripts/{BwBWuxjr2.chunk.js.map → B1hsuVfV2.chunk.js.map} +1 -1
  8. package/dist/scripts/{CFxoQ45v.chunk.js → B4GpjPP-.chunk.js} +2 -2
  9. package/dist/scripts/{CFxoQ45v.chunk.js.map → B4GpjPP-.chunk.js.map} +1 -1
  10. package/dist/scripts/{HyBCRhmv2.chunk.js → BAYtWmRb2.chunk.js} +3 -3
  11. package/dist/scripts/{HyBCRhmv2.chunk.js.map → BAYtWmRb2.chunk.js.map} +1 -1
  12. package/dist/scripts/{CVEuWE2q2.chunk.js → BBAIRd3r2.chunk.js} +2 -2
  13. package/dist/scripts/{CVEuWE2q2.chunk.js.map → BBAIRd3r2.chunk.js.map} +1 -1
  14. package/dist/scripts/{C2Hgija5.chunk.js → BGH3t983.chunk.js} +2 -2
  15. package/dist/scripts/{C2Hgija5.chunk.js.map → BGH3t983.chunk.js.map} +1 -1
  16. package/dist/scripts/{DsSd-eh2.chunk.js → BIjzNf4b.chunk.js} +2 -2
  17. package/dist/scripts/{DsSd-eh2.chunk.js.map → BIjzNf4b.chunk.js.map} +1 -1
  18. package/dist/scripts/{D20SeFH5.chunk.js → BLad2z5b.chunk.js} +2 -2
  19. package/dist/scripts/{D20SeFH5.chunk.js.map → BLad2z5b.chunk.js.map} +1 -1
  20. package/dist/scripts/{BklRyGO0.chunk.js → BMZNQKEe.chunk.js} +2 -2
  21. package/dist/scripts/{BklRyGO0.chunk.js.map → BMZNQKEe.chunk.js.map} +1 -1
  22. package/dist/scripts/{BOuzZEkK2.chunk.js → BPjqerK42.chunk.js} +2 -2
  23. package/dist/scripts/BPjqerK42.chunk.js.map +1 -0
  24. package/dist/scripts/{fjQ026Rz2.chunk.js → BQS6kDvJ2.chunk.js} +2 -2
  25. package/dist/scripts/{fjQ026Rz2.chunk.js.map → BQS6kDvJ2.chunk.js.map} +1 -1
  26. package/dist/scripts/{CnfcodVE2.chunk.js → BeOS0_E02.chunk.js} +2 -2
  27. package/dist/scripts/{CnfcodVE2.chunk.js.map → BeOS0_E02.chunk.js.map} +1 -1
  28. package/dist/scripts/{kz-JIHlB2.chunk.js → Bnyn-It62.chunk.js} +2 -2
  29. package/dist/scripts/{kz-JIHlB2.chunk.js.map → Bnyn-It62.chunk.js.map} +1 -1
  30. package/dist/scripts/{BbKY_Dwq.chunk.js → CJCh1Gq6.chunk.js} +2 -2
  31. package/dist/scripts/{BbKY_Dwq.chunk.js.map → CJCh1Gq6.chunk.js.map} +1 -1
  32. package/dist/scripts/{CoUj6M-_.chunk.js → CKGiikBV.chunk.js} +2 -2
  33. package/dist/scripts/{CoUj6M-_.chunk.js.map → CKGiikBV.chunk.js.map} +1 -1
  34. package/dist/scripts/{B8t1n8_x2.chunk.js → CL5P1KMy2.chunk.js} +2 -2
  35. package/dist/scripts/{B8t1n8_x2.chunk.js.map → CL5P1KMy2.chunk.js.map} +1 -1
  36. package/dist/scripts/{Bz-3cXSL.chunk.js → CMKTpGri.chunk.js} +2 -2
  37. package/dist/scripts/{Bz-3cXSL.chunk.js.map → CMKTpGri.chunk.js.map} +1 -1
  38. package/dist/scripts/{ByMZucv2.chunk.js → CgL1gDuH.chunk.js} +2 -2
  39. package/dist/scripts/{ByMZucv2.chunk.js.map → CgL1gDuH.chunk.js.map} +1 -1
  40. package/dist/scripts/{VDqAyMTi2.chunk.js → ClMXRZea2.chunk.js} +2 -2
  41. package/dist/scripts/{VDqAyMTi2.chunk.js.map → ClMXRZea2.chunk.js.map} +1 -1
  42. package/dist/scripts/{Bw2cauzs2.chunk.js → Cm6SLr7W2.chunk.js} +3 -3
  43. package/dist/scripts/{Bw2cauzs2.chunk.js.map → Cm6SLr7W2.chunk.js.map} +1 -1
  44. package/dist/scripts/{gF9PGTMC.chunk.js → Cmjtel65.chunk.js} +2 -2
  45. package/dist/scripts/{gF9PGTMC.chunk.js.map → Cmjtel65.chunk.js.map} +1 -1
  46. package/dist/scripts/{DwLSTi6C.chunk.js → CnYpIR5V.chunk.js} +2 -2
  47. package/dist/scripts/{DwLSTi6C.chunk.js.map → CnYpIR5V.chunk.js.map} +1 -1
  48. package/dist/scripts/{BpFyfI-52.chunk.js → D2vAOC7r2.chunk.js} +2 -2
  49. package/dist/scripts/{BpFyfI-52.chunk.js.map → D2vAOC7r2.chunk.js.map} +1 -1
  50. package/dist/scripts/{29-YRbOp.chunk.js → D4uneRs9.chunk.js} +2 -2
  51. package/dist/scripts/{29-YRbOp.chunk.js.map → D4uneRs9.chunk.js.map} +1 -1
  52. package/dist/scripts/{DbQFpTve.chunk.js → DIeIfhGe.chunk.js} +2 -2
  53. package/dist/scripts/{DbQFpTve.chunk.js.map → DIeIfhGe.chunk.js.map} +1 -1
  54. package/dist/scripts/{CrGWZr2R2.chunk.js → DRHbASmP2.chunk.js} +2 -2
  55. package/dist/scripts/{CrGWZr2R2.chunk.js.map → DRHbASmP2.chunk.js.map} +1 -1
  56. package/dist/scripts/{n4utAY5E2.chunk.js → DTnfO2MH2.chunk.js} +2 -2
  57. package/dist/scripts/{n4utAY5E2.chunk.js.map → DTnfO2MH2.chunk.js.map} +1 -1
  58. package/dist/scripts/{BcMb1XKL.chunk.js → DUJvtd00.chunk.js} +2 -2
  59. package/dist/scripts/{BcMb1XKL.chunk.js.map → DUJvtd00.chunk.js.map} +1 -1
  60. package/dist/scripts/{B0DGioRk.chunk.js → DWz2oR7C.chunk.js} +2 -2
  61. package/dist/scripts/{B0DGioRk.chunk.js.map → DWz2oR7C.chunk.js.map} +1 -1
  62. package/dist/scripts/{CTUTwtJp.chunk.js → DZD8iLCw.chunk.js} +2 -2
  63. package/dist/scripts/{CTUTwtJp.chunk.js.map → DZD8iLCw.chunk.js.map} +1 -1
  64. package/dist/scripts/{C-gsezmj.chunk.js → D_foXB2p.chunk.js} +2 -2
  65. package/dist/scripts/{C-gsezmj.chunk.js.map → D_foXB2p.chunk.js.map} +1 -1
  66. package/dist/scripts/{Br8WvETm.chunk.js → Dhv7zSEB.chunk.js} +2 -2
  67. package/dist/scripts/{Br8WvETm.chunk.js.map → Dhv7zSEB.chunk.js.map} +1 -1
  68. package/dist/scripts/{B6p7xJj9.chunk.js → DpHKtTzO.chunk.js} +2 -2
  69. package/dist/scripts/{B6p7xJj9.chunk.js.map → DpHKtTzO.chunk.js.map} +1 -1
  70. package/dist/scripts/{DynqFaq92.chunk.js → GcexF25w2.chunk.js} +2 -2
  71. package/dist/scripts/{DynqFaq92.chunk.js.map → GcexF25w2.chunk.js.map} +1 -1
  72. package/dist/scripts/{DYN56vJ6.chunk.js → _XhYAc8v.chunk.js} +2 -2
  73. package/dist/scripts/{DYN56vJ6.chunk.js.map → _XhYAc8v.chunk.js.map} +1 -1
  74. package/dist/scripts/{app-4vEzpLow.js → app-DamRTcio.js} +4 -4
  75. package/dist/scripts/{app-4vEzpLow.js.map → app-DamRTcio.js.map} +1 -1
  76. package/dist/scripts/{B2PLlkVH.chunk.js → dZhIkfV6.chunk.js} +3 -3
  77. package/dist/scripts/{B2PLlkVH.chunk.js.map → dZhIkfV6.chunk.js.map} +1 -1
  78. package/dist/scripts/{DZQhE4mm.chunk.js → eSX6I2aK.chunk.js} +2 -2
  79. package/dist/scripts/{DZQhE4mm.chunk.js.map → eSX6I2aK.chunk.js.map} +1 -1
  80. package/dist/scripts/{DnogtDGY2.chunk.js → gTfMMiRw2.chunk.js} +2 -2
  81. package/dist/scripts/{DnogtDGY2.chunk.js.map → gTfMMiRw2.chunk.js.map} +1 -1
  82. package/dist/scripts/{DYW8v4_j2.chunk.js → xUmhnDE42.chunk.js} +2 -2
  83. package/dist/scripts/{DYW8v4_j2.chunk.js.map → xUmhnDE42.chunk.js.map} +1 -1
  84. package/package.json +1 -1
  85. package/dist/scripts/BOuzZEkK2.chunk.js.map +0 -1
  86. package/dist/scripts/BwBWuxjr2.chunk.js +0 -2
@@ -1,2 +1,2 @@
1
- import{o as e}from"./DAXXjFlN.chunk.js";import{t}from"./B_BV48Fy.chunk.js";import{t as n}from"./CQyJ7YGa.chunk.js";import{t as r}from"./C2w0pmFW.chunk.js";import{t as i}from"./wrLrTezN.chunk.js";import{u as a}from"./BX0wDJmp.chunk.js";import{I as o,l as s,y as c,z as l}from"./NlCAcBdo.chunk.js";import{t as u}from"./DIqO2TFN.chunk.js";import{t as d}from"./DTGfiG8Y.chunk.js";import{t as f}from"./DGmmTRu72.chunk.js";import{t as p}from"./C9a9PaRW2.chunk.js";import{t as m}from"./LoQS6GjP.chunk.js";import{t as h}from"./CqrjHjAN.chunk.js";import{t as g}from"./D_gWf2lC.chunk.js";import{t as _}from"./_GCZ-60i.chunk.js";import{t as v}from"./DB_BawmH2.chunk.js";import{t as y}from"./C4TNMYS42.chunk.js";import{n as b,t as x}from"./BGhJ8TEx.chunk.js";import{t as S}from"./Bw2cauzs2.chunk.js";import{t as C}from"./CXnhm0VS2.chunk.js";import{t as w}from"./DaT2nTfp.chunk.js";import{t as T}from"./CLJr5CXS.chunk.js";var E=e(r()),D=i(),O=n.encloseNamespace(`signUp.upsellStartTrial`);function k(e){let{upsellPresentationType:t,config:n,currentUser:r}=e;if(!t||!n||!r)return null;let i=t===d.Subject?`welcomeToClickView`:`welcomeToClickViewLive`,a=n?.liteUrl.includes(`staging`)?u.TutorialVideoHighlight[i].staging:u.TutorialVideoHighlight[i].production,o=r?.instanceRegion;return a?.[o]}function A(e){let[n,r]=E.useState(!1),i=C(),u=y(),{updateUserSettingAsync:A}=f(c.UpsellRequestForm),j=a(g.config()),M=a(h.currentUser()),N=a(M.data?.id&&h.user(M.data.id)),P=k({upsellPresentationType:u.upsellPresentationType,config:j.data,currentUser:M.data}),F=a(P&&m.sharedVideo(P.VIDEO,P.SHARE)),I=a(P&&x.createViewKey(P.SHARE,b.Share));async function L(){r(!0);try{let n=u.upsellPresentationType===d.Subject?v.ClickView:v.ClickViewLive;_.logUserAction({id:M.data?.id,jobTitle:N.data?.userProfile?.metadata?.jobTitle,variant:n},{actionType:l.Submit,entity:s.User,descriptor:o.TeacherRequestUpsell,location:c.UpsellRequestForm}),await A({name:t.SignUpVariant,value:v.Bundle,kind:p.Setting}),i.success(O(`successMessage`)),r(!1),e.closePopup()}catch{r(!1),i.error(O(`errorMessage`))}}let R=!!M.data&&!!j.data&&!!F.data&&!!I.data;return(0,D.jsxs)(w,{closePopup:e.closePopup,animation:e.animate,title:O(`title`),size:`lg`,bodyClassName:`d-flex flex-column gap-3`,showLoadingSpinner:!R,children:[(0,D.jsx)(`div`,{children:(0,D.jsx)(S,{config:j.data,currentUser:M.data,video:F.data,viewKey:I.data,presentationSlug:null,autoplay:!0})}),(0,D.jsx)(`p`,{className:`mb-0`,children:O(`description`)}),(0,D.jsx)(T,{onClickSecondary:e.closePopup,onClickPrimary:L,text:{primary:O(`startTrial`),secondary:O(`cancel`)},loading:n})]})}export{A as UpsellStartTrialView};
2
- //# sourceMappingURL=DsSd-eh2.chunk.js.map
1
+ import{o as e}from"./DAXXjFlN.chunk.js";import{t}from"./B_BV48Fy.chunk.js";import{t as n}from"./CQyJ7YGa.chunk.js";import{t as r}from"./C2w0pmFW.chunk.js";import{t as i}from"./wrLrTezN.chunk.js";import{u as a}from"./BX0wDJmp.chunk.js";import{I as o,l as s,y as c,z as l}from"./NlCAcBdo.chunk.js";import{t as u}from"./DIqO2TFN.chunk.js";import{t as d}from"./DTGfiG8Y.chunk.js";import{t as f}from"./DGmmTRu72.chunk.js";import{t as p}from"./C9a9PaRW2.chunk.js";import{t as m}from"./LoQS6GjP.chunk.js";import{t as h}from"./CqrjHjAN.chunk.js";import{t as g}from"./D_gWf2lC.chunk.js";import{t as _}from"./_GCZ-60i.chunk.js";import{t as v}from"./DB_BawmH2.chunk.js";import{t as y}from"./C4TNMYS42.chunk.js";import{n as b,t as x}from"./BGhJ8TEx.chunk.js";import{t as S}from"./Cm6SLr7W2.chunk.js";import{t as C}from"./CXnhm0VS2.chunk.js";import{t as w}from"./DaT2nTfp.chunk.js";import{t as T}from"./CLJr5CXS.chunk.js";var E=e(r()),D=i(),O=n.encloseNamespace(`signUp.upsellStartTrial`);function k(e){let{upsellPresentationType:t,config:n,currentUser:r}=e;if(!t||!n||!r)return null;let i=t===d.Subject?`welcomeToClickView`:`welcomeToClickViewLive`,a=n?.liteUrl.includes(`staging`)?u.TutorialVideoHighlight[i].staging:u.TutorialVideoHighlight[i].production,o=r?.instanceRegion;return a?.[o]}function A(e){let[n,r]=E.useState(!1),i=C(),u=y(),{updateUserSettingAsync:A}=f(c.UpsellRequestForm),j=a(g.config()),M=a(h.currentUser()),N=a(M.data?.id&&h.user(M.data.id)),P=k({upsellPresentationType:u.upsellPresentationType,config:j.data,currentUser:M.data}),F=a(P&&m.sharedVideo(P.VIDEO,P.SHARE)),I=a(P&&x.createViewKey(P.SHARE,b.Share));async function L(){r(!0);try{let n=u.upsellPresentationType===d.Subject?v.ClickView:v.ClickViewLive;_.logUserAction({id:M.data?.id,jobTitle:N.data?.userProfile?.metadata?.jobTitle,variant:n},{actionType:l.Submit,entity:s.User,descriptor:o.TeacherRequestUpsell,location:c.UpsellRequestForm}),await A({name:t.SignUpVariant,value:v.Bundle,kind:p.Setting}),i.success(O(`successMessage`)),r(!1),e.closePopup()}catch{r(!1),i.error(O(`errorMessage`))}}let R=!!M.data&&!!j.data&&!!F.data&&!!I.data;return(0,D.jsxs)(w,{closePopup:e.closePopup,animation:e.animate,title:O(`title`),size:`lg`,bodyClassName:`d-flex flex-column gap-3`,showLoadingSpinner:!R,children:[(0,D.jsx)(`div`,{children:(0,D.jsx)(S,{config:j.data,currentUser:M.data,video:F.data,viewKey:I.data,presentationSlug:null,autoplay:!0})}),(0,D.jsx)(`p`,{className:`mb-0`,children:O(`description`)}),(0,D.jsx)(T,{onClickSecondary:e.closePopup,onClickPrimary:L,text:{primary:O(`startTrial`),secondary:O(`cancel`)},loading:n})]})}export{A as UpsellStartTrialView};
2
+ //# sourceMappingURL=BIjzNf4b.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DsSd-eh2.chunk.js","names":[],"sources":["../../src/apps/sign-up/views/upsell-start-trial/UpsellStartTrialView.tsx"],"sourcesContent":["import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/react/index';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, LocationContext, UpgradeBannerDescriptors, UserAction } from 'libs/analytics/interfaces';\n\nimport { MultiStepPopupViewProps } from 'libs/shared/components/multistep-popup/MultiStepPopup';\nimport { Popup } from 'libs/shared/components/popup/Popup';\nimport { HardCoded } from 'libs/shared/constants/HardCoded';\nimport { MediaIdType } from 'libs/shared/enums/MediaIdType';\nimport { PresentationType } from 'libs/shared/enums/PresentationType';\nimport { SettingKind } from 'libs/shared/enums/SettingKind';\nimport { SettingName } from 'libs/shared/enums/SettingName';\nimport { SignUpVariant } from 'libs/shared/enums/SignUpVariant';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { PlayerRequests } from 'libs/shared/flight-requests/PlayerRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { Config, CurrentUser, PlayerViewKey, User, VideoTypes } from 'libs/shared/interfaces';\n\nimport { useUpsellContext } from 'shared/hooks/useUpsellContext';\nimport { LitePlayerView } from 'shared/views/lite-player/LitePlayerView';\n\nimport { RequestFlowControls } from 'apps/sign-up/components/request-flow-controls/RequestFlowControls';\n\nconst namespace = 'signUp.upsellStartTrial';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface GetTutorialVideoDetailOptions {\n upsellPresentationType: PresentationType;\n config: Config;\n currentUser: CurrentUser;\n}\n\nfunction getTutorialVideoDetail(options: GetTutorialVideoDetailOptions) {\n const { upsellPresentationType, config, currentUser } = options;\n if (!upsellPresentationType || !config || !currentUser)\n return null;\n \n const videoType = upsellPresentationType === PresentationType.Subject ? 'welcomeToClickView' : 'welcomeToClickViewLive';\n const instanceRegionVideoIds = config?.liteUrl.includes('staging') ?\n HardCoded.TutorialVideoHighlight[videoType].staging :\n HardCoded.TutorialVideoHighlight[videoType].production;\n const instanceRegion = currentUser?.instanceRegion;\n return instanceRegionVideoIds?.[instanceRegion as keyof typeof instanceRegionVideoIds];\n}\n\nexport interface UpsellStartTrialViewProps extends MultiStepPopupViewProps {}\n\nexport function UpsellStartTrialView(props: UpsellStartTrialViewProps) {\n const [ submitting, setSubmitting ] = React.useState(false);\n\n const alerts = useAlerts();\n \n const upsellContext = useUpsellContext();\n const { updateUserSettingAsync } = useSettings(LocationContext.UpsellRequestForm);\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const detailCurrentUser = Flight.useBasicFetch<User>(currentUser.data?.id && UserRequests.user(currentUser.data.id));\n\n const tutorialVideoDetail = getTutorialVideoDetail({\n upsellPresentationType: upsellContext.upsellPresentationType,\n config: config.data,\n currentUser: currentUser.data\n });\n\n const tutorialVideo = Flight.useBasicFetch<VideoTypes>(\n tutorialVideoDetail && VideoRequests.sharedVideo(tutorialVideoDetail.VIDEO, tutorialVideoDetail.SHARE)\n );\n \n const viewKey = Flight.useBasicFetch<PlayerViewKey>(\n tutorialVideoDetail && PlayerRequests.createViewKey(tutorialVideoDetail.SHARE, MediaIdType.Share)\n );\n\n async function onStartTrial() {\n setSubmitting(true);\n\n try {\n const variant = upsellContext.upsellPresentationType === PresentationType.Subject ?\n SignUpVariant.ClickView : SignUpVariant.ClickViewLive;\n\n AnalyticsHelper.logUserAction(\n {\n id: currentUser.data?.id,\n jobTitle: detailCurrentUser.data?.userProfile?.metadata?.jobTitle,\n variant\n },\n {\n actionType: UserAction.Submit,\n entity: EntityType.User,\n descriptor: UpgradeBannerDescriptors.TeacherRequestUpsell,\n location: LocationContext.UpsellRequestForm\n }\n );\n \n await updateUserSettingAsync({\n name: SettingName.SignUpVariant,\n value: SignUpVariant.Bundle,\n kind: SettingKind.Setting\n });\n\n alerts.success(getPhrase('successMessage'));\n setSubmitting(false);\n props.closePopup();\n } catch {\n setSubmitting(false);\n alerts.error(getPhrase('errorMessage'));\n }\n }\n\n const loaded = !!currentUser.data && !!config.data && !!tutorialVideo.data && !!viewKey.data;\n \n return (\n <Popup\n closePopup={props.closePopup}\n animation={props.animate}\n title={getPhrase('title')}\n size='lg'\n bodyClassName='d-flex flex-column gap-3'\n showLoadingSpinner={!loaded}\n >\n <div>\n <LitePlayerView\n config={config.data}\n currentUser={currentUser.data}\n video={tutorialVideo.data}\n viewKey={viewKey.data}\n presentationSlug={null}\n autoplay\n />\n </div>\n <p className='mb-0'>{getPhrase('description')}</p>\n <RequestFlowControls\n onClickSecondary={props.closePopup}\n onClickPrimary={onStartTrial}\n text={{\n primary: getPhrase('startTrial'),\n secondary: getPhrase('cancel')\n }}\n loading={submitting}\n />\n </Popup>\n );\n}\n"],"mappings":"g6BA8BM,EAAY,EAAgB,iBAAiB,yBAAS,EAQ5D,SAAS,EAAuB,EAAwC,CACtE,GAAM,CAAE,yBAAwB,SAAQ,eAAgB,EACxD,GAAI,CAAC,GAA0B,CAAC,GAAU,CAAC,EACzC,OAAO,KAET,IAAM,EAAY,IAA2B,EAAiB,QAAU,qBAAuB,yBACzF,EAAyB,GAAQ,QAAQ,SAAS,SAAS,EAC/D,EAAU,uBAAuB,EAAU,C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AAC,CAAC,EAAc,MAAQ,CAAC,CAAC,EAAQ,KAExF,OACE,EAAA,EAAA,KAAA,CAAC,EAAD,CACE,WAAY,EAAM,WAClB,UAAW,EAAM,QACjB,MAAO,EAAU,OAAO,EACxB,KAAK,KACL,cAAc,2BACd,mBAAoB,CAAC,WANvB,EAQE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAA,UACE,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,OAAQ,EAAO,KACf,YAAa,EAAY,KACzB,MAAO,EAAc,KACrB,QAAS,EAAQ,KACjB,iBAAkB,KAClB,SAAA,EACD,CAAA,CACE,CAAA,GACL,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,gBAAQ,EAAU,aAAa,CAAK,CAAA,GACjD,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,iBAAkB,EAAM,WACxB,eAAgB,EAChB,KAAM,CACJ,QAAS,EAAU,YAAY,EAC/B,UAAW,EAAU,QAAQ,CAC/B,EACA,QAAS,CACV,CAAA,CACI,GAEX"}
1
+ {"version":3,"file":"BIjzNf4b.chunk.js","names":[],"sources":["../../src/apps/sign-up/views/upsell-start-trial/UpsellStartTrialView.tsx"],"sourcesContent":["import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/react/index';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, LocationContext, UpgradeBannerDescriptors, UserAction } from 'libs/analytics/interfaces';\n\nimport { MultiStepPopupViewProps } from 'libs/shared/components/multistep-popup/MultiStepPopup';\nimport { Popup } from 'libs/shared/components/popup/Popup';\nimport { HardCoded } from 'libs/shared/constants/HardCoded';\nimport { MediaIdType } from 'libs/shared/enums/MediaIdType';\nimport { PresentationType } from 'libs/shared/enums/PresentationType';\nimport { SettingKind } from 'libs/shared/enums/SettingKind';\nimport { SettingName } from 'libs/shared/enums/SettingName';\nimport { SignUpVariant } from 'libs/shared/enums/SignUpVariant';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { PlayerRequests } from 'libs/shared/flight-requests/PlayerRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { Config, CurrentUser, PlayerViewKey, User, VideoTypes } from 'libs/shared/interfaces';\n\nimport { useUpsellContext } from 'shared/hooks/useUpsellContext';\nimport { LitePlayerView } from 'shared/views/lite-player/LitePlayerView';\n\nimport { RequestFlowControls } from 'apps/sign-up/components/request-flow-controls/RequestFlowControls';\n\nconst namespace = 'signUp.upsellStartTrial';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface GetTutorialVideoDetailOptions {\n upsellPresentationType: PresentationType;\n config: Config;\n currentUser: CurrentUser;\n}\n\nfunction getTutorialVideoDetail(options: GetTutorialVideoDetailOptions) {\n const { upsellPresentationType, config, currentUser } = options;\n if (!upsellPresentationType || !config || !currentUser)\n return null;\n \n const videoType = upsellPresentationType === PresentationType.Subject ? 'welcomeToClickView' : 'welcomeToClickViewLive';\n const instanceRegionVideoIds = config?.liteUrl.includes('staging') ?\n HardCoded.TutorialVideoHighlight[videoType].staging :\n HardCoded.TutorialVideoHighlight[videoType].production;\n const instanceRegion = currentUser?.instanceRegion;\n return instanceRegionVideoIds?.[instanceRegion as keyof typeof instanceRegionVideoIds];\n}\n\nexport interface UpsellStartTrialViewProps extends MultiStepPopupViewProps {}\n\nexport function UpsellStartTrialView(props: UpsellStartTrialViewProps) {\n const [ submitting, setSubmitting ] = React.useState(false);\n\n const alerts = useAlerts();\n \n const upsellContext = useUpsellContext();\n const { updateUserSettingAsync } = useSettings(LocationContext.UpsellRequestForm);\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const detailCurrentUser = Flight.useBasicFetch<User>(currentUser.data?.id && UserRequests.user(currentUser.data.id));\n\n const tutorialVideoDetail = getTutorialVideoDetail({\n upsellPresentationType: upsellContext.upsellPresentationType,\n config: config.data,\n currentUser: currentUser.data\n });\n\n const tutorialVideo = Flight.useBasicFetch<VideoTypes>(\n tutorialVideoDetail && VideoRequests.sharedVideo(tutorialVideoDetail.VIDEO, tutorialVideoDetail.SHARE)\n );\n \n const viewKey = Flight.useBasicFetch<PlayerViewKey>(\n tutorialVideoDetail && PlayerRequests.createViewKey(tutorialVideoDetail.SHARE, MediaIdType.Share)\n );\n\n async function onStartTrial() {\n setSubmitting(true);\n\n try {\n const variant = upsellContext.upsellPresentationType === PresentationType.Subject ?\n SignUpVariant.ClickView : SignUpVariant.ClickViewLive;\n\n AnalyticsHelper.logUserAction(\n {\n id: currentUser.data?.id,\n jobTitle: detailCurrentUser.data?.userProfile?.metadata?.jobTitle,\n variant\n },\n {\n actionType: UserAction.Submit,\n entity: EntityType.User,\n descriptor: UpgradeBannerDescriptors.TeacherRequestUpsell,\n location: LocationContext.UpsellRequestForm\n }\n );\n \n await updateUserSettingAsync({\n name: SettingName.SignUpVariant,\n value: SignUpVariant.Bundle,\n kind: SettingKind.Setting\n });\n\n alerts.success(getPhrase('successMessage'));\n setSubmitting(false);\n props.closePopup();\n } catch {\n setSubmitting(false);\n alerts.error(getPhrase('errorMessage'));\n }\n }\n\n const loaded = !!currentUser.data && !!config.data && !!tutorialVideo.data && !!viewKey.data;\n \n return (\n <Popup\n closePopup={props.closePopup}\n animation={props.animate}\n title={getPhrase('title')}\n size='lg'\n bodyClassName='d-flex flex-column gap-3'\n showLoadingSpinner={!loaded}\n >\n <div>\n <LitePlayerView\n config={config.data}\n currentUser={currentUser.data}\n video={tutorialVideo.data}\n viewKey={viewKey.data}\n presentationSlug={null}\n autoplay\n />\n </div>\n <p className='mb-0'>{getPhrase('description')}</p>\n <RequestFlowControls\n onClickSecondary={props.closePopup}\n onClickPrimary={onStartTrial}\n text={{\n prim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KACnB,WAAY,EAAyB,qBACrC,SAAU,EAAgB,iBAC5B,CACF,EAEA,MAAM,EAAuB,CAC3B,KAAM,EAAY,cAClB,MAAO,EAAc,OACrB,KAAM,EAAY,OACpB,CAAC,EAED,EAAO,QAAQ,EAAU,gBAAgB,CAAC,EAC1C,EAAc,EAAK,EACnB,EAAM,WAAW,CACnB,MAAQ,CACN,EAAc,EAAK,EACnB,EAAO,MAAM,EAAU,cAAc,CAAC,CACxC,CACF,CAEA,IAAM,EAAS,CAAC,CAAC,EAAY,MAAQ,CAAC,CAAC,EAAO,MAAQ,CAAC,CAAC,EAAc,MAAQ,CAAC,CAAC,EAAQ,KAExF,OACE,EAAA,EAAA,KAAA,CAAC,EAAD,CACE,WAAY,EAAM,WAClB,UAAW,EAAM,QACjB,MAAO,EAAU,OAAO,EACxB,KAAK,KACL,cAAc,2BACd,mBAAoB,CAAC,WANvB,EAQE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAA,UACE,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,OAAQ,EAAO,KACf,YAAa,EAAY,KACzB,MAAO,EAAc,KACrB,QAAS,EAAQ,KACjB,iBAAkB,KAClB,SAAA,EACD,CAAA,CACE,CAAA,GACL,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,gBAAQ,EAAU,aAAa,CAAK,CAAA,GACjD,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,iBAAkB,EAAM,WACxB,eAAgB,EAChB,KAAM,CACJ,QAAS,EAAU,YAAY,EAC/B,UAAW,EAAU,QAAQ,CAC/B,EACA,QAAS,CACV,CAAA,CACI,GAEX"}
@@ -1,2 +1,2 @@
1
- import{o as e}from"./DAXXjFlN.chunk.js";import{_ as t}from"./BftnFbcr.chunk.js";import{t as n}from"./DMnm3Ewv.chunk.js";import"./DFZS3Ffo.chunk.js";import{n as ee}from"./B785hxeE.chunk.js";import{t as r}from"./CQyJ7YGa.chunk.js";import{t as te}from"./e57H3T-k.chunk.js";import{t as i}from"./C2w0pmFW.chunk.js";import{t as a}from"./wrLrTezN.chunk.js";import{t as o}from"./BXTI9cmX.chunk.js";import{d as ne,u as s}from"./BX0wDJmp.chunk.js";import{y as re}from"./NlCAcBdo.chunk.js";import{t as ie}from"./DGmmTRu72.chunk.js";import{t as ae}from"./DbSUQ2A12.chunk.js";import{t as oe}from"./DZssmXj6.chunk.js";import{t as se}from"./BC8PeYqm.chunk.js";import{t as c}from"./LoQS6GjP.chunk.js";import{t as l}from"./CqrjHjAN.chunk.js";import{t as u}from"./eoAypzU3.chunk.js";import{t as d}from"./D_gWf2lC.chunk.js";import{t as f}from"./CZbN8PTA.chunk.js";import{t as p}from"./XIE88U01.chunk.js";import{n as ce,t as le}from"./C6-aC3vu.chunk.js";import{t as ue}from"./7LGxCHGV.chunk.js";import{t as m}from"./Bbv3vbm7.chunk.js";import{t as de}from"./B3gsVN-_.chunk.js";import{l as fe,r as h}from"./Bw2cauzs2.chunk.js";import{t as g}from"./B_-pJtOI2.chunk.js";import{t as _}from"./DBkEQkKm2.chunk.js";import{t as v}from"./C1loT8MD2.chunk.js";import{t as y}from"./CgW21-1J.chunk.js";import{n as b}from"./ChnNWPOK2.chunk.js";import{t as x}from"./1IFtXPNY.chunk.js";import{t as S}from"./DMaQV7L2.chunk.js";import{t as C}from"./CCb14vhF.chunk.js";import{t as w}from"./C9XBZFiR.chunk.js";import{t as T}from"./BnuuRu_J2.chunk.js";import{t as E}from"./CC5Dr9aG.chunk.js";import{t as D}from"./DNuJUXpr2.chunk.js";import{v as O}from"./fjQ026Rz2.chunk.js";import{n as k,r as A,t as j}from"./n4utAY5E2.chunk.js";var M=e(i()),N=a(),P=r.encloseNamespace(`shared.play`),F={notFound:y,forbidden:{privacy:m}};I.defaultProps={queryParams:{}};function I(e){let{context:r,contextId:i,playNext:a,mtv:m,resourceId:y}=e.queryParams,{commonVideoProps:I,hasCommonVideoPropsCompleted:L}=T({locationContext:re.PlayPage,mtv:m}),{hasPermissions:pe}=de(),{activePresentation:R}=f(),{hasPlayPageTranscript:z,hasNewSearch:B,clickViewLive:V}=ie(null),H=s(x.streamableLearning()),U=s(l.currentUser()),W=s(c.video(e.id)),G=v({objectId:W.data?.id,objectTypeId:W.data?.typeId}),me=s(G.canViewClips&&oe.videoClips(e.id)),he=s(G.canViewInteractives&&se.videoInteractives(e.id)),ge=s(R&&S.audiencesByPresentationId(R.id)),{shouldFetchTranscript:K,shouldShowTranscript:_e}=j(e.id),{subtitles:q,chapters:ve}=s(K&&U.data?.contentRegion&&A.chaptersAndSubtitles(e.id,U.data.contentRegion))?.data||{},J=q?.filter(e=>!e.customer),Y=ne(J&&J.length>0?J.map(e=>A.subtitleVtt(e.url,e)):[]),ye=J?.filter(e=>Y.data.find(t=>t.id===e.id))||[],X=s(d.config()),be=O(),xe=s(W.statusCode===n.Forbidden&&c.video(e.id,ae.StripMetadata)),Se=C(e.id),Z=h({video:W.data,context:r,contextId:i,moviesAndTv:m,currentUser:U.data}),Q=fe(e.id,!0),$=s(c.regionAlternatives(e.id)),Ce=E({name:W.data?.name});return le(ce.getVideoMetadata({content:W.data,regionAlternatives:$.data,phraseContext:{phraseHandler:P,titlePhrase:`pageTitle`,descriptionPhrase:`pageDescription`},canonicalLink:g.getCanonicalLink({stripPresentationSlug:!0,customAppLink:_.getAppLink(W.data,{},e.presentationSlug)}),allowIndexing:g.allowIndexing(),hrefLang:g.getContentHrefLang($.data,(e,t)=>({application:o.VIDEOS,action:u.Videos.PLAY_VIDEO,args:[null,e,te.slugify(t)]}))})),w(W,F,{forbidden:!0}),D(Z.videos??[]),b({id:e.id,app:`videos`}),ue(xe),M.useEffect(()=>{V||!W.data||!H.data||!V&&W.data.libraries?.data.find(e=>e.id===H.data.objectId)&&t.throw(new p)},[W.hasCompleted,H.hasCompleted,V]),W.data&&U.hasCompleted&&Q.hasCompleted&&L?(0,N.jsx)(k,{presentationSlug:e.presentationSlug,video:W.data,clips:me.data?.data,interactives:he.data?.data,curriculums:Se,relatedVideos:Z,currentUser:U.data,pointsOfInterest:Q.items,playNext:a,featureAccess:G,audiences:ge.data,params:e.queryParams,canManageVideoAccess:pe(ee.ManageVideoAccess),shouldShowSideTableOfContents:be,tableOfContentsId:e.queryParams?.tocId,breadcrumbs:Ce,commonVideoProps:I,hasTheatreMode:z,shouldShowTranscript:_e&&(!K||Y.data?.length>0),vttSubtitles:Y.data||[],subtitles:ye,chapters:ve,isBot:g.isBot(),playerApiUrl:X.data?.playerApiUrl,hasNewSearch:B,liteUrl:X.data.liteUrl,resourcePopupId:y}):(0,N.jsx)(N.Fragment,{})}export{I as PlayView};
2
- //# sourceMappingURL=D20SeFH5.chunk.js.map
1
+ import{o as e}from"./DAXXjFlN.chunk.js";import{_ as t}from"./BftnFbcr.chunk.js";import{t as n}from"./DMnm3Ewv.chunk.js";import"./DFZS3Ffo.chunk.js";import{n as ee}from"./B785hxeE.chunk.js";import{t as r}from"./CQyJ7YGa.chunk.js";import{t as te}from"./e57H3T-k.chunk.js";import{t as i}from"./C2w0pmFW.chunk.js";import{t as a}from"./wrLrTezN.chunk.js";import{t as o}from"./BXTI9cmX.chunk.js";import{d as ne,u as s}from"./BX0wDJmp.chunk.js";import{y as re}from"./NlCAcBdo.chunk.js";import{t as ie}from"./DGmmTRu72.chunk.js";import{t as ae}from"./DbSUQ2A12.chunk.js";import{t as oe}from"./DZssmXj6.chunk.js";import{t as se}from"./BC8PeYqm.chunk.js";import{t as c}from"./LoQS6GjP.chunk.js";import{t as l}from"./CqrjHjAN.chunk.js";import{t as u}from"./eoAypzU3.chunk.js";import{t as d}from"./D_gWf2lC.chunk.js";import{t as f}from"./CZbN8PTA.chunk.js";import{t as p}from"./XIE88U01.chunk.js";import{n as ce,t as le}from"./C6-aC3vu.chunk.js";import{t as ue}from"./7LGxCHGV.chunk.js";import{t as m}from"./Bbv3vbm7.chunk.js";import{t as de}from"./B3gsVN-_.chunk.js";import{l as fe,r as h}from"./Cm6SLr7W2.chunk.js";import{t as g}from"./B_-pJtOI2.chunk.js";import{t as _}from"./DBkEQkKm2.chunk.js";import{t as v}from"./C1loT8MD2.chunk.js";import{t as y}from"./CgW21-1J.chunk.js";import{n as b}from"./ChnNWPOK2.chunk.js";import{t as x}from"./1IFtXPNY.chunk.js";import{t as S}from"./DMaQV7L2.chunk.js";import{t as C}from"./CCb14vhF.chunk.js";import{t as w}from"./C9XBZFiR.chunk.js";import{t as T}from"./BnuuRu_J2.chunk.js";import{t as E}from"./CC5Dr9aG.chunk.js";import{t as D}from"./DNuJUXpr2.chunk.js";import{v as O}from"./BQS6kDvJ2.chunk.js";import{n as k,r as A,t as j}from"./DTnfO2MH2.chunk.js";var M=e(i()),N=a(),P=r.encloseNamespace(`shared.play`),F={notFound:y,forbidden:{privacy:m}};I.defaultProps={queryParams:{}};function I(e){let{context:r,contextId:i,playNext:a,mtv:m,resourceId:y}=e.queryParams,{commonVideoProps:I,hasCommonVideoPropsCompleted:L}=T({locationContext:re.PlayPage,mtv:m}),{hasPermissions:pe}=de(),{activePresentation:R}=f(),{hasPlayPageTranscript:z,hasNewSearch:B,clickViewLive:V}=ie(null),H=s(x.streamableLearning()),U=s(l.currentUser()),W=s(c.video(e.id)),G=v({objectId:W.data?.id,objectTypeId:W.data?.typeId}),me=s(G.canViewClips&&oe.videoClips(e.id)),he=s(G.canViewInteractives&&se.videoInteractives(e.id)),ge=s(R&&S.audiencesByPresentationId(R.id)),{shouldFetchTranscript:K,shouldShowTranscript:_e}=j(e.id),{subtitles:q,chapters:ve}=s(K&&U.data?.contentRegion&&A.chaptersAndSubtitles(e.id,U.data.contentRegion))?.data||{},J=q?.filter(e=>!e.customer),Y=ne(J&&J.length>0?J.map(e=>A.subtitleVtt(e.url,e)):[]),ye=J?.filter(e=>Y.data.find(t=>t.id===e.id))||[],X=s(d.config()),be=O(),xe=s(W.statusCode===n.Forbidden&&c.video(e.id,ae.StripMetadata)),Se=C(e.id),Z=h({video:W.data,context:r,contextId:i,moviesAndTv:m,currentUser:U.data}),Q=fe(e.id,!0),$=s(c.regionAlternatives(e.id)),Ce=E({name:W.data?.name});return le(ce.getVideoMetadata({content:W.data,regionAlternatives:$.data,phraseContext:{phraseHandler:P,titlePhrase:`pageTitle`,descriptionPhrase:`pageDescription`},canonicalLink:g.getCanonicalLink({stripPresentationSlug:!0,customAppLink:_.getAppLink(W.data,{},e.presentationSlug)}),allowIndexing:g.allowIndexing(),hrefLang:g.getContentHrefLang($.data,(e,t)=>({application:o.VIDEOS,action:u.Videos.PLAY_VIDEO,args:[null,e,te.slugify(t)]}))})),w(W,F,{forbidden:!0}),D(Z.videos??[]),b({id:e.id,app:`videos`}),ue(xe),M.useEffect(()=>{V||!W.data||!H.data||!V&&W.data.libraries?.data.find(e=>e.id===H.data.objectId)&&t.throw(new p)},[W.hasCompleted,H.hasCompleted,V]),W.data&&U.hasCompleted&&Q.hasCompleted&&L?(0,N.jsx)(k,{presentationSlug:e.presentationSlug,video:W.data,clips:me.data?.data,interactives:he.data?.data,curriculums:Se,relatedVideos:Z,currentUser:U.data,pointsOfInterest:Q.items,playNext:a,featureAccess:G,audiences:ge.data,params:e.queryParams,canManageVideoAccess:pe(ee.ManageVideoAccess),shouldShowSideTableOfContents:be,tableOfContentsId:e.queryParams?.tocId,breadcrumbs:Ce,commonVideoProps:I,hasTheatreMode:z,shouldShowTranscript:_e&&(!K||Y.data?.length>0),vttSubtitles:Y.data||[],subtitles:ye,chapters:ve,isBot:g.isBot(),playerApiUrl:X.data?.playerApiUrl,hasNewSearch:B,liteUrl:X.data.liteUrl,resourcePopupId:y}):(0,N.jsx)(N.Fragment,{})}export{I as PlayView};
2
+ //# sourceMappingURL=BLad2z5b.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"D20SeFH5.chunk.js","names":[],"sources":["../../src/shared/views/play/PlayView.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces/HashObject';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { PermissionFilterOption } from 'libs/shared/enums/PermissionFilterOption';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { NotFoundError } from 'libs/shared/errors/general/not-found/NotFoundError';\nimport { VideoNotFoundError } from 'libs/shared/errors/videos/video-not-found/VideoNotFoundError';\nimport { VideoPrivateError } from 'libs/shared/errors/videos/video-private/VideoPrivateError';\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { ClipRequests } from 'libs/shared/flight-requests/ClipRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { InteractiveRequests } from 'libs/shared/flight-requests/InteractiveRequests';\nimport { LibraryRequests } from 'libs/shared/flight-requests/LibraryRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useBreadcrumbs } from 'libs/shared/hooks/useBreadcrumbs';\nimport { useCannotConsumeError } from 'libs/shared/hooks/useCannotConsumeError';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { ClipCollection, Config, CurrentUser, InteractiveCollection, PresentationAudience, RegionAlternative, Video, VttSubtitleResponse } from 'libs/shared/interfaces';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { TranscriptRequests, TranscriptResponse } from 'shared/flight-requests/TranscriptRequests';\nimport { useActivePresentation } from 'shared/hooks/presentations/useActivePresentation';\nimport { useCommonVideoProps } from 'shared/hooks/useCommonVideoProps';\nimport { useCurriculums } from 'shared/hooks/useCurriculums';\nimport { useDeepLinks } from 'shared/hooks/useDeepLinks';\nimport { useFetchPointsOfInterest } from 'shared/hooks/useFetchPointsOfInterest';\nimport { useGetRelatedVideos } from 'shared/hooks/useGetRelatedVideos';\nimport { useVideoFeatureAccess } from 'shared/hooks/useVideoFeatureAccess';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\nimport { SeoHelper } from 'shared/utils/SeoHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\nimport { useShouldShowSideTableOfContents } from 'shared/views/play/hooks/useShouldShowTableOfContents';\nimport { useShowTranscriptForVideo } from 'shared/views/play/hooks/useShowVideoTranscript';\n\nimport { PlayPage } from './components/play-page/PlayPage';\n\nconst namespace = 'shared.play';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst videoErrors = {\n notFound: VideoNotFoundError,\n forbidden: {\n privacy: VideoPrivateError\n }\n};\n\nexport interface PlayViewProps {\n presentationSlug: string;\n id: string;\n queryParams?: PlayViewQueryParams;\n}\n\nPlayView.defaultProps = {\n queryParams: {}\n};\n\nexport function PlayView(props: PlayViewProps): React.ReactElement {\n const { context, contextId, playNext, mtv, resourceId } = props.queryParams;\n\n const {\n commonVideoProps,\n hasCommonVideoPropsCompleted\n } = useCommonVideoProps({ locationContext: LocationContext.PlayPage, mtv });\n\n const { hasPermissions } = usePermissions();\n\n const { activePresentation } = useActivePresentation();\n const { hasPlayPageTranscript, hasNewSearch, clickViewLive } = useSettings(null);\n\n const streamableLibrary = Flight.useBasicFetch<HashObject>(LibraryRequests.streamableLearning());\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const video = Flight.useBasicFetch<Video>(VideoRequests.video(props.id));\n\n const featureAccess = useVideoFeatureAccess({\n objectId: video.data?.id,\n objectTypeId: video.data?.typeId\n });\n \n const clips = Flight.useBasicFetch<ClipCollection>(\n featureAccess.canViewClips && ClipRequests.videoClips(props.id)\n );\n const interactives = Flight.useBasicFetch<InteractiveCollection>(\n featureAccess.canViewInteractives && InteractiveRequests.videoInteractives(props.id)\n );\n \n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n activePresentation &&\n AudienceRequests.audiencesByPresentationId(activePresentation.id)\n );\n\n const { shouldFetchTranscript, shouldShowTranscript } = useShowTranscriptForVideo(props.id);\n const transcript = Flight.useBasicFetch<TranscriptResponse>(\n shouldFetchTranscript && currentUser.data?.contentRegion &&\n TranscriptRequests.chaptersAndSubtitles(props.id, currentUser.data.contentRegion)\n );\n const { subtitles: allSubtitles, chapters } = transcript?.data || {};\n // only show transcript for ClickView produced subtitle\n const subtitles = allSubtitles?.filter(subtitle => !subtitle.customer);\n\n const captionsRequests = (subtitles && subtitles.length > 0) ?\n subtitles.map(subtitle => TranscriptRequests.subtitleVtt(subtitle.url, subtitle)) :\n [];\n const captions = Flight.useBasicFetchAll<VttSubtitleResponse>(captionsRequests);\n const filteredSubtitles = subtitles?.filter(\n subtitle => captions.data.find(caption => caption.id === subtitle.id)\n ) || [];\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const shouldShowSideTableOfContents = useShouldShowSideTableOfContents();\n\n const strippedVideo = Flight.useBasicFetch<Video>(video.statusCode === HttpStatus.Forbidden &&\n VideoRequests.video(props.id, PermissionFilterOption.StripMetadata));\n\n const curriculums = useCurriculums(props.id);\n\n const relatedVideos = useGetRelatedVideos({\n video: video.data,\n context,\n contextId,\n moviesAndTv: mtv,\n currentUser: currentUser.data\n });\n const pointsOfInterest = useFetchPointsOfInterest(props.id, true);\n\n const regionAlternatives = Flight.useBasicFetch<RegionAlternative[]>(\n VideoRequests.regionAlternatives(props.id)\n );\n\n const breadcrumbs = useBreadcrumbs({ name: video.data?.name });\n\n useSetPageMetadata(PageMetadataHelper.getVideoMetadata({\n content: video.data,\n regionAlternatives: regionAlternatives.data,\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n },\n canonicalLink: SeoHelper.getCanonicalLink({\n stripPresentationSlug: true,\n customAppLink: VideoAppLinkHelper.getAppLink(video.data, {}, props.presentationSlug)\n }),\n allowIndexing: SeoHelper.allowIndexing(),\n hrefLang: SeoHelper.getContentHrefLang(regionAlternatives.data, (id: string, name: string) => ({\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PLAY_VIDEO,\n args: [ null, id, TextHelper.slugify(name) ]\n }))\n }));\n\n useHandleObjectError(video, videoErrors, { forbidden: true });\n useVideoMixin(relatedVideos.videos ?? []);\n useDeepLinks({ id: props.id, app: 'videos' });\n useCannotConsumeError(strippedVideo);\n\n React.useEffect(() => {\n if (clickViewLive)\n return;\n\n if (!video.data || !streamableLibrary.data)\n return;\n \n if (!clickViewLive && video.data.libraries?.data.find(library => library.id === streamableLibrary.data.objectId))\n Core.ErrorHelper.throw(new NotFoundError());\n }, [ video.hasCompleted, streamableLibrary.hasCompleted, clickViewLive ]);\n\n const dataLoaded = (\n video.data &&\n currentUser.hasCompleted &&\n pointsOfInterest.hasCompleted &&\n hasCommonVideoPropsCompleted\n );\n\n if (!dataLoaded)\n return <></>;\n\n return (\n <PlayPage\n presentationSlug={props.presentationSlug}\n video={video.data}\n clips={clips.data?.data}\n interactives={interactives.data?.data}\n curriculums={curriculums}\n relatedVideos={relatedVideos}\n currentUser={currentUser.data}\n pointsOfInterest={pointsOfInterest.items}\n playNext={playNext}\n featureAccess={featureAccess}\n audiences={audiences.data}\n params={props.queryParams}\n canManageVideoAccess={hasPermissions(PermissionName.ManageVideoAccess)}\n shouldShowSideTableOfContents={shouldShowSideTableOfContents}\n tableOfContentsId={props.queryParams?.tocId}\n breadcrumbs={breadcrumbs}\n commonVideoProps={commonVideoProps}\n hasTheatreMode={hasPlayPageTranscript}\n shouldShowTranscript={shouldShowTranscript && (!shouldFetchTranscript || captions.data?.length > 0)}\n vttSubtitles={captions.data || []}\n subtitles={filteredSubtitles}\n chapters={chapters}\n isBot={SeoHelper.isBot()}\n playerApiUrl={config.data?.playerApiUrl}\n hasNewSearch={hasNewSearch}\n liteUrl={config.data.liteUrl}\n resourcePopupId={resourceId}\n />\n );\n}\n"],"mappings":"0qDAoDM,EAAY,EAAgB,iBAAiB,aAAS,EAEtD,EAAc,CAClB,SAAU,EACV,UAAW,CACT,QAAS,CACX,CACF,EAQA,EAAS,aAAe,CACtB,YAAa,CAAC,CAChB,EAEA,SAAgB,EAAS,EAA0C,CACjE,GAAM,CAAE,UAAS,YAAW,WAAU,MAAK,cAAe,EAAM,YAE1D,CACJ,mBACA,gCACE,EAAoB,CAAE,gBAAiB,GAAgB,SAAU,KAAI,CAAC,EAEpE,CAAE,mBAAmB,GAAe,EAEpC,CAAE,sBAAuB,EAAsB,EAC/C,CAAE,wBAAuB,eAAc,iBAAkB,GAAY,IAAI,EAEzE,EAAoB,EAAiC,EAAgB,mBAAmB,CAAC,EAEzF,EAAc,EAAkC,EAAa,YAAY,CAAC,EAC1E,EAAQ,EAA4B,EAAc,MAAM,EAAM,EAAE,CAAC,EAEjE,EAAgB,EAAsB,CAC1C,SAAU,EAAM,MAAM,GACtB,aAAc,EAAM,MAAM,MAC5B,CAAC,EAEK,GAAQ,EACZ,EAAc,cAAgB,GAAa,WAAW,EAAM,EAAE,CAChE,EACM,GAAe,EACnB,EAAc,qBAAuB,GAAoB,kBAAkB,EAAM,EAAE,CACrF,EAEM,GAAY,EAChB,GACA,EAAiB,0BAA0B,EAAmB,EAAE,CAClE,EAEM,CAAE,wBAAuB,yBAAyB,EAA0B,EAAM,EAAE,EAKpF,CAAE,UAAW,EAAc,aAJd,EACjB,GAAyB,EAAY,MAAM,eAC3C,EAAmB,qBAAqB,EAAM,GAAI,EAAY,KAAK,aAAa,CAEpC,CAAA,EAAY,MAAQ,CAAC,EAE7D,EAAY,GAAc,OAAO,GAAY,CAAC,EAAS,QAAQ,EAK/D,EAAW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a,EAEnC,EAAM,cAAgB,CAChB,GAGA,CAAC,EAAM,MAAQ,CAAC,EAAkB,MAGlC,CAAC,GAAiB,EAAM,KAAK,WAAW,KAAK,KAAK,GAAW,EAAQ,KAAO,EAAkB,KAAK,QAAQ,GAC7G,EAAiB,MAAM,IAAI,CAAe,CAC9C,EAAG,CAAE,EAAM,aAAc,EAAkB,aAAc,CAAc,CAAC,EAGtE,EAAM,MACN,EAAY,cACZ,EAAiB,cACjB,GAOA,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,iBAAkB,EAAM,iBACxB,MAAO,EAAM,KACb,MAAO,GAAM,MAAM,KACnB,aAAc,GAAa,MAAM,KACpB,eACE,gBACf,YAAa,EAAY,KACzB,iBAAkB,EAAiB,MACzB,WACK,gBACf,UAAW,GAAU,KACrB,OAAQ,EAAM,YACd,qBAAsB,GAAe,GAAe,iBAAiB,EACtC,iCAC/B,kBAAmB,EAAM,aAAa,MACzB,eACK,mBAClB,eAAgB,EAChB,qBAAsB,KAAyB,CAAC,GAAyB,EAAS,MAAM,OAAS,GACjG,aAAc,EAAS,MAAQ,CAAC,EAChC,UAAW,GACD,YACV,MAAO,EAAU,MAAM,EACvB,aAAc,EAAO,MAAM,aACb,eACd,QAAS,EAAO,KAAK,QACrB,gBAAiB,CAClB,CAAA,GA/BM,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,CAiCf"}
1
+ {"version":3,"file":"BLad2z5b.chunk.js","names":[],"sources":["../../src/shared/views/play/PlayView.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces/HashObject';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { PermissionFilterOption } from 'libs/shared/enums/PermissionFilterOption';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { NotFoundError } from 'libs/shared/errors/general/not-found/NotFoundError';\nimport { VideoNotFoundError } from 'libs/shared/errors/videos/video-not-found/VideoNotFoundError';\nimport { VideoPrivateError } from 'libs/shared/errors/videos/video-private/VideoPrivateError';\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { ClipRequests } from 'libs/shared/flight-requests/ClipRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { InteractiveRequests } from 'libs/shared/flight-requests/InteractiveRequests';\nimport { LibraryRequests } from 'libs/shared/flight-requests/LibraryRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useBreadcrumbs } from 'libs/shared/hooks/useBreadcrumbs';\nimport { useCannotConsumeError } from 'libs/shared/hooks/useCannotConsumeError';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { ClipCollection, Config, CurrentUser, InteractiveCollection, PresentationAudience, RegionAlternative, Video, VttSubtitleResponse } from 'libs/shared/interfaces';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { TranscriptRequests, TranscriptResponse } from 'shared/flight-requests/TranscriptRequests';\nimport { useActivePresentation } from 'shared/hooks/presentations/useActivePresentation';\nimport { useCommonVideoProps } from 'shared/hooks/useCommonVideoProps';\nimport { useCurriculums } from 'shared/hooks/useCurriculums';\nimport { useDeepLinks } from 'shared/hooks/useDeepLinks';\nimport { useFetchPointsOfInterest } from 'shared/hooks/useFetchPointsOfInterest';\nimport { useGetRelatedVideos } from 'shared/hooks/useGetRelatedVideos';\nimport { useVideoFeatureAccess } from 'shared/hooks/useVideoFeatureAccess';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\nimport { SeoHelper } from 'shared/utils/SeoHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\nimport { useShouldShowSideTableOfContents } from 'shared/views/play/hooks/useShouldShowTableOfContents';\nimport { useShowTranscriptForVideo } from 'shared/views/play/hooks/useShowVideoTranscript';\n\nimport { PlayPage } from './components/play-page/PlayPage';\n\nconst namespace = 'shared.play';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst videoErrors = {\n notFound: VideoNotFoundError,\n forbidden: {\n privacy: VideoPrivateError\n }\n};\n\nexport interface PlayViewProps {\n presentationSlug: string;\n id: string;\n queryParams?: PlayViewQueryParams;\n}\n\nPlayView.defaultProps = {\n queryParams: {}\n};\n\nexport function PlayView(props: PlayViewProps): React.ReactElement {\n const { context, contextId, playNext, mtv, resourceId } = props.queryParams;\n\n const {\n commonVideoProps,\n hasCommonVideoPropsCompleted\n } = useCommonVideoProps({ locationContext: LocationContext.PlayPage, mtv });\n\n const { hasPermissions } = usePermissions();\n\n const { activePresentation } = useActivePresentation();\n const { hasPlayPageTranscript, hasNewSearch, clickViewLive } = useSettings(null);\n\n const streamableLibrary = Flight.useBasicFetch<HashObject>(LibraryRequests.streamableLearning());\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const video = Flight.useBasicFetch<Video>(VideoRequests.video(props.id));\n\n const featureAccess = useVideoFeatureAccess({\n objectId: video.data?.id,\n objectTypeId: video.data?.typeId\n });\n \n const clips = Flight.useBasicFetch<ClipCollection>(\n featureAccess.canViewClips && ClipRequests.videoClips(props.id)\n );\n const interactives = Flight.useBasicFetch<InteractiveCollection>(\n featureAccess.canViewInteractives && InteractiveRequests.videoInteractives(props.id)\n );\n \n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n activePresentation &&\n AudienceRequests.audiencesByPresentationId(activePresentation.id)\n );\n\n const { shouldFetchTranscript, shouldShowTranscript } = useShowTranscriptForVideo(props.id);\n const transcript = Flight.useBasicFetch<TranscriptResponse>(\n shouldFetchTranscript && currentUser.data?.contentRegion &&\n TranscriptRequests.chaptersAndSubtitles(props.id, currentUser.data.contentRegion)\n );\n const { subtitles: allSubtitles, chapters } = transcript?.data || {};\n // only show transcript for ClickView produced subtitle\n const subtitles = allSubtitles?.filter(subtitle => !subtitle.customer);\n\n const captionsRequests = (subtitles && subtitles.length > 0) ?\n subtitles.map(subtitle => TranscriptRequests.subtitleVtt(subtitle.url, subtitle)) :\n [];\n const captions = Flight.useBasicFetchAll<VttSubtitleResponse>(captionsRequests);\n const filteredSubtitles = subtitles?.filter(\n subtitle => captions.data.find(caption => caption.id === subtitle.id)\n ) || [];\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const shouldShowSideTableOfContents = useShouldShowSideTableOfContents();\n\n const strippedVideo = Flight.useBasicFetch<Video>(video.statusCode === HttpStatus.Forbidden &&\n VideoRequests.video(props.id, PermissionFilterOption.StripMetadata));\n\n const curriculums = useCurriculums(props.id);\n\n const relatedVideos = useGetRelatedVideos({\n video: video.data,\n context,\n contextId,\n moviesAndTv: mtv,\n currentUser: currentUser.data\n });\n const pointsOfInterest = useFetchPointsOfInterest(props.id, true);\n\n const regionAlternatives = Flight.useBasicFetch<RegionAlternative[]>(\n VideoRequests.regionAlternatives(props.id)\n );\n\n const breadcrumbs = useBreadcrumbs({ name: video.data?.name });\n\n useSetPageMetadata(PageMetadataHelper.getVideoMetadata({\n content: video.data,\n regionAlternatives: regionAlternatives.data,\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n },\n canonicalLink: SeoHelper.getCanonicalLink({\n stripPresentationSlug: true,\n customAppLink: VideoAppLinkHelper.getAppLink(video.data, {}, props.presentationSlug)\n }),\n allowIndexing: SeoHelper.allowIndexing(),\n hrefLang: SeoHelper.getContentHrefLang(regionAlternatives.data, (id: string, name: string) => ({\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PLAY_VIDEO,\n args: [ null, id, TextHelper.slugify(name) ]\n }))\n }));\n\n useHandleObjectError(video, videoErrors, { forbidden: true });\n useVideoMixin(relatedVideos.videos ?? []);\n useDeepLinks({ id: props.id, app: 'videos' });\n useCannotConsumeError(strippedVideo);\n\n React.useEffect(() => {\n if (clickViewLive)\n return;\n\n if (!video.data || !streamableLibrary.data)\n return;\n \n if (!clickViewLive && video.data.libraries?.data.find(library => library.id === streamableLibrary.data.objectId))\n Core.ErrorHelper.throw(new NotFoundError());\n }, [ video.hasCompleted, streamableLibrary.hasCompleted, clickViewLive ]);\n\n const dataLoaded = (\n video.data &&\n currentUser.hasCompleted &&\n pointsOfInterest.hasCompleted &&\n hasCommonVideoPropsCompleted\n );\n\n if (!dataLoaded)\n return <></>;\n\n return (\n <PlayPage\n presentationSlug={props.presentationSlug}\n video={video.data}\n clips={clips.data?.data}\n interactives={interactives.data?.data}\n curriculums={curriculums}\n relatedVideos={relatedVideos}\n currentUser={currentUser.data}\n pointsOfInterest={pointsOfInterest.items}\n playNext={playNext}\n featureAccess={featureAccess}\n audiences={audiences.data}\n params={props.queryParams}\n canManageVideoAccess={hasPermissions(PermissionName.ManageVideoAccess)}\n shouldShowSideTableOfContents={shouldShowSideTableOfContents}\n tableOfContentsId={props.queryParams?.tocId}\n breadcrumbs={breadcrumbs}\n commonVideoProps={commonVideoProps}\n hasTheatreMode={hasPlayPageTranscript}\n shouldShowTranscript={shouldShowTranscript && (!shouldFetchTranscript || captions.data?.length > 0)}\n vttSubtitles={captions.data || []}\n subtitles={filteredSubtitles}\n chapters={chapters}\n isBot={SeoHelper.isBot()}\n playerApiUrl={config.data?.playerApiUrl}\n hasNewSearch={hasNewSearch}\n liteUrl={config.data.liteUrl}\n resourcePopupId={resourceId}\n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G,EAAiB,MAAM,IAAI,CAAe,CAC9C,EAAG,CAAE,EAAM,aAAc,EAAkB,aAAc,CAAc,CAAC,EAGtE,EAAM,MACN,EAAY,cACZ,EAAiB,cACjB,GAOA,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,iBAAkB,EAAM,iBACxB,MAAO,EAAM,KACb,MAAO,GAAM,MAAM,KACnB,aAAc,GAAa,MAAM,KACpB,eACE,gBACf,YAAa,EAAY,KACzB,iBAAkB,EAAiB,MACzB,WACK,gBACf,UAAW,GAAU,KACrB,OAAQ,EAAM,YACd,qBAAsB,GAAe,GAAe,iBAAiB,EACtC,iCAC/B,kBAAmB,EAAM,aAAa,MACzB,eACK,mBAClB,eAAgB,EAChB,qBAAsB,KAAyB,CAAC,GAAyB,EAAS,MAAM,OAAS,GACjG,aAAc,EAAS,MAAQ,CAAC,EAChC,UAAW,GACD,YACV,MAAO,EAAU,MAAM,EACvB,aAAc,EAAO,MAAM,aACb,eACd,QAAS,EAAO,KAAK,QACrB,gBAAiB,CAClB,CAAA,GA/BM,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,CAiCf"}
@@ -1,2 +1,2 @@
1
- import"./DAXXjFlN.chunk.js";import{n as e,t}from"./snXCXfT6.chunk.js";import{t as n}from"./CQyJ7YGa.chunk.js";import{t as r}from"./e57H3T-k.chunk.js";import{t as i}from"./C2w0pmFW.chunk.js";import{t as a}from"./wrLrTezN.chunk.js";import{t as o}from"./BXTI9cmX.chunk.js";import{u as s}from"./BX0wDJmp.chunk.js";import{t as c}from"./CjA4Q5pm.chunk.js";import{U as l,a as u,l as d,y as f,z as p}from"./NlCAcBdo.chunk.js";import{t as m}from"./C5j5LRut2.chunk.js";import{t as h}from"./CVHQXNzi2.chunk.js";import{t as g}from"./BrbeV-Gn2.chunk.js";import{t as _}from"./DZssmXj6.chunk.js";import{t as v}from"./BC8PeYqm.chunk.js";import{t as y}from"./LoQS6GjP.chunk.js";import{t as b}from"./CqrjHjAN.chunk.js";import{t as x}from"./eoAypzU3.chunk.js";import{t as S}from"./D_gWf2lC.chunk.js";import{t as C}from"./Bbp2U9GK.chunk.js";import{t as w}from"./C6-aC3vu.chunk.js";import{n as T,t as E}from"./BGhJ8TEx.chunk.js";import{t as D}from"./Bw2cauzs2.chunk.js";import{n as O,t as k}from"./CpFtf-tI2.chunk.js";import{t as A}from"./BxYKQEUG2.chunk.js";import{t as j}from"./jAbfamoi.chunk.js";import{t as M}from"./Z4RlHaVG.chunk.js";import{t as N}from"./tnBD84bg2.chunk.js";import{t as P}from"./D1aO6GEr.chunk.js";import{t as F}from"./C9XBZFiR.chunk.js";import{t as I}from"./IqGr9V7u2.chunk.js";import{n as L,r as R,t as z}from"./DusJhHeW2.chunk.js";i();var B=j(),V={closeButton:`_closeButton_1bg8h_1`,descriptionBorder:`_descriptionBorder_1bg8h_7`},H=a(),U=`shared.videoDetails`,W=n.encloseNamespace(U);function G(e){let{label:t,items:n,className:r}=e;return n&&n.data&&n.data.length?(0,H.jsxs)(`div`,{className:r,children:[t,`: `,n.data.map(e=>e.name).join(`, `)]}):(0,H.jsx)(H.Fragment,{})}function K(e){let{video:t}=e;if(!g.isVideo(t)&&!g.isClip(t))return(0,H.jsx)(H.Fragment,{});let n=g.getParentVideo(t);return(0,H.jsxs)(`div`,{className:t.description?`col-md-5 ps-md-3 pt-3 pt-md-0`:`col-12`,children:[(0,H.jsx)(`h2`,{className:`h6 mb-1`,children:(0,H.jsx)(O,{phrase:`details`})}),!!n.productionYear&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`productionYear`,options:{year:n.productionYear}})}),(0,H.jsx)(G,{label:W(`productionCompanies`,{smartCount:n.productionCompanies?.data?.length}),items:n.productionCompanies,className:`mb-1`}),(0,H.jsx)(G,{label:W(`distributors`,{smartCount:n.distributors?.data?.length}),items:n.distributors,className:`mb-1`}),(0,H.jsx)(G,{label:W(`producers`,{smartCount:n.producers?.data?.length}),items:n.producers,className:`mb-1`}),(0,H.jsx)(G,{label:W(`directors`,{smartCount:n.directors?.data?.length}),items:n.directors,className:`mb-1`}),!!n.dateBroadcast&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`dateBroadcast`,options:{date:c.format(n.dateBroadcast,`DD/MM/YYYY`)}})}),!!n.channel&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`channel`,options:{channel:n.channel.name}})}),g.canViewUploadDate(e.video)&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`dateUploaded`,options:{date:c.format(t.dateCreated,`DD/MM/YYYY`)}})})]})}function q(e){let{video:t,maxHeight:n=368}=e,i=g.getParentVideo(t),a=!!e.video.description,o=z(e.video)||!!i.productionYear||!!i.dateBroadcast||!!i.channel||g.canViewUploadDate(e.video),s=typeof e.onClickClose==`function`,c=typeof e.onClickShowCurriculumLinks==`function`;function l(){return e.hideTags||g.isInteractive(e.video)||!e.video.tags?.data?.length?null:e.video.tags.data}return!a&&!o?(0,H.jsx)(H.Fragment,{}):(0,H.jsx)(k.Provider,{value:U,children:(0,H.jsxs)(`div`,{className:`rounded border p-3 mb-3 position-relative`,children:[(0,H.jsx)(B.Scrollbars,{autoHeight:!0,autoHeightMax:n,children:(0,H.jsxs)(`div`,{className:`row g-0`,children:[a&&(0,H.jsxs)(`div`,{className:o?`${V.descriptionBorder} pe-3 col-md-7`:`col-12`,children:[(0,H.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,H.jsx)(`h2`,{className:`h6 mb-1`,children:(0,H.jsx)(O,{phrase:`description`})}),(0,H.jsx)(I,{text:t.description,title:t.name,className:`ps-2`,onLaunch:e.onLaunchImmersiveReader,onExit:e.onExitImmersiveReader,analyticsOptions:{location:f.PlayPage,entity:d.Video,actionType:p.Click,descriptor:u.LaunchImmersiveReader},analyticsData:{id:t.id,type:`description`}})]}),(0,H.jsx)(`p`,{className:`mb-0`,dangerouslySetInnerHTML:{__html:r.sanitize(N.linkifyText(e.video.description,{nl2br:!0}))}}),(0,H.jsx)(L,{tags:l(),...R.getTagActionProps(e.getTagAppLink,null,e.suppressInteractivity),className:`mt-1`}),c&&(0,H.jsx)(C,{onClick:e.onClickShowCurriculumLinks,className:`cursor-pointer d-inline-block fw-semibold text-info mt-2 mb-1`,children:(0,H.jsx)(O,{namespace:U,phrase:`seeCurriculumLinks`})})]}),o&&(0,H.jsx)(K,{...e})]})}),s&&(0,H.jsx)(`button`,{type:`button`,className:`btn-close ${V.closeButton}`,"aria-label":`Close`,onClick:e.onClickClose})]})})}var J=`userManager.studentsVideo`,Y=n.encloseNamespace(J);function X(e,t){return t.toString()===h.Clip.toString()?_.clip(e):t.toString()===h.Interactive.toString()?v.interactiveMetadata(e):y.video(e)}function Z(e){return e.toString()===h.Clip.toString()?`messageClip`:e.toString()===h.Interactive.toString()?`messageInteractive`:`messageVideo`}function Q(r){let i=s(P.getUser(r.userId)),a=s(X(r.id,r.typeId)),c=s(E.createViewKey(r.id,T.MasterObject)),u=s(S.config()),d=s(b.currentUser());F([i,a]),w({title:i.data?n.getPhrase(J,`pageTitle`,{name:m.getFullName(i.data)}):``});function h(){let e={entity:g.getAnalyticsEntity(a.data),location:f.ViewStudentVideos},t={id:a.data.id},n=[];return g.isVideo(a.data)&&n.push({order:1,label:Y(`download`),appLink:{application:o.VIDEOS,action:x.Videos.DOWNLOAD_VIDEO,args:[a.data.id]},analyticsOptions:{...e,actionType:p.Download,workflowPhase:l.Start},analyticsData:t}),n.push({order:2,label:Y(`delete`),appLink:{application:o.USER_MANAGER,action:x.UserManager.DELETE_STUDENTS_VIDEO,args:[r.id,a.data.id],params:{typeId:a.data.typeId}},className:`text-danger`,analyticsOptions:{...e,actionType:p.Delete,workflowPhase:l.Start},analyticsData:t}),n}return i.hasCompleted&&a.hasCompleted&&c.hasCompleted&&u.hasCompleted&&d.hasCompleted?(0,H.jsxs)(`div`,{className:`px-3`,children:[(0,H.jsx)(`div`,{className:`alert text-dark bg-light-blue px-2 rounded d-flex flex-column flex-lg-row justify-content-between mb-3 align-items-center`,role:`alert`,children:(0,H.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,H.jsx)(t,{svg:A,size:e.Standard,className:`me-2 svg-container`}),(0,H.jsx)(`div`,{className:`w-100`,children:(0,H.jsx)(`p`,{className:`fw-semibold mb-0`,children:Y(Z(r.typeId),{name:m.getFullName(i.data),yearGroup:i.data.masterYearGroup?.name})})})]})}),(0,H.jsx)(`div`,{className:`mb-3`,children:(0,H.jsx)(D,{config:u.data,video:a.data,currentUser:d.data,viewKey:c.data,presentationSlug:null})}),(0,H.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center mb-2`,children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(`h1`,{className:`h3 d-inline-flex m-0 mb-2`,children:a.data.name})}),(0,H.jsx)(M,{actions:h(),actionsDropdownClassName:`btn btn-outline-dark`})]}),(0,H.jsx)(q,{video:a.data})]}):(0,H.jsx)(H.Fragment,{})}export{Q as StudentsVideoView};
2
- //# sourceMappingURL=BklRyGO0.chunk.js.map
1
+ import"./DAXXjFlN.chunk.js";import{n as e,t}from"./snXCXfT6.chunk.js";import{t as n}from"./CQyJ7YGa.chunk.js";import{t as r}from"./e57H3T-k.chunk.js";import{t as i}from"./C2w0pmFW.chunk.js";import{t as a}from"./wrLrTezN.chunk.js";import{t as o}from"./BXTI9cmX.chunk.js";import{u as s}from"./BX0wDJmp.chunk.js";import{t as c}from"./CjA4Q5pm.chunk.js";import{U as l,a as u,l as d,y as f,z as p}from"./NlCAcBdo.chunk.js";import{t as m}from"./C5j5LRut2.chunk.js";import{t as h}from"./CVHQXNzi2.chunk.js";import{t as g}from"./BrbeV-Gn2.chunk.js";import{t as _}from"./DZssmXj6.chunk.js";import{t as v}from"./BC8PeYqm.chunk.js";import{t as y}from"./LoQS6GjP.chunk.js";import{t as b}from"./CqrjHjAN.chunk.js";import{t as x}from"./eoAypzU3.chunk.js";import{t as S}from"./D_gWf2lC.chunk.js";import{t as C}from"./Bbp2U9GK.chunk.js";import{t as w}from"./C6-aC3vu.chunk.js";import{n as T,t as E}from"./BGhJ8TEx.chunk.js";import{t as D}from"./Cm6SLr7W2.chunk.js";import{n as O,t as k}from"./CpFtf-tI2.chunk.js";import{t as A}from"./BxYKQEUG2.chunk.js";import{t as j}from"./jAbfamoi.chunk.js";import{t as M}from"./Z4RlHaVG.chunk.js";import{t as N}from"./tnBD84bg2.chunk.js";import{t as P}from"./D1aO6GEr.chunk.js";import{t as F}from"./C9XBZFiR.chunk.js";import{t as I}from"./IqGr9V7u2.chunk.js";import{n as L,r as R,t as z}from"./DusJhHeW2.chunk.js";i();var B=j(),V={closeButton:`_closeButton_1bg8h_1`,descriptionBorder:`_descriptionBorder_1bg8h_7`},H=a(),U=`shared.videoDetails`,W=n.encloseNamespace(U);function G(e){let{label:t,items:n,className:r}=e;return n&&n.data&&n.data.length?(0,H.jsxs)(`div`,{className:r,children:[t,`: `,n.data.map(e=>e.name).join(`, `)]}):(0,H.jsx)(H.Fragment,{})}function K(e){let{video:t}=e;if(!g.isVideo(t)&&!g.isClip(t))return(0,H.jsx)(H.Fragment,{});let n=g.getParentVideo(t);return(0,H.jsxs)(`div`,{className:t.description?`col-md-5 ps-md-3 pt-3 pt-md-0`:`col-12`,children:[(0,H.jsx)(`h2`,{className:`h6 mb-1`,children:(0,H.jsx)(O,{phrase:`details`})}),!!n.productionYear&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`productionYear`,options:{year:n.productionYear}})}),(0,H.jsx)(G,{label:W(`productionCompanies`,{smartCount:n.productionCompanies?.data?.length}),items:n.productionCompanies,className:`mb-1`}),(0,H.jsx)(G,{label:W(`distributors`,{smartCount:n.distributors?.data?.length}),items:n.distributors,className:`mb-1`}),(0,H.jsx)(G,{label:W(`producers`,{smartCount:n.producers?.data?.length}),items:n.producers,className:`mb-1`}),(0,H.jsx)(G,{label:W(`directors`,{smartCount:n.directors?.data?.length}),items:n.directors,className:`mb-1`}),!!n.dateBroadcast&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`dateBroadcast`,options:{date:c.format(n.dateBroadcast,`DD/MM/YYYY`)}})}),!!n.channel&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`channel`,options:{channel:n.channel.name}})}),g.canViewUploadDate(e.video)&&(0,H.jsx)(`div`,{className:`mb-1`,children:(0,H.jsx)(O,{phrase:`dateUploaded`,options:{date:c.format(t.dateCreated,`DD/MM/YYYY`)}})})]})}function q(e){let{video:t,maxHeight:n=368}=e,i=g.getParentVideo(t),a=!!e.video.description,o=z(e.video)||!!i.productionYear||!!i.dateBroadcast||!!i.channel||g.canViewUploadDate(e.video),s=typeof e.onClickClose==`function`,c=typeof e.onClickShowCurriculumLinks==`function`;function l(){return e.hideTags||g.isInteractive(e.video)||!e.video.tags?.data?.length?null:e.video.tags.data}return!a&&!o?(0,H.jsx)(H.Fragment,{}):(0,H.jsx)(k.Provider,{value:U,children:(0,H.jsxs)(`div`,{className:`rounded border p-3 mb-3 position-relative`,children:[(0,H.jsx)(B.Scrollbars,{autoHeight:!0,autoHeightMax:n,children:(0,H.jsxs)(`div`,{className:`row g-0`,children:[a&&(0,H.jsxs)(`div`,{className:o?`${V.descriptionBorder} pe-3 col-md-7`:`col-12`,children:[(0,H.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,H.jsx)(`h2`,{className:`h6 mb-1`,children:(0,H.jsx)(O,{phrase:`description`})}),(0,H.jsx)(I,{text:t.description,title:t.name,className:`ps-2`,onLaunch:e.onLaunchImmersiveReader,onExit:e.onExitImmersiveReader,analyticsOptions:{location:f.PlayPage,entity:d.Video,actionType:p.Click,descriptor:u.LaunchImmersiveReader},analyticsData:{id:t.id,type:`description`}})]}),(0,H.jsx)(`p`,{className:`mb-0`,dangerouslySetInnerHTML:{__html:r.sanitize(N.linkifyText(e.video.description,{nl2br:!0}))}}),(0,H.jsx)(L,{tags:l(),...R.getTagActionProps(e.getTagAppLink,null,e.suppressInteractivity),className:`mt-1`}),c&&(0,H.jsx)(C,{onClick:e.onClickShowCurriculumLinks,className:`cursor-pointer d-inline-block fw-semibold text-info mt-2 mb-1`,children:(0,H.jsx)(O,{namespace:U,phrase:`seeCurriculumLinks`})})]}),o&&(0,H.jsx)(K,{...e})]})}),s&&(0,H.jsx)(`button`,{type:`button`,className:`btn-close ${V.closeButton}`,"aria-label":`Close`,onClick:e.onClickClose})]})})}var J=`userManager.studentsVideo`,Y=n.encloseNamespace(J);function X(e,t){return t.toString()===h.Clip.toString()?_.clip(e):t.toString()===h.Interactive.toString()?v.interactiveMetadata(e):y.video(e)}function Z(e){return e.toString()===h.Clip.toString()?`messageClip`:e.toString()===h.Interactive.toString()?`messageInteractive`:`messageVideo`}function Q(r){let i=s(P.getUser(r.userId)),a=s(X(r.id,r.typeId)),c=s(E.createViewKey(r.id,T.MasterObject)),u=s(S.config()),d=s(b.currentUser());F([i,a]),w({title:i.data?n.getPhrase(J,`pageTitle`,{name:m.getFullName(i.data)}):``});function h(){let e={entity:g.getAnalyticsEntity(a.data),location:f.ViewStudentVideos},t={id:a.data.id},n=[];return g.isVideo(a.data)&&n.push({order:1,label:Y(`download`),appLink:{application:o.VIDEOS,action:x.Videos.DOWNLOAD_VIDEO,args:[a.data.id]},analyticsOptions:{...e,actionType:p.Download,workflowPhase:l.Start},analyticsData:t}),n.push({order:2,label:Y(`delete`),appLink:{application:o.USER_MANAGER,action:x.UserManager.DELETE_STUDENTS_VIDEO,args:[r.id,a.data.id],params:{typeId:a.data.typeId}},className:`text-danger`,analyticsOptions:{...e,actionType:p.Delete,workflowPhase:l.Start},analyticsData:t}),n}return i.hasCompleted&&a.hasCompleted&&c.hasCompleted&&u.hasCompleted&&d.hasCompleted?(0,H.jsxs)(`div`,{className:`px-3`,children:[(0,H.jsx)(`div`,{className:`alert text-dark bg-light-blue px-2 rounded d-flex flex-column flex-lg-row justify-content-between mb-3 align-items-center`,role:`alert`,children:(0,H.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,H.jsx)(t,{svg:A,size:e.Standard,className:`me-2 svg-container`}),(0,H.jsx)(`div`,{className:`w-100`,children:(0,H.jsx)(`p`,{className:`fw-semibold mb-0`,children:Y(Z(r.typeId),{name:m.getFullName(i.data),yearGroup:i.data.masterYearGroup?.name})})})]})}),(0,H.jsx)(`div`,{className:`mb-3`,children:(0,H.jsx)(D,{config:u.data,video:a.data,currentUser:d.data,viewKey:c.data,presentationSlug:null})}),(0,H.jsxs)(`div`,{className:`d-flex justify-content-between align-items-center mb-2`,children:[(0,H.jsx)(`div`,{children:(0,H.jsx)(`h1`,{className:`h3 d-inline-flex m-0 mb-2`,children:a.data.name})}),(0,H.jsx)(M,{actions:h(),actionsDropdownClassName:`btn btn-outline-dark`})]}),(0,H.jsx)(q,{video:a.data})]}):(0,H.jsx)(H.Fragment,{})}export{Q as StudentsVideoView};
2
+ //# sourceMappingURL=BMZNQKEe.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BklRyGO0.chunk.js","names":[],"sources":["../../../../libs/shared/src/components/video-details/video-details.module.scss","../../../../libs/shared/src/components/video-details/VideoDetails.tsx","../../src/apps/user-manager/views/students-video/StudentsVideoView.tsx"],"sourcesContent":[":local {\n .closeButton {\n position: absolute;\n top: 1rem;\n right: map-get($spacers, 3);\n }\n \n @media (min-width: #{map-get($grid-breakpoints, md)}) {\n .descriptionBorder {\n border-right: 1px solid $gray-300;\n }\n }\n}","import * as React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\nimport { LinkifyHelper } from 'libs/common/react/utils/LinkifyHelper';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\nimport { ImmersiveReader } from 'libs/shared/components/immersive-reader/ImmersiveReader';\nimport { TagHelper } from 'libs/shared/components/tags/TagHelper';\nimport { TagList } from 'libs/shared/components/tags/TagList';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { MINIMUM_GLANCE_HEIGHT } from 'libs/shared/constants/MinimumGlanceHeight';\nimport { BaseObject, BasePaginatedCollection, CurrentUser, Tag, VideoTypes } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { hasPPDD } from './VideoDetailsUtils';\n\nimport styles from './video-details.module.scss';\n\nconst namespace = 'shared.videoDetails';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface CommaListProps {\n label: string;\n items: BasePaginatedCollection<BaseObject>;\n className?: string;\n}\n\nfunction CommaList(props: CommaListProps): React.ReactElement {\n const { label, items, className } = props;\n\n const hasItems = items && items.data && items.data.length;\n\n if (!hasItems)\n return <></>;\n\n const commaSeperated = items.data.map(i => i.name).join(', ');\n\n return (\n <div className={className}>{label}: {commaSeperated}</div>\n );\n}\n\nfunction DetailsSection(props: VideoDetailsWithScrollbarProps): React.ReactElement {\n const { video } = props;\n\n if (!VideoHelper.isVideo(video) && !VideoHelper.isClip(video))\n return <></>;\n\n const parentVideo = VideoHelper.getParentVideo(video);\n\n return (\n <div className={video.description ? 'col-md-5 ps-md-3 pt-3 pt-md-0' : 'col-12'}>\n <h2 className='h6 mb-1'><Text phrase='details' /></h2>\n {!!parentVideo.productionYear && (\n <div className='mb-1'>\n <Text phrase='productionYear' options={{ year: parentVideo.productionYear }} />\n </div>\n )}\n <CommaList\n label={getPhrase('productionCompanies', { smartCount: parentVideo.productionCompanies?.data?.length })}\n items={parentVideo.productionCompanies}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('distributors', { smartCount: parentVideo.distributors?.data?.length })}\n items={parentVideo.distributors}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('producers', { smartCount: parentVideo.producers?.data?.length })}\n items={parentVideo.producers}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('directors', { smartCount: parentVideo.directors?.data?.length })}\n items={parentVideo.directors}\n className='mb-1'\n />\n {!!parentVideo.dateBroadcast && (\n <div className='mb-1'>\n <Text phrase='dateBroadcast' options={{ date: DateHelper.format(parentVideo.dateBroadcast, 'DD/MM/YYYY') }} />\n </div>\n )}\n {!!parentVideo.channel && (\n <div className='mb-1'>\n <Text phrase='channel' options={{ channel: parentVideo.channel.name }} />\n </div>\n )}\n {VideoHelper.canViewUploadDate(props.video) && (\n <div className='mb-1'>\n <Text phrase='dateUploaded' options={{ date: DateHelper.format(video.dateCreated, 'DD/MM/YYYY') }} />\n </div>\n )}\n </div>\n );\n}\n\ninterface VideoDetailsWithScrollbarProps {\n video: VideoTypes;\n currentUser?: CurrentUser;\n getTagAppLink?: (tag: Tag) => Core.AppLink;\n onLaunchImmersiveReader?: () => void;\n onExitImmersiveReader?: () => void;\n onClickClose?: () => void;\n onClickShowCurriculumLinks?: () => void;\n maxHeight?: number;\n suppressInteractivity?: boolean;\n hideTags?: boolean;\n}\n\nexport function VideoDetailsWithScrollbar(props: VideoDetailsWithScrollbarProps): React.ReactElement {\n const { video, maxHeight = MINIMUM_GLANCE_HEIGHT } = props;\n\n const parentVideo = VideoHelper.getParentVideo(video);\n\n const showDescription = !!props.video.description;\n\n const showDetails = (\n hasPPDD(props.video) ||\n !!parentVideo.productionYear ||\n !!parentVideo.dateBroadcast ||\n !!parentVideo.channel ||\n VideoHelper.canViewUploadDate(props.video)\n );\n\n const canClose = typeof props.onClickClose === 'function';\n const showCurriculumLinks = typeof props.onClickShowCurriculumLinks === 'function';\n\n function getTags(): Tag[] {\n if (props.hideTags || VideoHelper.isInteractive(props.video) || !props.video.tags?.data?.length)\n return null;\n\n return props.video.tags.data;\n }\n\n if (!showDescription && !showDetails)\n return <></>;\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <div className='rounded border p-3 mb-3 position-relative'>\n <Scrollbars autoHeight autoHeightMax={maxHeight}>\n <div className='row g-0'>\n {showDescription && (\n <div className={showDetails ? `${styles.descriptionBorder} pe-3 col-md-7` : 'col-12'}>\n <div className='d-flex align-items-center'>\n <h2 className='h6 mb-1'>\n <Text phrase='description' />\n </h2>\n <ImmersiveReader\n text={video.description}\n title={video.name}\n className='ps-2'\n onLaunch={props.onLaunchImmersiveReader}\n onExit={props.onExitImmersiveReader}\n analyticsOptions={{\n location: LocationContext.PlayPage,\n entity: EntityType.Video,\n actionType: UserAction.Click,\n descriptor: ClickDescriptor.LaunchImmersiveReader\n }}\n analyticsData={{ id: video.id, type: 'description' }}\n />\n </div>\n <p className='mb-0' dangerouslySetInnerHTML={{ __html: TextHelper.sanitize(LinkifyHelper.linkifyText(props.video.description, { nl2br: true })) }} />\n <TagList\n tags={getTags()}\n {...TagHelper.getTagActionProps(props.getTagAppLink, null, props.suppressInteractivity)}\n className='mt-1'\n />\n {showCurriculumLinks && (\n <DivButton\n onClick={props.onClickShowCurriculumLinks}\n className='cursor-pointer d-inline-block fw-semibold text-info mt-2 mb-1'\n >\n <Text namespace={namespace} phrase='seeCurriculumLinks' />\n </DivButton>\n )}\n </div>\n )}\n\n {showDetails && (\n <DetailsSection {...props} />\n )}\n </div>\n </Scrollbars>\n\n {canClose && (\n <button\n type='button'\n className={`btn-close ${styles.closeButton}`}\n aria-label='Close'\n onClick={props.onClickClose}\n />\n )}\n </div>\n </LanguageNamespaceContext.Provider>\n );\n}\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/react/index';\n\nimport { AnalyticsOptions, LocationContext, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { Actions as ActionsButtons } from 'libs/shared/components/actions/Actions';\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { VideoDetailsWithScrollbar } from 'libs/shared/components/video-details/VideoDetails';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { MediaIdType } from 'libs/shared/enums/MediaIdType';\nimport { ClipRequests } from 'libs/shared/flight-requests/ClipRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { InteractiveRequests } from 'libs/shared/flight-requests/InteractiveRequests';\nimport { PlayerRequests } from 'libs/shared/flight-requests/PlayerRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { InfoSvg } from 'libs/shared/images/svg/status/InfoSvg';\nimport { Config, CurrentUser, PlayerViewKey, User, VideoTypes } from 'libs/shared/interfaces';\nimport { UserHelper } from 'libs/shared/utils/UserHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { LitePlayerView } from 'shared/views/lite-player/LitePlayerView';\n\nimport { UserManagerRequests } from 'apps/user-manager/flight-requests/UserManagerRequests';\n\nconst namespace = 'userManager.studentsVideo';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nfunction getRequest(id: string, typeId: string): Flight.Request {\n if (typeId.toString() === MasterType.Clip.toString())\n return ClipRequests.clip(id);\n\n if (typeId.toString() === MasterType.Interactive.toString())\n return InteractiveRequests.interactiveMetadata(id);\n\n return VideoRequests.video(id);\n}\n\nfunction getMessagePhrase(typeId: string): string {\n if (typeId.toString() === MasterType.Clip.toString())\n return 'messageClip';\n\n if (typeId.toString() === MasterType.Interactive.toString())\n return 'messageInteractive';\n\n return 'messageVideo';\n}\n\ninterface StudentsVideoProps {\n userId: string;\n id: string;\n typeId: string;\n}\n\nexport function StudentsVideoView(props: StudentsVideoProps): JSX.Element {\n const user = Flight.useBasicFetch<User>(UserManagerRequests.getUser(props.userId));\n\n const video = Flight.useBasicFetch<VideoTypes>(getRequest(props.id, props.typeId));\n\n const viewKey = Flight.useBasicFetch<PlayerViewKey>(PlayerRequests.createViewKey(props.id, MediaIdType.MasterObject));\n\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n useHandleObjectError([ user, video ]);\n useSetPageMetadata({\n title: user.data ?\n LanguageService.getPhrase(\n namespace,\n 'pageTitle',\n { name: UserHelper.getFullName(user.data) }\n ) :\n ''\n });\n\n function getVideoActions(): ActionOptions[] {\n const analyticsOptions: AnalyticsOptions = {\n entity: VideoHelper.getAnalyticsEntity(video.data),\n location: LocationContext.ViewStudentVideos\n };\n \n const analyticsData = {\n id: video.data.id\n };\n \n const actions: ActionOptions[] = [];\n \n if (VideoHelper.isVideo(video.data)) {\n actions.push({\n order: 1,\n label: getPhrase('download'),\n appLink: { application: AppChannels.VIDEOS, action: Actions.Videos.DOWNLOAD_VIDEO, args: [video.data.id]},\n analyticsOptions: {\n ...analyticsOptions,\n actionType: UserAction.Download,\n workflowPhase: WorkflowPhase.Start\n },\n analyticsData\n });\n }\n \n actions.push({\n order: 2,\n label: getPhrase('delete'),\n appLink: {\n application: AppChannels.USER_MANAGER,\n action: Actions.UserManager.DELETE_STUDENTS_VIDEO,\n args: [ props.id, video.data.id ],\n params: { typeId: video.data.typeId }\n },\n className: 'text-danger',\n analyticsOptions: {\n ...analyticsOptions,\n actionType: UserAction.Delete,\n workflowPhase: WorkflowPhase.Start\n },\n analyticsData\n });\n \n return actions;\n }\n\n const dataLoaded = (\n user.hasCompleted &&\n video.hasCompleted &&\n viewKey.hasCompleted &&\n config.hasCompleted &&\n currentUser.hasCompleted\n );\n\n if (!dataLoaded)\n return <></>;\n\n return (\n <div className='px-3'>\n <div className='alert text-dark bg-light-blue px-2 rounded d-flex flex-column flex-lg-row justify-content-between mb-3 align-items-center' role='alert'>\n <div className='d-flex align-items-center'>\n <SvgContainer\n svg={InfoSvg}\n size={SvgContainerSize.Standard}\n className='me-2 svg-container'\n />\n \n <div className='w-100'>\n <p className='fw-semibold mb-0'>\n {getPhrase(\n getMessagePhrase(props.typeId),\n { name: UserHelper.getFullName(user.data), yearGroup: user.data.masterYearGroup?.name }\n )}\n </p>\n </div>\n </div>\n </div>\n <div className='mb-3'>\n <LitePlayerView\n config={config.data}\n video={video.data}\n currentUser={currentUser.data}\n viewKey={viewKey.data}\n presentationSlug={null}\n />\n </div>\n <div className='d-flex justify-content-between align-items-center mb-2'>\n <div>\n <h1 className='h3 d-inline-flex m-0 mb-2'>\n {video.data.name}\n </h1>\n </div>\n <ActionsButtons\n actions={getVideoActions()}\n actionsDropdownClassName='btn btn-outline-dark'\n />\n </div>\n <VideoDetailsWithScrollbar video={video.data} />\n </div>\n );\n}\n"],"mappings":"i6CCwBM,EAAY,sBACZ,EAAY,EAAgB,iBAAiB,CAAS,EAQ5D,SAAS,EAAU,EAA2C,CAC5D,GAAM,CAAE,QAAO,QAAO,aAAc,EASpC,OAPiB,GAAS,EAAM,MAAQ,EAAM,KAAK,QAQjD,EAAA,EAAA,KAAA,CAAC,MAAD,CAAgB,qBAAhB,CAA4B,EAAM,KAHb,EAAM,KAAK,IAAI,GAAK,EAAE,IAAI,CAAC,CAAC,KAAK,IAGjB,CAAoB,KALlD,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,CAOf,CAEA,SAAS,EAAe,EAA2D,CACjF,GAAM,CAAE,SAAU,EAElB,GAAI,CAAC,EAAY,QAAQ,CAAK,GAAK,CAAC,EAAY,OAAO,CAAK,EAC1D,OAAO,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,EAEb,IAAM,EAAc,EAAY,eAAe,CAAK,EAEpD,OACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,EAAM,YAAc,gCAAkC,kBAAtE,EAC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AyB,sBAC1B,CAAA,CACE,KACL,EAAA,EAAA,IAAA,CAAC,EAAD,CAA2B,MAAO,EAAM,IAAO,CAAA,CAC5C,KA3CE,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,CA6Cf"}
1
+ {"version":3,"file":"BMZNQKEe.chunk.js","names":[],"sources":["../../../../libs/shared/src/components/video-details/video-details.module.scss","../../../../libs/shared/src/components/video-details/VideoDetails.tsx","../../src/apps/user-manager/views/students-video/StudentsVideoView.tsx"],"sourcesContent":[":local {\n .closeButton {\n position: absolute;\n top: 1rem;\n right: map-get($spacers, 3);\n }\n \n @media (min-width: #{map-get($grid-breakpoints, md)}) {\n .descriptionBorder {\n border-right: 1px solid $gray-300;\n }\n }\n}","import * as React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\nimport { LinkifyHelper } from 'libs/common/react/utils/LinkifyHelper';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\nimport { ImmersiveReader } from 'libs/shared/components/immersive-reader/ImmersiveReader';\nimport { TagHelper } from 'libs/shared/components/tags/TagHelper';\nimport { TagList } from 'libs/shared/components/tags/TagList';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { MINIMUM_GLANCE_HEIGHT } from 'libs/shared/constants/MinimumGlanceHeight';\nimport { BaseObject, BasePaginatedCollection, CurrentUser, Tag, VideoTypes } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { hasPPDD } from './VideoDetailsUtils';\n\nimport styles from './video-details.module.scss';\n\nconst namespace = 'shared.videoDetails';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface CommaListProps {\n label: string;\n items: BasePaginatedCollection<BaseObject>;\n className?: string;\n}\n\nfunction CommaList(props: CommaListProps): React.ReactElement {\n const { label, items, className } = props;\n\n const hasItems = items && items.data && items.data.length;\n\n if (!hasItems)\n return <></>;\n\n const commaSeperated = items.data.map(i => i.name).join(', ');\n\n return (\n <div className={className}>{label}: {commaSeperated}</div>\n );\n}\n\nfunction DetailsSection(props: VideoDetailsWithScrollbarProps): React.ReactElement {\n const { video } = props;\n\n if (!VideoHelper.isVideo(video) && !VideoHelper.isClip(video))\n return <></>;\n\n const parentVideo = VideoHelper.getParentVideo(video);\n\n return (\n <div className={video.description ? 'col-md-5 ps-md-3 pt-3 pt-md-0' : 'col-12'}>\n <h2 className='h6 mb-1'><Text phrase='details' /></h2>\n {!!parentVideo.productionYear && (\n <div className='mb-1'>\n <Text phrase='productionYear' options={{ year: parentVideo.productionYear }} />\n </div>\n )}\n <CommaList\n label={getPhrase('productionCompanies', { smartCount: parentVideo.productionCompanies?.data?.length })}\n items={parentVideo.productionCompanies}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('distributors', { smartCount: parentVideo.distributors?.data?.length })}\n items={parentVideo.distributors}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('producers', { smartCount: parentVideo.producers?.data?.length })}\n items={parentVideo.producers}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('directors', { smartCount: parentVideo.directors?.data?.length })}\n items={parentVideo.directors}\n className='mb-1'\n />\n {!!parentVideo.dateBroadcast && (\n <div className='mb-1'>\n <Text phrase='dateBroadcast' options={{ date: DateHelper.format(parentVideo.dateBroadcast, 'DD/MM/YYYY') }} />\n </div>\n )}\n {!!parentVideo.channel && (\n <div className='mb-1'>\n <Text phrase='channel' options={{ channel: parentVideo.channel.name }} />\n </div>\n )}\n {VideoHelper.canViewUploadDate(props.video) && (\n <div className='mb-1'>\n <Text phrase='dateUploaded' options={{ date: DateHelper.format(video.dateCreated, 'DD/MM/YYYY') }} />\n </div>\n )}\n </div>\n );\n}\n\ninterface VideoDetailsWithScrollbarProps {\n video: VideoTypes;\n currentUser?: CurrentUser;\n getTagAppLink?: (tag: Tag) => Core.AppLink;\n onLaunchImmersiveReader?: () => void;\n onExitImmersiveReader?: () => void;\n onClickClose?: () => void;\n onClickShowCurriculumLinks?: () => void;\n maxHeight?: number;\n suppressInteractivity?: boolean;\n hideTags?: boolean;\n}\n\nexport function VideoDetailsWithScrollbar(props: VideoDetailsWithScrollbarProps): React.ReactElement {\n const { video, maxHeight = MINIMUM_GLANCE_HEIGHT } = props;\n\n const parentVideo = VideoHelper.getParentVideo(video);\n\n const showDescription = !!props.video.description;\n\n const showDetails = (\n hasPPDD(props.video) ||\n !!parentVideo.productionYear ||\n !!parentVideo.dateBroadcast ||\n !!parentVideo.channel ||\n VideoHelper.canViewUploadDate(props.video)\n );\n\n const canClose = typeof props.onClickClose === 'function';\n const showCurriculumLinks = typeof props.onClickShowCurriculumLinks === 'function';\n\n function getTags(): Tag[] {\n if (props.hideTags || VideoHelper.isInteractive(props.video) || !props.video.tags?.data?.length)\n return null;\n\n return props.video.tags.data;\n }\n\n if (!showDescription && !showDetails)\n return <></>;\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <div className='rounded border p-3 mb-3 position-relative'>\n <Scrollbars autoHeight autoHeightMax={maxHeight}>\n <div className='row g-0'>\n {showDescription && (\n <div className={showDetails ? `${styles.descriptionBorder} pe-3 col-md-7` : 'col-12'}>\n <div className='d-flex align-items-center'>\n <h2 className='h6 mb-1'>\n <Text phrase='description' />\n </h2>\n <ImmersiveReader\n text={video.description}\n title={video.name}\n className='ps-2'\n onLaunch={props.onLaunchImmersiveReader}\n onExit={props.onExitImmersiveReader}\n analyticsOptions={{\n location: LocationContext.PlayPage,\n entity: EntityType.Video,\n actionType: UserAction.Click,\n descriptor: ClickDescriptor.LaunchImmersiveReader\n }}\n analyticsData={{ id: video.id, type: 'description' }}\n />\n </div>\n <p className='mb-0' dangerouslySetInnerHTML={{ __html: TextHelper.sanitize(LinkifyHelper.linkifyText(props.video.description, { nl2br: true })) }} />\n <TagList\n tags={getTags()}\n {...TagHelper.getTagActionProps(props.getTagAppLink, null, props.suppressInteractivity)}\n className='mt-1'\n />\n {showCurriculumLinks && (\n <DivButton\n onClick={props.onClickShowCurriculumLinks}\n className='cursor-pointer d-inline-block fw-semibold text-info mt-2 mb-1'\n >\n <Text namespace={namespace} phrase='seeCurriculumLinks' />\n </DivButton>\n )}\n </div>\n )}\n\n {showDetails && (\n <DetailsSection {...props} />\n )}\n </div>\n </Scrollbars>\n\n {canClose && (\n <button\n type='button'\n className={`btn-close ${styles.closeButton}`}\n aria-label='Close'\n onClick={props.onClickClose}\n />\n )}\n </div>\n </LanguageNamespaceContext.Provider>\n );\n}\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/react/index';\n\nimport { AnalyticsOptions, LocationContext, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { Actions as ActionsButtons } from 'libs/shared/components/actions/Actions';\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { VideoDetailsWithScrollbar } from 'libs/shared/components/video-details/VideoDetails';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { MediaIdType } from 'libs/shared/enums/MediaIdType';\nimport { ClipRequests } from 'libs/shared/flight-requests/ClipRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { InteractiveRequests } from 'libs/shared/flight-requests/InteractiveRequests';\nimport { PlayerRequests } from 'libs/shared/flight-requests/PlayerRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { InfoSvg } from 'libs/shared/images/svg/status/InfoSvg';\nimport { Config, CurrentUser, PlayerViewKey, User, VideoTypes } from 'libs/shared/interfaces';\nimport { UserHelper } from 'libs/shared/utils/UserHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { LitePlayerView } from 'shared/views/lite-player/LitePlayerView';\n\nimport { UserManagerRequests } from 'apps/user-manager/flight-requests/UserManagerRequests';\n\nconst namespace = 'userManager.studentsVideo';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nfunction getRequest(id: string, typeId: string): Flight.Request {\n if (typeId.toString() === MasterType.Clip.toString())\n return ClipRequests.clip(id);\n\n if (typeId.toString() === MasterType.Interactive.toString())\n return InteractiveRequests.interactiveMetadata(id);\n\n return VideoRequests.video(id);\n}\n\nfunction getMessagePhrase(typeId: string): string {\n if (typeId.toString() === MasterType.Clip.toString())\n return 'messageClip';\n\n if (typeId.toString() === MasterType.Interactive.toString())\n return 'messageInteractive';\n\n return 'messageVideo';\n}\n\ninterface StudentsVideoProps {\n userId: string;\n id: string;\n typeId: string;\n}\n\nexport function StudentsVideoView(props: StudentsVideoProps): JSX.Element {\n const user = Flight.useBasicFetch<User>(UserManagerRequests.getUser(props.userId));\n\n const video = Flight.useBasicFetch<VideoTypes>(getRequest(props.id, props.typeId));\n\n const viewKey = Flight.useBasicFetch<PlayerViewKey>(PlayerRequests.createViewKey(props.id, MediaIdType.MasterObject));\n\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n useHandleObjectError([ user, video ]);\n useSetPageMetadata({\n title: user.data ?\n LanguageService.getPhrase(\n namespace,\n 'pageTitle',\n { name: UserHelper.getFullName(user.data) }\n ) :\n ''\n });\n\n function getVideoActions(): ActionOptions[] {\n const analyticsOptions: AnalyticsOptions = {\n entity: VideoHelper.getAnalyticsEntity(video.data),\n location: LocationContext.ViewStudentVideos\n };\n \n const analyticsData = {\n id: video.data.id\n };\n \n const actions: ActionOptions[] = [];\n \n if (VideoHelper.isVideo(video.data)) {\n actions.push({\n order: 1,\n label: getPhrase('download'),\n appLink: { application: AppChannels.VIDEOS, action: Actions.Videos.DOWNLOAD_VIDEO, args: [video.data.id]},\n analyticsOptions: {\n ...analyticsOptions,\n actionType: UserAction.Download,\n workflowPhase: WorkflowPhase.Start\n },\n analyticsData\n });\n }\n \n actions.push({\n order: 2,\n label: getPhrase('delete'),\n appLink: {\n application: AppChannels.USER_MANAGER,\n action: Actions.UserManager.DELETE_STUDENTS_VIDEO,\n args: [ props.id, video.data.id ],\n params: { typeId: video.data.typeId }\n },\n className: 'text-danger',\n analyticsOptions: {\n ...analyticsOptions,\n actionType: UserAction.Delete,\n workflowPhase: WorkflowPhase.Start\n },\n analyticsData\n });\n \n return actions;\n }\n\n const dataLoaded = (\n user.hasCompleted &&\n video.hasCompleted &&\n viewKey.hasCompleted &&\n config.hasCompleted &&\n currentUser.hasCompleted\n );\n\n if (!dataLoaded)\n return <></>;\n\n return (\n <div className='px-3'>\n <div className='alert text-dark bg-light-blue px-2 rounded d-flex flex-column flex-lg-row justify-content-between mb-3 align-items-center' role='alert'>\n <div className='d-flex align-items-center'>\n <SvgContainer\n svg={InfoSvg}\n size={SvgContainerSize.Standard}\n className='me-2 svg-container'\n />\n \n <div className='w-100'>\n <p className='fw-semibold mb-0'>\n {getPhrase(\n getMessagePhrase(props.typeId),\n { name: UserHelper.getFullName(user.data), yearGroup: user.data.masterYearGroup?.name }\n )}\n </p>\n </div>\n </div>\n </div>\n <div className='mb-3'>\n <LitePlayerView\n config={config.data}\n video={video.data}\n currentUser={currentUser.data}\n viewKey={viewKey.data}\n presentationSlug={null}\n />\n </div>\n <div className='d-flex justify-content-between align-items-center mb-2'>\n <div>\n <h1 className='h3 d-inline-flex m-0 mb-2'>\n {video.data.name}\n </h1>\n </div>\n <ActionsButtons\n actions={getVideoActions()}\n actions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C,EAAD,CACE,IAAK,EACL,KAAM,EAAiB,SACvB,UAAU,oBACX,CAAA,GAED,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,kBACb,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,4BACV,EACC,EAAiB,EAAM,MAAM,EAC7B,CAAE,KAAM,EAAW,YAAY,EAAK,IAAI,EAAG,UAAW,EAAK,KAAK,iBAAiB,IAAK,CACxF,CACC,CAAA,CACA,CAAA,CACF,GACF,CAAA,GACL,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,iBACb,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,OAAQ,EAAO,KACf,MAAO,EAAM,KACb,YAAa,EAAY,KACzB,QAAS,EAAQ,KACjB,iBAAkB,IACnB,CAAA,CACE,CAAA,GACL,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,kEAAf,EACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAA,UACE,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,qCACX,EAAM,KAAK,IACV,CAAA,CACD,CAAA,GACL,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,QAAS,EAAgB,EACzB,yBAAyB,sBAC1B,CAAA,CACE,KACL,EAAA,EAAA,IAAA,CAAC,EAAD,CAA2B,MAAO,EAAM,IAAO,CAAA,CAC5C,KA3CE,EAAA,EAAA,IAAA,CAAA,EAAA,SAAA,CAAI,CAAA,CA6Cf"}
@@ -1,3 +1,3 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["scripts/B7AxsMtH.chunk.js","scripts/DUO5SaBm.chunk.js","scripts/DFawGnSF.chunk.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./DAXXjFlN.chunk.js";import{n as t,t as n}from"./snXCXfT6.chunk.js";import{t as r}from"./CQyJ7YGa.chunk.js";import{t as i}from"./C2w0pmFW.chunk.js";import{t as a}from"./wrLrTezN.chunk.js";import{t as o}from"./CZgWQFsJ.chunk.js";import{n as s}from"./C0exjRXJ.chunk.js";import{n as c}from"./CpFtf-tI2.chunk.js";import{i as l,l as u}from"./CXVBjdpb.chunk.js";import{t as d}from"./Cvh-7L5i.chunk.js";import{t as f}from"./CunDpHqX2.chunk.js";import{n as p}from"./DduFT_FA.chunk.js";import{t as m}from"./DSl2uxYA.chunk.js";var h=e(i()),g={bars:`_bars_1gyu0_1`},_=a(),v={weak:`red`,fair:`orange`,good:`blue`,strong:`green`};function y(e){switch(e){case 0:case 1:return`weak`;case 2:return`fair`;case 3:return`good`;case 4:return`strong`}return null}function b(e,t,n){return t===0&&e===0?`bg-red`:e<=t-1?`bg-${v[n]}`:`bg-light`}function x(e){let r=y(e.score);return(0,_.jsxs)(`div`,{className:s(`pb-3`,e.className),children:[(0,_.jsx)(`ul`,{className:s(`list-group list-group-horizontal d-flex gap-2`,g.bars),children:Array.from({length:4},(t,n)=>(0,_.jsx)(`li`,{className:s(`list-group-item rounded-pill border-0 flex-grow-1 py-1`,b(n,e.score,r))},`password-block_${n}`))}),(0,_.jsx)(`div`,{className:s(`mb-1 text-end`),children:r&&(0,_.jsx)(`span`,{className:s(`text-${v[r]}`),children:e.strengthText})}),(e.warning||e.suggestions?.length>0)&&(0,_.jsxs)(`div`,{className:`bg-light-orange d-flex gap-3 py-2 px-3`,children:[(0,_.jsx)(n,{svg:f,className:`d-inline-block svg-container text-orange`,size:t.Standard}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`span`,{children:e.suggestionHeader}),(0,_.jsxs)(`ul`,{className:`mb-0`,children:[e.warning&&(0,_.jsx)(`li`,{className:`mt-1`,children:e.warning}),e.suggestions?.map((e,t)=>(0,_.jsx)(`li`,{className:`mt-1`,children:e},`suggestion-${t}`))]})]})]})]})}var S=150,C=[`clickview`],w=null;function T(){return w||=E().catch(e=>{throw w=null,e}),w}async function E(){let[e,t,n]=await Promise.all([o(()=>import(`./DZiTrzZf.chunk.js`),[]),o(()=>import(`./B7AxsMtH.chunk.js`),__vite__mapDeps([0,1])),o(()=>import(`./DFawGnSF.chunk.js`),__vite__mapDeps([2,1]))]);return new e.ZxcvbnFactory({graphs:t.adjacencyGraphs,dictionary:{...t.dictionary,...n.dictionary,userInputs:C}})}function D(e){let t=d(e,S),[n,r]=h.useState(null);return h.useEffect(()=>{if(!t){r(null);return}let e=!1;return T().then(n=>{e||r(n.check(t))},()=>{e||r(null)}),()=>{e=!0}},[t]),n}var O=`shared.changePasswordFormV2`,k=`shared.changePasswordFormWarning`,A=`shared.changePasswordFormSuggestion`,j=r.encloseNamespace(O),M=[`extendedRepeat`,`simpleRepeat`];N.defaultProps={submitVariant:`outline-dark`,buttonContainerClass:`btn-container d-flex justify-content-end align-items-center`,inputWidthClass:`w-100`};function N(e){let t=u(),n=D(t.values.newPassword),i=n?.feedback?.warning,a=i&&r.getPhrase(k,i),o=n?.feedback.suggestions.filter(e=>e!==i&&!(e===`repeated`&&M.includes(i))).map(e=>r.getPhrase(A,e)),s=n?.score;return(0,_.jsxs)(l,{children:[!e.hideCurrentPassword&&(0,_.jsx)(p,{className:e.inputWidthClass,name:`currentPassword`,label:j(`currentPassword`),placeholder:j(`currentPasswordPlaceholder`),type:`password`,autoComplete:`current-password`,showRequiredStar:!0}),(0,_.jsx)(p,{className:e.inputWidthClass,name:`newPassword`,label:j(`newPassword`),placeholder:j(`newPasswordPlaceholder`),type:`password`,autoComplete:`new-password`,onFocus:()=>T(),showRequiredStar:!0}),e.minLength<=t.values.newPassword.length&&!!n&&(0,_.jsx)(`div`,{className:`mt-n2`,children:(0,_.jsx)(x,{score:s,suggestions:o,warning:a,className:e.passwordStrengthClassName,suggestionHeader:j(`suggestionHeader`),strengthText:j(y(s))})}),(0,_.jsx)(p,{className:e.inputWidthClass,name:`confirmPassword`,label:j(`confirmPassword`),placeholder:j(`confirmPasswordPlaceholder`),type:`password`,autoComplete:`off`,showRequiredStar:!0}),e.showChangeOnNextLogin&&(0,_.jsx)(p,{id:`changeOnNextLogin`,name:`changeOnNextLogin`,label:j(`changeOnNextLogin`),type:`checkbox`,checked:t.values.changeOnNextLogin,checkboxLabelFontWeight:`normal`}),!e.hideButtons&&(0,_.jsxs)(`div`,{className:e.buttonContainerClass,children:[!e.hideCancelButton&&!!e.onClickCancel&&(0,_.jsx)(`button`,{type:`button`,className:`btn btn-link me-2 ${e.buttonSize===`lg`?`btn-lg`:``}`,onClick:e.onClickCancel,children:(0,_.jsx)(c,{namespace:O,phrase:`cancel`})}),(0,_.jsx)(m,{isNew:!1,submitText:e.submitText||j(`save`),variant:e.submitVariant,size:e.buttonSize})]})]})}export{N as t};
3
- //# sourceMappingURL=BOuzZEkK2.chunk.js.map
2
+ import{o as e}from"./DAXXjFlN.chunk.js";import{n as t,t as n}from"./snXCXfT6.chunk.js";import{t as r}from"./CQyJ7YGa.chunk.js";import{t as i}from"./C2w0pmFW.chunk.js";import{t as a}from"./wrLrTezN.chunk.js";import{t as o}from"./CZgWQFsJ.chunk.js";import{n as s}from"./C0exjRXJ.chunk.js";import{n as c}from"./CpFtf-tI2.chunk.js";import{i as l,l as u}from"./CXVBjdpb.chunk.js";import{t as d}from"./Cvh-7L5i.chunk.js";import{t as f}from"./CunDpHqX2.chunk.js";import{n as p}from"./DduFT_FA.chunk.js";import{t as m}from"./DSl2uxYA.chunk.js";var h=e(i()),g={bars:`_bars_1gyu0_1`},_=a(),v={weak:`red`,fair:`orange`,good:`blue`,strong:`green`};function y(e){switch(e){case 0:case 1:return`weak`;case 2:return`fair`;case 3:return`good`;case 4:return`strong`}return null}function b(e,t,n){return t===0&&e===0?`bg-red`:e<=t-1?`bg-${v[n]}`:`bg-light`}function x(e){let r=y(e.score);return(0,_.jsxs)(`div`,{className:s(`pb-3`,e.className),children:[(0,_.jsx)(`ul`,{className:s(`list-group list-group-horizontal d-flex gap-2`,g.bars),children:Array.from({length:4},(t,n)=>(0,_.jsx)(`li`,{className:s(`list-group-item rounded-pill border-0 flex-grow-1 py-1`,b(n,e.score,r))},`password-block_${n}`))}),(0,_.jsx)(`div`,{className:s(`mb-1 text-end`),children:r&&(0,_.jsx)(`span`,{className:s(`text-${v[r]}`),children:e.strengthText})}),(e.warning||e.suggestions?.length>0)&&(0,_.jsxs)(`div`,{className:`bg-light-orange d-flex gap-3 py-2 px-3`,children:[(0,_.jsx)(n,{svg:f,className:`d-inline-block svg-container text-orange`,size:t.Standard}),(0,_.jsxs)(`div`,{children:[(0,_.jsx)(`span`,{children:e.suggestionHeader}),(0,_.jsxs)(`ul`,{className:`mb-0`,children:[e.warning&&(0,_.jsx)(`li`,{className:`mt-1`,children:e.warning}),e.suggestions?.map((e,t)=>(0,_.jsx)(`li`,{className:`mt-1`,children:e},`suggestion-${t}`))]})]})]})]})}var S=150,C=[`clickview`],w=null;function T(){return w||=E().catch(e=>{throw w=null,e}),w}async function E(){let[e,t,n]=await Promise.all([o(()=>import(`./DZiTrzZf.chunk.js`),[]),o(()=>import(`./B7AxsMtH.chunk.js`),__vite__mapDeps([0,1])),o(()=>import(`./DFawGnSF.chunk.js`),__vite__mapDeps([2,1]))]);return new e.ZxcvbnFactory({graphs:t.adjacencyGraphs,dictionary:{...t.dictionary,...n.dictionary,userInputs:C}})}function D(e){let t=d(e,S),[n,r]=h.useState(null);return h.useEffect(()=>{if(!t){r(null);return}let e=!1;async function n(){try{let n=await T();e||r(n.check(t))}catch{e||r(null)}}return n(),()=>{e=!0}},[t]),n}var O=`shared.changePasswordFormV2`,k=`shared.changePasswordFormWarning`,A=`shared.changePasswordFormSuggestion`,j=r.encloseNamespace(O),M=[`extendedRepeat`,`simpleRepeat`];N.defaultProps={submitVariant:`outline-dark`,buttonContainerClass:`btn-container d-flex justify-content-end align-items-center`,inputWidthClass:`w-100`};function N(e){let t=u(),n=D(t.values.newPassword),i=n?.feedback?.warning,a=i&&r.getPhrase(k,i),o=n?.feedback.suggestions.filter(e=>e!==i&&!(e===`repeated`&&M.includes(i))).map(e=>r.getPhrase(A,e)),s=n?.score;return(0,_.jsxs)(l,{children:[!e.hideCurrentPassword&&(0,_.jsx)(p,{className:e.inputWidthClass,name:`currentPassword`,label:j(`currentPassword`),placeholder:j(`currentPasswordPlaceholder`),type:`password`,autoComplete:`current-password`,showRequiredStar:!0}),(0,_.jsx)(p,{className:e.inputWidthClass,name:`newPassword`,label:j(`newPassword`),placeholder:j(`newPasswordPlaceholder`),type:`password`,autoComplete:`new-password`,onFocus:()=>T(),showRequiredStar:!0}),e.minLength<=t.values.newPassword.length&&!!n&&(0,_.jsx)(`div`,{className:`mt-n2`,children:(0,_.jsx)(x,{score:s,suggestions:o,warning:a,className:e.passwordStrengthClassName,suggestionHeader:j(`suggestionHeader`),strengthText:j(y(s))})}),(0,_.jsx)(p,{className:e.inputWidthClass,name:`confirmPassword`,label:j(`confirmPassword`),placeholder:j(`confirmPasswordPlaceholder`),type:`password`,autoComplete:`off`,showRequiredStar:!0}),e.showChangeOnNextLogin&&(0,_.jsx)(p,{id:`changeOnNextLogin`,name:`changeOnNextLogin`,label:j(`changeOnNextLogin`),type:`checkbox`,checked:t.values.changeOnNextLogin,checkboxLabelFontWeight:`normal`}),!e.hideButtons&&(0,_.jsxs)(`div`,{className:e.buttonContainerClass,children:[!e.hideCancelButton&&!!e.onClickCancel&&(0,_.jsx)(`button`,{type:`button`,className:`btn btn-link me-2 ${e.buttonSize===`lg`?`btn-lg`:``}`,onClick:e.onClickCancel,children:(0,_.jsx)(c,{namespace:O,phrase:`cancel`})}),(0,_.jsx)(m,{isNew:!1,submitText:e.submitText||j(`save`),variant:e.submitVariant,size:e.buttonSize})]})]})}export{N as t};
3
+ //# sourceMappingURL=BPjqerK42.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"mappings":";okBAoBM,EAA4C,CAChD,KAAM,MACN,KAAM,SACN,KAAM,OACN,OAAQ,OACV,EAEA,SAAgB,EAAa,EAAiC,CAC5D,OAAQ,EAAR,CACE,IAAK,GACL,IAAK,GACH,MAAO,OACT,IAAK,GACH,MAAO,OACT,IAAK,GACH,MAA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7B,OACE,UAAC,EAAD,WACG,CAAC,EAAM,sBACN,SAAC,EAAD,CACE,UAAW,EAAM,gBACjB,KAAK,kBACL,MAAO,EAAU,iBAAiB,EAClC,YAAa,EAAU,4BAA4B,EACnD,KAAK,WACL,aAAa,mBACb,mBACD,IAGH,SAAC,EAAD,CACE,UAAW,EAAM,gBACjB,KAAK,cACL,MAAO,EAAU,aAAa,EAC9B,YAAa,EAAU,wBAAwB,EAC/C,KAAK,WACL,aAAa,eACb,YAAe,EAAe,EAC9B,mBACD,GAEA,EAAM,WAAa,EAAY,OAAO,YAAY,QAAU,CAAC,CAAC,IAC7D,SAAC,MAAD,CAAK,UAAU,kBACb,SAAC,EAAD,CACS,QACM,cACJ,UACT,UAAW,EAAM,0BACjB,iBAAkB,EAAU,kBAAkB,EAC9C,aAAc,EAAU,EAAa,CAAK,CAAC,CAC5C,EACE,IAGP,SAAC,EAAD,CACE,UAAW,EAAM,gBACjB,KAAK,kBACL,MAAO,EAAU,iBAAiB,EAClC,YAAa,EAAU,4BAA4B,EACnD,KAAK,WACL,aAAa,MACb,mBACD,GAEA,EAAM,wBACL,SAAC,EAAD,CACE,GAAG,oBACH,KAAK,oBACL,MAAO,EAAU,mBAAmB,EACpC,KAAK,WACL,QAAS,EAAY,OAAO,kBAC5B,wBAAwB,QACzB,GAGF,CAAC,EAAM,cACN,UAAC,MAAD,CAAK,UAAW,EAAM,8BAAtB,CACI,CAAC,EAAM,kBAAoB,CAAC,CAAC,EAAM,gBACnC,SAAC,SAAD,CACE,KAAK,SACL,UAAW,qBAAqB,EAAM,aAAe,KAAO,SAAW,KACvE,QAAS,EAAM,wBAEf,SAAC,EAAD,CAAiB,YAAW,OAAO,QAAU,EACvC,IAEV,SAAC,EAAD,CACE,MAAO,GACP,WAAY,EAAM,YAAc,EAAU,MAAM,EAChD,QAAS,EAAM,cACf,KAAM,EAAM,UACb,EACE,GAEH,GAEV","names":[],"ignoreList":[],"sources":["../../../../libs/shared/src/components/password-strength-indicator/PasswordStrengthIndicator.tsx","../../../../libs/shared/src/hooks/usePasswordStrength.ts","../../../../libs/shared/src/apps/user-manager/components/change-password-form-v2/ChangePasswordFormV2.tsx"],"sourcesContent":["import React from 'react';\n\nimport { classNames } from 'libs/common/react/utils/ClassNameHelper';\n\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { WarningOutlineSvg } from 'libs/shared/images/svg/status/WarningOutlineSvg';\n\nimport styles from './password-strength-indicator.module.scss';\n\ninterface PasswordStrengthIndicatorProps {\n score: number;\n warning?: string;\n suggestions?: string[];\n suggestionHeader: string;\n strengthText: string;\n className?: string;\n}\n\ntype PasswordStrength = 'weak' | 'fair' | 'good' | 'strong';\n\nconst mapping: Record<PasswordStrength, string> = {\n weak: 'red',\n fair: 'orange',\n good: 'blue',\n strong: 'green'\n};\n\nexport function scoreMapping(score: number): PasswordStrength {\n switch (score) {\n case 0:\n case 1:\n return 'weak';\n case 2:\n return 'fair';\n case 3:\n return 'good';\n case 4:\n return 'strong';\n }\n\n return null;\n}\n\nfunction getBarBgColor(idx: number, score: number, strength: PasswordStrength): string {\n if (score === 0 && idx === 0)\n return 'bg-red';\n\n if (idx <= score - 1)\n return `bg-${mapping[strength]}`;\n\n return 'bg-light';\n}\n\nexport function PasswordStrengthIndicator(props: PasswordStrengthIndicatorProps) {\n const strength = scoreMapping(props.score);\n\n return (\n <div className={classNames('pb-3', props.className)}>\n <ul className={classNames(\n 'list-group list-group-horizontal d-flex gap-2',\n styles.bars\n )}>\n {Array.from({ length: 4 }, (_, idx) => (\n <li\n key={`password-block_${idx}`}\n className={classNames(\n 'list-group-item rounded-pill border-0 flex-grow-1 py-1',\n getBarBgColor(idx, props.score, strength)\n )}\n />\n ))}\n </ul>\n <div className={classNames('mb-1 text-end')}>\n {strength &&\n <span className={classNames(\n `text-${mapping[strength]}`\n )}>\n {props.strengthText}\n </span>\n }\n </div>\n {(props.warning || props.suggestions?.length > 0) &&\n <div className='bg-light-orange d-flex gap-3 py-2 px-3'>\n <SvgContainer\n svg={WarningOutlineSvg}\n className='d-inline-block svg-container text-orange'\n size={SvgContainerSize.Standard}\n />\n <div>\n <span>{props.suggestionHeader}</span>\n <ul className='mb-0'>\n {props.warning && <li className='mt-1'>{props.warning}</li>}\n {\n props.suggestions?.map((reason, idx) => (\n <li key={`suggestion-${idx}`} className='mt-1'>{reason}</li>\n ))\n }\n </ul>\n </div>\n </div>}\n </div>\n );\n}\n","import React from 'react';\nimport type { ZxcvbnFactory, ZxcvbnResult } from '@zxcvbn-ts/core';\n\nimport { useDebounce } from 'libs/shared/hooks/UseDebounce';\n\nconst DEBOUNCE_MS = 150;\n\nconst USER_INPUTS = ['clickview'];\n\nlet zxcvbnPromise: Promise<ZxcvbnFactory> = null;\n\n/**\n * Call this on focus of a password field to start the download while the user is still\n * typing their first few characters.\n */\nexport function prefetchZxcvbn(): Promise<ZxcvbnFactory> {\n // the promise is assigned synchronously so concurrent callers share one download\n if (!zxcvbnPromise)\n zxcvbnPromise = createZxcvbnFactory().catch(error => {\n zxcvbnPromise = null; // let the next keystroke retry\n throw error;\n });\n\n return zxcvbnPromise;\n}\n\nasync function createZxcvbnFactory(): Promise<ZxcvbnFactory> {\n const [ core, common, en ] = await Promise.all([\n import('@zxcvbn-ts/core'),\n import('@zxcvbn-ts/language-common'),\n import('@zxcvbn-ts/language-en')\n ]);\n\n return new core.ZxcvbnFactory({\n graphs: common.adjacencyGraphs,\n dictionary: {\n ...common.dictionary,\n ...en.dictionary,\n userInputs: USER_INPUTS\n }\n });\n}\n\n/**\n * Returns null until the dictionaries have loaded and the debounced password has been\n * scored.\n */\nexport function usePasswordStrength(password: string): ZxcvbnResult {\n const debouncedPassword = useDebounce(password, DEBOUNCE_MS);\n const [ passwordCheck, setPasswordCheck ] = React.useState<ZxcvbnResult>(null);\n\n React.useEffect(() => {\n if (!debouncedPassword) {\n setPasswordCheck(null);\n return;\n }\n\n let isCancelled = false;\n\n async function check() {\n try {\n const zxcvbn = await prefetchZxcvbn();\n if (!isCancelled)\n setPasswordCheck(zxcvbn.check(debouncedPassword));\n } catch {\n if (!isCancelled)\n setPasswordCheck(null);\n }\n }\n\n check();\n\n return () => {\n isCancelled = true;\n };\n }, [debouncedPassword]);\n\n return passwordCheck;\n}\n","import React from 'react';\nimport { ButtonProps } from 'react-bootstrap';\nimport { Form, useFormikContext } from 'formik';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { ChangePasswordRequest } from 'libs/shared/apps/user-manager/interfaces';\nimport { FormButtons } from 'libs/shared/components/forms/form-buttons/FormButtons';\nimport { FormField, FormSize } from 'libs/shared/components/forms/form-field/FormField';\nimport { PasswordStrengthIndicator, scoreMapping } from 'libs/shared/components/password-strength-indicator/PasswordStrengthIndicator';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { prefetchZxcvbn, usePasswordStrength } from 'libs/shared/hooks/usePasswordStrength';\n\nconst namespace = 'shared.changePasswordFormV2';\nconst warningNamespace = 'shared.changePasswordFormWarning';\nconst suggestionNamespace = 'shared.changePasswordFormSuggestion';\n\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst REPEAT_WARNINGS = [ 'extendedRepeat', 'simpleRepeat' ];\n\ninterface ChangePasswordFormProps {\n onClickCancel?: () => void;\n \n hideButtons?: boolean;\n buttonContainerClass?: string;\n buttonSize?: FormSize;\n hideCancelButton?: boolean;\n hideCurrentPassword?: boolean;\n inputWidthClass?: string;\n showChangeOnNextLogin?: boolean;\n\n submitText?: string;\n submitVariant?: ButtonProps['variant'];\n\n minLength: number;\n passwordStrengthClassName?: string;\n}\n\nChangePasswordFormV2.defaultProps = {\n submitVariant: 'outline-dark',\n buttonContainerClass: 'btn-container d-flex justify-content-end align-items-center',\n inputWidthClass: 'w-100'\n};\n\nexport function ChangePasswordFormV2(props: ChangePasswordFormProps): JSX.Element {\n const formikProps = useFormikContext<ChangePasswordRequest>();\n\n const passwordCheck = usePasswordStrength(formikProps.values.newPassword);\n\n const warningKey = passwordCheck?.feedback?.warning;\n\n // warning is stronger than suggestion but we are treating them the same and displaying them together\n const warning = warningKey && LanguageService.getPhrase(warningNamespace, warningKey);\n\n const suggestions = passwordCheck?.feedback.suggestions\n .filter(suggestion => suggestion !== warningKey &&\n !(suggestion === 'repeated' && REPEAT_WARNINGS.includes(warningKey)))\n .map(suggestion => LanguageService.getPhrase(suggestionNamespace, suggestion));\n\n const score = passwordCheck?.score;\n\n return (\n <Form>\n {!props.hideCurrentPassword && (\n <FormField\n className={props.inputWidthClass}\n name='currentPassword'\n label={getPhrase('currentPassword')}\n placeholder={getPhrase('currentPasswordPlaceholder')}\n type='password'\n autoComplete='current-password'\n showRequiredStar\n />\n )}\n\n <FormField\n className={props.inputWidthClass}\n name='newPassword'\n label={getPhrase('newPassword')}\n placeholder={getPhrase('newPasswordPlaceholder')}\n type='password'\n autoComplete='new-password'\n onFocus={() => prefetchZxcvbn()}\n showRequiredStar\n />\n\n {props.minLength <= formikProps.values.newPassword.length && !!passwordCheck &&\n <div className='mt-n2'>\n <PasswordStrengthIndicator\n score={score}\n suggestions={suggestions}\n warning={warning}\n className={props.passwordStrengthClassName}\n suggestionHeader={getPhrase('suggestionHeader')}\n strengthText={getPhrase(scoreMapping(score))}\n />\n </div>\n }\n\n <FormField\n className={props.inputWidthClass}\n name='confirmPassword'\n label={getPhrase('confirmPassword')}\n placeholder={getPhrase('confirmPasswordPlaceholder')}\n type='password'\n autoComplete='off'\n showRequiredStar\n />\n\n {props.showChangeOnNextLogin &&\n <FormField\n id='changeOnNextLogin'\n name='changeOnNextLogin'\n label={getPhrase('changeOnNextLogin')}\n type='checkbox'\n checked={formikProps.values.changeOnNextLogin}\n checkboxLabelFontWeight='normal'\n />\n }\n \n {!props.hideButtons && (\n <div className={props.buttonContainerClass}>\n {(!props.hideCancelButton && !!props.onClickCancel) && (\n <button\n type='button'\n className={`btn btn-link me-2 ${props.buttonSize === 'lg' ? 'btn-lg' : ''}`}\n onClick={props.onClickCancel}\n >\n <Text namespace={namespace} phrase='cancel' />\n </button>\n )}\n <FormButtons\n isNew={false}\n submitText={props.submitText || getPhrase('save')}\n variant={props.submitVariant}\n size={props.buttonSize}\n />\n </div>\n )}\n </Form>\n );\n}\n"],"file":"BPjqerK42.chunk.js"}
@@ -1,2 +1,2 @@
1
- import{o as e}from"./DAXXjFlN.chunk.js";import{o as t,t as n}from"./snXCXfT6.chunk.js";import{y as r}from"./BftnFbcr.chunk.js";import"./DFZS3Ffo.chunk.js";import{t as i}from"./CQyJ7YGa.chunk.js";import{t as a}from"./e57H3T-k.chunk.js";import{t as o}from"./C2w0pmFW.chunk.js";import{t as s}from"./wrLrTezN.chunk.js";import{t as c}from"./BXTI9cmX.chunk.js";import{t as l}from"./CjA4Q5pm.chunk.js";import{N as u,U as d,a as f,l as p,y as m,z as h}from"./NlCAcBdo.chunk.js";import{t as g}from"./BxbRBSiP.chunk.js";import{i as _,t as v}from"./CmMsex772.chunk.js";import{t as y}from"./BrbeV-Gn2.chunk.js";import{t as b}from"./eoAypzU3.chunk.js";import{t as x}from"./_GCZ-60i.chunk.js";import{n as ee}from"./BRcHS92O2.chunk.js";import{t as te}from"./Bs2PKr1I2.chunk.js";import{t as ne}from"./DpCWroEe2.chunk.js";import{t as re}from"./Bbp2U9GK.chunk.js";import{t as S}from"./CduNFx13.chunk.js";import{t as C}from"./C2Hgija5.chunk.js";import{t as w}from"./BUnh3rN0.chunk.js";import{i as ie}from"./C6-aC3vu.chunk.js";import{t as ae}from"./rVRhgtHY2.chunk.js";import{n as T,t as oe}from"./CpFtf-tI2.chunk.js";import{n as se}from"./BJUbYu222.chunk.js";import{t as ce}from"./DW24qN_e2.chunk.js";import{t as le}from"./5ONJSThP.chunk.js";import{t as ue}from"./jAbfamoi.chunk.js";import{t as de}from"./BzbZUZa-2.chunk.js";import{n as E,t as D}from"./D2-L8f1x2.chunk.js";import{t as O}from"./DsBWAM3I2.chunk.js";import{t as fe}from"./Z4RlHaVG.chunk.js";import{t as pe}from"./9kh0Xx2n2.chunk.js";import{c as me,i as he,n as ge,o as _e,s as ve,t as ye}from"./BOJK8LI1.chunk.js";import{t as be}from"./tnBD84bg2.chunk.js";import{t as xe}from"./DELN_PAD2.chunk.js";import{t as Se}from"./_42F7SIA2.chunk.js";import{t as Ce}from"./CXqh4A92.chunk.js";import{t as k}from"./OtQaFdir.chunk.js";import{t as A}from"./Dopg0SXC.chunk.js";import{n as we,t as Te}from"./2GJYUMeO2.chunk.js";import{n as j,t as Ee}from"./B5XaBzZh.chunk.js";import{t as M}from"./BPavmm8c.chunk.js";import{t as De}from"./IqGr9V7u2.chunk.js";import{r as Oe}from"./BNp6yfEd2.chunk.js";import{t as ke}from"./7I0L5W4N2.chunk.js";import{n as N,r as P,t as Ae}from"./DusJhHeW2.chunk.js";import{t as F}from"./CLjADRa42.chunk.js";import{t as je}from"./BgOLbASl2.chunk.js";var I=e(o()),L=s(),R=ue();function z(){let e=le();return e.lg||e.xl||e.xxl}var B={copyrightDisclaimer:`_copyrightDisclaimer_yyjul_1`,overlayContainer:`_overlayContainer_yyjul_4`},V=`shared.copyrightDisclaimer`,Me=150;function Ne(e){let[n,r]=se({});function i(){return document.documentElement.clientHeight-n.current?.getBoundingClientRect().bottom<Me}return(0,L.jsxs)(`div`,{ref:n,className:e.className,children:[(0,L.jsx)(`p`,{className:`${B.copyrightDisclaimer} ${e.phraseClassName??`mb-1`}`,children:(0,L.jsx)(T,{namespace:V,phrase:`copyrightDisclaimer`})}),(0,L.jsx)(t,{target:n.current,show:r,placement:e.overflowPlacement&&i()?e.overflowPlacement:e.placement,children:(0,L.jsxs)(`div`,{className:`${B.overlayContainer} mw-100 bg-white border rounded-3 p-2`,children:[(0,L.jsx)(`p`,{children:(0,L.jsx)(T,{namespace:V,phrase:`warning`})}),(0,L.jsx)(`p`,{className:`fw-semibold mb-0`,children:(0,L.jsx)(T,{namespace:V,phrase:`sharing`})})]})})]})}function Pe(e){return(0,L.jsx)(ke,{lines:12,children:()=>(0,L.jsx)(`p`,{className:`mb-0`,dangerouslySetInnerHTML:{__html:a.sanitize(be.linkifyText(e.video.description,{nl2br:!0}))}})})}var Fe={descriptionBorder:`_descriptionBorder_any0w_2`},H=`shared.videoDetailsV2`,U=i.encloseNamespace(H);function W(e){let{label:t,items:n,className:r}=e;return n&&n.data&&n.data.length?typeof e.getItemAppLink==`function`?(0,L.jsxs)(`div`,{className:r,children:[(0,L.jsxs)(`span`,{children:[t,`: `]}),n.data.map((t,r)=>(0,L.jsxs)(I.Fragment,{children:[(0,L.jsx)(S,{appLink:e.getItemAppLink(t),children:t.name?.trim()},t.id),r<n.data.length-1&&(0,L.jsx)(`span`,{children:`, `})]},t.id))]}):(0,L.jsxs)(`div`,{className:r,children:[t,`: `,n.data.map(e=>e.name?.trim()).join(`, `)]}):(0,L.jsx)(L.Fragment,{})}function Ie(e){let t=e.categories?.data;return t?.length?t.filter(e=>e.libraries?.data?.[0]?.type===ce.CustomLibrary).map(e=>({library:e.libraries?.data?.[0],category:e})):[]}function Le(e){return[{name:e.pair.library.name,appLink:e.getLibraryAppLink?.(e.pair.library)},{name:`...`},{name:e.pair.category.name,appLink:e.getFolderAppLink?.(e.pair.library,e.pair.category)}]}function Re(e){let{video:t}=e;if(!y.isVideo(t)&&!y.isClip(t))return(0,L.jsx)(L.Fragment,{});let n=y.getParentVideo(t),r=Ie(t);function i(t){if(!(!t.partnerProfiles||!t.partnerProfiles?.data?.length)){if(t.partnerProfiles?.count>1&&typeof e.getPartnerDashboardHubAppLink==`function`)return e.getPartnerDashboardHubAppLink(t);if(typeof e.getPartnerProfileAppLink==`function`)return e.getPartnerProfileAppLink(t.partnerProfiles?.data?.[0])}}return(0,L.jsxs)(`div`,{className:t.description?`col-md-5 ps-md-3 pt-3 pt-md-0`:`col-12`,children:[(0,L.jsx)(`h2`,{className:`h6 mb-1`,children:(0,L.jsx)(T,{phrase:`details`})}),!!n.productionYear&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`productionYear`,options:{year:n.productionYear}})}),(0,L.jsx)(W,{label:U(`productionCompanies`,{smartCount:n.productionCompanies?.data?.length}),items:n.productionCompanies,getItemAppLink:i,className:`mb-1`}),(0,L.jsx)(W,{label:U(`distributors`,{smartCount:n.distributors?.data?.length}),items:n.distributors,getItemAppLink:i,className:`mb-1`}),(0,L.jsx)(W,{label:U(`producers`,{smartCount:n.producers?.data?.length}),items:n.producers,className:`mb-1`}),(0,L.jsx)(W,{label:U(`directors`,{smartCount:n.directors?.data?.length}),items:n.directors,className:`mb-1`}),!!n.dateBroadcast&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`dateBroadcast`,options:{date:l.format(n.dateBroadcast,`DD/MM/YYYY`)}})}),!!n.channel&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`channel`,options:{channel:n.channel.name}})}),y.canViewUploadDate(e.video)&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`dateUploaded`,options:{date:l.format(t.dateCreated,`DD/MM/YYYY`)}})}),!!(r.length&&e.getLibraryAppLink&&e.getFolderAppLink)&&(0,L.jsxs)(`div`,{className:`mb-1`,children:[(0,L.jsxs)(`div`,{children:[U(`libraries`,{smartCount:r.length}),`:`]}),r.map((t,n)=>(0,L.jsx)(`div`,{children:(0,L.jsx)(Ce,{breadcrumbs:Le({pair:t,getLibraryAppLink:e.getLibraryAppLink,getFolderAppLink:e.getFolderAppLink}),linkClassName:`text-info`})},n))]})]})}function ze(e){let{video:t,maxHeight:n=368}=e,r=y.getParentVideo(t),i=!!e.video.description,a=Ae(e.video)||!!r.productionYear||!!r.dateBroadcast||!!r.channel||y.canViewUploadDate(e.video);if(!i&&!a)return(0,L.jsx)(L.Fragment,{});function o(){return e.hideTags||y.isInteractive(e.video)||!e.video.tags?.data?.length?null:e.video.tags?.data?.filter(e=>e.tagType===g.Normal)}let s=o();return(0,L.jsx)(oe.Provider,{value:H,children:(0,L.jsxs)(`section`,{id:M.VideoDetails,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(M.VideoDetails,t)},className:`play-page-section`,children:[e.showHeading&&(0,L.jsx)(Se,{name:U(`heading`)}),(0,L.jsx)(`div`,{className:`rounded border p-3 position-relative`,children:(0,L.jsxs)(R.Scrollbars,{autoHeight:!0,autoHeightMax:n,hideTracksWhenNotNeeded:!0,children:[(0,L.jsxs)(`div`,{className:`row g-0`,children:[i&&(0,L.jsxs)(`div`,{className:a?`${Fe.descriptionBorder} pe-3 col-md-7`:`col-12`,children:[(0,L.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,L.jsx)(`h2`,{className:`h6 mb-1`,children:(0,L.jsx)(T,{phrase:`description`})}),(0,L.jsx)(De,{text:t.description,title:t.name,className:`ps-2`,onLaunch:e.onLaunchImmersiveReader,onExit:e.onExitImmersiveReader,analyticsOptions:{location:m.PlayPage,entity:p.Video,actionType:h.Click,descriptor:f.LaunchImmersiveReader},analyticsData:{id:t.id,type:`description`}})]}),(0,L.jsx)(Pe,{video:e.video})]}),a&&(0,L.jsx)(Re,{...e})]}),!!s?.length&&(0,L.jsxs)(`div`,{className:`mt-3`,children:[(0,L.jsx)(`h2`,{className:`h6 mb-1`,children:(0,L.jsx)(T,{phrase:`normalTags`})}),(0,L.jsx)(N,{tags:s,...P.getTagActionProps(e.getTagAppLink,null,e.suppressInteractivity),className:`mt-1`})]}),y.isBroadcast(e.video)&&(0,L.jsx)(Ne,{placement:`bottom-start`,className:`d-flex justify-content-start mt-2`,phraseClassName:`mb-0`,overflowPlacement:`top-start`})]})})]})})}function G(e,t,n,r){let i=()=>{F.unsubscribe(e,t)};return(0,I.useEffect)(()=>{if(r)return n?F.subscribeOnce(e,t):F.subscribe(e,t),()=>{i()}},[]),i}var K={learningIntention:`_learningIntention_lm8nf_1`,highlightPoi:`_highlightPoi_lm8nf_7`,icon:`_icon_lm8nf_10`},Be=/\[\]\(cv:\/\/poi\?id=\d+\)\n*/g;function Ve(e){return e.replace(Be,``)}function He(e){return ie(Ve(e.content),{async:!1})}function Ue(e,t){let[n,r]=(0,I.useState)(``);return(0,I.useEffect)(()=>{if(!t||!e.glance?.content)return;let n=He(e.glance);r(n)},[e.glance?.content,t]),n}function We(e){return e.glance?.content&&e.glance?.format===`text/markdown`}function Ge(e,t){let n=(0,I.useRef)(null);G(`player:poi:mouseover`,r,null,t),G(`player:poi:mouseleave`,i,null,t),(0,I.useEffect)(()=>{if(!(!n.current||!t))return n.current?.addEventListener(`mouseover`,a),n.current?.addEventListener(`mouseleave`,o),()=>{n.current?.removeEventListener(`mouseover`,a),n.current?.removeEventListener(`mouseleave`,o)}},[n.current]);function r(t){!t?.id||e?.id?.toString()!==t?.id?.toString()||n.current?.classList.add(K.highlightPoi)}function i(){n.current?.classList.remove(K.highlightPoi)}function a(){e&&F.trigger(`glance:poi:mouseover`,e)}function o(){F.trigger(`glance:poi:mouseleave`)}return n}var q={poiEntry:`_poiEntry_1bne8_1`,poiText:`_poiText_1bne8_5`,public:`_public_1bne8_5`,poiTimeStamp:`_poiTimeStamp_1bne8_14`,wideBadge:`_wideBadge_1bne8_18`};function Ke(e){let t=O.ToDisplayDuration(e.poi.startTime*1e3),n=Ge(e.poi,!e.suppressInteractivity);return e.suppressInteractivity?(0,L.jsxs)(`div`,{className:`d-flex ${q.poiEntry} mb-2`,children:[(0,L.jsx)(`span`,{className:`d-flex rounded-pill justify-content-center align-items-center text-info bg-light-blue ${q.poiTimeStamp} ${e.wideBadge?q.wideBadge:``}`,children:t}),(0,L.jsx)(`div`,{className:`${q.public} ms-2`,children:e.poi.description})]}):(0,L.jsxs)(re,{className:`d-flex ${q.poiEntry} mb-2 cursor-pointer`,onClick:()=>e.onClickPoiItem(e.poi.startTime),ref:n,children:[(0,L.jsx)(`div`,{className:`d-flex rounded-pill justify-content-center align-items-center text-info bg-light-blue ${q.poiTimeStamp} ${e.wideBadge?q.wideBadge:``}`,children:t}),(0,L.jsx)(`div`,{className:`ms-2 ${q.poiText}`,children:e.poi.description})]},e.poi.startTime)}var qe=`shared.pointsOfInterestList`;function Je(e){let t=e.pointsOfInterest.sort((e,t)=>e.startTime-t.startTime),n=t.some(e=>e.startTime>=3600);return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`h6 my-2`,children:(0,L.jsx)(T,{namespace:qe,phrase:`heading`})}),(0,L.jsx)(`div`,{children:t.map(t=>(0,L.jsx)(Ke,{poi:t,suppressInteractivity:e.suppressInteractivity,onClickPoiItem:e.onClickPoiItem,wideBadge:n},t.startTime))})]})}var Ye=`shared.videoAtAGlanceV2`,Xe=365;function Ze(e){return e.hideScrollbar?(0,L.jsx)(L.Fragment,{children:e.children}):(0,L.jsx)(`div`,{className:`rounded border mb-4 bg-white`,children:(0,L.jsx)(R.Scrollbars,{autoHeight:!0,autoHeightMax:Xe,children:(0,L.jsx)(`div`,{className:`px-3 pt-3 pb-2`,children:e.children})})})}function Qe(e){let t=Ue(e.video,e.canViewGlance),[n,r]=I.useState(``);function i(){let t={id:e.video.glance.id,name:e.video.glance.name,videoId:e.video.id,videoName:e.video.name,learningIntention:n},r={actionType:h.Copy,entity:p.Glance,location:m.PlayPage};x.logUserAction(t,r)}function o(){return y.isInteractive(e.video)||!e.video.tags?.data?.length?null:e.video.tags?.data?.filter(e=>e.tagType===g.Pedagogy||e.tagType===g.Skill)}let s=o(),c=I.useRef(null);if(I.useEffect(()=>{c.current?.innerText&&r(c.current.innerText)},[c.current?.innerText]),!e.canViewGlance)return(0,L.jsx)(L.Fragment,{});function l(t){e.setStartTime(t)}return(0,L.jsx)(`section`,{className:`play-page-section`,children:(0,L.jsxs)(Ze,{hideScrollbar:e.hideScrollbar,children:[(0,L.jsx)(`h2`,{className:`h6 mb-2`,children:(0,L.jsx)(T,{namespace:Ye,phrase:`learningIntention`})}),(0,L.jsxs)(`div`,{className:`mb-3 ${K.learningIntention}`,children:[(0,L.jsx)(Ee,{copyableContent:n,tooltipClassName:K.icon,onClick:i,visible:!0}),(0,L.jsx)(`div`,{dangerouslySetInnerHTML:{__html:a.sanitize(t)},className:`d-inline`,ref:c})]}),!!s?.length&&(0,L.jsx)(`div`,{children:(0,L.jsx)(N,{tags:s,...P.getTagActionProps(e.getTagAppLink,e.onClickTag,e.suppressInteractivity),className:`mt-2`})}),!!e.pointsOfInterest?.length&&(0,L.jsx)(`div`,{className:`mt-3`,children:(0,L.jsx)(Je,{pointsOfInterest:e.pointsOfInterest,suppressInteractivity:e.suppressInteractivity,onClickPoiItem:l})})]})})}var $e=I.memo(function(e){let{data:t,thumbnailSize:n,preloadImage:r,getAppLink:i}=e,a=A(t.subjectPresentationAudiences?.data,e.audiences);return(0,L.jsxs)(`div`,{className:`flex-shrink-0 px-1 col-6 col-sm-4`,children:[(0,L.jsx)(ye,{type:`static`,textPosition:ge.Independent,video:t,appLink:i(t),imageOptions:{size:n},preload:r,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,audience:a,hideDuration:!1,commonVideoProps:e.commonVideoProps}),(0,L.jsx)(`div`,{className:`mt-2`,children:(0,L.jsx)(he,{...e,video:t,appLink:e.getAppLink(t)})})]})}),et=`shared.playPageClips`;function tt(e){if(!e.canViewClips||!e.clips?.length)return(0,L.jsx)(L.Fragment,{});let t=y.isVideo(e.video);function n(){return y.isVideo(e.video)?{action:b.Videos.VIDEO_CLIPS,application:c.VIDEOS,args:[e.presentationSlug,e.video.id,a.slugify(e.video.name)]}:{action:b.Clips.CLIP_CLIPS,application:c.CLIPS,args:[e.video.id,a.slugify(e.video.name)]}}let r=i.getPhrase(et,t?`clips`:`otherClips`,{count:e.clips.length});return(0,L.jsx)(`section`,{className:`play-page-section`,id:M.Clips,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(M.Clips,t)},children:(0,L.jsx)(v,{name:r,contents:_.ClipsV2,collection:e.clips,prefetched:!0,getChildAppLink:e=>({application:c.CLIPS,action:b.Clips.PLAY_CLIP,args:[e.id,a.slugify(e.name)]}),appLink:n(),childComponent:$e,extraChildComponentProps:{audiences:e.audiences,showOwner:!0,commonVideoProps:e.commonVideoProps},analyticsData:e.analyticsData})})}var nt=`shared.playPageInteractives`;function rt(e){if(!e.canViewInteractives||!e.interactives?.length)return(0,L.jsx)(L.Fragment,{});function t(){return y.isVideo(e.video)?{action:b.Videos.VIDEO_INTERACTIVES,application:c.VIDEOS,args:[e.presentationSlug,e.video.id,a.slugify(e.video.name)]}:{action:b.Clips.CLIP_INTERACTIVES,application:c.CLIPS,args:[e.video.id,a.slugify(e.video.name)]}}let n=i.getPhrase(nt,`interactives`,{count:e.interactives.length});return(0,L.jsx)(`section`,{className:`play-page-section`,id:M.Interactives,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(M.Interactives,t)},children:(0,L.jsx)(v,{name:n,contents:_.InteractivesV2,collection:e.interactives,prefetched:!0,getChildAppLink:e=>({application:c.INTERACTIVES,action:b.Interactives.VIEW_INTERACTIVE,args:[e.id,a.slugify(e.name)]}),appLink:t(),childComponent:Oe,extraChildComponentProps:{questionsAppLink:{application:c.INTERACTIVES,action:b.Interactives.PREVIEW_QUESTIONS},showOwner:!0,commonVideoProps:e.commonVideoProps},analyticsData:e.analyticsData})})}function J(e){return(0,L.jsx)(`svg`,{...e,children:(0,L.jsx)(`path`,{d:`M5.455 12c0 .401.325.727.727.727h9.88l-3.849 3.85a.728.728 0 0 0 1.029 1.028l5.09-5.091a.73.73 0 0 0 .213-.514v7.272a.727.727 0 0 0 1.455 0V4.727a.727.727 0 0 0-1.455 0V12a.73.73 0 0 0-.213-.515l-5.09-5.09a.727.727 0 1 0-1.029 1.028l3.85 3.85H6.181a.727.727 0 0 0-.727.727`,fill:`currentColor`})})}function it(e){return(0,L.jsx)(`svg`,{...e,children:(0,L.jsx)(`path`,{d:`M20 12a.727.727 0 0 0-.727-.728h-9.88l3.848-3.849a.727.727 0 1 0-1.028-1.029l-5.091 5.091a.73.73 0 0 0-.213.514V4.727a.727.727 0 0 0-1.454 0v14.545a.727.727 0 0 0 1.454 0V12c0 .186.071.373.213.515l5.091 5.09a.727.727 0 0 0 1.029-1.028l-3.85-3.85h9.88A.727.727 0 0 0 20 12`,fill:`currentColor`})})}var Y={showInSide:`_showInSide_1n1am_1`,container:`_container_1n1am_7`,aside:`_aside_1n1am_11`,collapse:`_collapse_1n1am_14`,iconContainer:`_iconContainer_1n1am_22`,arrowIcon:`_arrowIcon_1n1am_22`,listIcon:`_listIcon_1n1am_25`},at=`shared.playPage`;function ot(e){function t(){let t={actionType:e.isExpanded?h.Hide:h.Open,entity:p.TableOfContents,location:m.PlayPage};x.logUserAction(e.analyticsData,t)}function n(){let n=!e.isExpanded;e.setIsExpanded(n),n?(e.toggleTheatreMode?.(!1),e.toggleTheatreMode||e.setIsExpanded(!1)):(e.toggleTheatreMode?.(!0),e.toggleTheatreMode||e.setIsExpanded(!0)),t()}return(0,L.jsx)(`div`,{className:`d-flex justify-content-end`,children:(0,L.jsx)(`div`,{className:Y.container,children:(0,L.jsxs)(`div`,{className:`${Y.iconContainer}`,children:[(0,L.jsx)(w,{className:`btn btn-outline-dark ${Y.listIcon}`,svg:xe,onClick:n}),(0,L.jsx)(w,{className:`btn btn-outline-dark ${Y.arrowIcon}`,svg:e.isExpanded?J:it,onClick:n})]})})})}function st(e){function t(){let t={actionType:h.Hide,entity:p.TableOfContents,location:m.PlayPage};x.logUserAction(e.analyticsData,t)}function n(e){let t=ne.getCurrentRoute().appLink,n=t.params?{...t.params}:{};return n.tocId=e.id,{...t,params:n}}function r(){e.showInSide||e.setIsExpanded(!1)}return(0,L.jsxs)(`div`,{className:e.showInSide?`col ms-2 ps-4 ${Y.showInSide}`:`d-inline-flex gap-1`,children:[(0,L.jsx)(`aside`,{className:`${Y.aside} position-relative ${e.showInSide?`pe-1 pt-1 `:`px-3 pt-3 pb-2 border border-dark rounded-1 bg-white`}`,children:(0,L.jsxs)(`div`,{className:`${Y.container}`,children:[e.showInSide&&!e.hasTranscription&&(0,L.jsx)(w,{className:`btn position-absolute ${Y.collapse}`,svg:J,onClick:()=>{e.setIsExpanded(!1),e.toggleTheatreMode?.(!0),t()}}),(0,L.jsx)(`h2`,{className:`h5`,children:(0,L.jsx)(T,{namespace:at,phrase:`tocHeading`})}),(0,L.jsx)(je,{items:e.items,activeId:e.activeId,getAppLink:n,setControlledId:e.setControlledId,analyticsData:e.analyticsData,onItemClick:()=>r()})]})}),!e.showInSide&&(0,L.jsx)(ot,{...e})]})}function ct(e){return e.shouldShow?(0,L.jsxs)(L.Fragment,{children:[e.isExpanded&&e.showInSide&&(0,L.jsx)(st,{...e}),k.renderInPortalIfExists(!e.isExpanded&&(0,L.jsx)(ot,{...e}),document.getElementById(C)),k.renderInPortalIfExists(!e.showInSide&&e.isExpanded&&(0,L.jsx)(st,{...e}),document.getElementById(C))]}):(0,L.jsx)(L.Fragment,{})}var X={series:`_series_15j6m_1`,badgeListContainer:`_badgeListContainer_15j6m_5`,clipOriginInfo:`_clipOriginInfo_15j6m_10`},lt=`shared.playPage`;function ut(e){let t=A(e.media.subjectPresentationAudiences?.data,e.audiences),n=I.useRef(null),r=I.useRef(null),i=y.isVideo(e.media)&&!!y.getRating(e.media)?.value||y.isVideo(e.media)&&!!e.media.productionYear||!!e.media.subjectPresentationAudiences?.data?.length,a=we({location:Te.PlayPage,shareId:e.shareId,presentationSlug:e.presentationSlug}),o=!!e.originalVideoAppLink&&y.isClip(e.media)&&y.canViewOriginalVideo(e.media);return(0,L.jsx)(`section`,{className:`mb-3 position-relative`,ref:n,children:(0,L.jsxs)(`div`,{className:`d-inline-block w-100`,ref:r,children:[e.featureAccess.canNavigate&&(0,L.jsx)(`div`,{className:`ms-2 float-end`,children:(0,L.jsx)(fe,{actions:a.getVideoActions(e.media),actionsDropdownClassName:`btn btn-outline-dark`,fetchMore:()=>a.fetchMoreActions(e.media)})}),!!y.isVideo(e.media)&&(0,L.jsx)(de,{type:e.subTextType,video:e.media,appLink:e.subtextAppLink,className:`${X.series} text-truncate mw-100`,analyticsOptions:{location:m.PlayPage}}),(0,L.jsxs)(`h1`,{className:`h4 mb-2 mw-100`,children:[(0,L.jsx)(`span`,{className:`align-self-center`,children:e.media.name}),e.showTitlePadlock&&(0,L.jsx)(_e,{tooltipPlacement:`right`,className:`d-inline-block ps-1`,video:e.media,yearGroups:e.yearGroups})]}),y.isClip(e.media)&&o&&(0,L.jsxs)(`p`,{className:`clamp-1 ${X.clipOriginInfo}`,children:[(0,L.jsx)(T,{namespace:lt,phrase:`viewOriginal`}),`\xA0`,(0,L.jsx)(S,{className:`info-link`,appLink:e.originalVideoAppLink,children:e.media._parentVideo?.name}),`\xA0`,(0,L.jsx)(T,{namespace:lt,phrase:`timestamp`,options:{timeRange:`${O.ToDisplayTimeRange(e.media.startTime*1e3,e.media.endTime*1e3)}`}})]}),i&&(0,L.jsxs)(pe,{className:X.badgeListContainer,children:[(0,L.jsx)(ve,{audience:t,className:`bg-white text-dark`,border:`dark`}),y.isVideo(e.media)&&(0,L.jsx)(D,{type:E.Rating,data:y.getRating(e.media)}),y.isVideo(e.media)&&(0,L.jsx)(D,{type:E.ProductionYear,data:e.media.productionYear})]})]})})}var Z={mask:`_mask_vq9tb_1`,centeredIcon:`_centeredIcon_vq9tb_10`,bgImage:`_bgImage_vq9tb_21`,centeredOverlay:`_centeredOverlay_vq9tb_24`},dt=i.encloseNamespace(`shared.playerPlaceholder`);function ft(e){switch(e.type){case`pip`:return(0,L.jsx)(pt,{...e});case`public`:return(0,L.jsx)(mt,{...e});default:return(0,L.jsx)(L.Fragment,{})}}var pt=e=>(0,L.jsxs)(`div`,{className:`position-relative responsive-img ${Z.bgImage}`,style:{backgroundImage:`url('${y.getThumbnail(e.video)?.url??``}')`},children:[(0,L.jsx)(`p`,{className:`m-0 text-white h3 ${Z.centeredOverlay}`,children:dt(`playingPiP`)}),(0,L.jsx)(`div`,{className:Z.mask})]}),mt=e=>{let t=te.createUrl(y.getThumbnail(e.video)?.url??``,{size:ee.Large});return(0,L.jsx)(`div`,{className:`position-relative responsive-img ${Z.bgImage}`,style:{backgroundImage:`url('${t}')`},children:(0,L.jsxs)(S,{appLink:e.appLink,analyticsOptions:{actionType:h.Click,location:m.PlayPage,entity:p.AppLink,workflowPhase:d.Start,descriptor:u.SignUp},analyticsData:{},children:[(0,L.jsx)(n,{svg:me,className:Z.centeredIcon}),(0,L.jsx)(`div`,{className:Z.mask})]})})};function ht({resourcePopupId:e,resources:t,getResourceAppLink:n}){I.useEffect(()=>{if(!e)return;let i=t?.find(t=>t.id.toString()===e.toString());i&&r.trigger(n(i))},[e])}var Q={main:`_main_1ujkn_1`,expandedToc:`_expandedToc_1ujkn_1`,theatreMode:`_theatreMode_1ujkn_4`,theatreModeContent:`_theatreModeContent_1ujkn_7`,theatreModePlayPageContainer:`_theatreModePlayPageContainer_1ujkn_17`,theatreModeLeftContent:`_theatreModeLeftContent_1ujkn_21`};function gt(e){return e.shouldShowSideTableOfContents?e.hasTheatreMode&&e.theatreMode?Q.theatreMode:e.tableOfContentsExpanded?`${Q.expandedToc} col-9`:`pe-4`:``}function _t(e){return e.hasTheatreMode&&(e.theatreMode||!e.shouldShowSideTableOfContents)?`container ${Q.theatreModeContent}`:``}function vt(e,t){return e&&t.defaultDisplayMode===`theatre`&&t.mode==="default"}var yt=`play-page-toc-expanded`;function bt(e,t,n){let r=z(),i=j.get(yt)!==`false`,a=t?n||r:i,[o,s]=I.useState(e||``),[c,l]=I.useState(``),[u,d]=I.useState(a);I.useEffect(()=>{if(!r){d(!1);return}if(t){d(!0);return}d(a)},[r,n]);function f(){t&&r||(d(!u),j.set(yt,(!u).toString()))}return{controlledId:o,setControlledId:s,tableOfContentsExpanded:u,tableOfContentsActiveId:c,setTableOfContentsActiveId:l,onToggleTableOfContents:f}}var xt={map(e){let t=new Proxy(new Map,{get(n,r){if(r===`set`)return(r,i)=>(n.get(r)!==i&&(n.set(r,i),e()),t);let i=Reflect.get(n,r);return typeof i==`function`?i.bind(n):i}});return t}},St=[M.Video,M.CurriculumLinks,M.Resources,M.Interactives,M.Clips,M.VideoDetails,M.ClippedFrom,M.Transcript,M.ReferenceVideo,M.RelatedVideos],Ct=[M.Video,M.VideoDetails,M.CurriculumLinks,M.Resources,M.Interactives,M.Clips,M.ClippedFrom,M.Transcript,M.ReferenceVideo,M.RelatedVideos];function wt(e){let t=ae(),n=I.useRef(xt.map(t));return{headingRef:n,headingElements:(e?St:Ct).map(e=>n.current.get(e)).filter(Boolean)}}function Tt(e,t,n){let r=le();if(t!=="default")return!1;let i=n===`theatre`;return!(r.sm||r.md)&&e&&i}var $=i.encloseNamespace(`shared.play`),Et={getSectionHeading(e,t){switch(e){case M.Resources:return $(`resourcesHeading`,{count:t.resources?.length});case M.Clips:return t.isPlayClipPage?$(`otherClipsHeading`,{count:t.clips?.length-1}):$(`clipsHeading`,{count:t.clips?.length});case M.Interactives:return $(`interactivesHeading`,{count:t.interactives?.length});case M.Video:return $(`videoHeading`);case M.VideoDetails:return $(`videoDetailsHeading`);case M.RelatedVideos:return $(`upNextHeading`);case M.CurriculumLinks:return $(`curriculumLinksHeading`);case M.ClippedFrom:return $(`clippedFromHeading`);case M.ReferenceVideo:return $(`referenceVideoHeading`);case M.Transcript:return $(`transcriptHeading`);default:return``}}};export{ze as _,_t as a,Q as c,ut as d,ct as f,We as g,Qe as h,bt as i,ht as l,tt as m,Tt as n,vt as o,rt as p,wt as r,gt as s,Et as t,ft as u,z as v};
2
- //# sourceMappingURL=fjQ026Rz2.chunk.js.map
1
+ import{o as e}from"./DAXXjFlN.chunk.js";import{o as t,t as n}from"./snXCXfT6.chunk.js";import{y as r}from"./BftnFbcr.chunk.js";import"./DFZS3Ffo.chunk.js";import{t as i}from"./CQyJ7YGa.chunk.js";import{t as a}from"./e57H3T-k.chunk.js";import{t as o}from"./C2w0pmFW.chunk.js";import{t as s}from"./wrLrTezN.chunk.js";import{t as c}from"./BXTI9cmX.chunk.js";import{t as l}from"./CjA4Q5pm.chunk.js";import{N as u,U as d,a as f,l as p,y as m,z as h}from"./NlCAcBdo.chunk.js";import{t as g}from"./BxbRBSiP.chunk.js";import{i as _,t as v}from"./CmMsex772.chunk.js";import{t as y}from"./BrbeV-Gn2.chunk.js";import{t as b}from"./eoAypzU3.chunk.js";import{t as x}from"./_GCZ-60i.chunk.js";import{n as ee}from"./BRcHS92O2.chunk.js";import{t as te}from"./Bs2PKr1I2.chunk.js";import{t as ne}from"./DpCWroEe2.chunk.js";import{t as re}from"./Bbp2U9GK.chunk.js";import{t as S}from"./CduNFx13.chunk.js";import{t as C}from"./BGH3t983.chunk.js";import{t as w}from"./BUnh3rN0.chunk.js";import{i as ie}from"./C6-aC3vu.chunk.js";import{t as ae}from"./rVRhgtHY2.chunk.js";import{n as T,t as oe}from"./CpFtf-tI2.chunk.js";import{n as se}from"./BJUbYu222.chunk.js";import{t as ce}from"./DW24qN_e2.chunk.js";import{t as le}from"./5ONJSThP.chunk.js";import{t as ue}from"./jAbfamoi.chunk.js";import{t as de}from"./BzbZUZa-2.chunk.js";import{n as E,t as D}from"./D2-L8f1x2.chunk.js";import{t as O}from"./DsBWAM3I2.chunk.js";import{t as fe}from"./Z4RlHaVG.chunk.js";import{t as pe}from"./9kh0Xx2n2.chunk.js";import{c as me,i as he,n as ge,o as _e,s as ve,t as ye}from"./BOJK8LI1.chunk.js";import{t as be}from"./tnBD84bg2.chunk.js";import{t as xe}from"./DELN_PAD2.chunk.js";import{t as Se}from"./_42F7SIA2.chunk.js";import{t as Ce}from"./CXqh4A92.chunk.js";import{t as k}from"./OtQaFdir.chunk.js";import{t as A}from"./Dopg0SXC.chunk.js";import{n as we,t as Te}from"./2GJYUMeO2.chunk.js";import{n as j,t as Ee}from"./B5XaBzZh.chunk.js";import{t as M}from"./BPavmm8c.chunk.js";import{t as De}from"./IqGr9V7u2.chunk.js";import{r as Oe}from"./BNp6yfEd2.chunk.js";import{t as ke}from"./7I0L5W4N2.chunk.js";import{n as N,r as P,t as Ae}from"./DusJhHeW2.chunk.js";import{t as F}from"./CLjADRa42.chunk.js";import{t as je}from"./BgOLbASl2.chunk.js";var I=e(o()),L=s(),R=ue();function z(){let e=le();return e.lg||e.xl||e.xxl}var B={copyrightDisclaimer:`_copyrightDisclaimer_yyjul_1`,overlayContainer:`_overlayContainer_yyjul_4`},V=`shared.copyrightDisclaimer`,Me=150;function Ne(e){let[n,r]=se({});function i(){return document.documentElement.clientHeight-n.current?.getBoundingClientRect().bottom<Me}return(0,L.jsxs)(`div`,{ref:n,className:e.className,children:[(0,L.jsx)(`p`,{className:`${B.copyrightDisclaimer} ${e.phraseClassName??`mb-1`}`,children:(0,L.jsx)(T,{namespace:V,phrase:`copyrightDisclaimer`})}),(0,L.jsx)(t,{target:n.current,show:r,placement:e.overflowPlacement&&i()?e.overflowPlacement:e.placement,children:(0,L.jsxs)(`div`,{className:`${B.overlayContainer} mw-100 bg-white border rounded-3 p-2`,children:[(0,L.jsx)(`p`,{children:(0,L.jsx)(T,{namespace:V,phrase:`warning`})}),(0,L.jsx)(`p`,{className:`fw-semibold mb-0`,children:(0,L.jsx)(T,{namespace:V,phrase:`sharing`})})]})})]})}function Pe(e){return(0,L.jsx)(ke,{lines:12,children:()=>(0,L.jsx)(`p`,{className:`mb-0`,dangerouslySetInnerHTML:{__html:a.sanitize(be.linkifyText(e.video.description,{nl2br:!0}))}})})}var Fe={descriptionBorder:`_descriptionBorder_any0w_2`},H=`shared.videoDetailsV2`,U=i.encloseNamespace(H);function W(e){let{label:t,items:n,className:r}=e;return n&&n.data&&n.data.length?typeof e.getItemAppLink==`function`?(0,L.jsxs)(`div`,{className:r,children:[(0,L.jsxs)(`span`,{children:[t,`: `]}),n.data.map((t,r)=>(0,L.jsxs)(I.Fragment,{children:[(0,L.jsx)(S,{appLink:e.getItemAppLink(t),children:t.name?.trim()},t.id),r<n.data.length-1&&(0,L.jsx)(`span`,{children:`, `})]},t.id))]}):(0,L.jsxs)(`div`,{className:r,children:[t,`: `,n.data.map(e=>e.name?.trim()).join(`, `)]}):(0,L.jsx)(L.Fragment,{})}function Ie(e){let t=e.categories?.data;return t?.length?t.filter(e=>e.libraries?.data?.[0]?.type===ce.CustomLibrary).map(e=>({library:e.libraries?.data?.[0],category:e})):[]}function Le(e){return[{name:e.pair.library.name,appLink:e.getLibraryAppLink?.(e.pair.library)},{name:`...`},{name:e.pair.category.name,appLink:e.getFolderAppLink?.(e.pair.library,e.pair.category)}]}function Re(e){let{video:t}=e;if(!y.isVideo(t)&&!y.isClip(t))return(0,L.jsx)(L.Fragment,{});let n=y.getParentVideo(t),r=Ie(t);function i(t){if(!(!t.partnerProfiles||!t.partnerProfiles?.data?.length)){if(t.partnerProfiles?.count>1&&typeof e.getPartnerDashboardHubAppLink==`function`)return e.getPartnerDashboardHubAppLink(t);if(typeof e.getPartnerProfileAppLink==`function`)return e.getPartnerProfileAppLink(t.partnerProfiles?.data?.[0])}}return(0,L.jsxs)(`div`,{className:t.description?`col-md-5 ps-md-3 pt-3 pt-md-0`:`col-12`,children:[(0,L.jsx)(`h2`,{className:`h6 mb-1`,children:(0,L.jsx)(T,{phrase:`details`})}),!!n.productionYear&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`productionYear`,options:{year:n.productionYear}})}),(0,L.jsx)(W,{label:U(`productionCompanies`,{smartCount:n.productionCompanies?.data?.length}),items:n.productionCompanies,getItemAppLink:i,className:`mb-1`}),(0,L.jsx)(W,{label:U(`distributors`,{smartCount:n.distributors?.data?.length}),items:n.distributors,getItemAppLink:i,className:`mb-1`}),(0,L.jsx)(W,{label:U(`producers`,{smartCount:n.producers?.data?.length}),items:n.producers,className:`mb-1`}),(0,L.jsx)(W,{label:U(`directors`,{smartCount:n.directors?.data?.length}),items:n.directors,className:`mb-1`}),!!n.dateBroadcast&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`dateBroadcast`,options:{date:l.format(n.dateBroadcast,`DD/MM/YYYY`)}})}),!!n.channel&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`channel`,options:{channel:n.channel.name}})}),y.canViewUploadDate(e.video)&&(0,L.jsx)(`div`,{className:`mb-1`,children:(0,L.jsx)(T,{phrase:`dateUploaded`,options:{date:l.format(t.dateCreated,`DD/MM/YYYY`)}})}),!!(r.length&&e.getLibraryAppLink&&e.getFolderAppLink)&&(0,L.jsxs)(`div`,{className:`mb-1`,children:[(0,L.jsxs)(`div`,{children:[U(`libraries`,{smartCount:r.length}),`:`]}),r.map((t,n)=>(0,L.jsx)(`div`,{children:(0,L.jsx)(Ce,{breadcrumbs:Le({pair:t,getLibraryAppLink:e.getLibraryAppLink,getFolderAppLink:e.getFolderAppLink}),linkClassName:`text-info`})},n))]})]})}function ze(e){let{video:t,maxHeight:n=368}=e,r=y.getParentVideo(t),i=!!e.video.description,a=Ae(e.video)||!!r.productionYear||!!r.dateBroadcast||!!r.channel||y.canViewUploadDate(e.video);if(!i&&!a)return(0,L.jsx)(L.Fragment,{});function o(){return e.hideTags||y.isInteractive(e.video)||!e.video.tags?.data?.length?null:e.video.tags?.data?.filter(e=>e.tagType===g.Normal)}let s=o();return(0,L.jsx)(oe.Provider,{value:H,children:(0,L.jsxs)(`section`,{id:M.VideoDetails,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(M.VideoDetails,t)},className:`play-page-section`,children:[e.showHeading&&(0,L.jsx)(Se,{name:U(`heading`)}),(0,L.jsx)(`div`,{className:`rounded border p-3 position-relative`,children:(0,L.jsxs)(R.Scrollbars,{autoHeight:!0,autoHeightMax:n,hideTracksWhenNotNeeded:!0,children:[(0,L.jsxs)(`div`,{className:`row g-0`,children:[i&&(0,L.jsxs)(`div`,{className:a?`${Fe.descriptionBorder} pe-3 col-md-7`:`col-12`,children:[(0,L.jsxs)(`div`,{className:`d-flex align-items-center`,children:[(0,L.jsx)(`h2`,{className:`h6 mb-1`,children:(0,L.jsx)(T,{phrase:`description`})}),(0,L.jsx)(De,{text:t.description,title:t.name,className:`ps-2`,onLaunch:e.onLaunchImmersiveReader,onExit:e.onExitImmersiveReader,analyticsOptions:{location:m.PlayPage,entity:p.Video,actionType:h.Click,descriptor:f.LaunchImmersiveReader},analyticsData:{id:t.id,type:`description`}})]}),(0,L.jsx)(Pe,{video:e.video})]}),a&&(0,L.jsx)(Re,{...e})]}),!!s?.length&&(0,L.jsxs)(`div`,{className:`mt-3`,children:[(0,L.jsx)(`h2`,{className:`h6 mb-1`,children:(0,L.jsx)(T,{phrase:`normalTags`})}),(0,L.jsx)(N,{tags:s,...P.getTagActionProps(e.getTagAppLink,null,e.suppressInteractivity),className:`mt-1`})]}),y.isBroadcast(e.video)&&(0,L.jsx)(Ne,{placement:`bottom-start`,className:`d-flex justify-content-start mt-2`,phraseClassName:`mb-0`,overflowPlacement:`top-start`})]})})]})})}function G(e,t,n,r){let i=()=>{F.unsubscribe(e,t)};return(0,I.useEffect)(()=>{if(r)return n?F.subscribeOnce(e,t):F.subscribe(e,t),()=>{i()}},[]),i}var K={learningIntention:`_learningIntention_lm8nf_1`,highlightPoi:`_highlightPoi_lm8nf_7`,icon:`_icon_lm8nf_10`},Be=/\[\]\(cv:\/\/poi\?id=\d+\)\n*/g;function Ve(e){return e.replace(Be,``)}function He(e){return ie(Ve(e.content),{async:!1})}function Ue(e,t){let[n,r]=(0,I.useState)(``);return(0,I.useEffect)(()=>{if(!t||!e.glance?.content)return;let n=He(e.glance);r(n)},[e.glance?.content,t]),n}function We(e){return e.glance?.content&&e.glance?.format===`text/markdown`}function Ge(e,t){let n=(0,I.useRef)(null);G(`player:poi:mouseover`,r,null,t),G(`player:poi:mouseleave`,i,null,t),(0,I.useEffect)(()=>{if(!(!n.current||!t))return n.current?.addEventListener(`mouseover`,a),n.current?.addEventListener(`mouseleave`,o),()=>{n.current?.removeEventListener(`mouseover`,a),n.current?.removeEventListener(`mouseleave`,o)}},[n.current]);function r(t){!t?.id||e?.id?.toString()!==t?.id?.toString()||n.current?.classList.add(K.highlightPoi)}function i(){n.current?.classList.remove(K.highlightPoi)}function a(){e&&F.trigger(`glance:poi:mouseover`,e)}function o(){F.trigger(`glance:poi:mouseleave`)}return n}var q={poiEntry:`_poiEntry_1bne8_1`,poiText:`_poiText_1bne8_5`,public:`_public_1bne8_5`,poiTimeStamp:`_poiTimeStamp_1bne8_14`,wideBadge:`_wideBadge_1bne8_18`};function Ke(e){let t=O.ToDisplayDuration(e.poi.startTime*1e3),n=Ge(e.poi,!e.suppressInteractivity);return e.suppressInteractivity?(0,L.jsxs)(`div`,{className:`d-flex ${q.poiEntry} mb-2`,children:[(0,L.jsx)(`span`,{className:`d-flex rounded-pill justify-content-center align-items-center text-info bg-light-blue ${q.poiTimeStamp} ${e.wideBadge?q.wideBadge:``}`,children:t}),(0,L.jsx)(`div`,{className:`${q.public} ms-2`,children:e.poi.description})]}):(0,L.jsxs)(re,{className:`d-flex ${q.poiEntry} mb-2 cursor-pointer`,onClick:()=>e.onClickPoiItem(e.poi.startTime),ref:n,children:[(0,L.jsx)(`div`,{className:`d-flex rounded-pill justify-content-center align-items-center text-info bg-light-blue ${q.poiTimeStamp} ${e.wideBadge?q.wideBadge:``}`,children:t}),(0,L.jsx)(`div`,{className:`ms-2 ${q.poiText}`,children:e.poi.description})]},e.poi.startTime)}var qe=`shared.pointsOfInterestList`;function Je(e){let t=e.pointsOfInterest.sort((e,t)=>e.startTime-t.startTime),n=t.some(e=>e.startTime>=3600);return(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`h6 my-2`,children:(0,L.jsx)(T,{namespace:qe,phrase:`heading`})}),(0,L.jsx)(`div`,{children:t.map(t=>(0,L.jsx)(Ke,{poi:t,suppressInteractivity:e.suppressInteractivity,onClickPoiItem:e.onClickPoiItem,wideBadge:n},t.startTime))})]})}var Ye=`shared.videoAtAGlanceV2`,Xe=365;function Ze(e){return e.hideScrollbar?(0,L.jsx)(L.Fragment,{children:e.children}):(0,L.jsx)(`div`,{className:`rounded border mb-4 bg-white`,children:(0,L.jsx)(R.Scrollbars,{autoHeight:!0,autoHeightMax:Xe,children:(0,L.jsx)(`div`,{className:`px-3 pt-3 pb-2`,children:e.children})})})}function Qe(e){let t=Ue(e.video,e.canViewGlance),[n,r]=I.useState(``);function i(){let t={id:e.video.glance.id,name:e.video.glance.name,videoId:e.video.id,videoName:e.video.name,learningIntention:n},r={actionType:h.Copy,entity:p.Glance,location:m.PlayPage};x.logUserAction(t,r)}function o(){return y.isInteractive(e.video)||!e.video.tags?.data?.length?null:e.video.tags?.data?.filter(e=>e.tagType===g.Pedagogy||e.tagType===g.Skill)}let s=o(),c=I.useRef(null);if(I.useEffect(()=>{c.current?.innerText&&r(c.current.innerText)},[c.current?.innerText]),!e.canViewGlance)return(0,L.jsx)(L.Fragment,{});function l(t){e.setStartTime(t)}return(0,L.jsx)(`section`,{className:`play-page-section`,children:(0,L.jsxs)(Ze,{hideScrollbar:e.hideScrollbar,children:[(0,L.jsx)(`h2`,{className:`h6 mb-2`,children:(0,L.jsx)(T,{namespace:Ye,phrase:`learningIntention`})}),(0,L.jsxs)(`div`,{className:`mb-3 ${K.learningIntention}`,children:[(0,L.jsx)(Ee,{copyableContent:n,tooltipClassName:K.icon,onClick:i,visible:!0}),(0,L.jsx)(`div`,{dangerouslySetInnerHTML:{__html:a.sanitize(t)},className:`d-inline`,ref:c})]}),!!s?.length&&(0,L.jsx)(`div`,{children:(0,L.jsx)(N,{tags:s,...P.getTagActionProps(e.getTagAppLink,e.onClickTag,e.suppressInteractivity),className:`mt-2`})}),!!e.pointsOfInterest?.length&&(0,L.jsx)(`div`,{className:`mt-3`,children:(0,L.jsx)(Je,{pointsOfInterest:e.pointsOfInterest,suppressInteractivity:e.suppressInteractivity,onClickPoiItem:l})})]})})}var $e=I.memo(function(e){let{data:t,thumbnailSize:n,preloadImage:r,getAppLink:i}=e,a=A(t.subjectPresentationAudiences?.data,e.audiences);return(0,L.jsxs)(`div`,{className:`flex-shrink-0 px-1 col-6 col-sm-4`,children:[(0,L.jsx)(ye,{type:`static`,textPosition:ge.Independent,video:t,appLink:i(t),imageOptions:{size:n},preload:r,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,audience:a,hideDuration:!1,commonVideoProps:e.commonVideoProps}),(0,L.jsx)(`div`,{className:`mt-2`,children:(0,L.jsx)(he,{...e,video:t,appLink:e.getAppLink(t)})})]})}),et=`shared.playPageClips`;function tt(e){if(!e.canViewClips||!e.clips?.length)return(0,L.jsx)(L.Fragment,{});let t=y.isVideo(e.video);function n(){return y.isVideo(e.video)?{action:b.Videos.VIDEO_CLIPS,application:c.VIDEOS,args:[e.presentationSlug,e.video.id,a.slugify(e.video.name)]}:{action:b.Clips.CLIP_CLIPS,application:c.CLIPS,args:[e.video.id,a.slugify(e.video.name)]}}let r=i.getPhrase(et,t?`clips`:`otherClips`,{count:e.clips.length});return(0,L.jsx)(`section`,{className:`play-page-section`,id:M.Clips,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(M.Clips,t)},children:(0,L.jsx)(v,{name:r,contents:_.ClipsV2,collection:e.clips,prefetched:!0,getChildAppLink:e=>({application:c.CLIPS,action:b.Clips.PLAY_CLIP,args:[e.id,a.slugify(e.name)]}),appLink:n(),childComponent:$e,extraChildComponentProps:{audiences:e.audiences,showOwner:!0,commonVideoProps:e.commonVideoProps},analyticsData:e.analyticsData})})}var nt=`shared.playPageInteractives`;function rt(e){if(!e.canViewInteractives||!e.interactives?.length)return(0,L.jsx)(L.Fragment,{});function t(){return y.isVideo(e.video)?{action:b.Videos.VIDEO_INTERACTIVES,application:c.VIDEOS,args:[e.presentationSlug,e.video.id,a.slugify(e.video.name)]}:{action:b.Clips.CLIP_INTERACTIVES,application:c.CLIPS,args:[e.video.id,a.slugify(e.video.name)]}}let n=i.getPhrase(nt,`interactives`,{count:e.interactives.length});return(0,L.jsx)(`section`,{className:`play-page-section`,id:M.Interactives,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(M.Interactives,t)},children:(0,L.jsx)(v,{name:n,contents:_.InteractivesV2,collection:e.interactives,prefetched:!0,getChildAppLink:e=>({application:c.INTERACTIVES,action:b.Interactives.VIEW_INTERACTIVE,args:[e.id,a.slugify(e.name)]}),appLink:t(),childComponent:Oe,extraChildComponentProps:{questionsAppLink:{application:c.INTERACTIVES,action:b.Interactives.PREVIEW_QUESTIONS},showOwner:!0,commonVideoProps:e.commonVideoProps},analyticsData:e.analyticsData})})}function J(e){return(0,L.jsx)(`svg`,{...e,children:(0,L.jsx)(`path`,{d:`M5.455 12c0 .401.325.727.727.727h9.88l-3.849 3.85a.728.728 0 0 0 1.029 1.028l5.09-5.091a.73.73 0 0 0 .213-.514v7.272a.727.727 0 0 0 1.455 0V4.727a.727.727 0 0 0-1.455 0V12a.73.73 0 0 0-.213-.515l-5.09-5.09a.727.727 0 1 0-1.029 1.028l3.85 3.85H6.181a.727.727 0 0 0-.727.727`,fill:`currentColor`})})}function it(e){return(0,L.jsx)(`svg`,{...e,children:(0,L.jsx)(`path`,{d:`M20 12a.727.727 0 0 0-.727-.728h-9.88l3.848-3.849a.727.727 0 1 0-1.028-1.029l-5.091 5.091a.73.73 0 0 0-.213.514V4.727a.727.727 0 0 0-1.454 0v14.545a.727.727 0 0 0 1.454 0V12c0 .186.071.373.213.515l5.091 5.09a.727.727 0 0 0 1.029-1.028l-3.85-3.85h9.88A.727.727 0 0 0 20 12`,fill:`currentColor`})})}var Y={showInSide:`_showInSide_1n1am_1`,container:`_container_1n1am_7`,aside:`_aside_1n1am_11`,collapse:`_collapse_1n1am_14`,iconContainer:`_iconContainer_1n1am_22`,arrowIcon:`_arrowIcon_1n1am_22`,listIcon:`_listIcon_1n1am_25`},at=`shared.playPage`;function ot(e){function t(){let t={actionType:e.isExpanded?h.Hide:h.Open,entity:p.TableOfContents,location:m.PlayPage};x.logUserAction(e.analyticsData,t)}function n(){let n=!e.isExpanded;e.setIsExpanded(n),n?(e.toggleTheatreMode?.(!1),e.toggleTheatreMode||e.setIsExpanded(!1)):(e.toggleTheatreMode?.(!0),e.toggleTheatreMode||e.setIsExpanded(!0)),t()}return(0,L.jsx)(`div`,{className:`d-flex justify-content-end`,children:(0,L.jsx)(`div`,{className:Y.container,children:(0,L.jsxs)(`div`,{className:`${Y.iconContainer}`,children:[(0,L.jsx)(w,{className:`btn btn-outline-dark ${Y.listIcon}`,svg:xe,onClick:n}),(0,L.jsx)(w,{className:`btn btn-outline-dark ${Y.arrowIcon}`,svg:e.isExpanded?J:it,onClick:n})]})})})}function st(e){function t(){let t={actionType:h.Hide,entity:p.TableOfContents,location:m.PlayPage};x.logUserAction(e.analyticsData,t)}function n(e){let t=ne.getCurrentRoute().appLink,n=t.params?{...t.params}:{};return n.tocId=e.id,{...t,params:n}}function r(){e.showInSide||e.setIsExpanded(!1)}return(0,L.jsxs)(`div`,{className:e.showInSide?`col ms-2 ps-4 ${Y.showInSide}`:`d-inline-flex gap-1`,children:[(0,L.jsx)(`aside`,{className:`${Y.aside} position-relative ${e.showInSide?`pe-1 pt-1 `:`px-3 pt-3 pb-2 border border-dark rounded-1 bg-white`}`,children:(0,L.jsxs)(`div`,{className:`${Y.container}`,children:[e.showInSide&&!e.hasTranscription&&(0,L.jsx)(w,{className:`btn position-absolute ${Y.collapse}`,svg:J,onClick:()=>{e.setIsExpanded(!1),e.toggleTheatreMode?.(!0),t()}}),(0,L.jsx)(`h2`,{className:`h5`,children:(0,L.jsx)(T,{namespace:at,phrase:`tocHeading`})}),(0,L.jsx)(je,{items:e.items,activeId:e.activeId,getAppLink:n,setControlledId:e.setControlledId,analyticsData:e.analyticsData,onItemClick:()=>r()})]})}),!e.showInSide&&(0,L.jsx)(ot,{...e})]})}function ct(e){return e.shouldShow?(0,L.jsxs)(L.Fragment,{children:[e.isExpanded&&e.showInSide&&(0,L.jsx)(st,{...e}),k.renderInPortalIfExists(!e.isExpanded&&(0,L.jsx)(ot,{...e}),document.getElementById(C)),k.renderInPortalIfExists(!e.showInSide&&e.isExpanded&&(0,L.jsx)(st,{...e}),document.getElementById(C))]}):(0,L.jsx)(L.Fragment,{})}var X={series:`_series_15j6m_1`,badgeListContainer:`_badgeListContainer_15j6m_5`,clipOriginInfo:`_clipOriginInfo_15j6m_10`},lt=`shared.playPage`;function ut(e){let t=A(e.media.subjectPresentationAudiences?.data,e.audiences),n=I.useRef(null),r=I.useRef(null),i=y.isVideo(e.media)&&!!y.getRating(e.media)?.value||y.isVideo(e.media)&&!!e.media.productionYear||!!e.media.subjectPresentationAudiences?.data?.length,a=we({location:Te.PlayPage,shareId:e.shareId,presentationSlug:e.presentationSlug}),o=!!e.originalVideoAppLink&&y.isClip(e.media)&&y.canViewOriginalVideo(e.media);return(0,L.jsx)(`section`,{className:`mb-3 position-relative`,ref:n,children:(0,L.jsxs)(`div`,{className:`d-inline-block w-100`,ref:r,children:[e.featureAccess.canNavigate&&(0,L.jsx)(`div`,{className:`ms-2 float-end`,children:(0,L.jsx)(fe,{actions:a.getVideoActions(e.media),actionsDropdownClassName:`btn btn-outline-dark`,fetchMore:()=>a.fetchMoreActions(e.media)})}),!!y.isVideo(e.media)&&(0,L.jsx)(de,{type:e.subTextType,video:e.media,appLink:e.subtextAppLink,className:`${X.series} text-truncate mw-100`,analyticsOptions:{location:m.PlayPage}}),(0,L.jsxs)(`h1`,{className:`h4 mb-2 mw-100`,children:[(0,L.jsx)(`span`,{className:`align-self-center`,children:e.media.name}),e.showTitlePadlock&&(0,L.jsx)(_e,{tooltipPlacement:`right`,className:`d-inline-block ps-1`,video:e.media,yearGroups:e.yearGroups})]}),y.isClip(e.media)&&o&&(0,L.jsxs)(`p`,{className:`clamp-1 ${X.clipOriginInfo}`,children:[(0,L.jsx)(T,{namespace:lt,phrase:`viewOriginal`}),`\xA0`,(0,L.jsx)(S,{className:`info-link`,appLink:e.originalVideoAppLink,children:e.media._parentVideo?.name}),`\xA0`,(0,L.jsx)(T,{namespace:lt,phrase:`timestamp`,options:{timeRange:`${O.ToDisplayTimeRange(e.media.startTime*1e3,e.media.endTime*1e3)}`}})]}),i&&(0,L.jsxs)(pe,{className:X.badgeListContainer,children:[(0,L.jsx)(ve,{audience:t,className:`bg-white text-dark`,border:`dark`}),y.isVideo(e.media)&&(0,L.jsx)(D,{type:E.Rating,data:y.getRating(e.media)}),y.isVideo(e.media)&&(0,L.jsx)(D,{type:E.ProductionYear,data:e.media.productionYear})]})]})})}var Z={mask:`_mask_vq9tb_1`,centeredIcon:`_centeredIcon_vq9tb_10`,bgImage:`_bgImage_vq9tb_21`,centeredOverlay:`_centeredOverlay_vq9tb_24`},dt=i.encloseNamespace(`shared.playerPlaceholder`);function ft(e){switch(e.type){case`pip`:return(0,L.jsx)(pt,{...e});case`public`:return(0,L.jsx)(mt,{...e});default:return(0,L.jsx)(L.Fragment,{})}}var pt=e=>(0,L.jsxs)(`div`,{className:`position-relative responsive-img ${Z.bgImage}`,style:{backgroundImage:`url('${y.getThumbnail(e.video)?.url??``}')`},children:[(0,L.jsx)(`p`,{className:`m-0 text-white h3 ${Z.centeredOverlay}`,children:dt(`playingPiP`)}),(0,L.jsx)(`div`,{className:Z.mask})]}),mt=e=>{let t=te.createUrl(y.getThumbnail(e.video)?.url??``,{size:ee.Large});return(0,L.jsx)(`div`,{className:`position-relative responsive-img ${Z.bgImage}`,style:{backgroundImage:`url('${t}')`},children:(0,L.jsxs)(S,{appLink:e.appLink,analyticsOptions:{actionType:h.Click,location:m.PlayPage,entity:p.AppLink,workflowPhase:d.Start,descriptor:u.SignUp},analyticsData:{},children:[(0,L.jsx)(n,{svg:me,className:Z.centeredIcon}),(0,L.jsx)(`div`,{className:Z.mask})]})})};function ht({resourcePopupId:e,resources:t,getResourceAppLink:n}){I.useEffect(()=>{if(!e)return;let i=t?.find(t=>t.id.toString()===e.toString());i&&r.trigger(n(i))},[e])}var Q={main:`_main_1ujkn_1`,expandedToc:`_expandedToc_1ujkn_1`,theatreMode:`_theatreMode_1ujkn_4`,theatreModeContent:`_theatreModeContent_1ujkn_7`,theatreModePlayPageContainer:`_theatreModePlayPageContainer_1ujkn_17`,theatreModeLeftContent:`_theatreModeLeftContent_1ujkn_21`};function gt(e){return e.shouldShowSideTableOfContents?e.hasTheatreMode&&e.theatreMode?Q.theatreMode:e.tableOfContentsExpanded?`${Q.expandedToc} col-9`:`pe-4`:``}function _t(e){return e.hasTheatreMode&&(e.theatreMode||!e.shouldShowSideTableOfContents)?`container ${Q.theatreModeContent}`:``}function vt(e,t){return e&&t.defaultDisplayMode===`theatre`&&t.mode==="default"}var yt=`play-page-toc-expanded`;function bt(e,t,n){let r=z(),i=j.get(yt)!==`false`,a=t?n||r:i,[o,s]=I.useState(e||``),[c,l]=I.useState(``),[u,d]=I.useState(a);I.useEffect(()=>{if(!r){d(!1);return}if(t){d(!0);return}d(a)},[r,n]);function f(){t&&r||(d(!u),j.set(yt,(!u).toString()))}return{controlledId:o,setControlledId:s,tableOfContentsExpanded:u,tableOfContentsActiveId:c,setTableOfContentsActiveId:l,onToggleTableOfContents:f}}var xt={map(e){let t=new Proxy(new Map,{get(n,r){if(r===`set`)return(r,i)=>(n.get(r)!==i&&(n.set(r,i),e()),t);let i=Reflect.get(n,r);return typeof i==`function`?i.bind(n):i}});return t}},St=[M.Video,M.CurriculumLinks,M.Resources,M.Interactives,M.Clips,M.VideoDetails,M.ClippedFrom,M.Transcript,M.ReferenceVideo,M.RelatedVideos],Ct=[M.Video,M.VideoDetails,M.CurriculumLinks,M.Resources,M.Interactives,M.Clips,M.ClippedFrom,M.Transcript,M.ReferenceVideo,M.RelatedVideos];function wt(e){let t=ae(),n=I.useRef(xt.map(t));return{headingRef:n,headingElements:(e?St:Ct).map(e=>n.current.get(e)).filter(Boolean)}}function Tt(e,t,n){let r=le();if(t!=="default")return!1;let i=n===`theatre`;return!(r.sm||r.md)&&e&&i}var $=i.encloseNamespace(`shared.play`),Et={getSectionHeading(e,t){switch(e){case M.Resources:return $(`resourcesHeading`,{count:t.resources?.length});case M.Clips:return t.isPlayClipPage?$(`otherClipsHeading`,{count:t.clips?.length-1}):$(`clipsHeading`,{count:t.clips?.length});case M.Interactives:return $(`interactivesHeading`,{count:t.interactives?.length});case M.Video:return $(`videoHeading`);case M.VideoDetails:return $(`videoDetailsHeading`);case M.RelatedVideos:return $(`upNextHeading`);case M.CurriculumLinks:return $(`curriculumLinksHeading`);case M.ClippedFrom:return $(`clippedFromHeading`);case M.ReferenceVideo:return $(`referenceVideoHeading`);case M.Transcript:return $(`transcriptHeading`);default:return``}}};export{ze as _,_t as a,Q as c,ut as d,ct as f,We as g,Qe as h,bt as i,ht as l,tt as m,Tt as n,vt as o,rt as p,wt as r,gt as s,Et as t,ft as u,z as v};
2
+ //# sourceMappingURL=BQS6kDvJ2.chunk.js.map