@clickview/library-editor 1.1.57-rc.1 → 1.2.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/en.json +1 -1
  3. package/dist/scripts/{0-7a0a00671e.chunk.js → 0-3146283f04.chunk.js} +1 -1
  4. package/dist/scripts/{1-709b927521.chunk.js → 1-b9c3d24192.chunk.js} +1 -1
  5. package/dist/scripts/{10-9adc2cda45.chunk.js → 10-1f8e4712fb.chunk.js} +1 -1
  6. package/dist/scripts/{11-ff467086e1.chunk.js → 11-efbe8b672b.chunk.js} +1 -1
  7. package/dist/scripts/{12-24c4543472.chunk.js → 12-9a649bd1e8.chunk.js} +1 -1
  8. package/dist/scripts/{13-10636e2af5.chunk.js → 13-d003ff9e41.chunk.js} +1 -1
  9. package/dist/scripts/{14-9b1ecd3e9e.chunk.js → 14-79273eff4c.chunk.js} +1 -1
  10. package/dist/scripts/{15-e4ef6f64cf.chunk.js → 15-1a0756e067.chunk.js} +1 -1
  11. package/dist/scripts/{16-ea4e41f570.chunk.js → 16-bbf0f01fe8.chunk.js} +1 -1
  12. package/dist/scripts/{17-9353ded8cd.chunk.js → 17-3056f1e460.chunk.js} +1 -1
  13. package/dist/scripts/{18-fb56568492.chunk.js → 18-4c5983938e.chunk.js} +1 -1
  14. package/dist/scripts/{19-85a94ac004.chunk.js → 19-f6bd3a3d49.chunk.js} +1 -1
  15. package/dist/scripts/{2-6e60c5cd87.chunk.js → 2-d90f461b10.chunk.js} +1 -1
  16. package/dist/scripts/{22-a4903ff45c.chunk.js → 22-f0e56683c3.chunk.js} +1 -1
  17. package/dist/scripts/{23-b47ac20bca.chunk.js → 23-cdce4174d1.chunk.js} +1 -1
  18. package/dist/scripts/{24-f431e57e2a.chunk.js → 24-afd2aa2bfc.chunk.js} +1 -1
  19. package/dist/scripts/{25-560da8ad7f.chunk.js → 25-33473d284b.chunk.js} +1 -1
  20. package/dist/scripts/{26-4931172ebc.chunk.js → 26-08a7f60500.chunk.js} +1 -1
  21. package/dist/scripts/{27-adae09a46f.chunk.js → 27-4fdfe99ba0.chunk.js} +1 -1
  22. package/dist/scripts/{28-696a0da105.chunk.js → 28-bb3ced1465.chunk.js} +1 -1
  23. package/dist/scripts/29-ef11dca9b5.chunk.js +1 -0
  24. package/dist/scripts/3-8497effed3.chunk.js +1 -0
  25. package/dist/scripts/{30-92d387d3d9.chunk.js → 30-41819d54db.chunk.js} +1 -1
  26. package/dist/scripts/{31-7e545aa0de.chunk.js → 31-adedea4916.chunk.js} +1 -1
  27. package/dist/scripts/{32-7328345fae.chunk.js → 32-92b6dc1186.chunk.js} +1 -1
  28. package/dist/scripts/{33-128143c106.chunk.js → 33-8ba323169f.chunk.js} +1 -1
  29. package/dist/scripts/{34-c915802337.chunk.js → 34-dfcd935e80.chunk.js} +1 -1
  30. package/dist/scripts/{35-a166f1b8e3.chunk.js → 35-8315746476.chunk.js} +1 -1
  31. package/dist/scripts/{36-c347fda103.chunk.js → 36-97a61b13fd.chunk.js} +1 -1
  32. package/dist/scripts/{37-74139562b8.chunk.js → 37-5f0b4c4b24.chunk.js} +1 -1
  33. package/dist/scripts/{38-f300998fdd.chunk.js → 38-1806441e62.chunk.js} +1 -1
  34. package/dist/scripts/{39-b3dc9c44a0.chunk.js → 39-cb06876d63.chunk.js} +1 -1
  35. package/dist/scripts/{4-a6f41aa1cf.chunk.js → 4-3556f5cd86.chunk.js} +1 -1
  36. package/dist/scripts/{40-3e0329bded.chunk.js → 40-dedc900f03.chunk.js} +1 -1
  37. package/dist/scripts/{41-14984944f5.chunk.js → 41-2a772649ef.chunk.js} +1 -1
  38. package/dist/scripts/{42-a83543523b.chunk.js → 42-edd884c6e1.chunk.js} +1 -1
  39. package/dist/scripts/{43-1dd75e9a7c.chunk.js → 43-7cb12bb043.chunk.js} +1 -1
  40. package/dist/scripts/{44-b009aed5ee.chunk.js → 44-6e38e6c3da.chunk.js} +1 -1
  41. package/dist/scripts/{45-8784f71efb.chunk.js → 45-7696788c78.chunk.js} +1 -1
  42. package/dist/scripts/{46-84948e5396.chunk.js → 46-6fae0cec47.chunk.js} +1 -1
  43. package/dist/scripts/{47-e8ee683c6b.chunk.js → 47-c5e053926b.chunk.js} +1 -1
  44. package/dist/scripts/{48-f7d6b635d4.chunk.js → 48-c62f428014.chunk.js} +1 -1
  45. package/dist/scripts/{49-85880607e1.chunk.js → 49-0221ac925c.chunk.js} +1 -1
  46. package/dist/scripts/{5-441004c068.chunk.js → 5-f2fad668b9.chunk.js} +1 -1
  47. package/dist/scripts/{50-7119810c07.chunk.js → 50-6c9cd76347.chunk.js} +1 -1
  48. package/dist/scripts/{51-4073403c2a.chunk.js → 51-4c4cb2a786.chunk.js} +1 -1
  49. package/dist/scripts/{52-83ac3c5f59.chunk.js → 52-1a2a4d664f.chunk.js} +1 -1
  50. package/dist/scripts/{53-44b9074b42.chunk.js → 53-4420fdb2ff.chunk.js} +1 -1
  51. package/dist/scripts/{54-f87b2698de.chunk.js → 54-7ad2a43bae.chunk.js} +1 -1
  52. package/dist/scripts/{55-02e36c66d8.chunk.js → 55-6bdc1394e8.chunk.js} +1 -1
  53. package/dist/scripts/{56-7e9d94a656.chunk.js → 56-0e7f151d8f.chunk.js} +1 -1
  54. package/dist/scripts/{57-4ad9ab266e.chunk.js → 57-e02ec7e3aa.chunk.js} +1 -1
  55. package/dist/scripts/{58-6ebe979a17.chunk.js → 58-23f2f08ffa.chunk.js} +1 -1
  56. package/dist/scripts/{59-09ad6d94e9.chunk.js → 59-73f62422ee.chunk.js} +1 -1
  57. package/dist/scripts/{6-f1f3ea7cec.chunk.js → 6-41fbd1d098.chunk.js} +1 -1
  58. package/dist/scripts/{60-d4f9eaf20d.chunk.js → 60-02ac1d0885.chunk.js} +1 -1
  59. package/dist/scripts/{61-45cfc05bd5.chunk.js → 61-11806e7f0f.chunk.js} +1 -1
  60. package/dist/scripts/{62-4242c25552.chunk.js → 62-36cd4edbe1.chunk.js} +1 -1
  61. package/dist/scripts/{63-779b927a04.chunk.js → 63-221a784003.chunk.js} +1 -1
  62. package/dist/scripts/{64-29f65ce8e5.chunk.js → 64-de212ef1ff.chunk.js} +1 -1
  63. package/dist/scripts/{65-0e5cd44c96.chunk.js → 65-2a3fe2cf9f.chunk.js} +1 -1
  64. package/dist/scripts/{66-782fe6a351.chunk.js → 66-3d86df4f03.chunk.js} +1 -1
  65. package/dist/scripts/{67-c749606e6f.chunk.js → 67-4044e5776b.chunk.js} +1 -1
  66. package/dist/scripts/{68-9ef5b70dc6.chunk.js → 68-d9ac81db0f.chunk.js} +1 -1
  67. package/dist/scripts/{69-ea32cbf274.chunk.js → 69-4523125605.chunk.js} +1 -1
  68. package/dist/scripts/{7-00dd3cbb22.chunk.js → 7-7d08599cb1.chunk.js} +1 -1
  69. package/dist/scripts/{70-876856aed0.chunk.js → 70-cac4a9fb87.chunk.js} +1 -1
  70. package/dist/scripts/{71-89a356a899.chunk.js → 71-59ded4dd7b.chunk.js} +1 -1
  71. package/dist/scripts/{72-6e08024788.chunk.js → 72-8329bfea82.chunk.js} +1 -1
  72. package/dist/scripts/{73-7cc4cc7383.chunk.js → 73-dfe0e3c96a.chunk.js} +1 -1
  73. package/dist/scripts/{74-8ffb258210.chunk.js → 74-1aee6ab328.chunk.js} +1 -1
  74. package/dist/scripts/{8-878942d96f.chunk.js → 8-b20f6d3c66.chunk.js} +1 -1
  75. package/dist/scripts/{9-da8328e091.chunk.js → 9-e1083c25e2.chunk.js} +1 -1
  76. package/dist/scripts/bundle-3d68d50bfd.min.js +10 -0
  77. package/dist/scripts/polyfills-c68217e80d.min.js +1 -0
  78. package/package.json +2 -2
  79. package/dist/scripts/29-c2c961a586.chunk.js +0 -1
  80. package/dist/scripts/3-aa6f0c5b23.chunk.js +0 -1
  81. package/dist/scripts/bundle-183cd5dde9.min.js +0 -10
  82. package/dist/scripts/polyfills-4de7102781.min.js +0 -1
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[38],{1042:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&s(e,t)}(c,e);var t,n,r,i=u(c);function c(){return l(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&a(t.prototype,n),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1050:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(48),i=n(169),l=n(3),a="libraryEditor.utils",s={name:[{required:!0,msg:function(){return l.a.getPhrase(a,"folderNameRequired")}},{maxLength:255,msg:function(){return l.a.getPhrase(a,"folderNameExceeds")}}]},u=function(e,t){return{parentId:function(n){return n?o.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?l.a.getPhrase(a,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":l.a.getPhrase(a,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,o=e.folder,i=e.collection;return t&&n?r.extend({},s,u(o,i)):t?s:n?u(o,i):void 0}},1061:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(6),o=n(2),i=n(3),l=n(1100),a=n(13),s=n(1063),u=n.n(s),c=n(1064),f=n.n(c);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})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(c,e);var t,n,o,s=y(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return u.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=a.f.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&p(t.prototype,n),o&&p(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.Component)},1063:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+a(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1064:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1113:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(2),o=n(305),i=n(13),l=n(1061),a=n(1050),s=n(1114),u=n.n(s);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(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,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(c,e);var t,n,r,s=p(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"FolderDetailsComponent"}},{key:"template",get:function(){return u.a}},{key:"lang",get:function(){return"libraryEditor.folderDetails"}},{key:"folderTreeKey",get:function(){return this.options.folderTreeKey||"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{parentFolder:".parent-folder-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:o.a,modelValidation:Object(a.a)({validateName:this.options.editName,validateParent:this.options.editParent,folder:this.options.model,collection:this.options.collection})},{behaviorClass:o.f}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"onFolderSelected",value:function(e,t){e&&(i.f.setSelected(this.folderTreeKey,e,this.collection,t),t||this.model.set("parentId",e.get("id"),{validate:!0}))}},{key:"renderSubFolders",value:function(){this.options.editParent&&this.showChildView("parentFolder",new l.a({collection:this.collection,channelName:this.options.channelName,folderTreeKey:this.folderTreeKey,disabledIds:this.options.disabledParentFolderIds}))}},{key:"viewOptions",value:function(){return{editName:this.options.editName,editParent:this.options.editParent}}},{key:"onRender",value:function(){this.renderSubFolders()}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Component)},1114:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <div class="form-group">\r\n <label for="name" class="control-label">'+a((n.lang||t&&t.lang||l).call(i,"name",{name:"lang",hash:{},data:o}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+a((n.lang||t&&t.lang||l).call(i,"namePlaceholder",{name:"lang",hash:{},data:o}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;return' <div class="form-group pt-2">\r\n <label for="parentId" class="control-label">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"parent",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="parent-folder-region"></div>\r\n </div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return"<form>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editName:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editParent:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"</form>"},useData:!0})},1240:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){return'<div class="folder-details-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1430:function(e,t,n){"use strict";n.r(t),n.d(t,"MoveFolderView",(function(){return E}));var r=n(1),o=n(6),i=n(2),l=n(30),a=n(5),s=n(42),u=n(0),c=n(305),f=n(84),d=n(1042),p=n(87),h=n(13),y=n(265),b=n(3),m=n(1113),v=n(1240),g=n.n(v);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})(e)}function P(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}function j(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)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&I(e,t)}(k,e);var t,n,v,w=S(k);function k(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),w.call(this,e)}return t=k,(n=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=a.a.getInstance(u.g.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(u.e.LIBRARY,"libraries:sync",this.render),this.listenTo(u.e.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render)}},{key:"name",get:function(){return"MoveFolderView"}},{key:"title",get:function(){return b.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.moveFolder"}},{key:"template",get:function(){return g.a}},{key:"channelName",get:function(){return h.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.e,title:b.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new d.a,channelName:this.channelName,buttonText:b.a.getPhrase(this.lang,"move"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(o.Radio.channel(this.channelName).trigger(y.b.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId,r={id:this.options.folderId,isSubfolder:n.toString()!==this.library.get("id").toString(),oldParentId:t,newParentId:n};s.a.logUserAction(r,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this,t=this.getParentIds(),n=t.oldParentId,r=t.newParentId;n!==r?this.libraryDataService.moveFolder(this.viewModel.get("id"),r,n,(function(){i.a.AppLinkHelper.trigger({application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.FOLDER,args:[e.viewModel.get("id")]}),e.triggerMethod("hide")})):i.a.AppLinkHelper.trigger({application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.FOLDER,args:[this.viewModel.get("id")]})}},{key:"getParentIds",value:function(){return{oldParentId:h.f.getParent(this.options.folderId,this.collection).get("id"),newParentId:this.viewModel.get("parentId")}}},{key:"setUpCollection",value:function(e){this.collection||(this.library=h.f.getLibrary(this.options.folderId,e),this.collection=new f.a([this.library]))}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=l.a.get(e,this.model.toJSON(),{ctor:p.a});var t=h.f.getParent(this.options.folderId,this.collection);this.viewModel.set("parentId",t?t.get("id"):null),this.listenTo(this.viewModel,"change:parentId",this.onParentChange)}}},{key:"onParentChange",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId;this.spinnerModel.set(y.c.Disabled,t===n)}},{key:"getDisabledParentFolderIds",value:function(){var e=[this.model.get("id").toString()];return this.viewModel.get("parentId")&&e.push(this.viewModel.get("parentId").toString()),this.model.children?[].concat(e,P(h.f.flatten(this.model.children).map((function(e){return e.id.toString()})))):e}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new m.a({model:this.viewModel,collection:this.collection,library:this.library,channelName:this.channelName,editName:!1,editParent:!0,disabledParentFolderIds:this.getDisabledParentFolderIds()});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(r.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,r.bind(this.setUpModel,this))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:h.r.getSpinner({size:h.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}])&&O(t.prototype,n),v&&O(t,v),Object.defineProperty(t,"prototype",{writable:!1}),k}(i.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[38],{1043:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&s(e,t)}(c,e);var t,n,r,i=u(c);function c(){return l(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&a(t.prototype,n),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1051:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(48),i=n(169),l=n(3),a="libraryEditor.utils",s={name:[{required:!0,msg:function(){return l.a.getPhrase(a,"folderNameRequired")}},{maxLength:255,msg:function(){return l.a.getPhrase(a,"folderNameExceeds")}}]},u=function(e,t){return{parentId:function(n){return n?o.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?l.a.getPhrase(a,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":l.a.getPhrase(a,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,o=e.folder,i=e.collection;return t&&n?r.extend({},s,u(o,i)):t?s:n?u(o,i):void 0}},1062:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(6),o=n(2),i=n(3),l=n(1101),a=n(12),s=n(1064),u=n.n(s),c=n(1065),f=n.n(c);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})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(c,e);var t,n,o,s=y(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return u.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=a.f.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&p(t.prototype,n),o&&p(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.Component)},1064:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+a(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1065:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1114:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(2),o=n(305),i=n(12),l=n(1062),a=n(1051),s=n(1115),u=n.n(s);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(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,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(c,e);var t,n,r,s=p(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"FolderDetailsComponent"}},{key:"template",get:function(){return u.a}},{key:"lang",get:function(){return"libraryEditor.folderDetails"}},{key:"folderTreeKey",get:function(){return this.options.folderTreeKey||"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{parentFolder:".parent-folder-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:o.a,modelValidation:Object(a.a)({validateName:this.options.editName,validateParent:this.options.editParent,folder:this.options.model,collection:this.options.collection})},{behaviorClass:o.f}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"onFolderSelected",value:function(e,t){e&&(i.f.setSelected(this.folderTreeKey,e,this.collection,t),t||this.model.set("parentId",e.get("id"),{validate:!0}))}},{key:"renderSubFolders",value:function(){this.options.editParent&&this.showChildView("parentFolder",new l.a({collection:this.collection,channelName:this.options.channelName,folderTreeKey:this.folderTreeKey,disabledIds:this.options.disabledParentFolderIds}))}},{key:"viewOptions",value:function(){return{editName:this.options.editName,editParent:this.options.editParent}}},{key:"onRender",value:function(){this.renderSubFolders()}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Component)},1115:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <div class="form-group">\r\n <label for="name" class="control-label">'+a((n.lang||t&&t.lang||l).call(i,"name",{name:"lang",hash:{},data:o}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+a((n.lang||t&&t.lang||l).call(i,"namePlaceholder",{name:"lang",hash:{},data:o}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;return' <div class="form-group pt-2">\r\n <label for="parentId" class="control-label">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"parent",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="parent-folder-region"></div>\r\n </div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return"<form>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editName:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editParent:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"</form>"},useData:!0})},1241:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){return'<div class="folder-details-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1431:function(e,t,n){"use strict";n.r(t),n.d(t,"MoveFolderView",(function(){return E}));var r=n(1),o=n(6),i=n(2),l=n(30),a=n(5),s=n(42),u=n(0),c=n(305),f=n(84),d=n(1043),p=n(87),h=n(12),y=n(265),b=n(3),m=n(1114),v=n(1241),g=n.n(v);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})(e)}function P(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}function j(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)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&I(e,t)}(k,e);var t,n,v,w=S(k);function k(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),w.call(this,e)}return t=k,(n=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=a.a.getInstance(u.g.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(u.e.LIBRARY,"libraries:sync",this.render),this.listenTo(u.e.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render)}},{key:"name",get:function(){return"MoveFolderView"}},{key:"title",get:function(){return b.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.moveFolder"}},{key:"template",get:function(){return g.a}},{key:"channelName",get:function(){return h.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.e,title:b.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new d.a,channelName:this.channelName,buttonText:b.a.getPhrase(this.lang,"move"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(o.Radio.channel(this.channelName).trigger(y.b.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId,r={id:this.options.folderId,isSubfolder:n.toString()!==this.library.get("id").toString(),oldParentId:t,newParentId:n};s.a.logUserAction(r,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this,t=this.getParentIds(),n=t.oldParentId,r=t.newParentId;n!==r?this.libraryDataService.moveFolder(this.viewModel.get("id"),r,n,(function(){i.a.AppLinkHelper.trigger({application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.FOLDER,args:[e.viewModel.get("id")]}),e.triggerMethod("hide")})):i.a.AppLinkHelper.trigger({application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.FOLDER,args:[this.viewModel.get("id")]})}},{key:"getParentIds",value:function(){return{oldParentId:h.f.getParent(this.options.folderId,this.collection).get("id"),newParentId:this.viewModel.get("parentId")}}},{key:"setUpCollection",value:function(e){this.collection||(this.library=h.f.getLibrary(this.options.folderId,e),this.collection=new f.a([this.library]))}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=l.a.get(e,this.model.toJSON(),{ctor:p.a});var t=h.f.getParent(this.options.folderId,this.collection);this.viewModel.set("parentId",t?t.get("id"):null),this.listenTo(this.viewModel,"change:parentId",this.onParentChange)}}},{key:"onParentChange",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId;this.spinnerModel.set(y.c.Disabled,t===n)}},{key:"getDisabledParentFolderIds",value:function(){var e=[this.model.get("id").toString()];return this.viewModel.get("parentId")&&e.push(this.viewModel.get("parentId").toString()),this.model.children?[].concat(e,P(h.f.flatten(this.model.children).map((function(e){return e.id.toString()})))):e}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new m.a({model:this.viewModel,collection:this.collection,library:this.library,channelName:this.channelName,editName:!1,editParent:!0,disabledParentFolderIds:this.getDisabledParentFolderIds()});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(r.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,r.bind(this.setUpModel,this))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:h.r.getSpinner({size:h.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}])&&O(t.prototype,n),v&&O(t,v),Object.defineProperty(t,"prototype",{writable:!1}),k}(i.a.View)}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[39],{1042:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(c,e);var t,n,r,i=s(c);function c(){return l(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&a(t.prototype,n),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1050:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(48),i=n(169),l=n(3),a="libraryEditor.utils",u={name:[{required:!0,msg:function(){return l.a.getPhrase(a,"folderNameRequired")}},{maxLength:255,msg:function(){return l.a.getPhrase(a,"folderNameExceeds")}}]},s=function(e,t){return{parentId:function(n){return n?o.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?l.a.getPhrase(a,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":l.a.getPhrase(a,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,o=e.folder,i=e.collection;return t&&n?r.extend({},u,s(o,i)):t?u:n?s(o,i):void 0}},1061:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(6),o=n(2),i=n(3),l=n(1100),a=n(13),u=n(1063),s=n.n(u),c=n(1064),f=n.n(c);function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(c,e);var t,n,o,u=y(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),u.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return s.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=a.f.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&d(t.prototype,n),o&&d(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.Component)},1063:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+a(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1064:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1113:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(2),o=n(305),i=n(13),l=n(1061),a=n(1050),u=n(1114),s=n.n(u);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(c,e);var t,n,r,u=d(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),u.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"FolderDetailsComponent"}},{key:"template",get:function(){return s.a}},{key:"lang",get:function(){return"libraryEditor.folderDetails"}},{key:"folderTreeKey",get:function(){return this.options.folderTreeKey||"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{parentFolder:".parent-folder-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:o.a,modelValidation:Object(a.a)({validateName:this.options.editName,validateParent:this.options.editParent,folder:this.options.model,collection:this.options.collection})},{behaviorClass:o.f}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"onFolderSelected",value:function(e,t){e&&(i.f.setSelected(this.folderTreeKey,e,this.collection,t),t||this.model.set("parentId",e.get("id"),{validate:!0}))}},{key:"renderSubFolders",value:function(){this.options.editParent&&this.showChildView("parentFolder",new l.a({collection:this.collection,channelName:this.options.channelName,folderTreeKey:this.folderTreeKey,disabledIds:this.options.disabledParentFolderIds}))}},{key:"viewOptions",value:function(){return{editName:this.options.editName,editParent:this.options.editParent}}},{key:"onRender",value:function(){this.renderSubFolders()}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Component)},1114:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <div class="form-group">\r\n <label for="name" class="control-label">'+a((n.lang||t&&t.lang||l).call(i,"name",{name:"lang",hash:{},data:o}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+a((n.lang||t&&t.lang||l).call(i,"namePlaceholder",{name:"lang",hash:{},data:o}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;return' <div class="form-group pt-2">\r\n <label for="parentId" class="control-label">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"parent",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="parent-folder-region"></div>\r\n </div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return"<form>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editName:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editParent:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"</form>"},useData:!0})},1239:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){return'<div class="folder-details-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1429:function(e,t,n){"use strict";n.r(t),n.d(t,"RenameFolderView",(function(){return j}));var r=n(1),o=n(6),i=n(30),l=n(5),a=n(2),u=n(42),s=n(0),c=n(305),f=n(1042),p=n(87),d=n(265),h=n(13),y=n(3),b=n(1113),m=n(1239),v=n.n(m);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(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,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}function P(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j=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&&k(e,t)}(g,e);var t,n,a,m=O(g);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:"initialize",value:function(){this.bindListeners(),this.libraryDataService=l.a.getInstance(s.g.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(s.e.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render),this.listenTo(s.e.LIBRARY,"libraries:sync",this.render)}},{key:"name",get:function(){return"RenameFolderView"}},{key:"title",get:function(){return y.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.renameFolder"}},{key:"template",get:function(){return v.a}},{key:"channelName",get:function(){return h.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.e,title:y.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new f.a,channelName:this.channelName,buttonText:y.a.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(o.Radio.channel(this.channelName).trigger(d.b.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e={id:this.options.folderId,name:this.viewModel.get("name")};u.a.logUserAction(e,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this;this.libraryDataService.updateFolder(this.viewModel,(function(){e.triggerMethod("hide")}))}},{key:"setUpCollection",value:function(e){this.collection||(this.library=h.f.getLibrary(this.options.folderId,e),this.collection=this.library.children)}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=i.a.get(e,this.model.toJSON(),{ctor:p.a})}}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new b.a({model:this.viewModel,channelName:this.channelName,editName:!0,editParent:!1});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(r.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,r.bind(this.setUpModel,this)),this.model&&this.collection&&this.spinnerModel.set(d.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:h.r.getSpinner({size:h.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}])&&w(t.prototype,n),a&&w(t,a),Object.defineProperty(t,"prototype",{writable:!1}),g}(a.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[39],{1043:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(c,e);var t,n,r,i=s(c);function c(){return l(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&a(t.prototype,n),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1051:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(48),i=n(169),l=n(3),a="libraryEditor.utils",u={name:[{required:!0,msg:function(){return l.a.getPhrase(a,"folderNameRequired")}},{maxLength:255,msg:function(){return l.a.getPhrase(a,"folderNameExceeds")}}]},s=function(e,t){return{parentId:function(n){return n?o.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?l.a.getPhrase(a,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":l.a.getPhrase(a,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,o=e.folder,i=e.collection;return t&&n?r.extend({},u,s(o,i)):t?u:n?s(o,i):void 0}},1062:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(6),o=n(2),i=n(3),l=n(1101),a=n(12),u=n(1064),s=n.n(u),c=n(1065),f=n.n(c);function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(c,e);var t,n,o,u=y(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),u.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return s.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=a.f.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&d(t.prototype,n),o&&d(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.Component)},1064:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+a(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1065:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1114:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(2),o=n(305),i=n(12),l=n(1062),a=n(1051),u=n(1115),s=n.n(u);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(c,e);var t,n,r,u=d(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),u.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"FolderDetailsComponent"}},{key:"template",get:function(){return s.a}},{key:"lang",get:function(){return"libraryEditor.folderDetails"}},{key:"folderTreeKey",get:function(){return this.options.folderTreeKey||"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{parentFolder:".parent-folder-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:o.a,modelValidation:Object(a.a)({validateName:this.options.editName,validateParent:this.options.editParent,folder:this.options.model,collection:this.options.collection})},{behaviorClass:o.f}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"onFolderSelected",value:function(e,t){e&&(i.f.setSelected(this.folderTreeKey,e,this.collection,t),t||this.model.set("parentId",e.get("id"),{validate:!0}))}},{key:"renderSubFolders",value:function(){this.options.editParent&&this.showChildView("parentFolder",new l.a({collection:this.collection,channelName:this.options.channelName,folderTreeKey:this.folderTreeKey,disabledIds:this.options.disabledParentFolderIds}))}},{key:"viewOptions",value:function(){return{editName:this.options.editName,editParent:this.options.editParent}}},{key:"onRender",value:function(){this.renderSubFolders()}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Component)},1115:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <div class="form-group">\r\n <label for="name" class="control-label">'+a((n.lang||t&&t.lang||l).call(i,"name",{name:"lang",hash:{},data:o}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+a((n.lang||t&&t.lang||l).call(i,"namePlaceholder",{name:"lang",hash:{},data:o}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;return' <div class="form-group pt-2">\r\n <label for="parentId" class="control-label">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"parent",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="parent-folder-region"></div>\r\n </div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return"<form>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editName:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editParent:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"</form>"},useData:!0})},1240:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){return'<div class="folder-details-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1430:function(e,t,n){"use strict";n.r(t),n.d(t,"RenameFolderView",(function(){return j}));var r=n(1),o=n(6),i=n(30),l=n(5),a=n(2),u=n(42),s=n(0),c=n(305),f=n(1043),p=n(87),d=n(265),h=n(12),y=n(3),b=n(1114),m=n(1240),v=n.n(m);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(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,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}function P(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j=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&&k(e,t)}(g,e);var t,n,a,m=O(g);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:"initialize",value:function(){this.bindListeners(),this.libraryDataService=l.a.getInstance(s.g.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(s.e.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render),this.listenTo(s.e.LIBRARY,"libraries:sync",this.render)}},{key:"name",get:function(){return"RenameFolderView"}},{key:"title",get:function(){return y.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.renameFolder"}},{key:"template",get:function(){return v.a}},{key:"channelName",get:function(){return h.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.e,title:y.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new f.a,channelName:this.channelName,buttonText:y.a.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(o.Radio.channel(this.channelName).trigger(d.b.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e={id:this.options.folderId,name:this.viewModel.get("name")};u.a.logUserAction(e,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this;this.libraryDataService.updateFolder(this.viewModel,(function(){e.triggerMethod("hide")}))}},{key:"setUpCollection",value:function(e){this.collection||(this.library=h.f.getLibrary(this.options.folderId,e),this.collection=this.library.children)}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=i.a.get(e,this.model.toJSON(),{ctor:p.a})}}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new b.a({model:this.viewModel,channelName:this.channelName,editName:!0,editParent:!1});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(r.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,r.bind(this.setUpModel,this)),this.model&&this.collection&&this.spinnerModel.set(d.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:h.r.getSpinner({size:h.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}])&&w(t.prototype,n),a&&w(t,a),Object.defineProperty(t,"prototype",{writable:!1}),g}(a.a.View)}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[4],{1310:function(e,n,t){var r=t(10);e.exports=(r.default||r).template({1:function(e,n,t,r,a){e.propertyIsEnumerable;var i=null!=n?n:e.nullContext||{},o=e.hooks.helperMissing,l=e.escapeExpression;return"<p>"+l((t.lang||n&&n.lang||o).call(i,"infoHeading",{name:"lang",hash:{},data:a}))+"</p>\r\n<p>"+l((t.lang||n&&n.lang||o).call(i,"meaningSubheading",{name:"lang",hash:{},data:a}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning1",{name:"lang",hash:{},data:a}))+"</li>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning2",{name:"lang",hash:{},data:a}))+"</li>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning3",{name:"lang",hash:{},data:a}))+"</li>\r\n</ul>\r\n"},3:function(e,n,t,r,a){e.propertyIsEnumerable;var i=null!=n?n:e.nullContext||{},o=e.hooks.helperMissing,l=e.escapeExpression;return"<p>"+l((t.lang||n&&n.lang||o).call(i,"disclaimer",{name:"lang",hash:{},data:a}))+"</p>\r\n<p>"+l((t.lang||n&&n.lang||o).call(i,"featureSubheading",{name:"lang",hash:{},data:a}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"feature1",{name:"lang",hash:{},data:a}))+"</li> \r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"feature2",{name:"lang",hash:{},data:a}))+"</li>\r\n</ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var i;e.propertyIsEnumerable;return null!=(i=t.if.call(null!=n?n:e.nullContext||{},null!=(i=null!=n?n.options:n)?i.noPublisher:i,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?i:""},useData:!0})},1443:function(e,n,t){"use strict";t.r(n),t.d(n,"PublishLibraryView",(function(){return _}));var r=t(6),a=t(5),i=t(2),o=t(305),l=t(0),u=t(265),c=t(13),s=t(3),f=t(146),h=t(324),p=t(326),g=t(58),b=t(1310),y=t.n(b);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})(e)}function m(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function v(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,n){return(w=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function k(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,r=P(e);if(n){var a=P(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return S(this,t)}}function S(e,n){if(n&&("object"===d(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)}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=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&&w(e,n)}(S,e);var n,t,b,d=k(S);function S(){return m(this,S),d.apply(this,arguments)}return n=S,(t=[{key:"initialize",value:function(){this.libraryDataService=a.a.getInstance(l.g.Library,this),this.migrationVideoDataService=a.a.getInstance(l.g.MigrationVideo,this),this.videoDataService=a.a.getInstance(l.g.Video,this)}},{key:"name",get:function(){return"PublishLibraryView"}},{key:"title",get:function(){return s.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.publishLibrary"}},{key:"template",get:function(){return y.a}},{key:"channelName",get:function(){return c.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:s.a.getPhrase(this.lang,"heading"),behaviorClass:o.e,spinnerButtonOptions:{channelName:this.channelName,buttonText:s.a.getPhrase(this.lang,"continue"),onClick:function(){return e.onClickContinue()}}}]}},{key:"onClickContinue",value:function(){var e=this;r.Radio.channel(this.channelName).trigger(u.b.ShowSpinner);var n=0,t=function(){++n===e.libraries.length&&(e.triggerMethod("hide"),e.videoDataService.clearVideoCache(),r.Radio.channel(h.a.LIBRARY_STATUS).trigger("status:changed"))};g.a.noPublisher(this.customerMetadata)?this.libraries.each((function(n){e.libraryDataService.publishLibrary(n.get("id"),t)})):this.migrationVideoDataService.publishLibraries((function(){i.a.AppLinkHelper.trigger({application:l.b.MIGRATION_WIZARD,action:l.a.MigrationWizard.PUBLISH_LIBRARY_PROGRESS})}))}},{key:"requiredResources",get:function(){return{libraries:f.b.libraries,customerMetadata:p.b.customerMetaData}}},{key:"viewOptions",value:function(){return{noPublisher:g.a.noPublisher(this.customerMetadata)}}}])&&v(n.prototype,t),b&&v(n,b),Object.defineProperty(n,"prototype",{writable:!1}),S}(i.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[4],{1311:function(e,n,t){var r=t(10);e.exports=(r.default||r).template({1:function(e,n,t,r,a){e.propertyIsEnumerable;var i=null!=n?n:e.nullContext||{},o=e.hooks.helperMissing,l=e.escapeExpression;return"<p>"+l((t.lang||n&&n.lang||o).call(i,"infoHeading",{name:"lang",hash:{},data:a}))+"</p>\r\n<p>"+l((t.lang||n&&n.lang||o).call(i,"meaningSubheading",{name:"lang",hash:{},data:a}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning1",{name:"lang",hash:{},data:a}))+"</li>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning2",{name:"lang",hash:{},data:a}))+"</li>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning3",{name:"lang",hash:{},data:a}))+"</li>\r\n</ul>\r\n"},3:function(e,n,t,r,a){e.propertyIsEnumerable;var i=null!=n?n:e.nullContext||{},o=e.hooks.helperMissing,l=e.escapeExpression;return"<p>"+l((t.lang||n&&n.lang||o).call(i,"disclaimer",{name:"lang",hash:{},data:a}))+"</p>\r\n<p>"+l((t.lang||n&&n.lang||o).call(i,"featureSubheading",{name:"lang",hash:{},data:a}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"feature1",{name:"lang",hash:{},data:a}))+"</li> \r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"feature2",{name:"lang",hash:{},data:a}))+"</li>\r\n</ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var i;e.propertyIsEnumerable;return null!=(i=t.if.call(null!=n?n:e.nullContext||{},null!=(i=null!=n?n.options:n)?i.noPublisher:i,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?i:""},useData:!0})},1444:function(e,n,t){"use strict";t.r(n),t.d(n,"PublishLibraryView",(function(){return _}));var r=t(6),a=t(5),i=t(2),o=t(305),l=t(0),u=t(265),c=t(12),s=t(3),f=t(146),h=t(324),p=t(326),g=t(58),b=t(1311),y=t.n(b);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})(e)}function m(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function v(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,n){return(w=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function k(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,r=P(e);if(n){var a=P(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return S(this,t)}}function S(e,n){if(n&&("object"===d(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)}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=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&&w(e,n)}(S,e);var n,t,b,d=k(S);function S(){return m(this,S),d.apply(this,arguments)}return n=S,(t=[{key:"initialize",value:function(){this.libraryDataService=a.a.getInstance(l.g.Library,this),this.migrationVideoDataService=a.a.getInstance(l.g.MigrationVideo,this),this.videoDataService=a.a.getInstance(l.g.Video,this)}},{key:"name",get:function(){return"PublishLibraryView"}},{key:"title",get:function(){return s.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.publishLibrary"}},{key:"template",get:function(){return y.a}},{key:"channelName",get:function(){return c.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:s.a.getPhrase(this.lang,"heading"),behaviorClass:o.e,spinnerButtonOptions:{channelName:this.channelName,buttonText:s.a.getPhrase(this.lang,"continue"),onClick:function(){return e.onClickContinue()}}}]}},{key:"onClickContinue",value:function(){var e=this;r.Radio.channel(this.channelName).trigger(u.b.ShowSpinner);var n=0,t=function(){++n===e.libraries.length&&(e.triggerMethod("hide"),e.videoDataService.clearVideoCache(),r.Radio.channel(h.a.LIBRARY_STATUS).trigger("status:changed"))};g.a.noPublisher(this.customerMetadata)?this.libraries.each((function(n){e.libraryDataService.publishLibrary(n.get("id"),t)})):this.migrationVideoDataService.publishLibraries((function(){i.a.AppLinkHelper.trigger({application:l.b.MIGRATION_WIZARD,action:l.a.MigrationWizard.PUBLISH_LIBRARY_PROGRESS})}))}},{key:"requiredResources",get:function(){return{libraries:f.b.libraries,customerMetadata:p.b.customerMetaData}}},{key:"viewOptions",value:function(){return{noPublisher:g.a.noPublisher(this.customerMetadata)}}}])&&v(n.prototype,t),b&&v(n,b),Object.defineProperty(n,"prototype",{writable:!1}),S}(i.a.View)}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[40],{1069:function(t,e,r){"use strict";r.d(e,"a",(function(){return y}));var n=r(2),o=r(37),i=r(3);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var 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(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p="migrationWizard.smartMigrationApiCall",y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(s,t);var e,r,o,a=l(s);function s(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.call(this,i.a.getPhrase(p,"title"))).supportUrl=t,e}return e=s,(r=[{key:"name",get:function(){return"SmartMigrationApiCallError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase(p,"heading"),text:"<p>".concat(i.a.getPhrase(p,"errorNotice")," \n <strong>").concat(i.a.getPhrase(p,"reloadPage"),"</strong></p>\n <p>").concat(i.a.getPhrase(p,"helpGuide",{supportUrl:this.supportUrl,linkClasses:"text-info"}),"</p>"),buttons:[{text:i.a.getPhrase(p,"reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a)},1106:function(t,e,r){"use strict";r(311);var n=r(2),o=r(37),i=r(3);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var 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(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p="migrationWizard.backupProgress",y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(s,t);var e,r,o,a=l(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,i.a.getPhrase(p,"title"))}return e=s,(r=[{key:"name",get:function(){return"BackupProgressError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase(p,"heading"),text:i.a.getPhrase(p,"body"),buttons:[{text:i.a.getPhrase(p,"reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a);function b(t){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var 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(t){return!1}}();return function(){var r,n=v(t);if(e){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m(this,r)}}function m(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(c,t);var e,r,o,a=d(c);function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationProgressError","title"))}return e=c,(r=[{key:"name",get:function(){return"MigrationProgressError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase("migrationWizard.migrationProgressError","heading"),text:i.a.getPhrase("migrationWizard.migrationProgressError","body"),buttons:[{text:i.a.getPhrase("migrationWizard.migrationProgressError","reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&g(e.prototype,r),o&&g(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function O(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _(t,e){return(_=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function k(t){var 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(t){return!1}}();return function(){var r,n=R(t);if(e){var o=R(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return j(this,r)}}function j(t,e){if(e&&("object"===P(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(c,t);var e,r,o,a=k(c);function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationFinalisation","title"))}return e=c,(r=[{key:"name",get:function(){return"MigrationFinalisationError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase("migrationWizard.migrationFinalisation","heading"),text:i.a.getPhrase("migrationWizard.migrationFinalisation","body"),buttons:[{text:i.a.getPhrase("migrationWizard.migrationFinalisation","reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&O(e.prototype,r),o&&O(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);r(1069);r.d(e,"a",(function(){return y})),r.d(e,"c",(function(){return w})),r.d(e,"b",(function(){return E})),r.d(e,"a",(function(){return y}))},1128:function(t,e,r){"use strict";r.d(e,"a",(function(){return b}));var n=r(2),o=r(1189),i=r.n(o),a=r(1190),c=r.n(a);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var 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(t){return!1}}();return function(){var r,n=y(t);if(e){var o=y(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(a,t);var e,r,n,o=f(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t)}return e=a,(r=[{key:"initialize",value:function(){this.listenTo(this.model,"change:percentage",this.update)}},{key:"name",get:function(){return"ProgressCircleComponent"}},{key:"template",get:function(){return c.a}},{key:"lang",get:function(){return"migrationWizard.progressCircle"}},{key:"elements",get:function(){return{circle:".progress-circle",text:".progress-circle-text"}}},{key:"viewOptions",value:function(){return{styles:i.a,text:this.options.text,class:this.options.class,percentage:this.options.percentage}}},{key:"onRender",value:function(){this.update()}},{key:"update",value:function(){var t=this.model.get("percentage")||0,e=this.getUI("circle").get(0),r=2*e.r.baseVal.value*Math.PI;e.style.strokeDasharray="".concat(r," ").concat(r),e.style.strokeDashoffset=r;var n=r-t/100*r;e.style.strokeDashoffset=n;var o=this.getUI("text");o&&o.text("".concat(t,"%"))}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.a.Component)},1189:function(t,e,r){t.exports={circle:"_3iX0l",extraText:"_1nYnx",progressCircleContainer:"_2l1Al",progressCircle:"_1RbA5"}},1190:function(t,e,r){var n=r(10);t.exports=(n.default||n).template({1:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression;return' <span class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.extraText:i,e))+'">'+c(a(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression,u=null!=e?e:t.nullContext||{};return'<div class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.circle:i,e))+" "+c(a(null!=(i=null!=e?e.options:e)?i.class:i,e))+'">\r\n <span>\r\n <span class="progress-circle-text">'+c((r.lang||e&&e.lang||t.hooks.helperMissing).call(u,"progress",{name:"lang",hash:{percentage:null!=(i=null!=e?e.options:e)?i.percentage:i},data:o}))+"</span>\r\n"+(null!=(i=r.if.call(u,null!=(i=null!=e?e.options:e)?i.text:i,{name:"if",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?i:"")+' </span>\r\n\r\n <svg class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.progressCircleContainer:i,e))+'">\r\n <circle class="progress-circle '+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.progressCircle:i,e))+'" transform=\'rotate(270 160 0)\' stroke-width="28" fill="transparent" r="150">\r\n </svg>\r\n</div>'},useData:!0})},1373:function(t,e,r){t.exports={backupProgress:"_15jUh",info:"_1NjZL",progress:"fp9FZ",migrationBackupContainer:"_28z_5"}},1374:function(t,e,r){var n=r(10);t.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=null!=e?e:t.nullContext||{},c=t.hooks.helperMissing,u=t.escapeExpression;return'<h4 class="pb-4">'+u((r.lang||e&&e.lang||c).call(a,"heading",{name:"lang",hash:{},data:o}))+'</h4>\r\n<div class="progress-circle-region"></div>\r\n<p class="'+u(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.info:i,e))+' pt-4">\r\n '+(null!=(i=(r.lang||e&&e.lang||c).call(a,"info",{name:"lang",hash:{},data:o}))?i:"")+"\r\n</p>"},useData:!0})},1460:function(t,e,r){"use strict";r.r(e),r.d(e,"PublisherBackupProgressView",(function(){return P}));var n=r(2),o=r(5),i=r(30),a=r(1373),c=r.n(a),u=r(1374),l=r.n(u),s=r(1106),f=r(0),p=r(3),y=r(1128);function b(t){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function m(t){var 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(t){return!1}}();return function(){var r,n=w(t);if(e){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}function v(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var P=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(b,t);var e,r,a,u=m(b);function b(){return g(this,b),u.apply(this,arguments)}return e=b,(r=[{key:"initialize",value:function(){this.viewModel=i.a.get("backup:progress",{percentage:0}),this.migrationVideoDataService=o.a.getInstance(f.g.MigrationVideo,this),this.bindMigrationDataListeners()}},{key:"name",get:function(){return"PublisherBackupProgressView"}},{key:"title",get:function(){return p.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.publisherBackupProgress"}},{key:"className",get:function(){return"container text-center p-5 bg-white ".concat(c.a.migrationBackupContainer," ").concat(c.a.backupProgress)}},{key:"template",get:function(){return l.a}},{key:"regions",value:function(){return{progressCircle:{replaceElement:!0,el:".progress-circle-region"}}}},{key:"bindMigrationDataListeners",value:function(){this.listenTo(f.e.MIGRATION,"".concat(f.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(f.e.MIGRATION,"".concat(f.f.CUSTOMER_VIDEO,":count:error"),this.onError)}},{key:"onError",value:function(){n.a.ErrorHelper.throw(new s.a)}},{key:"poll",value:function(){var t=this;this.migrationVideoDataService.getCustomerVideoCount((function(e){t.isDestroyed()||(t.videoCount=e,t.setPercentage(),t.viewModel.get("percentage")>=100?t.migrationVideoDataService.clearCacheAndGetCustomerMetadata((function(){n.a.AppLinkHelper.trigger({application:f.b.MIGRATION_WIZARD,action:f.a.MigrationWizard.BACKUP_COMPLETE})})):(setTimeout((function(){return t.poll()}),5e3),t.render()))}))}},{key:"setPercentage",value:function(){if(this.videoCount){var t=100*this.videoCount.get("progressPercentage");t>100&&(t=100),this.viewModel.set({percentage:Math.round(t)})}}},{key:"renderProgressCircle",value:function(){this.showChildView("progressCircle",new y.a({model:this.viewModel,text:p.a.getPhrase(this.lang,"hasBeenBackedUp"),class:c.a.progress}))}},{key:"onBeforeRender",value:function(){return this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),!!this.customerMetadata}},{key:"viewOptions",value:function(){return{styles:c.a,timeRemaining:"30 minutes"}}},{key:"onRender",value:function(){this.pollingStarted||(this.poll(),this.pollingStarted=!0),this.renderProgressCircle()}}])&&h(e.prototype,r),a&&h(e,a),Object.defineProperty(e,"prototype",{writable:!1}),b}(n.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[40],{1070:function(t,e,r){"use strict";r.d(e,"a",(function(){return y}));var n=r(2),o=r(37),i=r(3);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var 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(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p="migrationWizard.smartMigrationApiCall",y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(s,t);var e,r,o,a=l(s);function s(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.call(this,i.a.getPhrase(p,"title"))).supportUrl=t,e}return e=s,(r=[{key:"name",get:function(){return"SmartMigrationApiCallError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase(p,"heading"),text:"<p>".concat(i.a.getPhrase(p,"errorNotice")," \n <strong>").concat(i.a.getPhrase(p,"reloadPage"),"</strong></p>\n <p>").concat(i.a.getPhrase(p,"helpGuide",{supportUrl:this.supportUrl,linkClasses:"text-info"}),"</p>"),buttons:[{text:i.a.getPhrase(p,"reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a)},1107:function(t,e,r){"use strict";r(311);var n=r(2),o=r(37),i=r(3);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var 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(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p="migrationWizard.backupProgress",y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(s,t);var e,r,o,a=l(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,i.a.getPhrase(p,"title"))}return e=s,(r=[{key:"name",get:function(){return"BackupProgressError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase(p,"heading"),text:i.a.getPhrase(p,"body"),buttons:[{text:i.a.getPhrase(p,"reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a);function b(t){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var 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(t){return!1}}();return function(){var r,n=v(t);if(e){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m(this,r)}}function m(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(c,t);var e,r,o,a=d(c);function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationProgressError","title"))}return e=c,(r=[{key:"name",get:function(){return"MigrationProgressError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase("migrationWizard.migrationProgressError","heading"),text:i.a.getPhrase("migrationWizard.migrationProgressError","body"),buttons:[{text:i.a.getPhrase("migrationWizard.migrationProgressError","reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&g(e.prototype,r),o&&g(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function O(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _(t,e){return(_=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function k(t){var 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(t){return!1}}();return function(){var r,n=R(t);if(e){var o=R(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return j(this,r)}}function j(t,e){if(e&&("object"===P(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(c,t);var e,r,o,a=k(c);function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationFinalisation","title"))}return e=c,(r=[{key:"name",get:function(){return"MigrationFinalisationError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase("migrationWizard.migrationFinalisation","heading"),text:i.a.getPhrase("migrationWizard.migrationFinalisation","body"),buttons:[{text:i.a.getPhrase("migrationWizard.migrationFinalisation","reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&O(e.prototype,r),o&&O(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);r(1070);r.d(e,"a",(function(){return y})),r.d(e,"c",(function(){return w})),r.d(e,"b",(function(){return E})),r.d(e,"a",(function(){return y}))},1129:function(t,e,r){"use strict";r.d(e,"a",(function(){return b}));var n=r(2),o=r(1190),i=r.n(o),a=r(1191),c=r.n(a);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var 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(t){return!1}}();return function(){var r,n=y(t);if(e){var o=y(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(a,t);var e,r,n,o=f(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t)}return e=a,(r=[{key:"initialize",value:function(){this.listenTo(this.model,"change:percentage",this.update)}},{key:"name",get:function(){return"ProgressCircleComponent"}},{key:"template",get:function(){return c.a}},{key:"lang",get:function(){return"migrationWizard.progressCircle"}},{key:"elements",get:function(){return{circle:".progress-circle",text:".progress-circle-text"}}},{key:"viewOptions",value:function(){return{styles:i.a,text:this.options.text,class:this.options.class,percentage:this.options.percentage}}},{key:"onRender",value:function(){this.update()}},{key:"update",value:function(){var t=this.model.get("percentage")||0,e=this.getUI("circle").get(0),r=2*e.r.baseVal.value*Math.PI;e.style.strokeDasharray="".concat(r," ").concat(r),e.style.strokeDashoffset=r;var n=r-t/100*r;e.style.strokeDashoffset=n;var o=this.getUI("text");o&&o.text("".concat(t,"%"))}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.a.Component)},1190:function(t,e,r){t.exports={circle:"_3iX0l",extraText:"_1nYnx",progressCircleContainer:"_2l1Al",progressCircle:"_1RbA5"}},1191:function(t,e,r){var n=r(10);t.exports=(n.default||n).template({1:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression;return' <span class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.extraText:i,e))+'">'+c(a(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression,u=null!=e?e:t.nullContext||{};return'<div class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.circle:i,e))+" "+c(a(null!=(i=null!=e?e.options:e)?i.class:i,e))+'">\r\n <span>\r\n <span class="progress-circle-text">'+c((r.lang||e&&e.lang||t.hooks.helperMissing).call(u,"progress",{name:"lang",hash:{percentage:null!=(i=null!=e?e.options:e)?i.percentage:i},data:o}))+"</span>\r\n"+(null!=(i=r.if.call(u,null!=(i=null!=e?e.options:e)?i.text:i,{name:"if",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?i:"")+' </span>\r\n\r\n <svg class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.progressCircleContainer:i,e))+'">\r\n <circle class="progress-circle '+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.progressCircle:i,e))+'" transform=\'rotate(270 160 0)\' stroke-width="28" fill="transparent" r="150">\r\n </svg>\r\n</div>'},useData:!0})},1374:function(t,e,r){t.exports={backupProgress:"_15jUh",info:"_1NjZL",progress:"fp9FZ",migrationBackupContainer:"_28z_5"}},1375:function(t,e,r){var n=r(10);t.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=null!=e?e:t.nullContext||{},c=t.hooks.helperMissing,u=t.escapeExpression;return'<h4 class="pb-4">'+u((r.lang||e&&e.lang||c).call(a,"heading",{name:"lang",hash:{},data:o}))+'</h4>\r\n<div class="progress-circle-region"></div>\r\n<p class="'+u(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.info:i,e))+' pt-4">\r\n '+(null!=(i=(r.lang||e&&e.lang||c).call(a,"info",{name:"lang",hash:{},data:o}))?i:"")+"\r\n</p>"},useData:!0})},1461:function(t,e,r){"use strict";r.r(e),r.d(e,"PublisherBackupProgressView",(function(){return P}));var n=r(2),o=r(5),i=r(30),a=r(1374),c=r.n(a),u=r(1375),l=r.n(u),s=r(1107),f=r(0),p=r(3),y=r(1129);function b(t){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function m(t){var 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(t){return!1}}();return function(){var r,n=w(t);if(e){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}function v(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var P=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(b,t);var e,r,a,u=m(b);function b(){return g(this,b),u.apply(this,arguments)}return e=b,(r=[{key:"initialize",value:function(){this.viewModel=i.a.get("backup:progress",{percentage:0}),this.migrationVideoDataService=o.a.getInstance(f.g.MigrationVideo,this),this.bindMigrationDataListeners()}},{key:"name",get:function(){return"PublisherBackupProgressView"}},{key:"title",get:function(){return p.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.publisherBackupProgress"}},{key:"className",get:function(){return"container text-center p-5 bg-white ".concat(c.a.migrationBackupContainer," ").concat(c.a.backupProgress)}},{key:"template",get:function(){return l.a}},{key:"regions",value:function(){return{progressCircle:{replaceElement:!0,el:".progress-circle-region"}}}},{key:"bindMigrationDataListeners",value:function(){this.listenTo(f.e.MIGRATION,"".concat(f.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(f.e.MIGRATION,"".concat(f.f.CUSTOMER_VIDEO,":count:error"),this.onError)}},{key:"onError",value:function(){n.a.ErrorHelper.throw(new s.a)}},{key:"poll",value:function(){var t=this;this.migrationVideoDataService.getCustomerVideoCount((function(e){t.isDestroyed()||(t.videoCount=e,t.setPercentage(),t.viewModel.get("percentage")>=100?t.migrationVideoDataService.clearCacheAndGetCustomerMetadata((function(){n.a.AppLinkHelper.trigger({application:f.b.MIGRATION_WIZARD,action:f.a.MigrationWizard.BACKUP_COMPLETE})})):(setTimeout((function(){return t.poll()}),5e3),t.render()))}))}},{key:"setPercentage",value:function(){if(this.videoCount){var t=100*this.videoCount.get("progressPercentage");t>100&&(t=100),this.viewModel.set({percentage:Math.round(t)})}}},{key:"renderProgressCircle",value:function(){this.showChildView("progressCircle",new y.a({model:this.viewModel,text:p.a.getPhrase(this.lang,"hasBeenBackedUp"),class:c.a.progress}))}},{key:"onBeforeRender",value:function(){return this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),!!this.customerMetadata}},{key:"viewOptions",value:function(){return{styles:c.a,timeRemaining:"30 minutes"}}},{key:"onRender",value:function(){this.pollingStarted||(this.poll(),this.pollingStarted=!0),this.renderProgressCircle()}}])&&h(e.prototype,r),a&&h(e,a),Object.defineProperty(e,"prototype",{writable:!1}),b}(n.a.View)}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[41],{1319:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibraryContainer:i,t))+'">\r\n <button class="applink-new-library btn btn-outline-secondary '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibrary:i,t))+'">\r\n <span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.plus:i,t))+' d-inline-block position-absolute">\r\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+"\r\n </span>\r\n "+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"newLibrary",{name:"lang",hash:{},data:o}))+"\r\n </button>\r\n</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<div class="logo-region"></div>\r\n<div class="folder-tree-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateLibraries:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1320:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selected:i,t))},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda;return' <span class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.caret:i,t))+' d-inline-block position-absolute">\r\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.caretSvg:i,t))?i:"")+"\r\n </span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l,a=e.lambda,s=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<div class="position-relative border-bottom '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.library:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\r\n <a class="position-relative library-event '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.libraryAnchor:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.open:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+' ui-anchor no-hover-text-underline">\r\n'+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.hasFolders:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+' <span class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.text:i,t))+' ui-text">'+s("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:e.hooks.helperMissing)?l.call(u,{name:"name",hash:{},data:o}):l)+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n<div class="folders-region"></div>'},useData:!0})},1321:function(e,t,n){e.exports={addLibrary:"_1O42p",addLibraryContainer:"_1HX0v",plus:"_3aHT2"}},1322:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l,a=e.escapeExpression;return'<img src="'+a("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"url",hash:{},data:o}):l)+'" class="'+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+'"/>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<a class="d-inline-flex align-items-center no-decoration '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addCrest:i,t))+'" href="'+a(l(null!=(i=null!=t?t.options:t)?i.uploadLogoUrl:i,t))+'" target="_blank">\r\n '+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"crest",{name:"lang",hash:{},data:o}))+"\r\n</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.url:t,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1323:function(e,t,n){e.exports={image:"Cz1y1",addCrest:"_2PAV_"}},1481:function(e,t,n){"use strict";n.r(t);var r=n(2),o=n(16),i=n(68),l=n(0),a=n(146),s=n(1319),u=n.n(s),c=n(5),f=n(1100),p=n(1121),y=n(1320),d=n.n(y),h=n(1198),b=n(1200),v=n.n(b),m=n(13),g=n(30),w=n(1101),k=n(4);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})(e)}function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var D=function(e){C(n,e);var t=x(n);function n(e){return L(this,n),t.call(this,e)}return R(n,[{key:"initialize",value:function(){var e=this.options.forceOpen||this.options.libraryId&&this.model.get("id").toString()===this.options.libraryId.toString();this.viewModel=g.a.get("".concat("library:left:nav",":").concat(this.model.get("id"))),this.viewModel.set("open",e),this.viewModel.set("disabled",!1),this.listenTo(this.model,"change:name",this.render),this.options.hasMultipleLibraries&&this.listenTo(this,"open:sub:folders",this.onOpenSubFolders),this.videoDragDropService=c.a.getInstance(l.x.VideoDragDrop,this)}},{key:"name",get:function(){return"LeftNavLibraryComponent"}},{key:"template",get:function(){return d.a}},{key:"className",get:function(){return v.a.libraryContainer}},{key:"behaviors",get:function(){var e=[l.w.FOLDER_DRAG_DROP];return this.options.hasMultipleLibraries&&e.push(l.w.VIDEO_DRAG_DROP),[{behaviorClass:w.a,ui:"anchor",channelNames:e,analyticsOptions:{location:k.LocationContext.LeftNav}}]}},{key:"regions",value:function(){return{folders:{el:".folders-region",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".ui-anchor":{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.LIBRARY,args:[this.model.get("id")]}}}},{key:"events",value:function(){return{"click .library-event":"onClick"}}},{key:"elements",get:function(){return{anchor:".ui-anchor",text:".ui-text"}}},{key:"onClick",value:function(e){this.viewModel.get("open")&&(e.stopImmediatePropagation(),e.preventDefault(),this.viewModel.set("open",!this.viewModel.get("open")),this.render())}},{key:"onOpenSubFolders",value:function(){if(this.videoDragDropService.getDisabledLibraryIds().includes(this.model.get("id")))return this.viewModel.set("disabled",!0),void this.render();this.viewModel.set("open",!0),this.render()}},{key:"hasFolders",value:function(){return!!m.f.getFirstType(this.model.children,"category")}},{key:"analyticsOptions",get:function(){return{location:k.LocationContext.LeftNav}}},{key:"viewOptions",value:function(){return{styles:v.a,caretSvg:o.a.getSvg(o.b.Caret),open:this.viewModel.get("open"),hasFolders:this.hasFolders(),disabled:this.viewModel.get("disabled")}}},{key:"onRender",value:function(){this.showChildView("actions",new h.a({model:this.model,extraClasses:"rounded-circle mr-1 ".concat(v.a.actions),buttonClass:"text-muted",analyticsOptions:this.analyticsOptions})),this.model.children&&this.model.children.length&&this.viewModel.get("open")&&this.showChildView("folders",new f.a({appLink:{action:l.a.LibraryEditor.FOLDER,application:l.b.LIBRARY_EDITOR},linkArgs:function(e){return[e.get("id")]},collection:this.model.children,channelName:"".concat(this.cid),childrenProperty:"children",actions:p.a,folderTreeId:this.options.folderTreeId,analyticsOptions:this.analyticsOptions}))}}]),n}(r.a.Component),P=function(e){C(n,e);var t=x(n);function n(e){return L(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"LeftNavLibrariesComponent"}},{key:"childView",get:function(){return D}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,libraryId:this.options.libraryId,folderTreeId:this.options.folderTreeId,forceOpen:this.options.forceOpen,hasMultipleLibraries:this.collection.length>1}}}]),n}(r.a.ComponentCollection),T=n(1321),j=n.n(T),N=n(14),M=n(144),A=n(201),B=n(9),U=n(95),V=n(57),F=n(42),Y=n(1322),G=n.n(Y),z=n(1323),H=n.n(z);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})(e)}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q(e);if(t){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return K(this,n)}}function K(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(i,e);var t,n,r,o=X(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"CustomerLogoComponent"}},{key:"template",get:function(){return G.a}},{key:"lang",get:function(){return"libraryEditor.customerLogo"}},{key:"className",get:function(){return"text-center p-3 position-relative"}},{key:"events",value:function(){return e={},t="click .".concat(H.a.addCrest),n="onClickAddLogo",t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"onClickAddLogo",value:function(){var e={location:k.LocationContext.LeftNav,actionType:k.UserAction.Create,entity:k.EntityType.Logo};F.a.logUserAction({},e)}},{key:"viewOptions",value:function(){return{styles:H.a,uploadLogoUrl:V.a.urlBuilder(V.a.safeUrlConcat(this.options.onlineUrl,l.t.UPLOAD_LOGO),{loginPrompt:!1})}}}])&&q(t.prototype,n),r&&q(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component);function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=oe(e);if(t){var o=oe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return re(this,n)}}function re(e,t){if(t&&("object"===$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"LeftNavigationView",(function(){return ie}));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&&te(e,t)}(f,e);var t,n,r,s=ne(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),s.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=c.a.getInstance(N.a.Settings,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:library",this.onSelectLibrary),this.listenTo(l.e.LIBRARY,"cache:cleared",this.fetchData),this.listenTo(l.w.FOLDER_DRAG_DROP,"re:render:left:nav",this.render),this.listenTo(l.e.SETTINGS,"".concat(l.f.SETTINGS,":sync"),this.render)}},{key:"name",get:function(){return"LeftNavigationView"}},{key:"title",get:function(){return!1}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.leftNavigation"}},{key:"className",get:function(){return"bg-white pb-3"}},{key:"template",get:function(){return u.a}},{key:"regions",value:function(){return{logo:{el:".logo-region",replaceElement:!1},folderTree:{el:".folder-tree-region",replaceElement:!1,partialLoading:B.h.LeftNav}}}},{key:"events",value:function(){return{"click .new-folder":"newFolder"}}},{key:"appLinks",get:function(){return{".applink-new-library":{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.NEW_LIBRARY}}}},{key:"fetchData",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),i.a.MaxCustomLibraries)}},{key:"onSelectLibrary",value:function(e){this.collection.each((function(t){g.a.get("".concat("library:left:nav",":").concat(t.id)).set("open",t.id.toString()===e)})),this.render()}},{key:"renderLogo",value:function(){this.showChildView("logo",new Z({model:this.currentUser.get("customerLogo"),customerId:this.currentUser.get("customerId"),onlineUrl:this.config.get("onlineUrl")}))}},{key:"renderLeftNav",value:function(){var e=new P({collection:this.collection,channelName:this.channelName,libraryId:this.options.libraryId,folderTreeId:U.a.LIBRARY_EDITOR,forceOpen:1===this.collection.length});this.showChildView("folderTree",e)}},{key:"requiredResources",get:function(){return{currentUser:M.b.currentUser,config:A.b.config,collection:a.b.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.maxCustomLibraries}},{key:"viewOptions",value:function(){if(this.collection)return{styles:j.a,plusSvg:o.a.getSvg(o.b.Plus),canCreateLibraries:!!this.maxCustomLibraries&&this.maxCustomLibraries.get("value")>this.collection.length}}},{key:"onRender",value:function(){this.renderLogo(),this.renderLeftNav()}}])&&ee(t.prototype,n),r&&ee(t,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(r.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[41],{1320:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibraryContainer:i,t))+'">\r\n <button class="applink-new-library btn btn-outline-secondary '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibrary:i,t))+'">\r\n <span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.plus:i,t))+' d-inline-block position-absolute">\r\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+"\r\n </span>\r\n "+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"newLibrary",{name:"lang",hash:{},data:o}))+"\r\n </button>\r\n</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<div class="logo-region"></div>\r\n<div class="folder-tree-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateLibraries:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1321:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selected:i,t))},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda;return' <span class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.caret:i,t))+' d-inline-block position-absolute">\r\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.caretSvg:i,t))?i:"")+"\r\n </span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l,a=e.lambda,s=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<div class="position-relative border-bottom '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.library:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\r\n <a class="position-relative library-event '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.libraryAnchor:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.open:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+' ui-anchor no-hover-text-underline">\r\n'+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.hasFolders:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+' <span class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.text:i,t))+' ui-text">'+s("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:e.hooks.helperMissing)?l.call(u,{name:"name",hash:{},data:o}):l)+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n<div class="folders-region"></div>'},useData:!0})},1322:function(e,t,n){e.exports={addLibrary:"_1O42p",addLibraryContainer:"_1HX0v",plus:"_3aHT2"}},1323:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l,a=e.escapeExpression;return'<img src="'+a("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"url",hash:{},data:o}):l)+'" class="'+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+'"/>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<a class="d-inline-flex align-items-center no-decoration '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addCrest:i,t))+'" href="'+a(l(null!=(i=null!=t?t.options:t)?i.uploadLogoUrl:i,t))+'" target="_blank">\r\n '+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"crest",{name:"lang",hash:{},data:o}))+"\r\n</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.url:t,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1324:function(e,t,n){e.exports={image:"Cz1y1",addCrest:"_2PAV_"}},1482:function(e,t,n){"use strict";n.r(t);var r=n(2),o=n(16),i=n(68),l=n(0),a=n(146),s=n(1320),u=n.n(s),c=n(5),f=n(1101),p=n(1122),y=n(1321),d=n.n(y),h=n(1199),b=n(1201),v=n.n(b),m=n(12),g=n(30),w=n(1102),k=n(4);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})(e)}function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var D=function(e){C(n,e);var t=x(n);function n(e){return L(this,n),t.call(this,e)}return R(n,[{key:"initialize",value:function(){var e=this.options.forceOpen||this.options.libraryId&&this.model.get("id").toString()===this.options.libraryId.toString();this.viewModel=g.a.get("".concat("library:left:nav",":").concat(this.model.get("id"))),this.viewModel.set("open",e),this.viewModel.set("disabled",!1),this.listenTo(this.model,"change:name",this.render),this.options.hasMultipleLibraries&&this.listenTo(this,"open:sub:folders",this.onOpenSubFolders),this.videoDragDropService=c.a.getInstance(l.x.VideoDragDrop,this)}},{key:"name",get:function(){return"LeftNavLibraryComponent"}},{key:"template",get:function(){return d.a}},{key:"className",get:function(){return v.a.libraryContainer}},{key:"behaviors",get:function(){var e=[l.w.FOLDER_DRAG_DROP];return this.options.hasMultipleLibraries&&e.push(l.w.VIDEO_DRAG_DROP),[{behaviorClass:w.a,ui:"anchor",channelNames:e,analyticsOptions:{location:k.LocationContext.LeftNav}}]}},{key:"regions",value:function(){return{folders:{el:".folders-region",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".ui-anchor":{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.LIBRARY,args:[this.model.get("id")]}}}},{key:"events",value:function(){return{"click .library-event":"onClick"}}},{key:"elements",get:function(){return{anchor:".ui-anchor",text:".ui-text"}}},{key:"onClick",value:function(e){this.viewModel.get("open")&&(e.stopImmediatePropagation(),e.preventDefault(),this.viewModel.set("open",!this.viewModel.get("open")),this.render())}},{key:"onOpenSubFolders",value:function(){if(this.videoDragDropService.getDisabledLibraryIds().includes(this.model.get("id")))return this.viewModel.set("disabled",!0),void this.render();this.viewModel.set("open",!0),this.render()}},{key:"hasFolders",value:function(){return!!m.f.getFirstType(this.model.children,"category")}},{key:"analyticsOptions",get:function(){return{location:k.LocationContext.LeftNav}}},{key:"viewOptions",value:function(){return{styles:v.a,caretSvg:o.a.getSvg(o.b.Caret),open:this.viewModel.get("open"),hasFolders:this.hasFolders(),disabled:this.viewModel.get("disabled")}}},{key:"onRender",value:function(){this.showChildView("actions",new h.a({model:this.model,extraClasses:"rounded-circle mr-1 ".concat(v.a.actions),buttonClass:"text-muted",analyticsOptions:this.analyticsOptions})),this.model.children&&this.model.children.length&&this.viewModel.get("open")&&this.showChildView("folders",new f.a({appLink:{action:l.a.LibraryEditor.FOLDER,application:l.b.LIBRARY_EDITOR},linkArgs:function(e){return[e.get("id")]},collection:this.model.children,channelName:"".concat(this.cid),childrenProperty:"children",actions:p.a,folderTreeId:this.options.folderTreeId,analyticsOptions:this.analyticsOptions}))}}]),n}(r.a.Component),P=function(e){C(n,e);var t=x(n);function n(e){return L(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"LeftNavLibrariesComponent"}},{key:"childView",get:function(){return D}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,libraryId:this.options.libraryId,folderTreeId:this.options.folderTreeId,forceOpen:this.options.forceOpen,hasMultipleLibraries:this.collection.length>1}}}]),n}(r.a.ComponentCollection),T=n(1322),j=n.n(T),N=n(14),M=n(144),A=n(201),B=n(9),U=n(95),V=n(57),F=n(42),Y=n(1323),G=n.n(Y),z=n(1324),H=n.n(z);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})(e)}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q(e);if(t){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return K(this,n)}}function K(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(i,e);var t,n,r,o=X(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"CustomerLogoComponent"}},{key:"template",get:function(){return G.a}},{key:"lang",get:function(){return"libraryEditor.customerLogo"}},{key:"className",get:function(){return"text-center p-3 position-relative"}},{key:"events",value:function(){return e={},t="click .".concat(H.a.addCrest),n="onClickAddLogo",t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"onClickAddLogo",value:function(){var e={location:k.LocationContext.LeftNav,actionType:k.UserAction.Create,entity:k.EntityType.Logo};F.a.logUserAction({},e)}},{key:"viewOptions",value:function(){return{styles:H.a,uploadLogoUrl:V.a.urlBuilder(V.a.safeUrlConcat(this.options.onlineUrl,l.t.UPLOAD_LOGO),{loginPrompt:!1})}}}])&&q(t.prototype,n),r&&q(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component);function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=oe(e);if(t){var o=oe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return re(this,n)}}function re(e,t){if(t&&("object"===$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"LeftNavigationView",(function(){return ie}));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&&te(e,t)}(f,e);var t,n,r,s=ne(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),s.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=c.a.getInstance(N.a.Settings,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:library",this.onSelectLibrary),this.listenTo(l.e.LIBRARY,"cache:cleared",this.fetchData),this.listenTo(l.w.FOLDER_DRAG_DROP,"re:render:left:nav",this.render),this.listenTo(l.e.SETTINGS,"".concat(l.f.SETTINGS,":sync"),this.render)}},{key:"name",get:function(){return"LeftNavigationView"}},{key:"title",get:function(){return!1}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.leftNavigation"}},{key:"className",get:function(){return"bg-white pb-3"}},{key:"template",get:function(){return u.a}},{key:"regions",value:function(){return{logo:{el:".logo-region",replaceElement:!1},folderTree:{el:".folder-tree-region",replaceElement:!1,partialLoading:B.h.LeftNav}}}},{key:"events",value:function(){return{"click .new-folder":"newFolder"}}},{key:"appLinks",get:function(){return{".applink-new-library":{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.NEW_LIBRARY}}}},{key:"fetchData",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),i.a.MaxCustomLibraries)}},{key:"onSelectLibrary",value:function(e){this.collection.each((function(t){g.a.get("".concat("library:left:nav",":").concat(t.id)).set("open",t.id.toString()===e)})),this.render()}},{key:"renderLogo",value:function(){this.showChildView("logo",new Z({model:this.currentUser.get("customerLogo"),customerId:this.currentUser.get("customerId"),onlineUrl:this.config.get("onlineUrl")}))}},{key:"renderLeftNav",value:function(){var e=new P({collection:this.collection,channelName:this.channelName,libraryId:this.options.libraryId,folderTreeId:U.a.LIBRARY_EDITOR,forceOpen:1===this.collection.length});this.showChildView("folderTree",e)}},{key:"requiredResources",get:function(){return{currentUser:M.b.currentUser,config:A.b.config,collection:a.b.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.maxCustomLibraries}},{key:"viewOptions",value:function(){if(this.collection)return{styles:j.a,plusSvg:o.a.getSvg(o.b.Plus),canCreateLibraries:!!this.maxCustomLibraries&&this.maxCustomLibraries.get("value")>this.collection.length}}},{key:"onRender",value:function(){this.renderLogo(),this.renderLeftNav()}}])&&ee(t.prototype,n),r&&ee(t,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(r.a.View)}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[42],{1421:function(e,t,n){e.exports={smart:"_1dRs0",leftNav:"_3dpUO"}},1422:function(e,t,n){e.exports={item:"_13Gu_",text:"_2mbEb",folderTree:"_2NhVk",node:"_1dMK1",selected:"_1AACi"}},1423:function(e,t,n){var i=n(10);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return'<div class="selected-banner-region"></div>\r\n<div class="search-region"></div>\r\n<div class="banner-region"></div>\r\n<div class="col-4 '+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.leftNav:o,t))+'">\r\n <div class="left-nav-region"></div>\r\n</div>\r\n<div class="col">\r\n <div class="header-region"></div>\r\n <div class="video-list-region"></div>\r\n</div>\r\n<div class="footer-region"></div>'},useData:!0})},1424:function(e,t,n){var i=n(10);e.exports=(i.default||i).template({1:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return' <a class="applink-goback '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.back:o,t))+'">\r\n <span class="align-middle d-inline-block '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.backSvgContainer:o,t))+'">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.backSvg:o,t))?o:"")+"</span>\r\n </a>\r\n"},3:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return" "+(null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"resultsFor",{name:"lang",hash:{searchTerm:null!=(o=null!=t?t.options:t)?o.searchTerm:o,smartCount:null!=(o=null!=t?t.options:t)?o.results:o},data:r}))?o:"")+"\r\n"},5:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return" "+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.name:o,t))+"\r\n"},7:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<div class="col-4 text-right py-2 '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.subheader:o,t))+'">\r\n <div class="cursor-pointer toggle-migrated h-100 d-flex align-items-center justify-content-end">\r\n <span class="'+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.svg:o,t))+' mr-1">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.svg:o,t))?o:"")+"</span>\r\n <span>"+(null!=(o=n.if.call(l,null!=(o=null!=t?t.options:t)?o.hidden:o,{name:"if",hash:{},fn:e.program(8,r,0),inverse:e.program(10,r,0),data:r}))?o:"")+" "+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"migrated",{name:"lang",hash:{},data:r}))+"</span>\r\n </div>\r\n</div>\r\n"},8:function(e,t,n,i,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"show",{name:"lang",hash:{},data:r}))},10:function(e,t,n,i,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hide",{name:"lang",hash:{},data:r}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{};return'<div class="col-8">\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.goBack:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:"")+' <h4 class="'+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.header:o,t))+' py-2">\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.searchTerm:o,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.program(5,r,0),data:r}))?o:"")+" </h4>\r\n</div>\r\n\r\n"+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.showMigrationToggle:o,{name:"if",hash:{},fn:e.program(7,r,0),inverse:e.noop,data:r}))?o:"")},useData:!0})},1483:function(e,t,n){"use strict";n.r(t);var i=n(2),r=n(3),o=n(51),a=n(93),s=n(1421),l=n.n(s),c=n(1422),u=n.n(c),d=n(1423),h=n.n(d),f=n(9),g=n(1100),p=n(1130),v=n(1),y=n(6),m=n(5),b=n(16),S=n(338),w=n(1424),k=n.n(w),M=n(53),I=n(120),T=n(0);function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(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,i.key,i)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function R(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 r=V(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return A(this,n)}}function A(e,t){if(t&&("object"===C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&E(e,t)}(o,e);var t,n,i,r=R(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,e)}return t=o,(n=[{key:"initialize",value:function(){this.localOptionsService=m.a.getInstance(T.x.LocalOptions,this),this.migrationVideoDataService=m.a.getInstance(T.g.MigrationVideo,this);var e=this.localOptionsService.getOption(M.b.MigratedHidden);v.isUndefined(e)?(this.setMigrationHiddenOption(!1),this.migratedHidden=!1):this.migratedHidden=e}},{key:"name",get:function(){return"CurrentSectionHeaderView"}},{key:"title",get:function(){return!1}},{key:"lang",get:function(){return"migrationWizard.currentSectionHeader"}},{key:"className",get:function(){return"row px-2 ".concat(S.currentHeader)}},{key:"template",get:function(){return k.a}},{key:"elements",get:function(){return{toggleMigrated:".toggle-migrated"}}},{key:"events",value:function(){return{"click @ui.toggleMigrated":"toggleMigrated"}}},{key:"viewOptions",value:function(){return{styles:S,name:this.options.searchTerm||this.model&&this.model.get("name"),hidden:this.migratedHidden,svg:b.a.getSvg(this.migratedHidden?b.b.VisibleOn:b.b.VisibleOff),goBack:this.options.searchTerm,showMigrationToggle:!this.options.initialMigration,backSvg:b.a.getSvg("arrow-left",{prefix:"fas"}),searchTerm:this.options.searchTerm,results:10}}},{key:"appLinks",get:function(){return{".applink-goback":{application:I.a.MIGRATION_WIZARD,action:this.options.initialMigration?T.a.MigrationWizard.SMART:T.a.MigrationWizard.HOME}}}},{key:"onBeforeRender",value:function(){var e=this;return!(!this.model&&!this.options.searchTerm&&(this.migrationVideoDataService.getSelected((function(t){t&&(e.model=t,e.triggerToggle(),e.render())})),!this.model))}},{key:"toggleMigrated",value:function(){this.migratedHidden=!this.migratedHidden,this.setMigrationHiddenOption(this.migratedHidden),this.triggerToggle(),this.render()}},{key:"triggerToggle",value:function(){y.Radio.channel(I.b.MIGRATION).trigger(T.i.MigrationWizard.TOGGLE_MIGRATED,this.migratedHidden)}},{key:"setMigrationHiddenOption",value:function(e){this.localOptionsService.setOption(M.b.MigratedHidden,e)}}])&&O(t.prototype,n),i&&O(t,i),Object.defineProperty(t,"prototype",{writable:!1}),o}(i.a.View);function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var P={getSelectedInFolder:function(e,t){var n,i=x(p.a.getSelectedVideosCollection(e).toArray());try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.get("category")===t)return r.get("count")}}catch(e){i.e(e)}finally{i.f()}return 0},findFolder:function(e,t){var n;if(e)return e.forEach((function(e){if(e.get("categoryGuid")===t)n=e;else{var i=P.findFolder(e.get("children"),t);i&&(n=i)}})),n}},L=n(58),B=n(91),D=n(30),j=n(201),H=n(1120),G=n(13),W=n(95),F=n(200),z=n(144);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})(e)}function Z(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,i.key,i)}}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(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=K(e);if(t){var r=K(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return $(this,n)}}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)}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"SmartMigrationView",(function(){return Y}));var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q(e,t)}(d,e);var t,n,s,c=J(d);function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),c.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.viewModel=D.a.get(this.viewModelName,{bannerShown:!0},{ctor:B.e,storage:{type:a.c.LocalStorage,persistProps:["bannerShown"]}}),this.bindListeners(),this.initializeServices()}},{key:"name",get:function(){return"SmartMigrationView"}},{key:"title",get:function(){return r.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.smartMigration"}},{key:"viewModelName",get:function(){return"".concat(this.name,":viewmodel")}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"template",get:function(){return h.a}},{key:"className",get:function(){return"row no-gutters w-100 ".concat(l.a.smart)}},{key:"regions",value:function(){return{selectedBanner:{replaceElement:!0,el:".selected-banner-region"},search:{replaceElement:!0,el:".search-region",partialLoading:f.h.PublisherArchiveSearchBar},banner:{replaceElement:!0,el:".banner-region"},leftNav:{replaceElement:!0,el:".left-nav-region",partialLoading:f.h.PublisherArchiveLeftNav},header:{replaceElement:!0,el:".header-region",partialLoading:f.h.PublisherArchiveSectionHeader},videoList:{replaceElement:!0,el:".video-list-region",partialLoading:f.h.PublisherArchiveVideoList},footer:{replaceElement:!0,el:".footer-region",partialLoading:f.h.PublisherArchiveStatusBar}}}},{key:"initializeServices",value:function(){this.folderCacheService=m.a.getInstance(T.x.FolderCache,this),this.selectedVideoService=m.a.getInstance(T.x.SelectedVideo,this),this.migrationVideoDataService=m.a.getInstance(T.g.MigrationVideo,this),this.alertService=m.a.getInstance(T.x.Alerts)}},{key:"bindListeners",value:function(){this.listenTo(T.e.MIGRATION,T.i.MigrationWizard.SELECTED_CHANGED,this.setSelectedVideos),this.listenTo(T.e.MIGRATION,"manual:review:video:count:sync",this.render),this.listenTo(T.e.MIGRATION,"".concat(T.f.CUSTOMER_VIDEO,":count:sync"),this.render),this.listenTo(T.e.MIGRATION,"".concat(T.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(T.b.MIGRATION_WIZARD,T.i.MigrationWizard.CLOSE_BANNER,this.closeSelectionBanner),this.listenTo(this.channelName,"add:selected",this.addSelected),this.listenTo(this.channelName,"remove:selected",this.removeSelected),this.listenTo(this.viewModel,"change:selectedVideoCount",this.renderStatusBar)}},{key:"fetchVideos",value:function(){var e=this;!this.videos&&this.options.folderChord&&this.migrationVideoDataService.getCustomerVideos(this.options.folderChord,(function(t){e.videos||(e.videos=p.a.toggleMigrated(t,!0),e.setSelectedVideos(),e.isRendering||e.render())}))}},{key:"fetchFolders",value:function(){var e=this;this.folders||this.migrationVideoDataService.getCustomerFolders((function(t){if(!e.folders){if(e.folders=t,e.options.folderChord){var n=e.folderCacheService.getFolderByChord(e.options.folderChord,t);G.f.setSelected(W.a.MIGRATION_WIZARD,n,e.folders),e.selectedFolder=G.f.getSelected(W.a.MIGRATION_WIZARD,t)}else{var r=e.folders.first();if(r)return void i.a.AppLinkHelper.trigger({application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.HOME,params:{folder:r.get("chord")}},{replace:!0})}e.isRendering||e.render()}}))}},{key:"setFolderText",value:function(e,t){var n=this,i=e.get("chord"),r=e.get("name"),o=this.folderCacheService.getFolderCache(),a=this.options.folderChord;if(a){var s,l=P.getSelectedInFolder(t,r);if(i===a){var c=this.migrationVideoDataService.getCustomerVideos(i);if(!this.selectedFolder)return;c&&(o[a]=c.length),s=o[a]}o[i]&&(s=o[i]),l&&s?e.set("text","".concat(r," (").concat(l,"/").concat(s,")")):e.set("text",r),e.children.forEach((function(e){return n.setFolderText(e,t)}))}else e.set("text",r)}},{key:"closeSelectionBanner",value:function(){var e=this.getRegion("selectedBanner");e&&(this.viewModel.set("bannerShown",!1),e.destroy())}},{key:"setSelectedVideos",value:function(){var e=this,t=this.selectedVideoService.getSelectedVideoIds();this.videos&&this.videos.forEach((function(n){return p.a.setChecked(n,t,e.isInitialMigration())})),t&&this.viewModel.set("selectedVideoCount",t.length)}},{key:"addSelected",value:function(e,t){this.selectedVideoService.addSelectedVideos(e,t)}},{key:"removeSelected",value:function(e,t){this.selectedVideoService.removeSelectedVideos(e,t)}},{key:"isInitialMigration",value:function(){return L.a.isInitialMigration(this.customerMetadata)}},{key:"onClickBack",value:function(){var e=this;new G.d({title:r.a.getPhrase(this.lang,"backHeading"),text:r.a.getPhrase(this.lang,"backBody"),buttons:[{text:r.a.getPhrase(this.lang,"discard"),className:"btn btn-danger",success:!0},{text:r.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}]}).render().done((function(){e.selectedVideoService.removeAllSelectedVideos(),e.viewModel.set("alertShown",!1),i.a.AppLinkHelper.trigger({application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.START_MIGRATION})}))}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".".concat(l.a.leftNav)),t=e.find(".".concat(u.a.selected));if(t.length&&!(t.offset().top-e.offset().top+t.height()<e.height())){var n=e.scrollTop()+(t.offset().top-e.offset().top),i=.5*e.height()+.5*t.height();e.scrollTop(n-i)}}},{key:"renderEmptyMessage",value:function(){this.showChildView("videoList",new H.b({text:"No folder selected"}))}},{key:"renderSelectedBanner",value:function(){if(this.isInitialMigration()&&!this.viewModel.get("alertShown")){this.viewModel.set("alertShown",!0);var e={heading:r.a.getPhrase(this.lang,"smartSelected"),message:r.a.getPhrase(this.lang,"last3Years"),type:o.a.Success};this.alertService.createAlert(e)}}},{key:"renderLeftNav",value:function(){var e=this,t=new g.a({styles:u.a,appLink:{action:T.a.MigrationWizard.HOME,application:T.b.MIGRATION_WIZARD},linkParams:function(e){return{folder:e.get("chord")}},collection:this.folders,channelName:"".concat(this.cid),childrenProperty:"children",textProperty:"name",extraClass:"p-0",folderTreeId:W.a.MIGRATION_WIZARD});this.showChildView("leftNav",t),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){e.centerSelectedItem()}))}))}},{key:"renderSearchBar",value:function(){this.showChildView("search",new H.h({selected:this.errorCount.get("count")?"publisher-archive":"none"}))}},{key:"renderStatusBar",value:function(){var e=this;if(this.videoCount){var t={application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.SELECTED,args:[this.options.folderChord]},n=this.videoCount.get("successCount"),i=this.selectedVideoService.getNumberSelected(),o=new H.k({nextAppLink:t,showSelected:!0,nextDisabled:0===i,showBackButton:this.isInitialMigration(),text:this.isInitialMigration()?r.a.getPhrase(this.lang,"next"):r.a.getPhrase(this.lang,"addToLibrary"),numberSelected:i,numberAvailable:n,onClickBack:function(){return e.onClickBack()}});this.showChildView("footer",o)}}},{key:"renderVideoList",value:function(){var e=this.options,t=e.folderChord,n=e.searchTerm;if(this.videos||!t&&!n)if(this.selectedFolder){this.showChildView("videoList",new H.l({model:this.selectedFolder,initialMigration:this.isInitialMigration(),folderChord:t,searchTerm:n,collection:this.videos,channelName:this.channelName,supportSiteUrl:this.config.get("supportSiteUrl")}));var i=n||t;G.a.GetViewModel(i,F.CheckboxTypes.MIGRATION_VIDEO_LIST).trigger("change")}else this.renderEmptyMessage();else this.renderPartialLoading("videoList")}},{key:"renderCurrentSection",value:function(){this.showChildView("header",new _({searchTerm:this.options.searchTerm,initialMigration:this.isInitialMigration()}))}},{key:"renderBanner",value:function(){this.isInitialMigration()&&this.showChildView("banner",new H.a({config:this.config,currentUser:this.currentUser}))}},{key:"requiredResources",get:function(){return{config:j.b.config,currentUser:z.b.currentUser}}},{key:"onBeforeRender",value:function(){this.isRendering=!0,this.fetchVideos(),this.fetchFolders(),this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),this.errorCount=this.migrationVideoDataService.getManualReviewVideoCount(),this.videoCount=this.migrationVideoDataService.getCustomerVideoCountCached();var e=!!(this.customerMetadata&&this.folders&&this.videoCount&&this.errorCount);return e||(this.isRendering=!1),e}},{key:"viewOptions",value:function(){return{styles:l.a}}},{key:"onRender",value:function(){if(this.renderSelectedBanner(),this.renderLeftNav(),this.renderSearchBar(),this.renderStatusBar(),this.renderBanner(),!this.videos)return this.renderPartialLoading("header"),this.renderPartialLoading("videoList"),void(this.isRendering=!1);this.options.folderChord||this.options.searchTerm?(this.renderVideoList(),this.renderCurrentSection()):this.renderEmptyMessage(),this.isRendering=!1}}])&&Z(t.prototype,n),s&&Z(t,s),Object.defineProperty(t,"prototype",{writable:!1}),d}(i.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[42],{1422:function(e,t,n){e.exports={smart:"_1dRs0",leftNav:"_3dpUO"}},1423:function(e,t,n){e.exports={item:"_13Gu_",text:"_2mbEb",folderTree:"_2NhVk",node:"_1dMK1",selected:"_1AACi"}},1424:function(e,t,n){var i=n(10);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return'<div class="selected-banner-region"></div>\r\n<div class="search-region"></div>\r\n<div class="banner-region"></div>\r\n<div class="col-4 '+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.leftNav:o,t))+'">\r\n <div class="left-nav-region"></div>\r\n</div>\r\n<div class="col">\r\n <div class="header-region"></div>\r\n <div class="video-list-region"></div>\r\n</div>\r\n<div class="footer-region"></div>'},useData:!0})},1425:function(e,t,n){var i=n(10);e.exports=(i.default||i).template({1:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return' <a class="applink-goback '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.back:o,t))+'">\r\n <span class="align-middle d-inline-block '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.backSvgContainer:o,t))+'">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.backSvg:o,t))?o:"")+"</span>\r\n </a>\r\n"},3:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return" "+(null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"resultsFor",{name:"lang",hash:{searchTerm:null!=(o=null!=t?t.options:t)?o.searchTerm:o,smartCount:null!=(o=null!=t?t.options:t)?o.results:o},data:r}))?o:"")+"\r\n"},5:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return" "+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.name:o,t))+"\r\n"},7:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<div class="col-4 text-right py-2 '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.subheader:o,t))+'">\r\n <div class="cursor-pointer toggle-migrated h-100 d-flex align-items-center justify-content-end">\r\n <span class="'+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.svg:o,t))+' mr-1">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.svg:o,t))?o:"")+"</span>\r\n <span>"+(null!=(o=n.if.call(l,null!=(o=null!=t?t.options:t)?o.hidden:o,{name:"if",hash:{},fn:e.program(8,r,0),inverse:e.program(10,r,0),data:r}))?o:"")+" "+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"migrated",{name:"lang",hash:{},data:r}))+"</span>\r\n </div>\r\n</div>\r\n"},8:function(e,t,n,i,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"show",{name:"lang",hash:{},data:r}))},10:function(e,t,n,i,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hide",{name:"lang",hash:{},data:r}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{};return'<div class="col-8">\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.goBack:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:"")+' <h4 class="'+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.header:o,t))+' py-2">\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.searchTerm:o,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.program(5,r,0),data:r}))?o:"")+" </h4>\r\n</div>\r\n\r\n"+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.showMigrationToggle:o,{name:"if",hash:{},fn:e.program(7,r,0),inverse:e.noop,data:r}))?o:"")},useData:!0})},1484:function(e,t,n){"use strict";n.r(t);var i=n(2),r=n(3),o=n(51),a=n(93),s=n(1422),l=n.n(s),c=n(1423),u=n.n(c),d=n(1424),h=n.n(d),f=n(9),g=n(1101),p=n(1131),v=n(1),y=n(6),m=n(5),b=n(16),S=n(338),w=n(1425),k=n.n(w),M=n(53),I=n(120),T=n(0);function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(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,i.key,i)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function R(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 r=V(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return A(this,n)}}function A(e,t){if(t&&("object"===C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&E(e,t)}(o,e);var t,n,i,r=R(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,e)}return t=o,(n=[{key:"initialize",value:function(){this.localOptionsService=m.a.getInstance(T.x.LocalOptions,this),this.migrationVideoDataService=m.a.getInstance(T.g.MigrationVideo,this);var e=this.localOptionsService.getOption(M.b.MigratedHidden);v.isUndefined(e)?(this.setMigrationHiddenOption(!1),this.migratedHidden=!1):this.migratedHidden=e}},{key:"name",get:function(){return"CurrentSectionHeaderView"}},{key:"title",get:function(){return!1}},{key:"lang",get:function(){return"migrationWizard.currentSectionHeader"}},{key:"className",get:function(){return"row px-2 ".concat(S.currentHeader)}},{key:"template",get:function(){return k.a}},{key:"elements",get:function(){return{toggleMigrated:".toggle-migrated"}}},{key:"events",value:function(){return{"click @ui.toggleMigrated":"toggleMigrated"}}},{key:"viewOptions",value:function(){return{styles:S,name:this.options.searchTerm||this.model&&this.model.get("name"),hidden:this.migratedHidden,svg:b.a.getSvg(this.migratedHidden?b.b.VisibleOn:b.b.VisibleOff),goBack:this.options.searchTerm,showMigrationToggle:!this.options.initialMigration,backSvg:b.a.getSvg("arrow-left",{prefix:"fas"}),searchTerm:this.options.searchTerm,results:10}}},{key:"appLinks",get:function(){return{".applink-goback":{application:I.a.MIGRATION_WIZARD,action:this.options.initialMigration?T.a.MigrationWizard.SMART:T.a.MigrationWizard.HOME}}}},{key:"onBeforeRender",value:function(){var e=this;return!(!this.model&&!this.options.searchTerm&&(this.migrationVideoDataService.getSelected((function(t){t&&(e.model=t,e.triggerToggle(),e.render())})),!this.model))}},{key:"toggleMigrated",value:function(){this.migratedHidden=!this.migratedHidden,this.setMigrationHiddenOption(this.migratedHidden),this.triggerToggle(),this.render()}},{key:"triggerToggle",value:function(){y.Radio.channel(I.b.MIGRATION).trigger(T.i.MigrationWizard.TOGGLE_MIGRATED,this.migratedHidden)}},{key:"setMigrationHiddenOption",value:function(e){this.localOptionsService.setOption(M.b.MigratedHidden,e)}}])&&O(t.prototype,n),i&&O(t,i),Object.defineProperty(t,"prototype",{writable:!1}),o}(i.a.View);function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var P={getSelectedInFolder:function(e,t){var n,i=x(p.a.getSelectedVideosCollection(e).toArray());try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.get("category")===t)return r.get("count")}}catch(e){i.e(e)}finally{i.f()}return 0},findFolder:function(e,t){var n;if(e)return e.forEach((function(e){if(e.get("categoryGuid")===t)n=e;else{var i=P.findFolder(e.get("children"),t);i&&(n=i)}})),n}},L=n(58),B=n(91),D=n(30),j=n(201),H=n(1121),G=n(12),W=n(95),F=n(200),z=n(144);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})(e)}function Z(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,i.key,i)}}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(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=K(e);if(t){var r=K(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return $(this,n)}}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)}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"SmartMigrationView",(function(){return Y}));var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q(e,t)}(d,e);var t,n,s,c=J(d);function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),c.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.viewModel=D.a.get(this.viewModelName,{bannerShown:!0},{ctor:B.e,storage:{type:a.c.LocalStorage,persistProps:["bannerShown"]}}),this.bindListeners(),this.initializeServices()}},{key:"name",get:function(){return"SmartMigrationView"}},{key:"title",get:function(){return r.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.smartMigration"}},{key:"viewModelName",get:function(){return"".concat(this.name,":viewmodel")}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"template",get:function(){return h.a}},{key:"className",get:function(){return"row no-gutters w-100 ".concat(l.a.smart)}},{key:"regions",value:function(){return{selectedBanner:{replaceElement:!0,el:".selected-banner-region"},search:{replaceElement:!0,el:".search-region",partialLoading:f.h.PublisherArchiveSearchBar},banner:{replaceElement:!0,el:".banner-region"},leftNav:{replaceElement:!0,el:".left-nav-region",partialLoading:f.h.PublisherArchiveLeftNav},header:{replaceElement:!0,el:".header-region",partialLoading:f.h.PublisherArchiveSectionHeader},videoList:{replaceElement:!0,el:".video-list-region",partialLoading:f.h.PublisherArchiveVideoList},footer:{replaceElement:!0,el:".footer-region",partialLoading:f.h.PublisherArchiveStatusBar}}}},{key:"initializeServices",value:function(){this.folderCacheService=m.a.getInstance(T.x.FolderCache,this),this.selectedVideoService=m.a.getInstance(T.x.SelectedVideo,this),this.migrationVideoDataService=m.a.getInstance(T.g.MigrationVideo,this),this.alertService=m.a.getInstance(T.x.Alerts)}},{key:"bindListeners",value:function(){this.listenTo(T.e.MIGRATION,T.i.MigrationWizard.SELECTED_CHANGED,this.setSelectedVideos),this.listenTo(T.e.MIGRATION,"manual:review:video:count:sync",this.render),this.listenTo(T.e.MIGRATION,"".concat(T.f.CUSTOMER_VIDEO,":count:sync"),this.render),this.listenTo(T.e.MIGRATION,"".concat(T.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(T.b.MIGRATION_WIZARD,T.i.MigrationWizard.CLOSE_BANNER,this.closeSelectionBanner),this.listenTo(this.channelName,"add:selected",this.addSelected),this.listenTo(this.channelName,"remove:selected",this.removeSelected),this.listenTo(this.viewModel,"change:selectedVideoCount",this.renderStatusBar)}},{key:"fetchVideos",value:function(){var e=this;!this.videos&&this.options.folderChord&&this.migrationVideoDataService.getCustomerVideos(this.options.folderChord,(function(t){e.videos||(e.videos=p.a.toggleMigrated(t,!0),e.setSelectedVideos(),e.isRendering||e.render())}))}},{key:"fetchFolders",value:function(){var e=this;this.folders||this.migrationVideoDataService.getCustomerFolders((function(t){if(!e.folders){if(e.folders=t,e.options.folderChord){var n=e.folderCacheService.getFolderByChord(e.options.folderChord,t);G.f.setSelected(W.a.MIGRATION_WIZARD,n,e.folders),e.selectedFolder=G.f.getSelected(W.a.MIGRATION_WIZARD,t)}else{var r=e.folders.first();if(r)return void i.a.AppLinkHelper.trigger({application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.HOME,params:{folder:r.get("chord")}},{replace:!0})}e.isRendering||e.render()}}))}},{key:"setFolderText",value:function(e,t){var n=this,i=e.get("chord"),r=e.get("name"),o=this.folderCacheService.getFolderCache(),a=this.options.folderChord;if(a){var s,l=P.getSelectedInFolder(t,r);if(i===a){var c=this.migrationVideoDataService.getCustomerVideos(i);if(!this.selectedFolder)return;c&&(o[a]=c.length),s=o[a]}o[i]&&(s=o[i]),l&&s?e.set("text","".concat(r," (").concat(l,"/").concat(s,")")):e.set("text",r),e.children.forEach((function(e){return n.setFolderText(e,t)}))}else e.set("text",r)}},{key:"closeSelectionBanner",value:function(){var e=this.getRegion("selectedBanner");e&&(this.viewModel.set("bannerShown",!1),e.destroy())}},{key:"setSelectedVideos",value:function(){var e=this,t=this.selectedVideoService.getSelectedVideoIds();this.videos&&this.videos.forEach((function(n){return p.a.setChecked(n,t,e.isInitialMigration())})),t&&this.viewModel.set("selectedVideoCount",t.length)}},{key:"addSelected",value:function(e,t){this.selectedVideoService.addSelectedVideos(e,t)}},{key:"removeSelected",value:function(e,t){this.selectedVideoService.removeSelectedVideos(e,t)}},{key:"isInitialMigration",value:function(){return L.a.isInitialMigration(this.customerMetadata)}},{key:"onClickBack",value:function(){var e=this;new G.d({title:r.a.getPhrase(this.lang,"backHeading"),text:r.a.getPhrase(this.lang,"backBody"),buttons:[{text:r.a.getPhrase(this.lang,"discard"),className:"btn btn-danger",success:!0},{text:r.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}]}).render().done((function(){e.selectedVideoService.removeAllSelectedVideos(),e.viewModel.set("alertShown",!1),i.a.AppLinkHelper.trigger({application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.START_MIGRATION})}))}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".".concat(l.a.leftNav)),t=e.find(".".concat(u.a.selected));if(t.length&&!(t.offset().top-e.offset().top+t.height()<e.height())){var n=e.scrollTop()+(t.offset().top-e.offset().top),i=.5*e.height()+.5*t.height();e.scrollTop(n-i)}}},{key:"renderEmptyMessage",value:function(){this.showChildView("videoList",new H.b({text:"No folder selected"}))}},{key:"renderSelectedBanner",value:function(){if(this.isInitialMigration()&&!this.viewModel.get("alertShown")){this.viewModel.set("alertShown",!0);var e={heading:r.a.getPhrase(this.lang,"smartSelected"),message:r.a.getPhrase(this.lang,"last3Years"),type:o.a.Success};this.alertService.createAlert(e)}}},{key:"renderLeftNav",value:function(){var e=this,t=new g.a({styles:u.a,appLink:{action:T.a.MigrationWizard.HOME,application:T.b.MIGRATION_WIZARD},linkParams:function(e){return{folder:e.get("chord")}},collection:this.folders,channelName:"".concat(this.cid),childrenProperty:"children",textProperty:"name",extraClass:"p-0",folderTreeId:W.a.MIGRATION_WIZARD});this.showChildView("leftNav",t),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){e.centerSelectedItem()}))}))}},{key:"renderSearchBar",value:function(){this.showChildView("search",new H.h({selected:this.errorCount.get("count")?"publisher-archive":"none"}))}},{key:"renderStatusBar",value:function(){var e=this;if(this.videoCount){var t={application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.SELECTED,args:[this.options.folderChord]},n=this.videoCount.get("successCount"),i=this.selectedVideoService.getNumberSelected(),o=new H.k({nextAppLink:t,showSelected:!0,nextDisabled:0===i,showBackButton:this.isInitialMigration(),text:this.isInitialMigration()?r.a.getPhrase(this.lang,"next"):r.a.getPhrase(this.lang,"addToLibrary"),numberSelected:i,numberAvailable:n,onClickBack:function(){return e.onClickBack()}});this.showChildView("footer",o)}}},{key:"renderVideoList",value:function(){var e=this.options,t=e.folderChord,n=e.searchTerm;if(this.videos||!t&&!n)if(this.selectedFolder){this.showChildView("videoList",new H.l({model:this.selectedFolder,initialMigration:this.isInitialMigration(),folderChord:t,searchTerm:n,collection:this.videos,channelName:this.channelName,supportSiteUrl:this.config.get("supportSiteUrl")}));var i=n||t;G.a.GetViewModel(i,F.CheckboxTypes.MIGRATION_VIDEO_LIST).trigger("change")}else this.renderEmptyMessage();else this.renderPartialLoading("videoList")}},{key:"renderCurrentSection",value:function(){this.showChildView("header",new _({searchTerm:this.options.searchTerm,initialMigration:this.isInitialMigration()}))}},{key:"renderBanner",value:function(){this.isInitialMigration()&&this.showChildView("banner",new H.a({config:this.config,currentUser:this.currentUser}))}},{key:"requiredResources",get:function(){return{config:j.b.config,currentUser:z.b.currentUser}}},{key:"onBeforeRender",value:function(){this.isRendering=!0,this.fetchVideos(),this.fetchFolders(),this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),this.errorCount=this.migrationVideoDataService.getManualReviewVideoCount(),this.videoCount=this.migrationVideoDataService.getCustomerVideoCountCached();var e=!!(this.customerMetadata&&this.folders&&this.videoCount&&this.errorCount);return e||(this.isRendering=!1),e}},{key:"viewOptions",value:function(){return{styles:l.a}}},{key:"onRender",value:function(){if(this.renderSelectedBanner(),this.renderLeftNav(),this.renderSearchBar(),this.renderStatusBar(),this.renderBanner(),!this.videos)return this.renderPartialLoading("header"),this.renderPartialLoading("videoList"),void(this.isRendering=!1);this.options.folderChord||this.options.searchTerm?(this.renderVideoList(),this.renderCurrentSection()):this.renderEmptyMessage(),this.isRendering=!1}}])&&Z(t.prototype,n),s&&Z(t,s),Object.defineProperty(t,"prototype",{writable:!1}),d}(i.a.View)}}]);