@clickview/library-editor 1.29.0 → 1.30.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +2 -2
- package/dist/css/{9305-library-editor-778f437313.chunk.css → 343-library-editor-b1a086bdd2.chunk.css} +1 -0
- package/dist/css/{5880-library-editor-03c1f0c1f4.chunk.css → 8330-library-editor-416f9a7109.chunk.css} +1 -0
- package/dist/scripts/{1010-eb374a9f8f.chunk.js → 1010-1b44625dc5.chunk.js} +1 -1
- package/dist/scripts/{1086-f5d06e0c5b.chunk.js → 1086-d21ab1571b.chunk.js} +1 -1
- package/dist/scripts/{1216-0952024fc9.chunk.js → 1216-179c1dca0d.chunk.js} +1 -1
- package/dist/scripts/{1269-5db1f3e32b.chunk.js → 1269-7750f731bb.chunk.js} +1 -1
- package/dist/scripts/{1364-f9039d1ee2.chunk.js → 1364-f309a5d8a4.chunk.js} +1 -1
- package/dist/scripts/1409-0f41bf4544.chunk.js +1 -0
- package/dist/scripts/{1492-347b4b5451.chunk.js → 1492-bd2f5f0464.chunk.js} +1 -1
- package/dist/scripts/1601-1de918406b.chunk.js +2 -0
- package/dist/scripts/{1832-fec109af6c.chunk.js → 1832-05fb3a513a.chunk.js} +1 -1
- package/dist/scripts/{1887-4c84bfbc2c.chunk.js → 1887-8a2b0eb883.chunk.js} +1 -1
- package/dist/scripts/{1911-d0d31b94d3.chunk.js → 1911-b6ed80578b.chunk.js} +1 -1
- package/dist/scripts/{1934-085c7af5db.chunk.js → 1934-cf519f798f.chunk.js} +1 -1
- package/dist/scripts/{2417-c1b7a71c00.chunk.js → 2417-534351f8ac.chunk.js} +1 -1
- package/dist/scripts/{243-0e4a585f6b.chunk.js → 243-0fcc0bd4aa.chunk.js} +1 -1
- package/dist/scripts/{259-80b903e07b.chunk.js → 259-b76f63a2ee.chunk.js} +1 -1
- package/dist/scripts/{2692-f32201422c.chunk.js → 2692-e74bb88cee.chunk.js} +1 -1
- package/dist/scripts/{2802-d2d07a2e14.chunk.js → 2802-fdc03b7cbd.chunk.js} +1 -1
- package/dist/scripts/{2888-3175201f04.chunk.js → 2888-60217b367b.chunk.js} +1 -1
- package/dist/scripts/2910-a9424e3008.chunk.js +2 -0
- package/dist/scripts/{299-eb697a2fe1.chunk.js → 299-a68c51dea1.chunk.js} +1 -1
- package/dist/scripts/{3096-30b780bfc3.chunk.js → 3096-f81291f39b.chunk.js} +1 -1
- package/dist/scripts/{3400-e1313032d6.chunk.js → 3400-89c8e91944.chunk.js} +1 -1
- package/dist/scripts/343-821094d1ed.chunk.js +1 -0
- package/dist/scripts/{3763-4a058d4401.chunk.js → 3763-d227ec26d4.chunk.js} +1 -1
- package/dist/scripts/{4177-8542f33a9e.chunk.js → 4177-bd859447e3.chunk.js} +1 -1
- package/dist/scripts/{4201-f94b39b95c.chunk.js → 4201-45a03056c5.chunk.js} +1 -1
- package/dist/scripts/{4245-24ff0831a9.chunk.js → 4245-4a9bc98dd1.chunk.js} +1 -1
- package/dist/scripts/{4591-e833ab486c.chunk.js → 4591-9c393bb4f0.chunk.js} +1 -1
- package/dist/scripts/{4784-dc3271a9b1.chunk.js → 4784-b9108dad5d.chunk.js} +1 -1
- package/dist/scripts/{4860-d7c8e49e0d.chunk.js → 4860-cee113f038.chunk.js} +1 -1
- package/dist/scripts/{4885-5fcb0b3d21.chunk.js → 4885-0d95be029d.chunk.js} +1 -1
- package/dist/scripts/{514-d673e4c14b.chunk.js → 514-7568d91f34.chunk.js} +1 -1
- package/dist/scripts/{5412-1265924394.chunk.js → 5412-a0dbe6535a.chunk.js} +1 -1
- package/dist/scripts/{5418-a7053d4a2c.chunk.js → 5418-e51bdb3d98.chunk.js} +1 -1
- package/dist/scripts/{5424-1b544811d8.chunk.js → 5424-bb8349e9cd.chunk.js} +1 -1
- package/dist/scripts/{546-59fc707522.chunk.js → 546-589df6c985.chunk.js} +1 -1
- package/dist/scripts/{5745-cec88916be.chunk.js → 5745-3c8daea973.chunk.js} +1 -1
- package/dist/scripts/{5747-c05ef8604b.chunk.js → 5747-a680b5805f.chunk.js} +1 -1
- package/dist/scripts/{6093-56f14abebe.chunk.js → 6093-8ccfabcb0f.chunk.js} +1 -1
- package/dist/scripts/{6220-d6790a5103.chunk.js → 6220-47defcafc9.chunk.js} +1 -1
- package/dist/scripts/{6357-d64273e6be.chunk.js → 6357-36bc959cdf.chunk.js} +1 -1
- package/dist/scripts/{6505-c885c92dd7.chunk.js → 6505-fb7b7b7e55.chunk.js} +1 -1
- package/dist/scripts/{6732-f42320176e.chunk.js → 6732-a735767a4b.chunk.js} +1 -1
- package/dist/scripts/{6756-fc2569ee11.chunk.js → 6756-08cd64d51a.chunk.js} +1 -1
- package/dist/scripts/{6774-05ef6b24a0.chunk.js → 6774-d375551111.chunk.js} +1 -1
- package/dist/scripts/{6995-643c2542a3.chunk.js → 6995-9a68473ffa.chunk.js} +1 -1
- package/dist/scripts/{6999-a2d2c853c7.chunk.js → 6999-6745720f22.chunk.js} +1 -1
- package/dist/scripts/{7002-5875ed0069.chunk.js → 7002-048146dccc.chunk.js} +1 -1
- package/dist/scripts/{7053-269864a2d6.chunk.js → 7053-d1bdf2217e.chunk.js} +1 -1
- package/dist/scripts/{708-c0692908d8.chunk.js → 708-da8e0bff2d.chunk.js} +1 -1
- package/dist/scripts/{7376-27b6790926.chunk.js → 7376-180679e905.chunk.js} +1 -1
- package/dist/scripts/{7634-96a8c961da.chunk.js → 7634-455f30db13.chunk.js} +1 -1
- package/dist/scripts/{5880-d14443da2e.chunk.js → 8330-15f3b76292.chunk.js} +1 -1
- package/dist/scripts/{8362-148a50f032.chunk.js → 8362-1c2f8107ad.chunk.js} +1 -1
- package/dist/scripts/{8727-abd1ecc0fa.chunk.js → 8727-476da527b7.chunk.js} +1 -1
- package/dist/scripts/{8762-4bce0c7009.chunk.js → 8762-a2ef356ce4.chunk.js} +1 -1
- package/dist/scripts/{8906-17fef7d1d4.chunk.js → 8906-ba9fbbbb83.chunk.js} +1 -1
- package/dist/scripts/{8947-ddae6c9c08.chunk.js → 8947-a6cab5c909.chunk.js} +1 -1
- package/dist/scripts/{9357-37ddba8d25.chunk.js → 9357-4817f7443a.chunk.js} +1 -1
- package/dist/scripts/9554-70701d089a.chunk.js +1 -0
- package/dist/scripts/{9695-067d97c1ad.chunk.js → 9695-8b51eba3e6.chunk.js} +1 -1
- package/dist/scripts/{9927-ab6248ad0e.chunk.js → 9927-76bba47293.chunk.js} +1 -1
- package/dist/scripts/9929-e02d0ea2ca.chunk.js +1 -0
- package/dist/scripts/{9976-72ce08e5c6.chunk.js → 9976-53ef9aa588.chunk.js} +1 -1
- package/dist/scripts/bundle-bdcc61abe9.min.js +2 -0
- package/package.json +73 -74
- package/typings/libs/CVEvents.d.ts +12 -12
- package/typings/libs/CVLanguages.d.ts +24 -24
- package/typings/libs/Environment.d.ts +10 -10
- package/typings/libs/LazyLoad.d.ts +29 -29
- package/typings/libs/LazyLoad.ts +27 -27
- package/typings/libs/backbone.validation.d.ts +99 -99
- package/typings/libs/cloneDeep.d.ts +4 -4
- package/typings/libs/cookiesjs.d.ts +24 -24
- package/typings/libs/google-api.d.ts +4 -4
- package/typings/libs/microsoft-teams.d.ts +2 -2
- package/typings/libs/trackjs.d.ts +2 -2
- package/typings/libs/videojs-contrib-quality-levels.d.ts +30 -30
- package/typings/utils/imports.d.ts +9 -9
- package/.eslintrc.json +0 -3
- package/dist/scripts/1203-c277e037c3.chunk.js +0 -1
- package/dist/scripts/1409-cb53d3702a.chunk.js +0 -1
- package/dist/scripts/1601-5195376e97.chunk.js +0 -2
- package/dist/scripts/2910-5e4aa3fa0c.chunk.js +0 -2
- package/dist/scripts/7825-07655e0a3a.chunk.js +0 -1
- package/dist/scripts/9305-4e91d6c9c5.chunk.js +0 -1
- package/dist/scripts/bundle-9b06e33502.min.js +0 -2
- /package/dist/css/{1203-library-editor-36f0a42508.chunk.css → 9554-library-editor-36f0a42508.chunk.css} +0 -0
- /package/dist/scripts/{101-c79ad403db.chunk.js → 101-00e92a2abf.chunk.js} +0 -0
- /package/dist/scripts/{1601-5195376e97.chunk.js.LICENSE.txt → 1601-1de918406b.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{1934-085c7af5db.chunk.js.LICENSE.txt → 1934-cf519f798f.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2802-d2d07a2e14.chunk.js.LICENSE.txt → 2802-fdc03b7cbd.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2803-2b7194894b.chunk.js → 2803-9bdf584e2d.chunk.js} +0 -0
- /package/dist/scripts/{2910-5e4aa3fa0c.chunk.js.LICENSE.txt → 2910-a9424e3008.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{3511-7adc5f4104.chunk.js → 3511-a1cf32ed8a.chunk.js} +0 -0
- /package/dist/scripts/{3639-df89ef6c33.chunk.js → 3639-3b07fce6d4.chunk.js} +0 -0
- /package/dist/scripts/{3746-4ccea7acfa.chunk.js → 3746-74a690720e.chunk.js} +0 -0
- /package/dist/scripts/{3969-8aea96a0bb.chunk.js → 3969-d89f9b6851.chunk.js} +0 -0
- /package/dist/scripts/{4523-883e337fac.chunk.js → 4523-807065f612.chunk.js} +0 -0
- /package/dist/scripts/{5173-3ce30f3a17.chunk.js → 5173-2f800d0272.chunk.js} +0 -0
- /package/dist/scripts/{5235-79c40407fb.chunk.js → 5235-af56909b6a.chunk.js} +0 -0
- /package/dist/scripts/{5745-cec88916be.chunk.js.LICENSE.txt → 5745-3c8daea973.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5891-9dd6330101.chunk.js → 5891-8bf8f33952.chunk.js} +0 -0
- /package/dist/scripts/{6788-5a391d38ed.chunk.js → 6788-32797fffcf.chunk.js} +0 -0
- /package/dist/scripts/{6963-886e8b40b6.chunk.js → 6963-0786b00366.chunk.js} +0 -0
- /package/dist/scripts/{6991-75b3d8dc88.chunk.js → 6991-fe32e78e15.chunk.js} +0 -0
- /package/dist/scripts/{7190-a2e8d20ecf.chunk.js → 7190-d934189eb3.chunk.js} +0 -0
- /package/dist/scripts/{7433-abdbfcb6b7.chunk.js → 7433-993e53ded6.chunk.js} +0 -0
- /package/dist/scripts/{8495-42243eaf11.chunk.js → 8495-b933e1f2f9.chunk.js} +0 -0
- /package/dist/scripts/{9770-521b4d655d.chunk.js → 9770-0c60f23d09.chunk.js} +0 -0
- /package/dist/scripts/{bundle-9b06e33502.min.js.LICENSE.txt → bundle-bdcc61abe9.min.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{polyfills-4af83b8e50.min.js → polyfills-38dbf24865.min.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[3400],{3400:function(e,t,r){"use strict";r.r(t),r.d(t,{DevErrorView:function(){return s}});var n=r(48088),o=r(31647),i=r(78084),u=r.n(i);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===c(o)?o:String(o)),n)}var o}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(p,e);var t,r,o,i,s=(o=p,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(o);if(i){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function p(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),s.apply(this,arguments)}return t=p,(r=[{key:"initialize",value:function(){var e=n.Radio.channel("error:view");this.error=e.request("current:error")}},{key:"name",get:function(){return"ErrorView"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return u()}},{key:"className",get:function(){return"mt-5"}},{key:"viewOptions",value:function(){return{message:this.error.message,stack:this.error.stack,name:this.error.name}}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(o.Q.View)},78084:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return"<h1>"+c(u(null!=(i=null!=t?t.options:t)?i.name:i,t))+'</h1>\n<div class="alert alert-danger" role="alert">\n <h2>'+c(u(null!=(i=null!=t?t.options:t)?i.message:i,t))+'</h2>\n</div>\n<div class="alert alert-warning" role="alert">\n <h3>Call stack</h3>\n <code>'+c(u(null!=(i=null!=t?t.options:t)?i.stack:i,t))+"</code>\n</div>"},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[3400],{3400:function(e,t,r){"use strict";r.r(t),r.d(t,{DevErrorView:function(){return s}});var n=r(48088),o=r(31647),i=r(78084),u=r.n(i);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==c(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===c(o)?o:String(o)),n)}var o}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var s=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(p,e);var t,r,o,i,s=(o=p,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(o);if(i){var r=f(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function p(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),s.apply(this,arguments)}return t=p,(r=[{key:"initialize",value:function(){var e=n.Radio.channel("error:view");this.error=e.request("current:error")}},{key:"name",get:function(){return"ErrorView"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return u()}},{key:"className",get:function(){return"mt-5"}},{key:"viewOptions",value:function(){return{message:this.error.message,stack:this.error.stack,name:this.error.name}}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(o.Q.View)},78084:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,o){e.propertyIsEnumerable;var i,u=e.lambda,c=e.escapeExpression;return"<h1>"+c(u(null!=(i=null!=t?t.options:t)?i.name:i,t))+'</h1>\r\n<div class="alert alert-danger" role="alert">\r\n <h2>'+c(u(null!=(i=null!=t?t.options:t)?i.message:i,t))+'</h2>\r\n</div>\r\n<div class="alert alert-warning" role="alert">\r\n <h3>Call stack</h3>\r\n <code>'+c(u(null!=(i=null!=t?t.options:t)?i.stack:i,t))+"</code>\r\n</div>"},useData:!0})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[343],{31709:function(e,t,n){n.d(t,{K:function(){return u}});var a=n(1024),r=n(99910),l=n(53808),i=n(52076),c=n(17439),o=n(63946),s=n(49642);function u(e){var t,n,u=e.showSpinner?a.createElement(r.Spinner,{as:"span",animation:"border",role:"status",size:"sm"}):e.children;if(e.tooltip&&e.svgName){var d=null!==(t=e.className)&&void 0!==t?t:"";return e.disabled&&!e.appLink&&(d+=" pointer-events-none"),a.createElement(o.u,{title:e.tooltip,spanHack:!0},a.createElement(c.h,{appLink:e.appLink,href:e.href,svgName:e.svgName,svgSize:e.svgSize,onClick:e.onClick,className:d,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled},u))}if(e.svgName)return a.createElement(c.h,{onClick:e.onClick,appLink:e.appLink,href:e.href,svgName:e.svgName,svgSize:e.svgSize,className:e.className,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled},u);if(e.tooltip&&e.appLink)return a.createElement(o.u,{title:e.tooltip,spanHack:!0},a.createElement(s.F,{onClick:e.onClick,appLink:e.appLink,className:e.className,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled},u));if(e.appLink)return a.createElement(s.F,{onClick:e.onClick,appLink:e.appLink,className:e.className,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled},u);function m(t){e.analyticsData&&e.analyticsOptions&&i.k.logUserAction(e.analyticsData,e.analyticsOptions),l.q.isFunction(e.onClick)&&e.onClick(t)}return e.tooltip?a.createElement(o.u,{title:e.tooltip,spanHack:!0},a.createElement("button",{onClick:m,className:"".concat(null!==(n=e.className)&&void 0!==n?n:"").concat(e.disabled?" pointer-events-none":""),disabled:e.disabled},u)):a.createElement("button",{onClick:m,className:e.className,disabled:e.disabled},u)}},86347:function(e,t,n){n.d(t,{b:function(){return u},n:function(){return s}});var a=n(1024),r=n(92802),l=n(53808),i=n(85887);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var o=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n};function s(e){var t=e.castInitialValues,n=e.castValuesOnSubmit,s=e.initialValues,u=e.onSubmit,d=o(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),m=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=i.t.deepClone(e);return function e(n){Object.keys(t).forEach((function(a){t.hasOwnProperty(a)&&(i.t.isObject(n[a])?e(n[a]):null===t[a]&&delete t[a])}))}(t),t}(s)):s,p={allowInitialSubmit:e.allowInitialSubmit};return a.createElement(r.J9,Object.assign({enableReinitialize:!0},d,{initialValues:m,onSubmit:function(t,a){var r=a.setSubmitting,l=a.resetForm,i=a.setFieldError,o=n&&e.validationSchema?e.validationSchema.cast(t):t;u(o,(function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(n.reset&&l(),n.errors)for(var a=0,o=Object.entries(n.errors);a<o.length;a++){var s=(e=o[a],t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,l,i,c=[],o=!0,s=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;o=!1}else for(;!(o=(a=l.call(n)).done)&&(c.push(a.value),c.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{if(!o&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],d=s[1];i(u,d)}r(!1)}))},initialStatus:p}),l.q.isFunction(e.children)?function(t){return e.children(t)}:a.Children.count(e.children)?e.children:null)}function u(){return(0,r.u6)()}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},7378:function(e,t,n){n.r(t),n.d(t,{PendingRequestsView:function(){return Ye}});var a=n(1024),r=n.n(a),l=n(86120),i=n(23689),c=n(57857),o=n(30317),s=n(25796),u=n(66703),d=n(90335),m=n(86242),p=n(2491),b=n(22430),f=n(50997),v=n(48404),y=n(19226),g=n(68893),E=n(17950),h=n(9416),N=n(1834),w=n(95061),S=n(86347),k=n(98495),R=n(92802),O=n(5173),L=n(31647),I=n(63151);function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var T={find:function(e,t){if(e&&e.children&&e.children.length)for(var n=function e(n){if(I.m.isEqual(n.id,t))return n;var a=n.children;if(a&&a.length)for(var r=0;r<a.length;r++){var l=e(a[r]);if(l)return l}},a=0;a<e.children.length;a++){var r=n(e.children[a]);if(r)return r}},getPath:function(e,t){for(var n=[t],a=function(e){return e.hasOwnProperty("parentIds")&&Array.isArray(e.parentIds)&&e.parentIds.length?e.parentIds[0]:e.hasOwnProperty("parentId")?e.parentId:null},r=a(t);r;){var l=T.find(e,r);l&&(n=[l].concat(function(e){if(Array.isArray(e))return C(e)}(i=n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())),r=l?a(l):null}var i;return n},convertNestedObjectToTree:function(e){var t,n=Object.assign(Object.assign({},e.data),{children:e.children});return(null===(t=n.children)||void 0===t?void 0:t.length)&&(n.children=n.children.map(T.convertNestedObjectToTree)),n}},q=n(39396),A=n(63791),x=function(e){switch(e){case"up":return"JAT0R";case"down":return"ld41u";case"right":return"HHkPe";case"left":return"jZTRR"}};function j(e){return r().createElement(q.x,{svgName:A.vn.Caret,className:"".concat(x(e.direction)," svg-container d-inline-block ").concat(e.className)})}j.defaultProps={direction:"right"};var D=n(58424),F=n(53808),P=n(17439),V=n(63946),U=n(97874),_=n(52076),B=n(49642),H={dropdownToggle:"UCAnJ"};function z(e){var t="dropdown-item";return e&&(t+=" ".concat(e)),t}function M(e){var t=F.q.isFunction(e.action.label)?e.action.label:function(){return a.createElement(a.Fragment,null,e.action.label)};if(e.action.appLink)return a.createElement(B.F,{appLink:e.action.appLink,onClick:e.action.onClick,className:z(e.action.className),analyticsData:e.action.analyticsData,analyticsOptions:e.action.analyticsOptions,openInNewTab:e.action.openInNewTab,disabled:e.action.disabled},t());function n(t){t.preventDefault(),e.action.analyticsData&&e.action.analyticsOptions&&_.k.logUserAction(e.action.analyticsData,e.action.analyticsOptions),F.q.isFunction(e.action.onClick)&&e.action.onClick(),e.action.href&&L.Q.LocationUtils.PageLoad(e.action.href,e.action.openInNewTab)}return e.action.href?a.createElement("a",{className:z(e.action.className),onClick:n,href:e.action.href},t()):a.createElement("span",{className:"cursor-pointer ".concat(z(e.action.className)),onClick:n,role:"button",tabIndex:0,onKeyDown:function(e){return"Enter"===e.key&&n(e)}},t())}function Q(e){if(!e.actions||!e.actions.length)return a.createElement(a.Fragment,null);var t="dropdown";e.className&&(t+=" ".concat(e.className));var n="actions-dropdown-".concat(U.Y.getRandomInt()),r="dropdown-toggle px-0 ".concat(H.dropdownToggle);return e.dropdownToggleClassName&&(r+=" ".concat(e.dropdownToggleClassName)),a.createElement("div",{className:t},a.createElement("button",{className:r,type:"button",id:n,"data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},a.createElement(q.x,{svgName:A.vn.More,size:e.dropdownToggleSvgSize})),a.createElement("div",{className:"dropdown-menu dropdown-menu-right","aria-labelledby":n},e.actions.map((function(e,t){return e.tooltip?a.createElement(V.u,{key:t,title:e.tooltip,spanHack:!0},a.createElement(M,{action:e})):a.createElement(M,{key:t,action:e})}))))}Q.defaultProps={dropdownToggleClassName:"btn btn-light",dropdownToggleSvgSize:q.S.Small};var G=n(31709);function Y(e){var t=a.useMemo((function(){return e.actions.sort((function(e,t){return e.order-t.order}))}),[e.actions]),n=[],r=[];t.forEach((function(e){e.button?n.push(e):r.push(e)}));var l="d-flex";return e.className&&(l+=" ".concat(e.className)),n.length||r.length?a.createElement("div",{className:l},a.createElement(a.Fragment,null,a.createElement("span",{className:"d-flex align-items-center"},n.length?n.map((function(e,t){return a.createElement(a.Fragment,{key:t},function(){if(e.label){var t=F.q.isFunction(e.label)?e.label:function(){return a.createElement(a.Fragment,null,e.label)};return a.createElement(G.K,{appLink:e.appLink,href:e.href,onClick:e.onClick,svgName:e.svgName,className:e.className,tooltip:e.tooltip,showSpinner:e.showSpinner,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled},t())}var n=a.createElement(P.h,{appLink:e.appLink,href:e.href,onClick:e.onClick,svgName:e.svgName,className:e.className,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled});return e.tooltip?a.createElement(V.u,{title:e.tooltip,spanHack:!0},n):n}())})):a.createElement(a.Fragment,null),e.sortComponent&&e.sortComponent,r.length?a.createElement(Q,{actions:r,dropdownToggleClassName:e.actionsDropdownClassName,dropdownToggleSvgSize:e.dropdownToggleSvgSize}):a.createElement(a.Fragment,null)))):a.createElement(a.Fragment,null)}var K={tree:"ZYvBT",text:"eVGWe",chevron:"v76mu",disabled:"wIrTq",root:"JDRq_",selected:"wT87N",actions:"fKJU4",node:"gOBrH",noActions:"fKmrr"};function J(e){function t(){var t="".concat(K.text," clamp-4");return e.className&&(t+=" ".concat(e.className)),t}return e.isDisabled?r().createElement(V.u,{title:e.disabledTooltip,spanHack:!0,spanHackClassName:"d-inline-block"},r().createElement("span",{className:"".concat(t()," text-muted ").concat(K.disabled)},e.text)):r().createElement("div",{className:t()},e.text)}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var W="tree-actions";function Z(e){var t,n,r,l=e.tree,i=e.selectedIds,c=e.getAppLink,o=e.onSelect,s=e.isDisabled,u=e.actions,d=e.isDropdown,m=a.useRef(null),p=a.useMemo((function(){return null==i?void 0:i.some((function(e){return T.find(l,e)}))}),[l,i]),b=(n=a.useState(p),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,l,i,c=[],o=!0,s=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;o=!1}else for(;!(o=(a=l.call(n)).done)&&(c.push(a.value),c.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{if(!o&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(n,r)||function(e,t){if(e){if("string"==typeof e)return X(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X(e,t):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=b[0],v=b[1],y=null==i?void 0:i.some((function(e){return I.m.isEqual(l.id,e)})),g=!!l.children&&!!l.children.length;function E(){var t;e.multiSelect||v(!f),c?L.Q.AppLinkHelper.trigger(c(l)):(null===(t=e.isDisabled)||void 0===t?void 0:t.call(e,l))?o(null):null==o||o(l)}return a.useEffect((function(){if(m.current&&d){var e=function(e){e.stopPropagation(),E()};return m.current.addEventListener("click",e),function(){m.current&&m.current.removeEventListener("click",e)}}}),[m.current,o]),a.useEffect((function(){var t;e.multiSelect||f&&(p||y||!(null===(t=e.selectedIds)||void 0===t?void 0:t.length)&&(null==s?void 0:s(e.tree))||v(!1))}),[i]),a.createElement("li",{className:"position-relative ".concat(f?"":K.collapsed," ").concat(e.isRoot?K.root:"")},a.createElement("div",{className:"position-relative"},a.createElement(D.L,{className:(t="py-1 d-flex align-items-center w-100 position-relative ".concat(K.node),y&&(t+=" "+e.selectedLinkClassName),(null==u?void 0:u.length)||(t+=" "+K.noActions),p&&e.multiSelect&&(t+=" text-underline font-italic"),t),onClick:d?null:E,ref:m},g&&a.createElement("div",{className:K.chevron,onClick:function(t){t.stopPropagation(),e.multiSelect?v(!f):E()}},a.createElement(j,{direction:f?"down":"right"})),a.createElement(J,{text:l.name||l.description,isDisabled:null==s?void 0:s(l),disabledTooltip:e.disabledTooltip})),!!e.actions&&a.createElement(Y,{className:K.actions,actions:null==u?void 0:u.map((function(e){return Object.assign(Object.assign({},e),{appLink:e.getAppLink(l)})})),actionsDropdownClassName:"btn btn-light ".concat(W," py-0")}),f&&a.createElement(ee,Object.assign({key:l.id},e,{isChild:!0}))))}Z.defaultProps={selectedLinkClassName:K.selected};var $=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n};function ee(e){var t=e.tree,n=$(e,["tree"]);return t&&t.children?a.createElement("ul",{className:"m-0 p-0 list-unstyled ".concat(K.tree)},t.children.map((function(t,r){return a.createElement(Z,Object.assign({key:r,tree:t},n,{isRoot:!e.isChild}))}))):a.createElement(a.Fragment,null)}var te={selectButton:"Jh8Ep",createNew:"hnfdj"},ne=n(48088),ae=n(54096);function re(e){var t=(0,ae.G)(f.Or.Library);function n(n){t.getLibraries((function(t){return e(t.toJSON(),n.toJSON())}))}r().useEffect((function(){return ne.Radio.channel(f.Vk.LIBRARY).on("folder:created",n),function(){ne.Radio.channel(f.Vk.LIBRARY).off("folder:created",n)}}),[e])}var le=n(21974),ie=n(264),ce="libraryRequests.destinationForm",oe=(0,O.Ry)().shape({library:(0,O.Ry)().required(),folder:(0,O.Ry)().required()});function se(e){var t,n,a,l,i,c,o,s=(0,S.b)();re((function(e,t){var n=e.find((function(e){return e.id.toString()===s.values.library.id.toString()}));if(n){s.setFieldValue("library",n,!0);var a=T.find(n,t.id);a&&s.setFieldValue("folder",a,!0)}}));var d=e.libraryRequest.sender&&"".concat(e.libraryRequest.sender.name," ").concat(e.libraryRequest.sender.surname),m="";return(null===(t=e.libraryRequest.senderCustomer)||void 0===t?void 0:t.id.toString())!==e.currentUser.get("customerId").toString()&&(m=null===(n=e.libraryRequest.senderCustomer)||void 0===n?void 0:n.name),r().createElement("div",{className:"bg-white rounded p-3 mb-3"},r().createElement(R.l0,null,r().createElement("div",{className:"row"},r().createElement("div",{className:"col-9"},!!d&&r().createElement("div",{className:"row mb-3"},r().createElement("div",{className:"col-3"},r().createElement("label",null,r().createElement(u.x,{namespace:ce,phrase:"requestedBy"}))),r().createElement("div",{className:"col-9"},r().createElement(r().Fragment,null,d,!!m&&r().createElement(r().Fragment,null," (",m,")")))),r().createElement("div",{className:"row mb-3"},r().createElement("div",{className:"col-3"},r().createElement("label",null,r().createElement(u.x,{namespace:ce,phrase:"videoSource"}))),r().createElement("div",{className:"col-9"},!!e.libraryRequest.sourceLibrary&&r().createElement("span",{className:"badge p-1 mr-1 text-white ".concat(le.u.mapSourceToClass(e.libraryRequest.sourceLibrary.type))},le.u.mapSourceToDisplayName(e.libraryRequest.sourceLibrary,ie.g.hasLite)),!!e.libraryRequest.sourceCategory&&r().createElement("span",{className:"ml-2"},e.libraryRequest.sourceCategory.name))),r().createElement("div",{className:"row mb-3"},r().createElement("div",{className:"col-3"},r().createElement("label",null,r().createElement(u.x,{namespace:ce,phrase:"addTo"}))),r().createElement("div",{className:"col-9"},e.libraries.length>1&&r().createElement("div",{className:"dropdown mb-2"},r().createElement("button",{className:"dropdown-toggle btn-block form-control text-left position-relative ".concat(te.selectButton),type:"button",id:"select-library","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},r().createElement("div",{className:"text-truncate"},null!==(l=null===(a=s.values.library)||void 0===a?void 0:a.name)&&void 0!==l?l:r().createElement(u.x,{namespace:ce,phrase:"selectALibrary"}))),r().createElement("div",{className:"dropdown-menu w-100","aria-labelledby":"select-library"},e.libraries.map((function(e,t){var n,a,l=e.id.toString()===(null===(a=null===(n=s.values.library)||void 0===n?void 0:n.id)||void 0===a?void 0:a.toString());return r().createElement("div",{className:"dropdown-item cursor-pointer ".concat(l?"active":""),key:t,onClick:function(){s.setFieldValue("library",e,!0),s.setFieldValue("folder",null,!0)}},e.name)})))),r().createElement("div",{className:"dropdown mb-2"},r().createElement("button",{className:"dropdown-toggle btn-block form-control text-left position-relative ".concat(te.selectButton),type:"button",id:"select-folder","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",disabled:!s.values.library},r().createElement("div",{className:"text-truncate"},null!==(c=s.values.library&&(null===(i=s.values.folder)||void 0===i?void 0:i.name))&&void 0!==c?c:r().createElement(u.x,{namespace:ce,phrase:"selectAFolder"}))),r().createElement("div",{className:"dropdown-menu w-100","aria-labelledby":"select-folder"},r().createElement(k.ZP,{autoHeight:!0,autoHeightMax:300,hideTracksWhenNotNeeded:!0},r().createElement(ee,{tree:s.values.library,onSelect:function(e){return s.setFieldValue("folder",e,!0)},selectedIds:(null===(o=s.values.folder)||void 0===o?void 0:o.id)?[s.values.folder.id]:void 0,selectedLinkClassName:"bg-light font-weight-500",isDropdown:!0}),s.values.library&&r().createElement(B.F,{className:"btn font-weight-bold rounded-0 w-100 text-left ".concat(te.createNew),appLink:{application:f.OV.LIBRARY_REQUESTS,action:f.eX.Shared.NEW_FOLDER,args:[s.values.library.id]}},r().createElement(u.x,{namespace:ce,phrase:"createNew"})))))))),r().createElement("div",{className:"col-3"},r().createElement("div",{className:"d-flex justify-content-end"},r().createElement("button",{type:"button",className:"btn btn-link",onClick:e.onReject},r().createElement(u.x,{namespace:ce,phrase:"reject"})),r().createElement("button",{type:"submit",className:"btn btn-dark",disabled:!s.isValid},r().createElement(u.x,{namespace:ce,phrase:"approve"})))))))}var ue=n(70065);function de(e){function t(t,n){var a,r,l,i,c,o,s={location:ue.LocationContext.LibraryRequestDetails,actionType:t,entity:ue.EntityType.LibraryRequest,workflowPhase:ue.WorkflowPhase.Start},u={id:e.libraryRequest.id,videoId:null===(a=e.libraryRequest.object)||void 0===a?void 0:a.id,requestingUserId:null===(r=e.libraryRequest.sender)||void 0===r?void 0:r.id,sourceLibraryId:null===(l=e.libraryRequest.sourceLibrary)||void 0===l?void 0:l.id,sourceFolderId:null===(i=e.libraryRequest.sourceCategory)||void 0===i?void 0:i.id,destinationLibraryId:null===(c=null==n?void 0:n.library)||void 0===c?void 0:c.id,destinationFolderId:null===(o=null==n?void 0:n.folder)||void 0===o?void 0:o.id};_.k.logUserAction(u,s)}return r().createElement(S.n,{initialValues:{library:e.libraries.find((function(t){var n;return t.id.toString()===(null===(n=e.libraryRequest.destinationLibrary)||void 0===n?void 0:n.id.toString())})),folder:e.libraryRequest.destinationCategory},validationSchema:oe,onSubmit:function(n){t(ue.UserAction.Approve,n),L.Q.AppLinkHelper.trigger({application:f.OV.LIBRARY_REQUESTS,action:f.eX.LibraryRequests.APPROVE,args:[e.libraryRequest.id],params:{libraryId:n.library.id,folderId:n.folder.id,queryParams:e.queryParams}})},validateOnMount:!0,enableReinitialize:!1},r().createElement(se,{libraries:e.libraries,libraryRequest:e.libraryRequest,onReject:function(){t(ue.UserAction.Reject),L.Q.AppLinkHelper.trigger({application:f.OV.LIBRARY_REQUESTS,action:f.eX.LibraryRequests.REJECT,args:[e.libraryRequest.id],params:e.queryParams})},currentUser:e.currentUser}))}var me,pe,be={HIGH:.75,MODERATE:.5},fe={circleContainer:"p8Vgz",backgroundCircle:"asGGE",circleSuccess:"PXLNj",circleWarning:"ZckRN",circleDanger:"slBRg",lgCircleContainer:"N8KCI",pendingCircle:"DKrcq",centredPercentageText:"tpmLR"},ve=2,ye=5.8,ge=.2,Ee=.36;function he(e){var t=e===me.Large?ye:ve,n=e===me.Large?Ee:ge;return"".concat(t/2-2*n,"rem")}function Ne(e){return e>=be.HIGH?"text-success":e>=be.MODERATE?"text-warning":"text-danger"}function we(e,t){var n="d-inline-block ".concat(fe.circleContainer);return e===me.Large&&(n+=" ".concat(fe.lgCircleContainer)),Se(t)&&(n+=" ".concat(fe.pendingCircle)),n}function Se(e){return"number"!=typeof e}function ke(e){var t,n=r().useCallback((function(t){if(t){var n=t.r.baseVal.value,a=2*Math.PI*n,r=a-e.percentage*a;t.style.strokeDasharray="".concat(a," ").concat(a),t.style.strokeDashoffset=r.toString()}}),[]);return r().createElement("svg",null,r().createElement("circle",{r:he(e.size),className:fe.backgroundCircle}),!Se(e.percentage)&&r().createElement("circle",{ref:n,r:he(e.size),className:(t=e.percentage,t>=be.HIGH?fe.circleSuccess:t>=be.MODERATE?fe.circleWarning:fe.circleDanger)}))}function Re(e){var t,n,a=function(e){if(!Se(e))return+e.toFixed(2)}(e.percentage),l=e.layout===pe.LabelInside?me.Large:me.Small,i=e.customLabel||(Se(n=a)?"--%":"".concat(Math.round(100*n),"%"));return e.layout===pe.LabelOnly?r().createElement("span",{className:Ne(a)},i):r().createElement("div",{className:"d-flex align-items-center justify-content-between ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.layout===pe.LabelBefore&&r().createElement("span",{className:"mr-2"},i),r().createElement("div",{className:we(l,a)},r().createElement(ke,{percentage:a,size:l}),e.layout===pe.LabelInside&&r().createElement("span",{className:fe.centredPercentageText},i)))}!function(e){e.Small="small",e.Large="large"}(me||(me={})),function(e){e.CircleOnly="circle_only",e.LabelOnly="label_only",e.LabelBefore="label_before",e.LabelInside="label_inside"}(pe||(pe={})),Re.defaultProps={layout:pe.CircleOnly};var Oe="libraryRequests.count";function Le(e){return r().createElement("div",{className:"bg-white rounded px-3 py-2 mb-3 d-flex align-items-center"},r().createElement(Re,null),r().createElement("div",{className:"pl-2"},r().createElement(u.x,{namespace:Oe,phrase:"count",options:{smartCount:e.count.count}})))}var Ie=n(61421),Ce=n(50072),Te=n(30328),qe=n(7044),Ae=n(49824);function xe(){return r().createElement("div",{className:"bg-white rounded p-3 mb-3"},r().createElement("div",{className:"row"},r().createElement("div",{className:"col-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"6rem"}})),r().createElement("div",{className:"col-6"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"9rem"}})),r().createElement("div",{className:"col-3 d-flex justify-content-end align-items-center"},r().createElement("div",{className:"partial-loading-background rounded",style:{height:"1.25rem",width:"3rem"}}),r().createElement("div",{className:"partial-loading-background rounded ml-2",style:{height:"2.5rem",width:"5rem"}})),r().createElement("div",{className:"col-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"7rem"}})),r().createElement("div",{className:"col-6 mb-2"},r().createElement("div",{className:"partial-loading-background rounded mb-1",style:{height:"2.5rem"}}),r().createElement("div",{className:"partial-loading-background rounded",style:{height:"2.5rem"}}))))}var je=n(85739),De=n(59198),Fe=n(64429),Pe=n(41026),Ve=n(41777),Ue=n(56154),_e="libraryRequests.pendingRequestsEmptyState",Be=c.T.encloseNamespace(_e);function He(){return r().createElement("div",{className:"bg-white rounded p-3 py-5"},r().createElement(Ve.u,null,r().createElement(Ve.u.Image,{src:Ue.W.EmptyStates.PENDING_REQUESTS}),r().createElement(Ve.u.Info,{className:"mb-1"},r().createElement(u.x,{namespace:_e,phrase:"info"})),r().createElement(Ve.u.Cta,{text:Be("cta"),className:"btn btn-link text-info",appLink:{application:f.OV.LIBRARY_REQUESTS,action:f.eX.LibraryRequests.LIBRARY_REQUEST_SETTINGS_LIBRARIES}})))}function ze(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,l,i,c=[],o=!0,s=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;o=!1}else for(;!(o=(a=l.call(n)).done)&&(c.push(a.value),c.length!==t);o=!0);}catch(e){s=!0,r=e}finally{try{if(!o&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Me(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Me(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Qe="libraryRequests.pendingRequests",Ge=c.T.encloseNamespace(Qe);function Ye(e){var t,n,a=l.a.useGetFetch(),c=(0,p.Z)(),S=(0,je.p)(e.queryParams.sort||d.D.Newest,[Ce.l.Pending]),k=l.a.useBasicFetch(e.id&&s.y.libraryRequest(e.id)),R=(0,De.s)(e.id),O=l.a.useBasicFetch(s.y.pendingRequestsCount()),L=ze(r().useState(null),2),I=L[0],C=L[1];(0,i.i)(w.T.getLibrariesFetchOptions((function(e){return C(e.toJSON())})),[]),re(C);var T=ze(r().useState(null),2),q=T[0],A=T[1];(0,i.i)(v.p.getConfigFetchOptions(A),[]);var x=ze(r().useState(null),2),j=x[0],D=x[1];(0,i.i)(y.K.getCurrentUserFetchOptions(D),[]),(0,o.v)(k),(0,Te.A)({id:e.id,requests:S.items,appLink:{application:f.OV.LIBRARY_REQUESTS,action:f.eX.LibraryRequests.PENDING_REQUESTS,params:e.queryParams}}),(0,Fe.m)(k.data,"pending",e.queryParams),(0,Pe.K)(k.data);var F=((null===(t=S.items)||void 0===t?void 0:t.length)||S.hasCompleted)&&I&&q&&j,P=k.data&&R.hasCompleted;return r().createElement("div",null,r().createElement("h1",{className:"h2"},r().createElement(u.x,{namespace:Qe,phrase:"title"})),r().createElement("div",{className:"mb-3"},r().createElement(m.Oo,{breadcrumbs:[{name:Ge("libraryEditor"),appLink:{application:f.OV.LIBRARY_EDITOR,action:f.eX.LibraryEditor.HOME}},{name:Ge("title"),active:!0}]})),r().createElement(h.A,{active:"pending"}),!F||(null===(n=S.items)||void 0===n?void 0:n.length)?r().createElement(r().Fragment,null,r().createElement("div",{className:"d-flex justify-content-end mb-3"},r().createElement(E.F,{appLink:{application:f.OV.LIBRARY_REQUESTS,action:f.eX.LibraryRequests.PENDING_REQUESTS,args:[e.id]},queryParams:e.queryParams})),r().createElement("div",{className:"row"},r().createElement("div",{className:"col-4"},F?r().createElement(r().Fragment,null,r().createElement(Le,{count:O.data}),r().createElement(N.q,{libraryRequests:S.items,selectedId:e.id,appLink:{application:f.OV.LIBRARY_REQUESTS,action:f.eX.LibraryRequests.PENDING_REQUESTS},queryParams:e.queryParams,fetchNext:S.fetchNext,isFetching:S.isFetching,nextCursor:S.nextCursor})):r().createElement(qe.p,null)),r().createElement("div",{className:"col-8"},F&&P?r().createElement(r().Fragment,null,r().createElement(de,{key:k.data.id,libraryRequest:k.data,libraries:I,queryParams:e.queryParams,currentUser:j}),r().createElement(Ie.x,{libraryRequest:k.data,config:q,currentUser:j,createViewKey:function(t,n){var r=s.y.createViewKey(e.id,(function(e){return n(new g.y(e))}),(function(e){return c.error(b.M.libraryApiError(e))}));a(r)},comments:R.items})):r().createElement(r().Fragment,null,r().createElement(xe,null),r().createElement(Ae.j,null))))):r().createElement(He,null))}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[3763],{33763:function(e,t,n){"use strict";n.r(t),n.d(t,{BannerUploadView:function(){return O}});var r=n(39479),o=n(48088),i=n(21679),a=n(31647),u=n(99249),l=n(11306),c=n(18375),s=n(48090),p=n(29457),f=n(10101),h=n(61843),d=n(58025),y=n(88172),g=n(57857),m=n(66266),v=n.n(m);function b(e){return b="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},b(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,(void 0,o=function(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===b(o)?o:String(o)),r)}var o}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(E,e);var t,n,m,O,I=(m=E,O=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=C(m);if(O){var n=C(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function E(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),I.call(this,e)}return t=E,(n=[{key:"initialize",value:function(){this.libraryDataService=i.u.getInstance(s.Or.Library,this),this.imageUploadDataService=i.u.getInstance(s.Or.ImageUpload,this),this.viewModel=u.r.get("image:storage"),this.bindListeners(),this.initImageEl()}},{key:"name",get:function(){return"BannerUploadView"}},{key:"title",get:function(){return g.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.bannerUpload"}},{key:"template",get:function(){return v()}},{key:"channelName",get:function(){return h.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:f.Yw,title:g.T.getPhrase(this.lang,"resizeAndCrop"),size:"modal-lg",spinnerButtonOptions:{channelName:this.channelName,buttonText:g.T.getPhrase(this.lang,"crop"),onClick:function(){return e.onClickCrop()}}}]}},{key:"regions",value:function(){return{cropper:{el:".cropper-region",replaceElement:!0}}}},{key:"events",value:function(){return{"shown.bs.modal":"renderCropper"}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,d.Y.ImageCropped,this.onImageCropped),this.listenTo(s.Vk.VIDEO,"".concat(s.M_.FOLDER,":").concat(this.options.folderId,":sync"),this.render),this.listenTo(s.Vk.VIDEO,"".concat(s.M_.UPDATE_FOLDER_BANNER,":").concat(this.options.folderId,":sync"),(function(){return e.triggerMethod("hide")}))}},{key:"initImageEl",value:function(){this.viewModel.get("dataUrl")||a.Q.ErrorHelper.throw(new l.H("DataUrl must be set on the image:storage ViewModel")),this.imageEl=new Image,this.imageEl.src=this.viewModel.get("dataUrl"),this.viewModel.unset("dataUrl")}},{key:"getCropRegionWidth",value:function(){return this.$el.find(".modal-body").width()}},{key:"onClickCrop",value:function(){o.Radio.channel(this.channelName).trigger(d.Y.CropImage),o.Radio.channel(this.channelName).trigger(y.I3.ShowSpinner)}},{key:"onImageCropped",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,p.__.Banners,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this,n={folderId:this.options.folderId,imageModel:e,currentImageId:this.model.banner&&this.model.banner.id};this.libraryDataService.addOrUpdateBanner(n,(function(){return t.triggerMethod("hide")}))}},{key:"renderCropper",value:function(){var e=new c.E({dataUrl:this.imageEl.src,width:this.imageEl.width,height:this.imageEl.height});this.showChildView("cropper",new d.a({model:e,channelName:this.channelName,imageType:p.__.Banners,minWidth:s.yE[p.__.Banners].width,minHeight:s.yE[p.__.Banners].height,getCropRegionWidth:r.bind(this.getCropRegionWidth,this)}))}},{key:"onBeforeRender",value:function(){this.model=this.libraryDataService.getFolder(this.options.folderId)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model,spinnerEl:h.Kp.getSpinner({size:h.Ey.Large,extraClasses:"mx-auto"})}}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),E}(a.Q.View)},58025:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},a:function(){return d}});var r,o=n(48088),i=n(31647),a=n(51934),u=n.n(a),l=n(91465),c=n.n(l);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},s(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===s(o)?o:String(o)),r)}var o}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(d,e);var t,n,i,a,l=(i=d,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(i);if(a){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),l.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"text-center"}},{key:"elements",get:function(){return{image:".img"}}},{key:"getMinCropBoxWidth",value:function(){return this.options.minWidth*this.getViewportToImageRatio()}},{key:"getMinCropBoxHeight",value:function(){return this.options.minHeight*this.getViewportToImageRatio()}},{key:"getViewportToImageRatio",value:function(){return this.options.getCropRegionWidth()/this.model.get("width")}},{key:"crop",value:function(){var e=this.cropper.getCroppedCanvas().toDataURL(this.getImageMimeType());o.Radio.channel(this.options.channelName).trigger(r.ImageCropped,e)}},{key:"getImageMimeType",value:function(){var e=this.model.get("dataUrl").match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(e)return e[1]}},{key:"renderCropper",value:function(){this.getMinCropBoxWidth();var e=this.getUI("image").get(0);this.cropper=new(u())(e,{viewMode:1,aspectRatio:this.options.minWidth/this.options.minHeight,minCropBoxWidth:this.getMinCropBoxWidth(),minCropBoxHeight:this.getMinCropBoxHeight(),autoCropArea:1})}},{key:"onRender",value:function(){this.renderCropper()}},{key:"onBeforeDestroy",value:function(){this.cropper.destroy()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(i.Q.Component)},66266:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,n,r,o){return'<div class="cropper-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},91465:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:o}):i)+'" class="img img-fluid" />'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[3763],{33763:function(e,t,n){"use strict";n.r(t),n.d(t,{BannerUploadView:function(){return O}});var r=n(39479),o=n(48088),i=n(21679),a=n(31647),u=n(99249),l=n(11306),c=n(18375),s=n(48090),p=n(29457),f=n(10101),h=n(61843),d=n(58025),y=n(88172),g=n(57857),m=n(66266),v=n.n(m);function b(e){return b="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},b(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,(void 0,o=function(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===b(o)?o:String(o)),r)}var o}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(E,e);var t,n,m,O,I=(m=E,O=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=C(m);if(O){var n=C(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function E(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),I.call(this,e)}return t=E,(n=[{key:"initialize",value:function(){this.libraryDataService=i.u.getInstance(s.Or.Library,this),this.imageUploadDataService=i.u.getInstance(s.Or.ImageUpload,this),this.viewModel=u.r.get("image:storage"),this.bindListeners(),this.initImageEl()}},{key:"name",get:function(){return"BannerUploadView"}},{key:"title",get:function(){return g.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.bannerUpload"}},{key:"template",get:function(){return v()}},{key:"channelName",get:function(){return h.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:f.Yw,title:g.T.getPhrase(this.lang,"resizeAndCrop"),size:"modal-lg",spinnerButtonOptions:{channelName:this.channelName,buttonText:g.T.getPhrase(this.lang,"crop"),onClick:function(){return e.onClickCrop()}}}]}},{key:"regions",value:function(){return{cropper:{el:".cropper-region",replaceElement:!0}}}},{key:"events",value:function(){return{"shown.bs.modal":"renderCropper"}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,d.Y.ImageCropped,this.onImageCropped),this.listenTo(s.Vk.VIDEO,"".concat(s.M_.FOLDER,":").concat(this.options.folderId,":sync"),this.render),this.listenTo(s.Vk.VIDEO,"".concat(s.M_.UPDATE_FOLDER_BANNER,":").concat(this.options.folderId,":sync"),(function(){return e.triggerMethod("hide")}))}},{key:"initImageEl",value:function(){this.viewModel.get("dataUrl")||a.Q.ErrorHelper.throw(new l.H("DataUrl must be set on the image:storage ViewModel")),this.imageEl=new Image,this.imageEl.src=this.viewModel.get("dataUrl"),this.viewModel.unset("dataUrl")}},{key:"getCropRegionWidth",value:function(){return this.$el.find(".modal-body").width()}},{key:"onClickCrop",value:function(){o.Radio.channel(this.channelName).trigger(d.Y.CropImage),o.Radio.channel(this.channelName).trigger(y.I3.ShowSpinner)}},{key:"onImageCropped",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,p.__.Banners,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this,n={folderId:this.options.folderId,imageModel:e,currentImageId:this.model.banner&&this.model.banner.id};this.libraryDataService.addOrUpdateBanner(n,(function(){return t.triggerMethod("hide")}))}},{key:"renderCropper",value:function(){var e=new c.E({dataUrl:this.imageEl.src,width:this.imageEl.width,height:this.imageEl.height});this.showChildView("cropper",new d.a({model:e,channelName:this.channelName,imageType:p.__.Banners,minWidth:s.yE[p.__.Banners].width,minHeight:s.yE[p.__.Banners].height,getCropRegionWidth:r.bind(this.getCropRegionWidth,this)}))}},{key:"onBeforeRender",value:function(){this.model=this.libraryDataService.getFolder(this.options.folderId)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model,spinnerEl:h.Kp.getSpinner({size:h.Ey.Large,extraClasses:"mx-auto"})}}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),E}(a.Q.View)},58025:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},a:function(){return d}});var r,o=n(48088),i=n(31647),a=n(51934),u=n.n(a),l=n(91465),c=n.n(l);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},s(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===s(o)?o:String(o)),r)}var o}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(d,e);var t,n,i,a,l=(i=d,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(i);if(a){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),l.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"text-center"}},{key:"elements",get:function(){return{image:".img"}}},{key:"getMinCropBoxWidth",value:function(){return this.options.minWidth*this.getViewportToImageRatio()}},{key:"getMinCropBoxHeight",value:function(){return this.options.minHeight*this.getViewportToImageRatio()}},{key:"getViewportToImageRatio",value:function(){return this.options.getCropRegionWidth()/this.model.get("width")}},{key:"crop",value:function(){var e=this.cropper.getCroppedCanvas().toDataURL(this.getImageMimeType());o.Radio.channel(this.options.channelName).trigger(r.ImageCropped,e)}},{key:"getImageMimeType",value:function(){var e=this.model.get("dataUrl").match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(e)return e[1]}},{key:"renderCropper",value:function(){this.getMinCropBoxWidth();var e=this.getUI("image").get(0);this.cropper=new(u())(e,{viewMode:1,aspectRatio:this.options.minWidth/this.options.minHeight,minCropBoxWidth:this.getMinCropBoxWidth(),minCropBoxHeight:this.getMinCropBoxHeight(),autoCropArea:1})}},{key:"onRender",value:function(){this.renderCropper()}},{key:"onBeforeDestroy",value:function(){this.cropper.destroy()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(i.Q.Component)},66266:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){return'<div class="cropper-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},91465:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:o}):i)+'" class="img img-fluid" />'},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4177],{59054:function(e,t,n){"use strict";var r;n.d(t,{f:function(){return r}}),function(e){e.Share="share",e.MasterObject="masterobject"}(r||(r={}))},47022:function(e,t,n){"use strict";n.d(t,{Q:function(){return y}});var r=n(39479),o=n(31647),i=n(70065),a=n(52076),c=n(99186),u=n.n(c);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},s(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,p(r.key),r)}}function p(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(h,e);var t,n,o,c,y=(o=h,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(o);if(c){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function h(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),y.call(this,e)}return t=h,(n=[{key:"defaults",get:function(){return{cursors:{},cursorParamName:"cursor"}}},{key:"name",get:function(){return"PaginationComponent"}},{key:"template",get:function(){return u()}},{key:"lang",get:function(){return"shared._pagination"}},{key:"appLinks",get:function(){var e={};if(!this.options.cursors)return{};if(this.options.cursors.previous){var t=this.options.cursors.previous,n=this.buildCursor(this.options.cursors.previous);+t<=1&&!0!==this.options.allowFirstPageCursor&&delete n.params.cursor,e[".previous-applink"]=n}return this.options.cursors.next&&(e[".next-applink"]=this.buildCursor(this.options.cursors.next)),e}},{key:"events",value:function(){return{"click .previous-applink":"onClickPrevious","click .next-applink":"onClickNext"}}},{key:"buildCursor",value:function(e){return{application:this.options.appLink.application,action:this.options.appLink.action,args:this.options.appLink.args,params:r.extend({},this.options.appLink.params,(t={},n=this.options.cursorParamName,o=e,(n=p(n))in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t))};var t,n,o}},{key:"onClickPrevious",value:function(){this.logAction("previous")}},{key:"onClickNext",value:function(){this.logAction("next")}},{key:"logAction",value:function(e){var t=a.k.mergeOptions(this.options.analyticsOptions,{location:i.LocationContext.Pagination,entity:i.EntityType.Pagination,actionType:i.UserAction.Navigate}),n={id:this.options.collectionId,page:e};a.k.logUserAction(n,t)}},{key:"viewOptions",value:function(){return{cursors:this.options.cursors}}},{key:"onBeforeRender",value:function(){return!!this.options.cursors}}])&&l(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(o.Q.Component)},4113:function(e,t,n){"use strict";n.r(t),n.d(t,{RestrictedVideoListView:function(){return V}});var r=n(31647),o=n(21679),i=n(57857),a=n(63791),c=n(56210),u=n(47022),s=n(98985),l=n(25692),p=n(59054),f=n(70763),d=n(48090),y=n(29457),h=n(48404),b=n(71192),v=n(23096),m=n(58688),g=n(19226),k=n(264),w=n(57085),O=n(95061),P=n(12827),E=n.n(P);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},S(e)}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==S(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===S(o)?o:String(o)),r)}var o}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}var V=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(_,e);var t,n,r,P,V=(r=_,P=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=R(r);if(P){var n=R(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function _(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,_),V.call(this,e)}return t=_,(n=[{key:"initialize",value:function(){this.bindListeners(),this.restrictedVideoDataService=o.u.getInstance(d.Or.RestrictedVideo,this),this.videoDataService=o.u.getInstance(d.Or.Video,this),this.playerDataService=o.u.getInstance(d.Or.Player,this),this.createViewKey=this.createViewKey.bind(this)}},{key:"bindListeners",value:function(){this.listenTo(d.Vk.RESTRICTED_VIDEO,"".concat(d.M_.RESTRICTED_VIDEOS,":").concat(this.options.page,":sync"),this.render),this.listenTo(d.Vk.RESTRICTED_VIDEO,"".concat(d.M_.RESTRICTED_VIDEOS,":").concat(this.options.page,":invalidate"),this.render),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata)}},{key:"name",get:function(){return"RestrictedVideoListView"}},{key:"title",get:function(){return i.T.getPhrase(this.lang,"title")}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return E()}},{key:"lang",get:function(){return"videoAccess.restrictedVideoList"}},{key:"behaviors",get:function(){return[{behaviorClass:c.H,selector:".info-tooltip",title:i.T.getPhrase(this.lang,"findOutMore")}]}},{key:"defaults",get:function(){return{page:1}}},{key:"regions",value:function(){return{videos:{replaceElement:!0,el:".video-list-region",partialLoading:y.LP.VideoList},pagination:{replaceElement:!0,el:".pagination-region"},empty:{replaceElement:!0,el:".empty-region"},breadcrumbs:{replaceElement:!0,el:".breadcrumbs-region",partialLoading:y.LP.Breadcrumbs}}}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new f.t(this.videoCollection.map((function(e){return new b.n({id:e.get("id")})}))))}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,p.f.MasterObject,t)}},{key:"renderVideoList",value:function(){var e=this.restrictedVideoDataService.getPaginationCursors(this.options.page);this.showChildView("videos",new v.Y({collection:this.videoCollection,videosWithMetadata:this.videosWithMetadata,application:d.OV.VIDEO_ACCESS,collectionIdentifier:null,videoItemComponentType:m.U.VideoAccess,config:this.config,emptyStateType:y.ub.VideoAccess,emptyStateOptions:{heading:i.T.getPhrase(this.lang,"emptyStateHeading")},collectionViewChannel:this.channelName,currentUser:this.currentUser,hasCursors:!!e,showEmptyState:!0,libraries:this.libraries,playerApiUrl:this.config.get("playerApiUrl"),createViewKey:this.createViewKey}))}},{key:"renderPagination",value:function(){var e=this.restrictedVideoDataService.getPaginationCursors(this.options.page);this.showChildView("pagination",new u.Q({cursors:e,appLink:{application:d.OV.VIDEO_ACCESS,action:d.eX.VideoAccess.HOME},cursorParamName:"page"}))}},{key:"renderBreadcrumbs",value:function(){this.showChildView("breadcrumbs",new w.n({enableLastItemAppLink:!1,customBreadcrumbs:[{name:i.T.getPhrase(this.lang,"libraryEditor"),active:!1,appLink:{application:d.OV.LIBRARY_EDITOR,action:d.eX.LibraryEditor.HOME}},{name:i.T.getPhrase(this.lang,"videoAccess"),active:!0}]}))}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(n){var r=t.videosWithMetadata.get(e);r&&(r.set(n.toJSON()),r.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:h.p.config,currentUser:g.K.currentUser,libraries:O.T.libraries}}},{key:"onBeforeRender",value:function(){return this.videoCollection=this.restrictedVideoDataService.getRestrictedVideos(this.options.page),!!this.videoCollection&&(this.setVideosWithMetadata(),!0)}},{key:"viewOptions",value:function(){return{supportUrl:!k.g.hasLite&&s.o.getOnlineArticle(l.s.VideoAccess),svg:a.Nj.getSvg(a.vn.Info)}}},{key:"onRender",value:function(){this.renderVideoList(),this.renderPagination(),this.renderBreadcrumbs()}}])&&C(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),_}(r.Q.View)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return E}});var r=n(31647),o=n(93933),i=n.n(o),a=n(86363),c=n.n(a);function u(e){return u="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},u(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,(void 0,o=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===u(o)?o:String(o)),r)}var o}function p(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(e){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=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var b=function(e){f(n,e);var t=y(n);function n(){return s(this,n),t.apply(this,arguments)}return p(n,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return c()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}]),n}(r.Q.Component),v=function(e){f(n,e);var t=y(n);function n(){return s(this,n),t.apply(this,arguments)}return p(n,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return b}}]),n}(r.Q.ComponentCollection),m=n(22557),g=n(48090);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function 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,(void 0,o=function(e,t){if("object"!==k(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===k(o)?o:String(o)),r)}var o}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(u,e);var t,n,o,a,c=(o=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=P(o);if(a){var n=P(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),c.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return i()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var e=this;this.breadcrumbCollection=new r.Q.Collection([]);var t,n=this.options.folder;do{if(!n)break;if(t=m.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!t),{at:0}),!t)break;n=t}while(t);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:g.OV.LIBRARY_EDITOR,action:g.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(t){return e.breadcrumbCollection.add(t)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?g.eX.LibraryEditor.FOLDER:g.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:g.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new v({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(r.Q.Component)},99186:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,u=e.escapeExpression;return'<div class="p-3">\n <a class="btn previous-applink btn-outline-dark '+(null!=(i=n.unless.call(a,null!=(i=null!=(i=null!=t?t.options:t)?i.cursors:i)?i.previous:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">'+u((n.lang||t&&t.lang||c).call(a,"previous",{name:"lang",hash:{},data:o}))+'</a>\n <a class="btn next-applink btn-outline-dark '+(null!=(i=n.unless.call(a,null!=(i=null!=(i=null!=t?t.options:t)?i.cursors:i)?i.next:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">'+u((n.lang||t&&t.lang||c).call(a,"next",{name:"lang",hash:{},data:o}))+"</a>\n</div>"},useData:!0})},12827:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda;return' <a class="d-inline-block ml-2 svg-container sm info-tooltip" href="'+e.escapeExpression(a(null!=(i=null!=t?t.options:t)?i.supportUrl:i,t))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,u=e.escapeExpression;return'<div class="pl-3 pt-3 pr-3">\n <div class="border-bottom">\n <div class="d-flex align-items-center pb-2">\n <h1 class="h3 d-inline-block m-0">'+u((n.lang||t&&t.lang||c).call(a,"heading",{name:"lang",hash:{},data:o}))+" </h1>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.supportUrl:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+' </div>\n <div class="breadcrumbs-region"></div>\n <p class="pb-3 pt-2 m-0">\n '+u((n.lang||t&&t.lang||c).call(a,"description",{name:"lang",hash:{},data:o}))+'\n </p>\n </div> \n</div>\n<div class="video-list-region"></div>\n<div class="pagination-region"></div>\n<div class="empty-region"></div>'},useData:!0})},86363:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<span class="font-weight-bolder">'+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):i)+"</span>\n"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<a>"+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):i)+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.isActive:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},93933:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4177],{59054:function(e,t,n){"use strict";var r;n.d(t,{f:function(){return r}}),function(e){e.Share="share",e.MasterObject="masterobject"}(r||(r={}))},47022:function(e,t,n){"use strict";n.d(t,{Q:function(){return y}});var r=n(39479),o=n(31647),i=n(70065),a=n(52076),c=n(99186),u=n.n(c);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},s(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,p(r.key),r)}}function p(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(h,e);var t,n,o,c,y=(o=h,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(o);if(c){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function h(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),y.call(this,e)}return t=h,(n=[{key:"defaults",get:function(){return{cursors:{},cursorParamName:"cursor"}}},{key:"name",get:function(){return"PaginationComponent"}},{key:"template",get:function(){return u()}},{key:"lang",get:function(){return"shared._pagination"}},{key:"appLinks",get:function(){var e={};if(!this.options.cursors)return{};if(this.options.cursors.previous){var t=this.options.cursors.previous,n=this.buildCursor(this.options.cursors.previous);+t<=1&&!0!==this.options.allowFirstPageCursor&&delete n.params.cursor,e[".previous-applink"]=n}return this.options.cursors.next&&(e[".next-applink"]=this.buildCursor(this.options.cursors.next)),e}},{key:"events",value:function(){return{"click .previous-applink":"onClickPrevious","click .next-applink":"onClickNext"}}},{key:"buildCursor",value:function(e){return{application:this.options.appLink.application,action:this.options.appLink.action,args:this.options.appLink.args,params:r.extend({},this.options.appLink.params,(t={},n=this.options.cursorParamName,o=e,(n=p(n))in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t))};var t,n,o}},{key:"onClickPrevious",value:function(){this.logAction("previous")}},{key:"onClickNext",value:function(){this.logAction("next")}},{key:"logAction",value:function(e){var t=a.k.mergeOptions(this.options.analyticsOptions,{location:i.LocationContext.Pagination,entity:i.EntityType.Pagination,actionType:i.UserAction.Navigate}),n={id:this.options.collectionId,page:e};a.k.logUserAction(n,t)}},{key:"viewOptions",value:function(){return{cursors:this.options.cursors}}},{key:"onBeforeRender",value:function(){return!!this.options.cursors}}])&&l(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(o.Q.Component)},4113:function(e,t,n){"use strict";n.r(t),n.d(t,{RestrictedVideoListView:function(){return V}});var r=n(31647),o=n(21679),i=n(57857),a=n(63791),c=n(56210),u=n(47022),s=n(98985),l=n(25692),p=n(59054),f=n(70763),d=n(48090),y=n(29457),h=n(48404),b=n(71192),v=n(23096),m=n(58688),g=n(19226),k=n(264),w=n(57085),O=n(95061),P=n(12827),E=n.n(P);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},S(e)}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==S(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===S(o)?o:String(o)),r)}var o}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}var V=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(_,e);var t,n,r,P,V=(r=_,P=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=R(r);if(P){var n=R(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function _(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,_),V.call(this,e)}return t=_,(n=[{key:"initialize",value:function(){this.bindListeners(),this.restrictedVideoDataService=o.u.getInstance(d.Or.RestrictedVideo,this),this.videoDataService=o.u.getInstance(d.Or.Video,this),this.playerDataService=o.u.getInstance(d.Or.Player,this),this.createViewKey=this.createViewKey.bind(this)}},{key:"bindListeners",value:function(){this.listenTo(d.Vk.RESTRICTED_VIDEO,"".concat(d.M_.RESTRICTED_VIDEOS,":").concat(this.options.page,":sync"),this.render),this.listenTo(d.Vk.RESTRICTED_VIDEO,"".concat(d.M_.RESTRICTED_VIDEOS,":").concat(this.options.page,":invalidate"),this.render),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata)}},{key:"name",get:function(){return"RestrictedVideoListView"}},{key:"title",get:function(){return i.T.getPhrase(this.lang,"title")}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return E()}},{key:"lang",get:function(){return"videoAccess.restrictedVideoList"}},{key:"behaviors",get:function(){return[{behaviorClass:c.H,selector:".info-tooltip",title:i.T.getPhrase(this.lang,"findOutMore")}]}},{key:"defaults",get:function(){return{page:1}}},{key:"regions",value:function(){return{videos:{replaceElement:!0,el:".video-list-region",partialLoading:y.LP.VideoList},pagination:{replaceElement:!0,el:".pagination-region"},empty:{replaceElement:!0,el:".empty-region"},breadcrumbs:{replaceElement:!0,el:".breadcrumbs-region",partialLoading:y.LP.Breadcrumbs}}}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new f.t(this.videoCollection.map((function(e){return new b.n({id:e.get("id")})}))))}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,p.f.MasterObject,t)}},{key:"renderVideoList",value:function(){var e=this.restrictedVideoDataService.getPaginationCursors(this.options.page);this.showChildView("videos",new v.Y({collection:this.videoCollection,videosWithMetadata:this.videosWithMetadata,application:d.OV.VIDEO_ACCESS,collectionIdentifier:null,videoItemComponentType:m.U.VideoAccess,config:this.config,emptyStateType:y.ub.VideoAccess,emptyStateOptions:{heading:i.T.getPhrase(this.lang,"emptyStateHeading")},collectionViewChannel:this.channelName,currentUser:this.currentUser,hasCursors:!!e,showEmptyState:!0,libraries:this.libraries,playerApiUrl:this.config.get("playerApiUrl"),createViewKey:this.createViewKey}))}},{key:"renderPagination",value:function(){var e=this.restrictedVideoDataService.getPaginationCursors(this.options.page);this.showChildView("pagination",new u.Q({cursors:e,appLink:{application:d.OV.VIDEO_ACCESS,action:d.eX.VideoAccess.HOME},cursorParamName:"page"}))}},{key:"renderBreadcrumbs",value:function(){this.showChildView("breadcrumbs",new w.n({enableLastItemAppLink:!1,customBreadcrumbs:[{name:i.T.getPhrase(this.lang,"libraryEditor"),active:!1,appLink:{application:d.OV.LIBRARY_EDITOR,action:d.eX.LibraryEditor.HOME}},{name:i.T.getPhrase(this.lang,"videoAccess"),active:!0}]}))}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(n){var r=t.videosWithMetadata.get(e);r&&(r.set(n.toJSON()),r.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:h.p.config,currentUser:g.K.currentUser,libraries:O.T.libraries}}},{key:"onBeforeRender",value:function(){return this.videoCollection=this.restrictedVideoDataService.getRestrictedVideos(this.options.page),!!this.videoCollection&&(this.setVideosWithMetadata(),!0)}},{key:"viewOptions",value:function(){return{supportUrl:!k.g.hasLite&&s.o.getOnlineArticle(l.s.VideoAccess),svg:a.Nj.getSvg(a.vn.Info)}}},{key:"onRender",value:function(){this.renderVideoList(),this.renderPagination(),this.renderBreadcrumbs()}}])&&C(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),_}(r.Q.View)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return E}});var r=n(31647),o=n(93933),i=n.n(o),a=n(86363),c=n.n(a);function u(e){return u="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},u(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,(void 0,o=function(e,t){if("object"!==u(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===u(o)?o:String(o)),r)}var o}function p(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(e){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=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var b=function(e){f(n,e);var t=y(n);function n(){return s(this,n),t.apply(this,arguments)}return p(n,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return c()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}]),n}(r.Q.Component),v=function(e){f(n,e);var t=y(n);function n(){return s(this,n),t.apply(this,arguments)}return p(n,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return b}}]),n}(r.Q.ComponentCollection),m=n(22557),g=n(48090);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function 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,(void 0,o=function(e,t){if("object"!==k(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===k(o)?o:String(o)),r)}var o}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(u,e);var t,n,o,a,c=(o=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=P(o);if(a){var n=P(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),c.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return i()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var e=this;this.breadcrumbCollection=new r.Q.Collection([]);var t,n=this.options.folder;do{if(!n)break;if(t=m.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!t),{at:0}),!t)break;n=t}while(t);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:g.OV.LIBRARY_EDITOR,action:g.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(t){return e.breadcrumbCollection.add(t)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?g.eX.LibraryEditor.FOLDER:g.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:g.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new v({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(r.Q.Component)},99186:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,u=e.escapeExpression;return'<div class="p-3">\r\n <a class="btn previous-applink btn-outline-dark '+(null!=(i=n.unless.call(a,null!=(i=null!=(i=null!=t?t.options:t)?i.cursors:i)?i.previous:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">'+u((n.lang||t&&t.lang||c).call(a,"previous",{name:"lang",hash:{},data:o}))+'</a>\r\n <a class="btn next-applink btn-outline-dark '+(null!=(i=n.unless.call(a,null!=(i=null!=(i=null!=t?t.options:t)?i.cursors:i)?i.next:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">'+u((n.lang||t&&t.lang||c).call(a,"next",{name:"lang",hash:{},data:o}))+"</a>\r\n</div>"},useData:!0})},12827:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda;return' <a class="d-inline-block ml-2 svg-container sm info-tooltip" href="'+e.escapeExpression(a(null!=(i=null!=t?t.options:t)?i.supportUrl:i,t))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,u=e.escapeExpression;return'<div class="pl-3 pt-3 pr-3">\r\n <div class="border-bottom">\r\n <div class="d-flex align-items-center pb-2">\r\n <h1 class="h3 d-inline-block m-0">'+u((n.lang||t&&t.lang||c).call(a,"heading",{name:"lang",hash:{},data:o}))+" </h1>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.supportUrl:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+' </div>\r\n <div class="breadcrumbs-region"></div>\r\n <p class="pb-3 pt-2 m-0">\r\n '+u((n.lang||t&&t.lang||c).call(a,"description",{name:"lang",hash:{},data:o}))+'\r\n </p>\r\n </div> \r\n</div>\r\n<div class="video-list-region"></div>\r\n<div class="pagination-region"></div>\r\n<div class="empty-region"></div>'},useData:!0})},86363:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<span class="font-weight-bolder">'+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):i)+"</span>\r\n"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<a>"+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):i)+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.isActive:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},93933:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4201],{74201:function(e,t,r){"use strict";r.r(t),r.d(t,{NewLibraryView:function(){return E}});var n=r(48088),o=r(31647),i=r(21679),a=r(99249),u=r(57857),l=r(36357),c=r(10101),s=r(19226),f=r(48090),p=r(88172),y=r(24539),b=r(67670),h=r(61843),m=r(7190),d=r(95061),v=r(56906),g=r(15110),w=r.n(g);function O(e){return O="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},O(e)}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==O(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===O(o)?o:String(o)),n)}var o}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(_,e);var t,r,g,E,P=(g=_,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(e){return!1}}(),function(){var e,t=j(g);if(E){var r=j(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function _(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,_),P.apply(this,arguments)}return t=_,(r=[{key:"initialize",value:function(){this.model=a.r.get("new:library",null,{ctor:y.Z}),this.bindListeners(),this.settingsDataService=i.u.getInstance(f.Or.Settings,this),this.libraryDataService=i.u.getInstance(f.Or.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(f.Vk.SETTINGS,"".concat(f.M_.CUSTOMER_SETTINGS,":sync ").concat(f.M_.USER_SETTINGS,":sync"),this.render)}},{key:"name",get:function(){return"NewLibraryView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.newLibrary"}},{key:"template",get:function(){return w()}},{key:"channelName",get:function(){return h.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.fS,modelValidation:m.Y7},{behaviorClass:c.Bp},{behaviorClass:c.Yw,title:u.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new b.v,channelName:this.channelName,buttonText:u.T.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.model.validate(),this.model.isValid()&&(n.Radio.channel(this.channelName).trigger(p.I3.ShowSpinner),this.createLibrary())}},{key:"createLibrary",value:function(){this.libraryDataService.createLibrary(this.currentUser.get("customerId"),this.model,(function(e){a.r.clear("new:library"),o.Q.AppLinkHelper.trigger({application:f.OV.LIBRARY_EDITOR,action:f.eX.LibraryEditor.LIBRARY,args:[e.id]})}))}},{key:"requiredResources",get:function(){return{currentUser:s.K.currentUser,libraries:d.T.libraries}}},{key:"onBeforeRender",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),l.E.MaxCustomLibraries),this.libraries.length>=this.maxCustomLibraries.get("value")?o.Q.ErrorHelper.throw(new v.PQ(this.libraries.length,this.maxCustomLibraries.get("value"))):this.maxCustomLibraries&&this.spinnerModel.set(p.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.maxCustomLibraries,spinnerEl:h.Kp.getSpinner({size:h.Ey.Large,extraClasses:"mx-auto"})}}}])&&S(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),_}(o.Q.View)},67670:function(e,t,r){"use strict";r.d(t,{v:function(){return f}});var n=r(31647),o=r(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(p,e);var t,r,n,l,f=(n=p,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=s(n);if(l){var r=s(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function p(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),f.apply(this,arguments)}return t=p,(r=[{key:"defaults",value:function(){var e;return a(e={},o.ZV.Disabled,!0),a(e,o.ZV.Hidden,!1),e}}])&&u(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(n.Q.Model)},15110:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({1:function(e,t,r,n,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,r,n,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,u=e.escapeExpression;return'<form>\n <div class="form-group">\n <label for="name" class="control-label">'+u((r.lang||t&&t.lang||a).call(i,"libraryName",{name:"lang",hash:{},data:o}))+'</label>\n <input name="name" id="name" type="text" class="form-control" placeholder="'+u((r.lang||t&&t.lang||a).call(i,"secondaryLibrary",{name:"lang",hash:{},data:o}))+'" autocomplete="off" autofocus/>\n <div class="form-feedback"></div>\n </div>\n</form>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,r,n,o){var i;return e.propertyIsEnumerable,null!=(i=r.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4201],{74201:function(e,t,r){"use strict";r.r(t),r.d(t,{NewLibraryView:function(){return E}});var n=r(48088),o=r(31647),i=r(21679),a=r(99249),u=r(57857),l=r(36357),c=r(10101),s=r(19226),f=r(48090),p=r(88172),y=r(24539),b=r(67670),h=r(61843),m=r(7190),d=r(95061),v=r(56906),g=r(15110),w=r.n(g);function O(e){return O="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},O(e)}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==O(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===O(o)?o:String(o)),n)}var o}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(_,e);var t,r,g,E,P=(g=_,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(e){return!1}}(),function(){var e,t=j(g);if(E){var r=j(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function _(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,_),P.apply(this,arguments)}return t=_,(r=[{key:"initialize",value:function(){this.model=a.r.get("new:library",null,{ctor:y.Z}),this.bindListeners(),this.settingsDataService=i.u.getInstance(f.Or.Settings,this),this.libraryDataService=i.u.getInstance(f.Or.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(f.Vk.SETTINGS,"".concat(f.M_.CUSTOMER_SETTINGS,":sync ").concat(f.M_.USER_SETTINGS,":sync"),this.render)}},{key:"name",get:function(){return"NewLibraryView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.newLibrary"}},{key:"template",get:function(){return w()}},{key:"channelName",get:function(){return h.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.fS,modelValidation:m.Y7},{behaviorClass:c.Bp},{behaviorClass:c.Yw,title:u.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new b.v,channelName:this.channelName,buttonText:u.T.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.model.validate(),this.model.isValid()&&(n.Radio.channel(this.channelName).trigger(p.I3.ShowSpinner),this.createLibrary())}},{key:"createLibrary",value:function(){this.libraryDataService.createLibrary(this.currentUser.get("customerId"),this.model,(function(e){a.r.clear("new:library"),o.Q.AppLinkHelper.trigger({application:f.OV.LIBRARY_EDITOR,action:f.eX.LibraryEditor.LIBRARY,args:[e.id]})}))}},{key:"requiredResources",get:function(){return{currentUser:s.K.currentUser,libraries:d.T.libraries}}},{key:"onBeforeRender",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),l.E.MaxCustomLibraries),this.libraries.length>=this.maxCustomLibraries.get("value")?o.Q.ErrorHelper.throw(new v.PQ(this.libraries.length,this.maxCustomLibraries.get("value"))):this.maxCustomLibraries&&this.spinnerModel.set(p.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.maxCustomLibraries,spinnerEl:h.Kp.getSpinner({size:h.Ey.Large,extraClasses:"mx-auto"})}}}])&&S(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),_}(o.Q.View)},67670:function(e,t,r){"use strict";r.d(t,{v:function(){return f}});var n=r(31647),o=r(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(p,e);var t,r,n,l,f=(n=p,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=s(n);if(l){var r=s(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function p(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),f.apply(this,arguments)}return t=p,(r=[{key:"defaults",value:function(){var e;return a(e={},o.ZV.Disabled,!0),a(e,o.ZV.Hidden,!1),e}}])&&u(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),p}(n.Q.Model)},15110:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({1:function(e,t,r,n,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,r,n,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,u=e.escapeExpression;return'<form>\r\n <div class="form-group">\r\n <label for="name" class="control-label">'+u((r.lang||t&&t.lang||a).call(i,"libraryName",{name:"lang",hash:{},data:o}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+u((r.lang||t&&t.lang||a).call(i,"secondaryLibrary",{name:"lang",hash:{},data:o}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n</form>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,r,n,o){var i;return e.propertyIsEnumerable,null!=(i=r.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4245],{34245:function(t,n,e){"use strict";e.r(n),e.d(n,{NotificationsView:function(){return P}});var i=e(31647),o=e(57857),r=e(21679),a=e(70125),s=e(33955),c=e(11543),l=e(23859),u=e(33303),f=e(47022),p=e(43129),y=e(38900),h=e.n(y),v=e(24355),b=e.n(v),d=e(58081),g=e(4039);function m(t){return m="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},m(t)}function k(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,n){if("object"!==m(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!==m(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===m(o)?o:String(o)),i)}var o}function w(t,n){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},w(t,n)}function O(t){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},O(t)}var P=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&w(t,n)}(C,t);var n,e,y,v,P=(y=C,v=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}}(),function(){var t,n=O(y);if(v){var e=O(this).constructor;t=Reflect.construct(n,arguments,e)}else t=n.apply(this,arguments);return function(t,n){if(n&&("object"===m(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function C(t){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,C),P.call(this,t)}return n=C,(e=[{key:"name",get:function(){return"NotificationsView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"notifications.notifications"}},{key:"template",get:function(){return h()}},{key:"regions",value:function(){return{notifications:{replaceElement:!0,el:".list-region",partialLoading:{component:a.k.ComponentCollection,options:{collectionLength:5,childOptions:{template:b(),className:"px-1 py-2",viewOptions:{styles:d.Z}}}}},pagination:{replaceElement:!0,el:".pagination-region"}}}},{key:"initialize",value:function(){this.notificationService=r.u.getInstance(c.D.Notification,this),this.appVariables=r.u.getInstance(l.C.NOTIFICATIONS,this)}},{key:"onData",value:function(t){this.collection=t,this.render()}},{key:"getCollectionIdentifier",value:function(){return this.collectionIdentifier?this.collectionIdentifier:this.collectionIdentifier=new u.J(Object.assign({collectionPrefix:s.j.NOTIFICATIONS},this.options.params))}},{key:"renderNotificationList",value:function(){var t=new p.Z({collection:this.collection,childType:p.z.Default,liteUrl:this.config instanceof i.Q.Model?this.config.get("liteUrl"):this.config.liteUrl,libraryEditorUrl:this.config instanceof i.Q.Model?this.config.get("libraryEditorUrl"):this.config.libraryEditorUrl,hasLite:this.options.hasLite});this.showChildView("notifications",t)}},{key:"renderPagination",value:function(){if(this.collection.length){var t=this.notificationService.getNotificationsCursors(this.getCollectionIdentifier()),n=new f.Q({cursors:t,appLink:Object.assign(Object.assign({},this.appVariables.appLinks.notifications),{args:[],params:this.getCollectionIdentifier().toParams()})});this.showChildView("pagination",n)}}},{key:"requiredResources",get:function(){return{config:g.p.config}}},{key:"viewOptions",value:function(){var t,n;return{containerClass:null!==(n=null===(t=this.appVariables)||void 0===t?void 0:t.notificationsViewClassNames)&&void 0!==n?n:""}}},{key:"onBeforeRender",value:function(){var t=this;return this.collection||this.notificationService.getNotifications(this.options.params,this.getCollectionIdentifier(),(function(n){return t.onData(n)})),!!this.collection}},{key:"onRender",value:function(){this.renderNotificationList(),this.renderPagination()}}])&&k(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),C}(i.Q.View)},47022:function(t,n,e){"use strict";e.d(n,{Q:function(){return h}});var i=e(39479),o=e(31647),r=e(70065),a=e(52076),s=e(99186),c=e.n(s);function l(t){return l="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},l(t)}function u(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,f(i.key),i)}}function f(t){var n=function(t,n){if("object"!==l(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!==l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===l(n)?n:String(n)}function p(t,n){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},p(t,n)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var h=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&p(t,n)}(v,t);var n,e,o,s,h=(o=v,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=y(o);if(s){var e=y(this).constructor;t=Reflect.construct(n,arguments,e)}else t=n.apply(this,arguments);return function(t,n){if(n&&("object"===l(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function v(t){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,v),h.call(this,t)}return n=v,(e=[{key:"defaults",get:function(){return{cursors:{},cursorParamName:"cursor"}}},{key:"name",get:function(){return"PaginationComponent"}},{key:"template",get:function(){return c()}},{key:"lang",get:function(){return"shared._pagination"}},{key:"appLinks",get:function(){var t={};if(!this.options.cursors)return{};if(this.options.cursors.previous){var n=this.options.cursors.previous,e=this.buildCursor(this.options.cursors.previous);+n<=1&&!0!==this.options.allowFirstPageCursor&&delete e.params.cursor,t[".previous-applink"]=e}return this.options.cursors.next&&(t[".next-applink"]=this.buildCursor(this.options.cursors.next)),t}},{key:"events",value:function(){return{"click .previous-applink":"onClickPrevious","click .next-applink":"onClickNext"}}},{key:"buildCursor",value:function(t){return{application:this.options.appLink.application,action:this.options.appLink.action,args:this.options.appLink.args,params:i.extend({},this.options.appLink.params,(n={},e=this.options.cursorParamName,o=t,(e=f(e))in n?Object.defineProperty(n,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[e]=o,n))};var n,e,o}},{key:"onClickPrevious",value:function(){this.logAction("previous")}},{key:"onClickNext",value:function(){this.logAction("next")}},{key:"logAction",value:function(t){var n=a.k.mergeOptions(this.options.analyticsOptions,{location:r.LocationContext.Pagination,entity:r.EntityType.Pagination,actionType:r.UserAction.Navigate}),e={id:this.options.collectionId,page:t};a.k.logUserAction(e,n)}},{key:"viewOptions",value:function(){return{cursors:this.options.cursors}}},{key:"onBeforeRender",value:function(){return!!this.options.cursors}}])&&u(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),v}(o.Q.Component)},38900:function(t,n,e){var i=e(32227);t.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(t,n,e,i,o){t.propertyIsEnumerable;var r,a=t.escapeExpression;return'<div class="'+a(t.lambda(null!=(r=null!=n?n.options:n)?r.containerClass:r,n))+'">\n <h1 class="header border-bottom pb-2 m-0">'+a((e.lang||n&&n.lang||t.hooks.helperMissing).call(null!=n?n:t.nullContext||{},"notifications",{name:"lang",hash:{},data:o}))+'</h1>\n <div class="list-region"></div>\n <div class="pagination-region"></div>\n</div>'},useData:!0})},99186:function(t,n,e){var i=e(32227);t.exports=(i.default||i).template({1:function(t,n,e,i,o){return"disabled"},compiler:[8,">= 4.3.0"],main:function(t,n,e,i,o){t.propertyIsEnumerable;var r,a=null!=n?n:t.nullContext||{},s=t.hooks.helperMissing,c=t.escapeExpression;return'<div class="p-3">\n <a class="btn previous-applink btn-outline-dark '+(null!=(r=e.unless.call(a,null!=(r=null!=(r=null!=n?n.options:n)?r.cursors:r)?r.previous:r,{name:"unless",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?r:"")+'">'+c((e.lang||n&&n.lang||s).call(a,"previous",{name:"lang",hash:{},data:o}))+'</a>\n <a class="btn next-applink btn-outline-dark '+(null!=(r=e.unless.call(a,null!=(r=null!=(r=null!=n?n.options:n)?r.cursors:r)?r.next:r,{name:"unless",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?r:"")+'">'+c((e.lang||n&&n.lang||s).call(a,"next",{name:"lang",hash:{},data:o}))+"</a>\n</div>"},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4245],{34245:function(t,n,e){"use strict";e.r(n),e.d(n,{NotificationsView:function(){return P}});var i=e(31647),o=e(57857),r=e(21679),a=e(70125),s=e(33955),c=e(11543),l=e(23859),u=e(33303),f=e(47022),p=e(43129),y=e(38900),h=e.n(y),v=e(24355),b=e.n(v),d=e(58081),g=e(4039);function m(t){return m="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},m(t)}function k(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,n){if("object"!==m(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!==m(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===m(o)?o:String(o)),i)}var o}function w(t,n){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},w(t,n)}function O(t){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},O(t)}var P=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&w(t,n)}(C,t);var n,e,y,v,P=(y=C,v=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}}(),function(){var t,n=O(y);if(v){var e=O(this).constructor;t=Reflect.construct(n,arguments,e)}else t=n.apply(this,arguments);return function(t,n){if(n&&("object"===m(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function C(t){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,C),P.call(this,t)}return n=C,(e=[{key:"name",get:function(){return"NotificationsView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"notifications.notifications"}},{key:"template",get:function(){return h()}},{key:"regions",value:function(){return{notifications:{replaceElement:!0,el:".list-region",partialLoading:{component:a.k.ComponentCollection,options:{collectionLength:5,childOptions:{template:b(),className:"px-1 py-2",viewOptions:{styles:d.Z}}}}},pagination:{replaceElement:!0,el:".pagination-region"}}}},{key:"initialize",value:function(){this.notificationService=r.u.getInstance(c.D.Notification,this),this.appVariables=r.u.getInstance(l.C.NOTIFICATIONS,this)}},{key:"onData",value:function(t){this.collection=t,this.render()}},{key:"getCollectionIdentifier",value:function(){return this.collectionIdentifier?this.collectionIdentifier:this.collectionIdentifier=new u.J(Object.assign({collectionPrefix:s.j.NOTIFICATIONS},this.options.params))}},{key:"renderNotificationList",value:function(){var t=new p.Z({collection:this.collection,childType:p.z.Default,liteUrl:this.config instanceof i.Q.Model?this.config.get("liteUrl"):this.config.liteUrl,libraryEditorUrl:this.config instanceof i.Q.Model?this.config.get("libraryEditorUrl"):this.config.libraryEditorUrl,hasLite:this.options.hasLite});this.showChildView("notifications",t)}},{key:"renderPagination",value:function(){if(this.collection.length){var t=this.notificationService.getNotificationsCursors(this.getCollectionIdentifier()),n=new f.Q({cursors:t,appLink:Object.assign(Object.assign({},this.appVariables.appLinks.notifications),{args:[],params:this.getCollectionIdentifier().toParams()})});this.showChildView("pagination",n)}}},{key:"requiredResources",get:function(){return{config:g.p.config}}},{key:"viewOptions",value:function(){var t,n;return{containerClass:null!==(n=null===(t=this.appVariables)||void 0===t?void 0:t.notificationsViewClassNames)&&void 0!==n?n:""}}},{key:"onBeforeRender",value:function(){var t=this;return this.collection||this.notificationService.getNotifications(this.options.params,this.getCollectionIdentifier(),(function(n){return t.onData(n)})),!!this.collection}},{key:"onRender",value:function(){this.renderNotificationList(),this.renderPagination()}}])&&k(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),C}(i.Q.View)},47022:function(t,n,e){"use strict";e.d(n,{Q:function(){return h}});var i=e(39479),o=e(31647),r=e(70065),a=e(52076),s=e(99186),c=e.n(s);function l(t){return l="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},l(t)}function u(t,n){for(var e=0;e<n.length;e++){var i=n[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,f(i.key),i)}}function f(t){var n=function(t,n){if("object"!==l(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!==l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===l(n)?n:String(n)}function p(t,n){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},p(t,n)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var h=function(t){!function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&p(t,n)}(v,t);var n,e,o,s,h=(o=v,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,n=y(o);if(s){var e=y(this).constructor;t=Reflect.construct(n,arguments,e)}else t=n.apply(this,arguments);return function(t,n){if(n&&("object"===l(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function v(t){return function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,v),h.call(this,t)}return n=v,(e=[{key:"defaults",get:function(){return{cursors:{},cursorParamName:"cursor"}}},{key:"name",get:function(){return"PaginationComponent"}},{key:"template",get:function(){return c()}},{key:"lang",get:function(){return"shared._pagination"}},{key:"appLinks",get:function(){var t={};if(!this.options.cursors)return{};if(this.options.cursors.previous){var n=this.options.cursors.previous,e=this.buildCursor(this.options.cursors.previous);+n<=1&&!0!==this.options.allowFirstPageCursor&&delete e.params.cursor,t[".previous-applink"]=e}return this.options.cursors.next&&(t[".next-applink"]=this.buildCursor(this.options.cursors.next)),t}},{key:"events",value:function(){return{"click .previous-applink":"onClickPrevious","click .next-applink":"onClickNext"}}},{key:"buildCursor",value:function(t){return{application:this.options.appLink.application,action:this.options.appLink.action,args:this.options.appLink.args,params:i.extend({},this.options.appLink.params,(n={},e=this.options.cursorParamName,o=t,(e=f(e))in n?Object.defineProperty(n,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[e]=o,n))};var n,e,o}},{key:"onClickPrevious",value:function(){this.logAction("previous")}},{key:"onClickNext",value:function(){this.logAction("next")}},{key:"logAction",value:function(t){var n=a.k.mergeOptions(this.options.analyticsOptions,{location:r.LocationContext.Pagination,entity:r.EntityType.Pagination,actionType:r.UserAction.Navigate}),e={id:this.options.collectionId,page:t};a.k.logUserAction(e,n)}},{key:"viewOptions",value:function(){return{cursors:this.options.cursors}}},{key:"onBeforeRender",value:function(){return!!this.options.cursors}}])&&u(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),v}(o.Q.Component)},38900:function(t,n,e){var i=e(32227);t.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(t,n,e,i,o){t.propertyIsEnumerable;var r,a=t.escapeExpression;return'<div class="'+a(t.lambda(null!=(r=null!=n?n.options:n)?r.containerClass:r,n))+'">\r\n <h1 class="header border-bottom pb-2 m-0">'+a((e.lang||n&&n.lang||t.hooks.helperMissing).call(null!=n?n:t.nullContext||{},"notifications",{name:"lang",hash:{},data:o}))+'</h1>\r\n <div class="list-region"></div>\r\n <div class="pagination-region"></div>\r\n</div>'},useData:!0})},99186:function(t,n,e){var i=e(32227);t.exports=(i.default||i).template({1:function(t,n,e,i,o){return"disabled"},compiler:[8,">= 4.3.0"],main:function(t,n,e,i,o){t.propertyIsEnumerable;var r,a=null!=n?n:t.nullContext||{},s=t.hooks.helperMissing,c=t.escapeExpression;return'<div class="p-3">\r\n <a class="btn previous-applink btn-outline-dark '+(null!=(r=e.unless.call(a,null!=(r=null!=(r=null!=n?n.options:n)?r.cursors:r)?r.previous:r,{name:"unless",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?r:"")+'">'+c((e.lang||n&&n.lang||s).call(a,"previous",{name:"lang",hash:{},data:o}))+'</a>\r\n <a class="btn next-applink btn-outline-dark '+(null!=(r=e.unless.call(a,null!=(r=null!=(r=null!=n?n.options:n)?r.cursors:r)?r.next:r,{name:"unless",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?r:"")+'">'+c((e.lang||n&&n.lang||s).call(a,"next",{name:"lang",hash:{},data:o}))+"</a>\r\n</div>"},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4591],{87120:function(e,t,
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4591],{87120:function(e,t,r){"use strict";r.d(t,{Y:function(){return o}});var n=r(57857),i="libraryEditor.utils",o={name:[{required:!0,msg:function(){return n.T.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return n.T.getPhrase(i,"libraryNameExceeds")}}]}},4591:function(e,t,r){"use strict";r.r(t),r.d(t,{RenameLibraryView:function(){return w}});var n=r(48088),i=r(31647),o=r(21679),a=r(99249),l=r(57857),u=r(52076),c=r(10101),s=r(24539),f=r(88172),y=r(48090),b=r(61843),h=r(87120),p=r(34690),m=r.n(p);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function v(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==d(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===d(i)?i:String(i)),n)}var i}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(O,e);var t,r,i,p,w=(i=O,p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=k(i);if(p){var r=k(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function O(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,O),w.call(this,e)}return t=O,(r=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=o.u.getInstance(y.Or.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(y.Vk.LIBRARY,"libraries:sync",this.render)}},{key:"name",get:function(){return"RenameLibraryView"}},{key:"lang",get:function(){return"libraryEditor.renameLibrary"}},{key:"title",get:function(){return l.T.getPhrase(this.lang,"title")}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return b.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.fS,modelValidation:h.Y},{behaviorClass:c.Bp},{behaviorClass:c.Yw,title:l.T.getPhrase(this.lang,"edit"),spinnerButtonOptions:{channelName:this.channelName,buttonText:l.T.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.model.validate(),this.model.isValid()&&(n.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner),this.saveLibrary(),this.logAction())}},{key:"logAction",value:function(){var e={id:this.options.libraryId,name:this.model.get("name")};u.k.logUserAction(e,this.options.analyticsOptions)}},{key:"saveLibrary",value:function(){var e=this;this.libraryDataService.updateLibrary(this.model,(function(){e.triggerMethod("hide")}))}},{key:"onBeforeRender",value:function(){var e=this;return this.libraryDataService.getFolderFromLibraries(this.options.libraryId,(function(t){e.model||(e.model=a.r.get("library:".concat(e.options.libraryId),t.toJSON(),{ctor:s.Z}))})),!!this.model}}])&&v(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),O}(i.Q.View)},34690:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){e.propertyIsEnumerable;var o=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return'<form>\r\n <div class="form-group">\r\n <label for="name" class="control-label">'+l((r.lang||t&&t.lang||a).call(o,"libraryName",{name:"lang",hash:{},data:i}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+l((r.lang||t&&t.lang||a).call(o,"secondaryLibrary",{name:"lang",hash:{},data:i}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n</form>'},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4784],{54096:function(e,t,n){n.d(t,{G:function(){return a}});var r=n(1024),i=n(21679);function a(e){var t,n;return t=e,n=i.u.getInstance(t),r.useEffect((function(){return function(){i.u.releaseInstance(t)}})),n}},38182:function(e,t,n){n.d(t,{q:function(){return u}});var r=n(1024),i=n.n(r),a=n(68003),o=n(87013),c=n(88483),s={avatar:"Gvwzj",dot:"JJHBJ"};function u(e){var t,n,r=e.imageUrl||(t=e.imageCdnUrl,(n=e.initials)?o.j.createUrl(a._.safeUrlConcat(t,"/v1/profile-images?initials=".concat(n)),{size:c.h2.Small}):"");return i().createElement("div",{className:"position-relative h-100 w-100"},i().createElement("div",{className:"".concat(s.avatar," ").concat((null==e?void 0:e.extraClasses)||""),style:{backgroundImage:"url('".concat(r,"')")}}," "),e.showDot&&i().createElement("div",{className:"".concat(s.dot," rounded-circle bg-danger")}))}},45458:function(e,t,n){n.d(t,{C:function(){return m},g:function(){return r}});var r,i=n(1024),a=n(57857),o=n(21974),c=n(27866),s=n(63946),u=n(39396),l=n(63791),d=n(50028),v=n(45428),p=a.T.encloseNamespace("shared.badges");function m(e){var t=e.type,n=e.data;if(!function(e,t){var n,i,a;return"boolean"==typeof t?!!t:e===r.Rating?t&&!!t.value:e===r.Resources?!!(null==t?void 0:t.length)||!!(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.length):e===r.Interactive?!!(null==t?void 0:t.length)||!!(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.length):e===r.Captions?!!(null==t?void 0:t.length)||!!(null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.length):e===r.Status?"number"==typeof t:!!t}(t,n))return i.createElement(i.Fragment,null);var a=function(e,t){var n="";if(e===r.DurationApproximate&&(n="duration-badge-new px-2 rounded-pill text-nowrap d-flex align-items-center"),e===r.DurationExact&&(n="duration-badge"),e===r.Interactive&&(n="interactive-badge"),e===r.Rating&&(n="rating-badge ".concat(o.u.mapRatingToClass(t.value))),e===r.ProductionYear&&(n="production-year-badge"),e===r.Resources&&(n="resources-badge"),e===r.Captions)return"p-0";if(e===r.Status)return"badge ".concat(function(e){switch(e){case d.X.Published:return"badge-success";case d.X.Archived:case d.X.Rejected:return"badge-danger";case d.X.Draft:return"draft-badge px-2 rounded-pill text-nowrap d-flex align-items-center";case d.X.Pending:case d.X.Processing:return"badge-warning"}}(t));if(e===r.Trending)return"trending-badge px-2 d-flex align-items-center";if(e===r.Count&&(n="count-badge px-1 rounded"),e===r.Restriction){var i=v.l.mapRestrictionToClass(t.restrictions);return"restriction-badge badge-pill px-2 d-flex align-items-center ".concat(i)}return"".concat("badge"," ").concat(n)}(t,n);a="".concat(a," ").concat(e.inline?"d-inline-block":"d-flex justify-content-center");var m=function(e,t){return e===r.Interactive?p("interactive"):e===r.DurationApproximate?c.T.ToDisplayDurationNewStyle(t):e===r.DurationExact?c.T.ToDisplayDuration(t):e===r.Rating?t.code:e===r.ProductionYear?t:e===r.Resources?p("resources"):e===r.Captions?i.createElement(u.x,{svgName:l.vn.CloseCaptionBadge}):e===r.Status?d.X[t]:e===r.Trending?i.createElement(i.Fragment,null,i.createElement(u.x,{svgName:l.vn.Trending}),i.createElement("span",{className:"pl-1"},t)):e===r.Count?t:e===r.Restriction?i.createElement(i.Fragment,null,i.createElement(u.x,{svgName:v.l.mapRestrictionToSvg(t.restrictions)}),i.createElement("span",null,v.l.mapRestrictionToText(t.restrictions,t.yearGroups))):void 0}(t,n),g=function(e,t){return e===r.Rating?{title:t.name,placement:"top"}:null}(t,n),f=e.inline&&"d-inline-block";return g?i.createElement("div",{className:"badge-wrapper d-inline"},i.createElement(s.u,Object.assign({},g,{spanHack:!0,spanHackClassName:f}),i.createElement("span",{className:a},m))):i.createElement("span",{className:"".concat(a," badge-wrapper")},m)}!function(e){e.DurationExact="duration-exact",e.DurationApproximate="duration-approximate",e.Interactive="interactive",e.Rating="rating",e.ProductionYear="production-year",e.Resources="resources",e.Captions="captions",e.Status="status",e.Trending="trending",e.Count="count",e.Restriction="restriction"}(r||(r={}))},44550:function(e,t,n){n.d(t,{c:function(){return a}});var r=n(1024),i=n(7121);function a(e){var t="d-flex align-items-center badge-list ".concat(i.Z.minHeight);return e.className&&(t+=" ".concat(e.className)),r.createElement("div",{className:t},e.children)}},84657:function(e,t,n){n.d(t,{t:function(){return a},v:function(){return i}});var r=n(50028),i={BASE_VIDEO_COLLECTION:"thumbnail,tags,rating,series,season,owner",VIDEO_COLLECTION:"(videoCollection)",SERIES:"tallposter,rating,banner",FOLDER:"banner,thumbnail",CLASSIFICATION_COLLECTION:"banner,cover,tallPoster",CLASSIFICATION:function(e){return"banner,cover,tallPoster,thumbnail,followers{id:".concat(e,"},pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}")},VIDEO:"series,season,rating,producers,glance,distributors,owner,subjectPresentationAudiences,resources[thumbnail,pdf],tags,productionCompanies,directors,links,thumbnail,interactives[thumbnail,_canBeConsumed,_isClickViewContent,owner[avatar]],clips[_canBeConsumed,owner[avatar],_isClickViewContent],_canUpdate,_videoProgress,_canBeConsumed,categories[libraries],libraries,_canAddToLibrary,_restrictions",PLAYLIST:"cover,banner,owner,videos[count()]{limit:0,status:[".concat(r.X.Published,",").concat(r.X.Archived,"]},clips[count()]{limit:0},interactives[count()]{limit:0},followers[count()]{limit:0}"),PLAYLIST_COLLECTION:"videos[count()]{limit:0},interactives[count()]{limit:0},clips[count()]{limit:0},cover",CLIP:"(clip)",CLIP_COLLECTION:"(clipCollection)",INTERACTIVE:"(interactive)",LIBRARY_COLLECTION:"owner[logo]",LIBRARY:"owner[logo],categorytree"},a={CLASSIFICATION:"banner,cover,tallPoster,pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}",CLASSIFICATION_COLLECTION:"banner,cover,tallPoster",VIDEO:"series,season,rating,producers,glance,distributors,subjectPresentationAudiences,resources[thumbnail,pdf],tags,productionCompanies,directors,links,thumbnail,interactives[thumbnail,_canBeConsumed,_isClickViewContent],clips[_canBeConsumed,_isClickViewContent],_canBeConsumed,categories,libraries",VIDEO_COLLECTION:"thumbnail,rating,series,season,subjectPresentationAudiences,subtitles{limit:1},_canBeConsumed"}},74421:function(e,t,n){var r;n.d(t,{E:function(){return r}}),function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience",e[e.TallPoster=60]="TallPoster",e[e.Classroom=67]="Classroom",e[e.ClassroomGroup=68]="ClassroomGroup",e[e.UserProfile=74]="UserProfile"}(r||(r={}))},90547:function(e,t,n){var r;n.d(t,{r:function(){return r}}),function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(r||(r={}))},34254:function(e,t,n){var r;n.d(t,{r:function(){return r}}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(r||(r={}))},86257:function(e,t,n){var r;n.d(t,{L:function(){return r}}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={}))},87648:function(e,t,n){var r;n.d(t,{c:function(){return r}}),function(e){e.Custom="custom",e.User="year_group"}(r||(r={}))},89603:function(e,t,n){var r,i;n.d(t,{Q:function(){return r}}),function(e){e.Normal="normal",e.Pedagogy="pedagogy",e.Hidden="hidden",e.Skill="skill",e.Curation="curation"}(r||(r={})),function(e){e[e.Normal=0]="Normal",e[e.Pedagogy=1]="Pedagogy",e[e.Hidden=2]="Hidden",e[e.Skill=3]="Skill",e[e.Curation=4]="Curation"}(i||(i={}))},90335:function(e,t,n){var r;n.d(t,{D:function(){return r}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series"}(r||(r={}))},332:function(e,t,n){n.d(t,{e:function(){return c}});var r=n(2248),i=n(68003),a=n(84657),o=n(34254),c={clip:function(e,t){return{key:"clip:".concat(e,":").concat(t),url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:a.v.CLIP,permissionFilterOption:t})}},clipWithAllInteractives:function(e,t){return{key:"clip:".concat(e,":").concat(t,":interactives"),url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"".concat(a.v.CLIP,",interactives{status:[0,1]}"),permissionFilterOption:t}),normalize:!1}},publicClip:function(e,t,n,r){return{key:"clip:".concat(e,":public:").concat(t),url:i._.urlBuilder("/api/objects/".concat(e),{query:"_parentVideo[thumbnail],_canBeConsumed",permissionFilterOption:o.r.StripMetadata,shareId:t}),bootstrapName:"shared:object:".concat(e),success:n,error:r}},sharedClip:function(e,t,n,r){return{key:"shared:clip:".concat(e),url:i._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:a.v.CLIP}),success:n,error:r}},createClip:function(e,t,n,i,a){return{key:"create:clip",url:"{gateway}/v1/objects/".concat(e,"/clips"),data:t,type:r.k.POST,invalidationKeys:["videos:".concat(e),"my:videos"],success:n,error:i,always:a}},updateClip:function(e,t,n,i,a){return{key:"update:clip",url:"{gateway}/v1/objects/".concat(e),data:t,type:r.k.PUT,success:n,error:i,always:a}},deleteClip:function(e,t,n,i,a){return{key:"delete:clip",url:"{gateway}/v1/objects/".concat(e),type:r.k.DELETE,invalidationKeys:["videos:".concat(t),"my:videos"],success:n,error:i,always:a}}}},91432:function(e,t,n){n.d(t,{b:function(){return c}});var r=n(2248),i=n(68003),a=n(84657),o=n(34254),c={interactiveMetadata:function(e,t){return{url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:a.v.INTERACTIVE,permissionFilterOption:t}),key:"interactive:metadata:".concat(e,":").concat(t)}},sharedInteractiveMetadata:function(e,t,n,r){return{url:i._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:a.v.INTERACTIVE}),key:"shared:interactive:metadata:".concat(e),success:n,error:r}},publicInteractiveMetadata:function(e,t,n,r){return{url:i._.urlBuilder("/api/objects/".concat(e),{query:"_parentVideo[thumbnail,rating],_parentClip,_canBeConsumed",permissionFilterOption:o.r.StripMetadata,shareId:t}),key:"interactive:metadata:".concat(e,":public:").concat(t),bootstrapName:"shared:object:".concat(e),success:n,error:r}},interactive:function(e){return{url:"/api/domain/v1/interactives/".concat(e),key:"interactive:".concat(e)}},createInteractive:function(e,t,n){return{url:"/api/domain/v1/interactives",key:"create:interactive",type:r.k.POST,invalidationKeys:["my:videos"],data:e,success:t,error:n}},createInteractiveMetadata:function(e,t,n,i){return{url:"{gateway}/v1/objects/".concat(e,"/interactives"),key:"create:interactive:metadata",type:r.k.POST,data:t,success:n,error:i}},updateInteractive:function(e,t,n,i){return{url:"/api/domain/v1/interactives/".concat(e),key:"update:interactive",type:r.k.PUT,data:t,success:n,error:i,formatData:function(){return t}}},updateInteractiveMetadata:function(e,t,n,i){return{url:"{gateway}/v1/objects/".concat(e),key:"update:interactive:metadata",type:r.k.PUT,data:t,success:n,error:i}},interactiveResultSet:function(e,t){return{url:"/api/domain/v1/analytics/interactives/".concat(e,"/metadata/").concat(t),key:"interactive:result:set:".concat(e,":").concat(t)}},copyInteractive:function(e,t,n){return{url:"/api/domain/v1/interactives/".concat(e,"/copy"),key:"copy:interactive",type:r.k.POST,invalidationKeys:["interactive:".concat(e),"my:videos"],success:t,error:n}},deleteInteractiveMetadata:function(e,t,n){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:interactive",type:r.k.DELETE,invalidationKeys:["interactive:".concat(e),"my:videos"],success:t,error:n}}}},77131:function(e,t,n){n.d(t,{R:function(){return g}});var r,i=n(2248),a=n(68003),o=n(74421),c=n(84657);!function(e){e.Series="series",e.Playlist="playlist",e.Widget="widget"}(r||(r={}));var s=n(50028),u=n(34254),l=n(15970),d=function(e,t){return a._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:c.v.VIDEO})},v=function(e,t){return a._.urlBuilder("/api/objects/".concat(e),{query:"thumbnail,_canBeConsumed,series,season,rating",permissionFilterOption:u.r.StripMetadata,shareId:t})},p=function(e){return a._.urlBuilder("{gateway}/v1/objects",{"query.video":c.v.VIDEO_COLLECTION,"query.clip":c.v.CLIP_COLLECTION,"query.interactive":c.v.INTERACTIVE,id:e})},m=function(e){var t=e.videoId,n=e.context,i=e.collectionId,o=e.moviesAndTv,s={videoId:t,limit:25,query:c.v.VIDEO_COLLECTION};return n&&(n===r.Widget?s["context.widgetId"]=i:(s["context.collectionType"]=n,s["context.collectionId"]=i)),o&&(s["context.moviesAndTv"]=!0),a._.urlBuilder("{gateway}/v1/suggestions/related-videos",s)},g={video:function(e,t){return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:c.v.VIDEO,permissionFilterOption:t}),publicUrl:a._.urlBuilder("/api/objects/".concat(e),{query:c.t.VIDEO,permissionFilterOption:t}),key:"videos:".concat(e,":").concat(t),formatData:function(e){var t,n;return(null===(t=e.interactives)||void 0===t?void 0:t.data)&&(e.interactives.data=e.interactives.data.map((function(t){return Object.assign(Object.assign({},t),{_parentVideo:{id:e.id}})}))),(null===(n=e.clips)||void 0===n?void 0:n.data)&&(e.clips.data=e.clips.data.map((function(t){return Object.assign(Object.assign({},t),{_parentVideo:{id:e.id}})}))),e}}},publicVideo:function(e,t,n,r){return{url:v(e,t),key:"videos:".concat(e,":public:").concat(t),bootstrapName:"shared:object:".concat(e),success:n,error:r}},sharedVideo:function(e,t,n,r){return{url:d(e,t),key:"shared:video:".concat(e),formatData:function(e){var t,n;return(null===(t=e.interactives)||void 0===t?void 0:t.data)&&(e.interactives.data=e.interactives.data.map((function(t){return Object.assign(Object.assign({},t),{_parentVideo:{id:e.id}})}))),(null===(n=e.clips)||void 0===n?void 0:n.data)&&(e.clips.data=e.clips.data.map((function(t){return Object.assign(Object.assign({},t),{_parentVideo:{id:e.id}})}))),e},success:n,error:r}},myVideos:function(e,t){var n=c.v.VIDEO_COLLECTION,r=c.v.CLIP_COLLECTION,i=c.v.INTERACTIVE,l="videos[".concat(n,"]{libraries.typeid:").concat(o.E.WorkspaceCollection,"}"),d="clips[".concat(r,"]"),v="interactives[".concat(i,"]{status:[").concat(s.X.Published,",").concat(s.X.Draft,"]}"),p={query:"(".concat(l,"|").concat(d,"|").concat(v,"){orderbydesc:id}"),permissionFilterOption:u.r.StripMetadata};return t&&(p.cursor=t),{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),p),key:"my:videos:".concat(t)}},videos:function(e,t){return{url:p(e),key:"videos:by:id:".concat(e.join(",")),success:t}},watchHistoryVideos:function(e,t){return{url:p(e),key:"watch:history:videos:by:id:".concat(e.join(",")),success:t}},updateVideo:function(e,t,n,r,a){return{key:"update:video:".concat(e),url:"{gateway}/v1/objects/".concat(e),type:i.k.PUT,data:t,success:n,error:r,always:a}},videoRatings:function(e,t){var n=e.map((function(e){return"id=".concat(e)}));if(n.length)return{url:"/api/domain/v2/objects?query=rating&".concat(n.join("&")),key:"video:ratings:by:id:".concat(e.join(",")),normalizeOptions:{namespace:t}}},getRestrictions:function(e){var t=e.slice().sort();return{url:"/api/domain/v1/restrictedobjects"+"?objectTypeId=".concat(o.E.Video).concat(t.map((function(e){return"&objectId=".concat(e)})).join("")),key:"restrictions:".concat(t.join(",")),normalizeOptions:{namespace:"domain",idAttribute:"objectId"}}},delete:function(e,t,n){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:video",type:i.k.DELETE,success:t,error:n,invalidationKeys:["videos"]}},relatedVideos:function(e){var t=e.videoId,n=e.context,r=e.collectionId,i=e.moviesAndTv;return{url:m(e),key:"related:videos:".concat(t,":").concat(n,":").concat(r,":").concat(i)}},collectionVideos:function(e,t,n,r,i,o){var s=l.d.getVideoSortParam(t),d=(s?"{".concat(s,"}"):"")+c.v.VIDEO_COLLECTION;return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/videos"),{cursor:n,query:d,permissionFilterOption:u.r.StripMetadata}),key:["folder","videos",e,n,t].filter((function(e){return!!e})).join(":"),success:r,error:i,always:o}},pointsOfInterest:function(e,t,n,r,i){var o={query:"{limit:100}",cursor:t};return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/pointsofinterest"),o),publicUrl:a._.urlBuilder("/api/objects/".concat(e,"/pointsofinterest"),o),key:"pointsofinterest:".concat(e).concat(t?":".concat(t):""),success:n,error:r,always:i}}}},2491:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(54096),i=n(21186),a=n(92159);function o(){var e=(0,r.G)(a.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:i.NK.Warning,heading:i.R6.Warning,message:t})}}}},45428:function(e,t,n){n.d(t,{l:function(){return b}});var r,i,a,o,c=n(56285),s=n(57857),u=n(63791),l=n(87648),d=n(7121);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function p(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===v(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=s.T.encloseNamespace("shared.shared-utils"),g=(p(r={},l.c.Custom,d.Z.restrictionBadgeCustom),p(r,l.c.User,d.Z.restrictionBadgeUser),r),f=(p(i={},l.c.Custom,u.vn.Timer),p(i,l.c.User,u.vn.Lock),i),y=(p(a={},l.c.Custom,"restrictionCustom"),p(a,l.c.User,"restrictionYearGroup"),a),C=(p(o={},l.c.Custom,200),p(o,l.c.User,100),o),b={mapRestrictionToClass:function(e){var t;if(!(null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.length))return"";var n=b.getWeightedRestriction(e.value);return g[n.type]},mapRestrictionToSvg:function(e){var t;if(!(null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.length))return u.vn.Lock;var n=b.getWeightedRestriction(e.value);return f[n.type]},mapRestrictionToText:function(e,t){var n;if(!(null===(n=null==e?void 0:e.value)||void 0===n?void 0:n.length)||!(null==t?void 0:t.length))return"";var r=b.getWeightedRestriction(e.value),i=t.find((function(e){return e.value===r.yearGroup})),a=y[r.type];if(r.type===l.c.User)return i?m(a,{yearGroup:i.name}):m("restrictionStaff");if(r.type===l.c.Custom){var o=b.getRestrictionDuration(r);return o?m(a,{duration:o,smartCount:o}):m("restrictionCustomLessThanDay",{duration:o,smartCount:1})}return""},getWeightedRestriction:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"highest";if(e.length)return 1===e.length?e[0]:e.reduce((function(e,n){var r=C[e.type],i=C[n.type];return"highest"===t&&r>i||"lowest"===t&&r<i?e:n}))},getRestrictionByType:function(e,t){if(!b.hasRestrictions(e))return null;var n=Array.isArray(t)?t:[t],r=e._restrictions.value.filter((function(e){return n.includes(e.type)}));return b.getWeightedRestriction(r)},getRestrictionDuration:function(e){if(e.type===l.c.Custom&&e.expiresOn){var t=c.O.convertUTCToLocal(e.expiresOn);if(t)return c.O.diffBetween(t,new Date,"day")}},hasCustomRestriction:function(e){return!!b.getRestrictionByType(e,[l.c.Custom])},hasRestrictions:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e._restrictions)||void 0===t?void 0:t.value)||void 0===n?void 0:n.length)}}},21974:function(e,t,n){n.d(t,{u:function(){return l}});var r=n(57857),i=n(63791),a=n(75459),o=n(86257);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===c(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u="shared.shared-utils",l={mapRatingToClass:function(e){return e?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,t){switch(e.type){case a.r.HostedLibrary:case a.r.CustomLibrary:return e.name;case a.r.Exchange:return r.T.getPhrase(u,"exchange");case a.r.Workspace:return r.T.getPhrase(u,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case a.r.HostedLibrary:case a.r.CustomLibrary:return"bg-info";case a.r.Exchange:return"bg-green";case a.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t,n=(s(t={},o.L.Pdf,i.vn.FilePDF),s(t,o.L.Image,i.vn.FileImg),s(t,o.L.PowerPoint,i.vn.FilePowerpoint),s(t,o.L.Document,i.vn.FileWord),s(t,o.L.Excel,i.vn.FileExcel),s(t,o.L.Zip,i.vn.FileZip),s(t,o.L.File,i.vn.File),t)[e];return n||(n=i.vn.Folder),n},mapTypeToClass:function(e){switch(e){case o.L.Pdf:return"icon-red";case o.L.Image:return"icon-purple";case o.L.Document:return"icon-blue";case o.L.Excel:return"icon-green";case o.L.PowerPoint:return"icon-orange";case o.L.Zip:return"icon-teal";case o.L.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case o.L.Pdf:return r.T.getPhrase(u,"pdf");case o.L.Image:return r.T.getPhrase(u,"image");case o.L.Document:return r.T.getPhrase(u,"document");case o.L.Excel:return r.T.getPhrase(u,"spreadsheet");case o.L.PowerPoint:return r.T.getPhrase(u,"presentation");case o.L.Zip:return r.T.getPhrase(u,"zipArchive");case o.L.File:return r.T.getPhrase(u,"file");default:return""}}}},18830:function(e,t,n){n.d(t,{M:function(){return f}});var r=n(31647),i=n(57857),a=n(11306),o=n(74421),c=n(50028),s=n(89603),u=n(77131),l=n(332),d=n(91432),v=n(70065),p=n(45428),m=n(87648),g=i.T.encloseNamespace("shared.shared-utils"),f={isVideo:function(e){return(null==e?void 0:e.typeId)===o.E.Video},isClip:function(e){return(null==e?void 0:e.typeId)===o.E.Clip},isInteractive:function(e){return(null==e?void 0:e.typeId)===o.E.Interactive},isVideoType:function(e){return f.isVideo(e)||f.isInteractive(e)||f.isClip(e)},hasSeries:function(e){var t;return!!(null===(t=null==e?void 0:e.series)||void 0===t?void 0:t.id)},getVideoProgress:function(e){var t,n;return(null==e?void 0:e.lastProgressPoint)?null==e?void 0:e.lastProgressPoint:(null===(t=null==e?void 0:e._videoProgress)||void 0===t?void 0:t.progress)?null===(n=null==e?void 0:e._videoProgress)||void 0===n?void 0:n.progress:0},getThumbnail:function(e){var t;return f.isVideo(e)?e.thumbnail:f.isClip(e)||f.isInteractive(e)?null===(t=e._parentVideo)||void 0===t?void 0:t.thumbnail:void 0},getDuration:function(e){var t,n;if(f.isVideo(e))return e.duration;if(f.isInteractive(e)){if(null===(t=e._parentClip)||void 0===t?void 0:t.id)return 1e3*(e._parentClip.endTime-e._parentClip.startTime);if(null===(n=e._parentVideo)||void 0===n?void 0:n.duration)return e._parentVideo.duration}return f.isClip(e)?1e3*(e.endTime-e.startTime):void 0},getAnalyticsEntity:function(e){return f.isVideo(e)?v.EntityType.Video:f.isInteractive(e)?v.EntityType.Interactive:f.isClip(e)?v.EntityType.Clip:void 0},getCanBeConsumed:function(e){var t,n;return e&&f.isVideoType(e)?e._canBeConsumed?{canNavigate:"login-required"===(null===(t=e._canBeConsumed)||void 0===t?void 0:t.reason)&&f.isVideo(e)||!0===e._canBeConsumed.value,canConsume:e._canBeConsumed.value,reason:null===(n=e._canBeConsumed)||void 0===n?void 0:n.reason}:{canNavigate:!0,canConsume:!0}:{canNavigate:!1,canConsume:!1}},getPrivacyReasoning:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=f.getCanBeConsumed(e),i=r.canConsume,a=r.canNavigate,o=r.reason,s=function(){return f.isClip(e)?g("clipLoginRequired"):f.isInteractive(e)?g("interactiveLoginRequired"):g("videoLoginRequired")};if(!i&&!a){if(n)return s();switch(o){case"rating-not-allowed":return g("ratingNotAllowed");case"video-deleted":return f.isClip(e)?g("clipParentDeleted"):f.isInteractive(e)?g("interactiveParentDeleted"):g("videoDeleted");case"clickview-private":return g("clickViewPrivate");case"private":default:return g("genericCannotAccess");case"login-required":return s();case"restricted-access":var u=p.l.getWeightedRestriction(null===(t=e._restrictions)||void 0===t?void 0:t.value);return(null==u?void 0:u.type)===m.c.Custom?g("awaitingApproval"):g("restrictedAccess")}}return f.isInteractive(e)&&e.status===c.X.Draft?g("draftInteractive"):""},getTitle:function(e){if(e.name)return e.name;var t=f.getCanBeConsumed(e),n=t.canConsume,r=t.reason;return g(n||"private"!==r?n||"video-deleted"!==r?"privateVideo":"videoUnavailable":"privateVideo")},getParentVideo:function(e){return f.isVideo(e)?e:f.isClip(e)||f.isInteractive(e)?e._parentVideo:void 0},showWhyThisVideo:function(e){var t,n,r,i;return!(!f.isVideo(e)||!(null===(n=null===(t=e.tags)||void 0===t?void 0:t.data)||void 0===n?void 0:n.some((function(e){return e.tagType===s.Q.Pedagogy||e.tagType===s.Q.Skill})))&&!(null===(i=null===(r=e._curriculumLinks)||void 0===r?void 0:r.value)||void 0===i?void 0:i.length))},showWhatsIncluded:function(e){var t,n,r,i,a,o;if(!f.isVideo(e))return!1;var c=!!(null===(n=null===(t=e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length),s=!!(null===(i=null===(r=e.resources)||void 0===r?void 0:r.data)||void 0===i?void 0:i.length),u=!!(null===(o=null===(a=e.subtitles)||void 0===a?void 0:a.data)||void 0===o?void 0:o.length);return c||s||u},getRating:function(e){var t;return f.isVideo(e)?e.rating:null===(t=null==e?void 0:e._parentVideo)||void 0===t?void 0:t.rating},getVideoRequest:function(e,t,n){if(n){switch(t){case o.E.Video:return u.R.sharedVideo(e,n);case o.E.Clip:return l.e.sharedClip(e,n);case o.E.Interactive:return d.b.sharedInteractiveMetadata(e,n)}r.Q.ErrorHelper.throw(new a.H("Unsupported master type"))}switch(t){case o.E.Video:return u.R.video(e);case o.E.Clip:return l.e.clip(e);case o.E.Interactive:return d.b.interactiveMetadata(e)}r.Q.ErrorHelper.throw(new a.H("Unsupported master type"))}}},15970:function(e,t,n){n.d(t,{d:function(){return o}});var r=n(4705),i=n(90335),a=i.D.RecentlyAdded,o={getValidSortTypeFromParam:function(e){return Object.values(i.D).includes(e)?e:i.D.Newest},getOrSetSortType:function(e,t,n){var i=function(e){return"video:sort:".concat(e)}(e);return!t&&r.SG.cacheExists(i)||r.SG.cacheSet(i,t||n||a),t||(t=r.SG.cacheGet(i)),t},getVideoSortParam:function(e){switch(e){case i.D.AtoZ:return"orderby:name";case i.D.ZtoA:return"orderbydesc:name";case i.D.Newest:return"orderbydesc:datecreated";case i.D.Oldest:return"orderby:datecreated";case i.D.RecentlyAdded:return"orderbydesc:timestamp";case i.D.Series:return"orderby:seriessort";default:return}}}},7121:function(e,t){t.Z={minHeight:"jEh7m",restrictionBadgeCustom:"WQ2eS",restrictionBadgeUser:"z4DeQ"}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4784],{54096:function(e,t,n){n.d(t,{G:function(){return a}});var r=n(1024),i=n(21679);function a(e){var t,n;return t=e,n=i.u.getInstance(t),r.useEffect((function(){return function(){i.u.releaseInstance(t)}})),n}},38182:function(e,t,n){n.d(t,{q:function(){return u}});var r=n(1024),i=n.n(r),a=n(68003),o=n(87013),c=n(88483),s={avatar:"Gvwzj",dot:"JJHBJ"};function u(e){var t,n,r=e.imageUrl||(t=e.imageCdnUrl,(n=e.initials)?o.j.createUrl(a._.safeUrlConcat(t,"/v1/profile-images?initials=".concat(n)),{size:c.h2.Small}):"");return i().createElement("div",{className:"position-relative h-100 w-100"},i().createElement("div",{className:"".concat(s.avatar," ").concat((null==e?void 0:e.extraClasses)||""),style:{backgroundImage:"url('".concat(r,"')")}}," "),e.showDot&&i().createElement("div",{className:"".concat(s.dot," rounded-circle bg-danger")}))}},45458:function(e,t,n){n.d(t,{C:function(){return m},g:function(){return r}});var r,i=n(1024),a=n(57857),o=n(21974),c=n(27866),s=n(63946),u=n(39396),l=n(63791),d=n(50028),v=n(45428),p=a.T.encloseNamespace("shared.badges");function m(e){var t=e.type,n=e.data;if(!function(e,t){var n,i,a;return"boolean"==typeof t?!!t:e===r.Rating?t&&!!t.value:e===r.Resources?!!(null==t?void 0:t.length)||!!(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.length):e===r.Interactive?!!(null==t?void 0:t.length)||!!(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.length):e===r.Captions?!!(null==t?void 0:t.length)||!!(null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.length):e===r.Status?"number"==typeof t:!!t}(t,n))return i.createElement(i.Fragment,null);var a=function(e,t){var n="";if(e===r.DurationApproximate&&(n="duration-badge-new px-2 rounded-pill text-nowrap d-flex align-items-center"),e===r.DurationExact&&(n="duration-badge"),e===r.Interactive&&(n="interactive-badge"),e===r.Rating&&(n="rating-badge ".concat(o.u.mapRatingToClass(t.value))),e===r.ProductionYear&&(n="production-year-badge"),e===r.Resources&&(n="resources-badge"),e===r.Captions)return"p-0";if(e===r.Status)return"badge ".concat(function(e){switch(e){case d.X.Published:return"badge-success";case d.X.Archived:case d.X.Rejected:return"badge-danger";case d.X.Draft:return"draft-badge px-2 rounded-pill text-nowrap d-flex align-items-center";case d.X.Pending:case d.X.Processing:return"badge-warning"}}(t));if(e===r.Trending)return"trending-badge px-2 d-flex align-items-center";if(e===r.Count&&(n="count-badge px-1 rounded"),e===r.Restriction){var i=v.l.mapRestrictionToClass(t.restrictions);return"restriction-badge badge-pill px-2 d-flex align-items-center ".concat(i)}return"".concat("badge"," ").concat(n)}(t,n);a="".concat(a," ").concat(e.inline?"d-inline-block":"d-flex justify-content-center");var m=function(e,t){return e===r.Interactive?p("interactive"):e===r.DurationApproximate?c.T.ToDisplayDurationNewStyle(t):e===r.DurationExact?c.T.ToDisplayDuration(t):e===r.Rating?t.code:e===r.ProductionYear?t:e===r.Resources?p("resources"):e===r.Captions?i.createElement(u.x,{svgName:l.vn.CloseCaptionBadge}):e===r.Status?d.X[t]:e===r.Trending?i.createElement(i.Fragment,null,i.createElement(u.x,{svgName:l.vn.Trending}),i.createElement("span",{className:"pl-1"},t)):e===r.Count?t:e===r.Restriction?i.createElement(i.Fragment,null,i.createElement(u.x,{svgName:v.l.mapRestrictionToSvg(t.restrictions)}),i.createElement("span",null,v.l.mapRestrictionToText(t.restrictions,t.yearGroups))):void 0}(t,n),g=function(e,t){return e===r.Rating?{title:t.name,placement:"top"}:null}(t,n),f=e.inline&&"d-inline-block";return g?i.createElement("div",{className:"badge-wrapper d-inline"},i.createElement(s.u,Object.assign({},g,{spanHack:!0,spanHackClassName:f}),i.createElement("span",{className:a},m))):i.createElement("span",{className:"".concat(a," badge-wrapper")},m)}!function(e){e.DurationExact="duration-exact",e.DurationApproximate="duration-approximate",e.Interactive="interactive",e.Rating="rating",e.ProductionYear="production-year",e.Resources="resources",e.Captions="captions",e.Status="status",e.Trending="trending",e.Count="count",e.Restriction="restriction"}(r||(r={}))},44550:function(e,t,n){n.d(t,{c:function(){return a}});var r=n(1024),i=n(7121);function a(e){var t="d-flex align-items-center badge-list ".concat(i.Z.minHeight);return e.className&&(t+=" ".concat(e.className)),r.createElement("div",{className:t},e.children)}},84657:function(e,t,n){n.d(t,{t:function(){return a},v:function(){return i}});var r=n(50028),i={BASE_VIDEO_COLLECTION:"thumbnail,tags,rating,series,season,owner",VIDEO_COLLECTION:"(videoCollection)",SERIES:"tallposter,rating,banner",FOLDER:"banner,thumbnail",CLASSIFICATION_COLLECTION:"banner,cover,tallPoster",CLASSIFICATION:function(e){return"banner,cover,tallPoster,thumbnail,followers{id:".concat(e,"},pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}")},VIDEO:"series,season,rating,producers,glance,distributors,owner,subjectPresentationAudiences,resources[thumbnail,pdf],tags,productionCompanies,directors,links,thumbnail,interactives[thumbnail,_canBeConsumed,_isClickViewContent,owner[avatar]],clips[_canBeConsumed,owner[avatar],_isClickViewContent],_canUpdate,_videoProgress,_canBeConsumed,categories[libraries],libraries,_canAddToLibrary,_restrictions",PLAYLIST:"cover,banner,owner,videos[count()]{limit:0,status:[".concat(r.X.Published,",").concat(r.X.Archived,"]},clips[count()]{limit:0},interactives[count()]{limit:0},followers[count()]{limit:0}"),PLAYLIST_COLLECTION:"videos[count()]{limit:0},interactives[count()]{limit:0},clips[count()]{limit:0},cover",CLIP:"(clip)",CLIP_COLLECTION:"(clipCollection)",INTERACTIVE:"(interactive)",LIBRARY_COLLECTION:"owner[logo]",LIBRARY:"owner[logo],categorytree"},a={CLASSIFICATION:"banner,cover,tallPoster,pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}",CLASSIFICATION_COLLECTION:"banner,cover,tallPoster",VIDEO:"series,season,rating,producers,glance,distributors,subjectPresentationAudiences,resources[thumbnail,pdf],tags,productionCompanies,directors,links,thumbnail,interactives[thumbnail,_canBeConsumed,_isClickViewContent],clips[_canBeConsumed,_isClickViewContent],_canBeConsumed,categories,libraries",VIDEO_COLLECTION:"thumbnail,rating,series,season,subjectPresentationAudiences,subtitles{limit:1},_canBeConsumed"}},74421:function(e,t,n){var r;n.d(t,{E:function(){return r}}),function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience",e[e.TallPoster=60]="TallPoster",e[e.Classroom=67]="Classroom",e[e.ClassroomGroup=68]="ClassroomGroup",e[e.UserProfile=74]="UserProfile"}(r||(r={}))},90547:function(e,t,n){var r;n.d(t,{r:function(){return r}}),function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(r||(r={}))},34254:function(e,t,n){var r;n.d(t,{r:function(){return r}}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(r||(r={}))},86257:function(e,t,n){var r;n.d(t,{L:function(){return r}}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={}))},87648:function(e,t,n){var r;n.d(t,{c:function(){return r}}),function(e){e.Custom="custom",e.User="year_group"}(r||(r={}))},89603:function(e,t,n){var r,i;n.d(t,{Q:function(){return r}}),function(e){e.Normal="normal",e.Pedagogy="pedagogy",e.Hidden="hidden",e.Skill="skill",e.Curation="curation"}(r||(r={})),function(e){e[e.Normal=0]="Normal",e[e.Pedagogy=1]="Pedagogy",e[e.Hidden=2]="Hidden",e[e.Skill=3]="Skill",e[e.Curation=4]="Curation"}(i||(i={}))},90335:function(e,t,n){var r;n.d(t,{D:function(){return r}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series"}(r||(r={}))},332:function(e,t,n){n.d(t,{e:function(){return c}});var r=n(2248),i=n(68003),a=n(84657),o=n(34254),c={clip:function(e,t){return{key:"clip:".concat(e,":").concat(t),url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:a.v.CLIP,permissionFilterOption:t})}},clipWithAllInteractives:function(e,t){return{key:"clip:".concat(e,":").concat(t,":interactives"),url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"".concat(a.v.CLIP,",interactives{status:[0,1]}"),permissionFilterOption:t}),normalize:!1}},publicClip:function(e,t,n,r){return{key:"clip:".concat(e,":public:").concat(t),url:i._.urlBuilder("/api/objects/".concat(e),{query:"_parentVideo[thumbnail],_canBeConsumed",permissionFilterOption:o.r.StripMetadata,shareId:t}),bootstrapName:"shared:object:".concat(e),success:n,error:r}},sharedClip:function(e,t,n,r){return{key:"shared:clip:".concat(e),url:i._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:a.v.CLIP}),success:n,error:r}},createClip:function(e,t,n,i,a){return{key:"create:clip",url:"{gateway}/v1/objects/".concat(e,"/clips"),data:t,type:r.k.POST,invalidationKeys:["videos:".concat(e),"my:videos"],success:n,error:i,always:a}},updateClip:function(e,t,n,i,a){return{key:"update:clip",url:"{gateway}/v1/objects/".concat(e),data:t,type:r.k.PUT,success:n,error:i,always:a}},deleteClip:function(e,t,n,i,a){return{key:"delete:clip",url:"{gateway}/v1/objects/".concat(e),type:r.k.DELETE,invalidationKeys:["videos:".concat(t),"my:videos"],success:n,error:i,always:a}}}},91432:function(e,t,n){n.d(t,{b:function(){return c}});var r=n(2248),i=n(68003),a=n(84657),o=n(34254),c={interactiveMetadata:function(e,t){return{url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:a.v.INTERACTIVE,permissionFilterOption:t}),key:"interactive:metadata:".concat(e,":").concat(t)}},sharedInteractiveMetadata:function(e,t,n,r){return{url:i._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:a.v.INTERACTIVE}),key:"shared:interactive:metadata:".concat(e),success:n,error:r}},publicInteractiveMetadata:function(e,t,n,r){return{url:i._.urlBuilder("/api/objects/".concat(e),{query:"_parentVideo[thumbnail,rating],_parentClip,_canBeConsumed",permissionFilterOption:o.r.StripMetadata,shareId:t}),key:"interactive:metadata:".concat(e,":public:").concat(t),bootstrapName:"shared:object:".concat(e),success:n,error:r}},interactive:function(e){return{url:"/api/domain/v1/interactives/".concat(e),key:"interactive:".concat(e)}},createInteractive:function(e,t,n){return{url:"/api/domain/v1/interactives",key:"create:interactive",type:r.k.POST,invalidationKeys:["my:videos"],data:e,success:t,error:n}},createInteractiveMetadata:function(e,t,n,i){return{url:"{gateway}/v1/objects/".concat(e,"/interactives"),key:"create:interactive:metadata",type:r.k.POST,data:t,success:n,error:i}},updateInteractive:function(e,t,n,i){return{url:"/api/domain/v1/interactives/".concat(e),key:"update:interactive",type:r.k.PUT,data:t,success:n,error:i,formatData:function(){return t}}},updateInteractiveMetadata:function(e,t,n,i){return{url:"{gateway}/v1/objects/".concat(e),key:"update:interactive:metadata",type:r.k.PUT,data:t,success:n,error:i}},interactiveResultSet:function(e,t){return{url:"/api/domain/v1/analytics/interactives/".concat(e,"/metadata/").concat(t),key:"interactive:result:set:".concat(e,":").concat(t)}},copyInteractive:function(e,t,n){return{url:"/api/domain/v1/interactives/".concat(e,"/copy"),key:"copy:interactive",type:r.k.POST,invalidationKeys:["interactive:".concat(e),"my:videos"],success:t,error:n}},deleteInteractiveMetadata:function(e,t,n){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:interactive",type:r.k.DELETE,invalidationKeys:["interactive:".concat(e),"my:videos"],success:t,error:n}}}},77131:function(e,t,n){n.d(t,{R:function(){return g}});var r,i=n(2248),a=n(68003),o=n(74421),c=n(84657);!function(e){e.Series="series",e.Playlist="playlist",e.Widget="widget"}(r||(r={}));var s=n(50028),u=n(34254),l=n(15970),d=function(e,t){return a._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:c.v.VIDEO})},v=function(e,t){return a._.urlBuilder("/api/objects/".concat(e),{query:"thumbnail,_canBeConsumed,series,season,rating",permissionFilterOption:u.r.StripMetadata,shareId:t})},p=function(e){return a._.urlBuilder("{gateway}/v1/objects",{"query.video":c.v.VIDEO_COLLECTION,"query.clip":c.v.CLIP_COLLECTION,"query.interactive":c.v.INTERACTIVE,id:e})},m=function(e){var t=e.videoId,n=e.context,i=e.collectionId,o=e.moviesAndTv,s={videoId:t,limit:25,query:c.v.VIDEO_COLLECTION};return n&&(n===r.Widget?s["context.widgetId"]=i:(s["context.collectionType"]=n,s["context.collectionId"]=i)),o&&(s["context.moviesAndTv"]=!0),a._.urlBuilder("{gateway}/v1/suggestions/related-videos",s)},g={video:function(e,t){return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:c.v.VIDEO,permissionFilterOption:t}),publicUrl:a._.urlBuilder("/api/objects/".concat(e),{query:c.t.VIDEO,permissionFilterOption:t}),key:"videos:".concat(e,":").concat(t),formatData:function(e){var t,n;return(null===(t=e.interactives)||void 0===t?void 0:t.data)&&(e.interactives.data=e.interactives.data.map((function(t){return Object.assign(Object.assign({},t),{_parentVideo:{id:e.id}})}))),(null===(n=e.clips)||void 0===n?void 0:n.data)&&(e.clips.data=e.clips.data.map((function(t){return Object.assign(Object.assign({},t),{_parentVideo:{id:e.id}})}))),e}}},publicVideo:function(e,t,n,r){return{url:v(e,t),key:"videos:".concat(e,":public:").concat(t),bootstrapName:"shared:object:".concat(e),success:n,error:r}},sharedVideo:function(e,t,n,r){return{url:d(e,t),key:"shared:video:".concat(e),formatData:function(e){var t,n;return(null===(t=e.interactives)||void 0===t?void 0:t.data)&&(e.interactives.data=e.interactives.data.map((function(t){return Object.assign(Object.assign({},t),{_parentVideo:{id:e.id}})}))),(null===(n=e.clips)||void 0===n?void 0:n.data)&&(e.clips.data=e.clips.data.map((function(t){return Object.assign(Object.assign({},t),{_parentVideo:{id:e.id}})}))),e},success:n,error:r}},myVideos:function(e,t){var n=c.v.VIDEO_COLLECTION,r=c.v.CLIP_COLLECTION,i=c.v.INTERACTIVE,l="videos[".concat(n,"]{libraries.typeid:").concat(o.E.WorkspaceCollection,"}"),d="clips[".concat(r,"]"),v="interactives[".concat(i,"]{status:[").concat(s.X.Published,",").concat(s.X.Draft,"]}"),p={query:"(".concat(l,"|").concat(d,"|").concat(v,"){orderbydesc:id}"),permissionFilterOption:u.r.StripMetadata};return t&&(p.cursor=t),{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),p),key:"my:videos:".concat(t)}},videos:function(e,t){return{url:p(e),key:"videos:by:id:".concat(e.join(",")),success:t}},watchHistoryVideos:function(e,t){return{url:p(e),key:"watch:history:videos:by:id:".concat(e.join(",")),success:t}},updateVideo:function(e,t,n,r,a){return{key:"update:video:".concat(e),url:"{gateway}/v1/objects/".concat(e),type:i.k.PUT,data:t,success:n,error:r,always:a}},videoRatings:function(e,t){var n=e.map((function(e){return"id=".concat(e)}));if(n.length)return{url:"/api/domain/v2/objects?query=rating&".concat(n.join("&")),key:"video:ratings:by:id:".concat(e.join(",")),normalizeOptions:{namespace:t}}},getRestrictions:function(e){var t=e.slice().sort();return{url:"/api/domain/v1/restrictedobjects"+"?objectTypeId=".concat(o.E.Video).concat(t.map((function(e){return"&objectId=".concat(e)})).join("")),key:"restrictions:".concat(t.join(",")),normalizeOptions:{namespace:"domain",idAttribute:"objectId"}}},delete:function(e,t,n){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:video",type:i.k.DELETE,success:t,error:n,invalidationKeys:["videos"]}},relatedVideos:function(e){var t=e.videoId,n=e.context,r=e.collectionId,i=e.moviesAndTv;return{url:m(e),key:"related:videos:".concat(t,":").concat(n,":").concat(r,":").concat(i)}},collectionVideos:function(e,t,n,r,i,o){var s=l.d.getVideoSortParam(t),d=(s?"{".concat(s,"}"):"")+c.v.VIDEO_COLLECTION;return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/videos"),{cursor:n,query:d,permissionFilterOption:u.r.StripMetadata}),key:["folder","videos",e,n,t].filter((function(e){return!!e})).join(":"),success:r,error:i,always:o}},pointsOfInterest:function(e,t,n,r,i){var o={query:"{limit:100}",cursor:t};return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/pointsofinterest"),o),publicUrl:a._.urlBuilder("/api/objects/".concat(e,"/pointsofinterest"),o),key:"pointsofinterest:".concat(e).concat(t?":".concat(t):""),success:n,error:r,always:i}}}},2491:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(54096),i=n(21186),a=n(92159);function o(){var e=(0,r.G)(a.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:i.NK.Warning,heading:i.R6.Warning,message:t})}}}},45428:function(e,t,n){n.d(t,{l:function(){return b}});var r,i,a,o,c=n(56285),s=n(57857),u=n(63791),l=n(87648),d=n(7121);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function p(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===v(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=s.T.encloseNamespace("shared.shared-utils"),g=(p(r={},l.c.Custom,d.Z.restrictionBadgeCustom),p(r,l.c.User,d.Z.restrictionBadgeUser),r),f=(p(i={},l.c.Custom,u.vn.Timer),p(i,l.c.User,u.vn.Lock),i),y=(p(a={},l.c.Custom,"restrictionCustom"),p(a,l.c.User,"restrictionYearGroup"),a),C=(p(o={},l.c.Custom,200),p(o,l.c.User,100),o),b={mapRestrictionToClass:function(e){var t;if(!(null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.length))return"";var n=b.getWeightedRestriction(e.value);return g[n.type]},mapRestrictionToSvg:function(e){var t;if(!(null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.length))return u.vn.Lock;var n=b.getWeightedRestriction(e.value);return f[n.type]},mapRestrictionToText:function(e,t){var n;if(!(null===(n=null==e?void 0:e.value)||void 0===n?void 0:n.length)||!(null==t?void 0:t.length))return"";var r=b.getWeightedRestriction(e.value),i=t.find((function(e){return e.value===r.yearGroup})),a=y[r.type];if(r.type===l.c.User)return i?m(a,{yearGroup:i.name}):m("restrictionStaff");if(r.type===l.c.Custom){var o=b.getRestrictionDuration(r);return o?m(a,{duration:o,smartCount:o}):m("restrictionCustomLessThanDay",{duration:o,smartCount:1})}return""},getWeightedRestriction:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"highest";if(e.length)return 1===e.length?e[0]:e.reduce((function(e,n){var r=C[e.type],i=C[n.type];return"highest"===t&&r>i||"lowest"===t&&r<i?e:n}))},getRestrictionByType:function(e,t){if(!b.hasRestrictions(e))return null;var n=Array.isArray(t)?t:[t],r=e._restrictions.value.filter((function(e){return n.includes(e.type)}));return b.getWeightedRestriction(r)},getRestrictionDuration:function(e){if(e.type===l.c.Custom&&e.expiresOn){var t=c.O.convertUTCToLocal(e.expiresOn);if(t)return c.O.diffBetween(t,new Date,"day")}},hasCustomRestriction:function(e){return!!b.getRestrictionByType(e,[l.c.Custom])},hasRestrictions:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e._restrictions)||void 0===t?void 0:t.value)||void 0===n?void 0:n.length)}}},21974:function(e,t,n){n.d(t,{u:function(){return l}});var r=n(57857),i=n(63791),a=n(75459),o=n(86257);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===c(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u="shared.shared-utils",l={mapRatingToClass:function(e){return e?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,t){switch(e.type){case a.r.HostedLibrary:case a.r.CustomLibrary:return e.name;case a.r.Exchange:return r.T.getPhrase(u,"exchange");case a.r.Workspace:return r.T.getPhrase(u,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case a.r.HostedLibrary:case a.r.CustomLibrary:return"bg-info";case a.r.Exchange:return"bg-green";case a.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t,n=(s(t={},o.L.Pdf,i.vn.FilePDF),s(t,o.L.Image,i.vn.FileImg),s(t,o.L.PowerPoint,i.vn.FilePowerpoint),s(t,o.L.Document,i.vn.FileWord),s(t,o.L.Excel,i.vn.FileExcel),s(t,o.L.Zip,i.vn.FileZip),s(t,o.L.File,i.vn.File),t)[e];return n||(n=i.vn.Folder),n},mapTypeToClass:function(e){switch(e){case o.L.Pdf:return"icon-red";case o.L.Image:return"icon-purple";case o.L.Document:return"icon-blue";case o.L.Excel:return"icon-green";case o.L.PowerPoint:return"icon-orange";case o.L.Zip:return"icon-teal";case o.L.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case o.L.Pdf:return r.T.getPhrase(u,"pdf");case o.L.Image:return r.T.getPhrase(u,"image");case o.L.Document:return r.T.getPhrase(u,"document");case o.L.Excel:return r.T.getPhrase(u,"spreadsheet");case o.L.PowerPoint:return r.T.getPhrase(u,"presentation");case o.L.Zip:return r.T.getPhrase(u,"zipArchive");case o.L.File:return r.T.getPhrase(u,"file");default:return""}}}},18830:function(e,t,n){n.d(t,{M:function(){return f}});var r=n(31647),i=n(57857),a=n(11306),o=n(74421),c=n(50028),s=n(89603),u=n(77131),l=n(332),d=n(91432),v=n(70065),p=n(45428),m=n(87648),g=i.T.encloseNamespace("shared.shared-utils"),f={isVideo:function(e){return(null==e?void 0:e.typeId)===o.E.Video},isClip:function(e){return(null==e?void 0:e.typeId)===o.E.Clip},isInteractive:function(e){return(null==e?void 0:e.typeId)===o.E.Interactive},isVideoType:function(e){return f.isVideo(e)||f.isInteractive(e)||f.isClip(e)},hasSeries:function(e){var t;return!!(null===(t=null==e?void 0:e.series)||void 0===t?void 0:t.id)},getVideoProgress:function(e){var t,n;return(null==e?void 0:e.lastProgressPoint)?null==e?void 0:e.lastProgressPoint:(null===(t=null==e?void 0:e._videoProgress)||void 0===t?void 0:t.progress)?null===(n=null==e?void 0:e._videoProgress)||void 0===n?void 0:n.progress:0},getThumbnail:function(e){var t;return f.isVideo(e)?e.thumbnail:f.isClip(e)||f.isInteractive(e)?null===(t=e._parentVideo)||void 0===t?void 0:t.thumbnail:void 0},getDuration:function(e){var t,n;if(f.isVideo(e))return e.duration;if(f.isInteractive(e)){if(null===(t=e._parentClip)||void 0===t?void 0:t.id)return 1e3*(e._parentClip.endTime-e._parentClip.startTime);if(null===(n=e._parentVideo)||void 0===n?void 0:n.duration)return e._parentVideo.duration}return f.isClip(e)?1e3*(e.endTime-e.startTime):void 0},getAnalyticsEntity:function(e){return f.isVideo(e)?v.EntityType.Video:f.isInteractive(e)?v.EntityType.Interactive:f.isClip(e)?v.EntityType.Clip:void 0},getCanBeConsumed:function(e){var t,n;return e&&f.isVideoType(e)?e._canBeConsumed?{canNavigate:"login-required"===(null===(t=e._canBeConsumed)||void 0===t?void 0:t.reason)&&f.isVideo(e)||!0===e._canBeConsumed.value,canConsume:e._canBeConsumed.value,reason:null===(n=e._canBeConsumed)||void 0===n?void 0:n.reason}:{canNavigate:!0,canConsume:!0}:{canNavigate:!1,canConsume:!1}},getPrivacyReasoning:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=f.getCanBeConsumed(e),i=r.canConsume,a=r.canNavigate,o=r.reason,s=function(){return f.isClip(e)?g("clipLoginRequired"):f.isInteractive(e)?g("interactiveLoginRequired"):g("videoLoginRequired")};if(!i&&!a){if(n)return s();switch(o){case"rating-not-allowed":return g("ratingNotAllowed");case"video-deleted":return f.isClip(e)?g("clipParentDeleted"):f.isInteractive(e)?g("interactiveParentDeleted"):g("videoDeleted");case"clickview-private":return g("clickViewPrivate");case"private":default:return g("genericCannotAccess");case"login-required":return s();case"restricted-access":var u=p.l.getWeightedRestriction(null===(t=e._restrictions)||void 0===t?void 0:t.value);return(null==u?void 0:u.type)===m.c.Custom?g("awaitingApproval"):g("restrictedAccess")}}return f.isInteractive(e)&&e.status===c.X.Draft?g("draftInteractive"):""},getTitle:function(e){if(e.name)return e.name;var t=f.getCanBeConsumed(e),n=t.canConsume,r=t.reason;return g(n||"private"!==r?n||"video-deleted"!==r?"privateVideo":"videoUnavailable":"privateVideo")},getParentVideo:function(e){return f.isVideo(e)?e:f.isClip(e)||f.isInteractive(e)?e._parentVideo:void 0},showWhyThisVideo:function(e){var t,n;return!!f.isVideo(e)&&!!(null===(n=null===(t=e.tags)||void 0===t?void 0:t.data)||void 0===n?void 0:n.some((function(e){return e.tagType===s.Q.Pedagogy||e.tagType===s.Q.Skill})))},showWhatsIncluded:function(e){var t,n,r,i,a,o;if(!f.isVideo(e))return!1;var c=!!(null===(n=null===(t=e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length),s=!!(null===(i=null===(r=e.resources)||void 0===r?void 0:r.data)||void 0===i?void 0:i.length),u=!!(null===(o=null===(a=e.subtitles)||void 0===a?void 0:a.data)||void 0===o?void 0:o.length);return c||s||u},getRating:function(e){var t;return f.isVideo(e)?e.rating:null===(t=null==e?void 0:e._parentVideo)||void 0===t?void 0:t.rating},getVideoRequest:function(e,t,n){if(n){switch(t){case o.E.Video:return u.R.sharedVideo(e,n);case o.E.Clip:return l.e.sharedClip(e,n);case o.E.Interactive:return d.b.sharedInteractiveMetadata(e,n)}r.Q.ErrorHelper.throw(new a.H("Unsupported master type"))}switch(t){case o.E.Video:return u.R.video(e);case o.E.Clip:return l.e.clip(e);case o.E.Interactive:return d.b.interactiveMetadata(e)}r.Q.ErrorHelper.throw(new a.H("Unsupported master type"))}}},15970:function(e,t,n){n.d(t,{d:function(){return o}});var r=n(4705),i=n(90335),a=i.D.RecentlyAdded,o={getValidSortTypeFromParam:function(e){return Object.values(i.D).includes(e)?e:i.D.Newest},getOrSetSortType:function(e,t,n){var i=function(e){return"video:sort:".concat(e)}(e);return!t&&r.SG.cacheExists(i)||r.SG.cacheSet(i,t||n||a),t||(t=r.SG.cacheGet(i)),t},getVideoSortParam:function(e){switch(e){case i.D.AtoZ:return"orderby:name";case i.D.ZtoA:return"orderbydesc:name";case i.D.Newest:return"orderbydesc:datecreated";case i.D.Oldest:return"orderby:datecreated";case i.D.RecentlyAdded:return"orderbydesc:timestamp";case i.D.Series:return"orderby:seriessort";default:return}}}},7121:function(e,t){t.Z={minHeight:"jEh7m",restrictionBadgeCustom:"WQ2eS",restrictionBadgeUser:"z4DeQ"}}}]);
|