@clickview/library-editor 1.55.0 → 1.56.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.
- package/dist/bundles.json +2 -2
- package/dist/css/{4001-library-editor-f6d2f9fb58.chunk.css → 4001-library-editor-da87291909.chunk.css} +1 -1
- package/dist/css/{535-library-editor-e2b19f99ee.chunk.css → 535-library-editor-fa24102d7f.chunk.css} +1 -1
- package/dist/css/{61-library-editor-f25bac2db6.chunk.css → 61-library-editor-b5c939f10f.chunk.css} +2 -1
- package/dist/css/{library-editor-app-bcca987662.css → library-editor-app-6b401b236c.css} +3 -3
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{112-4f413f94c0.chunk.js → 112-5209a9a2d0.chunk.js} +1 -1
- package/dist/scripts/{2601-d46e5810eb.chunk.js → 2601-0bbd055a92.chunk.js} +1 -1
- package/dist/scripts/2644-17c596a0c9.chunk.js +1 -0
- package/dist/scripts/{343-41502b5d24.chunk.js → 343-a3dabdd615.chunk.js} +1 -1
- package/dist/scripts/{3551-ad62e3a403.chunk.js → 3551-d2ea1832c5.chunk.js} +1 -1
- package/dist/scripts/376-d76b864238.chunk.js +1 -0
- package/dist/scripts/4001-319ffe95a1.chunk.js +2 -0
- package/dist/scripts/{4024-5bc8aa8dcd.chunk.js → 4024-218556677c.chunk.js} +1 -1
- package/dist/scripts/471-7ede525821.chunk.js +2 -0
- package/dist/scripts/5173-f2d72d7c3e.chunk.js +1 -0
- package/dist/scripts/{61-ca10628c31.chunk.js → 61-de99ab5568.chunk.js} +2 -2
- package/dist/scripts/{6352-6452f77c89.chunk.js → 6352-50c10c1bc6.chunk.js} +1 -1
- package/dist/scripts/{7002-eef9319d36.chunk.js → 7002-6d9f52d6d3.chunk.js} +1 -1
- package/dist/scripts/708-f7536cb7a4.chunk.js +1 -0
- package/dist/scripts/8130-f0c1977041.chunk.js +1 -0
- package/dist/scripts/{8727-9077c2b877.chunk.js → 8727-188101f028.chunk.js} +1 -1
- package/dist/scripts/{8952-a9a7742f72.chunk.js → 8952-4201ae6599.chunk.js} +1 -1
- package/dist/scripts/{9369-1e706eb521.chunk.js → 9369-d078677c28.chunk.js} +1 -1
- package/dist/scripts/bundle-b38a9aa50e.min.js +2 -0
- package/package.json +1 -1
- package/dist/scripts/2644-98304e9394.chunk.js +0 -1
- package/dist/scripts/376-83584040a3.chunk.js +0 -1
- package/dist/scripts/4001-9194fbe77b.chunk.js +0 -2
- package/dist/scripts/5173-d333602893.chunk.js +0 -1
- package/dist/scripts/6532-48f3f080f5.chunk.js +0 -2
- package/dist/scripts/708-c74c75f82a.chunk.js +0 -1
- package/dist/scripts/8130-753cb2b6bb.chunk.js +0 -1
- package/dist/scripts/bundle-9fb3396566.min.js +0 -2
- package/typings/libs/CVEvents.d.ts +0 -13
- package/typings/libs/lodash.d.ts +0 -11
- /package/dist/scripts/{101-8f41923234.chunk.js → 101-c2af2cc10c.chunk.js} +0 -0
- /package/dist/scripts/{1010-4a381a84d4.chunk.js → 1010-f1c8bca022.chunk.js} +0 -0
- /package/dist/scripts/{1409-58db6bd9f7.chunk.js → 1409-ae672618b1.chunk.js} +0 -0
- /package/dist/scripts/{1703-45ced13ccd.chunk.js → 1703-0f9e8a489f.chunk.js} +0 -0
- /package/dist/scripts/{1832-6a54b38248.chunk.js → 1832-52444b0088.chunk.js} +0 -0
- /package/dist/scripts/{1876-e0567188b8.chunk.js → 1876-0a931d62d9.chunk.js} +0 -0
- /package/dist/scripts/{2417-7628573bf3.chunk.js → 2417-9731b9da6b.chunk.js} +0 -0
- /package/dist/scripts/{243-25fcce188c.chunk.js → 243-c4bb9e995e.chunk.js} +0 -0
- /package/dist/scripts/{259-e24fcf8f12.chunk.js → 259-ef5133c0fd.chunk.js} +0 -0
- /package/dist/scripts/{299-1a0d6a88dc.chunk.js → 299-5585deab1d.chunk.js} +0 -0
- /package/dist/scripts/{35-68aa98885c.chunk.js → 35-dde0c25008.chunk.js} +0 -0
- /package/dist/scripts/{3746-9c62c31099.chunk.js → 3746-588ea9d62d.chunk.js} +0 -0
- /package/dist/scripts/{4001-9194fbe77b.chunk.js.LICENSE.txt → 4001-319ffe95a1.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4245-59b4242cad.chunk.js → 4245-db2d86c59d.chunk.js} +0 -0
- /package/dist/scripts/{4523-55c4df85c8.chunk.js → 4523-fec10bbbcb.chunk.js} +0 -0
- /package/dist/scripts/{6532-48f3f080f5.chunk.js.LICENSE.txt → 471-7ede525821.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5046-cb525612c6.chunk.js → 5046-b65e8db7c0.chunk.js} +0 -0
- /package/dist/scripts/{5286-7aac82c4d1.chunk.js → 5286-c574f5b574.chunk.js} +0 -0
- /package/dist/scripts/{535-27d0457532.chunk.js → 535-794be8eab5.chunk.js} +0 -0
- /package/dist/scripts/{546-f770211173.chunk.js → 546-2ee5c90feb.chunk.js} +0 -0
- /package/dist/scripts/{5707-fcb653aa7a.chunk.js → 5707-b2b239ff4e.chunk.js} +0 -0
- /package/dist/scripts/{5747-674f00efcd.chunk.js → 5747-7ca7ad6c1d.chunk.js} +0 -0
- /package/dist/scripts/{5891-0864c38750.chunk.js → 5891-ac4d3f803a.chunk.js} +0 -0
- /package/dist/scripts/{61-ca10628c31.chunk.js.LICENSE.txt → 61-de99ab5568.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6963-0e2bf1bde7.chunk.js → 6963-254d82f6c2.chunk.js} +0 -0
- /package/dist/scripts/{7053-35b82818eb.chunk.js → 7053-91a52f57d7.chunk.js} +0 -0
- /package/dist/scripts/{7071-6f7e375aaa.chunk.js → 7071-6d98c3dcfa.chunk.js} +0 -0
- /package/dist/scripts/{7153-57796cd98e.chunk.js → 7153-fc080e3d53.chunk.js} +0 -0
- /package/dist/scripts/{7295-474c754cb6.chunk.js → 7295-49780496e2.chunk.js} +0 -0
- /package/dist/scripts/{7408-15b5cc4a39.chunk.js → 7408-c1551d3e0d.chunk.js} +0 -0
- /package/dist/scripts/{7827-ce63697325.chunk.js → 7827-c1f1b4f608.chunk.js} +0 -0
- /package/dist/scripts/{8952-a9a7742f72.chunk.js.LICENSE.txt → 8952-4201ae6599.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9369-1e706eb521.chunk.js.LICENSE.txt → 9369-d078677c28.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9383-d58506608c.chunk.js → 9383-4ed13f5993.chunk.js} +0 -0
- /package/dist/scripts/{bundle-9fb3396566.min.js.LICENSE.txt → bundle-b38a9aa50e.min.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[112],{9934:function(e,t,n){"use strict";n.r(t),n.d(t,{InteractiveDetailsView:function(){return $}});var r=n(39479),i=n.n(r),o=n(99748),a=n(21679),c=n(31647),s=n(50997),l=n(57085),u=n(50002),f=n(30831),d=n(23130),p=n(4785),h=n.n(p);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b(r.key),r)}}function b(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(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=g(t),function(e,t){if(t&&("object"==v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],g(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&&w(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"InteractiveBasicInfoComponent"}},{key:"className",get:function(){return"py-3 pe-2"}},{key:"template",get:function(){return h()}},{key:"lang",get:function(){return"shared.interactiveBasicInfo"}},{key:"defaults",get:function(){return{truncateDescription:!0}}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0},interactives:{el:".interactives-region",replaceElement:!0},mediaTypeBadge:{el:".media-type-badge-region",replaceElement:!0}}}},{key:"renderDescription",value:function(){if(this.model&&this.model.get("description")){var e=new d.Z({model:this.model,linkify:!0,size:d.t.Large,truncate:this.options.truncateDescription,allowExpand:!0});this.showChildView("description",e)}}},{key:"renderInteractives",value:function(){if(this.model._timepoints.length){var e=new u.F({model:this.model});this.showChildView("interactives",e)}}},{key:"renderMediaTypeBadge",value:function(){var e=new f.Z({model:this.model});this.showChildView("mediaTypeBadge",e)}},{key:"onRender",value:function(){this.renderDescription(),this.renderInteractives(),this.renderMediaTypeBadge()}}])&&y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),k=n(57098),O=n(21251),C=n(33800),I=n(29457),S=n(48404),T=n(64649),_=n(19226),j=n(53609),V=(n(73176),n(79238),n(69051),n(17017),n(67743),n(67430),n(2496),n(60371),n(38890),n(42511),n(7427)),P=(n(91850),n(37570),n(37071),n(13809),n(39216)),L=n.n(P);function D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,B(r.key),r)}}function B(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 x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}var F=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=A(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,x()?Reflect.construct(t,n||[],A(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"InteractiveSidebarInfoComponent"}},{key:"lang",get:function(){return"libraryEditor.interactiveSidebarInfo"}},{key:"className",get:function(){return"py-3 h-100"}},{key:"template",get:function(){return L()}},{key:"regions",value:function(){return{interactiveThumbnail:{el:".interactive-thumbnail-region",replaceElement:!0},folders:{el:".folders-region",replaceElement:!0}}}},{key:"renderInteractiveThumbnail",value:function(){this.showChildView("interactiveThumbnail",new j.b({model:this.model,config:this.options.config}))}},{key:"renderFolders",value:function(){this.model.get("categories")&&this.model.get("categories").length&&this.showChildView("folders",new V.V({model:this.model,libraries:this.options.libraries,showFolder:!0,hideLabel:!0}))}},{key:"viewOptions",value:function(){return{folders:this.model.categories&&this.model.categories.length,multipleFolders:this.model.categories.length>1}}},{key:"onRender",value:function(){this.renderInteractiveThumbnail(),this.renderFolders()}}])&&R(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),H=n(24397),N=n(56906),U=n(95061),Q=n(34620),z=n.n(Q);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 J(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z(r.key),r)}}function Z(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 q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(q=function(){return!!e})()}function K(e){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K(e)}function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}var $=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=K(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,q()?Reflect.construct(t,n||[],K(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&&Y(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.bindListeners(),this.videoDataService=a.u.getInstance(C.O.Video,this),this.localCacheDataService=a.u.getInstance(C.O.LocalCache,this)}},{key:"bindListeners",value:function(){this.listenTo(k.Vk.VIDEO,"".concat(O.M.INTERACTIVES,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(k.Vk.VIDEO,"".concat(O.M.INTERACTIVES,":").concat(this.options.interactiveId,":error"),this.onError),this.listenTo(k.Vk.VIDEO,"".concat(O.M.RESTRICTED_OBJECTS,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(k.Vk.VIDEO,"cache:cleared",this.render),this.listenTo(k.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(k.Vk.RESTRICTED_VIDEO,"".concat(O.M.RESTRICTED_OBJECTS,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(k.Vk.LOCAL_CACHE,"".concat(O.M.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(k.Vk.LOCAL_CACHE,"".concat(O.M.LOCAL_CACHE_DEVICES,":error"),this.onError)}},{key:"onError",value:function(e){switch(e.type){case o.h.NotFound:c.Q.Ry.throw(new N.l1);break;case o.h.Forbidden:c.Q.Ry.throw(new N.aV)}}},{key:"name",get:function(){return"InteractiveDetailsView"}},{key:"title",get:function(){return this.interactive&&this.interactive.get("name")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return z()}},{key:"className",get:function(){return"container-fluid h-100 bg-white rounded"}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1,partialLoading:I.LP.Breadcrumbs},header:{replaceElement:!0,el:".interactive-header-region",partialLoading:I.LP.VideoHeader},main:{replaceElement:!0,el:".main-interactive-information-region",partialLoading:I.LP.VideoSidebarInfo},basic:{replaceElement:!1,el:".basic-interactive-information-region",partialLoading:I.LP.InteractiveBasicInfo},interactives:{el:".interactives-region",replaceElement:!0}}}},{key:"getCustomLibraryFolders",value:function(){var e;if(!(null===(e=this.interactive)||void 0===e?void 0:e.categories)||!this.libraries)return[];var t=this.libraries.reduce((function(e,t){return e[t.id]=!0,e}),{});return this.interactive.categories.filter((function(e){var n=e.libraries.first().get("id");return t[n]}))}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.interactive&&this.showChildView("breadcrumbs",new l.n({folder:this.folder,libraries:this.libraries,video:this.interactive,enableLastItemAppLink:!1}))}},{key:"renderVideoHeader",value:function(){this.showChildView("header",new H.U({model:this.interactive,customerHasLocalCache:s.o8.customerHasLocalCache(this.devices,this.currentUser.get("customerId")),collectionIdentifier:this.folder&&new s.F7(this.folder.id,s.x$.GetCurrentSortType()),config:this.config,products:this.products,libraries:this.libraries}))}},{key:"renderSidebarInfo",value:function(){this.showChildView("main",new F({model:this.interactive,libraries:this.libraries,config:this.config}))}},{key:"renderBasicInfo",value:function(){this.interactive&&this.showChildView("basic",new E({model:this.interactive}))}},{key:"requiredResources",get:function(){return{config:S.p.config,currentUser:_.K.currentUser,libraries:U.T.libraries,products:T.s.products}}},{key:"onBeforeRender",value:function(){return this.interactive=this.videoDataService.getInteractive(this.options.interactiveId),this.interactive&&(this.folder=i().first(this.getCustomLibraryFolders())),this.devices=this.localCacheDataService.getDevices(this.currentUser.get("customerId")),!!this.interactive}},{key:"viewOptions",value:function(){if(this.interactive)return{hasFolder:!!this.folder}}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderVideoHeader(),this.renderSidebarInfo(),this.renderBasicInfo()}}])&&J(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.G7)},13809:function(e,t,n){"use strict";n.d(t,{UC:function(){return r.U}});var r=n(58688);n(19969),n(14898)},39216:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,' <div class="mt-3">\n <h5>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"folders",{name:"lang",hash:{smartCount:null!=(o=null!=t?t.options:t)?o.folders:o},data:i}))+'</h5>\n <div class="folders-region"></div>\n </div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,'<div class="h-100 ps-2 pe-2">\n <div class="interactive-thumbnail-region"></div>\n\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.folders:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+"</div>"},useData:!0})},34620:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="row border-bottom">\n <div class="interactive-header-region"></div>\n\n <div class="px-3 pb-3">\n <div class="breadcrumbs-region"></div>\n </div>\n</div>\n\n<div class="row">\n <div class="col-4">\n <div class="main-interactive-information-region"></div>\n </div>\n <div class="col-8">\n <div class="basic-interactive-information-region"></div>\n\n <div class="interactives-region"></div>\n </div>\n</div>'},useData:!0})},4785:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,s=e.escapeExpression;return' <div class="col-3 fw-semibold">'+s((n.lang||t&&t.lang||c).call(a,"title",{name:"lang",hash:{},data:i}))+'</div>\n <p class="col-9">'+s("function"==typeof(o=null!=(o=n.name||(null!=t?t.name:t))?o:c)?o.call(a,{name:"name",hash:{},data:i}):o)+"</p>\n"},3:function(e,t,n,r,i){return e.propertyIsEnumerable,' <div class="col-3 fw-semibold">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"description",{name:"lang",hash:{},data:i}))+'</div>\n <div class="col-9">\n <div class="description-region"></div>\n </div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,s=e.escapeExpression;return'<div class="position-relative">\n <h5 class="d-inline-block">'+s((n.lang||t&&t.lang||c).call(a,"heading",{name:"lang",hash:{},data:i}))+'</h5>\n</div>\n<div class="row mb-0">\n'+(null!=(o=n.if.call(a,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=n.if.call(a,null!=t?t.description:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+'\n <div class="col-3 fw-semibold">'+s((n.lang||t&&t.lang||c).call(a,"type",{name:"lang",hash:{},data:i}))+'</div>\n <div class="col-9 mb-2">\n <div class="media-type-badge-region"></div>\n </div>\n\n <div class="interactives-region"></div>\n</div>'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[112],{9934:function(e,t,n){"use strict";n.r(t),n.d(t,{InteractiveDetailsView:function(){return $}});var r=n(39479),i=n.n(r),o=n(99748),a=n(21679),c=n(31647),s=n(50997),l=n(57085),u=n(50002),f=n(30831),d=n(23130),p=n(4785),h=n.n(p);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b(r.key),r)}}function b(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(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=g(t),function(e,t){if(t&&("object"==v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],g(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&&w(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"InteractiveBasicInfoComponent"}},{key:"className",get:function(){return"py-3 pe-2"}},{key:"template",get:function(){return h()}},{key:"lang",get:function(){return"shared.interactiveBasicInfo"}},{key:"defaults",get:function(){return{truncateDescription:!0}}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0},interactives:{el:".interactives-region",replaceElement:!0},mediaTypeBadge:{el:".media-type-badge-region",replaceElement:!0}}}},{key:"renderDescription",value:function(){if(this.model&&this.model.get("description")){var e=new d.Z({model:this.model,linkify:!0,size:d.t.Large,truncate:this.options.truncateDescription,allowExpand:!0});this.showChildView("description",e)}}},{key:"renderInteractives",value:function(){if(this.model._timepoints.length){var e=new u.F({model:this.model});this.showChildView("interactives",e)}}},{key:"renderMediaTypeBadge",value:function(){var e=new f.Z({model:this.model});this.showChildView("mediaTypeBadge",e)}},{key:"onRender",value:function(){this.renderDescription(),this.renderInteractives(),this.renderMediaTypeBadge()}}])&&y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),k=n(57098),O=n(21251),I=n(33800),C=n(29457),T=n(48404),S=n(64649),_=n(19226),j=n(53609),V=(n(73176),n(79238),n(69051),n(17017),n(67743),n(67430),n(2496),n(60371),n(38890),n(42511),n(7427)),P=(n(91850),n(37570),n(37071),n(13809),n(39216)),D=n.n(P);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 R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,B(r.key),r)}}function B(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 x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}var F=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=A(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,x()?Reflect.construct(t,n||[],A(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"InteractiveSidebarInfoComponent"}},{key:"lang",get:function(){return"libraryEditor.interactiveSidebarInfo"}},{key:"className",get:function(){return"py-3 h-100"}},{key:"template",get:function(){return D()}},{key:"regions",value:function(){return{interactiveThumbnail:{el:".interactive-thumbnail-region",replaceElement:!0},folders:{el:".folders-region",replaceElement:!0}}}},{key:"renderInteractiveThumbnail",value:function(){this.showChildView("interactiveThumbnail",new j.b({model:this.model,config:this.options.config}))}},{key:"renderFolders",value:function(){this.model.get("categories")&&this.model.get("categories").length&&this.showChildView("folders",new V.V({model:this.model,libraries:this.options.libraries,showFolder:!0,hideLabel:!0}))}},{key:"viewOptions",value:function(){return{folders:this.model.categories&&this.model.categories.length,multipleFolders:this.model.categories.length>1}}},{key:"onRender",value:function(){this.renderInteractiveThumbnail(),this.renderFolders()}}])&&R(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),H=n(24397),N=n(56906),U=n(95061),Q=n(34620),z=n.n(Q);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 J(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Z(r.key),r)}}function Z(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 q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(q=function(){return!!e})()}function K(e){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K(e)}function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}var $=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=K(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,q()?Reflect.construct(t,n||[],K(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&&Y(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.bindListeners(),this.videoDataService=a.u.getInstance(I.O.Video,this),this.localCacheDataService=a.u.getInstance(I.O.LocalCache,this)}},{key:"bindListeners",value:function(){this.listenTo(k.Vk.VIDEO,"".concat(O.M.INTERACTIVES,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(k.Vk.VIDEO,"".concat(O.M.INTERACTIVES,":").concat(this.options.interactiveId,":error"),this.onError),this.listenTo(k.Vk.VIDEO,"".concat(O.M.RESTRICTED_OBJECTS,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(k.Vk.VIDEO,"cache:cleared",this.render),this.listenTo(k.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(k.Vk.RESTRICTED_VIDEO,"".concat(O.M.RESTRICTED_OBJECTS,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(k.Vk.LOCAL_CACHE,"".concat(O.M.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(k.Vk.LOCAL_CACHE,"".concat(O.M.LOCAL_CACHE_DEVICES,":error"),this.onError),this.listenTo(k.Vk.VIDEO,"".concat(O.M.DELETE_VIDEO,":sync"),this.destroy)}},{key:"onError",value:function(e){switch(e.type){case o.h.NotFound:c.Q.Ry.throw(new N.l1);break;case o.h.Forbidden:c.Q.Ry.throw(new N.aV)}}},{key:"name",get:function(){return"InteractiveDetailsView"}},{key:"title",get:function(){return this.interactive&&this.interactive.get("name")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return z()}},{key:"className",get:function(){return"container-fluid h-100 bg-white rounded"}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1,partialLoading:C.LP.Breadcrumbs},header:{replaceElement:!0,el:".interactive-header-region",partialLoading:C.LP.VideoHeader},main:{replaceElement:!0,el:".main-interactive-information-region",partialLoading:C.LP.VideoSidebarInfo},basic:{replaceElement:!1,el:".basic-interactive-information-region",partialLoading:C.LP.InteractiveBasicInfo},interactives:{el:".interactives-region",replaceElement:!0}}}},{key:"getCustomLibraryFolders",value:function(){var e;if(!(null===(e=this.interactive)||void 0===e?void 0:e.categories)||!this.libraries)return[];var t=this.libraries.reduce((function(e,t){return e[t.id]=!0,e}),{});return this.interactive.categories.filter((function(e){var n=e.libraries.first().get("id");return t[n]}))}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.interactive&&this.showChildView("breadcrumbs",new l.n({folder:this.folder,libraries:this.libraries,video:this.interactive,enableLastItemAppLink:!1}))}},{key:"renderVideoHeader",value:function(){this.showChildView("header",new H.U({model:this.interactive,customerHasLocalCache:s.o8.customerHasLocalCache(this.devices,this.currentUser.get("customerId")),collectionIdentifier:this.folder&&new s.F7(this.folder.id,s.x$.GetCurrentSortType()),config:this.config,products:this.products,libraries:this.libraries}))}},{key:"renderSidebarInfo",value:function(){this.showChildView("main",new F({model:this.interactive,libraries:this.libraries,config:this.config}))}},{key:"renderBasicInfo",value:function(){this.interactive&&this.showChildView("basic",new E({model:this.interactive}))}},{key:"requiredResources",get:function(){return{config:T.p.config,currentUser:_.K.currentUser,libraries:U.T.libraries,products:S.s.products}}},{key:"onBeforeRender",value:function(){return this.interactive=this.videoDataService.getInteractive(this.options.interactiveId),this.interactive&&(this.folder=i().first(this.getCustomLibraryFolders())),this.devices=this.localCacheDataService.getDevices(this.currentUser.get("customerId")),!!this.interactive}},{key:"viewOptions",value:function(){if(this.interactive)return{hasFolder:!!this.folder}}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderVideoHeader(),this.renderSidebarInfo(),this.renderBasicInfo()}}])&&J(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.G7)},13809:function(e,t,n){"use strict";n.d(t,{UC:function(){return r.U}});var r=n(58688);n(19969),n(14898)},39216:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,' <div class="mt-3">\n <h5>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"folders",{name:"lang",hash:{smartCount:null!=(o=null!=t?t.options:t)?o.folders:o},data:i}))+'</h5>\n <div class="folders-region"></div>\n </div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,'<div class="h-100 ps-2 pe-2">\n <div class="interactive-thumbnail-region"></div>\n\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.folders:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+"</div>"},useData:!0})},34620:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="row border-bottom">\n <div class="interactive-header-region"></div>\n\n <div class="px-3 pb-3">\n <div class="breadcrumbs-region"></div>\n </div>\n</div>\n\n<div class="row">\n <div class="col-4">\n <div class="main-interactive-information-region"></div>\n </div>\n <div class="col-8">\n <div class="basic-interactive-information-region"></div>\n\n <div class="interactives-region"></div>\n </div>\n</div>'},useData:!0})},4785:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,s=e.escapeExpression;return' <div class="col-3 fw-semibold">'+s((n.lang||t&&t.lang||c).call(a,"title",{name:"lang",hash:{},data:i}))+'</div>\n <p class="col-9">'+s("function"==typeof(o=null!=(o=n.name||(null!=t?t.name:t))?o:c)?o.call(a,{name:"name",hash:{},data:i}):o)+"</p>\n"},3:function(e,t,n,r,i){return e.propertyIsEnumerable,' <div class="col-3 fw-semibold">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"description",{name:"lang",hash:{},data:i}))+'</div>\n <div class="col-9">\n <div class="description-region"></div>\n </div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,s=e.escapeExpression;return'<div class="position-relative">\n <h5 class="d-inline-block">'+s((n.lang||t&&t.lang||c).call(a,"heading",{name:"lang",hash:{},data:i}))+'</h5>\n</div>\n<div class="row mb-0">\n'+(null!=(o=n.if.call(a,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=n.if.call(a,null!=t?t.description:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+'\n <div class="col-3 fw-semibold">'+s((n.lang||t&&t.lang||c).call(a,"type",{name:"lang",hash:{},data:i}))+'</div>\n <div class="col-9 mb-2">\n <div class="media-type-badge-region"></div>\n </div>\n\n <div class="interactives-region"></div>\n</div>'},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2601],{21053:function(e,t,n){"use strict";n.d(t,{W:function(){return b}});var o=n(48088),i=n(57857),r=n(31647),a=n(57085),s=n(35630),l=n(57098),u=n(43791),c=n.n(u),d={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 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,p(o.key),o)}}function p(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 v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}var b=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"==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,v()?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&&y(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:d}}},{key:"onSave",value:function(){o.Radio.channel(l.OV.LIBRARY_EDITOR).trigger(l.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 a.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&h(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},74250:function(e,t,n){"use strict";n.d(t,{z:function(){return g}});var o=n(48088),i=n(57857),r=n(31647),a=n(88172),s=n(93569),l=n(40622),u=n(99724),c=n.n(u),d={saveButton:"G_FDK",undo:"dcV70"};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 h(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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,v(o.key),o)}}function v(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 m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(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=y(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,m()?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&&b(e,t)}(t,e),n=t,u=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return o.Radio.channel(this.options.channelName)}},{key:"getSaveChannelName",value:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .undo":"onUndo"}}},{key:"initialize",value:function(){this.model||(this.model=new r.Q.Hn(h(h({},a.ZV.ShowSpinner,this.options.showSpinner),a.ZV.Disabled,this.options.isDisabled)));var e=this.options.channelName;this.listenTo(e,l.NT.DisableSave,this.onDisableSave),this.listenTo(e,l.NT.EnableSave,this.onEnableSave),this.listenTo(e,l.NT.CancelSave,this.onCancelSave);var t=o.Radio.channel(this.getSaveChannelName());this.listenTo(t,l.NT.Save,this.onSave),this.options.allowUndo&&(this.options.hasChanges&&this.model.set("showUndo",!0),this.listenTo(this.model,"change:showUndo",this.render))}},{key:"onCancelSave",value:function(){this.model.set(a.ZV.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(a.ZV.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(a.ZV.ShowSpinner)&&this.model.set(a.ZV.ShowSpinner,!1,{silent:!0}),this.model.set(a.ZV.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(l.NT.Undo)}},{key:"onSave",value:function(){this.model.set(a.ZV.ShowSpinner,!0),this.getParentChannel().trigger(l.NT.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:d}}},{key:"renderSaveButton",value:function(){var e=new a.Py({saveEvent:l.NT.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:i.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(d.saveButton),spinnerOptions:{size:s.Ey.Small,type:s.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}],u&&p(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},44391:function(e,t,n){"use strict";n.d(t,{K:function(){return T}});var o=n(11306),i=n(31647),r=n(48088),a=n(57098),s=n(25887),l=n(15564),u=n.n(l);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function 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,f(o.key),o)}}function f(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var m=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=p(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],p(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,o=[{key:"name",get:function(){return"TagItemComponent"}},{key:"tagName",get:function(){return this.options.behavior===s.Dm.Link?"a":"span"}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?"":" d-inline-flex"),t="".concat(this.isSaving()?" saving":""),n="".concat(this.options.behavior===s.Dm.Disabled?" ".concat("dE3WC"):""),o="".concat(this.options.behavior===s.Dm.Filter?" cursor-pointer":"");return"rounded-pill tag py-1 px-2 flex-shrink-0 ".concat(o).concat(e).concat(t).concat(n)}},{key:"template",get:function(){return u()}},{key:"elements",get:function(){return{close:".btn-close"}}},{key:"appLinks",get:function(){return this.options.behavior!==s.Dm.Link?{}:{"[this]":{application:a.OV.SEARCH,action:a.eX.Search.HOME,params:{tag:this.model.get("name")}}}}},{key:"defaults",get:function(){return{behavior:s.Dm.Link,orientation:s.zM.Flex}}},{key:"events",value:function(){return this.options.removeEvent?{"click @ui.close":"onRemoveTag"}:{click:"onClickTag"}}},{key:"initialize",value:function(){this.options.behavior===s.Dm.Edit&&this.listenTo(this.model,"change",this.render)}},{key:"isSaving",value:function(){if(this.options.behavior!==s.Dm.Filter){var e=this.model.pick("id","name","remove"),t=e.id,n=e.name;return!!e.remove||!t||!n}}},{key:"onRemoveTag",value:function(e){if(e.stopPropagation(),!this.isSaving())return this.model.set("remove",!0),r.Radio.channel(this.options.channelName).trigger(this.options.removeEvent,this.model),!1}},{key:"onClickTag",value:function(){this.options.behavior!==s.Dm.Filter||this.options.removeEvent||r.Radio.channel(this.options.channelName).trigger(this.options.clickEvent,this.model)}},{key:"getTrimmedName",value:function(){var e=this.model.get("name");return e.length>36?"".concat(e.substring(0,36),"..."):e}},{key:"viewOptions",value:function(){return{removable:this.options.removeEvent,trimmedName:this.getTrimmedName()}}},{key:"onRender",value:function(){this.resetClassName()}}],o&&d(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(i.Q.wA);function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function b(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,g(o.key),o)}}function g(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(w=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var T=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=k(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,w()?Reflect.construct(t,n||[],k(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&&S(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.options.behavior!==s.Dm.Edit||this.options.removeEvent||i.Q.Ry.throw(new o.H("removeEvent is required to edit tags."))}},{key:"name",get:function(){return"TagComponentCollection"}},{key:"defaults",get:function(){return{orientation:s.zM.Flex}}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?"d-flex align-items-start flex-column":"d-flex flex-wrap gap-1");return"tags ".concat(e)}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent,clickEvent:this.options.clickEvent}}},{key:"childView",get:function(){return m}}])&&b(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.$W)},25887:function(e,t,n){"use strict";var o,i,r;n.d(t,{Dm:function(){return o},zM:function(){return i},x_:function(){return r}}),function(e){e[e.Link=1]="Link",e[e.Edit=2]="Edit",e[e.Disabled=3]="Disabled",e[e.Filter=4]="Filter"}(o||(o={})),function(e){e[e.Flex=1]="Flex",e[e.Vertical=2]="Vertical"}(i||(i={})),function(e){e[e.Folder=0]="Folder",e[e.Series=1]="Series"}(r||(r={}))},18974:function(e,t,n){"use strict";n.r(t),n.d(t,{EditVideoView:function(){return ot}});var o=n(48088),i=n(39479),r=n(25417),a=n(99748),s=n(11306),l=n(21679),u=n(57857),c=n(99249),d=n(31647),f=n(52076),h=n(70065),p=n(8371),v=n(13156),m=n(29625),y=n(57098),b=n(29457),g=n(68619),w=n(85847),k=n(19226),S=n(93569),T=n(45837),O=n(24184),E=n(72998),C=n(95168),P=n(44106),j=n.n(P),N=n(99844),D=n(72891),x=n.n(D);function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function _(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,V(o.key),o)}}function V(e){var t=function(e){if("object"!=M(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=M(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==M(t)?t:t+""}function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(R=function(){return!!e})()}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}var U=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=I(t),function(e,t){if(t&&("object"==M(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,R()?Reflect.construct(t,n||[],I(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&&B(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){var e=this;this.listenTo(this.model,"change",(function(){return e.options.viewModel.validate()}))}},{key:"template",get:function(){return x()}},{key:"name",get:function(){return"ExtraInfoItemComponent"}},{key:"regions",value:function(){return{textArea:{el:".text-area-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=value]":{observe:"value",setOptions:{validate:!0}}}}},{key:"onRender",value:function(){this.showChildView("textArea",new N.F({name:"value",class:"form-control",placeholder:this.model.get("placeholder"),id:"admin-notes"})),this.stickit(),o.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),o.Validation.unbind(this)}}])&&_(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(d.Q.wA);function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Q(o.key),o)}}function z(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q(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 J(e,t,n){return t=H(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,Z()?Reflect.construct(t,n||[],H(e).constructor):t.apply(e,n))}function Z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Z=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function K(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}function G(e,t){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},G(e,t)}var W=function(e){function t(e){return A(this,t),J(this,t,[e])}return K(t,e),z(t,[{key:"name",get:function(){return"ExtraInfoComponentCollection"}},{key:"childView",get:function(){return U}},{key:"childViewOptions",get:function(){return{viewModel:this.options.viewModel}}}])}(d.Q.$W),Y=function(e){function t(e){return A(this,t),J(this,t,[e])}return K(t,e),z(t,[{key:"name",get:function(){return"ExtraInfoComponent"}},{key:"template",get:function(){return j()}},{key:"className",get:function(){return"border-top pt-3"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new W({collection:this.model.fields,viewModel:this.model}))}}])}(d.Q.wA),q=n(88483),X=n(2772),$=n(10101),ee=n(86272),te=n.n(ee);function ne(e){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(e)}function oe(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,ie(o.key),o)}}function ie(e){var t=function(e){if("object"!=ne(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ne(t)?t:t+""}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(re=function(){return!!e})()}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function se(e,t){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},se(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=ae(t),function(e,t){if(t&&("object"==ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,re()?Reflect.construct(t,n||[],ae(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&&se(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.viewModel=c.r.get("image:storage")}},{key:"name",get:function(){return"EditThumbnailComponent"}},{key:"lang",get:function(){return"libraryEditor.editThumbnail"}},{key:"template",get:function(){return te()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:$.YR,channelName:this.options.channelName,buttonSelector:".upload-thumbnail",imageType:b.__.Thumbnails,appLink:{application:y.OV.LIBRARY_EDITOR,action:y.eX.LibraryEditor.UPLOAD_THUMBNAIL,args:[this.options.model.id]},saveImage:function(t){return e.viewModel.set({dataUrl:t})}}]}},{key:"defaults",get:function(){return{editable:!0}}},{key:"regions",value:function(){return{thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{editable:this.options.editable,dimensions:y.nq[b.__.Thumbnails]}}},{key:"onRender",value:function(){this.showChildView("thumbnail",new X.Z({model:this.model,thumbnailOptions:{size:q.h2.Medium}}))}}])&&oe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),ue=n(74250),ce=n(17391),de=n(36022),fe=n(3974),he=n(44391),pe=n(25887),ve=n(30992),me=n.n(ve);function ye(e){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ye(e)}function be(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"!=ye(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ye(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ye(t)?t:t+""}function we(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(we=function(){return!!e})()}function ke(e){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ke(e)}function Se(e,t){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Se(e,t)}var Te=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=ke(t),function(e,t){if(t&&("object"==ye(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,we()?Reflect.construct(t,n||[],ke(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&&Se(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TagsComponent"}},{key:"template",get:function(){return me()}},{key:"lang",get:function(){return"libraryEditor.tags"}},{key:"defaults",get:function(){return{headerText:u.T.getPhrase(this.lang,"heading"),orientation:pe.zM.Flex}}},{key:"regions",value:function(){return{tagList:{el:".tag-list-region",replaceElement:!0},tagSelector:{el:".tag-selector-region",replaceElement:!0}}}},{key:"initialize",value:function(){this.options.behavior!==pe.Dm.Edit||this.options.parentId||d.Q.Ry.throw(new s.H("parentId is required to edit tags."))}},{key:"getTypeaheadConfigs",value:function(){var e=fe.M.getTypeaheadConfig(),t=fe.M.getBloodhoundConfig(),n={newType:y.n8.TagsRaw},o={newType:y.n8.TagsRaw,footerTemplate:ce.J.getConfirmSelectionTemplate()};return[{name:y.n8.TagsRaw,typeaheadConfig:e,bloodhoundConfig:t,options:{hideEmptyResults:!0}},{name:"add-new",typeaheadConfig:e,bloodhoundConfig:t,options:n},{name:"empty-suggestion",typeaheadConfig:e,bloodhoundConfig:t,options:o}]}},{key:"viewOptions",value:function(){var e;return this.showEmptyStateText()&&(e=this.options.emptyStateText),{headerText:this.options.headerText,editable:this.options.behavior===pe.Dm.Edit,emptyStateText:e}}},{key:"showEmptyStateText",value:function(){return this.options.behavior!==pe.Dm.Edit&&!this.collection.length&&!!this.options.emptyStateText}},{key:"renderTagSelector",value:function(){this.options.behavior===pe.Dm.Edit&&this.showChildView("tagSelector",new de.M({model:this.model,parentChannelName:this.options.channelName,inputId:"tag-select",selectEvent:"add:tag",typeaheadConfigs:this.getTypeaheadConfigs(),placeholderText:u.T.getPhrase(this.lang,"placeholder"),callbacks:{onRender:ce.J.selectFirstResult,onBlur:ce.J.clearInputOnBlur},typeaheadOptions:{hint:!1},actionOptions:{clearOnSelect:!0},autofocus:this.options.autofocus}))}},{key:"renderTagList",value:function(){this.showEmptyStateText()||this.showChildView("tagList",new he.K({collection:this.collection,channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent}))}},{key:"onRender",value:function(){this.renderTagSelector(),this.renderTagList()}}])&&be(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Oe=n(58259),Ee=n.n(Oe);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 Pe(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 Ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ne=function(){return!!e})()}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}function xe(e,t){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xe(e,t)}var Me=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=De(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,Ne()?Reflect.construct(t,n||[],De(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"CollapseButtonComponent"}},{key:"className",get:function(){return"d-inline-block cursor-pointer expand-details info-link mb-3"}},{key:"lang",get:function(){return"libraryEditor.collapseButton"}},{key:"template",get:function(){return Ee()}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){this.options.onClick()}},{key:"viewOptions",value:function(){return{showMorePhrase:this.options.collapse?"showMore":"showLess"}}}])&&Pe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),_e=n(23468),Ve=n.n(_e),Re={suggestEdit:"AgfOM"};function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function Be(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,Ue(o.key),o)}}function Ue(e){var t=function(e){if("object"!=Ie(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ie(t)?t:t+""}function Le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Le=function(){return!!e})()}function Ae(e){return Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ae(e)}function Fe(e,t){return Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fe(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=Ae(t),function(e,t){if(t&&("object"==Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Le()?Reflect.construct(t,n||[],Ae(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&&Fe(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"update:tags",(function(){return e.renderCustomerTags(!0)})),this.initializeCollapse()}},{key:"name",get:function(){return"EditVideoDetailsComponent"}},{key:"className",get:function(){return"edit-video-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editVideoDetails"}},{key:"template",get:function(){return Ve()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:y.OV.LIBRARY_EDITOR,action:y.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.id]}}}},{key:"events",value:function(){return{"click .expand-details":"onClickExpandDetails"}}},{key:"elements",get:function(){return{expandable:".collapse-area"}}},{key:"regions",value:function(){return{topSave:{el:".top-save-region",replaceElement:!0},bottomSave:{el:".bottom-save-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},basicInfo:{el:".basic-info-region",replaceElement:!0},collapseButton:{el:".collapse-button-region",replaceElement:!0},additionalInfo:{el:".additional-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},fields:{el:".fields-region",replaceElement:!0},clickViewTags:{el:".cv-tags-region",replaceElement:!1},customerTags:{el:".customer-tags-region",replaceElement:!0}}}},{key:"initializeCollapse",value:function(){var e,t,n,o,i,r;this.collapse=!(this.model.get("broadcastDate")||(null===(e=this.model.channel)||void 0===e?void 0:e.get("id"))||this.model.get("productionYear")||(null===(t=this.model.productionCompanies)||void 0===t?void 0:t.any((function(e){return e.get("id")})))||(null===(n=this.model.distributors)||void 0===n?void 0:n.any((function(e){return e.get("id")})))||(null===(o=this.model.producers)||void 0===o?void 0:o.any((function(e){return e.get("id")})))||(null===(i=this.model.directors)||void 0===i?void 0:i.any((function(e){return e.get("id")})))||(null===(r=this.model.fields)||void 0===r?void 0:r.any((function(e){return e.get("id")>0}))))}},{key:"onClickCollapse",value:function(){this.collapse=!this.collapse,this.renderCollapseButton(),this.collapse?this.getUI("expandable").hide():this.getUI("expandable").show()}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new ue.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new ue.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new E.J({model:this.model,ratings:this.options.ratings,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new le({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderCollapseButton",value:function(){this.showChildView("collapseButton",new Me({onClick:this.onClickCollapse.bind(this),collapse:this.collapse}))}},{key:"renderAdditionalInfo",value:function(){this.options.currentUser.get("instanceRegion")!==p.b.US&&this.showChildView("additionalInfo",new O.a({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderProductionInfo",value:function(){this.showChildView("productionInfo",new C.O({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderFields",value:function(){this.options.currentUser.get("instanceRegion")!==p.b.US&&this.showChildView("fields",new Y({model:this.model,channelName:this.options.channelName}))}},{key:"renderClickViewTags",value:function(){if(!this.options.editable){var e=S.BK.filterObjectsByOwnerType(this.model.tags,T.N.ClickView,this.options.currentUser.get("customerId"));this.showChildView("clickViewTags",new Te({parentId:this.model.get("id"),collection:e,orientation:pe.zM.Flex,behavior:pe.Dm.Disabled,channelName:this.options.channelName,headerText:u.T.getPhrase(this.lang,"clickviewTags"),emptyStateText:u.T.getPhrase(this.lang,"clickviewTagsEmpty")}))}}},{key:"renderCustomerTags",value:function(e){var t=S.BK.filterObjectsByOwnerType(this.model.tags,T.N.Customer,this.options.currentUser.get("customerId"));this.showChildView("customerTags",new Te({parentId:this.model.get("id"),collection:t,channelName:this.options.channelName,behavior:pe.Dm.Edit,headerText:this.options.editable?u.T.getPhrase(this.lang,"tags"):u.T.getPhrase(this.lang,"customerTags"),removeEvent:"remove:tag",autofocus:!!e}))}},{key:"renderTags",value:function(){this.renderClickViewTags(),this.renderCustomerTags()}},{key:"viewOptions",value:function(){return{styles:Re,editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:S.M2.isExchangeVideo(this.model),collapse:this.collapse}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail(),this.renderTags(),this.renderCollapseButton(),this.renderAdditionalInfo(),this.renderProductionInfo(),this.renderFields()}}])&&Be(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Qe=n(21053),Je=n(40622),Ze=n(53854),He=n(75535),Ke=n(95061),Ge=n(57785),We=n(55230),Ye=n.n(We);function qe(e){return qe="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},qe(e)}function Xe(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,$e(o.key),o)}}function $e(e){var t=function(e){if("object"!=qe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qe(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){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=tt(t),function(e,t){if(t&&("object"==qe(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])).editable=!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&&nt(e,t)}(t,e),n=t,T=[{key:"name",get:function(){return"EditVideoView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editVideo"}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"template",get:function(){return Ye()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0,partialLoading:b.LP.EditVideoTabs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:b.LP.EditVideoDetails}}}},{key:"initialize",value:function(){this.navLock=l.u.getInstance(y.K9.NavLock,this),this.initDataListeners(),S.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=l.u.getInstance(y.Or.Video,this),this.tagDataService=l.u.getInstance(y.Or.Tags,this),this.seriesDataService=l.u.getInstance(y.Or.Series,this),this.ratingsDataService=l.u.getInstance(y.Or.Ratings,this),this.fieldsDataService=l.u.getInstance(y.Or.Fields,this),this.alertService=l.u.getInstance(y.K9.Alerts,this),this.personDataService=l.u.getInstance(y.Or.Person,this),this.companyDataService=l.u.getInstance(y.Or.Company,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,d.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(y.Vk.VIDEO,"videos:".concat(this.options.videoId,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"videos:".concat(this.options.videoId,":error"),this.onError),this.listenTo(y.Vk.RATINGS,"".concat(y.M_.RATINGS,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),this.onThumbnailUpdated),this.listenTo(this.channelName,"select:rating",i.partial(this.onTypeaheadSelection,i,"rating")),this.listenTo(this.channelName,"select:channel",i.partial(this.onTypeaheadSelection,i,"channel")),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:tag",this.onAddTag),this.listenTo(this.channelName,"remove:distributors",this.onRemoveDistributor),this.listenTo(this.channelName,"remove:productionCompanies",this.onRemoveProductionCompany),this.listenTo(this.channelName,"remove:directors",this.onRemoveDirector),this.listenTo(this.channelName,"remove:producers",this.onRemoveProducer),this.listenTo(this.channelName,"remove:tag",this.onRemoveTag),this.listenTo(this.channelName,Je.NT.Save,this.onSave),this.listenTo(this.channelName,Je.NT.Undo,this.onUndo),this.listenTo(this.channelName,Je.NT.DetectInput,this.onTypeaheadInput),this.listenTo(this.channelName,"image:load",this.onBeforeThumbnailUpload)}},{key:"onError",value:function(e){switch(e.type){case a.h.NotFound:d.Q.Ry.throw(new He.l);break;case a.h.Forbidden:d.Q.Ry.throw(new Ze.a)}}},{key:"onTypeaheadSelection",value:function(e,t,n){if(n){var o=this.viewModel.get(t),r=o.filter({name:e.name});i.each(r,(function(e){return o.remove(e)})),o.add(e)}else this.viewModel.set(t,e);this.onModelChange(e,{manualUpdate:!0})}},{key:"onTypeaheadInput",value:function(e,t,n){e.get("name")||(n&&n.isCollection?this.viewModel.get(t).remove(e.get("id"),{silent:!0}):this.viewModel.get(t).clear({silent:!0}),this.onModelChange(null,{manualUpdate:!0}),"series"===t&&(this.validateSeries(),o.Radio.channel(this.channelName).trigger("clear:series")))}},{key:"onSelectSeries",value:function(e){var t=this;e.id?this.seriesDataService.getSeries(e.id,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection(e.toJSON(),"series")})):e.name&&this.seriesDataService.createSeries(e.name,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection({id:e.id},"series")}))}},{key:"onSelectSeason",value:function(e){var t=this;if(i.isNull(e))return this.viewModel.get("season").clear({silent:!0}),this.viewModel.set("episodeNumber",null),S.yV.deselectAll(this.viewModel.get("series.seasons")),void this.onModelChange(null,{manualUpdate:!0});if(e.id)return this.viewModel.set("season",e),S.yV.setSelected(e.id,this.viewModel.get("series.seasons")),void this.onModelChange(e,{manualUpdate:!0});if(e.number){var n=this.viewModel.get("series.id");this.seriesDataService.createSeason(e,n,(function(e){t.viewModel.set("season",e.toJSON()),!t.viewModel.get("series.seasons")&&t.viewModel.get("series").set("seasons",new m.i),t.viewModel.get("series.seasons").add(e.toJSON()),S.yV.setSelected(e.id,t.viewModel.get("series.seasons")),t.onModelChange(e.toJSON(),{manualUpdate:!0}),t.render()}))}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"distributors",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"distributors",!0)}))}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"productionCompanies",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"productionCompanies",!0)}))}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"directors",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"directors",!0)}))}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"producers",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"producers",!0)}))}},{key:"onRemoveDistributor",value:function(e){this.removeFromCollection(e,"distributors")}},{key:"onRemoveProductionCompany",value:function(e){this.removeFromCollection(e,"productionCompanies")}},{key:"onRemoveDirector",value:function(e){this.removeFromCollection(e,"directors")}},{key:"onRemoveProducer",value:function(e){this.removeFromCollection(e,"producers")}},{key:"removeFromCollection",value:function(e,t){e&&e.id&&t&&(this.viewModel.get(t).remove(e.id),this.onModelChange(null,{manualUpdate:!0}))}},{key:"onAddTag",value:function(e){var t=this;if(e&&e.name){var n=e.name.trim().toLowerCase();if(n&&!S.yV.findModelByName(n,this.viewModel.tags)){var i=new g.V({name:n});this.viewModel.tags.add(i),this.tagDataService.createTag(n,this.model.get("id"),(function(e){i.set(e.toJSON()),o.Radio.channel(t.channelName).trigger("update:tags")}))}}}},{key:"onRemoveTag",value:function(e){var t=this;e instanceof g.V&&e.id&&this.tagDataService.dissociateTag(e.id,this.model.get("id"),(function(){t.viewModel.tags.remove(e),o.Radio.channel(t.channelName).trigger("update:tags"),t.logDissocAction(t.model.get("id"),e,h.py.Tag)}))}},{key:"saveFields",value:function(e,t){var n=this,o=0;e.updatedVideo=i.extend({},e.updatedVideo||{});var r=function(){++o===e.dataChanges.fields.length&&t(e)};i.each(e.dataChanges.fields,(function(e){if(e.id&&!e.value)return n.viewModel.fields.remove(n.viewModel.fields.findWhere({id:e.id})),void n.fieldsDataService.deleteField(e.id,r);!e.id||e.id>0?n.fieldsDataService.updateField(e,r):n.fieldsDataService.addField(n.options.videoId,e,(function(t){n.viewModel.fields.findWhere({id:e.id}).set("id",t.id),r()}))}))}},{key:"bulkDissoc",value:function(e,t){this.videoDataService.bulkDissoc(this.model.id,e.pendingDissocs,(function(){t(e)}))}},{key:"saveVideo",value:function(e,t){var n=this,o=i.omit(e.dataChanges,"fields");if(i.isEmpty(o))t(e);else{var r=i.omit(e.dataChanges,"fields");this.videoDataService.updateVideo(this.model.get("id"),this.folder.get("id"),r,(function(o){(e.dataChanges.series&&e.dataChanges.series.id||e.dataChanges.episodeNumber||e.dataChanges.season)&&n.videoDataService.clearVideoCache(),e.updatedVideo=i.extend({},e.updatedVideo||{},o),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(Je.NT.DisableSave),this.logEditAction(e.dataChanges,h.eu.Save);var t=v.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Video was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(Je.NT.CancelSave),!1;this.validateSeries();var e=Ge.xC.getChanges(this.model,this.viewModel),t=Ge.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!i.keys(t).length)return this.updateSaveButton(Je.NT.CancelSave),!1;var n=new d.Q.dM;return e&&e.fields&&n.useAsync(i.bind(this.saveFields,this)),t&&i.keys(t).length&&n.useAsync(i.bind(this.bulkDissoc,this)),this.editable&&n.useAsync(i.bind(this.saveVideo,this)),n.useAsync(i.bind(this.afterSave,this)),n.goAsync({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new S.Mr({title:u.T.getPhrase(this.lang,"undoTitle"),text:u.T.getPhrase(this.lang,"undoBody",{videoName:this.model.get("name")}),buttons:[{text:u.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:u.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},h.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),Ge.xC.updateModelState(this.model,this.viewModel,e),c.r.clear(this.viewModelName),this.getViewModel(),this.renderContent(),this.renderTabs()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).undo;this.stopListening(this.viewModel),c.r.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),e&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:u.T.getPhrase(this.lang,"navLockHeading"),text:u.T.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{key:"onBeforeThumbnailUpload",value:function(){this.navLock.isLocked()&&(this.navLock.unlock(),c.r.get("upload:thumbnail:options").set("lockNav",!0))}},{key:"onModelChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.stickitChange||t.manualUpdate)if(this.viewModel.validate(),!1!==this.viewModel.isValid()){if(!Ge.xC.getChanges(this.model,this.viewModel)&&!i.keys(Ge.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(Je.NT.DisableSave);this.lockNav(),this.updateSaveButton(Je.NT.EnableSave)}else this.updateSaveButton(Je.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=o.Radio.channel(this.channelName),n=Je.NT.EnableSave,i=Je.NT.DisableSave,r=Je.NT.CancelSave;switch(e){case n:return void t.trigger(n);case i:return void t.trigger(i);case r:return void t.trigger(r)}d.Q.Ry.throw(new s.H("Save action type is not valid."))}},{key:"onThumbnailUpdated",value:function(){var e=this;this.videoDataService.clearCacheAndGetVideo(this.options.videoId,(function(t){e.model=t,e.viewModel.set("thumbnail",e.model.thumbnail.toJSON())}))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);f.k.logUserAction(n,{actionType:h.Vw.Edit,entity:h.py.Video,location:h.LZ.EditVideoDetails,workflowPhase:t})}},{key:"logDissocAction",value:function(e,t,n){var o=Object.assign({videoId:e},t.pick("id","name"));f.k.logUserAction(o,{actionType:h.Vw.Dissociate,entity:n,location:h.LZ.EditVideoDetails})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.model.fields&&this.model.fields.length||this.model.set("fields",(0,Ge.aj)()),this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:w.n}),this.editable&&(this.viewModel.addValidation(Ge.rr),this.viewModel.addValidation(Ge.tD));var e=this.currentUser.get("instanceRegion")!==p.b.US;e&&this.viewModel.addValidation(Ge.oJ),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange),this.listenTo(this.viewModel,"change:dateBroadcast",i.partial(this.onModelChange,i,{manualUpdate:!0})),this.viewModel.fields&&e&&(this.viewModel.fields&&this.viewModel.fields.each((function(e){return e.addValidation(Ge.Zg)})),this.listenTo(this.viewModel.fields,"change",this.onModelChange))}},{key:"validateSeries",value:function(){this.viewModel.get("series.id")||(this.viewModel.unset("season"),this.viewModel.set("episodeNumber",null))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.ratings=this.ratingsDataService.getAllRatings(),this.model&&(this.editable=S.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.ratings&&(this.viewModel instanceof w.n||this.getViewModel()))}},{key:"requiredResources",get:function(){return{currentUser:k.K.currentUser,libraries:Ke.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.ratings&&!!this.viewModel}},{key:"renderContent",value:function(){var e=Ge.xC.getChanges(this.model,this.viewModel)||i.keys(Ge.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new ze({model:this.viewModel,ratings:this.ratings,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"renderTabs",value:function(){this.showChildView("tabs",new Qe.W({model:this.viewModel,tabs:S.Si.getEditVideoTabs(this.options.videoId,this.editable),activeTab:".edit-video-applink",context:"edit",folder:this.folder,libraries:this.libraries}))}},{key:"onRender",value:function(){this.renderTabs(),this.renderContent()}}],T&&Xe(n.prototype,T),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,T}(d.Q.G7)},86272:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return e.propertyIsEnumerable,"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+"</h5>\n"},3:function(e,t,n,o,i){return"my-2"},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="text-secondary mt-3 mb-1"><em>'+l((n.lang||t&&t.lang||s).call(a,"recommendedSize",{name:"lang",hash:{height:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.height:r,width:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.width:r},data:i}))+'</em></div>\n <button class="upload-thumbnail btn btn-outline-dark mb-3 w-100">'+l((n.lang||t&&t.lang||s).call(a,"upload",{name:"lang",hash:{},data:i}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="thumbnail-region"></div>\n<div class="'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'">\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},43791:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){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})},23468:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"mb-4"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.suggestEdit:r,t))+'">\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isExchange:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.program(6,i,0),data:i}))?r:"")+" </p>\n"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEditExchange",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},6:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},8:function(e,t,n,o,i){return"none"},10:function(e,t,n,o,i){return"block"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return'<div class="row">\n <div class="left-pane col-4">\n <div class="thumbnail-region"></div>\n <div class="cv-tags-region '+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"></div>\n <div class="customer-tags-region"></div>\n </div>\n <div class="right-pane col-8">\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="top-save-region"></div>\n <div class="basic-info-region mb-4"></div> \n <div class="collapse-button-region"></div>\n <div class="collapse-area" style="display: '+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.collapse:r,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.program(10,i,0),data:i}))?r:"")+';">\n <div class="additional-details-region"></div> \n <div class="production-info-region mb-4"></div> \n <div class="fields-region mb-4"></div>\n </div>\n <div class="bottom-save-region"></div>\n </div>\n</div>'},useData:!0})},58259:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.showMorePhrase:r,{name:"lang",hash:{},data:i}))},useData:!0})},99724:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-secondary mx-2 undo '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.undo:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"undo",{name:"lang",hash:{},data:i}))+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.allowUndo:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="save-region"></div>'},useData:!0})},15564:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return'<span class="btn-close cursor-pointer" role="button" aria-label="Close"></span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=null!=t?t:e.nullContext||{},l=e.escapeExpression;return'<span title="'+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(s,{name:"name",hash:{},data:i}):a)+'">'+l(e.lambda(null!=(r=null!=t?t.options:t)?r.trimmedName:r,t))+"</span>\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.removable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},30992:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>\n"},5:function(e,t,n,o,i){return'<div class="tag-selector-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.headerText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="tag-list-region"></div>'},useData:!0})},55230:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="dialog-region"></div>\n<div class="tab-region"></div>\n<div class="edit-content-region"></div>'},useData:!0})},44106:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<h5 class="mb-0">Extra Information</h5>\n<div class="text-secondary mb-3">This information is only visible to administrators and will not be searchable</div>\n<div class="fields-region"></div>'},useData:!0})},72891:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="form-group">\n <label for="edit-description">'+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'</label>\n <div class="text-area-region"></div>\n <div class="form-feedback"></div>\n</div>'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2601],{21053:function(e,t,n){"use strict";n.d(t,{W:function(){return b}});var o=n(48088),i=n(57857),r=n(31647),a=n(57085),s=n(35630),l=n(57098),u=n(43791),c=n.n(u),d={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 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,p(o.key),o)}}function p(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 v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}var b=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"==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,v()?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&&y(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:d}}},{key:"onSave",value:function(){o.Radio.channel(l.OV.LIBRARY_EDITOR).trigger(l.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 a.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&h(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},74250:function(e,t,n){"use strict";n.d(t,{z:function(){return g}});var o=n(48088),i=n(57857),r=n(31647),a=n(88172),s=n(93569),l=n(40622),u=n(99724),c=n.n(u),d={saveButton:"G_FDK",undo:"dcV70"};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 h(e,t,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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,v(o.key),o)}}function v(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 m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(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=y(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,m()?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&&b(e,t)}(t,e),n=t,u=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return o.Radio.channel(this.options.channelName)}},{key:"getSaveChannelName",value:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .undo":"onUndo"}}},{key:"initialize",value:function(){this.model||(this.model=new r.Q.Hn(h(h({},a.ZV.ShowSpinner,this.options.showSpinner),a.ZV.Disabled,this.options.isDisabled)));var e=this.options.channelName;this.listenTo(e,l.NT.DisableSave,this.onDisableSave),this.listenTo(e,l.NT.EnableSave,this.onEnableSave),this.listenTo(e,l.NT.CancelSave,this.onCancelSave);var t=o.Radio.channel(this.getSaveChannelName());this.listenTo(t,l.NT.Save,this.onSave),this.options.allowUndo&&(this.options.hasChanges&&this.model.set("showUndo",!0),this.listenTo(this.model,"change:showUndo",this.render))}},{key:"onCancelSave",value:function(){this.model.set(a.ZV.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(a.ZV.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(a.ZV.ShowSpinner)&&this.model.set(a.ZV.ShowSpinner,!1,{silent:!0}),this.model.set(a.ZV.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(l.NT.Undo)}},{key:"onSave",value:function(){this.model.set(a.ZV.ShowSpinner,!0),this.getParentChannel().trigger(l.NT.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:d}}},{key:"renderSaveButton",value:function(){var e=new a.Py({saveEvent:l.NT.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:i.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(d.saveButton),spinnerOptions:{size:s.Ey.Small,type:s.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}],u&&p(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},44391:function(e,t,n){"use strict";n.d(t,{K:function(){return T}});var o=n(11306),i=n(31647),r=n(48088),a=n(57098),s=n(25887),l=n(15564),u=n.n(l);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function 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,f(o.key),o)}}function f(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var m=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=p(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],p(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,o=[{key:"name",get:function(){return"TagItemComponent"}},{key:"tagName",get:function(){return this.options.behavior===s.Dm.Link?"a":"span"}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?"":" d-inline-flex"),t="".concat(this.isSaving()?" saving":""),n="".concat(this.options.behavior===s.Dm.Disabled?" ".concat("dE3WC"):""),o="".concat(this.options.behavior===s.Dm.Filter?" cursor-pointer":"");return"rounded-pill tag py-1 px-2 flex-shrink-0 ".concat(o).concat(e).concat(t).concat(n)}},{key:"template",get:function(){return u()}},{key:"elements",get:function(){return{close:".btn-close"}}},{key:"appLinks",get:function(){return this.options.behavior!==s.Dm.Link?{}:{"[this]":{application:a.OV.SEARCH,action:a.eX.Search.HOME,params:{tag:this.model.get("name")}}}}},{key:"defaults",get:function(){return{behavior:s.Dm.Link,orientation:s.zM.Flex}}},{key:"events",value:function(){return this.options.removeEvent?{"click @ui.close":"onRemoveTag"}:{click:"onClickTag"}}},{key:"initialize",value:function(){this.options.behavior===s.Dm.Edit&&this.listenTo(this.model,"change",this.render)}},{key:"isSaving",value:function(){if(this.options.behavior!==s.Dm.Filter){var e=this.model.pick("id","name","remove"),t=e.id,n=e.name;return!!e.remove||!t||!n}}},{key:"onRemoveTag",value:function(e){if(e.stopPropagation(),!this.isSaving())return this.model.set("remove",!0),r.Radio.channel(this.options.channelName).trigger(this.options.removeEvent,this.model),!1}},{key:"onClickTag",value:function(){this.options.behavior!==s.Dm.Filter||this.options.removeEvent||r.Radio.channel(this.options.channelName).trigger(this.options.clickEvent,this.model)}},{key:"getTrimmedName",value:function(){var e=this.model.get("name");return e.length>36?"".concat(e.substring(0,36),"..."):e}},{key:"viewOptions",value:function(){return{removable:this.options.removeEvent,trimmedName:this.getTrimmedName()}}},{key:"onRender",value:function(){this.resetClassName()}}],o&&d(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(i.Q.wA);function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function b(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,g(o.key),o)}}function g(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(w=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var T=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=k(t),function(e,t){if(t&&("object"==y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,w()?Reflect.construct(t,n||[],k(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&&S(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.options.behavior!==s.Dm.Edit||this.options.removeEvent||i.Q.Ry.throw(new o.H("removeEvent is required to edit tags."))}},{key:"name",get:function(){return"TagComponentCollection"}},{key:"defaults",get:function(){return{orientation:s.zM.Flex}}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?"d-flex align-items-start flex-column":"d-flex flex-wrap gap-1");return"tags ".concat(e)}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent,clickEvent:this.options.clickEvent}}},{key:"childView",get:function(){return m}}])&&b(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.$W)},25887:function(e,t,n){"use strict";var o,i,r;n.d(t,{Dm:function(){return o},zM:function(){return i},x_:function(){return r}}),function(e){e[e.Link=1]="Link",e[e.Edit=2]="Edit",e[e.Disabled=3]="Disabled",e[e.Filter=4]="Filter"}(o||(o={})),function(e){e[e.Flex=1]="Flex",e[e.Vertical=2]="Vertical"}(i||(i={})),function(e){e[e.Folder=0]="Folder",e[e.Series=1]="Series"}(r||(r={}))},18974:function(e,t,n){"use strict";n.r(t),n.d(t,{EditVideoView:function(){return ot}});var o=n(48088),i=n(39479),r=n(25417),a=n(99748),s=n(11306),l=n(21679),u=n(57857),c=n(99249),d=n(31647),f=n(52076),h=n(70065),p=n(8371),v=n(13156),m=n(29625),y=n(57098),b=n(29457),g=n(68619),w=n(85847),k=n(19226),S=n(93569),T=n(45837),O=n(24184),E=n(72998),C=n(95168),P=n(44106),j=n.n(P),N=n(99844),D=n(72891),M=n.n(D);function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function 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"!=x(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=x(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==x(t)?t:t+""}function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(R=function(){return!!e})()}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}var U=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=I(t),function(e,t){if(t&&("object"==x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,R()?Reflect.construct(t,n||[],I(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&&B(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){var e=this;this.listenTo(this.model,"change",(function(){return e.options.viewModel.validate()}))}},{key:"template",get:function(){return M()}},{key:"name",get:function(){return"ExtraInfoItemComponent"}},{key:"regions",value:function(){return{textArea:{el:".text-area-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=value]":{observe:"value",setOptions:{validate:!0}}}}},{key:"onRender",value:function(){this.showChildView("textArea",new N.F({name:"value",class:"form-control",placeholder:this.model.get("placeholder"),id:"admin-notes"})),this.stickit(),o.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),o.Validation.unbind(this)}}])&&V(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(d.Q.wA);function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Q(o.key),o)}}function z(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Q(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 J(e,t,n){return t=H(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,Z()?Reflect.construct(t,n||[],H(e).constructor):t.apply(e,n))}function Z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Z=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function K(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}function G(e,t){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},G(e,t)}var W=function(e){function t(e){return A(this,t),J(this,t,[e])}return K(t,e),z(t,[{key:"name",get:function(){return"ExtraInfoComponentCollection"}},{key:"childView",get:function(){return U}},{key:"childViewOptions",get:function(){return{viewModel:this.options.viewModel}}}])}(d.Q.$W),Y=function(e){function t(e){return A(this,t),J(this,t,[e])}return K(t,e),z(t,[{key:"name",get:function(){return"ExtraInfoComponent"}},{key:"template",get:function(){return j()}},{key:"className",get:function(){return"border-top pt-3"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new W({collection:this.model.fields,viewModel:this.model}))}}])}(d.Q.wA),q=n(88483),X=n(2772),$=n(10101),ee=n(86272),te=n.n(ee);function ne(e){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(e)}function oe(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,ie(o.key),o)}}function ie(e){var t=function(e){if("object"!=ne(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ne(t)?t:t+""}function re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(re=function(){return!!e})()}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function se(e,t){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},se(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=ae(t),function(e,t){if(t&&("object"==ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,re()?Reflect.construct(t,n||[],ae(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&&se(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.viewModel=c.r.get("image:storage")}},{key:"name",get:function(){return"EditThumbnailComponent"}},{key:"lang",get:function(){return"libraryEditor.editThumbnail"}},{key:"template",get:function(){return te()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:$.YR,channelName:this.options.channelName,buttonSelector:".upload-thumbnail",imageType:b.__.Thumbnails,appLink:{application:y.OV.LIBRARY_EDITOR,action:y.eX.LibraryEditor.UPLOAD_THUMBNAIL,args:[this.options.model.id]},saveImage:function(t){return e.viewModel.set({dataUrl:t})}}]}},{key:"defaults",get:function(){return{editable:!0}}},{key:"regions",value:function(){return{thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{editable:this.options.editable,dimensions:y.nq[b.__.Thumbnails]}}},{key:"onRender",value:function(){this.showChildView("thumbnail",new X.Z({model:this.model,thumbnailOptions:{size:q.h2.Medium}}))}}])&&oe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),ue=n(74250),ce=n(17391),de=n(36022),fe=n(3974),he=n(44391),pe=n(25887),ve=n(30992),me=n.n(ve);function ye(e){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ye(e)}function be(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"!=ye(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ye(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ye(t)?t:t+""}function we(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(we=function(){return!!e})()}function ke(e){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ke(e)}function Se(e,t){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Se(e,t)}var Te=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=ke(t),function(e,t){if(t&&("object"==ye(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,we()?Reflect.construct(t,n||[],ke(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&&Se(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TagsComponent"}},{key:"template",get:function(){return me()}},{key:"lang",get:function(){return"libraryEditor.tags"}},{key:"defaults",get:function(){return{headerText:u.T.getPhrase(this.lang,"heading"),orientation:pe.zM.Flex}}},{key:"regions",value:function(){return{tagList:{el:".tag-list-region",replaceElement:!0},tagSelector:{el:".tag-selector-region",replaceElement:!0}}}},{key:"initialize",value:function(){this.options.behavior!==pe.Dm.Edit||this.options.parentId||d.Q.Ry.throw(new s.H("parentId is required to edit tags."))}},{key:"getTypeaheadConfigs",value:function(){var e=fe.M.getTypeaheadConfig(),t=fe.M.getBloodhoundConfig(),n={newType:y.n8.TagsRaw},o={newType:y.n8.TagsRaw,footerTemplate:ce.J.getConfirmSelectionTemplate()};return[{name:y.n8.TagsRaw,typeaheadConfig:e,bloodhoundConfig:t,options:{hideEmptyResults:!0}},{name:"add-new",typeaheadConfig:e,bloodhoundConfig:t,options:n},{name:"empty-suggestion",typeaheadConfig:e,bloodhoundConfig:t,options:o}]}},{key:"viewOptions",value:function(){var e;return this.showEmptyStateText()&&(e=this.options.emptyStateText),{headerText:this.options.headerText,editable:this.options.behavior===pe.Dm.Edit,emptyStateText:e}}},{key:"showEmptyStateText",value:function(){return this.options.behavior!==pe.Dm.Edit&&!this.collection.length&&!!this.options.emptyStateText}},{key:"renderTagSelector",value:function(){this.options.behavior===pe.Dm.Edit&&this.showChildView("tagSelector",new de.M({model:this.model,parentChannelName:this.options.channelName,inputId:"tag-select",selectEvent:"add:tag",typeaheadConfigs:this.getTypeaheadConfigs(),placeholderText:u.T.getPhrase(this.lang,"placeholder"),callbacks:{onRender:ce.J.selectFirstResult,onBlur:ce.J.clearInputOnBlur},typeaheadOptions:{hint:!1},actionOptions:{clearOnSelect:!0},autofocus:this.options.autofocus}))}},{key:"renderTagList",value:function(){this.showEmptyStateText()||this.showChildView("tagList",new he.K({collection:this.collection,channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent}))}},{key:"onRender",value:function(){this.renderTagSelector(),this.renderTagList()}}])&&be(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Oe=n(58259),Ee=n.n(Oe);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 Pe(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 Ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ne=function(){return!!e})()}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}function Me(e,t){return Me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Me(e,t)}var xe=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=De(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,Ne()?Reflect.construct(t,n||[],De(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&&Me(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"CollapseButtonComponent"}},{key:"className",get:function(){return"d-inline-block cursor-pointer expand-details info-link mb-3"}},{key:"lang",get:function(){return"libraryEditor.collapseButton"}},{key:"template",get:function(){return Ee()}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){this.options.onClick()}},{key:"viewOptions",value:function(){return{showMorePhrase:this.options.collapse?"showMore":"showLess"}}}])&&Pe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Ve=n(23468),_e=n.n(Ve),Re={suggestEdit:"AgfOM"};function Ie(e){return Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ie(e)}function Be(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,Ue(o.key),o)}}function Ue(e){var t=function(e){if("object"!=Ie(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ie(t)?t:t+""}function Le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Le=function(){return!!e})()}function Ae(e){return Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ae(e)}function Fe(e,t){return Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Fe(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=Ae(t),function(e,t){if(t&&("object"==Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Le()?Reflect.construct(t,n||[],Ae(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&&Fe(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"update:tags",(function(){return e.renderCustomerTags(!0)})),this.initializeCollapse()}},{key:"name",get:function(){return"EditVideoDetailsComponent"}},{key:"className",get:function(){return"edit-video-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editVideoDetails"}},{key:"template",get:function(){return _e()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:y.OV.LIBRARY_EDITOR,action:y.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.id]}}}},{key:"events",value:function(){return{"click .expand-details":"onClickExpandDetails"}}},{key:"elements",get:function(){return{expandable:".collapse-area"}}},{key:"regions",value:function(){return{topSave:{el:".top-save-region",replaceElement:!0},bottomSave:{el:".bottom-save-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},basicInfo:{el:".basic-info-region",replaceElement:!0},collapseButton:{el:".collapse-button-region",replaceElement:!0},additionalInfo:{el:".additional-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},fields:{el:".fields-region",replaceElement:!0},clickViewTags:{el:".cv-tags-region",replaceElement:!1},customerTags:{el:".customer-tags-region",replaceElement:!0}}}},{key:"initializeCollapse",value:function(){var e,t,n,o,i,r;if(this.collapseViewModel=c.r.get("edit:video:details:collapse:".concat(this.model.get("id"))),"boolean"!=typeof this.collapseViewModel.get("collapse")){var a=!(this.model.get("broadcastDate")||(null===(e=this.model.channel)||void 0===e?void 0:e.get("id"))||this.model.get("productionYear")||(null===(t=this.model.productionCompanies)||void 0===t?void 0:t.any((function(e){return e.get("id")})))||(null===(n=this.model.distributors)||void 0===n?void 0:n.any((function(e){return e.get("id")})))||(null===(o=this.model.producers)||void 0===o?void 0:o.any((function(e){return e.get("id")})))||(null===(i=this.model.directors)||void 0===i?void 0:i.any((function(e){return e.get("id")})))||(null===(r=this.model.fields)||void 0===r?void 0:r.any((function(e){return e.get("id")>0}))));this.collapseViewModel.set({collapse:a})}}},{key:"onClickCollapse",value:function(){var e=this.collapseViewModel.get("collapse");this.collapseViewModel.set("collapse",!e),this.renderCollapseButton(),e?this.getUI("expandable").show():this.getUI("expandable").hide()}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new ue.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new ue.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new E.J({model:this.model,ratings:this.options.ratings,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new le({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderCollapseButton",value:function(){this.showChildView("collapseButton",new xe({onClick:this.onClickCollapse.bind(this),collapse:this.collapseViewModel.get("collapse")}))}},{key:"renderAdditionalInfo",value:function(){this.options.currentUser.get("instanceRegion")!==p.b.US&&this.showChildView("additionalInfo",new O.a({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderProductionInfo",value:function(){this.showChildView("productionInfo",new C.O({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderFields",value:function(){this.options.currentUser.get("instanceRegion")!==p.b.US&&this.showChildView("fields",new Y({model:this.model,channelName:this.options.channelName}))}},{key:"renderClickViewTags",value:function(){if(!this.options.editable){var e=S.BK.filterObjectsByOwnerType(this.model.tags,T.N.ClickView,this.options.currentUser.get("customerId"));this.showChildView("clickViewTags",new Te({parentId:this.model.get("id"),collection:e,orientation:pe.zM.Flex,behavior:pe.Dm.Disabled,channelName:this.options.channelName,headerText:u.T.getPhrase(this.lang,"clickviewTags"),emptyStateText:u.T.getPhrase(this.lang,"clickviewTagsEmpty")}))}}},{key:"renderCustomerTags",value:function(e){var t=S.BK.filterObjectsByOwnerType(this.model.tags,T.N.Customer,this.options.currentUser.get("customerId"));this.showChildView("customerTags",new Te({parentId:this.model.get("id"),collection:t,channelName:this.options.channelName,behavior:pe.Dm.Edit,headerText:this.options.editable?u.T.getPhrase(this.lang,"tags"):u.T.getPhrase(this.lang,"customerTags"),removeEvent:"remove:tag",autofocus:!!e}))}},{key:"renderTags",value:function(){this.renderClickViewTags(),this.renderCustomerTags()}},{key:"viewOptions",value:function(){return{styles:Re,editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:S.M2.isExchangeVideo(this.model),collapse:this.collapseViewModel.get("collapse")}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail(),this.renderTags(),this.renderCollapseButton(),this.renderAdditionalInfo(),this.renderProductionInfo(),this.renderFields()}}])&&Be(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Qe=n(21053),Je=n(40622),Ze=n(53854),He=n(75535),Ke=n(95061),Ge=n(57785),We=n(55230),Ye=n.n(We);function qe(e){return qe="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},qe(e)}function Xe(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,$e(o.key),o)}}function $e(e){var t=function(e){if("object"!=qe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==qe(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){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=tt(t),function(e,t){if(t&&("object"==qe(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])).editable=!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&&nt(e,t)}(t,e),n=t,T=[{key:"name",get:function(){return"EditVideoView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editVideo"}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"template",get:function(){return Ye()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0,partialLoading:b.LP.EditVideoTabs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:b.LP.EditVideoDetails}}}},{key:"initialize",value:function(){this.navLock=l.u.getInstance(y.K9.NavLock,this),this.initDataListeners(),S.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=l.u.getInstance(y.Or.Video,this),this.tagDataService=l.u.getInstance(y.Or.Tags,this),this.seriesDataService=l.u.getInstance(y.Or.Series,this),this.ratingsDataService=l.u.getInstance(y.Or.Ratings,this),this.fieldsDataService=l.u.getInstance(y.Or.Fields,this),this.alertService=l.u.getInstance(y.K9.Alerts,this),this.personDataService=l.u.getInstance(y.Or.Person,this),this.companyDataService=l.u.getInstance(y.Or.Company,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,d.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(y.Vk.VIDEO,"videos:".concat(this.options.videoId,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"videos:".concat(this.options.videoId,":error"),this.onError),this.listenTo(y.Vk.RATINGS,"".concat(y.M_.RATINGS,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),this.onThumbnailUpdated),this.listenTo(this.channelName,"select:rating",i.partial(this.onTypeaheadSelection,i,"rating")),this.listenTo(this.channelName,"select:channel",i.partial(this.onTypeaheadSelection,i,"channel")),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:tag",this.onAddTag),this.listenTo(this.channelName,"remove:distributors",this.onRemoveDistributor),this.listenTo(this.channelName,"remove:productionCompanies",this.onRemoveProductionCompany),this.listenTo(this.channelName,"remove:directors",this.onRemoveDirector),this.listenTo(this.channelName,"remove:producers",this.onRemoveProducer),this.listenTo(this.channelName,"remove:tag",this.onRemoveTag),this.listenTo(this.channelName,Je.NT.Save,this.onSave),this.listenTo(this.channelName,Je.NT.Undo,this.onUndo),this.listenTo(this.channelName,Je.NT.DetectInput,this.onTypeaheadInput),this.listenTo(this.channelName,"image:load",this.onBeforeThumbnailUpload)}},{key:"onError",value:function(e){switch(e.type){case a.h.NotFound:d.Q.Ry.throw(new He.l);break;case a.h.Forbidden:d.Q.Ry.throw(new Ze.a)}}},{key:"onTypeaheadSelection",value:function(e,t,n){if(n){var o=this.viewModel.get(t),r=o.filter({name:e.name});i.each(r,(function(e){return o.remove(e)})),o.add(e)}else this.viewModel.set(t,e);this.onModelChange(e,{manualUpdate:!0})}},{key:"onTypeaheadInput",value:function(e,t,n){e.get("name")||(n&&n.isCollection?this.viewModel.get(t).remove(e.get("id"),{silent:!0}):this.viewModel.get(t).clear({silent:!0}),this.onModelChange(null,{manualUpdate:!0}),"series"===t&&(this.validateSeries(),o.Radio.channel(this.channelName).trigger("clear:series")))}},{key:"onSelectSeries",value:function(e){var t=this;e.id?this.seriesDataService.getSeries(e.id,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection(e.toJSON(),"series")})):e.name&&this.seriesDataService.createSeries(e.name,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection({id:e.id},"series")}))}},{key:"onSelectSeason",value:function(e){var t=this;if(i.isNull(e))return this.viewModel.get("season").clear({silent:!0}),this.viewModel.set("episodeNumber",null),S.yV.deselectAll(this.viewModel.get("series.seasons")),void this.onModelChange(null,{manualUpdate:!0});if(e.id)return this.viewModel.set("season",e),S.yV.setSelected(e.id,this.viewModel.get("series.seasons")),void this.onModelChange(e,{manualUpdate:!0});if(e.number){var n=this.viewModel.get("series.id");this.seriesDataService.createSeason(e,n,(function(e){t.viewModel.set("season",e.toJSON()),!t.viewModel.get("series.seasons")&&t.viewModel.get("series").set("seasons",new m.i),t.viewModel.get("series.seasons").add(e.toJSON()),S.yV.setSelected(e.id,t.viewModel.get("series.seasons")),t.onModelChange(e.toJSON(),{manualUpdate:!0}),t.render()}))}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"distributors",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"distributors",!0)}))}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"productionCompanies",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"productionCompanies",!0)}))}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"directors",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"directors",!0)}))}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"producers",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"producers",!0)}))}},{key:"onRemoveDistributor",value:function(e){this.removeFromCollection(e,"distributors")}},{key:"onRemoveProductionCompany",value:function(e){this.removeFromCollection(e,"productionCompanies")}},{key:"onRemoveDirector",value:function(e){this.removeFromCollection(e,"directors")}},{key:"onRemoveProducer",value:function(e){this.removeFromCollection(e,"producers")}},{key:"removeFromCollection",value:function(e,t){e&&e.id&&t&&(this.viewModel.get(t).remove(e.id),this.onModelChange(null,{manualUpdate:!0}))}},{key:"onAddTag",value:function(e){var t=this;if(e&&e.name){var n=e.name.trim().toLowerCase();if(n&&!S.yV.findModelByName(n,this.viewModel.tags)){var i=new g.V({name:n});this.viewModel.tags.add(i),this.tagDataService.createTag(n,this.model.get("id"),(function(e){i.set(e.toJSON()),o.Radio.channel(t.channelName).trigger("update:tags")}))}}}},{key:"onRemoveTag",value:function(e){var t=this;e instanceof g.V&&e.id&&this.tagDataService.dissociateTag(e.id,this.model.get("id"),(function(){t.viewModel.tags.remove(e),o.Radio.channel(t.channelName).trigger("update:tags"),t.logDissocAction(t.model.get("id"),e,h.py.Tag)}))}},{key:"saveFields",value:function(e,t){var n=this,o=0;e.updatedVideo=i.extend({},e.updatedVideo||{});var r=function(){++o===e.dataChanges.fields.length&&t(e)};i.each(e.dataChanges.fields,(function(e){if(e.id&&!e.value)return n.viewModel.fields.remove(n.viewModel.fields.findWhere({id:e.id})),void n.fieldsDataService.deleteField(e.id,r);!e.id||e.id>0?n.fieldsDataService.updateField(e,r):n.fieldsDataService.addField(n.options.videoId,e,(function(t){n.viewModel.fields.findWhere({id:e.id}).set("id",t.id),r()}))}))}},{key:"bulkDissoc",value:function(e,t){this.videoDataService.bulkDissoc(this.model.id,e.pendingDissocs,(function(){t(e)}))}},{key:"saveVideo",value:function(e,t){var n=this,o=i.omit(e.dataChanges,"fields");if(i.isEmpty(o))t(e);else{var r=i.omit(e.dataChanges,"fields");this.videoDataService.updateVideo(this.model.get("id"),this.folder.get("id"),r,(function(o){(e.dataChanges.series&&e.dataChanges.series.id||e.dataChanges.episodeNumber||e.dataChanges.season)&&n.videoDataService.clearVideoCache(),e.updatedVideo=i.extend({},e.updatedVideo||{},o),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(Je.NT.DisableSave),this.logEditAction(e.dataChanges,h.eu.Save);var t=v.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Video was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(Je.NT.CancelSave),!1;this.validateSeries();var e=Ge.xC.getChanges(this.model,this.viewModel),t=Ge.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!i.keys(t).length)return this.updateSaveButton(Je.NT.CancelSave),!1;var n=new d.Q.dM;return e&&e.fields&&n.useAsync(i.bind(this.saveFields,this)),t&&i.keys(t).length&&n.useAsync(i.bind(this.bulkDissoc,this)),this.editable&&n.useAsync(i.bind(this.saveVideo,this)),n.useAsync(i.bind(this.afterSave,this)),n.goAsync({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new S.Mr({title:u.T.getPhrase(this.lang,"undoTitle"),text:u.T.getPhrase(this.lang,"undoBody",{videoName:this.model.get("name")}),buttons:[{text:u.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:u.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},h.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),Ge.xC.updateModelState(this.model,this.viewModel,e),c.r.clear(this.viewModelName),this.getViewModel(),this.renderContent(),this.renderTabs()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).undo;this.stopListening(this.viewModel),c.r.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),e&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:u.T.getPhrase(this.lang,"navLockHeading"),text:u.T.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{key:"onBeforeThumbnailUpload",value:function(){this.navLock.isLocked()&&(this.navLock.unlock(),c.r.get("upload:thumbnail:options").set("lockNav",!0))}},{key:"onModelChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.stickitChange||t.manualUpdate)if(this.viewModel.validate(),!1!==this.viewModel.isValid()){if(!Ge.xC.getChanges(this.model,this.viewModel)&&!i.keys(Ge.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(Je.NT.DisableSave);this.lockNav(),this.updateSaveButton(Je.NT.EnableSave)}else this.updateSaveButton(Je.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=o.Radio.channel(this.channelName),n=Je.NT.EnableSave,i=Je.NT.DisableSave,r=Je.NT.CancelSave;switch(e){case n:return void t.trigger(n);case i:return void t.trigger(i);case r:return void t.trigger(r)}d.Q.Ry.throw(new s.H("Save action type is not valid."))}},{key:"onThumbnailUpdated",value:function(){var e=this;this.videoDataService.clearCacheAndGetVideo(this.options.videoId,(function(t){e.model=t,e.viewModel.set("thumbnail",e.model.thumbnail.toJSON())}))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);f.k.logUserAction(n,{actionType:h.Vw.Edit,entity:h.py.Video,location:h.LZ.EditVideoDetails,workflowPhase:t})}},{key:"logDissocAction",value:function(e,t,n){var o=Object.assign({videoId:e},t.pick("id","name"));f.k.logUserAction(o,{actionType:h.Vw.Dissociate,entity:n,location:h.LZ.EditVideoDetails})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.model.fields&&this.model.fields.length||this.model.set("fields",(0,Ge.aj)()),this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:w.n}),this.editable&&(this.viewModel.addValidation(Ge.rr),this.viewModel.addValidation(Ge.tD));var e=this.currentUser.get("instanceRegion")!==p.b.US;e&&this.viewModel.addValidation(Ge.oJ),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange),this.listenTo(this.viewModel,"change:dateBroadcast",i.partial(this.onModelChange,i,{manualUpdate:!0})),this.viewModel.fields&&e&&(this.viewModel.fields&&this.viewModel.fields.each((function(e){return e.addValidation(Ge.Zg)})),this.listenTo(this.viewModel.fields,"change",this.onModelChange))}},{key:"validateSeries",value:function(){this.viewModel.get("series.id")||(this.viewModel.unset("season"),this.viewModel.set("episodeNumber",null))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.ratings=this.ratingsDataService.getAllRatings(),this.model&&(this.editable=S.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.ratings&&(this.viewModel instanceof w.n||this.getViewModel()))}},{key:"requiredResources",get:function(){return{currentUser:k.K.currentUser,libraries:Ke.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.ratings&&!!this.viewModel}},{key:"renderContent",value:function(){var e=Ge.xC.getChanges(this.model,this.viewModel)||i.keys(Ge.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new ze({model:this.viewModel,ratings:this.ratings,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"renderTabs",value:function(){this.showChildView("tabs",new Qe.W({model:this.viewModel,tabs:S.Si.getEditVideoTabs(this.options.videoId,this.editable),activeTab:".edit-video-applink",context:"edit",folder:this.folder,libraries:this.libraries}))}},{key:"onRender",value:function(){this.renderTabs(),this.renderContent()}}],T&&Xe(n.prototype,T),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,T}(d.Q.G7)},86272:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return e.propertyIsEnumerable,"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+"</h5>\n"},3:function(e,t,n,o,i){return"my-2"},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="text-secondary mt-3 mb-1"><em>'+l((n.lang||t&&t.lang||s).call(a,"recommendedSize",{name:"lang",hash:{height:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.height:r,width:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.width:r},data:i}))+'</em></div>\n <button class="upload-thumbnail btn btn-outline-dark mb-3 w-100">'+l((n.lang||t&&t.lang||s).call(a,"upload",{name:"lang",hash:{},data:i}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="thumbnail-region"></div>\n<div class="'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'">\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},43791:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){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})},23468:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"mb-4"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.suggestEdit:r,t))+'">\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isExchange:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.program(6,i,0),data:i}))?r:"")+" </p>\n"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEditExchange",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},6:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},8:function(e,t,n,o,i){return"none"},10:function(e,t,n,o,i){return"block"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return'<div class="row">\n <div class="left-pane col-4">\n <div class="thumbnail-region"></div>\n <div class="cv-tags-region '+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"></div>\n <div class="customer-tags-region"></div>\n </div>\n <div class="right-pane col-8">\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="top-save-region"></div>\n <div class="basic-info-region mb-4"></div> \n <div class="collapse-button-region"></div>\n <div class="collapse-area" style="display: '+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.collapse:r,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.program(10,i,0),data:i}))?r:"")+';">\n <div class="additional-details-region"></div> \n <div class="production-info-region mb-4"></div> \n <div class="fields-region mb-4"></div>\n </div>\n <div class="bottom-save-region"></div>\n </div>\n</div>'},useData:!0})},58259:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.showMorePhrase:r,{name:"lang",hash:{},data:i}))},useData:!0})},99724:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-secondary mx-2 undo '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.undo:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"undo",{name:"lang",hash:{},data:i}))+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.allowUndo:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="save-region"></div>'},useData:!0})},15564:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return'<span class="btn-close cursor-pointer" role="button" aria-label="Close"></span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=null!=t?t:e.nullContext||{},l=e.escapeExpression;return'<span title="'+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(s,{name:"name",hash:{},data:i}):a)+'">'+l(e.lambda(null!=(r=null!=t?t.options:t)?r.trimmedName:r,t))+"</span>\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.removable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},30992:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>\n"},5:function(e,t,n,o,i){return'<div class="tag-selector-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.headerText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="tag-list-region"></div>'},useData:!0})},55230:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="dialog-region"></div>\n<div class="tab-region"></div>\n<div class="edit-content-region"></div>'},useData:!0})},44106:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<h5 class="mb-0">Extra Information</h5>\n<div class="text-secondary mb-3">This information is only visible to administrators and will not be searchable</div>\n<div class="fields-region"></div>'},useData:!0})},72891:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="form-group">\n <label for="edit-description">'+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'</label>\n <div class="text-area-region"></div>\n <div class="form-feedback"></div>\n</div>'},useData:!0})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2644],{8371:function(e,n,t){"use strict";var r;t.d(n,{b:function(){return r}}),function(e){e.AU="cv-ap-southeast-1",e.NZ="cv-ap-southeast-2",e.UK="cv-eu-west-1",e.US="cv-na-west-1"}(r||(r={}))},48362:function(e,n,t){"use strict";t.d(n,{_:function(){return E}});var r=t(31647),i=t(70065),o=t(45837),l=t(7427),s=t(61356),a=t(19226),u=t(93569),c=t(44391),p=t(25887),d=t(70042),f=t(17349),h=t.n(f),m={interactive:"N1mrU"};function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function g(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r)}}function y(e){var n=function(e){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=v(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(n)?n:n+""}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function k(e,n){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},k(e,n)}var E=function(e){function n(e){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=w(n),function(e,n){if(n&&("object"==v(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,b()?Reflect.construct(n,t||[],w(e).constructor):n.apply(e,t))}(this,n,[e])}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&&k(e,n)}(n,e),t=n,(r=[{key:"initialize",value:function(){this.isClickViewContent=this.model&&!u.BK.canEditVideo(this.model)}},{key:"name",get:function(){return"VideoSidebarInfoComponent"}},{key:"lang",get:function(){return"libraryEditor.videoSidebarInfo"}},{key:"className",get:function(){return"py-3 h-100"}},{key:"template",get:function(){return h()}},{key:"regions",value:function(){return{preview:{el:".video-preview-region",replaceElement:!0},folders:{el:".folders-region",replaceElement:!0},tags:{el:".tags-region",replaceElement:!0}}}},{key:"requiredResources",get:function(){return{currentUser:a.K.currentUser}}},{key:"renderVideoPreview",value:function(){this.showChildView("preview",new s.c({model:this.model,webPlayerUrl:this.options.webPlayerUrl,channelName:this.options.channelName,analyticsOptions:{location:i.LZ.VideoDetails},currentUser:this.options.currentUser,createViewKey:this.options.createViewKey,playerApiUrl:this.options.playerApiUrl}))}},{key:"renderTags",value:function(){this.model.get("tags")&&this.model.get("tags").length&&this.showChildView("tags",new c.K({collection:this.model.get("tags"),orientation:p.zM.Flex,behavior:p.Dm.Link}))}},{key:"renderFolders",value:function(){this.model.get("categories")&&this.model.get("categories").length&&this.showChildView("folders",new l.V({model:this.model,libraries:this.options.libraries,showFolder:!0,hideLabel:!0}))}},{key:"viewOptions",value:function(){return{styles:m,interactive:d.u.isInteractive(this.model),duration:u.T.ToDisplayDuration(this.model.get("duration")),folders:this.model.categories&&this.model.categories.length,multipleFolders:this.model.categories.length>1,tags:this.model.get("tags")&&this.model.get("tags").length,isClickViewContent:this.isClickViewContent,hasCustomerTags:this.isClickViewContent&&u.BK.filterObjectsByOwnerType(this.model.tags,o.N.Customer,this.options.currentUser.get("customerId")).length}}},{key:"onRender",value:function(){this.renderVideoPreview(),this.renderTags(),this.renderFolders()}}])&&g(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}(r.Q.wA)},16246:function(e,n,t){"use strict";t.r(n),t.d(n,{VideoDetailsView:function(){return Pe}});var r,i=t(39479),o=t.n(i),l=t(99748),s=t(21679),a=t(31647);!function(e){e.AU="content-ap-southeast-1",e.NZ="content-ap-southeast-2",e.UK="content-eu-west-1",e.SCOT="content-eu-west-2",e.US="content-na-central-1",e.GLOBAL="content-global"}(r||(r={}));var u=t(8371),c=t(59054),p=t(57085),d=t(23130),f=t(10386),h=t.n(f),m=t(90118),v=t.n(m),g={columnNames:"Hs0Sh"};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function b(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function w(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E(r.key),r)}}function k(e,n,t){return n&&w(e.prototype,n),t&&w(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e){var n=function(e){if("object"!=y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=y(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(n)?n:n+""}function C(e,n,t){return n=x(n),function(e,n){if(n&&("object"==y(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||[],x(e).constructor):n.apply(e,t))}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(O=function(){return!!e})()}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function S(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&&I(e,n)}function I(e,n){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},I(e,n)}var P=function(e){function n(){return b(this,n),C(this,n,arguments)}return S(n,e),k(n,[{key:"name",get:function(){return"FieldComponent"}},{key:"template",get:function(){return h()}},{key:"className",get:function(){return"row mb-0"}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{styles:g}}},{key:"renderDescription",value:function(){this.model.get("value")&&this.showChildView("description",new d.Z({model:new a.Q.Hn({description:this.model.get("value")}),linkify:!0,size:d.t.Large,truncate:!0,allowExpand:!0}))}},{key:"onRender",value:function(){this.renderDescription()}}])}(a.Q.wA),j=function(e){function n(){return b(this,n),C(this,n,arguments)}return S(n,e),k(n,[{key:"name",get:function(){return"FieldsComponentCollection"}},{key:"childView",get:function(){return P}}])}(a.Q.$W),V=function(e){function n(){return b(this,n),C(this,n,arguments)}return S(n,e),k(n,[{key:"name",get:function(){return"FieldsComponent"}},{key:"template",get:function(){return v()}},{key:"className",get:function(){return"py-3 border-top"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new j({collection:this.collection}))}}])}(a.Q.wA),T=t(57857),D=t(93569),_=t(26835),R=t.n(_),L={licenseContainer:"eHMZ_",license:"I0iMx",era:"qgIXx"};function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function N(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,B(r.key),r)}}function B(e){var n=function(e){if("object"!=U(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=U(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(n)?n:n+""}function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(M=function(){return!!e})()}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function H(e,n){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},H(e,n)}var F=function(e){function n(e){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=A(n),function(e,n){if(n&&("object"==U(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,M()?Reflect.construct(n,t||[],A(e).constructor):n.apply(e,t))}(this,n,[e])}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&&H(e,n)}(n,e),t=n,(i=[{key:"name",get:function(){return"ScreenrightsDisclaimerComponent"}},{key:"template",get:function(){return R()}},{key:"lang",get:function(){return"shared.screenrightsDisclaimer"}},{key:"className",get:function(){return"py-3 border-top"}},{key:"getLogoClass",value:function(){return D.mU.isInContentRegion(this.options.contentRegion,r.UK)?L.era:""}},{key:"getLicenseText",value:function(){switch(this.options.contentRegion){case r.UK:return T.T.getPhrase(this.lang,"era");case r.AU:return T.T.getPhrase(this.lang,"copyrightAct");case r.NZ:default:return""}}},{key:"viewOptions",value:function(){var e=D.mU.isInContentRegion(this.options.contentRegion,r.AU);return{styles:L,logoClass:this.getLogoClass(),labelText:e?T.T.getPhrase(this.lang,"labelAu"):"",licenseText:this.getLicenseText()}}}])&&N(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i}(a.Q.wA),K=t(10657),Q=t(56210),Z=t(37570),Y=t(29457),z=t(89707),q=t(7190),G=t(95982),J=t.n(G),$={columnNames:"knYPJ",seriesContainer:"nBq4d",icon:"F9VfV",citationValues:"igMNQ"};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 X(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ee(r.key),r)}}function ee(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 ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ne=function(){return!!e})()}function te(e){return te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},te(e)}function re(e,n){return re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},re(e,n)}var ie=function(e){function n(e){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=te(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,ne()?Reflect.construct(n,t||[],te(e).constructor):n.apply(e,t))}(this,n,[e])}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&&re(e,n)}(n,e),t=n,(r=[{key:"name",get:function(){return"VideoBasicInfoComponent"}},{key:"template",get:function(){return J()}},{key:"lang",get:function(){return"shared.videoBasicInfo"}},{key:"defaults",get:function(){return{truncateDescription:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:Q.H,selector:".tool-tip"}]}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0,partialLoading:Y.LP.VideoBasicInfo},series:{el:".series-region",replaceElement:!0}}}},{key:"getBroadcastDate",value:function(){return this.model.get("dateBroadcast")?K.O.format(this.model.get("dateBroadcast"),Y.K4.FULL_YEAR):""}},{key:"getSeriesUrl",value:function(){if(this.options.externalSeriesLink&&this.model.series){var e="series/".concat(this.model.series.id);return z.k.getMainProductUrl(this.options.config,e,e)}}},{key:"renderSeries",value:function(){this.model.series&&this.model.series.get("name")&&this.showChildView("series",new Z.O({model:this.model,highlight:!1,seriesUrl:this.getSeriesUrl(),styleUppercase:!1}))}},{key:"renderDescription",value:function(){if(this.model&&this.model.get("description")){var e=new d.Z({model:this.model,linkify:!0,size:d.t.Large,truncate:this.options.truncateDescription,allowExpand:!0});this.showChildView("description",e)}}},{key:"getSubtitleLanguage",value:function(){var e=this;return this.model.subtitles&&this.model.get("subtitles").length?i.uniq(this.model.get("subtitles").map((function(n){var t,r=n.get("language"),i=CVLanguages.getFullEnglishName(r);return(null===(t=n.get("metadata"))||void 0===t?void 0:t.autoGenerated)?T.T.getPhrase(e.lang,"autoGenerated",{name:i}):i}))).join(", "):""}},{key:"getCitationHeading",value:function(e,n,t){return this.model.get(e)?this.model.get(e).length>1?t:n:""}},{key:"getCitationHeadings",value:function(){return{productionCompaniesText:this.getCitationHeading(Y.Zn.ProductionCompany,"Production Company","Production Companies"),producersText:this.getCitationHeading(Y.Zn.Producer,"Producer","Producers"),disributorsText:this.getCitationHeading(Y.Zn.Distributor,"Distributor","Distributors"),directorsText:this.getCitationHeading(Y.Zn.Director,"Director","Directors")}}},{key:"viewOptions",value:function(){return Object.assign({styles:$,ratingClass:this.model.rating&&q.uB.mapRatingToClass(this.model.rating.get("value")),broadcastDate:this.getBroadcastDate(),hideUploadedDate:this.model.get("_isClickViewCurated").get("value"),uploadedDate:K.O.format(this.model.get("dateCreated"),Y.K4.FULL_YEAR),showHeading:this.options.showHeading,subtitles:this.getSubtitleLanguage(),hideBroadcastInfo:this.options.hideBroadcastInfo},this.getCitationHeadings())}},{key:"onRender",value:function(){this.renderSeries(),this.renderDescription()}}])&&X(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}(a.Q.wA),oe=t(57098),le=t(21251),se=t(33800),ae=t(3059),ue=t(48404),ce=t(64649),pe=t(19226),de=t(70693),fe=t(68708),he=t(24397),me=t(77605),ve=t(48362),ge=t(53854),ye=t(75535),be=t(95061),we=t(91865),ke=t.n(we);function Ee(e){return Ee="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},Ee(e)}function Ce(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Oe(r.key),r)}}function Oe(e){var n=function(e){if("object"!=Ee(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=Ee(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ee(n)?n:n+""}function xe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(xe=function(){return!!e})()}function Se(e){return Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Se(e)}function Ie(e,n){return Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},Ie(e,n)}var Pe=function(e){function n(e){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=Se(n),function(e,n){if(n&&("object"==Ee(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,xe()?Reflect.construct(n,t||[],Se(e).constructor):n.apply(e,t))}(this,n,[e])}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&&Ie(e,n)}(n,e),t=n,i=[{key:"initialize",value:function(){this.bindListeners(),this.videoDataService=s.u.getInstance(se.O.Video,this),this.videoMixinService=s.u.getInstance(se.K.VideoMixin,this),this.localCacheDataService=s.u.getInstance(se.O.LocalCache,this),this.playerDataService=s.u.getInstance(se.O.Player,this),this.createViewKey=this.createViewKey.bind(this)}},{key:"bindListeners",value:function(){this.listenTo(oe.Vk.VIDEO,"".concat(le.M.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(oe.Vk.VIDEO,"".concat(le.M.VIDEOS,":").concat(this.options.videoId,":error"),this.onError),this.listenTo(oe.Vk.VIDEO,"".concat(le.M.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(oe.Vk.VIDEO,"cache:cleared",this.render),this.listenTo(oe.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(oe.Vk.RESTRICTED_VIDEO,"".concat(le.M.UPDATE_VIDEO_RESTRICTION,":sync"),this.updateRestriction),this.listenTo(oe.Vk.RESTRICTED_VIDEO,"".concat(le.M.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(oe.Vk.LOCAL_CACHE,"".concat(le.M.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(oe.Vk.LOCAL_CACHE,"".concat(le.M.LOCAL_CACHE_DEVICES,":error"),this.onError),this.listenTo(oe.Vk.VIDEO,"".concat(le.M.DELETE_VIDEO,":sync"),this.destroy)}},{key:"name",get:function(){return"VideoDetailsView"}},{key:"title",get:function(){return this.video&&this.video.get("name")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return ke()}},{key:"className",get:function(){return"container-fluid h-100 bg-white rounded"}},{key:"onError",value:function(e){switch(e.type){case l.h.NotFound:a.Q.Ry.throw(new ye.l);break;case l.h.Forbidden:a.Q.Ry.throw(new ge.a)}}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1,partialLoading:Y.LP.Breadcrumbs},header:{replaceElement:!0,el:".video-header-region",partialLoading:Y.LP.VideoHeader},main:{replaceElement:!0,el:".main-video-information-region",partialLoading:Y.LP.VideoSidebarInfo},basic:{replaceElement:!1,el:".basic-video-information-region",partialLoading:Y.LP.VideoBasicInfo},chapters:{replaceElement:!0,el:".video-chapters-region"},resources:{replaceElement:!0,el:".video-resources-region"},fields:{replaceElement:!0,el:".fields-region"},links:{replaceElement:!0,el:".video-links-region"},screenrightsDisclaimer:{replaceElement:!0,el:".screenright-disclaimer-region"}}}},{key:"updateRestriction",value:function(){this.videoMixinService.getAndMixinVideoRestriction(this.video)}},{key:"showLicense",value:function(){return!(!this.video||D.mU.isInContentRegion(this.currentUser.get("contentRegion"),r.NZ)||(!this.video.get("channel")||!this.video.get("channel").get("id"))&&!this.video.get("dateBroadcast"))}},{key:"createViewKey",value:function(e,n){this.playerDataService.createViewKey(e,c.f.MasterObject,n)}},{key:"getCustomLibraryFolders",value:function(){var e;if(!(null===(e=this.video)||void 0===e?void 0:e.categories)||!this.libraries)return[];var n=this.libraries.reduce((function(e,n){return e[n.id]=!0,e}),{});return this.video.categories.filter((function(e){var t=e.libraries.first().get("id");return n[t]}))}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.video&&this.showChildView("breadcrumbs",new p.n({folder:this.folder,libraries:this.libraries,video:this.video,enableLastItemAppLink:!1}))}},{key:"renderVideoHeader",value:function(){this.showChildView("header",new he.U({model:this.video,customerHasLocalCache:D.o8.customerHasLocalCache(this.devices,this.currentUser.get("customerId")),customerHasExchange:this.exchanges.any(),collectionIdentifier:this.folder&&new ae.F7(this.folder.id,D.x$.GetCurrentSortType()),config:this.config,products:this.products,libraries:this.libraries}))}},{key:"renderSidebarInfo",value:function(){this.showChildView("main",new ve._({model:this.video,webPlayerUrl:this.config.get("webPlayerUrl"),channelName:this.channelName,currentUser:this.currentUser,createViewKey:this.createViewKey,playerApiUrl:this.config.get("playerApiUrl"),libraries:this.libraries}))}},{key:"renderBasicInfo",value:function(){this.video&&this.showChildView("basic",new ie({model:this.video,showHeading:!0,config:this.config,hideBroadcastInfo:this.currentUser.get("instanceRegion")===u.b.US}))}},{key:"renderFields",value:function(){this.video.fields&&this.video.fields.any((function(e){return e.get("value")}))&&this.currentUser.get("instanceRegion")!==u.b.US&&this.showChildView("fields",new V({collection:this.video.fields}))}},{key:"renderChapters",value:function(){var e=this.video.chapters;e&&e.length>0&&this.showChildView("chapters",new de.Q({channelName:this.channelName,collection:this.video.chapters}))}},{key:"renderResources",value:function(){var e=this.video.resources;e&&e.length>0&&this.showChildView("resources",new me.c({model:this.video}))}},{key:"renderLinks",value:function(){var e=this.video.links;e&&e.length&&this.showChildView("links",new fe.c({model:this.video,headingText:"Links"}))}},{key:"renderScreenrightsDisclaimer",value:function(){this.showLicense()&&this.showChildView("screenrightsDisclaimer",new F({contentRegion:this.currentUser.get("contentRegion")}))}},{key:"requiredResources",get:function(){return{config:ue.p.config,currentUser:pe.K.currentUser,libraries:be.T.libraries,exchanges:be.T.exchanges,products:ce.s.products}}},{key:"onBeforeRender",value:function(){return this.video=this.videoDataService.getVideo(this.options.videoId),this.video&&(this.folder=o().first(this.getCustomLibraryFolders())),this.devices=this.localCacheDataService.getDevices(this.currentUser.get("customerId")),!!this.video}},{key:"viewOptions",value:function(){if(this.video){var e=this.video,n=e.chapters,t=e.resources,r=e.fields,i=e.links;return{hasFolder:!!this.folder,hasChapters:n&&n.length,hasResources:t&&t.length,hasFields:r&&r.length,hasLinks:i&&i.length,showScreenrightsDisclaimer:this.showLicense()}}}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderVideoHeader(),this.renderSidebarInfo(),this.renderBasicInfo(),this.renderFields(),this.renderChapters(),this.renderResources(),this.renderLinks(),this.renderScreenrightsDisclaimer()}}],i&&Ce(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i}(a.Q.G7)},37570:function(e,n,t){"use strict";t.d(n,{O:function(){return v}});var r=t(31647),i=t(63791),o=t(57098),l=t(93569),s=t(19021),a=t.n(s),u={svgContainer:"kKrQJ",series:"zJvxj"};function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function p(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,d(r.key),r)}}function d(e){var n=function(e){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=c(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(n)?n:n+""}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function m(e,n){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},m(e,n)}var v=function(e){function n(e){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=h(n),function(e,n){if(n&&("object"==c(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,f()?Reflect.construct(n,t||[],h(e).constructor):n.apply(e,t))}(this,n,[e])}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&&m(e,n)}(n,e),t=n,(r=[{key:"defaults",get:function(){return{styleUppercase:!0}}},{key:"name",get:function(){return"VideoItemSeriesComponent"}},{key:"template",get:function(){return a()}},{key:"appLinks",get:function(){return this.options.seriesUrl||!this.model.series?{}:{".series-applink":{application:o.OV.LIBRARY_EDITOR,action:o.eX.LibraryEditor.SERIES,args:[this.model.series.get("id")]}}}},{key:"padNumber",value:function(e){if(!e)return null;var n=e.toString(),t=2;if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}},{key:"getSeriesName",value:function(){var e=l.m$.escapeExpression(this.model.series.get("name"));return this.options.highlight?l.m$.wordsHighlighter(e,this.model.get("_matchedWords")):e}},{key:"viewOptions",value:function(){return this.model.series?{styles:u,seasonNumber:this.padNumber(this.model.season&&this.model.season.get("number")),episodeNumber:this.padNumber(this.model.get("episodeNumber")),seriesName:this.getSeriesName(),seriesUrl:this.options.seriesUrl,externalSvg:i.Nj.getSvg(i.vn.NewWindow),styleUppercase:this.options.styleUppercase}:{}}},{key:"onBeforeRender",value:function(){return this.model.series&&!!this.model.series.get("id")}}])&&p(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}(r.Q.wA)},17349:function(e,n,t){var r=t(32227);e.exports=(r.default||r).template({1:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.escapeExpression;return' <span class="badge p-1 '+l(e.lambda(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.interactive:o,n))+'">'+l((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"interactive",{name:"lang",hash:{},data:i}))+"</span>\n"},3:function(e,n,t,r,i){var o;return e.propertyIsEnumerable,' <div class="mt-3">\n <h5>'+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"folders",{name:"lang",hash:{smartCount:null!=(o=null!=n?n.options:n)?o.folders:o},data:i}))+'</h5>\n <div class="folders-region"></div>\n </div>\n'},5:function(e,n,t,r,i){return e.propertyIsEnumerable,' <div class="mt-3">\n <h5>'+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"tags",{name:"lang",hash:{},data:i}))+'</h5>\n <div class="tags-region"></div>\n </div>\n'},7:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.escapeExpression;return' <div class="mt-3">\n <h5>'+l((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"curriculumLinks",{name:"lang",hash:{},data:i}))+"</h5>\n <p>"+l(e.lambda(null!=(o=null!=n?n.options:n)?o.links:o,n))+"</p>\n </div>\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=null!=n?n:e.nullContext||{};return'<div class="h-100 ps-2 pe-2">\n <div class="video-preview-region"></div>\n <div class="mt-3">\n'+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.interactive:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+" </div>\n\n"+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.folders:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.tags:o,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.links:o,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?o:"")+"</div>"},useData:!0})},91865:function(e,n,t){var r=t(32227);e.exports=(r.default||r).template({1:function(e,n,t,r,i){return' <div class="fields-region"></div>\n'},3:function(e,n,t,r,i){return' <div class="video-chapters-region"></div>\n'},5:function(e,n,t,r,i){return' <div class="video-resources-region"></div>\n'},7:function(e,n,t,r,i){return' <div class="video-links-region"></div>\n'},9:function(e,n,t,r,i){return' <div class="screenright-disclaimer-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=null!=n?n:e.nullContext||{};return'<div class="row border-bottom">\n <div class="video-header-region"></div>\n\n <div class="px-3 pb-3">\n <div class="breadcrumbs-region"></div>\n </div>\n</div>\n\n<div class="row">\n <div class="col-4">\n <div class="main-video-information-region"></div>\n </div>\n <div class="col-8">\n <div class="basic-video-information-region py-3 pe-2"></div>\n'+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.hasFields:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.hasChapters:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.hasResources:o,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?o:"")+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.hasLinks:o,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?o:"")+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.showScreenrightsDisclaimer:o,{name:"if",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?o:"")+" </div>\n</div>"},useData:!0})},10386:function(e,n,t){var r=t(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l,s=e.escapeExpression;return'<div class="col-3 '+s(e.lambda(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+s("function"==typeof(l=null!=(l=t.name||(null!=n?n.name:n))?l:e.hooks.helperMissing)?l.call(null!=n?n:e.nullContext||{},{name:"name",hash:{},data:i}):l)+'</div>\n<div class="col-9">\n <div class="description-region"></div>\n</div>'},useData:!0})},90118:function(e,n,t){var r=t(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,n,t,r,i){return'<h5 class="mb-0">Extra Information</h5>\n<div class="text-secondary mb-3">This information is only visible to administrators and will not be searchable</div>\n<div class="fields-region"></div>'},useData:!0})},26835:function(e,n,t){var r=t(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.lambda,s=e.escapeExpression;return'<div class="d-inline-block '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.licenseContainer:o,n))+'">\n <div class="'+s(l(null!=(o=null!=n?n.options:n)?o.logoClass:o,n))+'">'+s(l(null!=(o=null!=n?n.options:n)?o.labelText:o,n))+'</div>\n <p class="'+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.license:o,n))+' bg-white p-2 border box-shadow">\n '+(null!=(o=l(null!=(o=null!=n?n.options:n)?o.licenseText:o,n))?o:"")+"\n </p>\n</div>"},useData:!0})},95982:function(e,n,t){var r=t(32227);e.exports=(r.default||r).template({1:function(e,n,t,r,i){return e.propertyIsEnumerable,'<div class="position-relative">\n <h5 class="d-inline-block">'+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"basicInfo",{name:"lang",hash:{},data:i}))+"</h5>\n</div>\n"},3:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l,s=e.escapeExpression,a=null!=n?n:e.nullContext||{},u=e.hooks.helperMissing;return' <div class="col-3 '+s(e.lambda(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+s((t.lang||n&&n.lang||u).call(a,"videoTitle",{name:"lang",hash:{},data:i}))+'</div>\n <p class="col-9">'+s("function"==typeof(l=null!=(l=t.name||(null!=n?n.name:n))?l:u)?l.call(a,{name:"name",hash:{},data:i}):l)+"</p>\n"},5:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.lambda,s=e.escapeExpression;return' <div class="col-3 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+s((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"series",{name:"lang",hash:{},data:i}))+'</div>\n <div class="col-9 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.seriesContainer:o,n))+'"><div class="series-region"></div></div>\n'},7:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.lambda,s=e.escapeExpression;return' <div class="col-3 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+s((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"rating",{name:"lang",hash:{},data:i}))+'</div>\n <p class="col-9"><span class="p-1 badge text-white tool-tip '+s(l(null!=(o=null!=n?n.options:n)?o.ratingClass:o,n))+" "+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.rating:o,n))+'" title="'+s(l(null!=(o=null!=n?n.rating:n)?o.name:o,n))+'">'+s(l(null!=(o=null!=n?n.rating:n)?o.code:o,n))+"</span></p>\n"},9:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.escapeExpression;return' <div class="col-3 '+l(e.lambda(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+l((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"description",{name:"lang",hash:{},data:i}))+'</div>\n <div class="col-9">\n <div class="description-region"></div>\n </div>\n'},11:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l,s=e.escapeExpression,a=null!=n?n:e.nullContext||{},u=e.hooks.helperMissing;return' <div class="col-3 '+s(e.lambda(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+s((t.lang||n&&n.lang||u).call(a,"productionYear",{name:"lang",hash:{},data:i}))+'</div>\n <p class="col-9">'+s("function"==typeof(l=null!=(l=t.productionYear||(null!=n?n.productionYear:n))?l:u)?l.call(a,{name:"productionYear",hash:{},data:i}):l)+"</p>\n"},13:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.lambda,s=e.escapeExpression,a=null!=n?n:e.nullContext||{};return' <div class="col-3 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+s((t.lang||n&&n.lang||e.hooks.helperMissing).call(a,"producers",{name:"lang",hash:{},data:i}))+'</div>\n <div class="col-9 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.citationValues:o,n))+'">\n <p>\n'+(null!=(o=t.each.call(a,null!=n?n.producers:n,{name:"each",hash:{},fn:e.program(14,i,0),inverse:e.noop,data:i}))?o:"")+" </p>\n </div>\n"},14:function(e,n,t,r,i){var o;return e.propertyIsEnumerable," <span>"+e.escapeExpression("function"==typeof(o=null!=(o=t.name||(null!=n?n.name:n))?o:e.hooks.helperMissing)?o.call(null!=n?n:e.nullContext||{},{name:"name",hash:{},data:i}):o)+"</span>\n"},16:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.lambda,s=e.escapeExpression,a=null!=n?n:e.nullContext||{};return' <div class="col-3 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+s((t.lang||n&&n.lang||e.hooks.helperMissing).call(a,"directors",{name:"lang",hash:{},data:i}))+'</div>\n <div class="col-9 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.citationValues:o,n))+'">\n <p>\n'+(null!=(o=t.each.call(a,null!=n?n.directors:n,{name:"each",hash:{},fn:e.program(14,i,0),inverse:e.noop,data:i}))?o:"")+" </p>\n </div>\n"},18:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.lambda,s=e.escapeExpression,a=null!=n?n:e.nullContext||{};return' <div class="col-3 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+s((t.lang||n&&n.lang||e.hooks.helperMissing).call(a,"productionCompanies",{name:"lang",hash:{},data:i}))+'</div>\n <div class="col-9 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.citationValues:o,n))+'">\n <p>\n'+(null!=(o=t.each.call(a,null!=n?n.productionCompanies:n,{name:"each",hash:{},fn:e.program(14,i,0),inverse:e.noop,data:i}))?o:"")+" </p>\n </div>\n"},20:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.lambda,s=e.escapeExpression,a=null!=n?n:e.nullContext||{};return' <div class="col-3 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+s((t.lang||n&&n.lang||e.hooks.helperMissing).call(a,"distributors",{name:"lang",hash:{},data:i}))+'</div>\n <div class="col-9 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.citationValues:o,n))+'">\n <p>\n'+(null!=(o=t.each.call(a,null!=n?n.distributors:n,{name:"each",hash:{},fn:e.program(14,i,0),inverse:e.noop,data:i}))?o:"")+" </p>\n </div>\n"},22:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=null!=n?n:e.nullContext||{};return" "+(null!=(o=t.if.call(l,null!=(o=null!=n?n.channel:n)?o.name:o,{name:"if",hash:{},fn:e.program(23,i,0),inverse:e.noop,data:i}))?o:"")+"\n\n"+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.broadcastDate:o,{name:"if",hash:{},fn:e.program(26,i,0),inverse:e.noop,data:i}))?o:"")},23:function(e,n,t,r,i){var o;return e.propertyIsEnumerable,null!=(o=t.if.call(null!=n?n:e.nullContext||{},null!=n?n.channel:n,{name:"if",hash:{},fn:e.program(24,i,0),inverse:e.noop,data:i}))?o:""},24:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.lambda,s=e.escapeExpression;return'\n <div class="col-3 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+s((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"channel",{name:"lang",hash:{},data:i}))+'</div>\n <p class="col-9">'+s(l(null!=(o=null!=n?n.channel:n)?o.name:o,n))+"</p>\n "},26:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.lambda,s=e.escapeExpression;return' <div class="col-3 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+s((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"broadcastDate",{name:"lang",hash:{},data:i}))+'</div>\n <p class="col-9">'+s(l(null!=(o=null!=n?n.options:n)?o.broadcastDate:o,n))+"</p>\n"},28:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.lambda,s=e.escapeExpression;return' <div class="col-3 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+s((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"dateUploaded",{name:"lang",hash:{},data:i}))+'</div>\n <p class="col-9">'+s(l(null!=(o=null!=n?n.options:n)?o.uploadedDate:o,n))+"</p>\n"},30:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=e.lambda,s=e.escapeExpression;return' <div class="col-3 '+s(l(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.columnNames:o,n))+'">'+s((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"subtitles",{name:"lang",hash:{},data:i}))+'</div>\n <p class="col-9">'+s(l(null!=(o=null!=n?n.options:n)?o.subtitles:o,n))+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=null!=n?n:e.nullContext||{};return(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.showHeading:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+'<div class="row mb-0">\n'+(null!=(o=t.if.call(l,null!=n?n.name:n,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=t.if.call(l,null!=(o=null!=n?n.series:n)?o.name:o,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=t.if.call(l,null!=(o=null!=n?n.rating:n)?o.code:o,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=t.if.call(l,null!=n?n.description:n,{name:"if",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=t.if.call(l,null!=n?n.productionYear:n,{name:"if",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=t.if.call(l,null!=(o=null!=n?n.producers:n)?o.length:o,{name:"if",hash:{},fn:e.program(13,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=t.if.call(l,null!=(o=null!=n?n.directors:n)?o.length:o,{name:"if",hash:{},fn:e.program(16,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=t.if.call(l,null!=(o=null!=n?n.productionCompanies:n)?o.length:o,{name:"if",hash:{},fn:e.program(18,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=t.if.call(l,null!=(o=null!=n?n.distributors:n)?o.length:o,{name:"if",hash:{},fn:e.program(20,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=t.unless.call(l,null!=(o=null!=n?n.options:n)?o.hideBroadcastInfo:o,{name:"unless",hash:{},fn:e.program(22,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=t.unless.call(l,null!=(o=null!=n?n.options:n)?o.hideUploadedDate:o,{name:"unless",hash:{},fn:e.program(28,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.subtitles:o,{name:"if",hash:{},fn:e.program(30,i,0),inverse:e.noop,data:i}))?o:"")+"</div>"},useData:!0})},19021:function(e,n,t){var r=t(32227);e.exports=(r.default||r).template({1:function(e,n,t,r,i){var o;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=n?n.options:n)?o.styles:o)?o.series:o,n))},3:function(e,n,t,r,i){var o;return e.propertyIsEnumerable,'href="'+e.escapeExpression(e.lambda(null!=(o=null!=n?n.options:n)?o.seriesUrl:o,n))+'" target="_blank"'},5:function(e,n,t,r,i){var o;return e.propertyIsEnumerable,(null!=(o=t.if.call(null!=n?n:e.nullContext||{},null!=(o=null!=n?n.options:n)?o.seasonNumber:o,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))?o:"")+" E"+e.escapeExpression(e.lambda(null!=(o=null!=n?n.options:n)?o.episodeNumber:o,n))+"\n"},6:function(e,n,t,r,i){var o;return e.propertyIsEnumerable," S"+e.escapeExpression(e.lambda(null!=(o=null!=n?n.options:n)?o.seasonNumber:o,n))+" •"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,i){e.propertyIsEnumerable;var o,l=null!=n?n:e.nullContext||{};return'<a class="series-applink text-reset '+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.styleUppercase:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+'" '+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.seriesUrl:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+">\n "+(null!=(o=e.lambda(null!=(o=null!=n?n.options:n)?o.seriesName:o,n))?o:"")+(null!=(o=t.if.call(l,null!=(o=null!=n?n.options:n)?o.episodeNumber:o,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?o:"")+"</a>"},useData:!0})}}]);
|