@clickview/library-editor 1.22.0 → 1.23.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/languages/en.json +1 -1
- package/dist/scripts/1010-495ed5b057.chunk.js +1 -0
- package/dist/scripts/{1601-973e50fc0a.chunk.js → 1601-2cee26f841.chunk.js} +1 -1
- package/dist/scripts/2774-c34b53c0c6.chunk.js +1 -0
- package/dist/scripts/6220-a995ba0196.chunk.js +1 -0
- package/dist/scripts/6999-c978daeb75.chunk.js +1 -0
- package/dist/scripts/9828-d6e448bb94.chunk.js +1 -0
- package/dist/scripts/bundle-76a8e16b54.min.js +2 -0
- package/package.json +2 -2
- package/dist/scripts/1010-7f03566c09.chunk.js +0 -1
- package/dist/scripts/2774-d43da71ccb.chunk.js +0 -1
- package/dist/scripts/6220-2ea178e5fb.chunk.js +0 -1
- package/dist/scripts/6999-e7e623c947.chunk.js +0 -1
- package/dist/scripts/9828-13b8515c8c.chunk.js +0 -1
- package/dist/scripts/bundle-da3bc0e1f2.min.js +0 -2
- /package/dist/scripts/{1086-753763725a.chunk.js → 1086-2c0fc81cca.chunk.js} +0 -0
- /package/dist/scripts/{1216-bf65bae6ca.chunk.js → 1216-a2598733fc.chunk.js} +0 -0
- /package/dist/scripts/{1269-6c2e9b6e3c.chunk.js → 1269-1d418c93ff.chunk.js} +0 -0
- /package/dist/scripts/{1364-e7f93e86b7.chunk.js → 1364-75f178ff7c.chunk.js} +0 -0
- /package/dist/scripts/{1409-09c643fb81.chunk.js → 1409-d7aacfb491.chunk.js} +0 -0
- /package/dist/scripts/{1492-cd44171a52.chunk.js → 1492-34353e5803.chunk.js} +0 -0
- /package/dist/scripts/{1601-973e50fc0a.chunk.js.LICENSE.txt → 1601-2cee26f841.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{1832-c5f981c3f1.chunk.js → 1832-b4f69b0fd2.chunk.js} +0 -0
- /package/dist/scripts/{1911-4e682465f2.chunk.js → 1911-e51ecfdbf1.chunk.js} +0 -0
- /package/dist/scripts/{2417-54c874fcea.chunk.js → 2417-786ba4266e.chunk.js} +0 -0
- /package/dist/scripts/{243-c1baf38614.chunk.js → 243-4a83be1c4d.chunk.js} +0 -0
- /package/dist/scripts/{259-c0e17226ce.chunk.js → 259-55c7fc7184.chunk.js} +0 -0
- /package/dist/scripts/{2692-39c5596fae.chunk.js → 2692-ca0cf823f2.chunk.js} +0 -0
- /package/dist/scripts/{2803-342b499819.chunk.js → 2803-2e8648e8ca.chunk.js} +0 -0
- /package/dist/scripts/{2888-e89aa6d2ec.chunk.js → 2888-1da6a4e04e.chunk.js} +0 -0
- /package/dist/scripts/{299-ff283cd302.chunk.js → 299-fdf9a9b203.chunk.js} +0 -0
- /package/dist/scripts/{3096-d0d0562322.chunk.js → 3096-fe94617b1b.chunk.js} +0 -0
- /package/dist/scripts/{3639-528131bdac.chunk.js → 3639-0c4394da2f.chunk.js} +0 -0
- /package/dist/scripts/{3763-484e998697.chunk.js → 3763-c275baf776.chunk.js} +0 -0
- /package/dist/scripts/{4201-32f6ecdb73.chunk.js → 4201-d103a971ea.chunk.js} +0 -0
- /package/dist/scripts/{4591-c45a73bb85.chunk.js → 4591-0a3d8964f9.chunk.js} +0 -0
- /package/dist/scripts/{514-6d760cc4ac.chunk.js → 514-1b68f47c63.chunk.js} +0 -0
- /package/dist/scripts/{5412-6a0a1510ab.chunk.js → 5412-f27d370c1d.chunk.js} +0 -0
- /package/dist/scripts/{5418-ad39e605a0.chunk.js → 5418-9e2c2e8a28.chunk.js} +0 -0
- /package/dist/scripts/{5424-8d9bd46dea.chunk.js → 5424-7facb2affa.chunk.js} +0 -0
- /package/dist/scripts/{6357-4eb8e929ee.chunk.js → 6357-68401d5c12.chunk.js} +0 -0
- /package/dist/scripts/{6505-d1d26acaa7.chunk.js → 6505-9b5e1103de.chunk.js} +0 -0
- /package/dist/scripts/{6732-051facb7f2.chunk.js → 6732-e031dd6d48.chunk.js} +0 -0
- /package/dist/scripts/{6756-420cdea12e.chunk.js → 6756-5f0d4d077e.chunk.js} +0 -0
- /package/dist/scripts/{6774-10008c90af.chunk.js → 6774-1f7e305c42.chunk.js} +0 -0
- /package/dist/scripts/{6995-79cb3a5899.chunk.js → 6995-420094a353.chunk.js} +0 -0
- /package/dist/scripts/{7002-504b356a5c.chunk.js → 7002-dce55c7cc0.chunk.js} +0 -0
- /package/dist/scripts/{7053-db29c86b42.chunk.js → 7053-6209358742.chunk.js} +0 -0
- /package/dist/scripts/{708-043ccede57.chunk.js → 708-7c37448edc.chunk.js} +0 -0
- /package/dist/scripts/{7190-84626d4165.chunk.js → 7190-b9aa94d8b0.chunk.js} +0 -0
- /package/dist/scripts/{7634-cd9e9f5d3a.chunk.js → 7634-cbb0ec2c46.chunk.js} +0 -0
- /package/dist/scripts/{8362-b6fbc2d32c.chunk.js → 8362-de0f79ef2d.chunk.js} +0 -0
- /package/dist/scripts/{8727-9a923c4820.chunk.js → 8727-092d1aa912.chunk.js} +0 -0
- /package/dist/scripts/{8762-652f4cafd5.chunk.js → 8762-4a1455ca7c.chunk.js} +0 -0
- /package/dist/scripts/{8906-fd50c53320.chunk.js → 8906-fde329353f.chunk.js} +0 -0
- /package/dist/scripts/{8947-40a2c48b97.chunk.js → 8947-e09a418678.chunk.js} +0 -0
- /package/dist/scripts/{9357-3bf3ca6c51.chunk.js → 9357-c824654e93.chunk.js} +0 -0
- /package/dist/scripts/{9927-47808e1cea.chunk.js → 9927-00d928c591.chunk.js} +0 -0
- /package/dist/scripts/{9976-9743099e1c.chunk.js → 9976-b1a68fb464.chunk.js} +0 -0
- /package/dist/scripts/{bundle-da3bc0e1f2.min.js.LICENSE.txt → bundle-76a8e16b54.min.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clickview/library-editor",
|
|
3
3
|
"description": "Library Editor",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.23.0-rc.0",
|
|
5
5
|
"main": "dist/scripts/bundle.js",
|
|
6
6
|
"types": "dist/projects/library-editor/src/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@babel/polyfill": "7.4.4",
|
|
43
|
-
"@clickview/styles": "1.
|
|
43
|
+
"@clickview/styles": "1.22.0-rc.0",
|
|
44
44
|
"@clickview/url-signer": "1.0.0",
|
|
45
45
|
"@microsoft/signalr": "^3.1.0",
|
|
46
46
|
"abortcontroller-polyfill": "1.7.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1010],{51010:function(e,t,n){"use strict";n.r(t),n.d(t,{DisableReviewView:function(){return w}});var r=n(21679),o=n(57857),i=n(31647),a=n(70065),u=n(52076),l=n(88172),c=n(10101),s=n(61843),f=n(19226),p=n(48090),y=n(67670),v=n(17654),b=n.n(v);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===h(o)?o:String(o)),r)}var o}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(k,e);var t,n,v,w,O=(v=k,w=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(v);if(w){var n=m(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function k(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),O.apply(this,arguments)}return t=k,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=r.u.getInstance(p.Or.Settings,this),this.contentUpdatesDataService=r.u.getInstance(p.Or.ContentUpdates,this)}},{key:"name",get:function(){return"DisableReviewView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"template",get:function(){return b()}},{key:"lang",get:function(){return"contentUpdates.disableReview"}},{key:"channelName",get:function(){return s.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:o.T.getPhrase(this.lang,"heading"),behaviorClass:c.Yw,spinnerButtonOptions:{model:this.spinnerModel=new y.v,channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"offBtn"),onClick:function(){return e.onClickDisable()}}}]}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS_TO_REVIEW,":sync"),this.render)}},{key:"videosToReview",value:function(){return!!this.videoCollection&&!!this.videoCollection.length}},{key:"onClickDisable",value:function(){this.videosToReview()?this.approveAllThenDisableReview():this.disableReview(),this.triggerMethod("hide")}},{key:"approveAllThenDisableReview",value:function(){var e=this;this.contentUpdatesDataService.approveAllVideos((function(){return e.disableReview()}))}},{key:"disableReview",value:function(){var e=s.xN.getLibraryReviewOptions(!1);this.settingsDataService.updateSetting(this.currentUser.get("customerId"),e,o.T.getPhrase(this.lang,"disableSuccess"),this.redirectToPastReleases),this.logAction()}},{key:"redirectToPastReleases",value:function(){i.Q.AppLinkHelper.trigger({application:p.OV.CONTENT_UPDATES,action:p.eX.ContentUpdates.PAST_RELEASES})}},{key:"logAction",value:function(){var e={location:a.LocationContext.Popup,actionType:a.UserAction.Disable,entity:a.EntityType.CustomerSetting,descriptor:a.CustomerSettingDescriptor.LibraryReview,workflowPhase:a.WorkflowPhase.Complete},t={approvedCount:this.videoCollection.length};u.k.logUserAction(t,e)}},{key:"requiredResources",get:function(){return{currentUser:f.K.currentUser}}},{key:"onBeforeRender",value:function(){this.videoCollection=this.contentUpdatesDataService.getVideosToReview(),this.videoCollection&&this.spinnerModel.set(l.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){return{videosToReview:this.videosToReview(),dataFetched:!!this.videoCollection,spinnerEl:s.Kp.getSpinner({size:s.Ey.Large,extraClasses:"mx-auto"})}}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),k}(i.Q.View)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(p,e);var t,n,r,l,f=(r=p,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=s(r);if(l){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function p(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),f.apply(this,arguments)}return t=p,(n=[{key:"defaults",value:function(){var e;return a(e={},o.ZV.Disabled,!0),a(e,o.ZV.Hidden,!1),e}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.Model)},17654:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing,l=e.escapeExpression;return'<p class="m-0 pb-2">'+l((n.lang||t&&t.lang||u).call(a,"noReview",{name:"lang",hash:{},data:o}))+"</p>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.videosToReview:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+'<p class="m-0">'+l((n.lang||t&&t.lang||u).call(a,"undoInstructions",{name:"lang",hash:{},data:o}))+"</p>\n"},4:function(e,t,n,r,o){return e.propertyIsEnumerable,'<p class="m-0 pb-2">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"automaticApproval",{name:"lang",hash:{},data:o}))+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2774],{79410:function(e,t,n){"use strict";n.d(t,{D:function(){return l}});var r=n(1024),a=n.n(r),i=n(58566),o=n(34279),c=n(4705),l=function(e,t,n){var r,l=(r=null==n?void 0:n.storage)?r===c.Z1.SessionStorage?c.qS:c.SG:null,s=null==l?void 0:l.get(e),u=(0,i.useDispatch)(),m=(0,i.useSelector)((function(t){return t.viewModelData[e]}));function d(){return null!=s}"undefined"!==s&&"null"!==s||(s=null);var p=(void 0!==t||d())&&void 0===m;function f(t,n){l&&function(t,n){if(l){var r=l.get(e);"string"!=typeof t||void 0===n?l.set(e,t):l.set(e,Object.assign(Object.assign({},r),{dataOrKey:n}))}}(t,n),u({type:o.B.UPDATE,payload:{viewModelKey:e,dataOrKey:t,keyData:n}})}return a().useEffect((function(){if(p)return d()?void f(s):void f(t)}),[]),p?d()?[s,f]:[t,f]:[null!=m?m:void 0,f]}},42227:function(){},41387:function(e,t,n){"use strict";n.d(t,{w:function(){return r}});var r={FILTER_PARAM_PREFIX:"filters.",MAX_CHECKBOXES_PER_COLUMN:10}},50197:function(e,t,n){"use strict";n.r(t),n.d(t,{ShareView:function(){return xr}});var r,a=n(1024),i=n.n(a),o=n(58566),c=n(57857),l=n(86120),s=n(15408),u=n(66703),m=n(71575),d={config:function(e,t){return{url:"/api/config",key:"config",bootstrapName:"config",success:e,error:t}},version:function(e,t){return{url:"/api/version",key:"version",bootstrapName:"version",normalize:!1,success:e,error:t}}},p=n(2491),f=n(36357);!function(e){e.GoogleClassroom="google-classroom",e.MicrosoftTeams="microsoft-teams"}(r||(r={}));var y,v,g=c.T.encloseNamespace("shared.shared-utils"),h={getShareIntegrations:function(e,t){return[{id:r.GoogleClassroom,name:g("googleClassroom"),enabled:null!=e&&e,settingName:f.E.ShareToGoogleClassroom},{id:r.MicrosoftTeams,name:g("msftTeams"),enabled:null!=t&&t,settingName:f.E.ShareToMicrosoftTeams}]}},b=n(98495),E=n(40221),S=n(68003),w=n(85887);function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function k(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==C(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===C(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.ManageSubjectPreferences="subjects.preferences.manage",e.FollowSubjects="subjects.follow",e.ViewClassrooms="classrooms.view",e.ManageAllClassrooms="classrooms.manage.all",e.ShareToUsers="share.direct.users",e.ShareToClassrooms="share.direct.classrooms",e.ShareToClassroomGroups="share.direct.classroomgroups",e.CreateClassrooms="classrooms.create",e.DeleteClassrooms="classrooms.delete",e.StudentExperience="studentexperience",e.ManageUsers="users.manage",e.ManageIntegrations="integrations.manage",e.EditProfileDetails="profile.edit",e.ManageCustomerSettings="customersettings.manage",e.ManageLocalCache="localcache.manage",e.ManageVideoAccess="video.access.manage",e.ViewCustomerAnalytics="analytics.customeranalytics.view",e.ManageShareLinkSettings="sharelink.settings.edit",e.ViewProductBoard="productboard.view",e.CanSubmitFeedback="feedback.submit",e.ViewTrialDuration="trial.duration.view",e.ViewInviteColleague="invitecolleague.view",e.UploadVideo="video.upload",e.FavouriteVideo="video.favourite",e.ViewVideoPointsOfInterest="video.pointsofinterest.view",e.ViewVideoGlance="video.glance.view",e.ViewVideoInteractives="video.interactives.view",e.ViewVideoClips="video.clips.view",e.ViewCurriculums="curriculums.view",e.ViewLibraries="libraries.view"}(y||(y={})),function(e){e.ManagePublicPresentation="presentation.public.manage",e.ManageDiscoverPreferences="discover.preferences.manage",e.ViewPlaylistsLanding="playlists.landing.view",e.ViewMyVideosLanding="myvideos.landing.view",e.ViewMyFavouritesLanding="myfavourites.landing.view",e.ViewWatchHistoryLanding="watchhistory.landing.view",e.WatchVideos="video.watch",e.UseVideoActions="video.actions",e.UseSeriesActions="series.actions",e.ViewNotifications="notifications.view",e.ViewTrendingTopics="classifications.trending.view"}(v||(v={}));var A=function(){var e=l.a.useBasicFetch(s.N.currentUser()),t=l.a.useBasicFetch(e.hasCompleted&&s.N.permissions()),n=function(e){var t,n=null==e?void 0:e.isAuthenticated;return k(t={},v.ManagePublicPresentation,!n),k(t,v.ManageDiscoverPreferences,n),k(t,v.ViewPlaylistsLanding,!n),k(t,v.ViewMyVideosLanding,!n),k(t,v.ViewMyFavouritesLanding,!n),k(t,v.ViewWatchHistoryLanding,!n),k(t,v.WatchVideos,n),k(t,v.UseVideoActions,n),k(t,v.UseSeriesActions,n),k(t,v.ViewNotifications,n),k(t,v.ViewTrendingTopics,n),t}(e.data);return{permissions:t.data,hasPermissions:function(e){return!(!t.hasCompleted||t.hasError||e&&(null==e?void 0:e.length)&&(Array.isArray(e)?e.find((function(e){return!t.data[e]})):!t.data[e]))},hasLocalPermissions:function(e){return!(e&&(null==e?void 0:e.length)&&(Array.isArray(e)?e.find((function(e){return!n[e]})):!n[e]))},isLoaded:t.hasCompleted}},O=n(8952),I=n(53808),x=n(5256),N=n(90547),j=n(39396),L=n(63791),T={inputWithoutHighlight:"cKcry",suggestionsContainerOpen:"avM9L",sectionContainer:"u35Wz",suggestionHighlighted:"gFitp",inputContainer:"utnMG",clearButton:"TAoT9",inputWithLeftIcon:"Rt24D",inputWithRightIcon:"pxKzq",inputWithTwoRightIcons:"Oerjh",iconContainer:"h8OBl",leftIconContainer:"L5mrV",rightIconContainer:"V23aG"},P=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function U(e,t,n,r,a){var i="form-control";return n||(i+=" ".concat(T.inputWithoutHighlight)),"left"===e&&(i+=" ".concat(T.inputWithLeftIcon)),("right"===e&&!t||"left"===e&&t)&&(i+=" ".concat(T.inputWithRightIcon)),"right"===e&&t&&(i+=" ".concat(T.inputWithTwoRightIcons)),"lg"===a&&(i+=" form-control-lg"),"sm"===a&&(i+=" form-control-sm"),r&&(i+=" ".concat(r)),i}function F(e){var t="d-inline-block svg-container";return I.q.isFunction(e)?t+" cursor-pointer":t}function V(e){var t=e.onClickSearchIcon,n=e.searchIconPlacement,r=e.showClearInputIcon,i=e.onClickClearInput,o=e.highlightOnFocus,c=e.className,l=e.formSize,s=P(e,["onClickSearchIcon","searchIconPlacement","showClearInputIcon","onClickClearInput","highlightOnFocus","className","formSize"]),u=function(){return a.createElement("div",{className:"d-inline-block"},a.createElement(j.x,{svgName:L.vn.Search,size:j.S.Standard,onClick:t,className:F(t)}))};return a.createElement("div",{className:"position-relative ".concat(T.inputContainer)},"left"===n&&a.createElement("div",{className:"".concat(T.iconContainer," ").concat(T.leftIconContainer)},a.createElement(u,null)),a.createElement("input",Object.assign({className:U(n,r,o,c,l)},s)),("right"===n||!!r)&&a.createElement("div",{className:"".concat(T.iconContainer," ").concat(T.rightIconContainer)},!!r&&a.createElement((function(){return a.createElement("div",{className:"d-inline-block text-muted ".concat(T.clearButton)},a.createElement(j.x,{svgName:L.vn.Close,size:j.S.Standard,onClick:i,className:F(i)}))}),null),"right"===n&&a.createElement(u,null)))}var R=n(99910),B=n(2248);function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}var M,z={isNumber:function(e){return z.isType(e,"number")},isString:function(e){return z.isType(e,"string")},isType:function(e,t){return D(e)===t}};function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function H(e){return function(e){if(Array.isArray(e))return q(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==G(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===G(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X(e,t){var n;return W(n={},M.Recent,t),W(n,M.Local,e),W(n,M.Remote,[]),W(n,M.Generic,[]),n}function K(e,t){return w.t.isObject(e)&&e.hasOwnProperty(t)&&z.isString(e[t])}function Z(e,t){e(Object.assign(Object.assign({},X([],[])),W({},M.Generic,[{type:t,generic:!0}])))}function Q(e,t,n){return function(r){var a,i,o=r.value,c=r.reason;if((null===(i=null===(a=e.allowableSuggestionFetchRequestedReasons)||void 0===a?void 0:a.includes(c))||void 0===i||i)&&(o.length||n(),!(o.length<e.activationLength))){if(e.local){var s=I.q.isFunction(e.getLocalSuggestions)?e.getLocalSuggestions(o,e.local):(u=o,m=e.local,d=e.valueKey,(p=u.trim().toLowerCase()).length?m.filter((function(e){return!(!K(e,d)||!z.isString(e[d]))&&e[d].trim().toLowerCase().includes(p)})):[]);if(!s.length&&e.getEmptyStateComponent)return void Z(t,"empty");t((function(e){var t;return Object.assign(Object.assign({},e),(W(t={},M.Local,s),W(t,M.Generic,[]),t))}))}var u,m,d,p;e.getRemoteUrl&&(Z(t,"loading"),function(n,r,a,i,o){var c=I.q.isFunction(n)&&n(r);c&&l.a.ajaxRequest({resource:c,type:B.k.GET,success:function(n){var r=I.q.isFunction(e.formatRemoteSuggestions)?e.formatRemoteSuggestions(n):n;r.length||!e.getEmptyStateComponent?t((function(e){var t;return Object.assign(Object.assign({},e),(W(t={},M.Remote,r),W(t,M.Generic,[]),t))})):Z(t,"empty")},error:function(){Z(t,"errored")},headers:o})}(e.getRemoteUrl,o,0,0,e.requestHeaders))}}}function Y(e,t,n,r,a){var i=function(t){var n=e[t];return n?n.map((function(e){return Object.assign(Object.assign({},e),{suggestionType:t})})):[]},o=i(M.Recent),c=i(M.Local),l=i(M.Remote),s=i(M.Generic);if(s.length)return[{data:s,suggestionType:M.Generic}];if(I.q.isFunction(r))return r([].concat(H(c),H(l),H(o)));var u=[];return((null==c?void 0:c.length)||(null==l?void 0:l.length))&&u.push({title:t,data:J([].concat(H(c),H(l)),a),suggestionType:M.Local}),(null==o?void 0:o.length)&&u.push({title:n,data:J(o,a),suggestionType:M.Recent}),u}function J(e,t){return"boolean"==typeof t||e.length<=t?e:e.slice(0,t)}function _(e){return e.data}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||ee(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ee(e,t){if(e){if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?te(e,t):void 0}}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e.Local="local",e.Recent="recent",e.Remote="remote",e.Generic="generic"}(M||(M={}));var ne=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},re="shared.searchBar",ae=I.q.isFunction;function ie(e){return e.renderAsForm?a.createElement("form",{onSubmit:e.onSubmit},e.children):a.createElement(a.Fragment,null,e.children)}function oe(e){var t,n=X(e.initialLocalSuggestions,e.recentSearches),r=$(a.useState(e.initialQuery||""),2),i=r[0],o=r[1],l=$(a.useState(n),2),s=l[0],u=l[1],m=$(a.useState(e.initialQuery||""),2),d=m[0],p=m[1],f=$(a.useState("none"),2),y=f[0],v=f[1],g=(0,x.a)(N.r.XS);a.useEffect((function(){if(!i.length){var t=X(e.initialLocalSuggestions,e.recentSearches);u(t)}}),[e.initialLocalSuggestions,e.recentSearches]),a.useEffect((function(){var t=e.initialQuery||"";i!==t&&(o(t),p(t))}),[e.initialQuery]);var h=function(){var t=X(e.initialLocalSuggestions,e.recentSearches);u(t)},E=function(){o(""),p("")};!function(e,t){a.useEffect((function(){e&&!e.current&&(e.current={resetQuery:t})}),[null==e?void 0:e.current])}(e.controlsRef,E);var S,w,C,k,A,j=function(){v("none")},L=function(t){t.preventDefault(),ae(e.onSubmit)&&e.onSubmit(i),e.clearQueryOnSelect&&E()},P=a.useMemo((function(){return e.debounceTime?I.q.debounce(Q(e,u,h),e.debounceTime):Q(e,u,h)}),[e.debounceTime].concat(function(e){if(Array.isArray(e))return te(e)}(S=e.onSuggestionDependencies)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(S)||ee(S)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));return a.createElement(ie,{onSubmit:L,renderAsForm:!!e.renderAsForm},a.createElement(O,Object.assign({ref:function(e){null!==e&&(t=e.input)},suggestions:Y(s,e.suggestionsHeading,e.recentSearchHeading||c.T.getPhrase(re,"recentSearchesHeading"),e.getSections,e.suggestionLimit),onSuggestionsFetchRequested:P,onSuggestionHighlighted:function(e){var t=e.suggestion;("none"!==y||t)&&v(t?"suggestion":"custom")},onSuggestionsClearRequested:function(){e.alwaysRenderSuggestions||h()},onSuggestionSelected:function(n,r){var a=r.suggestion;a.generic||(e.clearQueryOnSelect&&E(),e.onSuggestionSelected(a,t))},getSuggestionValue:function(t){return function(t){return ae(e.shouldUpdateQueryOnSelection)?e.shouldUpdateQueryOnSelection(t):e.shouldUpdateQueryOnSelection}(t)?function(e,t){return K(t,e)?t[e]:""}(e.valueKey,t):i},renderSuggestion:function(t){if(t.generic){if("empty"===t.type)return i.length>=e.activationLength&&ae(e.getEmptyStateComponent)?e.getEmptyStateComponent(i):a.createElement(a.Fragment,null);if("errored"===t.type&&ae(e.getErrorStateComponent)){var n=Q(e,u,h);return e.getErrorStateComponent((function(){return n({value:i,reason:"input-changed"})}))}if("loading"===t.type)return r=e.loadingComponentClassName,a.createElement("div",{className:"d-flex justify-content-center cursor-default ".concat(null!=r?r:""),onClick:function(e){e.stopPropagation()}},a.createElement(R.Spinner,{as:"span",animation:"border",role:"status"}))}var r;return ae(e.getSuggestionComponent)?e.getSuggestionComponent(t):function(e,t){return K(t,e)?a.createElement(a.Fragment,null,t[e]):a.createElement(a.Fragment,null)}(e.valueKey,t)},renderSuggestionsContainer:function(t){var n=t.containerProps,r=n.ref,o=ne(n,["ref"]);if(!e.customScrollbarProps){var c={suggestions:s,query:i,isDropdownOpen:!!t.children};return a.createElement("div",Object.assign({ref:r},o,{onMouseOut:j}),t.children,e.getCreateComponent&&e.getCreateComponent(Object.assign({userInput:d,isActive:"custom"===y,resetQuery:E,resetSuggestions:h},c)),e.getFooterComponent&&e.getFooterComponent(c))}return a.createElement(b.ZP,Object.assign({ref:r},e.customScrollbarProps,o),t.children)},alwaysRenderSuggestions:e.alwaysRenderSuggestions,focusInputOnSuggestionClick:!g&&e.focusInputOnSuggestionClick,inputProps:{placeholder:e.placeholder||c.T.getPhrase(re,"placeholder"),value:i,onChange:function(t,n){var r=n.newValue,a=n.method;"type"===a&&p(r),"escape"===a&&v("none"),["up","down"].includes(a)||(o(r),ae(e.onQueryChange)&&e.onQueryChange(r))},onKeyDown:function(t){8===t.keyCode&&e.onBackspace&&!i&&e.onBackspace()},autoFocus:!!e.autoFocusInput,highlightOnFocus:e.highlightInputOnFocus,onClickSearchIcon:!!e.submitOnClickSearchIcon&&L,searchIconPlacement:e.searchIconPlacement,showClearInputIcon:!!e.showClearInputIcon&&!!i.length,onClickClearInput:function(){E(),ae(e.onClickClearInput)&&e.onClickClearInput()},formSize:e.size,onBlur:function(){e.onBlur&&e.onBlur(i)},disabled:e.disabled},renderInputComponent:V,theme:(w=e.theme,C=!!s.generic.length,k="function"==typeof w?w(C):w,A=function(e){return{container:"position-relative",suggestionsContainerOpen:"bg-white py-1 border rounded ".concat(T.suggestionsContainerOpen),suggestionsList:"list-unstyled m-0",suggestion:"".concat(e?"":"cursor-pointer"," py-1 px-2"),suggestionHighlighted:e?"":T.suggestionHighlighted,sectionContainer:"border-bottom py-1 ".concat(T.sectionContainer)}}(C),Object.assign(A,k)),multiSection:!0,renderSectionTitle:function(t){return ae(e.renderSectionTitle)?e.renderSectionTitle(t,e.sectionTitleClassName):function(e,t){if(e.title)return a.createElement("div",{className:"pb-1 ".concat(null!=t?t:"")},a.createElement("strong",null,e.title))}(t,e.sectionTitleClassName)},getSectionSuggestions:_},e.renderSuggestionsOnInputFocus?{shouldRenderSuggestions:function(){return ae(e.renderSuggestionsOnInputFocus)?e.renderSuggestionsOnInputFocus(i):e.renderSuggestionsOnInputFocus}}:{})))}oe.defaultProps={valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialLocalSuggestions:[],searchIconPlacement:"right",renderAsForm:!0,onSuggestionDependencies:[],shouldUpdateQueryOnSelection:!0,focusInputOnSuggestionClick:!0};var ce=n(74421),le=n(63946),se={isType:function(e,t){return(null==e?void 0:e.typeId)===t}},ue=n(83891),me=n(38182),de=n(1268),pe=n(46237),fe={removeRecipient:"mCbMC",recipientItem:"kdcb0",showSpinner:"xH6Mu",avatarContainer:"Zcpg3",recipientDetails:"v5EmV",recipientDetailsWithRemoveButton:"_V928"},ye=c.T.encloseNamespace("shared.userRecipientItemMetadata");function ve(e){var t;return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(fe.avatarContainer," d-inline-block")},i().createElement(me.q,{imageUrl:null===(t=e.user.avatar)||void 0===t?void 0:t.url,imageCdnUrl:e.imageCdnUrl,initials:ue.l.getInitials(e.user.name,e.user.surname)})),i().createElement("div",{className:e.detailsClassName},i().createElement("h4",{className:"font-size-normal font-weight-normal m-0"},e.hasStudentExperience?ue.l.getDisplayName(e.user):ue.l.getFullName(e.user)),i().createElement("p",{className:"text-muted m-0"},function(e){var t=ue.l.getUserType(e),n=ue.l.getUserRole(e);if(t===de.Y.Staff)return n===pe.i.Admin?ye("admin"):ye("staff");var r=ue.l.getYearGroup(e);return(null==r?void 0:r.name)?r.name:ye("student")}(e.user))))}var ge=n(84611),he="shared.classroomRecipientItemMetadata";function be(e){return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(fe.avatarContainer," d-inline-block")},i().createElement(ge.f,{svgName:L.vn.Classrooms,variant:"teal"})),i().createElement("div",{className:e.detailsClassName},i().createElement("h4",{className:"font-size-normal font-weight-normal m-0"},e.classroom.name),i().createElement("p",{className:"text-muted m-0"},(n=null===(t=e.classroom.users)||void 0===t?void 0:t.count,Number.isInteger(n)?c.T.getPhrase(he,"subheading",{smartCount:n}):""))));var t,n}var Ee=n(16287);function Se(e){switch(e){case Ee.ClassroomGroupColour.Pink:return"pink";case Ee.ClassroomGroupColour.Orange:return"orange";case Ee.ClassroomGroupColour.Green:return"green";case Ee.ClassroomGroupColour.Blue:return"blue";case Ee.ClassroomGroupColour.Purple:return"purple";case Ee.ClassroomGroupColour.Indigo:return"indigo";default:return"pink"}}var we="shared.classroomGroupRecipientItemMetadata";function Ce(e){var t;return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(fe.avatarContainer," d-inline-block")},i().createElement(ge.f,{svgName:L.vn.Group,variant:Se(null===(t=e.classroomGroup.metadata)||void 0===t?void 0:t.colour)})),i().createElement("div",{className:e.detailsClassName},i().createElement("h4",{className:"font-size-normal font-weight-normal m-0"},e.classroomGroup.name),i().createElement("p",{className:"text-muted m-0"},function(e){var t,n,r,a=null!==(n=null===(t=e.users)||void 0===t?void 0:t.count)&&void 0!==n?n:0,i=null===(r=e.classroom)||void 0===r?void 0:r.name;return i?c.T.getPhrase(we,"subheading",{classroomName:i,smartCount:a}):""}(e.classroomGroup))))}function ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ae=c.T.encloseNamespace("share.recipientItem");function Oe(e){switch(e){case ce.E.User:return Ae("removeUser");case ce.E.Classroom:return Ae("removeClassroom");case ce.E.ClassroomGroup:return Ae("removeGroup")}return null}function Ie(e){var t,n,r=(t=i().useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return ke(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ke(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=r[0],o=r[1],c="".concat(fe.recipientItem," d-flex");a&&(c+=" ".concat(fe.showSpinner));var l="".concat(e.removeRecipient?fe.recipientDetailsWithRemoveButton:fe.recipientDetails," d-inline-block ml-2");return i().createElement("div",{className:c},se.isType(e.entity,ce.E.User)?i().createElement(ve,{user:e.entity,imageCdnUrl:e.imageCdnUrl,detailsClassName:l,hasStudentExperience:e.hasStudentExperience}):se.isType(e.entity,ce.E.Classroom)?i().createElement(be,{classroom:e.entity,detailsClassName:l}):se.isType(e.entity,ce.E.ClassroomGroup)?i().createElement(Ce,{classroomGroup:e.entity,detailsClassName:l}):void 0,I.q.isFunction(e.removeRecipient)&&i().createElement("div",{className:"".concat(fe.removeRecipient," d-inline-flex justify-content-center align-items-center")},a?i().createElement(R.Spinner,{as:"div",size:"sm",animation:"border",role:"status"}):i().createElement(le.u,{title:Oe(e.entity.typeId),spanHack:!0},i().createElement("div",{className:"close cursor-pointer",role:"button",onClick:function(){o(!0),e.removeRecipient(e.entity.id,(function(){return o(!1)}))}},"×"))))}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ne=function(e,t){var n,r,a=(n=i().useState(e),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(n,r)||function(e,t){if(e){if("string"==typeof e)return xe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xe(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=a[0],c=a[1];return i().useEffect((function(){var n=setTimeout((function(){return c(e)}),t);return function(){return clearTimeout(n)}}),[e,t]),o},je={emptyState:"bKTf0"},Le="shared.typeaheadEmptyState";function Te(e){var t=e.query,n=void 0===t?"":t,r=e.imageUrl,a=Ne(n,300);return i().createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},i().createElement("img",{alt:"",role:"presentation",src:r,className:"pb-2 ".concat(je.emptyState)}),i().createElement("h2",{className:"h6"},i().createElement(u.x,{namespace:Le,phrase:"noResults",options:{query:a,smartCount:a.length}})))}var Pe=n(58424),Ue={emptyState:"k5mEG"},Fe="shared.typeaheadErrorState";function Ve(e){return i().createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},i().createElement("img",{alt:"",role:"presentation",src:e.imageUrl,className:"pb-2 ".concat(Ue.emptyState)}),i().createElement("h2",{className:"h6"},i().createElement(u.x,{namespace:Fe,phrase:"error"})),i().createElement(Pe.L,{onClick:function(t){t.stopPropagation(),e.onClickTryAgain()},className:"btn btn-link info-link p-0"},i().createElement(u.x,{namespace:Fe,phrase:"tryAgain"})))}var Re={avatar:"srrS3"};function Be(e){var t=e.imageUrl,n=e.initials,r={};return t&&(r.backgroundImage="url('".concat(t,"')")),i().createElement("div",{className:Re.avatar,style:r},t?i().createElement(i().Fragment,null," "):n)}var De={svgContainer:"laVU4",selection:"vEOCt",expander:"d1NHd",iconContainer:"rFH4W",icon:"BarYz",bubble:"HF0E8",spinnerContainer:"iKeXW",remove:"pyzCM",removeBubble:"mgt6Y"},Me=c.T.encloseNamespace("shared.inputSelection");function ze(e){var t,n="".concat(De.svgContainer," ").concat(De.icon);return e.typeId===ce.E.Classroom?n+=" text-teal":n+=" text-".concat(Se(null===(t=e.metadata)||void 0===t?void 0:t.colour)),n}function Ge(e){var t,n=function(e){var t;switch(e.typeId){case ce.E.Classroom:return"text-hover-teal";case ce.E.ClassroomGroup:return"text-hover-".concat(Se(null===(t=e.metadata)||void 0===t?void 0:t.colour))}}(e.selection),r=e.selection.typeId===ce.E.Classroom;if(!e.canExpand){if(!e.selection.typeId||e.selection.typeId===ce.E.User){var a=e.selection;return i().createElement("div",{className:De.svgContainer},i().createElement(Be,{imageUrl:null===(t=a.avatar)||void 0===t?void 0:t.url,initials:ue.l.getInitials(e.selection.name,e.selection.surname)}))}return i().createElement(le.u,{title:Me(r?"emptyClassroom":"emptyGroup")},i().createElement("div",{className:"align-items-center border border-white bg-white ".concat(De.iconContainer)},i().createElement(j.x,{className:ze(e.selection),svgName:r?L.vn.Classrooms:L.vn.Group})))}return e.hasExpanded?i().createElement("div",{className:"d-flex align-items-center text-white ".concat(De.spinnerContainer," ").concat(De.svgContainer)},i().createElement(R.Spinner,{as:"div",size:"sm",animation:"border",role:"status"})):i().createElement(i().Fragment,null,i().createElement(Pe.L,{className:"align-items-center cursor-pointer text-white border border-white rounded-circle ".concat(De.expander," ").concat(n),onClick:e.onClickExpand},i().createElement(j.x,{svgName:L.vn.Plus,className:"d-flex align-items-center ".concat(De.svgContainer)})),i().createElement("div",{className:"align-items-center border border-white bg-white ".concat(De.iconContainer)},i().createElement(j.x,{className:ze(e.selection),svgName:r?L.vn.Classrooms:L.vn.Group})))}function He(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qe(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function We(e){var t;if(!e.typeId)return"dark-blue";switch(e.typeId){case ce.E.User:return"number"==typeof e.userType?2===e.userType?"dark-blue":"indigo":e.userType===de.Y.Learner?"dark-blue":"indigo";case ce.E.Classroom:return"teal";case ce.E.ClassroomGroup:return Se(null===(t=e.metadata)||void 0===t?void 0:t.colour)}}function Xe(e){var t,n,r,a=se.isType(e.selection,ce.E.Classroom),o=se.isType(e.selection,ce.E.ClassroomGroup),c=e.onClickExpand&&(a||o),l=!!(null===(t=e.selection.users)||void 0===t?void 0:t.count),s=!!(null===(r=null===(n=e.selection.users)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length),u=He(i().useState(!1),2),m=u[0],d=u[1],p=He(i().useState(c&&l),2),f=p[0],y=p[1];if(i().useEffect((function(){y(c&&l)}),[c,l]),s){var v=e.selection,g=We(e.selection);return i().createElement("div",{className:"d-flex align-items-center flex-wrap mr-1 mt-1 pb-1 pl-1 pr-4 position-relative border-".concat(g," text-").concat(g," ").concat(De.bubble)},v.users.data.map((function(t){return i().createElement(Ke,{key:"".concat(t.id,":").concat(e.selection.id),selection:t,colourVariant:g,hasStudentExperience:e.hasStudentExperience})})),i().createElement(Pe.L,{className:"cursor-pointer position-absolute text-".concat(g," ").concat(De.removeBubble),onClick:function(){return e.onClickRemove(e.selection.id)}},i().createElement(j.x,{svgName:L.vn.Close,className:"d-flex align-items-center ".concat(De.svgContainer)})))}return i().createElement(Ke,{selection:e.selection,canExpand:f,hasExpanded:m,onClickExpand:function(){d(!0),e.onClickExpand(e.selection.id)},onClickRemove:e.onClickRemove,colourVariant:We(e.selection),hasStudentExperience:e.hasStudentExperience})}function Ke(e){var t=e.colourVariant||We(e.selection),n=e.selection.name;return e.selection.typeId===ce.E.User&&(n=e.hasStudentExperience?ue.l.getDisplayName(e.selection):ue.l.getFullName(e.selection)),i().createElement("div",{className:"".concat(De.selection," bg-").concat(t," badge-pill text-").concat(t," d-flex align-items-center mr-1 mt-1 overflow-hidden")},i().createElement(Ge,{canExpand:e.canExpand,hasExpanded:e.hasExpanded,onClickExpand:e.onClickExpand,selection:e.selection}),i().createElement("span",{className:"mx-1 text-white"},n),I.q.isFunction(e.onClickRemove)&&i().createElement(Pe.L,{className:"d-flex align-items-center cursor-pointer align-self-stretch text-white ".concat(De.remove),onClick:function(){return e.onClickRemove(e.selection.id)}},i().createElement(j.x,{svgName:L.vn.Close,className:"d-flex align-items-center ".concat(De.svgContainer)})))}var Ze={container:"Dc3kX",suggestionsContainerOpen:"c5t3e",selectionContainer:"kFjoN"},Qe="shared.tokenizedTypeahead",Ye=10;function Je(e){var t;return i().createElement("div",{className:"form-control h-auto d-flex align-items-top py-1 px-0 position-relative"},i().createElement(j.x,{className:"svg-container m-1",svgName:L.vn.Search}),i().createElement("div",{className:"".concat(Ze.selectionContainer," d-flex flex-wrap align-items-center mt-n1")},e.selections.map((function(t){return i().createElement(Xe,{key:t.id,selection:t,onClickRemove:function(t){return e.removeSelection(t)},onClickExpand:e.fetchSelectionMembers,hasStudentExperience:e.hasStudentExperience})})),i().createElement(oe,{getRemoteUrl:e.getRemoteUrl,requestHeaders:e.requestHeaders,formatRemoteSuggestions:e.formatRemoteSuggestions,onSuggestionSelected:function(t){e.updateSelections(t)},onBackspace:function(){return e.selections.length&&e.removeSelection(E.m.last(e.selections).id)},local:e.localSuggestions,recentSearchHeading:e.recentSearchHeading||c.T.getPhrase(Qe,"recentSearchHeading"),recentSearches:e.recentSearches,placeholder:(null===(t=e.selections)||void 0===t?void 0:t.length)?" ":e.placeholder,searchIconPlacement:!1,activationLength:e.activationLength,clearQueryOnSelect:!0,getSuggestionComponent:function(t){return i().createElement(Ie,{entity:t,imageCdnUrl:e.imageCdnUrl,hasStudentExperience:e.hasStudentExperience})},getEmptyStateComponent:function(t){return i().createElement(Te,{query:t,imageUrl:e.emptyStateImageUrl})},getErrorStateComponent:function(t){return i().createElement(Ve,{imageUrl:e.errorStateImageUrl,onClickTryAgain:t})},theme:{container:Ze.container,suggestionsContainerOpen:"bg-white py-1 rounded border mt-1 ".concat(Ze.suggestionsContainerOpen)},sectionTitleClassName:"pl-2",renderSuggestionsOnInputFocus:!0,debounceTime:e.debounceTime})),!!e.sharePermissionsDescription&&i().createElement("span",{className:"px-2 text-secondary text-nowrap"},e.sharePermissionsDescription))}var _e=n(59087),$e={normal:"Q1UGv",copyBtn:"J3fBx"};function et(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var tt=c.T.encloseNamespace("shared.copyInput");function nt(e){var t,n,r=(t=a.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return et(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?et(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],o=r[1],c=a.createElement("div",{className:"input-group"},a.createElement("input",{type:"text",autoComplete:"off",className:"form-control ".concat("normal"===e.styling?$e.normal:""),spellCheck:!1,value:e.value,readOnly:!0}),a.createElement("div",{className:"input-group-append"},a.createElement(_e,{text:e.value},a.createElement("button",{className:"btn btn-outline-dark border border-secondary py-0 text-nowrap ".concat($e.copyBtn),onClick:function(t){t.preventDefault(),e.onCopy&&e.onCopy(),i||(o(!0),setTimeout((function(){return o(!1)}),2e3))}},tt(i?"copied":"copy")))));return e.label?a.createElement(R.Form.Group,null,a.createElement(R.Form.Label,null,e.label),c):c}nt.defaultProps={styling:"normal"};var rt,at=n(33192),it=n.n(at);function ot(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ct(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e.Expired="Expired",e.Active="Active"}(rt||(rt={}));var lt=c.T.encloseNamespace("share.shareLinkInfo"),st=function(e){var t=e.linkExpireDate,n=e.isPasswordProtected,r=e.status;if(!t&&!n)return function(e){var t=e.entityTypeId,n=e.privacy,r=e.hasPrivatePlaylistVideos;if(t===ce.E.Playlist)return r?{icon:L.vn.Warning,text:lt("hasPrivateVideos")}:{icon:L.vn.VisibleOn,text:lt("public")};if(t===ce.E.Topic||t===ce.E.Series)return{icon:L.vn.VisibleOn,text:lt("justMySchool")};if(!Array.isArray(n))switch(n.privacy){case"public":return{icon:L.vn.VisibleOn,text:lt("public")};case"protected":return{icon:L.vn.VisibleOn,text:lt("clickViewOnly")};case"just_my_customer":return{icon:L.vn.Lock,text:lt("justMySchool")};case"restricted":case"private":return{icon:L.vn.Lock,text:lt("private")};default:return{}}}(e);if(!t)return{icon:L.vn.Lock,text:lt("password")};var a=it().utc(t).local(),i=it()(),o=a.isSame(i,"day"),c=a.diff(i,"days");if(!n){var l=o?lt("expiryToday"):lt("expiry",{days:c});return r===rt.Expired&&(l=lt("expired")),{icon:L.vn.Timer,text:l}}var s=o?lt("passwordExpiryToday"):lt("passwordExpiry",{days:c});return r===rt.Expired&&(s=lt("passwordExpired")),{icon:L.vn.Lock,text:s}};function ut(e){var t=ot(i().useState(!1),2),n=t[0],r=t[1],a=ot(i().useState(!1),2),o=a[0],c=a[1],l=st(Object.assign(Object.assign({},e),{hasPrivatePlaylistVideos:o})),s=l.icon,u=l.text;return i().useEffect((function(){if(Array.isArray(e.privacy)){if(e.privacy.length&&e.entityTypeId===ce.E.Playlist){var t=e.privacy.some((function(e){return!!e.canManageAccess&&("private"===e.privacy||"restricted"===e.privacy)}));r(t),c(t)}}else r(e.privacy.canManageAccess)}),[e.privacy]),i().createElement("div",{className:"d-flex align-items-center"},i().createElement(j.x,{svgName:s,className:"svg-container mr-1"}),n&&e.onClickShowPrivacies?i().createElement(Pe.L,{className:"info-link",onClick:e.onClickShowPrivacies},u):i().createElement("span",null,u))}var mt=n(4705),dt=n(52076),pt=n(22218),ft=n(34254);function yt(e){return yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yt(e)}function vt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==yt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==yt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===yt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gt(e){return function(e){if(Array.isArray(e))return ht(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ht(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ht(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var bt,Et,St,wt,Ct={namespace:"share"},kt={video:"thumbnail,_canBeConsumed",clip:"_parentVideo[thumbnail,rating],_canBeConsumed",interactive:"_canBeConsumed,_parentVideo[thumbnail,rating],thumbnail,_parentClip",series:"tallPoster",playlist:"cover"},At={getShareObject:function(e,t,n){return{url:"/api/share/find/".concat(e),key:"share:".concat(e),success:t,error:n}},sharedObjectsById:function(e){e.sort();var t=e.map((function(e){return"id=".concat(e)})),n=Object.keys(kt).map((function(e){return"query.".concat(e,"=").concat(kt[e])}));return{url:"{gateway}/v1/objects?".concat([].concat(gt(t),gt(n),["permissionFilterOption=".concat(ft.r.StripMetadata)]).join("&")),key:"objects:".concat(e.join(","))}},sentShare:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.values(e).join(":");return{url:S._.urlBuilder("{gateway}/v1/users/me/share/sent-items",e),key:"sent:shares:".concat(t),normalizeOptions:Ct}},getSentDirectShareByObjectId:function(e){return{url:"{gateway}/v1/users/me/share/direct/sent-items?objectId=".concat(e),key:"direct:share:sent:object:".concat(e),normalizeOptions:Ct}},createDirectShare:function(e,t,n,r){return{url:"{gateway}/v1/share",key:"create:direct:share",data:e,type:B.k.POST,normalizeOptions:Ct,invalidationKeys:["direct:share:sent:object:".concat(e.objectId),"sent:shares"],success:t,error:n,always:r}},updateDirectShareRecipients:function(e,t,n,r,a){var i="direct:share:recipients:".concat(e);return{url:"{gateway}/v1/share/".concat(e,"/recipients"),key:"edit:direct:share",data:t,type:B.k.POST,normalizeOptions:Ct,invalidationKeys:"sent:shares",updateState:{keys:i,updateData:function(e){return!e[i]||t.recipients.length?e:Object.assign(Object.assign({},e),vt({},i,[]))}},success:n,error:r,always:a}},removeDirectShareRecipient:function(e,t,n,r,a){var i="direct:share:recipients:".concat(e);return{url:S._.urlBuilder("{gateway}/v1/share/".concat(e,"/recipients"),{recipientId:t}),key:"remove:direct:share:recipient",type:B.k.DELETE,normalizeOptions:Ct,invalidationKeys:"sent:shares",updateState:{keys:i,updateData:function(e){return e[i]?Object.assign(Object.assign({},e),vt({},i,[])):e}},success:n,error:r,always:a}},getDirectShareRecipientsById:function(e,t){var n=t.map((function(e){return"id=".concat(e.id)})).join("&");return{url:"{gateway}/v1/objects?".concat(n),key:"direct:share:recipients:".concat(e)}},getRecipientsById:function(e){e.sort();var t=e.map((function(e){return"id=".concat(e)})).join("&");return{url:"{gateway}/v1/objects?".concat(t,"&query.user=avatar"),key:"share:recipients:".concat(e.join(","))}},getRecipientUsers:function(e,t){return{url:"{gateway}/v1/objects/".concat(e,"/users?query={limit:100}"),key:"share:recipients:".concat(e,":users"),success:t}},getHydratedRecipients:function(e,t){e.sort();var n={id:e};return t===ce.E.User&&(n.query="yearGroups,avatar"),t===ce.E.Classroom&&(n.query="users[count()]{limit:0}"),t===ce.E.ClassroomGroup&&(n.query="classroom,users[count()]{limit:0}"),{url:S._.urlBuilder("{gateway}/v1/objects",n),key:"share:recipients:".concat(e.join(":"),":").concat(t)}},getObjectsSharedWithUser:function(e){var t={permissionFilterOption:ft.r.StripMetadata};return e&&(t.cursor=e),{url:S._.urlBuilder("{gateway}/v1/users/me/share/received-items",t),key:"shared:with:me:".concat(e)}},getShareLinkByObjectId:function(e){return{url:"{gateway}/v1/share/links?objectId=".concat(e),key:"share:link:object:".concat(e),normalizeOptions:Ct,formatData:function(e){return Object.assign(Object.assign({},e),{linkExpireDate:e.linkExpireDate||null})}}},createShareLink:function(e,t,n,r){return{url:"{gateway}/v1/share/links",key:"create:share:link",type:B.k.POST,data:e,normalizeOptions:Ct,invalidationKeys:["share:link:object:".concat(e.resourceId),"privacy:".concat(e.resourceId),"sent:shares"],success:t,error:n,always:r}},editShareLink:function(e,t,n,r,a){return{url:"{gateway}/v1/share/links/".concat(e.id),key:"edit:share:link",data:t,type:B.k.PUT,normalizeOptions:Ct,invalidationKeys:["share:".concat(e.id),"share:link:object:".concat(e.objectId),"sent:shares"],success:n,error:r,always:a}},deleteShareLink:function(e,t,n,r){return{url:"{gateway}/v1/share/links/".concat(e.id),key:"delete:share:link",type:B.k.DELETE,normalizeOptions:Ct,invalidationKeys:["share:".concat(e.id),"share:link:object:".concat(e.objectId),"sent:shares"],success:t,error:n,always:r}},checkPassword:function(e,t,n,r){return{url:"/api/share/links/".concat(e,"/check-password"),key:"checkpassword:".concat(e),type:B.k.POST,data:{password:t},success:n,error:r}},getPrivacy:function(e){return{url:"{gateway}/v1/objects/".concat(e,"/access"),key:"privacy:".concat(e),normalize:!1}},updatePrivacy:function(e,t,n,r){return{url:"{gateway}/v1/share/links/".concat(e,"/privacy"),key:"update:privacy",type:B.k.PUT,data:{privacy:t},invalidationKeys:"privacy",normalize:!1,success:n,error:r}}},Ot={getRecentItem:function(e,t){var n=t.cacheGet(e);return Array.isArray(n)||(n=[]),n},setRecentItem:function(e,t,n){Array.isArray(t)&&n.cacheSet(e,t)},addRecentItem:function(e,t,n){var r=n.id,a=n.limit,i=void 0===a?5:a,o=Ot.getRecentItem(e,t),c=o.indexOf(r);return c>-1&&o.splice(c,1),o.unshift(r),o.length>i&&(o=o.slice(0,i)),Ot.setRecentItem(e,o,t),o},removeRecentItem:function(e,t,n){var r=Ot.getRecentItem(e,n).filter((function(e){return e!==t.toString()}));Ot.setRecentItem(e,r,n)}},It=function(e){return"recently:shared:to:".concat(e)},xt={getRecentlySharedTo:function(e){return Ot.getRecentItem(It(e),mt.SG)},addRecentlySharedTo:function(e,t){return Ot.addRecentItem(It(e),mt.SG,t)}},Nt=n(77131),jt=n(84657),Lt=(n(42227),n(48318));(wt=bt||(bt={})).Newest="newest",wt.Oldest="oldest",wt.RecentlyUpdated="recently_added",wt.AtoZ="atoz",wt.ZtoA="ztoa",(St=Et||(Et={})).OwnedByMe="owned_by_me",St.Followed="followed",St.All="all",Lt.BaseCollectionIdentifier;var Tt,Pt,Ut=n(18830),Ft=n(50028);!function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos",e.PinnedVideos="pinnedVideos"}(Tt||(Tt={})),function(e){e.Subject="Subject",e.Curriculum="Curriculum"}(Pt||(Pt={})),n(85523);var Vt=n(91432),Rt=n(332),Bt=n(45428);function Dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Mt=c.T.encloseNamespace("shared.share"),zt={getObjectTypeId:function(e){switch(e){case"video":return ce.E.Video;case"playlist":return ce.E.Playlist;case"subject":return ce.E.Subject;case"series":return ce.E.Series;case"interactive":return ce.E.Interactive;case"clip":return ce.E.Clip}},createLink:function(e){var t={resourceId:e.entity.id};e.password&&(t.password=e.password),e.linkExpireDate&&(t.linkExpireDate=e.linkExpireDate),l.a.fetch(e.dispatch,At.createShareLink(t,(function(t){dt.k.logUserAction(t,dt.k.mergeOptions(zt.getAnalyticsOptions(e.entityType),{actionType:pt.Vw.Create,entity:pt.py.ShareLink,eventVersion:pt.eq.V3})),e.success&&e.success(t)}),(function(){e.alerts.error(Mt("createLinkError",{name:e.entity.name}))})))},updateLink:function(e,t,n,r,a,i,o,c){l.a.fetch(e,At.editShareLink(r,a,(function(e){dt.k.logUserAction(e,dt.k.mergeOptions(zt.getAnalyticsOptions(n),{actionType:pt.Vw.Edit,entity:pt.py.ShareLink,eventVersion:pt.eq.V3})),o&&o(e),i.success(Mt("editSuccess",{name:t.name,escapeText:!0}))}),(function(){c&&c(),i.error(Mt("editError",{name:t.name,escapeText:!0}))})))},deleteLink:function(e,t,n,r,a,i,o){l.a.fetch(e,At.deleteShareLink(r,(function(){dt.k.logUserAction({shareLink:r},dt.k.mergeOptions(zt.getAnalyticsOptions(n),{actionType:pt.Vw.Delete,entity:pt.py.ShareLink})),i&&i(),a.success(Mt("deleteSuccess",{name:t.name,escapeText:!0}))}),(function(){a.error(Mt("deleteError",{name:t.name,escapeText:!0}))}),(function(){o&&o()})))},createOrUpdateDirectShare:function(e){var t=e.dispatch,n=e.entity,r=e.entityType,a=e.currentUser,i=e.recipients,o=e.sentDirectShare,c=e.message,s=e.onSuccess,u=e.onError,m=e.onDone,d=function(e){s&&s(e),dt.k.logUserAction(Object.assign(Object.assign({},n),{shareCount:i.length}),dt.k.mergeOptions(zt.getAnalyticsOptions(r),{actionType:pt.Vw.Share,descriptor:pt.YM.DirectShare,eventVersion:pt.eq.V3})),i.map((function(e){xt.addRecentlySharedTo(a.id,{id:e.id})}))},p={objectId:n.id,objectTypeId:zt.getObjectTypeId(r),recipients:i,message:c},f={recipients:i,message:c},y=o?At.updateDirectShareRecipients(o.id,f,d,u,m):At.createDirectShare(p,d,u,m);l.a.fetch(t,y)},removeDirectShareRecipient:function(e,t,n,r,a,i){l.a.fetch(e,At.removeDirectShareRecipient(r.id,t,(function(e){a&&a(e),dt.k.logUserAction({shareCount:1},dt.k.mergeOptions(zt.getAnalyticsOptions(n),{actionType:pt.Vw.Unshare}))}),i))},getDirectShareRecipientsRequest:function(e){var t;return!!(null===(t=null==e?void 0:e.recipients)||void 0===t?void 0:t.length)&&At.getDirectShareRecipientsById(e.id,e.recipients)},useHydrateRecipients:function(e){var t=E.m.groupBy(e,"typeId"),n=t[ce.E.User],r=t[ce.E.Classroom],a=t[ce.E.ClassroomGroup];l.a.useBasicFetch(!!(null==n?void 0:n.length)&&At.getHydratedRecipients(n.map((function(e){return e.id})),ce.E.User)),l.a.useBasicFetch(!!(null==r?void 0:r.length)&&At.getHydratedRecipients(r.map((function(e){return e.id})),ce.E.Classroom)),l.a.useBasicFetch(!!(null==a?void 0:a.length)&&At.getHydratedRecipients(a.map((function(e){return e.id})),ce.E.ClassroomGroup))},getAnalyticsOptions:function(e){var t;switch(e){case"playlist":t=pt.py.Playlist;break;case"subject":t=pt.py.Classification;break;case"video":t=pt.py.Video;break;case"series":t=pt.py.Series;break;case"interactive":t=pt.py.Interactive;break;case"clip":t=pt.py.Clip}return{entity:t,location:pt.LZ.Popup,workflowPhase:pt.eu.Complete}},getFetchFunctionByType:function(e){switch(e){case"video":return function(e){return l.a.useBasicFetch(Nt.R.video(e))};case"playlist":return function(e){return l.a.useBasicFetch(function(e,t,n){return{url:S._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"".concat(jt.v.PLAYLIST,",_isClickViewPlaylist,_liteOwner")}),publicUrl:S._.urlBuilder("/api/objects/".concat(e),{query:"".concat(jt.v.PLAYLIST,",_isClickViewPlaylist")}),key:"playlist:".concat(e),success:t,error:n}}(e))};case"subject":return function(e,t){return l.a.useBasicFetch(function(e,t,n){return{url:S._.urlBuilder("/api/domain/v1/subjects/".concat(e),{query:jt.v.CLASSIFICATION(t)}),publicUrl:S._.urlBuilder("/api/subjects/classifications/".concat(e),{query:jt.t.CLASSIFICATION}),key:"classification:".concat(e),error:n}}(e,t))};case"series":return function(e){return l.a.useBasicFetch(function(e){var t={query:jt.v.SERIES};return{url:S._.urlBuilder("{gateway}/v1/objects/".concat(e),t),publicUrl:S._.urlBuilder("/api/objects/".concat(e),t),key:"series:".concat(e)}}(e))};case"interactive":return function(e){return l.a.useBasicFetch(Vt.b.interactiveMetadata(e))};case"clip":return function(e){return l.a.useBasicFetch(Rt.e.clip(e))}}},getImageUrl:function(e){var t,n,r,a,i;return"thumbnail"in e&&e.thumbnail?null===(t=e.thumbnail)||void 0===t?void 0:t.url:"cover"in e?null===(n=e.cover)||void 0===n?void 0:n.url:"tallPoster"in e?null===(r=e.tallPoster)||void 0===r?void 0:r.url:"_parentVideo"in e&&e._parentVideo?null===(i=null===(a=e._parentVideo)||void 0===a?void 0:a.thumbnail)||void 0===i?void 0:i.url:""},RESTRICTION_CACHE_KEY:"restriction-warning",useRestrictionWarning:function(e,t){var n,r,a,o,c,u,m,d,p=(m=i().useState(!1),d=2,function(e){if(Array.isArray(e))return e}(m)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(m,d)||function(e,t){if(e){if("string"==typeof e)return Dt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dt(e,t):void 0}}(m,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=p[0],y=p[1],v=l.a.useBasicFetch((null==e?void 0:e.typeId)===ce.E.Playlist&&(n=e.id,a=jt.v.VIDEO_COLLECTION,o=jt.v.CLIP_COLLECTION,c=jt.v.INTERACTIVE,u={query:"(videos[".concat(a,"]{status:[").concat(Ft.X.Published,",").concat(Ft.X.Archive,"]}|clips[").concat(o,"]|interactives[").concat(c,"]){orderBy:orderindex,limit:100}"),permissionFilterOption:ft.r.StripMetadata},r&&(u.cursor=r),{url:S._.urlBuilder("{gateway}/v1/objects/".concat(n,"/members"),u),publicUrl:S._.urlBuilder("/api/objects/".concat(n,"/members"),u),key:"playlist:".concat(n,":videos").concat(r?":".concat(r):"")})),g=l.a.useBasicFetch(s.N.currentUser());i().useEffect((function(){var n,r;if(e&&!f&&g.hasCompleted&&((null==e?void 0:e.typeId)!==ce.E.Playlist||v.hasCompleted))if(y(!0),mt.SG.cacheGet("".concat(zt.RESTRICTION_CACHE_KEY,":").concat(g.data.id)))t(!1);else{var a=Bt.l.hasRestrictions(e);(null===(r=null===(n=v.data)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length)&&(a=v.data.data.some((function(e){return Bt.l.hasRestrictions(e)}))),t(a)}}),[e,v,f,g.data])}};function Gt(){return i().createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},i().createElement("circle",{cx:"12",cy:"12",r:"12",fill:"url(#pattern0)"}),i().createElement("defs",null,i().createElement("pattern",{id:"pattern0",patternContentUnits:"objectBoundingBox",width:"1",height:"1"},i().createElement("use",{xlinkHref:"#image0_3558_14996",transform:"scale(0.00520833)"})),i().createElement("image",{id:"image0_3558_14996",width:"192",height:"192",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAAAXNSR0IArs4c6QAAJ41JREFUeAHtfQm0XFWZ7r+r7jxPuTeXhExkgISYNFOGmwBJUEB8IPSD1whERXR1A22Cgv2WT1TQ7t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10i1n7wXt4/79OsoT61K1NTFVvM85AQgz2jC4s765fgkFAzewIFzD73NNj7qT+/ZPkM+/jppaNgnBg4scpJwVgMi6NvZNKaLDPZdTMHgtv1/OA+dsXRFj0IuXyOd7nCaUPium7lccwhvJpey81wIQVa+GcbWfNm44m1sFGPFazl/JJhaIkihvmfEoRC9ndBOX5SUuxwZauvwtIZ50qO+QGUWON5daABQcMwfQHS0LyAhwy2AKxUK+pucmZEEYtL5mgl34N1B1/eu5MJBVVKHUWQuAlD1jHc3u0sHemSSGZ1FQzGKwzWKBGLl61nXqZDWEDzjtXZz2LvIZu1j9+H1qLN6tuzVj60z2RguAjDtxuoVMwRthYZjCaw91ZIg6EgYfesBXgmFgUchdqgLui4euSEOIQX43YF6JrwQDsUYrh23jsK38vo3f7TPBXiR2pdKOTpwsSXvv/x8AJDjD09C0zQAAAABJRU5ErkJggg=="})))}function Ht(){return i().createElement("svg",{viewBox:"0 0 40 40",fill:"none"},i().createElement("path",{d:"M29.692 15.31c.58 0 1.146-.173 1.628-.5a2.96 2.96 0 001.078-1.331 3.004 3.004 0 00-.634-3.235 2.918 2.918 0 00-1.5-.812 2.894 2.894 0 00-1.693.169 2.938 2.938 0 00-1.314 1.093 2.997 2.997 0 00.364 3.748 2.91 2.91 0 002.071.869zM20.043 26.267V13.849a.9.9 0 00-.259-.633.877.877 0 00-.624-.262H6.883a.877.877 0 00-.624.262.9.9 0 00-.259.633v12.418c0 .24.092.469.257.64.165.172.39.27.626.276H19.16a.899.899 0 00.626-.276.923.923 0 00.257-.64zm-3.51-10.389v1.92h-2.37v6.68H11.88V17.93H9.51v-2.182h7.022v.13z",fill:"#fff"}),i().createElement("path",{d:"M21.874 14.132v.917a4.03 4.03 0 002.05-1.47c.512-.699.79-1.545.793-2.415 0-1.1-.431-2.154-1.199-2.932a4.065 4.065 0 00-2.893-1.214 4.065 4.065 0 00-2.894 1.214 4.175 4.175 0 00-1.199 2.932h2.391a2.996 2.996 0 012.061.887c.55.552.868 1.297.89 2.081zM26.332 17.1h-4.458v8.883c0 .8-.309 1.566-.86 2.138-.552.57-1.302.9-2.091.917h-4.588a7.047 7.047 0 003.265 3.317c1.427.7 3.046.887 4.593.532a6.99 6.99 0 003.918-2.486 7.152 7.152 0 001.535-4.418v-7.551a1.348 1.348 0 00-.385-.942 1.313 1.313 0 00-.929-.39zM32.772 17.1h-3.597c.206.414.316.87.323 1.332v7.551a9.1 9.1 0 01-.516 2.859c.236.021.474.021.71 0a4.28 4.28 0 003.046-1.278A4.394 4.394 0 0034 24.477v-6.045c0-.339-.126-.665-.354-.912a1.307 1.307 0 00-.874-.42z",fill:"#fff"}))}var qt={integrationContainer:"Rkyqz",msTeamsContainer:"mPAD2",avatar:"qmP52"},Wt="share.shareIntegrations";function Xt(){var e="".concat(qt.avatar," border border-light rounded-circle overflow-hidden");return i().createElement(le.u,{title:c.T.getPhrase(Wt,"shareThroughIntegrations"),spanHack:!0},i().createElement("ul",{className:"list-unstyled d-flex mb-0"},i().createElement("li",{className:e,style:{zIndex:1}},i().createElement(Gt,null)),i().createElement("li",{className:"".concat(e," ").concat(qt.msTeamsContainer),style:{zIndex:0}},i().createElement(Ht,null))))}var Kt=n(70065);function Zt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Qt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Yt="share.shareAsLink";function Jt(e){var t=Zt(i().useState(!1),2),n=t[0],r=t[1],a=Zt(i().useState(!1),2),o=a[0],l=a[1];return i().useEffect((function(){r(!!e.shareLinkIsLoading)}),[e.shareLinkIsLoading]),n?i().createElement("div",{className:"text-center"},i().createElement(R.Spinner,{as:"div",animation:"border",role:"status"})):i().createElement(i().Fragment,null,i().createElement("div",{className:"d-flex justify-content-between"},i().createElement("h3",{className:"h6"},i().createElement(u.x,{phrase:"shareALink"})),e.shareLink&&("playlist"===e.entityType||"series"===e.entityType)&&i().createElement(le.u,{title:"playlist"===e.entityType||"series"===e.entityType?c.T.getPhrase(Yt,"deleteLinkTooltipPlaylist"):"",spanHack:!0},i().createElement(Pe.L,{onClick:e.onClickDeleteLink,className:"info-link justify-self-start"},i().createElement(u.x,{namespace:Yt,phrase:"deleteLink"})))),i().createElement("div",{className:"d-flex justify-content-between align-items-center"},i().createElement("div",{className:"".concat(e.shareLink?"w-100":"w-75 d-flex align-items-center")},e.shareLink?i().createElement(i().Fragment,null,i().createElement("div",{className:"d-flex justify-content-between align-items-center mb-1"},i().createElement(ut,{linkExpireDate:e.shareLink.linkExpireDate,isPasswordProtected:e.shareLink.isPasswordProtected,privacy:e.privacy,entityTypeId:e.shareLink.objectTypeId,status:e.shareLink.status,onClickShowPrivacies:e.onClickShowPrivacies}),e.canAddPolicies&&i().createElement(Pe.L,{className:"cursor-pointer",onClick:e.onClickShowSettings},i().createElement(j.x,{svgName:L.vn.Cog}))),i().createElement(nt,{value:e.shareLink.url,onCopy:function(){o||(l(!0),dt.k.logUserAction(Object.assign({},e.entity),dt.k.mergeOptions(zt.getAnalyticsOptions(e.entityType),{actionType:Kt.UserAction.Share,descriptor:Kt.ShareDescriptors.CopyLink,eventVersion:Kt.EventVersion.V3})))}})):i().createElement("div",{className:"d-flex align-items-center"},i().createElement("div",{className:"mr-1"},e.enableIntegrations?i().createElement(Xt,null):i().createElement(j.x,{svgName:L.vn.Link,className:"svg-container"})),i().createElement("span",null,i().createElement(u.x,{namespace:Yt,phrase:"generate"})))),!e.shareLink&&i().createElement(Pe.L,{className:"info-link",onClick:function(){r(!0),e.onClickCreateLink()}},i().createElement(u.x,{phrase:"createLink"}))))}var _t=n(5173),$t=n(92802),en=n(86347),tn=n(63038),nn=n(85610),rn=c.T.encloseNamespace("share.shareMessage"),an=_t.Ry().shape({message:_t.Z_().max(280,(function(){return rn("maxMessageLen")}))});function on(){var e=(0,en.b)();return i().createElement($t.l0,null,i().createElement(tn.W,{component:"textarea",name:"message",id:"message",placeholder:rn("placeholder"),value:e.values.message,label:rn("label"),showOptionalLabel:!0}),i().createElement(nn.u,null,i().createElement(nn.u.Submit,{variant:"dark",text:rn("share")})))}function cn(e){return i().createElement(en.n,{initialValues:{message:""},validationSchema:an,onSubmit:function(t,n){var r=null;t.message&&(r=t.message),e.onClickShare(r,n)},allowInitialSubmit:!0},i().createElement(on,null))}var ln=n(41387),sn=n(79410),un=n(54753),mn=n(52086),dn={wrapper:"hVQto"};function pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var fn="shared.lookingForIntegration";function yn(e){var t,n,r=(t=(0,sn.D)(mn.g.LOOKING_FOR_INTEGRATION,{show:!0},{storage:mt.Z1.LocalStorage}),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pn(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=r[0],o=r[1];return i.show?a.createElement("div",{className:"d-flex justify-content-between rounded mt-3 p-2 ".concat(dn.wrapper)},a.createElement(un.F,{appLink:e.appLink,onClick:function(){var t;return null===(t=e.closePopup)||void 0===t?void 0:t.call(e)},className:"d-inline-flex align-items-center mb-0"},a.createElement("span",{className:"ml-1 font-weight-500 text-info"},c.T.getPhrase(fn,"lookingForIntegration"))),a.createElement(j.x,{svgName:L.vn.Close,size:j.S.Small,className:"text-info d-inline-block svg-container cursor-pointer",onClick:function(){return o({show:!1})}})):a.createElement(a.Fragment,null)}var vn="g-share-to-classroom",gn="32";function hn(e){var t;if(t=e.integrations,i().useEffect((function(){var e;t.includes(r.GoogleClassroom)&&(null===(e=null===gapi||void 0===gapi?void 0:gapi.sharetoclassroom)||void 0===e||e.go(vn))}),[t.includes(r.GoogleClassroom)]),i().useEffect((function(){t.includes(r.MicrosoftTeams)&&(null===shareToMicrosoftTeams||void 0===shareToMicrosoftTeams||shareToMicrosoftTeams.renderButtons())}),[t.includes(r.MicrosoftTeams)]),!e.integrations.length)return i().createElement(yn,{appLink:e.appLink,closePopup:e.closePopup});var n="".concat(qt.integrationContainer," rounded mx-1");return i().createElement("div",{className:"d-flex mt-2 mx-n1"},e.integrations.includes(r.GoogleClassroom)&&i().createElement("div",{id:vn,className:"".concat(n," partial-loading-background")},i().createElement("div",{className:"g-sharetoclassroom","data-size":gn,"data-url":e.url})),e.integrations.includes(r.MicrosoftTeams)&&i().createElement("div",{className:"teams-share-button ".concat(n," ").concat(qt.msTeamsContainer),"data-href":e.url,"data-button-type":"smallTransWhite","data-preview":"false","data-icon-px-size":gn}))}function bn(e){return bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bn(e)}function En(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==bn(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==bn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===bn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sn(e){return function(e){if(Array.isArray(e))return Cn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||wn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wn(e,t){if(e){if("string"==typeof e)return Cn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cn(e,t):void 0}}function Cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var kn=c.T.encloseNamespace("shared.share");function An(e,t,n,r){if(!e)return[];var a=[].concat(Sn(t),Sn(n)).map((function(e){return e.id}));return e.filter((function(e){return!a.includes(e.id)&&e.id!==r}))}function On(e){var t,n,r,a=(n=i().useState([]),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(n,r)||wn(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=a[0],c=a[1],l=A().hasPermissions,s=l(y.ManageIntegrations),m=l(y.ShareToUsers)||l(y.ShareToClassrooms)||l(y.ShareToClassroomGroups),d=An(e.recentlySharedTo,o,e.directShareRecipients,e.currentUser.id);return i().createElement(i().Fragment,null,m&&i().createElement("div",{className:"d-flex justify-content-between align-items-center pb-3"},i().createElement(Je,{key:null!==(t=null==d?void 0:d.map((function(e){return e.id})).join(":"))&&void 0!==t?t:"share:search",getRemoteUrl:function(t){var n,r=S._.safeUrlConcat(e.gatewayApiUrl,"v1/search/users"),a=[];return l(y.ShareToUsers)&&a.push("user"),l(y.ShareToClassrooms)&&a.push("classroom"),l(y.ShareToClassroomGroups)&&a.push("classroom_group"),S._.urlBuilder(r,(En(n={query:t,index:a},"".concat(ln.w.FILTER_PARAM_PREFIX,"customerId"),e.currentUser.customerId),En(n,"limit",Ye),n))},requestHeaders:e.searchRequestHeaders,formatRemoteSuggestions:function(t){return An(null==t?void 0:t.results,o,e.directShareRecipients,e.currentUser.id)},recentSearches:d,selections:o,updateSelections:function(e){return c([].concat(Sn(o),[e]))},removeSelection:function(e){return c(o.filter((function(t){return t.id!==e})))},placeholder:kn("searchPlaceholder"),imageCdnUrl:e.imageCdnUrl,activationLength:2,fetchSelectionMembers:e.fetchRecipientUsers&&function(t){e.fetchRecipientUsers&&e.fetchRecipientUsers(t,(function(e){var n=[];o.forEach((function(r){var a;if(r.id!==t)return n.push(r);var i=w.t.deepClone(r);(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.length)?i.users=e:i.users={count:0,data:[],pagination:null},n.push(i)})),c(E.m.uniq(n,"id"))}))},debounceTime:300,emptyStateImageUrl:e.emptyStateImageUrl,errorStateImageUrl:e.errorStateImageUrl,hasStudentExperience:l(y.StudentExperience)})),m&&!o.length&&e.directShareRecipients.length?i().createElement("div",null,i().createElement("h3",{className:"font-size-normal"},i().createElement(u.x,{phrase:"sharedTo"})),i().createElement(b.ZP,{autoHeight:!0},i().createElement("ul",{className:"list-unstyled"},e.directShareRecipients.map((function(t){return i().createElement("li",{key:t.id,className:"mb-2 pr-1"},i().createElement(Ie,{entity:t,imageCdnUrl:e.imageCdnUrl,removeRecipient:e.onClickRemoveRecipient,hasStudentExperience:l(y.StudentExperience)}))}))))):i().createElement(i().Fragment,null),o.length?i().createElement(cn,{onClickShare:function(t,n){e.onClickShare(o.map((function(e){return{id:e.id,typeId:e.typeId}})),t,(function(){c([]),n()}))}}):i().createElement("div",{className:"mx-n3 px-3 ".concat(m?"pt-3 border-top":"")},i().createElement(Jt,{entity:e.entity,entityType:e.entityType,shareLink:e.shareLink,onClickShowSettings:e.onClickShowSettings,onClickCreateLink:e.onClickCreateLink,shareLinkIsLoading:e.shareLinkIsLoading,canAddPolicies:e.canAddPolicies,privacy:e.privacy,entityTypeId:e.entity.typeId,onClickShowPrivacies:e.onClickShowPrivacies,onClickDeleteLink:e.onClickDeleteLink,enableIntegrations:e.enableIntegrationBanner}),!!e.shareLink&&e.enableIntegrationBanner&&i().createElement(hn,{integrations:e.integrations,url:e.shareLink.url,closePopup:e.closePopup,appLink:s?e.integrationSettingAppLink:e.messagePopupAppLink})))}var In=n(42905),xn=n(39023),Nn="share.embedSize";function jn(e){var t=e.autoplay,n=e.setAutoplay,r=e.videoSize,a=e.setVideoSize,o=e.videoSizes;return i().createElement("div",{className:"d-flex align-items-center"},!!o.length&&i().createElement(i().Fragment,null,i().createElement("div",{className:"mr-1"},i().createElement(u.x,{namespace:Nn,phrase:"videoSize"})),i().createElement("div",{className:"pr-3"},i().createElement(R.Dropdown,null,i().createElement(R.Dropdown.Toggle,{id:"embed-resolution",variant:"outline-dark"},r.label),i().createElement(R.Dropdown.Menu,null,o.map((function(e){return i().createElement(R.Dropdown.Item,{key:"".concat(e.width,"x").concat(e.height),onClick:function(){return a(e)}},e.label)})))))),i().createElement("div",{className:"mr-2"},i().createElement(u.x,{namespace:Nn,phrase:"autoplay"})),i().createElement(xn.X,{id:"autoplay-checkbox",checked:t,onChange:function(){return n(!t)}}))}var Ln={embedHtmlInput:"mwvd0",copyBtnContainer:"myePx",copyBtn:"zgdag"};function Tn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Un="share.copyEmbedHtml",Fn=c.T.encloseNamespace(Un);function Vn(e){var t=In.i.getEmbedResolutions(),n=Tn(i().useState("copy"),2),r=n[0],a=n[1],o=Tn(i().useState(!1),2),c=o[0],l=o[1],s=Tn(i().useState(t.find((function(e){return"100%"===e.width}))),2),m=s[0],d=s[1],p=Tn(i().useState(!1),2),f=p[0],y=p[1],v=In.i.buildEmbedUrl({embedUrl:e.embedUrl,host:e.config.primaryUrl,shareId:e.shareId,autoplay:c}),g=In.i.getEmbedString({url:v,size:m});return i().createElement(u.D.Provider,{value:Un},i().createElement("label",null,i().createElement(u.x,{namespace:Un,phrase:"label"})),i().createElement("div",{className:"input-group mb-2"},i().createElement("textarea",{className:"form-control rounded w-100 h-100 ".concat(Ln.embedHtmlInput),spellCheck:!1,value:g,rows:5,readOnly:!0}),i().createElement("div",{className:"input-group-append ".concat(Ln.copyBtnContainer)},i().createElement(_e,{onCopy:function(){a("copied"),setTimeout((function(){return a("copy")}),2e3),f||(y(!0),dt.k.logUserAction(Object.assign(Object.assign({},e.entity),{embedDetails:{size:m,autoplay:c}}),dt.k.mergeOptions(zt.getAnalyticsOptions(e.entityType),{actionType:Kt.UserAction.Share,descriptor:Kt.ShareDescriptors.CopyEmbedHtml,eventVersion:Kt.EventVersion.V3})))},text:g},i().createElement("button",{className:"btn btn-outline-dark border border-secondary ".concat(Ln.copyBtn),type:"button"},Fn(r))))),i().createElement(jn,{autoplay:c,setAutoplay:l,videoSize:m,setVideoSize:d,videoSizes:t}))}var Rn=(0,_t.Ry)().shape({removePassword:(0,_t.O7)(),resourceId:(0,_t.Z_)(),linkExpireDate:(0,_t.Z_)().nullable(),password:(0,_t.Z_)().test({name:"password-length",exclusive:!1,params:{},message:c.T.getPhrase("share.validation","minPassword"),test:function(e){return!((null==e?void 0:e.length)&&e.length<3)}}).default("")}),Bn=n(9063),Dn=30;function Mn(e){if(!e)return null;var t=new Date;return t.setDate(t.getDate()+Dn),t.toISOString()}var zn="shared.linkExpiry",Gn=c.T.encloseNamespace(zn);function Hn(e){var t=(0,$t.u6)();return i().createElement("div",{className:"d-flex justify-content-between align-items-center pb-3"},i().createElement("div",null,i().createElement("label",{className:"m-0",htmlFor:""},i().createElement(u.x,{namespace:zn,phrase:"linkExpirationHeading"})),i().createElement("p",{className:"m-0"},i().createElement(u.x,{namespace:zn,phrase:"linkExpirationInfo"}))),i().createElement(le.u,{title:Gn("passwordProtected"),disable:!e.passwordProtectLink,spanHack:!0,trigger:"hover"},i().createElement(Bn.Z,{onClick:function(){e.passwordProtectLink||t.setFieldValue("linkExpireDate",Mn(!t.values.linkExpireDate))},on:!!t.values.linkExpireDate,disabled:e.passwordProtectLink,showStateWhenDisabled:!0})))}var qn={passwordButton:"W9Jl8"};function Wn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Xn=c.T.encloseNamespace("share.setPasswordInput");function Kn(e){var t,n,r,i=(n=a.useState(!1),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(n,r)||function(e,t){if(e){if("string"==typeof e)return Wn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wn(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],c=i[1],l=null===(t=(0,$t.u6)().errors)||void 0===t?void 0:t.password;return a.createElement(a.Fragment,null,a.createElement("input",{className:"form-control ".concat(l?"is-invalid":""),value:e.value,onChange:function(t){e.canEdit&&e.onChange(t.target.value)},type:o?"text":"password",placeholder:e.placeholder||Xn("passwordPlaceholder"),readOnly:!e.canEdit}),!!l&&a.createElement(R.Form.Control.Feedback,{type:"invalid"},l),!!e.canEdit&&a.createElement(Pe.L,{className:qn.passwordButton,onClick:function(){return c(!o)}},a.createElement(j.x,{svgName:o?L.vn.VisibleOn:L.vn.VisibleOff,title:Xn(o?"hidePassword":"revealPassword"),tooltipPlacement:"top"})),!e.canEdit&&!!e.canReset&&!!e.onReset&&a.createElement(Pe.L,{className:qn.passwordButton,onClick:e.onReset},a.createElement(j.x,{svgName:L.vn.Close,title:Xn("resetPassword"),tooltipPlacement:"top"})))}function Zn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Qn="shared.linkPassword",Yn="********";function Jn(e){var t,n,r,a=e.passwordProtectLink,o=e.setPasswordProtectLink,c=(0,$t.u6)(),l=(n=i().useState(!!(null===(t=e.shareLink)||void 0===t?void 0:t.isPasswordProtected)),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(n,r)||function(e,t){if(e){if("string"==typeof e)return Zn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zn(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=l[0],m=l[1];return i().createElement("div",{className:"pb-3"},i().createElement("div",{className:"d-flex justify-content-between align-items-center"},i().createElement("div",null,i().createElement("label",{className:"m-0",htmlFor:""},i().createElement(u.x,{namespace:Qn,phrase:"passwordProtectHeading"})),i().createElement("p",{className:"m-0"},i().createElement(u.x,{namespace:Qn,phrase:"passwordProtectInfo"}))),i().createElement(Bn.Z,{onClick:function(){var t;(null===(t=e.shareLink)||void 0===t?void 0:t.isPasswordProtected)&&c.setFieldValue("removePassword",a),c.setFieldValue("password",""),o(!a),c.setFieldValue("linkExpireDate",Mn(!a))},on:a})),a&&i().createElement("div",{className:"position-relative mt-2"},i().createElement(Kn,{value:s?Yn:c.values.password,onChange:function(e){c.setFieldValue("password",e)},onReset:function(){c.setFieldValue("password",""),c.setFieldValue("removePassword",!0),m(!1)},canEdit:!s,canReset:!0})))}function _n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $n=c.T.encloseNamespace("shared.share");function er(e){var t,n,r=(0,$t.u6)(),a=A().hasPermissions,o=(t=i().useState(!!e.shareLink.isPasswordProtected),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return _n(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_n(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=o[0],l=o[1];return i().createElement($t.l0,null,i().createElement("div",{className:"d-flex align-items-center justify-content-between pb-3"},i().createElement(ut,{linkExpireDate:r.values.linkExpireDate,isPasswordProtected:c,privacy:e.privacy,entityTypeId:e.shareLink.objectTypeId,status:e.shareLink.status,onClickShowPrivacies:e.onClickShowPrivacies}),i().createElement(le.u,{title:$n("deleteLinkTooltip"),spanHack:!0},i().createElement(Pe.L,{onClick:e.onClickDeleteLink,className:"info-link justify-self-start"},i().createElement(u.x,{phrase:"deleteLink"})))),a(y.ManageShareLinkSettings)&&i().createElement(i().Fragment,null,i().createElement(Hn,{passwordProtectLink:c}),i().createElement(Jn,{shareLink:e.shareLink,passwordProtectLink:c,setPasswordProtectLink:l})),!!e.canEmbed&&i().createElement("div",{className:"pb-3"},i().createElement(Vn,{embedUrl:e.shareLink.embedUrl,entity:e.entity,entityType:e.entityType,config:e.config,entityId:e.entityId,shareId:e.shareLink.id,analyticsOptions:e.analyticsOptions})),i().createElement(nn.u,null,i().createElement(nn.u.Cancel,{onClick:e.onClickCancel,text:$n("back"),variant:"outline-dark"}),i().createElement(nn.u.Submit,{variant:"dark"})))}function tr(e){var t={password:"",removePassword:!1,linkExpireDate:e.shareLink.linkExpireDate};return i().createElement(en.n,{initialValues:t,onSubmit:e.onClickSaveLink,castInitialValues:!1,validationSchema:Rn},i().createElement(er,{entity:e.entity,entityType:e.entityType,config:e.config,shareLink:e.shareLink,entityId:e.entityId,onClickCancel:e.onClickCancel,analyticsOptions:e.analyticsOptions,canEmbed:e.canEmbed,privacy:e.privacy,onClickShowPrivacies:e.onClickShowPrivacies,onClickDeleteLink:e.onClickDeleteLink}))}var nr=n(91656),rr=n(44550),ar=n(45458);function ir(e){return i().createElement(ar.C,{type:ar.g.Restriction,data:{restrictions:e.restrictions,yearGroups:e.yearGroups},inline:!0})}function or(e){var t=Bt.l.hasRestrictions(e.video),n=Ut.M.getCanBeConsumed(e.video).canConsume;return t&&e.yearGroups&&n?i().createElement(rr.c,{className:"pt-1"},i().createElement(ir,{restrictions:e.video._restrictions,yearGroups:e.yearGroups})):i().createElement(i().Fragment,null)}function cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var lr="share.shareRestrictionWarning",sr=c.T.encloseNamespace(lr),ur=1209600;function mr(e){var t,n,r=e.entity,a=e.entityType,o=e.yearGroups,c=e.onClickContinue,l=e.target,s=(t=i().useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return cr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cr(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=s[0],d=s[1],p=["video","clip","interactive"].includes(e.entityType);return i().createElement(i().Fragment,null,p?i().createElement(i().Fragment,null,i().createElement("p",{className:"h6 align-middle mb-0"},r.name),i().createElement("div",{className:"mb-2"},i().createElement(or,{video:r,yearGroups:o}))):i().createElement("p",null,i().createElement(u.x,{namespace:lr,phrase:"shareVideoList",options:{entityType:a}})),p&&i().createElement("p",null,i().createElement(u.x,{namespace:lr,phrase:"share"===l?"shareVideo":"addToPlaylist",options:{entityType:a}})),i().createElement(nn.u,null,i().createElement(nn.u.Checkbox,{id:"dont-show-again",checked:m,onToggle:function(){return d(!m)},label:"Don't show this again for 2 weeks"}),i().createElement(nn.u.Submit,{variant:"dark",text:sr("submit"),onClick:function(){if(m){var t="".concat(zt.RESTRICTION_CACHE_KEY,":").concat(e.currentUser.id);mt.SG.cacheSet(t,!0,ur)}c()}})))}var dr=n(62709),pr=n(28294),fr={radioButton:"Hxlr9",description:"ZFUnb"};function yr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return vr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var gr="share.shareLinkPrivacies",hr=c.T.encloseNamespace(gr);function br(e){return i().createElement("div",{className:"pb-3"},i().createElement(R.Form.Check,{type:"radio",name:e.id,id:e.id,value:e.id,label:e.name,onChange:function(){return e.onSelect(e.id)},checked:e.checked,className:"".concat(fr.radioButton," m-0"),custom:!0,disabled:e.disabled}),i().createElement("p",{className:"mb-0 ".concat(fr.description)},e.description))}function Er(e){var t="private";Array.isArray(e.privacy)||(t=e.privacy.privacy);var n=yr(i().useState(t),2),r=n[0],a=n[1],o=yr(i().useState(!1),2),c=o[0],l=o[1];function s(e){r!==e&&("restricted"===r&&"private"===e||a(e))}var m=e.shareLink.isPasswordProtected;return i().createElement(i().Fragment,null,e.shareLink.objectTypeId===ce.E.Playlist&&i().createElement("div",null,i().createElement(u.x,{namespace:gr,phrase:"privatePlaylistVideos"})),m&&i().createElement(ut,{entityTypeId:e.shareLink.objectTypeId,linkExpireDate:e.shareLink.linkExpireDate,isPasswordProtected:e.shareLink.isPasswordProtected,status:e.shareLink.status,privacy:e.privacy}),i().createElement("div",{className:"py-3"},i().createElement(br,{key:"public",id:"public",name:hr("public"),description:hr("publicDescription"),checked:!m&&"public"===r,onSelect:s,disabled:m}),i().createElement(br,{key:"just_my_customer",id:"just_my_customer",name:hr("protected"),description:hr("protectedDescription"),checked:!m&&"just_my_customer"===r,onSelect:s,disabled:m}),i().createElement(br,{key:"private",id:"private",name:hr("private"),description:hr("privateDescription"),checked:!m&&("private"===r||"restricted"===r),onSelect:s,disabled:m})),i().createElement("div",{className:"d-flex justify-content-between align-items-center"},i().createElement("div",{className:"d-flex justify-content-end"},i().createElement("button",{type:"button",className:"btn btn-outline-dark mr-2",onClick:e.onClickCancel},i().createElement(u.x,{namespace:gr,phrase:"back"})),i().createElement(pr.m,{className:"btn btn-dark",type:"button",onClick:function(){l(!0),e.onClickSavePrivacy(r)},disabled:r===t,showSpinner:c},i().createElement(u.x,{namespace:gr,phrase:"save"})))))}function Sr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return wr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wr(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Cr="shared.share",kr=c.T.encloseNamespace(Cr);function Ar(e){switch(e){case"video":return kr("titleVideo");case"clip":return kr("titleClip");case"interactive":return kr("titleInteractive");case"series":return kr("titleSeries");case"playlist":return kr("titlePlaylist");case"subject":return kr("titleTopic")}}var Or=function(e){return"video"===e||"interactive"===e||"clip"===e},Ir=function(e){return"video"===e||"interactive"===e||"clip"===e};function xr(e){var t,n,r,a,c=(0,o.useDispatch)(),f=(0,p.Z)(),y=!e.gatewayApiUrl,v=Sr(i().useState(!1),2),g=v[0],b=v[1],E=Sr(i().useState(null),2),S=E[0],w=E[1],C=(r=S,a=i().useRef(),i().useEffect((function(){a.current=r})),a.current),k=Sr(i().useState(!1),2),A=k[0],O=k[1],I=l.a.useBasicFetch(s.N.currentUser()),x=zt.getFetchFunctionByType(e.entityType)(e.entityId,null===(t=I.data)||void 0===t?void 0:t.id),N=l.a.useBasicFetch(d.config()),j=l.a.useBasicFetch(y&&s.N.token()),L=l.a.useBasicFetch(At.getShareLinkByObjectId(e.entityId)),T=l.a.useBasicFetch(At.getSentDirectShareByObjectId(e.entityId)),P=l.a.useBasicFetch(zt.getDirectShareRecipientsRequest(T.data)),U=I.data&&xt.getRecentlySharedTo(I.data.id),F=!!(null==U?void 0:U.length),V=l.a.useBasicFetch(F&&At.getRecipientsById(U)),R=l.a.useBasicFetch(At.getPrivacy(e.entityId)),B=l.a.useBasicFetch((null===(n=I.data)||void 0===n?void 0:n.isAuthenticated)&&dr.h.yearGroups(I.data.customerId)),D=(0,nr.r)(null),M=D.shareToGoogleClassroom,z=D.shareToMicrosoftTeams,G=D.isLoadingSettings;function H(e){var t;(null===(t=e.recipients)||void 0===t?void 0:t.length)&&l.a.getFetch(c)(zt.getDirectShareRecipientsRequest(e))}function q(e,t){l.a.getFetch(c)(At.getRecipientUsers(e,t))}function W(){L.data||zt.createLink({dispatch:c,entity:x.data,entityType:e.entityType,alerts:f})}function X(t,n){zt.updateLink(c,x.data,e.entityType,L.data,t,f,(function(){return w("main")}),n)}function K(){b(!0),O(!1),zt.deleteLink(c,x.data,e.entityType,L.data,f,(function(){return w("main")}),(function(){return b(!1)}))}function Z(t,n,r){zt.createOrUpdateDirectShare({dispatch:c,entity:x.data,entityType:e.entityType,currentUser:I.data,recipients:t,message:n,sentDirectShare:T.data,onSuccess:H,onError:function(){return f.error(kr("directShareError",{name:x.data.name}))},onDone:r})}function Q(t,n){zt.removeDirectShareRecipient(c,t,e.entityType,T.data,H,(function(){f.error(kr("removeDirectShareError")),n&&n()}))}function Y(e){l.a.fetch(c,At.updatePrivacy(L.data.id,e,(function(){return w(C)}),(function(){return f.error(kr("privaciesError",{name:x.data.name}))})))}zt.useHydrateRecipients(P.data),zt.useHydrateRecipients(V.data),zt.useRestrictionWarning(x.data,(function(e){return w(e?"restriction-warning":"main")})),i().useEffect((function(){L.hasCompleted&&O(!0)}),[L.hasCompleted,A]);var J=!!I.data&&!!N.data&&(!y||!!j.data)&&!!T.hasCompleted&&A&&!!R.data&&!!x.data&&!G&&!!B.hasCompleted;return i().createElement(u.D.Provider,{value:Cr},i().createElement(m.G,{title:Ar(e.entityType),closePopup:e.closePopup,showLoadingSpinner:g||!J||null===S},function(){if(g||!J)return i().createElement(i().Fragment,null);switch(S){case"main":return i().createElement(On,{shareLink:L.data,shareLinkIsLoading:L.isFetching,entity:x.data,entityType:e.entityType,directShareRecipients:P.data||[],recentlySharedTo:V.data||[],onClickCreateLink:W,onClickShowSettings:function(){return w("link-settings")},onClickShare:Z,onClickRemoveRecipient:Q,onClickDeleteLink:K,analyticsOptions:zt.getAnalyticsOptions(e.entityType),gatewayApiUrl:e.gatewayApiUrl||N.data.gatewayApiUrl,imageCdnUrl:N.data.imageCdnUrl,searchRequestHeaders:y?{authorization:"Bearer ".concat(j.data.value)}:null,currentUser:I.data,fetchRecipientUsers:q,privacy:R.data,onClickShowPrivacies:function(){return w("privacy")},canAddPolicies:Ir(e.entityType),emptyStateImageUrl:e.emptyStateImageUrl,errorStateImageUrl:e.errorStateImageUrl,integrations:(t=M,n=z,h.getShareIntegrations(t,n).filter((function(e){return e.enabled})).map((function(e){return e.id}))),integrationSettingAppLink:e.integrationSettingAppLink,messagePopupAppLink:e.messagePopupAppLink,closePopup:e.closePopup,enableIntegrationBanner:e.enableIntegrationBanner});case"link-settings":return i().createElement(tr,{entity:x.data,entityType:e.entityType,config:N.data,shareLink:L.data,entityId:e.entityId,analyticsOptions:zt.getAnalyticsOptions(e.entityType),onClickSaveLink:X,onClickDeleteLink:K,onClickCancel:function(){return w("main")},canEmbed:Or(e.entityType),privacy:R.data,onClickShowPrivacies:function(){return w("privacy")}});case"privacy":return i().createElement(Er,{privacy:R.data,shareLink:L.data,onClickCancel:function(){return w(C)},onClickSavePrivacy:Y});case"restriction-warning":return i().createElement(mr,{currentUser:I.data,entity:x.data,entityType:e.entityType,yearGroups:B.data,onClickContinue:function(){return w("main")},target:"share"})}var t,n}()))}},39023:function(e,t,n){"use strict";n.d(t,{X:function(){return a}});var r=n(1024);function a(e){var t=e.isLabelEllipsis,n=r.useRef(null);return r.useEffect((function(){n.current&&(e.checked?n.current.indeterminate&&(n.current.indeterminate=!1):!e.indeterminate||n.current.indeterminate?!e.indeterminate&&n.current.indeterminate&&(n.current.indeterminate=!1):n.current.indeterminate=!0)}),[n.current,e.indeterminate,e.checked]),r.createElement("div",{className:"custom-control custom-checkbox ".concat(e.className)},r.createElement("input",{ref:n,type:"checkbox",className:"custom-control-input",id:e.id,name:e.name,checked:e.checked,onChange:e.onChange,disabled:e.disabled}),r.createElement("label",{className:"custom-control-label cursor-pointer",htmlFor:e.id},r.createElement("span",{className:"".concat(t?"clamp-1":"")},e.label)))}a.defaultProps={checked:!1,label:"",className:""}},63038:function(e,t,n){"use strict";n.d(t,{n:function(){return E},W:function(){return S}});var r=n(1024),a=n(92802),i=n(99910),o=n(85887),c=n(53808),l={getCustomFormControlClassName:function(e,t,n,r,i){var o="form-control";return"sm"===r&&(o+=" form-control-sm"),"lg"===r&&(o+=" form-control-lg"),(0,a.u9)(t,n)&&(0,a.u9)(e,n)&&(o+=" is-invalid"),i&&(o+=" ".concat(i)),o}},s=n(54753),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function m(e){var t=e.label,n=e.checkboxLabelClassName,a=e.checkboxLabelFontWeight,o=e.className,c=u(e,["label","checkboxLabelClassName","checkboxLabelFontWeight","className"]);return r.createElement(i.Form.Group,null,r.createElement("div",{className:"custom-control custom-checkbox ".concat(o)},r.createElement(E,Object.assign({className:"custom-control-input"},c)),r.createElement(i.Form.Label,{className:"custom-control-label cursor-pointer ".concat("normal"===a?"font-weight-normal":""," \n ").concat(n),htmlFor:c.id},t),e.checkboxAppLink&&e.checkboxAppLinkText&&r.createElement(r.Fragment,null,r.createElement("span",null," "),r.createElement(s.F,{appLink:e.checkboxAppLink,className:"info-link"},e.checkboxAppLinkText))))}var d=n(39396),p=n(63791),f=n(66703);function y(e){var t=(0,a.u6)().values[e.fieldName];return"string"!=typeof t?r.createElement(r.Fragment,null):r.createElement("div",{className:"float-right text-muted font-weight-normal"},t.length,"/",e.limit," characters")}var v={revealPassword:"jCfI0",passwordInput:"RBJnf",passwordContainer:"d78lK",passwordContainerDisabled:"asbVo",infoTooltip:"wzyOG"};function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var h=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},b="shared.formField";function E(e){var t,n,i=e.children,l=h(e,["children"]),s=(t=r.useState(e.type),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],m=s[1],f=c.q.isFunction(i)?function(e){return i(e)}:r.Children.count(i)?i:null;if("password"!==l.type)return r.createElement(a.gN,Object.assign({},o.t.omit(l,["formSize"])),f);var y="position-relative ".concat(v.passwordContainer);return l.className&&(y+=" ".concat(l.className)),l.disabled&&(y+=" ".concat(v.passwordContainerDisabled)),r.createElement("div",{className:y},r.createElement(a.gN,Object.assign({},o.t.omit(l,["formSize","type","className"]),{type:u,className:"".concat(v.passwordInput," border-0 w-100 h-100 outline-none rounded")}),f),"password"===l.type&&r.createElement(d.x,{svgName:"password"===u?p.vn.VisibleOn:p.vn.VisibleOff,className:"svg-container cursor-pointer ".concat(v.revealPassword),onClick:function(){m("password"===u?"text":"password")}}))}function S(e){var t=e.label,n=e.className,c=e.showCharacterCounter,s=e.showRequiredStar,u=e.infoTooltip,g=e.infoTooltipPlacement,S=e.infoText,w=e.formSize,C=e.showOptionalLabel,k=h(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoTooltipPlacement","infoText","formSize","showOptionalLabel"]),A=(0,a.u6)(),O=A.errors,I=A.touched,x=function(){};if("checkbox"===k.type){var N=o.t.omit(e,["formSize"]);return e.disabled&&(N.onChange=x),r.createElement(m,Object.assign({},N))}var j=Object.assign(Object.assign({},k),{className:l.getCustomFormControlClassName(O,I,k.name,w,n)});return e.disabled&&(j.onChange=x),r.createElement(i.Form.Group,null,!!t&&r.createElement(i.Form.Label,{htmlFor:k.id,className:"d-flex align-items-center"},t,s&&r.createElement("span",{className:"text-danger"},"*"),u&&r.createElement(d.x,{className:"svg-container text-muted ".concat(v.infoTooltip),svgName:p.vn.Info,title:u,tooltipPlacement:g,tooltipSpanHack:!0}),C&&r.createElement("span",{className:"text-muted"}," ",r.createElement(f.x,{namespace:b,phrase:"optional"})),!!c&&!!k.maxLength&&r.createElement("div",{className:"ml-auto"},r.createElement(y,{fieldName:k.name,limit:k.maxLength}))),r.createElement(E,Object.assign({},j)),!!S&&r.createElement(i.Form.Text,{className:"text-muted"},S),r.createElement(a.Bc,{name:k.name},(function(e){return r.createElement(i.Form.Control.Feedback,{type:"invalid"},e)})))}E.defaultProps={autoComplete:"off"},S.defaultProps={autoComplete:"off",infoTooltipPlacement:"top"}},86347:function(e,t,n){"use strict";n.d(t,{b:function(){return u},n:function(){return s}});var r=n(1024),a=n(92802),i=n(53808),o=n(85887);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function s(e){var t=e.castInitialValues,n=e.castValuesOnSubmit,s=e.initialValues,u=e.onSubmit,m=l(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),d=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=o.t.deepClone(e);return function e(n){Object.keys(t).forEach((function(r){t.hasOwnProperty(r)&&(o.t.isObject(n[r])?e(n[r]):null===t[r]&&delete t[r])}))}(t),t}(s)):s,p={allowInitialSubmit:e.allowInitialSubmit};return r.createElement(a.J9,Object.assign({enableReinitialize:!0},m,{initialValues:d,onSubmit:function(t,r){var a=r.setSubmitting,i=r.resetForm,o=r.setFieldError,l=n&&e.validationSchema?e.validationSchema.cast(t):t;u(l,(function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.reset&&i(),n.errors)for(var r=0,l=Object.entries(n.errors);r<l.length;r++){var s=(e=l[r],t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],m=s[1];o(u,m)}a(!1)}))},initialStatus:p}),i.q.isFunction(e.children)?function(t){return e.children(t)}:r.Children.count(e.children)?e.children:null)}function u(){return(0,a.u6)()}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},84611:function(e,t,n){"use strict";n.d(t,{f:function(){return c}});var r=n(1024),a=n.n(r),i=n(39396),o={circle:"Uxnsl",img:"BQ87Y"};function c(e){return e.imageUrl||e.svgName?e.imageUrl?a().createElement("div",{className:"".concat(o.img," rounded-circle h-100 w-100"),style:{backgroundImage:"url(".concat(e.imageUrl,")")}}," "):a().createElement("div",{className:"".concat(o.circle," ").concat(e.variant?"bg-".concat(e.variant):""," text-").concat(e.textVariant," rounded-circle h-100 w-100")},a().createElement(i.x,{svgName:e.svgName,size:e.svgSize})):a().createElement(a().Fragment,null)}c.defaultProps={textVariant:"white"}},52086:function(e,t,n){"use strict";n.d(t,{g:function(){return r}});var r={PERMISSIONS:"permissions",AUDIENCE_FILTER:"audience:filter",LAYOUT_CONTAINER_FLUID:"layout:container:fluid",BULK_USER_UPLOAD:"bulk:user:upload",BULK_REMOVE_USERS:"bulk:remove:users",BULK_USER_ACTIONS:"bulk:user:actions",CURATOR_WORKING_LISTS:"curator:working:lists",LOOKING_FOR_INTEGRATION:"looking:for:integration",PRESENTATION_ID:"presentation:id"}},42905:function(e,t,n){"use strict";n.d(t,{i:function(){return o}});var r=n(57857),a=n(68003),i="shared.shared-utils",o={getEmbedResolutions:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=[{label:r.T.getPhrase(i,"small"),width:"640",height:"360"},{label:r.T.getPhrase(i,"medium"),width:"1014",height:"576"},{label:r.T.getPhrase(i,"large"),width:"1280",height:"720"}];return e&&t.unshift({label:r.T.getPhrase(i,"responsive"),width:"100%",height:"100%"}),t},getEmbedString:function(e){var t=e.url,n=e.size,r="100%"===n.width,a=r?'style="position:absolute; top:0; left:0; width:100%; height:100%;"':'width="'.concat(n.width,'" height="').concat(n.height,'"'),i='src="'.concat(t,'"'),o="<iframe ".concat(a," ").concat('frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen allow="autoplay"'," ").concat(i,"></iframe>");return r?'<div style="padding:56.25% 0 0 0; position:relative;">'.concat(o,"</div>"):o},buildEmbedUrl:function(e){var t=e.embedUrl,n=e.host,r=e.shareId,i=e.autoplay,o=e.consumerKey,c=t;c||(c=a._.safeUrlConcat(n,"share/embed/".concat(r)));var l={};return i&&(l.a=!0),o&&(l.consumerKey=o),a._.urlBuilder(c,l)}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6220],{26328:function(e,t,i){"use strict";i.r(t),i.d(t,{AwaitingReviewView:function(){return _}});var n=i(39479),r=i(31647),o=i(21679),a=i(57857),s=i(36357),c=i(48090),l=i(70763),u=i(71192),d=i(29457),h=i(14129),f=i(39090),v=i(82405),p=i(13809),g=i(48404),y=i(19226),w=i(46415),b=i(7572),m=i(71010),S=i.n(m),V=i(29565),T=i(95061);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function C(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==k(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,"string");if("object"!==k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===k(r)?r:String(r)),n)}var r}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(P,e);var t,i,m,_,R=(m=P,_=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(m);if(_){var i=O(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function P(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,P),R.apply(this,arguments)}return t=P,(i=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=o.u.getInstance(c.Or.Settings,this),this.contentUpdatesDataService=o.u.getInstance(c.Or.ContentUpdates,this),this.videoDataService=o.u.getInstance(c.Or.Video,this)}},{key:"name",get:function(){return"AwaitingReviewView"}},{key:"title",get:function(){return a.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.awaitingReview"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white rounded"}},{key:"template",get:function(){return S()}},{key:"regions",value:function(){return{header:{el:".header-region",replaceElement:!0},leftNav:{el:".left-nav-region",replaceElement:!0},listHeader:{el:".list-header-region",replaceElement:!0,partialLoading:d.LP.AwaitingReviewHeader},videos:{el:".video-list-region",replaceElement:!0,partialLoading:d.LP.VideoGroupList}}}},{key:"bindListeners",value:function(){this.listenTo(c.Vk.SETTINGS,"".concat(c.M_.CUSTOMER_SETTINGS,":sync ").concat(c.M_.USER_SETTINGS,":sync"),this.render),this.listenTo(c.Vk.CONTENT_UPDATES,"".concat(c.M_.VIDEOS_TO_REVIEW,":sync"),this.render),this.listenTo(c.Vk.RESTRICTED_VIDEO,"".concat(c.M_.VIDEOS_TO_REVIEW,":invalidate"),this.fetchVideos),this.listenTo(this.channelName,"approve:all",this.approveAllVideos),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata)}},{key:"approveAllVideos",value:function(){this.contentUpdatesDataService.approveAllVideos(n.bind(this.fetchVideos,this))}},{key:"redirectToPastReleases",value:function(){r.Q.AppLinkHelper.trigger({application:c.OV.CONTENT_UPDATES,action:c.eX.ContentUpdates.PAST_RELEASES},{replace:!0})}},{key:"getContentClassName",value:function(){var e="".concat(V.Z.content," border-left ").concat(V.Z.contentWithLeftNav);return this.videoCollection&&!this.videoCollection.length?e+=" d-inline-flex justify-content-center align-items-center":e+=" d-inline-block",e}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new l.t(this.videoCollection.map((function(e){return new u.n({id:e.get("id")})}))))}},{key:"renderHeader",value:function(){this.reviewSetting?this.showChildView("header",new b.u({activeTab:f.JI.AwaitingReview,reviewEnabled:this.reviewSetting.get("value")})):this.renderPartialLoading("header")}},{key:"renderLeftNav",value:function(){this.reviewSetting&&this.showChildView("leftNav",new w.m({supportSiteUrl:this.config.get("supportSiteUrl"),currentUser:this.currentUser}))}},{key:"renderListHeader",value:function(){this.videoCollection?this.videoCollection.length&&this.showChildView("listHeader",new h.U({collection:this.videoCollection,channelName:this.channelName})):this.renderPartialLoading("listHeader")}},{key:"renderVideos",value:function(){this.groupedVideoCollection?this.showChildView("videos",new v.D({collection:this.groupedVideoCollection,childOptions:{videoItemComponentType:p.UC.AwaitingReview,videosWithMetadata:this.videosWithMetadata,config:this.config,collectionViewChannel:this.channelName,currentUser:this.currentUser,libraries:this.libraries},emptyStateType:d.ub.AwaitingReview,emptyStateOptions:{heading:a.T.getPhrase(this.lang,"emptyStateHeading"),description:a.T.getPhrase(this.lang,"emptyStateDescription",{classNames:"disable-review info-link"})}})):this.renderPartialLoading("videos")}},{key:"fetchVideos",value:function(){this.videoCollection=this.contentUpdatesDataService.getVideosToReview(),this.videoCollection&&(this.setVideosWithMetadata(),this.groupedVideoCollection=f.hp.groupVideosByHostedLibrary(this.videoCollection))}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(i){var n=t.videosWithMetadata.get(e);n&&(n.set(i.toJSON()),n.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:g.p.config,currentUser:y.K.currentUser,libraries:T.T.libraries}}},{key:"onBeforeRender",value:function(){this.reviewSetting=this.settingsDataService.getSetting(this.currentUser.get("customerId"),s.E.LibraryReview),this.fetchVideos(),this.reviewSetting&&!this.reviewSetting.get("value")&&this.redirectToPastReleases()}},{key:"viewOptions",value:function(){return{contentClass:this.getContentClassName()}}},{key:"onRender",value:function(){this.renderHeader(),this.renderLeftNav(),this.renderListHeader(),this.renderVideos()}}])&&C(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),P}(r.Q.View)},13809:function(e,t,i){"use strict";i.d(t,{UC:function(){return n.U}});var n=i(58688);i(86605),i(14898)},71010:function(e,t,i){var n=i(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){var o;return e.propertyIsEnumerable,'<div class="header-region"></div>\n<div class="left-nav-region"></div><div class="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.contentClass:o,t))+'">\n<div class="list-header-region"></div>\n<div class="video-list-region"></div>\n</div>'},useData:!0})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6999],{46814:function(e,t,n){"use strict";n.r(t),n.d(t,{PastReleasesView:function(){return K}});var i=n(39479),r=n(31647),o=n(21679),a=n(57857),s=n(70065),l=n(52076),c=n(47022),u=n(36357),f=n(71192),h=n(70763),d=n(29457),p=n(48090),y=n(58688),v=n(48404),g=n(19226),b=n(3059),m=n(95061),w=n(39090),S=(n(14129),n(7572)),C=n(46415),P=n(56750),k=n.n(P),R=n(8614),O=n(7170),E=n(5344);function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function j(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==T(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==T(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===T(r)?r:String(r)),i)}var r}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}var L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(a,e);var t,n,i,r,o=(i=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_(i);if(r){var n=_(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"PastReleasesFiltersComponent"}},{key:"template",get:function(){return k()}},{key:"lang",get:function(){return"contentUpdates.pastReleasesFilters"}},{key:"regions",value:function(){return{filterList:{el:".filter-list-region",replaceRegion:!1,partialLoading:d.LP.PastReleasesSearchFilter}}}},{key:"getVisibleFilters",value:function(){return new O.y(this.collection.filter((function(e){return E.qr.showFilter(e)})))}},{key:"renderFilterList",value:function(){var e=new R.$V({collection:this.getVisibleFilters(),channelName:this.options.channelName});this.showChildView("filterList",e)}},{key:"onBeforeRender",value:function(){return!!this.collection}},{key:"onRender",value:function(){this.renderFilterList()}}])&&j(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),N=n(48088),I=n(68536),D=n.n(I);function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function U(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==F(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==F(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===F(r)?r:String(r)),i)}var r}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}var A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(a,e);var t,n,i,r,o=(i=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=M(i);if(r){var n=M(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"PastReleasesHeaderComponent"}},{key:"props",get:function(){return["filterCollection"]}},{key:"lang",get:function(){return"contentUpdates.pastReleasesHeader"}},{key:"className",get:function(){return"d-flex justify-content-between align-items-center p-3 border-bottom"}},{key:"template",get:function(){return D()}},{key:"regions",value:function(){return{filters:{el:".filters-region"}}}},{key:"events",value:function(){return{"click .generate-pdf":"onClickGeneratePdf"}}},{key:"onClickGeneratePdf",value:function(){N.Radio.channel(this.options.channelName).trigger("generate:pdf")}},{key:"renderFilters",value:function(){var e=new L({collection:this.filterCollection,channelName:this.options.channelName});this.showChildView("filters",e)}},{key:"viewOptions",value:function(){return{showGeneratePdf:this.options.showGeneratePdf}}},{key:"onRender",value:function(){this.renderFilters()}}])&&U(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),G=n(82405),H=n(73616),Q=n(29565),W=n(69711),B=n.n(W);function q(e){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q(e)}function z(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==q(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==q(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===q(r)?r:String(r)),i)}var r}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}function X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}var K=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(O,e);var t,n,P,k,R=(P=O,k=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=X(P);if(k){var n=X(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function O(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,O),R.call(this,e)}return t=O,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=o.u.getInstance(p.Or.Settings,this),this.contentUpdatesDataService=o.u.getInstance(p.Or.ContentUpdates,this),this.videoDataService=o.u.getInstance(p.Or.Video,this),this.libraryDataService=o.u.getInstance(p.Or.Library,this),this.videoMixinService=o.u.getInstance(p.K9.VideoMixin,this)}},{key:"name",get:function(){return"PastReleasesView"}},{key:"title",get:function(){return a.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.pastReleases"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white rounded"}},{key:"template",get:function(){return B()}},{key:"regions",value:function(){return{header:{el:".header-region",replaceElement:!0},leftNav:{el:".left-nav-region",replaceElement:!0},listHeader:{el:".list-header-region",replaceElement:!0},videos:{el:".video-list-region",replaceElement:!0,partialLoading:d.LP.VideoGroupList},pagination:{el:".pagination-region",replaceElement:!0}}}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.SETTINGS,"".concat(p.M_.CUSTOMER_SETTINGS,":sync ").concat(p.M_.USER_SETTINGS,":sync"),this.render),this.listenTo(this.channelName,"generate:pdf",this.onClickGeneratePdf),this.listenTo(p.Vk.RESTRICTED_VIDEO,"".concat(p.M_.UPDATE_VIDEO_RESTRICTION,":sync"),this.updateRestrictedVideos),this.listenTo(this.channelName,p.Vy.Filters.FILTER_CHANGED,i.debounce(this.onFilterChange,100)),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata)}},{key:"initializeFilterCollection",value:function(){var e=this;this.filterCollection||this.libraryDataService.getHostedLibraries((function(t){return e.onLibrariesSync(t)}))}},{key:"onLibrariesSync",value:function(e){var t=this;this.filterCollection||(this.libraryIds=w.RF.getLibraryIds(this.options.queryParams[H.g.Libraries],e),this.subjectCollectionIdentifier=new b.xw({dateQueryString:this.options.queryParams[H.g.ReleaseDate],libraryIds:this.libraryIds}),this.contentUpdatesDataService.getRecentVideoSubjects(this.subjectCollectionIdentifier,(function(n){return t.onSubjectsSync(e,n)})))}},{key:"onSubjectsSync",value:function(e,t){var n=w.RF.getSubjectOptions(t);this.filterCollection=w.RF.getFilterCollection(e,n,this.options.queryParams);var i=w.RF.getSelectedSubjects(this.filterCollection),r=n.length>1&&n.length===i.length;this.videoCollectionIdentifier=new b.IJ({dateQueryString:this.options.queryParams[H.g.ReleaseDate],libraryIds:this.libraryIds,subjects:!r&&i,cursor:this.options.queryParams.cursor}),this.listenTo(p.Vk.CONTENT_UPDATES,"".concat(this.videoCollectionIdentifier.toString(),":sync"),this.render),this.fetchVideos()}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new h.t(this.videoCollection.map((function(e){return new f.n({id:e.get("id")})}))))}},{key:"updateRestrictedVideos",value:function(){var e=this;this.videoMixinService.getAndMixinVideoCollectionRestrictions(this.videoCollection,null,(function(){return e.render()}))}},{key:"onFilterChange",value:function(){r.Q.AppLinkHelper.trigger({application:p.OV.CONTENT_UPDATES,action:p.eX.ContentUpdates.PAST_RELEASES,params:w.RF.getRouteQueryParams(this.filterCollection)})}},{key:"onClickGeneratePdf",value:function(){this.videoCollection.length&&(r.Q.AppLinkHelper.trigger({application:p.OV.CONTENT_UPDATES,action:p.eX.ContentUpdates.GENERATE_PDF,params:w.RF.getRouteQueryParams(this.filterCollection)}),this.logPdfAction())}},{key:"getContentClassName",value:function(){var e=Q.Z.content;return this.reviewSetting&&this.reviewSetting.get("value")?e+=" d-inline-block border-left ".concat(Q.Z.contentWithLeftNav):e+=" w-100",e}},{key:"logPdfAction",value:function(){var e={location:s.LocationContext.PastReleasesHeader,actionType:s.UserAction.Create,entity:s.EntityType.PDF,workflowPhase:s.WorkflowPhase.Start},t=w.RF.getSelectedSubjects(this.filterCollection),n=w.RF.getSelectedReleaseDate(this.filterCollection),i={libraries:this.libraryIds.join(","),subjects:t.map((function(e){return e.get("name")})).join(","),releaseDate:n.get("name")};l.k.logUserAction(i,e)}},{key:"renderHeader",value:function(){this.reviewSetting?this.showChildView("header",new S.u({activeTab:w.JI.PastReleases,reviewEnabled:this.reviewSetting.get("value")})):this.renderPartialLoading("header")}},{key:"renderLeftNav",value:function(){this.reviewSetting&&this.reviewSetting.get("value")&&this.showChildView("leftNav",new C.m({supportSiteUrl:this.config.get("supportSiteUrl"),currentUser:this.currentUser}))}},{key:"renderListHeader",value:function(){this.showChildView("listHeader",new A({filterCollection:this.filterCollection,channelName:this.channelName,showGeneratePdf:!!this.videoCollection&&!!this.videoCollection.length}))}},{key:"renderVideos",value:function(){this.config&&this.groupedVideoCollection?this.showChildView("videos",new G.D({collection:this.groupedVideoCollection,childOptions:{config:this.config,videoItemComponentType:y.U.PastReleases,videosWithMetadata:this.videosWithMetadata,customerHasCustomLibrary:this.customLibraries&&!!this.customLibraries.length,collectionViewChannel:this.channelName,currentUser:this.currentUser,libraries:this.customLibraries},emptyStateType:d.ub.PastReleases,emptyStateOptions:{heading:a.T.getPhrase(this.lang,"emptyState")}})):this.renderPartialLoading("videos")}},{key:"renderPagination",value:function(){if(this.videoCollection){var e=this.contentUpdatesDataService.getVideoCollectionCursors(this.videoCollectionIdentifier),t=new c.Q({cursors:e,appLink:{application:p.OV.CONTENT_UPDATES,action:p.eX.ContentUpdates.PAST_RELEASES,params:w.RF.getRouteQueryParams(this.filterCollection)}});this.showChildView("pagination",t)}}},{key:"fetchVideos",value:function(){this.filterCollection&&!this.videoCollection&&(this.videoCollection=this.contentUpdatesDataService.getRecentVideos(this.videoCollectionIdentifier),this.videoCollection&&(this.setVideosWithMetadata(),this.groupedVideoCollection=w.RF.groupVideosByReleaseMonth(this.videoCollection)))}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(n){var i=t.videosWithMetadata.get(e);i&&(i.set(n.toJSON()),i.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:v.p.config,currentUser:g.K.currentUser,customLibraries:m.T.libraries}}},{key:"onBeforeRender",value:function(){this.initializeFilterCollection(),this.fetchVideos(),this.videoCollection&&(this.groupedVideoCollection=w.RF.groupVideosByReleaseMonth(this.videoCollection)),this.reviewSetting=this.settingsDataService.getSetting(this.currentUser.get("customerId"),u.E.LibraryReview)}},{key:"viewOptions",value:function(){return{showLeftNav:this.reviewSetting&&this.reviewSetting.get("value"),contentClass:this.getContentClassName()}}},{key:"onRender",value:function(){this.renderHeader(),this.renderLeftNav(),this.renderListHeader(),this.renderVideos(),this.renderPagination()}}])&&z(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),O}(r.Q.View)},56750:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){return e.propertyIsEnumerable,'<div class="d-inline-block border-right py-1 pr-3"><strong>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"filters",{name:"lang",hash:{},data:r}))+'</strong></div>\n<div class="filter-list-region d-inline-block pl-2"></div>'},useData:!0})},68536:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({1:function(e,t,n,i,r){return e.propertyIsEnumerable,'<button class="generate-pdf btn btn-outline-dark d-inline-block" type="button">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"generatePdf",{name:"lang",hash:{},data:r}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){var o;return e.propertyIsEnumerable,'<div class="filters-region d-inline-block"></div>\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.showGeneratePdf:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:"")},useData:!0})},69711:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({1:function(e,t,n,i,r){return'<div class="left-nav-region"></div>'},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){var o;return e.propertyIsEnumerable,'<div class="header-region"></div>\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.showLeftNav:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:"")+'<div class="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.contentClass:o,t))+'">\n<div class="list-header-region"></div>\n<div class="video-list-region"></div>\n<div class="pagination-region"></div>\n</div>'},useData:!0})}}]);
|