@clickview/library-editor 1.30.0-dev.0 → 1.30.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +3 -0
- package/dist/bundles.json +2 -2
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{1010-1b44625dc5.chunk.js → 1010-eb374a9f8f.chunk.js} +1 -1
- package/dist/scripts/{1086-d21ab1571b.chunk.js → 1086-f5d06e0c5b.chunk.js} +1 -1
- package/dist/scripts/1203-c277e037c3.chunk.js +1 -0
- package/dist/scripts/{1216-179c1dca0d.chunk.js → 1216-0952024fc9.chunk.js} +1 -1
- package/dist/scripts/{1269-7750f731bb.chunk.js → 1269-5db1f3e32b.chunk.js} +1 -1
- package/dist/scripts/{1364-f309a5d8a4.chunk.js → 1364-f9039d1ee2.chunk.js} +1 -1
- package/dist/scripts/1409-cb53d3702a.chunk.js +1 -0
- package/dist/scripts/{1492-bd2f5f0464.chunk.js → 1492-347b4b5451.chunk.js} +1 -1
- package/dist/scripts/1601-5195376e97.chunk.js +2 -0
- package/dist/scripts/{1832-05fb3a513a.chunk.js → 1832-fec109af6c.chunk.js} +1 -1
- package/dist/scripts/{1887-8a2b0eb883.chunk.js → 1887-4c84bfbc2c.chunk.js} +1 -1
- package/dist/scripts/{1911-b6ed80578b.chunk.js → 1911-d0d31b94d3.chunk.js} +1 -1
- package/dist/scripts/{1934-cf519f798f.chunk.js → 1934-085c7af5db.chunk.js} +1 -1
- package/dist/scripts/{2417-534351f8ac.chunk.js → 2417-c1b7a71c00.chunk.js} +1 -1
- package/dist/scripts/{243-0fcc0bd4aa.chunk.js → 243-0e4a585f6b.chunk.js} +1 -1
- package/dist/scripts/{259-b76f63a2ee.chunk.js → 259-80b903e07b.chunk.js} +1 -1
- package/dist/scripts/{2692-e74bb88cee.chunk.js → 2692-f32201422c.chunk.js} +1 -1
- package/dist/scripts/{2802-fdc03b7cbd.chunk.js → 2802-d2d07a2e14.chunk.js} +1 -1
- package/dist/scripts/{2888-60217b367b.chunk.js → 2888-3175201f04.chunk.js} +1 -1
- package/dist/scripts/2910-ed197c5a6c.chunk.js +2 -0
- package/dist/scripts/{299-a68c51dea1.chunk.js → 299-eb697a2fe1.chunk.js} +1 -1
- package/dist/scripts/{3096-f81291f39b.chunk.js → 3096-30b780bfc3.chunk.js} +1 -1
- package/dist/scripts/{3400-89c8e91944.chunk.js → 3400-e1313032d6.chunk.js} +1 -1
- package/dist/scripts/{3763-d227ec26d4.chunk.js → 3763-4a058d4401.chunk.js} +1 -1
- package/dist/scripts/{4177-bd859447e3.chunk.js → 4177-8542f33a9e.chunk.js} +1 -1
- package/dist/scripts/{4201-45a03056c5.chunk.js → 4201-f94b39b95c.chunk.js} +1 -1
- package/dist/scripts/{4245-4a9bc98dd1.chunk.js → 4245-24ff0831a9.chunk.js} +1 -1
- package/dist/scripts/{4591-9c393bb4f0.chunk.js → 4591-e833ab486c.chunk.js} +1 -1
- package/dist/scripts/{4860-cee113f038.chunk.js → 4860-d7c8e49e0d.chunk.js} +1 -1
- package/dist/scripts/{4885-0d95be029d.chunk.js → 4885-5fcb0b3d21.chunk.js} +1 -1
- package/dist/scripts/{514-7568d91f34.chunk.js → 514-d673e4c14b.chunk.js} +1 -1
- package/dist/scripts/{5412-a0dbe6535a.chunk.js → 5412-1265924394.chunk.js} +1 -1
- package/dist/scripts/{5418-e51bdb3d98.chunk.js → 5418-a7053d4a2c.chunk.js} +1 -1
- package/dist/scripts/{5424-bb8349e9cd.chunk.js → 5424-1b544811d8.chunk.js} +1 -1
- package/dist/scripts/{546-589df6c985.chunk.js → 546-59fc707522.chunk.js} +1 -1
- package/dist/scripts/{5745-3c8daea973.chunk.js → 5745-cec88916be.chunk.js} +1 -1
- package/dist/scripts/{5747-a680b5805f.chunk.js → 5747-c05ef8604b.chunk.js} +1 -1
- package/dist/scripts/{6093-8ccfabcb0f.chunk.js → 6093-56f14abebe.chunk.js} +1 -1
- package/dist/scripts/{6220-47defcafc9.chunk.js → 6220-d6790a5103.chunk.js} +1 -1
- package/dist/scripts/{6357-36bc959cdf.chunk.js → 6357-d64273e6be.chunk.js} +1 -1
- package/dist/scripts/{6505-fb7b7b7e55.chunk.js → 6505-c885c92dd7.chunk.js} +1 -1
- package/dist/scripts/{6732-a735767a4b.chunk.js → 6732-f42320176e.chunk.js} +1 -1
- package/dist/scripts/{6756-08cd64d51a.chunk.js → 6756-fc2569ee11.chunk.js} +1 -1
- package/dist/scripts/{6774-d375551111.chunk.js → 6774-05ef6b24a0.chunk.js} +1 -1
- package/dist/scripts/{6995-9a68473ffa.chunk.js → 6995-643c2542a3.chunk.js} +1 -1
- package/dist/scripts/{6999-6745720f22.chunk.js → 6999-a2d2c853c7.chunk.js} +1 -1
- package/dist/scripts/{7002-048146dccc.chunk.js → 7002-5875ed0069.chunk.js} +1 -1
- package/dist/scripts/{7053-d1bdf2217e.chunk.js → 7053-269864a2d6.chunk.js} +1 -1
- package/dist/scripts/{708-da8e0bff2d.chunk.js → 708-c0692908d8.chunk.js} +1 -1
- package/dist/scripts/{7376-180679e905.chunk.js → 7376-27b6790926.chunk.js} +1 -1
- package/dist/scripts/{7634-455f30db13.chunk.js → 7634-96a8c961da.chunk.js} +1 -1
- package/dist/scripts/{8362-1c2f8107ad.chunk.js → 8362-148a50f032.chunk.js} +1 -1
- package/dist/scripts/{8727-476da527b7.chunk.js → 8727-abd1ecc0fa.chunk.js} +1 -1
- package/dist/scripts/{8762-a2ef356ce4.chunk.js → 8762-4bce0c7009.chunk.js} +1 -1
- package/dist/scripts/{8906-ba9fbbbb83.chunk.js → 8906-17fef7d1d4.chunk.js} +1 -1
- package/dist/scripts/{8947-a6cab5c909.chunk.js → 8947-ddae6c9c08.chunk.js} +1 -1
- package/dist/scripts/{9357-4817f7443a.chunk.js → 9357-37ddba8d25.chunk.js} +1 -1
- package/dist/scripts/{9695-8b51eba3e6.chunk.js → 9695-067d97c1ad.chunk.js} +1 -1
- package/dist/scripts/{9927-76bba47293.chunk.js → 9927-ab6248ad0e.chunk.js} +1 -1
- package/dist/scripts/{9929-e02d0ea2ca.chunk.js → 9929-28d73a1cd9.chunk.js} +1 -1
- package/dist/scripts/{9976-53ef9aa588.chunk.js → 9976-72ce08e5c6.chunk.js} +1 -1
- package/dist/scripts/bundle-5e8909bb2b.min.js +2 -0
- package/package.json +74 -73
- package/typings/libs/CVEvents.d.ts +12 -12
- package/typings/libs/CVLanguages.d.ts +24 -24
- package/typings/libs/Environment.d.ts +10 -10
- package/typings/libs/LazyLoad.d.ts +29 -29
- package/typings/libs/LazyLoad.ts +27 -27
- package/typings/libs/backbone.validation.d.ts +99 -99
- package/typings/libs/cloneDeep.d.ts +4 -4
- package/typings/libs/cookiesjs.d.ts +24 -24
- package/typings/libs/google-api.d.ts +4 -4
- package/typings/libs/microsoft-teams.d.ts +2 -2
- package/typings/libs/trackjs.d.ts +2 -2
- package/typings/libs/videojs-contrib-quality-levels.d.ts +30 -30
- package/typings/utils/imports.d.ts +9 -9
- package/dist/scripts/1409-0f41bf4544.chunk.js +0 -1
- package/dist/scripts/1601-1de918406b.chunk.js +0 -2
- package/dist/scripts/2910-a9424e3008.chunk.js +0 -2
- package/dist/scripts/9554-70701d089a.chunk.js +0 -1
- package/dist/scripts/bundle-bdcc61abe9.min.js +0 -2
- /package/dist/css/{9554-library-editor-36f0a42508.chunk.css → 1203-library-editor-36f0a42508.chunk.css} +0 -0
- /package/dist/scripts/{101-00e92a2abf.chunk.js → 101-c79ad403db.chunk.js} +0 -0
- /package/dist/scripts/{1601-1de918406b.chunk.js.LICENSE.txt → 1601-5195376e97.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{1934-cf519f798f.chunk.js.LICENSE.txt → 1934-085c7af5db.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2802-fdc03b7cbd.chunk.js.LICENSE.txt → 2802-d2d07a2e14.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2803-9bdf584e2d.chunk.js → 2803-2b7194894b.chunk.js} +0 -0
- /package/dist/scripts/{2910-a9424e3008.chunk.js.LICENSE.txt → 2910-ed197c5a6c.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{343-821094d1ed.chunk.js → 343-c8ab80b44d.chunk.js} +0 -0
- /package/dist/scripts/{3511-a1cf32ed8a.chunk.js → 3511-7adc5f4104.chunk.js} +0 -0
- /package/dist/scripts/{3639-3b07fce6d4.chunk.js → 3639-df89ef6c33.chunk.js} +0 -0
- /package/dist/scripts/{3746-74a690720e.chunk.js → 3746-4ccea7acfa.chunk.js} +0 -0
- /package/dist/scripts/{3969-d89f9b6851.chunk.js → 3969-8aea96a0bb.chunk.js} +0 -0
- /package/dist/scripts/{4523-807065f612.chunk.js → 4523-883e337fac.chunk.js} +0 -0
- /package/dist/scripts/{4784-b9108dad5d.chunk.js → 4784-675e8ae84f.chunk.js} +0 -0
- /package/dist/scripts/{5173-2f800d0272.chunk.js → 5173-3ce30f3a17.chunk.js} +0 -0
- /package/dist/scripts/{5235-af56909b6a.chunk.js → 5235-79c40407fb.chunk.js} +0 -0
- /package/dist/scripts/{5745-3c8daea973.chunk.js.LICENSE.txt → 5745-cec88916be.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5891-8bf8f33952.chunk.js → 5891-9dd6330101.chunk.js} +0 -0
- /package/dist/scripts/{6788-32797fffcf.chunk.js → 6788-5a391d38ed.chunk.js} +0 -0
- /package/dist/scripts/{6963-0786b00366.chunk.js → 6963-886e8b40b6.chunk.js} +0 -0
- /package/dist/scripts/{6991-fe32e78e15.chunk.js → 6991-75b3d8dc88.chunk.js} +0 -0
- /package/dist/scripts/{7190-d934189eb3.chunk.js → 7190-a2e8d20ecf.chunk.js} +0 -0
- /package/dist/scripts/{7433-993e53ded6.chunk.js → 7433-abdbfcb6b7.chunk.js} +0 -0
- /package/dist/scripts/{8330-15f3b76292.chunk.js → 8330-e7b59de85d.chunk.js} +0 -0
- /package/dist/scripts/{8495-b933e1f2f9.chunk.js → 8495-42243eaf11.chunk.js} +0 -0
- /package/dist/scripts/{9770-0c60f23d09.chunk.js → 9770-521b4d655d.chunk.js} +0 -0
- /package/dist/scripts/{bundle-bdcc61abe9.min.js.LICENSE.txt → bundle-5e8909bb2b.min.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{polyfills-38dbf24865.min.js → polyfills-4af83b8e50.min.js} +0 -0
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import videojs from 'video.js';
|
|
2
|
-
|
|
3
|
-
declare module 'video.js' {
|
|
4
|
-
export interface VideoJsPlayer {
|
|
5
|
-
qualityLevels(): QualityLevelList;
|
|
6
|
-
nextVideoPlugin(): any;
|
|
7
|
-
resourcesPlugin(options: ResourcesPluginOptions): void;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare module 'videojs-contrib-quality-levels' {
|
|
12
|
-
export interface QualityLevelList extends videojs.EventTarget {
|
|
13
|
-
[id: string]: QualityLevel;
|
|
14
|
-
selectedIndex: number;
|
|
15
|
-
length: number;
|
|
16
|
-
addQualityLevel(representation: Representation): QualityLevel;
|
|
17
|
-
removeQualityLevel(qualityLevel: QualityLevel): QualityLevel;
|
|
18
|
-
getQualityLevelById(id: string): QualityLevel;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface QualityLevel {
|
|
22
|
-
id: string;
|
|
23
|
-
label: string;
|
|
24
|
-
enabled: boolean;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface Representation {
|
|
28
|
-
id: string;
|
|
29
|
-
enabled(enabled: boolean): boolean;
|
|
30
|
-
}
|
|
1
|
+
import videojs from 'video.js';
|
|
2
|
+
|
|
3
|
+
declare module 'video.js' {
|
|
4
|
+
export interface VideoJsPlayer {
|
|
5
|
+
qualityLevels(): QualityLevelList;
|
|
6
|
+
nextVideoPlugin(): any;
|
|
7
|
+
resourcesPlugin(options: ResourcesPluginOptions): void;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module 'videojs-contrib-quality-levels' {
|
|
12
|
+
export interface QualityLevelList extends videojs.EventTarget {
|
|
13
|
+
[id: string]: QualityLevel;
|
|
14
|
+
selectedIndex: number;
|
|
15
|
+
length: number;
|
|
16
|
+
addQualityLevel(representation: Representation): QualityLevel;
|
|
17
|
+
removeQualityLevel(qualityLevel: QualityLevel): QualityLevel;
|
|
18
|
+
getQualityLevelById(id: string): QualityLevel;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface QualityLevel {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Representation {
|
|
28
|
+
id: string;
|
|
29
|
+
enabled(enabled: boolean): boolean;
|
|
30
|
+
}
|
|
31
31
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Define our templates as a module so that we can use
|
|
3
|
-
* import statements just the same as we do for other
|
|
4
|
-
* ts/js code.
|
|
5
|
-
*/
|
|
6
|
-
declare module '*.handlebars';
|
|
7
|
-
declare module '*.hbs';
|
|
8
|
-
declare module '*.scss';
|
|
9
|
-
declare module '*.svg';
|
|
1
|
+
/**
|
|
2
|
+
* Define our templates as a module so that we can use
|
|
3
|
+
* import statements just the same as we do for other
|
|
4
|
+
* ts/js code.
|
|
5
|
+
*/
|
|
6
|
+
declare module '*.handlebars';
|
|
7
|
+
declare module '*.hbs';
|
|
8
|
+
declare module '*.scss';
|
|
9
|
+
declare module '*.svg';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1409],{71641:function(e,t,n){"use strict";n.d(t,{w:function(){return a}});var r=n(39479),o=n(31647),i=n(55142);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 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,(void 0,o=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)}(r.key),"symbol"===c(o)?o:String(o)),r)}var o}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(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&&s(e,t)}(p,e);var t,n,o,a,f=(o=p,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=l(o);if(a){var n=l(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===c(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(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),f.call(this,e)}return t=p,n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,r=e.extraClasses,o="dropdown-menu-".concat(n);return r&&(o="".concat(o," ").concat(r)),o}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],n&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(o.Q.ComponentCollection)},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 c(e,t,n){return(t=s(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,s(r.key),r)}}function s(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 l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(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&&l(e,t)}(p,e);var t,n,r,s,f=(r=p,s=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=a(r);if(s){var n=a(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 c(e={},o.ZV.Disabled,!0),c(e,o.ZV.Hidden,!1),e}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.Model)},31409:function(e,t,n){"use strict";n.r(t),n.d(t,{RestrictAccessView:function(){return le}});var r=n(39479),o=n(48088),i=n(31647),c=n(21679),u=n(57857),s=n(63791),l=n(56210),a=n(98985),f=n(25692),p=n(67670),d=n(10101),y=n(70065),h=n(52076),b=n(61843),m=n(13052),g=n(48090),v=n(19226),w=n(48404),O=n(29457),S=n(88172),k=n(71641),j=n(28492),P=n.n(j);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 R(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"!==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)}(r.key),"symbol"===C(o)?o:String(o)),r)}var o}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}var E=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&&T(e,t)}(c,e);var t,n,r,o,i=(r=c,o=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=_(r);if(o){var n=_(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===C(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 c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),i.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){var e=this.model?this.model.get("id"):"";b.yV.setSelected(e,this.collection),this.listenTo(this.options.channelName,this.options.eventName,this.onSelect)}},{key:"name",get:function(){return"DropdownComponent"}},{key:"template",get:function(){return P()}},{key:"className",get:function(){return this.options.buttonClass?"select-channel ".concat(this.options.buttonClass):"select-channel"}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"onSelect",value:function(e){b.yV.setSelected(e.get("id"),this.collection),this.render()}},{key:"viewOptions",value:function(){var e=b.yV.getSelected(this.collection);return Object.assign({selected:e&&e.get("name")},this.options)}},{key:"getIsOptionDisabledFn",value:function(){var e=b.yV.getSelected(this.collection),t=e&&e.id;return function(){return!!t&&(t=t.toString(),this.model.get("id").toString()===t)}}},{key:"renderChannelDropdown",value:function(){this.showChildView("dropdown",new k.w({collection:this.collection,channelName:this.options.channelName,childOptions:{titleProperty:this.options.titleProperty,isDisabled:this.getIsOptionDisabledFn(),eventName:this.options.eventName},displayOptions:this.options.displayOptions,analyticsHelper:this.options.analyticsHelper}))}},{key:"onRender",value:function(){this.renderChannelDropdown()}}])&&R(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.Q.Component),I={select:"iQmg0",selectButton:"T67RV",svgContainer:"bNfyr",groupButton:"YOe2E",groupButtons:"q45Xi",groupButtonSelected:"FU9Dm",buttonDisabled:"UTSW5",mediumWeight:"CexaV"},N=n(26033),V=n.n(N);function x(e){return x="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},x(e)}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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"!==x(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===x(o)?o:String(o)),r)}var o}function B(e,t,n){return t&&D(e.prototype,t),n&&D(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function G(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&&M(e,t)}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}function U(e){var t=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}}();return function(){var n,r=F(e);if(t){var o=F(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===x(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,n)}}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}var Y=function(e){G(n,e);var t=U(n);function n(){return A(this,n),t.apply(this,arguments)}return B(n,[{key:"name",get:function(){return"RestrictAccessYearGroupItemView"}},{key:"className",get:function(){var e="btn text-center p-0 pb-1 pt-1 ".concat(I.groupButton);return this.model.get("selected")&&(e+=" ".concat(I.groupButtonSelected)),e}},{key:"tagName",get:function(){return"button"}},{key:"attributes",get:function(){var e=100/this.model.collection.length;return{type:"button",style:"width: ".concat(e,"%")}}},{key:"template",get:function(){var e=this.model.get("year");return function(){return"<span>".concat(e,"</span>")}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){o.Radio.channel(this.options.channelName).trigger("group:selected",this.model)}}]),n}(i.Q.Component),Q=function(e){G(n,e);var t=U(n);function n(){return A(this,n),t.apply(this,arguments)}return B(n,[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"RestrictAccessYearGroupComponentCollection"}},{key:"className",get:function(){return"btn-group w-100 ".concat(I.groupButtons)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"childView",get:function(){return Y}},{key:"childViewOptions",get:function(){return{channelName:this.channelName}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"group:selected",this.onYearGroupSelected)}},{key:"onYearGroupSelected",value:function(e){this.collection.each((function(t){return t.set("selected",t.get("groupId")<=e.get("groupId"))})),this.model.set("groupId",e.get("groupId")),this.model.set("yearGroup",e.get("groupId")),this.render()}},{key:"onBeforeRender",value:function(){var e=this.model.get("yearGroup")||this.model.get("groupId");e&&(this.collection.each((function(t){return t.set("selected",t.get("groupId")<=e)})),this.model.set("groupId",e))}}]),n}(i.Q.CollectionView),L=function(e){G(n,e);var t=U(n);function n(){return A(this,n),t.apply(this,arguments)}return B(n,[{key:"initialize",value:function(){this.configDataService=c.u.getInstance(g.Or.Config,this)}},{key:"name",get:function(){return"RestrictAccessGroupComponent"}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"props",get:function(){return["configDataService","currentUser"]}},{key:"template",get:function(){return V()}},{key:"bindings",get:function(){var e=this;return{"[name=year]":{observe:"groupId",onGet:function(t){return e.buildGroupMessage(t)},updateMethod:"html",escape:!1}}}},{key:"regions",value:function(){return{yearGroupList:{replaceElement:!0,el:".year-group-region"}}}},{key:"requiredResources",get:function(){return{currentUser:v.K.currentUser}}},{key:"viewOptions",value:function(){return{styles:I}}},{key:"onBeforeRender",value:function(){var e=this;this.yearGroups||this.getYearGroups(),r.some(this.yearGroups,(function(t){return t.groupId===e.model.get("groupId")}))||this.model.set("groupId",void 0)}},{key:"onRender",value:function(){this.stickit(),this.showChildView("yearGroupList",new Q({model:this.model,collection:new i.Q.Collection(this.yearGroups)}))}},{key:"onBeforeDestroy",value:function(){this.unstickit()}},{key:"getYearGroups",value:function(){var e=this,t=this.configDataService.getCustomerYearGroups(this.currentUser.get("countryCode"));this.yearGroups=[],r.keys(O.lA).forEach((function(n){var o=parseInt(n,10);if(!r.isNaN(o)&&r.contains(t,o)){var i=o===O.lA.Kindergarten?"K":O.lA[o].replace("Year","Y");e.yearGroups.push({year:i,groupId:o})}}))}},{key:"buildGroupMessage",value:function(e){if(e){var t=b.S9.mapYearGroupToName(e);return u.T.getPhrase(this.lang,"selectedYearGroups",{classNames:I.mediumWeight,groupName:t})}return u.T.getPhrase(this.lang,"selectYearGroups")}}]),n}(i.Q.Component);function Z(e){return Z="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},Z(e)}function H(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"!==Z(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===Z(o)?o:String(o)),r)}var o}function z(e,t){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},z(e,t)}function K(e){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K(e)}var q=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&&z(e,t)}(c,e);var t,n,r,o,i=(r=c,o=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=K(r);if(o){var n=K(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Z(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 c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"name",get:function(){return"RestrictAccessComponent"}},{key:"template",get:function(){var e=this;return function(){return"<p>".concat(e.getTemplateText(),"</p>")}}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"getTemplateText",value:function(){return u.T.getPhrase(this.lang,"groupNoAccess",{groupName:b.S9.mapYearGroupToName(this.model.get("groupId"))})}}])&&H(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.Q.Component);function W(e){return W="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},W(e)}function $(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"!==W(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==W(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===W(o)?o:String(o)),r)}var o}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 ee,te=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)}(c,e);var t,n,r,o,i=(r=c,o=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(r);if(o){var n=X(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===W(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 c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"name",get:function(){return"RestrictAccessNoneComponent"}},{key:"template",get:function(){var e=this;return function(){return"<p>".concat(e.getTemplateText(),"</p>")}}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"getTemplateText",value:function(){return u.T.getPhrase(this.lang,"noGroupSelected")}}])&&$(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.Q.Component),ne=n(59047),re=n.n(ne),oe=n(264);function ie(e){return ie="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},ie(e)}function ce(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"!==ie(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==ie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===ie(o)?o:String(o)),r)}var o}function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}function se(e){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},se(e)}!function(e){e.None="Select a group...",e.Students="Students",e.Groups="Certain year groups",e.All="Students and staff"}(ee||(ee={}));var le=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&&ue(e,t)}(C,e);var t,n,k,j,P=(k=C,j=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=se(k);if(j){var n=se(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===ie(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 C(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,C),P.call(this,e)}return t=C,(n=[{key:"initialize",value:function(){this.restriction=new m.g({groupId:O.lA.Students}),this.selected=ee.None,this.bindListeners(),this.videoDataService=c.u.getInstance(g.Or.Video,this),this.restrictedVideoDataService=c.u.getInstance(g.Or.RestrictedVideo,this),this.videoMixinService=c.u.getInstance(g.K9.VideoMixin,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"dropdown:selected",this.onOptionSelected),this.listenTo(this.restriction,"change:groupId",this.onGroupChanged),this.listenTo(g.Vk.VIDEO,"".concat(g.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(g.Vk.RESTRICTED_VIDEO,"".concat(g.M_.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render)}},{key:"name",get:function(){return"RestrictAccessView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"shared.restrictAccess"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"channelName",get:function(){return b.N0.generateUniqueChannelName(this)}},{key:"template",get:function(){return re()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:d.Yw,title:u.T.getPhrase(this.lang,"popupHeading"),modalClasses:I.modal,hideCloseButton:!0,size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new p.v,buttonText:u.T.getPhrase(this.lang,"updateAccess"),tooltip:function(){return e.getSubmitBtnTooltipOptions()},onClick:function(t){return e.onSubmit(t)}},buttons:[{text:u.T.getPhrase(this.lang,"allowFullAccess"),getClassName:function(){return e.getAllowFullAccessBtnClassName()}}]},{behaviorClass:l.H,selector:".".concat(I.svgContainer),title:u.T.getPhrase(this.lang,"findOutMore")}]}},{key:"elements",get:function(){return{submit:"submit"}}},{key:"events",value:function(){return{submit:"onSubmit","click .allow-full-access":"onAllowFullAccess"}}},{key:"regions",value:function(){return{dropdown:".dropdown-region",accessView:{replaceElement:!0,el:".access-view-region"}}}},{key:"getAllowFullAccessBtnClassName",value:function(){var e="btn btn-link cursor-pointer mr-2 allow-full-access";return this.dataFetched()&&!this.spinnerModel.get(S.ZV.ShowSpinner)||(e+=" disabled"),e}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.dataFetched()&&this.spinnerModel.get(S.ZV.Disabled))return{title:u.T.getPhrase(this.lang,"selectYear")}}},{key:"onOptionSelected",value:function(e){this.refreshRestriction();var t=this.getAccessView(e.get("name"));this.spinnerModel.set(S.ZV.Disabled,e.get("name")===ee.None),this.showChildView("accessView",new t({model:this.restriction,currentUser:this.currentUser})),this.renderDropdown()}},{key:"onGroupChanged",value:function(e){this.isRendered()&&this.spinnerModel.set(S.ZV.Disabled,r.isUndefined(e.get("groupId")))}},{key:"getAccessView",value:function(e){switch(this.selected=e,e){case ee.None:return te;case ee.Students:return this.restriction.set("groupId",O.lA.Students),q;case ee.Groups:return L;case ee.All:return this.restriction.set("groupId",O.lA.All),q}}},{key:"getSelection",value:function(e){switch(e){case O.lA.All:case O.lA.Staff:return ee.All;case O.lA.Students:return ee.Students;default:return ee.Groups}}},{key:"refreshRestriction",value:function(){if(this.restrictedObjectCollection&&this.restrictedObjectCollection.length&&this.model){this.videoMixinService.mixinVideoRestriction(this.model,this.restrictedObjectCollection);var e=this.model.restrictions.last();e&&r.isNumber(e.get("groupId"))&&(this.restriction.set("groupId",e.get("groupId")),this.selected=this.getSelection(e.get("groupId")))}}},{key:"onSubmit",value:function(e){var t=this;if(e&&e.preventDefault(),r.isUndefined(this.restriction.get("groupId")))return!1;o.Radio.channel(this.channelName).trigger(S.I3.ShowSpinner),this.restrictedVideoDataService.updateVideoRestriction(this.options.videoId,this.restriction.get("groupId"),this.currentUser.get("customerId"),this.currentUser.get("id"),(function(){return t.triggerMethod("hide")})),this.logAction(this.restriction.get("groupId"))}},{key:"onAllowFullAccess",value:function(){var e=this;this.dataFetched()&&!this.spinnerModel.get(S.ZV.ShowSpinner)&&(this.spinnerModel.set(S.ZV.Disabled,!0),this.restriction.set("groupId",O.lA.All),this.restrictedVideoDataService.deleteVideoRestriction(this.options.videoId,(function(){return e.triggerMethod("hide")})),this.logAction())}},{key:"logAction",value:function(e){var t={location:y.LocationContext.Popup,actionType:y.UserAction.SetAccess,entity:y.EntityType.Video,workflowPhase:y.WorkflowPhase.Complete},n={id:this.model.get("id"),restriction:!!r.isNumber(e)&&O.lA[e]};h.k.logUserAction(n,t)}},{key:"dataFetched",value:function(){return!!this.model&&!!this.restrictedObjectCollection}},{key:"renderDropdown",value:function(){var e=this;this.collection=new i.Q.Collection([{name:ee.None},{name:ee.Students},{name:ee.Groups},{name:ee.All}]),this.collection.each((function(t){return t.set("selected",t.get("name")===e.selected)})),this.showChildView("dropdown",new E({titleProperty:"name",eventName:"dropdown:selected",buttonId:"select-btn",collection:this.collection,channelName:this.channelName,buttonClass:I.selectButton,displayOptions:{extraClasses:"w-100"},analyticsHelper:h.k}))}},{key:"requiredResources",get:function(){return{config:w.p.config,currentUser:v.K.currentUser}}},{key:"onBeforeRender",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.restrictedObjectCollection=this.restrictedVideoDataService.getVideoRestrictions([this.options.videoId]),this.model&&this.restrictedObjectCollection&&this.refreshRestriction(),this.dataFetched()&&this.spinnerModel.set(S.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){return{styles:I,supportUrl:!oe.g.hasLite&&a.o.getOnlineArticle(f.s.VideoAccess),svg:s.Nj.getSvg(s.vn.Info),dataFetched:this.dataFetched(),spinnerEl:b.Kp.getSpinner({size:b.Ey.Large,extraClasses:"mx-auto"}),restrictFromLabel:u.T.getPhrase(this.lang,"popupSubheading")}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderDropdown(),this.onOptionSelected(new i.Q.Model({name:this.selected})))}}])&&ce(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),C}(i.Q.View)},28492:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.lambda,u=e.escapeExpression;return'<label for="'+u(c(null!=(i=null!=t?t.options:t)?i.buttonId:i,t))+'" class="control-label">'+u(c(null!=(i=null!=t?t.options:t)?i.labelText:i,t))+"</label>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.lambda,u=e.escapeExpression;return(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.labelText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<button class="dropdown-toggle form-control btn-block text-left '+u(c(null!=(i=null!=t?t.options:t)?i.buttonClass:i,t))+'" type="button" id="'+u(c(null!=(i=null!=t?t.options:t)?i.buttonId:i,t))+'" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\r\n '+u(c(null!=(i=null!=t?t.options:t)?i.selected:i,t))+'\r\n</button>\r\n<div class="dropdown-menu-region"></div>'},useData:!0})},59047: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:"")+"\r\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.lambda,u=e.escapeExpression;return'<div class="d-flex align-items-center">\r\n<label class="control-label m-0 pb-2">'+u(c(null!=(i=null!=t?t.options:t)?i.restrictFromLabel:i,t))+"</label>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.supportUrl:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="dropdown-region '+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.select:i,t))+' mb-3"></div>\r\n<div class="access-view-region"></div>\r\n'},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.lambda,u=e.escapeExpression;return'<a \r\n class="d-inline-block ml-1 mb-3 '+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'"\r\n title="'+u((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"findOutMore",{name:"lang",hash:{},data:o}))+'"\r\n href="'+u(c(null!=(i=null!=t?t.options:t)?i.supportUrl:i,t))+'" \r\n target="_blank"\r\n>\r\n '+(null!=(i=c(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+"\r\n</a>\r\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})},26033:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="year-group-region"></div>\r\n<div name="year" class="mt-3"></div>'},useData:!0})}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 1601-1de918406b.chunk.js.LICENSE.txt */
|
|
2
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1601],{70680:function(e,t,n){"use strict";n.d(t,{r:function(){return y}});var r=n(31647),i=n(88172),o=n(61843),a=n(57857),s=n(26457),c=n(40622),l=n(97781),u=n.n(l);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===h(i)?i:String(i)),r)}var i}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(m,e);var t,n,l,y,v=(l=m,y=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=d(l);if(y){var n=d(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 m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),v.call(this,e)}return t=m,(n=[{key:"initialize",value:function(){this.spinnerModel=new r.Q.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,c.LibraryEditorActions.MergeChapters,this.onClickMergeChapters)}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return u()}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(i.ZV.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==s.Um.New&&this.model.get("status")!==s.Um.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:a.T.getPhrase(this.lang,"mergeChapters"),subtitles:a.T.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:a.T.getPhrase(this.lang,"enabledCustomSubtitles")},t=new i.Py({buttonText:e[this.options.type],extraButtonClass:"btn-dark ".concat("XKFne"),model:this.spinnerModel,spinnerOptions:{size:o.Ey.Small,type:o.dR.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:c.LibraryEditorActions.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:a.T.getPhrase(this.lang,"chaptersHeading"),line1:a.T.getPhrase(this.lang,"chaptersInfo1"),line2:a.T.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:a.T.getPhrase(this.lang,"subtitlesHeading"),line1:a.T.getPhrase(this.lang,"subtitlesInfo1"),line2:a.T.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:a.T.getPhrase(this.lang,"cvSubtitlesHeading"),line1:a.T.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:a.T.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&a.T.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(i.ZV.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===s.Um.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(r.Q.Component)},21053:function(e,t,n){"use strict";n.d(t,{W:function(){return v}});var r=n(48088),i=n(31647),o={svgContainer:"mtegw"},a=n(43791),s=n.n(a),c=n(48090),l=n(35630),u=n(57085),h=n(57857);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===p(i)?i:String(i)),r)}var i}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(m,e);var t,n,i,a,v=(i=m,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(i);if(a){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),v.call(this,e)}return t=m,(n=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return s()}},{key:"viewOptions",value:function(){return{styles:o}}},{key:"onSave",value:function(){r.Radio.channel(c.OV.LIBRARY_EDITOR).trigger(c.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:h.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:h.T.getPhrase(this.lang,"chapters")};case"resources":return{name:h.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new l.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new u.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.Q.Component)},16704:function(e,t,n){"use strict";n.r(t),n.d(t,{EditChaptersView:function(){return q}});var r=n(39479),i=n(31647),o=n(21679),a=n(57857),s=n(99748),c=n(59054),l=n(99952),u=n(74749),h=n(61843),p=n(48090),f=n(48404),d=n(29457),y=n(70065),v=n(52076),m=n(89167),g=n(13156),b=n(19226),w=n(227),C=n(264),E=n(21053),k=n(70680),P=n(45114),T=n(70693),O=n(56906),S=n(40622),L=n(7190),_=n(26457),x=n(61159),R=n.n(x),j=n(95061);function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function I(){I=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),s=new x(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var p="suspendedStart",f="suspendedYield",d="executing",y="completed",v={};function m(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var C=Object.getPrototypeOf,E=C&&C(C(R([])));E&&E!==n&&r.call(E,a)&&(w=E);var k=b.prototype=m.prototype=Object.create(w);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function T(e,t){function n(i,o,a,s){var c=h(e[i],e,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==V(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=p;return function(o,a){if(i===d)throw new Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=S(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=d;var l=h(t,n,r);if("normal"===l.type){if(i=r.done?y:f,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=y,r.method="throw",r.arg=l.arg)}}}function S(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=h(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(V(t)+" is not iterable")}return g.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},P(T.prototype),l(T.prototype,s,(function(){return this})),t.AsyncIterator=T,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new T(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=R,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;_(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==V(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==V(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===V(i)?i:String(i)),r)}var i}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}function U(e){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},U(e)}var q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(B,e);var t,n,x,q,M=(x=B,q=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=U(x);if(q){var n=U(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function B(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,B),(t=M.call(this,e))._viewKeyRequested=!1,t}return t=B,(n=[{key:"initialize",value:function(){this.bindListeners(),this.initializeDataServices(),h.Si.initBackButton()}},{key:"name",get:function(){return"EditVideoChaptersView"}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editChapters"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"template",get:function(){return R()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:d.LP.EditVideoTabs},webplayer:{replaceElement:!0,el:".webplayer-region",partialLoading:d.LP.WebPlayer},addChapter:{replaceElement:!0,el:".add-chapter-region",partialLoading:d.LP.EditVideoChaptersForm},chapterList:{replaceElement:!0,el:".chapter-list-region",partialLoading:d.LP.EditVideoChapterList}}}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.Vk.CHAPTER,"".concat(p.M_.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError),this.listenTo(this.channelName,S.LibraryEditorActions.CreateChapter,this.onCreateChapter),this.listenTo(this.channelName,S.LibraryEditorActions.UpdateChapter,this.onUpdateChapter),this.listenTo(this.channelName,S.LibraryEditorActions.DeleteChapter,this.onDeleteChapter),this.listenTo(this.channelName,S.LibraryEditorActions.UpdateChapterTime,this.onTimeInputUpdate),this.listenTo(this.channelName,S.LibraryEditorActions.SeekToChapter,this.onSeekToChapter),this.listenTo(this.channelName,S.LibraryEditorActions.MergeChapters,this.onMergeChapters)}},{key:"initializeDataServices",value:function(){this.videoDataService=o.u.getInstance(p.Or.Video,this),this.chapterDataService=o.u.getInstance(p.Or.Chapter,this),this.playerDataService=o.u.getInstance(p.Or.Player,this)}},{key:"onVideoDataError",value:function(e){switch(e.type){case s.h.NotFound:i.Q.ErrorHelper.throw(new O.l1);break;case s.h.Forbidden:i.Q.ErrorHelper.throw(new O.aV)}}},{key:"onConcatenateDataError",value:function(e){e.type===s.h.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"updateChapters",value:function(){var e=this;if(C.g.hasLite){var t=this.chapters.toJSON().reverse().reduce((function(t,n){var r,i=t[t.length-1];return[].concat(function(e){if(Array.isArray(e))return D(e)}(r=t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[{timestamp:n.startTime,endTimestamp:(null==i?void 0:i.timestamp)||e.player.duration(),name:n.name}])}),[]).reverse();this.player.setChapters(t)}}},{key:"onCreateChapter",value:function(e){0===this.chapters.length&&0!==e.startTime&&this.createChapter({name:a.T.getPhrase(this.lang,"intro"),startTime:0}),this.createChapter(e)}},{key:"createChapter",value:function(e){var t=this,n=new u.W(e);this.chapters.add(n),n.set("loading",!0),this.chapterDataService.createChapter(this.model.get("id"),e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.renderChapterForm(),t.updateChapters(),t.logAction(e,y.UserAction.Create)}))}},{key:"onUpdateChapter",value:function(e){var t=this,n=this.chapters.find((function(t){return t.get("id")===e.id}));n.set("loading",!0);var r=g.J.updatedChaptersAlert(this.model.get("name"));this.chapterDataService.updateChapter(n.id,e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.updateChapters(),t.logAction(e,y.UserAction.Edit)}),r)}},{key:"onDeleteChapter",value:function(e){var t=this;e.set("loading",!0),this.chapterDataService.deleteChapter(e.id,(function(){t.logAction(e,y.UserAction.Delete),t.chapters.remove(e),t.updateChapters()}))}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"onTimeInputUpdate",value:function(e){e>=0&&e<=h.X4.millisecondsToSeconds(this.model.get("duration"))&&(this.player?this.player.currentTime(e):this.webPlayer.seekTo(e))}},{key:"logAction",value:function(e,t){var n=Object.assign({videoId:this.model.get("id")},e.pick("id","name","startTime"));v.k.logUserAction(n,{actionType:t,entity:y.EntityType.Chapter,location:y.LocationContext.EditVideoChapters})}},{key:"onSeekToChapter",value:function(e){return t=this,n=void 0,r=void 0,i=I().mark((function t(){var n,r;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e<0)){t.next=2;break}return t.abrupt("return");case 2:if(!this.player){t.next=9;break}return t.next=5,this.player.getChapters();case 5:return n=t.sent,r=n[e],this.player.currentTime(r.timestamp),t.abrupt("return");case 9:this.webPlayer.seekToChapter(e);case 10:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(e,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}c((i=i.apply(t,n||[])).next())}));var t,n,r,i}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[_.Um.SingleFile,_.Um.ConcatenationFailed];r.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==_.Um.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.render()}))}},{key:"renderChapterList",value:function(){this.showChildView("chapterList",new T.Q({collection:this.chapters,duration:this.model.get("duration"),channelName:this.channelName,showActions:!this.hasPhysicalChapters.get("value"),editable:!this.hasPhysicalChapters.get("value"),showHeader:!0}))}},{key:"renderChapterForm",value:function(){this.showChildView("addChapter",new P.L({model:new u.W,collection:this.chapters,creating:!0,duration:this.model.get("duration"),channelName:this.channelName,playerViewModelKey:"".concat(p._2.NAME,"-").concat(this.model.get("id"))}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("addChapter",new k.r({type:"chapters",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderEditComponents",value:function(){if(this.hasPhysicalChapters.get("value"))return this.renderConcatenationRequest(),void this.mapPhysicalChapters();this.renderChapterForm(),this.renderChapterList()}},{key:"renderTabs",value:function(){var e=h.BK.canEditVideo(this.model);this.showChildView("tabs",new E.W({model:this.model,tabs:h.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-chapters-applink",context:"chapters",folder:this.folder,libraries:this.libraries}))}},{key:"renderWebPlayer",value:function(){if(this.playerViewKey)return this.player=new w.l({model:this.playerViewKey,playerApiUrl:this.config.get("playerApiUrl"),channelName:this.channelName,inactivityTimeout:0}),void this.showChildView("webplayer",this.player);this.webPlayer=new m.Q({model:this.model,webPlayerUrl:this.config.get("webPlayerUrl"),captureAnalytics:!1,currentUser:this.currentUser}),this.showChildView("webplayer",this.webPlayer)}},{key:"mapPhysicalChapters",value:function(){var e=this;this.renderPartialLoading("chapterList");var t=function(t){e.chapters=new l.q(L.$k.mapPhysicalChapters(t)),e.renderChapterList()};this.player?this.player.getChapters().then(t):this.webPlayer.query("getChapters",t)}},{key:"redirectToVideoDetails",value:function(){i.Q.AppLinkHelper.trigger({application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.VIDEO_DETAILS,args:[this.model.get("id")]},{replace:!0})}},{key:"fetchData",value:function(){var e=this;if(this.model=this.videoDataService.getVideo(this.options.videoId),this.model){if(!h.BK.canEditVideo(this.model))return void this.redirectToVideoDetails();this.chapters=this.model.chapters,this.folder=this.model.categories.first(),C.g.hasLite&&!this._viewKeyRequested&&(this._viewKeyRequested=!0,this.playerDataService.createViewKey(this.model.get("id"),c.f.MasterObject,(function(t){e.playerViewKey=t,e.render()})))}this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||C.g.hasLite&&!this.playerViewKey||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"requiredResources",get:function(){return{config:f.p.config,currentUser:b.K.currentUser,libraries:j.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"onRender",value:function(){this.renderTabs(),this.renderWebPlayer(),this.renderEditComponents(),this.startPollingConcatenation()}}])&&A(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),B}(i.Q.View)},97781:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.progress:o,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?o:""},2:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.escapeExpression;return' <span class="m-3 text-muted">'+a(e.lambda(null!=(o=null!=t?t.options:t)?o.progress:o,t))+'</span>\r\n <p class="pt-2">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\r\n"},4:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.failed:o,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?o:""},5:function(e,t,n,r,i){return e.propertyIsEnumerable,'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return"<h4>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.heading:o,t))+"</h4>\r\n<p>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.line1:o,t))+"</p>\r\n<p>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.line2:o,t))+'</p>\r\n<div class="btn-region"></div>\r\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.processing:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?o:"")},useData:!0})},43791:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,'<h1 class="h3">\r\n '+e.escapeExpression("function"==typeof(o=null!=(o=n.name||(null!=t?t.name:t))?o:e.hooks.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):o)+'\r\n</h2>\r\n<div class="breadcrumbs-region"></div>\r\n<div class="tabs-region pl-2"></div>'},useData:!0})},61159:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="tab-region w-100"></div>\r\n<div class="row">\r\n <div class="col-6 pt-3">\r\n <div class="webplayer-region"></div>\r\n <div class="add-chapter-region"></div>\r\n </div>\r\n <div class="col-6 mb-2 pt-3">\r\n <div class="chapter-list-region"></div>\r\n </div>\r\n</div>'},useData:!0})}}]);
|