@clickview/library-editor 1.6.1-rc.0 → 1.6.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{3803-library-editor-d59bd7ca13.chunk.css → 3803-library-editor-c08c7cc096.chunk.css} +1 -1
  3. package/dist/css/{9383-library-editor-f3332b60f5.chunk.css → 9383-library-editor-d5cab29692.chunk.css} +1 -1
  4. package/dist/css/{library-editor-app-011417eae4.css → library-editor-app-832d87bac8.css} +1 -1
  5. package/dist/en.json +1 -1
  6. package/dist/scripts/2733-104ca5267c.chunk.js +1 -0
  7. package/dist/scripts/3427-4bb7be4830.chunk.js +1 -0
  8. package/dist/scripts/3803-34b97d5577.chunk.js +1 -0
  9. package/dist/scripts/{409-8f0171be19.chunk.js → 409-2eb71d2fb9.chunk.js} +1 -1
  10. package/dist/scripts/4353-83e8384e6a.chunk.js +1 -0
  11. package/dist/scripts/5047-ce9d715ba6.chunk.js +1 -0
  12. package/dist/scripts/7173-a5e749e591.chunk.js +1 -0
  13. package/dist/scripts/8343-6cd7f8bc0c.chunk.js +1 -0
  14. package/dist/scripts/8947-152b36ebd5.chunk.js +1 -0
  15. package/dist/scripts/9383-bb6ad888b4.chunk.js +1 -0
  16. package/dist/scripts/bundle-4f288ff336.min.js +2 -0
  17. package/package.json +1 -1
  18. package/dist/scripts/2733-12d5618933.chunk.js +0 -1
  19. package/dist/scripts/3122-2994bbc040.chunk.js +0 -1
  20. package/dist/scripts/3427-4824860784.chunk.js +0 -1
  21. package/dist/scripts/3803-3be21d0c1c.chunk.js +0 -1
  22. package/dist/scripts/4353-aea4f383f2.chunk.js +0 -1
  23. package/dist/scripts/5047-1e64f11a19.chunk.js +0 -1
  24. package/dist/scripts/8343-3686ad13bf.chunk.js +0 -1
  25. package/dist/scripts/8726-fd10d5f1f3.chunk.js +0 -1
  26. package/dist/scripts/9383-5cb6aa9ccd.chunk.js +0 -1
  27. package/dist/scripts/bundle-975342b553.min.js +0 -2
  28. /package/dist/scripts/{bundle-975342b553.min.js.LICENSE.txt → bundle-4f288ff336.min.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[3803],{21053:function(e,t,n){"use strict";n.d(t,{W:function(){return v}});var o=n(48088),i=n(31647),r=n(6681),a={svgContainer:"mtegw"},s=n(43791),l=n.n(s),c=n(30305),u=n(35630);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 f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function p(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)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(v,e);var t,n,i,s,d=(i=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(e){return!1}}(),function(){var e,t=y(i);if(s){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return p(this,e)});function v(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),d.call(this,e)}return t=v,(n=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0}}}},{key:"template",get:function(){return l()}},{key:"appLinks",get:function(){var e,t,n,o=this.options.goBackTab.link;return e={},t=o.selector,n=o.appLink,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"viewOptions",value:function(){var e=Object.assign(Object.assign({},this.options.goBackTab),{link:this.options.goBackTab.link.selector.replace(".","")});return{styles:a,backTab:e,backArrow:r.Nj.getSvg(r.vn.ArrowLeft)}}},{key:"onSave",value:function(){o.Radio.channel(c.OV.LIBRARY_EDITOR).trigger(c.eX.LibraryEditor.SAVE_VIDEO)}},{key:"onRender",value:function(){this.showChildView("tabs",new u.n({tabs:this.options.tabs,activeTab:this.options.activeTab}))}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),v}(i.Q.Component)},44391:function(e,t,n){"use strict";n.d(t,{K:function(){return k}});var o=n(31647),i=n(11306),r=n(48088),a=n(30305),s=n(26457),l=n(15564),c=n.n(l);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 d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,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,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)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(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)}(u,e);var t,n,o,i,l=(o=u,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=p(o);if(i){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(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),l.call(this,e)}return t=u,(n=[{key:"name",get:function(){return"TagItemComponent"}},{key:"tagName",get:function(){return this.options.behavior===s.Dm.Link?"a":"span"}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?"":" d-inline-flex"),t="".concat(this.isSaving()?" saving":""),n="".concat(this.options.behavior===s.Dm.Disabled?" ".concat("dE3WC"):""),o="".concat(this.options.behavior===s.Dm.Filter?" cursor-pointer":"");return"badge-pill tag py-1 px-2 my-1 mr-1".concat(o).concat(e).concat(t).concat(n)}},{key:"template",get:function(){return c()}},{key:"elements",get:function(){return{close:".close"}}},{key:"appLinks",get:function(){return this.options.behavior!==s.Dm.Link?{}:{"[this]":{application:a.OV.SEARCH,action:a.eX.Search.HOME,params:{tag:this.model.get("name")}}}}},{key:"defaults",get:function(){return{behavior:s.Dm.Link,orientation:s.zM.Flex}}},{key:"events",value:function(){return this.options.removeEvent?{"click @ui.close":"onRemoveTag"}:{click:"onClickTag"}}},{key:"initialize",value:function(){this.options.behavior===s.Dm.Edit&&this.listenTo(this.model,"change",this.render)}},{key:"isSaving",value:function(){if(this.options.behavior!==s.Dm.Filter){var e=this.model.pick("id","name","remove"),t=e.id,n=e.name;return!!e.remove||!t||!n}}},{key:"onRemoveTag",value:function(e){if(e.stopPropagation(),!this.isSaving())return this.model.set("remove",!0),r.Radio.channel(this.options.channelName).trigger(this.options.removeEvent,this.model),!1}},{key:"onClickTag",value:function(){this.options.behavior!==s.Dm.Filter||this.options.removeEvent||r.Radio.channel(this.options.channelName).trigger(this.options.clickEvent,this.model)}},{key:"viewOptions",value:function(){return{removable:this.options.removeEvent}}},{key:"onRender",value:function(){this.resetClassName()}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.Q.Component);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 m(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function g(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(c,e);var t,n,r,a,l=(r=c,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=w(r);if(a){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),l.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.options.behavior!==s.Dm.Edit||this.options.removeEvent||o.Q.ErrorHelper.throw(new i.H("removeEvent is required to edit tags."))}},{key:"name",get:function(){return"TagComponentCollection"}},{key:"defaults",get:function(){return{orientation:s.zM.Flex}}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?" d-flex align-items-start flex-column":"");return"tags".concat(e)}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent,clickEvent:this.options.clickEvent}}},{key:"childView",get:function(){return y}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Q.ComponentCollection)},63292:function(e,t,n){"use strict";n.r(t),n.d(t,{EditVideoView:function(){return Xe}});var o=n(39479),i=n(48088),r=n(31647),a=n(11306),s=n(99249),l=n(57857),c=n(25417),u=n(21679),d=n(99748),f=n(30305),h=n(29625),p=n(9484),y=n(61843),v=n(71192),m=n(68619),b=n(13156),g=n(17422),w=n(70065),k=n(52076),S=n(40622),O=n(95061),E=n(57785),T=n(264),C=n(45837),P=n(37382),j=n(95168),R=n(15180),x=n(99844),D=n(72891),N=n.n(D);function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function _(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}function I(e,t){if(t&&("object"===M(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)}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}var B=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(s,e);var t,n,o,r,a=(o=s,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=L(o);if(r){var n=L(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return I(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,e)}return t=s,(n=[{key:"initialize",value:function(){var e=this;this.listenTo(this.model,"change",(function(){return e.options.viewModel.validate()}))}},{key:"template",get:function(){return N()}},{key:"name",get:function(){return"ExtraInfoItemComponent"}},{key:"regions",value:function(){return{textArea:{el:".text-area-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=value]":{observe:"value",setOptions:{validate:!0}}}}},{key:"onRender",value:function(){this.showChildView("textArea",new x.F({name:"value",class:"form-control",placeholder:this.model.get("placeholder"),id:"admin-notes"})),this.stickit(),i.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),i.Validation.unbind(this)}}])&&_(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Q.Component),A=n(44106),U=n.n(A);function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function J(e,t,n){return t&&z(e.prototype,t),n&&z(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function H(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)}function K(e,t){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},K(e,t)}function Z(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,o=W(e);if(t){var i=W(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return G(this,n)}}function G(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function W(e){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},W(e)}var Y=function(e){H(n,e);var t=Z(n);function n(e){return Q(this,n),t.call(this,e)}return J(n,[{key:"name",get:function(){return"ExtraInfoComponentCollection"}},{key:"childView",get:function(){return B}},{key:"childViewOptions",get:function(){return{viewModel:this.options.viewModel}}}]),n}(r.Q.ComponentCollection),q=function(e){H(n,e);var t=Z(n);function n(e){return Q(this,n),t.call(this,e)}return J(n,[{key:"name",get:function(){return"ExtraInfoComponent"}},{key:"template",get:function(){return U()}},{key:"className",get:function(){return"border-top pt-3"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new Y({collection:this.model.fields,viewModel:this.model}))}}]),n}(r.Q.Component),X=n(17391),$=n(3974),ee=n(36022),te=n(44391),ne=n(26457),oe=n(30992),ie=n.n(oe);function re(e){return re="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},re(e)}function ae(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function se(e,t){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},se(e,t)}function le(e,t){if(t&&("object"===re(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)}function ce(e){return ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ce(e)}var ue=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&&se(e,t)}(c,e);var t,n,o,i,s=(o=c,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=ce(o);if(i){var n=ce(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return le(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"name",get:function(){return"TagsComponent"}},{key:"template",get:function(){return ie()}},{key:"lang",get:function(){return"libraryEditor.tags"}},{key:"defaults",get:function(){return{headerText:l.T.getPhrase(this.lang,"heading"),orientation:ne.zM.Flex}}},{key:"regions",value:function(){return{tagList:{el:".tag-list-region",replaceElement:!0},tagSelector:{el:".tag-selector-region",replaceElement:!0}}}},{key:"initialize",value:function(){this.options.behavior!==ne.Dm.Edit||this.options.parentId||r.Q.ErrorHelper.throw(new a.H("parentId is required to edit tags."))}},{key:"getTypeaheadConfigs",value:function(){var e=$.M.getTypeaheadConfig(),t=$.M.getBloodhoundConfig(),n={newType:f.n8.TagsRaw},o={newType:f.n8.TagsRaw,footerTemplate:X.J.getConfirmSelectionTemplate()};return[{name:f.n8.TagsRaw,typeaheadConfig:e,bloodhoundConfig:t,options:{hideEmptyResults:!0}},{name:"add-new",typeaheadConfig:e,bloodhoundConfig:t,options:n},{name:"empty-suggestion",typeaheadConfig:e,bloodhoundConfig:t,options:o}]}},{key:"viewOptions",value:function(){var e;return this.showEmptyStateText()&&(e=this.options.emptyStateText),{headerText:this.options.headerText,editable:this.options.behavior===ne.Dm.Edit,emptyStateText:e}}},{key:"showEmptyStateText",value:function(){return this.options.behavior!==ne.Dm.Edit&&!this.collection.length&&!!this.options.emptyStateText}},{key:"renderTagSelector",value:function(){this.options.behavior===ne.Dm.Edit&&this.showChildView("tagSelector",new ee.M({model:this.model,parentChannelName:this.options.channelName,inputId:"tag-select",selectEvent:"add:tag",typeaheadConfigs:this.getTypeaheadConfigs(),placeholderText:l.T.getPhrase(this.lang,"placeholder"),callbacks:{onRender:X.J.selectFirstResult,onBlur:X.J.clearInputOnBlur},typeaheadOptions:{hint:!1},actionOptions:{clearOnSelect:!0},autofocus:this.options.autofocus}))}},{key:"renderTagList",value:function(){this.showEmptyStateText()||this.showChildView("tagList",new te.K({collection:this.collection,channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent}))}},{key:"onRender",value:function(){this.renderTagSelector(),this.renderTagList()}}])&&ae(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.Q.Component),de=n(88172),fe=n(99724),he=n.n(fe),pe={saveButton:"G_FDK",undo:"dcV70"};function ye(e){return ye="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},ye(e)}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function me(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function be(e,t){return be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},be(e,t)}function ge(e,t){if(t&&("object"===ye(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)}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},we(e)}var ke=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&&be(e,t)}(c,e);var t,n,o,a,s=(o=c,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=we(o);if(a){var n=we(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ge(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return he()}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return i.Radio.channel(this.options.channelName)}},{key:"getSaveChannelName",value:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .undo":"onUndo"}}},{key:"initialize",value:function(){var e;this.model||(this.model=new r.Q.Model((ve(e={},de.ZV.ShowSpinner,this.options.showSpinner),ve(e,de.ZV.Disabled,this.options.isDisabled),e)));var t=this.options.channelName;this.listenTo(t,S.LibraryEditorActions.DisableSave,this.onDisableSave),this.listenTo(t,S.LibraryEditorActions.EnableSave,this.onEnableSave),this.listenTo(t,S.LibraryEditorActions.CancelSave,this.onCancelSave);var n=i.Radio.channel(this.getSaveChannelName());this.listenTo(n,S.LibraryEditorActions.Save,this.onSave),this.options.allowUndo&&(this.options.hasChanges&&this.model.set("showUndo",!0),this.listenTo(this.model,"change:showUndo",this.render))}},{key:"onCancelSave",value:function(){this.model.set(de.ZV.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(de.ZV.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(de.ZV.ShowSpinner)&&this.model.set(de.ZV.ShowSpinner,!1,{silent:!0}),this.model.set(de.ZV.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(S.LibraryEditorActions.Undo)}},{key:"onSave",value:function(){this.model.set(de.ZV.ShowSpinner,!0),this.getParentChannel().trigger(S.LibraryEditorActions.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:pe}}},{key:"renderSaveButton",value:function(){var e=new de.Py({saveEvent:S.LibraryEditorActions.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:l.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(pe.saveButton),spinnerOptions:{size:y.Ey.Small,type:y.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}])&&me(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.Q.Component),Se=n(39995),Oe=n(88483),Ee=n(10101),Te=n(86272),Ce=n.n(Te);function Pe(e){return Pe="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},Pe(e)}function je(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}function xe(e,t){if(t&&("object"===Pe(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)}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}var Ne=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&&Re(e,t)}(a,e);var t,n,o,i,r=(o=a,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=De(o);if(i){var n=De(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return xe(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){this.viewModel=s.r.get("image:storage")}},{key:"name",get:function(){return"EditThumbnailComponent"}},{key:"lang",get:function(){return"libraryEditor.editThumbnail"}},{key:"template",get:function(){return Ce()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:Ee.YR,channelName:this.options.channelName,buttonSelector:".upload-thumbnail",imageType:g.__.Thumbnails,appLink:{application:f.OV.LIBRARY_EDITOR,action:f.eX.LibraryEditor.UPLOAD_THUMBNAIL,args:[this.options.model.id]},saveImage:function(t){return e.viewModel.set({dataUrl:t})}}]}},{key:"defaults",get:function(){return{editable:!0}}},{key:"regions",value:function(){return{thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{editable:this.options.editable,dimensions:f.nq[g.__.Thumbnails]}}},{key:"onRender",value:function(){this.showChildView("thumbnail",new Se.Z({model:this.model,thumbnailOptions:{size:Oe.h2.Medium}}))}}])&&je(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),Me=n(23468),_e=n.n(Me),Ve={suggestEdit:"AgfOM"};function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function Le(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Be(e,t){return Be=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Be(e,t)}function Ae(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ue(e){return Ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ue(e)}var Fe=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&&Be(e,t)}(a,e);var t,n,o,i,r=(o=a,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=Ue(o);if(i){var n=Ue(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ae(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"update:tags",(function(){return e.renderCustomerTags(!0)}))}},{key:"name",get:function(){return"EditVideoDetailsComponent"}},{key:"className",get:function(){return"edit-video-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editVideoDetails"}},{key:"template",get:function(){return _e()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:f.OV.LIBRARY_EDITOR,action:f.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.id]}}}},{key:"regions",value:function(){return{topSave:{el:".top-save-region",replaceElement:!0},bottomSave:{el:".bottom-save-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},basicInfo:{el:".basic-info-region",replaceElement:!0},additionalInfo:{el:".additional-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},fields:{el:".fields-region",replaceElement:!0},clickViewTags:{el:".cv-tags-region",replaceElement:!1},customerTags:{el:".customer-tags-region",replaceElement:!0}}}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new ke({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-right"})),this.showChildView("bottomSave",new ke({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-right"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new P.J({model:this.model,ratings:this.options.ratings,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new Ne({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderAdditionalInfo",value:function(){this.showChildView("additionalInfo",new R.a({model:this.model,channelName:this.options.channelName,libraries:this.options.libraries,hostedLibraries:this.options.hostedLibraries,editable:this.options.editable}))}},{key:"renderProductionInfo",value:function(){this.options.editable&&T.g.hasLite||this.showChildView("productionInfo",new j.O({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderFields",value:function(){T.g.hasLite||this.showChildView("fields",new q({model:this.model,channelName:this.options.channelName}))}},{key:"renderClickViewTags",value:function(){if(!this.options.editable){var e=y.BK.filterObjectsByOwnerType(this.model.tags,C.N.ClickView,this.options.currentUser.get("customerId"));this.showChildView("clickViewTags",new ue({parentId:this.model.get("id"),collection:e,orientation:ne.zM.Flex,behavior:ne.Dm.Disabled,channelName:this.options.channelName,headerText:l.T.getPhrase(this.lang,"clickviewTags"),emptyStateText:l.T.getPhrase(this.lang,"clickviewTagsEmpty")}))}}},{key:"renderCustomerTags",value:function(e){if(!T.g.hasLite||this.options.editable){var t=y.BK.filterObjectsByOwnerType(this.model.tags,C.N.Customer,this.options.currentUser.get("customerId"));this.showChildView("customerTags",new ue({parentId:this.model.get("id"),collection:t,channelName:this.options.channelName,behavior:ne.Dm.Edit,headerText:l.T.getPhrase(this.lang,"customerTags"),removeEvent:"remove:tag",autofocus:!!e}))}}},{key:"renderTags",value:function(){this.renderClickViewTags(),this.renderCustomerTags()}},{key:"viewOptions",value:function(){return{styles:Ve,editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:y.M2.isExchangeVideo(this.model)}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail(),this.renderAdditionalInfo(),this.renderProductionInfo(),this.renderFields(),this.renderTags()}}])&&Le(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),Qe=n(21053),ze=n(53854),Je=n(75535),He=n(55230),Ke=n.n(He);function Ze(e){return Ze="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},Ze(e)}function Ge(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function We(e,t){return We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},We(e,t)}function Ye(e,t){if(t&&("object"===Ze(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)}function qe(e){return qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qe(e)}var Xe=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&&We(e,t)}(R,e);var t,n,C,P,j=(C=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=qe(C);if(P){var n=qe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ye(this,e)});function R(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,R),(t=j.call(this,e)).editable=!1,t}return t=R,n=[{key:"name",get:function(){return"EditVideoView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editVideo"}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"template",get:function(){return Ke()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0,partialLoading:g.LP.EditVideoTabs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:g.LP.EditVideoDetails}}}},{key:"initialize",value:function(){this.navLock=u.u.getInstance(f.K9.NavLock,this),this.initDataListeners(),y.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=u.u.getInstance(f.Or.Video,this),this.tagDataService=u.u.getInstance(f.Or.Tags,this),this.libraryDataService=u.u.getInstance(f.Or.Library,this),this.seriesDataService=u.u.getInstance(f.Or.Series,this),this.ratingsDataService=u.u.getInstance(f.Or.Ratings,this),this.fieldsDataService=u.u.getInstance(f.Or.Fields,this),this.alertService=u.u.getInstance(f.K9.Alerts,this),this.personDataService=u.u.getInstance(f.Or.Person,this),this.companyDataService=u.u.getInstance(f.Or.Company,this)}},{key:"initDataListeners",value:function(){this.listenTo(c.G.SHELL,r.Q.EventNames.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(f.Vk.VIDEO,"videos:".concat(this.options.videoId,":sync"),this.render),this.listenTo(f.Vk.VIDEO,"videos:".concat(this.options.videoId,":error"),this.onError),this.listenTo(f.Vk.RATINGS,"".concat(f.M_.RATINGS,":sync"),this.render),this.listenTo(f.Vk.VIDEO,"".concat(f.M_.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),this.onThumbnailUpdated),this.listenTo(f.Vk.LIBRARY,"hosted:libraries:sync",this.render),this.listenTo(this.channelName,"select:rating",o.partial(this.onTypeaheadSelection,o,"rating")),this.listenTo(this.channelName,"select:channel",o.partial(this.onTypeaheadSelection,o,"channel")),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:tag",this.onAddTag),this.listenTo(this.channelName,"remove:distributors",this.onRemoveDistributor),this.listenTo(this.channelName,"remove:productionCompanies",this.onRemoveProductionCompany),this.listenTo(this.channelName,"remove:directors",this.onRemoveDirector),this.listenTo(this.channelName,"remove:producers",this.onRemoveProducer),this.listenTo(this.channelName,"remove:tag",this.onRemoveTag),this.listenTo(this.channelName,S.LibraryEditorActions.Save,this.onSave),this.listenTo(this.channelName,S.LibraryEditorActions.Undo,this.onUndo),this.listenTo(this.channelName,S.LibraryEditorActions.DetectInput,this.onTypeaheadInput),this.listenTo(this.channelName,"image:load",this.onBeforeThumbnailUpload)}},{key:"onError",value:function(e){switch(e.type){case d.h.NotFound:r.Q.ErrorHelper.throw(new Je.l);break;case d.h.Forbidden:r.Q.ErrorHelper.throw(new ze.a)}}},{key:"onTypeaheadSelection",value:function(e,t,n){if(n){var i=this.viewModel.get(t),r=i.filter({name:e.name});o.each(r,(function(e){return i.remove(e)})),i.add(e)}else this.viewModel.set(t,e);this.onModelChange(e,{manualUpdate:!0})}},{key:"onTypeaheadInput",value:function(e,t,n){e.get("name")||(n&&n.isCollection?this.viewModel.get(t).remove(e.get("id"),{silent:!0}):this.viewModel.get(t).clear({silent:!0}),this.onModelChange(null,{manualUpdate:!0}),"series"===t&&(this.validateSeries(),i.Radio.channel(this.channelName).trigger("clear:series")))}},{key:"onSelectSeries",value:function(e){var t=this;e.id?this.seriesDataService.getSeries(e.id,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection(e.toJSON(),"series")})):e.name&&this.seriesDataService.createSeries(e.name,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection({id:e.id},"series")}))}},{key:"onSelectSeason",value:function(e){var t=this;if(o.isNull(e))return this.viewModel.get("season").clear({silent:!0}),this.viewModel.set("episodeNumber",null),y.yV.deselectAll(this.viewModel.get("series.seasons")),void this.onModelChange(null,{manualUpdate:!0});if(e.id)return this.viewModel.set("season",e),y.yV.setSelected(e.id,this.viewModel.get("series.seasons")),void this.onModelChange(e,{manualUpdate:!0});if(e.number){var n=this.viewModel.get("series.id");this.seriesDataService.createSeason(e,n,(function(e){t.viewModel.set("season",e.toJSON()),!t.viewModel.get("series.seasons")&&t.viewModel.get("series").set("seasons",new h.i),t.viewModel.get("series.seasons").add(e.toJSON()),y.yV.setSelected(e.id,t.viewModel.get("series.seasons")),t.onModelChange(e.toJSON(),{manualUpdate:!0}),t.render()}))}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"distributors",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"distributors",!0)}))}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"productionCompanies",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"productionCompanies",!0)}))}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"directors",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"directors",!0)}))}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"producers",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"producers",!0)}))}},{key:"onRemoveDistributor",value:function(e){this.removeFromCollection(e,"distributors")}},{key:"onRemoveProductionCompany",value:function(e){this.removeFromCollection(e,"productionCompanies")}},{key:"onRemoveDirector",value:function(e){this.removeFromCollection(e,"directors")}},{key:"onRemoveProducer",value:function(e){this.removeFromCollection(e,"producers")}},{key:"removeFromCollection",value:function(e,t){e&&e.id&&t&&(this.viewModel.get(t).remove(e.id),this.onModelChange(null,{manualUpdate:!0}))}},{key:"onAddTag",value:function(e){var t=this;if(e&&e.name){var n=e.name.trim().toLowerCase();if(n&&!y.yV.findModelByName(n,this.viewModel.tags)){var o=new m.V({name:n});this.viewModel.tags.add(o),this.tagDataService.createTag(n,this.model.get("id"),(function(e){o.set(e.toJSON()),i.Radio.channel(t.channelName).trigger("update:tags")}))}}}},{key:"onRemoveTag",value:function(e){var t=this;e instanceof m.V&&e.id&&this.tagDataService.dissociateTag(e.id,this.model.get("id"),(function(){t.viewModel.tags.remove(e),i.Radio.channel(t.channelName).trigger("update:tags"),t.logDissocAction(t.model.get("id"),e,w.EntityType.Tag)}))}},{key:"saveFields",value:function(e,t){var n=this,i=0;e.updatedVideo=o.extend({},e.updatedVideo||{});var r=function(){++i===e.dataChanges.fields.length&&t(e)};o.each(e.dataChanges.fields,(function(e){if(e.id&&!e.value)return n.viewModel.fields.remove(n.viewModel.fields.findWhere({id:e.id})),void n.fieldsDataService.deleteField(e.id,r);!e.id||e.id>0?n.fieldsDataService.updateField(e,r):n.fieldsDataService.addField(n.options.videoId,e,(function(t){n.viewModel.fields.findWhere({id:e.id}).set("id",t.id),r()}))}))}},{key:"bulkDissoc",value:function(e,t){this.videoDataService.bulkDissoc(this.model.id,e.pendingDissocs,(function(){t(e)}))}},{key:"saveVideo",value:function(e,t){var n=this,i=o.omit(e.dataChanges,"fields");if(o.isEmpty(i))t(e);else{var r=o.omit(e.dataChanges,"fields");this.videoDataService.updateVideo(this.model.get("id"),this.folder.get("id"),r,(function(i){(e.dataChanges.series&&e.dataChanges.series.id||e.dataChanges.episodeNumber||e.dataChanges.season)&&n.videoDataService.clearVideoCache(),e.updatedVideo=o.extend({},e.updatedVideo||{},i),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(S.LibraryEditorActions.DisableSave),this.logEditAction(e.dataChanges,w.WorkflowPhase.Save);var t=b.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Video was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(S.LibraryEditorActions.CancelSave),!1;this.validateSeries();var e=E.xC.getChanges(this.model,this.viewModel),t=E.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!o.keys(t).length)return this.updateSaveButton(S.LibraryEditorActions.CancelSave),!1;var n=new r.Q.Middleware;return e&&e.fields&&n.use(o.bind(this.saveFields,this)),t&&o.keys(t).length&&n.use(o.bind(this.bulkDissoc,this)),this.editable&&n.use(o.bind(this.saveVideo,this)),n.use(o.bind(this.afterSave,this)),n.go({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new y.Mr({title:l.T.getPhrase(this.lang,"undoTitle"),text:l.T.getPhrase(this.lang,"undoBody",{videoName:this.model.get("name")}),buttons:[{text:l.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:l.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},w.WorkflowPhase.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),E.xC.updateModelState(this.model,this.viewModel,e),s.r.clear(this.viewModelName),this.getViewModel(),this.renderContent()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.undo;this.stopListening(this.viewModel),s.r.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),t&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:l.T.getPhrase(this.lang,"navLockHeading"),text:l.T.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{key:"onBeforeThumbnailUpload",value:function(){this.navLock.isLocked()&&(this.navLock.unlock(),s.r.get("upload:thumbnail:options").set("lockNav",!0))}},{key:"onModelChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.stickitChange||t.manualUpdate)if(this.viewModel.validate(),!1!==this.viewModel.isValid()){var n=E.xC.getChanges(this.model,this.viewModel)||o.keys(E.xC.getRemovedObjectIds(this.model,this.viewModel)).length;if(!n)return this.unlockNav(),void this.updateSaveButton(S.LibraryEditorActions.DisableSave);this.lockNav(),this.updateSaveButton(S.LibraryEditorActions.EnableSave)}else this.updateSaveButton(S.LibraryEditorActions.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=i.Radio.channel(this.channelName),n=S.LibraryEditorActions.EnableSave,o=S.LibraryEditorActions.DisableSave,s=S.LibraryEditorActions.CancelSave;switch(e){case n:return void t.trigger(n);case o:return void t.trigger(o);case s:return void t.trigger(s)}r.Q.ErrorHelper.throw(new a.H("Save action type is not valid."))}},{key:"onThumbnailUpdated",value:function(){var e=this;this.videoDataService.clearCacheAndGetVideo(this.options.videoId,(function(t){e.model=t,e.viewModel.set("thumbnail",e.model.thumbnail.toJSON())}))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);k.k.logUserAction(n,{actionType:w.UserAction.Edit,entity:w.EntityType.Video,location:w.LocationContext.EditVideoDetails,workflowPhase:t})}},{key:"logDissocAction",value:function(e,t,n){var o=Object.assign({videoId:e},t.pick("id","name"));k.k.logUserAction(o,{actionType:w.UserAction.Dissociate,entity:n,location:w.LocationContext.EditVideoDetails})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.model.fields&&this.model.fields.length||this.model.set("fields",(0,E.aj)()),this.viewModel=s.r.get(this.viewModelName,this.model.toJSON(),{ctor:v.n}),this.editable&&(this.viewModel.addValidation(E.rr),this.viewModel.addValidation(E.tD)),T.g.hasLite||this.viewModel.addValidation(E.oJ),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange),this.listenTo(this.viewModel,"change:dateBroadcast",o.partial(this.onModelChange,o,{manualUpdate:!0})),this.viewModel.fields&&!T.g.hasLite&&(this.viewModel.fields&&this.viewModel.fields.each((function(e){return e.addValidation(E.Zg)})),this.listenTo(this.viewModel.fields,"change",this.onModelChange))}},{key:"validateSeries",value:function(){this.viewModel.get("series.id")||(this.viewModel.unset("season"),this.viewModel.set("episodeNumber",null))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.ratings=this.ratingsDataService.getAllRatings(),this.hostedLibraries=this.libraryDataService.getHostedLibraries(),this.model&&(this.editable=y.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.ratings&&this.hostedLibraries&&(this.viewModel instanceof v.n||this.getViewModel()))}},{key:"requiredResources",get:function(){return{libraries:O.T.libraries,currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.ratings&&!!this.viewModel}},{key:"renderContent",value:function(){var e=E.xC.getChanges(this.model,this.viewModel)||o.keys(E.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new Fe({model:this.viewModel,ratings:this.ratings,libraries:this.libraries,hostedLibraries:this.hostedLibraries,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"renderTabs",value:function(){var e=!this.editable||T.g.hasLite;this.showChildView("tabs",new Qe.W({tabs:y.Si.getEditVideoTabs(this.options.videoId,{hideChaptersTab:e}),activeTab:".edit-video-applink",goBackTab:y.Si.getBackButton(this.options.videoId)}))}},{key:"onRender",value:function(){this.renderTabs(),this.renderContent()}}],n&&Ge(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),R}(r.Q.View)},35630:function(e,t,n){"use strict";n.d(t,{n:function(){return h}});var o=n(39479),i=n(31647),r={link:"aroLz",active:"ynoP4"},a=n(92655),s=n.n(a);function l(e){return l="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},l(e)}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function d(e,t){if(t&&("object"===l(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)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var h=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&&u(e,t)}(h,e);var t,n,i,a,l=(i=h,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=f(i);if(a){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(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),l.call(this,e)}return t=h,(n=[{key:"name",get:function(){return"TabsView"}},{key:"className",get:function(){var e="bg-white py-2 border-bottom";return this.options.className&&(e+=" ".concat(this.options.className)),e}},{key:"template",get:function(){return s()}},{key:"appLinks",get:function(){var e={};return this.options.tabs.forEach((function(t){return e[t.link.selector]=t.link.appLink})),e}},{key:"viewOptions",value:function(){var e=this.options.tabs.map((function(e){return Object.assign(Object.assign({},e),{link:e.link.selector.replace(".","")})}));return{styles:r,tabs:e}}},{key:"setActiveTab",value:function(){var e=this,t=!1;if(this.options.tabs.forEach((function(n){n.active=!1,n.link.selector===e.options.activeTab&&(n.active=!0,t=!0)})),!t){var n=o.first(this.options.tabs);n&&(n.active=!0)}}},{key:"onBeforeRender",value:function(){this.setActiveTab()}}])&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(i.Q.Component)},86272:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return e.propertyIsEnumerable,"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+"</h5>\r\n"},3:function(e,t,n,o,i){return"my-2"},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="text-muted mt-3 mb-1"><em>'+l((n.lang||t&&t.lang||s).call(a,"recommendedSize",{name:"lang",hash:{height:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.height:r,width:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.width:r},data:i}))+'</em></div>\r\n <button class="upload-thumbnail btn btn-outline-dark mb-3 w-100">'+l((n.lang||t&&t.lang||s).call(a,"upload",{name:"lang",hash:{},data:i}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="thumbnail-region"></div>\r\n<div class="'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},43791:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression;return'<div class="row">\r\n <h4>\r\n <a class="d-inline-flex align-items-center '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.link:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.link:r,t))+'">\r\n <span class="'+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block mx-2">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.backArrow:r,t))?r:"")+"</span>\r\n "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.name:r,t))+'\r\n </a>\r\n </h4>\r\n</div>\r\n<div class="tabs-region pl-2"></div>'},useData:!0})},23468:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"mb-4"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.suggestEdit:r,t))+'">\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isExchange:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.program(6,i,0),data:i}))?r:"")+" </p>\r\n"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEditExchange",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\r\n"},6:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return'<div class="row">\r\n <div class="left-pane col-4">\r\n <div class="thumbnail-region"></div>\r\n <div class="cv-tags-region '+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"></div>\r\n <div class="customer-tags-region"></div>\r\n </div>\r\n <div class="right-pane col-8">\r\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="top-save-region"></div>\r\n <div class="basic-info-region mb-4"></div> \r\n <div class="additional-details-region mb-4"></div> \r\n <div class="production-info-region mb-4"></div> \r\n <div class="fields-region mb-4"></div>\r\n <div class="bottom-save-region"></div>\r\n </div>\r\n</div>'},useData:!0})},99724:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-muted mx-2 undo '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.undo:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"undo",{name:"lang",hash:{},data:i}))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.allowUndo:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="save-region"></div>'},useData:!0})},15564:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return'<span class="close cursor-pointer" aria-hidden="true">&times;</span>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c="function",u=e.escapeExpression;return'<span class="clamp-1" title="'+u(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===c?a.call(s,{name:"name",hash:{},data:i}):a)+'">'+u(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===c?a.call(s,{name:"name",hash:{},data:i}):a)+"</span>\r\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.removable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},30992:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\r\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>\r\n"},5:function(e,t,n,o,i){return'<div class="tag-selector-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.headerText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="tag-list-region"></div>'},useData:!0})},55230:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="tab-region"></div>\r\n<div class="edit-content-region"></div>\r\n<div class="dialog-region"></div>'},useData:!0})},44106:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<h5 class="mb-0">Extra Information</h5>\r\n<div class="text-muted mb-3">This information is only visible to admins and will not be searchable</div>\r\n<div class="fields-region"></div>'},useData:!0})},72891:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="form-group">\r\n <label for="edit-description">'+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'</label>\r\n <div class="text-area-region"></div>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},92655:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i,r,a){var s;return e.propertyIsEnumerable,null!=(s=n.unless.call(null!=t?t:e.nullContext||{},null!=t?t.hide:t,{name:"unless",hash:{},fn:e.program(2,i,0,r,a),inverse:e.noop,data:i}))?s:""},2:function(e,t,n,o,i,r,a){e.propertyIsEnumerable;var s,l=e.lambda,c=e.escapeExpression;return' <a class="'+c(l(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.link:s,t))+" p-2 "+c(l(null!=t?t.link:t,t))+" "+(null!=(s=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.active:t,{name:"if",hash:{},fn:e.program(3,i,0,r,a),inverse:e.noop,data:i}))?s:"")+'">'+c(l(null!=t?t.name:t,t))+"</a>\r\n"},3:function(e,t,n,o,i,r,a){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.active:s,t))+" border-bottom border-primary text-primary"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i,r,a){var s;return e.propertyIsEnumerable,null!=(s=n.each.call(null!=t?t:e.nullContext||{},null!=(s=null!=t?t.options:t)?s.tabs:s,{name:"each",hash:{},fn:e.program(1,i,0,r,a),inverse:e.noop,data:i}))?s:""},useData:!0,useDepths:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4353],{18068:function(e,t,n){"use strict";n.r(t),n.d(t,{SuggestAnEditView:function(){return X}});var o=n(39479),r=n(57857),i=n(31647),a=n(21679),s=n(99249),l=n(70065),c=n(52076),u=n(61843);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 p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,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)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var g=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)}(i,e);var t,n,o,r=(n=i,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=y(n);if(o){var r=y(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return h(this,e)});function i(){return p(this,i),r.apply(this,arguments)}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(i.Q.Model),m=n(13102),b=n(67670),v=n(9484),w=n(48404),S=n(30305),O=n(83665),k=n(26357),T=n(88172),M=n(10101),P=n(75459),E=n(48088),C=n(33192),j=n(17422),R=n(48726),V=n(40622),x=n(7190),_=n(19098),N=n.n(_),I={metadataValue:"mvVSS"};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 B(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}function A(e,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)}function U(e){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},U(e)}var F,H=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)}(l,e);var t,n,o,a,s=(o=l,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=U(o);if(a){var n=U(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return A(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),s.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return N()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{key:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=suggestion]":{observe:"suggestion",setOptions:{validate:!0}},"[name=reason]":{observe:"reason",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{ratingValidation:".rating-form-feedback"}}},{key:"getMetadataValue",value:function(){return this.options.metadataType===V.MetadataType.BroadcastDate?this.options.metadataValue?C(this.options.metadataValue).format(j.K4.FULL_YEAR):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof i.Q.Collection?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||r.T.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===V.MetadataType.Other?r.T.getPhrase(this.lang,"otherSuggestionPlaceholder"):r.T.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:x.uB.translateMetadataName(this.options.metadataType).toLowerCase()})}},{key:"renderRatingSelect",value:function(){this.options.ratingValidationMessage?this.getUI("ratingValidation").text(this.options.ratingValidationMessage).attr("style","display: block;"):this.getUI("ratingValidation").hide(),this.options.metadataType===V.MetadataType.Rating&&this.showChildView("ratingSelect",new R.R({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:I,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===V.MetadataType.Rating,isOtherType:this.options.metadataType===V.MetadataType.Other,metadataType:x.uB.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),E.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),E.Validation.unbind(this)}}])&&B(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.Q.Component);!function(e){e[e.Email=0]="Email"}(F||(F={}));var K=n(60519),Q=n(68249),Z=Object.assign(Object.assign({},K.c),{createSuggestEditNotification:function(e){return{_type:Q.k.SuggestEdit,groupId:e.groupId,receiverId:0,instanceRegion:e.instanceRegion,countryCode:e.countryCode,channels:[F.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),z=n(34651),$=n.n(z);function q(e){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q(e)}function G(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}function W(e,t){if(t&&("object"===q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Y(e){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Y(e)}var X=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)}(f,e);var t,n,i,d,p=(i=f,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Y(i);if(d){var n=Y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return W(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),p.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=a.u.getInstance(S.Or.Video,this),this.ratingsDataService=a.u.getInstance(S.Or.Ratings,this),this.notificationDataService=a.u.getInstance(S.Or.Notifications,this),this.selectedMetadata=new g,this.metadataCollection=this.getMetadataCollection(),this.bindListeners()}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return $()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"lang",get:function(){return"libraryEditor.suggestAnEdit"}},{key:"title",get:function(){return r.T.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return u.N0.generateUniqueChannelName(this)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:M.Yw,title:r.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new b.v,channelName:this.channelName,buttonText:r.T.getPhrase(this.lang,"submit"),onClick:function(){return e.onSubmit()}}}]}},{key:"requiredResources",get:function(){return{config:w.p.config,currentUser:v.K.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(S.Vk.VIDEO,"".concat(S.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(S.Vk.NOTIFICATIONS,"".concat(S.M_.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(){var e=this;if(this.validateForm()){this.spinnerModel.set(T.ZV.ShowSpinner,!0);var t=this.selectedMetadata.get("metadataType")===V.MetadataType.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),n=this.config.get("suggestEditMetadataGroupId"),o=Z.createSuggestEditNotification({groupId:n,instanceRegion:this.currentUser.get("instanceRegion"),countryCode:this.currentUser.get("countryCode"),video:this.model.toJSON(),user:this.currentUser.toJSON(),property:this.selectedMetadata.get("metadataType").toLowerCase(),suggestion:t,reason:this.viewModel.get("reason"),currentValue:this.selectedMetadata.get("metadataValue")});this.notificationDataService.suggestEdit(o,(function(){e.triggerMethod("hide"),e.spinnerModel.set(T.ZV.ShowSpinner,!1),e.spinnerModel.set(T.ZV.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(T.ZV.ShowSpinner,!1)}},{key:"onMetadataSelect",value:function(e){this.selectMetadata(e),this.renderSuggestEdit()}},{key:"onSelectRating",value:function(e){this.viewModel.set("ratingSuggestion",e.get("name")),this.renderSuggestEdit()}},{key:"selectMetadata",value:function(e){this.spinnerModel.set(T.ZV.Disabled,!1),u.yV.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==V.MetadataType.Other?this.model.get(e.get("property")):null}),e.get("name")!==V.MetadataType.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){return new O.L(Object.keys(V.MetadataTypes).map((function(e){return V.MetadataTypes[e]})))}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=s.r.get(this.viewModelName),this.viewModel.addValidation(x.xs)}},{key:"validateForm",value:function(){this.renderSuggestEdit(),this.viewModel.validate();var e=this.viewModel.toJSON(),t=e.reason,n=e.suggestion;return!(this.getRatingValidationMessage()||this.selectedMetadata.get("metadataType")!==V.MetadataType.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==V.MetadataType.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?x.nf.original():"":x.nf.empty()}},{key:"checkPreselection",value:function(){if(!this.selectedMetadata.get("metadataType")&&this.options.metadata&&this.dataFetched()){var e=this.getMetadataByType(this.options.metadata);this.selectMetadata(e)}}},{key:"logAction",value:function(){var e=u.M2.getSourceTypes(this.model);e=o.filter(e,(function(e){return e!==P.r.CustomLibrary}));var t={videoSourceTypes:o.sortBy(o.unique(e),(function(e){return e})).join(","),videoId:this.model.get("id"),metadataProperty:this.selectedMetadata.get("metadataType"),metadataPropertyValue:this.selectedMetadata.get("metadataValue"),suggestion:this.viewModel.get("suggestion"),reason:this.viewModel.get("reason")};c.k.logUserAction(t,{descriptor:l.SuggestionDescriptor.Edit,location:l.LocationContext.Popup,actionType:l.UserAction.Suggest,entity:l.EntityType.Video})}},{key:"dataFetched",value:function(){return!!this.model&&!!this.ratingCollection}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new k.H({collection:x.uB.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||r.T.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:c.k}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new H({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new m.i(this.ratingCollection.findWhere({name:this.viewModel.get("ratingSuggestion")})):null,metadataType:this.selectedMetadata.get("metadataType"),metadataValue:this.selectedMetadata.get("metadataValue"),ratingValidationMessage:this.getRatingValidationMessage()}))}},{key:"onBeforeRender",value:function(){this.dataFetched()||(this.model=this.videoDataService.getVideo(this.options.videoId),this.ratingCollection=this.ratingsDataService.getAllRatings()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:u.Kp.getSpinner({size:u.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}}])&&G(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(i.Q.View)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return d}});var o=n(39479),r=n(31647),i=n(55142);function a(e){return a="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},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function c(e,t){if(t&&("object"===a(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)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}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&&l(e,t)}(p,e);var t,n,r,a,d=(r=p,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=u(r);if(a){var n=u(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),d.call(this,e)}return t=p,n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,r="dropdown-menu-".concat(n);return o&&(r="".concat(r," ").concat(o)),r}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],n&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.ComponentCollection)},26357:function(e,t,n){"use strict";n.d(t,{H:function(){return g}});var o=n(39479),r=n(48088),i=n(31647),a=n(71641),s=n(61843),l=n(46635),c=n.n(l),u={dropdownMenu:"oKdKI",selectButton:"fTeoW",disabled:"gZbQ4"};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 p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,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,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)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var g=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)}(g,e);var t,n,i,l,d=(i=g,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=y(i);if(l){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function g(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),(t=d.call(this,e)).selectSearch="",t.sameCharIndex=1,t.optionStep=1,t}return t=g,n=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){s.yV.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(s.yV.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(s.yV.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),r.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=s.yV.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=s.yV.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(s.yV.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=o.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=o.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var r=n[this.sameCharIndex];return r||(r=o.first(n),this.sameCharIndex=0),this.sameCharIndex++,r}return o.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!o.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(r))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=s.yV.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:u,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.w({collection:this.collection,channelName:this.options.channelName,childOptions:o.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(u.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}],n&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),g}(i.Q.Component)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return d}});var o=n(31647),r=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function c(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)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}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&&l(e,t)}(p,e);var t,n,o,i,d=(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=u(o);if(i){var n=u(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function p(){return a(this,p),d.apply(this,arguments)}return t=p,(n=[{key:"defaults",value:function(){return e={},!0,(t=r.ZV.Disabled)in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e;var e,t}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(o.Q.Model)},19098:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression,s=e.lambda;return'<p class="font-weight-bold mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(i=null!=t?t.options:t)?i.metadataType:i},data:r}))+'</p>\r\n<p class="mb-3 '+a(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.metadataValue:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.metadataValue:i,t))?i:"")+"</p>\r\n"},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,' <textarea\r\n id="suggest-edit"\r\n placeholder="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.suggestionPlaceholder:i,t))+'"\r\n class="form-control"\r\n name="suggestion"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.isOtherType:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n<div class="dropdown-divider"></div>\r\n\r\n<div class="form-group">\r\n <label for="suggest-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"suggestionSubheading",{name:"lang",hash:{},data:r}))+'</label>\r\n <div class="rating-select-region"></div>\r\n <div class="rating-form-feedback invalid-feedback"></div>\r\n'+(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.useRatingSelect:i,{name:"unless",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+'</div>\r\n\r\n<div class="form-group">\r\n <label for="reason-for-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"reasoningSubheading",{name:"lang",hash:{},data:r}))+'</label>\r\n <textarea\r\n id="reason-for-edit"\r\n placeholder="'+l((n.lang||t&&t.lang||s).call(a,"reasoningPlaceholder",{name:"lang",hash:{},data:r}))+'"\r\n class="form-control"\r\n name="reason"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},34651:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(i,"guidelines",{name:"lang",hash:{},data:r}))+'</p>\r\n<p class="font-weight-bold mb-1">'+s((n.lang||t&&t.lang||a).call(i,"dropdownHeading",{name:"lang",hash:{},data:r}))+'</p>\r\n<div class="metadata-dropdown-region position-relative"></div>\r\n<div class="suggest-edit-region"></div>\r\n'},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:""},useData:!0})},46635:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,o,r){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<button \r\n class="dropdown-toggle form-control btn-block text-left position-relative '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectButton:i,t))+" "+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'" \r\n type="button" \r\n id="dropdownMenuButton" \r\n data-toggle="dropdown" \r\n aria-haspopup="true" \r\n aria-expanded="false"\r\n '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' \r\n name="'+s(a(null!=(i=null!=t?t.options:t)?i.inputName:i,t))+'"\r\n >\r\n '+s(a(null!=(i=null!=t?t.options:t)?i.placeholderText:i,t))+'\r\n</button>\r\n<div class="dropdown-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5047],{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={}))},79641:function(e,t,n){"use strict";n.r(t),n.d(t,{VideoDetailsView:function(){return Le}});var r,o=n(39479),i=n.n(o),c=n(31647);!function(e){e.AU="content-ap-southeast-1",e.NZ="content-ap-southeast-2",e.UK="content-eu-west-1",e.SCOT="content-eu-west-2",e.US="content-na-central-1",e.GLOBAL="content-global"}(r||(r={}));var s=n(30305),l=n(70065),a=n(6681),u=n(56210),f=n(61843),p=n(66882),d={svgContainer:"qOHRG"},h=n(86745),y=n.n(h);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 m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function g(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)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(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&&v(e,t)}(h,e);var t,n,r,i,c=(r=h,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=w(r);if(i){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(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),c.call(this,e)}return t=h,(n=[{key:"name",get:function(){return"VideoHeaderComponent"}},{key:"template",get:function(){return y()}},{key:"className",get:function(){return"d-flex align-items-center justify-content-between p-3 w-100"}},{key:"behaviors",get:function(){return[{behaviorClass:u.H,selector:".".concat(d.svgContainer)}]}},{key:"regions",value:function(){return{actions:{el:".video-actions-region",replaceElement:!1}}}},{key:"viewOptions",value:function(){return{styles:d,lockSvg:a.Nj.getSvg(a.vn.Lock),hasRestriction:!o.isUndefined(this.model.get("restrictions")),restrictionMessage:f.S9.getRestrictionTooltipMessage(this.model)}}},{key:"onRender",value:function(){this.showChildView("actions",new p.R({model:this.model,showActionLabels:!0,application:s.OV.LIBRARY_EDITOR,customerHasLocalCache:this.options.customerHasLocalCache,customerHasExchange:this.options.customerHasExchange,collectionIdentifier:this.options.collectionIdentifier,routeToFolderOnDelete:!0,analyticsOptions:{entity:l.EntityType.Video,location:l.LocationContext.VideoDetailsHeader,descriptor:l.OperationDescriptor.Single},config:this.options.config}))}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(c.Q.Component),k=n(77605),E=n(51184),C=n(7427),j=n(9484),S=n(45837),R=n(44391),P=n(70042),_=n(26457),I=n(17349),x=n.n(I),T={interactive:"N1mrU"};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 D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L(e,t){return L=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},L(e,t)}function B(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}var U=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(e,t)}(c,e);var t,n,r,o,i=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=A(r);if(o){var n=A(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return B(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),i.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.isClickViewContent=this.model&&!f.BK.canEditVideo(this.model)}},{key:"name",get:function(){return"VideoSidebarInfoComponent"}},{key:"lang",get:function(){return"libraryEditor.videoSidebarInfo"}},{key:"className",get:function(){return"py-3 h-100"}},{key:"template",get:function(){return x()}},{key:"regions",value:function(){return{preview:{el:".video-preview-region",replaceElement:!0},folders:{el:".folders-region",replaceElement:!0},tags:{el:".tags-region",replaceElement:!0}}}},{key:"requiredResources",get:function(){return{currentUser:j.K.currentUser}}},{key:"renderVideoPreview",value:function(){this.showChildView("preview",new E.c({model:this.model,webPlayerUrl:this.options.webPlayerUrl,channelName:this.options.channelName,analyticsOptions:{location:l.LocationContext.VideoDetails},currentUser:this.options.currentUser,createViewKey:this.options.createViewKey,playerApiUrl:this.options.playerApiUrl}))}},{key:"renderTags",value:function(){this.model.get("tags")&&this.model.get("tags").length&&this.showChildView("tags",new R.K({collection:this.model.get("tags"),orientation:_.zM.Flex,behavior:_.Dm.Link}))}},{key:"renderFolders",value:function(){this.model.get("categories")&&this.model.get("categories").length&&this.showChildView("folders",new C.V({model:this.model,libraries:this.options.libraries,showFolder:!0,hideLabel:!0}))}},{key:"viewOptions",value:function(){return{styles:T,interactive:P.u.isInteractive(this.model),duration:f.T.ToDisplayDuration(this.model.get("duration")),folders:this.model.categories&&this.model.categories.length,multipleFolders:this.model.categories.length>1,tags:this.model.get("tags")&&this.model.get("tags").length,isClickViewContent:this.isClickViewContent,hasCustomerTags:this.isClickViewContent&&f.BK.filterObjectsByOwnerType(this.model.tags,S.N.Customer,this.options.currentUser.get("customerId")).length}}},{key:"onRender",value:function(){this.renderVideoPreview(),this.renderTags(),this.renderFolders()}}])&&D(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(c.Q.Component),M=n(70693),N=n(68708),F=n(63122),H=n(57085),K=n(23130),Q=n(10386),J=n.n(Q),q=n(90118),z=n.n(q),X={columnNames:"Hs0Sh"};function Y(e){return Y="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},Y(e)}function Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function G(e,t,n){return t&&W(e.prototype,t),n&&W(e,n),Object.defineProperty(e,"prototype",{writable:!1}),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&&ee(e,t)}function ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}function te(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=re(e);if(t){var o=re(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ne(this,n)}}function ne(e,t){if(t&&("object"===Y(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)}function re(e){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},re(e)}var oe=function(e){$(n,e);var t=te(n);function n(){return Z(this,n),t.apply(this,arguments)}return G(n,[{key:"name",get:function(){return"FieldComponent"}},{key:"template",get:function(){return J()}},{key:"className",get:function(){return"row mb-0"}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{styles:X}}},{key:"renderDescription",value:function(){this.model.get("value")&&this.showChildView("description",new K.Z({model:new c.Q.Model({description:this.model.get("value")}),linkify:!0,size:K.t.Large,truncate:!0,allowExpand:!0}))}},{key:"onRender",value:function(){this.renderDescription()}}]),n}(c.Q.Component),ie=function(e){$(n,e);var t=te(n);function n(){return Z(this,n),t.apply(this,arguments)}return G(n,[{key:"name",get:function(){return"FieldsComponentCollection"}},{key:"childView",get:function(){return oe}}]),n}(c.Q.ComponentCollection),ce=function(e){$(n,e);var t=te(n);function n(){return Z(this,n),t.apply(this,arguments)}return G(n,[{key:"name",get:function(){return"FieldsComponent"}},{key:"template",get:function(){return z()}},{key:"className",get:function(){return"py-3 border-top"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new ie({collection:this.collection}))}}]),n}(c.Q.Component),se=n(21251),le=n(21679),ae=n(33800),ue=n(48404),fe=n(17422),pe=n(75535),de=n(99748),he=n(53854),ye=n(95061),be=n(3059),me=n(57857),ve=n(26835),ge=n.n(ve),we={licenseContainer:"eHMZ_",license:"I0iMx",era:"qgIXx"};function Oe(e){return Oe="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},Oe(e)}function ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ee(e,t){return Ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ee(e,t)}function Ce(e,t){if(t&&("object"===Oe(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)}function je(e){return je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},je(e)}var Se=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&&Ee(e,t)}(s,e);var t,n,o,i,c=(o=s,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=je(o);if(i){var n=je(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ce(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),c.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"ScreenrightsDisclaimerComponent"}},{key:"template",get:function(){return ge()}},{key:"lang",get:function(){return"shared.screenrightsDisclaimer"}},{key:"className",get:function(){return"py-3 border-top"}},{key:"getLogoClass",value:function(){return f.mU.isInContentRegion(this.options.contentRegion,r.UK)?we.era:""}},{key:"getLicenseText",value:function(){switch(this.options.contentRegion){case r.UK:return me.T.getPhrase(this.lang,"era");case r.AU:return me.T.getPhrase(this.lang,"copyrightAct");case r.NZ:default:return""}}},{key:"viewOptions",value:function(){var e=f.mU.isInContentRegion(this.options.contentRegion,r.AU);return{styles:we,logoClass:this.getLogoClass(),labelText:e?me.T.getPhrase(this.lang,"labelAu"):"",licenseText:this.getLicenseText()}}}])&&ke(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(c.Q.Component),Re=n(91865),Pe=n.n(Re),_e=n(59054);function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Te(e,t){return Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Te(e,t)}function Ve(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}var Le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Te(e,t)}(u,e);var t,n,o,l,a=(o=u,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=De(o);if(l){var n=De(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ve(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),a.call(this,e)}return t=u,n=[{key:"initialize",value:function(){this.bindListeners(),this.videoDataService=le.u.getInstance(ae.O.Video,this),this.videoMixinService=le.u.getInstance(ae.K.VideoMixin,this),this.localCacheDataService=le.u.getInstance(ae.O.LocalCache,this),this.playerDataService=le.u.getInstance(ae.O.Player,this),this.createViewKey=this.createViewKey.bind(this)}},{key:"bindListeners",value:function(){this.listenTo(s.Vk.VIDEO,"".concat(se.M.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(s.Vk.VIDEO,"".concat(se.M.VIDEOS,":").concat(this.options.videoId,":error"),this.onError),this.listenTo(s.Vk.VIDEO,"".concat(se.M.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(s.Vk.VIDEO,"cache:cleared",this.render),this.listenTo(s.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(s.Vk.RESTRICTED_VIDEO,"".concat(se.M.UPDATE_VIDEO_RESTRICTION,":sync"),this.updateRestriction),this.listenTo(s.Vk.RESTRICTED_VIDEO,"".concat(se.M.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(s.Vk.LOCAL_CACHE,"".concat(se.M.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(s.Vk.LOCAL_CACHE,"".concat(se.M.LOCAL_CACHE_DEVICES,":error"),this.onError)}},{key:"name",get:function(){return"VideoDetailsView"}},{key:"title",get:function(){return this.video&&this.video.get("name")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return Pe()}},{key:"className",get:function(){return"container-fluid h-100 bg-white rounded"}},{key:"onError",value:function(e){switch(e.type){case de.h.NotFound:c.Q.ErrorHelper.throw(new pe.l);break;case de.h.Forbidden:c.Q.ErrorHelper.throw(new he.a)}}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1},header:{replaceElement:!0,el:".video-header-region",partialLoading:fe.LP.VideoHeader},main:{replaceElement:!0,el:".main-video-information-region",partialLoading:fe.LP.VideoSidebarInfo},basic:{replaceElement:!1,el:".basic-video-information-region",partialLoading:fe.LP.VideoBasicInfo},chapters:{replaceElement:!0,el:".video-chapters-region"},resources:{replaceElement:!0,el:".video-resources-region"},fields:{replaceElement:!0,el:".fields-region"},links:{replaceElement:!0,el:".video-links-region"},screenrightsDisclaimer:{replaceElement:!0,el:".screenright-disclaimer-region"}}}},{key:"updateRestriction",value:function(){this.videoMixinService.getAndMixinVideoRestriction(this.video)}},{key:"showLicense",value:function(){return!(!this.video||f.mU.isInContentRegion(this.currentUser.get("contentRegion"),r.NZ)||(!this.video.get("channel")||!this.video.get("channel").get("id"))&&!this.video.get("dateBroadcast"))}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,_e.f.MasterObject,t)}},{key:"getCustomLibraryFolders",value:function(){var e;if(!(null===(e=this.video)||void 0===e?void 0:e.categories)||!this.libraries)return[];var t=this.libraries.reduce((function(e,t){return e[t.id]=!0,e}),{});return this.video.categories.filter((function(e){var n=e.libraries.first().get("id");return t[n]}))}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.showChildView("breadcrumbs",new H.n({folder:this.folder,libraries:this.libraries,enableLastItemAppLink:!0}))}},{key:"renderVideoHeader",value:function(){this.showChildView("header",new O({model:this.video,customerHasLocalCache:f.o8.customerHasLocalCache(this.devices,this.currentUser.get("customerId")),customerHasExchange:this.exchanges.any(),collectionIdentifier:this.folder&&new be.F7(this.folder.id,f.x$.GetCurrentSortType()),config:this.config}))}},{key:"renderSidebarInfo",value:function(){this.showChildView("main",new U({model:this.video,webPlayerUrl:this.config.get("webPlayerUrl"),channelName:this.channelName,currentUser:this.currentUser,createViewKey:this.createViewKey,playerApiUrl:this.config.get("playerApiUrl"),libraries:this.libraries}))}},{key:"renderBasicInfo",value:function(){this.video&&this.showChildView("basic",new F.S({model:this.video,showHeading:!0,config:this.config}))}},{key:"renderFields",value:function(){this.video.fields&&this.video.fields.length&&this.showChildView("fields",new ce({collection:this.video.fields}))}},{key:"renderChapters",value:function(){var e=this.video.chapters;e&&e.length>0&&this.showChildView("chapters",new M.Q({channelName:this.channelName,collection:this.video.chapters}))}},{key:"renderResources",value:function(){var e=this.video.resources;e&&e.length>0&&this.showChildView("resources",new k.c({model:this.video}))}},{key:"renderLinks",value:function(){var e=this.video.links;e&&e.length&&this.showChildView("links",new N.c({model:this.video,headingText:"Links"}))}},{key:"renderScreenrightsDisclaimer",value:function(){this.showLicense()&&this.showChildView("screenrightsDisclaimer",new Se({contentRegion:this.currentUser.get("contentRegion")}))}},{key:"requiredResources",get:function(){return{config:ue.p.config,currentUser:j.K.currentUser,libraries:ye.T.libraries,exchanges:ye.T.exchanges}}},{key:"onBeforeRender",value:function(){return this.video=this.videoDataService.getVideo(this.options.videoId),this.video&&(this.folder=i().first(this.getCustomLibraryFolders())),this.devices=this.localCacheDataService.getDevices(this.currentUser.get("customerId")),!!this.video}},{key:"viewOptions",value:function(){if(this.video){var e=this.video,t=e.chapters,n=e.resources,r=e.fields,o=e.links;return{hasFolder:!!this.folder,hasChapters:t&&t.length,hasResources:n&&n.length,hasFields:r&&r.length,hasLinks:o&&o.length,showScreenrightsDisclaimer:this.showLicense()}}}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderVideoHeader(),this.renderSidebarInfo(),this.renderBasicInfo(),this.renderFields(),this.renderChapters(),this.renderResources(),this.renderLinks(),this.renderScreenrightsDisclaimer()}}],n&&xe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(c.Q.View)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return S}});var r=n(31647),o=n(93933),i=n.n(o),c=n(86363),s=n.n(c);function l(e){return l="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},l(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(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 h(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=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===l(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)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}var m=function(e){p(n,e);var t=h(n);function n(){return a(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return s()}},{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){p(n,e);var t=h(n);function n(){return a(this,n),t.apply(this,arguments)}return f(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 m}}]),n}(r.Q.ComponentCollection),g=n(22557),w=n(30305);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 k(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function C(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)}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(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&&E(e,t)}(l,e);var t,n,o,c,s=(o=l,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=j(o);if(c){var n=j(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return C(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),s.call(this,e)}return t=l,(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:"getBreadcrumbs",value:function(){this.breadcrumbCollection=new r.Q.Collection;var e,t=this.options.folder;do{if(e=g.P.getParent(t.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(t,!!e),{at:0}),!e)break;t=e}while(e);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:w.OV.LIBRARY_EDITOR,action:w.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?w.eX.LibraryEditor.FOLDER:w.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:w.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new v({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&k(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.Component)},3059:function(e,t,n){"use strict";n.d(t,{KX:function(){return R},IJ:function(){return y},xw:function(){return O},F7:function(){return r.F}});var r=n(1091),o=n(39479),i=n(33303),c=n(30305),s=n(44937),l=n(39090);function a(e){return a="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},a(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function d(e,t){if(t&&("object"===a(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)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(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&&p(e,t)}(y,e);var t,n,r,i,a=(r=y,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=h(r);if(i){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(this,e)});function y(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),(t=a.call(this,{collectionPrefix:"".concat(c.M_.RECENT_VIDEOS,":collection"),cursor:e.cursor,sort:e.sort})).setAdditionalData(e),t}return t=y,(n=[{key:"setAdditionalData",value:function(e){var t=e.libraryIds,n=e.dateQueryString,r=e.subjects;t&&(this.libraryIds=t),r&&(o.isArray(r)&&r.length&&(this.subjects=r),o.isArray(r)||(this.subjects=[r]));var i=o.findWhere(l.US,{queryString:n})||l.U1;this.dateOption=new s.Wx(i)}},{key:"toString",value:function(){var e,t=this.subjects&&this.subjects.length&&this.subjects.map((function(e){return escape(e.get("name"))}))||[];return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].concat((e=t,function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[this.cursor]).filter(Boolean).join(":")}},{key:"toParams",value:function(){var e={};return this.libraryIds&&(e.libraryIds=this.libraryIds),this.dateOption&&(e.from=this.dateOption.get("from"),e.to=this.dateOption.get("to")),this.subjects&&(e.subjectIds=o.flatten(this.subjects.map((function(e){return e.get("subjectIds")})))),this.cursor&&(e.cursor=this.cursor),e}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),y}(i.J);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 m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function g(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)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(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&&v(e,t)}(u,e);var t,n,r,i,a=(r=u,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=w(r);if(i){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=a.call(this,{collectionPrefix:"".concat(c.M_.RECENT_SUBJECTS,":collection"),sort:e.sort})).setAdditionalData(e),t}return t=u,(n=[{key:"setAdditionalData",value:function(e){var t=e.libraryIds,n=e.dateQueryString;t&&(this.libraryIds=t);var r=o.findWhere(l.US,{queryString:n})||l.U1;this.dateOption=new s.Wx(r)}},{key:"toString",value:function(){return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].filter(Boolean).join(":")}},{key:"toParams",value:function(){var e={};return this.libraryIds&&(e.libraryIds=this.libraryIds),this.dateOption&&(e.from=this.dateOption.get("from"),e.to=this.dateOption.get("to")),e}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.J);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 E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function j(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)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}var R=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)}(i,e);var t,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(n);if(r){var o=S(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return j(this,e)});function i(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return E(this,i),o.call(this,{collectionPrefix:c.M_.FOLDERS,id:e,sort:t,cursor:n})}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(i.J)},86745:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.lambda,s=e.escapeExpression;return' <span class="d-inline-block ml-2 '+s(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'" title="'+s(c(null!=(i=null!=t?t.options:t)?i.restrictionMessage:i,t))+'">'+(null!=(i=c(null!=(i=null!=t?t.options:t)?i.lockSvg:i,t))?i:"")+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c,s=null!=t?t:e.nullContext||{};return'<div class="d-inline-flex align-items-center">\r\n <h4 class="d-inline-block mb-0">'+e.escapeExpression("function"==typeof(c=null!=(c=n.name||(null!=t?t.name:t))?c:e.hooks.helperMissing)?c.call(s,{name:"name",hash:{},data:o}):c)+"</h4>\r\n"+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.hasRestriction:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="video-actions-region d-inline-block"></div>'},useData:!0})},17349:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.escapeExpression;return' <span class="badge p-1 '+c(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.interactive:i,t))+'">'+c((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"interactive",{name:"lang",hash:{},data:o}))+"</span>\r\n"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,' <div class="mt-3">\r\n <h5>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"folders",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.folders:i},data:o}))+'</h5>\r\n <div class="folders-region"></div>\r\n </div>\r\n'},5:function(e,t,n,r,o){return e.propertyIsEnumerable,' <div class="mt-3">\r\n <h5>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"tags",{name:"lang",hash:{},data:o}))+'</h5>\r\n <div class="tags-region"></div>\r\n </div>\r\n'},7:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=e.escapeExpression;return' <div class="mt-3">\r\n <h5>'+c((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"curriculumLinks",{name:"lang",hash:{},data:o}))+"</h5>\r\n <p>"+c(e.lambda(null!=(i=null!=t?t.options:t)?i.links:i,t))+"</p>\r\n </div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=null!=t?t:e.nullContext||{};return'<div class="border-right h-100 pl-2 pr-3">\r\n <div class="video-preview-region"></div>\r\n <div class="mt-3">\r\n'+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.interactive:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+" </div>\r\n\r\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.folders:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.tags:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.links:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")+"</div>"},useData:!0})},91865:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return'<div class="row pl-3 pt-3 pr-3">\r\n <div class="breadcrumbs-region"></div>\r\n</div>\r\n'},3:function(e,t,n,r,o){return' <div class="fields-region"></div>\r\n'},5:function(e,t,n,r,o){return' <div class="video-chapters-region"></div>\r\n'},7:function(e,t,n,r,o){return' <div class="video-resources-region"></div>\r\n'},9:function(e,t,n,r,o){return' <div class="video-links-region"></div>\r\n'},11:function(e,t,n,r,o){return' <div class="screenright-disclaimer-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,c=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.hasFolder:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<div class="row border-bottom">\r\n <div class="video-header-region"></div>\r\n</div>\r\n<div class="row">\r\n <div class="col-4">\r\n <div class="main-video-information-region"></div>\r\n </div>\r\n <div class="col-8">\r\n <div class="basic-video-information-region py-3 pr-2"></div>\r\n'+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.hasFields:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.hasChapters:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.hasResources:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.hasLinks:i,{name:"if",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.showScreenrightsDisclaimer:i,{name:"if",hash:{},fn:e.program(11,o,0),inverse:e.noop,data:o}))?i:"")+" </div>\r\n</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})},10386: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){e.propertyIsEnumerable;var i,c,s=e.escapeExpression;return'<div class="col-3 '+s(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+s("function"==typeof(c=null!=(c=n.name||(null!=t?t.name:t))?c:e.hooks.helperMissing)?c.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):c)+'</div>\r\n<div class="col-9">\r\n <div class="description-region"></div>\r\n</div>'},useData:!0})},90118: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'<h5 class="mb-0">Extra Information</h5>\r\n<div class="text-muted mb-3">This information is only visible to admins and will not be searchable</div>\r\n<div class="fields-region"></div>'},useData:!0})},26835: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){e.propertyIsEnumerable;var i,c=e.lambda,s=e.escapeExpression;return'<div class="d-inline-block '+s(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.licenseContainer:i,t))+'">\r\n <div class="'+s(c(null!=(i=null!=t?t.options:t)?i.logoClass:i,t))+'">'+s(c(null!=(i=null!=t?t.options:t)?i.labelText:i,t))+'</div>\r\n <p class="'+s(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.license:i,t))+' bg-white p-2 border box-shadow">\r\n '+(null!=(i=c(null!=(i=null!=t?t.options:t)?i.licenseText:i,t))?i:"")+"\r\n </p>\r\n</div>"},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8343],{96417:function(e,t,n){"use strict";n.d(t,{s:function(){return o},p:function(){return s}});var r=n(57857),i="staffRequests.utils",o={destinationLibrary:function(e){if(!e||!e.id)return r.T.getPhrase(i,"selectLibrary")},destinationFolder:function(e){if(!e||!e.id)return r.T.getPhrase(i,"selectFolder")}},s={message:[{required:!0,msg:function(){return r.T.getPhrase("staffRequests.utils","provideMessage")}}]}},17126:function(e,t,n){"use strict";n.r(t),n.d(t,{StaffRequestsView:function(){return ve}});var r=n(48088),i=n(21679),o=n(57857),s=n(31647),l=n(50028),a=n(51632),c=n(29536),u=n(56371),f=n(30305),d=n(48404),p=n(9484),h=n(17422),y=n(43097),m=n(33192),v=n(23478),g=n.n(v);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 S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(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&&q(e,t)}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},q(e,t)}function E(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=O(e);if(t){var i=O(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return C(this,n)}}function C(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)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var T=function(e){k(n,e);var t=E(n);function n(e){return S(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"StaffRequestItemComponent"}},{key:"template",get:function(){return g()}},{key:"lang",get:function(){return"staffRequests.staffRequestItem"}},{key:"className",get:function(){var e="p-3 border-bottom cursor-pointer ".concat("bhDh_");return this.isSelected()&&(e+=" ".concat("Mwkkb")),e}},{key:"events",value:function(){return{click:"onClick"}}},{key:"isSelected",value:function(){return this.options.selectedRequestId&&this.model.get("id").toString()===this.options.selectedRequestId.toString()}},{key:"onClick",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.EDIT_REQUEST,args:[this.model.get("id")]})}},{key:"viewOptions",value:function(){return{dateRequested:m.parseZone(this.model.get("dateCreated")).local().fromNow(),isSelected:this.isSelected(),firstName:this.model.user.get("name"),lastName:this.model.user.get("surname")}}}]),n}(s.Q.Component),L=function(e){k(n,e);var t=E(n);function n(e){return S(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"StaffRequestListComponent"}},{key:"className",get:function(){return"zc6Jm"}},{key:"childView",get:function(){return T}},{key:"childViewOptions",get:function(){return{selectedRequestId:this.options.selectedRequestId,currentUser:this.options.currentUser}}}]),n}(s.Q.ComponentCollection),_=n(61843),P=n(70065),F=n(88483),I=n(63122),j=n(51184),N=n(70042),A=n(99249),U=n(52076),M=n(22557),D=n(60103),V=n(20072),x=n(36935),Q=n(96417),B=n(79665),H={actions:"fONDA",source:"jgNKp",button:"YExjW"},X=n(93566),K=n.n(X);function J(e){return J="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},J(e)}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function Y(e,t){if(t&&("object"===J(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)}function Z(e){return Z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Z(e)}var G=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&&W(e,t)}(a,e);var t,n,i,o,l=(i=a,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=Z(i);if(o){var n=Z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Y(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),l.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){this.bindListeners(),this.getViewModel();var e=this.viewModel.destinationLibrary&&this.viewModel.destinationLibrary.get("id"),t=e&&this.collection.get(e);this.folderCollection=t?t.children:new D.I,M.P.setSelected(this.folderTreeKey,this.viewModel.destinationFolder,this.folderCollection)}},{key:"name",get:function(){return"StaffRequestActionsComponent"}},{key:"template",get:function(){return K()}},{key:"lang",get:function(){return"staffRequests.staffRequestActions"}},{key:"folderTreeKey",get:function(){return"staff:requests:folder:select"}},{key:"className",get:function(){return"p-3 border-bottom ".concat(H.actions)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.model.get("id"))}},{key:"regions",value:function(){return{librarySelect:{el:".library-select-region",replaceElement:!0},folderSelect:{el:".folder-select-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .approve":"onClickApprove","click .reject":"onClickReject"}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"library:selected",this.onLibrarySelected),this.listenTo(this.channelName,"folder:selected",this.onFolderSelected),this.listenTo(this.channelName,"create:folder:clicked",this.onClickCreateFolder),this.listenTo(this.options.staffRequestsChannel,"select:folder",(function(t){e.onFolderSelected(t),e.render()}))}},{key:"getViewModel",value:function(){var e={},t=this.collection.get(this.model.destinationLibrary);t&&(e.destinationLibrary=t.toJSON());var n=M.P.getModelFromCollection(this.model.destinationFolder.get("id"),this.collection);n&&(e.destinationFolder=n.toJSON()),this.viewModel=A.r.get(this.viewModelName,e,{ctor:x.U}),this.viewModel.addValidation(Q.s);var r=this.viewModel.get("destinationFolder");r&&(r.collection=n.collection)}},{key:"onLibrarySelected",value:function(e){this.viewModel.set("destinationLibrary",e.toJSON()),this.viewModel.unset("destinationFolder"),this.viewModel.set("destinationFolder",{}),M.P.deselectAll(this.folderTreeKey,this.folderCollection),this.folderCollection=e.get("children"),this.renderFolderSelect()}},{key:"onFolderSelected",value:function(e){this.viewModel.set("destinationFolder",e.toJSON()),this.viewModel.get("destinationFolder").collection=e.collection,M.P.setSelected(this.folderTreeKey,e,this.folderCollection)}},{key:"onClickApprove",value:function(){var e=this.model.get("id"),t=this.viewModel.destinationLibrary.get("id"),n=this.viewModel.destinationFolder.get("id");e&&t&&n&&(s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.APPROVE_REQUEST,args:[e,t,n]}),this.logStaffRequestAction(P.UserAction.Approve))}},{key:"onClickReject",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.REJECT_REQUEST,args:[this.model.get("id")]}),this.logStaffRequestAction(P.UserAction.Reject)}},{key:"onClickCreateFolder",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.Shared.NEW_FOLDER,args:[this.viewModel.destinationLibrary.get("id")]}),this.logCreateFolderAction()}},{key:"logStaffRequestAction",value:function(e){var t={location:P.LocationContext.StaffRequestDetails,actionType:e,entity:P.EntityType.StaffRequest,workflowPhase:P.WorkflowPhase.Start},n={id:this.model.get("id"),videoId:this.model.get("video")&&this.model.get("video").get("id"),requestingUserId:this.model.get("user")&&this.model.get("user").get("id"),sourceLibraryId:this.model.get("sourceLibrary")&&this.model.get("sourceLibrary").get("id"),sourceFolderId:this.model.get("sourceFolder")&&this.model.get("sourceFolder").get("id"),destinationLibraryId:this.viewModel.destinationLibrary.get("id"),destinationFolderId:this.viewModel.destinationFolder.get("id")};U.k.logUserAction(n,t)}},{key:"logCreateFolderAction",value:function(){var e={location:P.LocationContext.StaffRequestDetails,actionType:P.UserAction.Create,entity:P.EntityType.Folder,workflowPhase:P.WorkflowPhase.Start},t={libraryId:this.viewModel.destinationLibrary.get("id")};U.k.logUserAction(t,e)}},{key:"renderLibrarySelect",value:function(){this.collection.length<2||this.showChildView("librarySelect",new B.A({collection:this.collection,channelName:this.channelName,currentLibraryId:this.viewModel.destinationLibrary&&this.viewModel.destinationLibrary.get("id"),inputName:"destinationLibrary",placeholderText:this.viewModel.destinationLibrary&&this.viewModel.destinationLibrary.get("name"),disabledLibraryIds:this.options.disabledLibraryIds}))}},{key:"renderFolderSelect",value:function(){this.showChildView("folderSelect",new V.Y({collection:this.folderCollection,channelName:this.channelName,folderTreeKey:this.folderTreeKey,canCreateNew:!0}))}},{key:"viewOptions",value:function(){return{styles:H,sourceLibraryName:N.u.mapSourceToDisplayName(this.model.sourceLibrary),sourceClass:"".concat(H.source," ").concat(N.u.mapSourceToClass(this.model.sourceLibrary.get("type"))),showLibrarySelect:this.collection&&this.collection.length>1}}},{key:"onRender",value:function(){this.renderLibrarySelect(),this.renderFolderSelect(),r.Validation.bind(this,{model:this.viewModel})}}])&&z(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(s.Q.Component),$=n(30639),ee=n.n($),te={avatar:"X2btX",message:"O0vox",interactive:"u4gzP"};function ne(e){return ne="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},ne(e)}function re(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ie(e,t){return ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ie(e,t)}function oe(e,t){if(t&&("object"===ne(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)}function se(e){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},se(e)}var le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(s,e);var t,n,r,i,o=(r=s,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=se(r);if(i){var n=se(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return oe(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),o.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"StaffRequestDetailsComponent"}},{key:"template",get:function(){return ee()}},{key:"lang",get:function(){return"staffRequests.staffRequestDetails"}},{key:"regions",value:function(){return{actions:{el:".request-action-region",replaceElement:!0},preview:{el:".video-preview-region",replaceElement:!1},info:{el:".video-info-region",replaceElement:!1}}}},{key:"getAvatarUrl",value:function(){var e=this.collection&&this.collection.first(),t=e&&e.user&&e.user.avatar;if(t&&t.get("url"))return t.get("url");var n="".concat(this.options.config.get("imageCdnUrl"),"/v1/profile-images?initials=").concat(this.getInitials());return _.jw.createUrl(n,{size:F.h2.Small})}},{key:"getInitials",value:function(){var e=this.collection&&this.collection.first();if(e&&e.user){var t=e.user.get("name"),n=e.user.get("surname");return"".concat(t&&t.trim()[0]).concat(n&&n.trim()[0])}}},{key:"renderActions",value:function(){this.showChildView("actions",new G({model:this.model,collection:this.options.libraryCollection,disabledLibraryIds:this.options.disabledLibraryIds,staffRequestsChannel:this.options.channelName}))}},{key:"renderVideoPreview",value:function(){this.showChildView("preview",new j.c({model:this.model.video,webPlayerUrl:this.options.config.get("webPlayerUrl"),analyticsOptions:{location:P.LocationContext.VideoRequest},currentUser:this.options.currentUser}))}},{key:"renderVideoInfo",value:function(){this.showChildView("info",new I.S({model:this.model.video,config:this.options.config,externalSeriesLink:!0}))}},{key:"viewOptions",value:function(){return{styles:te,avatarUrl:this.getAvatarUrl(),message:this.collection&&this.collection.length&&this.collection.first().toJSON(),interactive:N.u.isInteractive(this.model.video),firstName:this.model.user.get("name"),lastName:this.model.user.get("surname")}}},{key:"onRender",value:function(){this.renderActions(),this.renderVideoPreview(),this.renderVideoInfo()}}])&&re(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(s.Q.Component),ae=n(95061),ce=n(21811),ue=n.n(ce),fe={requestList:"QuZ0B",requestDetails:"keZrR"};function de(e){return de="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},de(e)}function pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function he(e,t){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},he(e,t)}function ye(e,t){if(t&&("object"===de(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)}function me(e){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},me(e)}var ve=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&&he(e,t)}(b,e);var t,n,m,v,g=(m=b,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(e){return!1}}(),function(){var e,t=me(m);if(v){var n=me(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ye(this,e)});function b(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),(t=g.call(this,e)).unavailableLibraryIds=[],t}return t=b,(n=[{key:"initialize",value:function(){this.staffRequestDataService=i.u.getInstance(f.Or.StaffRequests,this),this.videoDataService=i.u.getInstance(f.Or.Video,this),this.options.referrer===a.f.Notification&&this.staffRequestDataService.clearRequestCache(),this.bindListeners()}},{key:"name",get:function(){return"StaffRequestsView"}},{key:"lang",get:function(){return"staffRequests.staffRequests"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"template",get:function(){return ue()}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{requestList:{el:".request-list-region",partialLoading:h.LP.StaffRequestList,replaceElement:!1},requestDetails:{el:".request-details-region",partialLoading:h.LP.StaffRequestDetails,replaceElement:!1},emptyState:{el:".empty-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.o,collectionName:"staffRequestCollection",region:"emptyState",type:h.ub.StaffRequests,shouldRender:c.r.isCollectionEmpty.bind(null,this,"staffRequestCollection"),componentOptions:{description:function(){return e.getEmptyStateDescription()},emptyState:function(){return o.T.getPhrase(e.lang,"emptyStateHeading")}},emptyStateComponents:f.aW}]}},{key:"bindListeners",value:function(){if(this.listenTo(f.Vk.LIBRARY,"folder:created",this.onFolderCreated),this.options.requestId){this.listenTo(f.Vk.STAFF_REQUEST,"cache:cleared",this.render);var e="".concat(f.M_.STAFF_REQUEST_BY_ID,":").concat(this.options.requestId);this.listenTo(f.Vk.STAFF_REQUEST,"".concat(e,":sync"),this.render),this.listenTo(f.Vk.STAFF_REQUEST,"".concat(e,":error"),this.onError),this.listenTo(f.Vk.STAFF_REQUEST,"".concat(f.M_.STAFF_REQUESTS,":invalidate"),this.onUpdate);var t="".concat(f.M_.STAFF_REQUEST_MESSAGES,":").concat(this.options.requestId);this.listenTo(f.Vk.STAFF_REQUEST,"".concat(t,":sync"),this.render),this.listenTo(f.Vk.STAFF_REQUEST,"".concat(t,":error"),this.onError)}}},{key:"onUpdate",value:function(){this.staffRequestCollection=null,this.render()}},{key:"fetchData",value:function(){var e=this;if(this.staffRequestCollection||this.staffRequestDataService.getStaffRequests((function(t){e.staffRequestCollection=t,e.onRequestsSync()})),this.options.requestId&&(this.model=this.staffRequestDataService.getStaffRequest(this.options.requestId),this.staffRequestMessageCollection=this.staffRequestDataService.getMessages(this.options.requestId),this.libraryCollection&&this.libraryCollection.length>1&&this.model&&!this.unavailableLibraryIds.length)){var t=this.model.get("video");this.videoDataService.getLibraries(t.get("id"),(function(t){e.unavailableLibraryIds=t.map((function(e){return e.get("id")+""})),e.render()}))}}},{key:"onRequestsSync",value:function(){var e;this.options.requestId&&(e=this.staffRequestCollection.get(this.options.requestId)),!e&&this.staffRequestCollection.first()?(e=this.staffRequestCollection.first(),s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.EDIT_REQUEST,args:[e.id]},{replace:!0})):this.render()}},{key:"onError",value:function(){this.redirectToHome()}},{key:"onFolderCreated",value:function(e){r.Radio.channel(this.channelName).trigger("select:folder",e),this.render()}},{key:"redirectToHome",value:function(){s.Q.AppLinkHelper.trigger({application:f.OV.STAFF_REQUESTS,action:f.eX.StaffRequests.HOME})}},{key:"getEmptyStateDescription",value:function(){return this.libraryCollection?!this.libraryCollection.length||this.libraryCollection.every((function(e){return e.get("status")!==l.X.Published}))?o.T.getPhrase(this.lang,"emptyStateNoLibraries"):o.T.getPhrase(this.lang,"emptyStateDescription"):""}},{key:"renderRequestList",value:function(){this.staffRequestCollection?this.showChildView("requestList",new L({collection:this.staffRequestCollection,selectedRequestId:this.options.requestId,currentUser:this.currentUser})):this.renderPartialLoading("requestList")}},{key:"renderRequestDetails",value:function(){var e=!!this.libraryCollection,t=e&&!!this.model&&!!this.staffRequestMessageCollection;!this.options.requestId&&!e||this.options.requestId&&!t?this.renderPartialLoading("requestDetails"):this.options.requestId&&this.showChildView("requestDetails",new le({model:this.model,collection:this.staffRequestMessageCollection,libraryCollection:this.libraryCollection,disabledLibraryIds:this.unavailableLibraryIds,config:this.config,channelName:this.channelName,currentUser:this.currentUser}))}},{key:"viewOptions",value:function(){return{styles:fe}}},{key:"requiredResources",get:function(){return{config:d.p.config,libraryCollection:ae.T.libraries,currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!this.model||this.model.get("status")===y.C.Pending||(this.redirectToHome(),!1)}},{key:"onRender",value:function(){this.renderRequestList(),this.renderRequestDetails()}}])&&pe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(s.Q.View)},93566:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable," <span>"+e.escapeExpression(e.lambda(null!=(o=null!=t?t.sourceFolder:t)?o.name:o,t))+"</span>\r\n"},3:function(e,t,n,r,i){return' <div class="form-group m-0 pb-2">\r\n <div class="library-select-region"></div>\r\n </div> \r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression,c=e.lambda;return'<div class="row align-items-center py-2">\r\n <div class="col-3"><strong>'+a((n.lang||t&&t.lang||l).call(s,"source",{name:"lang",hash:{},data:i}))+'</strong></div>\r\n <div class="col-5">\r\n <span class="badge p-1 mr-1 '+a(c(null!=(o=null!=t?t.options:t)?o.sourceClass:o,t))+'">'+a(c(null!=(o=null!=t?t.options:t)?o.sourceLibraryName:o,t))+"</span>\r\n"+(null!=(o=n.if.call(s,null!=(o=null!=t?t.sourceFolder:t)?o.name:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+' </div>\r\n <div class="col-4 text-right">\r\n <button class="btn btn-dark mr-2 '+a(c(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.button:o,t))+' approve" type="button">'+a((n.lang||t&&t.lang||l).call(s,"approve",{name:"lang",hash:{},data:i}))+'</button>\r\n <button class="btn btn-outline-dark '+a(c(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.button:o,t))+' reject" type="button">'+a((n.lang||t&&t.lang||l).call(s,"reject",{name:"lang",hash:{},data:i}))+'</button>\r\n </div>\r\n</div>\r\n<div class="row align-items-center py-2">\r\n <div class="col-3"><strong>'+a((n.lang||t&&t.lang||l).call(s,"moveVideo",{name:"lang",hash:{},data:i}))+'</strong></div>\r\n <div class="col-5">\r\n'+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.showLibrarySelect:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+' <div class="form-group m-0">\r\n <div class="folder-select-region"></div>\r\n </div> \r\n </div>\r\n</div>'},useData:!0})},30639:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=e.lambda,l=e.escapeExpression;return'<div class="border-bottom">\r\n <div class="d-inline-block mr-2 '+l(s(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.avatar:o,t))+'" style="background-image: url(\''+l(s(null!=(o=null!=t?t.options:t)?o.avatarUrl:o,t))+'\')">\r\n &nbsp\r\n </div>\r\n <div class="d-inline-block">\r\n <p>'+(null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"requestNote",{name:"lang",hash:{lastName:null!=(o=null!=t?t.options:t)?o.lastName:o,firstName:null!=(o=null!=t?t.options:t)?o.firstName:o},data:i}))?o:"")+'</p>\r\n <p class="pl-2 '+l(s(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.message:o,t))+'">'+l(s(null!=(o=null!=(o=null!=t?t.options:t)?o.message:o)?o.message:o,t))+"</p>\r\n </div> \r\n</div>\r\n"},3:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=e.escapeExpression;return'<span class="badge p-1 '+s(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.interactive:o,t))+'">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"interactive",{name:"lang",hash:{},data:i}))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=null!=t?t:e.nullContext||{};return'<div class="request-action-region"></div>\r\n<div class="p-3">\r\n'+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.message:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+'<div class="video-preview-region responsize-img col-7 pt-3 pb-2 px-0">\r\n <img class="img-fluid cursor-pointer" src="'+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.video:t)?o.thumbnail:o)?o.url:o,t))+'"/>\r\n</div>\r\n'+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.interactive:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+'<div class="video-info-region py-1"></div>\r\n</div>'},useData:!0})},23478:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){return" text-muted"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s,l=e.lambda,a=e.escapeExpression,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<h6 class="mb-1">'+a(l(null!=(o=null!=t?t.video:t)?o.name:o,t))+'</h6>\r\n<p class="m-0">'+a((n.lang||t&&t.lang||u).call(c,"request",{name:"lang",hash:{lastName:null!=(o=null!=t?t.options:t)?o.lastName:o,firstName:null!=(o=null!=t?t.options:t)?o.firstName:o},data:i}))+'</p>\r\n<time class="m-0'+(null!=(o=n.unless.call(c,null!=(o=null!=t?t.options:t)?o.isSelected:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+'" datetime='+a("function"==typeof(s=null!=(s=n.dateCreated||(null!=t?t.dateCreated:t))?s:u)?s.call(c,{name:"dateCreated",hash:{},data:i}):s)+">"+a(l(null!=(o=null!=t?t.options:t)?o.dateRequested:o,t))+"</time"},useData:!0})},21811:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,s=e.escapeExpression,l=e.lambda;return'<div class="border-bottom">\r\n <h1 class="h3 p-3 m-0">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"staffRequests",{name:"lang",hash:{},data:i}))+'</h1>\r\n</div>\r\n<div class="request-list-region border-right d-inline-block '+s(l(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.requestList:o,t))+'"></div><div class="request-details-region border-left d-inline-block '+s(l(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.requestDetails:o,t))+'"></div>\r\n<div class="empty-region"></div>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8726],{48726:function(e,t,n){"use strict";n.d(t,{R:function(){return B}});var o=n(39479),r=n(48088),i=n(31647),l=n(56210),a=n(2214),u=n(50226),c=n.n(u),s={selectRating:"c7657",removeRating:"CETrw",disabled:"GZBl3",disabledSelected:"rDW1U"};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function d(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var b=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&&y(e,t)}(u,e);var t,n,o,i,a=(o=u,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=h(o);if(i){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(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),a.call(this,e)}return t=u,(n=[{key:"name",get:function(){return"SelectRatingItemComponent"}},{key:"template",get:function(){return c()}},{key:"tagName",get:function(){return"li"}},{key:"attributes",get:function(){return{title:this.options.editable?this.model.get("name"):""}}},{key:"className",get:function(){var e="cursor-pointer btn";return this.options.editable?e+=this.model.get("selected")?" btn-dark":" btn-outline-dark":e+=" ".concat(s.disabled," ")+(this.model.get("selected")?s.disabledSelected:""),e}},{key:"events",value:function(){return{click:"onClick"}}},{key:"behaviors",get:function(){var e=this.options.editable?this.options.model.get("name"):"";return[{behaviorClass:l.H,title:e}]}},{key:"onClick",value:function(){this.options.editable&&r.Radio.channel(this.options.channelName).trigger("select:rating",this.model)}},{key:"onRender",value:function(){this.resetClassName()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.Q.Component);function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function m(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function w(e,t){if(t&&("object"===g(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)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(l,e);var t,n,o,r,i=(o=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=k(o);if(r){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return w(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"SelectRatingCollectionComponent"}},{key:"tagName",get:function(){return"ul"}},{key:"className",get:function(){return"rating-group btn-group p-0 m-0"}},{key:"childView",get:function(){return b}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,currentRatingId:this.options.currentRatingId,editable:this.options.editable}}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.Q.ComponentCollection),O=n(61843),C=n(57857),j=n(30305),S=n(40622),_=n(61057),E=n.n(_),x=n(45092);function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function T(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}function D(e,t){if(t&&("object"===P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}var B=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(f,e);var t,n,i,u,c=(i=f,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=I(i);if(u){var n=I(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return D(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),c.call(this,e)}return t=f,(n=[{key:"name",get:function(){return"SelectRatingComponent"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"shared.selectRating"}},{key:"events",value:function(){return{"click .remove-rating":"onRemoveRating"}}},{key:"regions",value:function(){return{ratings:{el:".ratings-region",replaceElement:!0}}}},{key:"template",get:function(){return E()}},{key:"behaviors",get:function(){return[{behaviorClass:l.H,selector:".remove-rating",title:C.T.getPhrase(this.lang,"removeTooltip")}]}},{key:"appLinks",get:function(){return{".suggest-rating":{application:j.OV.LIBRARY_EDITOR,action:j.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.options.videoId],params:{metadata:S.MetadataType.Rating}}}}},{key:"defaults",get:function(){return{editable:!0}}},{key:"initialize",value:function(){this.setViewCollection(),this.setCurrentRating(this.model),this.bindListeners()}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:rating",this.onRatingSelected)}},{key:"setCurrentRating",value:function(e){O.hD.setRating(e,this.viewCollection)}},{key:"onRatingSelected",value:function(e){this.setCurrentRating(e);var t=O.yV.getSelected(this.viewCollection);this.updateRating(t)}},{key:"onRemoveRating",value:function(e){e.preventDefault(),this.$(".remove-rating").tooltip("dispose"),this.setCurrentRating(null);var t=this.collection.findWhere({value:0});return this.updateRating(t),!1}},{key:"updateRating",value:function(e){r.Radio.channel(this.options.parentChannelName).trigger("select:rating",e),this.render()}},{key:"setViewCollection",value:function(){var e=o.filter(this.collection.toJSON(),(function(e){return 0!==e.value}));return this.viewCollection=new a.N(e)}},{key:"viewOptions",value:function(){var e=O.yV.getSelected(this.viewCollection);return{styles:o.extend(x.Z,s),showRemove:!this.options.hideRemove&&e&&this.options.editable,editable:this.options.editable,hideHeaderText:this.options.hideHeaderText}}},{key:"renderRatingCollectionComponent",value:function(){this.showChildView("ratings",new R({collection:this.viewCollection,channelName:this.channelName,editable:this.options.editable}))}},{key:"onRender",value:function(){this.renderRatingCollectionComponent()}}])&&T(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(i.Q.Component)},61057:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return' <label class="'+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"unless",hash:{},fn:e.program(2,r,0),inverse:e.noop,data:r}))?i:"")+'">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"rating",{name:"lang",hash:{},data:r}))+"</label>\r\n "+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"unless",hash:{},fn:e.program(4,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n"},2:function(e,t,n,o,r){return"d-inline-block"},4:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression;return'<span class="'+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.suggestEdit:i,t))+'">- <a class="suggest-rating">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:r}))+"</a></span><br>"},6:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression;return'<span class="text-muted mx-2 remove-rating '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.removeRating:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"remove",{name:"lang",hash:{},data:r}))+"</span>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<div class="edit-rating form-group '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectRating:i,t))+" "+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.rating:i,t))+'">\r\n'+(null!=(i=n.unless.call(u,null!=(i=null!=t?t.options:t)?i.hideHeaderText:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+' <div>\r\n <div class="ratings-region" name="rating"></div>\r\n '+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.showRemove:i,{name:"if",hash:{},fn:e.program(6,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n <div class="form-feedback"></div>\r\n </div>\r\n</div>'},useData:!0})},50226:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,"\r\n"+e.escapeExpression("function"==typeof(i=null!=(i=n.code||(null!=t?t.code:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"code",hash:{},data:r}):i)},useData:!0})},45092:function(e,t){"use strict";t.Z={requiredStar:"BEwab",disabled:"N9ljx",formGroup:"dj5U0",suggestEdit:"DYJhs",programTitle:"HokbM",description:"Rg7xy",seriesTitle:"dgLz_",broadcastDate:"Wfedn",channel:"xGyC8",rating:"WIpKi",productionYear:"MHLLN",distributors:"TQxQ2",productionCompanies:"T9n2B",directors:"iFUiE",producers:"w4lSY",episodeNumber:"FkpUz",seasonNumber:"HDpHM",icon:"S2rQf",infoSvgContainer:"s96rB"}}}]);