@clickview/library-editor 1.1.23-rc.1 → 1.1.23-rc.2

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 (383) hide show
  1. package/dist/css/1.chunk.css.map +1 -1
  2. package/dist/css/10.chunk.css.map +1 -1
  3. package/dist/css/11.chunk.css.map +1 -1
  4. package/dist/css/12.chunk.css.map +1 -1
  5. package/dist/css/13.chunk.css.map +1 -1
  6. package/dist/css/14.chunk.css.map +1 -1
  7. package/dist/css/16.chunk.css.map +1 -1
  8. package/dist/css/17.chunk.css.map +1 -1
  9. package/dist/css/18.chunk.css.map +1 -1
  10. package/dist/css/2.chunk.css.map +1 -1
  11. package/dist/css/21.chunk.css.map +1 -1
  12. package/dist/css/22.chunk.css.map +1 -1
  13. package/dist/css/23.chunk.css.map +1 -1
  14. package/dist/css/25.chunk.css.map +1 -1
  15. package/dist/css/26.chunk.css.map +1 -1
  16. package/dist/css/28.chunk.css.map +1 -1
  17. package/dist/css/29.chunk.css.map +1 -1
  18. package/dist/css/3.chunk.css.map +1 -1
  19. package/dist/css/30.chunk.css.map +1 -1
  20. package/dist/css/31.chunk.css.map +1 -1
  21. package/dist/css/32.chunk.css.map +1 -1
  22. package/dist/css/33.chunk.css.map +1 -1
  23. package/dist/css/34.chunk.css.map +1 -1
  24. package/dist/css/35.chunk.css.map +1 -1
  25. package/dist/css/36.chunk.css.map +1 -1
  26. package/dist/css/37.chunk.css.map +1 -1
  27. package/dist/css/38.chunk.css.map +1 -1
  28. package/dist/css/40.chunk.css.map +1 -1
  29. package/dist/css/41.chunk.css.map +1 -1
  30. package/dist/css/42.chunk.css.map +1 -1
  31. package/dist/css/43.chunk.css.map +1 -1
  32. package/dist/css/44.chunk.css.map +1 -1
  33. package/dist/css/45.chunk.css.map +1 -1
  34. package/dist/css/46.chunk.css.map +1 -1
  35. package/dist/css/47.chunk.css.map +1 -1
  36. package/dist/css/48.chunk.css.map +1 -1
  37. package/dist/css/49.chunk.css.map +1 -1
  38. package/dist/css/50.chunk.css.map +1 -1
  39. package/dist/css/51.chunk.css.map +1 -1
  40. package/dist/css/52.chunk.css.map +1 -1
  41. package/dist/css/55.chunk.css.map +1 -1
  42. package/dist/css/56.chunk.css.map +1 -1
  43. package/dist/css/58.chunk.css.map +1 -1
  44. package/dist/css/59.chunk.css.map +1 -1
  45. package/dist/css/6.chunk.css.map +1 -1
  46. package/dist/css/60.chunk.css.map +1 -1
  47. package/dist/css/62.chunk.css.map +1 -1
  48. package/dist/css/63.chunk.css.map +1 -1
  49. package/dist/css/67.chunk.css.map +1 -1
  50. package/dist/css/68.chunk.css.map +1 -1
  51. package/dist/css/69.chunk.css.map +1 -1
  52. package/dist/css/7.chunk.css.map +1 -1
  53. package/dist/css/70.chunk.css.map +1 -1
  54. package/dist/css/71.chunk.css.map +1 -1
  55. package/dist/css/72.chunk.css.map +1 -1
  56. package/dist/css/73.chunk.css.map +1 -1
  57. package/dist/css/74.chunk.css.map +1 -1
  58. package/dist/css/75.chunk.css.map +1 -1
  59. package/dist/css/76.chunk.css.map +1 -1
  60. package/dist/css/8.chunk.css.map +1 -1
  61. package/dist/css/library-editor-app.css.map +1 -1
  62. package/dist/libs/common/src/backbone/services/data-providers/SignalRDataProvider.d.ts +3 -3
  63. package/dist/libs/common/src/backbone/utils/UrlHelper.d.ts +0 -1
  64. package/dist/libs/shared/src/apps/notifications/utils/NotificationsHelper.d.ts +1 -1
  65. package/dist/projects/library-editor/src/apps/notifications/utils/NotificationsHelper.d.ts +1 -1
  66. package/dist/scripts/{0-2765595d0a.chunk.js → 0-09e1e33a5c.chunk.js} +1 -1
  67. package/dist/scripts/0-f604eee110.chunk.js +1 -0
  68. package/dist/scripts/0.chunk.js +1 -1
  69. package/dist/scripts/0.chunk.js.map +1 -1
  70. package/dist/scripts/{1-b6dedae131.chunk.js → 1-056bd8c79b.chunk.js} +1 -1
  71. package/dist/scripts/{1-35f87e4cdc.chunk.js → 1-a66bb44471.chunk.js} +1 -1
  72. package/dist/scripts/1.chunk.js.map +1 -1
  73. package/dist/scripts/10-028c6001e1.chunk.js +1 -0
  74. package/dist/scripts/{10-227e797872.chunk.js → 10-6c79d8c6f9.chunk.js} +1 -1
  75. package/dist/scripts/10.chunk.js.map +1 -1
  76. package/dist/scripts/{11-9dbae07504.chunk.js → 11-6eef9e160e.chunk.js} +1 -1
  77. package/dist/scripts/11-cecf8d22f0.chunk.js +11 -0
  78. package/dist/scripts/11.chunk.js.map +1 -1
  79. package/dist/scripts/12-d3f51f4e06.chunk.js +1 -0
  80. package/dist/scripts/{12-06cf65b136.chunk.js → 12-dbffa50a92.chunk.js} +1 -1
  81. package/dist/scripts/12.chunk.js.map +1 -1
  82. package/dist/scripts/{13-01ee41eb1e.chunk.js → 13-37e5cfab3e.chunk.js} +1 -1
  83. package/dist/scripts/13-4029d31569.chunk.js +1 -0
  84. package/dist/scripts/13.chunk.js.map +1 -1
  85. package/dist/scripts/14-4c94f97e4e.chunk.js +1 -0
  86. package/dist/scripts/{14-cf307e51d9.chunk.js → 14-b524fbd295.chunk.js} +1 -1
  87. package/dist/scripts/14.chunk.js.map +1 -1
  88. package/dist/scripts/{15-bedb9ff6d0.chunk.js → 15-1ff1252d1a.chunk.js} +1 -1
  89. package/dist/scripts/{15-eed00bc875.chunk.js → 15-ec9aa4878b.chunk.js} +1 -1
  90. package/dist/scripts/15.chunk.js.map +1 -1
  91. package/dist/scripts/16-5bc8299e14.chunk.js +1 -0
  92. package/dist/scripts/{16-339a29fa2f.chunk.js → 16-b27142fe98.chunk.js} +1 -1
  93. package/dist/scripts/16.chunk.js.map +1 -1
  94. package/dist/scripts/17-9fe035f9e2.chunk.js +1 -0
  95. package/dist/scripts/{17-66da06be62.chunk.js → 17-c3bbe50816.chunk.js} +1 -1
  96. package/dist/scripts/17.chunk.js +1 -1
  97. package/dist/scripts/17.chunk.js.map +1 -1
  98. package/dist/scripts/18.chunk.js.map +1 -1
  99. package/dist/scripts/19.chunk.js +1 -1
  100. package/dist/scripts/19.chunk.js.map +1 -1
  101. package/dist/scripts/{2-5079f4b088.chunk.js → 2-2cc3988222.chunk.js} +1 -1
  102. package/dist/scripts/2-e6d104415e.chunk.js +1 -0
  103. package/dist/scripts/2.chunk.js.map +1 -1
  104. package/dist/scripts/20-60e4eee833.chunk.js +1 -0
  105. package/dist/scripts/{20-6019ccb462.chunk.js → 20-6d9086f5db.chunk.js} +1 -1
  106. package/dist/scripts/20.chunk.js.map +1 -1
  107. package/dist/scripts/{21-77f6ddec3d.chunk.js → 21-2f10553302.chunk.js} +1 -1
  108. package/dist/scripts/21-a7fffe8852.chunk.js +1 -0
  109. package/dist/scripts/21.chunk.js.map +1 -1
  110. package/dist/scripts/{22-9ef39722d1.chunk.js → 22-59ae44b448.chunk.js} +1 -1
  111. package/dist/scripts/22-f670791432.chunk.js +1 -0
  112. package/dist/scripts/22.chunk.js.map +1 -1
  113. package/dist/scripts/{23-c8071cb869.chunk.js → 23-11e008ee63.chunk.js} +1 -1
  114. package/dist/scripts/23-4d26d6300a.chunk.js +1 -0
  115. package/dist/scripts/23.chunk.js +3 -3
  116. package/dist/scripts/23.chunk.js.map +1 -1
  117. package/dist/scripts/{24-b655377e1f.chunk.js → 24-7f21e384d2.chunk.js} +1 -1
  118. package/dist/scripts/24-813ef82099.chunk.js +1 -0
  119. package/dist/scripts/24.chunk.js.map +1 -1
  120. package/dist/scripts/25-023d08a591.chunk.js +1 -0
  121. package/dist/scripts/{25-acda0ed17e.chunk.js → 25-f0f7fa16a4.chunk.js} +1 -1
  122. package/dist/scripts/25.chunk.js.map +1 -1
  123. package/dist/scripts/26-a9fcf0d596.chunk.js +1 -0
  124. package/dist/scripts/{26-39f6c3ca17.chunk.js → 26-e65533bd94.chunk.js} +1 -1
  125. package/dist/scripts/26.chunk.js.map +1 -1
  126. package/dist/scripts/27-84f7bbade6.chunk.js +1 -0
  127. package/dist/scripts/{27-1313c7d392.chunk.js → 27-9dc0f5a4df.chunk.js} +1 -1
  128. package/dist/scripts/27.chunk.js +3 -3
  129. package/dist/scripts/27.chunk.js.map +1 -1
  130. package/dist/scripts/{28-b583483a6e.chunk.js → 28-26e5c371c7.chunk.js} +1 -1
  131. package/dist/scripts/28-cdf603f4cf.chunk.js +1 -0
  132. package/dist/scripts/28.chunk.js +6 -6
  133. package/dist/scripts/28.chunk.js.map +1 -1
  134. package/dist/scripts/{29-44119e600a.chunk.js → 29-61415c2af0.chunk.js} +1 -1
  135. package/dist/scripts/29-8278d23f9b.chunk.js +1 -0
  136. package/dist/scripts/29.chunk.js.map +1 -1
  137. package/dist/scripts/{3-bea2c1c371.chunk.js → 3-1fa81c9d9b.chunk.js} +1 -1
  138. package/dist/scripts/{3-079c0b4d3b.chunk.js → 3-5eff8c9df5.chunk.js} +1 -1
  139. package/dist/scripts/3.chunk.js +13 -25
  140. package/dist/scripts/3.chunk.js.map +1 -1
  141. package/dist/scripts/{30-a6a7291b5e.chunk.js → 30-6075c28972.chunk.js} +1 -1
  142. package/dist/scripts/30-7ab880728c.chunk.js +1 -0
  143. package/dist/scripts/30.chunk.js +6 -6
  144. package/dist/scripts/30.chunk.js.map +1 -1
  145. package/dist/scripts/31-aa4cd0f45e.chunk.js +1 -0
  146. package/dist/scripts/31-e35ae4e153.chunk.js +1 -0
  147. package/dist/scripts/31.chunk.js.map +1 -1
  148. package/dist/scripts/32-7717941f1d.chunk.js +1 -0
  149. package/dist/scripts/{32-0b05da2f4c.chunk.js → 32-d5a50a7592.chunk.js} +1 -1
  150. package/dist/scripts/32.chunk.js.map +1 -1
  151. package/dist/scripts/{33-04b1fbcdeb.chunk.js → 33-5ae90ed7d7.chunk.js} +1 -1
  152. package/dist/scripts/33-6da33143ea.chunk.js +1 -0
  153. package/dist/scripts/33.chunk.js.map +1 -1
  154. package/dist/scripts/{34-56f92b9a87.chunk.js → 34-27e40f4d4b.chunk.js} +1 -1
  155. package/dist/scripts/{34-4f2c861480.chunk.js → 34-50402c1835.chunk.js} +1 -1
  156. package/dist/scripts/34.chunk.js.map +1 -1
  157. package/dist/scripts/{35-cdd788a4b5.chunk.js → 35-3260300446.chunk.js} +1 -1
  158. package/dist/scripts/{35-08ead0d078.chunk.js → 35-ec8c190357.chunk.js} +1 -1
  159. package/dist/scripts/35.chunk.js.map +1 -1
  160. package/dist/scripts/{36-4db22bf8bb.chunk.js → 36-4d467bc42e.chunk.js} +1 -1
  161. package/dist/scripts/{36-7d33d11b58.chunk.js → 36-bec0c74d05.chunk.js} +1 -1
  162. package/dist/scripts/36.chunk.js.map +1 -1
  163. package/dist/scripts/{37-4de2537ff4.chunk.js → 37-37e8965783.chunk.js} +1 -1
  164. package/dist/scripts/37-3916177181.chunk.js +1 -0
  165. package/dist/scripts/37.chunk.js.map +1 -1
  166. package/dist/scripts/{38-57af633fa1.chunk.js → 38-3dc24b8867.chunk.js} +1 -1
  167. package/dist/scripts/38-89f7c22ea8.chunk.js +1 -0
  168. package/dist/scripts/38.chunk.js.map +1 -1
  169. package/dist/scripts/{39-5451786b7d.chunk.js → 39-350ff66a2b.chunk.js} +1 -1
  170. package/dist/scripts/39-9456631219.chunk.js +1 -0
  171. package/dist/scripts/39.chunk.js.map +1 -1
  172. package/dist/scripts/4-a7f6d378e0.chunk.js +1 -0
  173. package/dist/scripts/{4-0a8a5ac2f0.chunk.js → 4-b3f3c7c71c.chunk.js} +1 -1
  174. package/dist/scripts/4.chunk.js.map +1 -1
  175. package/dist/scripts/{40-31940ddf04.chunk.js → 40-3443f99cb2.chunk.js} +1 -1
  176. package/dist/scripts/40-f65196723f.chunk.js +1 -0
  177. package/dist/scripts/40.chunk.js.map +1 -1
  178. package/dist/scripts/{41-2c6722e410.chunk.js → 41-70b16d99d0.chunk.js} +1 -1
  179. package/dist/scripts/{41-0366a0332e.chunk.js → 41-b5dfd35e9e.chunk.js} +1 -1
  180. package/dist/scripts/41.chunk.js.map +1 -1
  181. package/dist/scripts/{42-9b7795d20a.chunk.js → 42-103fecb7b6.chunk.js} +1 -1
  182. package/dist/scripts/42-e17f214d6c.chunk.js +1 -0
  183. package/dist/scripts/42.chunk.js.map +1 -1
  184. package/dist/scripts/{43-006ce08a8f.chunk.js → 43-57b07579f7.chunk.js} +1 -1
  185. package/dist/scripts/{43-591954817b.chunk.js → 43-6826fbc7d4.chunk.js} +1 -1
  186. package/dist/scripts/43.chunk.js.map +1 -1
  187. package/dist/scripts/{44-b4c134efe8.chunk.js → 44-210d64dffe.chunk.js} +1 -1
  188. package/dist/scripts/{44-fc3a1d45c5.chunk.js → 44-593e820fa2.chunk.js} +1 -1
  189. package/dist/scripts/44.chunk.js.map +1 -1
  190. package/dist/scripts/{45-32ce8dd910.chunk.js → 45-632b07e926.chunk.js} +1 -1
  191. package/dist/scripts/{45-3e85e78a77.chunk.js → 45-8231a03833.chunk.js} +1 -1
  192. package/dist/scripts/45.chunk.js.map +1 -1
  193. package/dist/scripts/46-682ca88fd9.chunk.js +1 -0
  194. package/dist/scripts/{46-1256828b60.chunk.js → 46-82cce63cbf.chunk.js} +1 -1
  195. package/dist/scripts/46.chunk.js +6 -6
  196. package/dist/scripts/46.chunk.js.map +1 -1
  197. package/dist/scripts/{47-61b53964c2.chunk.js → 47-595b4aae87.chunk.js} +1 -1
  198. package/dist/scripts/47-aec7cf95e8.chunk.js +1 -0
  199. package/dist/scripts/47.chunk.js +1 -2
  200. package/dist/scripts/47.chunk.js.map +1 -1
  201. package/dist/scripts/48-7b09165697.chunk.js +1 -0
  202. package/dist/scripts/{48-3f804b22a4.chunk.js → 48-fcf6378889.chunk.js} +1 -1
  203. package/dist/scripts/48.chunk.js.map +1 -1
  204. package/dist/scripts/49-0e6ceb191f.chunk.js +1 -0
  205. package/dist/scripts/{49-79b28e90c9.chunk.js → 49-d8a4899eb1.chunk.js} +1 -1
  206. package/dist/scripts/49.chunk.js.map +1 -1
  207. package/dist/scripts/{5-093c9ee130.chunk.js → 5-06bc197b1e.chunk.js} +1 -1
  208. package/dist/scripts/{5-f5ad097d2b.chunk.js → 5-e2e64bc05f.chunk.js} +1 -1
  209. package/dist/scripts/5.chunk.js +3 -3
  210. package/dist/scripts/5.chunk.js.map +1 -1
  211. package/dist/scripts/{50-198f89794c.chunk.js → 50-11b1a49916.chunk.js} +1 -1
  212. package/dist/scripts/50-fa6f6fd1dc.chunk.js +1 -0
  213. package/dist/scripts/50.chunk.js.map +1 -1
  214. package/dist/scripts/51-1c9fca4604.chunk.js +1 -0
  215. package/dist/scripts/{51-177fe97a9b.chunk.js → 51-72a75e0265.chunk.js} +1 -1
  216. package/dist/scripts/51.chunk.js.map +1 -1
  217. package/dist/scripts/{52-d8cf26c75f.chunk.js → 52-195f73bcd6.chunk.js} +1 -1
  218. package/dist/scripts/52-ebce0c9f12.chunk.js +1 -0
  219. package/dist/scripts/52.chunk.js.map +1 -1
  220. package/dist/scripts/{53-595b1efa1a.chunk.js → 53-bb4f37ee25.chunk.js} +1 -1
  221. package/dist/scripts/53-c6807d4e0b.chunk.js +1 -0
  222. package/dist/scripts/53.chunk.js.map +1 -1
  223. package/dist/scripts/{54-646c8458e0.chunk.js → 54-7a201d8285.chunk.js} +1 -1
  224. package/dist/scripts/54-e6195aa62a.chunk.js +1 -0
  225. package/dist/scripts/54.chunk.js.map +1 -1
  226. package/dist/scripts/{55-5e3b70736e.chunk.js → 55-be3d7b8805.chunk.js} +1 -1
  227. package/dist/scripts/55-f9f9a251af.chunk.js +1 -0
  228. package/dist/scripts/55.chunk.js.map +1 -1
  229. package/dist/scripts/56-20f27f96db.chunk.js +1 -0
  230. package/dist/scripts/{56-3c520aec72.chunk.js → 56-6aeece1bf1.chunk.js} +1 -1
  231. package/dist/scripts/56.chunk.js.map +1 -1
  232. package/dist/scripts/{57-6f84e1bb9d.chunk.js → 57-59ee15161b.chunk.js} +1 -1
  233. package/dist/scripts/57-b25862dbf0.chunk.js +1 -0
  234. package/dist/scripts/57.chunk.js.map +1 -1
  235. package/dist/scripts/{58-1c37240b43.chunk.js → 58-8ff58b194a.chunk.js} +1 -1
  236. package/dist/scripts/58-edf06f18f9.chunk.js +1 -0
  237. package/dist/scripts/58.chunk.js.map +1 -1
  238. package/dist/scripts/59-241a666e49.chunk.js +1 -0
  239. package/dist/scripts/{59-05cbb57b32.chunk.js → 59-3d33954fcb.chunk.js} +1 -1
  240. package/dist/scripts/59.chunk.js.map +1 -1
  241. package/dist/scripts/{6-a5f6258253.chunk.js → 6-a469872b10.chunk.js} +1 -1
  242. package/dist/scripts/6-c631df7bda.chunk.js +1 -0
  243. package/dist/scripts/6.chunk.js.map +1 -1
  244. package/dist/scripts/60-ac631fa385.chunk.js +1 -0
  245. package/dist/scripts/{60-ac4f11764a.chunk.js → 60-f092baa91c.chunk.js} +1 -1
  246. package/dist/scripts/60.chunk.js.map +1 -1
  247. package/dist/scripts/61-360e50b6cb.chunk.js +1 -0
  248. package/dist/scripts/{61-62ec9b3628.chunk.js → 61-bd9ef62ccd.chunk.js} +1 -1
  249. package/dist/scripts/61.chunk.js +12 -12
  250. package/dist/scripts/61.chunk.js.map +1 -1
  251. package/dist/scripts/62-22ee1d2a94.chunk.js +1 -0
  252. package/dist/scripts/{62-4d0e82f903.chunk.js → 62-f15b3bf74c.chunk.js} +1 -1
  253. package/dist/scripts/62.chunk.js.map +1 -1
  254. package/dist/scripts/63-25413d744e.chunk.js +1 -0
  255. package/dist/scripts/{63-47af37825d.chunk.js → 63-92757f75e7.chunk.js} +1 -1
  256. package/dist/scripts/63.chunk.js.map +1 -1
  257. package/dist/scripts/64-1b027092be.chunk.js +1 -0
  258. package/dist/scripts/{64-12150ef48b.chunk.js → 64-c5a1c55521.chunk.js} +1 -1
  259. package/dist/scripts/64.chunk.js.map +1 -1
  260. package/dist/scripts/{65-7780441e5e.chunk.js → 65-6bb10ae23b.chunk.js} +1 -1
  261. package/dist/scripts/{65-a4fdf8777b.chunk.js → 65-c8a9aae545.chunk.js} +1 -1
  262. package/dist/scripts/65.chunk.js.map +1 -1
  263. package/dist/scripts/66-20aec598ca.chunk.js +1 -0
  264. package/dist/scripts/{66-029947cf5c.chunk.js → 66-f047027f7d.chunk.js} +1 -1
  265. package/dist/scripts/66.chunk.js.map +1 -1
  266. package/dist/scripts/{67-47f208342a.chunk.js → 67-2e1a011200.chunk.js} +1 -1
  267. package/dist/scripts/67-d8d1cb35a4.chunk.js +1 -0
  268. package/dist/scripts/67.chunk.js.map +1 -1
  269. package/dist/scripts/68-869ea333d9.chunk.js +1 -0
  270. package/dist/scripts/{68-5656cc45fe.chunk.js → 68-d5c0ab3fc1.chunk.js} +1 -1
  271. package/dist/scripts/68.chunk.js.map +1 -1
  272. package/dist/scripts/69-c4ff3e5568.chunk.js +1 -0
  273. package/dist/scripts/{69-4d32ddddbc.chunk.js → 69-fc8325afc9.chunk.js} +1 -1
  274. package/dist/scripts/69.chunk.js.map +1 -1
  275. package/dist/scripts/7-1d94e0bb0c.chunk.js +1 -0
  276. package/dist/scripts/{7-2696f5afc4.chunk.js → 7-58dd909fa3.chunk.js} +1 -1
  277. package/dist/scripts/7.chunk.js.map +1 -1
  278. package/dist/scripts/70-171dcf9fe1.chunk.js +1 -0
  279. package/dist/scripts/{70-0f070c1596.chunk.js → 70-ceda95013e.chunk.js} +1 -1
  280. package/dist/scripts/70.chunk.js.map +1 -1
  281. package/dist/scripts/71-33e7082ca2.chunk.js +1 -0
  282. package/dist/scripts/{71-215cac8b69.chunk.js → 71-6e8fc95beb.chunk.js} +1 -1
  283. package/dist/scripts/71.chunk.js.map +1 -1
  284. package/dist/scripts/72-2eef8b13b0.chunk.js +1 -0
  285. package/dist/scripts/{72-6eb3ef092e.chunk.js → 72-53fe3338bf.chunk.js} +1 -1
  286. package/dist/scripts/72.chunk.js.map +1 -1
  287. package/dist/scripts/73.chunk.js.map +1 -1
  288. package/dist/scripts/74.chunk.js.map +1 -1
  289. package/dist/scripts/75.chunk.js.map +1 -1
  290. package/dist/scripts/76.chunk.js.map +1 -1
  291. package/dist/scripts/77.chunk.js.map +1 -1
  292. package/dist/scripts/78.chunk.js.map +1 -1
  293. package/dist/scripts/79.chunk.js.map +1 -1
  294. package/dist/scripts/8-34ae87490f.chunk.js +1 -0
  295. package/dist/scripts/{8-1e0751e30b.chunk.js → 8-6974afed28.chunk.js} +1 -1
  296. package/dist/scripts/8.chunk.js.map +1 -1
  297. package/dist/scripts/80.chunk.js.map +1 -1
  298. package/dist/scripts/81.chunk.js.map +1 -1
  299. package/dist/scripts/82.chunk.js.map +1 -1
  300. package/dist/scripts/83.chunk.js.map +1 -1
  301. package/dist/scripts/84.chunk.js.map +1 -1
  302. package/dist/scripts/85.chunk.js.map +1 -1
  303. package/dist/scripts/86.chunk.js.map +1 -1
  304. package/dist/scripts/87.chunk.js.map +1 -1
  305. package/dist/scripts/88.chunk.js.map +1 -1
  306. package/dist/scripts/89.chunk.js.map +1 -1
  307. package/dist/scripts/{9-cd0bcefa7f.chunk.js → 9-0d7004dd33.chunk.js} +1 -1
  308. package/dist/scripts/{9-bb567e1c99.chunk.js → 9-9279038caa.chunk.js} +1 -1
  309. package/dist/scripts/9.chunk.js.map +1 -1
  310. package/dist/scripts/90.chunk.js.map +1 -1
  311. package/dist/scripts/91.chunk.js.map +1 -1
  312. package/dist/scripts/92.chunk.js.map +1 -1
  313. package/dist/scripts/bundle-06dc1f4908.min.js +8 -0
  314. package/dist/scripts/bundle-f4a423ce34.min.js +1 -0
  315. package/dist/scripts/bundle.js +1364 -1492
  316. package/dist/scripts/bundle.js.map +1 -1
  317. package/dist/scripts/bundles.json +2 -2
  318. package/dist/scripts/polyfills-21eaf1215c.min.js +1 -0
  319. package/dist/scripts/polyfills-efb4d7caa3.min.js +1 -0
  320. package/dist/scripts/polyfills.js +1050 -1050
  321. package/dist/scripts/polyfills.js.map +1 -1
  322. package/package.json +4 -4
  323. package/dist/scripts/0-f82360fd03.chunk.js +0 -1
  324. package/dist/scripts/10-8307f8e248.chunk.js +0 -1
  325. package/dist/scripts/12-43e54b0a2d.chunk.js +0 -1
  326. package/dist/scripts/13-3d84e237b9.chunk.js +0 -1
  327. package/dist/scripts/14-988bab314d.chunk.js +0 -1
  328. package/dist/scripts/16-3a99050a93.chunk.js +0 -1
  329. package/dist/scripts/17-bff211f26a.chunk.js +0 -1
  330. package/dist/scripts/20-d4470b4a53.chunk.js +0 -1
  331. package/dist/scripts/21-7bd1977005.chunk.js +0 -1
  332. package/dist/scripts/22-d88b8e9c20.chunk.js +0 -1
  333. package/dist/scripts/23-e8a0f60c53.chunk.js +0 -1
  334. package/dist/scripts/24-f62e7ff166.chunk.js +0 -1
  335. package/dist/scripts/25-f814e3921c.chunk.js +0 -1
  336. package/dist/scripts/26-9dd482e1e6.chunk.js +0 -1
  337. package/dist/scripts/27-5ecd204dab.chunk.js +0 -1
  338. package/dist/scripts/28-e9b8962af8.chunk.js +0 -1
  339. package/dist/scripts/29-e3391b4e4b.chunk.js +0 -1
  340. package/dist/scripts/30-aef6a19cde.chunk.js +0 -1
  341. package/dist/scripts/31-4f1ea6d067.chunk.js +0 -1
  342. package/dist/scripts/31-70fe14b490.chunk.js +0 -1
  343. package/dist/scripts/32-96ac2f9c32.chunk.js +0 -1
  344. package/dist/scripts/33-061a87935f.chunk.js +0 -1
  345. package/dist/scripts/37-fbd149e569.chunk.js +0 -1
  346. package/dist/scripts/38-7733a3d81e.chunk.js +0 -1
  347. package/dist/scripts/39-cc627dfe2b.chunk.js +0 -1
  348. package/dist/scripts/4-84fa8e49e2.chunk.js +0 -1
  349. package/dist/scripts/40-78639874b5.chunk.js +0 -1
  350. package/dist/scripts/42-c87c36d7d4.chunk.js +0 -1
  351. package/dist/scripts/46-e096df45ef.chunk.js +0 -1
  352. package/dist/scripts/47-9e514e7536.chunk.js +0 -1
  353. package/dist/scripts/48-9af8b50e4f.chunk.js +0 -1
  354. package/dist/scripts/49-883d9131af.chunk.js +0 -1
  355. package/dist/scripts/50-ce04770db1.chunk.js +0 -1
  356. package/dist/scripts/51-61bb2b80fe.chunk.js +0 -1
  357. package/dist/scripts/52-e7fd215888.chunk.js +0 -1
  358. package/dist/scripts/53-e78a58c963.chunk.js +0 -1
  359. package/dist/scripts/54-7976c21511.chunk.js +0 -1
  360. package/dist/scripts/55-dac67eae0b.chunk.js +0 -1
  361. package/dist/scripts/56-9a02efb9a1.chunk.js +0 -1
  362. package/dist/scripts/57-bf72265d49.chunk.js +0 -1
  363. package/dist/scripts/58-34ef45f4b6.chunk.js +0 -1
  364. package/dist/scripts/59-f3d473090d.chunk.js +0 -1
  365. package/dist/scripts/6-e49b6b4c08.chunk.js +0 -1
  366. package/dist/scripts/60-dd50d4179f.chunk.js +0 -1
  367. package/dist/scripts/61-e759f86871.chunk.js +0 -1
  368. package/dist/scripts/62-bfd5450b13.chunk.js +0 -1
  369. package/dist/scripts/63-8521e39a2e.chunk.js +0 -1
  370. package/dist/scripts/64-c42635a917.chunk.js +0 -1
  371. package/dist/scripts/66-7f2750cd97.chunk.js +0 -1
  372. package/dist/scripts/67-564ff2bd16.chunk.js +0 -1
  373. package/dist/scripts/68-df9024fadc.chunk.js +0 -1
  374. package/dist/scripts/69-a4b3442e68.chunk.js +0 -1
  375. package/dist/scripts/7-b39ab430b9.chunk.js +0 -1
  376. package/dist/scripts/70-2a427b3dd0.chunk.js +0 -1
  377. package/dist/scripts/71-c43ee23686.chunk.js +0 -1
  378. package/dist/scripts/72-f5a8cfc8b7.chunk.js +0 -1
  379. package/dist/scripts/8-f4f18356f7.chunk.js +0 -1
  380. package/dist/scripts/bundle-e7f4d4e659.min.js +0 -8
  381. package/dist/scripts/bundle-f73bcaa857.min.js +0 -8
  382. package/dist/scripts/polyfills-9517d7e647.min.js +0 -1
  383. package/dist/scripts/polyfills-e442ebbfb0.min.js +0 -1
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[23],{1026:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"k",(function(){return h})),n.d(t,"g",(function(){return y})),n.d(t,"e",(function(){return m})),n.d(t,"j",(function(){return g})),n.d(t,"i",(function(){return v})),n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return C})),n.d(t,"d",(function(){return S})),n.d(t,"f",(function(){return k})),n.d(t,"h",(function(){return b}));var o=n(2),i=n(1),r=n(19),a=n(29),s=n(3),l="libraryEditor.utils",u=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function c(e,t){if(e){var n=i.reduce(e,(function(e,n,o){var r=t[o];return n||r?i.isObject(n)&&i.isObject(r)&&!i.isUndefined(n.id)&&n.id===r.id?e:i.isArray(n)?p(n,r).length?e.concat(o):e:i.isEqual(n,r)?e:e.concat(o):e}),[]);if(n.length)return i.object(i.map(n,(function(n){return i.isArray(t[n])?[n,p(e[n],t[n])]:[n,t[n]]})))}}function p(e,t){var n=[];return i.each(t,(function(t){var o=i.findWhere(e,{id:t.id});if(!i.isUndefined(o)||0!==Object.keys(t).length){var r=i.isUndefined(o)?t:c(o,t);r&&(t.id<0&&!t.value||(!o||t.id<0?n.push(t):(r.id=t.id,n.push(r))))}})),n}var f={getChanges:function(e,t){var n=c(i.omit(e.toJSON(),u),i.omit(t.toJSON(),u));if(n)return i.object(i.map(i.keys(n),(function(e){return[e,f.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(i.isObject(t)&&i.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 i.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:o.a.ErrorHelper.throw(new r.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var r=["distributors","producers","directors","productionCompanies"];for(var a in i.each(i.keys(n),(function(e){r.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(i.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[a]&&e.associations[a]){var s=e.get(a);(s instanceof o.a.Model||s instanceof o.a.NestedModel)&&s.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],o={};return i.each(i.keys(e.toJSON()),(function(r){if(i.contains(n,r)){var a=e.get(r).map((function(e){return e.id})),s=t.get(r).map((function(e){return e.id})),l=i.filter(a,(function(e){return e&&!i.contains(s,e)}));l.length&&(o[r]=l)}})),o}},h={name:[{required:!0,msg:function(){return s.a.getPhrase(l,"videoTitleRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(l,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return s.a.getPhrase(l,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?s.a.getPhrase(l,"episodeNumberLessThanOne"):e&&e>2147483647?s.a.getPhrase(l,"episodeNumberExceeds"):e%1!=0?s.a.getPhrase(l,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?s.a.getPhrase(l,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":s.a.getPhrase(l,"seasonNoEpisodeNumber")}},d=a().year(),m={productionYear:function(e,t,n){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>d?s.a.getPhrase(l,"validProductionYears",{currentYear:d}):void 0):""}},y={name:[{required:!0,msg:function(){return s.a.getPhrase(l,"resourceNameRequired")}}]},g={suggestion:[{required:!0,msg:function(){return s.a.getPhrase(l,"suggestEditRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(l,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return s.a.getPhrase(l,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(l,"suggestEditReasonExceeds")}}]},b={number:function(e,t,n){return e?+e<1?s.a.getPhrase(l,"seasonLessThanOne"):+e>255?s.a.getPhrase(l,"seasonExceeds"):+e%1!=0?s.a.getPhrase(l,"seasonNotWhole"):"":s.a.getPhrase(l,"seasonRequired")}},v={empty:function(){return s.a.getPhrase(l,"suggestEditRatingRequired")},original:function(){return s.a.getPhrase(l,"suggestEditRatingInvalid")}},k={url:[{required:!0,pattern:"url",msg:function(){return s.a.getPhrase(l,"linkUrlRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(l,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return s.a.getPhrase(l,"linkNameRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(l,"linkNameExceeds")}}]},w={name:[{maxLength:128,msg:function(){return s.a.getPhrase(l,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return s.a.getPhrase(l,"fieldValueExceeds")}}]},C={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":s.a.getPhrase(l,"fieldsInvalid"):""}};function S(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1027:function(e,t,n){"use strict";var o=n(1033),i=n(1026),r=(n(1031),n(3),n(1034)),a=(n(1036),n(1032)),s=n(81),l={getVideoDownloadUrl:function(e,t){return s.a.safeUrlConcat(s.a.makeHttps(e),"/download?token=".concat(t))}};n.d(t,"a",(function(){return o.a})),n.d(t,"e",(function(){return i.g})),n.d(t,"h",(function(){return i.j})),n.d(t,"g",(function(){return i.i})),n.d(t,"d",(function(){return i.f})),n.d(t,"f",(function(){return i.h})),n.d(t,"c",(function(){return r.a})),n.d(t,"i",(function(){return a.a})),n.d(t,"b",(function(){return l}))},1031:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n(1),i=n(49),r=n(159),a=n(3),s="libraryEditor.utils",l={name:[{required:!0,msg:function(){return a.a.getPhrase(s,"folderNameRequired")}},{maxLength:255,msg:function(){return a.a.getPhrase(s,"folderNameExceeds")}}]},u=function(e,t){return{parentId:function(n){return n?i.a.calculateDestinationFolderDepth(e,n,t)>r.a.MAX_FOLDER_DEPTH?a.a.getPhrase(s,"maxFolderDepth",{maxDepth:r.a.MAX_FOLDER_DEPTH}):"":a.a.getPhrase(s,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,i=e.folder,r=e.collection;return t&&n?o.extend({},l,u(i,r)):t?l:n?u(i,r):void 0}},1032:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var o=n(15),i=n(3),r=n(185),a=n(1044),s=n(6);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u,c="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"}(u||(u={}));var p={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-success";case e<80:return"bg-info";case e<96:return"bg-danger";case e<128:return"bg-pink";case e>=128:return"bg-warning";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case s.h.HostedLibrary:case s.h.CustomLibrary:return e.get("name");case s.h.Exchange:return i.a.getPhrase(c,"exchange");case s.h.Workspace:return i.a.getPhrase(c,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case s.h.HostedLibrary:case s.h.CustomLibrary:return"bg-info";case s.h.Exchange:return"bg-success";case s.h.Workspace:default:return"bg-danger"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(l(t={},u.Pdf,o.b.FilePDF),l(t,u.Image,o.b.FileImg),l(t,u.PowerPoint,o.b.FilePowerpoint),l(t,u.Document,o.b.FileWord),l(t,u.Excel,o.b.FileExcel),l(t,u.Zip,o.b.FileZip),l(t,u.File,o.b.File),t)[e];return n||(n=o.b.Folder),o.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case u.Pdf:return"icon-red";case u.Image:return"icon-purple";case u.Document:return"icon-blue";case u.Excel:return"icon-green";case u.PowerPoint:return"icon-orange";case u.Zip:return"icon-teal";case u.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 u.Pdf:return i.a.getPhrase(c,"pdf");case u.Image:return i.a.getPhrase(c,"image");case u.Document:return i.a.getPhrase(c,"document");case u.Excel:return i.a.getPhrase(c,"spreadsheet");case u.PowerPoint:return i.a.getPhrase(c,"presentation");case u.Zip:return i.a.getPhrase(c,"zipArchive");case u.File:return i.a.getPhrase(c,"file");default:return""}},translateMetadataCollectionNames:function(e){return new a.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:p.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case r.e.VideoTitle:t+="VideoTitle";break;case r.e.Description:t+="Description";break;case r.e.Rating:t+="Rating";break;case r.e.SeriesTitle:t+="SeriesTitle";break;case r.e.Season:t+="SeasonNumber";break;case r.e.EpisodeNumber:t+="EpisodeNumber";break;case r.e.BroadcastDate:t+="BroadcastDate";break;case r.e.Channel:t+="Channel";break;case r.e.ProductionYear:t+="ProductionYear";break;case r.e.Distributors:t+="Distributors";break;case r.e.ProductionCompanies:t+="ProductionCompanies";break;case r.e.Directors:t+="Directors";break;case r.e.Producers:t+="Producers";break;case r.e.Other:t+="Other"}return i.a.getPhrase(c,t)}}},1033:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(1),i=n(13),r=n(3),a="libraryEditor.utils",s={isValidChapterTime:function(e,t,n,r){if(r){if(!o.isNumber(t))return l.StartTime.Invalid();if(t<0)return l.StartTime.Invalid();if(t>i.w.millisecondsToSeconds(n))return l.StartTime.Exceeds();if(r.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return l.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?l.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?l.Name.Exists():o.isEmpty(t.trim())?l.Name.Invalid():void 0:l.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return o.map(e,(function(e,n){var o={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,o}))}},l={Name:{Invalid:function(){return r.a.getPhrase(a,"chapterNameInvalid")},Exists:function(){return r.a.getPhrase(a,"chapterNameExists")},MaxLength:function(){return r.a.getPhrase(a,"chapterNameExceeds")}},StartTime:{Invalid:function(){return r.a.getPhrase(a,"chapterStartTimeInvalid")},Exists:function(){return r.a.getPhrase(a,"chapterStartTimeExists")},Exceeds:function(){return r.a.getPhrase(a,"chapterStartTimeExceeds")}}}},1034:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n(3),i="libraryEditor.utils",r={name:[{required:!0,msg:function(){return o.a.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(i,"libraryNameExceeds")}}]}},1036:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(29),i=n(3),r=n(1026),a="libraryEditor.utils",s=(o().year(),{name:[{required:!0,msg:function(){return i.a.getPhrase(a,"videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return i.a.getPhrase(a,"uploadFolderRequired")}}],libraryId:[{required:!0,msg:"Please select an upload library"}],episodeNumber:function(e,t,n){return e&&e<1?"Videos cannot have an episode number less than 1":e&&e>255?"Videos cannot have an episode number greater than 255":e&&e%1!=0?"Episode numbers can only be whole numbers":n.season&&n.season.get("number")>=0&&null===e?"Videos with a season must also have an episode number":""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":"Videos with an episode number must also have a season"},productionYear:function(){return r.e.productionYear.apply(null,arguments)}})},1044:function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==o(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)}n.d(t,"a",(function(){return u}));var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}(n,e);var t=a(n);function n(){return i(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1080:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var o=n(1),i=n(2),r=n(1081),a=n.n(r),s=n(1082),l=n.n(s);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return 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 h(this,n)}}function h(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=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)}(s,e);var t,n,i,r=f(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.call(this,e)}return t=s,(n=[{key:"viewOptions",value:function(){var e=this.options.tabs.map((function(e){return Object.assign(Object.assign({},e),{link:e.link.selector.replace(".","")})}));return{styles:a.a,tabs:e}}},{key:"setActiveTab",value:function(){var e=this,t=!1;if(this.options.tabs.forEach((function(n){n.active=!1,n.link.selector===e.options.activeTab&&(n.active=!0,t=!0)})),!t){var n=o.first(this.options.tabs);n&&(n.active=!0)}}},{key:"onBeforeRender",value:function(){this.setActiveTab()}},{key:"name",get:function(){return"TabsView"}},{key:"className",get:function(){var e="bg-white py-2 border-bottom";return this.options.className&&(e+=" ".concat(this.options.className)),e}},{key:"template",get:function(){return l.a}},{key:"appLinks",get:function(){var e={};return this.options.tabs.forEach((function(t){return e[t.link.selector]=t.link.appLink})),e}}])&&c(t.prototype,n),i&&c(t,i),s}(i.a.Component)},1081:function(e,t,n){e.exports={link:"_5idZs",active:"_3Ty4M"}},1082:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return null!=(s=n.unless.call(null!=t?t:e.nullContext||{},null!=t?t.hide:t,{name:"unless",hash:{},fn:e.program(2,i,0,r,a),inverse:e.noop,data:i}))?s:""},2:function(e,t,n,o,i,r,a){e.propertyIsEnumerable;var s,l=e.lambda,u=e.escapeExpression;return' <a class="'+u(l(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.link:s,t))+" p-2 "+u(l(null!=t?t.link:t,t))+" "+(null!=(s=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.active:t,{name:"if",hash:{},fn:e.program(3,i,0,r,a),inverse:e.noop,data:i}))?s:"")+'">'+u(l(null!=t?t.name:t,t))+"</a>\r\n"},3:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.active:s,t))+" border-bottom border-primary text-primary"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return null!=(s=n.each.call(null!=t?t:e.nullContext||{},null!=(s=null!=t?t.options:t)?s.tabs:s,{name:"each",hash:{},fn:e.program(1,i,0,r,a),inverse:e.noop,data:i}))?s:""},useData:!0,useDepths:!0})},1090:function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var o=n(1),i=n(7),r=n(2),a=n(19),s=n(15),l=n(92),u=n(13),c=n(1140),p=n.n(c),f=n(1141),h=n.n(f);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,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 y(e,t){return(y=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=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e){return(v=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&&y(e,t)}(d,e);var t,n,c,f=g(d);function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),f.call(this,e)}return t=d,(n=[{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||r.a.ErrorHelper.throw(new a.a("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new r.a.Model),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=i.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"clearInput",value:function(){this.getUI("input").typeahead("val",null)}},{key:"setInput",value:function(e){this.getUI("input").typeahead("val",e)}},{key:"onTypeaheadSelect",value:function(e,t,n){var o;e.preventDefault(),o="string"==typeof t?t:t.title||t.name||t.query,this.model.set(this.options.stickItProperty,o),this.parentChannel&&this.options.selectEvent&&this.parentChannel.trigger(this.options.selectEvent,t),this.onSubmit(e),this.toggleRemove()}},{key:"onSubmit",value:function(e){var t=this;if(e.preventDefault(),!this.isDestroyed()&&this.getTypeaheadActionOptions().clearOnSelect)return this.getUI("input").typeahead("close"),setTimeout((function(){t.model.clear(),t.clearInput()}),0),!1}},{key:"onClickRemove",value:function(){this.model.clear(),this.parentChannel.trigger(this.options.removeEvent,this.model),this.toggleRemove()}},{key:"getSources",value:function(){return o.isArray(this.options.typeaheadConfigs)?l.a.getSearchSources(this.options.typeaheadConfigs):l.a.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?o.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return o.isObject(this.options.actionOptions)?o.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){o.isObject(this.options.callbacks)&&(o.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",o.bind(this.options.callbacks.onRender,this)),o.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),o.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",o.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",o.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:h.a},this.options),{showRemove:this.shouldShowRemove(),svgRemove:s.a.getSvg(s.b.Close)})}},{key:"onRender",value:function(){this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),i.Validation.bind(this),this.toggleRemove()}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),i.Validation.unbind(this)}},{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return p.a}},{key:"className",get:function(){return"search-container ".concat(h.a.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.k.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"bindings",get:function(){var e,t,n,o="[name=".concat(this.options.inputName,"]");return e={},t=o,n={observe:this.options.stickItProperty,setOptions:{validate:!0}},t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}])&&m(t.prototype,n),c&&m(t,c),d}(r.a.Component)},1102:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var o=n(7),i=n(2),r=n(15),a=n(1103),s=n.n(a),l=n(1104),u=n.n(l),c=n(0),p=n(1080);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 h(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 d(e,t){return(d=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,o=g(e);if(t){var i=g(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 g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(l,e);var t,n,i,a=m(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,(n=[{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){var e=Object.assign(Object.assign({},this.options.goBackTab),{link:this.options.goBackTab.link.selector.replace(".","")});return{styles:s.a,backTab:e,backArrow:r.a.getSvg(r.b.ArrowLeft)}}},{key:"onSave",value:function(){o.Radio.channel(c.b.LIBRARY_EDITOR).trigger(c.a.LibraryEditor.SAVE_VIDEO)}},{key:"onRender",value:function(){this.showChildView("tabs",new p.a({tabs:this.options.tabs,activeTab:this.options.activeTab}))}},{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"template",get:function(){return u.a}},{key:"appLinks",get:function(){var e,t,n,o=this.options.goBackTab.link;return e={},t=o.selector,n=o.appLink,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}])&&h(t.prototype,n),i&&h(t,i),l}(i.a.Component)},1103:function(e,t,n){e.exports={svgContainer:"_27gR6"}},1104:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression;return'<div class="row">\r\n <h4>\r\n <a class="d-inline-flex align-items-center '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.link:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.link:r,t))+'">\r\n <span class="'+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block mx-2">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.backArrow:r,t))?r:"")+"</span>\r\n "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.name:r,t))+'\r\n </a>\r\n </h4>\r\n</div>\r\n<div class="tabs-region pl-2"></div>'},useData:!0})},1116:function(e,t,n){"use strict";var o=n(2),i=n(1127),r=n.n(i),a=n(7),s=n(15),l=n(1128),u=n.n(l),c=n(1129),p=n.n(c),f=n(1032),h=n(13),d=n(0),m=n(4),y=n(42),g=n(3);function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(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 k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(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=S(e);if(t){var i=S(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return C(this,n)}}function C(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(r,e);var t,n,o,i=w(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"onClickEdit",value:function(){var e=y.a.mergeOptions(this.options.analyticsOptions,{actionType:m.q.Edit,entity:m.e.Resource,workflowPhase:m.r.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};y.a.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new h.d({title:g.a.getPhrase(this.lang,"removeHeading"),text:g.a.getPhrase(this.lang,"removeBody",{resourceName:this.model.get("name")}),buttons:[{text:g.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:g.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){a.Radio.channel(e.options.channelName).trigger("delete:resource",e.model.get("id"))}))}},{key:"viewOptions",value:function(){var e=this.model.get("metadata"),t=e?e.type:"";return{editable:this.options.editable,styles:u.a,extension:f.a.mapTypeToExtension(t),svg:f.a.mapTypeToSvg(t),iconClass:f.a.mapTypeToClass(t),resourceType:f.a.mapTypeToName(t),editSvg:s.a.getSvg(s.b.Edit),trashSvg:s.a.getSvg(s.b.Delete)}}},{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return p.a}},{key:"className",get:function(){return"mb-2"}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"appLinks",get:function(){return{".edit":{application:d.b.LIBRARY_EDITOR,action:d.a.LibraryEditor.EDIT_RESOURCE,args:[this.options.videoId,this.model.get("id")]}}}}])&&v(t.prototype,n),o&&v(t,o),r}(o.a.Component);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 P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(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 x(e,t,n){return t&&R(e.prototype,t),n&&R(e,n),e}function T(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&&N(e,t)}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(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=j(e);if(t){var i=j(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return _(this,n)}}function _(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 j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"b",(function(){return D})),n.d(t,"a",(function(){return L}));var D=function(e){T(n,e);var t=I(n);function n(e){return P(this,n),t.call(this,e)}return x(n,[{key:"name",get:function(){return"VideoResourcesComponentCollection"}},{key:"className",get:function(){return"mt-3"}},{key:"childView",get:function(){return O}},{key:"childViewOptions",get:function(){return{editable:this.options.editable,videoId:this.options.videoId,channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions}}}]),n}(o.a.ComponentCollection),L=function(e){T(n,e);var t=I(n);function n(e){return P(this,n),t.call(this,e)}return x(n,[{key:"regions",value:function(){return{resources:{replaceElement:!0,el:".resource-list-region"}}}},{key:"renderResources",value:function(){var e=new D({collection:this.options.customCollection||this.model.resources,editable:this.options.editable||!1,videoId:this.options.videoId||this.model.get("id"),channelName:this.options.parentChannelName||this.channelName});this.showChildView("resources",e)}},{key:"viewOptions",value:function(){return{resourcesHeadingText:this.options.headerText||g.a.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}},{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return r.a}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}}]),n}(o.a.Component)},1127: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"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.resourcesHeadingText:r,t))+"</h5>\r\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n<div class="resource-list-region"></div>'},useData:!0})},1128:function(e,t,n){e.exports={svgContainer:"_uEVJ",actionSvg:"_1oLg0"}},1129: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.lambda,s=e.escapeExpression;return'<a class="float-right '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-muted delete">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+'</a>\r\n<a class="float-right '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-muted edit">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.editSvg:r,t))?r:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<span title="'+l(s(null!=(r=null!=t?t.options:t)?r.resourceType:r,t))+'" class="d-inline-block align-middle mr-2 '+l(s(null!=(r=null!=t?t.options:t)?r.iconClass:r,t))+" "+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\r\n<a href="'+l("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:c)?a.call(u,{name:"url",hash:{},data:i}):a)+"?name="+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:i}):a)+'" class="align-middle">\r\n '+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:i}):a)+"\r\n</a>\r\n"+(null!=(r=n.if.call(u,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},1134: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.lambda,s=e.escapeExpression;return'<a class="float-right '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-muted delete">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+'</a>\r\n<a class="float-right '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-muted edit">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.editSvg:r,t))?r:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<span class="d-inline-block align-middle mr-2 icon-blue '+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.linkSvg:r,t))?r:"")+'</span>\r\n<a href="'+l("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:c)?a.call(u,{name:"url",hash:{},data:i}):a)+'" target="_blank" class="align-middle info-link">\r\n '+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:i}):a)+"\r\n</a>\r\n"+(null!=(r=n.if.call(u,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},1135:function(e,t,n){e.exports={svgContainer:"_3T40U",actionSvg:"_3FRzz"}},1136: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"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headingText:r,t))+"</h5>\r\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n<div class="links-region"></div>'},useData:!0})},1140: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"autofocus"},5: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'<input\r\n name="'+s(a(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\r\n type="text"\r\n class="form-control '+(null!=(r=n.unless.call(l,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+" "+s(a(null!=(r=null!=t?t.options:t)?r.additionalClasses:r,t))+'"\r\n id="'+s(a(null!=(r=null!=t?t.options:t)?r.inputId:r,t))+'"\r\n autocomplete="off"\r\n placeholder="'+s(a(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'"\r\n '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.autofocus:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+"\r\n "+(null!=(r=n.unless.call(l,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n></input>\r\n<span class="svg-container mb-2 '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svg:r,t))+' remove" style="display: none;">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.svgRemove:r,t))?r:"")+"</span>"},useData:!0})},1141:function(e,t,n){e.exports={svg:"_1iL3O",typeaheadContainer:"_1SWXc",disabled:"_3C2O8"}},1142:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(2),i=n(244),r=n(13),a=n(3),s=n(158),l=n(185),u=n(1143),c=n.n(u),p=n(1144),f=n.n(p);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=b(e);if(t){var i=b(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"!==h(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 b(e){return(b=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&&m(e,t)}(h,e);var t,n,u,p=y(h);function h(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),p.call(this,e)}return t=h,(n=[{key:"initialize",value:function(){this.spinnerModel=new o.a.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,l.d.MergeChapters,this.onClickMergeChapters)}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(i.c.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==s.a.New&&this.model.get("status")!==s.a.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:a.a.getPhrase(this.lang,"mergeChapters"),subtitles:a.a.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:a.a.getPhrase(this.lang,"enabledCustomSubtitles")},t=new i.a({buttonText:e[this.options.type],extraButtonClass:"btn-primary ".concat(f.a.btn),model:this.spinnerModel,spinnerOptions:{size:r.r.Small,type:r.s.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:l.d.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:a.a.getPhrase(this.lang,"chaptersHeading"),line1:a.a.getPhrase(this.lang,"chaptersInfo1"),line2:a.a.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:a.a.getPhrase(this.lang,"subtitlesHeading"),line1:a.a.getPhrase(this.lang,"subtitlesInfo1"),line2:a.a.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:a.a.getPhrase(this.lang,"cvSubtitlesHeading"),line1:a.a.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:a.a.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&a.a.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(i.c.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===s.a.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return c.a}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}}])&&d(t.prototype,n),u&&d(t,u),h}(o.a.Component)},1143: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 null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.progress:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:""},2:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return' <span class="m-3 text-muted">'+a(e.lambda(null!=(r=null!=t?t.options:t)?r.progress:r,t))+'</span>\r\n <p class="pt-2">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\r\n"},4: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.failed:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:""},5:function(e,t,n,o,i){e.propertyIsEnumerable;return'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression;return"<h4>"+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.heading:r,t))+"</h4>\r\n<p>"+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line1:r,t))+"</p>\r\n<p>"+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line2:r,t))+'</p>\r\n<div class="btn-region"></div>\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.processing:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?r:"")},useData:!0})},1144:function(e,t,n){e.exports={btn:"_59zg9"}},1180:function(e,t,n){"use strict";var o=n(2),i=n(7),r=n(15),a=n(4),s=n(42),l=n(13),u=n(0),c=n(1134),p=n.n(c),f=n(1135),h=n.n(f),d=n(3);function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(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 g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(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=k(e);if(t){var i=k(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==m(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)}var 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&&g(e,t)}(f,e);var t,n,o,c=b(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),c.call(this,e)}return t=f,(n=[{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"onClickEdit",value:function(){var e=s.a.mergeOptions(this.options.analyticsOptions,{actionType:a.q.Edit,entity:a.e.Resource,workflowPhase:a.r.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};s.a.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new l.d({title:d.a.getPhrase(this.lang,"removeHeading"),text:d.a.getPhrase(this.lang,"removeConfirm",{name:l.v.escapeExpression(this.model.get("name"))}),buttons:[{text:d.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:d.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:l.k.generateUniqueChannelName(this)}).render().done((function(){i.Radio.channel(e.options.channelName).trigger("delete:link",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:h.a,editable:this.options.editable,linkSvg:r.a.getSvg(r.b.Link),editSvg:r.a.getSvg(r.b.Edit),trashSvg:r.a.getSvg(r.b.Delete)}}},{key:"name",get:function(){return"LinkItemComponent"}},{key:"template",get:function(){return p.a}},{key:"className",get:function(){return"mb-2"}},{key:"lang",get:function(){return"libraryEditor.editLinks"}},{key:"appLinks",get:function(){return{".edit":{application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.EDIT_LINK,args:[this.options.videoId,this.model.get("id")]}}}}])&&y(t.prototype,n),o&&y(t,o),f}(o.a.Component),C=n(1136),S=n.n(C);function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 R(e,t,n){return t&&P(e.prototype,t),n&&P(e,n),e}function x(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&&T(e,t)}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=_(e);if(t){var i=_(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return I(this,n)}}function I(e,t){return!t||"object"!==O(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)}n.d(t,"a",(function(){return j}));var j=function(e){x(n,e);var t=N(n);function n(e){return E(this,n),t.call(this,e)}return R(n,[{key:"regions",value:function(){return{links:{el:".links-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return this.options}},{key:"onRender",value:function(){this.showChildView("links",new D({collection:this.options.customCollection||this.model.get("links"),channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions,editable:this.options.editable,videoId:this.options.videoId,headingText:this.options.headingText,emptyStateText:this.options.emptyStateText}))}},{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return S.a}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}}]),n}(o.a.Component),D=function(e){x(n,e);var t=N(n);function n(e){return E(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return w}}]),n}(o.a.ComponentCollection)},1269:function(e,t,n){e.exports={fileDrop:"l2vGK",dropMask:"yNe5b",dragOver:"_3sZ1T"}},1270:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=e.escapeExpression;return'<div class="'+s("function"==typeof(a=null!=(a=n.dropMask||(null!=t?t.dropMask:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"dropMask",hash:{},data:i}):a)+'">\r\n <h3>'+s(e.lambda(null!=(r=null!=t?t.options:t)?r.fileDropText:r,t))+"</h3>\r\n</div>"},useData:!0})},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'<p class="alert alert-warning col-8 mb-0">'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.limitText:r,t))+"</p>\r\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<div class="file-drop '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.fileDrop:r,t))+" p-2"+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <button class="browse btn btn-secondary mr-2">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"browse",{name:"lang",hash:{},data:i}))+'</button>\r\n <span class="text-muted align-middle">'+s(a(null!=(r=null!=t?t.options:t)?r.alternateText:r,t))+"</span>\r\n</div>\r\n"},4:function(e,t,n,o,i){return" col-6 "},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression;return"<h5>"+s(a(null!=(r=null!=t?t.options:t)?r.title:r,t))+"</h5>\r\n<p>"+s(a(null!=(r=null!=t?t.options:t)?r.description:r,t))+"</p>\r\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},1272: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.lambda;return'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' float-right text-success">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.tickSvg:r,t))?r:"")+"</span>\r\n"},3:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' close float-right">&times;</span>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<span class="d-inline-block align-middle mr-2 '+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\r\n<span class="align-middle">\r\n '+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:i}):a)+"\r\n</span>\r\n"+(null!=(r=n.if.call(u,null!=(r=null!=t?t.options:t)?r.finished:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")+'\r\n<div class="progress my-2 '+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.progress:r,t))+' mt-2">\r\n <div class="progress-bar bg-info" style="width: '+l("function"==typeof(a=null!=(a=n.progress||(null!=t?t.progress:t))?a:c)?a.call(u,{name:"progress",hash:{},data:i}):a)+'%" aria-valuenow="'+l("function"==typeof(a=null!=(a=n.progress||(null!=t?t.progress:t))?a:c)?a.call(u,{name:"progress",hash:{},data:i}):a)+'" aria-valuemin="0" aria-valuemax="100"></div>\r\n</div>'},useData:!0})},1273:function(e,t,n){e.exports={svgContainer:"_3LHs_",progress:"_30D9s"}},1274:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;return'<form>\r\n <div class="form-group">\r\n <label for="language">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+'</label>\r\n <div class="typahead-region"></div>\r\n </div>\r\n</form>'},useData:!0})},1275: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.lambda,s=e.escapeExpression;return'<a class="float-right '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-muted delete">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<span class="d-inline-block align-middle mr-2 '+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\r\n<a href="'+l("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:e.hooks.helperMissing)?a.call(u,{name:"url",hash:{},data:i}):a)+"?name="+l(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+'" class="align-middle">\r\n '+l(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+"\r\n</a>\r\n"+(null!=(r=n.unless.call(u,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},1276:function(e,t,n){e.exports={svgContainer:"_1VUhp",actionSvg:"_3cODR"}},1277: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!=t?t.options:t)?r.emptyStateText:r,t))},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\r\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n<div class="subtitles-list-region"></div>'},useData:!0})},1278: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'<p class="alert alert-warning col-8">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"limit",{name:"lang",hash:{limit:null!=(r=null!=t?t.options:t)?r.limit:r},data:i}))+"</p>\r\n"},3: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,"subheading",{name:"lang",hash:{},data:i}))+'</p>\r\n<div class="form-group mb-1">\r\n <label for="url">'+s((n.lang||t&&t.lang||a).call(r,"urlLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n <input name="url" id="url" class="form-control" type="text" placeholder="'+s((n.lang||t&&t.lang||a).call(r,"urlPlaceholder",{name:"lang",hash:{},data:i}))+'">\r\n <div class="form-feedback"></div>\r\n</div>\r\n<div class="form-group mb-1" id="name-container" style="display: none;">\r\n <input type="text" class="form-control" name="name" placeholder="'+s((n.lang||t&&t.lang||a).call(r,"namePlaceholder",{name:"lang",hash:{},data:i}))+'">\r\n <div class="form-feedback"></div>\r\n</div>\r\n<div class="attach-btn-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return'<h5 class="pt-2">Resource Links</h5>\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.hide:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},1279:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"col-5 py-3"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return'<div class="tab-region"></div>\r\n\r\n<div class="row pb-2">\r\n <div class="'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickview-subtitles-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="subtitles-upload-region"></div>\r\n <div class="subtitles-upload-list-region p-0 col-8"></div>\r\n <div class="customer-subtitles-list-region p-0 col-8"></div>\r\n </div>\r\n</div>\r\n\r\n<div class="row border-top pt-1">\r\n <div class="'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickview-resources-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="resources-upload-region"></div>\r\n <div class="resources-upload-list-region p-0 col-8"></div>\r\n <div class="customer-resources-list-region p-0 col-8"></div>\r\n </div>\r\n</div>\r\n\r\n<div class="row border-top pt-3">\r\n <div class="'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickview-link-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="add-links-region mb-2"></div>\r\n <div class="customer-link-list-region p-0 col-8"></div>\r\n </div>\r\n</div>'},useData:!0})},1449:function(e,t,n){"use strict";n.r(t);var o=n(1),i=n(7),r=n(2),a=n(5),s=n(3),l=n(12),u=n(111),c=n(296),p=n(43),f=n(178),h=n(0),d=n(13),m=n(174),y=n(6),g=n(281),b=n(135),v=n(193),k=n(192),w=n(1269),C=n.n(w),S=n(1270),O=n.n(S),E=n(1271),P=n.n(E);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 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 T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=_(e);if(t){var i=_(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return I(this,n)}}function I(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 _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T(e,t)}(r,e);var t,n,o,i=N(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"events",value:function(){var e,t,n,o="dragleave .".concat(C.a.dropMask);return n="onDragLeave",(t=o)in(e={"drop .file-drop":"onDrop","dragover .file-drop":"onDragOver"})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"onDrop",value:function(){this.$el.removeClass(C.a.dragOver)}},{key:"onDragOver",value:function(e){this.$el.addClass(C.a.dragOver),e.preventDefault()}},{key:"onDragLeave",value:function(){this.$el.removeClass(C.a.dragOver)}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({},this.options),{styles:C.a,limitText:this.options.limitText,isClickViewContent:this.options.isClickViewContent})}},{key:"onRender",value:function(){this.getUI("dropArea").append(O()({dropMask:C.a.dropMask,fileDropText:s.a.getPhrase(this.lang,"drop")}))}},{key:"name",get:function(){return"FileSelectComponent"}},{key:"template",get:function(){return P.a}},{key:"lang",get:function(){return"libraryEditor.fileSelect"}},{key:"className",get:function(){var e="mt-3";return this.options.limitText||(e+=" mb-2"),e}},{key:"elements",get:function(){return{dropArea:".file-drop"}}},{key:"defaults",get:function(){return{acceptMultiple:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:v.a,buttonSelector:".browse",channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple,mimeType:this.options.mimeType},{behaviorClass:k.a,channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple}]}}])&&x(t.prototype,n),o&&x(t,o),r}(r.a.Component),D=n(1116),L=n(1142),V=n(15),U=n(1272),A=n.n(U),F=n(1273),M=n.n(F);function q(e){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(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 H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return 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 J(this,n)}}function J(e,t){return!t||"object"!==q(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 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&&H(e,t)}(a,e);var t,n,o,r=z(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"events",value:function(){return{"click .cancel-upload":"onClickCancelUpload"}}},{key:"onClickCancelUpload",value:function(){i.Radio.channel(this.options.channelName).trigger("cancel:upload",this.model.get("id"))}},{key:"viewOptions",value:function(){return{styles:M.a,svg:V.a.getSvg(V.b.Folder),tickSvg:V.a.getSvg(V.b.Check),finished:this.model.get("progress")>=100}}},{key:"name",get:function(){return"FileUploadComponent"}},{key:"template",get:function(){return A.a}}])&&B(t.prototype,n),o&&B(t,o),a}(r.a.Component);function Z(e){return(Z="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 G(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(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=ee(e);if(t){var i=ee(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Q(this,n)}}function Q(e,t){return!t||"object"!==Z(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 ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var te=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&X(e,t)}(r,e);var t,n,o,i=K(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"name",get:function(){return"FileUploadsComponentCollection"}},{key:"childView",get:function(){return W}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName}}}])&&G(t.prototype,n),o&&G(t,o),r}(r.a.ComponentCollection),ne=n(30),oe=n(1090),ie=n(131),re={handleQuery:function(e,t){return function(e,t,n){var i=[];if(e){var r=CVLanguages.getEnglishNameContains(e);return o.each(r,(function(e,t){i.push({key:t,name:e.englishName})})),t(i)}t()}},getTypeaheadConfig:function(){return function(e,t){return{name:"languages",source:re.handleQuery(),limit:5,display:function(e){return e.name},templates:{suggestion:ie.d,pending:ie.b,notFound:ie.c}}}}},ae=n(1274),se=n.n(ae);function le(e){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ue(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 ce(e,t){return(ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pe(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=he(e);if(t){var i=he(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return fe(this,n)}}function fe(e,t){return!t||"object"!==le(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 he(e){return(he=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var de=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&&ce(e,t)}(r,e);var t,n,o,i=pe(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"initialize",value:function(e){this.model=ne.a.get("subtitle:language",e.defaultLanguage),this.model.addValidation(d.t),this.listenTo(this.channelName,"select:language",this.onLanguageSelected)}},{key:"events",value:function(){return{"click .submit":"onClickSubmit",submit:"onClickSubmit"}}},{key:"regions",value:function(){return{typeahead:".typahead-region"}}},{key:"getTypeaheadConfigs",value:function(){return[{name:"languages",typeaheadConfig:re.getTypeaheadConfig()}]}},{key:"renderTypeahead",value:function(){this.showChildView("typeahead",new oe.a({model:this.model,parentChannelName:this.channelName,inputId:"language",selectEvent:"select:language",typeaheadConfigs:this.getTypeaheadConfigs()}))}},{key:"onLanguageSelected",value:function(e){this.model.set("code",e.key)}},{key:"onClickSubmit",value:function(){this.model.validate(),this.model.isValid()&&(this.options.promise.resolve(this.model.toJSON()),this.triggerMethod("hide"))}},{key:"onBeforeDestroy",value:function(){"pending"===this.options.promise.state()&&this.options.promise.reject()}},{key:"onRender",value:function(){this.renderTypeahead()}},{key:"template",get:function(){return se.a}},{key:"name",get:function(){return"LanguageSelectComponent"}},{key:"lang",get:function(){return"libraryEditor.languageSelect"}},{key:"behaviors",get:function(){return[{behaviorClass:g.f,title:s.a.getPhrase(this.lang,"heading"),buttons:[{text:s.a.getPhrase(this.lang,"submit"),type:"submit",className:"btn btn-primary submit"}]},{behaviorClass:g.a}]}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}}])&&ue(t.prototype,n),o&&ue(t,o),r}(r.a.Component),me=n(1102),ye=n(1032),ge=n(1275),be=n.n(ge),ve=n(1276),ke=n.n(ve);function we(e){return(we="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 Ce(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 Se(e,t){return(Se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oe(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=Pe(e);if(t){var i=Pe(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Ee(this,n)}}function Ee(e,t){return!t||"object"!==we(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 Pe(e){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Re=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&&Se(e,t)}(a,e);var t,n,o,r=Oe(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"events",value:function(){return{"click .delete":"onClickDelete"}}},{key:"getEnglishName",value:function(){var e,t,n=this.model.get("language");return t=this.model.collection.filter((function(e){return e.get("language")!==n})).length>0?CVLanguages.getFullEnglishName(n):CVLanguages.getEnglishName(n),(null===(e=this.model.get("metadata"))||void 0===e?void 0:e.autoGenerated)?s.a.getPhrase(this.lang,"autoGenerated",{name:t}):t}},{key:"onClickDelete",value:function(){var e=this;this.options.isClickViewContent||new d.d({title:s.a.getPhrase(this.lang,"removeHeading"),text:s.a.getPhrase(this.lang,"removeBody",{language:this.getEnglishName()}),buttons:[{text:s.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:s.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){i.Radio.channel(e.options.channelName).trigger("delete:subtitle",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:ke.a,svg:ye.a.mapTypeToSvg("subtitle"),trashSvg:V.a.getSvg(V.b.Delete),name:this.getEnglishName(),isClickViewContent:this.options.isClickViewContent}}},{key:"name",get:function(){return"SubtitleItemComponent"}},{key:"template",get:function(){return be.a}},{key:"lang",get:function(){return"libraryEditor.videoSubtitles"}},{key:"className",get:function(){return"mb-2"}}])&&Ce(t.prototype,n),o&&Ce(t,o),a}(r.a.Component),xe=n(1277),Te=n.n(xe);function Ne(e){return(Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function je(e,t,n){return t&&_e(e.prototype,t),n&&_e(e,n),e}function De(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&&Le(e,t)}function Le(e,t){return(Le=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ve(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=Ae(e);if(t){var i=Ae(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Ue(this,n)}}function Ue(e,t){return!t||"object"!==Ne(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 Ae(e){return(Ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fe=function(e){De(n,e);var t=Ve(n);function n(e){return Ie(this,n),t.call(this,e)}return je(n,[{key:"regions",value:function(){return{subtitles:{el:".subtitles-list-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{headerText:this.options.headerText,emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.showChildView("subtitles",new Me({collection:this.collection,channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}))}},{key:"name",get:function(){return"VideoSubtitlesComponent"}},{key:"template",get:function(){return Te.a}}]),n}(r.a.Component),Me=function(e){De(n,e);var t=Ve(n);function n(e){return Ie(this,n),t.call(this,e)}return je(n,[{key:"name",get:function(){return"VideoSubtitlesComponentCollection"}},{key:"childView",get:function(){return Re}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}}}]),n}(r.a.ComponentCollection),qe=n(244),Be=n(1027),He=n(1278),ze=n.n(He);function Je(e){return(Je="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 Ye(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function We(e,t){return(We=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ge(e);if(t){var i=Ge(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return $e(this,n)}}function $e(e,t){return!t||"object"!==Je(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 Ge(e){return(Ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xe=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&&We(e,t)}(a,e);var t,n,o,r=Ze(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this,e)).showNameField=!1,t.disableBtn=!0,t}return t=a,(n=[{key:"initialize",value:function(){this.model=ne.a.get(this.viewModelName),this.model.addValidation(Be.d),this.bindListeners()}},{key:"regions",value:function(){return{attachBtn:".attach-btn-region"}}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change:url",this.onChangeUrl),this.listenTo(this.model,"change:name",this.onChangeName),this.listenTo(this.options.channelName,"attach:link",this.onClickAttach)}},{key:"onChangeUrl",value:function(){this.showNameField&&!this.model.isValid("url")?(this.getUI("nameField").hide(),this.model.set("name",""),this.showNameField=!1):!this.showNameField&&this.model.isValid("url")&&(this.getUI("nameField").show(),this.showNameField=!0)}},{key:"onChangeName",value:function(){this.model.validate("name"),this.disableBtn=!this.model.isValid(),this.renderAttachButton()}},{key:"onClickAttach",value:function(){var e=this.model.toJSON();this.model.clear(),i.Radio.channel(this.options.channelName).trigger("add:link",e),this.render()}},{key:"renderAttachButton",value:function(){this.options.hide||this.showChildView("attachBtn",new qe.a({saveEvent:"attach:link",channelName:this.options.channelName,buttonText:s.a.getPhrase(this.lang,"attach"),extraButtonClass:"btn-secondary attach",disabled:this.disableBtn,buttonType:"submit",spinnerOptions:{size:d.r.Medium,type:d.s.Light,extraClasses:"mx-auto"}}))}},{key:"viewOptions",value:function(){return{limit:this.options.limit,hide:this.options.hide}}},{key:"onRender",value:function(){this.renderAttachButton(),this.stickit(),i.Validation.bind(this)}},{key:"onClose",value:function(){this.unstickit(),i.Validation.unbind(this)}},{key:"name",get:function(){return"AddLinksComponent"}},{key:"template",get:function(){return ze.a}},{key:"lang",get:function(){return"libraryEditor.addLinks"}},{key:"tagName",get:function(){return"form"}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"behaviors",get:function(){return[{behaviorClass:g.g},{behaviorClass:g.a}]}},{key:"elements",get:function(){return{nameField:"#name-container"}}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}}])&&Ye(t.prototype,n),o&&Ye(t,o),a}(r.a.Component),Ke=n(1180),Qe=n(191),et=n(185),tt=n(158),nt=n(4),ot=n(42),it=n(1279),rt=n.n(it);function at(e){return(at="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 st(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 lt(e,t){return(lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ut(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=pt(e);if(t){var i=pt(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return ct(this,n)}}function ct(e,t){return!t||"object"!==at(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 pt(e){return(pt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"EditResourcesView",(function(){return ft}));var ft=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&&lt(e,t)}(w,e);var t,n,v,k=ut(w);function w(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,w),k.call(this,e)}return t=w,(n=[{key:"initialize",value:function(){this.initializeUploadServices(),this.bindDataListeners(),this.bindViewListeners(),this.bindFileSelectListeners(),d.u.initBackButton(),this.chapterDataService=a.a.getInstance(h.g.Chapter,this),this.videoDataService=a.a.getInstance(h.g.Video,this),this.linkDataService=a.a.getInstance(h.g.Link,this),this.resourceDataService=a.a.getInstance(h.g.Resource,this),this.subtitleDataService=a.a.getInstance(h.g.Subtitle,this),this.resourceUploads=[],this.resourceUploadCount=0}},{key:"initializeUploadServices",value:function(){this.resourceUploadService=new c.b,this.listenTo(h.w.RESOURCE_UPLOAD,p.a.UPLOAD_COMPLETE,this.onResourceUploadComplete),this.subtitleUploadService=new c.c,this.listenTo(h.w.SUBTITLE_UPLOAD,p.a.UPLOAD_COMPLETE,this.onSubtitleUploadComplete)}},{key:"bindDataListeners",value:function(){this.listenTo(h.e.VIDEO,"".concat(h.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(h.e.VIDEO,"".concat(h.f.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(h.e.VIDEO,"".concat(h.f.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(h.e.CHAPTER,"".concat(h.f.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError)}},{key:"bindViewListeners",value:function(){this.listenTo(this.channelName,"add:link",this.onAddLink),this.listenTo(this.channelName,"delete:subtitle",this.onDeleteSubtitle),this.listenTo(this.channelName,"delete:resource",this.onDeleteResource),this.listenTo(this.channelName,"delete:link",this.onDeleteLink),this.listenTo(this.channelName,"cancel:upload",this.onCancelUpload),this.listenTo(this.channelName,et.d.MergeChapters,this.onMergeChapters)}},{key:"bindFileSelectListeners",value:function(){this.listenTo(this.getSubtitleSelectChannelName(),p.a.FILES_SELECTED,this.onSubtitleFilesAdded),this.listenTo(this.getResourceSelectChannelName(),p.a.FILES_SELECTED,this.onResourceFilesAdded)}},{key:"getSubtitleSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"subtitles")}},{key:"getResourceSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"resources")}},{key:"onVideoDataError",value:function(e){switch(e.type){case u.a.NotFound:r.a.ErrorHelper.throw(new Qe.n);break;case u.a.Forbidden:r.a.ErrorHelper.throw(new Qe.f)}}},{key:"onConcatenateDataError",value:function(e){e.type===u.a.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"onSubtitleFilesAdded",value:function(e,t){e.length>5-this.model.subtitles.length?r.a.ErrorHelper.throw(new Qe.m(5)):(t&&(this.interactionType=t),this.subtitleUploadService.addFiles(e))}},{key:"onResourceFilesAdded",value:function(e,t){e.length>25-this.model.resources.length?r.a.ErrorHelper.throw(new Qe.l(25)):(this.resourceUploadCount+=e.length,t&&(this.interactionType=t),this.resourceUploadService.addFiles(e))}},{key:"onAddLink",value:function(e){var t=this;25!==this.model.links.length&&(this.model.links.length+1===25&&this.renderAddLinks(!0),this.linkDataService.addLink(this.model.get("id"),e,(function(e){t.model.links.add(e),t.render()})))}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:y.j.EditVideoTabs},subtitlesUpload:{el:".subtitles-upload-region",partialLoading:y.j.EditVideoUploadArea},subtitlesUploadList:".subtitles-upload-list-region",customerSubtitlesList:".customer-subtitles-list-region",clickViewSubtitlesList:".clickview-subtitles-list-region",resourcesUpload:{el:".resources-upload-region",partialLoading:y.j.EditVideoUploadArea},resourcesUploadList:".resources-upload-list-region",customerResourcesList:".customer-resources-list-region",clickViewResourcesList:".clickview-resources-list-region",addLinks:{el:".add-links-region",partialLoading:y.j.EditVideoUploadArea},customerLinkList:".customer-link-list-region",clickViewLinkList:".clickview-link-list-region"}}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[tt.a.SingleFile,tt.a.ConcatenationFailed];o.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==tt.a.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.videoDataService.hasPhysicalChapters(e.options.videoId,(function(t){e.hasPhysicalChapters=t,e.renderSubtitleFileSelect()}))}))}},{key:"onDeleteResource",value:function(e){var t=this;this.resourceDataService.deleteResource(this.options.videoId,e,(function(){t.logDeleteAction(nt.e.Resource,e),t.render()}))}},{key:"onDeleteSubtitle",value:function(e){var t=this;this.subtitleDataService.deleteSubtitle(this.options.videoId,e,(function(){t.logDeleteAction(nt.e.Subtitle,e),t.render()}))}},{key:"onDeleteLink",value:function(e){var t=this;this.linkDataService.deleteLink(this.options.videoId,e,(function(){t.logDeleteAction(nt.e.Link,e),t.render()}))}},{key:"onCancelUpload",value:function(e){this.resourceUploadService.cancelUpload(e),this.subtitleUploadService.cancelUpload(e)}},{key:"onResourceUploadComplete",value:function(e){var t=this,n=e.toJSON(),o={fileId:n.fileInfo.id,uploadId:n.file.cvUpload.uploadId,name:n.fileInfo.name,type:f.a.getResourceType(n.fileInfo.extension),extension:n.fileInfo.extension,fileSize:n.fileInfo.size,fileUrl:n.fileInfo.url,ingestUrl:n.file.cvUpload.ingestUrl,metaData:{type:f.a.getResourceType(n.fileInfo.extension)},contribution:!1,url:n.fileInfo.url,fileIdType:2};this.resourceUploads.push(o),this.resourceUploadCount--,this.resourceUploadCount>0||(this.resourceDataService.addResource(this.options.videoId,this.resourceUploads,(function(e){t.model.resources.add(e);var n=t.resourceUploadService.getCollection().filter((function(t){return t.get("fileInfo").id===e.get("fileId")}));t.resourceUploadService.getCollection().remove(n),t.logUploadAction(e),t.render()})),this.resourceUploads=[])}},{key:"onSubtitleUploadComplete",value:function(e){var t=this,n=$.Deferred(),o=new de({defaultLanguage:{code:"en",name:"English"},promise:n});n.done((function(n){var o=e.toJSON(),i={fileId:o.fileInfo.id,name:n.name,language:n.code,type:f.a.getResourceType(o.fileInfo.extension),fileIdType:2};t.subtitleDataService.addSubtitle(t.options.videoId,i,(function(n){t.model.subtitles.add(n),t.subtitleUploadService.getCollection().remove(e),t.logUploadAction(n),t.render()}))})).fail((function(){t.subtitleUploadService.cancelUpload(e.get("id"))})),i.Radio.channel(l.a.POPUP).trigger(r.a.EventNames.SHOW_POPUP,o)}},{key:"logUploadAction",value:function(e){var t=e instanceof m.a?nt.e.Resource:nt.e.Subtitle,n=ot.a.mapInteractionType(this.interactionType),o={location:nt.k.EditVideoResources,actionType:nt.q.Upload,entity:t,descriptor:n};ot.a.logUserAction(e,o)}},{key:"logDeleteAction",value:function(e,t){var n={location:nt.k.EditVideoResources,actionType:nt.q.Delete,entity:e},o={id:t,parentId:+this.options.videoId};ot.a.logUserAction(o,n)}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"renderTabs",value:function(){var e=!d.j.canEditVideo(this.model);this.showChildView("tabs",new me.a({tabs:d.u.getEditVideoTabs(this.options.videoId,{hideChaptersTab:e}),activeTab:".edit-resources-subtitles-applink",goBackTab:d.u.getBackButton(this.options.videoId)}))}},{key:"renderSubtitleFileSelect",value:function(){if(this.hasPhysicalChapters.get("value"))this.renderConcatenationRequest();else{var e=s.a.getPhrase(this.lang,"subtitlesLimit",{limit:5});this.showChildView("subtitlesUpload",new j({title:this.isClickViewContent?s.a.getPhrase(this.lang,"customerSubtitles"):s.a.getPhrase(this.lang,"subtitles"),description:s.a.getPhrase(this.lang,"subtitlesInfo"),alternateText:s.a.getPhrase(this.lang,"subtitlesAlternative"),mimeType:f.b.SUBTITLES,channelName:this.getSubtitleSelectChannelName(),acceptMultiple:!1,limitText:this.model.subtitles.length>=5?e:null,isClickViewContent:this.isClickViewContent}))}}},{key:"renderSubtitleUploadList",value:function(){var e=this.subtitleUploadService.getCollection();this.showChildView("subtitlesUploadList",new te({collection:e,channelName:this.channelName}))}},{key:"renderSubtitlesLists",value:function(){this.renderClickViewSubtitlesList(),this.renderCustomerSubtitlesList()}},{key:"renderClickViewSubtitlesList",value:function(){if(this.isClickViewContent){var e=d.j.filterObjectsByOwnerType(this.model.subtitles,tt.b.ClickView);this.showChildView("clickViewSubtitlesList",new Fe({collection:e,channelName:this.channelName,isClickViewContent:!0,headerText:s.a.getPhrase(this.lang,"clickViewSubtitles"),emptyStateText:e.models.length?"":s.a.getPhrase(this.lang,"clickViewSubtitlesEmpty")}))}}},{key:"renderCustomerSubtitlesList",value:function(){this.showChildView("customerSubtitlesList",new Fe({collection:d.j.filterObjectsByOwnerType(this.model.subtitles,tt.b.Customer,this.currentUser.get("customerId")),channelName:this.channelName}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("subtitlesUpload",new L.a({type:this.isClickViewContent?"clickViewSubtitles":"subtitles",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderResourcesFileSelect",value:function(){var e=s.a.getPhrase(this.lang,"resourcesLimit",{limit:25});this.showChildView("resourcesUpload",new j({title:this.isClickViewContent?s.a.getPhrase(this.lang,"customerResources"):s.a.getPhrase(this.lang,"resources"),description:s.a.getPhrase(this.lang,"resourcesDescription"),alternateText:s.a.getPhrase(this.lang,"resourcesAlternative"),mimeType:f.b.RESOURCES,channelName:this.getResourceSelectChannelName(),limitText:this.model.resources.length>=25?e:null,isClickViewContent:this.isClickViewContent}))}},{key:"renderResourcesUploadList",value:function(){var e=this.resourceUploadService.getCollection();this.showChildView("resourcesUploadList",new te({collection:e,channelName:this.channelName}))}},{key:"renderResourcesLists",value:function(){this.renderClickViewResourcesList(),this.renderCustomerResourcesList()}},{key:"renderClickViewResourcesList",value:function(){if(this.isClickViewContent){var e=d.j.filterObjectsByOwnerType(this.model.resources,tt.b.ClickView);this.showChildView("clickViewResourcesList",new D.a({model:this.model,customCollection:e,editable:!1,videoId:this.options.videoId,parentChannelName:this.channelName,headerText:s.a.getPhrase(this.lang,"clickViewResources"),emptyStateText:e.models.length?"":s.a.getPhrase(this.lang,"clickViewResourcesEmpty"),analyticsOptions:{location:nt.k.EditVideoResources}}))}}},{key:"renderCustomerResourcesList",value:function(){this.showChildView("customerResourcesList",new D.b({collection:d.j.filterObjectsByOwnerType(this.model.resources,tt.b.Customer,this.currentUser.get("customerId")),editable:!0,videoId:this.options.videoId,channelName:this.channelName,analyticsOptions:{location:nt.k.EditVideoResources}}))}},{key:"renderAddLinks",value:function(e){this.showChildView("addLinks",new Xe({collection:this.model.get("links"),channelName:this.channelName,hide:e||25===this.model.get("links").length,limit:25}))}},{key:"renderLinkLists",value:function(){var e={channelName:this.channelName,analyticsOptions:{location:nt.k.EditVideoResources},videoId:this.options.videoId};this.renderClickViewLinkList(e),this.renderCustomerLinkList(e)}},{key:"renderClickViewLinkList",value:function(e){if(this.isClickViewContent){var t=d.j.filterObjectsByOwnerType(this.model.links,tt.b.ClickView);this.showChildView("clickViewLinkList",new Ke.a(Object.assign(Object.assign({},e),{headingText:"Resource Links by ClickView",emptyStateText:t.models.length?"":"There are no ClickView links for this video",customCollection:t,editable:!1})))}}},{key:"renderCustomerLinkList",value:function(e){this.showChildView("customerLinkList",new Ke.a(Object.assign(Object.assign({},e),{customCollection:d.j.filterObjectsByOwnerType(this.model.links,tt.b.Customer,this.currentUser.get("customerId")),editable:!0})))}},{key:"fetchData",value:function(){var e=this;this.model=this.videoDataService.getVideo(this.options.videoId),this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.isClickViewContent=this.model&&!d.j.canEditVideo(this.model),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"viewOptions",value:function(){return{isClickViewContent:this.isClickViewContent}}},{key:"onRender",value:function(){this.renderTabs(),this.renderSubtitleFileSelect(),this.renderSubtitleUploadList(),this.renderSubtitlesLists(),this.renderResourcesFileSelect(),this.renderResourcesUploadList(),this.renderResourcesLists(),this.renderAddLinks(),this.renderLinkLists(),this.startPollingConcatenation()}},{key:"onDestroy",value:function(){this.subtitleUploadService.destroy(),this.resourceUploadService.destroy()}},{key:"name",get:function(){return"EditResourcesView"}},{key:"lang",get:function(){return"libraryEditor.editResources"}},{key:"title",get:function(){return this.model&&this.model.get("name")||"Edit Resources"}},{key:"template",get:function(){return rt.a}},{key:"props",get:function(){return["videoDataService"]}},{key:"className",get:function(){return"bg-white p-3"}},{key:"channelName",get:function(){return d.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:g.e}]}},{key:"requiredResources",get:function(){return{currentUser:b.b.currentUser}}}])&&st(t.prototype,n),v&&st(t,v),w}(r.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[23],{1022:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"k",(function(){return h})),n.d(t,"g",(function(){return y})),n.d(t,"e",(function(){return m})),n.d(t,"j",(function(){return g})),n.d(t,"i",(function(){return v})),n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return C})),n.d(t,"d",(function(){return S})),n.d(t,"f",(function(){return k})),n.d(t,"h",(function(){return b}));var o=n(2),i=n(1),r=n(19),a=n(29),s=n(3),l="libraryEditor.utils",u=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function c(e,t){if(e){var n=i.reduce(e,(function(e,n,o){var r=t[o];return n||r?i.isObject(n)&&i.isObject(r)&&!i.isUndefined(n.id)&&n.id===r.id?e:i.isArray(n)?p(n,r).length?e.concat(o):e:i.isEqual(n,r)?e:e.concat(o):e}),[]);if(n.length)return i.object(i.map(n,(function(n){return i.isArray(t[n])?[n,p(e[n],t[n])]:[n,t[n]]})))}}function p(e,t){var n=[];return i.each(t,(function(t){var o=i.findWhere(e,{id:t.id});if(!i.isUndefined(o)||0!==Object.keys(t).length){var r=i.isUndefined(o)?t:c(o,t);r&&(t.id<0&&!t.value||(!o||t.id<0?n.push(t):(r.id=t.id,n.push(r))))}})),n}var f={getChanges:function(e,t){var n=c(i.omit(e.toJSON(),u),i.omit(t.toJSON(),u));if(n)return i.object(i.map(i.keys(n),(function(e){return[e,f.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(i.isObject(t)&&i.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 i.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:o.a.ErrorHelper.throw(new r.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var r=["distributors","producers","directors","productionCompanies"];for(var a in i.each(i.keys(n),(function(e){r.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(i.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[a]&&e.associations[a]){var s=e.get(a);(s instanceof o.a.Model||s instanceof o.a.NestedModel)&&s.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],o={};return i.each(i.keys(e.toJSON()),(function(r){if(i.contains(n,r)){var a=e.get(r).map((function(e){return e.id})),s=t.get(r).map((function(e){return e.id})),l=i.filter(a,(function(e){return e&&!i.contains(s,e)}));l.length&&(o[r]=l)}})),o}},h={name:[{required:!0,msg:function(){return s.a.getPhrase(l,"videoTitleRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(l,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return s.a.getPhrase(l,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?s.a.getPhrase(l,"episodeNumberLessThanOne"):e&&e>2147483647?s.a.getPhrase(l,"episodeNumberExceeds"):e%1!=0?s.a.getPhrase(l,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?s.a.getPhrase(l,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":s.a.getPhrase(l,"seasonNoEpisodeNumber")}},d=a().year(),m={productionYear:function(e,t,n){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>d?s.a.getPhrase(l,"validProductionYears",{currentYear:d}):void 0):""}},y={name:[{required:!0,msg:function(){return s.a.getPhrase(l,"resourceNameRequired")}}]},g={suggestion:[{required:!0,msg:function(){return s.a.getPhrase(l,"suggestEditRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(l,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return s.a.getPhrase(l,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(l,"suggestEditReasonExceeds")}}]},b={number:function(e,t,n){return e?+e<1?s.a.getPhrase(l,"seasonLessThanOne"):+e>255?s.a.getPhrase(l,"seasonExceeds"):+e%1!=0?s.a.getPhrase(l,"seasonNotWhole"):"":s.a.getPhrase(l,"seasonRequired")}},v={empty:function(){return s.a.getPhrase(l,"suggestEditRatingRequired")},original:function(){return s.a.getPhrase(l,"suggestEditRatingInvalid")}},k={url:[{required:!0,pattern:"url",msg:function(){return s.a.getPhrase(l,"linkUrlRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(l,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return s.a.getPhrase(l,"linkNameRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(l,"linkNameExceeds")}}]},w={name:[{maxLength:128,msg:function(){return s.a.getPhrase(l,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return s.a.getPhrase(l,"fieldValueExceeds")}}]},C={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":s.a.getPhrase(l,"fieldsInvalid"):""}};function S(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1023:function(e,t,n){"use strict";var o=n(1029),i=n(1022),r=(n(1027),n(3),n(1030)),a=(n(1032),n(1028)),s=n(75),l={getVideoDownloadUrl:function(e,t){return s.a.safeUrlConcat(s.a.makeHttps(e),"/download?token=".concat(t))}};n.d(t,"a",(function(){return o.a})),n.d(t,"e",(function(){return i.g})),n.d(t,"h",(function(){return i.j})),n.d(t,"g",(function(){return i.i})),n.d(t,"d",(function(){return i.f})),n.d(t,"f",(function(){return i.h})),n.d(t,"c",(function(){return r.a})),n.d(t,"i",(function(){return a.a})),n.d(t,"b",(function(){return l}))},1027:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var o=n(1),i=n(49),r=n(159),a=n(3),s="libraryEditor.utils",l={name:[{required:!0,msg:function(){return a.a.getPhrase(s,"folderNameRequired")}},{maxLength:255,msg:function(){return a.a.getPhrase(s,"folderNameExceeds")}}]},u=function(e,t){return{parentId:function(n){return n?i.a.calculateDestinationFolderDepth(e,n,t)>r.a.MAX_FOLDER_DEPTH?a.a.getPhrase(s,"maxFolderDepth",{maxDepth:r.a.MAX_FOLDER_DEPTH}):"":a.a.getPhrase(s,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,i=e.folder,r=e.collection;return t&&n?o.extend({},l,u(i,r)):t?l:n?u(i,r):void 0}},1028:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var o=n(15),i=n(3),r=n(185),a=n(1040),s=n(6);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u,c="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"}(u||(u={}));var p={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-success";case e<80:return"bg-info";case e<96:return"bg-danger";case e<128:return"bg-pink";case e>=128:return"bg-warning";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case s.h.HostedLibrary:case s.h.CustomLibrary:return e.get("name");case s.h.Exchange:return i.a.getPhrase(c,"exchange");case s.h.Workspace:return i.a.getPhrase(c,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case s.h.HostedLibrary:case s.h.CustomLibrary:return"bg-info";case s.h.Exchange:return"bg-success";case s.h.Workspace:default:return"bg-danger"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(l(t={},u.Pdf,o.b.FilePDF),l(t,u.Image,o.b.FileImg),l(t,u.PowerPoint,o.b.FilePowerpoint),l(t,u.Document,o.b.FileWord),l(t,u.Excel,o.b.FileExcel),l(t,u.Zip,o.b.FileZip),l(t,u.File,o.b.File),t)[e];return n||(n=o.b.Folder),o.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case u.Pdf:return"icon-red";case u.Image:return"icon-purple";case u.Document:return"icon-blue";case u.Excel:return"icon-green";case u.PowerPoint:return"icon-orange";case u.Zip:return"icon-teal";case u.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 u.Pdf:return i.a.getPhrase(c,"pdf");case u.Image:return i.a.getPhrase(c,"image");case u.Document:return i.a.getPhrase(c,"document");case u.Excel:return i.a.getPhrase(c,"spreadsheet");case u.PowerPoint:return i.a.getPhrase(c,"presentation");case u.Zip:return i.a.getPhrase(c,"zipArchive");case u.File:return i.a.getPhrase(c,"file");default:return""}},translateMetadataCollectionNames:function(e){return new a.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:p.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case r.e.VideoTitle:t+="VideoTitle";break;case r.e.Description:t+="Description";break;case r.e.Rating:t+="Rating";break;case r.e.SeriesTitle:t+="SeriesTitle";break;case r.e.Season:t+="SeasonNumber";break;case r.e.EpisodeNumber:t+="EpisodeNumber";break;case r.e.BroadcastDate:t+="BroadcastDate";break;case r.e.Channel:t+="Channel";break;case r.e.ProductionYear:t+="ProductionYear";break;case r.e.Distributors:t+="Distributors";break;case r.e.ProductionCompanies:t+="ProductionCompanies";break;case r.e.Directors:t+="Directors";break;case r.e.Producers:t+="Producers";break;case r.e.Other:t+="Other"}return i.a.getPhrase(c,t)}}},1029:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(1),i=n(13),r=n(3),a="libraryEditor.utils",s={isValidChapterTime:function(e,t,n,r){if(r){if(!o.isNumber(t))return l.StartTime.Invalid();if(t<0)return l.StartTime.Invalid();if(t>i.w.millisecondsToSeconds(n))return l.StartTime.Exceeds();if(r.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return l.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?l.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?l.Name.Exists():o.isEmpty(t.trim())?l.Name.Invalid():void 0:l.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return o.map(e,(function(e,n){var o={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,o}))}},l={Name:{Invalid:function(){return r.a.getPhrase(a,"chapterNameInvalid")},Exists:function(){return r.a.getPhrase(a,"chapterNameExists")},MaxLength:function(){return r.a.getPhrase(a,"chapterNameExceeds")}},StartTime:{Invalid:function(){return r.a.getPhrase(a,"chapterStartTimeInvalid")},Exists:function(){return r.a.getPhrase(a,"chapterStartTimeExists")},Exceeds:function(){return r.a.getPhrase(a,"chapterStartTimeExceeds")}}}},1030:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n(3),i="libraryEditor.utils",r={name:[{required:!0,msg:function(){return o.a.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(i,"libraryNameExceeds")}}]}},1032:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n(29),i=n(3),r=n(1022),a="libraryEditor.utils",s=(o().year(),{name:[{required:!0,msg:function(){return i.a.getPhrase(a,"videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return i.a.getPhrase(a,"uploadFolderRequired")}}],libraryId:[{required:!0,msg:"Please select an upload library"}],episodeNumber:function(e,t,n){return e&&e<1?"Videos cannot have an episode number less than 1":e&&e>255?"Videos cannot have an episode number greater than 255":e&&e%1!=0?"Episode numbers can only be whole numbers":n.season&&n.season.get("number")>=0&&null===e?"Videos with a season must also have an episode number":""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":"Videos with an episode number must also have a season"},productionYear:function(){return r.e.productionYear.apply(null,arguments)}})},1040:function(e,t,n){"use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==o(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)}n.d(t,"a",(function(){return u}));var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}(n,e);var t=a(n);function n(){return i(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1076:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var o=n(1),i=n(2),r=n(1077),a=n.n(r),s=n(1078),l=n.n(s);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return 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 h(this,n)}}function h(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=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)}(s,e);var t,n,i,r=f(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.call(this,e)}return t=s,(n=[{key:"viewOptions",value:function(){var e=this.options.tabs.map((function(e){return Object.assign(Object.assign({},e),{link:e.link.selector.replace(".","")})}));return{styles:a.a,tabs:e}}},{key:"setActiveTab",value:function(){var e=this,t=!1;if(this.options.tabs.forEach((function(n){n.active=!1,n.link.selector===e.options.activeTab&&(n.active=!0,t=!0)})),!t){var n=o.first(this.options.tabs);n&&(n.active=!0)}}},{key:"onBeforeRender",value:function(){this.setActiveTab()}},{key:"name",get:function(){return"TabsView"}},{key:"className",get:function(){var e="bg-white py-2 border-bottom";return this.options.className&&(e+=" ".concat(this.options.className)),e}},{key:"template",get:function(){return l.a}},{key:"appLinks",get:function(){var e={};return this.options.tabs.forEach((function(t){return e[t.link.selector]=t.link.appLink})),e}}])&&c(t.prototype,n),i&&c(t,i),s}(i.a.Component)},1077:function(e,t,n){e.exports={link:"_5idZs",active:"_3Ty4M"}},1078:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return null!=(s=n.unless.call(null!=t?t:e.nullContext||{},null!=t?t.hide:t,{name:"unless",hash:{},fn:e.program(2,i,0,r,a),inverse:e.noop,data:i}))?s:""},2:function(e,t,n,o,i,r,a){e.propertyIsEnumerable;var s,l=e.lambda,u=e.escapeExpression;return' <a class="'+u(l(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.link:s,t))+" p-2 "+u(l(null!=t?t.link:t,t))+" "+(null!=(s=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.active:t,{name:"if",hash:{},fn:e.program(3,i,0,r,a),inverse:e.noop,data:i}))?s:"")+'">'+u(l(null!=t?t.name:t,t))+"</a>\r\n"},3:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.active:s,t))+" border-bottom border-primary text-primary"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return null!=(s=n.each.call(null!=t?t:e.nullContext||{},null!=(s=null!=t?t.options:t)?s.tabs:s,{name:"each",hash:{},fn:e.program(1,i,0,r,a),inverse:e.noop,data:i}))?s:""},useData:!0,useDepths:!0})},1086:function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var o=n(1),i=n(7),r=n(2),a=n(19),s=n(15),l=n(92),u=n(13),c=n(1136),p=n.n(c),f=n(1137),h=n.n(f);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,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 y(e,t){return(y=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=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e){return(v=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&&y(e,t)}(d,e);var t,n,c,f=g(d);function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),f.call(this,e)}return t=d,(n=[{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||r.a.ErrorHelper.throw(new a.a("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new r.a.Model),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=i.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"clearInput",value:function(){this.getUI("input").typeahead("val",null)}},{key:"setInput",value:function(e){this.getUI("input").typeahead("val",e)}},{key:"onTypeaheadSelect",value:function(e,t,n){var o;e.preventDefault(),o="string"==typeof t?t:t.title||t.name||t.query,this.model.set(this.options.stickItProperty,o),this.parentChannel&&this.options.selectEvent&&this.parentChannel.trigger(this.options.selectEvent,t),this.onSubmit(e),this.toggleRemove()}},{key:"onSubmit",value:function(e){var t=this;if(e.preventDefault(),!this.isDestroyed()&&this.getTypeaheadActionOptions().clearOnSelect)return this.getUI("input").typeahead("close"),setTimeout((function(){t.model.clear(),t.clearInput()}),0),!1}},{key:"onClickRemove",value:function(){this.model.clear(),this.parentChannel.trigger(this.options.removeEvent,this.model),this.toggleRemove()}},{key:"getSources",value:function(){return o.isArray(this.options.typeaheadConfigs)?l.a.getSearchSources(this.options.typeaheadConfigs):l.a.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?o.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return o.isObject(this.options.actionOptions)?o.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){o.isObject(this.options.callbacks)&&(o.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",o.bind(this.options.callbacks.onRender,this)),o.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),o.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",o.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",o.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:h.a},this.options),{showRemove:this.shouldShowRemove(),svgRemove:s.a.getSvg(s.b.Close)})}},{key:"onRender",value:function(){this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),i.Validation.bind(this),this.toggleRemove()}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),i.Validation.unbind(this)}},{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return p.a}},{key:"className",get:function(){return"search-container ".concat(h.a.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.k.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"bindings",get:function(){var e,t,n,o="[name=".concat(this.options.inputName,"]");return e={},t=o,n={observe:this.options.stickItProperty,setOptions:{validate:!0}},t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}])&&m(t.prototype,n),c&&m(t,c),d}(r.a.Component)},1098:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var o=n(7),i=n(2),r=n(15),a=n(1099),s=n.n(a),l=n(1100),u=n.n(l),c=n(0),p=n(1076);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 h(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 d(e,t){return(d=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,o=g(e);if(t){var i=g(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 g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(l,e);var t,n,i,a=m(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,(n=[{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){var e=Object.assign(Object.assign({},this.options.goBackTab),{link:this.options.goBackTab.link.selector.replace(".","")});return{styles:s.a,backTab:e,backArrow:r.a.getSvg(r.b.ArrowLeft)}}},{key:"onSave",value:function(){o.Radio.channel(c.b.LIBRARY_EDITOR).trigger(c.a.LibraryEditor.SAVE_VIDEO)}},{key:"onRender",value:function(){this.showChildView("tabs",new p.a({tabs:this.options.tabs,activeTab:this.options.activeTab}))}},{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"template",get:function(){return u.a}},{key:"appLinks",get:function(){var e,t,n,o=this.options.goBackTab.link;return e={},t=o.selector,n=o.appLink,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}])&&h(t.prototype,n),i&&h(t,i),l}(i.a.Component)},1099:function(e,t,n){e.exports={svgContainer:"_27gR6"}},1100:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression;return'<div class="row">\r\n <h4>\r\n <a class="d-inline-flex align-items-center '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.link:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.link:r,t))+'">\r\n <span class="'+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block mx-2">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.backArrow:r,t))?r:"")+"</span>\r\n "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.name:r,t))+'\r\n </a>\r\n </h4>\r\n</div>\r\n<div class="tabs-region pl-2"></div>'},useData:!0})},1112:function(e,t,n){"use strict";var o=n(2),i=n(1123),r=n.n(i),a=n(7),s=n(15),l=n(1124),u=n.n(l),c=n(1125),p=n.n(c),f=n(1028),h=n(13),d=n(0),m=n(4),y=n(42),g=n(3);function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(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 k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(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=S(e);if(t){var i=S(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return C(this,n)}}function C(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(r,e);var t,n,o,i=w(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"onClickEdit",value:function(){var e=y.a.mergeOptions(this.options.analyticsOptions,{actionType:m.q.Edit,entity:m.e.Resource,workflowPhase:m.r.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};y.a.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new h.d({title:g.a.getPhrase(this.lang,"removeHeading"),text:g.a.getPhrase(this.lang,"removeBody",{resourceName:this.model.get("name")}),buttons:[{text:g.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:g.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){a.Radio.channel(e.options.channelName).trigger("delete:resource",e.model.get("id"))}))}},{key:"viewOptions",value:function(){var e=this.model.get("metadata"),t=e?e.type:"";return{editable:this.options.editable,styles:u.a,extension:f.a.mapTypeToExtension(t),svg:f.a.mapTypeToSvg(t),iconClass:f.a.mapTypeToClass(t),resourceType:f.a.mapTypeToName(t),editSvg:s.a.getSvg(s.b.Edit),trashSvg:s.a.getSvg(s.b.Delete)}}},{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return p.a}},{key:"className",get:function(){return"mb-2"}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"appLinks",get:function(){return{".edit":{application:d.b.LIBRARY_EDITOR,action:d.a.LibraryEditor.EDIT_RESOURCE,args:[this.options.videoId,this.model.get("id")]}}}}])&&v(t.prototype,n),o&&v(t,o),r}(o.a.Component);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 P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(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 x(e,t,n){return t&&R(e.prototype,t),n&&R(e,n),e}function T(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&&N(e,t)}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(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=j(e);if(t){var i=j(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return _(this,n)}}function _(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 j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"b",(function(){return D})),n.d(t,"a",(function(){return L}));var D=function(e){T(n,e);var t=I(n);function n(e){return P(this,n),t.call(this,e)}return x(n,[{key:"name",get:function(){return"VideoResourcesComponentCollection"}},{key:"className",get:function(){return"mt-3"}},{key:"childView",get:function(){return O}},{key:"childViewOptions",get:function(){return{editable:this.options.editable,videoId:this.options.videoId,channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions}}}]),n}(o.a.ComponentCollection),L=function(e){T(n,e);var t=I(n);function n(e){return P(this,n),t.call(this,e)}return x(n,[{key:"regions",value:function(){return{resources:{replaceElement:!0,el:".resource-list-region"}}}},{key:"renderResources",value:function(){var e=new D({collection:this.options.customCollection||this.model.resources,editable:this.options.editable||!1,videoId:this.options.videoId||this.model.get("id"),channelName:this.options.parentChannelName||this.channelName});this.showChildView("resources",e)}},{key:"viewOptions",value:function(){return{resourcesHeadingText:this.options.headerText||g.a.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}},{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return r.a}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}}]),n}(o.a.Component)},1123: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"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.resourcesHeadingText:r,t))+"</h5>\r\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n<div class="resource-list-region"></div>'},useData:!0})},1124:function(e,t,n){e.exports={svgContainer:"_uEVJ",actionSvg:"_1oLg0"}},1125: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.lambda,s=e.escapeExpression;return'<a class="float-right '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-muted delete">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+'</a>\r\n<a class="float-right '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-muted edit">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.editSvg:r,t))?r:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<span title="'+l(s(null!=(r=null!=t?t.options:t)?r.resourceType:r,t))+'" class="d-inline-block align-middle mr-2 '+l(s(null!=(r=null!=t?t.options:t)?r.iconClass:r,t))+" "+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\r\n<a href="'+l("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:c)?a.call(u,{name:"url",hash:{},data:i}):a)+"?name="+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:i}):a)+'" class="align-middle">\r\n '+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:i}):a)+"\r\n</a>\r\n"+(null!=(r=n.if.call(u,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},1130: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.lambda,s=e.escapeExpression;return'<a class="float-right '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-muted delete">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+'</a>\r\n<a class="float-right '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-muted edit">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.editSvg:r,t))?r:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<span class="d-inline-block align-middle mr-2 icon-blue '+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.linkSvg:r,t))?r:"")+'</span>\r\n<a href="'+l("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:c)?a.call(u,{name:"url",hash:{},data:i}):a)+'" target="_blank" class="align-middle info-link">\r\n '+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:i}):a)+"\r\n</a>\r\n"+(null!=(r=n.if.call(u,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},1131:function(e,t,n){e.exports={svgContainer:"_3T40U",actionSvg:"_3FRzz"}},1132: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"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headingText:r,t))+"</h5>\r\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n<div class="links-region"></div>'},useData:!0})},1136: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"autofocus"},5: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'<input\r\n name="'+s(a(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\r\n type="text"\r\n class="form-control '+(null!=(r=n.unless.call(l,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+" "+s(a(null!=(r=null!=t?t.options:t)?r.additionalClasses:r,t))+'"\r\n id="'+s(a(null!=(r=null!=t?t.options:t)?r.inputId:r,t))+'"\r\n autocomplete="off"\r\n placeholder="'+s(a(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'"\r\n '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.autofocus:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+"\r\n "+(null!=(r=n.unless.call(l,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n></input>\r\n<span class="svg-container mb-2 '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svg:r,t))+' remove" style="display: none;">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.svgRemove:r,t))?r:"")+"</span>"},useData:!0})},1137:function(e,t,n){e.exports={svg:"_1iL3O",typeaheadContainer:"_1SWXc",disabled:"_3C2O8"}},1138:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(2),i=n(244),r=n(13),a=n(3),s=n(158),l=n(185),u=n(1139),c=n.n(u),p=n(1140),f=n.n(p);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=b(e);if(t){var i=b(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"!==h(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 b(e){return(b=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&&m(e,t)}(h,e);var t,n,u,p=y(h);function h(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),p.call(this,e)}return t=h,(n=[{key:"initialize",value:function(){this.spinnerModel=new o.a.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,l.d.MergeChapters,this.onClickMergeChapters)}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(i.c.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==s.a.New&&this.model.get("status")!==s.a.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:a.a.getPhrase(this.lang,"mergeChapters"),subtitles:a.a.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:a.a.getPhrase(this.lang,"enabledCustomSubtitles")},t=new i.a({buttonText:e[this.options.type],extraButtonClass:"btn-primary ".concat(f.a.btn),model:this.spinnerModel,spinnerOptions:{size:r.r.Small,type:r.s.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:l.d.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:a.a.getPhrase(this.lang,"chaptersHeading"),line1:a.a.getPhrase(this.lang,"chaptersInfo1"),line2:a.a.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:a.a.getPhrase(this.lang,"subtitlesHeading"),line1:a.a.getPhrase(this.lang,"subtitlesInfo1"),line2:a.a.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:a.a.getPhrase(this.lang,"cvSubtitlesHeading"),line1:a.a.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:a.a.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&a.a.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(i.c.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===s.a.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return c.a}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}}])&&d(t.prototype,n),u&&d(t,u),h}(o.a.Component)},1139: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 null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.progress:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:""},2:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return' <span class="m-3 text-muted">'+a(e.lambda(null!=(r=null!=t?t.options:t)?r.progress:r,t))+'</span>\r\n <p class="pt-2">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\r\n"},4: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.failed:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:""},5:function(e,t,n,o,i){e.propertyIsEnumerable;return'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression;return"<h4>"+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.heading:r,t))+"</h4>\r\n<p>"+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line1:r,t))+"</p>\r\n<p>"+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line2:r,t))+'</p>\r\n<div class="btn-region"></div>\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.processing:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?r:"")},useData:!0})},1140:function(e,t,n){e.exports={btn:"_59zg9"}},1176:function(e,t,n){"use strict";var o=n(2),i=n(7),r=n(15),a=n(4),s=n(42),l=n(13),u=n(0),c=n(1130),p=n.n(c),f=n(1131),h=n.n(f),d=n(3);function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(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 g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(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=k(e);if(t){var i=k(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==m(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)}var 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&&g(e,t)}(f,e);var t,n,o,c=b(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),c.call(this,e)}return t=f,(n=[{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"onClickEdit",value:function(){var e=s.a.mergeOptions(this.options.analyticsOptions,{actionType:a.q.Edit,entity:a.e.Resource,workflowPhase:a.r.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};s.a.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new l.d({title:d.a.getPhrase(this.lang,"removeHeading"),text:d.a.getPhrase(this.lang,"removeConfirm",{name:l.v.escapeExpression(this.model.get("name"))}),buttons:[{text:d.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:d.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:l.k.generateUniqueChannelName(this)}).render().done((function(){i.Radio.channel(e.options.channelName).trigger("delete:link",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:h.a,editable:this.options.editable,linkSvg:r.a.getSvg(r.b.Link),editSvg:r.a.getSvg(r.b.Edit),trashSvg:r.a.getSvg(r.b.Delete)}}},{key:"name",get:function(){return"LinkItemComponent"}},{key:"template",get:function(){return p.a}},{key:"className",get:function(){return"mb-2"}},{key:"lang",get:function(){return"libraryEditor.editLinks"}},{key:"appLinks",get:function(){return{".edit":{application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.EDIT_LINK,args:[this.options.videoId,this.model.get("id")]}}}}])&&y(t.prototype,n),o&&y(t,o),f}(o.a.Component),C=n(1132),S=n.n(C);function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 R(e,t,n){return t&&P(e.prototype,t),n&&P(e,n),e}function x(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&&T(e,t)}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=_(e);if(t){var i=_(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return I(this,n)}}function I(e,t){return!t||"object"!==O(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)}n.d(t,"a",(function(){return j}));var j=function(e){x(n,e);var t=N(n);function n(e){return E(this,n),t.call(this,e)}return R(n,[{key:"regions",value:function(){return{links:{el:".links-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return this.options}},{key:"onRender",value:function(){this.showChildView("links",new D({collection:this.options.customCollection||this.model.get("links"),channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions,editable:this.options.editable,videoId:this.options.videoId,headingText:this.options.headingText,emptyStateText:this.options.emptyStateText}))}},{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return S.a}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}}]),n}(o.a.Component),D=function(e){x(n,e);var t=N(n);function n(e){return E(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return w}}]),n}(o.a.ComponentCollection)},1265:function(e,t,n){e.exports={fileDrop:"l2vGK",dropMask:"yNe5b",dragOver:"_3sZ1T"}},1266:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=e.escapeExpression;return'<div class="'+s("function"==typeof(a=null!=(a=n.dropMask||(null!=t?t.dropMask:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"dropMask",hash:{},data:i}):a)+'">\r\n <h3>'+s(e.lambda(null!=(r=null!=t?t.options:t)?r.fileDropText:r,t))+"</h3>\r\n</div>"},useData:!0})},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'<p class="alert alert-warning col-8 mb-0">'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.limitText:r,t))+"</p>\r\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<div class="file-drop '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.fileDrop:r,t))+" p-2"+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <button class="browse btn btn-secondary mr-2">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"browse",{name:"lang",hash:{},data:i}))+'</button>\r\n <span class="text-muted align-middle">'+s(a(null!=(r=null!=t?t.options:t)?r.alternateText:r,t))+"</span>\r\n</div>\r\n"},4:function(e,t,n,o,i){return" col-6 "},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression;return"<h5>"+s(a(null!=(r=null!=t?t.options:t)?r.title:r,t))+"</h5>\r\n<p>"+s(a(null!=(r=null!=t?t.options:t)?r.description:r,t))+"</p>\r\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},1268: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.lambda;return'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' float-right text-success">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.tickSvg:r,t))?r:"")+"</span>\r\n"},3:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' close float-right">&times;</span>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<span class="d-inline-block align-middle mr-2 '+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\r\n<span class="align-middle">\r\n '+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:i}):a)+"\r\n</span>\r\n"+(null!=(r=n.if.call(u,null!=(r=null!=t?t.options:t)?r.finished:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")+'\r\n<div class="progress my-2 '+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.progress:r,t))+' mt-2">\r\n <div class="progress-bar bg-info" style="width: '+l("function"==typeof(a=null!=(a=n.progress||(null!=t?t.progress:t))?a:c)?a.call(u,{name:"progress",hash:{},data:i}):a)+'%" aria-valuenow="'+l("function"==typeof(a=null!=(a=n.progress||(null!=t?t.progress:t))?a:c)?a.call(u,{name:"progress",hash:{},data:i}):a)+'" aria-valuemin="0" aria-valuemax="100"></div>\r\n</div>'},useData:!0})},1269:function(e,t,n){e.exports={svgContainer:"_3LHs_",progress:"_30D9s"}},1270:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;return'<form>\r\n <div class="form-group">\r\n <label for="language">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+'</label>\r\n <div class="typahead-region"></div>\r\n </div>\r\n</form>'},useData:!0})},1271: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.lambda,s=e.escapeExpression;return'<a class="float-right '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-muted delete">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<span class="d-inline-block align-middle mr-2 '+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\r\n<a href="'+l("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:e.hooks.helperMissing)?a.call(u,{name:"url",hash:{},data:i}):a)+"?name="+l(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+'" class="align-middle">\r\n '+l(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+"\r\n</a>\r\n"+(null!=(r=n.unless.call(u,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},1272:function(e,t,n){e.exports={svgContainer:"_1VUhp",actionSvg:"_3cODR"}},1273: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!=t?t.options:t)?r.emptyStateText:r,t))},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\r\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n<div class="subtitles-list-region"></div>'},useData:!0})},1274: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'<p class="alert alert-warning col-8">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"limit",{name:"lang",hash:{limit:null!=(r=null!=t?t.options:t)?r.limit:r},data:i}))+"</p>\r\n"},3: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,"subheading",{name:"lang",hash:{},data:i}))+'</p>\r\n<div class="form-group mb-1">\r\n <label for="url">'+s((n.lang||t&&t.lang||a).call(r,"urlLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n <input name="url" id="url" class="form-control" type="text" placeholder="'+s((n.lang||t&&t.lang||a).call(r,"urlPlaceholder",{name:"lang",hash:{},data:i}))+'">\r\n <div class="form-feedback"></div>\r\n</div>\r\n<div class="form-group mb-1" id="name-container" style="display: none;">\r\n <input type="text" class="form-control" name="name" placeholder="'+s((n.lang||t&&t.lang||a).call(r,"namePlaceholder",{name:"lang",hash:{},data:i}))+'">\r\n <div class="form-feedback"></div>\r\n</div>\r\n<div class="attach-btn-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return'<h5 class="pt-2">Resource Links</h5>\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.hide:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},1275:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"col-5 py-3"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return'<div class="tab-region"></div>\r\n\r\n<div class="row pb-2">\r\n <div class="'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickview-subtitles-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="subtitles-upload-region"></div>\r\n <div class="subtitles-upload-list-region p-0 col-8"></div>\r\n <div class="customer-subtitles-list-region p-0 col-8"></div>\r\n </div>\r\n</div>\r\n\r\n<div class="row border-top pt-1">\r\n <div class="'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickview-resources-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="resources-upload-region"></div>\r\n <div class="resources-upload-list-region p-0 col-8"></div>\r\n <div class="customer-resources-list-region p-0 col-8"></div>\r\n </div>\r\n</div>\r\n\r\n<div class="row border-top pt-3">\r\n <div class="'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickview-link-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="add-links-region mb-2"></div>\r\n <div class="customer-link-list-region p-0 col-8"></div>\r\n </div>\r\n</div>'},useData:!0})},1445:function(e,t,n){"use strict";n.r(t);var o=n(1),i=n(7),r=n(2),a=n(5),s=n(3),l=n(12),u=n(111),c=n(296),p=n(43),f=n(178),h=n(0),d=n(13),m=n(174),y=n(6),g=n(281),b=n(135),v=n(193),k=n(192),w=n(1265),C=n.n(w),S=n(1266),O=n.n(S),E=n(1267),P=n.n(E);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 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 T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=_(e);if(t){var i=_(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return I(this,n)}}function I(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 _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T(e,t)}(r,e);var t,n,o,i=N(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"events",value:function(){var e,t,n,o="dragleave .".concat(C.a.dropMask);return n="onDragLeave",(t=o)in(e={"drop .file-drop":"onDrop","dragover .file-drop":"onDragOver"})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"onDrop",value:function(){this.$el.removeClass(C.a.dragOver)}},{key:"onDragOver",value:function(e){this.$el.addClass(C.a.dragOver),e.preventDefault()}},{key:"onDragLeave",value:function(){this.$el.removeClass(C.a.dragOver)}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({},this.options),{styles:C.a,limitText:this.options.limitText,isClickViewContent:this.options.isClickViewContent})}},{key:"onRender",value:function(){this.getUI("dropArea").append(O()({dropMask:C.a.dropMask,fileDropText:s.a.getPhrase(this.lang,"drop")}))}},{key:"name",get:function(){return"FileSelectComponent"}},{key:"template",get:function(){return P.a}},{key:"lang",get:function(){return"libraryEditor.fileSelect"}},{key:"className",get:function(){var e="mt-3";return this.options.limitText||(e+=" mb-2"),e}},{key:"elements",get:function(){return{dropArea:".file-drop"}}},{key:"defaults",get:function(){return{acceptMultiple:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:v.a,buttonSelector:".browse",channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple,mimeType:this.options.mimeType},{behaviorClass:k.a,channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple}]}}])&&x(t.prototype,n),o&&x(t,o),r}(r.a.Component),D=n(1112),L=n(1138),V=n(15),U=n(1268),A=n.n(U),F=n(1269),M=n.n(F);function q(e){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(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 H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return 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 J(this,n)}}function J(e,t){return!t||"object"!==q(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 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&&H(e,t)}(a,e);var t,n,o,r=z(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"events",value:function(){return{"click .cancel-upload":"onClickCancelUpload"}}},{key:"onClickCancelUpload",value:function(){i.Radio.channel(this.options.channelName).trigger("cancel:upload",this.model.get("id"))}},{key:"viewOptions",value:function(){return{styles:M.a,svg:V.a.getSvg(V.b.Folder),tickSvg:V.a.getSvg(V.b.Check),finished:this.model.get("progress")>=100}}},{key:"name",get:function(){return"FileUploadComponent"}},{key:"template",get:function(){return A.a}}])&&B(t.prototype,n),o&&B(t,o),a}(r.a.Component);function Z(e){return(Z="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 G(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(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=ee(e);if(t){var i=ee(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Q(this,n)}}function Q(e,t){return!t||"object"!==Z(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 ee(e){return(ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var te=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&X(e,t)}(r,e);var t,n,o,i=K(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"name",get:function(){return"FileUploadsComponentCollection"}},{key:"childView",get:function(){return W}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName}}}])&&G(t.prototype,n),o&&G(t,o),r}(r.a.ComponentCollection),ne=n(30),oe=n(1086),ie=n(131),re={handleQuery:function(e,t){return function(e,t,n){var i=[];if(e){var r=CVLanguages.getEnglishNameContains(e);return o.each(r,(function(e,t){i.push({key:t,name:e.englishName})})),t(i)}t()}},getTypeaheadConfig:function(){return function(e,t){return{name:"languages",source:re.handleQuery(),limit:5,display:function(e){return e.name},templates:{suggestion:ie.d,pending:ie.b,notFound:ie.c}}}}},ae=n(1270),se=n.n(ae);function le(e){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ue(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 ce(e,t){return(ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pe(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=he(e);if(t){var i=he(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return fe(this,n)}}function fe(e,t){return!t||"object"!==le(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 he(e){return(he=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var de=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&&ce(e,t)}(r,e);var t,n,o,i=pe(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"initialize",value:function(e){this.model=ne.a.get("subtitle:language",e.defaultLanguage),this.model.addValidation(d.t),this.listenTo(this.channelName,"select:language",this.onLanguageSelected)}},{key:"events",value:function(){return{"click .submit":"onClickSubmit",submit:"onClickSubmit"}}},{key:"regions",value:function(){return{typeahead:".typahead-region"}}},{key:"getTypeaheadConfigs",value:function(){return[{name:"languages",typeaheadConfig:re.getTypeaheadConfig()}]}},{key:"renderTypeahead",value:function(){this.showChildView("typeahead",new oe.a({model:this.model,parentChannelName:this.channelName,inputId:"language",selectEvent:"select:language",typeaheadConfigs:this.getTypeaheadConfigs()}))}},{key:"onLanguageSelected",value:function(e){this.model.set("code",e.key)}},{key:"onClickSubmit",value:function(){this.model.validate(),this.model.isValid()&&(this.options.promise.resolve(this.model.toJSON()),this.triggerMethod("hide"))}},{key:"onBeforeDestroy",value:function(){"pending"===this.options.promise.state()&&this.options.promise.reject()}},{key:"onRender",value:function(){this.renderTypeahead()}},{key:"template",get:function(){return se.a}},{key:"name",get:function(){return"LanguageSelectComponent"}},{key:"lang",get:function(){return"libraryEditor.languageSelect"}},{key:"behaviors",get:function(){return[{behaviorClass:g.f,title:s.a.getPhrase(this.lang,"heading"),buttons:[{text:s.a.getPhrase(this.lang,"submit"),type:"submit",className:"btn btn-primary submit"}]},{behaviorClass:g.a}]}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}}])&&ue(t.prototype,n),o&&ue(t,o),r}(r.a.Component),me=n(1098),ye=n(1028),ge=n(1271),be=n.n(ge),ve=n(1272),ke=n.n(ve);function we(e){return(we="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 Ce(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 Se(e,t){return(Se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Oe(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=Pe(e);if(t){var i=Pe(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Ee(this,n)}}function Ee(e,t){return!t||"object"!==we(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 Pe(e){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Re=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&&Se(e,t)}(a,e);var t,n,o,r=Oe(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"events",value:function(){return{"click .delete":"onClickDelete"}}},{key:"getEnglishName",value:function(){var e,t,n=this.model.get("language");return t=this.model.collection.filter((function(e){return e.get("language")!==n})).length>0?CVLanguages.getFullEnglishName(n):CVLanguages.getEnglishName(n),(null===(e=this.model.get("metadata"))||void 0===e?void 0:e.autoGenerated)?s.a.getPhrase(this.lang,"autoGenerated",{name:t}):t}},{key:"onClickDelete",value:function(){var e=this;this.options.isClickViewContent||new d.d({title:s.a.getPhrase(this.lang,"removeHeading"),text:s.a.getPhrase(this.lang,"removeBody",{language:this.getEnglishName()}),buttons:[{text:s.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:s.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){i.Radio.channel(e.options.channelName).trigger("delete:subtitle",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:ke.a,svg:ye.a.mapTypeToSvg("subtitle"),trashSvg:V.a.getSvg(V.b.Delete),name:this.getEnglishName(),isClickViewContent:this.options.isClickViewContent}}},{key:"name",get:function(){return"SubtitleItemComponent"}},{key:"template",get:function(){return be.a}},{key:"lang",get:function(){return"libraryEditor.videoSubtitles"}},{key:"className",get:function(){return"mb-2"}}])&&Ce(t.prototype,n),o&&Ce(t,o),a}(r.a.Component),xe=n(1273),Te=n.n(xe);function Ne(e){return(Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function je(e,t,n){return t&&_e(e.prototype,t),n&&_e(e,n),e}function De(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&&Le(e,t)}function Le(e,t){return(Le=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ve(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=Ae(e);if(t){var i=Ae(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Ue(this,n)}}function Ue(e,t){return!t||"object"!==Ne(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 Ae(e){return(Ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fe=function(e){De(n,e);var t=Ve(n);function n(e){return Ie(this,n),t.call(this,e)}return je(n,[{key:"regions",value:function(){return{subtitles:{el:".subtitles-list-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{headerText:this.options.headerText,emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.showChildView("subtitles",new Me({collection:this.collection,channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}))}},{key:"name",get:function(){return"VideoSubtitlesComponent"}},{key:"template",get:function(){return Te.a}}]),n}(r.a.Component),Me=function(e){De(n,e);var t=Ve(n);function n(e){return Ie(this,n),t.call(this,e)}return je(n,[{key:"name",get:function(){return"VideoSubtitlesComponentCollection"}},{key:"childView",get:function(){return Re}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}}}]),n}(r.a.ComponentCollection),qe=n(244),Be=n(1023),He=n(1274),ze=n.n(He);function Je(e){return(Je="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 Ye(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function We(e,t){return(We=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ge(e);if(t){var i=Ge(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return $e(this,n)}}function $e(e,t){return!t||"object"!==Je(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 Ge(e){return(Ge=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xe=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&&We(e,t)}(a,e);var t,n,o,r=Ze(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=r.call(this,e)).showNameField=!1,t.disableBtn=!0,t}return t=a,(n=[{key:"initialize",value:function(){this.model=ne.a.get(this.viewModelName),this.model.addValidation(Be.d),this.bindListeners()}},{key:"regions",value:function(){return{attachBtn:".attach-btn-region"}}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change:url",this.onChangeUrl),this.listenTo(this.model,"change:name",this.onChangeName),this.listenTo(this.options.channelName,"attach:link",this.onClickAttach)}},{key:"onChangeUrl",value:function(){this.showNameField&&!this.model.isValid("url")?(this.getUI("nameField").hide(),this.model.set("name",""),this.showNameField=!1):!this.showNameField&&this.model.isValid("url")&&(this.getUI("nameField").show(),this.showNameField=!0)}},{key:"onChangeName",value:function(){this.model.validate("name"),this.disableBtn=!this.model.isValid(),this.renderAttachButton()}},{key:"onClickAttach",value:function(){var e=this.model.toJSON();this.model.clear(),i.Radio.channel(this.options.channelName).trigger("add:link",e),this.render()}},{key:"renderAttachButton",value:function(){this.options.hide||this.showChildView("attachBtn",new qe.a({saveEvent:"attach:link",channelName:this.options.channelName,buttonText:s.a.getPhrase(this.lang,"attach"),extraButtonClass:"btn-secondary attach",disabled:this.disableBtn,buttonType:"submit",spinnerOptions:{size:d.r.Medium,type:d.s.Light,extraClasses:"mx-auto"}}))}},{key:"viewOptions",value:function(){return{limit:this.options.limit,hide:this.options.hide}}},{key:"onRender",value:function(){this.renderAttachButton(),this.stickit(),i.Validation.bind(this)}},{key:"onClose",value:function(){this.unstickit(),i.Validation.unbind(this)}},{key:"name",get:function(){return"AddLinksComponent"}},{key:"template",get:function(){return ze.a}},{key:"lang",get:function(){return"libraryEditor.addLinks"}},{key:"tagName",get:function(){return"form"}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"behaviors",get:function(){return[{behaviorClass:g.g},{behaviorClass:g.a}]}},{key:"elements",get:function(){return{nameField:"#name-container"}}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}}])&&Ye(t.prototype,n),o&&Ye(t,o),a}(r.a.Component),Ke=n(1176),Qe=n(191),et=n(185),tt=n(158),nt=n(4),ot=n(42),it=n(1275),rt=n.n(it);function at(e){return(at="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 st(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 lt(e,t){return(lt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ut(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=pt(e);if(t){var i=pt(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return ct(this,n)}}function ct(e,t){return!t||"object"!==at(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 pt(e){return(pt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"EditResourcesView",(function(){return ft}));var ft=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&&lt(e,t)}(w,e);var t,n,v,k=ut(w);function w(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,w),k.call(this,e)}return t=w,(n=[{key:"initialize",value:function(){this.initializeUploadServices(),this.bindDataListeners(),this.bindViewListeners(),this.bindFileSelectListeners(),d.u.initBackButton(),this.chapterDataService=a.a.getInstance(h.g.Chapter,this),this.videoDataService=a.a.getInstance(h.g.Video,this),this.linkDataService=a.a.getInstance(h.g.Link,this),this.resourceDataService=a.a.getInstance(h.g.Resource,this),this.subtitleDataService=a.a.getInstance(h.g.Subtitle,this),this.resourceUploads=[],this.resourceUploadCount=0}},{key:"initializeUploadServices",value:function(){this.resourceUploadService=new c.b,this.listenTo(h.w.RESOURCE_UPLOAD,p.a.UPLOAD_COMPLETE,this.onResourceUploadComplete),this.subtitleUploadService=new c.c,this.listenTo(h.w.SUBTITLE_UPLOAD,p.a.UPLOAD_COMPLETE,this.onSubtitleUploadComplete)}},{key:"bindDataListeners",value:function(){this.listenTo(h.e.VIDEO,"".concat(h.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(h.e.VIDEO,"".concat(h.f.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(h.e.VIDEO,"".concat(h.f.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(h.e.CHAPTER,"".concat(h.f.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError)}},{key:"bindViewListeners",value:function(){this.listenTo(this.channelName,"add:link",this.onAddLink),this.listenTo(this.channelName,"delete:subtitle",this.onDeleteSubtitle),this.listenTo(this.channelName,"delete:resource",this.onDeleteResource),this.listenTo(this.channelName,"delete:link",this.onDeleteLink),this.listenTo(this.channelName,"cancel:upload",this.onCancelUpload),this.listenTo(this.channelName,et.d.MergeChapters,this.onMergeChapters)}},{key:"bindFileSelectListeners",value:function(){this.listenTo(this.getSubtitleSelectChannelName(),p.a.FILES_SELECTED,this.onSubtitleFilesAdded),this.listenTo(this.getResourceSelectChannelName(),p.a.FILES_SELECTED,this.onResourceFilesAdded)}},{key:"getSubtitleSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"subtitles")}},{key:"getResourceSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"resources")}},{key:"onVideoDataError",value:function(e){switch(e.type){case u.a.NotFound:r.a.ErrorHelper.throw(new Qe.n);break;case u.a.Forbidden:r.a.ErrorHelper.throw(new Qe.f)}}},{key:"onConcatenateDataError",value:function(e){e.type===u.a.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"onSubtitleFilesAdded",value:function(e,t){e.length>5-this.model.subtitles.length?r.a.ErrorHelper.throw(new Qe.m(5)):(t&&(this.interactionType=t),this.subtitleUploadService.addFiles(e))}},{key:"onResourceFilesAdded",value:function(e,t){e.length>25-this.model.resources.length?r.a.ErrorHelper.throw(new Qe.l(25)):(this.resourceUploadCount+=e.length,t&&(this.interactionType=t),this.resourceUploadService.addFiles(e))}},{key:"onAddLink",value:function(e){var t=this;25!==this.model.links.length&&(this.model.links.length+1===25&&this.renderAddLinks(!0),this.linkDataService.addLink(this.model.get("id"),e,(function(e){t.model.links.add(e),t.render()})))}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:y.j.EditVideoTabs},subtitlesUpload:{el:".subtitles-upload-region",partialLoading:y.j.EditVideoUploadArea},subtitlesUploadList:".subtitles-upload-list-region",customerSubtitlesList:".customer-subtitles-list-region",clickViewSubtitlesList:".clickview-subtitles-list-region",resourcesUpload:{el:".resources-upload-region",partialLoading:y.j.EditVideoUploadArea},resourcesUploadList:".resources-upload-list-region",customerResourcesList:".customer-resources-list-region",clickViewResourcesList:".clickview-resources-list-region",addLinks:{el:".add-links-region",partialLoading:y.j.EditVideoUploadArea},customerLinkList:".customer-link-list-region",clickViewLinkList:".clickview-link-list-region"}}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[tt.a.SingleFile,tt.a.ConcatenationFailed];o.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==tt.a.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.videoDataService.hasPhysicalChapters(e.options.videoId,(function(t){e.hasPhysicalChapters=t,e.renderSubtitleFileSelect()}))}))}},{key:"onDeleteResource",value:function(e){var t=this;this.resourceDataService.deleteResource(this.options.videoId,e,(function(){t.logDeleteAction(nt.e.Resource,e),t.render()}))}},{key:"onDeleteSubtitle",value:function(e){var t=this;this.subtitleDataService.deleteSubtitle(this.options.videoId,e,(function(){t.logDeleteAction(nt.e.Subtitle,e),t.render()}))}},{key:"onDeleteLink",value:function(e){var t=this;this.linkDataService.deleteLink(this.options.videoId,e,(function(){t.logDeleteAction(nt.e.Link,e),t.render()}))}},{key:"onCancelUpload",value:function(e){this.resourceUploadService.cancelUpload(e),this.subtitleUploadService.cancelUpload(e)}},{key:"onResourceUploadComplete",value:function(e){var t=this,n=e.toJSON(),o={fileId:n.fileInfo.id,uploadId:n.file.cvUpload.uploadId,name:n.fileInfo.name,type:f.a.getResourceType(n.fileInfo.extension),extension:n.fileInfo.extension,fileSize:n.fileInfo.size,fileUrl:n.fileInfo.url,ingestUrl:n.file.cvUpload.ingestUrl,metaData:{type:f.a.getResourceType(n.fileInfo.extension)},contribution:!1,url:n.fileInfo.url,fileIdType:2};this.resourceUploads.push(o),this.resourceUploadCount--,this.resourceUploadCount>0||(this.resourceDataService.addResource(this.options.videoId,this.resourceUploads,(function(e){t.model.resources.add(e);var n=t.resourceUploadService.getCollection().filter((function(t){return t.get("fileInfo").id===e.get("fileId")}));t.resourceUploadService.getCollection().remove(n),t.logUploadAction(e),t.render()})),this.resourceUploads=[])}},{key:"onSubtitleUploadComplete",value:function(e){var t=this,n=$.Deferred(),o=new de({defaultLanguage:{code:"en",name:"English"},promise:n});n.done((function(n){var o=e.toJSON(),i={fileId:o.fileInfo.id,name:n.name,language:n.code,type:f.a.getResourceType(o.fileInfo.extension),fileIdType:2};t.subtitleDataService.addSubtitle(t.options.videoId,i,(function(n){t.model.subtitles.add(n),t.subtitleUploadService.getCollection().remove(e),t.logUploadAction(n),t.render()}))})).fail((function(){t.subtitleUploadService.cancelUpload(e.get("id"))})),i.Radio.channel(l.a.POPUP).trigger(r.a.EventNames.SHOW_POPUP,o)}},{key:"logUploadAction",value:function(e){var t=e instanceof m.a?nt.e.Resource:nt.e.Subtitle,n=ot.a.mapInteractionType(this.interactionType),o={location:nt.k.EditVideoResources,actionType:nt.q.Upload,entity:t,descriptor:n};ot.a.logUserAction(e,o)}},{key:"logDeleteAction",value:function(e,t){var n={location:nt.k.EditVideoResources,actionType:nt.q.Delete,entity:e},o={id:t,parentId:+this.options.videoId};ot.a.logUserAction(o,n)}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"renderTabs",value:function(){var e=!d.j.canEditVideo(this.model);this.showChildView("tabs",new me.a({tabs:d.u.getEditVideoTabs(this.options.videoId,{hideChaptersTab:e}),activeTab:".edit-resources-subtitles-applink",goBackTab:d.u.getBackButton(this.options.videoId)}))}},{key:"renderSubtitleFileSelect",value:function(){if(this.hasPhysicalChapters.get("value"))this.renderConcatenationRequest();else{var e=s.a.getPhrase(this.lang,"subtitlesLimit",{limit:5});this.showChildView("subtitlesUpload",new j({title:this.isClickViewContent?s.a.getPhrase(this.lang,"customerSubtitles"):s.a.getPhrase(this.lang,"subtitles"),description:s.a.getPhrase(this.lang,"subtitlesInfo"),alternateText:s.a.getPhrase(this.lang,"subtitlesAlternative"),mimeType:f.b.SUBTITLES,channelName:this.getSubtitleSelectChannelName(),acceptMultiple:!1,limitText:this.model.subtitles.length>=5?e:null,isClickViewContent:this.isClickViewContent}))}}},{key:"renderSubtitleUploadList",value:function(){var e=this.subtitleUploadService.getCollection();this.showChildView("subtitlesUploadList",new te({collection:e,channelName:this.channelName}))}},{key:"renderSubtitlesLists",value:function(){this.renderClickViewSubtitlesList(),this.renderCustomerSubtitlesList()}},{key:"renderClickViewSubtitlesList",value:function(){if(this.isClickViewContent){var e=d.j.filterObjectsByOwnerType(this.model.subtitles,tt.b.ClickView);this.showChildView("clickViewSubtitlesList",new Fe({collection:e,channelName:this.channelName,isClickViewContent:!0,headerText:s.a.getPhrase(this.lang,"clickViewSubtitles"),emptyStateText:e.models.length?"":s.a.getPhrase(this.lang,"clickViewSubtitlesEmpty")}))}}},{key:"renderCustomerSubtitlesList",value:function(){this.showChildView("customerSubtitlesList",new Fe({collection:d.j.filterObjectsByOwnerType(this.model.subtitles,tt.b.Customer,this.currentUser.get("customerId")),channelName:this.channelName}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("subtitlesUpload",new L.a({type:this.isClickViewContent?"clickViewSubtitles":"subtitles",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderResourcesFileSelect",value:function(){var e=s.a.getPhrase(this.lang,"resourcesLimit",{limit:25});this.showChildView("resourcesUpload",new j({title:this.isClickViewContent?s.a.getPhrase(this.lang,"customerResources"):s.a.getPhrase(this.lang,"resources"),description:s.a.getPhrase(this.lang,"resourcesDescription"),alternateText:s.a.getPhrase(this.lang,"resourcesAlternative"),mimeType:f.b.RESOURCES,channelName:this.getResourceSelectChannelName(),limitText:this.model.resources.length>=25?e:null,isClickViewContent:this.isClickViewContent}))}},{key:"renderResourcesUploadList",value:function(){var e=this.resourceUploadService.getCollection();this.showChildView("resourcesUploadList",new te({collection:e,channelName:this.channelName}))}},{key:"renderResourcesLists",value:function(){this.renderClickViewResourcesList(),this.renderCustomerResourcesList()}},{key:"renderClickViewResourcesList",value:function(){if(this.isClickViewContent){var e=d.j.filterObjectsByOwnerType(this.model.resources,tt.b.ClickView);this.showChildView("clickViewResourcesList",new D.a({model:this.model,customCollection:e,editable:!1,videoId:this.options.videoId,parentChannelName:this.channelName,headerText:s.a.getPhrase(this.lang,"clickViewResources"),emptyStateText:e.models.length?"":s.a.getPhrase(this.lang,"clickViewResourcesEmpty"),analyticsOptions:{location:nt.k.EditVideoResources}}))}}},{key:"renderCustomerResourcesList",value:function(){this.showChildView("customerResourcesList",new D.b({collection:d.j.filterObjectsByOwnerType(this.model.resources,tt.b.Customer,this.currentUser.get("customerId")),editable:!0,videoId:this.options.videoId,channelName:this.channelName,analyticsOptions:{location:nt.k.EditVideoResources}}))}},{key:"renderAddLinks",value:function(e){this.showChildView("addLinks",new Xe({collection:this.model.get("links"),channelName:this.channelName,hide:e||25===this.model.get("links").length,limit:25}))}},{key:"renderLinkLists",value:function(){var e={channelName:this.channelName,analyticsOptions:{location:nt.k.EditVideoResources},videoId:this.options.videoId};this.renderClickViewLinkList(e),this.renderCustomerLinkList(e)}},{key:"renderClickViewLinkList",value:function(e){if(this.isClickViewContent){var t=d.j.filterObjectsByOwnerType(this.model.links,tt.b.ClickView);this.showChildView("clickViewLinkList",new Ke.a(Object.assign(Object.assign({},e),{headingText:"Resource Links by ClickView",emptyStateText:t.models.length?"":"There are no ClickView links for this video",customCollection:t,editable:!1})))}}},{key:"renderCustomerLinkList",value:function(e){this.showChildView("customerLinkList",new Ke.a(Object.assign(Object.assign({},e),{customCollection:d.j.filterObjectsByOwnerType(this.model.links,tt.b.Customer,this.currentUser.get("customerId")),editable:!0})))}},{key:"fetchData",value:function(){var e=this;this.model=this.videoDataService.getVideo(this.options.videoId),this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.isClickViewContent=this.model&&!d.j.canEditVideo(this.model),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"viewOptions",value:function(){return{isClickViewContent:this.isClickViewContent}}},{key:"onRender",value:function(){this.renderTabs(),this.renderSubtitleFileSelect(),this.renderSubtitleUploadList(),this.renderSubtitlesLists(),this.renderResourcesFileSelect(),this.renderResourcesUploadList(),this.renderResourcesLists(),this.renderAddLinks(),this.renderLinkLists(),this.startPollingConcatenation()}},{key:"onDestroy",value:function(){this.subtitleUploadService.destroy(),this.resourceUploadService.destroy()}},{key:"name",get:function(){return"EditResourcesView"}},{key:"lang",get:function(){return"libraryEditor.editResources"}},{key:"title",get:function(){return this.model&&this.model.get("name")||"Edit Resources"}},{key:"template",get:function(){return rt.a}},{key:"props",get:function(){return["videoDataService"]}},{key:"className",get:function(){return"bg-white p-3"}},{key:"channelName",get:function(){return d.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:g.e}]}},{key:"requiredResources",get:function(){return{currentUser:b.b.currentUser}}}])&&st(t.prototype,n),v&&st(t,v),w}(r.a.View)}}]);