@clickview/library-editor 1.35.0-rc.1 → 1.35.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{1703-library-editor-f3611612bc.chunk.css → 1703-library-editor-22d3cf78a3.chunk.css} +1 -1
  3. package/dist/css/{1876-library-editor-f3611612bc.chunk.css → 1876-library-editor-22d3cf78a3.chunk.css} +1 -1
  4. package/dist/css/{2601-library-editor-de43a47ac6.chunk.css → 2601-library-editor-0db14cf497.chunk.css} +1 -1
  5. package/dist/css/{6505-library-editor-f5fbc19cce.chunk.css → 6505-library-editor-0862b9edab.chunk.css} +1 -1
  6. package/dist/css/{library-editor-app-9e70719a5d.css → library-editor-app-ad7039f1c8.css} +4 -0
  7. package/dist/languages/en.json +1 -1
  8. package/dist/scripts/{1010-4ef589d008.chunk.js → 1010-4d193dac9e.chunk.js} +1 -1
  9. package/dist/scripts/{1032-3728f9df89.chunk.js → 1032-417348711d.chunk.js} +1 -1
  10. package/dist/scripts/{1086-341076633d.chunk.js → 1086-aad27f7c95.chunk.js} +1 -1
  11. package/dist/scripts/{1409-9429160d1d.chunk.js → 1409-ac31418286.chunk.js} +1 -1
  12. package/dist/scripts/{1492-85fc4f1440.chunk.js → 1492-58e6c2cfda.chunk.js} +1 -1
  13. package/dist/scripts/{1601-0550afd76f.chunk.js → 1601-b0af727472.chunk.js} +2 -2
  14. package/dist/scripts/1703-ffaf83218d.chunk.js +1 -0
  15. package/dist/scripts/{1832-5a04f29a50.chunk.js → 1832-714a73ab92.chunk.js} +1 -1
  16. package/dist/scripts/1876-dbf77c66df.chunk.js +1 -0
  17. package/dist/scripts/{2254-a44369c23f.chunk.js → 2254-799d6c5eee.chunk.js} +1 -1
  18. package/dist/scripts/{2417-4aa80cae75.chunk.js → 2417-96e0949602.chunk.js} +1 -1
  19. package/dist/scripts/{243-637db87e01.chunk.js → 243-918a686085.chunk.js} +1 -1
  20. package/dist/scripts/2548-6a87ecc6d8.chunk.js +1 -0
  21. package/dist/scripts/{259-eb6c27e0ba.chunk.js → 259-ec48acb47c.chunk.js} +1 -1
  22. package/dist/scripts/{2601-7fbe77582f.chunk.js → 2601-a6525c17a2.chunk.js} +1 -1
  23. package/dist/scripts/{2644-1e60bf9d9a.chunk.js → 2644-999d466e90.chunk.js} +1 -1
  24. package/dist/scripts/{2692-79a41634fc.chunk.js → 2692-4703edbf92.chunk.js} +1 -1
  25. package/dist/scripts/{2803-bf2efe7108.chunk.js → 2803-536f4de2e5.chunk.js} +1 -1
  26. package/dist/scripts/{2888-81722c9a17.chunk.js → 2888-82154ef78f.chunk.js} +1 -1
  27. package/dist/scripts/{299-2b1b8399d8.chunk.js → 299-b7dbf0ebbf.chunk.js} +1 -1
  28. package/dist/scripts/2998-f85af341b9.chunk.js +1 -0
  29. package/dist/scripts/35-03ea4ab137.chunk.js +1 -0
  30. package/dist/scripts/{3639-573b6e5774.chunk.js → 3639-33630e86bc.chunk.js} +1 -1
  31. package/dist/scripts/{3746-5bf623b37c.chunk.js → 3746-44c2f70e92.chunk.js} +1 -1
  32. package/dist/scripts/376-4824e2507c.chunk.js +1 -0
  33. package/dist/scripts/{3763-04bb9b9f59.chunk.js → 3763-1b221d69b3.chunk.js} +1 -1
  34. package/dist/scripts/{3838-de148f8ce8.chunk.js → 3838-1b742c6e78.chunk.js} +1 -1
  35. package/dist/scripts/3969-aac649e660.chunk.js +1 -0
  36. package/dist/scripts/{4201-069a0ae82b.chunk.js → 4201-d2cd82d164.chunk.js} +1 -1
  37. package/dist/scripts/4523-d2c7bc4ef6.chunk.js +1 -0
  38. package/dist/scripts/{4591-9edc896170.chunk.js → 4591-f4bbb00b24.chunk.js} +1 -1
  39. package/dist/scripts/{4860-70078a99af.chunk.js → 4860-b4b567b013.chunk.js} +1 -1
  40. package/dist/scripts/{514-73f47c096f.chunk.js → 514-899d11ac93.chunk.js} +1 -1
  41. package/dist/scripts/5286-24bd355a31.chunk.js +1 -0
  42. package/dist/scripts/{5412-a5b5c4e8df.chunk.js → 5412-1bb7fe0d88.chunk.js} +1 -1
  43. package/dist/scripts/{5424-464a4aefd8.chunk.js → 5424-84c95bcb01.chunk.js} +1 -1
  44. package/dist/scripts/{546-9821b7a137.chunk.js → 546-08908e5aea.chunk.js} +1 -1
  45. package/dist/scripts/5698-a34aef1372.chunk.js +1 -0
  46. package/dist/scripts/5707-ed924036d6.chunk.js +1 -0
  47. package/dist/scripts/{5747-76d3bf1ac9.chunk.js → 5747-7d4c5072db.chunk.js} +1 -1
  48. package/dist/scripts/{61-0f468de54f.chunk.js → 61-8487d036e5.chunk.js} +2 -2
  49. package/dist/scripts/{6505-a3cd826b3d.chunk.js → 6505-b7d19d5c03.chunk.js} +1 -1
  50. package/dist/scripts/{6539-73d88ad7a8.chunk.js → 6539-3126f0fbda.chunk.js} +1 -1
  51. package/dist/scripts/{6673-9c020ef1e9.chunk.js → 6673-012b6a34e6.chunk.js} +2 -2
  52. package/dist/scripts/{6732-926ba6e4a7.chunk.js → 6732-a50459c84d.chunk.js} +1 -1
  53. package/dist/scripts/{6774-bc3e91ef9f.chunk.js → 6774-d9478103b4.chunk.js} +1 -1
  54. package/dist/scripts/{6788-162a034c8f.chunk.js → 6788-587666f144.chunk.js} +1 -1
  55. package/dist/scripts/6963-9d33991743.chunk.js +1 -0
  56. package/dist/scripts/{7002-2abf4ab235.chunk.js → 7002-913b8786d0.chunk.js} +1 -1
  57. package/dist/scripts/{7053-31953ee49e.chunk.js → 7053-27fd687560.chunk.js} +1 -1
  58. package/dist/scripts/7071-c6667f44f5.chunk.js +1 -0
  59. package/dist/scripts/{708-387b4a22ae.chunk.js → 708-83d4f20c11.chunk.js} +1 -1
  60. package/dist/scripts/{7376-88ce2513f1.chunk.js → 7376-30a7796bd8.chunk.js} +1 -1
  61. package/dist/scripts/7471-e4a571d23d.chunk.js +1 -0
  62. package/dist/scripts/{8213-e81d88992f.chunk.js → 8213-76e961afd7.chunk.js} +1 -1
  63. package/dist/scripts/{8362-9f5d02162b.chunk.js → 8362-ee0581a213.chunk.js} +1 -1
  64. package/dist/scripts/{8726-188275719c.chunk.js → 8726-9cf2439dab.chunk.js} +1 -1
  65. package/dist/scripts/{8727-25b7a07d5e.chunk.js → 8727-2db647e01c.chunk.js} +1 -1
  66. package/dist/scripts/{8762-19b69b9933.chunk.js → 8762-b961ffc598.chunk.js} +1 -1
  67. package/dist/scripts/{8906-03db1bdbc3.chunk.js → 8906-b3e2cf9511.chunk.js} +1 -1
  68. package/dist/scripts/9267-f7ac5e862e.chunk.js +1 -0
  69. package/dist/scripts/{9357-4f30f5eb0d.chunk.js → 9357-730d572872.chunk.js} +1 -1
  70. package/dist/scripts/{9695-0ee92974f3.chunk.js → 9695-8485f54457.chunk.js} +1 -1
  71. package/dist/scripts/{9927-1c47de191d.chunk.js → 9927-a5554b6c8f.chunk.js} +1 -1
  72. package/dist/scripts/{bundle-8d08568d30.min.js → bundle-ef4f6966cb.min.js} +2 -2
  73. package/package.json +1 -1
  74. package/dist/scripts/1703-cb95448dd7.chunk.js +0 -1
  75. package/dist/scripts/1876-8cbd30a64a.chunk.js +0 -1
  76. package/dist/scripts/2548-f2a5958159.chunk.js +0 -1
  77. package/dist/scripts/2998-ed2a612f50.chunk.js +0 -1
  78. package/dist/scripts/35-ddade9da12.chunk.js +0 -1
  79. package/dist/scripts/376-16d0d5c7fe.chunk.js +0 -1
  80. package/dist/scripts/3969-5585d517d7.chunk.js +0 -1
  81. package/dist/scripts/4523-befa1c95fa.chunk.js +0 -1
  82. package/dist/scripts/5286-ff323ac9a4.chunk.js +0 -1
  83. package/dist/scripts/5698-b2bf4d1d48.chunk.js +0 -1
  84. package/dist/scripts/5707-a14bfb1cf4.chunk.js +0 -1
  85. package/dist/scripts/6963-bb36f098b6.chunk.js +0 -1
  86. package/dist/scripts/7071-666cb9ad06.chunk.js +0 -1
  87. package/dist/scripts/7471-66a3ac412d.chunk.js +0 -1
  88. package/dist/scripts/9267-93c60091a6.chunk.js +0 -1
  89. /package/dist/scripts/{1601-0550afd76f.chunk.js.LICENSE.txt → 1601-b0af727472.chunk.js.LICENSE.txt} +0 -0
  90. /package/dist/scripts/{61-0f468de54f.chunk.js.LICENSE.txt → 61-8487d036e5.chunk.js.LICENSE.txt} +0 -0
  91. /package/dist/scripts/{6673-9c020ef1e9.chunk.js.LICENSE.txt → 6673-012b6a34e6.chunk.js.LICENSE.txt} +0 -0
  92. /package/dist/scripts/{bundle-8d08568d30.min.js.LICENSE.txt → bundle-ef4f6966cb.min.js.LICENSE.txt} +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@clickview/library-editor",
3
3
  "description": "Library Editor",
4
- "version": "1.35.0-rc.1",
4
+ "version": "1.35.0-rc.3",
5
5
  "main": "dist/scripts/bundle.js",
6
6
  "types": "dist/projects/library-editor/src/index.d.ts",
7
7
  "scripts": {
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1703],{74250:function(e,t,n){"use strict";n.d(t,{z:function(){return m}});var i=n(48088),o=n(57857),r=n(31647),a=n(88172),l=n(93569),s=n(40622),u=n(99724),c=n.n(u),f={saveButton:"G_FDK",undo:"dcV70"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t,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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,v(i.key),i)}}function v(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==d(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===d(t)?t:String(t)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(g,e);var t,n,u,v,m=(u=g,v=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(u);if(v){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),m.call(this,e)}return t=g,(n=[{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 i.Radio.channel(this.options.channelName)}},{key:"getSaveChannelName",value:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .undo":"onUndo"}}},{key:"initialize",value:function(){this.model||(this.model=new r.Q.Hn(h(h({},a.ZV.ShowSpinner,this.options.showSpinner),a.ZV.Disabled,this.options.isDisabled)));var e=this.options.channelName;this.listenTo(e,s.NT.DisableSave,this.onDisableSave),this.listenTo(e,s.NT.EnableSave,this.onEnableSave),this.listenTo(e,s.NT.CancelSave,this.onCancelSave);var t=i.Radio.channel(this.getSaveChannelName());this.listenTo(t,s.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(s.NT.Undo)}},{key:"onSave",value:function(){this.model.set(a.ZV.ShowSpinner,!0),this.getParentChannel().trigger(s.NT.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:f}}},{key:"renderSaveButton",value:function(){var e=new a.Py({saveEvent:s.NT.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:o.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(f.saveButton),spinnerOptions:{size:l.Ey.Small,type:l.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),g}(r.Q.wA)},66481:function(e,t,n){"use strict";n.r(t),n.d(t,{EditClipView:function(){return K}});var i=n(48088),o=n(39479),r=n(25417),a=n(99748),l=n(11306),s=n(21679),u=n(57857),c=n(99249),f=n(31647),d=n(52076),h=n(70065),p=n(13156),v=n(57085),y=n(93479),b=n(29457),m=n(610),g=n(48404),w=n(19226),k=n(93569),S=n(88483),O=n(2772),C=n(72998),E=n(74250),P=n(47122),j=n.n(P);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 N(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==T(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==T(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===T(o)?o:String(o)),i)}var o}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=R(i);if(o){var n=R(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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)}(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"EditClipDetailsComponent"}},{key:"className",get:function(){return"edit-clip-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editClipDetails"}},{key:"template",get:function(){return j()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:y.OV.LIBRARY_EDITOR,action:y.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id"),this.model.get("typeId")]}}}},{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}}}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new E.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new E.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 C.J({model:this.model,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new O.Z({model:this.model,thumbnail:k.M2.getThumbnail(this.model),thumbnailOptions:{size:S.h2.Medium},duration:k.M2.getDuration(this.model),durationNewStyle:!0}))}},{key:"viewOptions",value:function(){return{editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:k.M2.isExchangeVideo(this.model)}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail()}}])&&N(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(f.Q.wA),D=n(40622),V=n(53854),B=n(75535),M=n(95061),I=n(57785),L=n(50814),U=n.n(L);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 Q(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==A(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==A(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===A(o)?o:String(o)),i)}var o}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}var K=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}(E,e);var t,n,S,O,C=(S=E,O=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=z(S);if(O){var n=z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===A(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function E(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),(t=C.call(this,e)).editable=!1,t}return t=E,n=[{key:"name",get:function(){return"EditClipView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editClip"}},{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.clipId)}},{key:"template",get:function(){return U()}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1,partialLoading:b.LP.Breadcrumbs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:b.LP.EditVideoDetails}}}},{key:"initialize",value:function(){this.navLock=s.u.getInstance(y.K9.NavLock,this),this.initDataListeners(),k.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=s.u.getInstance(y.Or.Video,this),this.alertService=s.u.getInstance(y.K9.Alerts,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,f.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.CLIPS,":").concat(this.options.clipId,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.CLIPS,":").concat(this.options.clipId,":error"),this.onError),this.listenTo(this.channelName,D.NT.Save,this.onSave),this.listenTo(this.channelName,D.NT.Undo,this.onUndo)}},{key:"onError",value:function(e){switch(e.type){case a.h.NotFound:f.Q.Ry.throw(new B.l);break;case a.h.Forbidden:f.Q.Ry.throw(new V.a)}}},{key:"saveVideo",value:function(e,t){var n=this,i=e.dataChanges;if(o.isEmpty(i))t(e);else{var r=Object.assign(Object.assign({},e.dataChanges),{status:0});this.videoDataService.updateClip(this.model.get("id"),this.folder.get("id"),r,(function(i){n.videoDataService.clearVideoCache(),e.updatedVideo=o.extend({},e.updatedVideo||{},i),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(D.NT.DisableSave),this.logEditAction(e.dataChanges,h.eu.Save);var t=p.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Clip was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(D.NT.CancelSave),!1;var e=I.xC.getChanges(this.model,this.viewModel),t=I.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!o.keys(t).length)return this.updateSaveButton(D.NT.CancelSave),!1;var n=new f.Q.dM;return this.editable&&n.useAsync(o.bind(this.saveVideo,this)),n.useAsync(o.bind(this.afterSave,this)),n.goAsync({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new k.Mr({title:u.T.getPhrase(this.lang,"undoTitle"),text:u.T.getPhrase(this.lang,"undoBody",{clipName:this.model.get("name")}),buttons:[{text:u.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:u.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},h.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),I.xC.updateModelState(this.model,this.viewModel,e),c.r.clear(this.viewModelName),this.getViewModel(),this.renderContent()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).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:"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(!I.xC.getChanges(this.model,this.viewModel)&&!o.keys(I.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(D.NT.DisableSave);this.lockNav(),this.updateSaveButton(D.NT.EnableSave)}else this.updateSaveButton(D.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=i.Radio.channel(this.channelName),n=D.NT.EnableSave,o=D.NT.DisableSave,r=D.NT.CancelSave;switch(e){case n:return void t.trigger(n);case o:return void t.trigger(o);case r:return void t.trigger(r)}f.Q.Ry.throw(new l.H("Save action type is not valid."))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);d.k.logUserAction(n,{actionType:h.Vw.Edit,entity:h.py.Clip,location:h.LZ.EditClipDetails,workflowPhase:t})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:m.b}),this.editable&&this.viewModel.addValidation(I.Zl),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange)}},{key:"fetchData",value:function(){this.model=this.videoDataService.getClip(this.options.clipId),this.model&&(this.editable=k.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.viewModel instanceof m.b||this.getViewModel())}},{key:"requiredResources",get:function(){return{config:g.p.config,currentUser:w.K.currentUser,libraries:M.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.viewModel}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.showChildView("breadcrumbs",new v.n({folder:this.folder,libraries:this.libraries,video:this.model,enableLastItemAppLink:!1}))}},{key:"renderContent",value:function(){var e=I.xC.getChanges(this.model,this.viewModel)||o.keys(I.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new _({model:this.viewModel,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderContent()}}],n&&Q(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),E}(f.Q.G7)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return C}});var i=n(31647),o=n(93479),r=n(22557),a=n(86363),l=n.n(a);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===s(o)?o:String(o)),i)}var o}function f(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}var y=function(e){d(n,e);var t=p(n);function n(){return u(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return l()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}]),n}(i.Q.wA),b=function(e){d(n,e);var t=p(n);function n(){return u(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return y}}]),n}(i.Q.$W),m=n(93933),g=n.n(m);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function k(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==w(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==w(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===w(o)?o:String(o)),i)}var o}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(u,e);var t,n,a,l,s=(a=u,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(a);if(l){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),s.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return g()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var e=this;this.breadcrumbCollection=new i.Q.FE([]);var t,n=this.options.folder;do{if(!n)break;if(t=r.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!t),{at:0}),!t)break;n=t}while(t);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:o.OV.LIBRARY_EDITOR,action:o.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(t){return e.breadcrumbCollection.add(t)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?o.eX.LibraryEditor.FOLDER:o.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:o.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new b({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&k(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.Q.wA)},47122:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({1:function(e,t,n,i,o){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info rounded fw-semibold">\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(2,o,0),inverse:e.program(4,o,0),data:o}))?r:"")+" </p>\n"},2:function(e,t,n,i,o){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:o}))?r:"")+"\n"},4:function(e,t,n,i,o){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:o}))?r:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,o){var r;return e.propertyIsEnumerable,'<div class="row">\n <div class="left-pane col-4">\n <div class="thumbnail-region"></div>\n </div>\n <div class="right-pane col-8">\n'+(null!=(r=n.unless.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?r:"")+' <div class="top-save-region"></div>\n <div class="basic-info-region mb-4"></div> \n <div class="bottom-save-region"></div>\n </div>\n</div>'},useData:!0})},99724:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({1:function(e,t,n,i,o){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-muted mx-2 undo '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.undo:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"undo",{name:"lang",hash:{},data:o}))+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,o){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,o,0),inverse:e.noop,data:o}))?r:"")+'<div class="save-region"></div>'},useData:!0})},50814:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,o){var r;return e.propertyIsEnumerable,'<div class="row pb-3 border-bottom">\n <h1 class="h3">'+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:o}):r)+'</h1>\n\n <div class="breadcrumbs-region"></div>\n</div>\n<div class="edit-content-region"></div>'},useData:!0})},86363:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({1:function(e,t,n,i,o){var r;return e.propertyIsEnumerable,'<span class="fw-bolder">'+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:o}):r)+"</span>\n"},3:function(e,t,n,i,o){var r;return e.propertyIsEnumerable,"<a>"+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:o}):r)+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,o){var r;return e.propertyIsEnumerable,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isActive:r,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?r:""},useData:!0})},93933:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,o){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1876],{74250:function(e,t,n){"use strict";n.d(t,{z:function(){return m}});var i=n(48088),o=n(57857),r=n(31647),a=n(88172),s=n(93569),l=n(40622),u=n(99724),c=n.n(u),f={saveButton:"G_FDK",undo:"dcV70"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t,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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,v(i.key),i)}}function v(e){var t=function(e,t){if("object"!==d(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==d(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===d(t)?t:String(t)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(g,e);var t,n,u,v,m=(u=g,v=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(u);if(v){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),m.call(this,e)}return t=g,(n=[{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 i.Radio.channel(this.options.channelName)}},{key:"getSaveChannelName",value:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .undo":"onUndo"}}},{key:"initialize",value:function(){this.model||(this.model=new r.Q.Hn(h(h({},a.ZV.ShowSpinner,this.options.showSpinner),a.ZV.Disabled,this.options.isDisabled)));var e=this.options.channelName;this.listenTo(e,l.NT.DisableSave,this.onDisableSave),this.listenTo(e,l.NT.EnableSave,this.onEnableSave),this.listenTo(e,l.NT.CancelSave,this.onCancelSave);var t=i.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:f}}},{key:"renderSaveButton",value:function(){var e=new a.Py({saveEvent:l.NT.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:o.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(f.saveButton),spinnerOptions:{size:s.Ey.Small,type:s.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),g}(r.Q.wA)},18007:function(e,t,n){"use strict";n.r(t),n.d(t,{EditInteractiveView:function(){return K}});var i=n(48088),o=n(39479),r=n(25417),a=n(99748),s=n(11306),l=n(21679),u=n(57857),c=n(99249),f=n(31647),d=n(52076),h=n(70065),p=n(13156),v=n(57085),y=n(93479),b=n(29457),m=n(88748),g=n(48404),w=n(19226),k=n(93569),S=n(88483),E=n(2772),O=n(72998),C=n(74250),T=n(49965),P=n.n(T);function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function N(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==j(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==j(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===j(o)?o:String(o)),i)}var o}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}(a,e);var t,n,i,o,r=(i=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=x(i);if(o){var n=x(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===j(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"EditInteractiveDetailsComponent"}},{key:"className",get:function(){return"edit-interactive-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editInteractiveDetails"}},{key:"template",get:function(){return P()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:y.OV.LIBRARY_EDITOR,action:y.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id"),this.model.get("typeId")]}}}},{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}}}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new C.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new C.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 O.J({model:this.model,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new E.Z({model:this.model,thumbnail:k.M2.getThumbnail(this.model),thumbnailOptions:{size:S.h2.Medium},duration:k.M2.getDuration(this.model),durationNewStyle:!0}))}},{key:"viewOptions",value:function(){return{editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:k.M2.isExchangeVideo(this.model)}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail()}}])&&N(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(f.Q.wA),V=n(40622),I=n(53854),D=n(75535),B=n(95061),M=n(57785),L=n(44665),A=n.n(L);function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function Q(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==U(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==U(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===U(o)?o:String(o)),i)}var o}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}var K=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}(C,e);var t,n,S,E,O=(S=C,E=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=z(S);if(E){var n=z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function C(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,C),(t=O.call(this,e)).editable=!1,t}return t=C,n=[{key:"name",get:function(){return"EditInteractiveView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editInteractive"}},{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.interactiveId)}},{key:"template",get:function(){return A()}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1,partialLoading:b.LP.Breadcrumbs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:b.LP.EditVideoDetails}}}},{key:"initialize",value:function(){this.navLock=l.u.getInstance(y.K9.NavLock,this),this.initDataListeners(),k.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=l.u.getInstance(y.Or.Video,this),this.alertService=l.u.getInstance(y.K9.Alerts,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,f.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.INTERACTIVES,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.INTERACTIVES,":").concat(this.options.interactiveId,":error"),this.onError),this.listenTo(this.channelName,V.NT.Save,this.onSave),this.listenTo(this.channelName,V.NT.Undo,this.onUndo)}},{key:"onError",value:function(e){switch(e.type){case a.h.NotFound:f.Q.Ry.throw(new D.l);break;case a.h.Forbidden:f.Q.Ry.throw(new I.a)}}},{key:"saveVideo",value:function(e,t){var n=this,i=e.dataChanges;if(o.isEmpty(i))t(e);else{var r=Object.assign(Object.assign({},e.dataChanges),{status:0});this.videoDataService.updateInteractive(this.model.get("id"),this.folder.get("id"),r,(function(i){n.videoDataService.clearVideoCache(),e.updatedVideo=o.extend({},e.updatedVideo||{},i),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(V.NT.DisableSave),this.logEditAction(e.dataChanges,h.eu.Save);var t=p.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Interactive was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(V.NT.CancelSave),!1;var e=M.xC.getChanges(this.model,this.viewModel),t=M.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!o.keys(t).length)return this.updateSaveButton(V.NT.CancelSave),!1;var n=new f.Q.dM;return this.editable&&n.useAsync(o.bind(this.saveVideo,this)),n.useAsync(o.bind(this.afterSave,this)),n.goAsync({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new k.Mr({title:u.T.getPhrase(this.lang,"undoTitle"),text:u.T.getPhrase(this.lang,"undoBody",{interactiveName:this.model.get("name")}),buttons:[{text:u.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:u.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},h.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),M.xC.updateModelState(this.model,this.viewModel,e),c.r.clear(this.viewModelName),this.getViewModel(),this.renderContent()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).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:"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(!M.xC.getChanges(this.model,this.viewModel)&&!o.keys(M.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(V.NT.DisableSave);this.lockNav(),this.updateSaveButton(V.NT.EnableSave)}else this.updateSaveButton(V.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=i.Radio.channel(this.channelName),n=V.NT.EnableSave,o=V.NT.DisableSave,r=V.NT.CancelSave;switch(e){case n:return void t.trigger(n);case o:return void t.trigger(o);case r:return void t.trigger(r)}f.Q.Ry.throw(new s.H("Save action type is not valid."))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);d.k.logUserAction(n,{actionType:h.Vw.Edit,entity:h.py.Interactive,location:h.LZ.EditInteractiveVideoDetails,workflowPhase:t})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:m.v}),this.editable&&this.viewModel.addValidation(M.B9),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange)}},{key:"fetchData",value:function(){this.model=this.videoDataService.getInteractive(this.options.interactiveId),this.model&&(this.editable=k.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.viewModel instanceof m.v||this.getViewModel())}},{key:"requiredResources",get:function(){return{config:g.p.config,currentUser:w.K.currentUser,libraries:B.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.viewModel}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.showChildView("breadcrumbs",new v.n({folder:this.folder,libraries:this.libraries,video:this.model,enableLastItemAppLink:!1}))}},{key:"renderContent",value:function(){var e=M.xC.getChanges(this.model,this.viewModel)||o.keys(M.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new _({model:this.viewModel,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderContent()}}],n&&Q(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),C}(f.Q.G7)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return O}});var i=n(31647),o=n(93479),r=n(22557),a=n(86363),s=n.n(a);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==l(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===l(o)?o:String(o)),i)}var o}function f(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return 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)}(this,n)}}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}var y=function(e){d(n,e);var t=p(n);function n(){return u(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return s()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}]),n}(i.Q.wA),b=function(e){d(n,e);var t=p(n);function n(){return u(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return y}}]),n}(i.Q.$W),m=n(93933),g=n.n(m);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function k(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==w(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==w(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===w(o)?o:String(o)),i)}var o}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(u,e);var t,n,a,s,l=(a=u,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=E(a);if(s){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),l.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return g()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var e=this;this.breadcrumbCollection=new i.Q.FE([]);var t,n=this.options.folder;do{if(!n)break;if(t=r.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!t),{at:0}),!t)break;n=t}while(t);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:o.OV.LIBRARY_EDITOR,action:o.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(t){return e.breadcrumbCollection.add(t)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?o.eX.LibraryEditor.FOLDER:o.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:o.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new b({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&k(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.Q.wA)},49965:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({1:function(e,t,n,i,o){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info rounded fw-semibold">\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(2,o,0),inverse:e.program(4,o,0),data:o}))?r:"")+" </p>\n"},2:function(e,t,n,i,o){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:o}))?r:"")+"\n"},4:function(e,t,n,i,o){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:o}))?r:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,o){var r;return e.propertyIsEnumerable,'<div class="row">\n <div class="left-pane col-4">\n <div class="thumbnail-region"></div>\n </div>\n <div class="right-pane col-8">\n'+(null!=(r=n.unless.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?r:"")+' <div class="top-save-region"></div>\n <div class="basic-info-region mb-4"></div> \n <div class="bottom-save-region"></div>\n </div>\n</div>'},useData:!0})},99724:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({1:function(e,t,n,i,o){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-muted mx-2 undo '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.undo:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"undo",{name:"lang",hash:{},data:o}))+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,o){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,o,0),inverse:e.noop,data:o}))?r:"")+'<div class="save-region"></div>'},useData:!0})},44665:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,o){var r;return e.propertyIsEnumerable,'<div class="row pb-3 border-bottom">\n <h1 class="h3">'+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:o}):r)+'</h1>\n\n <div class="breadcrumbs-region"></div>\n</div>\n<div class="edit-content-region"></div>'},useData:!0})},86363:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({1:function(e,t,n,i,o){var r;return e.propertyIsEnumerable,'<span class="fw-bolder">'+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:o}):r)+"</span>\n"},3:function(e,t,n,i,o){var r;return e.propertyIsEnumerable,"<a>"+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:o}):r)+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,o){var r;return e.propertyIsEnumerable,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isActive:r,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?r:""},useData:!0})},93933:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,o){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2548],{59054:function(e,t,n){"use strict";var o;n.d(t,{f:function(){return o}}),function(e){e.Share="share",e.MasterObject="masterobject"}(o||(o={}))},47022:function(e,t,n){"use strict";n.d(t,{Q:function(){return h}});var o=n(39479),i=n(31647),r=n(52076),l=n(70065),c=n(99186),a=n.n(c);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function f(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==s(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(y,e);var t,n,i,c,h=(i=y,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(i);if(c){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function y(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),h.call(this,e)}return t=y,(n=[{key:"defaults",get:function(){return{cursors:{},cursorParamName:"cursor"}}},{key:"name",get:function(){return"PaginationComponent"}},{key:"template",get:function(){return a()}},{key:"lang",get:function(){return"shared._pagination"}},{key:"appLinks",get:function(){var e={};if(!this.options.cursors)return{};if(this.options.cursors.previous){var t=this.options.cursors.previous,n=this.buildCursor(this.options.cursors.previous);+t<=1&&!0!==this.options.allowFirstPageCursor&&delete n.params.cursor,e[".previous-applink"]=n}return this.options.cursors.next&&(e[".next-applink"]=this.buildCursor(this.options.cursors.next)),e}},{key:"events",value:function(){return{"click .previous-applink":"onClickPrevious","click .next-applink":"onClickNext"}}},{key:"buildCursor",value:function(e){return{application:this.options.appLink.application,action:this.options.appLink.action,args:this.options.appLink.args,params:o.extend({},this.options.appLink.params,(t={},n=this.options.cursorParamName,i=e,(n=f(n))in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t))};var t,n,i}},{key:"onClickPrevious",value:function(){this.logAction("previous")}},{key:"onClickNext",value:function(){this.logAction("next")}},{key:"logAction",value:function(e){var t=r.k.mergeOptions(this.options.analyticsOptions,{location:l.LZ.Pagination,entity:l.py.Pagination,actionType:l.Vw.Navigate}),n={id:this.options.collectionId,page:e};r.k.logUserAction(n,t)}},{key:"viewOptions",value:function(){return{cursors:this.options.cursors}}},{key:"onBeforeRender",value:function(){return!!this.options.cursors}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),y}(i.Q.wA)},27719:function(e,t,n){"use strict";n.r(t),n.d(t,{FolderView:function(){return Ge},SeriesView:function(){return $e}});var o=n(99748),i=n(21679),r=n(57857),l=n(31647),c=n(59054),a=n(36357),s=n(25692),u=n(47022),f=n(77502),p=n(98985),d=n(70763),h=n(58688),y=n(80867),v=n(93479),b=n(29457),m=n(3059),g=n(60602),w=n(51174),k=n(48404),O=n(64649),S=n(19226),E=n(93569),C=n(70065),P=n(24828),I=n(22231),j=n(51785),x=n(85552),R=n.n(x),_=n(21625);function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function L(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==V(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==V(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===V(i)?i:String(i)),o)}var i}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}var D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T(e,t)}(l,e);var t,n,o,i,r=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=B(o);if(i){var n=B(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),r.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"BannerComponent"}},{key:"className",get:function(){var e=(0,I.x)(this.model.get("name"),P.o);return"px-3 position-relative rounded-top ".concat(_.Z.banner," ").concat(e)}},{key:"regions",value:function(){return{options:{el:".options-region",replaceElement:!0}}}},{key:"attributes",get:function(){var e=E.jw.createBannerUrl(this.model.banner);return e?{style:"background-image: url('".concat(e,"')")}:null}},{key:"template",get:function(){return R()}},{key:"renderActions",value:function(){this.showChildView("options",new j.c({model:this.model,extraClasses:"".concat(_.Z.actions," rounded-circle me-2 mt-2"),buttonClass:"text-light",analyticsOptions:{location:C.LZ.Banner}}))}},{key:"onRender",value:function(){this.renderActions()}}])&&L(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(l.Q.wA),A=n(4705),M=n(63791),F=n(87002),N=n(73368),H=n.n(N),U={svgContainer:"mMWNm",caretClosed:"Fe74o"};function Q(e){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(e)}function W(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K(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,(void 0,i=function(e,t){if("object"!==Q(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==Q(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===Q(i)?i:String(i)),o)}var i}function Y(e,t,n){return t&&K(e.prototype,t),n&&K(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function z(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X(e,t)}function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=G(e);if(t){var i=G(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===Q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}var $="has:expanded:library:folders",J=function(e){z(n,e);var t=Z(n);function n(){return W(this,n),t.apply(this,arguments)}return Y(n,[{key:"name",get:function(){return"SubFoldersCollectionView"}},{key:"className",get:function(){return"row px-2"}},{key:"childView",get:function(){return F.Y}},{key:"childViewOptions",get:function(){return{location:"subfolder"}}}]),n}(l.Q.$W),q=function(e){z(n,e);var t=Z(n);function n(e){return W(this,n),t.call(this,e)}return Y(n,[{key:"initialize",value:function(){this.forceExpanded=this.options.forceExpanded||this.collection.length<=6,this.forceExpanded?this.isExpanded=!0:this.isExpanded=A.SG.get($)||!1}},{key:"name",get:function(){return"SubFoldersView"}},{key:"className",get:function(){return"container-fluid pb-3"}},{key:"lang",get:function(){return"libraryEditor.subfolders"}},{key:"template",get:function(){return H()}},{key:"events",value:function(){return{"click .expand-toggle":"onClickExpandToggle"}}},{key:"regions",value:function(){return{subFolders:{replaceElement:!0,el:".subfolders-region"}}}},{key:"onClickExpandToggle",value:function(){this.options.forceExpanded||(this.isExpanded=!this.isExpanded,A.SG.set($,this.isExpanded),this.render())}},{key:"viewOptions",value:function(){return{styles:U,caretSvg:M.Nj.getSvg(M.vn.Caret),isExpanded:this.isExpanded,forceExpanded:this.forceExpanded,caretClass:this.isExpanded?"":U.caretClosed,count:this.collection.length}}},{key:"onRender",value:function(){this.showChildView("subFolders",new J({collection:this.isExpanded?this.collection:new l.Q.FE(this.collection.first(6))}))}}]),n}(l.Q.wA),ee=n(57085),te=n(8420),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,(void 0,i=function(e,t){if("object"!==oe(e)||null===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)}(o.key),"symbol"===oe(i)?i:String(i)),o)}var i}function re(e,t){return re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},re(e,t)}function le(e){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(e)}var ce=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&re(e,t)}(l,e);var t,n,o,i,r=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=le(o);if(i){var n=le(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),r.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"VideoListHeaderComponent"}},{key:"template",get:function(){return ne()}},{key:"className",get:function(){return this.options.folder?"px-3 mb-3":"mb-3"}},{key:"props",get:function(){return["collectionIdentifier"]}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1}}}},{key:"renderBreadcrumbs",value:function(){this.options.folder&&this.options.libraries&&this.showChildView("breadcrumbs",new ee.n({folder:this.options.folder,libraries:this.options.libraries}))}},{key:"onBeforeRender",value:function(){return!!this.options.folder}},{key:"onRender",value:function(){this.renderBreadcrumbs()}}])&&ie(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(l.Q.wA),ae=n(52076),se=n(50028),ue=n(71641),fe=n(40622),pe=n(34670),de=n.n(pe);function he(e){return he="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},he(e)}function ye(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==he(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==he(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===he(i)?i:String(i)),o)}var i}function ve(e,t){return ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ve(e,t)}function be(e){return be=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},be(e)}var me=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ve(e,t)}(a,e);var t,n,o,i,c=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=be(o);if(i){var n=be(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===he(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),c.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){this.getViewModel(),this.bindListeners()}},{key:"getViewModel",value:function(){var e=this.options.collectionIdentifier.toString();this.model=E.S0.GetViewModel(e,fe.De.VIDEO_LIST)}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change",this.render),this.listenTo(this.collection,"remove",this.render)}},{key:"name",get:function(){return"BulkVideoActionsComponent"}},{key:"template",get:function(){return de()}},{key:"lang",get:function(){return"shared.bulkVideoActions"}},{key:"regions",value:function(){return{dropdownItems:{replaceElement:!0,el:".dropdown-menu-region"}}}},{key:"getSelectedIds",value:function(){return E.S0.GetSelectedIds({key:this.options.collectionIdentifier.toString(),type:fe.De.VIDEO_LIST,collection:this.collection,excludePredicate:function(e){return e.get("status")===se.X.Processing}})}},{key:"getActions",value:function(){if(this.options.collectionIdentifier){var e=this.getSelectedIds();return new l.Q.FE([{title:r.T.getPhrase(this.lang,"move",{smartCount:e.length}),appLink:{application:this.options.application,action:v.eX.Shared.MOVE_VIDEOS,args:[e.join(","),this.options.collectionIdentifier.id]},analyticsOptions:ae.k.mergeOptions(this.options.analyticsOptions,{actionType:C.Vw.Move,workflowPhase:C.eu.Start})},{title:r.T.getPhrase(this.lang,"remove",{smartCount:e.length}),appLink:{application:v.OV.LIBRARY_EDITOR,action:v.eX.Shared.DELETE_VIDEOS,args:[this.options.collectionIdentifier.id,e.join(",")]},analyticsOptions:ae.k.mergeOptions(this.options.analyticsOptions,{actionType:C.Vw.Delete,workflowPhase:C.eu.Start}),classes:"text-danger"}])}}},{key:"viewOptions",value:function(){return{enabled:this.getSelectedIds().length}}},{key:"onRender",value:function(){this.showChildView("dropdownItems",new ue.w({displayOptions:{alignment:"end"},channelName:"".concat(this.name).concat(this.cid),collection:this.getActions(),analyticsHelper:ae.k}))}}])&&ye(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(l.Q.wA),ge=n(12542),we=n(39479),ke=n(53370),Oe=n.n(ke);function Se(e){return Se="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},Se(e)}function Ee(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,(void 0,i=function(e,t){if("object"!==Se(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==Se(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===Se(i)?i:String(i)),o)}var i}function Ce(e,t){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ce(e,t)}function Pe(e){return Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pe(e)}var Ie=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ce(e,t)}(c,e);var t,n,o,i,r=(o=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Pe(o);if(i){var n=Pe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),r.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.getViewModel(),this.setSort(),this.bindListeners(),this.initializeCollection()}},{key:"getViewModel",value:function(){this.model=E.x$.GetSortViewModel()}},{key:"setSort",value:function(){var e=this.options.collectionIdentifier.sort;if(e!==this.model.get("sortType")){var t=E.x$.CreateSortObject(e);this.model.set(t)}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"sort:selected",this.onSortSelected)}},{key:"initializeCollection",value:function(){this.collection||(this.collection=E.x$.CreateSortCollection(this.options.allowClipsInteractives))}},{key:"name",get:function(){return"SortSelectComponent"}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-menu-region",replaceElement:!0}}}},{key:"template",get:function(){return Oe()}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"position-relative"}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){this.logAction(C.eu.Start)}},{key:"onSortSelected",value:function(e){this.model.set(e.toJSON()),this.render(),this.logAction(C.eu.Complete)}},{key:"logAction",value:function(e){var t=ae.k.mergeOptions(this.options.analyticsOptions,{actionType:C.Vw.Sort,workflowPhase:e}),n={id:this.options.collectionIdentifier.id,sort:this.model.get("name")};ae.k.logUserAction(n,t)}},{key:"onRender",value:function(){var e=this,t=this.collection.filter((function(t){return t.get("name")!==e.model.get("name")})),n=new l.Q.FE(we.map(t,(function(t){var n=t.toJSON();return n.appLink={application:e.options.appLink.application,action:e.options.appLink.action,args:[e.options.collectionIdentifier.id],params:{sort:t.get("sortName")}},n})));this.showChildView("dropdown",new ue.w({collection:n,channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"sort:selected"},displayOptions:{alignment:"end"},analyticsHelper:ae.k}))}}])&&Ee(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(l.Q.wA),je=n(56846),xe=n.n(je);function Re(e){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Re(e)}function _e(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,(void 0,i=function(e,t){if("object"!==Re(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==Re(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===Re(i)?i:String(i)),o)}var i}function Ve(e,t){return Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ve(e,t)}function Le(e){return Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Le(e)}var Te=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ve(e,t)}(l,e);var t,n,o,i,r=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Le(o);if(i){var n=Le(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===Re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),r.call(this,e)}return t=l,(n=[{key:"initialize",value:function(){this.analyticsOptions=ae.k.mergeOptions(this.options.analyticsOptions,{location:C.LZ.VideoListHeader})}},{key:"name",get:function(){return"VideoListSubheadingComponent"}},{key:"template",get:function(){return xe()}},{key:"className",get:function(){return"px-3"}},{key:"lang",get:function(){return"libraryEditor.videoListSubheading"}},{key:"props",get:function(){return["collectionIdentifier"]}},{key:"regions",value:function(){return{checkAll:{el:".check-all-region",replaceElement:!1},bulkActions:{el:".bulk-actions-region",replaceElement:!0},sorting:{el:".sorting-region",replaceElement:!0}}}},{key:"renderCheckAll",value:function(){this.options.allowBulk&&this.showChildView("checkAll",new ge.Y({className:"float-start",key:this.collectionIdentifier.toString(),type:fe.De.VIDEO_LIST,numberOfItems:this.collection.length}))}},{key:"renderBulkActions",value:function(){this.options.allowBulk&&this.showChildView("bulkActions",new me({collection:this.collection,collectionIdentifier:this.collectionIdentifier,application:this.options.application,analyticsOptions:ae.k.mergeOptions(this.options.analyticsOptions,{descriptor:C.yh.Bulk,location:C.LZ.VideoListHeader,entity:C.py.Video,workflowPhase:C.eu.Start})}))}},{key:"renderSorting",value:function(){this.showChildView("sorting",new Ie({allowClipsInteractives:this.options.allowClipsInteractives,collectionIdentifier:this.collectionIdentifier,analyticsOptions:this.analyticsOptions,appLink:{application:this.options.application,action:this.options.action}}))}},{key:"viewOptions",value:function(){return{showBulkActions:this.options.allowBulk&&this.collection.length>0,showHeading:this.options.showHeading}}},{key:"onBeforeRender",value:function(){return!(this.collection.length<=0)}},{key:"onRender",value:function(){this.renderCheckAll(),this.renderBulkActions(),this.renderSorting()}}])&&_e(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(l.Q.wA),Be=n(26457),De=n(56906),Ae=n(95061),Me=n(93089),Fe=n.n(Me);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 He(){return He="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xe(e)););return e}(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},He.apply(this,arguments)}function Ue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qe(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,(void 0,i=function(e,t){if("object"!==Ne(e)||null===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)}(o.key),"symbol"===Ne(i)?i:String(i)),o)}var i}function We(e,t,n){return t&&Qe(e.prototype,t),n&&Qe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ke(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&&Ye(e,t)}function Ye(e,t){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ye(e,t)}function ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Xe(e);if(t){var i=Xe(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return 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)}(this,n)}}function Xe(e){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xe(e)}var Ze=function(e){Ke(n,e);var t=ze(n);function n(e){return Ue(this,n),t.call(this,e)}return We(n,[{key:"initialize",value:function(){this.bindListeners(),this.getSortType(),this.videoDataService=i.u.getInstance(v.Or.Video,this),this.libraryDataService=i.u.getInstance(v.Or.Library,this),this.pendingItemsService=i.u.getInstance(v.K9.PendingItems,this),this.localCacheDataService=i.u.getInstance(v.Or.LocalCache,this),this.playerDataService=i.u.getInstance(v.Or.Player,this),this.videoMixinService=i.u.getInstance(v.K9.VideoMixin,this),this.settingsDataService=i.u.getInstance(v.Or.Settings,this),this.createViewKey=this.createViewKey.bind(this)}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"template",get:function(){return Fe()}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"props",get:function(){return["collectionIdentifier"]}},{key:"regions",value:function(){return{banner:{el:".banner-region",replaceElement:!0,partialLoading:b.LP.Banner},header:{el:".header-region",replaceElement:!0,partialLoading:b.LP.VideoListHeader},videoList:{el:".video-list-region",replaceElement:!0,partialLoading:b.LP.VideoListWithBulkActions},childFolders:{el:".child-folders-region",replaceElement:!1,partialLoading:b.LP.SubFolder},pagination:{el:".pagination-region",replaceElement:!0},subheading:{el:".subheading-region",replaceElement:!0,partialLoading:b.LP.VideoListSubheading}}}},{key:"bindListeners",value:function(){var e=this.options.collectionIdentifier.toString();this.listenTo(v.Vk.VIDEO,"".concat(e,":sync"),this.render),this.listenTo(v.Vk.VIDEO,"".concat(v.M_.DELETE_VIDEO,":sync"),this.fetchData),this.listenTo(v.Vk.VIDEO,"cache:cleared",this.render),this.listenTo(v.Vk.RESTRICTED_VIDEO,"".concat(v.M_.RESTRICTED_OBJECTS,":").concat(e,":invalidate"),this.updateRestrictedVideos),this.listenTo(this.channelName,"cancel:pending:item",this.cancelPendingItem),this.listenTo(this.channelName,"retry:pending:item",this.retryPendingItem),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata),this.listenTo(v.Vk.LOCAL_CACHE,"".concat(v.M_.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(v.Vk.LOCAL_CACHE,"".concat(v.M_.LOCAL_CACHE_DEVICES,":error"),this.onError)}},{key:"getSortType",value:function(){this.sortType||(this.sortType=this.options.collectionIdentifier.sort)}},{key:"updateRestrictedVideos",value:function(){var e=this;this.videoMixinService.getAndMixinVideoCollectionRestrictions(this.videoCollection,this.collectionIdentifier,(function(){return e.render()}))}},{key:"cancelPendingItem",value:function(e){this.pendingItemsService.clearPendingItem(e)}},{key:"retryPendingItem",value:function(e){this.pendingItemsService.retryPendingItem(e)}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,c.f.MasterObject,t)}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&(this.videosWithMetadata=new d.t(this.videoCollection.map((function(e){return(0,w.Z)({id:e.get("id"),typeId:e.get("typeId")})}))))}},{key:"renderBanner",value:function(){var e=new D({model:this.model,channelName:this.channelName,imageCdnUrl:this.config.get("imageCdnUrl")});this.showChildView("banner",e)}},{key:"renderChildFolders",value:function(){var e;if(null===(e=this.folders)||void 0===e?void 0:e.length){var t=new q({collection:this.folders,forceExpanded:0===this.videoCollection.length});this.showChildView("childFolders",t)}}},{key:"renderHeader",value:function(){this.showChildView("header",new ce({collection:this.videoCollection,libraries:this.libraryCollection,folder:this.model instanceof g.g&&this.model}))}},{key:"renderSubheading",value:function(){var e;this.showChildView("subheading",new Te({collection:this.videoCollection,application:v.OV.LIBRARY_EDITOR,action:this.appLinkAction(),allowBulk:this.allowBulk(),collectionIdentifier:this.collectionIdentifier,analyticsOptions:this.options.analyticsOptions,showHeading:!!(null===(e=this.folders)||void 0===e?void 0:e.length),allowClipsInteractives:this.allowClipsInteractives.get("value")}))}},{key:"renderVideoList",value:function(){var e,t=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),n=new y.Y({collection:this.videoCollection,videosWithMetadata:this.videosWithMetadata,application:v.OV.LIBRARY_EDITOR,allowBulk:this.allowBulk(),collectionIdentifier:this.collectionIdentifier,config:this.config,pendingItems:this.pendingItemsService.getPendingItems(),videoItemComponentType:this.componentType,emptyStateType:this.emptyStateType(),emptyStateOptions:this.emptyStateOptions(),supportSiteUrl:this.config.get("supportSiteUrl"),collectionViewChannel:this.channelName,customerHasLocalCache:E.o8.customerHasLocalCache(this.devices,this.currentUser.get("customerId")),customerHasExchange:this.exchanges.any(),analyticsOptions:this.options.analyticsOptions,sourceMetadataOptions:{showFolder:this.showFolderSource(),libraries:this.libraryCollection},videoCollectionSource:this.getVideoCollectionSource(),currentUser:this.currentUser,playerApiUrl:this.config.get("playerApiUrl"),createViewKey:this.createViewKey,hasCursors:!!t,showEmptyState:!(null===(e=this.folders)||void 0===e?void 0:e.length),libraries:this.libraryCollection,products:this.products});this.showChildView("videoList",n)}},{key:"renderPagination",value:function(){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new u.Q({cursors:e,collectionId:this.options.collectionIdentifier.id,appLink:{application:v.OV.LIBRARY_EDITOR,action:this.appLinkAction(),args:[this.collectionIdentifier.id],params:this.collectionIdentifier.toParams()},analyticsOptions:this.options.analyticsOptions});this.showChildView("pagination",t)}},{key:"fetchData",value:function(){this.fetchModel(),this.devices=this.localCacheDataService.getDevices(this.currentUser.get("customerId")),this.fetchVideoCollection()}},{key:"fetchVideoWithMetadata",value:function(e,t){var n=this;this.videoDataService.getUnionVideo(e,t,(function(t){var o=n.videosWithMetadata.get(e);o&&(o.set(t.toJSON()),o.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:k.p.config,currentUser:S.K.currentUser,libraryCollection:Ae.T.libraries,exchanges:Ae.T.exchanges,products:O.s.products}}},{key:"onBeforeRender",value:function(){return this.allowClipsInteractives=this.settingsDataService.getSetting(this.currentUser.get("customerId"),a.E.LibraryEditorClipsInteractives),!!this.allowClipsInteractives&&(this.fetchData(),!!this.videoCollection&&(this.setVideosWithMetadata(),!!this.model))}},{key:"onRender",value:function(){this.renderBanner(),this.renderHeader(),this.renderChildFolders(),this.renderSubheading(),this.renderVideoList(),this.renderPagination()}}]),n}(l.Q.G7),Ge=function(e){Ke(n,e);var t=ze(n);function n(){return Ue(this,n),t.apply(this,arguments)}return We(n,[{key:"name",get:function(){return"FolderView"}},{key:"lang",get:function(){return"libraryEditor.folderView"}},{key:"componentType",get:function(){return h.U.Draggable}},{key:"bindListeners",value:function(){this.listenTo(v.Vk.LIBRARY,"".concat(v.M_.FOLDER,":").concat(this.options.collectionIdentifier.id,":sync libraries:sync"),this.render),this.listenTo(v.Vk.LIBRARY,"".concat(v.M_.FOLDER,":").concat(this.options.collectionIdentifier.id,":error"),this.onError),this.listenTo(v.Vk.LIBRARY,"".concat(v.M_.UPDATE_FOLDER_BANNER,":").concat(this.options.collectionIdentifier.id,":sync"),this.fetchModel),this.listenTo(v.Vk.LIBRARY,"".concat(new m.KX(this.options.collectionIdentifier.id,f.E.AtoZ),":invalidate"),this.onFoldersInvalidate),He(Xe(n.prototype),"bindListeners",this).call(this)}},{key:"onError",value:function(e){switch(e.type){case o.h.Forbidden:l.Q.Ry.throw(new De.gO);break;case o.h.NotFound:l.Q.Ry.throw(new De.Zv)}}},{key:"appLinkAction",value:function(){return v.eX.LibraryEditor.FOLDER}},{key:"allowBulk",value:function(){return!0}},{key:"emptyStateType",value:function(){return b.ub.Folder}},{key:"emptyStateOptions",value:function(){return{heading:r.T.getPhrase(this.lang,"emptyStateHeading"),description:r.T.getPhrase(this.lang,"emptyStateInfo",{url:p.o.getHybridArticle(s.s.AddFromOnline,s.b.AddFromLite),classNames:"info-link"})}}},{key:"showFolderSource",value:function(){return!1}},{key:"getVideoCollectionSource",value:function(){return Be.x_.Folder}},{key:"fetchModel",value:function(){this.model=this.libraryDataService.getFolder(this.collectionIdentifier.id)}},{key:"fetchVideoCollection",value:function(){this.videoCollection=this.allowClipsInteractives.get("value")?this.videoDataService.getCollectionVideos(this.collectionIdentifier):this.videoDataService.getOldCollectionVideos(this.collectionIdentifier)}},{key:"onFoldersInvalidate",value:function(){this.fetchFolders(null,!0)}},{key:"fetchFolders",value:function(e,t){var n=this,o=new m.KX(this.collectionIdentifier.id,f.E.AtoZ,e);this.libraryDataService.getFolders(o,(function(e){t||!n.folders?n.folders=e:n.folders.add(e.models);var i=n.libraryDataService.getFoldersCursors(o);(null==i?void 0:i.next)?n.fetchFolders(i.next):n.render()}))}},{key:"onBeforeRender",value:function(){return this.folders||this.fetchFolders(),He(Xe(n.prototype),"onBeforeRender",this).call(this)&&!!this.folders}}]),n}(Ze),$e=function(e){Ke(n,e);var t=ze(n);function n(){return Ue(this,n),t.apply(this,arguments)}return We(n,[{key:"initialize",value:function(){this.seriesDataService=i.u.getInstance(v.Or.Series,this),He(Xe(n.prototype),"initialize",this).call(this)}},{key:"name",get:function(){return"SeriesView"}},{key:"lang",get:function(){return"libraryEditor.seriesView"}},{key:"componentType",get:function(){return h.U.Base}},{key:"regions",value:function(){var e=He(Xe(n.prototype),"regions",this).call(this);return e.subheading.partialLoading=b.LP.SeriesVideoListSubheading,delete e.header.partialLoading,delete e.childFolders.partialLoading,e}},{key:"bindListeners",value:function(){this.listenTo(v.Vk.SERIES,"".concat(v.M_.SERIES,":").concat(this.options.collectionIdentifier.id,":sync"),this.render),this.listenTo(v.Vk.SERIES,"".concat(v.M_.SERIES,":").concat(this.options.collectionIdentifier.id,":error"),this.onError),He(Xe(n.prototype),"bindListeners",this).call(this)}},{key:"onError",value:function(e){e.type===o.h.NotFound&&l.Q.Ry.throw(new De.Ag)}},{key:"appLinkAction",value:function(){return v.eX.LibraryEditor.SERIES}},{key:"allowBulk",value:function(){return!1}},{key:"emptyStateType",value:function(){return b.ub.Series}},{key:"emptyStateOptions",value:function(){return{heading:r.T.getPhrase(this.lang,"emptyStateHeading"),description:r.T.getPhrase(this.lang,"emptyStateInfo",{url:p.o.getHybridArticle(s.s.AddFromOnline,s.b.AddFromLite),classNames:"info-link"})}}},{key:"showFolderSource",value:function(){return!0}},{key:"getVideoCollectionSource",value:function(){return Be.x_.Series}},{key:"fetchModel",value:function(){this.model=this.seriesDataService.getSeries(this.collectionIdentifier.id)}},{key:"fetchVideoCollection",value:function(){this.videoCollection=this.videoDataService.getSeriesVideos(this.collectionIdentifier,this.libraryCollection.pluck("id"))}}]),n}(Ze)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return E}});var o=n(31647),i=n(93479),r=n(22557),l=n(86363),c=n.n(l);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==a(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===a(i)?i:String(i)),o)}var i}function f(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var v=function(e){p(n,e);var t=h(n);function n(){return s(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return c()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}]),n}(o.Q.wA),b=function(e){p(n,e);var t=h(n);function n(){return s(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return v}}]),n}(o.Q.$W),m=n(93933),g=n.n(m);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function k(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,(void 0,i=function(e,t){if("object"!==w(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==w(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===w(i)?i:String(i)),o)}var i}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(s,e);var t,n,l,c,a=(l=s,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(l);if(c){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,e)}return t=s,(n=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return g()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var e=this;this.breadcrumbCollection=new o.Q.FE([]);var t,n=this.options.folder;do{if(!n)break;if(t=r.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!t),{at:0}),!t)break;n=t}while(t);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:i.OV.LIBRARY_EDITOR,action:i.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(t){return e.breadcrumbCollection.add(t)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?i.eX.LibraryEditor.FOLDER:i.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:i.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new b({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&k(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Q.wA)},80867:function(e,t,n){"use strict";n.d(t,{Y:function(){return C}});var o=n(31647),i=n(52076),r=n(70065),l=n(50028),c=n(80758),a=n(10101),s=n(58688),u=n(37071),f=n(93479),p=n(29457),d=n(26457),h=n(30606),y=n.n(h);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==v(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===v(i)?i:String(i)),o)}var i}function g(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function w(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=S(e);if(t){var i=S(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return function(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}var E=function(e){w(n,e);var t=O(n);function n(e){return b(this,n),t.call(this,e)}return g(n,[{key:"name",get:function(){return"VideoItemListComponent"}},{key:"childView",get:function(){return u.j}},{key:"childViewOptions",get:function(){var e=this;return function(t,n){return{componentType:t.get("status")===l.X.Processing?s.U.ProcessingVideo:e.options.videoItemComponentType,videoWithMetadata:e.options.videosWithMetadata&&e.options.videosWithMetadata.get(t.get("id")),allowBulk:e.options.allowBulk,collectionIdentifier:e.options.collectionIdentifier,application:e.options.application,pendingItems:e.options.pendingItems,config:e.options.config,sourceMetadataOptions:e.options.sourceMetadataOptions,collectionViewChannel:e.options.collectionViewChannel,customerHasLocalCache:e.options.customerHasLocalCache,customerHasExchange:e.options.customerHasExchange,customerHasCustomLibrary:e.options.customerHasCustomLibrary,analyticsOptions:e.options.analyticsOptions,videoCollectionSource:e.options.videoCollectionSource,currentUser:e.options.currentUser,playerApiUrl:e.options.playerApiUrl,createViewKey:e.options.createViewKey,isLastItem:!e.options.hasCursors&&n===e.collection.length-1,libraries:e.options.libraries,products:e.options.products}}}}]),n}(o.Q.$W),C=function(e){w(n,e);var t=O(n);function n(e){return b(this,n),t.call(this,e)}return g(n,[{key:"name",get:function(){return"VideoListView"}},{key:"props",get:function(){return["collectionIdentifier"]}},{key:"template",get:function(){return y()}},{key:"defaults",get:function(){return{videoItemComponentType:s.U.Base,allowBulk:!1,emptyState:p.ub.Default,videoCollectionSource:d.x_.Folder}}},{key:"behaviors",get:function(){var e=[{behaviorClass:a.Im,selector:".lazy-img",minBrowserSupportVersion:f.v9}];return this.options.showEmptyState&&e.push({behaviorClass:c.o,region:"videos",type:this.options.emptyStateType,componentOptions:this.options.emptyStateOptions,emptyStateComponents:f.aW}),e}},{key:"regions",value:function(){return{videos:".videos-region"}}},{key:"onRender",value:function(){var e=new E({collection:this.collection,videosWithMetadata:this.options.videosWithMetadata,videoItemComponentType:this.options.videoItemComponentType,allowBulk:this.options.allowBulk,collectionIdentifier:this.collectionIdentifier,application:this.options.application,pendingItems:this.options.pendingItems,config:this.options.config,sourceMetadataOptions:this.options.sourceMetadataOptions,collectionViewChannel:this.options.collectionViewChannel,customerHasLocalCache:this.options.customerHasLocalCache,customerHasExchange:this.options.customerHasExchange,customerHasCustomLibrary:this.options.customerHasCustomLibrary,analyticsOptions:i.k.mergeOptions(this.options.analyticsOptions,{location:r.LZ.VideoListItem,entity:r.py.Video}),videoCollectionSource:this.options.videoCollectionSource,currentUser:this.options.currentUser,playerApiUrl:this.options.playerApiUrl,createViewKey:this.options.createViewKey,hasCursors:this.options.hasCursors,libraries:this.options.libraries,products:this.options.products});this.showChildView("videos",e)}}]),n}(o.Q.wA)},99186:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,a=e.escapeExpression;return'<div class="p-3">\n <a class="btn previous-applink btn-outline-dark '+(null!=(r=n.unless.call(l,null!=(r=null!=(r=null!=t?t.options:t)?r.cursors:r)?r.previous:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">'+a((n.lang||t&&t.lang||c).call(l,"previous",{name:"lang",hash:{},data:i}))+'</a>\n <a class="btn next-applink btn-outline-dark '+(null!=(r=n.unless.call(l,null!=(r=null!=(r=null!=t?t.options:t)?r.cursors:r)?r.next:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">'+a((n.lang||t&&t.lang||c).call(l,"next",{name:"lang",hash:{},data:i}))+"</a>\n</div>"},useData:!0})},85552: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="text-white position-absolute m-0">\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</h1>\n<div class="options-region"></div>'},useData:!0})},53370: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,'<button class="btn btn-outline-dark dropdown-toggle" type="button" id="sortSelectButton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\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</button>\n<div class="dropdown-menu-region"></div>'},useData:!0})},73368:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"ps-2"},3:function(e,t,n,o,i){return"cursor-pointer"},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,c=e.escapeExpression;return' <div class="'+c(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+c(l(null!=(r=null!=t?t.options:t)?r.caretClass:r,t))+'">\n '+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.caretSvg:r,t))?r:"")+"\n </div>\n"},7:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <div class="d-flex justify-content-end justify-self-end px-2 expand-toggle">\n <span class="info-link d-inline-block">\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isExpanded:r,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.program(10,i,0),data:i}))?r:"")+" </span>\n </div>\n"},8:function(e,t,n,o,i){return e.propertyIsEnumerable," "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"seeLess",{name:"lang",hash:{},data:i}))+"\n"},10: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||{},"seeAll",{name:"lang",hash:{smartCount:null!=(r=null!=t?t.options:t)?r.count:r},data:i}))+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{},c=e.escapeExpression;return'<div class="d-flex justify-content-between align-items-center">\n <div class="d-inline-flex align-items-center mb-2 expand-toggle '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.forceExpanded:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")+'">\n'+(null!=(r=n.unless.call(l,null!=(r=null!=t?t.options:t)?r.forceExpanded:r,{name:"unless",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+' <h2 class="h4 mb-0">'+c((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"folders",{name:"lang",hash:{},data:i}))+" ("+c(e.lambda(null!=(r=null!=t?t.options:t)?r.count:r,t))+")</h2>\n </div>\n"+(null!=(r=n.unless.call(l,null!=(r=null!=t?t.options:t)?r.forceExpanded:r,{name:"unless",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\n<div class="subfolders-region"></div>'},useData:!0})},8420: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="py-3 border-bottom">\n <div class="breadcrumbs-region d-inline-flex align-items-center"></div>\n</div>'},useData:!0})},56846:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return e.propertyIsEnumerable,'<h2 class="h4">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"videos",{name:"lang",hash:{},data:i}))+"</h2>"},3:function(e,t,n,o,i){return"pt-2"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.showHeading:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\n<div class="d-flex justify-content-between align-items-center pb-2 '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.showHeading:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="d-inline-flex justify-content-start">\n <div class="check-all-region d-inline-flex align-items-center"></div>\n <div class="bulk-actions-region"></div>\n </div>\n <div class="sorting-region"></div>\n</div>'},useData:!0})},93089: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="banner-region"></div>\n<div class="header-region"></div>\n<div class="child-folders-region"></div>\n<div class="subheading-region"></div>\n<div class="video-list-region"></div>\n<div class="pagination-region"></div>'},useData:!0})},86363: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,'<span class="fw-bolder">'+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)+"</span>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<a>"+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)+"</a>\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.isActive:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:""},useData:!0})},93933: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'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})},34670:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{};return'<button\n class="dropdown-toggle btn btn-outline-dark ms-2 '+(null!=(r=n.unless.call(l,null!=(r=null!=t?t.options:t)?r.enabled:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"\n type="button"\n id="bulkActions"\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n '+(null!=(r=n.unless.call(l,null!=(r=null!=t?t.options:t)?r.enabled:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+"\n>\n "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"options",{name:"lang",hash:{},data:i}))+'\n</button>\n<div class="dropdown-menu-region"></div>'},useData:!0})},30606: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="videos-region"></div>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2998],{72998:function(e,n,t){"use strict";t.d(n,{J:function(){return M}});var o=t(48088),i=t(57857),s=t(31647),r=t(17391),l=t(29625),a=t(48726),u=t(99844),c=t(36022),p=t(93479),d=t(93569),h=t(40622),f=t(99249),m=t(63791),b=t(10101),y=t(88172),g=t(7190),v=t(73519),k=t.n(v),w=t(48242),E=t.n(w),S={button:"pEi0b",svg:"Hg4El",disabled:"q5qSy",seasonContainer:"KfwZK"};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function C(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function T(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,i=function(e,n){if("object"!==O(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!==O(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===O(i)?i:String(i)),o)}var i}function I(e,n,t){return n&&T(e.prototype,n),t&&T(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function R(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&P(e,n)}function P(e,n){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},P(e,n)}function x(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,o=N(e);if(n){var i=N(this).constructor;t=Reflect.construct(o,arguments,i)}else t=o.apply(this,arguments);return function(e,n){if(n&&("object"===O(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,t)}}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}var j=function(e){R(t,e);var n=x(t);function t(e){var o;return C(this,t),(o=n.call(this,e)).showSpinner=!1,o.disableBtn=!0,o}return I(t,[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"CreateSeasonComponent"}},{key:"template",get:function(){return k()}},{key:"className",get:function(){return"px-2"}},{key:"bindings",get:function(){return{"[name=number]":{observe:"number",setOptions:{validate:!0}}}}},{key:"regions",value:function(){return{button:{el:".button-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:b.Bp},{behaviorClass:b.fS}]}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change",this.onChange),this.listenTo(this.options.channelName,"create:season",this.onCreateSeason),this.listenTo(p.Vk.SERIES,"".concat(p.M_.CREATE_SEASON,":").concat(this.options.seriesId,":sync"),this.onSync)}},{key:"onChange",value:function(){this.disableBtn=!this.model.isValid(),this.renderButton()}},{key:"onCreateSeason",value:function(){this.disableBtn||(this.model.validate(),this.model.isValid()&&(this.showSpinner=!0,this.renderButton(),this.model.set("number",parseInt(this.model.get("number"))),o.Radio.channel(this.options.channelName).trigger("select:season",this.model.toJSON())))}},{key:"onSync",value:function(){this.disableBtn=!0,this.showSpinner=!1,this.model.clear(),this.renderButton()}},{key:"viewOptions",value:function(){return{model:this.model,show:this.options.show}}},{key:"renderButton",value:function(){this.options.show&&this.showChildView("button",new y.Py({channelName:this.options.channelName,saveEvent:"create:season",extraButtonClass:"btn btn-dark",buttonText:"Create",buttonType:"submit",showSpinner:this.showSpinner,disabled:this.disableBtn,spinnerOptions:{size:d.Ey.Small}}))}},{key:"onRender",value:function(){this.stickit(),this.renderButton()}},{key:"onClose",value:function(){this.unstickit()}}]),t}(s.Q.wA),_=function(e){R(t,e);var n=x(t);function t(e){return C(this,t),n.call(this,e)}return I(t,[{key:"initialize",value:function(){this.model.get("season.id")&&d.yV.setSelected(this.model.get("season.id"),this.collection),this.viewModel=f.r.get("".concat(this.name,":").concat(this.model.get("id"))),this.options.disabled||this.viewModel.addValidation(g.c6)}},{key:"name",get:function(){return"EditSeasonInfoComponent"}},{key:"template",get:function(){return E()}},{key:"className",get:function(){return S.seasonContainer}},{key:"lang",get:function(){return"shared.editSeasonInfo"}},{key:"events",value:function(){return{"click .dropdown-btn":"onToggleDropdown","click .dropdown-menu":"onClickPopover","click .create":"onClickCreateNewSeason","change .form-select":"onSelectOption","click .remove":"onClickRemove"}}},{key:"elements",get:function(){return{dropdownBtn:".dropdown-btn"}}},{key:"regions",value:function(){return{create:{el:".create-region",replaceElement:!0}}}},{key:"onToggleDropdown",value:function(e){this.options.disabled?e.stopPropagation():this.renderCreate()}},{key:"onClickPopover",value:function(e){e.stopPropagation()}},{key:"onClickCreateNewSeason",value:function(e){e.preventDefault(),this.showCreateForm=!0,this.renderCreate()}},{key:"onSelectOption",value:function(e){var n=e.target.value,t="-1"===n?null:this.collection.findWhere({number:+n}).toJSON();this.setButtonText(n),o.Radio.channel(this.options.channelName).trigger("select:season",t),this.showCreateForm=!1,this.render()}},{key:"onClickRemove",value:function(e){e.stopPropagation(),o.Radio.channel(this.options.channelName).trigger("select:season",null),this.showCreateForm=!1,this.render()}},{key:"setButtonText",value:function(e){if(this.options.isSuggestEdit){var n=e&&"-1"!==e?i.T.getPhrase(this.lang,"season",{number:e}):"";n&&this.getUI("dropdownBtn").text(n)}else{var t=e&&"-1"!==e?"season":"placeholder";this.getUI("dropdownBtn").text(i.T.getPhrase(this.lang,t,{number:e}))}}},{key:"renderCreate",value:function(){this.showChildView("create",new j({model:this.viewModel,channelName:this.options.channelName,show:this.showCreateForm,seriesId:this.model.get("series.id")}))}},{key:"viewOptions",value:function(){return{styles:S,disabled:this.options.disabled,seasons:this.collection.toJSON(),svgRemove:m.Nj.getSvg(m.vn.Close),showRemoveIcon:!!this.model.get("season.id")&&!this.options.isSuggestEdit}}},{key:"onRender",value:function(){this.renderCreate(),this.setButtonText(this.model.get("season.number"))}}]),t}(s.Q.wA),B=t(37571),D=t.n(B),A=t(45092);function V(e){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},V(e)}function U(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,i=function(e,n){if("object"!==V(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!==V(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===V(i)?i:String(i)),o)}var i}function F(e,n){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},F(e,n)}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}var M=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&F(e,n)}(y,e);var n,t,f,m,b=(f=y,m=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=L(f);if(m){var t=L(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return function(e,n){if(n&&("object"===V(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function y(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,y),b.call(this,e)}return n=y,(t=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"select:season",this.onSelectSeason),this.listenTo(this.options.channelName,"clear:series",this.onSeriesChange),this.listenTo(this.model,"change:series",this.onSeriesChange),this.lockSeasonAndEpisode=!this.options.editable||!this.model.get("series.id")}},{key:"name",get:function(){return"EditBasicInfoComponent"}},{key:"tagName",get:function(){return"form"}},{key:"template",get:function(){return D()}},{key:"lang",get:function(){return"shared.editBasicInfo"}},{key:"channelName",get:function(){return this.options.channelName}},{key:"className",get:function(){return"edit-basic-info"}},{key:"events",value:function(){return{submit:function(e){return e.preventDefault()}}}},{key:"elements",get:function(){return{episodeNumberField:".episode-number",seriesTypeahead:".tt-input"}}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0},ratings:{el:".ratings-region",replaceElement:!0},series:{el:".edit-series-region",replaceElement:!0},season:{el:".edit-season-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".suggest-title":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id"),this.model.get("typeId")],params:{metadata:h.pG.VideoTitle}},".suggest-description":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id"),this.model.get("typeId")],params:{metadata:h.pG.Description}},".suggest-series-title":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:h.pG.SeriesTitle}},".suggest-season-number":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:h.pG.Season}},".suggest-episode-number":{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id")],params:{metadata:h.pG.EpisodeNumber}}}}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}},"[name=description]":{observe:"description",setOptions:{validate:!0}},"[name=episodeNumber]":{observe:"episodeNumber",setOptions:{validate:!0},onSet:function(e){return e?+e:null}}}}},{key:"onSelectSeason",value:function(e){e&&this.getUI("episodeNumberField").focus(),o.Radio.channel(this.options.channelName).trigger("add:season",e)}},{key:"onSeriesChange",value:function(e){this.lockSeasonAndEpisode=!e||!e.get("id"),this.renderEditSeason();var n=this.getUI("episodeNumberField");this.lockSeasonAndEpisode?(n.attr("disabled","disabled"),n.attr("class","form-control ".concat(A.Z.disabled))):(n.removeAttr("disabled"),n.attr("class","form-control"))}},{key:"getTypeaheadConfigs",value:function(){var e=d.MK.getTypeaheadConfig(),n=d.MK.getBloodhoundConfig(),t={filterEmptySeries:!1},o=Object.assign({hideEmptyResults:!0},t),i=Object.assign({newType:p.n8.Series},t),s=Object.assign({newType:p.n8.Series,footerTemplate:r.J.getConfirmSelectionTemplate()},t);return[{name:p.n8.Series,typeaheadConfig:e,bloodhoundConfig:n,options:o},{name:"add-new",typeaheadConfig:e,bloodhoundConfig:n,options:i},{name:"empty-suggestion",typeaheadConfig:e,bloodhoundConfig:n,options:s}]}},{key:"renderSeriesTypeahead",value:function(){if(this.model.get("series")){var e=this.model.series||new s.Q.Hn;this.showChildView("series",new c.M({model:e,editable:this.options.editable,parentChannelName:this.options.channelName,inputId:"series-search",selectEvent:"select:series",placeholderText:this.options.editable?i.T.getPhrase(this.lang,"searchSeries"):"",typeaheadConfigs:this.getTypeaheadConfigs(),typeaheadOptions:{hint:!1},callbacks:{onRender:r.J.selectFirstResult,onInput:r.J.emitEventOnInput(this.options.channelName,h.NT.DetectInput,"series"),onBlur:r.J.resetAssociationOnBlur(e.toJSON())},removeEvent:"remove:series"}))}}},{key:"renderEditSeason",value:function(){var e=this;if(this.model.get("series")){var n=this.model.get("series.seasons")||new l.i,t=new l.i(n.map((function(n){return n.set("displayName",i.T.getPhrase(e.lang,"seasonNumber",{number:n.get("number")}))})));this.showChildView("season",new _({model:this.model,collection:t,channelName:this.options.channelName,disabled:!this.options.editable||this.lockSeasonAndEpisode,isSuggestEdit:!this.options.editable}))}}},{key:"renderDescription",value:function(){this.showChildView("description",new u.F({name:"description",class:"form-control ".concat(!this.options.editable&&A.Z.disabled),placeholder:this.options.editable?i.T.getPhrase(this.lang,"descriptionPlaceholder"):"",id:"edit-description",disabled:!this.options.editable}))}},{key:"renderRatings",value:function(){this.model.rating&&this.showChildView("ratings",new a.R({model:this.model.rating,collection:this.options.ratings,parentChannelName:this.options.channelName,editable:this.options.editable,videoId:this.model.get("id")}))}},{key:"viewOptions",value:function(){return{styles:A.Z,requiredFields:this.options.requiredFields,videoTitlePlaceholder:this.options.editable?i.T.getPhrase(this.lang,"titlePlaceholder"):"",editable:this.options.editable,showingSaveButton:this.options.showingSaveButton,lockEpisodeNumber:this.lockSeasonAndEpisode,episodeNumberPlaceholderText:this.options.editable?i.T.getPhrase(this.lang,"epNumberPlaceholder"):""}}},{key:"onRender",value:function(){this.renderDescription(),this.renderRatings(),this.renderSeriesTypeahead(),this.renderEditSeason(),this.stickit(),o.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),o.Validation.unbind(this)}}])&&U(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),y}(s.Q.wA)},99844:function(e,n,t){"use strict";t.d(n,{F:function(){return d}});var o=t(39479),i=t(31647),s=t(64154),r=t.n(s),l={resizingTextarea:"hJmNl"};function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,i=function(e,n){if("object"!==a(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!==a(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===a(i)?i:String(i)),o)}var i}function c(e,n){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},c(e,n)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}var d=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&c(e,n)}(h,e);var n,t,i,s,d=(i=h,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=p(i);if(s){var t=p(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return function(e,n){if(n&&("object"===a(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function h(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,h),d.call(this,e)}return n=h,(t=[{key:"name",get:function(){return"ResizingTextAreaComponent"}},{key:"template",get:function(){return r()}},{key:"events",value:function(){return{"input .event-selector":"onInput"}}},{key:"onInput",value:function(e){var n=e.target;n.style.height="inherit";var t=window.getComputedStyle(n),o=parseInt(t.getPropertyValue("border-top-width"),10)+parseInt(t.getPropertyValue("padding-top"),10)+n.scrollHeight+parseInt(t.getPropertyValue("padding-bottom"),10)+parseInt(t.getPropertyValue("border-bottom-width"),10);n.style.height=o+"px"}},{key:"viewOptions",value:function(){return o.extend({},this.options,{styles:l})}}])&&u(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),h}(i.Q.wA)},36022:function(e,n,t){"use strict";t.d(n,{M:function(){return g}});var o=t(48088),i=t(39479),s=t(11306),r=t(31647),l=t(17391),a=t(63791),u=t(93569),c=t(94407),p=t.n(c),d={svg:"QbFgf",typeaheadContainer:"Y3ErG",disabled:"VTCM4"};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,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,m(o.key),o)}}function m(e){var n=function(e,n){if("object"!==h(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.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(n)?n:String(n)}function b(e,n){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},b(e,n)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var g=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&b(e,n)}(k,e);var n,t,c,g,v=(c=k,g=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=y(c);if(g){var t=y(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return function(e,n){if(n&&("object"===h(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function k(e){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,k),v.call(this,e)}return n=k,(t=[{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"search-container ".concat(d.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.N0.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||r.Q.Ry.throw(new s.H("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new r.Q.Hn),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=o.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"bindings",get:function(){var e,n,t;return e={},n="[name=".concat(this.options.inputName,"]"),t={observe:this.options.stickItProperty,setOptions:{validate:!0}},(n=m(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}},{key:"clearInput",value:function(){this.getUI("input").typeahead("val",null)}},{key:"setInput",value:function(e){this.getUI("input").typeahead("val",e)}},{key:"onTypeaheadSelect",value:function(e,n){var t;e.preventDefault(),t="string"==typeof n?n:n.title||n.name||n.query,this.model.set(this.options.stickItProperty,t),this.parentChannel&&this.options.selectEvent&&this.parentChannel.trigger(this.options.selectEvent,n),this.onSubmit(e),this.toggleRemove()}},{key:"onSubmit",value:function(e){var n=this;if(e.preventDefault(),!this.isDestroyed()&&this.getTypeaheadActionOptions().clearOnSelect)return this.getUI("input").typeahead("close"),setTimeout((function(){n.model.clear(),n.clearInput()}),0),!1}},{key:"onClickRemove",value:function(){this.model.clear(),this.parentChannel.trigger(this.options.removeEvent,this.model),this.toggleRemove()}},{key:"getSources",value:function(){return i.isArray(this.options.typeaheadConfigs)?l.J.getSearchSources(this.options.typeaheadConfigs):l.J.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?i.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return i.isObject(this.options.actionOptions)?i.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){i.isObject(this.options.callbacks)&&(i.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",i.bind(this.options.callbacks.onRender,this)),i.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),i.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",i.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",i.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:d},this.options),{showRemove:this.shouldShowRemove(),svgRemove:a.Nj.getSvg(a.vn.Close)})}},{key:"onRender",value:function(){var e=this;this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),o.Validation.bind(this),this.toggleRemove(),this.options.autofocus&&window.requestAnimationFrame((function(){e.getUI("input").focus()}))}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),o.Validation.unbind(this)}}])&&f(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),k}(r.Q.wA)},37571:function(e,n,t){var o=t(32227);e.exports=(o.default||o).template({1:function(e,n,t,o,i){return"d-inline-block"},3:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.programTitle:s,n))},5:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,'<span class="'+e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.requiredStar:s,n))+'">*</span>'},7:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-title">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},9:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.disabled:s,n))},11:function(e,n,t,o,i){return"disabled"},13:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=null!=n?n:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <div class="row">\n <div class="form-group col-6 p-0 '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(14,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-title">'+a((t.lang||n&&n.lang||l).call(r,"series",{name:"lang",hash:{},data:i}))+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(16,i,0),inverse:e.noop,data:i}))?s:"")+'\n <div class="edit-series-region"></div>\n <div class="form-feedback"></div>\n </div>\n <div class="form-group col-3 pe-0 '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(18,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-season-number">'+a((t.lang||n&&n.lang||l).call(r,"season",{name:"lang",hash:{},data:i}))+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(20,i,0),inverse:e.noop,data:i}))?s:"")+'\n <div class="edit-season-region"></div>\n <div class="form-feedback"></div>\n </div>\n <div class="form-group col-3 pe-0 '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(22,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-episode-number">'+a((t.lang||n&&n.lang||l).call(r,"episode",{name:"lang",hash:{},data:i}))+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(24,i,0),inverse:e.noop,data:i}))?s:"")+'\n <input\n name="episodeNumber"\n type="number"\n class="form-control episode-number '+(null!=(s=t.if.call(r,null!=(s=null!=n?n.options:n)?s.lockEpisodeNumber:s,{name:"if",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?s:"")+'"\n id="edit-episode-number"\n placeholder="'+a(e.lambda(null!=(s=null!=n?n.options:n)?s.episodeNumberPlaceholderText:s,n))+'"\n autocomplete="off"\n min="1"\n '+(null!=(s=t.if.call(r,null!=(s=null!=n?n.options:n)?s.lockEpisodeNumber:s,{name:"if",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))?s:"")+'\n >\n <div class="form-feedback"></div>\n </div>\n </div>\n'},14:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.seriesTitle:s,n))},16:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-series-title">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},18:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.seasonNumber:s,n))},20:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-season-number">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},22:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.episodeNumber:s,n))},24:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-episode-number">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},26:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.description:s,n))},28:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression;return'<span class="'+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.suggestEdit:s,n))+'">- <a class="suggest-description">'+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"suggestEdit",{name:"lang",hash:{},data:i}))+"</a></span>"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=null!=n?n:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return'<div class="position-relative '+(null!=(s=t.if.call(r,null!=(s=null!=n?n.options:n)?s.showingSaveButton:s,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <h5 class="d-inline-block">'+a((t.lang||n&&n.lang||l).call(r,"heading",{name:"lang",hash:{},data:i}))+'</h5>\n</div>\n<div class="form-group '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-title">'+a((t.lang||n&&n.lang||l).call(r,"title",{name:"lang",hash:{},data:i}))+(null!=(s=t.if.call(r,null!=(s=null!=(s=null!=n?n.options:n)?s.requiredFields:s)?s.programTitle:s,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?s:"")+'\n <input\n name="name"\n type="text"\n class="form-control '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?s:"")+'"\n placeholder="'+a((t.lang||n&&n.lang||l).call(r,"titlePlaceholder",{name:"lang",hash:{},data:i}))+'"\n id="edit-title"\n autocomplete="off"\n '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))?s:"")+'\n >\n <div class="form-feedback"></div>\n</div>\n<div class="container-fluid">\n'+(null!=(s=t.if.call(r,null!=n?n.series:n,{name:"if",hash:{},fn:e.program(13,i,0),inverse:e.noop,data:i}))?s:"")+'</div>\n<div class="form-group '+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(26,i,0),inverse:e.noop,data:i}))?s:"")+'">\n <label for="edit-description">'+a((t.lang||n&&n.lang||l).call(r,"description",{name:"lang",hash:{},data:i}))+"</label>\n "+(null!=(s=t.unless.call(r,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(28,i,0),inverse:e.noop,data:i}))?s:"")+'\n <div class="description-region"></div>\n <div class="form-feedback"></div>\n</div>\n<div class="ratings-region"></div>\n'},useData:!0})},73519:function(e,n,t){var o=t(32227);e.exports=(o.default||o).template({1:function(e,n,t,o,i){return'<div class="">\n <button class="btn btn-outline-dark create w-100">+ Create a season</button>\n</div>\n'},3:function(e,n,t,o,i){return'<div class="form-group mb-2">\n <input type="number" class="form-control" name="number" min="1" placeholder="Season number">\n <div class="form-feedback"></div>\n</div>\n'},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,(null!=(s=t.unless.call(null!=n?n:e.nullContext||{},null!=(s=null!=n?n.options:n)?s.show:s,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?s:"")+'<div class="text-end">\n <div class="button-region"></div>\n</div>'},useData:!0})},48242:function(e,n,t){var o=t(32227);e.exports=(o.default||o).template({1:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.disabled:s,n))},3:function(e,n,t,o,i){return"selected"},5:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.lambda,l=e.escapeExpression;return' <option value="'+l(r(null!=n?n.number:n,n))+'" '+(null!=(s=t.if.call(null!=n?n:e.nullContext||{},null!=n?n.selected:n,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?s:"")+">"+l(r(null!=n?n.displayName:n,n))+"</option>\n"},7:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.lambda;return'<span class="svg-container mb-2 '+e.escapeExpression(r(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.svg:s,n))+' remove">'+(null!=(s=r(null!=(s=null!=n?n.options:n)?s.svgRemove:s,n))?s:"")+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.escapeExpression,l=null!=n?n:e.nullContext||{};return'<div\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n class="cursor-pointer w-100 dropdown-btn btn btn-link '+r(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.button:s,n))+" "+(null!=(s=t.if.call(l,null!=(s=null!=n?n.options:n)?s.disabled:s,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?s:"")+'"\n name="season"\n>&nbsp;</div>\n<div class="dropdown-menu dropdown-menu-end dropdown-arrow w-100">\n <div class="text-center px-2">\n <select name="season" class="form-select">\n <option value="-1" '+(null!=(s=t.unless.call(l,null!=(s=null!=n?n.options:n)?s.hasSelected:s,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?s:"")+">"+r((t.lang||n&&n.lang||e.hooks.helperMissing).call(l,"selectASeason",{name:"lang",hash:{},data:i}))+"</option>\n"+(null!=(s=t.each.call(l,null!=(s=null!=n?n.options:n)?s.seasons:s,{name:"each",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+' </select>\n </div>\n\n <div class="dropdown-divider"></div>\n\n <div class="create-region"></div>\n</div>\n'+(null!=(s=t.if.call(l,null!=(s=null!=n?n.options:n)?s.showRemoveIcon:s,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?s:"")},useData:!0})},64154:function(e,n,t){var o=t(32227);e.exports=(o.default||o).template({1:function(e,n,t,o,i){return"required"},3:function(e,n,t,o,i){return"readonly"},5:function(e,n,t,o,i){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.lambda,l=e.escapeExpression,a=null!=n?n:e.nullContext||{};return'<textarea\n name="'+l(r(null!=(s=null!=n?n.options:n)?s.name:s,n))+'"\n id="'+l(r(null!=(s=null!=n?n.options:n)?s.id:s,n))+'"\n autocomplete="false"\n class="'+l(r(null!=(s=null!=n?n.options:n)?s.class:s,n))+" event-selector "+l(r(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.resizingTextarea:s,n))+'"\n placeholder="'+l(r(null!=(s=null!=n?n.options:n)?s.placeholder:s,n))+'"\n '+(null!=(s=t.if.call(a,null!=(s=null!=n?n.options:n)?s.required:s,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?s:"")+"\n "+(null!=(s=t.if.call(a,null!=(s=null!=n?n.options:n)?s.readonly:s,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?s:"")+"\n "+(null!=(s=t.if.call(a,null!=(s=null!=n?n.options:n)?s.disabled:s,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+"\n></textarea>"},useData:!0})},94407:function(e,n,t){var o=t(32227);e.exports=(o.default||o).template({1:function(e,n,t,o,i){var s;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.disabled:s,n))},3:function(e,n,t,o,i){return"autofocus"},5:function(e,n,t,o,i){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,n,t,o,i){e.propertyIsEnumerable;var s,r=e.lambda,l=e.escapeExpression,a=null!=n?n:e.nullContext||{};return'<input\n name="'+l(r(null!=(s=null!=n?n.options:n)?s.inputName:s,n))+'"\n type="text"\n class="form-control '+(null!=(s=t.unless.call(a,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?s:"")+" "+l(r(null!=(s=null!=n?n.options:n)?s.additionalClasses:s,n))+'"\n id="'+l(r(null!=(s=null!=n?n.options:n)?s.inputId:s,n))+'"\n autocomplete="off"\n placeholder="'+l(r(null!=(s=null!=n?n.options:n)?s.placeholderText:s,n))+'"\n '+(null!=(s=t.if.call(a,null!=(s=null!=n?n.options:n)?s.autofocus:s,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?s:"")+"\n "+(null!=(s=t.unless.call(a,null!=(s=null!=n?n.options:n)?s.editable:s,{name:"unless",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?s:"")+'\n></input>\n<span class="svg-container mb-2 '+l(r(null!=(s=null!=(s=null!=n?n.options:n)?s.styles:s)?s.svg:s,n))+' remove" style="display: none;">'+(null!=(s=r(null!=(s=null!=n?n.options:n)?s.svgRemove:s,n))?s:"")+"</span>"},useData:!0})}}]);