@clickview/library-editor 1.65.0 → 1.66.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/css/{2781-library-editor-054108e3bf.chunk.css → 3264-library-editor-0824c2cd1d.chunk.css} +1 -0
  3. package/dist/languages/en.json +1 -1
  4. package/dist/scripts/2501-5d82e9c675.chunk.js +1 -0
  5. package/dist/scripts/3236-63f5d38f36.chunk.js +2 -0
  6. package/dist/scripts/3264-337048423c.chunk.js +2 -0
  7. package/dist/scripts/336-dde446dfaf.chunk.js +2 -0
  8. package/dist/scripts/4796-eaab927115.chunk.js +2 -0
  9. package/dist/scripts/5736-37d023a164.chunk.js +1 -0
  10. package/dist/scripts/6768-1f9104b843.chunk.js +1 -0
  11. package/dist/scripts/{7197-46b37cfd17.chunk.js → 7197-9844ed1bcf.chunk.js} +1 -1
  12. package/dist/scripts/7366-bc6a7ef0e8.chunk.js +1 -0
  13. package/dist/scripts/7416-edf8d1f3f8.chunk.js +1 -0
  14. package/dist/scripts/9219-47bdf44aaa.chunk.js +1 -0
  15. package/dist/scripts/9743-9772fe6a86.chunk.js +1 -0
  16. package/dist/scripts/{9766-22dd736844.chunk.js → 9766-b592857ba3.chunk.js} +1 -1
  17. package/dist/scripts/bundle-30d7a6318d.min.js +2 -0
  18. package/package.json +1 -1
  19. package/dist/scripts/2781-080a819ebe.chunk.js +0 -2
  20. package/dist/scripts/3236-a985af0d70.chunk.js +0 -2
  21. package/dist/scripts/336-8e8eca3760.chunk.js +0 -2
  22. package/dist/scripts/4796-be2517a0f4.chunk.js +0 -2
  23. package/dist/scripts/6591-04a4414733.chunk.js +0 -1
  24. package/dist/scripts/6697-72ac40931d.chunk.js +0 -1
  25. package/dist/scripts/6768-945c9c69c7.chunk.js +0 -1
  26. package/dist/scripts/7366-438b9e40d9.chunk.js +0 -1
  27. package/dist/scripts/9082-6ae95039ff.chunk.js +0 -1
  28. package/dist/scripts/9219-809b5196c6.chunk.js +0 -1
  29. package/dist/scripts/9743-1a17ae4c30.chunk.js +0 -1
  30. package/dist/scripts/bundle-b2a449b5ce.min.js +0 -2
  31. /package/dist/css/{9082-library-editor-34087db2b0.chunk.css → 5736-library-editor-34087db2b0.chunk.css} +0 -0
  32. /package/dist/scripts/{2781-080a819ebe.chunk.js.LICENSE.txt → 3236-63f5d38f36.chunk.js.LICENSE.txt} +0 -0
  33. /package/dist/scripts/{3236-a985af0d70.chunk.js.LICENSE.txt → 3264-337048423c.chunk.js.LICENSE.txt} +0 -0
  34. /package/dist/scripts/{336-8e8eca3760.chunk.js.LICENSE.txt → 336-dde446dfaf.chunk.js.LICENSE.txt} +0 -0
  35. /package/dist/scripts/{3643-9f9b303f54.chunk.js → 3643-4783b19a44.chunk.js} +0 -0
  36. /package/dist/scripts/{3664-8656b007d8.chunk.js → 3664-3d44aa0a3c.chunk.js} +0 -0
  37. /package/dist/scripts/{4796-be2517a0f4.chunk.js.LICENSE.txt → 4796-eaab927115.chunk.js.LICENSE.txt} +0 -0
  38. /package/dist/scripts/{5180-35612cb57e.chunk.js → 5180-f25cbfce9a.chunk.js} +0 -0
  39. /package/dist/scripts/{6239-b216beeef2.chunk.js → 6239-e0c491679f.chunk.js} +0 -0
  40. /package/dist/scripts/{6350-ffd2de18bc.chunk.js → 6350-447cd45f40.chunk.js} +0 -0
  41. /package/dist/scripts/{7197-46b37cfd17.chunk.js.LICENSE.txt → 7197-9844ed1bcf.chunk.js.LICENSE.txt} +0 -0
  42. /package/dist/scripts/{7384-738b216ce5.chunk.js → 7384-7797673b6f.chunk.js} +0 -0
  43. /package/dist/scripts/{8862-d4faaa1043.chunk.js → 8862-433882b8e6.chunk.js} +0 -0
  44. /package/dist/scripts/{9766-22dd736844.chunk.js.LICENSE.txt → 9766-b592857ba3.chunk.js.LICENSE.txt} +0 -0
  45. /package/dist/scripts/{bundle-b2a449b5ce.min.js.LICENSE.txt → bundle-30d7a6318d.min.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5736],{79472:function(e,t,n){"use strict";n.d(t,{W:function(){return v}});var o=n(43823),i=n(57857),r=n(31647),l=n(57085),s=n(65078),a=n(45390),u=n(43791),c=n.n(u),p={svgContainer:"mtegw"};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 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,h(o.key),o)}}function h(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(y=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var v=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=b(t),function(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],b(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&m(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return c()}},{key:"viewOptions",value:function(){return{styles:p}}},{key:"onSave",value:function(){o.Radio.channel(a.OV.LIBRARY_EDITOR).trigger(a.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:i.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:i.T.getPhrase(this.lang,"chapters")};case"resources":return{name:i.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new s.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new l.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},66324:function(e,t,n){"use strict";n.r(t),n.d(t,{EditResourcesView:function(){return Lt}});var o=n(43823),i=n(25417),r=n(99748),l=n(21679),s=n(57857),a=n(31647),u=n(52076),c=n(70065),p=n(81937),f=n(18222),d=n(11543),h=n(45837),y=n(83162),b=n(57769),m=n(44237),v=n.n(m),g=n(61571),k=n.n(g),w={fileDrop:"ejhuF",dropMask:"fLdBH",dragOver:"_sk3R"};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function S(e,t){for(var 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,C(o.key),o)}}function C(e){var t=function(e){if("object"!=O(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==O(t)?t:t+""}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(T=function(){return!!e})()}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}var E=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=j(t),function(e,t){if(t&&("object"==O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,T()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}(this,t,[e])}return 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)}(t,e),n=t,o=[{key:"name",get:function(){return"FileSelectComponent"}},{key:"template",get:function(){return v()}},{key:"lang",get:function(){return"shared._fileSelect"}},{key:"elements",get:function(){return{dropArea:".file-drop"}}},{key:"defaults",get:function(){return{acceptMultiple:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:b.Z,buttonSelector:".browse",channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple,mimeType:this.options.mimeType},{behaviorClass:y.V,channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple}]}},{key:"events",value:function(){var e,t,n;return e={"drop .file-drop":"onDrop","dragover .file-drop":"onDragOver"},n="onDragLeave",(t=C(t="dragleave .".concat(w.dropMask)))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"onDrop",value:function(){this.$el.removeClass(w.dragOver)}},{key:"onDragOver",value:function(e){this.$el.addClass(w.dragOver),e.preventDefault()}},{key:"onDragLeave",value:function(){this.$el.removeClass(w.dragOver)}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({},this.options),{styles:w,limitText:this.options.limitText,isClickViewContent:this.options.isClickViewContent})}},{key:"onRender",value:function(){this.getUI("dropArea").append(k()({dropMask:w.dropMask,fileDropText:s.T.getPhrase(this.lang,"drop")}))}}],o&&S(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA),R=n(85835);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 V(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 _(e){var t=function(e){if("object"!=L(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==L(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}var U="shared.errors.tooManyResources",D=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=I(t),function(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)}(e,N()?Reflect.construct(t,n||[],I(e).constructor):t.apply(e,n))}(this,t,["Cannot add that many resources"])).resourceLimit=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TooManyResourcesError"}},{key:"dialogOptions",get:function(){return{title:s.T.getPhrase(U,"heading"),text:s.T.getPhrase(U,"body",{resourceLimit:this.resourceLimit}),buttons:[{text:s.T.getPhrase(U,"okay"),className:"btn btn-dark",success:!0}]}}}])&&V(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(R.S);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 A(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,F(o.key),o)}}function F(e){var t=function(e){if("object"!=B(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==B(t)?t:t+""}function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(M=function(){return!!e})()}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}var z="shared.errors.tooManySubtitles",K=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Q(t),function(e,t){if(t&&("object"==B(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,M()?Reflect.construct(t,n||[],Q(e).constructor):t.apply(e,n))}(this,t,["Cannot add that many subtitles"])).subtileLimit=e,n}return 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)}(t,e),n=t,(o=[{key:"name",get:function(){return"TooManySubtitlesError"}},{key:"dialogOptions",get:function(){return{title:s.T.getPhrase(z,"heading"),text:s.T.getPhrase(z,"body",{subtitleLimit:this.subtileLimit}),buttons:[{text:s.T.getPhrase(z,"okay"),className:"btn btn-dark",success:!0}]}}}])&&A(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(R.S),q=n(10101),$=n(45390),Z=n(29457),G=n(14327),H=n(19226),W=n(93569),Y=n(99249),X=n(88172),ee=n(7190),te=n(41165),ne=n.n(te);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 ie(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,re(o.key),o)}}function re(e){var t=function(e){if("object"!=oe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oe(t)?t:t+""}function le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(le=function(){return!!e})()}function se(e){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},se(e)}function ae(e,t){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ae(e,t)}var ue=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=se(t),function(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)}(e,le()?Reflect.construct(t,n||[],se(e).constructor):t.apply(e,n))}(this,t,[e])).showNameField=!1,n.disableBtn=!0,n}return 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&&ae(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.model=Y.r.get(this.viewModelName),this.model.addValidation(ee.yU),this.bindListeners()}},{key:"name",get:function(){return"AddLinksComponent"}},{key:"template",get:function(){return ne()}},{key:"lang",get:function(){return"libraryEditor.addLinks"}},{key:"tagName",get:function(){return"form"}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"regions",value:function(){return{attachBtn:".attach-btn-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:q.Bp},{behaviorClass:q.fS}]}},{key:"elements",get:function(){return{nameField:"#name-container"}}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change:url",this.onChangeUrl),this.listenTo(this.model,"change:name",this.onChangeName),this.listenTo(this.options.channelName,"attach:link",this.onClickAttach)}},{key:"onChangeUrl",value:function(){this.showNameField&&!this.model.isValid("url")?(this.getUI("nameField").hide(),this.model.set("name",""),this.showNameField=!1):!this.showNameField&&this.model.isValid("url")&&(this.getUI("nameField").show(),this.showNameField=!0)}},{key:"onChangeName",value:function(){this.model.validate("name"),this.disableBtn=!this.model.isValid(),this.renderAttachButton()}},{key:"onClickAttach",value:function(){var e=this.model.toJSON();this.model.clear(),o.Radio.channel(this.options.channelName).trigger("add:link",e),this.render()}},{key:"renderAttachButton",value:function(){this.options.hide||this.showChildView("attachBtn",new X.Py({saveEvent:"attach:link",channelName:this.options.channelName,buttonText:s.T.getPhrase(this.lang,"attach"),extraButtonClass:"btn-dark attach",disabled:this.disableBtn,buttonType:"submit",spinnerOptions:{size:W.Ey.Medium,type:W.dR.Light,extraClasses:"mx-auto"}}))}},{key:"viewOptions",value:function(){return{limit:this.options.limit,hide:this.options.hide}}},{key:"onRender",value:function(){this.renderAttachButton(),this.stickit(),o.Validation.bind(this)}},{key:"onClose",value:function(){this.unstickit(),o.Validation.unbind(this)}}])&&ie(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(a.Q.wA),ce=n(90835),pe=n(79472),fe=n(53808),de=n(85475),he=n(97237),ye=n.n(he),be={svgContainer:"sr9KQ",progress:"Cn0ad"};function me(e){return me="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},me(e)}function ve(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,ge(o.key),o)}}function ge(e){var t=function(e){if("object"!=me(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==me(t)?t:t+""}function ke(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ke=function(){return!!e})()}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},we(e)}function Oe(e,t){return Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oe(e,t)}var Se=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=we(t),function(e,t){if(t&&("object"==me(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)}(e,ke()?Reflect.construct(t,n||[],we(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&Oe(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"FileUploadComponent"}},{key:"template",get:function(){return ye()}},{key:"events",value:function(){return{"click .cancel-upload":"onClickCancelUpload"}}},{key:"onClickCancelUpload",value:function(){fe.q.isFunction(this.options.onClickCancelUpload)&&this.options.onClickCancelUpload(this.model.get("id"))}},{key:"viewOptions",value:function(){return{styles:be,svg:de.Nj.getSvg(de.vn.Folder),tickSvg:de.Nj.getSvg(de.vn.Check),finished:this.model.get("progress")>=100}}}])&&ve(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA);function Ce(e){return Ce="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},Ce(e)}function Te(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,je(o.key),o)}}function je(e){var t=function(e){if("object"!=Ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ce(t)?t:t+""}function Pe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pe=function(){return!!e})()}function Ee(e){return Ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ee(e)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}var Le=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ee(t),function(e,t){if(t&&("object"==Ce(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)}(e,Pe()?Reflect.construct(t,n||[],Ee(e).constructor):t.apply(e,n))}(this,t,[e])}return 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)}(t,e),n=t,(i=[{key:"name",get:function(){return"FileUploadsComponentCollection"}},{key:"childView",get:function(){return Se}},{key:"childViewOptions",get:function(){var e=this;return{onClickCancelUpload:function(t){o.Radio.channel(e.options.channelName).trigger("cancel:upload",t)}}}}])&&Te(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(a.Q.$W),Ve=n(52808),_e=n(21161),Ne=n(47416),Ie=n(19249),xe={handleQuery:function(){return function(e,t){var n=[];if(e){var o=Ne.S.getEnglishNameContains(e);return _e.each(o,function(e,t){n.push({key:t,name:e.englishName})}),t(n)}t()}},getTypeaheadConfig:function(){return function(){return{name:"languages",source:xe.handleQuery(),limit:5,display:function(e){return e.name},templates:{suggestion:Ie.ou,pending:Ie.gb,notFound:Ie.TX}}}}},Ue=n(56730),De=n.n(Ue);function Be(e){return Be="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},Be(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,Fe(o.key),o)}}function Fe(e){var t=function(e){if("object"!=Be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Be(t)?t:t+""}function Me(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Me=function(){return!!e})()}function Qe(e){return Qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qe(e)}function Je(e,t){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Je(e,t)}var ze=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Qe(t),function(e,t){if(t&&("object"==Be(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)}(e,Me()?Reflect.construct(t,n||[],Qe(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&Je(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(e){this.model=Y.r.get("subtitle:language",e.defaultLanguage),this.model.addValidation(W.AJ),this.listenTo(this.channelName,"select:language",this.onLanguageSelected)}},{key:"template",get:function(){return De()}},{key:"name",get:function(){return"LanguageSelectComponent"}},{key:"lang",get:function(){return"libraryEditor.languageSelect"}},{key:"events",value:function(){return{"click .submit":"onClickSubmit",submit:"onClickSubmit"}}},{key:"behaviors",get:function(){return[{behaviorClass:q.Yw,title:s.T.getPhrase(this.lang,"heading"),buttons:[{text:s.T.getPhrase(this.lang,"submit"),type:"submit",className:"btn btn-dark submit"}]},{behaviorClass:q.fS}]}},{key:"regions",value:function(){return{typeahead:".typahead-region"}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"getTypeaheadConfigs",value:function(){return[{name:"languages",typeaheadConfig:xe.getTypeaheadConfig()}]}},{key:"renderTypeahead",value:function(){this.showChildView("typeahead",new Ve.M({model:this.model,parentChannelName:this.channelName,inputId:"language",selectEvent:"select:language",typeaheadConfigs:this.getTypeaheadConfigs()}))}},{key:"onLanguageSelected",value:function(e){this.model.set("code",e.key)}},{key:"onClickSubmit",value:function(){this.model.validate(),this.model.isValid()&&(this.options.promise.resolve(this.model.toJSON()),this.triggerMethod("hide"))}},{key:"onBeforeDestroy",value:function(){"pending"===this.options.promise.state()&&this.options.promise.reject()}},{key:"onRender",value:function(){this.renderTypeahead()}}])&&Ae(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA),Ke=n(2119),qe=function(e,t){var n,o,i=e.language;return o=(null==t?void 0:t.filter(function(e){return e.language!==i})).length>0?Ne.S.getFullEnglishName(i):Ne.S.getEnglishName(i),(null===(n=e.metadata)||void 0===n?void 0:n.autoGenerated)?s.T.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:o}):o},$e=n(21974),Ze=n(85985),Ge=n.n(Ze),He={container:"SizJb",svgContainer:"PuqLQ",actionSvg:"L9P1P"};function We(e){return We="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},We(e)}function Ye(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,Xe(o.key),o)}}function Xe(e){var t=function(e){if("object"!=We(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=We(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==We(t)?t:t+""}function et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(et=function(){return!!e})()}function tt(e){return tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tt(e)}function nt(e,t){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nt(e,t)}var ot=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=tt(t),function(e,t){if(t&&("object"==We(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)}(e,et()?Reflect.construct(t,n||[],tt(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&nt(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"SubtitleItemComponent"}},{key:"template",get:function(){return Ge()}},{key:"className",get:function(){return"".concat(He.container," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete"}}},{key:"getEnglishName",value:function(){return qe(this.model.toJSON(),this.model.collection.toJSON())}},{key:"onClickDelete",value:function(){!this.options.isClickViewContent&&fe.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){return{styles:He,svg:de.Nj.getSvg($e.u.mapTypeToSvg("subtitle")),trashSvg:de.Nj.getSvg(de.vn.Delete),name:this.getEnglishName(),isClickViewContent:this.options.isClickViewContent}}}])&&Ye(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA),it=n(54758),rt=n(71060),lt=n.n(rt);function st(e){return st="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},st(e)}function at(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ut(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,pt(o.key),o)}}function ct(e,t,n){return t&&ut(e.prototype,t),n&&ut(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pt(e){var t=function(e){if("object"!=st(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=st(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==st(t)?t:t+""}function ft(e,t,n){return t=ht(t),function(e,t){if(t&&("object"==st(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)}(e,dt()?Reflect.construct(t,n||[],ht(e).constructor):t.apply(e,n))}function dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dt=function(){return!!e})()}function ht(e){return ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ht(e)}function yt(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&&bt(e,t)}function bt(e,t){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bt(e,t)}var mt=function(e){function t(e){return at(this,t),ft(this,t,[e])}return yt(t,e),ct(t,[{key:"name",get:function(){return"VideoSubtitlesComponent"}},{key:"template",get:function(){return lt()}},{key:"regions",value:function(){return{subtitles:{el:".subtitles-list-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{headerText:this.options.headerText,emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.showChildView("subtitles",new vt({collection:this.collection,channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}))}}])}(a.Q.wA),vt=function(e){function t(e){return at(this,t),ft(this,t,[e])}return yt(t,e),ct(t,[{key:"name",get:function(){return"VideoSubtitlesComponentCollection"}},{key:"lang",get:function(){return"libraryEditor.videoSubtitles"}},{key:"childView",get:function(){return ot}},{key:"childViewOptions",get:function(){var e=this;return{isClickViewContent:this.options.isClickViewContent,onClickDelete:function(t){return e.onClickDelete(t)}}}},{key:"onClickDelete",value:function(e){var t=this;this.options.isClickViewContent||new it.M({title:s.T.getPhrase(this.lang,"removeHeading"),text:s.T.getPhrase(this.lang,"removeBody",{language:this.getEnglishName(e)}),buttons:[{text:s.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:s.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done(function(){o.Radio.channel(t.options.channelName).trigger("delete:subtitle",e.get("id"))})}},{key:"getEnglishName",value:function(e){return qe(e.toJSON(),e.collection.toJSON())}}])}(a.Q.$W),gt=n(56906),kt=n(95061),wt=n(51069),Ot=n.n(wt),St=n(6723);function Ct(e){return Ct="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},Ct(e)}function Tt(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,jt(o.key),o)}}function jt(e){var t=function(e){if("object"!=Ct(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ct(t)?t:t+""}function Pt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pt=function(){return!!e})()}function Et(e){return Et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Et(e)}function Rt(e,t){return Rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rt(e,t)}var Lt=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Et(t),function(e,t){if(t&&("object"==Ct(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)}(e,Pt()?Reflect.construct(t,n||[],Et(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&Rt(e,t)}(t,e),n=t,y=[{key:"initialize",value:function(){this.initializeUploadServices(),this.bindDataListeners(),this.bindViewListeners(),this.bindFileSelectListeners(),W.Si.initBackButton(),this.videoDataService=l.u.getInstance($.Or.Video,this),this.linkDataService=l.u.getInstance($.Or.Link,this),this.resourceDataService=l.u.getInstance($.Or.Resource,this),this.subtitleDataService=l.u.getInstance($.Or.Subtitle,this),this.resourceUploads=[],this.resourceUploadCount=0}},{key:"name",get:function(){return"EditResourcesView"}},{key:"lang",get:function(){return"libraryEditor.editResources"}},{key:"title",get:function(){return this.model&&this.model.get("name")||"Edit Resources"}},{key:"template",get:function(){return Ot()}},{key:"props",get:function(){return["videoDataService"]}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return W.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:q._7}]}},{key:"requiredResources",get:function(){return{currentUser:H.K.currentUser,libraries:kt.T.libraries}}},{key:"initializeUploadServices",value:function(){this.resourceUploadService=l.u.getInstance(d.D.ResourceUpload),this.listenTo($.jr.RESOURCE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onResourceUploadComplete),this.subtitleUploadService=l.u.getInstance(d.D.SubtitleUpload),this.listenTo($.jr.SUBTITLE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onSubtitleUploadComplete)}},{key:"bindDataListeners",value:function(){this.listenTo($.Vk.VIDEO,"".concat($.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo($.Vk.VIDEO,"".concat($.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError)}},{key:"bindViewListeners",value:function(){this.listenTo(this.channelName,"add:link",this.onAddLink),this.listenTo(this.channelName,"delete:subtitle",this.onDeleteSubtitle),this.listenTo(this.channelName,"delete:resource",this.onDeleteResource),this.listenTo(this.channelName,"delete:link",this.onDeleteLink),this.listenTo(this.channelName,"cancel:upload",this.onCancelUpload)}},{key:"bindFileSelectListeners",value:function(){this.listenTo(this.getSubtitleSelectChannelName(),p.S.FILES_SELECTED,this.onSubtitleFilesAdded),this.listenTo(this.getResourceSelectChannelName(),p.S.FILES_SELECTED,this.onResourceFilesAdded)}},{key:"getSubtitleSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"subtitles")}},{key:"getResourceSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"resources")}},{key:"onVideoDataError",value:function(e){switch(e.type){case r.h.NotFound:a.Q.Ry.throw(new gt.l1);break;case r.h.Forbidden:a.Q.Ry.throw(new gt.aV)}}},{key:"onSubtitleFilesAdded",value:function(e,t){e.length>5-this.model.subtitles.length?a.Q.Ry.throw(new K(5)):(t&&(this.interactionType=t),this.subtitleUploadService.addFiles(e))}},{key:"onResourceFilesAdded",value:function(e,t){e.length>25-this.model.resources.length?a.Q.Ry.throw(new D(25)):(this.resourceUploadCount+=e.length,t&&(this.interactionType=t),this.resourceUploadService.addFiles(e))}},{key:"onAddLink",value:function(e){var t=this;25!==this.model.links.length&&(this.model.links.length+1===25&&this.renderAddLinks(!0),this.linkDataService.addLink(this.model.get("id"),e,function(e){t.model.links.add(e),t.render()}))}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:Z.LP.EditVideoTabs},subtitlesUpload:{el:".subtitles-upload-region",partialLoading:Z.LP.EditVideoUploadArea},subtitlesUploadList:".subtitles-upload-list-region",customerSubtitlesList:".customer-subtitles-list-region",clickViewSubtitlesList:".clickview-subtitles-list-region",resourcesUpload:{el:".resources-upload-region",partialLoading:Z.LP.EditVideoUploadArea},resourcesUploadList:".resources-upload-list-region",customerResourcesList:".customer-resources-list-region",clickViewResourcesList:".clickview-resources-list-region",addLinks:{el:".add-links-region",partialLoading:Z.LP.EditVideoUploadArea},customerLinkList:".customer-link-list-region",clickViewLinkList:".clickview-link-list-region"}}},{key:"onDeleteResource",value:function(e){var t=this;this.resourceDataService.deleteResource(this.options.videoId,e,function(){t.logDeleteAction(c.py.Resource,e),t.render()})}},{key:"onDeleteSubtitle",value:function(e){var t=this;this.subtitleDataService.deleteSubtitle(this.options.videoId,e,function(){t.logDeleteAction(c.py.Subtitle,e),t.render()})}},{key:"onDeleteLink",value:function(e){var t=this;this.linkDataService.deleteLink(this.options.videoId,e,function(){t.logDeleteAction(c.py.Link,e),t.render()})}},{key:"onCancelUpload",value:function(e){this.resourceUploadService.cancelUpload(e),this.subtitleUploadService.cancelUpload(e)}},{key:"onResourceUploadComplete",value:function(e){var t=this,n=e.toJSON(),o={fileId:n.fileInfo.id,uploadId:n.file.cvUpload.uploadId,name:n.fileInfo.name,type:f.v.getResourceType(n.fileInfo.extension),extension:n.fileInfo.extension,fileSize:n.fileInfo.size,fileUrl:n.fileInfo.url,ingestUrl:n.file.cvUpload.ingestUrl,metaData:{type:f.v.getResourceType(n.fileInfo.extension)},contribution:!1,url:n.fileInfo.url,fileIdType:2};this.resourceUploads.push(o),this.resourceUploadCount--,this.resourceUploadCount>0||(this.resourceDataService.addResource(this.options.videoId,this.resourceUploads,function(e){t.model.resources.add(e);var n=t.resourceUploadService.getCollection().filter(function(t){return t.get("fileInfo").id===e.get("fileId")});t.resourceUploadService.getCollection().remove(n),t.logUploadAction(e),t.render()}),this.resourceUploads=[])}},{key:"onSubtitleUploadComplete",value:function(e){var t=this,n=St.Deferred(),r=new ze({defaultLanguage:{code:"en",name:"English"},promise:n});n.done(function(n){var o=e.toJSON(),i={fileId:o.fileInfo.id,name:n.name,language:n.code,type:f.v.getResourceType(o.fileInfo.extension),fileIdType:2};t.subtitleDataService.addSubtitle(t.options.videoId,i,function(n){t.model.subtitles.add(n),t.subtitleUploadService.getCollection().remove(e),t.logUploadAction(n),t.render()})}).fail(function(){t.subtitleUploadService.cancelUpload(e.get("id"))}),o.Radio.channel(i.G.POPUP).trigger(a.Q.Vy.SHOW_POPUP,r)}},{key:"logUploadAction",value:function(e){var t=e instanceof G._?c.py.Resource:c.py.Subtitle,n=u.k.mapInteractionType(this.interactionType),o={location:c.LZ.EditVideoResources,actionType:c.Vw.Upload,entity:t,descriptor:n};u.k.logUserAction(e,o)}},{key:"logDeleteAction",value:function(e,t){var n={location:c.LZ.EditVideoResources,actionType:c.Vw.Delete,entity:e},o={id:t,parentId:+this.options.videoId};u.k.logUserAction(o,n)}},{key:"renderTabs",value:function(){var e=W.BK.canEditVideo(this.model);this.showChildView("tabs",new pe.W({model:this.model,tabs:W.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-resources-subtitles-applink",context:"resources",folder:this.folder,libraries:this.libraries}))}},{key:"renderSubtitleFileSelect",value:function(){var e=s.T.getPhrase(this.lang,"subtitlesLimit",{limit:5});this.showChildView("subtitlesUpload",new E({title:this.isClickViewContent?s.T.getPhrase(this.lang,"customerSubtitles"):s.T.getPhrase(this.lang,"subtitles"),description:s.T.getPhrase(this.lang,"subtitlesInfo"),alternateText:s.T.getPhrase(this.lang,"subtitlesAlternative"),mimeType:f.l.SUBTITLES,channelName:this.getSubtitleSelectChannelName(),acceptMultiple:!1,limitText:this.model.subtitles.length>=5?e:null,isClickViewContent:this.isClickViewContent}))}},{key:"renderSubtitleUploadList",value:function(){var e=this.subtitleUploadService.getCollection();this.showChildView("subtitlesUploadList",new Le({collection:e,channelName:this.channelName}))}},{key:"renderSubtitlesLists",value:function(){this.renderClickViewSubtitlesList(),this.renderCustomerSubtitlesList()}},{key:"renderClickViewSubtitlesList",value:function(){if(this.isClickViewContent){var e=W.BK.filterObjectsByOwnerType(this.model.subtitles,h.N.ClickView);this.showChildView("clickViewSubtitlesList",new mt({collection:e,channelName:this.channelName,isClickViewContent:!0,headerText:s.T.getPhrase(this.lang,"clickViewSubtitles"),emptyStateText:e.models.length?"":s.T.getPhrase(this.lang,"clickViewSubtitlesEmpty")}))}}},{key:"renderCustomerSubtitlesList",value:function(){this.showChildView("customerSubtitlesList",new mt({collection:W.BK.filterObjectsByOwnerType(this.model.subtitles,h.N.Customer,this.currentUser.get("customerId")),channelName:this.channelName}))}},{key:"renderResourcesFileSelect",value:function(){var e=s.T.getPhrase(this.lang,"resourcesLimit",{limit:25});this.showChildView("resourcesUpload",new E({title:this.isClickViewContent?s.T.getPhrase(this.lang,"customerResources"):s.T.getPhrase(this.lang,"resources"),description:s.T.getPhrase(this.lang,"resourcesDescription"),alternateText:s.T.getPhrase(this.lang,"resourcesAlternative"),mimeType:f.l.RESOURCES,channelName:this.getResourceSelectChannelName(),limitText:this.model.resources.length>=25?e:null,isClickViewContent:this.isClickViewContent}))}},{key:"renderResourcesUploadList",value:function(){var e=this.resourceUploadService.getCollection();this.showChildView("resourcesUploadList",new Le({collection:e,channelName:this.channelName}))}},{key:"renderResourcesLists",value:function(){this.renderClickViewResourcesList(),this.renderCustomerResourcesList()}},{key:"renderClickViewResourcesList",value:function(){if(this.isClickViewContent){var e=W.BK.filterObjectsByOwnerType(this.model.resources,h.N.ClickView);this.showChildView("clickViewResourcesList",new Ke.c({model:this.model,customCollection:e,editable:!1,videoId:this.options.videoId,parentChannelName:this.channelName,headerText:s.T.getPhrase(this.lang,"clickViewResources"),emptyStateText:e.models.length?"":s.T.getPhrase(this.lang,"clickViewResourcesEmpty"),analyticsOptions:{location:c.LZ.EditVideoResources}}))}}},{key:"renderCustomerResourcesList",value:function(){this.showChildView("customerResourcesList",new Ke.h({collection:W.BK.filterObjectsByOwnerType(this.model.resources,h.N.Customer,this.currentUser.get("customerId")),editable:!0,videoId:this.options.videoId,channelName:this.channelName,analyticsOptions:{location:c.LZ.EditVideoResources}}))}},{key:"renderAddLinks",value:function(e){this.showChildView("addLinks",new ue({collection:this.model.get("links"),channelName:this.channelName,hide:e||25===this.model.get("links").length,limit:25}))}},{key:"renderLinkLists",value:function(){var e={channelName:this.channelName,analyticsOptions:{location:c.LZ.EditVideoResources},videoId:this.options.videoId};this.renderClickViewLinkList(e),this.renderCustomerLinkList(e)}},{key:"renderClickViewLinkList",value:function(e){if(this.isClickViewContent){var t=W.BK.filterObjectsByOwnerType(this.model.links,h.N.ClickView);this.showChildView("clickViewLinkList",new ce.c(Object.assign(Object.assign({},e),{headingText:"Resource links by ClickView",emptyStateText:t.models.length?"":"There are no ClickView links for this video",customCollection:t,editable:!1})))}}},{key:"renderCustomerLinkList",value:function(e){this.showChildView("customerLinkList",new ce.c(Object.assign(Object.assign({},e),{customCollection:W.BK.filterObjectsByOwnerType(this.model.links,h.N.Customer,this.currentUser.get("customerId")),editable:!0})))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.isClickViewContent=this.model&&!W.BK.canEditVideo(this.model),this.folder=this.model&&this.model.categories.first()}},{key:"shouldRender",value:function(){return!!this.model}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"viewOptions",value:function(){return{isClickViewContent:this.isClickViewContent}}},{key:"onRender",value:function(){this.renderTabs(),this.renderSubtitleFileSelect(),this.renderSubtitleUploadList(),this.renderSubtitlesLists(),this.renderResourcesFileSelect(),this.renderResourcesUploadList(),this.renderResourcesLists(),this.renderAddLinks(),this.renderLinkLists()}},{key:"onDestroy",value:function(){this.subtitleUploadService.destroy(),this.resourceUploadService.destroy()}}],y&&Tt(n.prototype,y),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,y}(a.Q.G7)},52808:function(e,t,n){"use strict";n.d(t,{M:function(){return g}});var o=n(43823),i=n(21161),r=n(11306),l=n(31647),s=n(62312),a=n(85475),u=n(93569),c=n(94407),p=n.n(c),f={svg:"QbFgf",typeaheadContainer:"Y3ErG",disabled:"VTCM4"};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 h(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,y(o.key),o)}}function y(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=m(t),function(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}(this,t,[e])}return 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)}(t,e),n=t,c=[{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"search-container ".concat(f.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.N0.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||l.Q.Ry.throw(new r.H("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new l.Q.Hn),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=o.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"bindings",get:function(){var e,t,n;return e={},t="[name=".concat(this.options.inputName,"]"),n={observe:this.options.stickItProperty,setOptions:{validate:!0}},(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"clearInput",value:function(){this.getUI("input").typeahead("val",null)}},{key:"setInput",value:function(e){this.getUI("input").typeahead("val",e)}},{key:"onTypeaheadSelect",value:function(e,t){var n;e.preventDefault(),n="string"==typeof t?t:t.title||t.name||t.query,this.model.set(this.options.stickItProperty,n),this.parentChannel&&this.options.selectEvent&&this.parentChannel.trigger(this.options.selectEvent,t),this.onSubmit(e),this.toggleRemove()}},{key:"onSubmit",value:function(e){var t=this;if(e.preventDefault(),!this.isDestroyed()&&this.getTypeaheadActionOptions().clearOnSelect)return this.getUI("input").typeahead("close"),setTimeout(function(){t.model.clear(),t.clearInput()},0),!1}},{key:"onClickRemove",value:function(){this.model.clear(),this.parentChannel.trigger(this.options.removeEvent,this.model),this.toggleRemove()}},{key:"getSources",value:function(){return i.isArray(this.options.typeaheadConfigs)?s.J.getSearchSources(this.options.typeaheadConfigs):s.J.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?i.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return i.isObject(this.options.actionOptions)?i.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){i.isObject(this.options.callbacks)&&(i.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",i.bind(this.options.callbacks.onRender,this)),i.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),i.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",i.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",i.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:f},this.options),{showRemove:this.shouldShowRemove(),svgRemove:a.Nj.getSvg(a.vn.Close)})}},{key:"onRender",value:function(){var e=this;this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),o.Validation.bind(this),this.toggleRemove(),this.options.autofocus&&window.requestAnimationFrame(function(){e.getUI("input").focus()})}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),o.Validation.unbind(this)}}],c&&h(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c}(l.Q.wA)},44237:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<p class="alert alert-warning mb-0">'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.limitText:r,t))+"</p>\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<div class="file-drop '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.fileDrop:r,t))+" p-2"+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <button class="browse btn btn-outline-dark me-2">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"browse",{name:"lang",hash:{},data:i}))+'</button>\n <span class="text-secondary align-middle">'+s(l(null!=(r=null!=t?t.options:t)?r.alternateText:r,t))+"</span>\n</div>\n"},4:function(e,t,n,o,i){return" col-6 "},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda;return"<h5>"+e.escapeExpression(l(null!=(r=null!=t?t.options:t)?r.title:r,t))+"</h5>\n<p>"+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.description:r,t))?r:"")+"</p>\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},61571:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.escapeExpression;return'<div class="'+s("function"==typeof(l=null!=(l=n.dropMask||(null!=t?t.dropMask:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"dropMask",hash:{},data:i}):l)+'">\n <h3>'+s(e.lambda(null!=(r=null!=t?t.options:t)?r.fileDropText:r,t))+"</h3>\n</div>"},useData:!0})},97237:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda;return'<span class="d-inline-block align-middle me-2 '+e.escapeExpression(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' float-end text-success">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.tickSvg:r,t))?r:"")+"</span>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="d-inline-block align-middle me-2 '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' cursor-pointer cancel-upload btn-close float-end" role="button" aria-label="Close"></span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,p="function";return'<span class="d-inline-block align-middle me-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\n<span class="align-middle">\n '+a(typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:c)===p?l.call(u,{name:"name",hash:{},data:i}):l)+"\n</span>\n"+(null!=(r=n.if.call(u,null!=(r=null!=t?t.options:t)?r.finished:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")+'\n<div class="progress my-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.progress:r,t))+' mt-2">\n <div class="progress-bar bg-blue" style="width: '+a(typeof(l=null!=(l=n.progress||(null!=t?t.progress:t))?l:c)===p?l.call(u,{name:"progress",hash:{},data:i}):l)+'%" aria-valuenow="'+a(typeof(l=null!=(l=n.progress||(null!=t?t.progress:t))?l:c)===p?l.call(u,{name:"progress",hash:{},data:i}):l)+'" aria-valuemin="0" aria-valuemax="100"></div>\n</div>'},useData:!0})},85985:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression;return'<a class="float-end '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-secondary delete">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<span class="d-inline-block align-middle me-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\n<a href="'+a("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(u,{name:"url",hash:{},data:i}):l)+"?name="+a(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+'" class="align-middle">\n '+a(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+"\n</a>\n"+(null!=(r=n.unless.call(u,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},41165:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<p class="alert alert-warning col-8">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"limit",{name:"lang",hash:{limit:null!=(r=null!=t?t.options:t)?r.limit:r},data:i}))+"</p>\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||l).call(r,"subheading",{name:"lang",hash:{},data:i}))+'</p>\n<div class="form-group mb-1">\n <label for="url">'+s((n.lang||t&&t.lang||l).call(r,"urlLabel",{name:"lang",hash:{},data:i}))+'</label>\n <input name="url" id="url" class="form-control" type="text" placeholder="'+s((n.lang||t&&t.lang||l).call(r,"urlPlaceholder",{name:"lang",hash:{},data:i}))+'">\n <div class="form-feedback"></div>\n</div>\n<div class="form-group mb-1" id="name-container" style="display: none;">\n <input type="text" class="form-control" name="name" placeholder="'+s((n.lang||t&&t.lang||l).call(r,"namePlaceholder",{name:"lang",hash:{},data:i}))+'">\n <div class="form-feedback"></div>\n</div>\n<div class="attach-btn-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h5 class="pt-2">Resource links</h5>\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.hide:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},43791:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h1 class="h3">\n '+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)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region ps-2"></div>'},useData:!0})},56730:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return e.propertyIsEnumerable,'<form>\n <div class="form-group">\n <label for="language">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+'</label>\n <div class="typahead-region"></div>\n </div>\n</form>'},useData:!0})},71060:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))},compiler:[8,">= 4.3.0"],main: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>\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\n<div class="subtitles-list-region"></div>'},useData:!0})},51069:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"col-5"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{};return'<div class="tab-region"></div>\n\n<div class="row py-3">\n <div class="'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickview-subtitles-list-region"></div>\n </div>\n <div class="col-7">\n <div class="subtitles-upload-region"></div>\n <div class="subtitles-upload-list-region p-0 col-8"></div>\n <div class="customer-subtitles-list-region p-0 col-8"></div>\n </div>\n</div>\n\n<div class="row border-top py-3">\n <div class="'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickview-resources-list-region"></div>\n </div>\n <div class="col-7">\n <div class="resources-upload-region"></div>\n <div class="resources-upload-list-region p-0 col-8"></div>\n <div class="customer-resources-list-region p-0 col-8"></div>\n </div>\n</div>\n\n<div class="row border-top py-3">\n <div class="'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickview-link-list-region"></div>\n </div>\n <div class="col-7">\n <div class="add-links-region mb-2"></div>\n <div class="customer-link-list-region p-0 col-8"></div>\n </div>\n</div>'},useData:!0})},94407:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return"autofocus"},5:function(e,t,n,o,i){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<input\n name="'+s(l(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\n type="text"\n class="form-control '+(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:"")+" "+s(l(null!=(r=null!=t?t.options:t)?r.additionalClasses:r,t))+'"\n id="'+s(l(null!=(r=null!=t?t.options:t)?r.inputId:r,t))+'"\n autocomplete="off"\n placeholder="'+s(l(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'"\n '+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.autofocus:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+"\n "+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'\n></input>\n<span class="svg-container mb-2 '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svg:r,t))+' remove" style="display: none;">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.svgRemove:r,t))?r:"")+"</span>"},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6768],{95106:function(e,t,n){"use strict";n.r(t),n.d(t,{UploadVideosView:function(){return ht}});var o=n(43823),i=n(21161),r=n(25417),a=n(21186),l=n(21679),s=n(57857),c=n(99249),u=n(31647),d=n(52076),p=n(70065),f=n(81937),h=n(83891),y=n(8371),m=n(36357),v=n(45390),g=n(85847),b=n(48404),w=n(19226),S=n(93569),k=n(95061),O=n(13630),C=n(18222),P=n(57769),T=n(88172),N=n(42494),j=n.n(N);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function x(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,I(o.key),o)}}function I(e){var t=function(e){if("object"!=E(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_=function(){return!!e})()}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}var V=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=D(t),function(e,t){if(t&&("object"==E(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)}(e,_()?Reflect.construct(t,n||[],D(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&A(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.model=c.r.get("upload:progress:".concat(O.AJ.Video)),this.listenTo(this.model,"change:done",this.render),this.listenTo(this.channelName,"continue",this.onClickContinue),this.listenTo(this.options.uploadChannelName,"start:spinner",this.startSpinner)}},{key:"name",get:function(){return"UploadActionsComponent"}},{key:"lang",get:function(){return"upload.uploadActions"}},{key:"template",get:function(){return j()}},{key:"className",get:function(){return"clearfix my-3"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{finishButton:{el:".finish-button-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:P.Z,buttonSelector:".add-more-videos",channelName:this.options.uploadChannelName,acceptMultiple:!0,mimeType:C.l.VIDEO}]}},{key:"startSpinner",value:function(){o.Radio.channel(this.channelName).trigger(T.I3.ShowSpinner)}},{key:"onClickContinue",value:function(){this.model.get("done")&&o.Radio.channel(this.options.uploadChannelName).trigger("continue")}},{key:"onRender",value:function(){this.showChildView("finishButton",new T.Py({channelName:this.channelName,disabled:!this.model.get("done"),saveEvent:"continue",extraButtonClass:"btn-dark float-end ms-3",buttonText:s.T.getPhrase(this.lang,"finish"),spinnerOptions:{size:S.Ey.Small,type:S.dR.Light,extraClasses:"mx-auto"},tooltip:{title:this.model.get("done")?"":s.T.getPhrase(this.lang,"stillUploading")}}))}}])&&x(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(u.Q.wA),R=n(88483),M=n(53825),F=n(51594),U=n(32035),B=n(95168),L=n(39155),K=(n(36124),n(34522),n(90680)),Q=n(75917),z=n(60602),J=n(75459),H=n(75226),q=n(22557),W=n(21893),$=n.n(W);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 X(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,Y(o.key),o)}}function Y(e){var t=function(e){if("object"!=G(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=G(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==G(t)?t:t+""}function Z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Z=function(){return!!e})()}function ee(e){return ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ee(e)}function te(e,t){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},te(e,t)}var ne=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ee(t),function(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)}(e,Z()?Reflect.construct(t,n||[],ee(e).constructor):t.apply(e,n))}(this,t,[e])}return 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)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.prepareData(),this.bindListeners()}},{key:"lang",get:function(){return"libraryEditor.folderSelect"}},{key:"prepareData",value:function(){var e=this.options.library?this.options.library.collection:this.collection;this.collection=q.P.flatten(e),S.yV.setSelected(this.options.currentFolderId,this.collection),this.options.canCreateFolder&&this.collection.add({name:s.T.getPhrase(this.lang,"createNew"),eventName:"create:folder"})}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"create:folder",this.onClickCreateFolder),this.listenTo(this.channelName,"select:option:selected",function(t){o.Radio.channel(e.options.channelName).trigger("folder:selected",t)})}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"name",get:function(){return"FolderSelectView"}},{key:"className",get:function(){return"position-relative"}},{key:"template",get:function(){return $()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"onClickCreateFolder",value:function(){o.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"generatePrefix",value:function(){var e=this.model.get("depth");if(!i.isNumber(e)||this.model.get("hidePrefix"))return"";for(var t="",n=0;n<e;n++)t+="&nbsp;&nbsp;";return e&&(t+="- "),t}},{key:"getIsOptionDisabledFn",value:function(){var e=this.options.disableLibraries,t=this.options.disabledFolderIds;return function(n){var o=n||this.model;return!(!e||o.get("type")!==J.r.CustomLibrary)||!(!t||!i.contains(t,o.get("id").toString()))}}},{key:"onRender",value:function(){this.showChildView("dropdown",new H.H({collection:this.collection,channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click",prefixHandler:this.generatePrefix,currentSelectedMessage:this.options.currentSelectedMessage||s.T.getPhrase(this.lang,"current"),isDisabled:this.getIsOptionDisabledFn()},placeholderText:this.options.placeholderText||s.T.getPhrase(this.lang,"placeholder"),noOptionsText:s.T.getPhrase(this.lang,"noFolders"),inputName:this.options.inputName,disabled:0===this.collection.length||this.options.disabled,analyticsHelper:d.k}))}}])&&X(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(u.Q.wA),oe=n(76370),ie=n.n(oe),re={requiredStar:"BykcP"};function ae(e){return ae="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},ae(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,se(o.key),o)}}function se(e){var t=function(e){if("object"!=ae(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ae(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ae(t)?t:t+""}function ce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ce=function(){return!!e})()}function ue(e){return ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ue(e)}function de(e,t){return de=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},de(e,t)}var pe=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ue(t),function(e,t){if(t&&("object"==ae(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)}(e,ce()?Reflect.construct(t,n||[],ue(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&de(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){var e=this;this.librariesWithoutFolders=new K.q,this.collection.each(function(t){return e.librariesWithoutFolders.add(t.toFlatJSON())}),this.listenTo(this.libraryChannelName,"folder:selected",this.onLibrarySelected),this.listenTo(this.channelName,"folder:selected new:folder:selected",this.onFolderSelected),this.listenTo(this.channelName,"create:folder:clicked",this.onCreateFolderClicked),!this.hasMultipleLibraries()&&this.librariesWithoutFolders.first()&&this.model.set("libraryId",this.librariesWithoutFolders.first().get("id"));var t=this.collection.get(this.model.get("libraryId"));if(t){var n=S.PU.getSelected(this.folderTreeKey,t.children);this.options.preselectedFolderId&&!n&&this.onFolderSelected(this.options.preselectedFolderId)}}},{key:"name",get:function(){return"UploadFolderSelectComponent"}},{key:"template",get:function(){return ie()}},{key:"lang",get:function(){return"upload.uploadFolderSelect"}},{key:"folderTreeKey",get:function(){return"folder:tree:".concat(this.model.cid)}},{key:"regions",value:function(){return{librarySelect:".library-select-region",folderSelect:".folder-select-region"}}},{key:"hasMultipleLibraries",value:function(){return this.librariesWithoutFolders.length>1}},{key:"libraryChannelName",get:function(){return"".concat(this.channelName,":").concat(this.options.selectId,":libraries")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid).concat(this.options.selectId)}},{key:"onLibrarySelected",value:function(e){this.model.set("libraryId",e.get("id")),this.model.unset("folderId"),this.render()}},{key:"onFolderSelected",value:function(e){var t=e;e instanceof z.g&&(t=e.get("id")),this.model.set("folderId",t);var n=this.collection.get(this.model.get("libraryId")).children;S.PU.setSelected(this.folderTreeKey,t,n),this.model.validate()}},{key:"onCreateFolderClicked",value:function(){o.Radio.channel(this.options.channelName).trigger("show:new:folder",this.model.get("libraryId"),this.channelName)}},{key:"renderLibrarySelect",value:function(){if(this.hasMultipleLibraries()){var e=new ne({collection:this.librariesWithoutFolders,channelName:this.libraryChannelName,placeholderText:s.T.getPhrase(this.lang,"selectLibraryPlaceholder"),currentFolderId:this.model.get("libraryId"),currentSelectedMessage:s.T.getPhrase(this.lang,"currentLibrary"),inputName:"libraryId",canCreateFolder:!1});this.showChildView("librarySelect",e)}}},{key:"renderFolderSelect",value:function(){var e=this.model.get("libraryId");if(e){var t=this.collection.get(e);this.showChildView("folderSelect",new Q.Y({collection:t.children,channelName:this.channelName,folderTreeKey:this.folderTreeKey,canCreateNew:!0,name:"folderId",dropdown:!0}))}}},{key:"viewOptions",value:function(){return{styles:re,hasMultipleLibraries:this.hasMultipleLibraries(),requiredFields:this.options.requiredFields}}},{key:"onRender",value:function(){this.renderLibrarySelect(),this.renderFolderSelect()}}])&&le(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(u.Q.wA),fe=n(11453),he=n.n(fe),ye=n(6723);function me(e){return me="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},me(e)}function ve(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,ge(o.key),o)}}function ge(e){var t=function(e){if("object"!=me(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==me(t)?t:t+""}function be(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(be=function(){return!!e})()}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},we(e)}function Se(e,t){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Se(e,t)}var ke=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=we(t),function(e,t){if(t&&("object"==me(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)}(e,be()?Reflect.construct(t,n||[],we(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.update)}},{key:"name",get:function(){return"UploadProgressComponent"}},{key:"template",get:function(){return he()}},{key:"className",get:function(){return"progress my-3"}},{key:"elements",get:function(){return{progressBar:".progress-bar"}}},{key:"update",value:function(){var e=this.model.get("progress"),t=this.getUI("progressBar");t&&t.get(0)&&ye(t.get(0)).css("width","".concat(e,"%"))}}])&&ve(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(u.Q.wA),Oe=n(42633),Ce=n.n(Oe);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 Te(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,Ne(o.key),o)}}function Ne(e){var t=function(e){if("object"!=Pe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Pe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Pe(t)?t:t+""}function je(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(je=function(){return!!e})()}function Ee(e){return Ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ee(e)}function xe(e,t){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xe(e,t)}var Ie=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ee(t),function(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)}(e,je()?Reflect.construct(t,n||[],Ee(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&xe(e,t)}(t,e),n=t,o=[{key:"name",get:function(){return"UploadVideoOptionsComponent"}},{key:"template",get:function(){return Ce()}},{key:"lang",get:function(){return"upload.uploadVideoOptions"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"border-top pt-3"}},{key:"events",value:function(){return{"click .toggle-option":"onToggleAutoCaptioning"}}},{key:"onToggleAutoCaptioning",value:function(e){e.stopPropagation(),this.model.set("autoCaption",!this.model.get("autoCaption")),this.render()}},{key:"viewOptions",value:function(){return{isSelected:this.model.get("autoCaption")}}}],o&&Te(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(u.Q.wA),_e=n(61778),De=n.n(_e),Ae=n(47381),Ve=n.n(Ae),Re=n(63105),Me=n.n(Re),Fe={title:"melld"},Ue=n(6723);function Be(e){return Be="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},Be(e)}function Le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ke(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,ze(o.key),o)}}function Qe(e,t,n){return t&&Ke(e.prototype,t),n&&Ke(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ze(e){var t=function(e){if("object"!=Be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Be(t)?t:t+""}function Je(e,t,n){return t=qe(t),function(e,t){if(t&&("object"==Be(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)}(e,He()?Reflect.construct(t,n||[],qe(e).constructor):t.apply(e,n))}function He(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(He=function(){return!!e})()}function qe(e){return qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qe(e)}function We(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)}function $e(e,t){return $e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$e(e,t)}var Ge=function(e){function t(){return Le(this,t),Je(this,t,arguments)}return We(t,e),Qe(t,[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render)}},{key:"name",get:function(){return"UploadTitleComponent"}},{key:"template",get:function(){return Ve()}},{key:"tagName",get:function(){return"h3"}},{key:"className",get:function(){return"mb-0 border-bottom p-3 ".concat(Fe.title)}},{key:"viewOptions",value:function(){return{name:this.model.get("name")||this.model.get("fileName")}}}])}(u.Q.wA),Xe=function(e){function t(){return Le(this,t),Je(this,t,arguments)}return We(t,e),Qe(t,[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"TextProgressComponent"}},{key:"template",get:function(){return De()}},{key:"lang",get:function(){return"upload.uploadVideo"}},{key:"className",get:function(){return" text-secondary"}},{key:"tagName",get:function(){return"p"}},{key:"viewOptions",value:function(){return{percentage:Math.round(this.model.get("progress")||0)}}}])}(u.Q.wA),Ye=function(e){function t(e){return Le(this,t),Je(this,t,[e])}return We(t,e),Qe(t,[{key:"initialize",value:function(){this.viewModel=c.r.get("upload:".concat(this.model.get("id")),{name:this.model.get("name"),fileName:this.model.get("name"),showAdvanced:this.options.openAdvancedMetadata,rating:this.options.ratings.findWhere({value:0}),folderId:this.options.folderId,libraryId:this.options.libraryId,timeInitialized:new Date,autoCaption:!1},{ctor:g.n}),this.viewModel.addValidation(L.I),this.listenTo(this.channelName,"select:rating",i.default.partial(this.onAssociationSelected,i.default,"rating")),this.listenTo(this.channelName,"select:channel",i.default.partial(this.onAssociationSelected,i.default,"channel")),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),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,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.options.uploadChannelName,"invalid:".concat(this.model.get("id")),this.scrollTo)}},{key:"name",get:function(){return"UploadVideoComponent"}},{key:"template",get:function(){return Me()}},{key:"className",get:function(){return"bg-white mb-3 rounded"}},{key:"lang",get:function(){return"upload.uploadVideo"}},{key:"events",value:function(){return{"click .add-advanced-metadata":"onClickAddAdvancedMetadata","click .cancel-upload":"onClickCancelUpload"}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{progress:{el:".upload-progress-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},uploadTitle:{el:".upload-title-region",replaceElement:!0},folderSelect:{el:".folder-select-region",replaceElement:!0},textProgress:{el:".text-progress-region",replaceElement:!0},videoDetails:{el:".video-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},advancedDetails:{el:".additional-info-region",replaceElement:!0},uploadOptions:{el:".video-options-region",replaceElement:!0}}}},{key:"onClickAddAdvancedMetadata",value:function(){this.viewModel.set("showAdvanced",!this.viewModel.get("showAdvanced")),this.render()}},{key:"onClickCancelUpload",value:function(){var e=this,t={title:s.T.getPhrase(this.lang,"cancelHeading"),text:s.T.getPhrase(this.lang,"cancelBody",{videoTitle:this.model.get("name")}),buttons:[{text:s.T.getPhrase(this.lang,"yes"),className:"btn btn-dark",success:!0},{text:s.T.getPhrase(this.lang,"no"),className:"btn btn-link",close:!0}],channelName:this.channelName};new S.Mr(t).render().done(function(){o.Radio.channel(e.options.uploadChannelName).trigger("cancel:upload",e.model.get("id"))})}},{key:"onAssociationSelected",value:function(e,t){var n=this.viewModel.get(t);if(n instanceof u.Q.FE){var o=n.filter(function(t){return!t.id||t.name===e.name});i.default.each(o,function(e){return n.remove(e)}),this.viewModel.get(t).add(e)}else this.viewModel.set(t,e)}},{key:"onSelectSeries",value:function(e){var t=this,n=o.Radio.channel(this.options.uploadChannelName);e.id?n.trigger("get:series",e.id,function(e){t.onAssociationSelected(e.toJSON(),"series"),t.renderBasicVideoDetails()}):e.name&&n.trigger("create:series",e.name,function(e){t.onAssociationSelected(e.toJSON(),"series"),t.renderBasicVideoDetails()})}},{key:"onSelectSeason",value:function(e){var t=this;if(i.default.isNull(e))return this.viewModel.get("season").clear({silent:!0}),S.yV.deselectAll(this.viewModel.get("series.seasons")),this.onAssociationSelected(null,"season"),void this.renderBasicVideoDetails();if(e.id)return S.yV.setSelected(e.id,this.viewModel.get("series.seasons")),this.onAssociationSelected(e,"season"),void this.renderBasicVideoDetails();if(e.number){var n=this.viewModel.get("series.id");o.Radio.channel(this.options.uploadChannelName).trigger("create:season",e,n,function(e){t.viewModel.get("series.seasons").add(e.toJSON()),S.yV.setSelected(e.id,t.viewModel.get("series.seasons")),t.onAssociationSelected(e.toJSON(),"season"),t.renderBasicVideoDetails()})}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"distributors"):e.name&&o.Radio.channel(this.options.uploadChannelName).trigger("create:company",e.name,function(e){t.onAssociationSelected(e.toJSON(),"distributors")})}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"productionCompanies"):e.name&&o.Radio.channel(this.options.uploadChannelName).trigger("create:company",e.name,function(e){t.onAssociationSelected(e.toJSON(),"productionCompanies")})}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"directors"):e.name&&o.Radio.channel(this.options.uploadChannelName).trigger("create:person",e.name,function(e){t.onAssociationSelected(e.toJSON(),"directors")})}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onAssociationSelected(e,"producers"):e.name&&o.Radio.channel(this.options.uploadChannelName).trigger("create:person",e.name,function(e){t.onAssociationSelected(e.toJSON(),"producers")})}},{key:"getRequiredFields",value:function(){return{uploadDestination:!0}}},{key:"renderTitle",value:function(){var e=new Ge({model:this.viewModel});this.showChildView("uploadTitle",e)}},{key:"renderThumbnail",value:function(){var e=new M.Z({model:this.viewModel,thumbnailOptions:{size:R.h2.Medium}});this.showChildView("thumbnail",e)}},{key:"renderProgress",value:function(){var e=new ke({model:this.model});this.showChildView("progress",e);var t=new Xe({model:this.model});this.showChildView("textProgress",t)}},{key:"renderBasicVideoDetails",value:function(){var e=new U.J({model:this.viewModel,channelName:this.channelName,ratings:this.options.ratings,requiredFields:this.getRequiredFields(),editable:!0});this.showChildView("videoDetails",e)}},{key:"renderFolderSelect",value:function(){var e=new pe({collection:this.options.libraries,selectId:this.model.get("id"),model:this.viewModel,channelName:this.options.uploadChannelName,requiredFields:this.getRequiredFields(),preselectedFolderId:this.options.folderId});this.showChildView("folderSelect",e)}},{key:"renderAdvancedVideoDetails",value:function(){if(this.viewModel.get("showAdvanced")){if(!this.options.hideBroadcastInfo){var e=new F.a({channelName:this.channelName,model:this.viewModel,editable:!0});this.showChildView("advancedDetails",e)}var t=new B.O({channelName:this.channelName,model:this.viewModel,editable:!0});this.showChildView("productionInfo",t),this.options.allowAutoCaptioning&&this.showChildView("uploadOptions",new Ie({model:this.viewModel}))}}},{key:"scrollTo",value:function(){Ue("html,body").animate({scrollTop:this.$el.offset().top},250)}},{key:"viewOptions",value:function(){return Object.assign({styles:Fe,showExpand:this.options.allowAutoCaptioning},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.renderTitle(),this.renderThumbnail(),this.renderProgress(),this.renderBasicVideoDetails(),this.renderFolderSelect(),this.renderAdvancedVideoDetails(),o.Validation.bind(this,{model:this.viewModel})}},{key:"onDestroy",value:function(){o.Validation.unbind(this)}}])}(u.Q.wA);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 et(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,tt(o.key),o)}}function tt(e){var t=function(e){if("object"!=Ze(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ze(t)?t:t+""}function nt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nt=function(){return!!e})()}function ot(e){return ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ot(e)}function it(e,t){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},it(e,t)}var rt=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ot(t),function(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)}(e,nt()?Reflect.construct(t,n||[],ot(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&it(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"UploadVideoComponentCollection"}},{key:"childView",get:function(){return Ye}},{key:"childViewOptions",get:function(){return{ratings:this.options.ratings,libraries:this.options.libraries,uploadChannelName:this.options.uploadChannelName,folderId:this.options.folderId,libraryId:this.options.libraryId,allowAutoCaptioning:this.options.allowAutoCaptioning,hideBroadcastInfo:this.options.hideBroadcastInfo,openAdvancedMetadata:this.collection.length<=1}}}])&&et(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(u.Q.$W),at=n(35250),lt=n.n(at);function st(e){return st="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},st(e)}function ct(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,ut(o.key),o)}}function ut(e){var t=function(e){if("object"!=st(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=st(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==st(t)?t:t+""}function dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dt=function(){return!!e})()}function pt(e){return pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pt(e)}function ft(e,t){return ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ft(e,t)}var ht=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=pt(t),function(e,t){if(t&&("object"==st(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)}(e,dt()?Reflect.construct(t,n||[],pt(e).constructor):t.apply(e,n))}(this,t,[e])).completed=!1,n}return 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&&ft(e,t)}(t,e),n=t,(O=[{key:"initialize",value:function(){this.initServices(),this.initDataListeners(),this.initComponentListeners(),this.initCollectionListeners(),this.initShellListeners()}},{key:"name",get:function(){return"UploadVideosView"}},{key:"title",get:function(){return s.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"upload.uploadVideos"}},{key:"template",get:function(){return lt()}},{key:"regions",value:function(){return{topActions:{el:".top-actions-region",replaceElement:!0},bottomActions:{el:".bottom-actions-region",replaceElement:!0},videos:{el:".videos-region",replaceElement:!0}}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"initServices",value:function(){this.videoDataService=l.u.getInstance(v.Or.Video,this),this.videoUploadService=l.u.getInstance(v.K9.VideoUpload,this),this.videoUploadDataService=l.u.getInstance(v.Or.VideoUpload,this),this.seriesDataService=l.u.getInstance(v.Or.Series,this),this.ratingsDataService=l.u.getInstance(v.Or.Ratings,this),this.companyDataService=l.u.getInstance(v.Or.Company,this),this.personDataService=l.u.getInstance(v.Or.Person,this),this.alertService=l.u.getInstance(v.K9.Alerts,this),this.navLockService=l.u.getInstance(v.K9.NavLock,this),this.settingsDataService=l.u.getInstance(v.Or.Settings,this)}},{key:"initDataListeners",value:function(){this.listenTo(v.Vk.RATINGS,"".concat(v.M_.RATINGS,":sync"),this.render),this.listenTo(v.Vk.LIBRARY,"folder:created",this.onFolderCreated)}},{key:"initComponentListeners",value:function(){this.listenTo(this.channelName,"continue",this.onClickContinue),this.listenTo(this.channelName,"cancel:upload",this.cancelUpload),this.listenTo(this.channelName,f.S.FILES_SELECTED,this.onFilesSelected),this.listenTo(this.channelName,"show:new:folder",this.onClickNewFolder),this.listenTo(this.channelName,"get:series",this.onSelectSeries),this.listenTo(this.channelName,"create:series",this.onCreateSeries),this.listenTo(this.channelName,"create:season",this.onCreateSeason),this.listenTo(this.channelName,"create:company",this.onCreateCompany),this.listenTo(this.channelName,"create:person",this.onCreatePerson)}},{key:"initCollectionListeners",value:function(){var e=this.videoUploadService.getCollection();this.listenTo(e,"remove",this.onCollectionChange)}},{key:"initShellListeners",value:function(){this.listenTo(r.G.SHELL,u.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway)}},{key:"cancelUpload",value:function(e){this.logCancelAction(e),this.videoUploadService.cancelUpload(e)}},{key:"onNavigateAway",value:function(){this.logCancelAction(),this.videoUploadService.cancelAllUploads()}},{key:"onCollectionChange",value:function(e,t){t.length||(this.navLockService.unlock(),u.Q.C$.trigger({application:v.OV.UPLOAD,action:v.eX.Upload.FILE_SELECTION}))}},{key:"onSelectSeries",value:function(e,t){this.seriesDataService.getSeries(e,t)}},{key:"onCreateSeries",value:function(e,t){this.seriesDataService.createSeries(e,t)}},{key:"onCreateSeason",value:function(e,t,n){this.seriesDataService.createSeason(e,t,n)}},{key:"onCreateCompany",value:function(e,t){this.companyDataService.createCompany(e,t)}},{key:"onCreatePerson",value:function(e,t){this.personDataService.createPerson(e,t)}},{key:"onClickContinue",value:function(){var e,t=this,n=o.Radio.channel(this.channelName),i=this.videoUploadService.getCollection(),r=!0;if(i.each(function(t){var n=c.r.get("upload:".concat(t.get("id")),null,{ctor:g.n});n.validate();var o=n.isValid();!1!==o||e||(e=t.id),r=r&&o}),e&&n.trigger("invalid:".concat(e)),r){n.trigger("start:spinner");var d=[];i.each(function(e){var n=e.get("file"),o=c.r.get("upload:".concat(e.get("id")),null,{ctor:g.n});if(h.S.hasExpired(o,t.config.get("uploadSessionExpiryTime")))return t.alertService.createAlert({heading:s.T.getPhrase(t.lang,"uploadErrorHeading"),message:s.T.getPhrase(t.lang,"uploadErrorBody",{videoName:o.get("name")}),type:a.NK.Fail}),void i.remove(e);o.set("fileId",n.cvUpload.fileId),o.set("fileSize",n.size),d.push(o)}),this.videoUploadDataService.completeVideoUploads(this.currentUser.get("id"),this.currentUser.get("customerId"),d,function(){t.completed=!0,t.navLockService.unlock(),l.u.getInstance(v.K9.PendingItems).forceFetchPendingItems(),l.u.releaseInstance(v.K9.PendingItems),u.Q.C$.trigger({application:v.OV.UPLOAD,action:d.length?v.eX.Upload.UPLOAD_COMPLETE:v.eX.Upload.FILE_SELECTION}),t.logFinishAction(d),t.videoDataService.clearVideoCache()})}}},{key:"onFilesSelected",value:function(e,t){this.videoUploadService.addFiles(e),this.logStartAction(e,t)}},{key:"onClickNewFolder",value:function(e,t){this.setFolderChannel=t,this.navLockService.unlock(),u.Q.C$.trigger({application:v.OV.UPLOAD,action:v.eX.Shared.NEW_FOLDER,args:[e]}),this.lockNav()}},{key:"onFolderCreated",value:function(e){this.setFolderChannel&&(o.Radio.channel(this.setFolderChannel).trigger("new:folder:selected",e),this.render())}},{key:"logStartAction",value:function(e,t){var n=d.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:p.eu.Start,descriptor:d.k.mapInteractionType(t)});d.k.logUserAction(e,n)}},{key:"logCancelAction",value:function(e){var t=this.videoUploadService.getCollection();if(t.length){var n=e?t.get(e):t,o=d.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:p.eu.Discard,descriptor:e?p.yh.Single:p.yh.All});d.k.logUserAction(n.toJSON(),o)}}},{key:"logFinishAction",value:function(e){if(e.length){var t=i.map(e,function(e){return e.toJSON()}),n=d.k.mergeOptions(this.options.analyticsOptions,{workflowPhase:p.eu.Complete});d.k.logUserAction(t,n)}}},{key:"fetchData",value:function(){this.ratings=this.ratingsDataService.getAllRatings(),this.autoCaptioning=this.settingsDataService.getSetting(m.E.AutoCaptioning)}},{key:"renderUploadActions",value:function(){this.showChildView("topActions",new V({uploadChannelName:this.channelName})),this.showChildView("bottomActions",new V({uploadChannelName:this.channelName}))}},{key:"renderVideos",value:function(){var e={collection:this.videoUploadService.getCollection(),ratings:this.ratings,libraries:this.libraries,uploadChannelName:this.channelName,allowAutoCaptioning:this.autoCaptioning.get("value"),hideBroadcastInfo:this.currentUser.get("instanceRegion")===y.b.US};if(this.options.folderId){var t=S.PU.getLibrary(this.options.folderId,this.libraries);t&&(e.folderId=this.options.folderId,e.libraryId=t.get("id"))}var n=new rt(e);this.showChildView("videos",n)}},{key:"lockNav",value:function(){this.completed||this.navLockService.lock({title:s.T.getPhrase(this.lang,"navLockHeading"),text:s.T.getPhrase(this.lang,"navLockBody")})}},{key:"requiredResources",get:function(){return{currentUser:w.K.currentUser,libraries:k.T.libraries,config:b.p.config}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.ratings&&!!this.autoCaptioning}},{key:"onRender",value:function(){this.lockNav(),this.renderUploadActions(),this.renderVideos()}}])&&ct(n.prototype,O),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,O}(u.Q.G7)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return p}});var o=n(21161),i=n(31647),r=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 l(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,s(o.key),o)}}function s(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}var p=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=u(t),function(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)}(e,c()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),n=t,i=[{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 r.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,i="dropdown-menu-".concat(n);return o&&(i="".concat(i," ").concat(o)),i}},{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)}}}],i&&l(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.$W)},75226:function(e,t,n){"use strict";n.d(t,{H:function(){return v}});var o=n(43823),i=n(21161),r=n(31647),a=n(71641),l=n(93569),s=n(46635),c=n.n(s),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,f(o.key),o)}}function f(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var v=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=y(t),function(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}(this,t,[e])).selectSearch="",n.sameCharIndex=1,n.optionStep=1,n}return 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&&m(e,t)}(t,e),n=t,r=[{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(){o.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),o.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){l.yV.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(l.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)||(l.yV.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),o.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=l.yV.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=l.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))||(l.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=i.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=i.filter(this.collection.models,function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e});if(n.length>1){var o=n[this.sameCharIndex];return o||(o=i.first(n),this.sameCharIndex=0),this.sameCharIndex++,o}return i.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(!i.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(o))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=l.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:i.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(u.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}],r&&p(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},75917:function(e,t,n){"use strict";n.d(t,{Y:function(){return v}});var o=n(43823),i=n(57857),r=n(31647),a=n(50299),l=n(93569),s=n(68979),c=n.n(s),u={selectBtn:"tZUtI",list:"MxlSt",selector:"qHvbU",maxHeight:"jp36d",customItem:"aJzJB"};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,f(o.key),o)}}function f(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var v=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=y(t),function(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&m(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce(function(e,t){return Object.assign(Object.assign({},e),(n={},i=!0,(o=f(o=t))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,n));var n,o,i},{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".button-text"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),o.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var o=l.PU.getSelected(this.options.folderTreeKey,this.collection),r=o?o.get("name"):i.T.getPhrase(this.lang,"button");this.getUI("button").text(r)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new a.J({styles:u,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:u.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:u,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew,dropdown:this.options.dropdown}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}],r&&p(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},21893:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="dropdown-menu-region"></div>'},useData:!0})},42494:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return e.propertyIsEnumerable,'<div class="finish-button-region"></div>\n<button class="btn btn-outline-dark float-end add-more-videos">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"addMore",{name:"lang",hash:{},data:i}))+"</button>"},useData:!0})},76370:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="'+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.requiredStar:r,t))+'">*</span>'},3:function(e,t,n,o,i){return' <div class="library-select-region form-group col-6"></div>\n'},5:function(e,t,n,o,i){return"col-6"},7:function(e,t,n,o,i){return"col-12"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"uploadDestination",{name:"lang",hash:{},data:i}))+(null!=(r=n.if.call(a,null!=(r=null!=(r=null!=t?t.options:t)?r.requiredFields:r)?r.uploadDestination:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</h5>\n <div class="container-fluid px-0">\n <div class="row">\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.hasMultipleLibraries:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="folder-select-region form-group '+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.hasMultipleLibraries:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.program(7,i,0),data:i}))?r:"")+'"></div>\n </div>\n </div>\n</div>'},useData:!0})},11453:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s="function",c=e.escapeExpression;return'<div class="progress-bar bg-blue" style="width: '+c(typeof(r=null!=(r=n.progress||(null!=t?t.progress:t))?r:l)===s?r.call(a,{name:"progress",hash:{},data:i}):r)+'%" aria-valuenow="'+c(typeof(r=null!=(r=n.progress||(null!=t?t.progress:t))?r:l)===s?r.call(a,{name:"progress",hash:{},data:i}):r)+'" aria-valuemin="0" aria-valuemax="100"></div>'},useData:!0})},42633:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return" on"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression;return"<h5>"+s((n.lang||t&&t.lang||l).call(a,"heading",{name:"lang",hash:{},data:i}))+'</h5>\n<div class="container-fluid">\n <div class="row">\n <div class="form-group col-6 p-0">\n <div class="d-block">\n <label>'+s((n.lang||t&&t.lang||l).call(a,"autoCaptioningHeading",{name:"lang",hash:{},data:i}))+'</label>\n <div class="custom-toggle toggle-option float-end'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.isSelected:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"><span class="handle"></span></div>\n </div>\n <p class=\'mb-0 me-5\'>'+s((n.lang||t&&t.lang||l).call(a,"autoCaptioningInfo",{name:"lang",hash:{},data:i}))+"</p>\n </div>\n </div>\n</div>\n \n"},useData:!0})},61778:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"uploading",{name:"lang",hash:{percentage:null!=(r=null!=t?t.options:t)?r.percentage:r},data:i}))},useData:!0})},47381:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.name:r,t))},useData:!0})},63105:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="p-2 text-center border-top">\n <button class="add-advanced-metadata btn btn-link">'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.showAdvanced:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.program(4,i,0),data:i}))?r:"")+"</a>\n</div>\n"},2:function(e,t,n,o,i){return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hideMetadata",{name:"lang",hash:{},data:i}))},4:function(e,t,n,o,i){return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"addMetadata",{name:"lang",hash:{},data:i}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<div class="upload-title-region"></div>\n<div class="container-fluid">\n <div class="row">\n <div class="col-4 p-3">\n <div class="thumbnail-region"></div>\n <div class="upload-progress-region"></div>\n <div class="my-3">\n <h5 class="'+l(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.title:r,t))+'">'+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(s,{name:"name",hash:{},data:i}):a)+'</h5>\n <div class="text-progress-region"></div>\n <button class="btn btn-outline-dark cancel-upload">'+l((n.lang||t&&t.lang||c).call(s,"cancel",{name:"lang",hash:{},data:i}))+'</button>\n </div>\n\n </div>\n <div class="col-8 py-3 pe-3">\n <div class="video-details-region"></div>\n <div class="folder-select-region"></div>\n <div class="additional-info-region"></div>\n <div class="production-info-region"></div>\n <div class="video-options-region"></div>\n </div>\n </div>\n</div>\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.showExpand:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},35250:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="top-actions-region"></div>\n<div class="videos-region"></div>\n<div class="bottom-actions-region"></div>'},useData:!0})},46635:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return'<button \n class="dropdown-toggle form-control text-start position-relative '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectButton:r,t))+" "+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'" \n type="button" \n id="dropdownMenuButton" \n data-bs-toggle="dropdown" \n aria-haspopup="true" \n aria-expanded="false"\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' \n name="'+l(a(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\n >\n '+l(a(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'\n</button>\n<div class="dropdown-region"></div>\n<div class="form-feedback"></div>'},useData:!0})},68979:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression;return' <button\n class="'+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectBtn:r,t))+' form-select form-control"\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n name='+l(a(null!=(r=null!=t?t.options:t)?r.name:r,t))+'\n >\n <span class="d-block text-truncate button-text">\n '+l(a(null!=(r=null!=t?t.options:t)?r.buttonText:r,t))+'\n </span>\n </button>\n<div class="dropdown-menu '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selector:r,t))+'">\n'},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"border rounded-3 "+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.maxHeight:r,t))},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return' <button class="create-new btn fw-bold rounded-0 rounded-bottom-lg w-100 text-start '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.customItem:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:i}))+"</button>\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.dropdown:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.dropdown:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' overflow-auto" name='+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.name:r,t))+'>\n <div class="selector-region"></div>\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.canCreateNew:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\n<div class="form-feedback"></div>'},useData:!0})}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 7197-46b37cfd17.chunk.js.LICENSE.txt */
1
+ /*! For license information please see 7197-9844ed1bcf.chunk.js.LICENSE.txt */
2
2
  "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7197],{87268:function(t,e,n){n.d(e,{T:function(){return f}});var r=n(68003),o=n(52076),i=n(70065);function c(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof f?r:f,l=Object.create(c.prototype);return u(l,"_invoke",function(n,r,o){var i,c,u,f=0,l=o||[],y=!1,d={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return i=e,c=0,u=t,d.n=n,a}};function p(n,r){for(c=n,u=r,e=0;!y&&f&&!o&&e<l.length;e++){var o,i=l[e],p=d.p,s=i[2];n>3?(o=s===r)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=n<2&&p<i[1])?(c=0,d.v=r,d.n=i[1]):p<s&&(o=n<3||i[0]>r||r>s)&&(i[4]=n,i[5]=r,d.n=s,c=0))}if(o||n>1)return a;throw y=!0,r}return function(o,l,s){if(f>1)throw TypeError("Generator is already running");for(y&&1===l&&p(l,s),c=l,u=s;(e=c<2?t:u)||!y;){i||(c?c<3?(c>1&&(d.n=-1),p(c,u)):d.n=u:d.v=u);try{if(f=2,i){if(c||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,c<2&&(c=0)}else 1===c&&(e=i.return)&&e.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=t}else if((e=(y=d.n<0)?u:n.call(r,d))!==a)break}catch(e){i=t,c=1,u=e}finally{f=1}}return{value:e,done:y}}}(n,o,i),!0),l}var a={};function f(){}function l(){}function y(){}e=Object.getPrototypeOf;var d=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),p=y.prototype=f.prototype=Object.create(d);function s(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return l.prototype=y,u(p,"constructor",y),u(y,"constructor",l),l.displayName="GeneratorFunction",u(y,o,"GeneratorFunction"),u(p),u(p,o,"Generator"),u(p,r,function(){return this}),u(p,"toString",function(){return"[object Generator]"}),(c=function(){return{w:i,m:s}})()}function u(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}u=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){u(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}},u(t,e,n,r)}var a=null,f={getVideoDownloadUrl:function(t,e){return r._.safeUrlConcat(r._.makeHttps(t),"/download?token=".concat(e))},downloadResource:function(t,e,n,r){var c,u=a;a||(u=a=document.createElement("iframe"),document.body.appendChild(u),u.style.display="none"),u.src=t.url,r||o.k.logUserAction(Object.assign({id:null==t?void 0:t.id,name:null==t?void 0:t.name,resourceType:null===(c=null==t?void 0:t.metadata)||void 0===c?void 0:c.resourceType},e),Object.assign({actionType:i.Vw.Download,entity:i.py.Resource,workflowPhase:i.eu.Complete},n))},downloadBlob:function(t,e){return n=this,r=void 0,o=void 0,i=c().m(function n(){var r,o,i,u,a;return c().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,fetch(t);case 1:if((r=n.v).ok){n.n=2;break}throw new Error("Error downloading file");case 2:return u=URL,n.n=3,r.blob();case 3:a=n.v,o=u.createObjectURL.call(u,a),(i=document.createElement("a")).href=o,i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),window.setTimeout(function(){return URL.revokeObjectURL(o)},100);case 4:return n.a(2)}},n)}),new(o||(o=Promise))(function(t,e){function c(t){try{a(i.next(t))}catch(t){e(t)}}function u(t){try{a(i.throw(t))}catch(t){e(t)}}function a(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o(function(t){t(n)})).then(c,u)}a((i=i.apply(n,r||[])).next())});var n,r,o,i}}},57197:function(t,e,n){n.r(e),n.d(e,{DownloadVideoView:function(){return s}});var r=n(21679),o=n(31647),i=n(87268),c=n(45390),u=n(48404);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,l(r.key),r)}}function l(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(y=function(){return!!t})()}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}var s=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=d(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,y()?Reflect.construct(e,n||[],d(t).constructor):e.apply(t,n))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,(o=[{key:"initialize",value:function(){this.downloadProxyDataService=r.u.getInstance(c.Or.DownloadProxy,this)}},{key:"name",get:function(){return"DownloadVideoView"}},{key:"title",get:function(){return!1}},{key:"tagName",get:function(){return"iframe"}},{key:"template",get:function(){return function(){return"<div></div>"}}},{key:"requiredResources",get:function(){return{config:u.p.config}}},{key:"onBeforeRender",value:function(){var t=this;this.downloadProxyDataService.createDownloadToken(this.options.videoId,function(e){var n=i.T.getVideoDownloadUrl(t.config.get("downloadProxy"),e.get("token"));t.$el.attr("src",n)})}}])&&f(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.G7)}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7366],{47366:function(e,n,t){"use strict";t.r(n),t.d(n,{FileSelectView:function(){return T}});var o=t(21161),r=t(21679),l=t(57857),i=t(68003),a=t(31647),c=t(52076),u=t(70065),s=t(81937),p=t(18222),d=t(25692),f=t(57769),h=t(75432),g=t(98985),y=t(45390),m=t(48404),b=t(22103),v=t.n(b),k={uploadImage:"yRGoO"};function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function U(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,S(o.key),o)}}function S(e){var n=function(e){if("object"!=w(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=w(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==w(n)?n:n+""}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(O=function(){return!!e})()}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}function E(e,n){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},E(e,n)}var T=function(e){function n(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,n,t){return n=_(n),function(e,n){if(n&&("object"==w(n)||"function"==typeof n))return n;if(void 0!==n)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)}(e,O()?Reflect.construct(n,t||[],_(e).constructor):n.apply(e,t))}(this,n,arguments)}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&E(e,n)}(n,e),t=n,(a=[{key:"initialize",value:function(){this.listenTo(this.channelName,s.S.FILES_SELECTED,this.onFilesSelected),this.videoUploadService=r.u.getInstance(y.K9.VideoUpload,this)}},{key:"name",get:function(){return"FileSelectView"}},{key:"title",get:function(){return l.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"upload.fileSelect"}},{key:"template",get:function(){return v()}},{key:"className",get:function(){return"container px-0"}},{key:"props",get:function(){return["videoUploadService"]}},{key:"channelName",get:function(){return this.customCid||(this.customCid=o.uniqueId("custom")),"".concat(this.name).concat(this.customCid)}},{key:"behaviors",get:function(){return[{behaviorClass:f.Z,buttonSelector:".choose-files",channelName:this.channelName,acceptMultiple:!0,mimeType:p.l.VIDEO}]}},{key:"onFilesSelected",value:function(e,n){this.videoUploadService.addFiles(e),this.logAction(e,n)}},{key:"logAction",value:function(e,n){var t={actionType:u.Vw.Upload,entity:u.py.Video,location:u.LZ.VideoUpload,workflowPhase:u.eu.Start,descriptor:c.k.mapInteractionType(n)};c.k.logUserAction(e,t)}},{key:"requiredResources",get:function(){return{config:m.p.config,currentUser:h.K.currentUser}}},{key:"viewOptions",value:function(){return{styles:k,uploadArticleUrl:g.o.getHybridArticle(d.s.UploadToLibraryEditor,d.b.UploadToLibraryEditor),uploadTermsUrl:this.config?i._.safeUrlConcat(this.config.get("marketingSiteUrl"),y.l.UploadingUserContent):"",classNames:"info-link",imageUrl:y.Wn.Upload.UPLOAD_VIDEO}}}])&&U(t.prototype,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,a}(a.Q.G7)},22103:function(e,n,t){var o=t(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,n,t,o,r){e.propertyIsEnumerable;var l,i=null!=n?n:e.nullContext||{},a=e.hooks.helperMissing,c=e.escapeExpression,u=e.lambda;return'<div class="p-3 my-3 bg-white text-center">\n <h1>'+c((t.lang||n&&n.lang||a).call(i,"uploadVideos",{name:"lang",hash:{},data:r}))+'</h1>\n <div class="my-3">\n <img src="'+c(u(null!=(l=null!=n?n.options:n)?l.imageUrl:l,n))+'" class="'+c(u(null!=(l=null!=(l=null!=n?n.options:n)?l.styles:l)?l.uploadImage:l,n))+' img-fluid mb-2" />\n </div>\n <div>\n <button class="btn btn-dark choose-files">'+c((t.lang||n&&n.lang||a).call(i,"chooseVideo",{name:"lang",hash:{},data:r}))+"</button>\n </div>\n <div>\n <span>"+c((t.lang||n&&n.lang||a).call(i,"dragDrop",{name:"lang",hash:{},data:r}))+'</span>\n </div>\n</div>\n<div class="p-3 bg-white container-fluid">\n <div class="row">\n <div class="col-4">\n <h4>'+c((t.lang||n&&n.lang||a).call(i,"help",{name:"lang",hash:{},data:r}))+'</h2>\n <div class="border-top pt-2">\n <ul>\n <li><a class="info-link" href="'+c(u(null!=(l=null!=n?n.options:n)?l.uploadArticleUrl:l,n))+'" target="_blank">'+c((t.lang||n&&n.lang||a).call(i,"instructionsHeading",{name:"lang",hash:{},data:r}))+'</a></li>\n </ul>\n </div>\n </div>\n <div class="col-8">\n <h4>'+c((t.lang||n&&n.lang||a).call(i,"termsHeading",{name:"lang",hash:{},data:r}))+'</h2>\n <div class="border-top pt-2">\n <ol>\n <li>'+c((t.lang||n&&n.lang||a).call(i,"term1",{name:"lang",hash:{},data:r}))+"</li>\n <li>"+c((t.lang||n&&n.lang||a).call(i,"term2",{name:"lang",hash:{},data:r}))+"</li>\n <li>"+(null!=(l=(t.lang||n&&n.lang||a).call(i,"term3",{name:"lang",hash:{classNames:null!=(l=null!=n?n.options:n)?l.classNames:l,uploadTermsUrl:null!=(l=null!=n?n.options:n)?l.uploadTermsUrl:l},data:r}))?l:"")+"</li>\n </ol>\n </div>\n </div>\n </div>\n</div>"},useData:!0})}}]);