@clickview/library-editor 1.1.28 → 1.1.29-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 (213) hide show
  1. package/dist/css/11.chunk.css +135 -0
  2. package/dist/css/15.chunk.css +2 -0
  3. package/dist/css/16.chunk.css +1 -1
  4. package/dist/css/17.chunk.css +13 -1
  5. package/dist/css/18.chunk.css +18 -0
  6. package/dist/css/2.chunk.css +143 -0
  7. package/dist/css/34.chunk.css +19 -0
  8. package/dist/css/35.chunk.css +18 -0
  9. package/dist/css/36.chunk.css +12 -0
  10. package/dist/css/49.chunk.css +33 -0
  11. package/dist/css/52.chunk.css +64 -0
  12. package/dist/css/60.chunk.css +16 -0
  13. package/dist/css/63.chunk.css +168 -0
  14. package/dist/css/67.chunk.css +76 -0
  15. package/dist/css/68.chunk.css +15 -0
  16. package/dist/css/69.chunk.css +15 -0
  17. package/dist/css/70.chunk.css +21 -0
  18. package/dist/css/71.chunk.css +38 -0
  19. package/dist/css/72.chunk.css +14 -0
  20. package/dist/css/73.chunk.css +35 -0
  21. package/dist/css/74.chunk.css +27 -0
  22. package/dist/css/75.chunk.css +4 -0
  23. package/dist/css/76.chunk.css +4 -0
  24. package/dist/css/library-editor-app.css +1 -1
  25. package/dist/en.json +1 -1
  26. package/dist/scripts/{0-50fae6c404.chunk.js → 0-382cba9c6f.chunk.js} +1 -1
  27. package/dist/scripts/0.chunk.js +64 -0
  28. package/dist/scripts/1-550170f658.chunk.js +1 -0
  29. package/dist/scripts/1.chunk.js +75 -0
  30. package/dist/scripts/{10-b936d32e97.chunk.js → 10-bbbeb380ec.chunk.js} +1 -1
  31. package/dist/scripts/10.chunk.js +62 -0
  32. package/dist/scripts/{11-c1c04528d4.chunk.js → 11-7ef306b185.chunk.js} +1 -1
  33. package/dist/scripts/11.chunk.js +317 -0
  34. package/dist/scripts/12-bd3016f040.chunk.js +1 -0
  35. package/dist/scripts/12.chunk.js +56 -0
  36. package/dist/scripts/{13-b71e7a002a.chunk.js → 13-c40e53063c.chunk.js} +1 -1
  37. package/dist/scripts/13.chunk.js +25 -0
  38. package/dist/scripts/{14-be81c6b0a6.chunk.js → 14-8010b2ddee.chunk.js} +1 -1
  39. package/dist/scripts/14.chunk.js +272 -0
  40. package/dist/scripts/{16-45b853d9bc.chunk.js → 15-64c94e1d16.chunk.js} +1 -1
  41. package/dist/scripts/15.chunk.js +35 -0
  42. package/dist/scripts/{17-17e648d740.chunk.js → 16-fc76cd275d.chunk.js} +1 -1
  43. package/dist/scripts/16.chunk.js +79 -0
  44. package/dist/scripts/17-852b5b6fbf.chunk.js +1 -0
  45. package/dist/scripts/17.chunk.js +40 -0
  46. package/dist/scripts/18.chunk.js +40 -0
  47. package/dist/scripts/19.chunk.js +43 -0
  48. package/dist/scripts/{2-0c5c3204bb.chunk.js → 2-0108a2ccb5.chunk.js} +1 -1
  49. package/dist/scripts/2.chunk.js +33 -0
  50. package/dist/scripts/20-8168986650.chunk.js +1 -0
  51. package/dist/scripts/20.chunk.js +18 -0
  52. package/dist/scripts/21-1f55a5c1f7.chunk.js +1 -0
  53. package/dist/scripts/21.chunk.js +55 -0
  54. package/dist/scripts/22-f2b1de0686.chunk.js +1 -0
  55. package/dist/scripts/22.chunk.js +47 -0
  56. package/dist/scripts/23-dd21481ea0.chunk.js +1 -0
  57. package/dist/scripts/23.chunk.js +47 -0
  58. package/dist/scripts/24-1cd1e8e7b5.chunk.js +1 -0
  59. package/dist/scripts/24.chunk.js +33 -0
  60. package/dist/scripts/25-436920cfb8.chunk.js +1 -0
  61. package/dist/scripts/25.chunk.js +25 -0
  62. package/dist/scripts/{26-e7665934ea.chunk.js → 26-0f07dcff1f.chunk.js} +1 -1
  63. package/dist/scripts/26.chunk.js +25 -0
  64. package/dist/scripts/{27-ece4a707c2.chunk.js → 27-6c0f69dabf.chunk.js} +1 -1
  65. package/dist/scripts/27.chunk.js +10 -0
  66. package/dist/scripts/28-6d69aec7c5.chunk.js +1 -0
  67. package/dist/scripts/28.chunk.js +334 -0
  68. package/dist/scripts/{29-7b0d55eef4.chunk.js → 29-03707c63be.chunk.js} +1 -1
  69. package/dist/scripts/29.chunk.js +202 -0
  70. package/dist/scripts/{3-c977fc76a1.chunk.js → 3-8b18bbb470.chunk.js} +1 -1
  71. package/dist/scripts/3.chunk.js +49 -0
  72. package/dist/scripts/{30-07198d4b80.chunk.js → 30-dcd9f053b0.chunk.js} +1 -1
  73. package/dist/scripts/30.chunk.js +137 -0
  74. package/dist/scripts/{31-558e4b9448.chunk.js → 31-5247593b63.chunk.js} +1 -1
  75. package/dist/scripts/31.chunk.js +113 -0
  76. package/dist/scripts/{32-66bedea19f.chunk.js → 32-1ab6174b53.chunk.js} +1 -1
  77. package/dist/scripts/32.chunk.js +115 -0
  78. package/dist/scripts/{33-1c0a05f5ad.chunk.js → 33-cff73d2d44.chunk.js} +1 -1
  79. package/dist/scripts/33.chunk.js +93 -0
  80. package/dist/scripts/34-6468c66807.chunk.js +1 -0
  81. package/dist/scripts/34.chunk.js +63 -0
  82. package/dist/scripts/35-6b22dcbc6b.chunk.js +1 -0
  83. package/dist/scripts/35.chunk.js +48 -0
  84. package/dist/scripts/36-6c0ee510b6.chunk.js +1 -0
  85. package/dist/scripts/36.chunk.js +33 -0
  86. package/dist/scripts/{37-f9eaead96b.chunk.js → 37-e9a47bf88a.chunk.js} +1 -1
  87. package/dist/scripts/37.chunk.js +25 -0
  88. package/dist/scripts/{38-ee287180e0.chunk.js → 38-46847a1ef8.chunk.js} +1 -1
  89. package/dist/scripts/38.chunk.js +25 -0
  90. package/dist/scripts/{39-875e8edab4.chunk.js → 39-0e59773859.chunk.js} +1 -1
  91. package/dist/scripts/39.chunk.js +19 -0
  92. package/dist/scripts/{4-30febbcd74.chunk.js → 4-6c6fd4fda3.chunk.js} +1 -1
  93. package/dist/scripts/4.chunk.js +26 -0
  94. package/dist/scripts/{40-9e6fe972eb.chunk.js → 40-26b6940fc5.chunk.js} +1 -1
  95. package/dist/scripts/40.chunk.js +182 -0
  96. package/dist/scripts/{41-8e127683ef.chunk.js → 41-9a61dcad46.chunk.js} +1 -1
  97. package/dist/scripts/41.chunk.js +175 -0
  98. package/dist/scripts/42-44fb678282.chunk.js +1 -0
  99. package/dist/scripts/42.chunk.js +176 -0
  100. package/dist/scripts/{43-cd5d61f503.chunk.js → 43-581b4955ab.chunk.js} +1 -1
  101. package/dist/scripts/43.chunk.js +113 -0
  102. package/dist/scripts/{44-50adae17aa.chunk.js → 44-1c8460b387.chunk.js} +1 -1
  103. package/dist/scripts/44.chunk.js +122 -0
  104. package/dist/scripts/{45-d6cc086a40.chunk.js → 45-9da9a150ea.chunk.js} +1 -1
  105. package/dist/scripts/45.chunk.js +85 -0
  106. package/dist/scripts/{46-c3131aa1a1.chunk.js → 46-3738ce956a.chunk.js} +1 -1
  107. package/dist/scripts/46.chunk.js +78 -0
  108. package/dist/scripts/{47-53cc918c2d.chunk.js → 47-22dfbc1124.chunk.js} +1 -1
  109. package/dist/scripts/47.chunk.js +70 -0
  110. package/dist/scripts/{48-e37164e96c.chunk.js → 48-a6c9aadcb2.chunk.js} +1 -1
  111. package/dist/scripts/48.chunk.js +88 -0
  112. package/dist/scripts/{49-3c685292d0.chunk.js → 49-46a99cb98a.chunk.js} +1 -1
  113. package/dist/scripts/49.chunk.js +62 -0
  114. package/dist/scripts/{5-ae2739be4b.chunk.js → 5-d6e712af7a.chunk.js} +1 -1
  115. package/dist/scripts/5.chunk.js +10 -0
  116. package/dist/scripts/{50-77cc32280d.chunk.js → 50-d1de107768.chunk.js} +1 -1
  117. package/dist/scripts/50.chunk.js +64 -0
  118. package/dist/scripts/{51-718582f5a0.chunk.js → 51-ebed619185.chunk.js} +1 -1
  119. package/dist/scripts/51.chunk.js +55 -0
  120. package/dist/scripts/{52-8bab7f4183.chunk.js → 52-718d180db6.chunk.js} +1 -1
  121. package/dist/scripts/52.chunk.js +47 -0
  122. package/dist/scripts/{53-051f6fefda.chunk.js → 53-f502544e6b.chunk.js} +1 -1
  123. package/dist/scripts/53.chunk.js +56 -0
  124. package/dist/scripts/{54-54ab674027.chunk.js → 54-bd7c6a73c9.chunk.js} +1 -1
  125. package/dist/scripts/54.chunk.js +56 -0
  126. package/dist/scripts/{55-5620cb1984.chunk.js → 55-6e8bec3a8f.chunk.js} +1 -1
  127. package/dist/scripts/55.chunk.js +41 -0
  128. package/dist/scripts/{56-d515b7881b.chunk.js → 56-98e488ec57.chunk.js} +1 -1
  129. package/dist/scripts/56.chunk.js +41 -0
  130. package/dist/scripts/{57-34cc7eeda7.chunk.js → 57-70068b7c7f.chunk.js} +1 -1
  131. package/dist/scripts/57.chunk.js +50 -0
  132. package/dist/scripts/{58-095cc86c38.chunk.js → 58-198269b48b.chunk.js} +1 -1
  133. package/dist/scripts/58.chunk.js +33 -0
  134. package/dist/scripts/{59-88d4d70542.chunk.js → 59-9927b89a75.chunk.js} +1 -1
  135. package/dist/scripts/59.chunk.js +33 -0
  136. package/dist/scripts/6-e8c31234ec.chunk.js +1 -0
  137. package/dist/scripts/6.chunk.js +40 -0
  138. package/dist/scripts/{60-8e040e4d8f.chunk.js → 60-d8bdd7058b.chunk.js} +1 -1
  139. package/dist/scripts/60.chunk.js +33 -0
  140. package/dist/scripts/{61-9acfcad39c.chunk.js → 61-93cba2a9ad.chunk.js} +1 -1
  141. package/dist/scripts/61.chunk.js +33 -0
  142. package/dist/scripts/{62-ab4cf2e18e.chunk.js → 62-0a1e3fee26.chunk.js} +1 -1
  143. package/dist/scripts/62.chunk.js +25 -0
  144. package/dist/scripts/{63-be24981a1c.chunk.js → 63-a8468111a3.chunk.js} +1 -1
  145. package/dist/scripts/63.chunk.js +25 -0
  146. package/dist/scripts/{64-2acf78f1d5.chunk.js → 64-66ab9362b3.chunk.js} +1 -1
  147. package/dist/scripts/64.chunk.js +33 -0
  148. package/dist/scripts/{65-37aed4a31d.chunk.js → 65-85d7a1a233.chunk.js} +1 -1
  149. package/dist/scripts/65.chunk.js +34 -0
  150. package/dist/scripts/{66-bb4cde602a.chunk.js → 66-c6dc992dc8.chunk.js} +1 -1
  151. package/dist/scripts/66.chunk.js +33 -0
  152. package/dist/scripts/{67-04c0737fd2.chunk.js → 67-474ba96c9d.chunk.js} +1 -1
  153. package/dist/scripts/67.chunk.js +25 -0
  154. package/dist/scripts/{68-436667d096.chunk.js → 68-9e04d3da12.chunk.js} +1 -1
  155. package/dist/scripts/68.chunk.js +25 -0
  156. package/dist/scripts/{69-4dd38a6827.chunk.js → 69-c38206a299.chunk.js} +1 -1
  157. package/dist/scripts/69.chunk.js +25 -0
  158. package/dist/scripts/{7-5194b748c8.chunk.js → 7-b8cc8d6eff.chunk.js} +1 -1
  159. package/dist/scripts/7.chunk.js +33 -0
  160. package/dist/scripts/{70-d52ccba56d.chunk.js → 70-2ec0008882.chunk.js} +1 -1
  161. package/dist/scripts/70.chunk.js +25 -0
  162. package/dist/scripts/{71-b7f95045b5.chunk.js → 71-5ba090bb1f.chunk.js} +1 -1
  163. package/dist/scripts/71.chunk.js +25 -0
  164. package/dist/scripts/{72-b1eb475df0.chunk.js → 72-6925c29524.chunk.js} +1 -1
  165. package/dist/scripts/72.chunk.js +25 -0
  166. package/dist/scripts/73.chunk.js +25 -0
  167. package/dist/scripts/74.chunk.js +25 -0
  168. package/dist/scripts/75.chunk.js +25 -0
  169. package/dist/scripts/76.chunk.js +25 -0
  170. package/dist/scripts/77.chunk.js +26 -0
  171. package/dist/scripts/78.chunk.js +26 -0
  172. package/dist/scripts/79.chunk.js +26 -0
  173. package/dist/scripts/{8-d2d772bc05.chunk.js → 8-eb350be263.chunk.js} +1 -1
  174. package/dist/scripts/8.chunk.js +33 -0
  175. package/dist/scripts/80.chunk.js +26 -0
  176. package/dist/scripts/81.chunk.js +26 -0
  177. package/dist/scripts/82.chunk.js +26 -0
  178. package/dist/scripts/83.chunk.js +26 -0
  179. package/dist/scripts/84.chunk.js +26 -0
  180. package/dist/scripts/85.chunk.js +26 -0
  181. package/dist/scripts/86.chunk.js +18 -0
  182. package/dist/scripts/87.chunk.js +18 -0
  183. package/dist/scripts/88.chunk.js +18 -0
  184. package/dist/scripts/89.chunk.js +18 -0
  185. package/dist/scripts/9-806634d5f4.chunk.js +1 -0
  186. package/dist/scripts/9.chunk.js +18 -0
  187. package/dist/scripts/90.chunk.js +18 -0
  188. package/dist/scripts/91.chunk.js +18 -0
  189. package/dist/scripts/92.chunk.js +18 -0
  190. package/dist/scripts/bundle-3b39b13491.min.js +8 -0
  191. package/dist/scripts/bundle.js +9282 -0
  192. package/dist/scripts/bundles.json +2 -2
  193. package/dist/scripts/polyfills-26b9ffd7cf.min.js +1 -0
  194. package/dist/scripts/polyfills.js +2694 -0
  195. package/package.json +100 -100
  196. package/dist/scripts/1-70dfaf7619.chunk.js +0 -1
  197. package/dist/scripts/12-671be91722.chunk.js +0 -1
  198. package/dist/scripts/15-bbe23da473.chunk.js +0 -1
  199. package/dist/scripts/20-fb2790855b.chunk.js +0 -1
  200. package/dist/scripts/21-ef26a25b60.chunk.js +0 -1
  201. package/dist/scripts/22-c309ac8872.chunk.js +0 -1
  202. package/dist/scripts/23-6dcf07dbc6.chunk.js +0 -1
  203. package/dist/scripts/24-a2034a8e52.chunk.js +0 -1
  204. package/dist/scripts/25-bf47dfef7a.chunk.js +0 -1
  205. package/dist/scripts/28-f7b0b6ca0a.chunk.js +0 -1
  206. package/dist/scripts/34-0261454401.chunk.js +0 -1
  207. package/dist/scripts/35-80afabad2f.chunk.js +0 -1
  208. package/dist/scripts/36-0945816998.chunk.js +0 -1
  209. package/dist/scripts/42-26e2b69676.chunk.js +0 -1
  210. package/dist/scripts/6-64fc0b404b.chunk.js +0 -1
  211. package/dist/scripts/9-160db7db67.chunk.js +0 -1
  212. package/dist/scripts/bundle-51698ac5fe.min.js +0 -8
  213. package/dist/scripts/polyfills-292fbd05c8.min.js +0 -1
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[36],{1216:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(2),a=r(253);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 Date.prototype.toString.call(Reflect.construct(Date,[],(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)},1222:function(e,t,r){"use strict";var n=r(1227),a=r(1223),i=(r(1224),r(3),r(1228)),o=(r(1230),r(1226));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}))},1223: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:65535,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:65535,msg:function(){return u.a.getPhrase(s,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"suggestEditReasonExceeds")}}]},y={number:function(e){return e?+e<1?u.a.getPhrase(s,"seasonLessThanOne"):+e>255?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:65535,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"}]}},1224:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(1),a=r(49),i=r(162),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}},1226:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(15),a=r(3),i=r(189),o=r(1242),u=r(60);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)}}},1227:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(1),a=r(12),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.w.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")}}}},1228: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")}}]}},1230:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3),a=r(1223),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,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(e=a.e.productionYear).apply.apply(e,[null].concat(r))}}},1242: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 Date.prototype.toString.call(Reflect.construct(Date,[],(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)},1477: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})},1611: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(61),c=r(293),l=r(136),f=r(0),d=r(253),p=r(130),m=r(1216),g=r(12),h=r(1222),b=r(138),y=r(195),v=r(1477),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 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 Date.prototype.toString.call(Reflect.construct(Date,[],(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 T(this,r)}}function T(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)}(T,e);var t,r,v,E=S(T);function T(){return x(this,T),E.apply(this,arguments)}return t=T,(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:"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:"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.q.getSpinner({size:g.r.Large,extraClasses:"mx-auto"})}}},{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:"requiredResources",get:function(){return{currentUser:l.b.currentUser,libraries:b.b.libraries}}}])&&N(t.prototype,r),v&&N(t,v),T}(a.a.View)}}]);
@@ -0,0 +1,33 @@
1
+ (window["webpackJsonp_clickview_library_editor"] = window["webpackJsonp_clickview_library_editor"] || []).push([[36],{
2
+
3
+ /***/ "./src/apps/library-editor/components/library-actions/LibraryActions.hbs":
4
+ /***/ (function(module, exports, __webpack_require__) {
5
+
6
+ eval("var Handlebars = __webpack_require__(\"handlebars\");\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda;\n\n return \"<span data-toggle=\\\"dropdown\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\" class=\\\"\"\n + container.escapeExpression(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.dropdownClass : stack1), depth0))\n + \" d-inline-block ui-dropdown-toggle\\\">\\r\\n \"\n + ((stack1 = alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.svg : stack1), depth0)) != null ? stack1 : \"\")\n + \"\\r\\n</span>\\r\\n<div class=\\\"items-region\\\"></div>\";\n},\"useData\":true});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2xpYnJhcnktYWN0aW9ucy9MaWJyYXJ5QWN0aW9ucy5oYnMuanMiLCJzb3VyY2VzIjpbImZpbGU6Ly9DOi9DbGlja1ZpZXcgUHJvamVjdHMvY2xpY2t2aWV3L3BhY2thZ2VzL3Byb2plY3RzL2xpYnJhcnktZWRpdG9yL3NyYy9hcHBzL2xpYnJhcnktZWRpdG9yL2NvbXBvbmVudHMvbGlicmFyeS1hY3Rpb25zL0xpYnJhcnlBY3Rpb25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l2IGNsYXNzPVxcXCJpdGVtcy1yZWdpb25cXFwiPjwvZGl2PlwiO1xufSxcInVzZURhdGFcIjp0cnVlfSk7Il0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/library-actions/LibraryActions.hbs\n");
7
+
8
+ /***/ }),
9
+
10
+ /***/ "./src/apps/library-editor/components/library-actions/LibraryActionsComponent.ts":
11
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
12
+
13
+ "use strict";
14
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LibraryActionsComponent\", function() { return LibraryActionsComponent; });\n/* harmony import */ var libs_common_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"../../libs/common/src/backbone/index.ts\");\n/* harmony import */ var libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"../../libs/shared/src/utils/SvgHelper.ts\");\n/* harmony import */ var libs_analytics_interfaces__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"../../libs/analytics/src/interfaces/index.ts\");\n/* harmony import */ var libs_analytics_AnalyticsHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\"../../libs/analytics/src/AnalyticsHelper.ts\");\n/* harmony import */ var shared_components_dropdown_DropdownComponentCollection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\"./src/shared/components/dropdown/DropdownComponentCollection.ts\");\n/* harmony import */ var shared_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\"./src/shared/constants/index.ts\");\n/* harmony import */ var libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\"../../libs/common/src/backbone/services/LanguageService.tsx\");\n/* harmony import */ var _LibraryActions_hbs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\"./src/apps/library-editor/components/library-actions/LibraryActions.hbs\");\n/* harmony import */ var _LibraryActions_hbs__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_LibraryActions_hbs__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _library_actions_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(\"./src/apps/library-editor/components/library-actions/library-actions.scss\");\n/* harmony import */ var _library_actions_scss__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_library_actions_scss__WEBPACK_IMPORTED_MODULE_8__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n\n\n\n\nvar LibraryActionsComponent = /*#__PURE__*/function (_Core$Component) {\n _inherits(LibraryActionsComponent, _Core$Component);\n\n var _super = _createSuper(LibraryActionsComponent);\n\n function LibraryActionsComponent(options) {\n _classCallCheck(this, LibraryActionsComponent);\n\n return _super.call(this, options);\n }\n\n _createClass(LibraryActionsComponent, [{\n key: \"events\",\n value: function events() {\n return {\n 'click @ui.dropdownToggle': 'onClickDropdownToggle',\n 'click @ui.dropdownItem': 'onClickDropdownItem'\n };\n }\n }, {\n key: \"regions\",\n value: function regions() {\n return {\n dropdownItems: {\n replaceElement: true,\n el: '.items-region'\n }\n };\n }\n }, {\n key: \"onClickDropdownToggle\",\n value: function onClickDropdownToggle() {\n this.showChildView('dropdownItems', new shared_components_dropdown_DropdownComponentCollection__WEBPACK_IMPORTED_MODULE_4__[\"DropdownComponentCollection\"]({\n analyticsHelper: libs_analytics_AnalyticsHelper__WEBPACK_IMPORTED_MODULE_3__[\"AnalyticsHelper\"],\n displayOptions: {\n alignment: 'right'\n },\n channelName: this.channelName,\n collection: new libs_common_core__WEBPACK_IMPORTED_MODULE_0__[\"Core\"].Collection([{\n title: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_6__[\"LanguageService\"].getPhrase(this.lang, 'addFolder'),\n analyticsOptions: libs_analytics_AnalyticsHelper__WEBPACK_IMPORTED_MODULE_3__[\"AnalyticsHelper\"].mergeOptions(this.options.analyticsOptions, {\n actionType: libs_analytics_interfaces__WEBPACK_IMPORTED_MODULE_2__[\"UserAction\"].Create,\n entity: libs_analytics_interfaces__WEBPACK_IMPORTED_MODULE_2__[\"EntityType\"].Folder,\n workflowPhase: libs_analytics_interfaces__WEBPACK_IMPORTED_MODULE_2__[\"WorkflowPhase\"].Start\n }),\n appLink: {\n application: shared_constants__WEBPACK_IMPORTED_MODULE_5__[\"AppChannels\"].LIBRARY_EDITOR,\n action: shared_constants__WEBPACK_IMPORTED_MODULE_5__[\"Actions\"].Shared.NEW_FOLDER,\n args: [this.model.get('id')]\n }\n }, {\n title: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_6__[\"LanguageService\"].getPhrase(this.lang, 'rename'),\n analyticsOptions: libs_analytics_AnalyticsHelper__WEBPACK_IMPORTED_MODULE_3__[\"AnalyticsHelper\"].mergeOptions(this.options.analyticsOptions, {\n actionType: libs_analytics_interfaces__WEBPACK_IMPORTED_MODULE_2__[\"UserAction\"].Rename,\n entity: libs_analytics_interfaces__WEBPACK_IMPORTED_MODULE_2__[\"EntityType\"].Library,\n workflowPhase: libs_analytics_interfaces__WEBPACK_IMPORTED_MODULE_2__[\"WorkflowPhase\"].Start\n }),\n appLink: {\n application: shared_constants__WEBPACK_IMPORTED_MODULE_5__[\"AppChannels\"].LIBRARY_EDITOR,\n action: shared_constants__WEBPACK_IMPORTED_MODULE_5__[\"Actions\"].LibraryEditor.RENAME_LIBRARY,\n args: [this.model.get('id')]\n }\n }, {\n title: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_6__[\"LanguageService\"].getPhrase(this.lang, 'remove'),\n analyticsOptions: libs_analytics_AnalyticsHelper__WEBPACK_IMPORTED_MODULE_3__[\"AnalyticsHelper\"].mergeOptions(this.options.analyticsOptions, {\n actionType: libs_analytics_interfaces__WEBPACK_IMPORTED_MODULE_2__[\"UserAction\"].Delete,\n entity: libs_analytics_interfaces__WEBPACK_IMPORTED_MODULE_2__[\"EntityType\"].Library,\n workflowPhase: libs_analytics_interfaces__WEBPACK_IMPORTED_MODULE_2__[\"WorkflowPhase\"].Start\n }),\n appLink: {\n application: shared_constants__WEBPACK_IMPORTED_MODULE_5__[\"AppChannels\"].LIBRARY_EDITOR,\n action: shared_constants__WEBPACK_IMPORTED_MODULE_5__[\"Actions\"].LibraryEditor.DELETE_LIBRARY,\n args: [this.model.get('id')]\n },\n classes: 'text-danger'\n }])\n }));\n }\n }, {\n key: \"onClickDropdownItem\",\n value: function onClickDropdownItem(event) {\n event.stopPropagation();\n event.preventDefault();\n this.getUI('dropdownToggle').dropdown('toggle');\n }\n }, {\n key: \"viewOptions\",\n value: function viewOptions() {\n return {\n dropdownClass: \"\".concat(_library_actions_scss__WEBPACK_IMPORTED_MODULE_8___default.a.dropdownButton, \" \").concat(this.options.buttonClass),\n svg: libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_1__[\"SvgHelper\"].getSvg(libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_1__[\"cvSvgLibrary\"].More)\n };\n }\n }, {\n key: \"name\",\n get: function get() {\n return 'LibraryActionsComponent';\n }\n }, {\n key: \"template\",\n get: function get() {\n return _LibraryActions_hbs__WEBPACK_IMPORTED_MODULE_7___default.a;\n }\n }, {\n key: \"channelName\",\n get: function get() {\n return \"\".concat(this.name).concat(this.cid);\n }\n }, {\n key: \"lang\",\n get: function get() {\n return 'libraryEditor.libraryActions';\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"position-absolute \".concat(_library_actions_scss__WEBPACK_IMPORTED_MODULE_8___default.a.dropdownContainer, \" \").concat(this.options.extraClasses, \" \");\n }\n }, {\n key: \"elements\",\n get: function get() {\n return {\n dropdownToggle: '.ui-dropdown-toggle',\n dropdownItem: '.dropdown-item'\n };\n }\n }]);\n\n return LibraryActionsComponent;\n}(libs_common_core__WEBPACK_IMPORTED_MODULE_0__[\"Core\"].Component);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2xpYnJhcnktYWN0aW9ucy9MaWJyYXJ5QWN0aW9uc0NvbXBvbmVudC50cy5qcyIsInNvdXJjZXMiOlsiZmlsZTovL0M6L0NsaWNrVmlldyBQcm9qZWN0cy9jbGlja3ZpZXcvcGFja2FnZXMvcHJvamVjdHMvbGlicmFyeS1lZGl0b3Ivc3JjL2FwcHMvbGlicmFyeS1lZGl0b3IvY29tcG9uZW50cy9saWJyYXJ5LWFjdGlvbnMvTGlicmFyeUFjdGlvbnNDb21wb25lbnQudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgT2JqZWN0SGFzaCB9IGZyb20gJ2JhY2tib25lJztcclxuXHJcbmltcG9ydCB7IENvcmUgfSBmcm9tICdsaWJzL2NvbW1vbi9jb3JlJztcclxuaW1wb3J0IHsgU3ZnSGVscGVyLCBjdlN2Z0xpYnJhcnkgfSBmcm9tICdsaWJzL3NoYXJlZC91dGlscy9TdmdIZWxwZXInO1xyXG5pbXBvcnQgeyBBbmFseXRpY3NPcHRpb25zLCBFbnRpdHlUeXBlLCBVc2VyQWN0aW9uLCBXb3JrZmxvd1BoYXNlIH0gZnJvbSAnbGlicy9hbmFseXRpY3MvaW50ZXJmYWNlcyc7XHJcbmltcG9ydCB7IEFuYWx5dGljc0h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0E7QUFDQTtBQUZBO0FBSUE7QUFoQ0E7QUFDQTtBQURBO0FBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/library-actions/LibraryActionsComponent.ts\n");
15
+
16
+ /***/ }),
17
+
18
+ /***/ "./src/apps/library-editor/components/library-actions/library-actions.scss":
19
+ /***/ (function(module, exports, __webpack_require__) {
20
+
21
+ eval("// extracted by mini-css-extract-plugin\nmodule.exports = {\"dropdownContainer\":\"cv--dropdownContainer--293SV\",\"dropdownButton\":\"cv--dropdownButton--23YxG\"};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2xpYnJhcnktYWN0aW9ucy9saWJyYXJ5LWFjdGlvbnMuc2Nzcy5qcyIsInNvdXJjZXMiOlsiZmlsZTovL0M6L0NsaWNrVmlldyBQcm9qZWN0cy9jbGlja3ZpZXcvcGFja2FnZXMvcHJvamVjdHMvbGlicmFyeS1lZGl0b3Ivc3JjL2FwcHMvbGlicmFyeS1lZGl0b3IvY29tcG9uZW50cy9saWJyYXJ5LWFjdGlvbnMvbGlicmFyeS1hY3Rpb25zLnNjc3MiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5tb2R1bGUuZXhwb3J0cyA9IHtcImRyb3Bkb3duQ29udGFpbmVyXCI6XCJjdi0tZHJvcGRvd25Db250YWluZXItLTI5M1NWXCIsXCJkcm9wZG93bkJ1dHRvblwiOlwiY3YtLWRyb3Bkb3duQnV0dG9uLS0yM1l4R1wifTsiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/library-actions/library-actions.scss\n");
22
+
23
+ /***/ }),
24
+
25
+ /***/ "./src/shared/components/dropdown/DropdownComponentCollection.ts":
26
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
27
+
28
+ "use strict";
29
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"DropdownComponentCollection\", function() { return DropdownComponentCollection; });\n/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"underscore\");\n/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(underscore__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var libs_common_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"../../libs/common/src/backbone/index.ts\");\n/* harmony import */ var shared_components_dropdown_DropdownItemComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"./src/shared/components/dropdown/DropdownItemComponent.ts\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\nvar DropdownComponentCollection = /*#__PURE__*/function (_Core$ComponentCollec) {\n _inherits(DropdownComponentCollection, _Core$ComponentCollec);\n\n var _super = _createSuper(DropdownComponentCollection);\n\n function DropdownComponentCollection(options) {\n _classCallCheck(this, DropdownComponentCollection);\n\n return _super.call(this, options);\n }\n\n _createClass(DropdownComponentCollection, [{\n key: \"initialize\",\n value: function initialize() {\n this.listenTo(this.options.channelName, 'center:dropdown', this.centerSelectedItem);\n }\n }, {\n key: \"getExtraClasses\",\n value: function getExtraClasses() {\n var displayOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _displayOptions$align = displayOptions.alignment,\n alignment = _displayOptions$align === void 0 ? 'left' : _displayOptions$align,\n extraClasses = displayOptions.extraClasses;\n var className = \"dropdown-menu-\".concat(alignment);\n if (extraClasses) className = \"\".concat(className, \" \").concat(extraClasses);\n return className;\n }\n }, {\n key: \"centerSelectedItem\",\n value: function centerSelectedItem() {\n var active = this.$el.find('.active');\n if (!active.length) return;\n var halfRatio = 0.5;\n var top = this.$el.scrollTop() + active.position().top;\n var distance = this.$el.height() * halfRatio + active.height() * halfRatio;\n this.$el.scrollTop(top - distance);\n }\n }, {\n key: \"name\",\n get: function get() {\n return 'DropdownCollectionComponent';\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"dropdown-menu items-viewpart \".concat(this.getExtraClasses(this.options.displayOptions));\n }\n }, {\n key: \"attributes\",\n get: function get() {\n return {\n 'aria-labelledby': 'dropdownSelector'\n };\n }\n }, {\n key: \"childView\",\n get: function get() {\n return shared_components_dropdown_DropdownItemComponent__WEBPACK_IMPORTED_MODULE_2__[\"DropdownItemComponent\"];\n }\n }, {\n key: \"childViewOptions\",\n get: function get() {\n var baseChildOptions = {\n channelName: this.options.channelName,\n analyticsHelper: this.options.analyticsHelper\n };\n return underscore__WEBPACK_IMPORTED_MODULE_0__[\"extend\"](baseChildOptions, this.options.childOptions);\n }\n }]);\n\n return DropdownComponentCollection;\n}(libs_common_core__WEBPACK_IMPORTED_MODULE_1__[\"Core\"].ComponentCollection);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvc2hhcmVkL2NvbXBvbmVudHMvZHJvcGRvd24vRHJvcGRvd25Db21wb25lbnRDb2xsZWN0aW9uLnRzLmpzIiwic291cmNlcyI6WyJmaWxlOi8vQzovQ2xpY2tWaWV3IFByb2plY3RzL2NsaWNrdmlldy9wYWNrYWdlcy9wcm9qZWN0cy9saWJyYXJ5LWVkaXRvci9zcmMvc2hhcmVkL2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0E7QUFDQTtBQTNEQTtBQUFBO0FBQUE7QUFRQTtBQUNBO0FBVEE7QUFBQTtBQUFBO0FBWUE7QUFDQTtBQWJBO0FBQUE7QUFBQTtBQWdCQTtBQUNBO0FBREE7QUFHQTtBQW5CQTtBQUFBO0FBQUE7QUEwQkE7QUFDQTtBQTNCQTtBQUFBO0FBQUE7QUE4QkE7QUFDQTtBQUNBO0FBRkE7QUFLQTtBQUNBO0FBcENBO0FBQ0E7QUFEQTtBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/shared/components/dropdown/DropdownComponentCollection.ts\n");
30
+
31
+ /***/ })
32
+
33
+ }]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[37],{1212:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(2),o=n(253);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 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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(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 p(e){return(p=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&&u(e,t)}(c,e);var t,n,r,i=s(c);function c(){return a(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}}])&&l(t.prototype,n),r&&l(t,r),c}(r.a.Model)},1294:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return g}));var r,o=n(6),i=n(2),a=n(1335),l=n.n(a),u=n(1295),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 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 f(e,t){return(f=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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.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"}(r||(r={}));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&&f(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,r.CropImage,this.crop)}},{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());o.Radio.channel(this.options.channelName).trigger(r.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()}},{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"}}}])&&p(t.prototype,n),i&&p(t,i),u}(i.a.Component)},1295:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){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:o}):i)+'" class="img img-fluid" />'},useData:!0})},1484:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return" "+e.escapeExpression((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:o}))+"\r\n"},3:function(e,t,n,r,o){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:o}))+"\r\n"},5:function(e,t,n,r,o){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:o}))+" "+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,r,o){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:o}))+" "+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,o,0),inverse:e.program(3,o,0),data:o}))?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:o}))+" "+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,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1485:function(e,t,n){e.exports={removeImage:"_3OmsX",imageElement:"_3kJ8m",banner:"uFWnL",thumbnail:"_3_b6l",imageContainer:"_1mYjS"}},1486:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="thumbnail-region"></div>\r\n<div class="dropdown-divider"></div>\r\n<div class="banner-region"></div>'},useData:!0})},1487:function(e,t,n){e.exports={hide:"_5hYaK"}},1488:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return'<div class="content-region"></div>\r\n'},3: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"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1651:function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(6),i=n(2),a=n(5),l=n(30),u=n(4),s=n(42),c=n(293),p=n(305),f=n(1212),h=n(12),m=n(0),d=n(9),g=n(1294),y=n(253),b=n(190),v=n(3),I=n(1484),w=n.n(I),k=n(1485),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 E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return(O=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 Date.prototype.toString.call(Reflect.construct(Date,[],(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 S(this,n)}}function S(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 _(e){return(_=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&&O(e,t)}(u,e);var t,n,r,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:"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:"onClickRemoveImage",value:function(){o.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]}}},{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:"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]})):o.Radio.channel(e.options.channelName).trigger("select:image",t,e.options.imageType)}}]}}])&&E(t.prototype,n),r&&E(t,r),u}(i.a.Component),B=n(1486),U=n.n(B);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 j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=L(e);if(t){var o=L(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return N(this,n)}}function N(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&&j(e,t)}(i,e);var t,n,r,o=M(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"regions",value:function(){return{banner:{el:".banner-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"renderBanner",value:function(){this.showChildView("banner",new x({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 x({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()}},{key:"name",get:function(){return"EditImagesWrapperComponent"}},{key:"template",get:function(){return U.a}}])&&D(t.prototype,n),r&&D(t,r),i}(i.a.Component),F=n(1487),V=n.n(F),H=n(1488),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 q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function J(e,t){return(J=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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=K(e);if(t){var o=K(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.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&&J(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:"regions",value:function(){return{content:{el:".content-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .back-btn":"onClickBackButton","shown.bs.modal":"renderCropper"}}},{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(){o.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},r=this.selectedImageType===d.f.Banners?u.EntityType.Banner:u.EntityType.Thumbnail,o=this.selectedImageType===d.f.Banners?"addOrUpdateBanner":"addOrUpdateThumbnail";this.libraryDataService[o](n,(function(e){s.a.logUserAction({libraryId:t.libraryId,folderId:t.options.folderId,id:e.get("id")},{actionType:u.UserAction.Upload,entity:r,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",r=e===d.f.Banners?this.currentBanner:this.currentThumbnail,o={libraryId:this.libraryId,folderId:this.model.get("id"),imageId:r.get("id")},i=e===d.f.Banners?u.EntityType.Banner:u.EntityType.Thumbnail;this.libraryDataService[n](o,(function(){s.a.logUserAction({libraryId:t.libraryId,folderId:t.model.get("id"),id:r.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 p.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:r.bind(this.getCropRegionWidth,this)})))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.libraryId,spinnerEl:h.q.getSpinner({size:h.r.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()}},{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:"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 f.a,channelName:this.channelName,buttonText:"Continue",onClick:this.onClickCrop}}]}},{key:"requiredResources",get:function(){return{config:b.b.config}}}])&&q(t.prototype,n),v&&q(t,v),w}(i.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[37],{1216:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(2),o=n(253);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 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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(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 p(e){return(p=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&&u(e,t)}(c,e);var t,n,r,i=s(c);function c(){return a(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}}])&&l(t.prototype,n),r&&l(t,r),c}(r.a.Model)},1298:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return g}));var r,o=n(6),i=n(2),a=n(1339),l=n.n(a),u=n(1299),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 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 f(e,t){return(f=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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.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"}(r||(r={}));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&&f(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,r.CropImage,this.crop)}},{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());o.Radio.channel(this.options.channelName).trigger(r.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()}},{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"}}}])&&p(t.prototype,n),i&&p(t,i),u}(i.a.Component)},1299:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){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:o}):i)+'" class="img img-fluid" />'},useData:!0})},1488:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return" "+e.escapeExpression((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:o}))+"\r\n"},3:function(e,t,n,r,o){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:o}))+"\r\n"},5:function(e,t,n,r,o){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:o}))+" "+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,r,o){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:o}))+" "+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,o,0),inverse:e.program(3,o,0),data:o}))?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:o}))+" "+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,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1489:function(e,t,n){e.exports={removeImage:"_3OmsX",imageElement:"_3kJ8m",banner:"uFWnL",thumbnail:"_3_b6l",imageContainer:"_1mYjS"}},1490:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="thumbnail-region"></div>\r\n<div class="dropdown-divider"></div>\r\n<div class="banner-region"></div>'},useData:!0})},1491:function(e,t,n){e.exports={hide:"_5hYaK"}},1492:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return'<div class="content-region"></div>\r\n'},3: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"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1654:function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(6),i=n(2),a=n(5),l=n(30),u=n(4),s=n(42),c=n(293),p=n(305),f=n(1216),h=n(12),m=n(0),d=n(9),g=n(1298),y=n(253),b=n(190),v=n(3),I=n(1488),w=n.n(I),k=n(1489),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 E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return(O=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 Date.prototype.toString.call(Reflect.construct(Date,[],(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 S(this,n)}}function S(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 _(e){return(_=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&&O(e,t)}(u,e);var t,n,r,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:"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:"onClickRemoveImage",value:function(){o.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]}}},{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:"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]})):o.Radio.channel(e.options.channelName).trigger("select:image",t,e.options.imageType)}}]}}])&&E(t.prototype,n),r&&E(t,r),u}(i.a.Component),B=n(1490),U=n.n(B);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 j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=L(e);if(t){var o=L(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return N(this,n)}}function N(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&&j(e,t)}(i,e);var t,n,r,o=M(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"regions",value:function(){return{banner:{el:".banner-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"renderBanner",value:function(){this.showChildView("banner",new x({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 x({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()}},{key:"name",get:function(){return"EditImagesWrapperComponent"}},{key:"template",get:function(){return U.a}}])&&D(t.prototype,n),r&&D(t,r),i}(i.a.Component),F=n(1491),V=n.n(F),H=n(1492),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 q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function J(e,t){return(J=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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=K(e);if(t){var o=K(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.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&&J(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:"regions",value:function(){return{content:{el:".content-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .back-btn":"onClickBackButton","shown.bs.modal":"renderCropper"}}},{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(){o.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},r=this.selectedImageType===d.f.Banners?u.EntityType.Banner:u.EntityType.Thumbnail,o=this.selectedImageType===d.f.Banners?"addOrUpdateBanner":"addOrUpdateThumbnail";this.libraryDataService[o](n,(function(e){s.a.logUserAction({libraryId:t.libraryId,folderId:t.options.folderId,id:e.get("id")},{actionType:u.UserAction.Upload,entity:r,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",r=e===d.f.Banners?this.currentBanner:this.currentThumbnail,o={libraryId:this.libraryId,folderId:this.model.get("id"),imageId:r.get("id")},i=e===d.f.Banners?u.EntityType.Banner:u.EntityType.Thumbnail;this.libraryDataService[n](o,(function(){s.a.logUserAction({libraryId:t.libraryId,folderId:t.model.get("id"),id:r.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 p.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:r.bind(this.getCropRegionWidth,this)})))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.libraryId,spinnerEl:h.q.getSpinner({size:h.r.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()}},{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:"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 f.a,channelName:this.channelName,buttonText:"Continue",onClick:this.onClickCrop}}]}},{key:"requiredResources",get:function(){return{config:b.b.config}}}])&&q(t.prototype,n),v&&q(t,v),w}(i.a.View)}}]);
@@ -0,0 +1,25 @@
1
+ (window["webpackJsonp_clickview_library_editor"] = window["webpackJsonp_clickview_library_editor"] || []).push([[37],{
2
+
3
+ /***/ "./src/apps/library-editor/components/concatenate-request/ConcatenateRequest.hbs":
4
+ /***/ (function(module, exports, __webpack_require__) {
5
+
6
+ eval("var Handlebars = __webpack_require__(\"handlebars\");\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.progress : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"2\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.escapeExpression;\n\n return \" <span class=\\\"m-3 text-muted\\\">\"\n + alias2(container.lambda(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.progress : stack1), depth0))\n + \"</span>\\r\\n <p class=\\\"pt-2\\\">\"\n + alias2((helpers.lang||(depth0 && depth0.lang)||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),\"processing\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</p>\\r\\n\";\n},\"4\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.failed : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"5\":function(container,depth0,helpers,partials,data) {\n var alias1=container.propertyIsEnumerable;\n\n return \"<p class=\\\"pt-2 text-danger\\\">\"\n + container.escapeExpression((helpers.lang||(depth0 && depth0.lang)||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),\"failed\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</p>\\r\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression;\n\n return \"<h4>\"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.componentOptions : stack1)) != null ? stack1.heading : stack1), depth0))\n + \"</h4>\\r\\n<p>\"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.componentOptions : stack1)) != null ? stack1.line1 : stack1), depth0))\n + \"</p>\\r\\n<p>\"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.componentOptions : stack1)) != null ? stack1.line2 : stack1), depth0))\n + \"</p>\\r\\n<div class=\\\"btn-region\\\"></div>\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.processing : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(4, data, 0),\"data\":data})) != null ? stack1 : \"\");\n},\"useData\":true});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NvbmNhdGVuYXRlLXJlcXVlc3QvQ29uY2F0ZW5hdGVSZXF1ZXN0Lmhicy5qcyIsInNvdXJjZXMiOlsiZmlsZTovL0M6L0NsaWNrVmlldyBQcm9qZWN0cy9jbGlja3ZpZXcvcGFja2FnZXMvcHJvamVjdHMvbGlicmFyeS1lZGl0b3Ivc3JjL2FwcHMvbGlicmFyeS1lZGl0b3IvY29tcG9uZW50cy9jb25jYXRlbmF0ZS1yZXF1ZXN0L0NvbmNhdGVuYXRlUmVxdWVzdC5oYnMiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIEhhbmRsZWJhcnMgPSByZXF1aXJlKCdoYW5kbGViYXJzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IChIYW5kbGViYXJzWydkZWZhdWx0J10gfHwgSGFuZGxlYmFycykudGVtcGxhdGUoe1wiMVwiOmZ1bmN0aW9uKGNvbnRhaW5lcixkZXB0aDAsaGVscGVycyxwYXJ0aWFscyxkYXRhKSB7XG4gICAgdmFyIHN0YWNrMSwgYWxpYXMxPWNvbnRhaW5lci5wcm9wZXJ0e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internal:///./src/apps/library-editor/components/concatenate-request/ConcatenateRequest.hbs\n");
7
+
8
+ /***/ }),
9
+
10
+ /***/ "./src/apps/library-editor/components/concatenate-request/ConcatenateRequestComponent.ts":
11
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
12
+
13
+ "use strict";
14
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ConcatenateRequestComponent\", function() { return ConcatenateRequestComponent; });\n/* harmony import */ var libs_common_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"../../libs/common/src/backbone/index.ts\");\n/* harmony import */ var shared_components_spinner_button_SpinnerButtonComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"./src/shared/components/spinner-button/SpinnerButtonComponent.ts\");\n/* harmony import */ var shared_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"./src/shared/utils/index.ts\");\n/* harmony import */ var libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\"../../libs/common/src/backbone/services/LanguageService.tsx\");\n/* harmony import */ var apps_library_editor_enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\"./src/apps/library-editor/enums/index.ts\");\n/* harmony import */ var apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\"./src/apps/library-editor/constants/index.ts\");\n/* harmony import */ var _ConcatenateRequest_hbs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\"./src/apps/library-editor/components/concatenate-request/ConcatenateRequest.hbs\");\n/* harmony import */ var _ConcatenateRequest_hbs__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_ConcatenateRequest_hbs__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _concatenate_request_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\"./src/apps/library-editor/components/concatenate-request/concatenate-request.scss\");\n/* harmony import */ var _concatenate_request_scss__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_concatenate_request_scss__WEBPACK_IMPORTED_MODULE_7__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n\n\n\nvar ConcatenateRequestComponent = /*#__PURE__*/function (_Core$Component) {\n _inherits(ConcatenateRequestComponent, _Core$Component);\n\n var _super = _createSuper(ConcatenateRequestComponent);\n\n function ConcatenateRequestComponent(options) {\n _classCallCheck(this, ConcatenateRequestComponent);\n\n return _super.call(this, options);\n }\n\n _createClass(ConcatenateRequestComponent, [{\n key: \"initialize\",\n value: function initialize() {\n this.spinnerModel = new libs_common_core__WEBPACK_IMPORTED_MODULE_0__[\"Core\"].Model({\n showSpinner: this.isProcessing()\n });\n this.listenTo(this.options.channelName, apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_5__[\"LibraryEditorActions\"].MergeChapters, this.onClickMergeChapters);\n }\n }, {\n key: \"regions\",\n value: function regions() {\n return {\n button: {\n el: '.btn-region',\n replaceElement: true\n }\n };\n }\n }, {\n key: \"onClickMergeChapters\",\n value: function onClickMergeChapters() {\n this.spinnerModel.set(shared_components_spinner_button_SpinnerButtonComponent__WEBPACK_IMPORTED_MODULE_1__[\"SpinnerButtonModelAttributes\"].ShowSpinner, true);\n this.render();\n }\n }, {\n key: \"isProcessing\",\n value: function isProcessing() {\n if (!this.model) return false;\n return !!this.model.get('status') && (this.model.get('status') === apps_library_editor_enums__WEBPACK_IMPORTED_MODULE_4__[\"MediaConcatenateStatus\"].New || this.model.get('status') === apps_library_editor_enums__WEBPACK_IMPORTED_MODULE_4__[\"MediaConcatenateStatus\"].Concatenating);\n }\n }, {\n key: \"renderButton\",\n value: function renderButton() {\n var copy = {\n chapters: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__[\"LanguageService\"].getPhrase(this.lang, 'mergeChapters'),\n subtitles: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__[\"LanguageService\"].getPhrase(this.lang, 'mergeChapters'),\n clickViewSubtitles: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__[\"LanguageService\"].getPhrase(this.lang, 'enabledCustomSubtitles')\n };\n var spinnerButtonComponent = new shared_components_spinner_button_SpinnerButtonComponent__WEBPACK_IMPORTED_MODULE_1__[\"SpinnerButtonComponent\"]({\n buttonText: copy[this.options.type],\n extraButtonClass: \"btn-primary \".concat(_concatenate_request_scss__WEBPACK_IMPORTED_MODULE_7___default.a.btn),\n model: this.spinnerModel,\n spinnerOptions: {\n size: shared_utils__WEBPACK_IMPORTED_MODULE_2__[\"SpinnerSize\"].Small,\n type: shared_utils__WEBPACK_IMPORTED_MODULE_2__[\"SpinnerType\"].Light,\n extraClasses: 'mx-auto'\n },\n channelName: this.options.channelName,\n saveEvent: apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_5__[\"LibraryEditorActions\"].MergeChapters\n });\n this.showChildView('button', spinnerButtonComponent);\n }\n }, {\n key: \"viewOptions\",\n value: function viewOptions() {\n var copy = {\n chapters: {\n heading: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__[\"LanguageService\"].getPhrase(this.lang, 'chaptersHeading'),\n line1: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__[\"LanguageService\"].getPhrase(this.lang, 'chaptersInfo1'),\n line2: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__[\"LanguageService\"].getPhrase(this.lang, 'chaptersInfo2')\n },\n subtitles: {\n heading: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__[\"LanguageService\"].getPhrase(this.lang, 'subtitlesHeading'),\n line1: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__[\"LanguageService\"].getPhrase(this.lang, 'subtitlesInfo1'),\n line2: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__[\"LanguageService\"].getPhrase(this.lang, 'subtitlesInfo2')\n },\n clickViewSubtitles: {\n heading: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__[\"LanguageService\"].getPhrase(this.lang, 'cvSubtitlesHeading'),\n line1: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__[\"LanguageService\"].getPhrase(this.lang, 'cvSubtitlesInfo1'),\n line2: libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__[\"LanguageService\"].getPhrase(this.lang, 'cvSubtitlesInfo2')\n }\n };\n var progress = this.model && this.model.get('progress') && libs_common_backbone_services_LanguageService__WEBPACK_IMPORTED_MODULE_3__[\"LanguageService\"].getPhrase(this.lang, 'progress', {\n progress: this.model.get('progress')\n });\n return {\n progress: progress,\n componentOptions: copy[this.options.type],\n processing: this.spinnerModel.get(shared_components_spinner_button_SpinnerButtonComponent__WEBPACK_IMPORTED_MODULE_1__[\"SpinnerButtonModelAttributes\"].ShowSpinner),\n failed: this.model && this.model.get('status') && this.model.get('status') === apps_library_editor_enums__WEBPACK_IMPORTED_MODULE_4__[\"MediaConcatenateStatus\"].ConcatenationFailed\n };\n }\n }, {\n key: \"onRender\",\n value: function onRender() {\n this.renderButton();\n }\n }, {\n key: \"name\",\n get: function get() {\n return 'ConcatenateRequestComponent';\n }\n }, {\n key: \"template\",\n get: function get() {\n return _ConcatenateRequest_hbs__WEBPACK_IMPORTED_MODULE_6___default.a;\n }\n }, {\n key: \"lang\",\n get: function get() {\n return 'libraryEditor.concatenateRequest';\n }\n }, {\n key: \"className\",\n get: function get() {\n return 'mt-3';\n }\n }]);\n\n return ConcatenateRequestComponent;\n}(libs_common_core__WEBPACK_IMPORTED_MODULE_0__[\"Core\"].Component);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NvbmNhdGVuYXRlLXJlcXVlc3QvQ29uY2F0ZW5hdGVSZXF1ZXN0Q29tcG9uZW50LnRzLmpzIiwic291cmNlcyI6WyJmaWxlOi8vQzovQ2xpY2tWaWV3IFByb2plY3RzL2NsaWNrdmlldy9wYWNrYWdlcy9wcm9qZWN0cy9saWJyYXJ5LWVkaXRvci9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NvbmNhdGVuYXRlLXJlcXVlc3QvQ29uY2F0ZW5hdGVSZXF1ZXN0Q29tcG9uZW50LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE9iamVjdEhhc2ggfSBmcm9tICdiYWNrYm9uZSc7XHJcblxyXG5pbXBvcnQgeyBDb3JlIH0gZnJvbSAnbGlicy9jb21tb24vY29yZSc7XHJcblxyXG5pbXBvcnQgeyBTcGlubmVyQnV0dG9uTW9kZWxBdHRyaWJ1dGVzLCBTcGlubmVyQnV0dG9uQ29tcG9uZW50IH0gZnJvbSAnc2hhcmVkL2NvbXBvbmVudHMvc3Bpbm5lci1idXR0b24vU3Bpbm5lckJ1dHRvbkNvbXBvbmVudCc7XHJcbmltcG9ydCB7IFNwaW5uZXJTaXplLCBTcGlubmVyVHlwZSB9IGZyb20gJ3NoYXJlZC91dGlscyc7XHJcbmltcG9ydCB7IExhbmd1YWdlU2VydmljZSB9IGZyb20gJ2xpYnMvY29tbW9uL2JhY2tib25lL3NlcnZpY2VzL0xhbmd1YWdlU2VydmljZSc7XHJcblxyXG5pbXBvcnQgeyBNZWRpYUNvbmNhdGVuYXRlU3RhdHVzIH0gZnJvbSAnYXBwcy9saWJyYXJ5LWVkaXRvci9lb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KQTtBQU1BO0FBeEdBO0FBQUE7QUFBQTtBQTJHQTtBQUNBO0FBNUdBO0FBQUE7QUFBQTtBQWVBO0FBQ0E7QUFoQkE7QUFBQTtBQUFBO0FBbUJBO0FBQ0E7QUFwQkE7QUFBQTtBQUFBO0FBdUJBO0FBQ0E7QUF4QkE7QUFBQTtBQUFBO0FBMkJBO0FBQ0E7QUE1QkE7QUFDQTtBQURBO0FBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/concatenate-request/ConcatenateRequestComponent.ts\n");
15
+
16
+ /***/ }),
17
+
18
+ /***/ "./src/apps/library-editor/components/concatenate-request/concatenate-request.scss":
19
+ /***/ (function(module, exports, __webpack_require__) {
20
+
21
+ eval("// extracted by mini-css-extract-plugin\nmodule.exports = {\"btn\":\"cv--btn--59zg9\"};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NvbmNhdGVuYXRlLXJlcXVlc3QvY29uY2F0ZW5hdGUtcmVxdWVzdC5zY3NzLmpzIiwic291cmNlcyI6WyJmaWxlOi8vQzovQ2xpY2tWaWV3IFByb2plY3RzL2NsaWNrdmlldy9wYWNrYWdlcy9wcm9qZWN0cy9saWJyYXJ5LWVkaXRvci9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NvbmNhdGVuYXRlLXJlcXVlc3QvY29uY2F0ZW5hdGUtcmVxdWVzdC5zY3NzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxubW9kdWxlLmV4cG9ydHMgPSB7XCJidG5cIjpcImN2LS1idG4tLTU5emc5XCJ9OyJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/concatenate-request/concatenate-request.scss\n");
22
+
23
+ /***/ })
24
+
25
+ }]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[38],{1212:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(2),i=n(253);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 Date.prototype.toString.call(Reflect.construct(Date,[],(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)},1224:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(1),i=n(2),r=n(298);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 Date.prototype.toString.call(Reflect.construct(Date,[],(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:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{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)}}},{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:"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)}}])&&s(t.prototype,n),i&&s(t,i),u}(i.a.ComponentCollection)},1266: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(1224),s=n(12),l=n(1267),c=n.n(l),u=n(1268),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 Date.prototype.toString.call(Reflect.construct(Date,[],(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:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{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}))}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c.a}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}}])&&p(t.prototype,n),r&&p(t,r),u}(r.a.Component)},1267: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})},1268:function(e,t,n){e.exports={dropdownMenu:"_2RaQu",selectButton:"_2xGqi",disabled:"_15kWr"}},1494: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})},1495:function(e,t,n){e.exports={metadataValue:"_3nkrW"}},1496: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})},1645: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(12);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 Date.prototype.toString.call(Reflect.construct(Date,[],(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(340),b=n(1212),w=n(136),S=n(190),k=n(0),M=n(1233),O=n(1266),T=n(253),x=n(293),E=n(59),C=n(6),R=n(29),P=n(9),_=n(1378),V=n(189),N=n(1216),j=n(1494),D=n.n(j),I=n(1495),A=n.n(I);function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function B(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function F(e,t){return(F=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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=q(e);if(t){var i=q(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"!==L(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 q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var J,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&&F(e,t)}(s,e);var t,n,o,a=U(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:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{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.i.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:A.a,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===V.MetadataType.Rating,isOtherType:this.options.metadataType===V.MetadataType.Other,metadataType:N.i.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)}},{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return D.a}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{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"}}}])&&B(t.prototype,n),o&&B(t,o),s}(r.a.Component);!function(e){e[e.Email=0]="Email"}(J||(J={}));var G=n(158),K=n(62),W=Object.assign(Object.assign({},G.a),{createSuggestEditNotification:function(e){return{_type:K.a.SuggestEdit,groupId:e.groupId,receiverId:0,countryCode:e.countryCode,channels:[J.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),$=n(1496),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 Date.prototype.toString.call(Reflect.construct(Date,[],(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:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{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,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.h)}},{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.g.original():"":N.g.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.x.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.i.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.q.getSpinner({size:u.r.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}},{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:"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}}}])&&X(t.prototype,n),r&&X(t,r),f}(r.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[38],{1216:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(2),i=n(253);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 Date.prototype.toString.call(Reflect.construct(Date,[],(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)},1225:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(1),i=n(2),r=n(298);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 Date.prototype.toString.call(Reflect.construct(Date,[],(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:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{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)}}},{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:"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)}}])&&s(t.prototype,n),i&&s(t,i),u}(i.a.ComponentCollection)},1270: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(1225),s=n(12),l=n(1271),c=n.n(l),u=n(1272),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 Date.prototype.toString.call(Reflect.construct(Date,[],(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:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{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}))}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c.a}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}}])&&p(t.prototype,n),r&&p(t,r),u}(r.a.Component)},1271: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})},1272:function(e,t,n){e.exports={dropdownMenu:"_2RaQu",selectButton:"_2xGqi",disabled:"_15kWr"}},1498: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})},1499:function(e,t,n){e.exports={metadataValue:"_3nkrW"}},1500: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})},1648: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(12);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 Date.prototype.toString.call(Reflect.construct(Date,[],(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(340),b=n(1216),w=n(136),S=n(190),k=n(0),M=n(1242),O=n(1270),T=n(253),x=n(293),E=n(60),C=n(6),R=n(29),P=n(9),_=n(1382),V=n(189),N=n(1222),j=n(1498),D=n.n(j),I=n(1499),A=n.n(I);function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function B(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function F(e,t){return(F=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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=q(e);if(t){var i=q(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"!==L(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 q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var J,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&&F(e,t)}(s,e);var t,n,o,a=U(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:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{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:A.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)}},{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return D.a}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{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"}}}])&&B(t.prototype,n),o&&B(t,o),s}(r.a.Component);!function(e){e[e.Email=0]="Email"}(J||(J={}));var G=n(158),K=n(62),W=Object.assign(Object.assign({},G.a),{createSuggestEditNotification:function(e){return{_type:K.a.SuggestEdit,groupId:e.groupId,receiverId:0,countryCode:e.countryCode,channels:[J.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),$=n(1500),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 Date.prototype.toString.call(Reflect.construct(Date,[],(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:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{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,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.x.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.q.getSpinner({size:u.r.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}},{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:"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}}}])&&X(t.prototype,n),r&&X(t,r),f}(r.a.View)}}]);