@clickview/library-editor 1.57.0 → 1.58.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/{152-library-editor-01b4461ff1.chunk.css → 463-library-editor-911bfc41fe.chunk.css} +1 -1
  3. package/dist/css/{5524-library-editor-de77327cdc.chunk.css → 4719-library-editor-7e2ac516b4.chunk.css} +1 -1
  4. package/dist/css/{61-library-editor-b5c939f10f.chunk.css → 4796-library-editor-2a18ebe0b9.chunk.css} +4 -4
  5. package/dist/css/{4001-library-editor-da87291909.chunk.css → 5319-library-editor-fe54adac16.chunk.css} +2 -2
  6. package/dist/css/library-editor-app-380eaa3fce.css +62 -0
  7. package/dist/scripts/{1010-f1c8bca022.chunk.js → 1010-a34c5ba546.chunk.js} +1 -1
  8. package/dist/scripts/1015-fde8b5ba1e.chunk.js +2 -0
  9. package/dist/scripts/1015-fde8b5ba1e.chunk.js.LICENSE.txt +41 -0
  10. package/dist/scripts/{7408-c1551d3e0d.chunk.js → 1080-78e6c18aa7.chunk.js} +1 -1
  11. package/dist/scripts/1115-c6cc1353bd.chunk.js +1 -0
  12. package/dist/scripts/1200-193f4b5bbd.chunk.js +1 -0
  13. package/dist/scripts/1524-1e4a0330df.chunk.js +1 -0
  14. package/dist/scripts/{1934-562cd9f48b.chunk.js → 1934-84460445ad.chunk.js} +1 -1
  15. package/dist/scripts/1973-47ac2859c2.chunk.js +1 -0
  16. package/dist/scripts/{2998-aae0ec14de.chunk.js → 2035-d874bdac26.chunk.js} +1 -1
  17. package/dist/scripts/2539-915297f0b5.chunk.js +1 -0
  18. package/dist/scripts/2591-fba291a9c0.chunk.js +1 -0
  19. package/dist/scripts/2598-225a27335b.chunk.js +1 -0
  20. package/dist/scripts/2614-aed18ce4af.chunk.js +1 -0
  21. package/dist/scripts/2648-3893c6b865.chunk.js +1 -0
  22. package/dist/scripts/{2803-fbb9d2439d.chunk.js → 2803-7a2cdecd93.chunk.js} +1 -1
  23. package/dist/scripts/{2888-c2c8b859cd.chunk.js → 2888-3298161a61.chunk.js} +1 -1
  24. package/dist/scripts/299-df09594cf4.chunk.js +1 -0
  25. package/dist/scripts/3288-ab3ca0da7f.chunk.js +1 -0
  26. package/dist/scripts/3305-b4175d4211.chunk.js +1 -0
  27. package/dist/scripts/3373-3286d26d40.chunk.js +1 -0
  28. package/dist/scripts/{5286-c574f5b574.chunk.js → 3391-469c93ab2c.chunk.js} +1 -1
  29. package/dist/scripts/{3400-ebc91cde7a.chunk.js → 3400-7a082a0377.chunk.js} +1 -1
  30. package/dist/scripts/3450-ad966a93e7.chunk.js +1 -0
  31. package/dist/scripts/{1832-52444b0088.chunk.js → 3475-d6fd75feeb.chunk.js} +1 -1
  32. package/dist/scripts/{3639-c5cc04c72d.chunk.js → 3639-631906e5be.chunk.js} +1 -1
  33. package/dist/scripts/3643-a191b71123.chunk.js +1 -0
  34. package/dist/scripts/{3763-47619f0e54.chunk.js → 3763-7ae73d91fa.chunk.js} +1 -1
  35. package/dist/scripts/3873-42f43a345f.chunk.js +1 -0
  36. package/dist/scripts/4027-fd3b5a0220.chunk.js +1 -0
  37. package/dist/scripts/416-4e7988439a.chunk.js +1 -0
  38. package/dist/scripts/{4201-ffd35af9cb.chunk.js → 4201-8856b389f1.chunk.js} +1 -1
  39. package/dist/scripts/4245-bcb3d8e3e4.chunk.js +1 -0
  40. package/dist/scripts/{4860-6001ab4e2a.chunk.js → 4327-b8cd9a74f9.chunk.js} +1 -1
  41. package/dist/scripts/{6732-85afd02f41.chunk.js → 4567-3ca6ef4308.chunk.js} +1 -1
  42. package/dist/scripts/{4591-78600e384c.chunk.js → 4591-9ea0b32ac6.chunk.js} +1 -1
  43. package/dist/scripts/463-f5f80e35df.chunk.js +2 -0
  44. package/dist/scripts/4719-8c6ca32259.chunk.js +1 -0
  45. package/dist/scripts/4796-284cbfa43b.chunk.js +2 -0
  46. package/dist/scripts/4851-5877fa3e54.chunk.js +1 -0
  47. package/dist/scripts/{5173-f2d72d7c3e.chunk.js → 5173-9338a14ee3.chunk.js} +1 -1
  48. package/dist/scripts/{8906-2ae58fb990.chunk.js → 5180-37c1d4f9bd.chunk.js} +1 -1
  49. package/dist/scripts/5182-0c4b67f64d.chunk.js +2 -0
  50. package/dist/scripts/5193-e559c4c41a.chunk.js +1 -0
  51. package/dist/scripts/5319-4f146e8e39.chunk.js +2 -0
  52. package/dist/scripts/{259-ef5133c0fd.chunk.js → 5327-9b16f6b411.chunk.js} +1 -1
  53. package/dist/scripts/5346-6ecbb5b2b1.chunk.js +1 -0
  54. package/dist/scripts/{5412-e2505df3a4.chunk.js → 5412-bc03f5a901.chunk.js} +1 -1
  55. package/dist/scripts/{5418-f84d0ff359.chunk.js → 5418-a9d060f9d0.chunk.js} +1 -1
  56. package/dist/scripts/5424-fa6c668f42.chunk.js +1 -0
  57. package/dist/scripts/{546-2ee5c90feb.chunk.js → 546-36e1e11039.chunk.js} +1 -1
  58. package/dist/scripts/{7295-49780496e2.chunk.js → 5736-83fa0776d5.chunk.js} +1 -1
  59. package/dist/scripts/576-243c823838.chunk.js +1 -0
  60. package/dist/scripts/5814-5a46f1f264.chunk.js +1 -0
  61. package/dist/scripts/5972-d637eea712.chunk.js +1 -0
  62. package/dist/scripts/6239-92a0bebbeb.chunk.js +1 -0
  63. package/dist/scripts/6350-862d3edb93.chunk.js +1 -0
  64. package/dist/scripts/6439-8aac0bd92a.chunk.js +1 -0
  65. package/dist/scripts/{8762-be126e413d.chunk.js → 6450-a3ca4cdb2a.chunk.js} +1 -1
  66. package/dist/scripts/6467-db60883ef6.chunk.js +1 -0
  67. package/dist/scripts/{1086-7632f7b45b.chunk.js → 6587-eed4f0308b.chunk.js} +1 -1
  68. package/dist/scripts/{1409-ae672618b1.chunk.js → 6677-66b4b60478.chunk.js} +1 -1
  69. package/dist/scripts/6768-5f9040eac8.chunk.js +1 -0
  70. package/dist/scripts/{6774-a002ac7253.chunk.js → 6774-7ed47e1b8c.chunk.js} +1 -1
  71. package/dist/scripts/{6788-dc6b522995.chunk.js → 6788-d3b052f1a9.chunk.js} +1 -1
  72. package/dist/scripts/7071-4b42b6a81f.chunk.js +1 -0
  73. package/dist/scripts/7153-b8a8099148.chunk.js +1 -0
  74. package/dist/scripts/7182-9378cbae60.chunk.js +2 -0
  75. package/dist/scripts/7182-9378cbae60.chunk.js.LICENSE.txt +8 -0
  76. package/dist/scripts/{7190-2b40df1e89.chunk.js → 7190-35f785a3e3.chunk.js} +1 -1
  77. package/dist/scripts/{5747-7ca7ad6c1d.chunk.js → 7366-1132e85416.chunk.js} +1 -1
  78. package/dist/scripts/7384-29be02029c.chunk.js +1 -0
  79. package/dist/scripts/7416-4d6b9b9a5b.chunk.js +1 -0
  80. package/dist/scripts/7696-08e022c4b5.chunk.js +1 -0
  81. package/dist/scripts/775-2c991c9c6e.chunk.js +1 -0
  82. package/dist/scripts/777-1b328a0073.chunk.js +2 -0
  83. package/dist/scripts/8113-e17a857adc.chunk.js +1 -0
  84. package/dist/scripts/{9695-636ea0ef64.chunk.js → 8143-3c844e6f7b.chunk.js} +1 -1
  85. package/dist/scripts/{8362-267efdac61.chunk.js → 8362-a48a464bd6.chunk.js} +1 -1
  86. package/dist/scripts/8542-6f5077cb9a.chunk.js +1 -0
  87. package/dist/scripts/8591-047736d51e.chunk.js +1 -0
  88. package/dist/scripts/8757-9ff47570ba.chunk.js +2 -0
  89. package/dist/scripts/8757-9ff47570ba.chunk.js.LICENSE.txt +44 -0
  90. package/dist/scripts/{7376-e3bf3a94f9.chunk.js → 8797-2e772deab9.chunk.js} +1 -1
  91. package/dist/scripts/8862-0ce7a20f11.chunk.js +1 -0
  92. package/dist/scripts/{5707-b2b239ff4e.chunk.js → 8915-53b71a635d.chunk.js} +1 -1
  93. package/dist/scripts/{2692-1ddd87476e.chunk.js → 8989-258e7f8a87.chunk.js} +1 -1
  94. package/dist/scripts/9011-4862aa077d.chunk.js +1 -0
  95. package/dist/scripts/{6093-e19df1d1fa.chunk.js → 9037-7ce5f91571.chunk.js} +1 -1
  96. package/dist/scripts/9217-9c61b07e9e.chunk.js +1 -0
  97. package/dist/scripts/{9357-e71ea6a34d.chunk.js → 9357-64d247d840.chunk.js} +1 -1
  98. package/dist/scripts/{3551-d2ea1832c5.chunk.js → 95-bd02e086ac.chunk.js} +1 -1
  99. package/dist/scripts/{8726-2d0bc64637.chunk.js → 9620-3ba8334ebc.chunk.js} +1 -1
  100. package/dist/scripts/{5424-65be3c657c.chunk.js → 9734-37ab55da4e.chunk.js} +1 -1
  101. package/dist/scripts/9766-753d188467.chunk.js +2 -0
  102. package/dist/scripts/9766-753d188467.chunk.js.LICENSE.txt +6 -0
  103. package/dist/scripts/{9927-7a935c955d.chunk.js → 9825-965bc63629.chunk.js} +1 -1
  104. package/dist/scripts/9928-f43d6de0a3.chunk.js +1 -0
  105. package/dist/scripts/bundle-5438371664.min.js +2 -0
  106. package/dist/scripts/bundle-5438371664.min.js.LICENSE.txt +124 -0
  107. package/dist/scripts/{polyfills-5ce436cbbe.min.js → polyfills-4c06ebd0dd.min.js} +1 -1
  108. package/package.json +4 -5
  109. package/dist/css/library-editor-app-6b401b236c.css +0 -62
  110. package/dist/scripts/101-c2af2cc10c.chunk.js +0 -1
  111. package/dist/scripts/112-5209a9a2d0.chunk.js +0 -1
  112. package/dist/scripts/1216-83f6fbc7be.chunk.js +0 -1
  113. package/dist/scripts/1269-02d8d91784.chunk.js +0 -1
  114. package/dist/scripts/152-808e046b1f.chunk.js +0 -2
  115. package/dist/scripts/1703-0f9e8a489f.chunk.js +0 -1
  116. package/dist/scripts/1876-0a931d62d9.chunk.js +0 -1
  117. package/dist/scripts/1973-7a1768228d.chunk.js +0 -1
  118. package/dist/scripts/2417-9731b9da6b.chunk.js +0 -1
  119. package/dist/scripts/243-c4bb9e995e.chunk.js +0 -1
  120. package/dist/scripts/2482-ded3090c15.chunk.js +0 -1
  121. package/dist/scripts/2601-0bbd055a92.chunk.js +0 -1
  122. package/dist/scripts/2644-17c596a0c9.chunk.js +0 -1
  123. package/dist/scripts/2648-0a58c0fc05.chunk.js +0 -1
  124. package/dist/scripts/2802-d428814c29.chunk.js +0 -2
  125. package/dist/scripts/2802-d428814c29.chunk.js.LICENSE.txt +0 -8
  126. package/dist/scripts/299-5585deab1d.chunk.js +0 -1
  127. package/dist/scripts/343-a3dabdd615.chunk.js +0 -1
  128. package/dist/scripts/35-dde0c25008.chunk.js +0 -1
  129. package/dist/scripts/3746-588ea9d62d.chunk.js +0 -1
  130. package/dist/scripts/376-d76b864238.chunk.js +0 -1
  131. package/dist/scripts/3969-c636ff3159.chunk.js +0 -1
  132. package/dist/scripts/3978-46652b7a6d.chunk.js +0 -1
  133. package/dist/scripts/4001-e9f2e6c242.chunk.js +0 -2
  134. package/dist/scripts/4024-e9e014aae3.chunk.js +0 -1
  135. package/dist/scripts/4245-db2d86c59d.chunk.js +0 -1
  136. package/dist/scripts/4523-4dc52522e2.chunk.js +0 -1
  137. package/dist/scripts/471-8eefc9b28a.chunk.js +0 -2
  138. package/dist/scripts/471-8eefc9b28a.chunk.js.LICENSE.txt +0 -13
  139. package/dist/scripts/5046-b65e8db7c0.chunk.js +0 -1
  140. package/dist/scripts/514-eeb95eba47.chunk.js +0 -1
  141. package/dist/scripts/535-794be8eab5.chunk.js +0 -1
  142. package/dist/scripts/5524-04583b6e40.chunk.js +0 -1
  143. package/dist/scripts/5850-fd3912ade8.chunk.js +0 -1
  144. package/dist/scripts/5891-ac4d3f803a.chunk.js +0 -1
  145. package/dist/scripts/61-4b8d6a6f6d.chunk.js +0 -2
  146. package/dist/scripts/6352-50c10c1bc6.chunk.js +0 -1
  147. package/dist/scripts/6963-254d82f6c2.chunk.js +0 -1
  148. package/dist/scripts/7002-6d9f52d6d3.chunk.js +0 -1
  149. package/dist/scripts/7053-91a52f57d7.chunk.js +0 -1
  150. package/dist/scripts/7071-6d98c3dcfa.chunk.js +0 -1
  151. package/dist/scripts/708-f7536cb7a4.chunk.js +0 -1
  152. package/dist/scripts/7153-fc080e3d53.chunk.js +0 -1
  153. package/dist/scripts/7827-c1f1b4f608.chunk.js +0 -1
  154. package/dist/scripts/8113-d678e76098.chunk.js +0 -1
  155. package/dist/scripts/8213-6c873c853e.chunk.js +0 -1
  156. package/dist/scripts/8542-64733a5c92.chunk.js +0 -1
  157. package/dist/scripts/8591-149f4a2b62.chunk.js +0 -1
  158. package/dist/scripts/8727-188101f028.chunk.js +0 -1
  159. package/dist/scripts/8952-4201ae6599.chunk.js +0 -2
  160. package/dist/scripts/9369-d0cfe79b64.chunk.js +0 -2
  161. package/dist/scripts/9383-4ed13f5993.chunk.js +0 -1
  162. package/dist/scripts/bundle-e23c97dca7.min.js +0 -2
  163. package/dist/scripts/bundle-e23c97dca7.min.js.LICENSE.txt +0 -1
  164. package/typings/libs/CVLanguages.d.ts +0 -24
  165. package/typings/libs/LazyLoad.d.ts +0 -30
  166. package/typings/libs/LazyLoad.ts +0 -27
  167. package/typings/libs/cookiesjs.d.ts +0 -24
  168. /package/dist/css/{7408-library-editor-2a67dae087.chunk.css → 1080-library-editor-2a67dae087.chunk.css} +0 -0
  169. /package/dist/css/{376-library-editor-ce09c2fd78.chunk.css → 1524-library-editor-ce09c2fd78.chunk.css} +0 -0
  170. /package/dist/css/{6352-library-editor-33de5ce339.chunk.css → 2591-library-editor-33de5ce339.chunk.css} +0 -0
  171. /package/dist/css/{3978-library-editor-5a1c6fc3b4.chunk.css → 2598-library-editor-5a1c6fc3b4.chunk.css} +0 -0
  172. /package/dist/css/{3746-library-editor-46e4b6af59.chunk.css → 2614-library-editor-46e4b6af59.chunk.css} +0 -0
  173. /package/dist/css/{7053-library-editor-cbe896c46a.chunk.css → 3288-library-editor-cbe896c46a.chunk.css} +0 -0
  174. /package/dist/css/{2644-library-editor-9a25c88900.chunk.css → 3305-library-editor-9a25c88900.chunk.css} +0 -0
  175. /package/dist/css/{5046-library-editor-765ea88cb0.chunk.css → 3373-library-editor-765ea88cb0.chunk.css} +0 -0
  176. /package/dist/css/{1832-library-editor-e123877850.chunk.css → 3475-library-editor-e123877850.chunk.css} +0 -0
  177. /package/dist/css/{3969-library-editor-30997910e2.chunk.css → 3643-library-editor-30997910e2.chunk.css} +0 -0
  178. /package/dist/css/{4860-library-editor-f5eddb2400.chunk.css → 4327-library-editor-f5eddb2400.chunk.css} +0 -0
  179. /package/dist/css/{6732-library-editor-0be4d10f09.chunk.css → 4567-library-editor-0be4d10f09.chunk.css} +0 -0
  180. /package/dist/css/{1086-library-editor-9f7cd4e27e.chunk.css → 5180-library-editor-9f7cd4e27e.chunk.css} +0 -0
  181. /package/dist/css/{9369-library-editor-e354d61dfe.chunk.css → 5182-library-editor-e354d61dfe.chunk.css} +0 -0
  182. /package/dist/css/{4024-library-editor-b0081783ab.chunk.css → 5193-library-editor-b0081783ab.chunk.css} +0 -0
  183. /package/dist/css/{2601-library-editor-8922d361d6.chunk.css → 5346-library-editor-8922d361d6.chunk.css} +0 -0
  184. /package/dist/css/{1703-library-editor-3334df179f.chunk.css → 5424-library-editor-3334df179f.chunk.css} +0 -0
  185. /package/dist/css/{7295-library-editor-34087db2b0.chunk.css → 5736-library-editor-34087db2b0.chunk.css} +0 -0
  186. /package/dist/css/{535-library-editor-fa24102d7f.chunk.css → 576-library-editor-fa24102d7f.chunk.css} +0 -0
  187. /package/dist/css/{5891-library-editor-46e4b6af59.chunk.css → 5814-library-editor-46e4b6af59.chunk.css} +0 -0
  188. /package/dist/css/{708-library-editor-7ffe353138.chunk.css → 5972-library-editor-7ffe353138.chunk.css} +0 -0
  189. /package/dist/css/{243-library-editor-decee8d957.chunk.css → 6239-library-editor-decee8d957.chunk.css} +0 -0
  190. /package/dist/css/{4523-library-editor-c52f3ffbb0.chunk.css → 6350-library-editor-c52f3ffbb0.chunk.css} +0 -0
  191. /package/dist/css/{2482-library-editor-1b6dc45d45.chunk.css → 6439-library-editor-1b6dc45d45.chunk.css} +0 -0
  192. /package/dist/css/{2692-library-editor-9f7cd4e27e.chunk.css → 6450-library-editor-9f7cd4e27e.chunk.css} +0 -0
  193. /package/dist/css/{1876-library-editor-3334df179f.chunk.css → 6467-library-editor-3334df179f.chunk.css} +0 -0
  194. /package/dist/css/{8762-library-editor-9f7cd4e27e.chunk.css → 6587-library-editor-9f7cd4e27e.chunk.css} +0 -0
  195. /package/dist/css/{1409-library-editor-bc215e1152.chunk.css → 6677-library-editor-bc215e1152.chunk.css} +0 -0
  196. /package/dist/css/{9383-library-editor-02381b537c.chunk.css → 6768-library-editor-02381b537c.chunk.css} +0 -0
  197. /package/dist/css/{5747-library-editor-de4ea80bfc.chunk.css → 7366-library-editor-de4ea80bfc.chunk.css} +0 -0
  198. /package/dist/css/{2417-library-editor-46f8e6e95b.chunk.css → 7384-library-editor-46f8e6e95b.chunk.css} +0 -0
  199. /package/dist/css/{101-library-editor-cc4c4155eb.chunk.css → 7696-library-editor-cc4c4155eb.chunk.css} +0 -0
  200. /package/dist/css/{8952-library-editor-5d85817bef.chunk.css → 777-library-editor-5d85817bef.chunk.css} +0 -0
  201. /package/dist/css/{9695-library-editor-c5004a1fec.chunk.css → 8143-library-editor-c5004a1fec.chunk.css} +0 -0
  202. /package/dist/css/{343-library-editor-d2f704c6a5.chunk.css → 8862-library-editor-d2f704c6a5.chunk.css} +0 -0
  203. /package/dist/css/{8906-library-editor-9f7cd4e27e.chunk.css → 8989-library-editor-9f7cd4e27e.chunk.css} +0 -0
  204. /package/dist/css/{112-library-editor-6a2d152d7d.chunk.css → 9011-library-editor-6a2d152d7d.chunk.css} +0 -0
  205. /package/dist/css/{6093-library-editor-446ee2e049.chunk.css → 9037-library-editor-446ee2e049.chunk.css} +0 -0
  206. /package/dist/css/{6963-library-editor-46e4b6af59.chunk.css → 9217-library-editor-46e4b6af59.chunk.css} +0 -0
  207. /package/dist/css/{3551-library-editor-787101ac7a.chunk.css → 95-library-editor-787101ac7a.chunk.css} +0 -0
  208. /package/dist/css/{5424-library-editor-30b3c7de26.chunk.css → 9734-library-editor-30b3c7de26.chunk.css} +0 -0
  209. /package/dist/css/{514-library-editor-4cb4f22674.chunk.css → 9766-library-editor-4cb4f22674.chunk.css} +0 -0
  210. /package/dist/css/{9927-library-editor-a11669ad9d.chunk.css → 9825-library-editor-a11669ad9d.chunk.css} +0 -0
  211. /package/dist/scripts/{1934-562cd9f48b.chunk.js.LICENSE.txt → 1934-84460445ad.chunk.js.LICENSE.txt} +0 -0
  212. /package/dist/scripts/{152-808e046b1f.chunk.js.LICENSE.txt → 463-f5f80e35df.chunk.js.LICENSE.txt} +0 -0
  213. /package/dist/scripts/{4001-e9f2e6c242.chunk.js.LICENSE.txt → 4796-284cbfa43b.chunk.js.LICENSE.txt} +0 -0
  214. /package/dist/scripts/{61-4b8d6a6f6d.chunk.js.LICENSE.txt → 5182-0c4b67f64d.chunk.js.LICENSE.txt} +0 -0
  215. /package/dist/scripts/{8952-4201ae6599.chunk.js.LICENSE.txt → 5319-4f146e8e39.chunk.js.LICENSE.txt} +0 -0
  216. /package/dist/scripts/{9369-d0cfe79b64.chunk.js.LICENSE.txt → 777-1b328a0073.chunk.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7295],{21053:function(e,t,n){"use strict";n.d(t,{W:function(){return v}});var o=n(48088),i=n(57857),r=n(31647),l=n(57085),s=n(35630),a=n(57098),u=n(43791),c=n.n(u),p={svgContainer:"mtegw"};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},f(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,h(o.key),o)}}function h(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var v=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=b(t),function(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],b(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return c()}},{key:"viewOptions",value:function(){return{styles:p}}},{key:"onSave",value:function(){o.Radio.channel(a.OV.LIBRARY_EDITOR).trigger(a.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:i.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:i.T.getPhrase(this.lang,"chapters")};case"resources":return{name:i.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new s.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new l.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},82407:function(e,t,n){"use strict";n.r(t),n.d(t,{EditResourcesView:function(){return Lt}});var o=n(48088),i=n(25417),r=n(99748),l=n(21679),s=n(57857),a=n(31647),u=n(52076),c=n(70065),p=n(81937),f=n(56252),d=n(18222),h=n(45837),y=n(83162),b=n(57769),m=n(44237),v=n.n(m),g=n(61571),k=n.n(g),w={fileDrop:"ejhuF",dropMask:"fLdBH",dragOver:"_sk3R"};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function S(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,C(o.key),o)}}function C(e){var t=function(e){if("object"!=O(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==O(t)?t:t+""}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(T=function(){return!!e})()}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}var E=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=j(t),function(e,t){if(t&&("object"==O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,T()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}(t,e),n=t,o=[{key:"name",get:function(){return"FileSelectComponent"}},{key:"template",get:function(){return v()}},{key:"lang",get:function(){return"shared._fileSelect"}},{key:"elements",get:function(){return{dropArea:".file-drop"}}},{key:"defaults",get:function(){return{acceptMultiple:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:b.Z,buttonSelector:".browse",channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple,mimeType:this.options.mimeType},{behaviorClass:y.V,channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple}]}},{key:"events",value:function(){var e,t,n;return e={"drop .file-drop":"onDrop","dragover .file-drop":"onDragOver"},n="onDragLeave",(t=C(t="dragleave .".concat(w.dropMask)))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"onDrop",value:function(){this.$el.removeClass(w.dragOver)}},{key:"onDragOver",value:function(e){this.$el.addClass(w.dragOver),e.preventDefault()}},{key:"onDragLeave",value:function(){this.$el.removeClass(w.dragOver)}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({},this.options),{styles:w,limitText:this.options.limitText,isClickViewContent:this.options.isClickViewContent})}},{key:"onRender",value:function(){this.getUI("dropArea").append(k()({dropMask:w.dropMask,fileDropText:s.T.getPhrase(this.lang,"drop")}))}}],o&&S(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA),L=n(85835);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},R(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 _(e){var t=function(e){if("object"!=R(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=R(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==R(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var U="shared.errors.tooManyResources",D=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=x(t),function(e,t){if(t&&("object"==R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,n||[],x(e).constructor):t.apply(e,n))}(this,t,["Cannot add that many resources"])).resourceLimit=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TooManyResourcesError"}},{key:"dialogOptions",get:function(){return{title:s.T.getPhrase(U,"heading"),text:s.T.getPhrase(U,"body",{resourceLimit:this.resourceLimit}),buttons:[{text:s.T.getPhrase(U,"okay"),className:"btn btn-dark",success:!0}]}}}])&&V(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(L.S);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},B(e)}function A(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,F(o.key),o)}}function F(e){var t=function(e){if("object"!=B(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==B(t)?t:t+""}function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(M=function(){return!!e})()}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}var z="shared.errors.tooManySubtitles",K=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Q(t),function(e,t){if(t&&("object"==B(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,M()?Reflect.construct(t,n||[],Q(e).constructor):t.apply(e,n))}(this,t,["Cannot add that many subtitles"])).subtileLimit=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TooManySubtitlesError"}},{key:"dialogOptions",get:function(){return{title:s.T.getPhrase(z,"heading"),text:s.T.getPhrase(z,"body",{subtitleLimit:this.subtileLimit}),buttons:[{text:s.T.getPhrase(z,"okay"),className:"btn btn-dark",success:!0}]}}}])&&A(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(L.S),q=n(10101),Z=n(57098),G=n(29457),H=n(14327),W=n(19226),Y=n(93569),X=n(99249),ee=n(88172),te=n(7190),ne=n(41165),oe=n.n(ne);function ie(e){return ie="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},ie(e)}function re(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,le(o.key),o)}}function le(e){var t=function(e){if("object"!=ie(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ie(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ie(t)?t:t+""}function se(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(se=function(){return!!e})()}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}var ce=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=ae(t),function(e,t){if(t&&("object"==ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,se()?Reflect.construct(t,n||[],ae(e).constructor):t.apply(e,n))}(this,t,[e])).showNameField=!1,n.disableBtn=!0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ue(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.model=X.r.get(this.viewModelName),this.model.addValidation(te.yU),this.bindListeners()}},{key:"name",get:function(){return"AddLinksComponent"}},{key:"template",get:function(){return oe()}},{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:"regions",value:function(){return{attachBtn:".attach-btn-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:q.Bp},{behaviorClass:q.fS}]}},{key:"elements",get:function(){return{nameField:"#name-container"}}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{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(),o.Radio.channel(this.options.channelName).trigger("add:link",e),this.render()}},{key:"renderAttachButton",value:function(){this.options.hide||this.showChildView("attachBtn",new ee.Py({saveEvent:"attach:link",channelName:this.options.channelName,buttonText:s.T.getPhrase(this.lang,"attach"),extraButtonClass:"btn-dark attach",disabled:this.disableBtn,buttonType:"submit",spinnerOptions:{size:Y.Ey.Medium,type:Y.dR.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(),o.Validation.bind(this)}},{key:"onClose",value:function(){this.unstickit(),o.Validation.unbind(this)}}])&&re(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(a.Q.wA),pe=n(68708),fe=n(21053),de=n(53808),he=n(63791),ye=n(97237),be=n.n(ye),me={svgContainer:"sr9KQ",progress:"Cn0ad"};function ve(e){return ve="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},ve(e)}function ge(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,ke(o.key),o)}}function ke(e){var t=function(e){if("object"!=ve(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ve(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ve(t)?t:t+""}function we(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(we=function(){return!!e})()}function Oe(e){return Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Oe(e)}function Se(e,t){return Se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Se(e,t)}var Ce=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Oe(t),function(e,t){if(t&&("object"==ve(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,we()?Reflect.construct(t,n||[],Oe(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Se(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"FileUploadComponent"}},{key:"template",get:function(){return be()}},{key:"events",value:function(){return{"click .cancel-upload":"onClickCancelUpload"}}},{key:"onClickCancelUpload",value:function(){de.q.isFunction(this.options.onClickCancelUpload)&&this.options.onClickCancelUpload(this.model.get("id"))}},{key:"viewOptions",value:function(){return{styles:me,svg:he.Nj.getSvg(he.vn.Folder),tickSvg:he.Nj.getSvg(he.vn.Check),finished:this.model.get("progress")>=100}}}])&&ge(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA);function Te(e){return Te="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},Te(e)}function je(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,Pe(o.key),o)}}function Pe(e){var t=function(e){if("object"!=Te(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Te(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Te(t)?t:t+""}function Ee(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ee=function(){return!!e})()}function Le(e){return Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Le(e)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}var Ve=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Le(t),function(e,t){if(t&&("object"==Te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ee()?Reflect.construct(t,n||[],Le(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Re(e,t)}(t,e),n=t,(i=[{key:"name",get:function(){return"FileUploadsComponentCollection"}},{key:"childView",get:function(){return Ce}},{key:"childViewOptions",get:function(){var e=this;return{onClickCancelUpload:function(t){o.Radio.channel(e.options.channelName).trigger("cancel:upload",t)}}}}])&&je(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(a.Q.$W),_e=n(36022),Ne=n(39479),xe=n(19249),Ie={handleQuery:function(){return function(e,t){var n=[];if(e){var o=CVLanguages.getEnglishNameContains(e);return Ne.each(o,(function(e,t){n.push({key:t,name:e.englishName})})),t(n)}t()}},getTypeaheadConfig:function(){return function(){return{name:"languages",source:Ie.handleQuery(),limit:5,display:function(e){return e.name},templates:{suggestion:xe.ou,pending:xe.gb,notFound:xe.TX}}}}},Ue=n(56730),De=n.n(Ue);function Be(e){return Be="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},Be(e)}function Ae(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,Fe(o.key),o)}}function Fe(e){var t=function(e){if("object"!=Be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Be(t)?t:t+""}function Me(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Me=function(){return!!e})()}function Qe(e){return Qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qe(e)}function Je(e,t){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Je(e,t)}var ze=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Qe(t),function(e,t){if(t&&("object"==Be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Me()?Reflect.construct(t,n||[],Qe(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Je(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(e){this.model=X.r.get("subtitle:language",e.defaultLanguage),this.model.addValidation(Y.AJ),this.listenTo(this.channelName,"select:language",this.onLanguageSelected)}},{key:"template",get:function(){return De()}},{key:"name",get:function(){return"LanguageSelectComponent"}},{key:"lang",get:function(){return"libraryEditor.languageSelect"}},{key:"events",value:function(){return{"click .submit":"onClickSubmit",submit:"onClickSubmit"}}},{key:"behaviors",get:function(){return[{behaviorClass:q.Yw,title:s.T.getPhrase(this.lang,"heading"),buttons:[{text:s.T.getPhrase(this.lang,"submit"),type:"submit",className:"btn btn-dark submit"}]},{behaviorClass:q.fS}]}},{key:"regions",value:function(){return{typeahead:".typahead-region"}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"getTypeaheadConfigs",value:function(){return[{name:"languages",typeaheadConfig:Ie.getTypeaheadConfig()}]}},{key:"renderTypeahead",value:function(){this.showChildView("typeahead",new _e.M({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()}}])&&Ae(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA),Ke=n(77605),qe=function(e,t){var n,o,i=e.language;return o=(null==t?void 0:t.filter((function(e){return e.language!==i}))).length>0?CVLanguages.getFullEnglishName(i):CVLanguages.getEnglishName(i),(null===(n=e.metadata)||void 0===n?void 0:n.autoGenerated)?s.T.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:o}):o},$e=n(21974),Ze=n(85985),Ge=n.n(Ze),He={container:"SizJb",svgContainer:"PuqLQ",actionSvg:"L9P1P"};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},We(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,Xe(o.key),o)}}function Xe(e){var t=function(e){if("object"!=We(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=We(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==We(t)?t:t+""}function et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(et=function(){return!!e})()}function tt(e){return tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tt(e)}function nt(e,t){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nt(e,t)}var ot=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=tt(t),function(e,t){if(t&&("object"==We(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,et()?Reflect.construct(t,n||[],tt(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nt(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"SubtitleItemComponent"}},{key:"template",get:function(){return Ge()}},{key:"className",get:function(){return"".concat(He.container," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete"}}},{key:"getEnglishName",value:function(){return qe(this.model.toJSON(),this.model.collection.toJSON())}},{key:"onClickDelete",value:function(){!this.options.isClickViewContent&&de.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){return{styles:He,svg:he.Nj.getSvg($e.u.mapTypeToSvg("subtitle")),trashSvg:he.Nj.getSvg(he.vn.Delete),name:this.getEnglishName(),isClickViewContent:this.options.isClickViewContent}}}])&&Ye(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA),it=n(54758),rt=n(71060),lt=n.n(rt);function st(e){return st="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},st(e)}function at(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ut(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,pt(o.key),o)}}function ct(e,t,n){return t&&ut(e.prototype,t),n&&ut(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pt(e){var t=function(e){if("object"!=st(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=st(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==st(t)?t:t+""}function ft(e,t,n){return t=ht(t),function(e,t){if(t&&("object"==st(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dt()?Reflect.construct(t,n||[],ht(e).constructor):t.apply(e,n))}function dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(dt=function(){return!!e})()}function ht(e){return ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ht(e)}function yt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bt(e,t)}function bt(e,t){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bt(e,t)}var mt=function(e){function t(e){return at(this,t),ft(this,t,[e])}return yt(t,e),ct(t,[{key:"name",get:function(){return"VideoSubtitlesComponent"}},{key:"template",get:function(){return lt()}},{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 vt({collection:this.collection,channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}))}}])}(a.Q.wA),vt=function(e){function t(e){return at(this,t),ft(this,t,[e])}return yt(t,e),ct(t,[{key:"name",get:function(){return"VideoSubtitlesComponentCollection"}},{key:"lang",get:function(){return"libraryEditor.videoSubtitles"}},{key:"childView",get:function(){return ot}},{key:"childViewOptions",get:function(){var e=this;return{isClickViewContent:this.options.isClickViewContent,onClickDelete:function(t){return e.onClickDelete(t)}}}},{key:"onClickDelete",value:function(e){var t=this;this.options.isClickViewContent||new it.M({title:s.T.getPhrase(this.lang,"removeHeading"),text:s.T.getPhrase(this.lang,"removeBody",{language:this.getEnglishName(e)}),buttons:[{text:s.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:s.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){o.Radio.channel(t.options.channelName).trigger("delete:subtitle",e.get("id"))}))}},{key:"getEnglishName",value:function(e){return qe(e.toJSON(),e.collection.toJSON())}}])}(a.Q.$W),gt=n(56906),kt=n(95061),wt=n(51069),Ot=n.n(wt);function St(e){return St="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},St(e)}function Ct(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,Tt(o.key),o)}}function Tt(e){var t=function(e){if("object"!=St(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=St(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==St(t)?t:t+""}function jt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(jt=function(){return!!e})()}function Pt(e){return Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Pt(e)}function Et(e,t){return Et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Et(e,t)}var Lt=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Pt(t),function(e,t){if(t&&("object"==St(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jt()?Reflect.construct(t,n||[],Pt(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Et(e,t)}(t,e),n=t,y=[{key:"initialize",value:function(){this.initializeUploadServices(),this.bindDataListeners(),this.bindViewListeners(),this.bindFileSelectListeners(),Y.Si.initBackButton(),this.videoDataService=l.u.getInstance(Z.Or.Video,this),this.linkDataService=l.u.getInstance(Z.Or.Link,this),this.resourceDataService=l.u.getInstance(Z.Or.Resource,this),this.subtitleDataService=l.u.getInstance(Z.Or.Subtitle,this),this.resourceUploads=[],this.resourceUploadCount=0}},{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 Ot()}},{key:"props",get:function(){return["videoDataService"]}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return Y.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:q._7}]}},{key:"requiredResources",get:function(){return{currentUser:W.K.currentUser,libraries:kt.T.libraries}}},{key:"initializeUploadServices",value:function(){this.resourceUploadService=new f.L1,this.listenTo(Z.jr.RESOURCE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onResourceUploadComplete),this.subtitleUploadService=new f.M_,this.listenTo(Z.jr.SUBTITLE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onSubtitleUploadComplete)}},{key:"bindDataListeners",value:function(){this.listenTo(Z.Vk.VIDEO,"".concat(Z.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(Z.Vk.VIDEO,"".concat(Z.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError)}},{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)}},{key:"bindFileSelectListeners",value:function(){this.listenTo(this.getSubtitleSelectChannelName(),p.S.FILES_SELECTED,this.onSubtitleFilesAdded),this.listenTo(this.getResourceSelectChannelName(),p.S.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 r.h.NotFound:a.Q.Ry.throw(new gt.l1);break;case r.h.Forbidden:a.Q.Ry.throw(new gt.aV)}}},{key:"onSubtitleFilesAdded",value:function(e,t){e.length>5-this.model.subtitles.length?a.Q.Ry.throw(new K(5)):(t&&(this.interactionType=t),this.subtitleUploadService.addFiles(e))}},{key:"onResourceFilesAdded",value:function(e,t){e.length>25-this.model.resources.length?a.Q.Ry.throw(new D(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:G.LP.EditVideoTabs},subtitlesUpload:{el:".subtitles-upload-region",partialLoading:G.LP.EditVideoUploadArea},subtitlesUploadList:".subtitles-upload-list-region",customerSubtitlesList:".customer-subtitles-list-region",clickViewSubtitlesList:".clickview-subtitles-list-region",resourcesUpload:{el:".resources-upload-region",partialLoading:G.LP.EditVideoUploadArea},resourcesUploadList:".resources-upload-list-region",customerResourcesList:".customer-resources-list-region",clickViewResourcesList:".clickview-resources-list-region",addLinks:{el:".add-links-region",partialLoading:G.LP.EditVideoUploadArea},customerLinkList:".customer-link-list-region",clickViewLinkList:".clickview-link-list-region"}}},{key:"onDeleteResource",value:function(e){var t=this;this.resourceDataService.deleteResource(this.options.videoId,e,(function(){t.logDeleteAction(c.py.Resource,e),t.render()}))}},{key:"onDeleteSubtitle",value:function(e){var t=this;this.subtitleDataService.deleteSubtitle(this.options.videoId,e,(function(){t.logDeleteAction(c.py.Subtitle,e),t.render()}))}},{key:"onDeleteLink",value:function(e){var t=this;this.linkDataService.deleteLink(this.options.videoId,e,(function(){t.logDeleteAction(c.py.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:d.v.getResourceType(n.fileInfo.extension),extension:n.fileInfo.extension,fileSize:n.fileInfo.size,fileUrl:n.fileInfo.url,ingestUrl:n.file.cvUpload.ingestUrl,metaData:{type:d.v.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(),r=new ze({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:d.v.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"))})),o.Radio.channel(i.G.POPUP).trigger(a.Q.Vy.SHOW_POPUP,r)}},{key:"logUploadAction",value:function(e){var t=e instanceof H._?c.py.Resource:c.py.Subtitle,n=u.k.mapInteractionType(this.interactionType),o={location:c.LZ.EditVideoResources,actionType:c.Vw.Upload,entity:t,descriptor:n};u.k.logUserAction(e,o)}},{key:"logDeleteAction",value:function(e,t){var n={location:c.LZ.EditVideoResources,actionType:c.Vw.Delete,entity:e},o={id:t,parentId:+this.options.videoId};u.k.logUserAction(o,n)}},{key:"renderTabs",value:function(){var e=Y.BK.canEditVideo(this.model);this.showChildView("tabs",new fe.W({model:this.model,tabs:Y.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-resources-subtitles-applink",context:"resources",folder:this.folder,libraries:this.libraries}))}},{key:"renderSubtitleFileSelect",value:function(){var e=s.T.getPhrase(this.lang,"subtitlesLimit",{limit:5});this.showChildView("subtitlesUpload",new E({title:this.isClickViewContent?s.T.getPhrase(this.lang,"customerSubtitles"):s.T.getPhrase(this.lang,"subtitles"),description:s.T.getPhrase(this.lang,"subtitlesInfo"),alternateText:s.T.getPhrase(this.lang,"subtitlesAlternative"),mimeType:d.l.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 Ve({collection:e,channelName:this.channelName}))}},{key:"renderSubtitlesLists",value:function(){this.renderClickViewSubtitlesList(),this.renderCustomerSubtitlesList()}},{key:"renderClickViewSubtitlesList",value:function(){if(this.isClickViewContent){var e=Y.BK.filterObjectsByOwnerType(this.model.subtitles,h.N.ClickView);this.showChildView("clickViewSubtitlesList",new mt({collection:e,channelName:this.channelName,isClickViewContent:!0,headerText:s.T.getPhrase(this.lang,"clickViewSubtitles"),emptyStateText:e.models.length?"":s.T.getPhrase(this.lang,"clickViewSubtitlesEmpty")}))}}},{key:"renderCustomerSubtitlesList",value:function(){this.showChildView("customerSubtitlesList",new mt({collection:Y.BK.filterObjectsByOwnerType(this.model.subtitles,h.N.Customer,this.currentUser.get("customerId")),channelName:this.channelName}))}},{key:"renderResourcesFileSelect",value:function(){var e=s.T.getPhrase(this.lang,"resourcesLimit",{limit:25});this.showChildView("resourcesUpload",new E({title:this.isClickViewContent?s.T.getPhrase(this.lang,"customerResources"):s.T.getPhrase(this.lang,"resources"),description:s.T.getPhrase(this.lang,"resourcesDescription"),alternateText:s.T.getPhrase(this.lang,"resourcesAlternative"),mimeType:d.l.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 Ve({collection:e,channelName:this.channelName}))}},{key:"renderResourcesLists",value:function(){this.renderClickViewResourcesList(),this.renderCustomerResourcesList()}},{key:"renderClickViewResourcesList",value:function(){if(this.isClickViewContent){var e=Y.BK.filterObjectsByOwnerType(this.model.resources,h.N.ClickView);this.showChildView("clickViewResourcesList",new Ke.c({model:this.model,customCollection:e,editable:!1,videoId:this.options.videoId,parentChannelName:this.channelName,headerText:s.T.getPhrase(this.lang,"clickViewResources"),emptyStateText:e.models.length?"":s.T.getPhrase(this.lang,"clickViewResourcesEmpty"),analyticsOptions:{location:c.LZ.EditVideoResources}}))}}},{key:"renderCustomerResourcesList",value:function(){this.showChildView("customerResourcesList",new Ke.h({collection:Y.BK.filterObjectsByOwnerType(this.model.resources,h.N.Customer,this.currentUser.get("customerId")),editable:!0,videoId:this.options.videoId,channelName:this.channelName,analyticsOptions:{location:c.LZ.EditVideoResources}}))}},{key:"renderAddLinks",value:function(e){this.showChildView("addLinks",new ce({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:c.LZ.EditVideoResources},videoId:this.options.videoId};this.renderClickViewLinkList(e),this.renderCustomerLinkList(e)}},{key:"renderClickViewLinkList",value:function(e){if(this.isClickViewContent){var t=Y.BK.filterObjectsByOwnerType(this.model.links,h.N.ClickView);this.showChildView("clickViewLinkList",new pe.c(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 pe.c(Object.assign(Object.assign({},e),{customCollection:Y.BK.filterObjectsByOwnerType(this.model.links,h.N.Customer,this.currentUser.get("customerId")),editable:!0})))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.isClickViewContent=this.model&&!Y.BK.canEditVideo(this.model),this.folder=this.model&&this.model.categories.first()}},{key:"shouldRender",value:function(){return!!this.model}},{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()}},{key:"onDestroy",value:function(){this.subtitleUploadService.destroy(),this.resourceUploadService.destroy()}}],y&&Ct(n.prototype,y),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,y}(a.Q.G7)},36022:function(e,t,n){"use strict";n.d(t,{M:function(){return g}});var o=n(48088),i=n(39479),r=n(11306),l=n(31647),s=n(17391),a=n(63791),u=n(93569),c=n(94407),p=n.n(c),f={svg:"QbFgf",typeaheadContainer:"Y3ErG",disabled:"VTCM4"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){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,y(o.key),o)}}function y(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=m(t),function(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),n=t,c=[{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"search-container ".concat(f.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.N0.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||l.Q.Ry.throw(new r.H("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new l.Q.Hn),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=o.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"bindings",get:function(){var e,t,n;return e={},t="[name=".concat(this.options.inputName,"]"),n={observe:this.options.stickItProperty,setOptions:{validate:!0}},(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"clearInput",value:function(){this.getUI("input").typeahead("val",null)}},{key:"setInput",value:function(e){this.getUI("input").typeahead("val",e)}},{key:"onTypeaheadSelect",value:function(e,t){var n;e.preventDefault(),n="string"==typeof t?t:t.title||t.name||t.query,this.model.set(this.options.stickItProperty,n),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 i.isArray(this.options.typeaheadConfigs)?s.J.getSearchSources(this.options.typeaheadConfigs):s.J.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?i.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return i.isObject(this.options.actionOptions)?i.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){i.isObject(this.options.callbacks)&&(i.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",i.bind(this.options.callbacks.onRender,this)),i.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),i.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",i.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",i.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:f},this.options),{showRemove:this.shouldShowRemove(),svgRemove:a.Nj.getSvg(a.vn.Close)})}},{key:"onRender",value:function(){var e=this;this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),o.Validation.bind(this),this.toggleRemove(),this.options.autofocus&&window.requestAnimationFrame((function(){e.getUI("input").focus()}))}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),o.Validation.unbind(this)}}],c&&h(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c}(l.Q.wA)},44237:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<p class="alert alert-warning mb-0">'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.limitText:r,t))+"</p>\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<div class="file-drop '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.fileDrop:r,t))+" p-2"+(null!=(r=n.if.call(a,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:"")+'">\n <button class="browse btn btn-outline-dark me-2">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"browse",{name:"lang",hash:{},data:i}))+'</button>\n <span class="text-secondary align-middle">'+s(l(null!=(r=null!=t?t.options:t)?r.alternateText:r,t))+"</span>\n</div>\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,l=e.lambda;return"<h5>"+e.escapeExpression(l(null!=(r=null!=t?t.options:t)?r.title:r,t))+"</h5>\n<p>"+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.description:r,t))?r:"")+"</p>\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})},61571:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.escapeExpression;return'<div class="'+s("function"==typeof(l=null!=(l=n.dropMask||(null!=t?t.dropMask:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"dropMask",hash:{},data:i}):l)+'">\n <h3>'+s(e.lambda(null!=(r=null!=t?t.options:t)?r.fileDropText:r,t))+"</h3>\n</div>"},useData:!0})},97237:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda;return'<span class="d-inline-block align-middle me-2 '+e.escapeExpression(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' float-end text-success">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.tickSvg:r,t))?r:"")+"</span>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="d-inline-block align-middle me-2 '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' cursor-pointer cancel-upload btn-close float-end" role="button" aria-label="Close"></span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,p="function";return'<span class="d-inline-block align-middle me-2 '+a(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>\n<span class="align-middle">\n '+a(typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:c)===p?l.call(u,{name:"name",hash:{},data:i}):l)+"\n</span>\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:"")+'\n<div class="progress my-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.progress:r,t))+' mt-2">\n <div class="progress-bar bg-blue" style="width: '+a(typeof(l=null!=(l=n.progress||(null!=t?t.progress:t))?l:c)===p?l.call(u,{name:"progress",hash:{},data:i}):l)+'%" aria-valuenow="'+a(typeof(l=null!=(l=n.progress||(null!=t?t.progress:t))?l:c)===p?l.call(u,{name:"progress",hash:{},data:i}):l)+'" aria-valuemin="0" aria-valuemax="100"></div>\n</div>'},useData:!0})},85985:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression;return'<a class="float-end '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-secondary delete">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<span class="d-inline-block align-middle me-2 '+a(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>\n<a href="'+a("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(u,{name:"url",hash:{},data:i}):l)+"?name="+a(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+'" class="align-middle">\n '+a(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+"\n</a>\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})},41165:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<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>\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||l).call(r,"subheading",{name:"lang",hash:{},data:i}))+'</p>\n<div class="form-group mb-1">\n <label for="url">'+s((n.lang||t&&t.lang||l).call(r,"urlLabel",{name:"lang",hash:{},data:i}))+'</label>\n <input name="url" id="url" class="form-control" type="text" placeholder="'+s((n.lang||t&&t.lang||l).call(r,"urlPlaceholder",{name:"lang",hash:{},data:i}))+'">\n <div class="form-feedback"></div>\n</div>\n<div class="form-group mb-1" id="name-container" style="display: none;">\n <input type="text" class="form-control" name="name" placeholder="'+s((n.lang||t&&t.lang||l).call(r,"namePlaceholder",{name:"lang",hash:{},data:i}))+'">\n <div class="form-feedback"></div>\n</div>\n<div class="attach-btn-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h5 class="pt-2">Resource links</h5>\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})},43791:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region ps-2"></div>'},useData:!0})},56730:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return e.propertyIsEnumerable,'<form>\n <div class="form-group">\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>\n <div class="typahead-region"></div>\n </div>\n</form>'},useData:!0})},71060:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,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;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\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:"")+'\n<div class="subtitles-list-region"></div>'},useData:!0})},51069:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"col-5"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{};return'<div class="tab-region"></div>\n\n<div class="row py-3">\n <div class="'+(null!=(r=n.if.call(l,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:"")+'">\n <div class="clickview-subtitles-list-region"></div>\n </div>\n <div class="col-7">\n <div class="subtitles-upload-region"></div>\n <div class="subtitles-upload-list-region p-0 col-8"></div>\n <div class="customer-subtitles-list-region p-0 col-8"></div>\n </div>\n</div>\n\n<div class="row border-top py-3">\n <div class="'+(null!=(r=n.if.call(l,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:"")+'">\n <div class="clickview-resources-list-region"></div>\n </div>\n <div class="col-7">\n <div class="resources-upload-region"></div>\n <div class="resources-upload-list-region p-0 col-8"></div>\n <div class="customer-resources-list-region p-0 col-8"></div>\n </div>\n</div>\n\n<div class="row border-top py-3">\n <div class="'+(null!=(r=n.if.call(l,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:"")+'">\n <div class="clickview-link-list-region"></div>\n </div>\n <div class="col-7">\n <div class="add-links-region mb-2"></div>\n <div class="customer-link-list-region p-0 col-8"></div>\n </div>\n</div>'},useData:!0})},94407:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,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,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<input\n name="'+s(l(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\n type="text"\n class="form-control '+(null!=(r=n.unless.call(a,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(l(null!=(r=null!=t?t.options:t)?r.additionalClasses:r,t))+'"\n id="'+s(l(null!=(r=null!=t?t.options:t)?r.inputId:r,t))+'"\n autocomplete="off"\n placeholder="'+s(l(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'"\n '+(null!=(r=n.if.call(a,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:"")+"\n "+(null!=(r=n.unless.call(a,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:"")+'\n></input>\n<span class="svg-container mb-2 '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svg:r,t))+' remove" style="display: none;">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.svgRemove:r,t))?r:"")+"</span>"},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5736],{79472:function(e,t,n){"use strict";n.d(t,{W:function(){return v}});var o=n(43823),i=n(57857),r=n(31647),l=n(57085),s=n(65078),a=n(45390),u=n(43791),c=n.n(u),p={svgContainer:"mtegw"};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},f(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,h(o.key),o)}}function h(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var v=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=b(t),function(e,t){if(t&&("object"==f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],b(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return c()}},{key:"viewOptions",value:function(){return{styles:p}}},{key:"onSave",value:function(){o.Radio.channel(a.OV.LIBRARY_EDITOR).trigger(a.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:i.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:i.T.getPhrase(this.lang,"chapters")};case"resources":return{name:i.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new s.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new l.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},66324:function(e,t,n){"use strict";n.r(t),n.d(t,{EditResourcesView:function(){return Lt}});var o=n(43823),i=n(25417),r=n(99748),l=n(21679),s=n(57857),a=n(31647),u=n(52076),c=n(70065),p=n(81937),f=n(56252),d=n(18222),h=n(45837),y=n(83162),b=n(57769),m=n(44237),v=n.n(m),g=n(61571),k=n.n(g),w={fileDrop:"ejhuF",dropMask:"fLdBH",dragOver:"_sk3R"};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function S(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,C(o.key),o)}}function C(e){var t=function(e){if("object"!=O(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=O(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==O(t)?t:t+""}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(T=function(){return!!e})()}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}var E=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=j(t),function(e,t){if(t&&("object"==O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,T()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}(t,e),n=t,o=[{key:"name",get:function(){return"FileSelectComponent"}},{key:"template",get:function(){return v()}},{key:"lang",get:function(){return"shared._fileSelect"}},{key:"elements",get:function(){return{dropArea:".file-drop"}}},{key:"defaults",get:function(){return{acceptMultiple:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:b.Z,buttonSelector:".browse",channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple,mimeType:this.options.mimeType},{behaviorClass:y.V,channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple}]}},{key:"events",value:function(){var e,t,n;return e={"drop .file-drop":"onDrop","dragover .file-drop":"onDragOver"},n="onDragLeave",(t=C(t="dragleave .".concat(w.dropMask)))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"onDrop",value:function(){this.$el.removeClass(w.dragOver)}},{key:"onDragOver",value:function(e){this.$el.addClass(w.dragOver),e.preventDefault()}},{key:"onDragLeave",value:function(){this.$el.removeClass(w.dragOver)}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({},this.options),{styles:w,limitText:this.options.limitText,isClickViewContent:this.options.isClickViewContent})}},{key:"onRender",value:function(){this.getUI("dropArea").append(k()({dropMask:w.dropMask,fileDropText:s.T.getPhrase(this.lang,"drop")}))}}],o&&S(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA),R=n(85835);function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function 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 _(e){var t=function(e){if("object"!=L(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==L(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var U="shared.errors.tooManyResources",D=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=x(t),function(e,t){if(t&&("object"==L(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,n||[],x(e).constructor):t.apply(e,n))}(this,t,["Cannot add that many resources"])).resourceLimit=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TooManyResourcesError"}},{key:"dialogOptions",get:function(){return{title:s.T.getPhrase(U,"heading"),text:s.T.getPhrase(U,"body",{resourceLimit:this.resourceLimit}),buttons:[{text:s.T.getPhrase(U,"okay"),className:"btn btn-dark",success:!0}]}}}])&&V(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(R.S);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},B(e)}function A(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,F(o.key),o)}}function F(e){var t=function(e){if("object"!=B(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=B(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==B(t)?t:t+""}function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(M=function(){return!!e})()}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}var z="shared.errors.tooManySubtitles",K=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Q(t),function(e,t){if(t&&("object"==B(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,M()?Reflect.construct(t,n||[],Q(e).constructor):t.apply(e,n))}(this,t,["Cannot add that many subtitles"])).subtileLimit=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TooManySubtitlesError"}},{key:"dialogOptions",get:function(){return{title:s.T.getPhrase(z,"heading"),text:s.T.getPhrase(z,"body",{subtitleLimit:this.subtileLimit}),buttons:[{text:s.T.getPhrase(z,"okay"),className:"btn btn-dark",success:!0}]}}}])&&A(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(R.S),q=n(10101),$=n(45390),Z=n(29457),G=n(14327),H=n(19226),W=n(93569),Y=n(99249),X=n(88172),ee=n(7190),te=n(41165),ne=n.n(te);function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ie(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,re(o.key),o)}}function re(e){var t=function(e){if("object"!=oe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oe(t)?t:t+""}function le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(le=function(){return!!e})()}function se(e){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},se(e)}function ae(e,t){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ae(e,t)}var ue=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=se(t),function(e,t){if(t&&("object"==oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,le()?Reflect.construct(t,n||[],se(e).constructor):t.apply(e,n))}(this,t,[e])).showNameField=!1,n.disableBtn=!0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ae(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.model=Y.r.get(this.viewModelName),this.model.addValidation(ee.yU),this.bindListeners()}},{key:"name",get:function(){return"AddLinksComponent"}},{key:"template",get:function(){return ne()}},{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:"regions",value:function(){return{attachBtn:".attach-btn-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:q.Bp},{behaviorClass:q.fS}]}},{key:"elements",get:function(){return{nameField:"#name-container"}}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{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(),o.Radio.channel(this.options.channelName).trigger("add:link",e),this.render()}},{key:"renderAttachButton",value:function(){this.options.hide||this.showChildView("attachBtn",new X.Py({saveEvent:"attach:link",channelName:this.options.channelName,buttonText:s.T.getPhrase(this.lang,"attach"),extraButtonClass:"btn-dark attach",disabled:this.disableBtn,buttonType:"submit",spinnerOptions:{size:W.Ey.Medium,type:W.dR.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(),o.Validation.bind(this)}},{key:"onClose",value:function(){this.unstickit(),o.Validation.unbind(this)}}])&&ie(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(a.Q.wA),ce=n(90835),pe=n(79472),fe=n(53808),de=n(85475),he=n(97237),ye=n.n(he),be={svgContainer:"sr9KQ",progress:"Cn0ad"};function me(e){return me="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},me(e)}function ve(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,ge(o.key),o)}}function ge(e){var t=function(e){if("object"!=me(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=me(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==me(t)?t:t+""}function ke(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ke=function(){return!!e})()}function we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},we(e)}function Oe(e,t){return Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Oe(e,t)}var Se=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=we(t),function(e,t){if(t&&("object"==me(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ke()?Reflect.construct(t,n||[],we(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oe(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"FileUploadComponent"}},{key:"template",get:function(){return ye()}},{key:"events",value:function(){return{"click .cancel-upload":"onClickCancelUpload"}}},{key:"onClickCancelUpload",value:function(){fe.q.isFunction(this.options.onClickCancelUpload)&&this.options.onClickCancelUpload(this.model.get("id"))}},{key:"viewOptions",value:function(){return{styles:be,svg:de.Nj.getSvg(de.vn.Folder),tickSvg:de.Nj.getSvg(de.vn.Check),finished:this.model.get("progress")>=100}}}])&&ve(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA);function Ce(e){return Ce="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},Ce(e)}function Te(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,je(o.key),o)}}function je(e){var t=function(e){if("object"!=Ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ce(t)?t:t+""}function Pe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Pe=function(){return!!e})()}function Ee(e){return Ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ee(e)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}var Le=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Ee(t),function(e,t){if(t&&("object"==Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pe()?Reflect.construct(t,n||[],Ee(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Re(e,t)}(t,e),n=t,(i=[{key:"name",get:function(){return"FileUploadsComponentCollection"}},{key:"childView",get:function(){return Se}},{key:"childViewOptions",get:function(){var e=this;return{onClickCancelUpload:function(t){o.Radio.channel(e.options.channelName).trigger("cancel:upload",t)}}}}])&&Te(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(a.Q.$W),Ve=n(52808),_e=n(21161),Ne=n(47416),xe=n(19249),Ie={handleQuery:function(){return function(e,t){var n=[];if(e){var o=Ne.S.getEnglishNameContains(e);return _e.each(o,(function(e,t){n.push({key:t,name:e.englishName})})),t(n)}t()}},getTypeaheadConfig:function(){return function(){return{name:"languages",source:Ie.handleQuery(),limit:5,display:function(e){return e.name},templates:{suggestion:xe.ou,pending:xe.gb,notFound:xe.TX}}}}},Ue=n(56730),De=n.n(Ue);function Be(e){return Be="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},Be(e)}function Ae(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,Fe(o.key),o)}}function Fe(e){var t=function(e){if("object"!=Be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Be(t)?t:t+""}function Me(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Me=function(){return!!e})()}function Qe(e){return Qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Qe(e)}function Je(e,t){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Je(e,t)}var ze=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Qe(t),function(e,t){if(t&&("object"==Be(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Me()?Reflect.construct(t,n||[],Qe(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Je(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(e){this.model=Y.r.get("subtitle:language",e.defaultLanguage),this.model.addValidation(W.AJ),this.listenTo(this.channelName,"select:language",this.onLanguageSelected)}},{key:"template",get:function(){return De()}},{key:"name",get:function(){return"LanguageSelectComponent"}},{key:"lang",get:function(){return"libraryEditor.languageSelect"}},{key:"events",value:function(){return{"click .submit":"onClickSubmit",submit:"onClickSubmit"}}},{key:"behaviors",get:function(){return[{behaviorClass:q.Yw,title:s.T.getPhrase(this.lang,"heading"),buttons:[{text:s.T.getPhrase(this.lang,"submit"),type:"submit",className:"btn btn-dark submit"}]},{behaviorClass:q.fS}]}},{key:"regions",value:function(){return{typeahead:".typahead-region"}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"getTypeaheadConfigs",value:function(){return[{name:"languages",typeaheadConfig:Ie.getTypeaheadConfig()}]}},{key:"renderTypeahead",value:function(){this.showChildView("typeahead",new Ve.M({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()}}])&&Ae(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA),Ke=n(2119),qe=function(e,t){var n,o,i=e.language;return o=(null==t?void 0:t.filter((function(e){return e.language!==i}))).length>0?Ne.S.getFullEnglishName(i):Ne.S.getEnglishName(i),(null===(n=e.metadata)||void 0===n?void 0:n.autoGenerated)?s.T.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:o}):o},$e=n(21974),Ze=n(85985),Ge=n.n(Ze),He={container:"SizJb",svgContainer:"PuqLQ",actionSvg:"L9P1P"};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},We(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,Xe(o.key),o)}}function Xe(e){var t=function(e){if("object"!=We(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=We(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==We(t)?t:t+""}function et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(et=function(){return!!e})()}function tt(e){return tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tt(e)}function nt(e,t){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nt(e,t)}var ot=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=tt(t),function(e,t){if(t&&("object"==We(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,et()?Reflect.construct(t,n||[],tt(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nt(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"SubtitleItemComponent"}},{key:"template",get:function(){return Ge()}},{key:"className",get:function(){return"".concat(He.container," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete"}}},{key:"getEnglishName",value:function(){return qe(this.model.toJSON(),this.model.collection.toJSON())}},{key:"onClickDelete",value:function(){!this.options.isClickViewContent&&fe.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){return{styles:He,svg:de.Nj.getSvg($e.u.mapTypeToSvg("subtitle")),trashSvg:de.Nj.getSvg(de.vn.Delete),name:this.getEnglishName(),isClickViewContent:this.options.isClickViewContent}}}])&&Ye(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(a.Q.wA),it=n(54758),rt=n(71060),lt=n.n(rt);function st(e){return st="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},st(e)}function at(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ut(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,pt(o.key),o)}}function ct(e,t,n){return t&&ut(e.prototype,t),n&&ut(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pt(e){var t=function(e){if("object"!=st(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=st(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==st(t)?t:t+""}function ft(e,t,n){return t=ht(t),function(e,t){if(t&&("object"==st(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,dt()?Reflect.construct(t,n||[],ht(e).constructor):t.apply(e,n))}function dt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(dt=function(){return!!e})()}function ht(e){return ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ht(e)}function yt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bt(e,t)}function bt(e,t){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bt(e,t)}var mt=function(e){function t(e){return at(this,t),ft(this,t,[e])}return yt(t,e),ct(t,[{key:"name",get:function(){return"VideoSubtitlesComponent"}},{key:"template",get:function(){return lt()}},{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 vt({collection:this.collection,channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}))}}])}(a.Q.wA),vt=function(e){function t(e){return at(this,t),ft(this,t,[e])}return yt(t,e),ct(t,[{key:"name",get:function(){return"VideoSubtitlesComponentCollection"}},{key:"lang",get:function(){return"libraryEditor.videoSubtitles"}},{key:"childView",get:function(){return ot}},{key:"childViewOptions",get:function(){var e=this;return{isClickViewContent:this.options.isClickViewContent,onClickDelete:function(t){return e.onClickDelete(t)}}}},{key:"onClickDelete",value:function(e){var t=this;this.options.isClickViewContent||new it.M({title:s.T.getPhrase(this.lang,"removeHeading"),text:s.T.getPhrase(this.lang,"removeBody",{language:this.getEnglishName(e)}),buttons:[{text:s.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:s.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){o.Radio.channel(t.options.channelName).trigger("delete:subtitle",e.get("id"))}))}},{key:"getEnglishName",value:function(e){return qe(e.toJSON(),e.collection.toJSON())}}])}(a.Q.$W),gt=n(56906),kt=n(95061),wt=n(51069),Ot=n.n(wt),St=n(6723);function Ct(e){return Ct="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},Ct(e)}function Tt(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,jt(o.key),o)}}function jt(e){var t=function(e){if("object"!=Ct(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ct(t)?t:t+""}function Pt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Pt=function(){return!!e})()}function Et(e){return Et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Et(e)}function Rt(e,t){return Rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Rt(e,t)}var Lt=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=Et(t),function(e,t){if(t&&("object"==Ct(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pt()?Reflect.construct(t,n||[],Et(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rt(e,t)}(t,e),n=t,y=[{key:"initialize",value:function(){this.initializeUploadServices(),this.bindDataListeners(),this.bindViewListeners(),this.bindFileSelectListeners(),W.Si.initBackButton(),this.videoDataService=l.u.getInstance($.Or.Video,this),this.linkDataService=l.u.getInstance($.Or.Link,this),this.resourceDataService=l.u.getInstance($.Or.Resource,this),this.subtitleDataService=l.u.getInstance($.Or.Subtitle,this),this.resourceUploads=[],this.resourceUploadCount=0}},{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 Ot()}},{key:"props",get:function(){return["videoDataService"]}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return W.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:q._7}]}},{key:"requiredResources",get:function(){return{currentUser:H.K.currentUser,libraries:kt.T.libraries}}},{key:"initializeUploadServices",value:function(){this.resourceUploadService=new f.L1,this.listenTo($.jr.RESOURCE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onResourceUploadComplete),this.subtitleUploadService=new f.M_,this.listenTo($.jr.SUBTITLE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onSubtitleUploadComplete)}},{key:"bindDataListeners",value:function(){this.listenTo($.Vk.VIDEO,"".concat($.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo($.Vk.VIDEO,"".concat($.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError)}},{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)}},{key:"bindFileSelectListeners",value:function(){this.listenTo(this.getSubtitleSelectChannelName(),p.S.FILES_SELECTED,this.onSubtitleFilesAdded),this.listenTo(this.getResourceSelectChannelName(),p.S.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 r.h.NotFound:a.Q.Ry.throw(new gt.l1);break;case r.h.Forbidden:a.Q.Ry.throw(new gt.aV)}}},{key:"onSubtitleFilesAdded",value:function(e,t){e.length>5-this.model.subtitles.length?a.Q.Ry.throw(new K(5)):(t&&(this.interactionType=t),this.subtitleUploadService.addFiles(e))}},{key:"onResourceFilesAdded",value:function(e,t){e.length>25-this.model.resources.length?a.Q.Ry.throw(new D(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:Z.LP.EditVideoTabs},subtitlesUpload:{el:".subtitles-upload-region",partialLoading:Z.LP.EditVideoUploadArea},subtitlesUploadList:".subtitles-upload-list-region",customerSubtitlesList:".customer-subtitles-list-region",clickViewSubtitlesList:".clickview-subtitles-list-region",resourcesUpload:{el:".resources-upload-region",partialLoading:Z.LP.EditVideoUploadArea},resourcesUploadList:".resources-upload-list-region",customerResourcesList:".customer-resources-list-region",clickViewResourcesList:".clickview-resources-list-region",addLinks:{el:".add-links-region",partialLoading:Z.LP.EditVideoUploadArea},customerLinkList:".customer-link-list-region",clickViewLinkList:".clickview-link-list-region"}}},{key:"onDeleteResource",value:function(e){var t=this;this.resourceDataService.deleteResource(this.options.videoId,e,(function(){t.logDeleteAction(c.py.Resource,e),t.render()}))}},{key:"onDeleteSubtitle",value:function(e){var t=this;this.subtitleDataService.deleteSubtitle(this.options.videoId,e,(function(){t.logDeleteAction(c.py.Subtitle,e),t.render()}))}},{key:"onDeleteLink",value:function(e){var t=this;this.linkDataService.deleteLink(this.options.videoId,e,(function(){t.logDeleteAction(c.py.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:d.v.getResourceType(n.fileInfo.extension),extension:n.fileInfo.extension,fileSize:n.fileInfo.size,fileUrl:n.fileInfo.url,ingestUrl:n.file.cvUpload.ingestUrl,metaData:{type:d.v.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=St.Deferred(),r=new ze({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:d.v.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"))})),o.Radio.channel(i.G.POPUP).trigger(a.Q.Vy.SHOW_POPUP,r)}},{key:"logUploadAction",value:function(e){var t=e instanceof G._?c.py.Resource:c.py.Subtitle,n=u.k.mapInteractionType(this.interactionType),o={location:c.LZ.EditVideoResources,actionType:c.Vw.Upload,entity:t,descriptor:n};u.k.logUserAction(e,o)}},{key:"logDeleteAction",value:function(e,t){var n={location:c.LZ.EditVideoResources,actionType:c.Vw.Delete,entity:e},o={id:t,parentId:+this.options.videoId};u.k.logUserAction(o,n)}},{key:"renderTabs",value:function(){var e=W.BK.canEditVideo(this.model);this.showChildView("tabs",new pe.W({model:this.model,tabs:W.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-resources-subtitles-applink",context:"resources",folder:this.folder,libraries:this.libraries}))}},{key:"renderSubtitleFileSelect",value:function(){var e=s.T.getPhrase(this.lang,"subtitlesLimit",{limit:5});this.showChildView("subtitlesUpload",new E({title:this.isClickViewContent?s.T.getPhrase(this.lang,"customerSubtitles"):s.T.getPhrase(this.lang,"subtitles"),description:s.T.getPhrase(this.lang,"subtitlesInfo"),alternateText:s.T.getPhrase(this.lang,"subtitlesAlternative"),mimeType:d.l.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 Le({collection:e,channelName:this.channelName}))}},{key:"renderSubtitlesLists",value:function(){this.renderClickViewSubtitlesList(),this.renderCustomerSubtitlesList()}},{key:"renderClickViewSubtitlesList",value:function(){if(this.isClickViewContent){var e=W.BK.filterObjectsByOwnerType(this.model.subtitles,h.N.ClickView);this.showChildView("clickViewSubtitlesList",new mt({collection:e,channelName:this.channelName,isClickViewContent:!0,headerText:s.T.getPhrase(this.lang,"clickViewSubtitles"),emptyStateText:e.models.length?"":s.T.getPhrase(this.lang,"clickViewSubtitlesEmpty")}))}}},{key:"renderCustomerSubtitlesList",value:function(){this.showChildView("customerSubtitlesList",new mt({collection:W.BK.filterObjectsByOwnerType(this.model.subtitles,h.N.Customer,this.currentUser.get("customerId")),channelName:this.channelName}))}},{key:"renderResourcesFileSelect",value:function(){var e=s.T.getPhrase(this.lang,"resourcesLimit",{limit:25});this.showChildView("resourcesUpload",new E({title:this.isClickViewContent?s.T.getPhrase(this.lang,"customerResources"):s.T.getPhrase(this.lang,"resources"),description:s.T.getPhrase(this.lang,"resourcesDescription"),alternateText:s.T.getPhrase(this.lang,"resourcesAlternative"),mimeType:d.l.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 Le({collection:e,channelName:this.channelName}))}},{key:"renderResourcesLists",value:function(){this.renderClickViewResourcesList(),this.renderCustomerResourcesList()}},{key:"renderClickViewResourcesList",value:function(){if(this.isClickViewContent){var e=W.BK.filterObjectsByOwnerType(this.model.resources,h.N.ClickView);this.showChildView("clickViewResourcesList",new Ke.c({model:this.model,customCollection:e,editable:!1,videoId:this.options.videoId,parentChannelName:this.channelName,headerText:s.T.getPhrase(this.lang,"clickViewResources"),emptyStateText:e.models.length?"":s.T.getPhrase(this.lang,"clickViewResourcesEmpty"),analyticsOptions:{location:c.LZ.EditVideoResources}}))}}},{key:"renderCustomerResourcesList",value:function(){this.showChildView("customerResourcesList",new Ke.h({collection:W.BK.filterObjectsByOwnerType(this.model.resources,h.N.Customer,this.currentUser.get("customerId")),editable:!0,videoId:this.options.videoId,channelName:this.channelName,analyticsOptions:{location:c.LZ.EditVideoResources}}))}},{key:"renderAddLinks",value:function(e){this.showChildView("addLinks",new ue({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:c.LZ.EditVideoResources},videoId:this.options.videoId};this.renderClickViewLinkList(e),this.renderCustomerLinkList(e)}},{key:"renderClickViewLinkList",value:function(e){if(this.isClickViewContent){var t=W.BK.filterObjectsByOwnerType(this.model.links,h.N.ClickView);this.showChildView("clickViewLinkList",new ce.c(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 ce.c(Object.assign(Object.assign({},e),{customCollection:W.BK.filterObjectsByOwnerType(this.model.links,h.N.Customer,this.currentUser.get("customerId")),editable:!0})))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.isClickViewContent=this.model&&!W.BK.canEditVideo(this.model),this.folder=this.model&&this.model.categories.first()}},{key:"shouldRender",value:function(){return!!this.model}},{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()}},{key:"onDestroy",value:function(){this.subtitleUploadService.destroy(),this.resourceUploadService.destroy()}}],y&&Tt(n.prototype,y),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,y}(a.Q.G7)},52808:function(e,t,n){"use strict";n.d(t,{M:function(){return g}});var o=n(43823),i=n(21161),r=n(11306),l=n(31647),s=n(62312),a=n(85475),u=n(93569),c=n(94407),p=n.n(c),f={svg:"QbFgf",typeaheadContainer:"Y3ErG",disabled:"VTCM4"};function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){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,y(o.key),o)}}function y(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=m(t),function(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(t,e),n=t,c=[{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"search-container ".concat(f.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.N0.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||l.Q.Ry.throw(new r.H("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new l.Q.Hn),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=o.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"bindings",get:function(){var e,t,n;return e={},t="[name=".concat(this.options.inputName,"]"),n={observe:this.options.stickItProperty,setOptions:{validate:!0}},(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"clearInput",value:function(){this.getUI("input").typeahead("val",null)}},{key:"setInput",value:function(e){this.getUI("input").typeahead("val",e)}},{key:"onTypeaheadSelect",value:function(e,t){var n;e.preventDefault(),n="string"==typeof t?t:t.title||t.name||t.query,this.model.set(this.options.stickItProperty,n),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 i.isArray(this.options.typeaheadConfigs)?s.J.getSearchSources(this.options.typeaheadConfigs):s.J.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?i.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return i.isObject(this.options.actionOptions)?i.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){i.isObject(this.options.callbacks)&&(i.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",i.bind(this.options.callbacks.onRender,this)),i.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),i.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",i.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",i.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:f},this.options),{showRemove:this.shouldShowRemove(),svgRemove:a.Nj.getSvg(a.vn.Close)})}},{key:"onRender",value:function(){var e=this;this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),o.Validation.bind(this),this.toggleRemove(),this.options.autofocus&&window.requestAnimationFrame((function(){e.getUI("input").focus()}))}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),o.Validation.unbind(this)}}],c&&h(n.prototype,c),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,c}(l.Q.wA)},44237:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<p class="alert alert-warning mb-0">'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.limitText:r,t))+"</p>\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<div class="file-drop '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.fileDrop:r,t))+" p-2"+(null!=(r=n.if.call(a,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:"")+'">\n <button class="browse btn btn-outline-dark me-2">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"browse",{name:"lang",hash:{},data:i}))+'</button>\n <span class="text-secondary align-middle">'+s(l(null!=(r=null!=t?t.options:t)?r.alternateText:r,t))+"</span>\n</div>\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,l=e.lambda;return"<h5>"+e.escapeExpression(l(null!=(r=null!=t?t.options:t)?r.title:r,t))+"</h5>\n<p>"+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.description:r,t))?r:"")+"</p>\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})},61571:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.escapeExpression;return'<div class="'+s("function"==typeof(l=null!=(l=n.dropMask||(null!=t?t.dropMask:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"dropMask",hash:{},data:i}):l)+'">\n <h3>'+s(e.lambda(null!=(r=null!=t?t.options:t)?r.fileDropText:r,t))+"</h3>\n</div>"},useData:!0})},97237:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda;return'<span class="d-inline-block align-middle me-2 '+e.escapeExpression(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' float-end text-success">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.tickSvg:r,t))?r:"")+"</span>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="d-inline-block align-middle me-2 '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' cursor-pointer cancel-upload btn-close float-end" role="button" aria-label="Close"></span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,p="function";return'<span class="d-inline-block align-middle me-2 '+a(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>\n<span class="align-middle">\n '+a(typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:c)===p?l.call(u,{name:"name",hash:{},data:i}):l)+"\n</span>\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:"")+'\n<div class="progress my-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.progress:r,t))+' mt-2">\n <div class="progress-bar bg-blue" style="width: '+a(typeof(l=null!=(l=n.progress||(null!=t?t.progress:t))?l:c)===p?l.call(u,{name:"progress",hash:{},data:i}):l)+'%" aria-valuenow="'+a(typeof(l=null!=(l=n.progress||(null!=t?t.progress:t))?l:c)===p?l.call(u,{name:"progress",hash:{},data:i}):l)+'" aria-valuemin="0" aria-valuemax="100"></div>\n</div>'},useData:!0})},85985:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression;return'<a class="float-end '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-secondary delete">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<span class="d-inline-block align-middle me-2 '+a(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>\n<a href="'+a("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(u,{name:"url",hash:{},data:i}):l)+"?name="+a(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+'" class="align-middle">\n '+a(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+"\n</a>\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})},41165:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<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>\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||l).call(r,"subheading",{name:"lang",hash:{},data:i}))+'</p>\n<div class="form-group mb-1">\n <label for="url">'+s((n.lang||t&&t.lang||l).call(r,"urlLabel",{name:"lang",hash:{},data:i}))+'</label>\n <input name="url" id="url" class="form-control" type="text" placeholder="'+s((n.lang||t&&t.lang||l).call(r,"urlPlaceholder",{name:"lang",hash:{},data:i}))+'">\n <div class="form-feedback"></div>\n</div>\n<div class="form-group mb-1" id="name-container" style="display: none;">\n <input type="text" class="form-control" name="name" placeholder="'+s((n.lang||t&&t.lang||l).call(r,"namePlaceholder",{name:"lang",hash:{},data:i}))+'">\n <div class="form-feedback"></div>\n</div>\n<div class="attach-btn-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h5 class="pt-2">Resource links</h5>\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})},43791:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region ps-2"></div>'},useData:!0})},56730:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return e.propertyIsEnumerable,'<form>\n <div class="form-group">\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>\n <div class="typahead-region"></div>\n </div>\n</form>'},useData:!0})},71060:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,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;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\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:"")+'\n<div class="subtitles-list-region"></div>'},useData:!0})},51069:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"col-5"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{};return'<div class="tab-region"></div>\n\n<div class="row py-3">\n <div class="'+(null!=(r=n.if.call(l,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:"")+'">\n <div class="clickview-subtitles-list-region"></div>\n </div>\n <div class="col-7">\n <div class="subtitles-upload-region"></div>\n <div class="subtitles-upload-list-region p-0 col-8"></div>\n <div class="customer-subtitles-list-region p-0 col-8"></div>\n </div>\n</div>\n\n<div class="row border-top py-3">\n <div class="'+(null!=(r=n.if.call(l,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:"")+'">\n <div class="clickview-resources-list-region"></div>\n </div>\n <div class="col-7">\n <div class="resources-upload-region"></div>\n <div class="resources-upload-list-region p-0 col-8"></div>\n <div class="customer-resources-list-region p-0 col-8"></div>\n </div>\n</div>\n\n<div class="row border-top py-3">\n <div class="'+(null!=(r=n.if.call(l,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:"")+'">\n <div class="clickview-link-list-region"></div>\n </div>\n <div class="col-7">\n <div class="add-links-region mb-2"></div>\n <div class="customer-link-list-region p-0 col-8"></div>\n </div>\n</div>'},useData:!0})},94407:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,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,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<input\n name="'+s(l(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\n type="text"\n class="form-control '+(null!=(r=n.unless.call(a,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(l(null!=(r=null!=t?t.options:t)?r.additionalClasses:r,t))+'"\n id="'+s(l(null!=(r=null!=t?t.options:t)?r.inputId:r,t))+'"\n autocomplete="off"\n placeholder="'+s(l(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'"\n '+(null!=(r=n.if.call(a,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:"")+"\n "+(null!=(r=n.unless.call(a,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:"")+'\n></input>\n<span class="svg-container mb-2 '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svg:r,t))+' remove" style="display: none;">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.svgRemove:r,t))?r:"")+"</span>"},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[576],{86347:function(e,t,r){r.d(t,{b:function(){return u},n:function(){return s}});var n=r(32735),a=r(92802),i=r(53808),l=r(85887);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var c=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r};function s(e){var t=e.castInitialValues,r=e.castValuesOnSubmit,s=e.initialValues,u=e.onSubmit,d=c(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),m=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=l.t.deepClone(e);return function e(r){Object.keys(t).forEach((function(n){t.hasOwnProperty(n)&&(l.t.isObject(r[n])?e(r[n]):null===t[n]&&delete t[n])}))}(t),t}(s)):s,f={allowInitialSubmit:e.allowInitialSubmit};return n.createElement(a.J9,Object.assign({enableReinitialize:!0},d,{initialValues:m,onSubmit:function(t,n){var a=n.setSubmitting,i=n.resetForm,l=n.setFieldError,c=r&&e.validationSchema?e.validationSchema.cast(t):t;u(c,(function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r.reset&&i(),r.errors)for(var n=0,c=Object.entries(r.errors);n<c.length;n++){var s=(e=c[n],t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],d=s[1];l(u,d)}a(!1)}))},initialStatus:f}),i.q.isFunction(e.children)?function(t){return e.children(t)}:n.Children.count(e.children)?e.children:null)}function u(){return(0,a.u6)()}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},80576:function(e,t,r){r.r(t),r.d(t,{PendingRequestsView:function(){return et}});var n=r(32735),a=r(35656),i=r(31647),l=r(57857),o=r(86120),c=r(23689),s=r(86242),u=r(66703),d=r(90335),m=r(15408),f=r(2491),p=r(30317),b=r(22430),v=r(50997),y=r(68893),h=r(48404),g=r(19226),E=r(95061),S=r(52076),N=r(70065),R=r(86347),w=r(42648),O=r(92802),x=r(5173),C=r(77105),j=r(63151),q=r(42120),L=r(85475),I=r(39396),T=function(e){switch(e){case"up":return"JAT0R";case"down":return"ld41u";case"right":return"HHkPe";case"left":return"jZTRR"}};function P(e){return n.createElement(I.x,{svgName:L.vn.Caret,className:"".concat(T(e.direction)," svg-container d-inline-block ").concat(e.className)})}P.defaultProps={direction:"right"};var k=r(58424),A=r(85887);function D(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,o=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){o=!0,i=e},f:function(){try{l||null==r.return||r.return()}finally{if(o)throw i}}}}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw a}}return o}}(e,t)||_(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){if(e){if("string"==typeof e)return V(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?V(e,t):void 0}}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function B(e,t,r){if(j.m.isEqual(e.id,t))return[e,r];var n,a=e.children;if(!a||!a.length)return[null,null];for(var i=0;i<a.length;i++){var l=F(B(a[i],t,[].concat(function(e){if(Array.isArray(e))return V(e)}(n=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||_(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e])),2),o=l[0],c=l[1];if(o)return[o,c]}return[null,null]}var U={find:function(e,t){if(e&&e.children&&e.children.length)for(var r=0;r<e.children.length;r++){var n=F(B(e.children[r],t,[]),1)[0];if(n)return n}},getPath:function(e,t){if(e&&e.children&&e.children.length)for(var r=0;r<e.children.length;r++){var n=F(B(e.children[r],t,[]),2)[1];if(null==n?void 0:n.length)return n}},getParent:function(e,t){var r=U.getPath(e,t);return(null==r?void 0:r.length)?r[r.length-1]:null},convertNestedObjectToTree:function(e){var t,r=Object.assign(Object.assign({},e.data),{children:e.children});return(null===(t=r.children)||void 0===t?void 0:t.length)&&(r.children=r.children.map(U.convertNestedObjectToTree)),r},findDepth:function(e,t){var r,n,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!e||0===e.length)return 0;var i,l=0,o=D(e);try{for(o.s();!(i=o.n()).done;){var c=i.value;if((null===(n=null===(r=c.data)||void 0===r?void 0:r.id)||void 0===n?void 0:n.toString())===t.toString())return a;var s=U.findDepth(c.children,t,a+1);if(s>0){l=s;break}}}catch(e){o.e(e)}finally{o.f()}return l},findMaxChildDepth:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e||0===e.length)return t;var r,n=t,a=D(e);try{for(a.s();!(r=a.n()).done;){var i=r.value,l=U.findMaxChildDepth(i.children,t+1);n=Math.max(n,l)}}catch(e){a.e(e)}finally{a.f()}return n},findTargetNode:function(e,t){var r,n;if(!e||0===e.length)return null;var a,i=D(e);try{for(i.s();!(a=i.n()).done;){var l=a.value;if((null===(n=null===(r=l.data)||void 0===r?void 0:r.id)||void 0===n?void 0:n.toString())===t.toString())return l;var o=U.findTargetNode(l.children,t);if(null!==o)return o}}catch(e){i.e(e)}finally{i.f()}return null},isMaxDepth:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:7,a=U.findTargetNode(e,t);return U.findMaxChildDepth(a.children)+U.findDepth(e,r)>=n},flatten:function(e){if(!e)return[];var t=[];return e.children.forEach((function e(r){t.push(A.t.omit(r,["children"])),r.children.forEach(e)})),t}},M=r(21326),Q={tree:"ZYvBT",text:"eVGWe",chevron:"v76mu",disabled:"wIrTq",root:"JDRq_",selected:"wT87N",actions:"fKJU4",node:"gOBrH",noActions:"fKmrr"};function H(e){var t;function r(){var t="".concat(Q.text," clamp-4");return e.className&&(t+=" ".concat(e.className)),t}if(e.isDisabled){var a="string"==typeof e.disabledTooltip?e.disabledTooltip:null===(t=e.disabledTooltip)||void 0===t?void 0:t.call(e,e.tree);return n.createElement(M.u,{title:a,spanHack:!0,spanHackClassName:"d-inline-block flex-grow-1"},n.createElement("span",{className:"".concat(r()," text-secondary ").concat(Q.disabled)},e.text))}return n.createElement("div",{className:r()},e.text)}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var z="tree-actions";function Y(e){var t,r,a,l=e.tree,o=e.selectedIds,c=e.getAppLink,s=e.onSelect,u=e.isDisabled,d=e.isClickDisabled,m=e.actions,f=e.isDropdown,p=n.useRef(null),b=n.useMemo((function(){return null==o?void 0:o.some((function(e){return U.find(l,e)}))}),[l,o]),v=e.openDepth&&e.depth<e.openDepth,y=(r=n.useState(b||v),a=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw a}}return o}}(r,a)||function(e,t){if(e){if("string"==typeof e)return G(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?G(e,t):void 0}}(r,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),h=y[0],g=y[1],E=null==o?void 0:o.some((function(e){return j.m.isEqual(l.id,e)})),S=!!l.children&&!!l.children.length;function N(){(null==d?void 0:d(l))||(e.multiSelect||g(!h),c?i.Q.C$.trigger(c(l)):(null==u?void 0:u(l))?s(null):null==s||s(l))}return e.maxDisplayDepth&&S&&(S=e.depth<e.maxDisplayDepth),n.useEffect((function(){if(p.current&&f){var e=function(e){e.stopPropagation(),N()};return p.current.addEventListener("click",e),function(){p.current&&p.current.removeEventListener("click",e)}}}),[p.current,s]),n.useEffect((function(){var t;e.multiSelect||h&&(b||E||!(null===(t=e.selectedIds)||void 0===t?void 0:t.length)&&(null==u?void 0:u(e.tree))||v||g(!1))}),[o]),e.maxDisplayDepth&&e.depth>e.maxDisplayDepth?n.createElement(n.Fragment,null):n.createElement("li",{className:"position-relative ".concat(h?"":Q.collapsed," ").concat(e.isRoot?Q.root:"")},n.createElement("div",{className:"position-relative"},n.createElement(k.L,{className:(t="py-1 d-flex align-items-center w-100 position-relative ".concat(Q.node),E&&(t+=" "+e.selectedLinkClassName),(null==m?void 0:m.length)||(t+=" "+Q.noActions),b&&e.multiSelect&&(t+=" text-underline fst-italic"),t),onClick:f?null:N,ref:p},S&&n.createElement("div",{className:Q.chevron,onClick:function(t){t.stopPropagation(),e.multiSelect?g(!h):N()}},n.createElement(P,{direction:h?"down":"right"})),n.createElement(H,{tree:l,text:l.name||l.description,isDisabled:(null==u?void 0:u(l))||(null==d?void 0:d(l)),disabledTooltip:e.disabledTooltip})),!!e.actions&&n.createElement(q.e,{className:Q.actions,actions:null==m?void 0:m.map((function(e){return Object.assign(Object.assign({},e),{appLink:e.getAppLink(l)})})),actionsDropdownClassName:"btn btn-light ".concat(z," py-0")}),h&&n.createElement(K,Object.assign({key:l.id},e,{isChild:!0,depth:e.depth+1}))))}Y.defaultProps={selectedLinkClassName:Q.selected};var X=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r};function K(e){var t=e.tree,r=X(e,["tree"]);return t&&t.children?n.createElement("ul",{className:"m-0 p-0 list-unstyled ".concat(Q.tree)},t.children.map((function(t,a){return n.createElement(Y,Object.assign({key:a,tree:t},r,{isRoot:!e.isChild,depth:e.depth||0}))}))):n.createElement(n.Fragment,null)}var $=r(21974),J=r(264),W=r(39123),Z={selectButton:"Jh8Ep",createNew:"hnfdj"},ee="libraryRequests.destinationForm",te=(0,x.Ry)().shape({library:(0,x.Ry)().required(),folder:(0,x.Ry)().required()});function re(e){var t,r,a,i,l,o,c,s=(0,R.b)();(0,W.g)((function(e,t){var r=e.find((function(e){return e.id.toString()===s.values.library.id.toString()}));if(r){s.setFieldValue("library",r,!0);var n=U.find(r,t.id);n&&s.setFieldValue("folder",n,!0)}}));var d=e.libraryRequest.sender&&"".concat(e.libraryRequest.sender.name," ").concat(e.libraryRequest.sender.surname),m="";return(null===(t=e.libraryRequest.senderCustomer)||void 0===t?void 0:t.id.toString())!==e.currentUser.get("customerId").toString()&&(m=null===(r=e.libraryRequest.senderCustomer)||void 0===r?void 0:r.name),n.createElement("div",{className:"bg-white rounded p-3 mb-3"},n.createElement(O.l0,null,n.createElement("div",{className:"row"},n.createElement("div",{className:"col-9"},!!d&&n.createElement("div",{className:"row mb-3"},n.createElement("div",{className:"col-3"},n.createElement("label",null,n.createElement(u.x,{namespace:ee,phrase:"requestedBy"}))),n.createElement("div",{className:"col-9"},n.createElement(n.Fragment,null,d,!!m&&n.createElement(n.Fragment,null," (",m,")")))),n.createElement("div",{className:"row mb-3"},n.createElement("div",{className:"col-3"},n.createElement("label",null,n.createElement(u.x,{namespace:ee,phrase:"videoSource"}))),n.createElement("div",{className:"col-9"},!!e.libraryRequest.sourceLibrary&&n.createElement("span",{className:"badge p-1 me-1 text-white ".concat($.u.mapSourceToClass(e.libraryRequest.sourceLibrary.type))},$.u.mapSourceToDisplayName(e.libraryRequest.sourceLibrary,J.g.hasLite)),!!e.libraryRequest.sourceCategory&&n.createElement("span",{className:"ms-2"},e.libraryRequest.sourceCategory.name))),n.createElement("div",{className:"row mb-3"},n.createElement("div",{className:"col-3"},n.createElement("label",null,n.createElement(u.x,{namespace:ee,phrase:"addTo"}))),n.createElement("div",{className:"col-9"},e.libraries.length>1&&n.createElement("div",{className:"dropdown mb-2"},n.createElement("button",{className:"dropdown-toggle form-control text-start position-relative ".concat(Z.selectButton),type:"button",id:"select-library","data-bs-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},n.createElement("div",{className:"text-truncate"},null!==(i=null===(a=s.values.library)||void 0===a?void 0:a.name)&&void 0!==i?i:n.createElement(u.x,{namespace:ee,phrase:"selectALibrary"}))),n.createElement("div",{className:"dropdown-menu w-100","aria-labelledby":"select-library"},e.libraries.map((function(e,t){var r,a,i=e.id.toString()===(null===(a=null===(r=s.values.library)||void 0===r?void 0:r.id)||void 0===a?void 0:a.toString());return n.createElement("div",{className:"dropdown-item cursor-pointer ".concat(i?"active":""),key:t,onClick:function(){s.setFieldValue("library",e,!0),s.setFieldValue("folder",null,!0)}},e.name)})))),n.createElement("div",{className:"dropdown mb-2"},n.createElement("button",{className:"dropdown-toggle form-control text-start position-relative ".concat(Z.selectButton),type:"button",id:"select-folder","data-bs-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",disabled:!s.values.library},n.createElement("div",{className:"text-truncate"},null!==(o=s.values.library&&(null===(l=s.values.folder)||void 0===l?void 0:l.name))&&void 0!==o?o:n.createElement(u.x,{namespace:ee,phrase:"selectAFolder"}))),n.createElement("div",{className:"dropdown-menu w-100","aria-labelledby":"select-folder"},n.createElement(w.$B,{autoHeight:!0,autoHeightMax:300,hideTracksWhenNotNeeded:!0},n.createElement(K,{tree:s.values.library,onSelect:function(e){return s.setFieldValue("folder",e,!0)},selectedIds:(null===(c=s.values.folder)||void 0===c?void 0:c.id)?[s.values.folder.id]:void 0,selectedLinkClassName:"bg-light fw-semibold",isDropdown:!0}),s.values.library&&n.createElement(C.F,{className:"btn fw-bold rounded-0 w-100 text-start ".concat(Z.createNew),appLink:{application:v.OV.LIBRARY_REQUESTS,action:v.eX.Shared.NEW_FOLDER,args:[s.values.library.id]}},n.createElement(u.x,{namespace:ee,phrase:"createNew"})))))))),n.createElement("div",{className:"col-3"},n.createElement("div",{className:"d-flex justify-content-end"},n.createElement("button",{type:"button",className:"btn btn-link",onClick:e.onReject},n.createElement(u.x,{namespace:ee,phrase:"reject"})),n.createElement("button",{type:"submit",className:"btn btn-dark",disabled:!s.isValid},n.createElement(u.x,{namespace:ee,phrase:"approve"})))))))}function ne(e){function t(t,r){var n,a,i,l,o,c,s={location:N.LZ.LibraryRequestDetails,actionType:t,entity:N.py.LibraryRequest,workflowPhase:N.eu.Start},u={id:e.libraryRequest.id,videoId:null===(n=e.libraryRequest.object)||void 0===n?void 0:n.id,requestingUserId:null===(a=e.libraryRequest.sender)||void 0===a?void 0:a.id,sourceLibraryId:null===(i=e.libraryRequest.sourceLibrary)||void 0===i?void 0:i.id,sourceFolderId:null===(l=e.libraryRequest.sourceCategory)||void 0===l?void 0:l.id,destinationLibraryId:null===(o=null==r?void 0:r.library)||void 0===o?void 0:o.id,destinationFolderId:null===(c=null==r?void 0:r.folder)||void 0===c?void 0:c.id};S.k.logUserAction(u,s)}return n.createElement(R.n,{initialValues:{library:e.libraries.find((function(t){var r;return t.id.toString()===(null===(r=e.libraryRequest.destinationLibrary)||void 0===r?void 0:r.id.toString())})),folder:e.libraryRequest.destinationCategory},validationSchema:te,onSubmit:function(r){t(N.Vw.Approve,r),i.Q.C$.trigger({application:v.OV.LIBRARY_REQUESTS,action:v.eX.LibraryRequests.APPROVE,args:[e.libraryRequest.id],params:{libraryId:r.library.id,folderId:r.folder.id,queryParams:e.queryParams}})},validateOnMount:!0,enableReinitialize:!1},n.createElement(re,{libraries:e.libraries,libraryRequest:e.libraryRequest,onReject:function(){t(N.Vw.Reject),i.Q.C$.trigger({application:v.OV.LIBRARY_REQUESTS,action:v.eX.LibraryRequests.REJECT,args:[e.libraryRequest.id],params:e.queryParams})},currentUser:e.user}))}function ae(){return n.createElement("div",{className:"bg-white rounded p-3 mb-3"},n.createElement("div",{className:"row"},n.createElement("div",{className:"col-3"},n.createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"6rem"}})),n.createElement("div",{className:"col-6"},n.createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"9rem"}})),n.createElement("div",{className:"col-3 d-flex justify-content-end align-items-center"},n.createElement("div",{className:"partial-loading-background rounded",style:{height:"1.25rem",width:"3rem"}}),n.createElement("div",{className:"partial-loading-background rounded ms-2",style:{height:"2.5rem",width:"5rem"}})),n.createElement("div",{className:"col-3"},n.createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"7rem"}})),n.createElement("div",{className:"col-6 mb-2"},n.createElement("div",{className:"partial-loading-background rounded mb-1",style:{height:"2.5rem"}}),n.createElement("div",{className:"partial-loading-background rounded",style:{height:"2.5rem"}}))))}var ie={HIGH:.75,MODERATE:.5},le={circleContainer:"p8Vgz",backgroundCircle:"asGGE",circleSuccess:"PXLNj",circleWarning:"ZckRN",circleDanger:"slBRg",lgCircleContainer:"N8KCI",xsCircleContainer:"RPqZ2",pendingCircle:"DKrcq",centredPercentageText:"tpmLR"};function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ce(e,t,r){return(t=function(e){var t=function(e){if("object"!=oe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=oe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var se,ue=.2,de=.36;!function(e){e.Small="small",e.Large="large",e.ExtraSmall="extraSmall"}(se||(se={}));var me,fe=ce(ce(ce({},se.ExtraSmall,{size:2}),se.Small,{size:2}),se.Large,{size:5.8});function pe(e){var t=fe[e].size,r=e===se.Large?de:ue;return"".concat(t/2-2*r,"rem")}function be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ie;return e>=t.HIGH?le.circleSuccess:e>=t.MODERATE?le.circleWarning:le.circleDanger}function ve(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ie;return e>=t.HIGH?"text-success":e>=t.MODERATE?"text-warning":"text-danger"}function ye(e,t){var r="d-inline-block ".concat(le.circleContainer);return e===se.Large&&(r+=" ".concat(le.lgCircleContainer)),e===se.ExtraSmall&&(r+=" ".concat(le.xsCircleContainer)),he(t)&&(r+=" ".concat(le.pendingCircle)),r}function he(e){return"number"!=typeof e}function ge(e){var t=n.useCallback((function(t){if(t){var r=t.r.baseVal.value,n=2*Math.PI*r,a=n-e.percentage*n;t.style.strokeDasharray="".concat(n," ").concat(n),t.style.strokeDashoffset=a.toString()}}),[e.percentage]);return n.createElement("svg",null,n.createElement("circle",{r:pe(e.size),className:le.backgroundCircle}),!he(e.percentage)&&n.createElement("circle",{ref:t,r:pe(e.size),className:be(e.percentage,e.scoreThresholds)}))}function Ee(e){var t,r,a=function(e){if(!he(e))return+e.toFixed(2)}(e.percentage),i=e.size||(e.layout===me.LabelInside?se.Large:se.Small),l=e.customLabel||(he(r=a)?"--%":"".concat(Math.round(100*r),"%"));return e.layout===me.LabelOnly?n.createElement("span",{className:ve(a)},l):n.createElement("div",{className:"d-flex align-items-center justify-content-between ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.layout===me.LabelBefore&&n.createElement("span",{className:"me-2"},l),n.createElement("div",{className:ye(i,a)},n.createElement(ge,{percentage:a,size:i,scoreThresholds:e.scoreThresholds}),e.layout===me.LabelInside&&n.createElement("span",{className:le.centredPercentageText},l)))}!function(e){e.CircleOnly="circle_only",e.LabelOnly="label_only",e.LabelBefore="label_before",e.LabelInside="label_inside"}(me||(me={})),Ee.defaultProps={layout:me.CircleOnly};var Se="libraryRequests.count";function Ne(e){return n.createElement("div",{className:"bg-white rounded px-3 py-2 mb-3 d-flex align-items-center"},n.createElement(Ee,null),n.createElement("div",{className:"ps-2"},n.createElement(u.x,{namespace:Se,phrase:"count",options:{smartCount:e.count.count}})))}var Re=r(38611),we=r(49824),Oe=r(9033),xe=r(7044),Ce=r(17950),je=r(32178),qe=r(50072),Le=r(88070);function Ie(e){return Ie="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},Ie(e)}function Te(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Pe(n.key),n)}}function Pe(e){var t=function(e){if("object"!=Ie(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ie(t)?t:t+""}function ke(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ke=function(){return!!e})()}function Ae(e){return Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ae(e)}function De(e,t){return De=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},De(e,t)}var Fe="libraryRequests.privateLibraryRequestError",_e=function(e){function t(e,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,r){return t=Ae(t),function(e,t){if(t&&("object"==Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ke()?Reflect.construct(t,r||[],Ae(e).constructor):t.apply(e,r))}(this,t,[l.T.getPhrase(Fe,"title")])).hasMultipleCustomers=e,n.availableLibraries=r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&De(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"PrivateLibraryResourceError"}},{key:"heading",get:function(){return l.T.getPhrase(Fe,"heading")}},{key:"description",get:function(){return this.hasMultipleCustomers?l.T.getPhrase(Fe,"multiCustomersDescription",{libraries:this.availableLibraries.join(", ")}):l.T.getPhrase(Fe,"description")}}])&&Te(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Le.H),Ve=r(25796),Be=r(41026),Ue=r(59198),Me=r(85739),Qe=r(30328),He=r(64429),Ge=r(56535),ze=r(56154),Ye="libraryRequests.pendingRequestsEmptyState",Xe=l.T.encloseNamespace(Ye);function Ke(e){return n.createElement("div",{className:"bg-white rounded p-3 py-5"},n.createElement(Ge.u,null,n.createElement(Ge.u.Image,{src:ze.W.EmptyStates.PENDING_REQUESTS}),n.createElement(Ge.u.Info,{className:"mb-1"},n.createElement(u.x,{namespace:Ye,phrase:"info"})),e.hasLibraries&&n.createElement(Ge.u.Cta,{text:Xe("cta"),className:"btn btn-link text-info",appLink:{application:v.OV.LIBRARY_REQUESTS,action:v.eX.LibraryRequests.LIBRARY_REQUEST_SETTINGS_LIBRARIES}})))}function $e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,l,o=[],c=!0,s=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(s)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Je(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Je(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Je(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var We="libraryRequests.pendingRequests",Ze=l.T.encloseNamespace(We);function et(e){var t,r,l,S,N=o.a.useGetFetch(),R=(0,f.Z)(),w=(0,Me.p)(e.queryParams.sort||d.D.Newest,[qe.l.Pending]),O=o.a.useBasicFetch(e.id&&Ve.y.libraryRequest(e.id)),x=(0,Ue.s)(e.id),C=o.a.useBasicFetch(Ve.y.pendingRequestsCount()),j=$e(n.useState(null),2),q=j[0],L=j[1];(0,c.i)(E.T.getLibrariesFetchOptions((function(e){return L(e.toJSON())})),[]),(0,W.g)(L);var I=$e(n.useState(null),2),T=I[0],P=I[1];(0,c.i)(h.p.getConfigFetchOptions(P),[]);var k=$e(n.useState(null),2),A=k[0],D=k[1];(0,c.i)(g.K.getCurrentUserFetchOptions(D),[]);var F=o.a.useBasicFetch(m.N.currentUser()),_=o.a.useBasicFetch((null===(t=F.data)||void 0===t?void 0:t.isAuthenticated)&&m.N.customers(F.data.id)),V=_&&(null===(r=_.data)||void 0===r?void 0:r.data.length)>1,B=q&&q.map((function(e){return e.name}));(0,p.v)(O,null,{forbidden:!0}),n.useEffect((function(){_.hasCompleted&&q&&O.statusCode===a.o.Forbidden&&i.Q.Ry.throw(new _e(V,B))}),[O.statusCode,V,null==B?void 0:B.length]),(0,Qe.A)({id:e.id,requests:w.items,appLink:{application:v.OV.LIBRARY_REQUESTS,action:v.eX.LibraryRequests.PENDING_REQUESTS,params:e.queryParams}}),(0,He.m)(O.data,"pending",e.queryParams),(0,Be.K)(O.data);var U=((null===(l=w.items)||void 0===l?void 0:l.length)||w.hasCompleted)&&q&&T&&F.data&&_.data,M=O.data&&x.hasCompleted;return n.createElement("div",null,n.createElement("h1",{className:"h2"},n.createElement(u.x,{namespace:We,phrase:"title"})),n.createElement("div",{className:"mb-3"},n.createElement(s.Oo,{breadcrumbs:[{name:Ze("libraryEditor"),appLink:{application:v.OV.LIBRARY_EDITOR,action:v.eX.LibraryEditor.HOME}},{name:Ze("title"),active:!0}]})),n.createElement(je.A,{active:"pending"}),!U||(null===(S=w.items)||void 0===S?void 0:S.length)?n.createElement(n.Fragment,null,n.createElement("div",{className:"d-flex justify-content-end mb-3"},n.createElement(Ce.F,{appLink:{application:v.OV.LIBRARY_REQUESTS,action:v.eX.LibraryRequests.PENDING_REQUESTS,args:[e.id]},queryParams:e.queryParams})),n.createElement("div",{className:"row"},n.createElement("div",{className:"col-4"},U?n.createElement(n.Fragment,null,n.createElement(Ne,{count:C.data}),n.createElement(Oe.q,{libraryRequests:w.items,selectedId:e.id,appLink:{application:v.OV.LIBRARY_REQUESTS,action:v.eX.LibraryRequests.PENDING_REQUESTS},queryParams:e.queryParams,fetchNext:w.fetchNext,isFetching:w.isFetching,nextCursor:w.nextCursor})):n.createElement(xe.p,null)),n.createElement("div",{className:"col-8"},U&&M?n.createElement(n.Fragment,null,n.createElement(ne,{key:O.data.id,libraryRequest:O.data,libraries:q,queryParams:e.queryParams,user:A}),n.createElement(Re.x,{libraryRequest:O.data,config:T,user:A,currentUser:F.data,createViewKey:function(t,r){var n=Ve.y.createViewKey(e.id,(function(e){return r(new y.y(e))}),(function(e){return R.error(b.M.libraryApiError(e))}));N(n)},comments:x.items})):n.createElement(n.Fragment,null,n.createElement(ae,null),n.createElement(we.j,null))))):n.createElement(Ke,{hasLibraries:!!q.length}))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5814],{54096:function(e,t,r){r.d(t,{G:function(){return a}});var n=r(32735),o=r(21679);function a(e){var t,r;return t=e,r=o.u.getInstance(t),n.useEffect((function(){return function(){o.u.releaseInstance(t)}})),r}},90335:function(e,t,r){var n;r.d(t,{D:function(){return n}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series",e.ProductionYear="production_year"}(n||(n={}))},2491:function(e,t,r){r.d(t,{Z:function(){return i}});var n=r(92159),o=r(21186),a=r(54096);function i(){var e=(0,a.G)(n.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:o.NK.Warning,heading:o.R6.Warning,message:t})}}}},94223:function(e,t,r){r.d(t,{P:function(){return s}});var n=r(32735),o=r(70680),a=r(35656),i=r(53808),u=r(86120);function c(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t,r){function a(e){if(e)return i.q.isFunction(t)?c(t(e)):c(e.data)}function l(e){var t,n;if(e)return r?r(e):null===(n=null===(t=e.pagination)||void 0===t?void 0:t.cursors)||void 0===n?void 0:n.next}return(0,o.v9)((0,n.useMemo)((function(){return function(t){if(i.q.isFunction(e)){for(var r=e,n=i.q.isFunction(e)&&r(),o=n&&u.a.getResponse(t,n),s=o&&o.isFetching,d=o&&o.statusCode,f=o&&o.hasCompleted,p=f,y=o&&o.shouldFetch,v=a(o&&o.data),m=l(o&&o.data),b=function(e){if(e)return null==e?void 0:e.count}(o&&o.data);m&&(o=u.a.getResponse(t,r(m)),s=s||o.isFetching,d=o.statusCode,f=o.hasCompleted,!o.shouldFetch);){var h=a(o.data);h&&v.push.apply(v,c(h));var g=l(o.data);m=g===m?null:g}var I={shouldInitialFetch:y,items:v,nextCursor:m,isFetching:s,statusCode:d,hasCompleted:f,hasFirstPageCompleted:p};return"number"==typeof b&&(I.totalItems=b),I}}}),[e]))}a.o.Ok},50072:function(e,t,r){var n;r.d(t,{l:function(){return n}}),function(e){e.Pending="Pending",e.Approved="Approved",e.Rejected="Rejected",e.Closed="Closed",e.AutoApproved="AutoApproved"}(n||(n={}))},85739:function(e,t,r){r.d(t,{p:function(){return u}});var n=r(32735),o=r(86120),a=r(94223),i=r(25796);function u(e,t){var r=o.a.useGetFetch(),u=function(r){return i.y.libraryRequests(e,t,r)},c=function(e){return r(u(e))},l=(0,a.P)(u&&function(e){return u(e).key});return n.useEffect((function(){l&&l.shouldInitialFetch&&c()}),[e,t]),Object.assign(Object.assign({},l),{fetchNext:c})}},31170:function(e,t,r){r.r(t),r.d(t,{ApproveLibraryRequestView:function(){return C}});var n=r(32735),o=r(57857),a=r(31647),i=r(86120),u=r(52076),c=r(70065),l=r(4231),s=r(83996),d=r(66703),f=r(90335),p=r(2491),y=r(22430),v=r(50997),m=r(50072),b=r(25796),h=r(85739);function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var I="libraryRequests.approve",A=o.T.encloseNamespace(I);function C(e){var t,r,o,C=(r=n.useState(!1),o=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,i,u=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(r,o)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),R=C[0],S=C[1],w=i.a.useGetFetch(),F=(0,p.Z)(),E=(0,h.p)(e.queryParams.sort||f.D.Newest,[m.l.Pending]),P=i.a.useBasicFetch(b.y.libraryRequest(e.libraryRequestId)),q=i.a.useBasicFetch(b.y.library(e.libraryId)),k=i.a.useBasicFetch(b.y.folder(e.folderId));function j(){!function(){var t,r,n,o,a={location:c.LZ.Popup,actionType:c.Vw.Approve,entity:c.py.LibraryRequest,workflowPhase:c.eu.Complete},i={id:P.data.id,videoId:null===(t=P.data.object)||void 0===t?void 0:t.id,requestingUserId:null===(r=P.data.sender)||void 0===r?void 0:r.id,sourceLibraryId:null===(n=P.data.sourceLibrary)||void 0===n?void 0:n.id,sourceFolderId:null===(o=P.data.sourceCategory)||void 0===o?void 0:o.id,destinationLibraryId:e.libraryId,destinationFolderId:e.folderId};u.k.logUserAction(i,a)}(),F.success(A("success"));var t=E.items.findIndex((function(t){return t.id.toString()===e.libraryRequestId.toString()})),r=E.items[t+1];a.Q.C$.trigger({application:v.OV.LIBRARY_REQUESTS,action:v.eX.LibraryRequests.PENDING_REQUESTS,args:[(null==r?void 0:r.id)||""],params:e.queryParams},{replace:!0})}var L=((null===(t=E.items)||void 0===t?void 0:t.length)||E.hasCompleted)&&!!P.data&&!!q.data&&!!k.data;return n.createElement(l.G,{title:A("title"),closePopup:e.closePopup,showLoadingSpinner:!L},L&&n.createElement(n.Fragment,null,n.createElement("p",null,n.createElement(d.x,{namespace:I,phrase:"confirmation",options:{videoName:P.data.object.name,libraryName:q.data.name,folderName:k.data.name}})),n.createElement(s.u,null,n.createElement(s.u.Cancel,{onClick:e.closePopup}),n.createElement(s.u.Submit,{onClick:function(){S(!0);var t={response:m.l.Approved,metadata:{destinationLibraryId:e.libraryId,destinationCategoryId:e.folderId}};w(b.y.fulfilRequest(e.libraryRequestId,t,j,(function(e){return F.error(y.M.libraryApiError(e))}),e.closePopup))},text:A("approve"),showSpinner:R,variant:"dark"}))))}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5972],{680:function(e,t,n){"use strict";n.r(t),n.d(t,{LeftNavigationView:function(){return se}});var o=n(21679),r=n(99249),i=n(31647),l=n(52076),a=n(70065),s=n(36357),u=n(85475),c=n(45390),p=n(14177),f=n(33800),d=n(29457),y=n(48404),h=n(19226),g=n(43823),v=n(57857),m=n(88483),b=n(50997),w=n(71641),O=n(41238),k=n.n(O),L={imageContainer:"mh27r",imageMask:"aklBj",dropdownContainer:"tqZpr",dropdownButton:"aTbSF",image:"V_4dx",addCrest:"zD8lx",plusSvg:"gYx3Z"};function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function 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,C(o.key),o)}}function C(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(e)}function T(e,t){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},T(e,t)}var R=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=I(t),function(e,t){if(t&&("object"==S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_()?Reflect.construct(t,n||[],I(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T(e,t)}(t,e),o=t,r=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"upload:logo",(function(){l.k.logUserAction({},e.getAnalyticsOptions("create"))}))}},{key:"name",get:function(){return"CustomerLogoComponent"}},{key:"template",get:function(){return k()}},{key:"lang",get:function(){return"libraryEditor.customerLogo"}},{key:"className",get:function(){return"text-center p-3 position-relative"}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle"}}},{key:"regions",value:function(){return{options:{replaceElement:!0,el:".options-region"}}}},{key:"events",value:function(){return e={},n="onClickAddLogo",(t=C(t="click .".concat(L.addCrest)))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:b.YR,channelName:this.options.channelName,eventName:"upload:logo",buttonSelector:".upload-logo",imageType:m.__.Logos,saveImage:function(t){Promise.all([n.e(4027),n.e(1934),n.e(7153),n.e(4719)]).then(n.bind(n,51547)).then((function(n){n.CropperHelper.renderCropper({src:t,alt:"",onClickCrop:function(t,n){g.Radio.channel(e.options.channelName).trigger("upload:image",t),e.listenToOnce(b.Vk.CUSTOMER,"".concat(b.M_.CREATE_LOGO,":sync"),n)},imageType:m.__.Logos,popupSize:"md"})}))}}]}},{key:"onClickAddLogo",value:function(){l.k.logUserAction({},this.getAnalyticsOptions("create"))}},{key:"getCustomerLogoActions",value:function(){return[{title:v.T.getPhrase(this.lang,"uploadImage"),channelName:this.options.channelName,eventName:"upload:logo"},{title:v.T.getPhrase(this.lang,"removeImage"),analyticsOptions:this.getAnalyticsOptions("remove"),classes:"text-danger",appLink:{application:b.OV.LIBRARY_EDITOR,action:b.eX.LibraryEditor.REMOVE_LOGO,args:[this.model.get("id"),this.options.customerId]}}]}},{key:"getAnalyticsOptions",value:function(e){return{actionType:"create"===e?a.Vw.Create:a.Vw.Remove,entity:a.py.Logo,workflowPhase:a.eu.Start,location:a.LZ.LeftNav,eventVersion:"create"===e?a.eq.V2:a.eq.V1}}},{key:"viewOptions",value:function(){return{styles:L,dropdownSvg:u.Nj.getSvg(u.vn.More),plusSvg:u.Nj.getSvg(u.vn.Plus)}}},{key:"onRender",value:function(){var e;(null===(e=this.model)||void 0===e?void 0:e.get("url"))&&this.showChildView("options",new w.w({analyticsHelper:l.k,displayOptions:{alignment:"start"},channelName:this.options.channelName,collection:new i.Q.FE(this.getCustomerLogoActions())}))}}],r&&E(o.prototype,r),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,r}(i.Q.wA),j=n(78507),N=n(50299),P=n(93569),x=n(6929),D=n(61522),M=n(69175),V=n(99223),A=n.n(V);function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function B(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Y(o.key),o)}}function G(e,t,n){return t&&F(e.prototype,t),n&&F(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y(e){var t=function(e){if("object"!=U(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(t)?t:t+""}function Z(e,t,n){return t=q(t),function(e,t){if(t&&("object"==U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,z()?Reflect.construct(t,n||[],q(e).constructor):t.apply(e,n))}function z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(z=function(){return!!e})()}function q(e){return q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},q(e)}function Q(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}var X="library:left:nav",J=function(e){function t(e){return B(this,t),Z(this,t,[e])}return Q(t,e),G(t,[{key:"initialize",value:function(){var e=this.options.forceOpen||this.options.libraryId&&this.model.get("id").toString()===this.options.libraryId.toString();this.viewModel=r.r.get("".concat(X,":").concat(this.model.get("id"))),this.viewModel.set("open",e),this.viewModel.set("disabled",!1),this.listenTo(this.model,"change:name",this.render),this.options.hasMultipleLibraries&&this.listenTo(this,"open:sub:folders",this.onOpenSubFolders),this.videoDragDropService=o.u.getInstance(c.K9.VideoDragDrop,this)}},{key:"name",get:function(){return"LeftNavLibraryComponent"}},{key:"template",get:function(){return A()}},{key:"className",get:function(){return j.Z.libraryContainer}},{key:"behaviors",get:function(){var e=[c.jr.FOLDER_DRAG_DROP];return this.options.hasMultipleLibraries&&e.push(c.jr.VIDEO_DRAG_DROP),[{behaviorClass:x.x,ui:"anchor",channelNames:e,analyticsOptions:{location:a.LZ.LeftNav}}]}},{key:"regions",value:function(){return{folders:{el:".folders-region",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".ui-anchor":{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.LIBRARY,args:[this.model.get("id")]}}}},{key:"events",value:function(){return{"click .library-event":"onClick"}}},{key:"elements",get:function(){return{anchor:".ui-anchor",text:".ui-text"}}},{key:"onClick",value:function(e){this.viewModel.get("open")&&(e.stopImmediatePropagation(),e.preventDefault(),this.viewModel.set("open",!this.viewModel.get("open")),this.render())}},{key:"onOpenSubFolders",value:function(){if(this.videoDragDropService.getDisabledLibraryIds().includes(this.model.get("id")))return this.viewModel.set("disabled",!0),void this.render();this.viewModel.set("open",!0),this.render()}},{key:"hasFolders",value:function(){return!!P.PU.getFirstType(this.model.children,"category")}},{key:"analyticsOptions",get:function(){return{location:a.LZ.LeftNav}}},{key:"viewOptions",value:function(){return{styles:j.Z,caretSvg:u.Nj.getSvg(u.vn.Caret),open:this.viewModel.get("open"),hasFolders:this.hasFolders(),disabled:this.viewModel.get("disabled")}}},{key:"onRender",value:function(){this.showChildView("actions",new D.J({model:this.model,extraClasses:"rounded-circle me-1 ".concat(j.Z.actions),buttonClass:"text-secondary",analyticsOptions:this.analyticsOptions})),this.model.children&&this.model.children.length&&this.viewModel.get("open")&&this.showChildView("folders",new N.J({appLink:{action:c.eX.LibraryEditor.FOLDER,application:c.OV.LIBRARY_EDITOR},linkArgs:function(e){return[e.get("id")]},collection:this.model.children,channelName:"".concat(this.cid),childrenProperty:"children",actions:M.c,folderTreeId:this.options.folderTreeId,analyticsOptions:this.analyticsOptions}))}}])}(i.Q.wA),H=function(e){function t(e){return B(this,t),Z(this,t,[e])}return Q(t,e),G(t,[{key:"name",get:function(){return"LeftNavLibrariesComponent"}},{key:"childView",get:function(){return J}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,libraryId:this.options.libraryId,folderTreeId:this.options.folderTreeId,forceOpen:this.options.forceOpen,hasMultipleLibraries:this.collection.length>1}}}])}(i.Q.$W),K=n(95061),$=n(32122),ee=n.n($),te={addLibrary:"ii_E8",addLibraryContainer:"WroNW",plus:"zhT_f"};function ne(e){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(e)}function oe(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,re(o.key),o)}}function re(e){var t=function(e){if("object"!=ne(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ne(t)?t:t+""}function ie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ie=function(){return!!e})()}function le(e){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(e)}function ae(e,t){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ae(e,t)}var se=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=le(t),function(e,t){if(t&&("object"==ne(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ie()?Reflect.construct(t,n||[],le(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ae(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=o.u.getInstance(f.O.Settings,this),this.imageUploadDataService=o.u.getInstance(f.O.ImageUpload,this),this.customerDataService=o.u.getInstance(f.O.Customer,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:library",this.onSelectLibrary),this.listenTo(this.channelName,"upload:image",this.onUploadLogo),this.listenTo(c.Vk.LIBRARY,"cache:cleared",this.fetchData),this.listenTo(c.jr.FOLDER_DRAG_DROP,"re:render:left:nav",this.render),this.listenTo(c.Vk.SETTINGS,"".concat(c.M_.CUSTOMER_SETTINGS,":sync ").concat(c.M_.USER_SETTINGS,":sync"),this.render),this.listenTo(c.Vk.CUSTOMER,"".concat(c.M_.LOGO,":sync ").concat(c.M_.LOGO,":invalidate"),this.render)}},{key:"name",get:function(){return"LeftNavigationView"}},{key:"title",get:function(){return!1}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.leftNavigation"}},{key:"className",get:function(){return"bg-white pb-3"}},{key:"template",get:function(){return ee()}},{key:"regions",value:function(){return{logo:{el:".logo-region",replaceElement:!1},folderTree:{el:".folder-tree-region",replaceElement:!1,partialLoading:d.LP.LeftNav}}}},{key:"events",value:function(){return{"click .new-folder":"newFolder"}}},{key:"appLinks",get:function(){return{".applink-new-library":{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.NEW_LIBRARY}}}},{key:"fetchData",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),s.E.MaxCustomLibraries),this.customerLogo=this.customerDataService.getLogo(this.currentUser.get("customerId"))}},{key:"onSelectLibrary",value:function(e){this.collection.each((function(t){r.r.get("".concat(X,":").concat(t.id)).set("open",t.id.toString()===e)})),this.render()}},{key:"onUploadLogo",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,d.__.Logos,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){this.customerDataService.createLogo(this.currentUser.get("customerId"),e.get("id"),e.get("fileIdType"),(function(e){l.k.logUserAction({id:e.get("id")},{location:a.LZ.LeftNav,actionType:a.Vw.Create,entity:a.py.Logo,workflowPhase:a.eu.Complete,eventVersion:a.eq.V2})}))}},{key:"renderLogo",value:function(){this.showChildView("logo",new R({model:this.customerLogo,customerId:this.currentUser.get("customerId"),channelName:this.channelName}))}},{key:"renderLeftNav",value:function(){var e=new H({collection:this.collection,channelName:this.channelName,libraryId:this.options.libraryId,folderTreeId:p.J.LIBRARY_EDITOR,forceOpen:1===this.collection.length});this.showChildView("folderTree",e)}},{key:"requiredResources",get:function(){return{currentUser:h.K.currentUser,config:y.p.config,collection:K.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.maxCustomLibraries}},{key:"viewOptions",value:function(){if(this.collection)return{styles:te,plusSvg:u.Nj.getSvg(u.vn.Plus),canCreateLibraries:!!this.maxCustomLibraries&&this.maxCustomLibraries.get("value")>this.collection.length}}},{key:"onRender",value:function(){this.renderLogo(),this.renderLeftNav()}}])&&oe(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.G7)},41238:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,a=e.lambda,s=e.escapeExpression;return'<a class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageContainer:i,t))+' mx-auto d-block">\n <div class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageMask:i,t))+' rounded-3"></div>\n\n <div class="position-absolute text-white '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.dropdownContainer:i,t))+'">\n <span data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.dropdownButton:i,t))+' d-inline-block ui-dropdown-toggle">\n '+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.dropdownSvg:i,t))?i:"")+'\n </span>\n <div class="options-region"></div>\n </div>\n\n <img src="'+s("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"url",hash:{},data:r}):l)+'" class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+' rounded-3"/>\n</a>\n<span class="upload-logo d-none"></span>\n'},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<a class="d-flex flex-column justify-content-center align-items-center mx-auto no-decoration rounded-3 upload-logo '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addCrest:i,t))+'">\n <div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.plusSvg:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+'</div>\n <div class="w-75">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"addCrest",{name:"lang",hash:{},data:r}))+"</div>\n</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.url:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:""},useData:!0})},99223:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selected:i,t))},5:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda;return' <span class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.caret:i,t))+' d-inline-block position-absolute">\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.caretSvg:i,t))?i:"")+"\n </span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,a=e.lambda,s=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<div class="position-relative '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.library:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'">\n <a class="position-relative library-event '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.libraryAnchor:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.open:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' ui-anchor no-hover-text-underline">\n'+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.hasFolders:i,{name:"if",hash:{},fn:e.program(5,r,0),inverse:e.noop,data:r}))?i:"")+' <span class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.text:i,t))+' ui-text">'+s("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:e.hooks.helperMissing)?l.call(u,{name:"name",hash:{},data:r}):l)+'</span>\n </a>\n <div class="actions-region"></div>\n</div>\n<div class="folders-region"></div>'},useData:!0})},32122:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibraryContainer:i,t))+'">\n <button class="applink-new-library btn btn-outline-secondary '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibrary:i,t))+'">\n <span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.plus:i,t))+' d-inline-block position-absolute">\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+"\n </span>\n "+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"newLibrary",{name:"lang",hash:{},data:r}))+"\n </button>\n</div>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,'<div class="logo-region"></div>\n<div class="folder-tree-region"></div>\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateLibraries:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6239],{24828:function(e,t,n){"use strict";n.d(t,{o:function(){return r}});var r=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},22231:function(e,t,n){"use strict";function r(e,t){return t[e.charCodeAt(0)%t.length]}n.d(t,{x:function(){return r}})},26239:function(e,t,n){"use strict";n.r(t),n.d(t,{EditFolderImagesView:function(){return $}});var r=n(43823),o=n(21161),i=n(21679),a=n(99249),l=n(31647),u=n(52076),c=n(70065),s=n(10101),p=n(58025),f=n(88172),h=n(45390),m=n(29457),d=n(67670),y=n(18375),g=n(48404),b=n(93569),v=n(57857),w=n(24828),I=n(22231),k=n(86983),C=n.n(k),T={removeImage:"daDCA",imageElement:"U_0tb",banner:"J28Xw",thumbnail:"OoZ6O",imageContainer:"RWdbM"};function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E(r.key),r)}}function E(e){var t=function(e){if("object"!=_(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_(t)?t:t+""}function j(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(j=function(){return!!e})()}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var P=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=B(t),function(e,t){if(t&&("object"==_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,j()?Reflect.construct(t,n||[],B(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),n=t,o=[{key:"initialize",value:function(){this.viewModel=a.r.get("edit:folder:images")}},{key:"name",get:function(){return"EditImageComponent"}},{key:"template",get:function(){return C()}},{key:"lang",get:function(){return"libraryEditor.editImage"}},{key:"className",get:function(){return this.options.imageType===m.__.Thumbnails?"".concat(T.thumbnail," mb-2"):"".concat(T.banner," mt-2")}},{key:"events",value:function(){return e={},n="onClickRemoveImage",(t=E(t="click .".concat(T.removeImage)))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.YR,channelName:this.options.channelName,buttonSelector:".btn-outline-dark",imageType:this.options.imageType,saveImage:function(t,n){n?(e.viewModel.set({dataUrl:t,type:e.options.imageType}),l.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.EDIT_FOLDER_IMAGES,args:[e.options.folderId]})):r.Radio.channel(e.options.channelName).trigger("select:image",t,e.options.imageType)}}]}},{key:"onClickRemoveImage",value:function(){r.Radio.channel(this.options.channelName).trigger("show:dialog",this.options.imageType)}},{key:"getImageUrl",value:function(){var e=this.options.imageType===m.__.Banners?"createBannerUrl":"createFolderThumbnailUrl";return b.jw[e](this.options.originalImage)}},{key:"getImageTypeText",value:function(){switch(this.options.imageType){case m.__.Banners:return v.T.getPhrase(this.lang,"banner");case m.__.Thumbnails:return v.T.getPhrase(this.lang,"thumbnail")}}},{key:"viewOptions",value:function(){return{styles:T,imageUrl:this.getImageUrl(),backgroundColor:(0,I.x)(this.options.folderName,w.o),hasImage:this.options.originalImage&&this.options.originalImage.get("id"),imageTypeText:this.getImageTypeText(),dimensions:h.yE[this.options.imageType],recommendedDimensions:h.nq[this.options.imageType]}}}],o&&O(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(l.Q.wA),R=n(80322),x=n.n(R);function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,M(r.key),r)}}function M(e){var t=function(e){if("object"!=U(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=U(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==U(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}var L,F=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=V(t),function(e,t){if(t&&("object"==U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,N()?Reflect.construct(t,n||[],V(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"EditImagesWrapperComponent"}},{key:"template",get:function(){return x()}},{key:"regions",value:function(){return{banner:{el:".banner-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"renderBanner",value:function(){this.showChildView("banner",new P({channelName:this.options.bannerChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:m.__.Banners,folderName:this.options.folderName,originalImage:this.options.bannerImage,folderId:this.options.folderId}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new P({channelName:this.options.thumbnailChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:m.__.Thumbnails,folderName:this.options.folderName,originalImage:this.options.thumbnailImage,folderId:this.options.folderId}))}},{key:"onRender",value:function(){this.renderBanner(),this.renderThumbnail()}}])&&D(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(l.Q.wA),W=n(42687),Z=n.n(W),H="EOVMO";function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function z(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q(r.key),r)}}function Q(e){var t=function(e){if("object"!=Y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Y(t)?t:t+""}function q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(q=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X(e,t)}!function(e){e[e.Upload=0]="Upload",e[e.Crop=1]="Crop"}(L||(L={}));var $=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=G(t),function(e,t){if(t&&("object"==Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,q()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}(t,e),n=t,v=[{key:"initialize",value:function(){this.popupContentState=L.Upload,this.viewModel=a.r.get("edit:folder:images"),this.viewModel.get("dataUrl")&&(this.selectedImageType=this.viewModel.get("type"),this.newImageEl=new Image,this.newImageEl.src=this.viewModel.get("dataUrl"),this.spinnerModel.set(f.ZV.Disabled,!1),this.popupContentState=L.Crop),this.libraryDataService=i.u.getInstance(h.Or.Library,this),this.imageUploadDataService=i.u.getInstance(h.Or.ImageUpload,this),this.bindListeners()}},{key:"name",get:function(){return"EditFolderImagesView"}},{key:"title",get:function(){return"Edit Folder Images"}},{key:"template",get:function(){return Z()}},{key:"channelName",get:function(){return b.N0.generateUniqueChannelName(this)}},{key:"regions",value:function(){return{content:{el:".content-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .back-btn":"onClickBackButton","shown.bs.modal":"renderCropper"}}},{key:"elements",get:function(){return{backBtn:".back-btn",cancelBtn:".cancel-btn"}}},{key:"behaviors",get:function(){return[{title:"Edit folder images",behaviorClass:s.Yw,size:"modal-lg",buttons:[{text:"Back",className:"btn btn-outline-dark back-btn ".concat(H)}],spinnerButtonOptions:{model:this.spinnerModel=new d.v((e={},t=f.ZV.Hidden,n=!0,(t=Q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e)),channelName:this.channelName,buttonText:"Continue",onClick:this.onClickCrop,extraButtonClass:"btn-dark"},cancelButtonOptions:{className:"btn btn-dark cancel-btn",text:"Close"}}];var e,t,n}},{key:"requiredResources",get:function(){return{config:g.p.config}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(h.Vk.LIBRARY,"".concat(h.M_.FOLDER,":").concat(this.options.folderId,":sync"),this.render);var t="".concat(this.channelName,":").concat(m.__.Banners),n="".concat(this.channelName,":").concat(m.__.Thumbnails);this.listenTo(t,"select:image",(function(t){return e.onSelectImage(t,m.__.Banners)})),this.listenTo(n,"select:image",(function(t){return e.onSelectImage(t,m.__.Thumbnails)})),this.listenTo(t,"show:dialog",(function(){return e.onShowDialog(m.__.Banners)})),this.listenTo(n,"show:dialog",(function(){return e.onShowDialog(m.__.Thumbnails)})),this.listenTo(t,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(n,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(this.channelName,p.Y.ImageCropped,this.onImageCropped)}},{key:"onClickBackButton",value:function(){this.popupContentState!==L.Upload&&(this.popupContentState=L.Upload,this.selectedImageType=null,this.newImageEl=null,this.spinnerModel.set(f.ZV.Disabled,!0),this.renderContent())}},{key:"onClickCrop",value:function(){r.Radio.channel(this.channelName).trigger(p.Y.CropImage).trigger(f.I3.ShowSpinner)}},{key:"onSelectImage",value:function(e,t){this.selectedImageType=t,this.newImageEl=new Image,this.newImageEl.src=e,this.popupContentState=L.Crop,this.spinnerModel.set(f.ZV.Disabled,!1),this.renderCropper()}},{key:"onImageCropped",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,this.selectedImageType,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this,n={libraryId:this.libraryId,folderId:this.options.folderId,currentImageId:this.getCurrentImageId(),imageModel:e},r=this.selectedImageType===m.__.Banners?c.py.Banner:c.py.Thumbnail,o=this.selectedImageType===m.__.Banners?"addOrUpdateBanner":"addOrUpdateThumbnail";this.libraryDataService[o](n,(function(e){u.k.logUserAction({libraryId:t.libraryId,folderId:t.options.folderId,id:e.get("id")},{actionType:c.Vw.Upload,entity:r,workflowPhase:c.eu.Complete,location:c.LZ.Popup}),t.onFinish()}))}},{key:"onShowDialog",value:function(e){var t=this,n=new b.Mr({title:"Remove image?",text:"Are you sure you want to remove this image?",buttons:[{text:"Remove",className:"btn btn-danger",success:!0},{text:"Cancel",className:"btn btn-link",close:!0}],channelName:this.options.channelName});setTimeout((function(){return n.render().done((function(){return t.removeImage(e)}))}),200),this.triggerMethod("hide")}},{key:"removeImage",value:function(e){var t=this,n=e===m.__.Banners?"deleteBanner":"deleteThumbnail",r=e===m.__.Banners?this.currentBanner:this.currentThumbnail,o={libraryId:this.libraryId,folderId:this.model.get("id"),imageId:r.get("id")},i=e===m.__.Banners?c.py.Banner:c.py.Thumbnail;this.libraryDataService[n](o,(function(){u.k.logUserAction({libraryId:t.libraryId,folderId:t.model.get("id"),id:r.get("id")},{actionType:c.Vw.Delete,entity:i,workflowPhase:c.eu.Complete,location:c.LZ.Popup}),e===m.__.Banners&&(t.currentBanner=null),e===m.__.Thumbnails&&(t.currentThumbnail=null),t.onFinish()}))}},{key:"onFinish",value:function(){this.viewModel.clear(),l.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.EDIT_FOLDER_IMAGES,args:[this.options.folderId]})}},{key:"getCurrentImageId",value:function(){return this.selectedImageType===m.__.Banners&&this.currentBanner?this.currentBanner.get("id"):this.selectedImageType===m.__.Thumbnails&&this.currentThumbnail?this.currentThumbnail.get("id"):void 0}},{key:"getCropRegionWidth",value:function(){return this.$el.find(".modal-body").width()}},{key:"getImageModel",value:function(){return new y.E({dataUrl:this.newImageEl.src,width:this.newImageEl.width,height:this.newImageEl.height})}},{key:"renderContent",value:function(){this.popupContentState===L.Upload&&(this.getUI("backBtn").addClass(H),this.getUI("cancelBtn").removeClass(H),r.Radio.channel(this.channelName).trigger(f.I3.HideButton),this.showChildView("content",new F({imageCdnUrl:this.config.get("imageCdnUrl"),folderName:this.model.get("name"),bannerImage:this.currentBanner,thumbnailImage:this.currentThumbnail,bannerChannel:"".concat(this.channelName,":").concat(m.__.Banners),thumbnailChannel:"".concat(this.channelName,":").concat(m.__.Thumbnails),folderId:this.options.folderId})))}},{key:"renderCropper",value:function(){this.popupContentState===L.Crop&&(this.getUI("backBtn").removeClass(H),this.getUI("cancelBtn").addClass(H),r.Radio.channel(this.channelName).trigger(f.I3.ShowButton),this.showChildView("content",new p.a({model:this.getImageModel(),channelName:this.channelName,imageType:this.selectedImageType,minWidth:h.yE[this.selectedImageType].width,minHeight:h.yE[this.selectedImageType].height,getCropRegionWidth:o.bind(this.getCropRegionWidth,this)})))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.libraryId,spinnerEl:b.Kp.getSpinner({size:b.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onBeforeRender",value:function(){var e=this;this.model&&this.libraryId||(this.model=this.libraryDataService.getFolder(this.options.folderId),this.libraryDataService.getLibraries((function(t){return e.libraryId=t.first().id})))}},{key:"onRender",value:function(){this.model&&this.libraryId&&(this.currentBanner=this.model.get("banner"),this.currentThumbnail=this.model.get("thumbnail"),this.renderContent())}},{key:"onBeforeDestroy",value:function(){this.viewModel.clear()}}],v&&z(n.prototype,v),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,v}(l.Q.G7)},58025:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},a:function(){return y}});var r,o=n(43823),i=n(51934),a=n.n(i),l=n(31647),u=n(91465),c=n.n(u);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function f(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));var y=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=m(t),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"text-center"}},{key:"elements",get:function(){return{image:".img"}}},{key:"getMinCropBoxWidth",value:function(){return this.options.minWidth*this.getViewportToImageRatio()}},{key:"getMinCropBoxHeight",value:function(){return this.options.minHeight*this.getViewportToImageRatio()}},{key:"getViewportToImageRatio",value:function(){return this.options.getCropRegionWidth()/this.model.get("width")}},{key:"crop",value:function(){var e=this.cropper.getCroppedCanvas().toDataURL(this.getImageMimeType());o.Radio.channel(this.options.channelName).trigger(r.ImageCropped,e)}},{key:"getImageMimeType",value:function(){var e=this.model.get("dataUrl").match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(e)return e[1]}},{key:"renderCropper",value:function(){this.getMinCropBoxWidth();var e=this.getUI("image").get(0);this.cropper=new(a())(e,{viewMode:1,aspectRatio:this.options.minWidth/this.options.minHeight,minCropBoxWidth:this.getMinCropBoxWidth(),minCropBoxHeight:this.getMinCropBoxHeight(),autoCropArea:1})}},{key:"onRender",value:function(){this.renderCropper()}},{key:"onBeforeDestroy",value:function(){this.cropper.destroy()}}])&&p(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(l.Q.wA)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var f=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=s(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,n||[],s(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return a(a({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&l(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},86983:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumRecommended",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.width:i},data:o}))+"\n"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumActual",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.width:i},data:o}))+"\n"},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'<button class="'+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.removeImage:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"remove",{name:"lang",hash:{},data:o}))+" "+l(a(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,u=e.escapeExpression,c=e.lambda;return'<h6 class="mb-0">'+u((n.lang||t&&t.lang||l).call(a,"edit",{name:"lang",hash:{},data:o}))+" "+u(c(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+'</h6>\n<div class="text-secondary mb-1">\n <em>\n'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")+' </em>\n</div>\n<div class="my-1 '+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageContainer:i,t))+'">\n <div class="'+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageElement:i,t))+" "+u(c(null!=(i=null!=t?t.options:t)?i.backgroundColor:i,t))+'" style="background-image: url(\''+u(c(null!=(i=null!=t?t.options:t)?i.imageUrl:i,t))+'\')"></div>\n</div>\n<button class="btn btn-outline-dark my-1">'+u((n.lang||t&&t.lang||l).call(a,"upload",{name:"lang",hash:{},data:o}))+" "+u(c(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasImage:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},80322:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="thumbnail-region"></div>\n<div class="dropdown-divider"></div>\n<div class="banner-region"></div>'},useData:!0})},42687:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return'<div class="content-region"></div>\n'},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},91465:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:o}):i)+'" class="img img-fluid" />'},useData:!0})}}]);