@clickview/library-editor 1.1.52 → 1.1.53-dev.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 (185) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/15-library-editor-6fd06eea2a.chunk.css +4 -0
  3. package/dist/css/{26-library-editor-f0118cbca0.chunk.css → 32-library-editor-9dfe56513f.chunk.css} +0 -4
  4. package/dist/css/{31-library-editor-4d763bac2b.chunk.css → 41-library-editor-234f39ca94.chunk.css} +0 -4
  5. package/dist/css/43-library-editor-ca20e9d127.chunk.css +2 -0
  6. package/dist/css/{library-editor-app-e3fef1181d.css → library-editor-app-24fbc5672c.css} +1 -1
  7. package/dist/en.json +1 -1
  8. package/dist/scripts/0-bba0145c77.chunk.js +1 -0
  9. package/dist/scripts/1-5577f6a3f7.chunk.js +1 -0
  10. package/dist/scripts/10-395e6f0d3f.chunk.js +1 -0
  11. package/dist/scripts/12-9ed28b9350.chunk.js +1 -0
  12. package/dist/scripts/13-50189e51fb.chunk.js +1 -0
  13. package/dist/scripts/14-748901431d.chunk.js +1 -0
  14. package/dist/scripts/15-d04c2395cb.chunk.js +1 -0
  15. package/dist/scripts/16-720a6228d9.chunk.js +1 -0
  16. package/dist/scripts/17-d885d92c20.chunk.js +1 -0
  17. package/dist/scripts/18-5977623df8.chunk.js +1 -0
  18. package/dist/scripts/19-5bdab3ec81.chunk.js +1 -0
  19. package/dist/scripts/{2-0c5fba8b60.chunk.js → 2-b4df362f89.chunk.js} +1 -1
  20. package/dist/scripts/22-ae40bff289.chunk.js +1 -0
  21. package/dist/scripts/23-ec60db0a2f.chunk.js +1 -0
  22. package/dist/scripts/24-c9ead3a5f0.chunk.js +1 -0
  23. package/dist/scripts/25-c316ef959e.chunk.js +1 -0
  24. package/dist/scripts/26-a45dd4bd85.chunk.js +1 -0
  25. package/dist/scripts/27-f60580ec4c.chunk.js +1 -0
  26. package/dist/scripts/28-7f81db6a72.chunk.js +1 -0
  27. package/dist/scripts/29-1719c127c2.chunk.js +1 -0
  28. package/dist/scripts/3-93f8c8b29c.chunk.js +1 -0
  29. package/dist/scripts/30-78f9ae88f8.chunk.js +1 -0
  30. package/dist/scripts/31-3eb784eddf.chunk.js +1 -0
  31. package/dist/scripts/32-e8241989c0.chunk.js +1 -0
  32. package/dist/scripts/33-1070fd472f.chunk.js +1 -0
  33. package/dist/scripts/34-f87b33c7e9.chunk.js +1 -0
  34. package/dist/scripts/35-e9d6a8b62f.chunk.js +1 -0
  35. package/dist/scripts/36-723d306d4b.chunk.js +1 -0
  36. package/dist/scripts/37-79e61046ac.chunk.js +1 -0
  37. package/dist/scripts/38-212e31c46a.chunk.js +1 -0
  38. package/dist/scripts/39-f1a08c3c13.chunk.js +1 -0
  39. package/dist/scripts/4-25b1d9b931.chunk.js +1 -0
  40. package/dist/scripts/40-a23493aa65.chunk.js +1 -0
  41. package/dist/scripts/41-e85021f013.chunk.js +1 -0
  42. package/dist/scripts/42-3df7979970.chunk.js +1 -0
  43. package/dist/scripts/43-60ab02c464.chunk.js +1 -0
  44. package/dist/scripts/44-d5bb0ed64a.chunk.js +1 -0
  45. package/dist/scripts/45-f1b7a85e1f.chunk.js +1 -0
  46. package/dist/scripts/46-a9758e6ae3.chunk.js +1 -0
  47. package/dist/scripts/47-9438225608.chunk.js +1 -0
  48. package/dist/scripts/48-c2442aeabc.chunk.js +1 -0
  49. package/dist/scripts/49-aeef82658f.chunk.js +1 -0
  50. package/dist/scripts/5-8cc15ac513.chunk.js +1 -0
  51. package/dist/scripts/50-10cb81acb2.chunk.js +1 -0
  52. package/dist/scripts/51-27b1c14df0.chunk.js +1 -0
  53. package/dist/scripts/52-95c57ffde9.chunk.js +1 -0
  54. package/dist/scripts/53-5be97c8405.chunk.js +1 -0
  55. package/dist/scripts/54-c375c80f2f.chunk.js +1 -0
  56. package/dist/scripts/55-f1f6c64710.chunk.js +1 -0
  57. package/dist/scripts/56-e81e20968e.chunk.js +1 -0
  58. package/dist/scripts/57-0abfa42a18.chunk.js +1 -0
  59. package/dist/scripts/58-596eaa36e1.chunk.js +1 -0
  60. package/dist/scripts/59-4a6dc51102.chunk.js +1 -0
  61. package/dist/scripts/6-3cfc29cd25.chunk.js +1 -0
  62. package/dist/scripts/{58-c0d48a915f.chunk.js → 60-ec99d4c0ec.chunk.js} +1 -1
  63. package/dist/scripts/61-94aba0214c.chunk.js +1 -0
  64. package/dist/scripts/62-078a1c7a79.chunk.js +1 -0
  65. package/dist/scripts/63-4d411f9dbc.chunk.js +1 -0
  66. package/dist/scripts/64-7cb7526007.chunk.js +1 -0
  67. package/dist/scripts/65-115a7df284.chunk.js +1 -0
  68. package/dist/scripts/66-f293f5aaf9.chunk.js +1 -0
  69. package/dist/scripts/67-4779bb083c.chunk.js +1 -0
  70. package/dist/scripts/68-ff8fdd5b00.chunk.js +1 -0
  71. package/dist/scripts/69-ae2fee4118.chunk.js +1 -0
  72. package/dist/scripts/7-0b561c5906.chunk.js +1 -0
  73. package/dist/scripts/70-1301052ad4.chunk.js +1 -0
  74. package/dist/scripts/71-37410a7494.chunk.js +1 -0
  75. package/dist/scripts/{70-d2472d2122.chunk.js → 72-04f3d7e7da.chunk.js} +1 -1
  76. package/dist/scripts/73-c2d2ad43c2.chunk.js +1 -0
  77. package/dist/scripts/74-f030ed93a4.chunk.js +1 -0
  78. package/dist/scripts/8-df0693826e.chunk.js +1 -0
  79. package/dist/scripts/9-d87db5e300.chunk.js +1 -0
  80. package/dist/scripts/bundle-7de62968ab.min.js +10 -0
  81. package/dist/scripts/polyfills-383fa05a74.min.js +1 -0
  82. package/package.json +100 -100
  83. package/dist/css/32-library-editor-d962911bc5.chunk.css +0 -6
  84. package/dist/scripts/0-5f0c2cd8fe.chunk.js +0 -1
  85. package/dist/scripts/1-7a35a849f0.chunk.js +0 -1
  86. package/dist/scripts/10-d534563266.chunk.js +0 -1
  87. package/dist/scripts/12-f0c771aad1.chunk.js +0 -1
  88. package/dist/scripts/13-d70fedb2e0.chunk.js +0 -1
  89. package/dist/scripts/14-fafea6f32c.chunk.js +0 -1
  90. package/dist/scripts/15-7aa65c016d.chunk.js +0 -1
  91. package/dist/scripts/16-56c022c016.chunk.js +0 -1
  92. package/dist/scripts/17-14a7b2aed1.chunk.js +0 -1
  93. package/dist/scripts/20-48346c1412.chunk.js +0 -1
  94. package/dist/scripts/21-f9ff3e0692.chunk.js +0 -1
  95. package/dist/scripts/22-82ad962fa7.chunk.js +0 -1
  96. package/dist/scripts/23-d534e3d903.chunk.js +0 -1
  97. package/dist/scripts/24-264b454456.chunk.js +0 -1
  98. package/dist/scripts/25-e1743bb45d.chunk.js +0 -1
  99. package/dist/scripts/26-0d7e56893b.chunk.js +0 -1
  100. package/dist/scripts/27-4ddeaff155.chunk.js +0 -1
  101. package/dist/scripts/28-96aef6893a.chunk.js +0 -1
  102. package/dist/scripts/29-554f426b85.chunk.js +0 -1
  103. package/dist/scripts/3-75a0223960.chunk.js +0 -1
  104. package/dist/scripts/30-9bdc787ec5.chunk.js +0 -1
  105. package/dist/scripts/31-67f46f7d90.chunk.js +0 -1
  106. package/dist/scripts/32-afdbc7da12.chunk.js +0 -1
  107. package/dist/scripts/33-6c83870de4.chunk.js +0 -1
  108. package/dist/scripts/34-486d783b77.chunk.js +0 -1
  109. package/dist/scripts/35-44dfa1d229.chunk.js +0 -1
  110. package/dist/scripts/36-6e22a76e9d.chunk.js +0 -1
  111. package/dist/scripts/37-247574943e.chunk.js +0 -1
  112. package/dist/scripts/38-c053771304.chunk.js +0 -1
  113. package/dist/scripts/39-0034f40388.chunk.js +0 -1
  114. package/dist/scripts/4-bbf9a27d2b.chunk.js +0 -1
  115. package/dist/scripts/40-4c9075f25f.chunk.js +0 -1
  116. package/dist/scripts/41-9ef30d9bce.chunk.js +0 -1
  117. package/dist/scripts/42-d5ebd7e173.chunk.js +0 -1
  118. package/dist/scripts/43-18cb4a605c.chunk.js +0 -1
  119. package/dist/scripts/44-c501392a17.chunk.js +0 -1
  120. package/dist/scripts/45-6f27b84b9a.chunk.js +0 -1
  121. package/dist/scripts/46-26943c79e1.chunk.js +0 -1
  122. package/dist/scripts/47-58f15ff5f7.chunk.js +0 -1
  123. package/dist/scripts/48-59c60086c6.chunk.js +0 -1
  124. package/dist/scripts/49-c7095beb6f.chunk.js +0 -1
  125. package/dist/scripts/5-a06b2153c3.chunk.js +0 -1
  126. package/dist/scripts/50-015c9c420c.chunk.js +0 -1
  127. package/dist/scripts/51-0cca989dae.chunk.js +0 -1
  128. package/dist/scripts/52-3cc8a4a0c6.chunk.js +0 -1
  129. package/dist/scripts/53-b0a20bc5a0.chunk.js +0 -1
  130. package/dist/scripts/54-79dca3d489.chunk.js +0 -1
  131. package/dist/scripts/55-8c5eba8730.chunk.js +0 -1
  132. package/dist/scripts/56-4d5b5fecd6.chunk.js +0 -1
  133. package/dist/scripts/57-84eff54b39.chunk.js +0 -1
  134. package/dist/scripts/59-53d002a1db.chunk.js +0 -1
  135. package/dist/scripts/6-6c8dac1a42.chunk.js +0 -1
  136. package/dist/scripts/60-9ba5670a0b.chunk.js +0 -1
  137. package/dist/scripts/61-7189b10e86.chunk.js +0 -1
  138. package/dist/scripts/62-6c382c4af3.chunk.js +0 -1
  139. package/dist/scripts/63-d55def5355.chunk.js +0 -1
  140. package/dist/scripts/64-4925cb46d4.chunk.js +0 -1
  141. package/dist/scripts/65-28d1f3d305.chunk.js +0 -1
  142. package/dist/scripts/66-dd4f73d58f.chunk.js +0 -1
  143. package/dist/scripts/67-25c6582829.chunk.js +0 -1
  144. package/dist/scripts/68-4962d3fcfc.chunk.js +0 -1
  145. package/dist/scripts/69-2067a2189e.chunk.js +0 -1
  146. package/dist/scripts/7-881a9b64de.chunk.js +0 -1
  147. package/dist/scripts/71-3f1e0d4f31.chunk.js +0 -1
  148. package/dist/scripts/72-d5c52637ca.chunk.js +0 -1
  149. package/dist/scripts/8-ef172e304b.chunk.js +0 -1
  150. package/dist/scripts/9-d5b2cc8210.chunk.js +0 -1
  151. package/dist/scripts/bundle-c6afc7b324.min.js +0 -10
  152. package/dist/scripts/polyfills-35ff77d456.min.js +0 -1
  153. /package/dist/css/{33-library-editor-630c133693.chunk.css → 16-library-editor-6b9ba08288.chunk.css} +0 -0
  154. /package/dist/css/{15-library-editor-b08725a10e.chunk.css → 17-library-editor-b08725a10e.chunk.css} +0 -0
  155. /package/dist/css/{16-library-editor-89ad109c63.chunk.css → 18-library-editor-89ad109c63.chunk.css} +0 -0
  156. /package/dist/css/{20-library-editor-2bd52b5a32.chunk.css → 22-library-editor-2bd52b5a32.chunk.css} +0 -0
  157. /package/dist/css/{21-library-editor-a7633bece5.chunk.css → 23-library-editor-a7633bece5.chunk.css} +0 -0
  158. /package/dist/css/{22-library-editor-459b106aec.chunk.css → 24-library-editor-459b106aec.chunk.css} +0 -0
  159. /package/dist/css/{23-library-editor-33acb75c24.chunk.css → 25-library-editor-33acb75c24.chunk.css} +0 -0
  160. /package/dist/css/{24-library-editor-b180014922.chunk.css → 26-library-editor-b180014922.chunk.css} +0 -0
  161. /package/dist/css/{25-library-editor-4c64aed388.chunk.css → 27-library-editor-4c64aed388.chunk.css} +0 -0
  162. /package/dist/css/{27-library-editor-b72d0e2d36.chunk.css → 28-library-editor-b72d0e2d36.chunk.css} +0 -0
  163. /package/dist/css/{28-library-editor-de55d150ef.chunk.css → 29-library-editor-de55d150ef.chunk.css} +0 -0
  164. /package/dist/css/{29-library-editor-b0e16f882d.chunk.css → 30-library-editor-b0e16f882d.chunk.css} +0 -0
  165. /package/dist/css/{30-library-editor-10f54d8a75.chunk.css → 31-library-editor-10f54d8a75.chunk.css} +0 -0
  166. /package/dist/css/{37-library-editor-d18b8a3619.chunk.css → 36-library-editor-d18b8a3619.chunk.css} +0 -0
  167. /package/dist/css/{38-library-editor-8b225d15f4.chunk.css → 37-library-editor-8b225d15f4.chunk.css} +0 -0
  168. /package/dist/css/{40-library-editor-b08725a10e.chunk.css → 38-library-editor-b08725a10e.chunk.css} +0 -0
  169. /package/dist/css/{41-library-editor-9a2d011500.chunk.css → 40-library-editor-9a2d011500.chunk.css} +0 -0
  170. /package/dist/css/{43-library-editor-aa3e9bea9a.chunk.css → 44-library-editor-aa3e9bea9a.chunk.css} +0 -0
  171. /package/dist/css/{44-library-editor-7b1cd4a5cc.chunk.css → 45-library-editor-7b1cd4a5cc.chunk.css} +0 -0
  172. /package/dist/css/{45-library-editor-f1820aeeff.chunk.css → 46-library-editor-f1820aeeff.chunk.css} +0 -0
  173. /package/dist/css/{46-library-editor-547abc7492.chunk.css → 47-library-editor-547abc7492.chunk.css} +0 -0
  174. /package/dist/css/{47-library-editor-3f6fb7f3ab.chunk.css → 48-library-editor-3f6fb7f3ab.chunk.css} +0 -0
  175. /package/dist/css/{48-library-editor-467e156ba3.chunk.css → 49-library-editor-467e156ba3.chunk.css} +0 -0
  176. /package/dist/css/{50-library-editor-7aca18778d.chunk.css → 51-library-editor-7aca18778d.chunk.css} +0 -0
  177. /package/dist/css/{51-library-editor-81c5aced1f.chunk.css → 52-library-editor-81c5aced1f.chunk.css} +0 -0
  178. /package/dist/css/{54-library-editor-d3b8bb68f9.chunk.css → 56-library-editor-d3b8bb68f9.chunk.css} +0 -0
  179. /package/dist/css/{55-library-editor-94a8c4e7fa.chunk.css → 57-library-editor-94a8c4e7fa.chunk.css} +0 -0
  180. /package/dist/css/{56-library-editor-61808b02a0.chunk.css → 58-library-editor-61808b02a0.chunk.css} +0 -0
  181. /package/dist/css/{57-library-editor-c49b3847df.chunk.css → 59-library-editor-c49b3847df.chunk.css} +0 -0
  182. /package/dist/css/{58-library-editor-8f5e04b64a.chunk.css → 60-library-editor-8f5e04b64a.chunk.css} +0 -0
  183. /package/dist/css/{59-library-editor-b64f6f3e74.chunk.css → 61-library-editor-b64f6f3e74.chunk.css} +0 -0
  184. /package/dist/css/{61-library-editor-7f123672b2.chunk.css → 63-library-editor-7f123672b2.chunk.css} +0 -0
  185. /package/dist/css/{62-library-editor-61e4c24a7b.chunk.css → 64-library-editor-61e4c24a7b.chunk.css} +0 -0
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[36],{1030:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(2),a=r(264);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 o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(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 r,n=f(e);if(t){var a=f(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return l(this,r)}}function l(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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}}),t&&s(e,t)}(l,e);var t,r,n,i=c(l);function l(){return o(this,l),i.apply(this,arguments)}return t=l,(r=[{key:"defaults",value:function(){return e={},t=a.c.Disabled,r=!0,t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e;var e,t,r}}])&&u(t.prototype,r),n&&u(t,n),l}(n.a.Model)},1036:function(e,t,r){"use strict";var n=r(1041),a=r(1037),i=(r(1038),r(3),r(1042)),o=(r(1044),r(1040));r.d(t,"a",(function(){return n.a})),r.d(t,"d",(function(){return a.g})),r.d(t,"g",(function(){return a.j})),r.d(t,"f",(function(){return a.i})),r.d(t,"c",(function(){return a.f})),r.d(t,"e",(function(){return a.h})),r.d(t,"b",(function(){return i.a})),r.d(t,"h",(function(){return o.a}))},1037:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"k",(function(){return p})),r.d(t,"g",(function(){return h})),r.d(t,"e",(function(){return g})),r.d(t,"j",(function(){return b})),r.d(t,"i",(function(){return v})),r.d(t,"c",(function(){return E})),r.d(t,"b",(function(){return x})),r.d(t,"d",(function(){return N})),r.d(t,"f",(function(){return P})),r.d(t,"h",(function(){return y}));var n=r(2),a=r(1),i=r(19),o=r(29),u=r(3),s="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var r=a.reduce(e,(function(e,r,n){var i=t[n];return r||i?a.isObject(r)&&a.isObject(i)&&!a.isUndefined(r.id)&&r.id===i.id?e:a.isArray(r)?f(r,i).length?e.concat(n):e:a.isEqual(r,i)?e:e.concat(n):e}),[]);if(r.length)return a.object(a.map(r,(function(r){return a.isArray(t[r])?[r,f(e[r],t[r])]:[r,t[r]]})))}}function f(e,t){var r=[];return a.each(t,(function(t){var n=a.findWhere(e,{id:t.id});if(!a.isUndefined(n)||0!==Object.keys(t).length){var i=a.isUndefined(n)?t:l(n,t);i&&(t.id<0&&!t.value||(!n||t.id<0?r.push(t):(i.id=t.id,r.push(i))))}})),r}var d={getChanges:function(e,t){var r=l(a.omit(e.toJSON(),c),a.omit(t.toJSON(),c));if(r)return a.object(a.map(a.keys(r),(function(e){return[e,d.formatChanges(e,r[e])]})))},formatChanges:function(e,t){if(!t)return null;if(a.isObject(t)&&a.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return a.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:n.a.ErrorHelper.throw(new i.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,r){var i=["distributors","producers","directors","productionCompanies"];for(var o in a.each(a.keys(r),(function(e){i.includes(e)&&(r[e]=t.get(e).toJSON())})),t.set(a.clone(r),{silent:!0}),e.set(t.toJSON(),{silent:!0}),r){if(!r[o]&&e.associations[o]){var u=e.get(o);(u instanceof n.a.Model||u instanceof n.a.NestedModel)&&u.clear()}}},getRemovedObjectIds:function(e,t){var r=["distributors","productionCompanies","producers","directors"],n={};return a.each(a.keys(e.toJSON()),(function(i){if(a.contains(r,i)){var o=e.get(i).map((function(e){return e.id})),u=t.get(i).map((function(e){return e.id})),s=a.filter(o,(function(e){return e&&!a.contains(u,e)}));s.length&&(n[i]=s)}})),n}},p={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"videoTitleRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,r){return e&&e<1?u.a.getPhrase(s,"episodeNumberLessThanOne"):e&&e>2147483647?u.a.getPhrase(s,"episodeNumberExceeds"):e%1!=0?u.a.getPhrase(s,"episodeNumberNotWhole"):r.season&&r.season.get("number")>=0&&null===e?u.a.getPhrase(s,"episodeNumberNoSeason"):""},season:function(e,t,r){return r.season&&r.season.get("number")||e&&e.number||!r.episodeNumber?"":u.a.getPhrase(s,"seasonNoEpisodeNumber")}},m=o().year(),g={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>m?u.a.getPhrase(s,"validProductionYears",{currentYear:m}):void 0):""}},h={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"resourceNameRequired")}}]},b={suggestion:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditRequired")}},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditReasonRequired")}},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"suggestEditReasonExceeds")}}]},y={number:function(e){return e?+e<1?u.a.getPhrase(s,"seasonLessThanOne"):+e>3e3?u.a.getPhrase(s,"seasonExceeds"):+e%1!=0?u.a.getPhrase(s,"seasonNotWhole"):"":u.a.getPhrase(s,"seasonRequired")}},v={empty:function(){return u.a.getPhrase(s,"suggestEditRatingRequired")},original:function(){return u.a.getPhrase(s,"suggestEditRatingInvalid")}},P={url:[{required:!0,pattern:"url",msg:function(){return u.a.getPhrase(s,"linkUrlRequired")}},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return u.a.getPhrase(s,"linkNameRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"linkNameExceeds")}}]},E={name:[{maxLength:128,msg:function(){return u.a.getPhrase(s,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"fieldValueExceeds")}}]},x={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":u.a.getPhrase(s,"fieldsInvalid"):""}};function N(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1038:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(1),a=r(48),i=r(168),o=r(3),u="libraryEditor.utils",s={name:[{required:!0,msg:function(){return o.a.getPhrase(u,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(u,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(r){return r?a.a.calculateDestinationFolderDepth(e,r,t)>i.a.MAX_FOLDER_DEPTH?o.a.getPhrase(u,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(u,"selectParentFolder")}}},l=function(e){var t=e.validateName,r=e.validateParent,a=e.folder,i=e.collection;return t&&r?n.extend({},s,c(a,i)):t?s:r?c(a,i):void 0}},1040:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(16),a=r(3),i=r(199),o=r(1056),u=r(62);function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var f={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case u.a.HostedLibrary:case u.a.CustomLibrary:return e.get("name");case u.a.Exchange:return a.a.getPhrase(l,"exchange");case u.a.Workspace:return a.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case u.a.HostedLibrary:case u.a.CustomLibrary:return"bg-info";case u.a.Exchange:return"bg-green";case u.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,r=(s(t={},c.Pdf,n.b.FilePDF),s(t,c.Image,n.b.FileImg),s(t,c.PowerPoint,n.b.FilePowerpoint),s(t,c.Document,n.b.FileWord),s(t,c.Excel,n.b.FileExcel),s(t,c.Zip,n.b.FileZip),s(t,c.File,n.b.File),t)[e];return r||(r=n.b.Folder),n.a.getSvg(r)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return a.a.getPhrase(l,"pdf");case c.Image:return a.a.getPhrase(l,"image");case c.Document:return a.a.getPhrase(l,"document");case c.Excel:return a.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return a.a.getPhrase(l,"presentation");case c.Zip:return a.a.getPhrase(l,"zipArchive");case c.File:return a.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:f.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case i.MetadataType.VideoTitle:t+="VideoTitle";break;case i.MetadataType.Description:t+="Description";break;case i.MetadataType.Rating:t+="Rating";break;case i.MetadataType.SeriesTitle:t+="SeriesTitle";break;case i.MetadataType.Season:t+="SeasonNumber";break;case i.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case i.MetadataType.BroadcastDate:t+="BroadcastDate";break;case i.MetadataType.Channel:t+="Channel";break;case i.MetadataType.ProductionYear:t+="ProductionYear";break;case i.MetadataType.Distributors:t+="Distributors";break;case i.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case i.MetadataType.Directors:t+="Directors";break;case i.MetadataType.Producers:t+="Producers";break;case i.MetadataType.Other:t+="Other"}return a.a.getPhrase(l,t)}}},1041:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(1),a=r(13),i=r(3),o="libraryEditor.utils",u={isValidChapterTime:function(e,t,r,i){if(i){if(!n.isNumber(t))return s.StartTime.Invalid();if(t<0)return s.StartTime.Invalid();if(t>a.x.millisecondsToSeconds(r))return s.StartTime.Exceeds();if(i.some((function(r){return!(r.id&&r.id===e.id||r.cid===e.cid)&&r.get("startTime")===t})))return s.StartTime.Exists()}},isValidChapterName:function(e,t,r){return t?t.length>255?s.Name.MaxLength():r.some((function(r){return!(r.id&&r.id===e.id||r.cid===e.cid)&&r.get("name").trim()===t.trim()}))?s.Name.Exists():n.isEmpty(t.trim())?s.Name.Invalid():void 0:s.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return n.map(e,(function(e,r){var n={name:e.title,startTime:t,index:r,isPhysicalChapter:!0};return t+=e.duration,n}))}},s={Name:{Invalid:function(){return i.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return i.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return i.a.getPhrase(o,"chapterStartTimeExceeds")}}}},1042:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(3),a="libraryEditor.utils",i={name:[{required:!0,msg:function(){return n.a.getPhrase(a,"libraryNameRequired")}},{maxLength:255,msg:function(){return n.a.getPhrase(a,"libraryNameExceeds")}}]}},1044:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3),a=r(1037),i=n.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return i("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return i("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return i("uploadLibraryRequired")}}],episodeNumber:function(e,t,r){return e&&e<1?i("episodeNumberLessThanOne"):e&&e>255?i("episodeNumberExceeds"):e&&e%1!=0?i("episodeNumberNotWhole"):r.season&&r.season.get("number")>=0&&null===e?i("episodeNumberNoSeason"):""},season:function(e,t,r){return r.season&&r.season.get("number")||e&&e.number||!r.episodeNumber?"":i("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return a.e.productionYear.apply(null,t)}}},1056:function(e,t,r){"use strict";function n(e){return(n="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 a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return(i=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 r,n=s(e);if(t){var a=s(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return u(this,r)}}function u(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(r,e);var t=o(r);function r(){return a(this,r),t.apply(this,arguments)}return r}(r(2).a.Collection)},1291:function(e,t,r){var n=r(10);e.exports=(n.default||n).template({1:function(e,t,r,n,a){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,r,n,a){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},o=e.hooks.helperMissing,u=e.escapeExpression;return'<form>\r\n <div class="form-group">\r\n <label for="name" class="control-label">'+u((r.lang||t&&t.lang||o).call(i,"libraryName",{name:"lang",hash:{},data:a}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+u((r.lang||t&&t.lang||o).call(i,"secondaryLibrary",{name:"lang",hash:{},data:a}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n</form>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,r,n,a){var i;e.propertyIsEnumerable;return null!=(i=r.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?i:""},useData:!0})},1425:function(e,t,r){"use strict";r.r(t),r.d(t,"NewLibraryView",(function(){return k}));var n=r(6),a=r(2),i=r(5),o=r(30),u=r(3),s=r(68),c=r(303),l=r(144),f=r(0),d=r(264),p=r(137),m=r(1030),g=r(13),h=r(1036),b=r(146),y=r(205),v=r(1291),P=r.n(v);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(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 r,n=O(e);if(t){var a=O(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return S(this,r)}}function S(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w(e,t)}(S,e);var t,r,v,E=T(S);function S(){return x(this,S),E.apply(this,arguments)}return t=S,(r=[{key:"initialize",value:function(){this.model=o.a.get("new:library",null,{ctor:p.a}),this.bindListeners(),this.settingsDataService=i.a.getInstance(f.g.Settings,this),this.libraryDataService=i.a.getInstance(f.g.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(f.e.SEARCH,"".concat(f.f.SETTINGS,":sync"),this.render)}},{key:"name",get:function(){return"NewLibraryView"}},{key:"title",get:function(){return u.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.newLibrary"}},{key:"template",get:function(){return P.a}},{key:"channelName",get:function(){return g.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.a,modelValidation:h.b},{behaviorClass:c.f},{behaviorClass:c.e,title:u.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new m.a,channelName:this.channelName,buttonText:u.a.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.model.validate(),this.model.isValid()&&(n.Radio.channel(this.channelName).trigger(d.b.ShowSpinner),this.createLibrary())}},{key:"createLibrary",value:function(){this.libraryDataService.createLibrary(this.currentUser.get("customerId"),this.model,(function(e){o.a.clear("new:library"),a.a.AppLinkHelper.trigger({application:f.b.LIBRARY_EDITOR,action:f.a.LibraryEditor.LIBRARY,args:[e.id]})}))}},{key:"requiredResources",get:function(){return{currentUser:l.b.currentUser,libraries:b.b.libraries}}},{key:"onBeforeRender",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),s.a.MaxCustomLibraries),this.libraries.length>=this.maxCustomLibraries.get("value")?a.a.ErrorHelper.throw(new y.j(this.libraries.length,this.maxCustomLibraries.get("value"))):this.maxCustomLibraries&&this.spinnerModel.set(d.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.maxCustomLibraries,spinnerEl:g.r.getSpinner({size:g.s.Large,extraClasses:"mx-auto"})}}}])&&N(t.prototype,r),v&&N(t,v),S}(a.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[37],{1030:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var o=n(2),r=n(264);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 a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}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,o=f(e);if(t){var r=f(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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}}),t&&u(e,t)}(c,e);var t,n,o,i=s(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=r.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}}])&&l(t.prototype,n),o&&l(t,o),c}(o.a.Model)},1112:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return g}));var o,r=n(6),i=n(2),a=n(1153),l=n.n(a),u=n(1113),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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=d(e);if(t){var r=d(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(o||(o={}));var g=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}}),t&&p(e,t)}(u,e);var t,n,i,a=h(u);function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,o.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return s.a}},{key:"className",get:function(){return"text-center"}},{key:"elements",get:function(){return{image:".img"}}},{key:"getMinCropBoxWidth",value:function(){return this.options.minWidth*this.getViewportToImageRatio()}},{key:"getMinCropBoxHeight",value:function(){return this.options.minHeight*this.getViewportToImageRatio()}},{key:"getViewportToImageRatio",value:function(){return this.options.getCropRegionWidth()/this.model.get("width")}},{key:"crop",value:function(){var e=this.cropper.getCroppedCanvas().toDataURL(this.getImageMimeType());r.Radio.channel(this.options.channelName).trigger(o.ImageCropped,e)}},{key:"getImageMimeType",value:function(){var e=this.model.get("dataUrl").match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(e)return e[1]}},{key:"renderCropper",value:function(){this.getMinCropBoxWidth();var e=this.getUI("image").get(0);this.cropper=new l.a(e,{viewMode:1,aspectRatio:this.options.minWidth/this.options.minHeight,minCropBoxWidth:this.getMinCropBoxWidth(),minCropBoxHeight:this.getMinCropBoxHeight(),autoCropArea:1})}},{key:"onRender",value:function(){this.renderCropper()}},{key:"onBeforeDestroy",value:function(){this.cropper.destroy()}}])&&f(t.prototype,n),i&&f(t,i),u}(i.a.Component)},1113:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:r}):i)+'" class="img img-fluid" />'},useData:!0})},1302:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return" "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumRecommended",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.width:i},data:r}))+"\r\n"},3:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return" "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumActual",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.width:i},data:r}))+"\r\n"},5:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'<button class="'+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.removeImage:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"remove",{name:"lang",hash:{},data:r}))+" "+l(a(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,u=e.escapeExpression,s=e.lambda;return'<h6 class="mb-0">'+u((n.lang||t&&t.lang||l).call(a,"edit",{name:"lang",hash:{},data:r}))+" "+u(s(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+'</h6>\r\n<div class="text-muted mb-1">\r\n <em>\r\n'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:"")+' </em>\r\n</div>\r\n<div class="my-1 '+u(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageContainer:i,t))+'">\r\n <div class="'+u(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageElement:i,t))+'" style="background-image: url(\''+u(s(null!=(i=null!=t?t.options:t)?i.imageUrl:i,t))+'\')"></div>\r\n</div>\r\n<button class="btn btn-light my-1">'+u((n.lang||t&&t.lang||l).call(a,"upload",{name:"lang",hash:{},data:r}))+" "+u(s(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasImage:i,{name:"if",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},1303:function(e,t,n){e.exports={removeImage:"_3OmsX",imageElement:"_3kJ8m",banner:"uFWnL",thumbnail:"_3_b6l",imageContainer:"_1mYjS"}},1304:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="thumbnail-region"></div>\r\n<div class="dropdown-divider"></div>\r\n<div class="banner-region"></div>'},useData:!0})},1305:function(e,t,n){e.exports={hide:"_5hYaK"}},1306:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return'<div class="content-region"></div>\r\n'},3:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:""},useData:!0})},1468:function(e,t,n){"use strict";n.r(t);var o=n(1),r=n(6),i=n(2),a=n(5),l=n(30),u=n(4),s=n(42),c=n(303),f=n(317),p=n(1030),h=n(13),m=n(0),d=n(9),g=n(1112),y=n(264),b=n(200),v=n(3),I=n(1302),w=n.n(I),k=n(1303),C=n.n(k);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function E(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,o=S(e);if(t){var r=S(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return B(this,n)}}function B(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=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}}),t&&E(e,t)}(u,e);var t,n,o,a=R(u);function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.viewModel=l.a.get("edit:folder:images")}},{key:"name",get:function(){return"EditImageComponent"}},{key:"template",get:function(){return w.a}},{key:"lang",get:function(){return"libraryEditor.editImage"}},{key:"className",get:function(){return this.options.imageType===d.f.Thumbnails?"".concat(C.a.thumbnail," mb-2"):"".concat(C.a.banner," mt-2")}},{key:"events",value:function(){return e={},t="click .".concat(C.a.removeImage),n="onClickRemoveImage",t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.b,channelName:this.options.channelName,buttonSelector:".btn-light",imageType:this.options.imageType,saveImage:function(t,n){n?(e.viewModel.set({dataUrl:t,type:e.options.imageType}),i.a.AppLinkHelper.trigger({application:m.b.LIBRARY_EDITOR,action:m.a.LibraryEditor.EDIT_FOLDER_IMAGES,args:[e.options.folderId]})):r.Radio.channel(e.options.channelName).trigger("select:image",t,e.options.imageType)}}]}},{key:"onClickRemoveImage",value:function(){r.Radio.channel(this.options.channelName).trigger("show:dialog",this.options.imageType)}},{key:"getImageUrl",value:function(){var e=this.options.imageType===d.f.Banners?"createBannerUrl":"createFolderThumbnailUrl";return h.g[e](this.options.originalImage,{fallbackBaseUrl:this.options.imageCdnUrl,fallbackCategoryName:this.options.folderName,type:this.options.imageType})}},{key:"getImageTypeText",value:function(){switch(this.options.imageType){case d.f.Banners:return v.a.getPhrase(this.lang,"banner");case d.f.Thumbnails:return v.a.getPhrase(this.lang,"thumbnail")}}},{key:"viewOptions",value:function(){return{styles:C.a,imageUrl:this.getImageUrl(),hasImage:this.options.originalImage&&this.options.originalImage.get("id"),imageTypeText:this.getImageTypeText(),dimensions:m.k[this.options.imageType],recommendedDimensions:m.m[this.options.imageType]}}}])&&O(t.prototype,n),o&&O(t,o),u}(i.a.Component),x=n(1304),U=n.n(x);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 j(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function M(e,t){return(M=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=L(e);if(t){var r=L(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return D(this,n)}}function D(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A,W=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}}),t&&M(e,t)}(i,e);var t,n,o,r=N(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"EditImagesWrapperComponent"}},{key:"template",get:function(){return U.a}},{key:"regions",value:function(){return{banner:{el:".banner-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"renderBanner",value:function(){this.showChildView("banner",new _({channelName:this.options.bannerChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:d.f.Banners,folderName:this.options.folderName,originalImage:this.options.bannerImage,folderId:this.options.folderId}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new _({channelName:this.options.thumbnailChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:d.f.Thumbnails,folderName:this.options.folderName,originalImage:this.options.thumbnailImage,folderId:this.options.folderId}))}},{key:"onRender",value:function(){this.renderBanner(),this.renderThumbnail()}}])&&j(t.prototype,n),o&&j(t,o),i}(i.a.Component),F=n(1305),V=n.n(F),H=n(1306),z=n.n(H);function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function J(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=K(e);if(t){var r=K(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Z(this,n)}}function Z(e,t){return!t||"object"!==Y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"EditFolderImagesView",(function(){return X})),function(e){e[e.Upload=0]="Upload",e[e.Crop=1]="Crop"}(A||(A={}));var X=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}}),t&&q(e,t)}(w,e);var t,n,v,I=G(w);function w(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,w),I.call(this,e)}return t=w,(n=[{key:"initialize",value:function(){this.popupContentState=A.Upload,this.viewModel=l.a.get("edit:folder:images"),this.viewModel.get("dataUrl")&&(this.selectedImageType=this.viewModel.get("type"),this.newImageEl=new Image,this.newImageEl.src=this.viewModel.get("dataUrl"),this.spinnerModel.set(y.c.Disabled,!1),this.popupContentState=A.Crop),this.libraryDataService=a.a.getInstance(m.g.Library,this),this.imageUploadDataService=a.a.getInstance(m.g.ImageUpload,this),this.bindListeners()}},{key:"name",get:function(){return"EditFolderImagesView"}},{key:"title",get:function(){return"Edit Folder Images"}},{key:"template",get:function(){return z.a}},{key:"channelName",get:function(){return h.k.generateUniqueChannelName(this)}},{key:"regions",value:function(){return{content:{el:".content-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .back-btn":"onClickBackButton","shown.bs.modal":"renderCropper"}}},{key:"elements",get:function(){return{backBtn:".back-btn"}}},{key:"behaviors",get:function(){return[{title:"Edit folder images",behaviorClass:c.e,size:"modal-lg",buttons:[{text:"Back",className:"btn btn-light back-btn ".concat(V.a.hide)}],spinnerButtonOptions:{model:this.spinnerModel=new p.a,channelName:this.channelName,buttonText:"Continue",onClick:this.onClickCrop}}]}},{key:"requiredResources",get:function(){return{config:b.b.config}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(m.e.LIBRARY,"".concat(m.f.FOLDER,":").concat(this.options.folderId,":sync"),this.render);var t="".concat(this.channelName,":").concat(d.f.Banners),n="".concat(this.channelName,":").concat(d.f.Thumbnails);this.listenTo(t,"select:image",(function(t){return e.onSelectImage(t,d.f.Banners)})),this.listenTo(n,"select:image",(function(t){return e.onSelectImage(t,d.f.Thumbnails)})),this.listenTo(t,"show:dialog",(function(){return e.onShowDialog(d.f.Banners)})),this.listenTo(n,"show:dialog",(function(){return e.onShowDialog(d.f.Thumbnails)})),this.listenTo(t,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(n,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(this.channelName,g.a.ImageCropped,this.onImageCropped)}},{key:"onClickBackButton",value:function(){this.popupContentState!==A.Upload&&(this.popupContentState=A.Upload,this.selectedImageType=null,this.newImageEl=null,this.spinnerModel.set(y.c.Disabled,!0),this.renderContent())}},{key:"onClickCrop",value:function(){r.Radio.channel(this.channelName).trigger(g.a.CropImage).trigger(y.b.ShowSpinner)}},{key:"onSelectImage",value:function(e,t){this.selectedImageType=t,this.newImageEl=new Image,this.newImageEl.src=e,this.popupContentState=A.Crop,this.spinnerModel.set(y.c.Disabled,!1),this.renderCropper()}},{key:"onImageCropped",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,this.selectedImageType,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this;this.triggerMethod("hide");var n={libraryId:this.libraryId,folderId:this.options.folderId,currentImageId:this.getCurrentImageId(),imageModel:e},o=this.selectedImageType===d.f.Banners?u.EntityType.Banner:u.EntityType.Thumbnail,r=this.selectedImageType===d.f.Banners?"addOrUpdateBanner":"addOrUpdateThumbnail";this.libraryDataService[r](n,(function(e){s.a.logUserAction({libraryId:t.libraryId,folderId:t.options.folderId,id:e.get("id")},{actionType:u.UserAction.Upload,entity:o,workflowPhase:u.WorkflowPhase.Complete,location:u.LocationContext.Popup}),t.reloadPage()}))}},{key:"onShowDialog",value:function(e){var t=this,n=new h.d({title:"Remove image?",text:"Are you sure you want to remove this image?",buttons:[{text:"Remove",className:"btn btn-danger",success:!0},{text:"Cancel",className:"btn btn-secondary",close:!0}],channelName:this.options.channelName});setTimeout((function(){return n.render().done((function(){return t.removeImage(e)}))}),200),this.triggerMethod("hide")}},{key:"removeImage",value:function(e){var t=this,n=e===d.f.Banners?"deleteBanner":"deleteThumbnail",o=e===d.f.Banners?this.currentBanner:this.currentThumbnail,r={libraryId:this.libraryId,folderId:this.model.get("id"),imageId:o.get("id")},i=e===d.f.Banners?u.EntityType.Banner:u.EntityType.Thumbnail;this.libraryDataService[n](r,(function(){s.a.logUserAction({libraryId:t.libraryId,folderId:t.model.get("id"),id:o.get("id")},{actionType:u.UserAction.Delete,entity:i,workflowPhase:u.WorkflowPhase.Complete,location:u.LocationContext.Popup}),t.reloadPage()}))}},{key:"reloadPage",value:function(){var e=this,t=i.a.LocationUtils.GetCurrentPath().includes("folders");setTimeout((function(){return i.a.AppLinkHelper.trigger({application:m.b.LIBRARY_EDITOR,action:t?m.a.LibraryEditor.FOLDER:m.a.LibraryEditor.HOME,args:t?[e.options.folderId]:void 0})}),0)}},{key:"getCurrentImageId",value:function(){return this.selectedImageType===d.f.Banners&&this.currentBanner?this.currentBanner.get("id"):this.selectedImageType===d.f.Thumbnails&&this.currentThumbnail?this.currentThumbnail.get("id"):void 0}},{key:"getCropRegionWidth",value:function(){return this.$el.find(".modal-body").width()}},{key:"getImageModel",value:function(){return new f.a({dataUrl:this.newImageEl.src,width:this.newImageEl.width,height:this.newImageEl.height})}},{key:"renderContent",value:function(){this.popupContentState===A.Upload&&(this.getUI("backBtn").addClass(V.a.hide),this.showChildView("content",new W({imageCdnUrl:this.config.get("imageCdnUrl"),folderName:this.model.get("name"),bannerImage:this.currentBanner,thumbnailImage:this.currentThumbnail,bannerChannel:"".concat(this.channelName,":").concat(d.f.Banners),thumbnailChannel:"".concat(this.channelName,":").concat(d.f.Thumbnails),folderId:this.options.folderId})))}},{key:"renderCropper",value:function(){this.popupContentState===A.Crop&&(this.getUI("backBtn").removeClass(V.a.hide),this.showChildView("content",new g.b({model:this.getImageModel(),channelName:this.channelName,imageType:this.selectedImageType,minWidth:m.k[this.selectedImageType].width,minHeight:m.k[this.selectedImageType].height,getCropRegionWidth:o.bind(this.getCropRegionWidth,this)})))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.libraryId,spinnerEl:h.r.getSpinner({size:h.s.Large,extraClasses:"mx-auto"})}}},{key:"onBeforeRender",value:function(){var e=this;this.model&&this.libraryId||(this.model=this.libraryDataService.getFolder(this.options.folderId),this.libraryDataService.getLibraries((function(t){return e.libraryId=t.first().id})))}},{key:"onRender",value:function(){this.model&&this.libraryId&&(this.currentBanner=this.model.get("banner"),this.currentThumbnail=this.model.get("thumbnail"),this.renderContent())}},{key:"onBeforeDestroy",value:function(){this.viewModel.clear()}}])&&J(t.prototype,n),v&&J(t,v),w}(i.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[38],{1030:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(2),i=n(264);function r(e){return(r="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 a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=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}}),t&&l(e,t)}(u,e);var t,n,o,r=c(u);function u(){return a(this,u),r.apply(this,arguments)}return t=u,(n=[{key:"defaults",value:function(){return e={},t=i.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}}])&&s(t.prototype,n),o&&s(t,o),u}(o.a.Model)},1039:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(1),i=n(2),r=n(310);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=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}}),t&&l(e,t)}(u,e);var t,n,i,a=c(u);function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return r.a}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,i="dropdown-menu-".concat(n);return o&&(i="".concat(i," ").concat(o)),i}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}])&&s(t.prototype,n),i&&s(t,i),u}(i.a.ComponentCollection)},1084:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(1),i=n(6),r=n(2),a=n(1039),s=n(13),l=n(1085),c=n.n(l),u=n(1086),d=n.n(u);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return y(this,n)}}function y(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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}}),t&&h(e,t)}(u,e);var t,n,r,l=g(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=l.call(this,e)).selectSearch="",t.sameCharIndex=1,t.optionStep=1,t}return t=u,(n=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c.a}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){i.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),i.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){s.c.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(s.c.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(s.c.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),i.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=s.c.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=s.c.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(s.c.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=o.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=o.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var i=n[this.sameCharIndex];return i||(i=o.first(n),this.sameCharIndex=0),this.sameCharIndex++,i}return o.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!o.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(i))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=s.c.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:d.a,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.a({collection:this.collection,channelName:this.options.channelName,childOptions:o.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(d.a.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}])&&p(t.prototype,n),r&&p(t,r),u}(r.a.Component)},1085:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<button \r\n class="dropdown-toggle form-control btn-block text-left position-relative '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectButton:r,t))+" "+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'" \r\n type="button" \r\n id="dropdownMenuButton" \r\n data-toggle="dropdown" \r\n aria-haspopup="true" \r\n aria-expanded="false"\r\n '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' \r\n name="'+s(a(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\r\n >\r\n '+s(a(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'\r\n</button>\r\n<div class="dropdown-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})},1086:function(e,t,n){e.exports={dropdownMenu:"_2RaQu",selectButton:"_2xGqi",disabled:"_15kWr"}},1312:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression,s=e.lambda;return'<p class="font-weight-bold mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(r=null!=t?t.options:t)?r.metadataType:r},data:i}))+'</p>\r\n<p class="mb-3 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.metadataValue:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.metadataValue:r,t))?r:"")+"</p>\r\n"},3:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return' <textarea\r\n id="suggest-edit"\r\n placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.suggestionPlaceholder:r,t))+'"\r\n class="form-control"\r\n name="suggestion"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.isOtherType:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n<div class="dropdown-divider"></div>\r\n\r\n<div class="form-group">\r\n <label for="suggest-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"suggestionSubheading",{name:"lang",hash:{},data:i}))+'</label>\r\n <div class="rating-select-region"></div>\r\n <div class="rating-form-feedback invalid-feedback"></div>\r\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.useRatingSelect:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\r\n\r\n<div class="form-group">\r\n <label for="reason-for-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"reasoningSubheading",{name:"lang",hash:{},data:i}))+'</label>\r\n <textarea\r\n id="reason-for-edit"\r\n placeholder="'+l((n.lang||t&&t.lang||s).call(a,"reasoningPlaceholder",{name:"lang",hash:{},data:i}))+'"\r\n class="form-control"\r\n name="reason"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},1313:function(e,t,n){e.exports={metadataValue:"_3nkrW"}},1314:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(r,"guidelines",{name:"lang",hash:{},data:i}))+'</p>\r\n<p class="font-weight-bold mb-1">'+s((n.lang||t&&t.lang||a).call(r,"dropdownHeading",{name:"lang",hash:{},data:i}))+'</p>\r\n<div class="metadata-dropdown-region position-relative"></div>\r\n<div class="suggest-edit-region"></div>\r\n'},3:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.spinnerEl:r,t))?r:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.dataFetched:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:""},useData:!0})},1463:function(e,t,n){"use strict";n.r(t);var o=n(1),i=n(3),r=n(2),a=n(5),s=n(30),l=n(4),c=n(42),u=n(13);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 f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(n,e);var t=h(n);function n(){return f(this,n),t.apply(this,arguments)}return n}(r.a.Model),v=n(366),b=n(1030),w=n(144),S=n(200),k=n(0),M=n(1056),O=n(1084),T=n(264),x=n(303),E=n(62),C=n(6),R=n(29),P=n(9),_=n(1196),V=n(199),N=n(1036),j=n(1312),I=n.n(j),D=n(1313),B=n.n(D);function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function U(e,t){return(U=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=J(e);if(t){var i=J(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return H(this,n)}}function H(e,t){return!t||"object"!==A(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function J(e){return(J=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var q,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}}),t&&U(e,t)}(s,e);var t,n,o,a=F(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return I.a}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{key:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=suggestion]":{observe:"suggestion",setOptions:{validate:!0}},"[name=reason]":{observe:"reason",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{ratingValidation:".rating-form-feedback"}}},{key:"getMetadataValue",value:function(){return this.options.metadataType===V.MetadataType.BroadcastDate?this.options.metadataValue?R(this.options.metadataValue).format(P.l.FULL_YEAR):i.a.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof r.a.Collection?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):i.a.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||i.a.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===V.MetadataType.Other?i.a.getPhrase(this.lang,"otherSuggestionPlaceholder"):i.a.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:N.h.translateMetadataName(this.options.metadataType).toLowerCase()})}},{key:"renderRatingSelect",value:function(){this.options.ratingValidationMessage?this.getUI("ratingValidation").text(this.options.ratingValidationMessage).attr("style","display: block;"):this.getUI("ratingValidation").hide(),this.options.metadataType===V.MetadataType.Rating&&this.showChildView("ratingSelect",new _.a({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:B.a,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===V.MetadataType.Rating,isOtherType:this.options.metadataType===V.MetadataType.Other,metadataType:N.h.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),C.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),C.Validation.unbind(this)}}])&&L(t.prototype,n),o&&L(t,o),s}(r.a.Component);!function(e){e[e.Email=0]="Email"}(q||(q={}));var G=n(164),K=n(58),W=Object.assign(Object.assign({},G.a),{createSuggestEditNotification:function(e){return{_type:K.a.SuggestEdit,groupId:e.groupId,receiverId:0,instanceRegion:e.instanceRegion,countryCode:e.countryCode,channels:[q.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),$=n(1314),Q=n.n($);function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Z(e,t){return(Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ee(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=ne(e);if(t){var i=ne(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return te(this,n)}}function te(e,t){return!t||"object"!==Y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ne(e){return(ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"SuggestAnEditView",(function(){return oe}));var oe=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}}),t&&Z(e,t)}(f,e);var t,n,r,d=ee(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),d.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=a.a.getInstance(k.g.Video,this),this.ratingsDataService=a.a.getInstance(k.g.Ratings,this),this.notificationDataService=a.a.getInstance(k.g.Notifications,this),this.selectedMetadata=new m,this.metadataCollection=this.getMetadataCollection(),this.bindListeners()}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return Q.a}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"lang",get:function(){return"libraryEditor.suggestAnEdit"}},{key:"title",get:function(){return i.a.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return u.k.generateUniqueChannelName(this)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:x.e,title:i.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new b.a,channelName:this.channelName,buttonText:i.a.getPhrase(this.lang,"submit"),onClick:function(){return e.onSubmit()}}}]}},{key:"requiredResources",get:function(){return{config:S.b.config,currentUser:w.b.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(k.e.VIDEO,"".concat(k.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(k.e.NOTIFICATIONS,"".concat(k.f.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(){var e=this;if(this.validateForm()){this.spinnerModel.set(T.c.ShowSpinner,!0);var t=this.selectedMetadata.get("metadataType")===V.MetadataType.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),n=this.config.get("suggestEditMetadataGroupId"),o=W.createSuggestEditNotification({groupId:n,instanceRegion:this.currentUser.get("instanceRegion"),countryCode:this.currentUser.get("countryCode"),video:this.model.toJSON(),user:this.currentUser.toJSON(),property:this.selectedMetadata.get("metadataType").toLowerCase(),suggestion:t,reason:this.viewModel.get("reason"),currentValue:this.selectedMetadata.get("metadataValue")});this.notificationDataService.suggestEdit(o,(function(){e.triggerMethod("hide"),e.spinnerModel.set(T.c.ShowSpinner,!1),e.spinnerModel.set(T.c.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(T.c.ShowSpinner,!1)}},{key:"onMetadataSelect",value:function(e){this.selectMetadata(e),this.renderSuggestEdit()}},{key:"onSelectRating",value:function(e){this.viewModel.set("ratingSuggestion",e.get("name")),this.renderSuggestEdit()}},{key:"selectMetadata",value:function(e){this.spinnerModel.set(T.c.Disabled,!1),u.c.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==V.MetadataType.Other?this.model.get(e.get("property")):null}),e.get("name")!==V.MetadataType.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){return new M.a(Object.keys(V.MetadataTypes).map((function(e){return V.MetadataTypes[e]})))}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=s.a.get(this.viewModelName),this.viewModel.addValidation(N.g)}},{key:"validateForm",value:function(){this.renderSuggestEdit(),this.viewModel.validate();var e=this.viewModel.toJSON(),t=e.reason,n=e.suggestion;return!(this.getRatingValidationMessage()||this.selectedMetadata.get("metadataType")!==V.MetadataType.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==V.MetadataType.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?N.f.original():"":N.f.empty()}},{key:"checkPreselection",value:function(){if(!this.selectedMetadata.get("metadataType")&&this.options.metadata&&this.dataFetched()){var e=this.getMetadataByType(this.options.metadata);this.selectMetadata(e)}}},{key:"logAction",value:function(){var e=u.y.getSourceTypes(this.model);e=o.filter(e,(function(e){return e!==E.a.CustomLibrary}));var t={videoSourceTypes:o.sortBy(o.unique(e),(function(e){return e})).join(","),videoId:this.model.get("id"),metadataProperty:this.selectedMetadata.get("metadataType"),metadataPropertyValue:this.selectedMetadata.get("metadataValue"),suggestion:this.viewModel.get("suggestion"),reason:this.viewModel.get("reason")};c.a.logUserAction(t,{descriptor:l.SuggestionDescriptor.Edit,location:l.LocationContext.Popup,actionType:l.UserAction.Suggest,entity:l.EntityType.Video})}},{key:"dataFetched",value:function(){return!!this.model&&!!this.ratingCollection}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new O.a({collection:N.h.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||i.a.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:c.a}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new z({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new v.a(this.ratingCollection.findWhere({name:this.viewModel.get("ratingSuggestion")})):null,metadataType:this.selectedMetadata.get("metadataType"),metadataValue:this.selectedMetadata.get("metadataValue"),ratingValidationMessage:this.getRatingValidationMessage()}))}},{key:"onBeforeRender",value:function(){this.dataFetched()||(this.model=this.videoDataService.getVideo(this.options.videoId),this.ratingCollection=this.ratingsDataService.getAllRatings()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:u.r.getSpinner({size:u.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}}])&&X(t.prototype,n),r&&X(t,r),f}(r.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[39],{1030:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),o=n(264);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){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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}}),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),c}(r.a.Model)},1038:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(48),i=n(168),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}},1047: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(1061),a=n(13),s=n(1048),u=n.n(s),c=n(1049),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){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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}}),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),c}(o.a.Component)},1048: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})},1049:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1105:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(2),o=n(303),i=n(13),l=n(1047),a=n(1038),s=n(1106),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){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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}}),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),c}(r.a.Component)},1106: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})},1228: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})},1418:function(e,t,n){"use strict";n.r(t),n.d(t,"MoveFolderView",(function(){return x}));var r=n(1),o=n(6),i=n(2),l=n(30),a=n(5),s=n(42),u=n(0),c=n(303),f=n(84),d=n(1030),p=n(87),h=n(13),y=n(264),b=n(3),m=n(1105),v=n(1228),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 k(e){return function(e){if(Array.isArray(e))return P(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return P(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 P(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 P(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=R(e);if(t){var o=R(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function R(e){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=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}}),t&&I(e,t)}(P,e);var t,n,v,w=S(P);function P(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,P),w.call(this,e)}return t=P,(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,k(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),P}(i.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[4],{1298:function(e,n,t){var a=t(10);e.exports=(a.default||a).template({1:function(e,n,t,a,r){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:r}))+"</p>\r\n<p>"+l((t.lang||n&&n.lang||o).call(i,"meaningSubheading",{name:"lang",hash:{},data:r}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning1",{name:"lang",hash:{},data:r}))+"</li>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning2",{name:"lang",hash:{},data:r}))+"</li>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning3",{name:"lang",hash:{},data:r}))+"</li>\r\n</ul>\r\n"},3:function(e,n,t,a,r){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:r}))+"</p>\r\n<p>"+l((t.lang||n&&n.lang||o).call(i,"featureSubheading",{name:"lang",hash:{},data:r}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"feature1",{name:"lang",hash:{},data:r}))+"</li> \r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"feature2",{name:"lang",hash:{},data:r}))+"</li>\r\n</ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,a,r){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,r,0),inverse:e.program(3,r,0),data:r}))?i:""},useData:!0})},1431:function(e,n,t){"use strict";t.r(n),t.d(n,"PublishLibraryView",(function(){return P}));var a=t(6),r=t(5),i=t(2),o=t(303),l=t(0),u=t(264),c=t(13),s=t(3),h=t(146),f=t(322),g=t(324),p=t(57),b=t(1298),y=t.n(b);function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(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 a=n[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function k(e,n){return(k=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function w(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,a=_(e);if(n){var r=_(this).constructor;t=Reflect.construct(a,arguments,r)}else t=a.apply(this,arguments);return S(this,t)}}function S(e,n){return!n||"object"!==m(n)&&"function"!=typeof n?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):n}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var P=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}}),n&&k(e,n)}(S,e);var n,t,b,m=w(S);function S(){return d(this,S),m.apply(this,arguments)}return n=S,(t=[{key:"initialize",value:function(){this.libraryDataService=r.a.getInstance(l.g.Library,this),this.migrationVideoDataService=r.a.getInstance(l.g.MigrationVideo,this),this.videoDataService=r.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;a.Radio.channel(this.channelName).trigger(u.b.ShowSpinner);var n=0,t=function(){++n===e.libraries.length&&(e.triggerMethod("hide"),e.videoDataService.clearVideoCache(),a.Radio.channel(f.a.LIBRARY_STATUS).trigger("status:changed"))};p.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:h.b.libraries,customerMetadata:g.b.customerMetaData}}},{key:"viewOptions",value:function(){return{noPublisher:p.a.noPublisher(this.customerMetadata)}}}])&&v(n.prototype,t),b&&v(n,b),S}(i.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[40],{1030:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2),o=n(264);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){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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}}),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),c}(r.a.Model)},1038:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(48),i=n(168),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}},1047: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(1061),a=n(13),u=n(1048),s=n.n(u),c=n(1049),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){return!t||"object"!==p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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}}),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),c}(o.a.Component)},1048: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})},1049:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1105:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(2),o=n(303),i=n(13),l=n(1047),a=n(1038),u=n(1106),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){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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}}),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),c}(r.a.Component)},1106: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})},1227: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})},1417:function(e,t,n){"use strict";n.r(t),n.d(t,"RenameFolderView",(function(){return S}));var r=n(1),o=n(6),i=n(30),l=n(5),a=n(2),u=n(42),s=n(0),c=n(303),f=n(1030),p=n(87),d=n(264),h=n(13),y=n(3),b=n(1105),m=n(1227),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){return!t||"object"!==g(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var S=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}}),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),g}(a.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[41],{1057:function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var r=n(2),o=n(36),i=n(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 n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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}}),e&&u(t,e)}(l,t);var e,n,o,a=s(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this,i.a.getPhrase(p,"title"))).supportUrl=t,e}return e=l,(n=[{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(){r.a.LocationUtils.Reload()}}])&&c(e.prototype,n),o&&c(e,o),l}(o.a)},1094:function(t,e,n){"use strict";n(309);var r=n(2),o=n(36),i=n(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 n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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}}),e&&u(t,e)}(l,t);var e,n,o,a=s(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,i.a.getPhrase(p,"title"))}return e=l,(n=[{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(){r.a.LocationUtils.Reload()}}])&&c(e.prototype,n),o&&c(e,o),l}(o.a);function g(t){return(g="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 h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function b(t,e){return(b=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 n,r=v(t);if(e){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(t,e){return!e||"object"!==g(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=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}}),e&&b(t,e)}(c,t);var e,n,o,a=m(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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&h(e.prototype,n),o&&h(e,o),c}(o.a);function O(t){return(O="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 w(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}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 n,r=x(t);if(e){var o=x(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return R(this,n)}}function R(t,e){return!e||"object"!==O(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function x(t){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var S=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}}),e&&_(t,e)}(c,t);var e,n,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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&w(e.prototype,n),o&&w(e,o),c}(o.a);n(1057);n.d(e,"a",(function(){return y})),n.d(e,"c",(function(){return P})),n.d(e,"b",(function(){return S})),n.d(e,"a",(function(){return y}))},1120:function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(2),o=n(1180),i=n.n(o),a=n(1181),c=n.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 s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function l(t,e){return(l=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 n,r=y(t);if(e){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p(this,n)}}function p(t,e){return!e||"object"!==u(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var g=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}}),e&&l(t,e)}(a,t);var e,n,r,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,(n=[{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),n=2*e.r.baseVal.value*Math.PI;e.style.strokeDasharray="".concat(n," ").concat(n),e.style.strokeDashoffset=n;var r=n-t/100*n;e.style.strokeDashoffset=r;var o=this.getUI("text");o&&o.text("".concat(t,"%"))}}])&&s(e.prototype,n),r&&s(e,r),a}(r.a.Component)},1180:function(t,e,n){t.exports={circle:"_3iX0l",extraText:"_1nYnx",progressCircleContainer:"_2l1Al",progressCircle:"_1RbA5"}},1181:function(t,e,n){var r=n(10);t.exports=(r.default||r).template({1:function(t,e,n,r,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,n,r,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((n.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=n.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})},1361:function(t,e,n){t.exports={backupProgress:"_15jUh",info:"_1NjZL",progress:"fp9FZ",migrationBackupContainer:"_28z_5"}},1362:function(t,e,n){var r=n(10);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){t.propertyIsEnumerable;var i,a=null!=e?e:t.nullContext||{},c=t.hooks.helperMissing,u=t.escapeExpression;return'<h4 class="pb-4">'+u((n.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=(n.lang||e&&e.lang||c).call(a,"info",{name:"lang",hash:{},data:o}))?i:"")+"\r\n</p>"},useData:!0})},1448:function(t,e,n){"use strict";n.r(e),n.d(e,"PublisherBackupProgressView",(function(){return O}));var r=n(2),o=n(5),i=n(30),a=n(1361),c=n.n(a),u=n(1362),s=n.n(u),l=n(1094),f=n(0),p=n(3),y=n(1120);function g(t){return(g="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 h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function m(t,e){return(m=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 n,r=P(t);if(e){var o=P(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(t,e){return!e||"object"!==g(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function P(t){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var O=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}}),e&&m(t,e)}(g,t);var e,n,a,u=d(g);function g(){return h(this,g),u.apply(this,arguments)}return e=g,(n=[{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 s.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(){r.a.ErrorHelper.throw(new l.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(){r.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()}}])&&b(e.prototype,n),a&&b(e,a),g}(r.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[42],{1409:function(e,t,n){e.exports={smart:"_1dRs0",leftNav:"_3dpUO"}},1410:function(e,t,n){e.exports={item:"_13Gu_",text:"_2mbEb",folderTree:"_2NhVk",node:"_1dMK1",selected:"_1AACi"}},1411: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})},1412: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})},1471:function(e,t,n){"use strict";n.r(t);var i=n(2),r=n(3),o=n(51),a=n(93),s=n(1409),l=n.n(s),c=n(1410),u=n.n(c),d=n(1411),h=n.n(d),f=n(9),g=n(1061),p=n(1122),v=n(1),m=n(6),y=n(5),b=n(16),S=n(336),w=n(1412),k=n.n(w),M=n(53),I=n(120),C=n(0);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(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 R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(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 E(this,n)}}function E(e,t){return!t||"object"!==T(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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}}),t&&R(e,t)}(o,e);var t,n,i,r=A(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=y.a.getInstance(C.x.LocalOptions,this),this.migrationVideoDataService=y.a.getInstance(C.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?C.a.MigrationWizard.SMART:C.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(){m.Radio.channel(I.b.MIGRATION).trigger(C.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),o}(i.a.View);function x(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){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=e[Symbol.iterator]()},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 L={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=L.findFolder(e.get("children"),t);i&&(n=i)}})),n}},P=n(57),B=n(91),D=n(30),H=n(200),G=n(1114),W=n(13),F=n(95),j=n(199),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){return!t||"object"!==U(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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}}),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=y.a.getInstance(C.x.FolderCache,this),this.selectedVideoService=y.a.getInstance(C.x.SelectedVideo,this),this.migrationVideoDataService=y.a.getInstance(C.g.MigrationVideo,this),this.alertService=y.a.getInstance(C.x.Alerts)}},{key:"bindListeners",value:function(){this.listenTo(C.e.MIGRATION,C.i.MigrationWizard.SELECTED_CHANGED,this.setSelectedVideos),this.listenTo(C.e.MIGRATION,"manual:review:video:count:sync",this.render),this.listenTo(C.e.MIGRATION,"".concat(C.f.CUSTOMER_VIDEO,":count:sync"),this.render),this.listenTo(C.e.MIGRATION,"".concat(C.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(C.b.MIGRATION_WIZARD,C.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);W.f.setSelected(F.a.MIGRATION_WIZARD,n,e.folders),e.selectedFolder=W.f.getSelected(F.a.MIGRATION_WIZARD,t)}else{var r=e.folders.first();if(r)return void i.a.AppLinkHelper.trigger({application:C.b.MIGRATION_WIZARD,action:C.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=L.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 P.a.isInitialMigration(this.customerMetadata)}},{key:"onClickBack",value:function(){var e=this;new W.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:C.b.MIGRATION_WIZARD,action:C.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 G.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:C.a.MigrationWizard.HOME,application:C.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:F.a.MIGRATION_WIZARD});this.showChildView("leftNav",t),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){e.centerSelectedItem()}))}))}},{key:"renderSearchBar",value:function(){this.showChildView("search",new G.h({selected:this.errorCount.get("count")?"publisher-archive":"none"}))}},{key:"renderStatusBar",value:function(){var e=this;if(this.videoCount){var t={application:C.b.MIGRATION_WIZARD,action:C.a.MigrationWizard.SELECTED,args:[this.options.folderChord]},n=this.videoCount.get("successCount"),i=this.selectedVideoService.getNumberSelected(),o=new G.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 G.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;W.a.GetViewModel(i,j.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 G.a({config:this.config,currentUser:this.currentUser}))}},{key:"requiredResources",get:function(){return{config:H.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),d}(i.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[43],{1030:function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var r=n(2),o=n(264);function i(t){return(i="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 a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=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}}),e&&c(t,e)}(l,t);var e,n,r,i=s(l);function l(){return a(this,l),i.apply(this,arguments)}return e=l,(n=[{key:"defaults",value:function(){return t={},e=o.c.Disabled,n=!0,e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}}])&&u(e.prototype,n),r&&u(e,r),l}(r.a.Model)},1090:function(t,e,n){"use strict";var r=n(203),o=n(1),i=n(201),a=n(0),u=n(145),c=n(305);function s(t){return(s="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){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t)||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 f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(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 n,r=d(t);if(e){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(t,e){return!e||"object"!==s(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var g=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}}),e&&y(t,e)}(s,t);var e,n,r,i=h(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=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_VIDEOS,":collection"),cursor:t.cursor,sort:t.sort})).setAdditionalData(t),e}return e=s,(n=[{key:"setAdditionalData",value:function(t){var e=t.libraryIds,n=t.dateQueryString,r=t.subjects;e&&(this.libraryIds=e),r&&(o.isArray(r)&&r.length&&(this.subjects=r),o.isArray(r)||(this.subjects=[r]));var i=o.findWhere(c.g,{queryString:n})||c.e;this.dateOption=new u.b(i)}},{key:"toString",value:function(){var t=this.subjects&&this.subjects.length&&this.subjects.map((function(t){return escape(t.get("name"))}))||[];return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].concat(l(t),[this.cursor]).filter(Boolean).join(":")}},{key:"toParams",value:function(){var t={};return this.libraryIds&&(t.libraryIds=this.libraryIds),this.dateOption&&(t.from=this.dateOption.get("from"),t.to=this.dateOption.get("to")),this.subjects&&(t.subjectIds=o.flatten(this.subjects.map((function(t){return t.get("subjectIds")})))),this.cursor&&(t.cursor=this.cursor),t}}])&&p(e.prototype,n),r&&p(e,r),s}(i.a);function m(t){return(m="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 v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function j(t,e){return(j=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function O(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 n,r=w(t);if(e){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function S(t,e){return!e||"object"!==m(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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}}),e&&j(t,e)}(s,t);var e,n,r,i=O(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=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_SUBJECTS,":collection"),sort:t.sort})).setAdditionalData(t),e}return e=s,(n=[{key:"setAdditionalData",value:function(t){var e=t.libraryIds,n=t.dateQueryString;e&&(this.libraryIds=e);var r=o.findWhere(c.g,{queryString:n})||c.e;this.dateOption=new u.b(r)}},{key:"toString",value:function(){return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].filter(Boolean).join(":")}},{key:"toParams",value:function(){var t={};return this.libraryIds&&(t.libraryIds=this.libraryIds),this.dateOption&&(t.from=this.dateOption.get("from"),t.to=this.dateOption.get("to")),t}}])&&v(e.prototype,n),r&&v(e,r),s}(i.a);function I(t){return(I="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 _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function k(t,e){return(k=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function C(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 n,r=x(t);if(e){var o=x(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return R(this,n)}}function R(t,e){return!e||"object"!==I(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function x(t){return(x=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}}),e&&k(t,e)}(n,t);var e=C(n);function n(t,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return _(this,n),e.call(this,{collectionPrefix:a.f.LIBRARY_FOLDERS,id:t,sort:r,cursor:o})}return n}(i.a);n.d(e,"d",(function(){return r.a})),n.d(e,"b",(function(){return g})),n.d(e,"c",(function(){return P})),n.d(e,"a",(function(){return E}))},1336:function(t,e,n){var r=n(10);t.exports=(r.default||r).template({1:function(t,e,n,r,o){var i;t.propertyIsEnumerable;return(null!=(i=t.lambda(null!=(i=null!=e?e.options:e)?i.spinnerEl:i,e))?i:"")+"\r\n"},3:function(t,e,n,r,o){t.propertyIsEnumerable;var i,a=t.lambda,u=t.escapeExpression,c=null!=e?e:t.nullContext||{},s=t.hooks.helperMissing;return'<div class="pb-3 text-center">\r\n <img src="'+u(a(null!=(i=null!=e?e.options:e)?i.imageUrl:i,e))+'" class="'+u(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.image:i,e))+'" />\r\n</div>\r\n<p class="m-0">\r\n '+(null!=(i=(n.lang||e&&e.lang||s).call(c,"body1",{name:"lang",hash:{},data:o}))?i:"")+"\r\n "+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.libraryText:i,{name:"if",hash:{},fn:t.program(4,o,0),inverse:t.noop,data:o}))?i:"")+"\r\n "+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.subject:i,{name:"if",hash:{},fn:t.program(6,o,0),inverse:t.noop,data:o}))?i:"")+"\r\n "+(null!=(i=(n.lang||e&&e.lang||s).call(c,"body4",{name:"lang",hash:{email:null!=(i=null!=e?e.options:e)?i.email:i,to:null!=(i=null!=e?e.options:e)?i.to:i,from:null!=(i=null!=e?e.options:e)?i.from:i},data:o}))?i:"")+"\r\n</p>\r\n"},4:function(t,e,n,r,o){var i;t.propertyIsEnumerable;return null!=(i=(n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"body2",{name:"lang",hash:{libraryText:null!=(i=null!=e?e.options:e)?i.libraryText:i},data:o}))?i:""},6:function(t,e,n,r,o){var i;t.propertyIsEnumerable;return null!=(i=(n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"body3",{name:"lang",hash:{subject:null!=(i=null!=e?e.options:e)?i.subject:i},data:o}))?i:""},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){var i;t.propertyIsEnumerable;return null!=(i=n.unless.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.dataFetched:i,{name:"unless",hash:{},fn:t.program(1,o,0),inverse:t.program(3,o,0),data:o}))?i:""},useData:!0})},1337:function(t,e,n){t.exports={image:"_2AV9T"}},1440:function(t,e,n){"use strict";n.r(e),n.d(e,"GeneratePastReleasesPdfView",(function(){return R}));var r=n(1),o=n(29),i=n(2),a=n(5),u=n(3),c=n(4),s=n(42),l=n(303),f=n(1090),p=n(144),y=n(0),h=n(1030),b=n(13),d=n(305),g=n(264),m=n(145),v=n(1336),j=n.n(v),O=n(1337),S=n.n(O);function w(t){return(w="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 P(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function I(t,e){return(I=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _(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 n,r=C(t);if(e){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function k(t,e){return!e||"object"!==w(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var R=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}}),e&&I(t,e)}(O,t);var e,n,i,v=_(O);function O(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,O),v.call(this,t)}return e=O,(n=[{key:"initialize",value:function(){this.libraryDataService=a.a.getInstance(y.g.Library,this),this.contentUpdatesDataService=a.a.getInstance(y.g.ContentUpdates,this),this.exportDataService=a.a.getInstance(y.g.Export,this)}},{key:"name",get:function(){return"GeneratePastReleasesPdfView"}},{key:"title",get:function(){return u.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.generatePastReleasesPdf"}},{key:"template",get:function(){return j.a}},{key:"channelName",get:function(){return b.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var t=this;return[{behaviorClass:l.e,title:u.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new h.a,channelName:this.channelName,buttonText:u.a.getPhrase(this.lang,"generateBtn"),onClick:function(){return t.onClickGeneratePdf()}}}]}},{key:"onLibrariesSync",value:function(t){var e=this;this.libraries=t,this.selectedLibraryIds=d.f.getLibraryIds(this.options.librariesQueryString,t),this.subjectCollectionIdentifier=new f.c({dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds}),this.contentUpdatesDataService.getRecentVideoSubjects(this.subjectCollectionIdentifier,(function(n){return e.onSubjectsSync(t,n)}))}},{key:"onSubjectsSync",value:function(t,e){var n=d.f.getSubjectOptions(e).map((function(t){return new m.b(t)})),o={dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds};if(!this.options.subjectQueryString)return this.videoCollectionIdentifier=new f.b(o),void this.spinnerModel.set(g.c.Disabled,!1);var i=this.getSubjectIds();this.videoCollectionIdentifier=new f.b(r.extend(o,{subjects:n.filter((function(t){return!!r.intersection(i,t.get("subjectIds")).length}))})),this.spinnerModel.set(g.c.Disabled,!1)}},{key:"getSubjectIds",value:function(){if(this.options.subjectQueryString)return this.options.subjectQueryString.split("-")[1].split(",")}},{key:"getLibrariesText",value:function(){var t=this;if(this.libraries.length!==this.selectedLibraryIds.length){var e=this.libraries.filter((function(e){return r.contains(t.selectedLibraryIds,e.id.toString())})),n=e.map((function(t){return"<strong>".concat(b.w.escapeExpression(t.get("name")),"</strong>")}));return e.length<=2?n.join(" ".concat(u.a.getPhrase(this.lang,"and")," ")):r.first(n,n.length-1).join(", ")+" ".concat(u.a.getPhrase(this.lang,"and")," ").concat(r.last(n))}}},{key:"getFormattedDate",value:function(t){if(t)return o(t).format("DD MMMM YYYY")}},{key:"getFormattedSubjects",value:function(){if(this.videoCollectionIdentifier.subjects){var t=this.videoCollectionIdentifier.subjects.map((function(t){return t.get("name")}));return 1===t.length?t[0]:t.slice(0,-1).join(", ")+" ".concat(u.a.getPhrase(this.lang,"and")," ")+t.slice(-1)}}},{key:"onClickGeneratePdf",value:function(){this.spinnerModel.set(g.c.ShowSpinner,!0),this.fetchVideosAndGeneratePdf()}},{key:"fetchVideosAndGeneratePdf",value:function(){var t=this;this.contentUpdatesDataService.getRecentVideosAllPages(this.videoCollectionIdentifier,(function(e){e&&e.length?t.generatePdf(e.map((function(t){return t.id.toString()}))):t.triggerMethod("hide")}))}},{key:"generatePdf",value:function(t){var e=this,n=this.videoCollectionIdentifier.subjects?this.getFormattedSubjects():u.a.getPhrase(this.lang,"latestReleases"),r=o(this.videoCollectionIdentifier.dateOption.get("from")).format("MMMM YYYY"),i=o(this.videoCollectionIdentifier.dateOption.get("to")).format("MMMM YYYY"),a=r===i?u.a.getPhrase(this.lang,"fromContentUpdate",{from:r}):u.a.getPhrase(this.lang,"fromToContentUpdates",{from:r,to:i});this.exportDataService.generateCustomListPdf(n,a,t,this.currentUser,(function(){return e.triggerMethod("hide")})),this.logAction(t.length)}},{key:"logAction",value:function(t){var e={location:c.LocationContext.Popup,actionType:c.UserAction.Create,entity:c.EntityType.PDF,workflowPhase:c.WorkflowPhase.Complete},n={videoCount:t,libraries:this.selectedLibraryIds.join(","),releaseDate:this.videoCollectionIdentifier.dateOption.get("name"),subjects:this.options.subjectQueryString?this.videoCollectionIdentifier.subjects.map((function(t){return t.get("name")})).join(","):""};s.a.logUserAction(n,e)}},{key:"requiredResources",get:function(){return{currentUser:p.b.currentUser}}},{key:"onBeforeRender",value:function(){var t=this;this.libraries||this.libraryDataService.getHostedLibraries((function(e){return t.onLibrariesSync(e)}))}},{key:"viewOptions",value:function(){return{styles:S.a,dataFetched:!!this.libraries,spinnerEl:b.r.getSpinner({size:b.s.Large,extraClasses:"mx-auto"}),email:this.currentUser.get("email"),imageUrl:y.l.Shared.GeneratePdf,libraryText:this.getLibrariesText(),subject:this.getFormattedSubjects(),from:this.videoCollectionIdentifier&&this.getFormattedDate(this.videoCollectionIdentifier.dateOption.get("from")),to:this.videoCollectionIdentifier&&this.getFormattedDate(this.videoCollectionIdentifier.dateOption.get("to"))}}}])&&P(e.prototype,n),i&&P(e,i),O}(i.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[44],{1057:function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var r=n(2),o=n(36),i=n(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 s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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}}),e&&c(t,e)}(l,t);var e,n,o,a=u(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=a.call(this,i.a.getPhrase(p,"title"))).supportUrl=t,e}return e=l,(n=[{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(){r.a.LocationUtils.Reload()}}])&&s(e.prototype,n),o&&s(e,o),l}(o.a)},1094:function(t,e,n){"use strict";n(309);var r=n(2),o=n(36),i=n(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 s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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}}),e&&c(t,e)}(l,t);var e,n,o,a=u(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,i.a.getPhrase(p,"title"))}return e=l,(n=[{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(){r.a.LocationUtils.Reload()}}])&&s(e.prototype,n),o&&s(e,o),l}(o.a);function g(t){return(g="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 d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(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 n,r=v(t);if(e){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(t,e){return!e||"object"!==g(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=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}}),e&&b(t,e)}(s,t);var e,n,o,a=h(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("migrationWizard.migrationProgressError","title"))}return e=s,(n=[{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(){r.a.LocationUtils.Reload()}}])&&d(e.prototype,n),o&&d(e,o),s}(o.a);function O(t){return(O="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 k(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function w(t,e){return(w=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _(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 n,r=S(t);if(e){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T(this,n)}}function T(t,e){return!e||"object"!==O(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var R=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}}),e&&w(t,e)}(s,t);var e,n,o,a=_(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("migrationWizard.migrationFinalisation","title"))}return e=s,(n=[{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(){r.a.LocationUtils.Reload()}}])&&k(e.prototype,n),o&&k(e,o),s}(o.a);n(1057);n.d(e,"a",(function(){return y})),n.d(e,"c",(function(){return P})),n.d(e,"b",(function(){return R})),n.d(e,"a",(function(){return y}))},1367:function(t,e,n){t.exports={progress:"bJ21G",remaining:"_1T3fH",info:"_3m6CX",migrationContainer:"MVm9U",migrationSyncContainer:"KH7rf",syncServer:"_2-0ob",syncVideo:"_2Rh0f",migrationSyncAnimation:"oXD93",syncCloud:"_3B9BP"}},1368:function(t,e,n){var r=n(10);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){t.propertyIsEnumerable;var i,a=t.lambda,s=t.escapeExpression;return'<div class="p-3 pl-5 pr-5">\r\n <div class="'+s(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.migrationSyncContainer:i,e))+' pt-2 pb-4">\r\n <img src="/images/server.png" class="'+s(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.syncServer:i,e))+'">\r\n <img src="/images/video.png" class="'+s(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.syncVideo:i,e))+'">\r\n <img src="/images/cloud.png" class="'+s(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.syncCloud:i,e))+'">\r\n </div>\r\n\r\n <h4 class="adding-text">'+s(a(null!=(i=null!=e?e.options:e)?i.addingText:i,e))+'</h4>\r\n <div class="progress-bar-region"></div>\r\n</div>\r\n\r\n<span class="d-block text-center pb-3 '+s(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.info:i,e))+'">'+s((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"keepWindowOpen",{name:"lang",hash:{},data:o}))+"</span>"},useData:!0})},1451:function(t,e,n){"use strict";n.r(e),n.d(e,"MigrationProgressView",(function(){return P}));var r=n(2),o=n(30),i=n(5),a=n(1367),s=n.n(a),c=n(1368),u=n.n(c),l=n(1094),f=n(1114),p=n(0),y=n(3);function g(t){return(g="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 d(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(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 n,r=v(t);if(e){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(t,e){return!e||"object"!==g(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=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}}),e&&b(t,e)}(g,t);var e,n,a,c=h(g);function g(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),c.call(this,t)}return e=g,(n=[{key:"initialize",value:function(){this.viewModel=o.a.get("migration:progress",{percentage:0}),this.migrationVideoDataService=i.a.getInstance(p.g.MigrationVideo,this),this.bindMigrationDataListeners()}},{key:"name",get:function(){return"MigrationProgressView"}},{key:"title",get:function(){return y.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.migrationProgress"}},{key:"template",get:function(){return u.a}},{key:"className",get:function(){return"".concat(s.a.migrationContainer," p-3 bg-white ").concat(s.a.progress)}},{key:"elements",get:function(){return{addingText:".adding-text"}}},{key:"regions",value:function(){return{progressBar:{replaceElement:!0,el:".progress-bar-region"}}}},{key:"bindMigrationDataListeners",value:function(){this.listenTo(p.e.MIGRATION,"".concat(p.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(p.e.MIGRATION,"".concat(p.f.FINALISATION,":").concat(this.options.finalisationTaskId,":error"),this.onError)}},{key:"poll",value:function(){var t=this;this.migrationVideoDataService.getFinalisationTask(this.options.finalisationTaskId,(function(e){if(t.finalisationTask=e,t.setPercentage(),t.viewModel.get("percentage")>=100){i.a.getInstance(p.g.Library).clearLibrariesCache(),i.a.releaseInstance(p.g.Library),t.migrationVideoDataService.clearCacheAndGetCustomerMetadata();var n={};return t.options.firstTime&&(n.initialMigration=!0),void r.a.AppLinkHelper.trigger({application:p.b.MIGRATION_WIZARD,action:p.a.MigrationWizard.VIDEOS_ADDED,args:[t.options.finalisationTaskId],params:n})}setTimeout((function(){return t.poll()}),5e3),t.isRendered()?(t.renderProgressBar(),t.getUI("addingText").text(t.getAddingText())):t.render()}))}},{key:"setPercentage",value:function(){if(this.finalisationTask){var t=this.finalisationTask.get("successfullyProcessed")+this.finalisationTask.get("failedToProcess"),e=this.finalisationTask.get("numberOfVideos");this.finalisationTask.get("videosWithWarning")&&0===e?this.viewModel.set("percentage",100):this.viewModel.set("percentage",Math.round(t/e*100))}}},{key:"onError",value:function(){r.a.ErrorHelper.throw(new l.c)}},{key:"renderProgressBar",value:function(){this.showChildView("progressBar",new f.f({model:this.viewModel,backgroundClass:"bg-info"}))}},{key:"onBeforeRender",value:function(){return this.pollingStarted||(this.poll(),this.pollingStarted=!0),this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),!!this.finalisationTask&&!!this.customerMetadata}},{key:"getAddingText",value:function(){var t=this.finalisationTask.get("successfullyProcessed")+this.finalisationTask.get("failedToProcess");return y.a.getPhrase(this.lang,"addingVideos",{numberMigrated:t||1,numberSelected:this.finalisationTask.get("numberOfVideos")+this.finalisationTask.get("videosWithWarning")})}},{key:"viewOptions",value:function(){if(this.finalisationTask){var t=this.finalisationTask.get("successfullyProcessed")+this.finalisationTask.get("failedToProcess");return{styles:s.a,numberMigrated:t||1,numberSelected:this.finalisationTask.get("numberOfVideos")+this.finalisationTask.get("videosWithWarning"),addingText:this.getAddingText()}}}},{key:"onRender",value:function(){this.renderProgressBar()}}])&&d(e.prototype,n),a&&d(e,a),g}(r.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[45],{1057:function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var r=n(2),o=n(36),i=n(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 n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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}}),e&&u(t,e)}(s,t);var e,n,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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&c(e.prototype,n),o&&c(e,o),s}(o.a)},1094:function(t,e,n){"use strict";n(309);var r=n(2),o=n(36),i=n(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 n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}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 n,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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}}),e&&u(t,e)}(s,t);var e,n,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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&c(e.prototype,n),o&&c(e,o),s}(o.a);function d(t){return(d="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 h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(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 n,r=v(t);if(e){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(t,e){return!e||"object"!==d(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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}}),e&&b(t,e)}(c,t);var e,n,o,a=g(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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&h(e.prototype,n),o&&h(e,o),c}(o.a);function O(t){return(O="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 S(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function P(t,e){return(P=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 n,r=R(t);if(e){var o=R(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}function _(t,e){return!e||"object"!==O(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}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}}),e&&P(t,e)}(c,t);var e,n,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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&S(e.prototype,n),o&&S(e,o),c}(o.a);n(1057);n.d(e,"a",(function(){return y})),n.d(e,"c",(function(){return w})),n.d(e,"b",(function(){return E})),n.d(e,"a",(function(){return y}))},1388:function(t,e,n){t.exports={container:"_2SvL3",header:"_2KEEa",footer:"wCMJb"}},1389:function(t,e,n){var r=n(10);t.exports=(r.default||r).template({1:function(t,e,n,r,o){var i;t.propertyIsEnumerable;return" "+t.escapeExpression((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"videosSelected",{name:"lang",hash:{smartCount:null!=(i=null!=e?e.options:e)?i.selected:i},data:o}))+"\r\n"},3:function(t,e,n,r,o){t.propertyIsEnumerable;return" "+t.escapeExpression((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"noVideosSelected",{name:"lang",hash:{},data:o}))+"\r\n"},5:function(t,e,n,r,o){return"disabled"},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression,u=null!=e?e:t.nullContext||{},l=t.hooks.helperMissing;return'<div class="p-3 w-100 '+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.header:i,e))+'">\r\n <span class="d-inline-block">'+c((n.lang||e&&e.lang||l).call(u,"addVideos",{name:"lang",hash:{},data:o}))+'</span>\r\n</div>\r\n<div class="p-3 w-100">\r\n <h6 class="mt-1 mb-1">\r\n'+(null!=(i=n.if.call(u,null!=(i=null!=e?e.options:e)?i.selected:i,{name:"if",hash:{},fn:t.program(1,o,0),inverse:t.program(3,o,0),data:o}))?i:"")+' </h6>\r\n <div class="selected-video-list-region"></div>\r\n</div>\r\n<div class="py-2 px-3 w-100 '+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.footer:i,e))+'">\r\n <div class="row">\r\n <div class="col-4">\r\n <button class="applink-back btn btn-secondary '+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.button:i,e))+'">\r\n '+c((n.lang||e&&e.lang||l).call(u,"back",{name:"lang",hash:{},data:o}))+'\r\n </button>\r\n </div>\r\n <div class="col-2 offset-6 text-right spinner-region">\r\n <button class="applink-next btn btn-primary '+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.button:i,e))+'" '+(null!=(i=n.if.call(u,null!=(i=null!=e?e.options:e)?i.nextDisabled:i,{name:"if",hash:{},fn:t.program(5,o,0),inverse:t.noop,data:o}))?i:"")+">\r\n "+c((n.lang||e&&e.lang||l).call(u,"addTitles",{name:"lang",hash:{smartCount:null!=(i=null!=e?e.options:e)?i.selected:i},data:o}))+"\r\n </button>\r\n </div>\r\n </div>\r\n</div>"},useData:!0})},1453:function(t,e,n){"use strict";n.r(e),n.d(e,"SelectedVideosView",(function(){return j}));var r=n(6),o=n(2),i=n(5),a=n(264),c=n(3),u=n(0),l=n(13),s=n(1114),f=n(324),p=n(1122),y=n(1094),d=n(53),h=n(57),b=n(1388),g=n.n(b),m=n(1389),v=n.n(m);function w(t){return(w="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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function S(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function P(t,e,n){return e&&S(t.prototype,e),n&&S(t,n),t}function k(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}}),e&&_(t,e)}function _(t,e){return(_=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function R(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 n,r=V(t);if(e){var o=V(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(t,e){return!e||"object"!==w(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function V(t){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var x=function(t){k(n,t);var e=R(n);function n(){return O(this,n),e.apply(this,arguments)}return P(n,[{key:"name",get:function(){return"SelectedVideoComponentCollection"}},{key:"childView",get:function(){return s.i}}]),n}(o.a.ComponentCollection),j=function(t){k(n,t);var e=R(n);function n(t){return O(this,n),e.call(this,t)}return P(n,[{key:"initialize",value:function(){this.selectedVideoService=i.a.getInstance(u.x.SelectedVideo,this),this.migrationVideoDataService=i.a.getInstance(u.g.MigrationVideo,this),this.videoDataService=i.a.getInstance(u.g.Video,this),this.listenTo(this.channelName,"add",this.onClickAdd)}},{key:"name",get:function(){return"SelectedVideosView"}},{key:"title",get:function(){return c.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.selectedVideos"}},{key:"template",get:function(){return v.a}},{key:"className",get:function(){return"row mt-2 container-region ".concat(g.a.container)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{selectedVideoListRegion:{replaceElement:!0,el:".selected-video-list-region"},spinner:".spinner-region"}}},{key:"appLinks",get:function(){return{".applink-back":{application:u.b.MIGRATION_WIZARD,action:u.a.MigrationWizard.HOME,params:{folder:this.options.previousFolderChord}}}}},{key:"onClickAdd",value:function(){var t=this;this.listenTo(u.e.MIGRATION,"".concat(u.f.CUSTOMER_VIDEOS,":finalise:error"),this.onError),r.Radio.channel(this.channelName).trigger(a.b.ShowSpinner);var e={};h.a.isInitialMigration(this.customerMetaData)&&(e.initialMigration=!0),this.migrationVideoDataService.updateCustomerMigrationOption(d.c.Smart,(function(){t.migrationVideoDataService.finaliseCustomerVideos(t.groupedVideos,!1,(function(n){t.selectedVideoService.removeAllSelectedVideos(),t.migrationVideoDataService.clearVideoCache(),t.videoDataService.clearVideoCache(),o.a.AppLinkHelper.trigger({application:u.b.MIGRATION_WIZARD,action:u.a.MigrationWizard.PROGRESS,args:[n.id],params:e})}))}))}},{key:"onError",value:function(){o.a.ErrorHelper.throw(new y.b)}},{key:"getGroupedVideos",value:function(){var t=this.selectedVideoService.getSelectedVideos();this.groupedVideos=new o.a.Collection(p.a.getSelectedVideosCollection(t).sortBy("folderChord"))}},{key:"renderSelectedVideoList",value:function(){this.showChildView("selectedVideoListRegion",new x({collection:this.groupedVideos}))}},{key:"renderSpinner",value:function(){var t=this.selectedVideoService.getNumberSelected(),e=new a.a({buttonText:c.a.getPhrase(this.lang,"buttonText",{smartCount:t}),extraButtonClass:"btn-primary",model:new o.a.Model({disabled:0===t}),spinnerOptions:{size:l.s.Small,type:l.t.Light,extraClasses:"mx-auto"},saveEvent:"add",channelName:this.channelName});this.showChildView("spinner",e)}},{key:"viewOptions",value:function(){var t=this.selectedVideoService.getNumberSelected();return{styles:g.a,selected:t,multipleSelected:t>1,nextDisabled:0===t}}},{key:"requiredResources",get:function(){return{customerMetaData:f.b.customerMetaData}}},{key:"onRender",value:function(){this.getGroupedVideos(),this.renderSelectedVideoList(),this.renderSpinner()}}]),n}(o.a.View)}}]);