@clickview/library-editor 1.45.1 → 1.46.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/{3778-library-editor-75b6a2eca6.chunk.css → 3778-library-editor-4f07a203a7.chunk.css} +1 -1
- package/dist/css/{5185-library-editor-577789a2ba.chunk.css → 5185-library-editor-50b3d0c9c2.chunk.css} +1 -1
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{1010-78c730c3d3.chunk.js → 1010-60f6dfd832.chunk.js} +1 -1
- package/dist/scripts/{1086-bf7355e402.chunk.js → 1086-2682e6d3f7.chunk.js} +1 -1
- package/dist/scripts/{112-9f396668ac.chunk.js → 112-24c19e2cde.chunk.js} +1 -1
- package/dist/scripts/{1216-7c3584c6ee.chunk.js → 1216-f3e3f911fa.chunk.js} +1 -1
- package/dist/scripts/{1269-99208bcecc.chunk.js → 1269-a34a1de36d.chunk.js} +1 -1
- package/dist/scripts/{1409-a161f8245a.chunk.js → 1409-93a72ff5bf.chunk.js} +1 -1
- package/dist/scripts/{1601-879d0665e7.chunk.js → 1601-6eb85a794d.chunk.js} +2 -2
- package/dist/scripts/{1703-63ad0b3ce1.chunk.js → 1703-a320de79f3.chunk.js} +1 -1
- package/dist/scripts/{1832-882ab67791.chunk.js → 1832-23fead57c5.chunk.js} +1 -1
- package/dist/scripts/{1876-42c5fe7a33.chunk.js → 1876-2b788843ab.chunk.js} +1 -1
- package/dist/scripts/{2417-a7f6defb26.chunk.js → 2417-1ee31c4281.chunk.js} +1 -1
- package/dist/scripts/{243-e21d40c982.chunk.js → 243-2012c53e96.chunk.js} +1 -1
- package/dist/scripts/{2482-b7ad002b09.chunk.js → 2482-955e4b3615.chunk.js} +1 -1
- package/dist/scripts/{259-671fc59e31.chunk.js → 259-7d1d480f6e.chunk.js} +1 -1
- package/dist/scripts/{2601-c4230f3cfd.chunk.js → 2601-d973ed65dc.chunk.js} +1 -1
- package/dist/scripts/{2644-4815c4b278.chunk.js → 2644-485d14740b.chunk.js} +1 -1
- package/dist/scripts/{2692-92122fb3d2.chunk.js → 2692-438539ccbe.chunk.js} +1 -1
- package/dist/scripts/{2888-2c0a5591ef.chunk.js → 2888-55edc16fd6.chunk.js} +1 -1
- package/dist/scripts/{299-9ab1d59d5c.chunk.js → 299-eeaac48864.chunk.js} +1 -1
- package/dist/scripts/{2998-234d4e79d4.chunk.js → 2998-24191bc8ab.chunk.js} +1 -1
- package/dist/scripts/{3400-48eceba386.chunk.js → 3400-95d7a3a0d6.chunk.js} +1 -1
- package/dist/scripts/{343-6d71f27a71.chunk.js → 343-bb56a70dd3.chunk.js} +1 -1
- package/dist/scripts/{35-3e0fe9666f.chunk.js → 35-7bfbab50e6.chunk.js} +1 -1
- package/dist/scripts/{3551-5456900410.chunk.js → 3551-5513258594.chunk.js} +1 -1
- package/dist/scripts/{376-7e5af8f053.chunk.js → 376-98c734f74f.chunk.js} +1 -1
- package/dist/scripts/{3763-64dc73b8c4.chunk.js → 3763-c5de5a36a1.chunk.js} +1 -1
- package/dist/scripts/{3778-34a6c70ced.chunk.js → 3778-f76c45aa72.chunk.js} +1 -1
- package/dist/scripts/{4201-228a2b8d76.chunk.js → 4201-6311ac5cac.chunk.js} +1 -1
- package/dist/scripts/{4245-cacf193d02.chunk.js → 4245-6e9e71cc7d.chunk.js} +1 -1
- package/dist/scripts/{4591-c798b9d80a.chunk.js → 4591-9e342f97bc.chunk.js} +1 -1
- package/dist/scripts/{4860-f770422186.chunk.js → 4860-955b4bf901.chunk.js} +1 -1
- package/dist/scripts/{5046-432362ee4e.chunk.js → 5046-19d7090284.chunk.js} +1 -1
- package/dist/scripts/{514-20644e0a4e.chunk.js → 514-927a43219d.chunk.js} +1 -1
- package/dist/scripts/{5185-48169130b8.chunk.js → 5185-e8c8993e07.chunk.js} +2 -2
- package/dist/scripts/{5286-f967ae444b.chunk.js → 5286-293188ce69.chunk.js} +1 -1
- package/dist/scripts/{5412-e675c4ef4e.chunk.js → 5412-95152820bb.chunk.js} +1 -1
- package/dist/scripts/{5418-dce1baab7a.chunk.js → 5418-f31f79952c.chunk.js} +1 -1
- package/dist/scripts/{5424-50632a5025.chunk.js → 5424-f53a7d8068.chunk.js} +1 -1
- package/dist/scripts/{5707-bc3c7af0c0.chunk.js → 5707-41f283fd98.chunk.js} +1 -1
- package/dist/scripts/{5747-d8ee53162d.chunk.js → 5747-0ab2cc3678.chunk.js} +1 -1
- package/dist/scripts/{6093-7fe8c7fcce.chunk.js → 6093-7e5c1af050.chunk.js} +1 -1
- package/dist/scripts/{61-ad1f6f5f42.chunk.js → 61-c14d2f90fd.chunk.js} +2 -2
- package/dist/scripts/{6352-bbe31ba815.chunk.js → 6352-aaaf02499b.chunk.js} +1 -1
- package/dist/scripts/{6732-35dcc7a725.chunk.js → 6732-5bf9ec4e56.chunk.js} +1 -1
- package/dist/scripts/{6774-5af5e4b0b8.chunk.js → 6774-3cad51b5b7.chunk.js} +1 -1
- package/dist/scripts/{7002-8564980898.chunk.js → 7002-3686f9dcfb.chunk.js} +1 -1
- package/dist/scripts/{7053-79f4e3e275.chunk.js → 7053-38535c04ca.chunk.js} +1 -1
- package/dist/scripts/{7071-a0cb4a599c.chunk.js → 7071-5a543a7eec.chunk.js} +1 -1
- package/dist/scripts/{708-0c400838a2.chunk.js → 708-9aa6428a97.chunk.js} +1 -1
- package/dist/scripts/{7295-aa334844a4.chunk.js → 7295-594d2f2def.chunk.js} +1 -1
- package/dist/scripts/{7376-34e0848b6f.chunk.js → 7376-baac126511.chunk.js} +1 -1
- package/dist/scripts/{7408-64e0468c04.chunk.js → 7408-35779961a6.chunk.js} +1 -1
- package/dist/scripts/{8213-0a91276442.chunk.js → 8213-ef3077d565.chunk.js} +1 -1
- package/dist/scripts/{8362-9fa19d6e1e.chunk.js → 8362-e82bef3e07.chunk.js} +1 -1
- package/dist/scripts/{8726-b262387b6e.chunk.js → 8726-edded1064e.chunk.js} +1 -1
- package/dist/scripts/{8727-2a68455289.chunk.js → 8727-2e314f9301.chunk.js} +1 -1
- package/dist/scripts/{8762-63efbfcfa7.chunk.js → 8762-4ee15995c8.chunk.js} +1 -1
- package/dist/scripts/{8906-5592870e17.chunk.js → 8906-3bde92a78d.chunk.js} +1 -1
- package/dist/scripts/{9357-2b5993c1b5.chunk.js → 9357-c5c5984ec8.chunk.js} +1 -1
- package/dist/scripts/{9383-7d95ed4d9b.chunk.js → 9383-51cb65e6f7.chunk.js} +1 -1
- package/dist/scripts/{9695-694c2d9147.chunk.js → 9695-a04e508364.chunk.js} +1 -1
- package/dist/scripts/{9927-8b7265b00a.chunk.js → 9927-a667775ac4.chunk.js} +1 -1
- package/dist/scripts/bundle-5de4908d0e.min.js +2 -0
- package/package.json +72 -72
- package/typings/libs/CVEvents.d.ts +12 -12
- package/typings/libs/CVLanguages.d.ts +24 -24
- package/typings/libs/Environment.d.ts +10 -10
- package/typings/libs/LazyLoad.d.ts +29 -29
- package/typings/libs/LazyLoad.ts +27 -27
- package/typings/libs/backbone.validation.d.ts +99 -99
- package/typings/libs/cloneDeep.d.ts +4 -4
- package/typings/libs/cookiesjs.d.ts +24 -24
- package/typings/libs/draft-convert.d.ts +3 -3
- package/typings/libs/google-api.d.ts +4 -4
- package/typings/libs/microsoft-teams.d.ts +2 -2
- package/typings/libs/trackjs.d.ts +2 -2
- package/typings/libs/videojs-contrib-quality-levels.d.ts +30 -30
- package/typings/utils/imports.d.ts +9 -9
- package/dist/css/101-library-editor-5af6f4e937.chunk.css +0 -2
- package/dist/css/2696-library-editor-4a7e07523b.chunk.css +0 -77
- package/dist/css/3746-library-editor-d4c68a200b.chunk.css +0 -1
- package/dist/css/3778-library-editor-e7f11db43a.chunk.css +0 -12
- package/dist/css/456-library-editor-e9cac790d6.chunk.css +0 -17
- package/dist/css/5524-library-editor-36f0a42508.chunk.css +0 -11
- package/dist/css/5891-library-editor-d4c68a200b.chunk.css +0 -1
- package/dist/css/61-library-editor-af56e745db.chunk.css +0 -47
- package/dist/css/6963-library-editor-d4c68a200b.chunk.css +0 -1
- package/dist/css/8614-library-editor-5368f03ffe.chunk.css +0 -16
- package/dist/css/library-editor-app-899160fa5a.css +0 -62
- package/dist/scripts/101-dd5f891259.chunk.js +0 -1
- package/dist/scripts/2696-c93bc6ba82.chunk.js +0 -2
- package/dist/scripts/3087-31652fd164.chunk.js +0 -1
- package/dist/scripts/3746-092214a0a0.chunk.js +0 -1
- package/dist/scripts/3778-60cf0a97d4.chunk.js +0 -1
- package/dist/scripts/456-a1c2432237.chunk.js +0 -1
- package/dist/scripts/5524-3ecfd1675f.chunk.js +0 -1
- package/dist/scripts/5850-5f1fb603a9.chunk.js +0 -1
- package/dist/scripts/5891-b72da0591f.chunk.js +0 -1
- package/dist/scripts/61-1aa3a1edbc.chunk.js +0 -2
- package/dist/scripts/61-ad1f6f5f42.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/6721-b31c7b97e8.chunk.js +0 -1
- package/dist/scripts/6963-386c2153af.chunk.js +0 -1
- package/dist/scripts/8542-727d658bd8.chunk.js +0 -1
- package/dist/scripts/8614-d2aae15910.chunk.js +0 -2
- package/dist/scripts/8614-d2aae15910.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/bundle-59de85bc08.min.js +0 -2
- package/dist/scripts/bundle-59de85bc08.min.js.LICENSE.txt +0 -1
- package/dist/scripts/bundle-6c5a619a82.min.js +0 -2
- package/dist/scripts/bundle-6c5a619a82.min.js.LICENSE.txt +0 -1
- /package/dist/scripts/{1601-879d0665e7.chunk.js.LICENSE.txt → 1601-6eb85a794d.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2696-c93bc6ba82.chunk.js.LICENSE.txt → 5185-e8c8993e07.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5185-48169130b8.chunk.js.LICENSE.txt → 61-c14d2f90fd.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{61-1aa3a1edbc.chunk.js.LICENSE.txt → bundle-5de4908d0e.min.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[259],{86257:function(e,t,n){"use strict";var r;n.d(t,{L:function(){return r}}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={}))},21974:function(e,t,n){"use strict";n.d(t,{u:function(){return s}});var r=n(57857),o=n(75459),i=n(86257),u=n(63791);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c="shared.shared-utils",s={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-blue";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e,t){switch(e.type){case o.r.HostedLibrary:case o.r.CustomLibrary:return e.name;case o.r.Exchange:return r.T.getPhrase(c,"exchange");case o.r.Workspace:return r.T.getPhrase(c,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case o.r.HostedLibrary:case o.r.CustomLibrary:return"bg-blue";case o.r.Exchange:return"bg-green";case o.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t=l(l(l(l(l(l(l({},i.L.Pdf,u.vn.FilePDF),i.L.Image,u.vn.FileImg),i.L.PowerPoint,u.vn.FilePowerpoint),i.L.Document,u.vn.FileWord),i.L.Excel,u.vn.FileExcel),i.L.Zip,u.vn.FileZip),i.L.File,u.vn.File)[e];return t||(t=u.vn.Folder),t},mapTypeToClass:function(e){switch(e){case i.L.Pdf:return"icon-red";case i.L.Image:return"icon-purple";case i.L.Document:return"icon-blue";case i.L.Excel:return"icon-green";case i.L.PowerPoint:return"icon-orange";case i.L.Zip:return"icon-teal";case i.L.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case i.L.Pdf:return r.T.getPhrase(c,"pdf");case i.L.Image:return r.T.getPhrase(c,"image");case i.L.Document:return r.T.getPhrase(c,"document");case i.L.Excel:return r.T.getPhrase(c,"spreadsheet");case i.L.PowerPoint:return r.T.getPhrase(c,"presentation");case i.L.Zip:return r.T.getPhrase(c,"zipArchive");case i.L.File:return r.T.getPhrase(c,"file");default:return""}}}},68708:function(e,t,n){"use strict";n.d(t,{c:function(){return N}});var r=n(31647),o=n(48088),i=n(57857),u=n(52076),a=n(70065),l=n(63791),c=n(57098),s=n(93569),p=n(76431),f=n.n(p),y={container:"vvTSf"};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 m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b(r.key),r)}}function b(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function h(e,t,n){return t=g(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,v()?Reflect.construct(t,n||[],g(e).constructor):t.apply(e,n))}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=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 k=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),h(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"LinkItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat(y.container," rounded p-2 mb-2 d-flex align-items-center")}},{key:"lang",get:function(){return"libraryEditor.editLinks"}},{key:"attributes",get:function(){return{title:this.model.get("name")}}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.EDIT_LINK,args:[this.options.videoId,this.model.get("id")]}}}},{key:"onClickEdit",value:function(){var e=u.k.mergeOptions(this.options.analyticsOptions,{actionType:a.Vw.Edit,entity:a.py.Resource,workflowPhase:a.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};u.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new s.Mr({title:i.T.getPhrase(this.lang,"removeHeading"),text:i.T.getPhrase(this.lang,"removeConfirm",{name:s.m$.escapeExpression(this.model.get("name"))}),buttons:[{text:i.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:i.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:s.N0.generateUniqueChannelName(this)}).render().done((function(){o.Radio.channel(e.options.channelName).trigger("delete:link",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:y,editable:this.options.editable,linkSvg:l.Nj.getSvg(l.vn.Link),editSvg:l.Nj.getSvg(l.vn.Edit),trashSvg:l.Nj.getSvg(l.vn.Delete)}}}])&&m(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA),O=n(52929),P=n.n(O);function T(e){return T="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},T(e)}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(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,x(r.key),r)}}function j(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e){var t=function(e,t){if("object"!=T(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==T(t)?t:t+""}function C(e,t,n){return t=L(t),function(e,t){if(t&&("object"==T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,n||[],L(e).constructor):t.apply(e,n))}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}function I(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&&R(e,t)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}var N=function(e){function t(e){return S(this,t),C(this,t,[e])}return I(t,e),j(t,[{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return P()}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{links:{el:".links-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return this.options}},{key:"onRender",value:function(){this.showChildView("links",new D({collection:this.options.customCollection||this.model.get("links"),channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions,editable:this.options.editable,videoId:this.options.videoId,headingText:this.options.headingText,emptyStateText:this.options.emptyStateText}))}}])}(r.Q.wA),D=function(e){function t(e){return S(this,t),C(this,t,[e])}return I(t,e),j(t,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return k}}])}(r.Q.$W)},77605:function(e,t,n){"use strict";n.d(t,{c:function(){return V},h:function(){return F}});var r=n(48088),o=n(57857),i=n(31647),u=n(53808),a=n(52076),l=n(70065),c=n(63791),s=n(21974),p=n(95117),f=n.n(p);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 d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e,t){if("object"!=y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function b(e,t,n){return t=v(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,h()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}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 function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),b(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&&g(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat("CdlNn"," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":this.options.getEditAppLink(this.model.get("id"))}}},{key:"onClickEdit",value:function(){var e=a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.Vw.Edit,entity:l.py.Resource,workflowPhase:l.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};a.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){u.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){var e=this.model.get("metadata"),t=e?e.type:"";return{editable:this.options.editable,extension:s.u.mapTypeToExtension(t),svg:c.Nj.getSvg(s.u.mapTypeToSvg(t)),iconClass:s.u.mapTypeToClass(t),resourceType:s.u.mapTypeToName(t),editSvg:c.Nj.getSvg(c.vn.Edit),trashSvg:c.Nj.getSvg(c.vn.Delete)}}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.wA),k=n(41934),O=n(25094),P=n(54758),T=n(99114),S=n.n(T);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_(r.key),r)}}function C(e,t,n){return t&&x(e.prototype,t),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e){var t=function(e,t){if("object"!=E(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}function L(e,t,n){return t=R(t),function(e,t){if(t&&("object"==E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,I()?Reflect.construct(t,n||[],R(e).constructor):t.apply(e,n))}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function N(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var F=function(e){function t(e){return j(this,t),L(this,t,[e])}return N(t,e),C(t,[{key:"name",get:function(){return"VideoResourcesComponentCollection"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"childView",get:function(){return w}},{key:"childViewOptions",get:function(){var e=this;return{editable:this.options.editable,videoId:this.options.videoId,analyticsOptions:this.options.analyticsOptions,onClickDelete:function(t){return e.onClickDelete(t)},getEditAppLink:function(t){return{application:O.OV.LIBRARY_EDITOR,action:k.e.LibraryEditor.EDIT_RESOURCE,args:[e.options.videoId,t]}}}}},{key:"onClickDelete",value:function(e){var t=this;new P.M({title:o.T.getPhrase(this.lang,"removeHeading"),text:o.T.getPhrase(this.lang,"removeBody",{resourceName:e.get("name")}),buttons:[{text:o.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:o.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){r.Radio.channel(t.options.channelName).trigger("delete:resource",e.get("id"))}))}}])}(i.Q.$W),V=function(e){function t(e){return j(this,t),L(this,t,[e])}return N(t,e),C(t,[{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return S()}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{resources:{replaceElement:!0,el:".resource-list-region"}}}},{key:"renderResources",value:function(){var e=new F({collection:this.options.customCollection||this.model.resources,editable:this.options.editable||!1,videoId:this.options.videoId||this.model.get("id"),channelName:this.options.parentChannelName||this.channelName});this.showChildView("resources",e)}},{key:"viewOptions",value:function(){return{resourcesHeadingText:this.options.headerText||o.T.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}}])}(i.Q.wA)},95117:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda;return'<a class="float-end svg-container cursor-pointer text-secondary delete">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\r\n<a class="float-end svg-container cursor-pointer text-secondary edit">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u,a=e.lambda,l=e.escapeExpression,c=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,p="function";return'<span title="'+l(a(null!=(i=null!=t?t.options:t)?i.resourceType:i,t))+'" class="d-inline-block align-middle me-2 svg-container '+l(a(null!=(i=null!=t?t.options:t)?i.iconClass:i,t))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\r\n<a href="'+l(typeof(u=null!=(u=n.url||(null!=t?t.url:t))?u:s)===p?u.call(c,{name:"url",hash:{},data:o}):u)+"?name="+l(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:s)===p?u.call(c,{name:"name",hash:{},data:o}):u)+'" class="align-middle">\r\n '+l(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:s)===p?u.call(c,{name:"name",hash:{},data:o}):u)+"\r\n</a>\r\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},76431:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda;return' <a class="ms-auto me-1 svg-container cursor-pointer text-secondary edit">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+'</a>\r\n <a class="svg-container cursor-pointer text-secondary delete">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c="function",s=e.escapeExpression;return'<span class="svg-container text-info me-2">'+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.linkSvg:i,t))?i:"")+'</span>\r\n<a class="w-75 text-truncate" href="'+s(typeof(u=null!=(u=n.url||(null!=t?t.url:t))?u:l)===c?u.call(a,{name:"url",hash:{},data:o}):u)+'" target="_blank">'+s(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:l)===c?u.call(a,{name:"name",hash:{},data:o}):u)+"</a>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},52929:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.headingText:i,t))+"</h5>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n<div class="links-region"></div>'},useData:!0})},99114:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.resourcesHeadingText:i,t))+"</h5>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n<div class="resource-list-region"></div>'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[259],{86257:function(e,t,n){"use strict";var r;n.d(t,{L:function(){return r}}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={}))},21974:function(e,t,n){"use strict";n.d(t,{u:function(){return s}});var r=n(57857),o=n(75459),i=n(86257),u=n(63791);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c="shared.shared-utils",s={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-blue";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e,t){switch(e.type){case o.r.HostedLibrary:case o.r.CustomLibrary:return e.name;case o.r.Exchange:return r.T.getPhrase(c,"exchange");case o.r.Workspace:return r.T.getPhrase(c,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case o.r.HostedLibrary:case o.r.CustomLibrary:return"bg-blue";case o.r.Exchange:return"bg-green";case o.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t=l(l(l(l(l(l(l({},i.L.Pdf,u.vn.FilePDF),i.L.Image,u.vn.FileImg),i.L.PowerPoint,u.vn.FilePowerpoint),i.L.Document,u.vn.FileWord),i.L.Excel,u.vn.FileExcel),i.L.Zip,u.vn.FileZip),i.L.File,u.vn.File)[e];return t||(t=u.vn.Folder),t},mapTypeToClass:function(e){switch(e){case i.L.Pdf:return"icon-red";case i.L.Image:return"icon-purple";case i.L.Document:return"icon-blue";case i.L.Excel:return"icon-green";case i.L.PowerPoint:return"icon-orange";case i.L.Zip:return"icon-teal";case i.L.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case i.L.Pdf:return r.T.getPhrase(c,"pdf");case i.L.Image:return r.T.getPhrase(c,"image");case i.L.Document:return r.T.getPhrase(c,"document");case i.L.Excel:return r.T.getPhrase(c,"spreadsheet");case i.L.PowerPoint:return r.T.getPhrase(c,"presentation");case i.L.Zip:return r.T.getPhrase(c,"zipArchive");case i.L.File:return r.T.getPhrase(c,"file");default:return""}}}},68708:function(e,t,n){"use strict";n.d(t,{c:function(){return N}});var r=n(31647),o=n(48088),i=n(57857),u=n(52076),a=n(70065),l=n(63791),c=n(57098),s=n(93569),p=n(76431),f=n.n(p),y={container:"vvTSf"};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 m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b(r.key),r)}}function b(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function h(e,t,n){return t=g(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,v()?Reflect.construct(t,n||[],g(e).constructor):t.apply(e,n))}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=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 k=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),h(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"LinkItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat(y.container," rounded p-2 mb-2 d-flex align-items-center")}},{key:"lang",get:function(){return"libraryEditor.editLinks"}},{key:"attributes",get:function(){return{title:this.model.get("name")}}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.EDIT_LINK,args:[this.options.videoId,this.model.get("id")]}}}},{key:"onClickEdit",value:function(){var e=u.k.mergeOptions(this.options.analyticsOptions,{actionType:a.Vw.Edit,entity:a.py.Resource,workflowPhase:a.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};u.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new s.Mr({title:i.T.getPhrase(this.lang,"removeHeading"),text:i.T.getPhrase(this.lang,"removeConfirm",{name:s.m$.escapeExpression(this.model.get("name"))}),buttons:[{text:i.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:i.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:s.N0.generateUniqueChannelName(this)}).render().done((function(){o.Radio.channel(e.options.channelName).trigger("delete:link",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:y,editable:this.options.editable,linkSvg:l.Nj.getSvg(l.vn.Link),editSvg:l.Nj.getSvg(l.vn.Edit),trashSvg:l.Nj.getSvg(l.vn.Delete)}}}])&&m(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA),O=n(52929),P=n.n(O);function T(e){return T="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},T(e)}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(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,x(r.key),r)}}function j(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e){var t=function(e,t){if("object"!=T(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==T(t)?t:t+""}function C(e,t,n){return t=L(t),function(e,t){if(t&&("object"==T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,n||[],L(e).constructor):t.apply(e,n))}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}function I(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&&R(e,t)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}var N=function(e){function t(e){return S(this,t),C(this,t,[e])}return I(t,e),j(t,[{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return P()}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{links:{el:".links-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return this.options}},{key:"onRender",value:function(){this.showChildView("links",new D({collection:this.options.customCollection||this.model.get("links"),channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions,editable:this.options.editable,videoId:this.options.videoId,headingText:this.options.headingText,emptyStateText:this.options.emptyStateText}))}}])}(r.Q.wA),D=function(e){function t(e){return S(this,t),C(this,t,[e])}return I(t,e),j(t,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return k}}])}(r.Q.$W)},77605:function(e,t,n){"use strict";n.d(t,{c:function(){return V},h:function(){return F}});var r=n(48088),o=n(57857),i=n(31647),u=n(53808),a=n(52076),l=n(70065),c=n(63791),s=n(21974),p=n(95117),f=n.n(p);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 d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e,t){if("object"!=y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function b(e,t,n){return t=v(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,h()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}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 function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),b(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&&g(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat("CdlNn"," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":this.options.getEditAppLink(this.model.get("id"))}}},{key:"onClickEdit",value:function(){var e=a.k.mergeOptions(this.options.analyticsOptions,{actionType:l.Vw.Edit,entity:l.py.Resource,workflowPhase:l.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};a.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){u.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){var e=this.model.get("metadata"),t=e?e.type:"";return{editable:this.options.editable,extension:s.u.mapTypeToExtension(t),svg:c.Nj.getSvg(s.u.mapTypeToSvg(t)),iconClass:s.u.mapTypeToClass(t),resourceType:s.u.mapTypeToName(t),editSvg:c.Nj.getSvg(c.vn.Edit),trashSvg:c.Nj.getSvg(c.vn.Delete)}}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.wA),k=n(41934),O=n(25094),P=n(54758),T=n(99114),S=n.n(T);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_(r.key),r)}}function C(e,t,n){return t&&x(e.prototype,t),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e){var t=function(e,t){if("object"!=E(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}function L(e,t,n){return t=R(t),function(e,t){if(t&&("object"==E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,I()?Reflect.construct(t,n||[],R(e).constructor):t.apply(e,n))}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function N(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var F=function(e){function t(e){return j(this,t),L(this,t,[e])}return N(t,e),C(t,[{key:"name",get:function(){return"VideoResourcesComponentCollection"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"childView",get:function(){return w}},{key:"childViewOptions",get:function(){var e=this;return{editable:this.options.editable,videoId:this.options.videoId,analyticsOptions:this.options.analyticsOptions,onClickDelete:function(t){return e.onClickDelete(t)},getEditAppLink:function(t){return{application:O.OV.LIBRARY_EDITOR,action:k.e.LibraryEditor.EDIT_RESOURCE,args:[e.options.videoId,t]}}}}},{key:"onClickDelete",value:function(e){var t=this;new P.M({title:o.T.getPhrase(this.lang,"removeHeading"),text:o.T.getPhrase(this.lang,"removeBody",{resourceName:e.get("name")}),buttons:[{text:o.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:o.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){r.Radio.channel(t.options.channelName).trigger("delete:resource",e.get("id"))}))}}])}(i.Q.$W),V=function(e){function t(e){return j(this,t),L(this,t,[e])}return N(t,e),C(t,[{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return S()}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{resources:{replaceElement:!0,el:".resource-list-region"}}}},{key:"renderResources",value:function(){var e=new F({collection:this.options.customCollection||this.model.resources,editable:this.options.editable||!1,videoId:this.options.videoId||this.model.get("id"),channelName:this.options.parentChannelName||this.channelName});this.showChildView("resources",e)}},{key:"viewOptions",value:function(){return{resourcesHeadingText:this.options.headerText||o.T.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}}])}(i.Q.wA)},95117:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda;return'<a class="float-end svg-container cursor-pointer text-secondary delete">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\n<a class="float-end svg-container cursor-pointer text-secondary edit">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u,a=e.lambda,l=e.escapeExpression,c=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,p="function";return'<span title="'+l(a(null!=(i=null!=t?t.options:t)?i.resourceType:i,t))+'" class="d-inline-block align-middle me-2 svg-container '+l(a(null!=(i=null!=t?t.options:t)?i.iconClass:i,t))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\n<a href="'+l(typeof(u=null!=(u=n.url||(null!=t?t.url:t))?u:s)===p?u.call(c,{name:"url",hash:{},data:o}):u)+"?name="+l(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:s)===p?u.call(c,{name:"name",hash:{},data:o}):u)+'" class="align-middle">\n '+l(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:s)===p?u.call(c,{name:"name",hash:{},data:o}):u)+"\n</a>\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},76431:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u=e.lambda;return' <a class="ms-auto me-1 svg-container cursor-pointer text-secondary edit">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+'</a>\n <a class="svg-container cursor-pointer text-secondary delete">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,u,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c="function",s=e.escapeExpression;return'<span class="svg-container text-info me-2">'+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.linkSvg:i,t))?i:"")+'</span>\n<a class="w-75 text-truncate" href="'+s(typeof(u=null!=(u=n.url||(null!=t?t.url:t))?u:l)===c?u.call(a,{name:"url",hash:{},data:o}):u)+'" target="_blank">'+s(typeof(u=null!=(u=n.name||(null!=t?t.name:t))?u:l)===c?u.call(a,{name:"name",hash:{},data:o}):u)+"</a>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},52929:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.headingText:i,t))+"</h5>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n<div class="links-region"></div>'},useData:!0})},99114:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.resourcesHeadingText:i,t))+"</h5>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n<div class="resource-list-region"></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 g}});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 h(e){return h="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},h(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,p(o.key),o)}}function p(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function v(e,t,n){return t=m(t),function(e,t){if(t&&("object"==h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(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),v(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,(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}))}}])&&f(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 w}});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 h(e){return h="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},h(e)}function f(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,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function y(e,t,n){return t=b(t),function(e,t){if(t&&("object"==h(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||[],b(e).constructor):t.apply(e,n))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}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 function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),y(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&&g(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(f(f({},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 E}});var o=n(11306),i=n(31647),r=n(48088),a=n(57098),s=n(26457),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,h(o.key),o)}}function h(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function f(e,t,n){return t=v(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,p()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(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),f(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,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:"viewOptions",value:function(){return{removable:this.options.removeEvent}}},{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 b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function g(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,w(o.key),o)}}function w(e){var t=function(e,t){if("object"!=b(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=b(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}function k(e,t,n){return t=T(t),function(e,t){if(t&&("object"==b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,n||[],T(e).constructor):t.apply(e,n))}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(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),k(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&&O(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}}])&&g(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.$W)},18974:function(e,t,n){"use strict";n.r(t),n.d(t,{EditVideoView:function(){return ut}});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),h=n(52076),f=n(70065),p=n(8371),v=n(13156),y=n(29625),m=n(57098),b=n(29457),g=n(68619),w=n(64404),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,t){if("object"!=M(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=M(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==M(t)?t:t+""}function R(e,t,n){return t=B(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,I()?Reflect.construct(t,n||[],B(e).constructor):t.apply(e,n))}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}var A=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),R(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&&U(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 F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,J(o.key),o)}}function Q(e,t,n){return t&&z(e.prototype,t),n&&z(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function J(e){var t=function(e,t){if("object"!=L(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=L(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==L(t)?t:t+""}function Z(e,t,n){return t=K(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,H()?Reflect.construct(t,n||[],K(e).constructor):t.apply(e,n))}function H(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(H=function(){return!!e})()}function K(e){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K(e)}function G(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)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}var Y=function(e){function t(e){return F(this,t),Z(this,t,[e])}return G(t,e),Q(t,[{key:"name",get:function(){return"ExtraInfoComponentCollection"}},{key:"childView",get:function(){return A}},{key:"childViewOptions",get:function(){return{viewModel:this.options.viewModel}}}])}(d.Q.$W),q=function(e){function t(e){return F(this,t),Z(this,t,[e])}return G(t,e),Q(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 Y({collection:this.model.fields,viewModel:this.model}))}}])}(d.Q.wA),X=n(88483),$=n(2772),ee=n(10101),te=n(86272),ne=n.n(te);function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ie(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,re(o.key),o)}}function re(e){var t=function(e,t){if("object"!=oe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=oe(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oe(t)?t:t+""}function ae(e,t,n){return t=le(t),function(e,t){if(t&&("object"==oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,se()?Reflect.construct(t,n||[],le(e).constructor):t.apply(e,n))}function se(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(se=function(){return!!e})()}function le(e){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(e)}function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}var ce=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),ae(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&&ue(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 ne()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:ee.YR,channelName:this.options.channelName,buttonSelector:".upload-thumbnail",imageType:b.__.Thumbnails,appLink:{application:m.OV.LIBRARY_EDITOR,action:m.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:m.nq[b.__.Thumbnails]}}},{key:"onRender",value:function(){this.showChildView("thumbnail",new $.Z({model:this.model,thumbnailOptions:{size:X.h2.Medium}}))}}])&&ie(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),de=n(74250),he=n(17391),fe=n(36022),pe=n(3974),ve=n(44391),ye=n(26457),me=n(30992),be=n.n(me);function ge(e){return ge="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},ge(e)}function we(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,ke(o.key),o)}}function ke(e){var t=function(e,t){if("object"!=ge(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=ge(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ge(t)?t:t+""}function Se(e,t,n){return t=Oe(t),function(e,t){if(t&&("object"==ge(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,Te()?Reflect.construct(t,n||[],Oe(e).constructor):t.apply(e,n))}function Te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Te=function(){return!!e})()}function Oe(e){return Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Oe(e)}function Ee(e,t){return Ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ee(e,t)}var Ce=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),Se(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&&Ee(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TagsComponent"}},{key:"template",get:function(){return be()}},{key:"lang",get:function(){return"libraryEditor.tags"}},{key:"defaults",get:function(){return{headerText:u.T.getPhrase(this.lang,"heading"),orientation:ye.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!==ye.Dm.Edit||this.options.parentId||d.Q.Ry.throw(new s.H("parentId is required to edit tags."))}},{key:"getTypeaheadConfigs",value:function(){var e=pe.M.getTypeaheadConfig(),t=pe.M.getBloodhoundConfig(),n={newType:m.n8.TagsRaw},o={newType:m.n8.TagsRaw,footerTemplate:he.J.getConfirmSelectionTemplate()};return[{name:m.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===ye.Dm.Edit,emptyStateText:e}}},{key:"showEmptyStateText",value:function(){return this.options.behavior!==ye.Dm.Edit&&!this.collection.length&&!!this.options.emptyStateText}},{key:"renderTagSelector",value:function(){this.options.behavior===ye.Dm.Edit&&this.showChildView("tagSelector",new fe.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:he.J.selectFirstResult,onBlur:he.J.clearInputOnBlur},typeaheadOptions:{hint:!1},actionOptions:{clearOnSelect:!0},autofocus:this.options.autofocus}))}},{key:"renderTagList",value:function(){this.showEmptyStateText()||this.showChildView("tagList",new ve.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()}}])&&we(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Pe=n(58259),je=n.n(Pe);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 De(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,xe(o.key),o)}}function xe(e){var t=function(e,t){if("object"!=Ne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Ne(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ne(t)?t:t+""}function Me(e,t,n){return t=Ve(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,_e()?Reflect.construct(t,n||[],Ve(e).constructor):t.apply(e,n))}function _e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_e=function(){return!!e})()}function Ve(e){return Ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ve(e)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}var Ie=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Me(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Re(e,t)}(t,e),n=t,(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 je()}},{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"}}}])&&De(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Be=n(23468),Ue=n.n(Be),Ae={suggestEdit:"AgfOM"};function Le(e){return Le="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},Le(e)}function Fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ze(o.key),o)}}function ze(e){var t=function(e,t){if("object"!=Le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Le(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Le(t)?t:t+""}function Qe(e,t,n){return t=Ze(t),function(e,t){if(t&&("object"==Le(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Je()?Reflect.construct(t,n||[],Ze(e).constructor):t.apply(e,n))}function Je(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Je=function(){return!!e})()}function Ze(e){return Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ze(e)}function He(e,t){return He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},He(e,t)}var Ke=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),Qe(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&&He(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 Ue()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:m.OV.LIBRARY_EDITOR,action:m.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 de.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new de.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 ce({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderCollapseButton",value:function(){this.showChildView("collapseButton",new Ie({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 q({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 Ce({parentId:this.model.get("id"),collection:e,orientation:ye.zM.Flex,behavior:ye.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 Ce({parentId:this.model.get("id"),collection:t,channelName:this.options.channelName,behavior:ye.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:Ae,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()}}])&&Fe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Ge=n(21053),We=n(40622),Ye=n(53854),qe=n(75535),Xe=n(95061),$e=n(57785),et=n(55230),tt=n.n(et);function nt(e){return nt="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},nt(e)}function ot(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,it(o.key),o)}}function it(e){var t=function(e,t){if("object"!=nt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=nt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nt(t)?t:t+""}function rt(e,t,n){return t=st(t),function(e,t){if(t&&("object"==nt(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,at()?Reflect.construct(t,n||[],st(e).constructor):t.apply(e,n))}function at(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(at=function(){return!!e})()}function st(e){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},st(e)}function lt(e,t){return lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lt(e,t)}var ut=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=rt(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&<(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 tt()}},{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(m.K9.NavLock,this),this.initDataListeners(),S.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=l.u.getInstance(m.Or.Video,this),this.tagDataService=l.u.getInstance(m.Or.Tags,this),this.seriesDataService=l.u.getInstance(m.Or.Series,this),this.ratingsDataService=l.u.getInstance(m.Or.Ratings,this),this.fieldsDataService=l.u.getInstance(m.Or.Fields,this),this.alertService=l.u.getInstance(m.K9.Alerts,this),this.personDataService=l.u.getInstance(m.Or.Person,this),this.companyDataService=l.u.getInstance(m.Or.Company,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,d.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(m.Vk.VIDEO,"videos:".concat(this.options.videoId,":sync"),this.render),this.listenTo(m.Vk.VIDEO,"videos:".concat(this.options.videoId,":error"),this.onError),this.listenTo(m.Vk.RATINGS,"".concat(m.M_.RATINGS,":sync"),this.render),this.listenTo(m.Vk.VIDEO,"".concat(m.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,We.NT.Save,this.onSave),this.listenTo(this.channelName,We.NT.Undo,this.onUndo),this.listenTo(this.channelName,We.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 qe.l);break;case a.h.Forbidden:d.Q.Ry.throw(new Ye.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 y.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,f.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(We.NT.DisableSave),this.logEditAction(e.dataChanges,f.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(We.NT.CancelSave),!1;this.validateSeries();var e=$e.xC.getChanges(this.model,this.viewModel),t=$e.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!i.keys(t).length)return this.updateSaveButton(We.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({},f.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),$e.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(!$e.xC.getChanges(this.model,this.viewModel)&&!i.keys($e.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(We.NT.DisableSave);this.lockNav(),this.updateSaveButton(We.NT.EnableSave)}else this.updateSaveButton(We.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=o.Radio.channel(this.channelName),n=We.NT.EnableSave,i=We.NT.DisableSave,r=We.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);h.k.logUserAction(n,{actionType:f.Vw.Edit,entity:f.py.Video,location:f.LZ.EditVideoDetails,workflowPhase:t})}},{key:"logDissocAction",value:function(e,t,n){var o=Object.assign({videoId:e},t.pick("id","name"));h.k.logUserAction(o,{actionType:f.Vw.Dissociate,entity:n,location:f.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,$e.aj)()),this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:w.n}),this.editable&&(this.viewModel.addValidation($e.rr),this.viewModel.addValidation($e.tD));var e=this.currentUser.get("instanceRegion")!==p.b.US;e&&this.viewModel.addValidation($e.oJ),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange),this.listenTo(this.viewModel,"change:dateBroadcast",i.partial(this.onModelChange,i,{manualUpdate:!0})),this.viewModel.fields&&e&&(this.viewModel.fields&&this.viewModel.fields.each((function(e){return e.addValidation($e.Zg)})),this.listenTo(this.viewModel.fields,"change",this.onModelChange))}},{key:"validateSeries",value:function(){this.viewModel.get("series.id")||(this.viewModel.unset("season"),this.viewModel.set("episodeNumber",null))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.ratings=this.ratingsDataService.getAllRatings(),this.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:Xe.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.ratings&&!!this.viewModel}},{key:"renderContent",value:function(){var e=$e.xC.getChanges(this.model,this.viewModel)||i.keys($e.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new Ke({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 Ge.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&&ot(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>\r\n"},3:function(e,t,n,o,i){return"my-2"},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="text-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>\r\n <button class="upload-thumbnail btn btn-outline-dark mb-3 w-100">'+l((n.lang||t&&t.lang||s).call(a,"upload",{name:"lang",hash:{},data:i}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="thumbnail-region"></div>\r\n<div class="'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},43791:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h1 class="h3">\r\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)+'\r\n</h2>\r\n<div class="breadcrumbs-region"></div>\r\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))+'">\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isExchange:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.program(6,i,0),data:i}))?r:"")+" </p>\r\n"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEditExchange",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\r\n"},6:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\r\n"},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">\r\n <div class="left-pane col-4">\r\n <div class="thumbnail-region"></div>\r\n <div class="cv-tags-region '+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"></div>\r\n <div class="customer-tags-region"></div>\r\n </div>\r\n <div class="right-pane col-8">\r\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="top-save-region"></div>\r\n <div class="basic-info-region mb-4"></div> \r\n <div class="collapse-button-region"></div>\r\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:"")+';">\r\n <div class="additional-details-region"></div> \r\n <div class="production-info-region mb-4"></div> \r\n <div class="fields-region mb-4"></div>\r\n </div>\r\n <div class="bottom-save-region"></div>\r\n </div>\r\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>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.allowUndo:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="save-region"></div>'},useData:!0})},15564:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return'<span class="btn-close cursor-pointer" role="button" aria-label="Close"></span>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,u="function",c=e.escapeExpression;return'<span class="clamp-1" title="'+c(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===u?a.call(s,{name:"name",hash:{},data:i}):a)+'">'+c(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===u?a.call(s,{name:"name",hash:{},data:i}):a)+"</span>\r\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.removable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},30992:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\r\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>\r\n"},5:function(e,t,n,o,i){return'<div class="tag-selector-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.headerText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="tag-list-region"></div>'},useData:!0})},55230:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="tab-region"></div>\r\n<div class="edit-content-region"></div>\r\n<div class="dialog-region"></div>'},useData:!0})},44106:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<h5 class="mb-0">Extra Information</h5>\r\n<div class="text-secondary mb-3">This information is only visible to administrators and will not be searchable</div>\r\n<div class="fields-region"></div>'},useData:!0})},72891:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="form-group">\r\n <label for="edit-description">'+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'</label>\r\n <div class="text-area-region"></div>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})}}]);
|
|
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 g}});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 h(e){return h="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},h(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,p(o.key),o)}}function p(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function v(e,t,n){return t=m(t),function(e,t){if(t&&("object"==h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(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),v(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,(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}))}}])&&f(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 w}});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 h(e){return h="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},h(e)}function f(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,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function y(e,t,n){return t=b(t),function(e,t){if(t&&("object"==h(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||[],b(e).constructor):t.apply(e,n))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}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 function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),y(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&&g(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(f(f({},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 E}});var o=n(11306),i=n(31647),r=n(48088),a=n(57098),s=n(26457),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,h(o.key),o)}}function h(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function f(e,t,n){return t=v(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,p()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(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),f(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,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:"viewOptions",value:function(){return{removable:this.options.removeEvent}}},{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 b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function g(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,w(o.key),o)}}function w(e){var t=function(e,t){if("object"!=b(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=b(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}function k(e,t,n){return t=T(t),function(e,t){if(t&&("object"==b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,n||[],T(e).constructor):t.apply(e,n))}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(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),k(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&&O(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}}])&&g(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.$W)},18974:function(e,t,n){"use strict";n.r(t),n.d(t,{EditVideoView:function(){return ut}});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),h=n(52076),f=n(70065),p=n(8371),v=n(13156),y=n(29625),m=n(57098),b=n(29457),g=n(68619),w=n(64404),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,t){if("object"!=M(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=M(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==M(t)?t:t+""}function R(e,t,n){return t=B(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,I()?Reflect.construct(t,n||[],B(e).constructor):t.apply(e,n))}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}var A=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),R(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&&U(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 F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,J(o.key),o)}}function Q(e,t,n){return t&&z(e.prototype,t),n&&z(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function J(e){var t=function(e,t){if("object"!=L(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=L(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==L(t)?t:t+""}function Z(e,t,n){return t=K(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,H()?Reflect.construct(t,n||[],K(e).constructor):t.apply(e,n))}function H(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(H=function(){return!!e})()}function K(e){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K(e)}function G(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)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}var Y=function(e){function t(e){return F(this,t),Z(this,t,[e])}return G(t,e),Q(t,[{key:"name",get:function(){return"ExtraInfoComponentCollection"}},{key:"childView",get:function(){return A}},{key:"childViewOptions",get:function(){return{viewModel:this.options.viewModel}}}])}(d.Q.$W),q=function(e){function t(e){return F(this,t),Z(this,t,[e])}return G(t,e),Q(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 Y({collection:this.model.fields,viewModel:this.model}))}}])}(d.Q.wA),X=n(88483),$=n(2772),ee=n(10101),te=n(86272),ne=n.n(te);function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ie(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,re(o.key),o)}}function re(e){var t=function(e,t){if("object"!=oe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=oe(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oe(t)?t:t+""}function ae(e,t,n){return t=le(t),function(e,t){if(t&&("object"==oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,se()?Reflect.construct(t,n||[],le(e).constructor):t.apply(e,n))}function se(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(se=function(){return!!e})()}function le(e){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(e)}function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}var ce=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),ae(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&&ue(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 ne()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:ee.YR,channelName:this.options.channelName,buttonSelector:".upload-thumbnail",imageType:b.__.Thumbnails,appLink:{application:m.OV.LIBRARY_EDITOR,action:m.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:m.nq[b.__.Thumbnails]}}},{key:"onRender",value:function(){this.showChildView("thumbnail",new $.Z({model:this.model,thumbnailOptions:{size:X.h2.Medium}}))}}])&&ie(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),de=n(74250),he=n(17391),fe=n(36022),pe=n(3974),ve=n(44391),ye=n(26457),me=n(30992),be=n.n(me);function ge(e){return ge="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},ge(e)}function we(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,ke(o.key),o)}}function ke(e){var t=function(e,t){if("object"!=ge(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=ge(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ge(t)?t:t+""}function Se(e,t,n){return t=Oe(t),function(e,t){if(t&&("object"==ge(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,Te()?Reflect.construct(t,n||[],Oe(e).constructor):t.apply(e,n))}function Te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Te=function(){return!!e})()}function Oe(e){return Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Oe(e)}function Ee(e,t){return Ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ee(e,t)}var Ce=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),Se(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&&Ee(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TagsComponent"}},{key:"template",get:function(){return be()}},{key:"lang",get:function(){return"libraryEditor.tags"}},{key:"defaults",get:function(){return{headerText:u.T.getPhrase(this.lang,"heading"),orientation:ye.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!==ye.Dm.Edit||this.options.parentId||d.Q.Ry.throw(new s.H("parentId is required to edit tags."))}},{key:"getTypeaheadConfigs",value:function(){var e=pe.M.getTypeaheadConfig(),t=pe.M.getBloodhoundConfig(),n={newType:m.n8.TagsRaw},o={newType:m.n8.TagsRaw,footerTemplate:he.J.getConfirmSelectionTemplate()};return[{name:m.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===ye.Dm.Edit,emptyStateText:e}}},{key:"showEmptyStateText",value:function(){return this.options.behavior!==ye.Dm.Edit&&!this.collection.length&&!!this.options.emptyStateText}},{key:"renderTagSelector",value:function(){this.options.behavior===ye.Dm.Edit&&this.showChildView("tagSelector",new fe.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:he.J.selectFirstResult,onBlur:he.J.clearInputOnBlur},typeaheadOptions:{hint:!1},actionOptions:{clearOnSelect:!0},autofocus:this.options.autofocus}))}},{key:"renderTagList",value:function(){this.showEmptyStateText()||this.showChildView("tagList",new ve.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()}}])&&we(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Pe=n(58259),je=n.n(Pe);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 De(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,xe(o.key),o)}}function xe(e){var t=function(e,t){if("object"!=Ne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Ne(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ne(t)?t:t+""}function Me(e,t,n){return t=Ve(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,_e()?Reflect.construct(t,n||[],Ve(e).constructor):t.apply(e,n))}function _e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_e=function(){return!!e})()}function Ve(e){return Ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ve(e)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}var Ie=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Me(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Re(e,t)}(t,e),n=t,(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 je()}},{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"}}}])&&De(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Be=n(23468),Ue=n.n(Be),Ae={suggestEdit:"AgfOM"};function Le(e){return Le="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},Le(e)}function Fe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,ze(o.key),o)}}function ze(e){var t=function(e,t){if("object"!=Le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Le(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Le(t)?t:t+""}function Qe(e,t,n){return t=Ze(t),function(e,t){if(t&&("object"==Le(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Je()?Reflect.construct(t,n||[],Ze(e).constructor):t.apply(e,n))}function Je(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Je=function(){return!!e})()}function Ze(e){return Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ze(e)}function He(e,t){return He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},He(e,t)}var Ke=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),Qe(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&&He(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 Ue()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:m.OV.LIBRARY_EDITOR,action:m.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 de.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new de.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 ce({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderCollapseButton",value:function(){this.showChildView("collapseButton",new Ie({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 q({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 Ce({parentId:this.model.get("id"),collection:e,orientation:ye.zM.Flex,behavior:ye.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 Ce({parentId:this.model.get("id"),collection:t,channelName:this.options.channelName,behavior:ye.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:Ae,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()}}])&&Fe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Ge=n(21053),We=n(40622),Ye=n(53854),qe=n(75535),Xe=n(95061),$e=n(57785),et=n(55230),tt=n.n(et);function nt(e){return nt="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},nt(e)}function ot(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,it(o.key),o)}}function it(e){var t=function(e,t){if("object"!=nt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=nt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nt(t)?t:t+""}function rt(e,t,n){return t=st(t),function(e,t){if(t&&("object"==nt(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,at()?Reflect.construct(t,n||[],st(e).constructor):t.apply(e,n))}function at(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(at=function(){return!!e})()}function st(e){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},st(e)}function lt(e,t){return lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lt(e,t)}var ut=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=rt(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&<(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 tt()}},{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(m.K9.NavLock,this),this.initDataListeners(),S.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=l.u.getInstance(m.Or.Video,this),this.tagDataService=l.u.getInstance(m.Or.Tags,this),this.seriesDataService=l.u.getInstance(m.Or.Series,this),this.ratingsDataService=l.u.getInstance(m.Or.Ratings,this),this.fieldsDataService=l.u.getInstance(m.Or.Fields,this),this.alertService=l.u.getInstance(m.K9.Alerts,this),this.personDataService=l.u.getInstance(m.Or.Person,this),this.companyDataService=l.u.getInstance(m.Or.Company,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,d.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(m.Vk.VIDEO,"videos:".concat(this.options.videoId,":sync"),this.render),this.listenTo(m.Vk.VIDEO,"videos:".concat(this.options.videoId,":error"),this.onError),this.listenTo(m.Vk.RATINGS,"".concat(m.M_.RATINGS,":sync"),this.render),this.listenTo(m.Vk.VIDEO,"".concat(m.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,We.NT.Save,this.onSave),this.listenTo(this.channelName,We.NT.Undo,this.onUndo),this.listenTo(this.channelName,We.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 qe.l);break;case a.h.Forbidden:d.Q.Ry.throw(new Ye.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 y.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,f.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(We.NT.DisableSave),this.logEditAction(e.dataChanges,f.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(We.NT.CancelSave),!1;this.validateSeries();var e=$e.xC.getChanges(this.model,this.viewModel),t=$e.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!i.keys(t).length)return this.updateSaveButton(We.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({},f.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),$e.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(!$e.xC.getChanges(this.model,this.viewModel)&&!i.keys($e.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(We.NT.DisableSave);this.lockNav(),this.updateSaveButton(We.NT.EnableSave)}else this.updateSaveButton(We.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=o.Radio.channel(this.channelName),n=We.NT.EnableSave,i=We.NT.DisableSave,r=We.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);h.k.logUserAction(n,{actionType:f.Vw.Edit,entity:f.py.Video,location:f.LZ.EditVideoDetails,workflowPhase:t})}},{key:"logDissocAction",value:function(e,t,n){var o=Object.assign({videoId:e},t.pick("id","name"));h.k.logUserAction(o,{actionType:f.Vw.Dissociate,entity:n,location:f.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,$e.aj)()),this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:w.n}),this.editable&&(this.viewModel.addValidation($e.rr),this.viewModel.addValidation($e.tD));var e=this.currentUser.get("instanceRegion")!==p.b.US;e&&this.viewModel.addValidation($e.oJ),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange),this.listenTo(this.viewModel,"change:dateBroadcast",i.partial(this.onModelChange,i,{manualUpdate:!0})),this.viewModel.fields&&e&&(this.viewModel.fields&&this.viewModel.fields.each((function(e){return e.addValidation($e.Zg)})),this.listenTo(this.viewModel.fields,"change",this.onModelChange))}},{key:"validateSeries",value:function(){this.viewModel.get("series.id")||(this.viewModel.unset("season"),this.viewModel.set("episodeNumber",null))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.ratings=this.ratingsDataService.getAllRatings(),this.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:Xe.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.ratings&&!!this.viewModel}},{key:"renderContent",value:function(){var e=$e.xC.getChanges(this.model,this.viewModel)||i.keys($e.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new Ke({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 Ge.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&&ot(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.hooks.helperMissing,u="function",c=e.escapeExpression;return'<span class="clamp-1" title="'+c(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===u?a.call(s,{name:"name",hash:{},data:i}):a)+'">'+c(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===u?a.call(s,{name:"name",hash:{},data:i}):a)+"</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="tab-region"></div>\n<div class="edit-content-region"></div>\n<div class="dialog-region"></div>'},useData:!0})},44106:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<h5 class="mb-0">Extra Information</h5>\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})}}]);
|