@clickview/library-editor 1.1.37-dev.0 → 1.1.37-dev.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/dist/bundles.json +2 -2
- package/dist/css/library-editor-app-7afbf80a1d.css +133 -0
- package/dist/scripts/{0-d1f8318492.chunk.js → 0-ae5038826f.chunk.js} +1 -1
- package/dist/scripts/0-febcb6d3a4.chunk.js +1 -0
- package/dist/scripts/{1-f6a406c0c3.chunk.js → 1-25a3da17f6.chunk.js} +1 -1
- package/dist/scripts/1-95ec34859a.chunk.js +1 -0
- package/dist/scripts/1-9614387684.chunk.js +1 -0
- package/dist/scripts/10-2d98ca80b8.chunk.js +1 -0
- package/dist/scripts/10-b3426444d2.chunk.js +1 -0
- package/dist/scripts/{10-9d7415ddd9.chunk.js → 10-ca05201620.chunk.js} +1 -1
- package/dist/scripts/{11-cd223abba6.chunk.js → 11-34b3dcf731.chunk.js} +1 -1
- package/dist/scripts/11-6ba4ed7ef0.chunk.js +11 -0
- package/dist/scripts/12-4a9be00da8.chunk.js +1 -0
- package/dist/scripts/12-763afd0bb2.chunk.js +1 -0
- package/dist/scripts/{12-b9094c4f8c.chunk.js → 12-79687f49dc.chunk.js} +1 -1
- package/dist/scripts/{13-fc7b0b2dec.chunk.js → 13-8d31c7a516.chunk.js} +1 -1
- package/dist/scripts/13-af40ed3499.chunk.js +1 -0
- package/dist/scripts/13-d2a1610ca8.chunk.js +1 -0
- package/dist/scripts/14-3bca4baa31.chunk.js +1 -0
- package/dist/scripts/14-b122e4c86a.chunk.js +1 -0
- package/dist/scripts/14-e05e9a13a3.chunk.js +1 -0
- package/dist/scripts/15-b2488b1148.chunk.js +1 -0
- package/dist/scripts/15-bf35768005.chunk.js +1 -0
- package/dist/scripts/15-d1a8e9529c.chunk.js +1 -0
- package/dist/scripts/{16-7958df8d77.chunk.js → 16-3815855eb9.chunk.js} +1 -1
- package/dist/scripts/16-5559065630.chunk.js +1 -0
- package/dist/scripts/16-9f27dff55b.chunk.js +1 -0
- package/dist/scripts/{17-a79e5de834.chunk.js → 17-280523c91e.chunk.js} +1 -1
- package/dist/scripts/17-a663a59321.chunk.js +1 -0
- package/dist/scripts/17-e2db69d7a2.chunk.js +1 -0
- package/dist/scripts/{2-ccc8d219a5.chunk.js → 2-cd4ed2b964.chunk.js} +1 -1
- package/dist/scripts/2-fa738d2525.chunk.js +1 -0
- package/dist/scripts/{20-9721e70db9.chunk.js → 20-4a29bfd556.chunk.js} +1 -1
- package/dist/scripts/20-9a0c206d53.chunk.js +1 -0
- package/dist/scripts/20-f56b426967.chunk.js +1 -0
- package/dist/scripts/{21-dbf166383e.chunk.js → 21-2932130dd3.chunk.js} +1 -1
- package/dist/scripts/21-39b37c0785.chunk.js +1 -0
- package/dist/scripts/21-f9085fa01b.chunk.js +1 -0
- package/dist/scripts/{22-0a9293463a.chunk.js → 22-1d68f61cad.chunk.js} +1 -1
- package/dist/scripts/22-41611d204e.chunk.js +1 -0
- package/dist/scripts/22-769d86ff22.chunk.js +1 -0
- package/dist/scripts/23-17aed223d8.chunk.js +1 -0
- package/dist/scripts/23-67751683a2.chunk.js +1 -0
- package/dist/scripts/{23-4d7fe8bd5d.chunk.js → 23-ccb1d9bb11.chunk.js} +1 -1
- package/dist/scripts/24-3aacb050a7.chunk.js +1 -0
- package/dist/scripts/{24-4f18bcecc7.chunk.js → 24-a3972fce39.chunk.js} +1 -1
- package/dist/scripts/24-a4a38428f5.chunk.js +1 -0
- package/dist/scripts/{25-8de10302e8.chunk.js → 25-0d377559e4.chunk.js} +1 -1
- package/dist/scripts/25-5d9db5625b.chunk.js +1 -0
- package/dist/scripts/25-c25be9586b.chunk.js +1 -0
- package/dist/scripts/26-1e93a2e404.chunk.js +1 -0
- package/dist/scripts/{26-893749d6ad.chunk.js → 26-477287a718.chunk.js} +1 -1
- package/dist/scripts/26-6e1bd41d98.chunk.js +1 -0
- package/dist/scripts/27-43011c79ea.chunk.js +1 -0
- package/dist/scripts/{27-930264ffb3.chunk.js → 27-eb05620229.chunk.js} +1 -1
- package/dist/scripts/27-fafd25fdaf.chunk.js +1 -0
- package/dist/scripts/{28-89eef2b8bb.chunk.js → 28-7a2644f63b.chunk.js} +1 -1
- package/dist/scripts/28-abceff753f.chunk.js +1 -0
- package/dist/scripts/28-fdfbd30a1a.chunk.js +1 -0
- package/dist/scripts/29-92181bf12b.chunk.js +1 -0
- package/dist/scripts/29-93acb2510d.chunk.js +1 -0
- package/dist/scripts/29-fcd822a8b1.chunk.js +1 -0
- package/dist/scripts/3-06739cf8ee.chunk.js +1 -0
- package/dist/scripts/{3-56fdfc98eb.chunk.js → 3-70518d2464.chunk.js} +1 -1
- package/dist/scripts/3-7fefbcb8e7.chunk.js +1 -0
- package/dist/scripts/30-3448994d7f.chunk.js +1 -0
- package/dist/scripts/{30-9f64e71e42.chunk.js → 30-9571438e00.chunk.js} +1 -1
- package/dist/scripts/30-a0006b182d.chunk.js +1 -0
- package/dist/scripts/{31-d4f5643fac.chunk.js → 31-519a6f97a7.chunk.js} +1 -1
- package/dist/scripts/31-521dc50626.chunk.js +1 -0
- package/dist/scripts/31-7ffed9c47a.chunk.js +1 -0
- package/dist/scripts/32-8550d4debb.chunk.js +1 -0
- package/dist/scripts/32-b3ff30cd69.chunk.js +1 -0
- package/dist/scripts/32-e113e76609.chunk.js +1 -0
- package/dist/scripts/33-03e4570ba4.chunk.js +1 -0
- package/dist/scripts/33-8ff79d76e9.chunk.js +1 -0
- package/dist/scripts/33-ec71147324.chunk.js +1 -0
- package/dist/scripts/{34-98936e694d.chunk.js → 34-3aa5444c72.chunk.js} +1 -1
- package/dist/scripts/34-ba214c77c4.chunk.js +1 -0
- package/dist/scripts/34-c165878a55.chunk.js +1 -0
- package/dist/scripts/{35-d8f4a4c52a.chunk.js → 35-496cf9657a.chunk.js} +1 -1
- package/dist/scripts/35-ee8df1092d.chunk.js +1 -0
- package/dist/scripts/35-fd26db6b11.chunk.js +1 -0
- package/dist/scripts/36-0692769f72.chunk.js +1 -0
- package/dist/scripts/36-6dcaf0b580.chunk.js +1 -0
- package/dist/scripts/{36-5a6664f3e8.chunk.js → 36-fc7e583ebe.chunk.js} +1 -1
- package/dist/scripts/{37-6f767aaeb8.chunk.js → 37-a9c93f251b.chunk.js} +1 -1
- package/dist/scripts/37-bd67192059.chunk.js +1 -0
- package/dist/scripts/37-c0607c21e3.chunk.js +1 -0
- package/dist/scripts/{38-e8f553648d.chunk.js → 38-0483bd181e.chunk.js} +1 -1
- package/dist/scripts/38-8ef5b16d58.chunk.js +1 -0
- package/dist/scripts/38-8f76ecfdc1.chunk.js +1 -0
- package/dist/scripts/39-0fcef24c51.chunk.js +1 -0
- package/dist/scripts/39-1412d3415e.chunk.js +1 -0
- package/dist/scripts/39-7d62285dc6.chunk.js +1 -0
- package/dist/scripts/{4-834dd6d3b5.chunk.js → 4-23928158c9.chunk.js} +1 -1
- package/dist/scripts/4-aada0cbfb6.chunk.js +1 -0
- package/dist/scripts/4-c9d9c3f585.chunk.js +1 -0
- package/dist/scripts/40-1100b25c17.chunk.js +1 -0
- package/dist/scripts/40-32c969eccb.chunk.js +1 -0
- package/dist/scripts/40-35872f5c55.chunk.js +1 -0
- package/dist/scripts/{41-a7fa9cb297.chunk.js → 41-17f9ee7943.chunk.js} +1 -1
- package/dist/scripts/41-b4516f8bd3.chunk.js +1 -0
- package/dist/scripts/41-cddc464a52.chunk.js +1 -0
- package/dist/scripts/{42-feb2800bc0.chunk.js → 42-48c096333c.chunk.js} +1 -1
- package/dist/scripts/42-befbc2640c.chunk.js +1 -0
- package/dist/scripts/42-e1c4a825ab.chunk.js +1 -0
- package/dist/scripts/{43-67c1a25fcb.chunk.js → 43-99dfda45da.chunk.js} +1 -1
- package/dist/scripts/43-f100d6d1e5.chunk.js +1 -0
- package/dist/scripts/43-f14faad3bb.chunk.js +1 -0
- package/dist/scripts/{44-e3bf1b880f.chunk.js → 44-264c87207e.chunk.js} +1 -1
- package/dist/scripts/44-cb445d74eb.chunk.js +1 -0
- package/dist/scripts/44-ce0ab6177c.chunk.js +1 -0
- package/dist/scripts/{45-cca3f789f3.chunk.js → 45-178a02640b.chunk.js} +1 -1
- package/dist/scripts/45-9f602323b9.chunk.js +1 -0
- package/dist/scripts/45-ad6e678f2f.chunk.js +1 -0
- package/dist/scripts/46-9b3358a3d5.chunk.js +1 -0
- package/dist/scripts/{46-29ee70634a.chunk.js → 46-b325e236c0.chunk.js} +1 -1
- package/dist/scripts/46-cf15530ad9.chunk.js +1 -0
- package/dist/scripts/{47-cf3f63d44d.chunk.js → 47-5c77a7ad32.chunk.js} +1 -1
- package/dist/scripts/47-6a04298336.chunk.js +1 -0
- package/dist/scripts/47-e575a166bf.chunk.js +1 -0
- package/dist/scripts/{48-db6403aacd.chunk.js → 48-5b6ba1e103.chunk.js} +1 -1
- package/dist/scripts/48-dbbf2d7201.chunk.js +1 -0
- package/dist/scripts/48-f2f1b3fd16.chunk.js +1 -0
- package/dist/scripts/{49-3a5c191f1c.chunk.js → 49-1353b5cd44.chunk.js} +1 -1
- package/dist/scripts/49-33c71f44a7.chunk.js +1 -0
- package/dist/scripts/49-9343acde91.chunk.js +1 -0
- package/dist/scripts/5-4c24ef4b17.chunk.js +1 -0
- package/dist/scripts/5-5209933115.chunk.js +1 -0
- package/dist/scripts/{5-064a5fbf1e.chunk.js → 5-62e99b780c.chunk.js} +1 -1
- package/dist/scripts/50-2d0737f078.chunk.js +1 -0
- package/dist/scripts/{50-3a8751c18f.chunk.js → 50-9780d89e4d.chunk.js} +1 -1
- package/dist/scripts/50-f49703fd03.chunk.js +1 -0
- package/dist/scripts/{51-0dbfbf89de.chunk.js → 51-07b25e7e28.chunk.js} +1 -1
- package/dist/scripts/51-30c3d48b94.chunk.js +1 -0
- package/dist/scripts/52-046c6e3cea.chunk.js +1 -0
- package/dist/scripts/{52-ee846e7179.chunk.js → 52-0ef3f6c446.chunk.js} +1 -1
- package/dist/scripts/52-ebf5f9e606.chunk.js +1 -0
- package/dist/scripts/53-b7b2f066c8.chunk.js +1 -0
- package/dist/scripts/{53-b98207087d.chunk.js → 53-bca80d41dc.chunk.js} +1 -1
- package/dist/scripts/53-d2e5a771d8.chunk.js +1 -0
- package/dist/scripts/{54-0d01cc485c.chunk.js → 54-016314b2fd.chunk.js} +1 -1
- package/dist/scripts/54-86dfdcd867.chunk.js +1 -0
- package/dist/scripts/54-92bea1b94f.chunk.js +1 -0
- package/dist/scripts/{55-02e9fa6cba.chunk.js → 55-47436a9e19.chunk.js} +1 -1
- package/dist/scripts/55-8a161d074c.chunk.js +1 -0
- package/dist/scripts/55-bc59c633de.chunk.js +1 -0
- package/dist/scripts/56-13f4f5a449.chunk.js +1 -0
- package/dist/scripts/{56-0693117bb3.chunk.js → 56-ba7f079d0d.chunk.js} +1 -1
- package/dist/scripts/56-ed3278b2f3.chunk.js +1 -0
- package/dist/scripts/57-28786c8bc4.chunk.js +1 -0
- package/dist/scripts/57-b9915c23c7.chunk.js +1 -0
- package/dist/scripts/{57-95383347b8.chunk.js → 57-f5b3ccda00.chunk.js} +1 -1
- package/dist/scripts/{58-d1f1aa5b97.chunk.js → 58-60d3aaeb75.chunk.js} +1 -1
- package/dist/scripts/58-b6c5f3e09a.chunk.js +1 -0
- package/dist/scripts/58-ca7fd2ba45.chunk.js +1 -0
- package/dist/scripts/{59-fccfef114a.chunk.js → 59-510b4148b5.chunk.js} +1 -1
- package/dist/scripts/59-efdbb58ff4.chunk.js +1 -0
- package/dist/scripts/{6-e8623fdb0e.chunk.js → 6-7ee0806388.chunk.js} +1 -1
- package/dist/scripts/6-8c482ecdbb.chunk.js +1 -0
- package/dist/scripts/6-e559a1a8ab.chunk.js +1 -0
- package/dist/scripts/{60-7793f38144.chunk.js → 60-4b0309c073.chunk.js} +1 -1
- package/dist/scripts/60-6948885f51.chunk.js +1 -0
- package/dist/scripts/60-e051efa5b9.chunk.js +1 -0
- package/dist/scripts/{61-32ca84a2ec.chunk.js → 61-129e7151e0.chunk.js} +1 -1
- package/dist/scripts/61-843e612150.chunk.js +1 -0
- package/dist/scripts/61-980f51cf2c.chunk.js +1 -0
- package/dist/scripts/{62-e725ac0d3b.chunk.js → 62-34d9b447b3.chunk.js} +1 -1
- package/dist/scripts/62-bb55bd4eae.chunk.js +1 -0
- package/dist/scripts/63-0a79957d8f.chunk.js +1 -0
- package/dist/scripts/{63-4e42efa408.chunk.js → 63-169e9ff9bf.chunk.js} +1 -1
- package/dist/scripts/63-1bfeb775c1.chunk.js +1 -0
- package/dist/scripts/64-130892f373.chunk.js +1 -0
- package/dist/scripts/{64-2ddbc6a7b6.chunk.js → 64-14ff01e6d9.chunk.js} +1 -1
- package/dist/scripts/64-49a071e139.chunk.js +1 -0
- package/dist/scripts/{65-459e6f15ae.chunk.js → 65-007f163e24.chunk.js} +1 -1
- package/dist/scripts/65-564cd8d350.chunk.js +1 -0
- package/dist/scripts/65-be3482316e.chunk.js +1 -0
- package/dist/scripts/66-304e0ea556.chunk.js +1 -0
- package/dist/scripts/{66-0af1d0b0c8.chunk.js → 66-36146b544a.chunk.js} +1 -1
- package/dist/scripts/66-f78f687d62.chunk.js +1 -0
- package/dist/scripts/{67-b2feb7dba5.chunk.js → 67-6ac2a3fb0a.chunk.js} +1 -1
- package/dist/scripts/67-9ca4b99367.chunk.js +1 -0
- package/dist/scripts/67-a21072ca9f.chunk.js +1 -0
- package/dist/scripts/68-0c004d7973.chunk.js +1 -0
- package/dist/scripts/68-53366f3d02.chunk.js +1 -0
- package/dist/scripts/{68-9687657c6c.chunk.js → 68-d50d90a237.chunk.js} +1 -1
- package/dist/scripts/{69-c6843bfa68.chunk.js → 69-452730a23c.chunk.js} +1 -1
- package/dist/scripts/69-4f02bdedb3.chunk.js +1 -0
- package/dist/scripts/69-d78d2baa8e.chunk.js +1 -0
- package/dist/scripts/7-a2afd3d627.chunk.js +1 -0
- package/dist/scripts/7-dc2fca7ba8.chunk.js +1 -0
- package/dist/scripts/7-e5fd456c94.chunk.js +1 -0
- package/dist/scripts/{70-5287f7d0f9.chunk.js → 70-276d0252a7.chunk.js} +1 -1
- package/dist/scripts/70-af636493c9.chunk.js +1 -0
- package/dist/scripts/{71-eae8d7c4ce.chunk.js → 71-2436fe0add.chunk.js} +1 -1
- package/dist/scripts/71-831d3df8c8.chunk.js +1 -0
- package/dist/scripts/71-d90524fd36.chunk.js +1 -0
- package/dist/scripts/{72-cd60863cfe.chunk.js → 72-61c4180fbb.chunk.js} +1 -1
- package/dist/scripts/72-75e03ea301.chunk.js +1 -0
- package/dist/scripts/72-d9b23cd356.chunk.js +1 -0
- package/dist/scripts/8-31707af46b.chunk.js +1 -0
- package/dist/scripts/{8-13dad94cfa.chunk.js → 8-52c5cfe789.chunk.js} +1 -1
- package/dist/scripts/8-ea8f937f63.chunk.js +1 -0
- package/dist/scripts/{9-22c46a0e1e.chunk.js → 9-4232504733.chunk.js} +1 -1
- package/dist/scripts/9-4e71fabbfb.chunk.js +1 -0
- package/dist/scripts/9-e625bd6b54.chunk.js +1 -0
- package/dist/scripts/bundle-3b246c868d.min.js +10 -0
- package/dist/scripts/{bundle-7c959985be.min.js → bundle-3dbae718ac.min.js} +3 -3
- package/dist/scripts/bundle-6294c1ed41.min.js +10 -0
- package/dist/scripts/bundle-6351493787.min.js +10 -0
- package/dist/scripts/bundle-cf501491f0.min.js +10 -0
- package/dist/scripts/polyfills-7c285dce43.min.js +1 -0
- package/dist/scripts/polyfills-995b298d2c.min.js +1 -0
- package/dist/scripts/polyfills-fe45278ea2.min.js +1 -0
- package/package.json +3 -3
- package/dist/scripts/14-8b9eba1848.chunk.js +0 -1
- package/dist/scripts/15-775c9bfa5f.chunk.js +0 -1
- package/dist/scripts/29-b76bdc35db.chunk.js +0 -1
- package/dist/scripts/32-8947914587.chunk.js +0 -1
- package/dist/scripts/33-3e64a188ce.chunk.js +0 -1
- package/dist/scripts/39-f4b507c9b9.chunk.js +0 -1
- package/dist/scripts/40-306c0ac9b2.chunk.js +0 -1
- package/dist/scripts/7-a2786c3d88.chunk.js +0 -1
- package/dist/scripts/polyfills-10972b9c3e.min.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[0],{1003:function(t,e,n){"use strict";var o=n(986),r=n.n(o),i=n(987),s=n.n(i);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){var e=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(t){return!1}}();return function(){var n,o=f(t);if(e){var r=f(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return p(this,n)}}function p(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(a,t);var e,n,o,i=u(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,t)}return e=a,(n=[{key:"name",get:function(){return"DraggableItemComponent"}},{key:"template",get:function(){return s.a}},{key:"className",get:function(){return"".concat(r.a.dragItem," p-3")}},{key:"viewOptions",value:function(){return Object.assign({styles:r.a},this.options)}}])&&l(e.prototype,n),o&&l(e,o),a}(n(2).a.Component),d={delay:150,cursorAt:{left:-20,top:10},refreshPositions:!0};n.d(e,"c",(function(){return r.a})),n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return d}))},1014:function(t,e,n){"use strict";var o=n(1),r=n(2),i=n(6),s=n(15),a=n(4),l=n(12),c=n(0),u=n(1045),p=n(1048),f=n(1179),h=n.n(f);function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(t){var e=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(t){return!1}}();return function(){var n,o=m(t);if(e){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(t,e){return!e||"object"!==d(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var k=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(g,t);var e,n,f,d=v(g);function g(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),d.call(this,t)}return e=g,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render);var t=this.getChildren();t&&this.listenTo(t,"add remove",this.render),this.listenTo(this,"open:sub:folders",this.onOpenSubFolders)}},{key:"name",get:function(){return"LeftNavNodeComponent"}},{key:"elements",get:function(){return{anchor:".ui-node",text:".ui-text"}}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var t="position-relative";return this.isSelected()&&(t+=" ".concat(this.options.styles.selected)),this.isParent()&&(t+=" ".concat(this.options.styles.parent)),t}},{key:"behaviors",get:function(){return this.options.isSelector?[]:[{behaviorClass:u.a,ui:"anchor",channelNames:[c.w.VIDEO_DRAG_DROP,c.w.FOLDER_DRAG_DROP],analyticsOptions:{location:a.LocationContext.LeftNav}},{behaviorClass:p.a}]}},{key:"appLinks",get:function(){return this.options.appLink?{"@ui.anchor":this.getAppLink()}:{}}},{key:"events",value:function(){return{"click .ui-node":"onClick"}}},{key:"regions",value:function(){return{children:{el:"ul",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"template",get:function(){return h.a}},{key:"hasChildren",value:function(){var t=this.getChildren();return!!t&&!!t.length}},{key:"getChildren",value:function(){return this.options.childrenProperty?this.model.get(this.options.childrenProperty):null}},{key:"getText",value:function(){return this.options.textProperty?this.model.get(this.options.textProperty):this.model.get("name")}},{key:"isSelected",value:function(){return l.f.isSelected(this.options.folderTreeId,this.model.get("id"))}},{key:"isParent",value:function(){return l.f.isParent(this.options.folderTreeId,this.model.get("id"))}},{key:"isDisabled",value:function(){return this.options.disabledIds&&this.options.disabledIds[this.model.get("id").toString()]}},{key:"getAnchorClass",value:function(){var t="position-relative ".concat(this.options.styles.node);return this.isSelected()?t+=" text-white font-weight-bold":this.isDisabled()?t+=" text-muted":t+=" text-dark",t}},{key:"getAppLink",value:function(){if(!this.options.appLink)return{};var t=this.options.linkArgs,e=this.options.linkParams;return{application:this.options.appLink.application,action:this.options.appLink.action,args:o.isFunction(t)?t(this.model):null,params:o.isFunction(e)?e(this.model):null}}},{key:"onClick",value:function(t){t.stopPropagation();var e=this.getRegion("children"),n=i.Radio.channel(this.options.channelName);if(this.isDisabled()||(this.$el.addClass(this.options.styles.selected),this.getUI("text").addClass("text-white font-weight-bold")),this.options.isSelector&&n.trigger("folder:selected",this.model,this.isDisabled()),this.isDisabled()||this.isSelected()&&this.isCurrentPath()){if(t.stopImmediatePropagation(),t.preventDefault(),!this.hasChildren())return void(this.options.isSelector&&n.trigger("re:render:selector"));var o=!e.hasView();return o?this.openChildren():this.closeChildren(),void(this.options.isSelector&&o&&n.trigger("re:render:selector"))}this.hasChildren()&&(this.openChildren(),this.options.isSelector&&i.Radio.channel(this.options.channelName).trigger("re:render:selector"))}},{key:"isCurrentPath",value:function(){var t=r.a.AppLinkHelper.getCurrentAppLink(),e=this.getAppLink();return!o.keys(e).length||t.application===e.application&&t.action===e.action}},{key:"closeChildren",value:function(){var t=this.getRegion("children");this.$el.addClass(this.options.styles.collapsed),this.$el.removeClass(this.options.styles.parent),t.empty()}},{key:"openChildren",value:function(){this.$el.removeClass(this.options.styles.collapsed),this.renderChildren()}},{key:"onOpenSubFolders",value:function(t){this.renderedSubChildren||this.renderChildren(t)}},{key:"renderChildren",value:function(t){var e=this.getChildren();if(e&&e.length){var n={styles:this.options.styles,channelName:this.options.channelName,appLink:this.options.appLink,linkArgs:this.options.linkArgs,linkParams:this.options.linkParams,childrenProperty:this.options.childrenProperty,textProperty:this.options.textProperty,actions:this.options.actions,folderTreeId:this.options.folderTreeId,analyticsOptions:this.options.analyticsOptions,extraClass:this.options.extraClass,isSelector:this.options.isSelector,disabledIds:this.options.disabledIds};n.extraClasses=t,n.collection=e,this.showChildView("children",new j(n)),this.renderedSubChildren=!0}}},{key:"viewOptions",value:function(){var t="".concat(this.options.styles.item," ").concat(this.options.styles.customItem||"");return this.isDisabled()&&this.renderedSubChildren&&(t+=" ".concat(this.options.styles.disabledActive)),{children:this.getChildren(),itemClass:t,anchorClass:this.getAnchorClass(),caretClass:this.options.styles.caret,showCaret:this.hasChildren(),svg:s.a.getSvg(s.b.Caret),extraClasses:this.options.extraClasses,textStyle:this.options.styles.text,text:this.getText()}}},{key:"onRender",value:function(){this.resetClassName(),this.options.actions&&this.showChildView("actions",new this.options.actions({model:this.model,extraClasses:"rounded-circle mr-1 ".concat(this.options.styles.actions),buttonClass:"text-muted",analyticsOptions:this.options.analyticsOptions})),(this.isSelected()||this.isParent())&&this.renderChildren()}}])&&y(e.prototype,n),f&&y(e,f),g}(r.a.Component),w=n(1143),C=n.n(w);function O(t){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function P(t,e){return(P=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function x(t){var e=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(t){return!1}}();return function(){var n,o=R(t);if(e){var r=R(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return S(this,n)}}function S(t,e){return!e||"object"!==O(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",(function(){return j}));var j=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&P(t,e)}(s,t);var e,n,r,i=x(s);function s(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),t.styles=o.extend({},C.a,t.styles),i.call(this,t)}return e=s,(n=[{key:"name",get:function(){return"LeftNavComponent"}},{key:"tagName",get:function(){return"ul"}},{key:"childView",get:function(){return k}},{key:"className",get:function(){var t="".concat(this.options.styles.folderTree," position-relative");return this.options.extraClass?"".concat(t," ").concat(this.options.extraClass):t}},{key:"viewComparator",get:function(){return function(t){var e;return null===(e=t.get("name"))||void 0===e?void 0:e.toLowerCase()}}},{key:"childViewOptions",get:function(){return{styles:this.options.styles,channelName:this.options.channelName,appLink:this.options.appLink,linkArgs:this.options.linkArgs,linkParams:this.options.linkParams,childrenProperty:this.options.childrenProperty,textProperty:this.options.textProperty,actions:this.options.actions,extraClass:this.options.extraClass,folderTreeId:this.options.folderTreeId,analyticsOptions:this.options.analyticsOptions,isSelector:this.options.isSelector,disabledIds:this.options.disabledIds}}}])&&_(e.prototype,n),r&&_(e,r),s}(r.a.ComponentCollection)},1045:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var o=n(1),r=n(6),i=n(2),s=n(146);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){var e=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(t){return!1}}();return function(){var n,o=h(t);if(e){var r=h(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return f(this,n)}}function f(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(f,t);var e,n,i,a=p(f);function f(){return l(this,f),a.apply(this,arguments)}return e=f,(n=[{key:"getDroppableElement",value:function(){return this.options.ui?this.view.getUI(this.options.ui):this.$el}},{key:"drop",value:function(){var t=this;o.each(this.options.channelNames,(function(e){r.Radio.channel(e).trigger("drag:drop",t.view.model,t.options.analyticsOptions)}))}},{key:"accept",value:function(){var t=this,e=!1;return o.each(this.options.channelNames,(function(n){!0===r.Radio.channel(n).request("accept",t.view.model)&&(e=!0)})),e}},{key:"over",value:function(){var t=this;this.isHoveringOver=!0,window.setTimeout((function(){t.isHoveringOver&&t.view.trigger("open:sub:folders",s.active)}),500)}},{key:"out",value:function(){this.isHoveringOver=!1}},{key:"onRender",value:function(){var t={tolerance:"pointer",drop:o.bind(this.drop,this),accept:o.bind(this.accept,this),over:o.bind(this.over,this),out:o.bind(this.out,this)};t.classes={"ui-droppable":s.droppable,"ui-droppable-active":s.active,"ui-droppable-hover":s.hover},this.getDroppableElement().droppable(t)}},{key:"onBeforeDestroy",value:function(){this.getDroppableElement().droppable("instance")&&this.getDroppableElement().droppable("destroy")}}])&&c(e.prototype,n),i&&c(e,i),f}(i.a.Behavior)},1048:function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var o=n(1),r=n(6),i=n(2),s=n(15),a=n(0),l=n(1003),c=n(1054),u=n.n(c);function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t){var e=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(t){return!1}}();return function(){var n,o=v(t);if(e){var r=v(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return b(this,n)}}function b(t,e){return!e||"object"!==p(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(p,t);var e,n,i,c=y(p);function p(){return f(this,p),c.apply(this,arguments)}return e=p,(n=[{key:"getClassMappings",value:function(){return{"ui-draggable":l.c.draggable,"ui-draggable-handle":l.c.handle,"ui-draggable-disabled":l.c.disabled,"ui-draggable-dragging":l.c.dragging}}},{key:"helper",value:function(){return new l.b({text:this.view.model.get("name"),svg:s.a.getSvg(s.b.Folder)}).render().el}},{key:"start",value:function(){r.Radio.channel(a.w.FOLDER_DRAG_DROP).trigger("drag:start",this.view.model),this.view.$el.addClass(u.a.draggingFolder)}},{key:"stop",value:function(){r.Radio.channel(a.w.FOLDER_DRAG_DROP).trigger("drag:stop"),this.view.$el.removeClass(u.a.draggingFolder)}},{key:"onRender",value:function(){var t={helper:o.bind(this.helper,this),start:o.bind(this.start,this),stop:o.bind(this.stop,this)};t.classes=this.getClassMappings(),this.view.$el.draggable(o.extend({},l.a,t))}},{key:"onBeforeDestroy",value:function(){this.view.$el.draggable("instance")&&this.view.$el.draggable("destroy")}}])&&h(e.prototype,n),i&&h(e,i),p}(i.a.Behavior)},1054:function(t,e,n){t.exports={dragging:"_2wBn3",draggingFolder:"_1r3AS"}},1143:function(t,e,n){t.exports={folderTree:"_1inFA",text:"_2ovSq",caret:"_2pwp9",library:"_2WHiz",selected:"_200l0",parent:"_205QS",disabledActive:"_25EPE",disabled:"_387cT",collapsed:"_1-_q7",actions:"_3Il7t",node:"_23bpP",libraryContainer:"EuNKs",item:"ahYSz"}},1179:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda;return' <span class="'+t.escapeExpression(s(null!=(i=null!=e?e.options:e)?i.caretClass:i,e))+' d-inline-block position-absolute">\r\n '+(null!=(i=s(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+"\r\n </span>\r\n"},3:function(t,e,n,o,r){return"<ul></ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda,a=t.escapeExpression,l=null!=e?e:t.nullContext||{};return'<div class="position-relative '+a(s(null!=(i=null!=e?e.options:e)?i.itemClass:i,e))+'">\r\n <a class="'+a(s(null!=(i=null!=e?e.options:e)?i.anchorClass:i,e))+' d-block ui-node">\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=e?e.options:e)?i.showCaret:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")+' <span class="'+a(s(null!=(i=null!=e?e.options:e)?i.textStyle:i,e))+" ui-text "+a(s(null!=(i=null!=e?e.options:e)?i.extraClasses:i,e))+'">'+a(s(null!=(i=null!=e?e.options:e)?i.text:i,e))+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=(i=null!=e?e.options:e)?i.children:i)?i.length:i,{name:"if",hash:{},fn:t.program(3,r,0),inverse:t.noop,data:r}))?i:"")},useData:!0})},986:function(t,e,n){t.exports={dragItem:"_2TIZ7",svgContainer:"_3JzEU",dragText:"_1Kdwj"}},987:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda,a=t.escapeExpression;return'<span class="'+a(s(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.svgContainer:i,e))+' mr-2">'+(null!=(i=s(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'</span>\r\n<span class="'+a(s(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.dragText:i,e))+'">'+a(s(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>"},useData:!0})}}]);
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[0],{1004:function(t,e,n){"use strict";var o=n(987),r=n.n(o),i=n(988),s=n.n(i);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){var e=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(t){return!1}}();return function(){var n,o=f(t);if(e){var r=f(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return p(this,n)}}function p(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(a,t);var e,n,o,i=u(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,t)}return e=a,(n=[{key:"name",get:function(){return"DraggableItemComponent"}},{key:"template",get:function(){return s.a}},{key:"className",get:function(){return"".concat(r.a.dragItem," p-3")}},{key:"viewOptions",value:function(){return Object.assign({styles:r.a},this.options)}}])&&l(e.prototype,n),o&&l(e,o),a}(n(2).a.Component),d={delay:150,cursorAt:{left:-20,top:10},refreshPositions:!0};n.d(e,"c",(function(){return r.a})),n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return d}))},1015:function(t,e,n){"use strict";var o=n(1),r=n(2),i=n(6),s=n(15),a=n(4),l=n(12),c=n(0),u=n(1046),p=n(1049),f=n(1180),h=n.n(f);function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(t){var e=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(t){return!1}}();return function(){var n,o=m(t);if(e){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(t,e){return!e||"object"!==d(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var k=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(g,t);var e,n,f,d=v(g);function g(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),d.call(this,t)}return e=g,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render);var t=this.getChildren();t&&this.listenTo(t,"add remove",this.render),this.listenTo(this,"open:sub:folders",this.onOpenSubFolders)}},{key:"name",get:function(){return"LeftNavNodeComponent"}},{key:"elements",get:function(){return{anchor:".ui-node",text:".ui-text"}}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var t="position-relative";return this.isSelected()&&(t+=" ".concat(this.options.styles.selected)),this.isParent()&&(t+=" ".concat(this.options.styles.parent)),t}},{key:"behaviors",get:function(){return this.options.isSelector?[]:[{behaviorClass:u.a,ui:"anchor",channelNames:[c.w.VIDEO_DRAG_DROP,c.w.FOLDER_DRAG_DROP],analyticsOptions:{location:a.LocationContext.LeftNav}},{behaviorClass:p.a}]}},{key:"appLinks",get:function(){return this.options.appLink?{"@ui.anchor":this.getAppLink()}:{}}},{key:"events",value:function(){return{"click .ui-node":"onClick"}}},{key:"regions",value:function(){return{children:{el:"ul",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"template",get:function(){return h.a}},{key:"hasChildren",value:function(){var t=this.getChildren();return!!t&&!!t.length}},{key:"getChildren",value:function(){return this.options.childrenProperty?this.model.get(this.options.childrenProperty):null}},{key:"getText",value:function(){return this.options.textProperty?this.model.get(this.options.textProperty):this.model.get("name")}},{key:"isSelected",value:function(){return l.f.isSelected(this.options.folderTreeId,this.model.get("id"))}},{key:"isParent",value:function(){return l.f.isParent(this.options.folderTreeId,this.model.get("id"))}},{key:"isDisabled",value:function(){return this.options.disabledIds&&this.options.disabledIds[this.model.get("id").toString()]}},{key:"getAnchorClass",value:function(){var t="position-relative ".concat(this.options.styles.node);return this.isSelected()?t+=" text-white font-weight-bold":this.isDisabled()?t+=" text-muted":t+=" text-dark",t}},{key:"getAppLink",value:function(){if(!this.options.appLink)return{};var t=this.options.linkArgs,e=this.options.linkParams;return{application:this.options.appLink.application,action:this.options.appLink.action,args:o.isFunction(t)?t(this.model):null,params:o.isFunction(e)?e(this.model):null}}},{key:"onClick",value:function(t){t.stopPropagation();var e=this.getRegion("children"),n=i.Radio.channel(this.options.channelName);if(this.isDisabled()||(this.$el.addClass(this.options.styles.selected),this.getUI("text").addClass("text-white font-weight-bold")),this.options.isSelector&&n.trigger("folder:selected",this.model,this.isDisabled()),this.isDisabled()||this.isSelected()&&this.isCurrentPath()){if(t.stopImmediatePropagation(),t.preventDefault(),!this.hasChildren())return void(this.options.isSelector&&n.trigger("re:render:selector"));var o=!e.hasView();return o?this.openChildren():this.closeChildren(),void(this.options.isSelector&&o&&n.trigger("re:render:selector"))}this.hasChildren()&&(this.openChildren(),this.options.isSelector&&i.Radio.channel(this.options.channelName).trigger("re:render:selector"))}},{key:"isCurrentPath",value:function(){var t=r.a.AppLinkHelper.getCurrentAppLink(),e=this.getAppLink();return!o.keys(e).length||t.application===e.application&&t.action===e.action}},{key:"closeChildren",value:function(){var t=this.getRegion("children");this.$el.addClass(this.options.styles.collapsed),this.$el.removeClass(this.options.styles.parent),t.empty()}},{key:"openChildren",value:function(){this.$el.removeClass(this.options.styles.collapsed),this.renderChildren()}},{key:"onOpenSubFolders",value:function(t){this.renderedSubChildren||this.renderChildren(t)}},{key:"renderChildren",value:function(t){var e=this.getChildren();if(e&&e.length){var n={styles:this.options.styles,channelName:this.options.channelName,appLink:this.options.appLink,linkArgs:this.options.linkArgs,linkParams:this.options.linkParams,childrenProperty:this.options.childrenProperty,textProperty:this.options.textProperty,actions:this.options.actions,folderTreeId:this.options.folderTreeId,analyticsOptions:this.options.analyticsOptions,extraClass:this.options.extraClass,isSelector:this.options.isSelector,disabledIds:this.options.disabledIds};n.extraClasses=t,n.collection=e,this.showChildView("children",new j(n)),this.renderedSubChildren=!0}}},{key:"viewOptions",value:function(){var t="".concat(this.options.styles.item," ").concat(this.options.styles.customItem||"");return this.isDisabled()&&this.renderedSubChildren&&(t+=" ".concat(this.options.styles.disabledActive)),{children:this.getChildren(),itemClass:t,anchorClass:this.getAnchorClass(),caretClass:this.options.styles.caret,showCaret:this.hasChildren(),svg:s.a.getSvg(s.b.Caret),extraClasses:this.options.extraClasses,textStyle:this.options.styles.text,text:this.getText()}}},{key:"onRender",value:function(){this.resetClassName(),this.options.actions&&this.showChildView("actions",new this.options.actions({model:this.model,extraClasses:"rounded-circle mr-1 ".concat(this.options.styles.actions),buttonClass:"text-muted",analyticsOptions:this.options.analyticsOptions})),(this.isSelected()||this.isParent())&&this.renderChildren()}}])&&y(e.prototype,n),f&&y(e,f),g}(r.a.Component),w=n(1144),C=n.n(w);function O(t){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function P(t,e){return(P=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function x(t){var e=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(t){return!1}}();return function(){var n,o=R(t);if(e){var r=R(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return S(this,n)}}function S(t,e){return!e||"object"!==O(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",(function(){return j}));var j=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&P(t,e)}(s,t);var e,n,r,i=x(s);function s(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),t.styles=o.extend({},C.a,t.styles),i.call(this,t)}return e=s,(n=[{key:"name",get:function(){return"LeftNavComponent"}},{key:"tagName",get:function(){return"ul"}},{key:"childView",get:function(){return k}},{key:"className",get:function(){var t="".concat(this.options.styles.folderTree," position-relative");return this.options.extraClass?"".concat(t," ").concat(this.options.extraClass):t}},{key:"viewComparator",get:function(){return function(t){var e;return null===(e=t.get("name"))||void 0===e?void 0:e.toLowerCase()}}},{key:"childViewOptions",get:function(){return{styles:this.options.styles,channelName:this.options.channelName,appLink:this.options.appLink,linkArgs:this.options.linkArgs,linkParams:this.options.linkParams,childrenProperty:this.options.childrenProperty,textProperty:this.options.textProperty,actions:this.options.actions,extraClass:this.options.extraClass,folderTreeId:this.options.folderTreeId,analyticsOptions:this.options.analyticsOptions,isSelector:this.options.isSelector,disabledIds:this.options.disabledIds}}}])&&_(e.prototype,n),r&&_(e,r),s}(r.a.ComponentCollection)},1046:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var o=n(1),r=n(6),i=n(2),s=n(146);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){var e=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(t){return!1}}();return function(){var n,o=h(t);if(e){var r=h(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return f(this,n)}}function f(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(f,t);var e,n,i,a=p(f);function f(){return l(this,f),a.apply(this,arguments)}return e=f,(n=[{key:"getDroppableElement",value:function(){return this.options.ui?this.view.getUI(this.options.ui):this.$el}},{key:"drop",value:function(){var t=this;o.each(this.options.channelNames,(function(e){r.Radio.channel(e).trigger("drag:drop",t.view.model,t.options.analyticsOptions)}))}},{key:"accept",value:function(){var t=this,e=!1;return o.each(this.options.channelNames,(function(n){!0===r.Radio.channel(n).request("accept",t.view.model)&&(e=!0)})),e}},{key:"over",value:function(){var t=this;this.isHoveringOver=!0,window.setTimeout((function(){t.isHoveringOver&&t.view.trigger("open:sub:folders",s.active)}),500)}},{key:"out",value:function(){this.isHoveringOver=!1}},{key:"onRender",value:function(){var t={tolerance:"pointer",drop:o.bind(this.drop,this),accept:o.bind(this.accept,this),over:o.bind(this.over,this),out:o.bind(this.out,this)};t.classes={"ui-droppable":s.droppable,"ui-droppable-active":s.active,"ui-droppable-hover":s.hover},this.getDroppableElement().droppable(t)}},{key:"onBeforeDestroy",value:function(){this.getDroppableElement().droppable("instance")&&this.getDroppableElement().droppable("destroy")}}])&&c(e.prototype,n),i&&c(e,i),f}(i.a.Behavior)},1049:function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var o=n(1),r=n(6),i=n(2),s=n(15),a=n(0),l=n(1004),c=n(1055),u=n.n(c);function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t){var e=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(t){return!1}}();return function(){var n,o=v(t);if(e){var r=v(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return b(this,n)}}function b(t,e){return!e||"object"!==p(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(p,t);var e,n,i,c=y(p);function p(){return f(this,p),c.apply(this,arguments)}return e=p,(n=[{key:"getClassMappings",value:function(){return{"ui-draggable":l.c.draggable,"ui-draggable-handle":l.c.handle,"ui-draggable-disabled":l.c.disabled,"ui-draggable-dragging":l.c.dragging}}},{key:"helper",value:function(){return new l.b({text:this.view.model.get("name"),svg:s.a.getSvg(s.b.Folder)}).render().el}},{key:"start",value:function(){r.Radio.channel(a.w.FOLDER_DRAG_DROP).trigger("drag:start",this.view.model),this.view.$el.addClass(u.a.draggingFolder)}},{key:"stop",value:function(){r.Radio.channel(a.w.FOLDER_DRAG_DROP).trigger("drag:stop"),this.view.$el.removeClass(u.a.draggingFolder)}},{key:"onRender",value:function(){var t={helper:o.bind(this.helper,this),start:o.bind(this.start,this),stop:o.bind(this.stop,this)};t.classes=this.getClassMappings(),this.view.$el.draggable(o.extend({},l.a,t))}},{key:"onBeforeDestroy",value:function(){this.view.$el.draggable("instance")&&this.view.$el.draggable("destroy")}}])&&h(e.prototype,n),i&&h(e,i),p}(i.a.Behavior)},1055:function(t,e,n){t.exports={dragging:"_2wBn3",draggingFolder:"_1r3AS"}},1144:function(t,e,n){t.exports={folderTree:"_1inFA",text:"_2ovSq",caret:"_2pwp9",library:"_2WHiz",selected:"_200l0",parent:"_205QS",disabledActive:"_25EPE",disabled:"_387cT",collapsed:"_1-_q7",actions:"_3Il7t",node:"_23bpP",libraryContainer:"EuNKs",item:"ahYSz"}},1180:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda;return' <span class="'+t.escapeExpression(s(null!=(i=null!=e?e.options:e)?i.caretClass:i,e))+' d-inline-block position-absolute">\r\n '+(null!=(i=s(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+"\r\n </span>\r\n"},3:function(t,e,n,o,r){return"<ul></ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda,a=t.escapeExpression,l=null!=e?e:t.nullContext||{};return'<div class="position-relative '+a(s(null!=(i=null!=e?e.options:e)?i.itemClass:i,e))+'">\r\n <a class="'+a(s(null!=(i=null!=e?e.options:e)?i.anchorClass:i,e))+' d-block ui-node">\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=e?e.options:e)?i.showCaret:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")+' <span class="'+a(s(null!=(i=null!=e?e.options:e)?i.textStyle:i,e))+" ui-text "+a(s(null!=(i=null!=e?e.options:e)?i.extraClasses:i,e))+'">'+a(s(null!=(i=null!=e?e.options:e)?i.text:i,e))+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=(i=null!=e?e.options:e)?i.children:i)?i.length:i,{name:"if",hash:{},fn:t.program(3,r,0),inverse:t.noop,data:r}))?i:"")},useData:!0})},987:function(t,e,n){t.exports={dragItem:"_2TIZ7",svgContainer:"_3JzEU",dragText:"_1Kdwj"}},988:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda,a=t.escapeExpression;return'<span class="'+a(s(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.svgContainer:i,e))+' mr-2">'+(null!=(i=s(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'</span>\r\n<span class="'+a(s(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.dragText:i,e))+'">'+a(s(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>"},useData:!0})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[0],{1010:function(t,e,n){"use strict";var o=n(1),r=n(2),i=n(6),s=n(15),a=n(4),l=n(12),c=n(0),u=n(1041),p=n(1044),f=n(1175),h=n.n(f);function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(t){var e=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(t){return!1}}();return function(){var n,o=m(t);if(e){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(t,e){return!e||"object"!==d(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var k=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(g,t);var e,n,f,d=v(g);function g(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),d.call(this,t)}return e=g,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render);var t=this.getChildren();t&&this.listenTo(t,"add remove",this.render),this.listenTo(this,"open:sub:folders",this.onOpenSubFolders)}},{key:"name",get:function(){return"LeftNavNodeComponent"}},{key:"elements",get:function(){return{anchor:".ui-node",text:".ui-text"}}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var t="position-relative";return this.isSelected()&&(t+=" ".concat(this.options.styles.selected)),this.isParent()&&(t+=" ".concat(this.options.styles.parent)),t}},{key:"behaviors",get:function(){return this.options.isSelector?[]:[{behaviorClass:u.a,ui:"anchor",channelNames:[c.w.VIDEO_DRAG_DROP,c.w.FOLDER_DRAG_DROP],analyticsOptions:{location:a.LocationContext.LeftNav}},{behaviorClass:p.a}]}},{key:"appLinks",get:function(){return this.options.appLink?{"@ui.anchor":this.getAppLink()}:{}}},{key:"events",value:function(){return{"click .ui-node":"onClick"}}},{key:"regions",value:function(){return{children:{el:"ul",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"template",get:function(){return h.a}},{key:"hasChildren",value:function(){var t=this.getChildren();return!!t&&!!t.length}},{key:"getChildren",value:function(){return this.options.childrenProperty?this.model.get(this.options.childrenProperty):null}},{key:"getText",value:function(){return this.options.textProperty?this.model.get(this.options.textProperty):this.model.get("name")}},{key:"isSelected",value:function(){return l.f.isSelected(this.options.folderTreeId,this.model.get("id"))}},{key:"isParent",value:function(){return l.f.isParent(this.options.folderTreeId,this.model.get("id"))}},{key:"isDisabled",value:function(){return this.options.disabledIds&&this.options.disabledIds[this.model.get("id").toString()]}},{key:"getAnchorClass",value:function(){var t="position-relative ".concat(this.options.styles.node);return this.isSelected()?t+=" text-white font-weight-bold":this.isDisabled()?t+=" text-muted":t+=" text-dark",t}},{key:"getAppLink",value:function(){if(!this.options.appLink)return{};var t=this.options.linkArgs,e=this.options.linkParams;return{application:this.options.appLink.application,action:this.options.appLink.action,args:o.isFunction(t)?t(this.model):null,params:o.isFunction(e)?e(this.model):null}}},{key:"onClick",value:function(t){t.stopPropagation();var e=this.getRegion("children"),n=i.Radio.channel(this.options.channelName);if(this.isDisabled()||(this.$el.addClass(this.options.styles.selected),this.getUI("text").addClass("text-white font-weight-bold")),this.options.isSelector&&n.trigger("folder:selected",this.model,this.isDisabled()),this.isDisabled()||this.isSelected()&&this.isCurrentPath()){if(t.stopImmediatePropagation(),t.preventDefault(),!this.hasChildren())return void(this.options.isSelector&&n.trigger("re:render:selector"));var o=!e.hasView();return o?this.openChildren():this.closeChildren(),void(this.options.isSelector&&o&&n.trigger("re:render:selector"))}this.hasChildren()&&(this.openChildren(),this.options.isSelector&&i.Radio.channel(this.options.channelName).trigger("re:render:selector"))}},{key:"isCurrentPath",value:function(){var t=r.a.AppLinkHelper.getCurrentAppLink(),e=this.getAppLink();return!o.keys(e).length||t.application===e.application&&t.action===e.action}},{key:"closeChildren",value:function(){var t=this.getRegion("children");this.$el.addClass(this.options.styles.collapsed),this.$el.removeClass(this.options.styles.parent),t.empty()}},{key:"openChildren",value:function(){this.$el.removeClass(this.options.styles.collapsed),this.renderChildren()}},{key:"onOpenSubFolders",value:function(t){this.renderedSubChildren||this.renderChildren(t)}},{key:"renderChildren",value:function(t){var e=this.getChildren();if(e&&e.length){var n={styles:this.options.styles,channelName:this.options.channelName,appLink:this.options.appLink,linkArgs:this.options.linkArgs,linkParams:this.options.linkParams,childrenProperty:this.options.childrenProperty,textProperty:this.options.textProperty,actions:this.options.actions,folderTreeId:this.options.folderTreeId,analyticsOptions:this.options.analyticsOptions,extraClass:this.options.extraClass,isSelector:this.options.isSelector,disabledIds:this.options.disabledIds};n.extraClasses=t,n.collection=e,this.showChildView("children",new j(n)),this.renderedSubChildren=!0}}},{key:"viewOptions",value:function(){var t="".concat(this.options.styles.item," ").concat(this.options.styles.customItem||"");return this.isDisabled()&&this.renderedSubChildren&&(t+=" ".concat(this.options.styles.disabledActive)),{children:this.getChildren(),itemClass:t,anchorClass:this.getAnchorClass(),caretClass:this.options.styles.caret,showCaret:this.hasChildren(),svg:s.a.getSvg(s.b.Caret),extraClasses:this.options.extraClasses,textStyle:this.options.styles.text,text:this.getText()}}},{key:"onRender",value:function(){this.resetClassName(),this.options.actions&&this.showChildView("actions",new this.options.actions({model:this.model,extraClasses:"rounded-circle mr-1 ".concat(this.options.styles.actions),buttonClass:"text-muted",analyticsOptions:this.options.analyticsOptions})),(this.isSelected()||this.isParent())&&this.renderChildren()}}])&&y(e.prototype,n),f&&y(e,f),g}(r.a.Component),w=n(1139),C=n.n(w);function O(t){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function P(t,e){return(P=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function x(t){var e=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(t){return!1}}();return function(){var n,o=R(t);if(e){var r=R(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return S(this,n)}}function S(t,e){return!e||"object"!==O(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",(function(){return j}));var j=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&P(t,e)}(s,t);var e,n,r,i=x(s);function s(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),t.styles=o.extend({},C.a,t.styles),i.call(this,t)}return e=s,(n=[{key:"name",get:function(){return"LeftNavComponent"}},{key:"tagName",get:function(){return"ul"}},{key:"childView",get:function(){return k}},{key:"className",get:function(){var t="".concat(this.options.styles.folderTree," position-relative");return this.options.extraClass?"".concat(t," ").concat(this.options.extraClass):t}},{key:"viewComparator",get:function(){return function(t){var e;return null===(e=t.get("name"))||void 0===e?void 0:e.toLowerCase()}}},{key:"childViewOptions",get:function(){return{styles:this.options.styles,channelName:this.options.channelName,appLink:this.options.appLink,linkArgs:this.options.linkArgs,linkParams:this.options.linkParams,childrenProperty:this.options.childrenProperty,textProperty:this.options.textProperty,actions:this.options.actions,extraClass:this.options.extraClass,folderTreeId:this.options.folderTreeId,analyticsOptions:this.options.analyticsOptions,isSelector:this.options.isSelector,disabledIds:this.options.disabledIds}}}])&&_(e.prototype,n),r&&_(e,r),s}(r.a.ComponentCollection)},1041:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var o=n(1),r=n(6),i=n(2),s=n(146);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){var e=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(t){return!1}}();return function(){var n,o=h(t);if(e){var r=h(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return f(this,n)}}function f(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(f,t);var e,n,i,a=p(f);function f(){return l(this,f),a.apply(this,arguments)}return e=f,(n=[{key:"getDroppableElement",value:function(){return this.options.ui?this.view.getUI(this.options.ui):this.$el}},{key:"drop",value:function(){var t=this;o.each(this.options.channelNames,(function(e){r.Radio.channel(e).trigger("drag:drop",t.view.model,t.options.analyticsOptions)}))}},{key:"accept",value:function(){var t=this,e=!1;return o.each(this.options.channelNames,(function(n){!0===r.Radio.channel(n).request("accept",t.view.model)&&(e=!0)})),e}},{key:"over",value:function(){var t=this;this.isHoveringOver=!0,window.setTimeout((function(){t.isHoveringOver&&t.view.trigger("open:sub:folders",s.active)}),500)}},{key:"out",value:function(){this.isHoveringOver=!1}},{key:"onRender",value:function(){var t={tolerance:"pointer",drop:o.bind(this.drop,this),accept:o.bind(this.accept,this),over:o.bind(this.over,this),out:o.bind(this.out,this)};t.classes={"ui-droppable":s.droppable,"ui-droppable-active":s.active,"ui-droppable-hover":s.hover},this.getDroppableElement().droppable(t)}},{key:"onBeforeDestroy",value:function(){this.getDroppableElement().droppable("instance")&&this.getDroppableElement().droppable("destroy")}}])&&c(e.prototype,n),i&&c(e,i),f}(i.a.Behavior)},1044:function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var o=n(1),r=n(6),i=n(2),s=n(15),a=n(0),l=n(999),c=n(1050),u=n.n(c);function p(t){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(t){var e=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(t){return!1}}();return function(){var n,o=v(t);if(e){var r=v(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return b(this,n)}}function b(t,e){return!e||"object"!==p(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&d(t,e)}(p,t);var e,n,i,c=y(p);function p(){return f(this,p),c.apply(this,arguments)}return e=p,(n=[{key:"getClassMappings",value:function(){return{"ui-draggable":l.c.draggable,"ui-draggable-handle":l.c.handle,"ui-draggable-disabled":l.c.disabled,"ui-draggable-dragging":l.c.dragging}}},{key:"helper",value:function(){return new l.b({text:this.view.model.get("name"),svg:s.a.getSvg(s.b.Folder)}).render().el}},{key:"start",value:function(){r.Radio.channel(a.w.FOLDER_DRAG_DROP).trigger("drag:start",this.view.model),this.view.$el.addClass(u.a.draggingFolder)}},{key:"stop",value:function(){r.Radio.channel(a.w.FOLDER_DRAG_DROP).trigger("drag:stop"),this.view.$el.removeClass(u.a.draggingFolder)}},{key:"onRender",value:function(){var t={helper:o.bind(this.helper,this),start:o.bind(this.start,this),stop:o.bind(this.stop,this)};t.classes=this.getClassMappings(),this.view.$el.draggable(o.extend({},l.a,t))}},{key:"onBeforeDestroy",value:function(){this.view.$el.draggable("instance")&&this.view.$el.draggable("destroy")}}])&&h(e.prototype,n),i&&h(e,i),p}(i.a.Behavior)},1050:function(t,e,n){t.exports={dragging:"_2wBn3",draggingFolder:"_1r3AS"}},1139:function(t,e,n){t.exports={folderTree:"_1inFA",text:"_2ovSq",caret:"_2pwp9",library:"_2WHiz",selected:"_200l0",parent:"_205QS",disabledActive:"_25EPE",disabled:"_387cT",collapsed:"_1-_q7",actions:"_3Il7t",node:"_23bpP",libraryContainer:"EuNKs",item:"ahYSz"}},1175:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda;return' <span class="'+t.escapeExpression(s(null!=(i=null!=e?e.options:e)?i.caretClass:i,e))+' d-inline-block position-absolute">\r\n '+(null!=(i=s(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+"\r\n </span>\r\n"},3:function(t,e,n,o,r){return"<ul></ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda,a=t.escapeExpression,l=null!=e?e:t.nullContext||{};return'<div class="position-relative '+a(s(null!=(i=null!=e?e.options:e)?i.itemClass:i,e))+'">\r\n <a class="'+a(s(null!=(i=null!=e?e.options:e)?i.anchorClass:i,e))+' d-block ui-node">\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=e?e.options:e)?i.showCaret:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")+' <span class="'+a(s(null!=(i=null!=e?e.options:e)?i.textStyle:i,e))+" ui-text "+a(s(null!=(i=null!=e?e.options:e)?i.extraClasses:i,e))+'">'+a(s(null!=(i=null!=e?e.options:e)?i.text:i,e))+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=(i=null!=e?e.options:e)?i.children:i)?i.length:i,{name:"if",hash:{},fn:t.program(3,r,0),inverse:t.noop,data:r}))?i:"")},useData:!0})},982:function(t,e,n){t.exports={dragItem:"_2TIZ7",svgContainer:"_3JzEU",dragText:"_1Kdwj"}},983:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda,a=t.escapeExpression;return'<span class="'+a(s(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.svgContainer:i,e))+' mr-2">'+(null!=(i=s(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'</span>\r\n<span class="'+a(s(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.dragText:i,e))+'">'+a(s(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>"},useData:!0})},999:function(t,e,n){"use strict";var o=n(982),r=n.n(o),i=n(983),s=n.n(i);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){var e=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(t){return!1}}();return function(){var n,o=f(t);if(e){var r=f(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return p(this,n)}}function p(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(a,t);var e,n,o,i=u(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,t)}return e=a,(n=[{key:"name",get:function(){return"DraggableItemComponent"}},{key:"template",get:function(){return s.a}},{key:"className",get:function(){return"".concat(r.a.dragItem," p-3")}},{key:"viewOptions",value:function(){return Object.assign({styles:r.a},this.options)}}])&&l(e.prototype,n),o&&l(e,o),a}(n(2).a.Component),d={delay:150,cursorAt:{left:-20,top:10},refreshPositions:!0};n.d(e,"c",(function(){return r.a})),n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return d}))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[1],{1009:function(e,t,n){"use strict";function r(e){return(r="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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(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=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(n,e);var t=o(n);function n(){return i(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1137:function(e,t,n){"use strict";var r=n(1),i=n(6),a=n(1167),o={PLAY:"cv-player-play",PAUSE:"cv-player-pause",VIDEO_END:"cv-player-ended",VOLUME_CHANGE:"cv-player-volumechange",CHAPTER_CHANGE:"cv-player-chapterchange",TIME_UPDATE:"cv-player-timeupdate",FULLSCREEN_CHANGE:"cv-player-fullscreenchange",CLIP_POINTS_UPDATE:"cv-player-cliptoolupdate",QUALITY_CHANGE:"cv-player-qualitychange",QUERY_CALLBACK:"cv-player-querycallback",SUBTITLES_ENABLED:"cv-player-hassubtitles",SUBTITLES:"cv-player-subtitles",PONG:"cv-player-pong",FULLSCREEN_CLICK:"_cvwp:fsc",DEVICES_BTN_CLICK:"_cvwp:devices:click"},s={PLAY:"cv-player-play",PAUSE:"cv-player-pause",SET_VOLUME:"cv-player-setvolume",NEXT_CHAPTER:"cv-player-nextchapter",PREV_CHAPTER:"cv-player-previouschapter",CHANGE_CHAPTER:"cv-player-changechapter",TOGGLE_CLIPPING:"cv-player-cliptooltoggle",SET_CLIP_POINTS:"cv-player-cliptoolset",CLIP:"cv-player-setclip",CLEAR_CLIP:"cv-player-clearclip",SEEK_TO:"cv-player-seekto",CONTROLS:"cv-player-showcontrols",SUBTITLES:"cv-player-subtitles",SET_QUALITY:"cv-player-setquality",QUERY:"cv-player-query",ADD_LISTENER:"cv-player-addlistener",REMOVE_LISTENER:"cv-player-removelistener",PING:"cv-player-ping",TOGGLE_DEVICES_BTN:"_cv:toggledevicesbtn",SHOW_DEVICES_BTN:"_cv:showdevicesbtn",SHOW_FS_BTN:"_cv:showfsbtn"},u={GET_AVAILABLE_QUALITIES:"getAvailableQualities",GET_CURRENT_QUALITY:"currentQuality",IS_PAUSED:"paused",GET_CURRENT_TIME:"currentTime",GET_CHAPTERS:"getChapters",HAS_METADATA_CHAPTERS:"hasMetadataChapters"},c=n(2),l=n(30),d=n(20),f=n(59),p=n(15),h=n(981),y=n(0),v=function(e){return e instanceof c.a.Model||e instanceof c.a.Collection||e instanceof i.Model||e instanceof i.Collection?e.toJSON():e},g=n(4),m=n(117),b=n(42);function E(e){if(e&&e.code)return e.code}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.id){var n={id:e.id};return e.name&&!t.ignoreTitle&&(n.title=e.name),n}}function k(e){if(e&&e.length){var t=e[0];return{id:t.id,title:t.name}}}var T=function(e){var t=e.model,n={id:t.id.toString(),year:t.productionYear,title:t.name,trackingCode:t.trackingCode},r=E(t.rating),i=P(t.series),a=k(t.categories),o=P(t.owner,{ignoreTitle:!0}),s=P(t.playlist);return r&&(n.rating=r),o&&(n.ownerId=o.id),i&&(n.seriesId=i.id,n.series=i.title),a&&(n.category=a.title),s&&(n.playlist=s),n};function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(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,r.key,r)}}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(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=A(e);if(t){var i=A(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){return!t||"object"!==S(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=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}}),t&&C(e,t)}(l,e);var t,n,i,a=N(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).captureInterval=60,t}return t=l,(n=[{key:"name",get:function(){return"VideoAnalyticsTracker"}},{key:"initialize",value:function(){this.eventsApi=this.options.eventsApi,this.options.video||c.a.ErrorHelper.throw(new d.a("Video logging requires video to be passed in.")),this.model=this.options.video,this.playbackStatus=this.getNewPlaybackStatus(),this.options.captureInterval&&(this.captureInterval=this.options.captureInterval),this.bindListeners(),this.getChapters()}},{key:"bindListeners",value:function(){this.eventsApi.on(o.TIME_UPDATE,r.bind(this.onPlayerTimeUpdate,this)),this.eventsApi.on(o.VIDEO_END,r.bind(this.onEnd,this)),this.eventsApi.on(o.FULLSCREEN_CHANGE,r.bind(this.onFullScreen,this)),this.eventsApi.on(o.CHAPTER_CHANGE,r.bind(this.onChapterChange,this))}},{key:"unbindListeners",value:function(){this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.FULLSCREEN_CHANGE),this.eventsApi.off(o.CHAPTER_CHANGE)}},{key:"getChapters",value:function(){var e=this;this.queryWebplayer(u.GET_CHAPTERS,(function(t,n){e.setInitialChapter(n),e.setVideoDuration(n)}))}},{key:"queryWebplayer",value:function(e,t){var n=r.uniqueId(this.name),i="".concat(o.QUERY_CALLBACK,"-").concat(n);this.eventsApi.one(i,t),this.eventsApi.trigger(s.QUERY,e,n)}},{key:"onEnd",value:function(){this.setCurrentPosition(this.playbackStatus.totalDuration),this.logVerbose(g.PlaybackDescriptor.Finish),this.resetPlaybackStatus()}},{key:"onFullScreen",value:function(e,t){var n=t?g.PlaybackDescriptor.FullScreenEnter:g.PlaybackDescriptor.FullScreenExit;this.logVerbose(n)}},{key:"onPlayerTimeUpdate",value:function(e,t){var n=this;this.queryWebplayer(u.IS_PAUSED,(function(e,r){n.updateTime(t,r)}))}},{key:"onChapterChange",value:function(e,t){r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"updateTime",value:function(e,t){var n=Math.floor(e);n&&n!==this.getCurrentPositon()&&(this.setCurrentPosition(n),t||(this.playbackHasStarted()||(this.logVerbose(g.PlaybackDescriptor.Start),this.setPlaybackStarted()),this.incrementWatchTime(),this.getWatchTime()%this.captureInterval==0&&this.logVerbose(g.PlaybackDescriptor.Playback),8===this.getWatchTime()&&this.logStream()))}},{key:"setInitialChapter",value:function(e){var t=r.find(e,(function(e){return!0===e.current}));r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"setVideoDuration",value:function(e){var t=r.reduce(e,(function(e,t){return e+t.duration}),0);!r.isNaN(t)&&r.isNumber(t)&&(this.playbackStatus.totalDuration=Math.floor(t))}},{key:"setCurrentPosition",value:function(e){this.playbackStatus.position=e}},{key:"getCurrentPositon",value:function(){return this.playbackStatus.position}},{key:"setCurrentChapter",value:function(e){this.playbackStatus.chapter=e}},{key:"setPlaybackStarted",value:function(){this.playbackStatus.hasStarted=!0}},{key:"playbackHasStarted",value:function(){return this.playbackStatus.hasStarted}},{key:"getWatchTime",value:function(){return this.playbackStatus.totalWatched}},{key:"incrementWatchTime",value:function(){this.playbackStatus.totalWatched+=1}},{key:"getNewPlaybackStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.duration,n=e.watched;return{position:0,chapter:0,hasStarted:!1,totalWatched:n||0,totalDuration:t||0}}},{key:"resetPlaybackStatus",value:function(){var e={duration:this.playbackStatus.totalDuration,watched:this.playbackStatus.totalWatched};this.playbackStatus=this.getNewPlaybackStatus(e)}},{key:"unbindUnload",value:function(){$(window).off("unload")}},{key:"bindUnload",value:function(){$(window).on("unload",r.bind(this.logUnload,this))}},{key:"logUnload",value:function(){this.playbackHasStarted()&&this.logVerbose(g.PlaybackDescriptor.Terminate)}},{key:"logStream",value:function(){var e=b.a.buildActionContext(this.options.analyticsOptions),t=T(this.getPlaybackData());m.a.log(g.UserAction.Stream,t,e)}},{key:"logVerbose",value:function(e){}},{key:"getPlaybackData",value:function(){return{model:v(this.model),playbackStatus:r.omit(this.playbackStatus,"hasStarted")}}},{key:"onDestroy",value:function(){this.unbindListeners(),this.unbindUnload(),this.logUnload()}}])&&w(t.prototype,n),i&&w(t,i),l}(c.a.Service),I=n(1168),L=n.n(I),R=n(1169),D=n.n(R);function M(e){return(M="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})(e)}function x(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,r.key,r)}}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(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=V(e);if(t){var i=V(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return q(this,n)}}function q(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return j}));var j=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}}),t&&U(e,t)}(g,e);var t,n,u,v=F(g);function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),v.call(this,e)}return t=g,(n=[{key:"elements",get:function(){return{iframe:"iframe"}}},{key:"name",get:function(){return"WebPlayerView"}},{key:"template",get:function(){return L.a}},{key:"className",get:function(){return"".concat(D.a.webPlayerContainer," embed-responsive embed-responsive-16by9")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"defaults",get:function(){return{captureAnalytics:!0,showDevicesButton:!1}}},{key:"viewModelDefaults",get:function(){return{width:640,height:360,autoplay:!!this.options.autoplay,parameters:{s:!1,bc:!1,bf:!1,uid:this.options.currentUser.get("id"),cid:this.options.currentUser.get("customerId")},webPlayerHost:this.options.webPlayerUrl}}},{key:"initialize",value:function(){this.enableIeFs=this.isTop(),this.getViewModel()}},{key:"seekTo",value:function(e){this.eventsApi&&this.eventsApi.trigger(s.SEEK_TO,e)}},{key:"seekToChapter",value:function(e){this.eventsApi&&this.eventsApi.trigger("cv-player-changechapter",e)}},{key:"getViewModel",value:function(){var e=this.model.get("id");e||(e=this.model.get("trackingCode")),this.viewModel=l.a.get("".concat(y.z.NAME,"-").concat(e)),this.viewModel.get("initialized")||this.initViewModel(),this.setUrl()}},{key:"initViewModel",value:function(){var e=this.model.pick("id");e.id||(e=this.model.pick("trackingCode")),e.id||e.trackingCode||c.a.ErrorHelper.throw(new d.a("Must provide either a master id or a tracking code to ".concat(this.name)));var t=r.extend({},this.viewModelDefaults,e,this.viewModel.toJSON(),{initialized:!0});this.viewModel.set(t)}},{key:"initWebPlayerEvents",value:function(){if(this.enableIeFs){var e=this.getUI("iframe");e&&0!==e.length&&e.on("load",this.bindWebPlayerEvents.bind(this))}}},{key:"bindWebPlayerEvents",value:function(){if(!this.iframeReady){var e=this.getUI("iframe").get(0);this.eventsApi=new h.CVEventsApi(e.contentWindow),this.eventsApi.on(o.PONG,this.onPong.bind(this)),this.eventsApi.trigger(s.PING),this.eventsApi.on(o.FULLSCREEN_CLICK,this.onFullscreenChange.bind(this)),this.eventsApi.trigger(s.SHOW_FS_BTN),this.eventsApi.on(o.TIME_UPDATE,this.onTimeUpdate.bind(this)),this.eventsApi.on(o.PLAY,this.onPlay.bind(this)),this.eventsApi.on(o.PAUSE,this.onPause.bind(this)),this.eventsApi.on(o.VIDEO_END,this.onEnded.bind(this)),this.options.showDevicesButton&&(this.eventsApi.on(o.DEVICES_BTN_CLICK,this.showDeviceToggle.bind(this)),this.eventsApi.trigger(s.SHOW_DEVICES_BTN)),this.options.captureAnalytics&&(this.tracker=new O({video:this.model.toJSON(),eventsApi:this.eventsApi,analyticsOptions:this.options.analyticsOptions}))}}},{key:"unbindWebPlayerEvents",value:function(){this.eventsApi&&(this.eventsApi.off(o.FULLSCREEN_CLICK),this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.PLAY),this.eventsApi.off(o.PAUSE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.PONG),this.eventsApi.off(o.DEVICES_BTN_CLICK))}},{key:"setUrl",value:function(){var e="".concat(this.viewModel.get("webPlayerHost"),"embed"),t=r.omit(this.viewModel.get("parameters"),["p","vid"])||{};t.a=!!this.viewModel.get("autoplay");var n=this.viewModel.get("id");n&&(t.vid=n);var i=this.viewModel.get("trackingCode");i&&(t.p=i),this.viewModel.get("currenttime")&&(t.t=this.viewModel.get("currenttime"),t.a=!this.viewModel.get("paused"));var o=f.a.urlBuilder(e,t),s=Object(a.signUrl)(o,{timestamp:!0});this.viewModel.set({url:s})}},{key:"isTop",value:function(){return window.top===window}},{key:"onTimeUpdate",value:function(e,t){this.viewModel.set("ready",!0),this.viewModel.set("currenttime",t)}},{key:"onPlay",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!1)}},{key:"onPause",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!0)}},{key:"onEnded",value:function(){this.viewModel.trigger("ended")}},{key:"onPong",value:function(){this.iframeReady=!0,this.viewModel.set("ready",!0),i.Radio.channel(this.channelName).trigger("loaded"),this.options.parentChannelName&&i.Radio.channel(this.options.parentChannelName).trigger("webplayer:loaded")}},{key:"onFullscreenChange",value:function(e,t,n){t?this.requestFs(n):this.cancelFs(n)}},{key:"requestFs",value:function(e){e||$("html").addClass("player-fullscreen")}},{key:"cancelFs",value:function(e){e||$("html").removeClass("player-fullscreen")}},{key:"showDeviceToggle",value:function(e){this.viewModel.trigger("showDevices",!!e)}},{key:"query",value:function(e,t){var n=this;if(this.iframeReady){var i=r.uniqueId("cveventsapi");this.eventsApi.one("".concat(o.QUERY_CALLBACK,"-").concat(i),(function(e,n){t(n)})),this.eventsApi.trigger(s.QUERY,e,i)}else this.listenToOnce(this.channelName,"loaded",(function(){return n.query(e,t)}))}},{key:"viewOptions",value:function(){return r.extend({},{styles:D.a,playSvg:p.a.getSvg(p.b.Play)},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.initWebPlayerEvents()}},{key:"onBeforeDestroy",value:function(){this.unbindWebPlayerEvents(),this.tracker&&this.tracker.destroy()}}])&&x(t.prototype,n),u&&x(t,u),g}(c.a.Component)},1168:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var a,o=e.lambda,s=e.escapeExpression;return'<iframe class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.webPlayer:a,t))+' embed-responsive-item" id="'+s(o(null!=(a=null!=t?t.options:t)?a.id:a,t))+'" allowfullscreen webkitallowfullscreen mozallowfullscreen allow="autoplay; fullscreen" frameborder="0" width="'+s(o(null!=(a=null!=t?t.options:t)?a.width:a,t))+'" height="'+s(o(null!=(a=null!=t?t.options:t)?a.height:a,t))+'" src="'+s(o(null!=(a=null!=t?t.options:t)?a.url:a,t))+'"></iframe>\r\n<div class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.svgContainer:a,t))+'">'+(null!=(a=o(null!=(a=null!=t?t.options:t)?a.playSvg:a,t))?a:"")+"</div>"},useData:!0})},1169:function(e,t,n){e.exports={webPlayerContainer:"_2S4VF",webPlayer:"_3569L",svgContainer:"_1WsxD"}},989:function(e,t,n){"use strict";var r=n(994),i=n(990),a=(n(991),n(3),n(995)),o=(n(997),n(993));n.d(t,"a",(function(){return r.a})),n.d(t,"d",(function(){return i.g})),n.d(t,"g",(function(){return i.j})),n.d(t,"f",(function(){return i.i})),n.d(t,"c",(function(){return i.f})),n.d(t,"e",(function(){return i.h})),n.d(t,"b",(function(){return a.a})),n.d(t,"h",(function(){return o.a}))},990:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"k",(function(){return p})),n.d(t,"g",(function(){return v})),n.d(t,"e",(function(){return y})),n.d(t,"j",(function(){return g})),n.d(t,"i",(function(){return b})),n.d(t,"c",(function(){return P})),n.d(t,"b",(function(){return k})),n.d(t,"d",(function(){return T})),n.d(t,"f",(function(){return E})),n.d(t,"h",(function(){return m}));var r=n(2),i=n(1),a=n(20),o=n(29),s=n(3),u="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=i.reduce(e,(function(e,n,r){var a=t[r];return n||a?i.isObject(n)&&i.isObject(a)&&!i.isUndefined(n.id)&&n.id===a.id?e:i.isArray(n)?d(n,a).length?e.concat(r):e:i.isEqual(n,a)?e:e.concat(r):e}),[]);if(n.length)return i.object(i.map(n,(function(n){return i.isArray(t[n])?[n,d(e[n],t[n])]:[n,t[n]]})))}}function d(e,t){var n=[];return i.each(t,(function(t){var r=i.findWhere(e,{id:t.id});if(!i.isUndefined(r)||0!==Object.keys(t).length){var a=i.isUndefined(r)?t:l(r,t);a&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(a.id=t.id,n.push(a))))}})),n}var f={getChanges:function(e,t){var n=l(i.omit(e.toJSON(),c),i.omit(t.toJSON(),c));if(n)return i.object(i.map(i.keys(n),(function(e){return[e,f.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(i.isObject(t)&&i.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return i.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new a.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var a=["distributors","producers","directors","productionCompanies"];for(var o in i.each(i.keys(n),(function(e){a.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(i.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var s=e.get(o);(s instanceof r.a.Model||s instanceof r.a.NestedModel)&&s.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return i.each(i.keys(e.toJSON()),(function(a){if(i.contains(n,a)){var o=e.get(a).map((function(e){return e.id})),s=t.get(a).map((function(e){return e.id})),u=i.filter(o,(function(e){return e&&!i.contains(s,e)}));u.length&&(r[a]=u)}})),r}},p={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?s.a.getPhrase(u,"episodeNumberLessThanOne"):e&&e>2147483647?s.a.getPhrase(u,"episodeNumberExceeds"):e%1!=0?s.a.getPhrase(u,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?s.a.getPhrase(u,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":s.a.getPhrase(u,"seasonNoEpisodeNumber")}},h=o().year(),y={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>h?s.a.getPhrase(u,"validProductionYears",{currentYear:h}):void 0):""}},v={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"resourceNameRequired")}}]},g={suggestion:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditReasonExceeds")}}]},m={number:function(e){return e?+e<1?s.a.getPhrase(u,"seasonLessThanOne"):+e>3e3?s.a.getPhrase(u,"seasonExceeds"):+e%1!=0?s.a.getPhrase(u,"seasonNotWhole"):"":s.a.getPhrase(u,"seasonRequired")}},b={empty:function(){return s.a.getPhrase(u,"suggestEditRatingRequired")},original:function(){return s.a.getPhrase(u,"suggestEditRatingInvalid")}},E={url:[{required:!0,pattern:"url",msg:function(){return s.a.getPhrase(u,"linkUrlRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return s.a.getPhrase(u,"linkNameRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"linkNameExceeds")}}]},P={name:[{maxLength:128,msg:function(){return s.a.getPhrase(u,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return s.a.getPhrase(u,"fieldValueExceeds")}}]},k={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":s.a.getPhrase(u,"fieldsInvalid"):""}};function T(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},991:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),i=n(48),a=n(159),o=n(3),s="libraryEditor.utils",u={name:[{required:!0,msg:function(){return o.a.getPhrase(s,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(s,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?i.a.calculateDestinationFolderDepth(e,n,t)>a.a.MAX_FOLDER_DEPTH?o.a.getPhrase(s,"maxFolderDepth",{maxDepth:a.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(s,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,i=e.folder,a=e.collection;return t&&n?r.extend({},u,c(i,a)):t?u:n?c(i,a):void 0}},993:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(15),i=n(3),a=n(187),o=n(1009),s=n(61);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var d={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case s.a.HostedLibrary:case s.a.CustomLibrary:return e.get("name");case s.a.Exchange:return i.a.getPhrase(l,"exchange");case s.a.Workspace:return i.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case s.a.HostedLibrary:case s.a.CustomLibrary:return"bg-info";case s.a.Exchange:return"bg-green";case s.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(u(t={},c.Pdf,r.b.FilePDF),u(t,c.Image,r.b.FileImg),u(t,c.PowerPoint,r.b.FilePowerpoint),u(t,c.Document,r.b.FileWord),u(t,c.Excel,r.b.FileExcel),u(t,c.Zip,r.b.FileZip),u(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return i.a.getPhrase(l,"pdf");case c.Image:return i.a.getPhrase(l,"image");case c.Document:return i.a.getPhrase(l,"document");case c.Excel:return i.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return i.a.getPhrase(l,"presentation");case c.Zip:return i.a.getPhrase(l,"zipArchive");case c.File:return i.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:d.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case a.MetadataType.VideoTitle:t+="VideoTitle";break;case a.MetadataType.Description:t+="Description";break;case a.MetadataType.Rating:t+="Rating";break;case a.MetadataType.SeriesTitle:t+="SeriesTitle";break;case a.MetadataType.Season:t+="SeasonNumber";break;case a.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case a.MetadataType.BroadcastDate:t+="BroadcastDate";break;case a.MetadataType.Channel:t+="Channel";break;case a.MetadataType.ProductionYear:t+="ProductionYear";break;case a.MetadataType.Distributors:t+="Distributors";break;case a.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case a.MetadataType.Directors:t+="Directors";break;case a.MetadataType.Producers:t+="Producers";break;case a.MetadataType.Other:t+="Other"}return i.a.getPhrase(l,t)}}},994:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),i=n(12),a=n(3),o="libraryEditor.utils",s={isValidChapterTime:function(e,t,n,a){if(a){if(!r.isNumber(t))return u.StartTime.Invalid();if(t<0)return u.StartTime.Invalid();if(t>i.x.millisecondsToSeconds(n))return u.StartTime.Exceeds();if(a.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return u.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?u.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?u.Name.Exists():r.isEmpty(t.trim())?u.Name.Invalid():void 0:u.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},u={Name:{Invalid:function(){return a.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return a.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return a.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return a.a.getPhrase(o,"chapterStartTimeExceeds")}}}},995:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i="libraryEditor.utils",a={name:[{required:!0,msg:function(){return r.a.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(i,"libraryNameExceeds")}}]}},997:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(990),a=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return a("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return a("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return a("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?a("episodeNumberLessThanOne"):e&&e>255?a("episodeNumberExceeds"):e&&e%1!=0?a("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?a("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":a("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.e.productionYear.apply(null,t)}}}}]);
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[1],{1010:function(e,t,n){"use strict";function r(e){return(r="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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(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=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(n,e);var t=o(n);function n(){return i(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1138:function(e,t,n){"use strict";var r=n(1),i=n(6),a=n(1168),o={PLAY:"cv-player-play",PAUSE:"cv-player-pause",VIDEO_END:"cv-player-ended",VOLUME_CHANGE:"cv-player-volumechange",CHAPTER_CHANGE:"cv-player-chapterchange",TIME_UPDATE:"cv-player-timeupdate",FULLSCREEN_CHANGE:"cv-player-fullscreenchange",CLIP_POINTS_UPDATE:"cv-player-cliptoolupdate",QUALITY_CHANGE:"cv-player-qualitychange",QUERY_CALLBACK:"cv-player-querycallback",SUBTITLES_ENABLED:"cv-player-hassubtitles",SUBTITLES:"cv-player-subtitles",PONG:"cv-player-pong",FULLSCREEN_CLICK:"_cvwp:fsc",DEVICES_BTN_CLICK:"_cvwp:devices:click"},s={PLAY:"cv-player-play",PAUSE:"cv-player-pause",SET_VOLUME:"cv-player-setvolume",NEXT_CHAPTER:"cv-player-nextchapter",PREV_CHAPTER:"cv-player-previouschapter",CHANGE_CHAPTER:"cv-player-changechapter",TOGGLE_CLIPPING:"cv-player-cliptooltoggle",SET_CLIP_POINTS:"cv-player-cliptoolset",CLIP:"cv-player-setclip",CLEAR_CLIP:"cv-player-clearclip",SEEK_TO:"cv-player-seekto",CONTROLS:"cv-player-showcontrols",SUBTITLES:"cv-player-subtitles",SET_QUALITY:"cv-player-setquality",QUERY:"cv-player-query",ADD_LISTENER:"cv-player-addlistener",REMOVE_LISTENER:"cv-player-removelistener",PING:"cv-player-ping",TOGGLE_DEVICES_BTN:"_cv:toggledevicesbtn",SHOW_DEVICES_BTN:"_cv:showdevicesbtn",SHOW_FS_BTN:"_cv:showfsbtn"},u={GET_AVAILABLE_QUALITIES:"getAvailableQualities",GET_CURRENT_QUALITY:"currentQuality",IS_PAUSED:"paused",GET_CURRENT_TIME:"currentTime",GET_CHAPTERS:"getChapters",HAS_METADATA_CHAPTERS:"hasMetadataChapters"},c=n(2),l=n(30),d=n(20),f=n(59),p=n(15),h=n(982),y=n(0),v=function(e){return e instanceof c.a.Model||e instanceof c.a.Collection||e instanceof i.Model||e instanceof i.Collection?e.toJSON():e},g=n(4),m=n(117),b=n(42);function E(e){if(e&&e.code)return e.code}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.id){var n={id:e.id};return e.name&&!t.ignoreTitle&&(n.title=e.name),n}}function k(e){if(e&&e.length){var t=e[0];return{id:t.id,title:t.name}}}var T=function(e){var t=e.model,n={id:t.id.toString(),year:t.productionYear,title:t.name,trackingCode:t.trackingCode},r=E(t.rating),i=P(t.series),a=k(t.categories),o=P(t.owner,{ignoreTitle:!0}),s=P(t.playlist);return r&&(n.rating=r),o&&(n.ownerId=o.id),i&&(n.seriesId=i.id,n.series=i.title),a&&(n.category=a.title),s&&(n.playlist=s),n};function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(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,r.key,r)}}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(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=A(e);if(t){var i=A(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){return!t||"object"!==S(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=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}}),t&&C(e,t)}(l,e);var t,n,i,a=N(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).captureInterval=60,t}return t=l,(n=[{key:"name",get:function(){return"VideoAnalyticsTracker"}},{key:"initialize",value:function(){this.eventsApi=this.options.eventsApi,this.options.video||c.a.ErrorHelper.throw(new d.a("Video logging requires video to be passed in.")),this.model=this.options.video,this.playbackStatus=this.getNewPlaybackStatus(),this.options.captureInterval&&(this.captureInterval=this.options.captureInterval),this.bindListeners(),this.getChapters()}},{key:"bindListeners",value:function(){this.eventsApi.on(o.TIME_UPDATE,r.bind(this.onPlayerTimeUpdate,this)),this.eventsApi.on(o.VIDEO_END,r.bind(this.onEnd,this)),this.eventsApi.on(o.FULLSCREEN_CHANGE,r.bind(this.onFullScreen,this)),this.eventsApi.on(o.CHAPTER_CHANGE,r.bind(this.onChapterChange,this))}},{key:"unbindListeners",value:function(){this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.FULLSCREEN_CHANGE),this.eventsApi.off(o.CHAPTER_CHANGE)}},{key:"getChapters",value:function(){var e=this;this.queryWebplayer(u.GET_CHAPTERS,(function(t,n){e.setInitialChapter(n),e.setVideoDuration(n)}))}},{key:"queryWebplayer",value:function(e,t){var n=r.uniqueId(this.name),i="".concat(o.QUERY_CALLBACK,"-").concat(n);this.eventsApi.one(i,t),this.eventsApi.trigger(s.QUERY,e,n)}},{key:"onEnd",value:function(){this.setCurrentPosition(this.playbackStatus.totalDuration),this.logVerbose(g.PlaybackDescriptor.Finish),this.resetPlaybackStatus()}},{key:"onFullScreen",value:function(e,t){var n=t?g.PlaybackDescriptor.FullScreenEnter:g.PlaybackDescriptor.FullScreenExit;this.logVerbose(n)}},{key:"onPlayerTimeUpdate",value:function(e,t){var n=this;this.queryWebplayer(u.IS_PAUSED,(function(e,r){n.updateTime(t,r)}))}},{key:"onChapterChange",value:function(e,t){r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"updateTime",value:function(e,t){var n=Math.floor(e);n&&n!==this.getCurrentPositon()&&(this.setCurrentPosition(n),t||(this.playbackHasStarted()||(this.logVerbose(g.PlaybackDescriptor.Start),this.setPlaybackStarted()),this.incrementWatchTime(),this.getWatchTime()%this.captureInterval==0&&this.logVerbose(g.PlaybackDescriptor.Playback),8===this.getWatchTime()&&this.logStream()))}},{key:"setInitialChapter",value:function(e){var t=r.find(e,(function(e){return!0===e.current}));r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"setVideoDuration",value:function(e){var t=r.reduce(e,(function(e,t){return e+t.duration}),0);!r.isNaN(t)&&r.isNumber(t)&&(this.playbackStatus.totalDuration=Math.floor(t))}},{key:"setCurrentPosition",value:function(e){this.playbackStatus.position=e}},{key:"getCurrentPositon",value:function(){return this.playbackStatus.position}},{key:"setCurrentChapter",value:function(e){this.playbackStatus.chapter=e}},{key:"setPlaybackStarted",value:function(){this.playbackStatus.hasStarted=!0}},{key:"playbackHasStarted",value:function(){return this.playbackStatus.hasStarted}},{key:"getWatchTime",value:function(){return this.playbackStatus.totalWatched}},{key:"incrementWatchTime",value:function(){this.playbackStatus.totalWatched+=1}},{key:"getNewPlaybackStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.duration,n=e.watched;return{position:0,chapter:0,hasStarted:!1,totalWatched:n||0,totalDuration:t||0}}},{key:"resetPlaybackStatus",value:function(){var e={duration:this.playbackStatus.totalDuration,watched:this.playbackStatus.totalWatched};this.playbackStatus=this.getNewPlaybackStatus(e)}},{key:"unbindUnload",value:function(){$(window).off("unload")}},{key:"bindUnload",value:function(){$(window).on("unload",r.bind(this.logUnload,this))}},{key:"logUnload",value:function(){this.playbackHasStarted()&&this.logVerbose(g.PlaybackDescriptor.Terminate)}},{key:"logStream",value:function(){var e=b.a.buildActionContext(this.options.analyticsOptions),t=T(this.getPlaybackData());m.a.log(g.UserAction.Stream,t,e)}},{key:"logVerbose",value:function(e){}},{key:"getPlaybackData",value:function(){return{model:v(this.model),playbackStatus:r.omit(this.playbackStatus,"hasStarted")}}},{key:"onDestroy",value:function(){this.unbindListeners(),this.unbindUnload(),this.logUnload()}}])&&w(t.prototype,n),i&&w(t,i),l}(c.a.Service),I=n(1169),L=n.n(I),R=n(1170),D=n.n(R);function M(e){return(M="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})(e)}function x(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,r.key,r)}}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(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=V(e);if(t){var i=V(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return q(this,n)}}function q(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return j}));var j=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}}),t&&U(e,t)}(g,e);var t,n,u,v=F(g);function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),v.call(this,e)}return t=g,(n=[{key:"elements",get:function(){return{iframe:"iframe"}}},{key:"name",get:function(){return"WebPlayerView"}},{key:"template",get:function(){return L.a}},{key:"className",get:function(){return"".concat(D.a.webPlayerContainer," embed-responsive embed-responsive-16by9")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"defaults",get:function(){return{captureAnalytics:!0,showDevicesButton:!1}}},{key:"viewModelDefaults",get:function(){return{width:640,height:360,autoplay:!!this.options.autoplay,parameters:{s:!1,bc:!1,bf:!1,uid:this.options.currentUser.get("id"),cid:this.options.currentUser.get("customerId")},webPlayerHost:this.options.webPlayerUrl}}},{key:"initialize",value:function(){this.enableIeFs=this.isTop(),this.getViewModel()}},{key:"seekTo",value:function(e){this.eventsApi&&this.eventsApi.trigger(s.SEEK_TO,e)}},{key:"seekToChapter",value:function(e){this.eventsApi&&this.eventsApi.trigger("cv-player-changechapter",e)}},{key:"getViewModel",value:function(){var e=this.model.get("id");e||(e=this.model.get("trackingCode")),this.viewModel=l.a.get("".concat(y.z.NAME,"-").concat(e)),this.viewModel.get("initialized")||this.initViewModel(),this.setUrl()}},{key:"initViewModel",value:function(){var e=this.model.pick("id");e.id||(e=this.model.pick("trackingCode")),e.id||e.trackingCode||c.a.ErrorHelper.throw(new d.a("Must provide either a master id or a tracking code to ".concat(this.name)));var t=r.extend({},this.viewModelDefaults,e,this.viewModel.toJSON(),{initialized:!0});this.viewModel.set(t)}},{key:"initWebPlayerEvents",value:function(){if(this.enableIeFs){var e=this.getUI("iframe");e&&0!==e.length&&e.on("load",this.bindWebPlayerEvents.bind(this))}}},{key:"bindWebPlayerEvents",value:function(){if(!this.iframeReady){var e=this.getUI("iframe").get(0);this.eventsApi=new h.CVEventsApi(e.contentWindow),this.eventsApi.on(o.PONG,this.onPong.bind(this)),this.eventsApi.trigger(s.PING),this.eventsApi.on(o.FULLSCREEN_CLICK,this.onFullscreenChange.bind(this)),this.eventsApi.trigger(s.SHOW_FS_BTN),this.eventsApi.on(o.TIME_UPDATE,this.onTimeUpdate.bind(this)),this.eventsApi.on(o.PLAY,this.onPlay.bind(this)),this.eventsApi.on(o.PAUSE,this.onPause.bind(this)),this.eventsApi.on(o.VIDEO_END,this.onEnded.bind(this)),this.options.showDevicesButton&&(this.eventsApi.on(o.DEVICES_BTN_CLICK,this.showDeviceToggle.bind(this)),this.eventsApi.trigger(s.SHOW_DEVICES_BTN)),this.options.captureAnalytics&&(this.tracker=new O({video:this.model.toJSON(),eventsApi:this.eventsApi,analyticsOptions:this.options.analyticsOptions}))}}},{key:"unbindWebPlayerEvents",value:function(){this.eventsApi&&(this.eventsApi.off(o.FULLSCREEN_CLICK),this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.PLAY),this.eventsApi.off(o.PAUSE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.PONG),this.eventsApi.off(o.DEVICES_BTN_CLICK))}},{key:"setUrl",value:function(){var e="".concat(this.viewModel.get("webPlayerHost"),"embed"),t=r.omit(this.viewModel.get("parameters"),["p","vid"])||{};t.a=!!this.viewModel.get("autoplay");var n=this.viewModel.get("id");n&&(t.vid=n);var i=this.viewModel.get("trackingCode");i&&(t.p=i),this.viewModel.get("currenttime")&&(t.t=this.viewModel.get("currenttime"),t.a=!this.viewModel.get("paused"));var o=f.a.urlBuilder(e,t),s=Object(a.signUrl)(o,{timestamp:!0});this.viewModel.set({url:s})}},{key:"isTop",value:function(){return window.top===window}},{key:"onTimeUpdate",value:function(e,t){this.viewModel.set("ready",!0),this.viewModel.set("currenttime",t)}},{key:"onPlay",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!1)}},{key:"onPause",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!0)}},{key:"onEnded",value:function(){this.viewModel.trigger("ended")}},{key:"onPong",value:function(){this.iframeReady=!0,this.viewModel.set("ready",!0),i.Radio.channel(this.channelName).trigger("loaded"),this.options.parentChannelName&&i.Radio.channel(this.options.parentChannelName).trigger("webplayer:loaded")}},{key:"onFullscreenChange",value:function(e,t,n){t?this.requestFs(n):this.cancelFs(n)}},{key:"requestFs",value:function(e){e||$("html").addClass("player-fullscreen")}},{key:"cancelFs",value:function(e){e||$("html").removeClass("player-fullscreen")}},{key:"showDeviceToggle",value:function(e){this.viewModel.trigger("showDevices",!!e)}},{key:"query",value:function(e,t){var n=this;if(this.iframeReady){var i=r.uniqueId("cveventsapi");this.eventsApi.one("".concat(o.QUERY_CALLBACK,"-").concat(i),(function(e,n){t(n)})),this.eventsApi.trigger(s.QUERY,e,i)}else this.listenToOnce(this.channelName,"loaded",(function(){return n.query(e,t)}))}},{key:"viewOptions",value:function(){return r.extend({},{styles:D.a,playSvg:p.a.getSvg(p.b.Play)},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.initWebPlayerEvents()}},{key:"onBeforeDestroy",value:function(){this.unbindWebPlayerEvents(),this.tracker&&this.tracker.destroy()}}])&&x(t.prototype,n),u&&x(t,u),g}(c.a.Component)},1169:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var a,o=e.lambda,s=e.escapeExpression;return'<iframe class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.webPlayer:a,t))+' embed-responsive-item" id="'+s(o(null!=(a=null!=t?t.options:t)?a.id:a,t))+'" allowfullscreen webkitallowfullscreen mozallowfullscreen allow="autoplay; fullscreen" frameborder="0" width="'+s(o(null!=(a=null!=t?t.options:t)?a.width:a,t))+'" height="'+s(o(null!=(a=null!=t?t.options:t)?a.height:a,t))+'" src="'+s(o(null!=(a=null!=t?t.options:t)?a.url:a,t))+'"></iframe>\r\n<div class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.svgContainer:a,t))+'">'+(null!=(a=o(null!=(a=null!=t?t.options:t)?a.playSvg:a,t))?a:"")+"</div>"},useData:!0})},1170:function(e,t,n){e.exports={webPlayerContainer:"_2S4VF",webPlayer:"_3569L",svgContainer:"_1WsxD"}},990:function(e,t,n){"use strict";var r=n(995),i=n(991),a=(n(992),n(3),n(996)),o=(n(998),n(994));n.d(t,"a",(function(){return r.a})),n.d(t,"d",(function(){return i.g})),n.d(t,"g",(function(){return i.j})),n.d(t,"f",(function(){return i.i})),n.d(t,"c",(function(){return i.f})),n.d(t,"e",(function(){return i.h})),n.d(t,"b",(function(){return a.a})),n.d(t,"h",(function(){return o.a}))},991:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"k",(function(){return p})),n.d(t,"g",(function(){return v})),n.d(t,"e",(function(){return y})),n.d(t,"j",(function(){return g})),n.d(t,"i",(function(){return b})),n.d(t,"c",(function(){return P})),n.d(t,"b",(function(){return k})),n.d(t,"d",(function(){return T})),n.d(t,"f",(function(){return E})),n.d(t,"h",(function(){return m}));var r=n(2),i=n(1),a=n(20),o=n(29),s=n(3),u="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=i.reduce(e,(function(e,n,r){var a=t[r];return n||a?i.isObject(n)&&i.isObject(a)&&!i.isUndefined(n.id)&&n.id===a.id?e:i.isArray(n)?d(n,a).length?e.concat(r):e:i.isEqual(n,a)?e:e.concat(r):e}),[]);if(n.length)return i.object(i.map(n,(function(n){return i.isArray(t[n])?[n,d(e[n],t[n])]:[n,t[n]]})))}}function d(e,t){var n=[];return i.each(t,(function(t){var r=i.findWhere(e,{id:t.id});if(!i.isUndefined(r)||0!==Object.keys(t).length){var a=i.isUndefined(r)?t:l(r,t);a&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(a.id=t.id,n.push(a))))}})),n}var f={getChanges:function(e,t){var n=l(i.omit(e.toJSON(),c),i.omit(t.toJSON(),c));if(n)return i.object(i.map(i.keys(n),(function(e){return[e,f.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(i.isObject(t)&&i.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return i.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new a.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var a=["distributors","producers","directors","productionCompanies"];for(var o in i.each(i.keys(n),(function(e){a.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(i.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var s=e.get(o);(s instanceof r.a.Model||s instanceof r.a.NestedModel)&&s.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return i.each(i.keys(e.toJSON()),(function(a){if(i.contains(n,a)){var o=e.get(a).map((function(e){return e.id})),s=t.get(a).map((function(e){return e.id})),u=i.filter(o,(function(e){return e&&!i.contains(s,e)}));u.length&&(r[a]=u)}})),r}},p={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?s.a.getPhrase(u,"episodeNumberLessThanOne"):e&&e>2147483647?s.a.getPhrase(u,"episodeNumberExceeds"):e%1!=0?s.a.getPhrase(u,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?s.a.getPhrase(u,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":s.a.getPhrase(u,"seasonNoEpisodeNumber")}},h=o().year(),y={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>h?s.a.getPhrase(u,"validProductionYears",{currentYear:h}):void 0):""}},v={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"resourceNameRequired")}}]},g={suggestion:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditReasonExceeds")}}]},m={number:function(e){return e?+e<1?s.a.getPhrase(u,"seasonLessThanOne"):+e>3e3?s.a.getPhrase(u,"seasonExceeds"):+e%1!=0?s.a.getPhrase(u,"seasonNotWhole"):"":s.a.getPhrase(u,"seasonRequired")}},b={empty:function(){return s.a.getPhrase(u,"suggestEditRatingRequired")},original:function(){return s.a.getPhrase(u,"suggestEditRatingInvalid")}},E={url:[{required:!0,pattern:"url",msg:function(){return s.a.getPhrase(u,"linkUrlRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return s.a.getPhrase(u,"linkNameRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"linkNameExceeds")}}]},P={name:[{maxLength:128,msg:function(){return s.a.getPhrase(u,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return s.a.getPhrase(u,"fieldValueExceeds")}}]},k={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":s.a.getPhrase(u,"fieldsInvalid"):""}};function T(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},992:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),i=n(48),a=n(159),o=n(3),s="libraryEditor.utils",u={name:[{required:!0,msg:function(){return o.a.getPhrase(s,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(s,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?i.a.calculateDestinationFolderDepth(e,n,t)>a.a.MAX_FOLDER_DEPTH?o.a.getPhrase(s,"maxFolderDepth",{maxDepth:a.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(s,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,i=e.folder,a=e.collection;return t&&n?r.extend({},u,c(i,a)):t?u:n?c(i,a):void 0}},994:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(15),i=n(3),a=n(187),o=n(1010),s=n(61);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var d={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case s.a.HostedLibrary:case s.a.CustomLibrary:return e.get("name");case s.a.Exchange:return i.a.getPhrase(l,"exchange");case s.a.Workspace:return i.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case s.a.HostedLibrary:case s.a.CustomLibrary:return"bg-info";case s.a.Exchange:return"bg-green";case s.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(u(t={},c.Pdf,r.b.FilePDF),u(t,c.Image,r.b.FileImg),u(t,c.PowerPoint,r.b.FilePowerpoint),u(t,c.Document,r.b.FileWord),u(t,c.Excel,r.b.FileExcel),u(t,c.Zip,r.b.FileZip),u(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return i.a.getPhrase(l,"pdf");case c.Image:return i.a.getPhrase(l,"image");case c.Document:return i.a.getPhrase(l,"document");case c.Excel:return i.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return i.a.getPhrase(l,"presentation");case c.Zip:return i.a.getPhrase(l,"zipArchive");case c.File:return i.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:d.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case a.MetadataType.VideoTitle:t+="VideoTitle";break;case a.MetadataType.Description:t+="Description";break;case a.MetadataType.Rating:t+="Rating";break;case a.MetadataType.SeriesTitle:t+="SeriesTitle";break;case a.MetadataType.Season:t+="SeasonNumber";break;case a.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case a.MetadataType.BroadcastDate:t+="BroadcastDate";break;case a.MetadataType.Channel:t+="Channel";break;case a.MetadataType.ProductionYear:t+="ProductionYear";break;case a.MetadataType.Distributors:t+="Distributors";break;case a.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case a.MetadataType.Directors:t+="Directors";break;case a.MetadataType.Producers:t+="Producers";break;case a.MetadataType.Other:t+="Other"}return i.a.getPhrase(l,t)}}},995:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),i=n(12),a=n(3),o="libraryEditor.utils",s={isValidChapterTime:function(e,t,n,a){if(a){if(!r.isNumber(t))return u.StartTime.Invalid();if(t<0)return u.StartTime.Invalid();if(t>i.x.millisecondsToSeconds(n))return u.StartTime.Exceeds();if(a.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return u.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?u.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?u.Name.Exists():r.isEmpty(t.trim())?u.Name.Invalid():void 0:u.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},u={Name:{Invalid:function(){return a.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return a.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return a.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return a.a.getPhrase(o,"chapterStartTimeExceeds")}}}},996:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i="libraryEditor.utils",a={name:[{required:!0,msg:function(){return r.a.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(i,"libraryNameExceeds")}}]}},998:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(991),a=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return a("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return a("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return a("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?a("episodeNumberLessThanOne"):e&&e>255?a("episodeNumberExceeds"):e&&e%1!=0?a("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?a("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":a("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.e.productionYear.apply(null,t)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[1],{1005:function(e,t,n){"use strict";function r(e){return(r="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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(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=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(n,e);var t=o(n);function n(){return i(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1133:function(e,t,n){"use strict";var r=n(1),i=n(6),a=n(1163),o={PLAY:"cv-player-play",PAUSE:"cv-player-pause",VIDEO_END:"cv-player-ended",VOLUME_CHANGE:"cv-player-volumechange",CHAPTER_CHANGE:"cv-player-chapterchange",TIME_UPDATE:"cv-player-timeupdate",FULLSCREEN_CHANGE:"cv-player-fullscreenchange",CLIP_POINTS_UPDATE:"cv-player-cliptoolupdate",QUALITY_CHANGE:"cv-player-qualitychange",QUERY_CALLBACK:"cv-player-querycallback",SUBTITLES_ENABLED:"cv-player-hassubtitles",SUBTITLES:"cv-player-subtitles",PONG:"cv-player-pong",FULLSCREEN_CLICK:"_cvwp:fsc",DEVICES_BTN_CLICK:"_cvwp:devices:click"},s={PLAY:"cv-player-play",PAUSE:"cv-player-pause",SET_VOLUME:"cv-player-setvolume",NEXT_CHAPTER:"cv-player-nextchapter",PREV_CHAPTER:"cv-player-previouschapter",CHANGE_CHAPTER:"cv-player-changechapter",TOGGLE_CLIPPING:"cv-player-cliptooltoggle",SET_CLIP_POINTS:"cv-player-cliptoolset",CLIP:"cv-player-setclip",CLEAR_CLIP:"cv-player-clearclip",SEEK_TO:"cv-player-seekto",CONTROLS:"cv-player-showcontrols",SUBTITLES:"cv-player-subtitles",SET_QUALITY:"cv-player-setquality",QUERY:"cv-player-query",ADD_LISTENER:"cv-player-addlistener",REMOVE_LISTENER:"cv-player-removelistener",PING:"cv-player-ping",TOGGLE_DEVICES_BTN:"_cv:toggledevicesbtn",SHOW_DEVICES_BTN:"_cv:showdevicesbtn",SHOW_FS_BTN:"_cv:showfsbtn"},u={GET_AVAILABLE_QUALITIES:"getAvailableQualities",GET_CURRENT_QUALITY:"currentQuality",IS_PAUSED:"paused",GET_CURRENT_TIME:"currentTime",GET_CHAPTERS:"getChapters",HAS_METADATA_CHAPTERS:"hasMetadataChapters"},c=n(2),l=n(30),d=n(20),f=n(59),p=n(15),h=n(977),y=n(0),v=function(e){return e instanceof c.a.Model||e instanceof c.a.Collection||e instanceof i.Model||e instanceof i.Collection?e.toJSON():e},g=n(4),m=n(117),b=n(42);function E(e){if(e&&e.code)return e.code}function P(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.id){var n={id:e.id};return e.name&&!t.ignoreTitle&&(n.title=e.name),n}}function k(e){if(e&&e.length){var t=e[0];return{id:t.id,title:t.name}}}var T=function(e){var t=e.model,n={id:t.id.toString(),year:t.productionYear,title:t.name,trackingCode:t.trackingCode},r=E(t.rating),i=P(t.series),a=k(t.categories),o=P(t.owner,{ignoreTitle:!0}),s=P(t.playlist);return r&&(n.rating=r),o&&(n.ownerId=o.id),i&&(n.seriesId=i.id,n.series=i.title),a&&(n.category=a.title),s&&(n.playlist=s),n};function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(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,r.key,r)}}function C(e,t){return(C=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(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=A(e);if(t){var i=A(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){return!t||"object"!==S(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function A(e){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=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}}),t&&C(e,t)}(l,e);var t,n,i,a=N(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).captureInterval=60,t}return t=l,(n=[{key:"name",get:function(){return"VideoAnalyticsTracker"}},{key:"initialize",value:function(){this.eventsApi=this.options.eventsApi,this.options.video||c.a.ErrorHelper.throw(new d.a("Video logging requires video to be passed in.")),this.model=this.options.video,this.playbackStatus=this.getNewPlaybackStatus(),this.options.captureInterval&&(this.captureInterval=this.options.captureInterval),this.bindListeners(),this.getChapters()}},{key:"bindListeners",value:function(){this.eventsApi.on(o.TIME_UPDATE,r.bind(this.onPlayerTimeUpdate,this)),this.eventsApi.on(o.VIDEO_END,r.bind(this.onEnd,this)),this.eventsApi.on(o.FULLSCREEN_CHANGE,r.bind(this.onFullScreen,this)),this.eventsApi.on(o.CHAPTER_CHANGE,r.bind(this.onChapterChange,this))}},{key:"unbindListeners",value:function(){this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.FULLSCREEN_CHANGE),this.eventsApi.off(o.CHAPTER_CHANGE)}},{key:"getChapters",value:function(){var e=this;this.queryWebplayer(u.GET_CHAPTERS,(function(t,n){e.setInitialChapter(n),e.setVideoDuration(n)}))}},{key:"queryWebplayer",value:function(e,t){var n=r.uniqueId(this.name),i="".concat(o.QUERY_CALLBACK,"-").concat(n);this.eventsApi.one(i,t),this.eventsApi.trigger(s.QUERY,e,n)}},{key:"onEnd",value:function(){this.setCurrentPosition(this.playbackStatus.totalDuration),this.logVerbose(g.PlaybackDescriptor.Finish),this.resetPlaybackStatus()}},{key:"onFullScreen",value:function(e,t){var n=t?g.PlaybackDescriptor.FullScreenEnter:g.PlaybackDescriptor.FullScreenExit;this.logVerbose(n)}},{key:"onPlayerTimeUpdate",value:function(e,t){var n=this;this.queryWebplayer(u.IS_PAUSED,(function(e,r){n.updateTime(t,r)}))}},{key:"onChapterChange",value:function(e,t){r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"updateTime",value:function(e,t){var n=Math.floor(e);n&&n!==this.getCurrentPositon()&&(this.setCurrentPosition(n),t||(this.playbackHasStarted()||(this.logVerbose(g.PlaybackDescriptor.Start),this.setPlaybackStarted()),this.incrementWatchTime(),this.getWatchTime()%this.captureInterval==0&&this.logVerbose(g.PlaybackDescriptor.Playback),8===this.getWatchTime()&&this.logStream()))}},{key:"setInitialChapter",value:function(e){var t=r.find(e,(function(e){return!0===e.current}));r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"setVideoDuration",value:function(e){var t=r.reduce(e,(function(e,t){return e+t.duration}),0);!r.isNaN(t)&&r.isNumber(t)&&(this.playbackStatus.totalDuration=Math.floor(t))}},{key:"setCurrentPosition",value:function(e){this.playbackStatus.position=e}},{key:"getCurrentPositon",value:function(){return this.playbackStatus.position}},{key:"setCurrentChapter",value:function(e){this.playbackStatus.chapter=e}},{key:"setPlaybackStarted",value:function(){this.playbackStatus.hasStarted=!0}},{key:"playbackHasStarted",value:function(){return this.playbackStatus.hasStarted}},{key:"getWatchTime",value:function(){return this.playbackStatus.totalWatched}},{key:"incrementWatchTime",value:function(){this.playbackStatus.totalWatched+=1}},{key:"getNewPlaybackStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.duration,n=e.watched;return{position:0,chapter:0,hasStarted:!1,totalWatched:n||0,totalDuration:t||0}}},{key:"resetPlaybackStatus",value:function(){var e={duration:this.playbackStatus.totalDuration,watched:this.playbackStatus.totalWatched};this.playbackStatus=this.getNewPlaybackStatus(e)}},{key:"unbindUnload",value:function(){$(window).off("unload")}},{key:"bindUnload",value:function(){$(window).on("unload",r.bind(this.logUnload,this))}},{key:"logUnload",value:function(){this.playbackHasStarted()&&this.logVerbose(g.PlaybackDescriptor.Terminate)}},{key:"logStream",value:function(){var e=b.a.buildActionContext(this.options.analyticsOptions),t=T(this.getPlaybackData());m.a.log(g.UserAction.Stream,t,e)}},{key:"logVerbose",value:function(e){}},{key:"getPlaybackData",value:function(){return{model:v(this.model),playbackStatus:r.omit(this.playbackStatus,"hasStarted")}}},{key:"onDestroy",value:function(){this.unbindListeners(),this.unbindUnload(),this.logUnload()}}])&&w(t.prototype,n),i&&w(t,i),l}(c.a.Service),I=n(1164),L=n.n(I),R=n(1165),D=n.n(R);function M(e){return(M="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})(e)}function x(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,r.key,r)}}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(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=V(e);if(t){var i=V(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return q(this,n)}}function q(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return j}));var j=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}}),t&&U(e,t)}(g,e);var t,n,u,v=F(g);function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),v.call(this,e)}return t=g,(n=[{key:"elements",get:function(){return{iframe:"iframe"}}},{key:"name",get:function(){return"WebPlayerView"}},{key:"template",get:function(){return L.a}},{key:"className",get:function(){return"".concat(D.a.webPlayerContainer," embed-responsive embed-responsive-16by9")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"defaults",get:function(){return{captureAnalytics:!0,showDevicesButton:!1}}},{key:"viewModelDefaults",get:function(){return{width:640,height:360,autoplay:!!this.options.autoplay,parameters:{s:!1,bc:!1,bf:!1,uid:this.options.currentUser.get("id"),cid:this.options.currentUser.get("customerId")},webPlayerHost:this.options.webPlayerUrl}}},{key:"initialize",value:function(){this.enableIeFs=this.isTop(),this.getViewModel()}},{key:"seekTo",value:function(e){this.eventsApi&&this.eventsApi.trigger(s.SEEK_TO,e)}},{key:"seekToChapter",value:function(e){this.eventsApi&&this.eventsApi.trigger("cv-player-changechapter",e)}},{key:"getViewModel",value:function(){var e=this.model.get("id");e||(e=this.model.get("trackingCode")),this.viewModel=l.a.get("".concat(y.z.NAME,"-").concat(e)),this.viewModel.get("initialized")||this.initViewModel(),this.setUrl()}},{key:"initViewModel",value:function(){var e=this.model.pick("id");e.id||(e=this.model.pick("trackingCode")),e.id||e.trackingCode||c.a.ErrorHelper.throw(new d.a("Must provide either a master id or a tracking code to ".concat(this.name)));var t=r.extend({},this.viewModelDefaults,e,this.viewModel.toJSON(),{initialized:!0});this.viewModel.set(t)}},{key:"initWebPlayerEvents",value:function(){if(this.enableIeFs){var e=this.getUI("iframe");e&&0!==e.length&&e.on("load",this.bindWebPlayerEvents.bind(this))}}},{key:"bindWebPlayerEvents",value:function(){if(!this.iframeReady){var e=this.getUI("iframe").get(0);this.eventsApi=new h.CVEventsApi(e.contentWindow),this.eventsApi.on(o.PONG,this.onPong.bind(this)),this.eventsApi.trigger(s.PING),this.eventsApi.on(o.FULLSCREEN_CLICK,this.onFullscreenChange.bind(this)),this.eventsApi.trigger(s.SHOW_FS_BTN),this.eventsApi.on(o.TIME_UPDATE,this.onTimeUpdate.bind(this)),this.eventsApi.on(o.PLAY,this.onPlay.bind(this)),this.eventsApi.on(o.PAUSE,this.onPause.bind(this)),this.eventsApi.on(o.VIDEO_END,this.onEnded.bind(this)),this.options.showDevicesButton&&(this.eventsApi.on(o.DEVICES_BTN_CLICK,this.showDeviceToggle.bind(this)),this.eventsApi.trigger(s.SHOW_DEVICES_BTN)),this.options.captureAnalytics&&(this.tracker=new O({video:this.model.toJSON(),eventsApi:this.eventsApi,analyticsOptions:this.options.analyticsOptions}))}}},{key:"unbindWebPlayerEvents",value:function(){this.eventsApi&&(this.eventsApi.off(o.FULLSCREEN_CLICK),this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.PLAY),this.eventsApi.off(o.PAUSE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.PONG),this.eventsApi.off(o.DEVICES_BTN_CLICK))}},{key:"setUrl",value:function(){var e="".concat(this.viewModel.get("webPlayerHost"),"embed"),t=r.omit(this.viewModel.get("parameters"),["p","vid"])||{};t.a=!!this.viewModel.get("autoplay");var n=this.viewModel.get("id");n&&(t.vid=n);var i=this.viewModel.get("trackingCode");i&&(t.p=i),this.viewModel.get("currenttime")&&(t.t=this.viewModel.get("currenttime"),t.a=!this.viewModel.get("paused"));var o=f.a.urlBuilder(e,t),s=Object(a.signUrl)(o,{timestamp:!0});this.viewModel.set({url:s})}},{key:"isTop",value:function(){return window.top===window}},{key:"onTimeUpdate",value:function(e,t){this.viewModel.set("ready",!0),this.viewModel.set("currenttime",t)}},{key:"onPlay",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!1)}},{key:"onPause",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!0)}},{key:"onEnded",value:function(){this.viewModel.trigger("ended")}},{key:"onPong",value:function(){this.iframeReady=!0,this.viewModel.set("ready",!0),i.Radio.channel(this.channelName).trigger("loaded"),this.options.parentChannelName&&i.Radio.channel(this.options.parentChannelName).trigger("webplayer:loaded")}},{key:"onFullscreenChange",value:function(e,t,n){t?this.requestFs(n):this.cancelFs(n)}},{key:"requestFs",value:function(e){e||$("html").addClass("player-fullscreen")}},{key:"cancelFs",value:function(e){e||$("html").removeClass("player-fullscreen")}},{key:"showDeviceToggle",value:function(e){this.viewModel.trigger("showDevices",!!e)}},{key:"query",value:function(e,t){var n=this;if(this.iframeReady){var i=r.uniqueId("cveventsapi");this.eventsApi.one("".concat(o.QUERY_CALLBACK,"-").concat(i),(function(e,n){t(n)})),this.eventsApi.trigger(s.QUERY,e,i)}else this.listenToOnce(this.channelName,"loaded",(function(){return n.query(e,t)}))}},{key:"viewOptions",value:function(){return r.extend({},{styles:D.a,playSvg:p.a.getSvg(p.b.Play)},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.initWebPlayerEvents()}},{key:"onBeforeDestroy",value:function(){this.unbindWebPlayerEvents(),this.tracker&&this.tracker.destroy()}}])&&x(t.prototype,n),u&&x(t,u),g}(c.a.Component)},1164:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var a,o=e.lambda,s=e.escapeExpression;return'<iframe class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.webPlayer:a,t))+' embed-responsive-item" id="'+s(o(null!=(a=null!=t?t.options:t)?a.id:a,t))+'" allowfullscreen webkitallowfullscreen mozallowfullscreen allow="autoplay; fullscreen" frameborder="0" width="'+s(o(null!=(a=null!=t?t.options:t)?a.width:a,t))+'" height="'+s(o(null!=(a=null!=t?t.options:t)?a.height:a,t))+'" src="'+s(o(null!=(a=null!=t?t.options:t)?a.url:a,t))+'"></iframe>\r\n<div class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.svgContainer:a,t))+'">'+(null!=(a=o(null!=(a=null!=t?t.options:t)?a.playSvg:a,t))?a:"")+"</div>"},useData:!0})},1165:function(e,t,n){e.exports={webPlayerContainer:"_2S4VF",webPlayer:"_3569L",svgContainer:"_1WsxD"}},985:function(e,t,n){"use strict";var r=n(990),i=n(986),a=(n(987),n(3),n(991)),o=(n(993),n(989));n.d(t,"a",(function(){return r.a})),n.d(t,"d",(function(){return i.g})),n.d(t,"g",(function(){return i.j})),n.d(t,"f",(function(){return i.i})),n.d(t,"c",(function(){return i.f})),n.d(t,"e",(function(){return i.h})),n.d(t,"b",(function(){return a.a})),n.d(t,"h",(function(){return o.a}))},986:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"k",(function(){return p})),n.d(t,"g",(function(){return v})),n.d(t,"e",(function(){return y})),n.d(t,"j",(function(){return g})),n.d(t,"i",(function(){return b})),n.d(t,"c",(function(){return P})),n.d(t,"b",(function(){return k})),n.d(t,"d",(function(){return T})),n.d(t,"f",(function(){return E})),n.d(t,"h",(function(){return m}));var r=n(2),i=n(1),a=n(20),o=n(29),s=n(3),u="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=i.reduce(e,(function(e,n,r){var a=t[r];return n||a?i.isObject(n)&&i.isObject(a)&&!i.isUndefined(n.id)&&n.id===a.id?e:i.isArray(n)?d(n,a).length?e.concat(r):e:i.isEqual(n,a)?e:e.concat(r):e}),[]);if(n.length)return i.object(i.map(n,(function(n){return i.isArray(t[n])?[n,d(e[n],t[n])]:[n,t[n]]})))}}function d(e,t){var n=[];return i.each(t,(function(t){var r=i.findWhere(e,{id:t.id});if(!i.isUndefined(r)||0!==Object.keys(t).length){var a=i.isUndefined(r)?t:l(r,t);a&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(a.id=t.id,n.push(a))))}})),n}var f={getChanges:function(e,t){var n=l(i.omit(e.toJSON(),c),i.omit(t.toJSON(),c));if(n)return i.object(i.map(i.keys(n),(function(e){return[e,f.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(i.isObject(t)&&i.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return i.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new a.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var a=["distributors","producers","directors","productionCompanies"];for(var o in i.each(i.keys(n),(function(e){a.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(i.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var s=e.get(o);(s instanceof r.a.Model||s instanceof r.a.NestedModel)&&s.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return i.each(i.keys(e.toJSON()),(function(a){if(i.contains(n,a)){var o=e.get(a).map((function(e){return e.id})),s=t.get(a).map((function(e){return e.id})),u=i.filter(o,(function(e){return e&&!i.contains(s,e)}));u.length&&(r[a]=u)}})),r}},p={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?s.a.getPhrase(u,"episodeNumberLessThanOne"):e&&e>2147483647?s.a.getPhrase(u,"episodeNumberExceeds"):e%1!=0?s.a.getPhrase(u,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?s.a.getPhrase(u,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":s.a.getPhrase(u,"seasonNoEpisodeNumber")}},h=o().year(),y={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>h?s.a.getPhrase(u,"validProductionYears",{currentYear:h}):void 0):""}},v={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"resourceNameRequired")}}]},g={suggestion:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditReasonExceeds")}}]},m={number:function(e){return e?+e<1?s.a.getPhrase(u,"seasonLessThanOne"):+e>3e3?s.a.getPhrase(u,"seasonExceeds"):+e%1!=0?s.a.getPhrase(u,"seasonNotWhole"):"":s.a.getPhrase(u,"seasonRequired")}},b={empty:function(){return s.a.getPhrase(u,"suggestEditRatingRequired")},original:function(){return s.a.getPhrase(u,"suggestEditRatingInvalid")}},E={url:[{required:!0,pattern:"url",msg:function(){return s.a.getPhrase(u,"linkUrlRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return s.a.getPhrase(u,"linkNameRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"linkNameExceeds")}}]},P={name:[{maxLength:128,msg:function(){return s.a.getPhrase(u,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return s.a.getPhrase(u,"fieldValueExceeds")}}]},k={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":s.a.getPhrase(u,"fieldsInvalid"):""}};function T(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},987:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),i=n(48),a=n(159),o=n(3),s="libraryEditor.utils",u={name:[{required:!0,msg:function(){return o.a.getPhrase(s,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(s,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?i.a.calculateDestinationFolderDepth(e,n,t)>a.a.MAX_FOLDER_DEPTH?o.a.getPhrase(s,"maxFolderDepth",{maxDepth:a.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(s,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,i=e.folder,a=e.collection;return t&&n?r.extend({},u,c(i,a)):t?u:n?c(i,a):void 0}},989:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(15),i=n(3),a=n(187),o=n(1005),s=n(61);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var d={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case s.a.HostedLibrary:case s.a.CustomLibrary:return e.get("name");case s.a.Exchange:return i.a.getPhrase(l,"exchange");case s.a.Workspace:return i.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case s.a.HostedLibrary:case s.a.CustomLibrary:return"bg-info";case s.a.Exchange:return"bg-green";case s.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(u(t={},c.Pdf,r.b.FilePDF),u(t,c.Image,r.b.FileImg),u(t,c.PowerPoint,r.b.FilePowerpoint),u(t,c.Document,r.b.FileWord),u(t,c.Excel,r.b.FileExcel),u(t,c.Zip,r.b.FileZip),u(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return i.a.getPhrase(l,"pdf");case c.Image:return i.a.getPhrase(l,"image");case c.Document:return i.a.getPhrase(l,"document");case c.Excel:return i.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return i.a.getPhrase(l,"presentation");case c.Zip:return i.a.getPhrase(l,"zipArchive");case c.File:return i.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:d.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case a.MetadataType.VideoTitle:t+="VideoTitle";break;case a.MetadataType.Description:t+="Description";break;case a.MetadataType.Rating:t+="Rating";break;case a.MetadataType.SeriesTitle:t+="SeriesTitle";break;case a.MetadataType.Season:t+="SeasonNumber";break;case a.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case a.MetadataType.BroadcastDate:t+="BroadcastDate";break;case a.MetadataType.Channel:t+="Channel";break;case a.MetadataType.ProductionYear:t+="ProductionYear";break;case a.MetadataType.Distributors:t+="Distributors";break;case a.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case a.MetadataType.Directors:t+="Directors";break;case a.MetadataType.Producers:t+="Producers";break;case a.MetadataType.Other:t+="Other"}return i.a.getPhrase(l,t)}}},990:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),i=n(12),a=n(3),o="libraryEditor.utils",s={isValidChapterTime:function(e,t,n,a){if(a){if(!r.isNumber(t))return u.StartTime.Invalid();if(t<0)return u.StartTime.Invalid();if(t>i.x.millisecondsToSeconds(n))return u.StartTime.Exceeds();if(a.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return u.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?u.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?u.Name.Exists():r.isEmpty(t.trim())?u.Name.Invalid():void 0:u.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},u={Name:{Invalid:function(){return a.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return a.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return a.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return a.a.getPhrase(o,"chapterStartTimeExceeds")}}}},991:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i="libraryEditor.utils",a={name:[{required:!0,msg:function(){return r.a.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(i,"libraryNameExceeds")}}]}},993:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(986),a=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return a("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return a("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return a("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?a("episodeNumberLessThanOne"):e&&e>255?a("episodeNumberExceeds"):e&&e%1!=0?a("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?a("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":a("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.e.productionYear.apply(null,t)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[1],{1010:function(e,t,n){"use strict";function r(e){return(r="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})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(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=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(n,e);var t=o(n);function n(){return i(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1138:function(e,t,n){"use strict";var r=n(1),i=n(6),a=n(1168),o={PLAY:"cv-player-play",PAUSE:"cv-player-pause",VIDEO_END:"cv-player-ended",VOLUME_CHANGE:"cv-player-volumechange",CHAPTER_CHANGE:"cv-player-chapterchange",TIME_UPDATE:"cv-player-timeupdate",FULLSCREEN_CHANGE:"cv-player-fullscreenchange",CLIP_POINTS_UPDATE:"cv-player-cliptoolupdate",QUALITY_CHANGE:"cv-player-qualitychange",QUERY_CALLBACK:"cv-player-querycallback",SUBTITLES_ENABLED:"cv-player-hassubtitles",SUBTITLES:"cv-player-subtitles",PONG:"cv-player-pong",FULLSCREEN_CLICK:"_cvwp:fsc",DEVICES_BTN_CLICK:"_cvwp:devices:click"},s={PLAY:"cv-player-play",PAUSE:"cv-player-pause",SET_VOLUME:"cv-player-setvolume",NEXT_CHAPTER:"cv-player-nextchapter",PREV_CHAPTER:"cv-player-previouschapter",CHANGE_CHAPTER:"cv-player-changechapter",TOGGLE_CLIPPING:"cv-player-cliptooltoggle",SET_CLIP_POINTS:"cv-player-cliptoolset",CLIP:"cv-player-setclip",CLEAR_CLIP:"cv-player-clearclip",SEEK_TO:"cv-player-seekto",CONTROLS:"cv-player-showcontrols",SUBTITLES:"cv-player-subtitles",SET_QUALITY:"cv-player-setquality",QUERY:"cv-player-query",ADD_LISTENER:"cv-player-addlistener",REMOVE_LISTENER:"cv-player-removelistener",PING:"cv-player-ping",TOGGLE_DEVICES_BTN:"_cv:toggledevicesbtn",SHOW_DEVICES_BTN:"_cv:showdevicesbtn",SHOW_FS_BTN:"_cv:showfsbtn"},u={GET_AVAILABLE_QUALITIES:"getAvailableQualities",GET_CURRENT_QUALITY:"currentQuality",IS_PAUSED:"paused",GET_CURRENT_TIME:"currentTime",GET_CHAPTERS:"getChapters",HAS_METADATA_CHAPTERS:"hasMetadataChapters"},c=n(2),l=n(30),d=n(20),f=n(57),p=n(15),h=n(982),y=n(0),v=function(e){return e instanceof c.a.Model||e instanceof c.a.Collection||e instanceof i.Model||e instanceof i.Collection?e.toJSON():e},g=n(4),m=n(117),b=n(42);function E(e){return(E="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})(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,r.key,r)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(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=w(e);if(t){var i=w(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return S(this,n)}}function S(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(l,e);var t,n,i,a=T(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).captureInterval=60,t}return t=l,(n=[{key:"name",get:function(){return"VideoAnalyticsTracker"}},{key:"initialize",value:function(){this.eventsApi=this.options.eventsApi,this.options.video||c.a.ErrorHelper.throw(new d.a("Video logging requires video to be passed in.")),this.model=this.options.video,this.playbackStatus=this.getNewPlaybackStatus(),this.options.captureInterval&&(this.captureInterval=this.options.captureInterval),this.bindListeners(),this.getChapters()}},{key:"bindListeners",value:function(){this.eventsApi.on(o.TIME_UPDATE,r.bind(this.onPlayerTimeUpdate,this)),this.eventsApi.on(o.VIDEO_END,r.bind(this.onEnd,this)),this.eventsApi.on(o.FULLSCREEN_CHANGE,r.bind(this.onFullScreen,this)),this.eventsApi.on(o.CHAPTER_CHANGE,r.bind(this.onChapterChange,this))}},{key:"unbindListeners",value:function(){this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.FULLSCREEN_CHANGE),this.eventsApi.off(o.CHAPTER_CHANGE)}},{key:"getChapters",value:function(){var e=this;this.queryWebplayer(u.GET_CHAPTERS,(function(t,n){e.setInitialChapter(n),e.setVideoDuration(n)}))}},{key:"queryWebplayer",value:function(e,t){var n=r.uniqueId(this.name),i="".concat(o.QUERY_CALLBACK,"-").concat(n);this.eventsApi.one(i,t),this.eventsApi.trigger(s.QUERY,e,n)}},{key:"onEnd",value:function(){this.setCurrentPosition(this.playbackStatus.totalDuration),this.logVerbose(g.PlaybackDescriptor.Finish),this.resetPlaybackStatus()}},{key:"onFullScreen",value:function(e,t){var n=t?g.PlaybackDescriptor.FullScreenEnter:g.PlaybackDescriptor.FullScreenExit;this.logVerbose(n)}},{key:"onPlayerTimeUpdate",value:function(e,t){var n=this;this.queryWebplayer(u.IS_PAUSED,(function(e,r){n.updateTime(t,r)}))}},{key:"onChapterChange",value:function(e,t){r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"updateTime",value:function(e,t){var n=Math.floor(e);n&&n!==this.getCurrentPositon()&&(this.setCurrentPosition(n),t||(this.playbackHasStarted()||(this.logVerbose(g.PlaybackDescriptor.Start),this.setPlaybackStarted()),this.incrementWatchTime(),this.getWatchTime()%this.captureInterval==0&&this.logVerbose(g.PlaybackDescriptor.Playback),8===this.getWatchTime()&&this.logStream()))}},{key:"setInitialChapter",value:function(e){var t=r.find(e,(function(e){return!0===e.current}));r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"setVideoDuration",value:function(e){var t=r.reduce(e,(function(e,t){return e+t.duration}),0);!r.isNaN(t)&&r.isNumber(t)&&(this.playbackStatus.totalDuration=Math.floor(t))}},{key:"setCurrentPosition",value:function(e){this.playbackStatus.position=e}},{key:"getCurrentPositon",value:function(){return this.playbackStatus.position}},{key:"setCurrentChapter",value:function(e){this.playbackStatus.chapter=e}},{key:"setPlaybackStarted",value:function(){this.playbackStatus.hasStarted=!0}},{key:"playbackHasStarted",value:function(){return this.playbackStatus.hasStarted}},{key:"getWatchTime",value:function(){return this.playbackStatus.totalWatched}},{key:"incrementWatchTime",value:function(){this.playbackStatus.totalWatched+=1}},{key:"getNewPlaybackStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.duration,n=e.watched;return{position:0,chapter:0,hasStarted:!1,totalWatched:n||0,totalDuration:t||0}}},{key:"resetPlaybackStatus",value:function(){var e={duration:this.playbackStatus.totalDuration,watched:this.playbackStatus.totalWatched};this.playbackStatus=this.getNewPlaybackStatus(e)}},{key:"unbindUnload",value:function(){$(window).off("unload")}},{key:"bindUnload",value:function(){$(window).on("unload",r.bind(this.logUnload,this))}},{key:"logUnload",value:function(){this.playbackHasStarted()&&this.logVerbose(g.PlaybackDescriptor.Terminate)}},{key:"logStream",value:function(){var e=b.a.buildActionContext(this.options.analyticsOptions);m.a.log(g.UserAction.Stream,this.getPlaybackData(),e)}},{key:"logVerbose",value:function(e){}},{key:"getPlaybackData",value:function(){return{model:v(this.model),playbackStatus:r.omit(this.playbackStatus,"hasStarted")}}},{key:"onDestroy",value:function(){this.unbindListeners(),this.unbindUnload(),this.logUnload()}}])&&P(t.prototype,n),i&&P(t,i),l}(c.a.Service),N=n(1169),_=n.n(N),A=n(1170),O=n.n(A);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})(e)}function L(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,r.key,r)}}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function D(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=x(e);if(t){var i=x(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return M(this,n)}}function M(e,t){return!t||"object"!==I(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return U}));var U=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}}),t&&R(e,t)}(g,e);var t,n,u,v=D(g);function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),v.call(this,e)}return t=g,(n=[{key:"elements",get:function(){return{iframe:"iframe"}}},{key:"name",get:function(){return"WebPlayerView"}},{key:"template",get:function(){return _.a}},{key:"className",get:function(){return"".concat(O.a.webPlayerContainer," embed-responsive embed-responsive-16by9")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"defaults",get:function(){return{captureAnalytics:!0,showDevicesButton:!1}}},{key:"viewModelDefaults",get:function(){return{width:640,height:360,autoplay:!!this.options.autoplay,parameters:{s:!1,bc:!1,bf:!1,uid:this.options.currentUser.get("id"),cid:this.options.currentUser.get("customerId")},webPlayerHost:this.options.webPlayerUrl}}},{key:"initialize",value:function(){this.enableIeFs=this.isTop(),this.getViewModel()}},{key:"seekTo",value:function(e){this.eventsApi&&this.eventsApi.trigger(s.SEEK_TO,e)}},{key:"seekToChapter",value:function(e){this.eventsApi&&this.eventsApi.trigger("cv-player-changechapter",e)}},{key:"getViewModel",value:function(){var e=this.model.get("id");e||(e=this.model.get("trackingCode")),this.viewModel=l.a.get("".concat(y.z.NAME,"-").concat(e)),this.viewModel.get("initialized")||this.initViewModel(),this.setUrl()}},{key:"initViewModel",value:function(){var e=this.model.pick("id");e.id||(e=this.model.pick("trackingCode")),e.id||e.trackingCode||c.a.ErrorHelper.throw(new d.a("Must provide either a master id or a tracking code to ".concat(this.name)));var t=r.extend({},this.viewModelDefaults,e,this.viewModel.toJSON(),{initialized:!0});this.viewModel.set(t)}},{key:"initWebPlayerEvents",value:function(){if(this.enableIeFs){var e=this.getUI("iframe");e&&0!==e.length&&e.on("load",this.bindWebPlayerEvents.bind(this))}}},{key:"bindWebPlayerEvents",value:function(){if(!this.iframeReady){var e=this.getUI("iframe").get(0);this.eventsApi=new h.CVEventsApi(e.contentWindow),this.eventsApi.on(o.PONG,this.onPong.bind(this)),this.eventsApi.trigger(s.PING),this.eventsApi.on(o.FULLSCREEN_CLICK,this.onFullscreenChange.bind(this)),this.eventsApi.trigger(s.SHOW_FS_BTN),this.eventsApi.on(o.TIME_UPDATE,this.onTimeUpdate.bind(this)),this.eventsApi.on(o.PLAY,this.onPlay.bind(this)),this.eventsApi.on(o.PAUSE,this.onPause.bind(this)),this.eventsApi.on(o.VIDEO_END,this.onEnded.bind(this)),this.options.showDevicesButton&&(this.eventsApi.on(o.DEVICES_BTN_CLICK,this.showDeviceToggle.bind(this)),this.eventsApi.trigger(s.SHOW_DEVICES_BTN)),this.options.captureAnalytics&&(this.tracker=new C({video:this.model.toJSON(),eventsApi:this.eventsApi,analyticsOptions:this.options.analyticsOptions}))}}},{key:"unbindWebPlayerEvents",value:function(){this.eventsApi&&(this.eventsApi.off(o.FULLSCREEN_CLICK),this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.PLAY),this.eventsApi.off(o.PAUSE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.PONG),this.eventsApi.off(o.DEVICES_BTN_CLICK))}},{key:"setUrl",value:function(){var e="".concat(this.viewModel.get("webPlayerHost"),"embed"),t=r.omit(this.viewModel.get("parameters"),["p","vid"])||{};t.a=!!this.viewModel.get("autoplay");var n=this.viewModel.get("id");n&&(t.vid=n);var i=this.viewModel.get("trackingCode");i&&(t.p=i),this.viewModel.get("currenttime")&&(t.t=this.viewModel.get("currenttime"),t.a=!this.viewModel.get("paused"));var o=f.a.urlBuilder(e,t),s=Object(a.signUrl)(o,{timestamp:!0});this.viewModel.set({url:s})}},{key:"isTop",value:function(){return window.top===window}},{key:"onTimeUpdate",value:function(e,t){this.viewModel.set("ready",!0),this.viewModel.set("currenttime",t)}},{key:"onPlay",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!1)}},{key:"onPause",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!0)}},{key:"onEnded",value:function(){this.viewModel.trigger("ended")}},{key:"onPong",value:function(){this.iframeReady=!0,this.viewModel.set("ready",!0),i.Radio.channel(this.channelName).trigger("loaded"),this.options.parentChannelName&&i.Radio.channel(this.options.parentChannelName).trigger("webplayer:loaded")}},{key:"onFullscreenChange",value:function(e,t,n){t?this.requestFs(n):this.cancelFs(n)}},{key:"requestFs",value:function(e){e||$("html").addClass("player-fullscreen")}},{key:"cancelFs",value:function(e){e||$("html").removeClass("player-fullscreen")}},{key:"showDeviceToggle",value:function(e){this.viewModel.trigger("showDevices",!!e)}},{key:"query",value:function(e,t){var n=this;if(this.iframeReady){var i=r.uniqueId("cveventsapi");this.eventsApi.one("".concat(o.QUERY_CALLBACK,"-").concat(i),(function(e,n){t(n)})),this.eventsApi.trigger(s.QUERY,e,i)}else this.listenToOnce(this.channelName,"loaded",(function(){return n.query(e,t)}))}},{key:"viewOptions",value:function(){return r.extend({},{styles:O.a,playSvg:p.a.getSvg(p.b.Play)},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.initWebPlayerEvents()}},{key:"onBeforeDestroy",value:function(){this.unbindWebPlayerEvents(),this.tracker&&this.tracker.destroy()}}])&&L(t.prototype,n),u&&L(t,u),g}(c.a.Component)},1169:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var a,o=e.lambda,s=e.escapeExpression;return'<iframe class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.webPlayer:a,t))+' embed-responsive-item" id="'+s(o(null!=(a=null!=t?t.options:t)?a.id:a,t))+'" allowfullscreen webkitallowfullscreen mozallowfullscreen allow="autoplay; fullscreen" frameborder="0" width="'+s(o(null!=(a=null!=t?t.options:t)?a.width:a,t))+'" height="'+s(o(null!=(a=null!=t?t.options:t)?a.height:a,t))+'" src="'+s(o(null!=(a=null!=t?t.options:t)?a.url:a,t))+'"></iframe>\r\n<div class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.svgContainer:a,t))+'">'+(null!=(a=o(null!=(a=null!=t?t.options:t)?a.playSvg:a,t))?a:"")+"</div>"},useData:!0})},1170:function(e,t,n){e.exports={webPlayerContainer:"_2S4VF",webPlayer:"_3569L",svgContainer:"_1WsxD"}},990:function(e,t,n){"use strict";var r=n(995),i=n(991),a=(n(992),n(3),n(996)),o=(n(998),n(994));n.d(t,"a",(function(){return r.a})),n.d(t,"d",(function(){return i.g})),n.d(t,"g",(function(){return i.j})),n.d(t,"f",(function(){return i.i})),n.d(t,"c",(function(){return i.f})),n.d(t,"e",(function(){return i.h})),n.d(t,"b",(function(){return a.a})),n.d(t,"h",(function(){return o.a}))},991:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"k",(function(){return p})),n.d(t,"g",(function(){return v})),n.d(t,"e",(function(){return y})),n.d(t,"j",(function(){return g})),n.d(t,"i",(function(){return b})),n.d(t,"c",(function(){return P})),n.d(t,"b",(function(){return k})),n.d(t,"d",(function(){return T})),n.d(t,"f",(function(){return E})),n.d(t,"h",(function(){return m}));var r=n(2),i=n(1),a=n(20),o=n(29),s=n(3),u="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=i.reduce(e,(function(e,n,r){var a=t[r];return n||a?i.isObject(n)&&i.isObject(a)&&!i.isUndefined(n.id)&&n.id===a.id?e:i.isArray(n)?d(n,a).length?e.concat(r):e:i.isEqual(n,a)?e:e.concat(r):e}),[]);if(n.length)return i.object(i.map(n,(function(n){return i.isArray(t[n])?[n,d(e[n],t[n])]:[n,t[n]]})))}}function d(e,t){var n=[];return i.each(t,(function(t){var r=i.findWhere(e,{id:t.id});if(!i.isUndefined(r)||0!==Object.keys(t).length){var a=i.isUndefined(r)?t:l(r,t);a&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(a.id=t.id,n.push(a))))}})),n}var f={getChanges:function(e,t){var n=l(i.omit(e.toJSON(),c),i.omit(t.toJSON(),c));if(n)return i.object(i.map(i.keys(n),(function(e){return[e,f.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(i.isObject(t)&&i.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return i.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new a.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var a=["distributors","producers","directors","productionCompanies"];for(var o in i.each(i.keys(n),(function(e){a.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(i.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var s=e.get(o);(s instanceof r.a.Model||s instanceof r.a.NestedModel)&&s.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return i.each(i.keys(e.toJSON()),(function(a){if(i.contains(n,a)){var o=e.get(a).map((function(e){return e.id})),s=t.get(a).map((function(e){return e.id})),u=i.filter(o,(function(e){return e&&!i.contains(s,e)}));u.length&&(r[a]=u)}})),r}},p={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?s.a.getPhrase(u,"episodeNumberLessThanOne"):e&&e>2147483647?s.a.getPhrase(u,"episodeNumberExceeds"):e%1!=0?s.a.getPhrase(u,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?s.a.getPhrase(u,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":s.a.getPhrase(u,"seasonNoEpisodeNumber")}},h=o().year(),y={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>h?s.a.getPhrase(u,"validProductionYears",{currentYear:h}):void 0):""}},v={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"resourceNameRequired")}}]},g={suggestion:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditReasonExceeds")}}]},m={number:function(e){return e?+e<1?s.a.getPhrase(u,"seasonLessThanOne"):+e>3e3?s.a.getPhrase(u,"seasonExceeds"):+e%1!=0?s.a.getPhrase(u,"seasonNotWhole"):"":s.a.getPhrase(u,"seasonRequired")}},b={empty:function(){return s.a.getPhrase(u,"suggestEditRatingRequired")},original:function(){return s.a.getPhrase(u,"suggestEditRatingInvalid")}},E={url:[{required:!0,pattern:"url",msg:function(){return s.a.getPhrase(u,"linkUrlRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return s.a.getPhrase(u,"linkNameRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"linkNameExceeds")}}]},P={name:[{maxLength:128,msg:function(){return s.a.getPhrase(u,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return s.a.getPhrase(u,"fieldValueExceeds")}}]},k={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":s.a.getPhrase(u,"fieldsInvalid"):""}};function T(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},992:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),i=n(49),a=n(160),o=n(3),s="libraryEditor.utils",u={name:[{required:!0,msg:function(){return o.a.getPhrase(s,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(s,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?i.a.calculateDestinationFolderDepth(e,n,t)>a.a.MAX_FOLDER_DEPTH?o.a.getPhrase(s,"maxFolderDepth",{maxDepth:a.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(s,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,i=e.folder,a=e.collection;return t&&n?r.extend({},u,c(i,a)):t?u:n?c(i,a):void 0}},994:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(15),i=n(3),a=n(187),o=n(1010),s=n(60);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var d={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case s.a.HostedLibrary:case s.a.CustomLibrary:return e.get("name");case s.a.Exchange:return i.a.getPhrase(l,"exchange");case s.a.Workspace:return i.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case s.a.HostedLibrary:case s.a.CustomLibrary:return"bg-info";case s.a.Exchange:return"bg-green";case s.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(u(t={},c.Pdf,r.b.FilePDF),u(t,c.Image,r.b.FileImg),u(t,c.PowerPoint,r.b.FilePowerpoint),u(t,c.Document,r.b.FileWord),u(t,c.Excel,r.b.FileExcel),u(t,c.Zip,r.b.FileZip),u(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return i.a.getPhrase(l,"pdf");case c.Image:return i.a.getPhrase(l,"image");case c.Document:return i.a.getPhrase(l,"document");case c.Excel:return i.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return i.a.getPhrase(l,"presentation");case c.Zip:return i.a.getPhrase(l,"zipArchive");case c.File:return i.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:d.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case a.MetadataType.VideoTitle:t+="VideoTitle";break;case a.MetadataType.Description:t+="Description";break;case a.MetadataType.Rating:t+="Rating";break;case a.MetadataType.SeriesTitle:t+="SeriesTitle";break;case a.MetadataType.Season:t+="SeasonNumber";break;case a.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case a.MetadataType.BroadcastDate:t+="BroadcastDate";break;case a.MetadataType.Channel:t+="Channel";break;case a.MetadataType.ProductionYear:t+="ProductionYear";break;case a.MetadataType.Distributors:t+="Distributors";break;case a.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case a.MetadataType.Directors:t+="Directors";break;case a.MetadataType.Producers:t+="Producers";break;case a.MetadataType.Other:t+="Other"}return i.a.getPhrase(l,t)}}},995:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),i=n(12),a=n(3),o="libraryEditor.utils",s={isValidChapterTime:function(e,t,n,a){if(a){if(!r.isNumber(t))return u.StartTime.Invalid();if(t<0)return u.StartTime.Invalid();if(t>i.x.millisecondsToSeconds(n))return u.StartTime.Exceeds();if(a.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return u.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?u.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?u.Name.Exists():r.isEmpty(t.trim())?u.Name.Invalid():void 0:u.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},u={Name:{Invalid:function(){return a.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return a.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return a.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return a.a.getPhrase(o,"chapterStartTimeExceeds")}}}},996:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i="libraryEditor.utils",a={name:[{required:!0,msg:function(){return r.a.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(i,"libraryNameExceeds")}}]}},998:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(991),a=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return a("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return a("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return a("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?a("episodeNumberLessThanOne"):e&&e>255?a("episodeNumberExceeds"):e&&e%1!=0?a("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?a("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":a("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.e.productionYear.apply(null,t)}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[10],{1197:function(e,n,t){e.exports={container:"_2SYyd",embedInput:"ozkKz",textareaContainer:"_1monr",shareInput:"_36Arj",copyBtn:"_2UGxe",embedCopyBtn:"gaJap",footerText:"_3ydjG"}},1198:function(e,n,t){var l=t(10);e.exports=(l.default||l).template({1:function(e,n,t,l,o){var a;e.propertyIsEnumerable;return(null!=(a=e.lambda(null!=(a=null!=n?n.options:n)?a.spinnerEl:a,n))?a:"")+"\r\n"},3:function(e,n,t,l,o){e.propertyIsEnumerable;var a,i,r=e.lambda,s=e.escapeExpression,u=null!=n?n:e.nullContext||{},c=e.hooks.helperMissing;return'\r\n<div class="'+s(r(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.container:a,n))+'">\r\n <label for="share-input" class="mb-0 h6">'+s((t.lang||n&&n.lang||c).call(u,"shareLink",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="input-group mb-2">\r\n <input type="text" autocomplete="off" class="form-control '+s(r(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.shareInput:a,n))+'" id="share-input" spellcheck="false" readonly="true" value='+s("function"==typeof(i=null!=(i=t.shortUrl||(null!=n?n.shortUrl:n))?i:c)?i.call(u,{name:"shortUrl",hash:{},data:o}):i)+'>\r\n <div class="input-group-append">\r\n <button class="btn bg-white copy '+s(r(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.copyBtn:a,n))+'" type="button" data-clipboard-target="#share-input">'+s((t.lang||n&&n.lang||c).call(u,"copy",{name:"lang",hash:{},data:o}))+"</button>\r\n </div>\r\n </div>\r\n\r\n"+(null!=(a=t.unless.call(u,null!=(a=null!=n?n.options:n)?a.showEmbed:a,{name:"unless",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?a:"")+"\r\n"+(null!=(a=t.if.call(u,null!=(a=null!=n?n.options:n)?a.showEmbed:a,{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o}))?a:"")+"</div>\r\n"},4:function(e,n,t,l,o){e.propertyIsEnumerable;return' <small class="embed-toggle"><a class="text-info cursor-pointer hover-text-underline">'+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"showOptions",{name:"lang",hash:{},data:o}))+"</a></small>\r\n"},6:function(e,n,t,l,o){e.propertyIsEnumerable;var a,i=null!=n?n:e.nullContext||{},r=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <hr class="mt-4">\r\n <label for="link-options-input" class="mb-2 h6">'+s((t.lang||n&&n.lang||r).call(i,"linkOptions",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="custom-control custom-checkbox mb-2">\r\n <input type="checkbox" autocomplete="off" class="custom-control-input public-checkbox" id="public-checkbox" name="public" '+(null!=(a=t.unless.call(i,null!=(a=null!=n?n.options:n)?a.canPublicShare:a,{name:"unless",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?a:"")+'>\r\n <label class="custom-control-label" for="public-checkbox">'+s((t.lang||n&&n.lang||r).call(i,"publicCheckbox",{name:"lang",hash:{},data:o}))+"</label>\r\n "+(null!=(a=t.unless.call(i,null!=(a=null!=n?n.options:n)?a.canPublicShare:a,{name:"unless",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o}))?a:"")+'\r\n </div>\r\n <hr class="mt-4">\r\n <label for="embed-input" class="mb-0 mt-2 h6">'+s((t.lang||n&&n.lang||r).call(i,"embed",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="input-group mb-2 '+s(u(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.textareaContainer:a,n))+'">\r\n <textarea type="text" class="form-control rounded w-100 h-100 '+s(u(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.embedInput:a,n))+'" id="embed-input" spellcheck="false" readonly="true">'+s(u(null!=(a=null!=n?n.options:n)?a.embedString:a,n))+'</textarea>\r\n <div class="input-group-append '+s(u(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.embedCopyBtn:a,n))+' rounded">\r\n <button class="btn bg-white copy '+s(u(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.copyBtn:a,n))+'" type="button" data-clipboard-target="#embed-input">'+s((t.lang||n&&n.lang||r).call(i,"copy",{name:"lang",hash:{},data:o}))+"</button>\r\n </div>\r\n </div>\r\n"+(null!=(a=t.if.call(i,null!=(a=null!=n?n.options:n)?a.videoSizes:a,{name:"if",hash:{},fn:e.program(11,o,0),inverse:e.noop,data:o}))?a:"")+' <div class="custom-control custom-checkbox d-inline-block">\r\n <input type="checkbox" autocomplete="off" class="custom-control-input autoplay-checkbox" id="autoplay-checkbox" name="autoplay">\r\n <label class="custom-control-label" for="autoplay-checkbox">'+s((t.lang||n&&n.lang||r).call(i,"autoplay",{name:"lang",hash:{},data:o}))+"</label>\r\n </div>\r\n"},7:function(e,n,t,l,o){return"disabled"},9:function(e,n,t,l,o){var a;e.propertyIsEnumerable;return'<div class="text-muted">'+e.escapeExpression(e.lambda(null!=(a=null!=n?n.options:n)?a.cannotPublicShareText:a,n))+"</div>"},11:function(e,n,t,l,o){e.propertyIsEnumerable;return' <label for="size-select" class="d-block pt-2 h6">'+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"playerSize",{name:"lang",hash:{},data:o}))+'</label>\r\n <select class="custom-select w-25 mr-4 size-select" id="#size-select" name="selectedVideoSize"></select>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,n,t,l,o){var a;e.propertyIsEnumerable;return null!=(a=t.if.call(null!=n?n:e.nullContext||{},null!=(a=null!=n?n.options:n)?a.showLoader:a,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?a:""},useData:!0})},1199:function(e,n,t){var l=t(10);e.exports=(l.default||l).template({compiler:[8,">= 4.3.0"],main:function(e,n,t,l,o){e.propertyIsEnumerable;var a,i=e.lambda,r=e.escapeExpression;return'<small class="text-left w-100 mb-0 '+r(i(null!=(a=null!=n?n.options:n)?a.footerTextClass:a,n))+'">'+r(i(null!=(a=null!=n?n.options:n)?a.privacyDescription:a,n))+"</small>"},useData:!0})},1200:function(e,n,t){var l=t(10);e.exports=(l.default||l).template({1:function(e,n,t,l,o){return'style="position:absolute; top:0; left:0; width:100%; height:100%;"'},3:function(e,n,t,l,o){e.propertyIsEnumerable;var a,i=e.lambda,r=e.escapeExpression;return'width="'+r(i(null!=(a=null!=n?n.videoSize:n)?a.width:a,n))+'" height="'+r(i(null!=(a=null!=n?n.videoSize:n)?a.height:a,n))+'"'},compiler:[8,">= 4.3.0"],main:function(e,n,t,l,o){e.propertyIsEnumerable;var a,i,r=null!=n?n:e.nullContext||{},s=e.hooks.helperMissing,u=e.escapeExpression;return'<iframe frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen '+(null!=(a=t.if.call(r,null!=n?n.isResponsive:n,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?a:"")+' src="'+u("function"==typeof(i=null!=(i=t.baseUrl||(null!=n?n.baseUrl:n))?i:s)?i.call(r,{name:"baseUrl",hash:{},data:o}):i)+"?shareCode="+u("function"==typeof(i=null!=(i=t.shortCode||(null!=n?n.shortCode:n))?i:s)?i.call(r,{name:"shortCode",hash:{},data:o}):i)+"&a="+u("function"==typeof(i=null!=(i=t.autoplay||(null!=n?n.autoplay:n))?i:s)?i.call(r,{name:"autoplay",hash:{},data:o}):i)+'"></iframe>'},useData:!0})},1426:function(e,n,t){"use strict";t.r(n);var l=t(1),o=t(983),a=t(5),i=t(30),r=t(2),s=t(3),u=t(57),c="shared.shared-utils",p=function(){return[{label:s.a.getPhrase(c,"responsive"),width:"100%",height:"100%"},{label:s.a.getPhrase(c,"small"),width:"640",height:"360"},{label:s.a.getPhrase(c,"medium"),width:"1014",height:"576"},{label:s.a.getPhrase(c,"large"),width:"1280",height:"720"}]},h=t(291),d=t(188),f=t(17),b=t(9),m=t(12),y=t(1197),g=t.n(y),v=t(1198),k=t.n(v),w=t(1199),S=t.n(w),x=t(1200),C=t.n(x),E=t(0);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})(e)}function I(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function O(e,n){for(var t=0;t<n.length;t++){var l=n[t];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function z(e,n,t){return n&&O(e.prototype,n),t&&O(e,t),e}function j(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&V(e,n)}function V(e,n){return(V=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function _(e){var n=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 t,l=M(e);if(n){var o=M(this).constructor;t=Reflect.construct(l,arguments,o)}else t=l.apply(this,arguments);return D(this,t)}}function D(e,n){return!n||"object"!==P(n)&&"function"!=typeof n?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):n}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}t.d(n,"ShareView",(function(){return R}));var T=function(e){j(t,e);var n=_(t);function t(e){return I(this,t),n.call(this,e)}return z(t,[{key:"name",get:function(){return"ShareFooterComponent"}},{key:"className",get:function(){return"modal-footer bg-light rounded-bottom"}},{key:"template",get:function(){return S.a}},{key:"viewOptions",value:function(){return{footerTextClass:g.a.footerText,privacyDescription:this.options.privacyDescription}}}]),t}(r.a.Component),R=function(e){j(t,e);var n=_(t);function t(e){var l;return I(this,t),(l=n.call(this,e)).clipboards=[],l}return z(t,[{key:"initialize",value:function(){this.setUpViewModel(),this.bindListeners(),this.videoDataService=a.a.getInstance(f.a.Video,this)}},{key:"name",get:function(){return"ShareView"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return k.a}},{key:"lang",get:function(){return"shared.share"}},{key:"props",get:function(){return["videoId"]}},{key:"elements",get:function(){return{copy:".copy",embedToggle:".embed-toggle"}}},{key:"events",value:function(){return{"click @ui.copy":"onClickCopy","click @ui.embedToggle":"onClickEmbed"}}},{key:"regions",value:function(){return{container:{el:".".concat(g.a.container),replaceElement:!1},footer:{el:".modal-footer",replaceElement:!0}}}},{key:"defaults",get:function(){return{autoplay:!1,selectedVideoSize:0,videoSizes:p()}}},{key:"behaviors",get:function(){return[{behaviorClass:h.e,title:s.a.getPhrase(this.lang,"share"),hideCloseButton:!0},{behaviorClass:h.f,bindViewModel:!0}]}},{key:"bindListeners",value:function(){this.listenTo(this.viewModel,"change:autoplay change:selectedVideoSize",this.render),this.listenTo(this.viewModel,"change:public",this.onTogglePublic),this.listenTo(E.e.VIDEO,"".concat(E.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render)}},{key:"bindings",get:function(){var e=this;return{"[name=autoplay]":"autoplay","[name=selectedVideoSize]":{observe:"selectedVideoSize",selectOptions:{collection:function(){return l.map(e.options.videoSizes,(function(e,n){return{label:e.label,value:n}}))}}},"[name=public]":"public"}}},{key:"setUpViewModel",value:function(){this.viewModel=i.a.get("share:".concat(this.options.videoId),this.options)}},{key:"onTogglePublic",value:function(){var e=this,n=this.viewModel.get("public")?b.j.Public:b.j.SchoolOnly;this.videoDataService.getSharedResource(this.videoId,n,(function(t){t.set("privacyId",n),e.onSharedResourceSync(t)}))}},{key:"updateViewModel",value:function(){this.viewModel.set("public",this.model.get("privacyId")===b.j.Public,{silent:!0})}},{key:"onSharedResourceSync",value:function(e){this.model=e,this.updateViewModel(),this.render()}},{key:"fetchData",value:function(){this.video=this.videoDataService.getVideo(this.videoId),this.model||this.videoDataService.getSharedResource(this.videoId,null,l.bind(this.onSharedResourceSync,this))}},{key:"buildEmbedString",value:function(){var e=l.extend({},this.model.toJSON(),this.viewModel.toJSON()),n=this.options.videoSizes[e.selectedVideoSize],t="100%"===n.height&&"100%"===n.width;e.videoSize=n,e.baseUrl=u.a.safeUrlConcat(this.config.get("onlineUrl"),"/share/embed"),e.isResponsive=t;var o=C()(e);return t?'<div style="padding:56.25% 0 0 0; position:relative;">'.concat(o,"</div>"):o}},{key:"onClickEmbed",value:function(){this.viewModel.set("showEmbed",!0),this.render()}},{key:"onClickCopy",value:function(e){this.$(e.currentTarget).text(s.a.getPhrase(this.lang,"copied"))}},{key:"getPrivacyDescription",value:function(e){switch(e){case b.j[b.j.Private]:return s.a.getPhrase(this.lang,"private");case b.j[b.j.SchoolOnly]:return s.a.getPhrase(this.lang,"schoolOnly");case b.j[b.j.Public]:return s.a.getPhrase(this.lang,"public");default:return""}}},{key:"initClipboards",value:function(){var e=this;this.destroyClipboards(),this.getUI("copy").each((function(n,t){e.clipboards.push(new o(t))}))}},{key:"destroyClipboards",value:function(){l.each(this.clipboards,(function(e){return e.destroy()})),this.clipboards=[]}},{key:"requiredResources",get:function(){return{config:d.b.config}}},{key:"getCannotPublicShareText",value:function(){return this.video?m.y.isExchangeVideo(this.video)?s.a.getPhrase(this.lang,"cannotShareExchange"):s.a.getPhrase(this.lang,"cannotShareClickView"):""}},{key:"onBeforeDestroy",value:function(){this.destroyClipboards()}},{key:"renderFooter",value:function(){var e=this.model&&this.getPrivacyDescription(this.model.get("privacy"));this.showChildView("footer",new T({privacyDescription:e}))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:g.a},this.viewModel.toJSON()),{embedString:this.model&&this.buildEmbedString(),spinnerEl:m.r.getSpinner({size:m.s.Large,extraClasses:"mx-auto"}),showLoader:!this.model||!this.video,canPublicShare:this.video&&m.j.canPublicShare(this.video),cannotPublicShareText:this.getCannotPublicShareText()})}},{key:"onBeforeRender",value:function(){this.fetchData()}},{key:"onRender",value:function(){this.initClipboards(),this.renderFooter()}}]),t}(r.a.View)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[10],{1192:function(e,n,t){e.exports={container:"_2SYyd",embedInput:"ozkKz",textareaContainer:"_1monr",shareInput:"_36Arj",copyBtn:"_2UGxe",embedCopyBtn:"gaJap",footerText:"_3ydjG"}},1193:function(e,n,t){var l=t(10);e.exports=(l.default||l).template({1:function(e,n,t,l,o){var a;e.propertyIsEnumerable;return(null!=(a=e.lambda(null!=(a=null!=n?n.options:n)?a.spinnerEl:a,n))?a:"")+"\r\n"},3:function(e,n,t,l,o){e.propertyIsEnumerable;var a,i,r=e.lambda,s=e.escapeExpression,u=null!=n?n:e.nullContext||{},c=e.hooks.helperMissing;return'\r\n<div class="'+s(r(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.container:a,n))+'">\r\n <label for="share-input" class="mb-0 h6">'+s((t.lang||n&&n.lang||c).call(u,"shareLink",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="input-group mb-2">\r\n <input type="text" autocomplete="off" class="form-control '+s(r(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.shareInput:a,n))+'" id="share-input" spellcheck="false" readonly="true" value='+s("function"==typeof(i=null!=(i=t.shortUrl||(null!=n?n.shortUrl:n))?i:c)?i.call(u,{name:"shortUrl",hash:{},data:o}):i)+'>\r\n <div class="input-group-append">\r\n <button class="btn bg-white copy '+s(r(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.copyBtn:a,n))+'" type="button" data-clipboard-target="#share-input">'+s((t.lang||n&&n.lang||c).call(u,"copy",{name:"lang",hash:{},data:o}))+"</button>\r\n </div>\r\n </div>\r\n\r\n"+(null!=(a=t.unless.call(u,null!=(a=null!=n?n.options:n)?a.showEmbed:a,{name:"unless",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?a:"")+"\r\n"+(null!=(a=t.if.call(u,null!=(a=null!=n?n.options:n)?a.showEmbed:a,{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o}))?a:"")+"</div>\r\n"},4:function(e,n,t,l,o){e.propertyIsEnumerable;return' <small class="embed-toggle"><a class="text-info cursor-pointer hover-text-underline">'+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"showOptions",{name:"lang",hash:{},data:o}))+"</a></small>\r\n"},6:function(e,n,t,l,o){e.propertyIsEnumerable;var a,i=null!=n?n:e.nullContext||{},r=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <hr class="mt-4">\r\n <label for="link-options-input" class="mb-2 h6">'+s((t.lang||n&&n.lang||r).call(i,"linkOptions",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="custom-control custom-checkbox mb-2">\r\n <input type="checkbox" autocomplete="off" class="custom-control-input public-checkbox" id="public-checkbox" name="public" '+(null!=(a=t.unless.call(i,null!=(a=null!=n?n.options:n)?a.canPublicShare:a,{name:"unless",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?a:"")+'>\r\n <label class="custom-control-label" for="public-checkbox">'+s((t.lang||n&&n.lang||r).call(i,"publicCheckbox",{name:"lang",hash:{},data:o}))+"</label>\r\n "+(null!=(a=t.unless.call(i,null!=(a=null!=n?n.options:n)?a.canPublicShare:a,{name:"unless",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o}))?a:"")+'\r\n </div>\r\n <hr class="mt-4">\r\n <label for="embed-input" class="mb-0 mt-2 h6">'+s((t.lang||n&&n.lang||r).call(i,"embed",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="input-group mb-2 '+s(u(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.textareaContainer:a,n))+'">\r\n <textarea type="text" class="form-control rounded w-100 h-100 '+s(u(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.embedInput:a,n))+'" id="embed-input" spellcheck="false" readonly="true">'+s(u(null!=(a=null!=n?n.options:n)?a.embedString:a,n))+'</textarea>\r\n <div class="input-group-append '+s(u(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.embedCopyBtn:a,n))+' rounded">\r\n <button class="btn bg-white copy '+s(u(null!=(a=null!=(a=null!=n?n.options:n)?a.styles:a)?a.copyBtn:a,n))+'" type="button" data-clipboard-target="#embed-input">'+s((t.lang||n&&n.lang||r).call(i,"copy",{name:"lang",hash:{},data:o}))+"</button>\r\n </div>\r\n </div>\r\n"+(null!=(a=t.if.call(i,null!=(a=null!=n?n.options:n)?a.videoSizes:a,{name:"if",hash:{},fn:e.program(11,o,0),inverse:e.noop,data:o}))?a:"")+' <div class="custom-control custom-checkbox d-inline-block">\r\n <input type="checkbox" autocomplete="off" class="custom-control-input autoplay-checkbox" id="autoplay-checkbox" name="autoplay">\r\n <label class="custom-control-label" for="autoplay-checkbox">'+s((t.lang||n&&n.lang||r).call(i,"autoplay",{name:"lang",hash:{},data:o}))+"</label>\r\n </div>\r\n"},7:function(e,n,t,l,o){return"disabled"},9:function(e,n,t,l,o){var a;e.propertyIsEnumerable;return'<div class="text-muted">'+e.escapeExpression(e.lambda(null!=(a=null!=n?n.options:n)?a.cannotPublicShareText:a,n))+"</div>"},11:function(e,n,t,l,o){e.propertyIsEnumerable;return' <label for="size-select" class="d-block pt-2 h6">'+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"playerSize",{name:"lang",hash:{},data:o}))+'</label>\r\n <select class="custom-select w-25 mr-4 size-select" id="#size-select" name="selectedVideoSize"></select>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,n,t,l,o){var a;e.propertyIsEnumerable;return null!=(a=t.if.call(null!=n?n:e.nullContext||{},null!=(a=null!=n?n.options:n)?a.showLoader:a,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?a:""},useData:!0})},1194:function(e,n,t){var l=t(10);e.exports=(l.default||l).template({compiler:[8,">= 4.3.0"],main:function(e,n,t,l,o){e.propertyIsEnumerable;var a,i=e.lambda,r=e.escapeExpression;return'<small class="text-left w-100 mb-0 '+r(i(null!=(a=null!=n?n.options:n)?a.footerTextClass:a,n))+'">'+r(i(null!=(a=null!=n?n.options:n)?a.privacyDescription:a,n))+"</small>"},useData:!0})},1195:function(e,n,t){var l=t(10);e.exports=(l.default||l).template({1:function(e,n,t,l,o){return'style="position:absolute; top:0; left:0; width:100%; height:100%;"'},3:function(e,n,t,l,o){e.propertyIsEnumerable;var a,i=e.lambda,r=e.escapeExpression;return'width="'+r(i(null!=(a=null!=n?n.videoSize:n)?a.width:a,n))+'" height="'+r(i(null!=(a=null!=n?n.videoSize:n)?a.height:a,n))+'"'},compiler:[8,">= 4.3.0"],main:function(e,n,t,l,o){e.propertyIsEnumerable;var a,i,r=null!=n?n:e.nullContext||{},s=e.hooks.helperMissing,u=e.escapeExpression;return'<iframe frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen '+(null!=(a=t.if.call(r,null!=n?n.isResponsive:n,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?a:"")+' src="'+u("function"==typeof(i=null!=(i=t.baseUrl||(null!=n?n.baseUrl:n))?i:s)?i.call(r,{name:"baseUrl",hash:{},data:o}):i)+"?shareCode="+u("function"==typeof(i=null!=(i=t.shortCode||(null!=n?n.shortCode:n))?i:s)?i.call(r,{name:"shortCode",hash:{},data:o}):i)+"&a="+u("function"==typeof(i=null!=(i=t.autoplay||(null!=n?n.autoplay:n))?i:s)?i.call(r,{name:"autoplay",hash:{},data:o}):i)+'"></iframe>'},useData:!0})},1421:function(e,n,t){"use strict";t.r(n);var l=t(1),o=t(978),a=t(5),i=t(30),r=t(2),s=t(3),u=t(59),c="shared.shared-utils",p=function(){return[{label:s.a.getPhrase(c,"responsive"),width:"100%",height:"100%"},{label:s.a.getPhrase(c,"small"),width:"640",height:"360"},{label:s.a.getPhrase(c,"medium"),width:"1014",height:"576"},{label:s.a.getPhrase(c,"large"),width:"1280",height:"720"}]},h=t(289),d=t(188),f=t(17),b=t(9),m=t(12),y=t(1192),g=t.n(y),v=t(1193),k=t.n(v),w=t(1194),S=t.n(w),x=t(1195),C=t.n(x),E=t(0);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})(e)}function I(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function O(e,n){for(var t=0;t<n.length;t++){var l=n[t];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function z(e,n,t){return n&&O(e.prototype,n),t&&O(e,t),e}function j(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&V(e,n)}function V(e,n){return(V=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function _(e){var n=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 t,l=M(e);if(n){var o=M(this).constructor;t=Reflect.construct(l,arguments,o)}else t=l.apply(this,arguments);return D(this,t)}}function D(e,n){return!n||"object"!==P(n)&&"function"!=typeof n?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):n}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}t.d(n,"ShareView",(function(){return R}));var T=function(e){j(t,e);var n=_(t);function t(e){return I(this,t),n.call(this,e)}return z(t,[{key:"name",get:function(){return"ShareFooterComponent"}},{key:"className",get:function(){return"modal-footer bg-light rounded-bottom"}},{key:"template",get:function(){return S.a}},{key:"viewOptions",value:function(){return{footerTextClass:g.a.footerText,privacyDescription:this.options.privacyDescription}}}]),t}(r.a.Component),R=function(e){j(t,e);var n=_(t);function t(e){var l;return I(this,t),(l=n.call(this,e)).clipboards=[],l}return z(t,[{key:"initialize",value:function(){this.setUpViewModel(),this.bindListeners(),this.videoDataService=a.a.getInstance(f.a.Video,this)}},{key:"name",get:function(){return"ShareView"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return k.a}},{key:"lang",get:function(){return"shared.share"}},{key:"props",get:function(){return["videoId"]}},{key:"elements",get:function(){return{copy:".copy",embedToggle:".embed-toggle"}}},{key:"events",value:function(){return{"click @ui.copy":"onClickCopy","click @ui.embedToggle":"onClickEmbed"}}},{key:"regions",value:function(){return{container:{el:".".concat(g.a.container),replaceElement:!1},footer:{el:".modal-footer",replaceElement:!0}}}},{key:"defaults",get:function(){return{autoplay:!1,selectedVideoSize:0,videoSizes:p()}}},{key:"behaviors",get:function(){return[{behaviorClass:h.e,title:s.a.getPhrase(this.lang,"share"),hideCloseButton:!0},{behaviorClass:h.f,bindViewModel:!0}]}},{key:"bindListeners",value:function(){this.listenTo(this.viewModel,"change:autoplay change:selectedVideoSize",this.render),this.listenTo(this.viewModel,"change:public",this.onTogglePublic),this.listenTo(E.e.VIDEO,"".concat(E.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render)}},{key:"bindings",get:function(){var e=this;return{"[name=autoplay]":"autoplay","[name=selectedVideoSize]":{observe:"selectedVideoSize",selectOptions:{collection:function(){return l.map(e.options.videoSizes,(function(e,n){return{label:e.label,value:n}}))}}},"[name=public]":"public"}}},{key:"setUpViewModel",value:function(){this.viewModel=i.a.get("share:".concat(this.options.videoId),this.options)}},{key:"onTogglePublic",value:function(){var e=this,n=this.viewModel.get("public")?b.j.Public:b.j.SchoolOnly;this.videoDataService.getSharedResource(this.videoId,n,(function(t){t.set("privacyId",n),e.onSharedResourceSync(t)}))}},{key:"updateViewModel",value:function(){this.viewModel.set("public",this.model.get("privacyId")===b.j.Public,{silent:!0})}},{key:"onSharedResourceSync",value:function(e){this.model=e,this.updateViewModel(),this.render()}},{key:"fetchData",value:function(){this.video=this.videoDataService.getVideo(this.videoId),this.model||this.videoDataService.getSharedResource(this.videoId,null,l.bind(this.onSharedResourceSync,this))}},{key:"buildEmbedString",value:function(){var e=l.extend({},this.model.toJSON(),this.viewModel.toJSON()),n=this.options.videoSizes[e.selectedVideoSize],t="100%"===n.height&&"100%"===n.width;e.videoSize=n,e.baseUrl=u.a.safeUrlConcat(this.config.get("onlineUrl"),"/share/embed"),e.isResponsive=t;var o=C()(e);return t?'<div style="padding:56.25% 0 0 0; position:relative;">'.concat(o,"</div>"):o}},{key:"onClickEmbed",value:function(){this.viewModel.set("showEmbed",!0),this.render()}},{key:"onClickCopy",value:function(e){this.$(e.currentTarget).text(s.a.getPhrase(this.lang,"copied"))}},{key:"getPrivacyDescription",value:function(e){switch(e){case b.j[b.j.Private]:return s.a.getPhrase(this.lang,"private");case b.j[b.j.SchoolOnly]:return s.a.getPhrase(this.lang,"schoolOnly");case b.j[b.j.Public]:return s.a.getPhrase(this.lang,"public");default:return""}}},{key:"initClipboards",value:function(){var e=this;this.destroyClipboards(),this.getUI("copy").each((function(n,t){e.clipboards.push(new o(t))}))}},{key:"destroyClipboards",value:function(){l.each(this.clipboards,(function(e){return e.destroy()})),this.clipboards=[]}},{key:"requiredResources",get:function(){return{config:d.b.config}}},{key:"getCannotPublicShareText",value:function(){return this.video?m.y.isExchangeVideo(this.video)?s.a.getPhrase(this.lang,"cannotShareExchange"):s.a.getPhrase(this.lang,"cannotShareClickView"):""}},{key:"onBeforeDestroy",value:function(){this.destroyClipboards()}},{key:"renderFooter",value:function(){var e=this.model&&this.getPrivacyDescription(this.model.get("privacy"));this.showChildView("footer",new T({privacyDescription:e}))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:g.a},this.viewModel.toJSON()),{embedString:this.model&&this.buildEmbedString(),spinnerEl:m.r.getSpinner({size:m.s.Large,extraClasses:"mx-auto"}),showLoader:!this.model||!this.video,canPublicShare:this.video&&m.j.canPublicShare(this.video),cannotPublicShareText:this.getCannotPublicShareText()})}},{key:"onBeforeRender",value:function(){this.fetchData()}},{key:"onRender",value:function(){this.initClipboards(),this.renderFooter()}}]),t}(r.a.View)}}]);
|