@clickview/library-editor 1.11.0 → 1.11.1-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 (162) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/101-library-editor-389fe4dd5e.chunk.css +2 -0
  3. package/dist/css/{8906-library-editor-7e2a53583a.chunk.css → 1086-library-editor-cc4b3d990e.chunk.css} +3 -7
  4. package/dist/css/1203-library-editor-016463a9e3.chunk.css +11 -0
  5. package/dist/css/1409-library-editor-bc215e1152.chunk.css +1 -0
  6. package/dist/css/{1601-library-editor-ecad02e1a4.chunk.css → 1601-library-editor-f2f7a579a7.chunk.css} +2 -6
  7. package/dist/css/{1832-library-editor-16982d18f9.chunk.css → 1832-library-editor-e123877850.chunk.css} +0 -1
  8. package/dist/css/{1887-library-editor-2e57df189d.chunk.css → 1887-library-editor-cca972c080.chunk.css} +11 -29
  9. package/dist/css/1911-library-editor-689507eb58.chunk.css +17 -0
  10. package/dist/css/243-library-editor-decee8d957.chunk.css +2 -0
  11. package/dist/css/{1086-library-editor-7e2a53583a.chunk.css → 2692-library-editor-cc4b3d990e.chunk.css} +3 -7
  12. package/dist/css/3746-library-editor-2c6240c06c.chunk.css +1 -0
  13. package/dist/css/{3969-library-editor-3382f0875b.chunk.css → 3969-library-editor-30997910e2.chunk.css} +0 -2
  14. package/dist/css/4000-library-editor-4c9381e16c.chunk.css +8 -0
  15. package/dist/css/4177-library-editor-4a82cc89e1.chunk.css +13 -0
  16. package/dist/css/{4353-library-editor-ab9b6e56f4.chunk.css → 4353-library-editor-7a8f34cf74.chunk.css} +3 -7
  17. package/dist/css/{4830-library-editor-1d6a95fb9f.chunk.css → 4830-library-editor-a1247bffda.chunk.css} +0 -2
  18. package/dist/css/{4860-library-editor-27c2a56d40.chunk.css → 4860-library-editor-f5eddb2400.chunk.css} +0 -1
  19. package/dist/css/514-library-editor-ff3ae710cc.chunk.css +1 -0
  20. package/dist/css/{5424-library-editor-2ea33d243e.chunk.css → 5424-library-editor-1e43443d6a.chunk.css} +4 -9
  21. package/dist/css/{5747-library-editor-615300053c.chunk.css → 5747-library-editor-de4ea80bfc.chunk.css} +0 -1
  22. package/dist/css/{58-library-editor-272966901c.chunk.css → 58-library-editor-d7f24abcd2.chunk.css} +18 -47
  23. package/dist/css/5891-library-editor-2c6240c06c.chunk.css +1 -0
  24. package/dist/css/5970-library-editor-be87afcf0c.chunk.css +39 -0
  25. package/dist/css/{6093-library-editor-3b3ef2f270.chunk.css → 6093-library-editor-446ee2e049.chunk.css} +0 -1
  26. package/dist/css/{6220-library-editor-e66d80c18a.chunk.css → 6220-library-editor-cfb71135bb.chunk.css} +10 -27
  27. package/dist/css/627-library-editor-29076e38d6.chunk.css +32 -0
  28. package/dist/css/{6732-library-editor-e65d819068.chunk.css → 6732-library-editor-6d33677430.chunk.css} +4 -10
  29. package/dist/css/6963-library-editor-2c6240c06c.chunk.css +1 -0
  30. package/dist/css/{6999-library-editor-c9c844221a.chunk.css → 6999-library-editor-d855c3a356.chunk.css} +12 -34
  31. package/dist/css/{7053-library-editor-43ee5fb1f9.chunk.css → 7053-library-editor-cbe896c46a.chunk.css} +0 -1
  32. package/dist/css/708-library-editor-54b890f687.chunk.css +7 -0
  33. package/dist/css/{7136-library-editor-7f0d6cc8e2.chunk.css → 7136-library-editor-bd1f6e2ee3.chunk.css} +7 -24
  34. package/dist/css/7295-library-editor-cdf829452c.chunk.css +9 -0
  35. package/dist/css/{7634-library-editor-fe9fc69e35.chunk.css → 7634-library-editor-154066beaa.chunk.css} +8 -22
  36. package/dist/css/{8762-library-editor-7e2a53583a.chunk.css → 8762-library-editor-cc4b3d990e.chunk.css} +3 -7
  37. package/dist/css/{2692-library-editor-7e2a53583a.chunk.css → 8906-library-editor-cc4b3d990e.chunk.css} +3 -7
  38. package/dist/css/9379-library-editor-2c6240c06c.chunk.css +1 -0
  39. package/dist/css/{9383-library-editor-898835bbbe.chunk.css → 9383-library-editor-c6a9216107.chunk.css} +11 -27
  40. package/dist/css/{9695-library-editor-a3a0f8d8e8.chunk.css → 9695-library-editor-c5004a1fec.chunk.css} +0 -1
  41. package/dist/css/{9927-library-editor-e3b21e68b0.chunk.css → 9927-library-editor-a11669ad9d.chunk.css} +0 -1
  42. package/dist/css/9976-library-editor-36adaf7380.chunk.css +13 -0
  43. package/dist/css/library-editor-app-2206a274a7.css +59 -0
  44. package/dist/languages/en.json +1 -1
  45. package/dist/scripts/{1216-5fd9636d12.chunk.js → 1216-d2eaa054d9.chunk.js} +1 -1
  46. package/dist/scripts/{1364-ea01d99311.chunk.js → 1364-829c593162.chunk.js} +1 -1
  47. package/dist/scripts/{1409-40f217b9ff.chunk.js → 1409-143f4dbe22.chunk.js} +1 -1
  48. package/dist/scripts/{1601-52f8e3cec5.chunk.js → 1601-8de9a1268a.chunk.js} +2 -2
  49. package/dist/scripts/{1887-4a4581b103.chunk.js → 1887-94b401e383.chunk.js} +1 -1
  50. package/dist/scripts/1911-300b8f6723.chunk.js +1 -0
  51. package/dist/scripts/{1934-3f8be23263.chunk.js → 1934-2a68903c81.chunk.js} +1 -1
  52. package/dist/scripts/{243-5fae01d256.chunk.js → 243-aad803b582.chunk.js} +1 -1
  53. package/dist/scripts/{2802-e26f3e45b0.chunk.js → 2802-8e6b167d04.chunk.js} +1 -1
  54. package/dist/scripts/{3096-6bb727f466.chunk.js → 3096-f3dab15729.chunk.js} +1 -1
  55. package/dist/scripts/{3763-7bc0f591a5.chunk.js → 3763-362fec49af.chunk.js} +1 -1
  56. package/dist/scripts/{4000-1ae4f1c7b4.chunk.js → 4000-90c2c6b3b7.chunk.js} +1 -1
  57. package/dist/scripts/4177-7bcd7d8f58.chunk.js +1 -0
  58. package/dist/scripts/{4353-eb7e1815d1.chunk.js → 4353-31aea0c397.chunk.js} +1 -1
  59. package/dist/scripts/{4885-5665393708.chunk.js → 4885-c57cc4967d.chunk.js} +1 -1
  60. package/dist/scripts/{514-6bbcc11ccd.chunk.js → 514-1cf3235a5b.chunk.js} +1 -1
  61. package/dist/scripts/{5173-1375c05784.chunk.js → 5173-8a6910db27.chunk.js} +1 -1
  62. package/dist/scripts/5235-be21559a4b.chunk.js +1 -0
  63. package/dist/scripts/5745-3212b59a8b.chunk.js +2 -0
  64. package/dist/scripts/{5745-668c325bb8.chunk.js.LICENSE.txt → 5745-3212b59a8b.chunk.js.LICENSE.txt} +3 -3
  65. package/dist/scripts/5747-7775fd8e3c.chunk.js +1 -0
  66. package/dist/scripts/5970-dff014e4ff.chunk.js +2 -0
  67. package/dist/scripts/{6220-24ae226c29.chunk.js → 6220-76eb94f15b.chunk.js} +1 -1
  68. package/dist/scripts/{627-d6a5ccd216.chunk.js → 627-05ff44de8c.chunk.js} +1 -1
  69. package/dist/scripts/{6788-c31fca9e55.chunk.js → 6788-8e09f3bd44.chunk.js} +1 -1
  70. package/dist/scripts/{6995-1472a9ad98.chunk.js → 6995-01a680bb84.chunk.js} +1 -1
  71. package/dist/scripts/{6999-d783593ecd.chunk.js → 6999-b438eaa494.chunk.js} +1 -1
  72. package/dist/scripts/{708-62038305e2.chunk.js → 708-20c405d691.chunk.js} +1 -1
  73. package/dist/scripts/7190-3632c1b97b.chunk.js +1 -0
  74. package/dist/scripts/{7295-610cfe5e68.chunk.js → 7295-8fc4b6b822.chunk.js} +1 -1
  75. package/dist/scripts/{7634-9c882c55f9.chunk.js → 7634-63f4333ed0.chunk.js} +1 -1
  76. package/dist/scripts/8726-4cbbe381ff.chunk.js +1 -0
  77. package/dist/scripts/8727-81c92d12d3.chunk.js +1 -0
  78. package/dist/scripts/9040-70b08a74ae.chunk.js +1 -0
  79. package/dist/scripts/{9357-f27151e9a5.chunk.js → 9357-e68056eb1e.chunk.js} +1 -1
  80. package/dist/scripts/{9927-5fc9373f85.chunk.js → 9927-9c5b52fd04.chunk.js} +1 -1
  81. package/dist/scripts/9976-3c47299575.chunk.js +1 -0
  82. package/dist/scripts/bundle-017d0f8778.min.js +2 -0
  83. package/package.json +2 -3
  84. package/dist/css/101-library-editor-808f785991.chunk.css +0 -4
  85. package/dist/css/1203-library-editor-53b01520c3.chunk.css +0 -14
  86. package/dist/css/1409-library-editor-c2f01466c5.chunk.css +0 -2
  87. package/dist/css/1911-library-editor-f7158ba599.chunk.css +0 -34
  88. package/dist/css/243-library-editor-ef57ff2380.chunk.css +0 -4
  89. package/dist/css/3746-library-editor-76fe7e394b.chunk.css +0 -2
  90. package/dist/css/4000-library-editor-da3fe51fcb.chunk.css +0 -16
  91. package/dist/css/4177-library-editor-4cba18186c.chunk.css +0 -26
  92. package/dist/css/4973-library-editor-df33c921f0.chunk.css +0 -78
  93. package/dist/css/514-library-editor-a74706f512.chunk.css +0 -2
  94. package/dist/css/5891-library-editor-76fe7e394b.chunk.css +0 -2
  95. package/dist/css/627-library-editor-3cd7420a3d.chunk.css +0 -64
  96. package/dist/css/6963-library-editor-76fe7e394b.chunk.css +0 -2
  97. package/dist/css/708-library-editor-7417a89428.chunk.css +0 -14
  98. package/dist/css/7295-library-editor-b0c43d2c79.chunk.css +0 -18
  99. package/dist/css/9379-library-editor-76fe7e394b.chunk.css +0 -2
  100. package/dist/css/9976-library-editor-db9baf23c2.chunk.css +0 -26
  101. package/dist/css/library-editor-app-2091496ed5.css +0 -113
  102. package/dist/scripts/1911-b0ca319b7b.chunk.js +0 -1
  103. package/dist/scripts/4177-b425441d97.chunk.js +0 -1
  104. package/dist/scripts/4973-33da21ba6c.chunk.js +0 -2
  105. package/dist/scripts/5235-bc21e7571f.chunk.js +0 -1
  106. package/dist/scripts/5745-668c325bb8.chunk.js +0 -2
  107. package/dist/scripts/5747-4bbf211b9d.chunk.js +0 -1
  108. package/dist/scripts/7190-52ecd1333c.chunk.js +0 -1
  109. package/dist/scripts/8727-17faa28384.chunk.js +0 -1
  110. package/dist/scripts/8947-7242c90cef.chunk.js +0 -1
  111. package/dist/scripts/9040-cf768d840f.chunk.js +0 -1
  112. package/dist/scripts/9976-f46ac4bb71.chunk.js +0 -1
  113. package/dist/scripts/bundle-5206d50704.min.js +0 -2
  114. /package/dist/scripts/{101-5f391fde59.chunk.js → 101-2cc3ff8d10.chunk.js} +0 -0
  115. /package/dist/scripts/{1010-cca9607505.chunk.js → 1010-db874c3e6e.chunk.js} +0 -0
  116. /package/dist/scripts/{1086-53200b17d0.chunk.js → 1086-b673ebd9ae.chunk.js} +0 -0
  117. /package/dist/scripts/{1203-2fbc5898fa.chunk.js → 1203-a58109bd25.chunk.js} +0 -0
  118. /package/dist/scripts/{1269-5ece71eeb9.chunk.js → 1269-5cffbcb252.chunk.js} +0 -0
  119. /package/dist/scripts/{1601-52f8e3cec5.chunk.js.LICENSE.txt → 1601-8de9a1268a.chunk.js.LICENSE.txt} +0 -0
  120. /package/dist/scripts/{1832-fdaaff5a29.chunk.js → 1832-fd5b7686ca.chunk.js} +0 -0
  121. /package/dist/scripts/{1934-3f8be23263.chunk.js.LICENSE.txt → 1934-2a68903c81.chunk.js.LICENSE.txt} +0 -0
  122. /package/dist/scripts/{259-de67df82b8.chunk.js → 259-962c7919c1.chunk.js} +0 -0
  123. /package/dist/scripts/{2692-960ba7e67f.chunk.js → 2692-48302690ca.chunk.js} +0 -0
  124. /package/dist/scripts/{2802-e26f3e45b0.chunk.js.LICENSE.txt → 2802-8e6b167d04.chunk.js.LICENSE.txt} +0 -0
  125. /package/dist/scripts/{2803-7570954088.chunk.js → 2803-89f9a2f7e2.chunk.js} +0 -0
  126. /package/dist/scripts/{2888-eb32d5080d.chunk.js → 2888-84785fdaab.chunk.js} +0 -0
  127. /package/dist/scripts/{299-31df2ff19f.chunk.js → 299-9441b30e23.chunk.js} +0 -0
  128. /package/dist/scripts/{3400-bd718e889d.chunk.js → 3400-af8bc305c4.chunk.js} +0 -0
  129. /package/dist/scripts/{3639-d119eeab5a.chunk.js → 3639-81854e5c72.chunk.js} +0 -0
  130. /package/dist/scripts/{3746-5c295544de.chunk.js → 3746-eb8689b8aa.chunk.js} +0 -0
  131. /package/dist/scripts/{3969-721ddec9cc.chunk.js → 3969-943c9420c5.chunk.js} +0 -0
  132. /package/dist/scripts/{4201-95bf1e627c.chunk.js → 4201-252f427930.chunk.js} +0 -0
  133. /package/dist/scripts/{4245-a4ab06b0e3.chunk.js → 4245-8cf0fd9f7c.chunk.js} +0 -0
  134. /package/dist/scripts/{4591-3bafdf04eb.chunk.js → 4591-4cce5ce693.chunk.js} +0 -0
  135. /package/dist/scripts/{4830-dfe262f4fd.chunk.js → 4830-d257ad6495.chunk.js} +0 -0
  136. /package/dist/scripts/{4860-b5a0c5a4f7.chunk.js → 4860-a61fc07da6.chunk.js} +0 -0
  137. /package/dist/scripts/{5412-49e9416193.chunk.js → 5412-4974685490.chunk.js} +0 -0
  138. /package/dist/scripts/{5418-e74c7fda2f.chunk.js → 5418-9aa54c0e13.chunk.js} +0 -0
  139. /package/dist/scripts/{5424-95917d027e.chunk.js → 5424-8fdd5fb503.chunk.js} +0 -0
  140. /package/dist/scripts/{546-9118f60b37.chunk.js → 546-f3cbb33611.chunk.js} +0 -0
  141. /package/dist/scripts/{58-05be7f28b0.chunk.js → 58-843e7d0559.chunk.js} +0 -0
  142. /package/dist/scripts/{5891-a032e82ee2.chunk.js → 5891-6f61310f41.chunk.js} +0 -0
  143. /package/dist/scripts/{4973-33da21ba6c.chunk.js.LICENSE.txt → 5970-dff014e4ff.chunk.js.LICENSE.txt} +0 -0
  144. /package/dist/scripts/{6093-b7bb0fe8ff.chunk.js → 6093-04325272eb.chunk.js} +0 -0
  145. /package/dist/scripts/{6732-a203523ce8.chunk.js → 6732-e0a01b8de1.chunk.js} +0 -0
  146. /package/dist/scripts/{6774-ed211c8b34.chunk.js → 6774-9a047cb158.chunk.js} +0 -0
  147. /package/dist/scripts/{6963-11ccb0392a.chunk.js → 6963-62f3f0be14.chunk.js} +0 -0
  148. /package/dist/scripts/{7002-297c6c52fd.chunk.js → 7002-2b3d79cee4.chunk.js} +0 -0
  149. /package/dist/scripts/{7053-58277bab40.chunk.js → 7053-cdc82e2481.chunk.js} +0 -0
  150. /package/dist/scripts/{7136-6d81d93941.chunk.js → 7136-944e4ccce7.chunk.js} +0 -0
  151. /package/dist/scripts/{7376-4d9b431384.chunk.js → 7376-feb982bf08.chunk.js} +0 -0
  152. /package/dist/scripts/{8362-e6279acee7.chunk.js → 8362-7fc63cfe1b.chunk.js} +0 -0
  153. /package/dist/scripts/{8495-718f82fe43.chunk.js → 8495-84aa8f4c80.chunk.js} +0 -0
  154. /package/dist/scripts/{8762-e44f72c32c.chunk.js → 8762-09cceb364b.chunk.js} +0 -0
  155. /package/dist/scripts/{8906-dddb217ad3.chunk.js → 8906-ca7d93a242.chunk.js} +0 -0
  156. /package/dist/scripts/{9268-4dd3486dc4.chunk.js → 9268-a215d62098.chunk.js} +0 -0
  157. /package/dist/scripts/{9379-621391591b.chunk.js → 9379-c2470a6ab7.chunk.js} +0 -0
  158. /package/dist/scripts/{9383-682ac753f6.chunk.js → 9383-8090ded7fd.chunk.js} +0 -0
  159. /package/dist/scripts/{9695-995f37e82e.chunk.js → 9695-9896cd36aa.chunk.js} +0 -0
  160. /package/dist/scripts/{9770-717c5d2e82.chunk.js → 9770-15c287afb4.chunk.js} +0 -0
  161. /package/dist/scripts/{bundle-5206d50704.min.js.LICENSE.txt → bundle-017d0f8778.min.js.LICENSE.txt} +0 -0
  162. /package/dist/scripts/{polyfills-513148dd03.min.js → polyfills-8a6a6be34b.min.js} +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7295],{70680:function(e,t,n){"use strict";n.d(t,{r:function(){return b}});var o=n(31647),i=n(88172),r=n(61843),s=n(57857),l=n(26457),a=n(40622),u=n(97781),c=n.n(u);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function d(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(m,e);var t,n,u,p,b=(u=m,p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(u);if(p){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),b.call(this,e)}return t=m,(n=[{key:"initialize",value:function(){this.spinnerModel=new o.Q.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,a.LibraryEditorActions.MergeChapters,this.onClickMergeChapters)}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return c()}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(i.ZV.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==l.Um.New&&this.model.get("status")!==l.Um.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:s.T.getPhrase(this.lang,"mergeChapters"),subtitles:s.T.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:s.T.getPhrase(this.lang,"enabledCustomSubtitles")},t=new i.Py({buttonText:e[this.options.type],extraButtonClass:"btn-dark ".concat("XKFne"),model:this.spinnerModel,spinnerOptions:{size:r.Ey.Small,type:r.dR.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:a.LibraryEditorActions.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:s.T.getPhrase(this.lang,"chaptersHeading"),line1:s.T.getPhrase(this.lang,"chaptersInfo1"),line2:s.T.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:s.T.getPhrase(this.lang,"subtitlesHeading"),line1:s.T.getPhrase(this.lang,"subtitlesInfo1"),line2:s.T.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:s.T.getPhrase(this.lang,"cvSubtitlesHeading"),line1:s.T.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:s.T.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&s.T.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(i.ZV.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===l.Um.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(o.Q.Component)},21053:function(e,t,n){"use strict";n.d(t,{W:function(){return m}});var o=n(48088),i=n(31647),r={svgContainer:"mtegw"},s=n(43791),l=n.n(s),a=n(88181),u=n(35630),c=n(57085),p=n(57857);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 h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(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)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(m,e);var t,n,i,s,f=(i=m,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(i);if(s){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),f.call(this,e)}return t=m,(n=[{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 l()}},{key:"viewOptions",value:function(){return{styles:r}}},{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:p.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:p.T.getPhrase(this.lang,"chapters")};case"resources":return{name:p.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new u.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new c.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&h(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.Q.Component)},82407:function(e,t,n){"use strict";n.r(t),n.d(t,{EditResourcesView:function(){return Ct}});var o=n(39479),i=n(48088),r=n(31647),s=n(21679),l=n(57857),a=n(25417),u=n(99748),c=n(88410),p=n(81937),f=n(18222),h=n(57769),d=n(83162),y={fileDrop:"ejhuF",dropMask:"fLdBH",dragOver:"_sk3R"},b=n(61571),m=n.n(b),g=n(44237),v=n.n(g);function k(e){return k="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},k(e)}function w(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 C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function O(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(s,e);var t,n,o,i,r=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(o);if(i){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return O(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.call(this,e)}return t=s,(n=[{key:"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:h.Z,buttonSelector:".browse",channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple,mimeType:this.options.mimeType},{behaviorClass:d.V,channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple}]}},{key:"events",value:function(){var e,t,n;return n="onDragLeave",(t="dragleave .".concat(y.dropMask))in(e={"drop .file-drop":"onDrop","dragover .file-drop":"onDragOver"})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"onDrop",value:function(){this.$el.removeClass(y.dragOver)}},{key:"onDragOver",value:function(e){this.$el.addClass(y.dragOver),e.preventDefault()}},{key:"onDragLeave",value:function(){this.$el.removeClass(y.dragOver)}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({},this.options),{styles:y,limitText:this.options.limitText,isClickViewContent:this.options.isClickViewContent})}},{key:"onRender",value:function(){this.getUI("dropArea").append(m()({dropMask:y.dropMask,fileDropText:l.T.getPhrase(this.lang,"drop")}))}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Q.Component),P=n(88181),E=n(61843),R=n(14327),j=n(93638),x=n(10101),L=n(19226),_=n(77605),V=n(70680),I=n(63791),N=n(97237),U=n.n(N),D={svgContainer:"sr9KQ",progress:"Cn0ad"},B=n(53808);function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function M(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function F(e,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},F(e,t)}function q(e,t){if(t&&("object"===A(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}var H=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}(s,e);var t,n,o,i,r=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Q(o);if(i){var n=Q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return q(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.call(this,e)}return t=s,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"FileUploadComponent"}},{key:"template",get:function(){return U()}},{key:"events",value:function(){return{"click .cancel-upload":"onClickCancelUpload"}}},{key:"onClickCancelUpload",value:function(){B.q.isFunction(this.options.onClickCancelUpload)&&this.options.onClickCancelUpload(this.model.get("id"))}},{key:"viewOptions",value:function(){return{styles:D,svg:I.Nj.getSvg(I.vn.Folder),tickSvg:I.Nj.getSvg(I.vn.Check),finished:this.model.get("progress")>=100}}}])&&M(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Q.Component);function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function J(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function K(e,t){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},K(e,t)}function G(e,t){if(t&&("object"===z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Y(e){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Y(e)}var W=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K(e,t)}(l,e);var t,n,o,r,s=(o=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Y(o);if(r){var n=Y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return G(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),s.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"FileUploadsComponentCollection"}},{key:"childView",get:function(){return H}},{key:"childViewOptions",get:function(){var e=this;return{onClickCancelUpload:function(t){i.Radio.channel(e.options.channelName).trigger("cancel:upload",t)}}}}])&&J(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.ComponentCollection),X=n(99249),Z=n(36022),ee=n(19249),te={handleQuery:function(){return function(e,t){var n=[];if(e){var i=CVLanguages.getEnglishNameContains(e);return o.each(i,(function(e,t){n.push({key:t,name:e.englishName})})),t(n)}t()}},getTypeaheadConfig:function(){return function(){return{name:"languages",source:te.handleQuery(),limit:5,display:function(e){return e.name},templates:{suggestion:ee.ou,pending:ee.gb,notFound:ee.TX}}}}},ne=n(56730),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,o.key,o)}}function se(e,t){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},se(e,t)}function le(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)}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}var ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&se(e,t)}(s,e);var t,n,o,i,r=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ae(o);if(i){var n=ae(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return le(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.call(this,e)}return t=s,(n=[{key:"initialize",value:function(e){this.model=X.r.get("subtitle:language",e.defaultLanguage),this.model.addValidation(E.AJ),this.listenTo(this.channelName,"select:language",this.onLanguageSelected)}},{key:"template",get:function(){return oe()}},{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:x.Yw,title:l.T.getPhrase(this.lang,"heading"),buttons:[{text:l.T.getPhrase(this.lang,"submit"),type:"submit",className:"btn btn-dark submit"}]},{behaviorClass:x.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:te.getTypeaheadConfig()}]}},{key:"renderTypeahead",value:function(){this.showChildView("typeahead",new Z.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()}}])&&re(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Q.Component),ce=n(21053),pe=n(18582),fe=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)?l.T.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:o}):o},he=n(85985),de=n.n(he),ye={container:"SizJb",svgContainer:"PuqLQ",actionSvg:"L9P1P"};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 me(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 ge(e,t){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ge(e,t)}function ve(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)}function ke(e){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ke(e)}var we=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ge(e,t)}(s,e);var t,n,o,i,r=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ke(o);if(i){var n=ke(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ve(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"SubtitleItemComponent"}},{key:"template",get:function(){return de()}},{key:"className",get:function(){return"".concat(ye.container," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete"}}},{key:"getEnglishName",value:function(){return fe(this.model.toJSON(),this.model.collection.toJSON())}},{key:"onClickDelete",value:function(){!this.options.isClickViewContent&&B.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){return{styles:ye,svg:I.Nj.getSvg(pe.u.mapTypeToSvg("subtitle")),trashSvg:I.Nj.getSvg(I.vn.Delete),name:this.getEnglishName(),isClickViewContent:this.options.isClickViewContent}}}])&&me(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Q.Component),Ce=n(54758),Oe=n(71060),Se=n.n(Oe);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 Pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ee(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 Re(e,t,n){return t&&Ee(e.prototype,t),n&&Ee(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function je(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&&xe(e,t)}function xe(e,t){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xe(e,t)}function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ve(e);if(t){var i=Ve(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return _e(this,n)}}function _e(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)}function Ve(e){return Ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ve(e)}var Ie=function(e){je(n,e);var t=Le(n);function n(e){return Pe(this,n),t.call(this,e)}return Re(n,[{key:"name",get:function(){return"VideoSubtitlesComponent"}},{key:"template",get:function(){return Se()}},{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 Ne({collection:this.collection,channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}))}}]),n}(r.Q.Component),Ne=function(e){je(n,e);var t=Le(n);function n(e){return Pe(this,n),t.call(this,e)}return Re(n,[{key:"name",get:function(){return"VideoSubtitlesComponentCollection"}},{key:"lang",get:function(){return"libraryEditor.videoSubtitles"}},{key:"childView",get:function(){return we}},{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 Ce.M({title:l.T.getPhrase(this.lang,"removeHeading"),text:l.T.getPhrase(this.lang,"removeBody",{language:this.getEnglishName(e)}),buttons:[{text:l.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:l.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){i.Radio.channel(t.options.channelName).trigger("delete:subtitle",e.get("id"))}))}},{key:"getEnglishName",value:function(e){return fe(e.toJSON(),e.collection.toJSON())}}]),n}(r.Q.ComponentCollection),Ue=n(88172),De=n(7190),Be=n(41165),Ae=n.n(Be);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 Fe(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 qe(e,t){return qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qe(e,t)}function Qe(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)}function He(e){return He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},He(e)}var ze=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qe(e,t)}(a,e);var t,n,o,r,s=(o=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=He(o);if(r){var n=He(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Qe(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=s.call(this,e)).showNameField=!1,t.disableBtn=!0,t}return t=a,(n=[{key:"initialize",value:function(){this.model=X.r.get(this.viewModelName),this.model.addValidation(De.yU),this.bindListeners()}},{key:"name",get:function(){return"AddLinksComponent"}},{key:"template",get:function(){return Ae()}},{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:x.Bp},{behaviorClass:x.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(),i.Radio.channel(this.options.channelName).trigger("add:link",e),this.render()}},{key:"renderAttachButton",value:function(){this.options.hide||this.showChildView("attachBtn",new Ue.Py({saveEvent:"attach:link",channelName:this.options.channelName,buttonText:l.T.getPhrase(this.lang,"attach"),extraButtonClass:"btn-dark attach",disabled:this.disableBtn,buttonType:"submit",spinnerOptions:{size:E.Ey.Medium,type:E.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(),i.Validation.bind(this)}},{key:"onClose",value:function(){this.unstickit(),i.Validation.unbind(this)}}])&&Fe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),Je=n(68708),Ke=n(85835);function $e(e){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$e(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,o.key,o)}}function Ye(e,t){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ye(e,t)}function We(e,t){if(t&&("object"===$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xe(e){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xe(e)}var Ze="shared.errors.tooManyResources",et=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ye(e,t)}(s,e);var t,n,o,i,r=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Xe(o);if(i){var n=Xe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return We(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=r.call(this,"Cannot add that many resources")).resourceLimit=e,t}return t=s,(n=[{key:"name",get:function(){return"TooManyResourcesError"}},{key:"dialogOptions",get:function(){return{title:l.T.getPhrase(Ze,"heading"),text:l.T.getPhrase(Ze,"body",{resourceLimit:this.resourceLimit}),buttons:[{text:l.T.getPhrase(Ze,"okay"),className:"btn btn-dark",success:!0}]}}}])&&Ge(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(Ke.S);function tt(e){return tt="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},tt(e)}function nt(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 ot(e,t){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ot(e,t)}function it(e,t){if(t&&("object"===tt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function rt(e){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rt(e)}var st="shared.errors.tooManySubtitles",lt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ot(e,t)}(s,e);var t,n,o,i,r=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=rt(o);if(i){var n=rt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return it(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=r.call(this,"Cannot add that many subtitles")).subtileLimit=e,t}return t=s,(n=[{key:"name",get:function(){return"TooManySubtitlesError"}},{key:"dialogOptions",get:function(){return{title:l.T.getPhrase(st,"heading"),text:l.T.getPhrase(st,"body",{subtitleLimit:this.subtileLimit}),buttons:[{text:l.T.getPhrase(st,"okay"),className:"btn btn-dark",success:!0}]}}}])&&nt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(Ke.S),at=n(56906),ut=n(40622),ct=n(26457),pt=n(45837),ft=n(70065),ht=n(52076),dt=n(51069),yt=n.n(dt),bt=n(95061);function mt(e){return mt="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},mt(e)}function gt(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 vt(e,t){return vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vt(e,t)}function kt(e,t){if(t&&("object"===mt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function wt(e){return wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wt(e)}var Ct=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vt(e,t)}(b,e);var t,n,h,d,y=(h=b,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=wt(h);if(d){var n=wt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return kt(this,e)});function b(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),y.call(this,e)}return t=b,n=[{key:"initialize",value:function(){this.initializeUploadServices(),this.bindDataListeners(),this.bindViewListeners(),this.bindFileSelectListeners(),E.Si.initBackButton(),this.chapterDataService=s.u.getInstance(P.Or.Chapter,this),this.videoDataService=s.u.getInstance(P.Or.Video,this),this.linkDataService=s.u.getInstance(P.Or.Link,this),this.resourceDataService=s.u.getInstance(P.Or.Resource,this),this.subtitleDataService=s.u.getInstance(P.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 yt()}},{key:"props",get:function(){return["videoDataService"]}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return E.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:x._7}]}},{key:"requiredResources",get:function(){return{currentUser:L.K.currentUser,libraries:bt.T.libraries}}},{key:"initializeUploadServices",value:function(){this.resourceUploadService=new c.L1,this.listenTo(P.jr.RESOURCE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onResourceUploadComplete),this.subtitleUploadService=new c.M_,this.listenTo(P.jr.SUBTITLE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onSubtitleUploadComplete)}},{key:"bindDataListeners",value:function(){this.listenTo(P.Vk.VIDEO,"".concat(P.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(P.Vk.VIDEO,"".concat(P.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(P.Vk.VIDEO,"".concat(P.M_.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(P.Vk.CHAPTER,"".concat(P.M_.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError)}},{key:"bindViewListeners",value:function(){this.listenTo(this.channelName,"add:link",this.onAddLink),this.listenTo(this.channelName,"delete:subtitle",this.onDeleteSubtitle),this.listenTo(this.channelName,"delete:resource",this.onDeleteResource),this.listenTo(this.channelName,"delete:link",this.onDeleteLink),this.listenTo(this.channelName,"cancel:upload",this.onCancelUpload),this.listenTo(this.channelName,ut.LibraryEditorActions.MergeChapters,this.onMergeChapters)}},{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 u.h.NotFound:r.Q.ErrorHelper.throw(new at.l1);break;case u.h.Forbidden:r.Q.ErrorHelper.throw(new at.aV)}}},{key:"onConcatenateDataError",value:function(e){e.type===u.h.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"onSubtitleFilesAdded",value:function(e,t){e.length>5-this.model.subtitles.length?r.Q.ErrorHelper.throw(new lt(5)):(t&&(this.interactionType=t),this.subtitleUploadService.addFiles(e))}},{key:"onResourceFilesAdded",value:function(e,t){e.length>25-this.model.resources.length?r.Q.ErrorHelper.throw(new et(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:j.LP.EditVideoTabs},subtitlesUpload:{el:".subtitles-upload-region",partialLoading:j.LP.EditVideoUploadArea},subtitlesUploadList:".subtitles-upload-list-region",customerSubtitlesList:".customer-subtitles-list-region",clickViewSubtitlesList:".clickview-subtitles-list-region",resourcesUpload:{el:".resources-upload-region",partialLoading:j.LP.EditVideoUploadArea},resourcesUploadList:".resources-upload-list-region",customerResourcesList:".customer-resources-list-region",clickViewResourcesList:".clickview-resources-list-region",addLinks:{el:".add-links-region",partialLoading:j.LP.EditVideoUploadArea},customerLinkList:".customer-link-list-region",clickViewLinkList:".clickview-link-list-region"}}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[ct.Um.SingleFile,ct.Um.ConcatenationFailed];o.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==ct.Um.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.videoDataService.hasPhysicalChapters(e.options.videoId,(function(t){e.hasPhysicalChapters=t,e.renderSubtitleFileSelect()}))}))}},{key:"onDeleteResource",value:function(e){var t=this;this.resourceDataService.deleteResource(this.options.videoId,e,(function(){t.logDeleteAction(ft.EntityType.Resource,e),t.render()}))}},{key:"onDeleteSubtitle",value:function(e){var t=this;this.subtitleDataService.deleteSubtitle(this.options.videoId,e,(function(){t.logDeleteAction(ft.EntityType.Subtitle,e),t.render()}))}},{key:"onDeleteLink",value:function(e){var t=this;this.linkDataService.deleteLink(this.options.videoId,e,(function(){t.logDeleteAction(ft.EntityType.Link,e),t.render()}))}},{key:"onCancelUpload",value:function(e){this.resourceUploadService.cancelUpload(e),this.subtitleUploadService.cancelUpload(e)}},{key:"onResourceUploadComplete",value:function(e){var t=this,n=e.toJSON(),o={fileId:n.fileInfo.id,uploadId:n.file.cvUpload.uploadId,name:n.fileInfo.name,type:f.v.getResourceType(n.fileInfo.extension),extension:n.fileInfo.extension,fileSize:n.fileInfo.size,fileUrl:n.fileInfo.url,ingestUrl:n.file.cvUpload.ingestUrl,metaData:{type:f.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(),o=new ue({defaultLanguage:{code:"en",name:"English"},promise:n});n.done((function(n){var o=e.toJSON(),i={fileId:o.fileInfo.id,name:n.name,language:n.code,type:f.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"))})),i.Radio.channel(a.G.POPUP).trigger(r.Q.EventNames.SHOW_POPUP,o)}},{key:"logUploadAction",value:function(e){var t=e instanceof R._?ft.EntityType.Resource:ft.EntityType.Subtitle,n=ht.k.mapInteractionType(this.interactionType),o={location:ft.LocationContext.EditVideoResources,actionType:ft.UserAction.Upload,entity:t,descriptor:n};ht.k.logUserAction(e,o)}},{key:"logDeleteAction",value:function(e,t){var n={location:ft.LocationContext.EditVideoResources,actionType:ft.UserAction.Delete,entity:e},o={id:t,parentId:+this.options.videoId};ht.k.logUserAction(o,n)}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"renderTabs",value:function(){var e=E.BK.canEditVideo(this.model);this.showChildView("tabs",new ce.W({model:this.model,tabs:E.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-resources-subtitles-applink",context:"resources",folder:this.folder,libraries:this.libraries}))}},{key:"renderSubtitleFileSelect",value:function(){if(this.hasPhysicalChapters.get("value"))this.renderConcatenationRequest();else{var e=l.T.getPhrase(this.lang,"subtitlesLimit",{limit:5});this.showChildView("subtitlesUpload",new T({title:this.isClickViewContent?l.T.getPhrase(this.lang,"customerSubtitles"):l.T.getPhrase(this.lang,"subtitles"),description:l.T.getPhrase(this.lang,"subtitlesInfo"),alternateText:l.T.getPhrase(this.lang,"subtitlesAlternative"),mimeType:f.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 W({collection:e,channelName:this.channelName}))}},{key:"renderSubtitlesLists",value:function(){this.renderClickViewSubtitlesList(),this.renderCustomerSubtitlesList()}},{key:"renderClickViewSubtitlesList",value:function(){if(this.isClickViewContent){var e=E.BK.filterObjectsByOwnerType(this.model.subtitles,pt.N.ClickView);this.showChildView("clickViewSubtitlesList",new Ie({collection:e,channelName:this.channelName,isClickViewContent:!0,headerText:l.T.getPhrase(this.lang,"clickViewSubtitles"),emptyStateText:e.models.length?"":l.T.getPhrase(this.lang,"clickViewSubtitlesEmpty")}))}}},{key:"renderCustomerSubtitlesList",value:function(){this.showChildView("customerSubtitlesList",new Ie({collection:E.BK.filterObjectsByOwnerType(this.model.subtitles,pt.N.Customer,this.currentUser.get("customerId")),channelName:this.channelName}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("subtitlesUpload",new V.r({type:this.isClickViewContent?"clickViewSubtitles":"subtitles",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderResourcesFileSelect",value:function(){var e=l.T.getPhrase(this.lang,"resourcesLimit",{limit:25});this.showChildView("resourcesUpload",new T({title:this.isClickViewContent?l.T.getPhrase(this.lang,"customerResources"):l.T.getPhrase(this.lang,"resources"),description:l.T.getPhrase(this.lang,"resourcesDescription"),alternateText:l.T.getPhrase(this.lang,"resourcesAlternative"),mimeType:f.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 W({collection:e,channelName:this.channelName}))}},{key:"renderResourcesLists",value:function(){this.renderClickViewResourcesList(),this.renderCustomerResourcesList()}},{key:"renderClickViewResourcesList",value:function(){if(this.isClickViewContent){var e=E.BK.filterObjectsByOwnerType(this.model.resources,pt.N.ClickView);this.showChildView("clickViewResourcesList",new _.c({model:this.model,customCollection:e,editable:!1,videoId:this.options.videoId,parentChannelName:this.channelName,headerText:l.T.getPhrase(this.lang,"clickViewResources"),emptyStateText:e.models.length?"":l.T.getPhrase(this.lang,"clickViewResourcesEmpty"),analyticsOptions:{location:ft.LocationContext.EditVideoResources}}))}}},{key:"renderCustomerResourcesList",value:function(){this.showChildView("customerResourcesList",new _.h({collection:E.BK.filterObjectsByOwnerType(this.model.resources,pt.N.Customer,this.currentUser.get("customerId")),editable:!0,videoId:this.options.videoId,channelName:this.channelName,analyticsOptions:{location:ft.LocationContext.EditVideoResources}}))}},{key:"renderAddLinks",value:function(e){this.showChildView("addLinks",new ze({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:ft.LocationContext.EditVideoResources},videoId:this.options.videoId};this.renderClickViewLinkList(e),this.renderCustomerLinkList(e)}},{key:"renderClickViewLinkList",value:function(e){if(this.isClickViewContent){var t=E.BK.filterObjectsByOwnerType(this.model.links,pt.N.ClickView);this.showChildView("clickViewLinkList",new Je.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 Je.c(Object.assign(Object.assign({},e),{customCollection:E.BK.filterObjectsByOwnerType(this.model.links,pt.N.Customer,this.currentUser.get("customerId")),editable:!0})))}},{key:"fetchData",value:function(){var e=this;this.model=this.videoDataService.getVideo(this.options.videoId),this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.isClickViewContent=this.model&&!E.BK.canEditVideo(this.model),this.folder=this.model&&this.model.categories.first(),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"viewOptions",value:function(){return{isClickViewContent:this.isClickViewContent}}},{key:"onRender",value:function(){this.renderTabs(),this.renderSubtitleFileSelect(),this.renderSubtitleUploadList(),this.renderSubtitlesLists(),this.renderResourcesFileSelect(),this.renderResourcesUploadList(),this.renderResourcesLists(),this.renderAddLinks(),this.renderLinkLists(),this.startPollingConcatenation()}},{key:"onDestroy",value:function(){this.subtitleUploadService.destroy(),this.resourceUploadService.destroy()}}],n&&gt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(r.Q.View)},36022:function(e,t,n){"use strict";n.d(t,{M:function(){return g}});var o=n(39479),i=n(48088),r=n(31647),s=n(11306),l=n(63791),a=n(17391),u=n(61843),c=n(94407),p=n.n(c),f={svg:"QbFgf",typeaheadContainer:"Y3ErG",disabled:"VTCM4"};function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function b(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(v,e);var t,n,c,h,g=(c=v,h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(c);if(h){var n=m(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return b(this,e)});function v(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),g.call(this,e)}return t=v,(n=[{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||r.Q.ErrorHelper.throw(new s.H("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new r.Q.Model),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=i.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"bindings",get:function(){var e,t,n;return e={},t="[name=".concat(this.options.inputName,"]"),n={observe:this.options.stickItProperty,setOptions:{validate:!0}},t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{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 o.isArray(this.options.typeaheadConfigs)?a.J.getSearchSources(this.options.typeaheadConfigs):a.J.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?o.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return o.isObject(this.options.actionOptions)?o.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){o.isObject(this.options.callbacks)&&(o.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",o.bind(this.options.callbacks.onRender,this)),o.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),o.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",o.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",o.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:f},this.options),{showRemove:this.shouldShowRemove(),svgRemove:l.Nj.getSvg(l.vn.Close)})}},{key:"onRender",value:function(){var e=this;this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),i.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(),i.Validation.unbind(this)}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),v}(r.Q.Component)},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>\r\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,s=e.lambda,l=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<div class="file-drop '+l(s(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:"")+'">\r\n <button class="browse btn btn-outline-dark mr-2">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"browse",{name:"lang",hash:{},data:i}))+'</button>\r\n <span class="text-muted align-middle">'+l(s(null!=(r=null!=t?t.options:t)?r.alternateText:r,t))+"</span>\r\n</div>\r\n"},4:function(e,t,n,o,i){return" col-6 "},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,s=e.lambda;return"<h5>"+e.escapeExpression(s(null!=(r=null!=t?t.options:t)?r.title:r,t))+"</h5>\r\n<p>"+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.description:r,t))?r:"")+"</p>\r\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},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,s,l=e.escapeExpression;return'<div class="'+l("function"==typeof(s=null!=(s=n.dropMask||(null!=t?t.dropMask:t))?s:e.hooks.helperMissing)?s.call(null!=t?t:e.nullContext||{},{name:"dropMask",hash:{},data:i}):s)+'">\r\n <h3>'+l(e.lambda(null!=(r=null!=t?t.options:t)?r.fileDropText:r,t))+"</h3>\r\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,s=e.lambda;return'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' float-right text-success">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.tickSvg:r,t))?r:"")+"</span>\r\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' cursor-pointer cancel-upload close float-right">&times;</span>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,s,l=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 mr-2 '+a(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\r\n<span class="align-middle">\r\n '+a(typeof(s=null!=(s=n.name||(null!=t?t.name:t))?s:c)===p?s.call(u,{name:"name",hash:{},data:i}):s)+"\r\n</span>\r\n"+(null!=(r=n.if.call(u,null!=(r=null!=t?t.options:t)?r.finished:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")+'\r\n<div class="progress my-2 '+a(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.progress:r,t))+' mt-2">\r\n <div class="progress-bar bg-info" style="width: '+a(typeof(s=null!=(s=n.progress||(null!=t?t.progress:t))?s:c)===p?s.call(u,{name:"progress",hash:{},data:i}):s)+'%" aria-valuenow="'+a(typeof(s=null!=(s=n.progress||(null!=t?t.progress:t))?s:c)===p?s.call(u,{name:"progress",hash:{},data:i}):s)+'" aria-valuemin="0" aria-valuemax="100"></div>\r\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,s=e.lambda,l=e.escapeExpression;return'<a class="float-right '+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-muted delete">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,s,l=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<span class="d-inline-block align-middle mr-2 '+a(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\r\n<a href="'+a("function"==typeof(s=null!=(s=n.url||(null!=t?t.url:t))?s:e.hooks.helperMissing)?s.call(u,{name:"url",hash:{},data:i}):s)+"?name="+a(l(null!=(r=null!=t?t.options:t)?r.name:r,t))+'" class="align-middle">\r\n '+a(l(null!=(r=null!=t?t.options:t)?r.name:r,t))+"\r\n</a>\r\n"+(null!=(r=n.unless.call(u,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},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>\r\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return"<p>"+l((n.lang||t&&t.lang||s).call(r,"subheading",{name:"lang",hash:{},data:i}))+'</p>\r\n<div class="form-group mb-1">\r\n <label for="url">'+l((n.lang||t&&t.lang||s).call(r,"urlLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n <input name="url" id="url" class="form-control" type="text" placeholder="'+l((n.lang||t&&t.lang||s).call(r,"urlPlaceholder",{name:"lang",hash:{},data:i}))+'">\r\n <div class="form-feedback"></div>\r\n</div>\r\n<div class="form-group mb-1" id="name-container" style="display: none;">\r\n <input type="text" class="form-control" name="name" placeholder="'+l((n.lang||t&&t.lang||s).call(r,"namePlaceholder",{name:"lang",hash:{},data:i}))+'">\r\n <div class="form-feedback"></div>\r\n</div>\r\n<div class="attach-btn-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h5 class="pt-2">Resource links</h5>\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.hide:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},97781: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,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.progress:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:""},2:function(e,t,n,o,i){e.propertyIsEnumerable;var r,s=e.escapeExpression;return' <span class="m-3 text-muted">'+s(e.lambda(null!=(r=null!=t?t.options:t)?r.progress:r,t))+'</span>\r\n <p class="pt-2">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\r\n"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.failed:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:""},5:function(e,t,n,o,i){return e.propertyIsEnumerable,'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,s=e.lambda,l=e.escapeExpression;return"<h4>"+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.heading:r,t))+"</h4>\r\n<p>"+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line1:r,t))+"</p>\r\n<p>"+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line2:r,t))+'</p>\r\n<div class="btn-region"></div>\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.processing:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?r:"")},useData:!0})},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">\r\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)+'\r\n</h2>\r\n<div class="breadcrumbs-region"></div>\r\n<div class="tabs-region pl-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>\r\n <div class="form-group">\r\n <label for="language">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+'</label>\r\n <div class="typahead-region"></div>\r\n </div>\r\n</form>'},useData:!0})},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>\r\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n<div class="subtitles-list-region"></div>'},useData:!0})},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,s=null!=t?t:e.nullContext||{};return'<div class="tab-region"></div>\r\n\r\n<div class="row py-3">\r\n <div class="'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickview-subtitles-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="subtitles-upload-region"></div>\r\n <div class="subtitles-upload-list-region p-0 col-8"></div>\r\n <div class="customer-subtitles-list-region p-0 col-8"></div>\r\n </div>\r\n</div>\r\n\r\n<div class="row border-top py-3">\r\n <div class="'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickview-resources-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="resources-upload-region"></div>\r\n <div class="resources-upload-list-region p-0 col-8"></div>\r\n <div class="customer-resources-list-region p-0 col-8"></div>\r\n </div>\r\n</div>\r\n\r\n<div class="row border-top py-3">\r\n <div class="'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickview-link-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="add-links-region mb-2"></div>\r\n <div class="customer-link-list-region p-0 col-8"></div>\r\n </div>\r\n</div>'},useData:!0})},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,s=e.lambda,l=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<input\r\n name="'+l(s(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\r\n type="text"\r\n class="form-control '+(null!=(r=n.unless.call(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:"")+" "+l(s(null!=(r=null!=t?t.options:t)?r.additionalClasses:r,t))+'"\r\n id="'+l(s(null!=(r=null!=t?t.options:t)?r.inputId:r,t))+'"\r\n autocomplete="off"\r\n placeholder="'+l(s(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'"\r\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:"")+"\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:"")+'\r\n></input>\r\n<span class="svg-container mb-2 '+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svg:r,t))+' remove" style="display: none;">'+(null!=(r=s(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([[7295],{70680:function(e,t,n){"use strict";n.d(t,{r:function(){return b}});var o=n(31647),i=n(88172),r=n(61843),s=n(57857),l=n(26457),a=n(40622),u=n(97781),c=n.n(u);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function d(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(m,e);var t,n,u,p,b=(u=m,p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(u);if(p){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),b.call(this,e)}return t=m,(n=[{key:"initialize",value:function(){this.spinnerModel=new o.Q.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,a.LibraryEditorActions.MergeChapters,this.onClickMergeChapters)}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return c()}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(i.ZV.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==l.Um.New&&this.model.get("status")!==l.Um.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:s.T.getPhrase(this.lang,"mergeChapters"),subtitles:s.T.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:s.T.getPhrase(this.lang,"enabledCustomSubtitles")},t=new i.Py({buttonText:e[this.options.type],extraButtonClass:"btn-dark ".concat("XKFne"),model:this.spinnerModel,spinnerOptions:{size:r.Ey.Small,type:r.dR.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:a.LibraryEditorActions.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:s.T.getPhrase(this.lang,"chaptersHeading"),line1:s.T.getPhrase(this.lang,"chaptersInfo1"),line2:s.T.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:s.T.getPhrase(this.lang,"subtitlesHeading"),line1:s.T.getPhrase(this.lang,"subtitlesInfo1"),line2:s.T.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:s.T.getPhrase(this.lang,"cvSubtitlesHeading"),line1:s.T.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:s.T.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&s.T.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(i.ZV.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===l.Um.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(o.Q.Component)},21053:function(e,t,n){"use strict";n.d(t,{W:function(){return m}});var o=n(48088),i=n(31647),r={svgContainer:"mtegw"},s=n(43791),l=n.n(s),a=n(88181),u=n(35630),c=n(57085),p=n(57857);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 h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(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)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(m,e);var t,n,i,s,f=(i=m,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(i);if(s){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),f.call(this,e)}return t=m,(n=[{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 l()}},{key:"viewOptions",value:function(){return{styles:r}}},{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:p.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:p.T.getPhrase(this.lang,"chapters")};case"resources":return{name:p.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new u.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new c.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&h(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.Q.Component)},82407:function(e,t,n){"use strict";n.r(t),n.d(t,{EditResourcesView:function(){return Ct}});var o=n(39479),i=n(48088),r=n(31647),s=n(21679),l=n(57857),a=n(25417),u=n(99748),c=n(88410),p=n(81937),f=n(18222),h=n(57769),d=n(83162),y={fileDrop:"ejhuF",dropMask:"fLdBH",dragOver:"_sk3R"},b=n(61571),m=n.n(b),g=n(44237),v=n.n(g);function k(e){return k="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},k(e)}function w(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 C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function O(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(s,e);var t,n,o,i,r=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=S(o);if(i){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return O(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.call(this,e)}return t=s,(n=[{key:"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:h.Z,buttonSelector:".browse",channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple,mimeType:this.options.mimeType},{behaviorClass:d.V,channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple}]}},{key:"events",value:function(){var e,t,n;return n="onDragLeave",(t="dragleave .".concat(y.dropMask))in(e={"drop .file-drop":"onDrop","dragover .file-drop":"onDragOver"})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"onDrop",value:function(){this.$el.removeClass(y.dragOver)}},{key:"onDragOver",value:function(e){this.$el.addClass(y.dragOver),e.preventDefault()}},{key:"onDragLeave",value:function(){this.$el.removeClass(y.dragOver)}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({},this.options),{styles:y,limitText:this.options.limitText,isClickViewContent:this.options.isClickViewContent})}},{key:"onRender",value:function(){this.getUI("dropArea").append(m()({dropMask:y.dropMask,fileDropText:l.T.getPhrase(this.lang,"drop")}))}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Q.Component),P=n(88181),E=n(61843),R=n(14327),j=n(29457),x=n(10101),L=n(19226),_=n(77605),V=n(70680),I=n(63791),N=n(97237),U=n.n(N),D={svgContainer:"sr9KQ",progress:"Cn0ad"},B=n(53808);function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function M(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function F(e,t){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},F(e,t)}function q(e,t){if(t&&("object"===A(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}var H=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}(s,e);var t,n,o,i,r=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Q(o);if(i){var n=Q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return q(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.call(this,e)}return t=s,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"FileUploadComponent"}},{key:"template",get:function(){return U()}},{key:"events",value:function(){return{"click .cancel-upload":"onClickCancelUpload"}}},{key:"onClickCancelUpload",value:function(){B.q.isFunction(this.options.onClickCancelUpload)&&this.options.onClickCancelUpload(this.model.get("id"))}},{key:"viewOptions",value:function(){return{styles:D,svg:I.Nj.getSvg(I.vn.Folder),tickSvg:I.Nj.getSvg(I.vn.Check),finished:this.model.get("progress")>=100}}}])&&M(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Q.Component);function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function J(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function K(e,t){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},K(e,t)}function G(e,t){if(t&&("object"===z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Y(e){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Y(e)}var W=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K(e,t)}(l,e);var t,n,o,r,s=(o=l,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Y(o);if(r){var n=Y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return G(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),s.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"FileUploadsComponentCollection"}},{key:"childView",get:function(){return H}},{key:"childViewOptions",get:function(){var e=this;return{onClickCancelUpload:function(t){i.Radio.channel(e.options.channelName).trigger("cancel:upload",t)}}}}])&&J(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.ComponentCollection),X=n(99249),Z=n(36022),ee=n(19249),te={handleQuery:function(){return function(e,t){var n=[];if(e){var i=CVLanguages.getEnglishNameContains(e);return o.each(i,(function(e,t){n.push({key:t,name:e.englishName})})),t(n)}t()}},getTypeaheadConfig:function(){return function(){return{name:"languages",source:te.handleQuery(),limit:5,display:function(e){return e.name},templates:{suggestion:ee.ou,pending:ee.gb,notFound:ee.TX}}}}},ne=n(56730),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,o.key,o)}}function se(e,t){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},se(e,t)}function le(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)}function ae(e){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ae(e)}var ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&se(e,t)}(s,e);var t,n,o,i,r=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ae(o);if(i){var n=ae(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return le(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.call(this,e)}return t=s,(n=[{key:"initialize",value:function(e){this.model=X.r.get("subtitle:language",e.defaultLanguage),this.model.addValidation(E.AJ),this.listenTo(this.channelName,"select:language",this.onLanguageSelected)}},{key:"template",get:function(){return oe()}},{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:x.Yw,title:l.T.getPhrase(this.lang,"heading"),buttons:[{text:l.T.getPhrase(this.lang,"submit"),type:"submit",className:"btn btn-dark submit"}]},{behaviorClass:x.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:te.getTypeaheadConfig()}]}},{key:"renderTypeahead",value:function(){this.showChildView("typeahead",new Z.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()}}])&&re(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Q.Component),ce=n(21053),pe=n(18582),fe=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)?l.T.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:o}):o},he=n(85985),de=n.n(he),ye={container:"SizJb",svgContainer:"PuqLQ",actionSvg:"L9P1P"};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 me(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 ge(e,t){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ge(e,t)}function ve(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)}function ke(e){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ke(e)}var we=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ge(e,t)}(s,e);var t,n,o,i,r=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ke(o);if(i){var n=ke(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ve(this,e)});function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"SubtitleItemComponent"}},{key:"template",get:function(){return de()}},{key:"className",get:function(){return"".concat(ye.container," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete"}}},{key:"getEnglishName",value:function(){return fe(this.model.toJSON(),this.model.collection.toJSON())}},{key:"onClickDelete",value:function(){!this.options.isClickViewContent&&B.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){return{styles:ye,svg:I.Nj.getSvg(pe.u.mapTypeToSvg("subtitle")),trashSvg:I.Nj.getSvg(I.vn.Delete),name:this.getEnglishName(),isClickViewContent:this.options.isClickViewContent}}}])&&me(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Q.Component),Ce=n(54758),Oe=n(71060),Se=n.n(Oe);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 Pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ee(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 Re(e,t,n){return t&&Ee(e.prototype,t),n&&Ee(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function je(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&&xe(e,t)}function xe(e,t){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},xe(e,t)}function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ve(e);if(t){var i=Ve(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return _e(this,n)}}function _e(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)}function Ve(e){return Ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ve(e)}var Ie=function(e){je(n,e);var t=Le(n);function n(e){return Pe(this,n),t.call(this,e)}return Re(n,[{key:"name",get:function(){return"VideoSubtitlesComponent"}},{key:"template",get:function(){return Se()}},{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 Ne({collection:this.collection,channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}))}}]),n}(r.Q.Component),Ne=function(e){je(n,e);var t=Le(n);function n(e){return Pe(this,n),t.call(this,e)}return Re(n,[{key:"name",get:function(){return"VideoSubtitlesComponentCollection"}},{key:"lang",get:function(){return"libraryEditor.videoSubtitles"}},{key:"childView",get:function(){return we}},{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 Ce.M({title:l.T.getPhrase(this.lang,"removeHeading"),text:l.T.getPhrase(this.lang,"removeBody",{language:this.getEnglishName(e)}),buttons:[{text:l.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:l.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){i.Radio.channel(t.options.channelName).trigger("delete:subtitle",e.get("id"))}))}},{key:"getEnglishName",value:function(e){return fe(e.toJSON(),e.collection.toJSON())}}]),n}(r.Q.ComponentCollection),Ue=n(88172),De=n(7190),Be=n(41165),Ae=n.n(Be);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 Fe(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 qe(e,t){return qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},qe(e,t)}function Qe(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)}function He(e){return He=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},He(e)}var ze=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qe(e,t)}(a,e);var t,n,o,r,s=(o=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=He(o);if(r){var n=He(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Qe(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=s.call(this,e)).showNameField=!1,t.disableBtn=!0,t}return t=a,(n=[{key:"initialize",value:function(){this.model=X.r.get(this.viewModelName),this.model.addValidation(De.yU),this.bindListeners()}},{key:"name",get:function(){return"AddLinksComponent"}},{key:"template",get:function(){return Ae()}},{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:x.Bp},{behaviorClass:x.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(),i.Radio.channel(this.options.channelName).trigger("add:link",e),this.render()}},{key:"renderAttachButton",value:function(){this.options.hide||this.showChildView("attachBtn",new Ue.Py({saveEvent:"attach:link",channelName:this.options.channelName,buttonText:l.T.getPhrase(this.lang,"attach"),extraButtonClass:"btn-dark attach",disabled:this.disableBtn,buttonType:"submit",spinnerOptions:{size:E.Ey.Medium,type:E.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(),i.Validation.bind(this)}},{key:"onClose",value:function(){this.unstickit(),i.Validation.unbind(this)}}])&&Fe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),Je=n(68708),Ke=n(85835);function $e(e){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$e(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,o.key,o)}}function Ye(e,t){return Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ye(e,t)}function We(e,t){if(t&&("object"===$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xe(e){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xe(e)}var Ze="shared.errors.tooManyResources",et=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ye(e,t)}(s,e);var t,n,o,i,r=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Xe(o);if(i){var n=Xe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return We(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=r.call(this,"Cannot add that many resources")).resourceLimit=e,t}return t=s,(n=[{key:"name",get:function(){return"TooManyResourcesError"}},{key:"dialogOptions",get:function(){return{title:l.T.getPhrase(Ze,"heading"),text:l.T.getPhrase(Ze,"body",{resourceLimit:this.resourceLimit}),buttons:[{text:l.T.getPhrase(Ze,"okay"),className:"btn btn-dark",success:!0}]}}}])&&Ge(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(Ke.S);function tt(e){return tt="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},tt(e)}function nt(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 ot(e,t){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ot(e,t)}function it(e,t){if(t&&("object"===tt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function rt(e){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rt(e)}var st="shared.errors.tooManySubtitles",lt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ot(e,t)}(s,e);var t,n,o,i,r=(o=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=rt(o);if(i){var n=rt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return it(this,e)});function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=r.call(this,"Cannot add that many subtitles")).subtileLimit=e,t}return t=s,(n=[{key:"name",get:function(){return"TooManySubtitlesError"}},{key:"dialogOptions",get:function(){return{title:l.T.getPhrase(st,"heading"),text:l.T.getPhrase(st,"body",{subtitleLimit:this.subtileLimit}),buttons:[{text:l.T.getPhrase(st,"okay"),className:"btn btn-dark",success:!0}]}}}])&&nt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(Ke.S),at=n(56906),ut=n(40622),ct=n(26457),pt=n(45837),ft=n(70065),ht=n(52076),dt=n(51069),yt=n.n(dt),bt=n(95061);function mt(e){return mt="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},mt(e)}function gt(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 vt(e,t){return vt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vt(e,t)}function kt(e,t){if(t&&("object"===mt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function wt(e){return wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wt(e)}var Ct=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vt(e,t)}(b,e);var t,n,h,d,y=(h=b,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=wt(h);if(d){var n=wt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return kt(this,e)});function b(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),y.call(this,e)}return t=b,n=[{key:"initialize",value:function(){this.initializeUploadServices(),this.bindDataListeners(),this.bindViewListeners(),this.bindFileSelectListeners(),E.Si.initBackButton(),this.chapterDataService=s.u.getInstance(P.Or.Chapter,this),this.videoDataService=s.u.getInstance(P.Or.Video,this),this.linkDataService=s.u.getInstance(P.Or.Link,this),this.resourceDataService=s.u.getInstance(P.Or.Resource,this),this.subtitleDataService=s.u.getInstance(P.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 yt()}},{key:"props",get:function(){return["videoDataService"]}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return E.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:x._7}]}},{key:"requiredResources",get:function(){return{currentUser:L.K.currentUser,libraries:bt.T.libraries}}},{key:"initializeUploadServices",value:function(){this.resourceUploadService=new c.L1,this.listenTo(P.jr.RESOURCE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onResourceUploadComplete),this.subtitleUploadService=new c.M_,this.listenTo(P.jr.SUBTITLE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onSubtitleUploadComplete)}},{key:"bindDataListeners",value:function(){this.listenTo(P.Vk.VIDEO,"".concat(P.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(P.Vk.VIDEO,"".concat(P.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(P.Vk.VIDEO,"".concat(P.M_.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(P.Vk.CHAPTER,"".concat(P.M_.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError)}},{key:"bindViewListeners",value:function(){this.listenTo(this.channelName,"add:link",this.onAddLink),this.listenTo(this.channelName,"delete:subtitle",this.onDeleteSubtitle),this.listenTo(this.channelName,"delete:resource",this.onDeleteResource),this.listenTo(this.channelName,"delete:link",this.onDeleteLink),this.listenTo(this.channelName,"cancel:upload",this.onCancelUpload),this.listenTo(this.channelName,ut.LibraryEditorActions.MergeChapters,this.onMergeChapters)}},{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 u.h.NotFound:r.Q.ErrorHelper.throw(new at.l1);break;case u.h.Forbidden:r.Q.ErrorHelper.throw(new at.aV)}}},{key:"onConcatenateDataError",value:function(e){e.type===u.h.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"onSubtitleFilesAdded",value:function(e,t){e.length>5-this.model.subtitles.length?r.Q.ErrorHelper.throw(new lt(5)):(t&&(this.interactionType=t),this.subtitleUploadService.addFiles(e))}},{key:"onResourceFilesAdded",value:function(e,t){e.length>25-this.model.resources.length?r.Q.ErrorHelper.throw(new et(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:j.LP.EditVideoTabs},subtitlesUpload:{el:".subtitles-upload-region",partialLoading:j.LP.EditVideoUploadArea},subtitlesUploadList:".subtitles-upload-list-region",customerSubtitlesList:".customer-subtitles-list-region",clickViewSubtitlesList:".clickview-subtitles-list-region",resourcesUpload:{el:".resources-upload-region",partialLoading:j.LP.EditVideoUploadArea},resourcesUploadList:".resources-upload-list-region",customerResourcesList:".customer-resources-list-region",clickViewResourcesList:".clickview-resources-list-region",addLinks:{el:".add-links-region",partialLoading:j.LP.EditVideoUploadArea},customerLinkList:".customer-link-list-region",clickViewLinkList:".clickview-link-list-region"}}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[ct.Um.SingleFile,ct.Um.ConcatenationFailed];o.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==ct.Um.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.videoDataService.hasPhysicalChapters(e.options.videoId,(function(t){e.hasPhysicalChapters=t,e.renderSubtitleFileSelect()}))}))}},{key:"onDeleteResource",value:function(e){var t=this;this.resourceDataService.deleteResource(this.options.videoId,e,(function(){t.logDeleteAction(ft.EntityType.Resource,e),t.render()}))}},{key:"onDeleteSubtitle",value:function(e){var t=this;this.subtitleDataService.deleteSubtitle(this.options.videoId,e,(function(){t.logDeleteAction(ft.EntityType.Subtitle,e),t.render()}))}},{key:"onDeleteLink",value:function(e){var t=this;this.linkDataService.deleteLink(this.options.videoId,e,(function(){t.logDeleteAction(ft.EntityType.Link,e),t.render()}))}},{key:"onCancelUpload",value:function(e){this.resourceUploadService.cancelUpload(e),this.subtitleUploadService.cancelUpload(e)}},{key:"onResourceUploadComplete",value:function(e){var t=this,n=e.toJSON(),o={fileId:n.fileInfo.id,uploadId:n.file.cvUpload.uploadId,name:n.fileInfo.name,type:f.v.getResourceType(n.fileInfo.extension),extension:n.fileInfo.extension,fileSize:n.fileInfo.size,fileUrl:n.fileInfo.url,ingestUrl:n.file.cvUpload.ingestUrl,metaData:{type:f.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(),o=new ue({defaultLanguage:{code:"en",name:"English"},promise:n});n.done((function(n){var o=e.toJSON(),i={fileId:o.fileInfo.id,name:n.name,language:n.code,type:f.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"))})),i.Radio.channel(a.G.POPUP).trigger(r.Q.EventNames.SHOW_POPUP,o)}},{key:"logUploadAction",value:function(e){var t=e instanceof R._?ft.EntityType.Resource:ft.EntityType.Subtitle,n=ht.k.mapInteractionType(this.interactionType),o={location:ft.LocationContext.EditVideoResources,actionType:ft.UserAction.Upload,entity:t,descriptor:n};ht.k.logUserAction(e,o)}},{key:"logDeleteAction",value:function(e,t){var n={location:ft.LocationContext.EditVideoResources,actionType:ft.UserAction.Delete,entity:e},o={id:t,parentId:+this.options.videoId};ht.k.logUserAction(o,n)}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"renderTabs",value:function(){var e=E.BK.canEditVideo(this.model);this.showChildView("tabs",new ce.W({model:this.model,tabs:E.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-resources-subtitles-applink",context:"resources",folder:this.folder,libraries:this.libraries}))}},{key:"renderSubtitleFileSelect",value:function(){if(this.hasPhysicalChapters.get("value"))this.renderConcatenationRequest();else{var e=l.T.getPhrase(this.lang,"subtitlesLimit",{limit:5});this.showChildView("subtitlesUpload",new T({title:this.isClickViewContent?l.T.getPhrase(this.lang,"customerSubtitles"):l.T.getPhrase(this.lang,"subtitles"),description:l.T.getPhrase(this.lang,"subtitlesInfo"),alternateText:l.T.getPhrase(this.lang,"subtitlesAlternative"),mimeType:f.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 W({collection:e,channelName:this.channelName}))}},{key:"renderSubtitlesLists",value:function(){this.renderClickViewSubtitlesList(),this.renderCustomerSubtitlesList()}},{key:"renderClickViewSubtitlesList",value:function(){if(this.isClickViewContent){var e=E.BK.filterObjectsByOwnerType(this.model.subtitles,pt.N.ClickView);this.showChildView("clickViewSubtitlesList",new Ie({collection:e,channelName:this.channelName,isClickViewContent:!0,headerText:l.T.getPhrase(this.lang,"clickViewSubtitles"),emptyStateText:e.models.length?"":l.T.getPhrase(this.lang,"clickViewSubtitlesEmpty")}))}}},{key:"renderCustomerSubtitlesList",value:function(){this.showChildView("customerSubtitlesList",new Ie({collection:E.BK.filterObjectsByOwnerType(this.model.subtitles,pt.N.Customer,this.currentUser.get("customerId")),channelName:this.channelName}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("subtitlesUpload",new V.r({type:this.isClickViewContent?"clickViewSubtitles":"subtitles",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderResourcesFileSelect",value:function(){var e=l.T.getPhrase(this.lang,"resourcesLimit",{limit:25});this.showChildView("resourcesUpload",new T({title:this.isClickViewContent?l.T.getPhrase(this.lang,"customerResources"):l.T.getPhrase(this.lang,"resources"),description:l.T.getPhrase(this.lang,"resourcesDescription"),alternateText:l.T.getPhrase(this.lang,"resourcesAlternative"),mimeType:f.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 W({collection:e,channelName:this.channelName}))}},{key:"renderResourcesLists",value:function(){this.renderClickViewResourcesList(),this.renderCustomerResourcesList()}},{key:"renderClickViewResourcesList",value:function(){if(this.isClickViewContent){var e=E.BK.filterObjectsByOwnerType(this.model.resources,pt.N.ClickView);this.showChildView("clickViewResourcesList",new _.c({model:this.model,customCollection:e,editable:!1,videoId:this.options.videoId,parentChannelName:this.channelName,headerText:l.T.getPhrase(this.lang,"clickViewResources"),emptyStateText:e.models.length?"":l.T.getPhrase(this.lang,"clickViewResourcesEmpty"),analyticsOptions:{location:ft.LocationContext.EditVideoResources}}))}}},{key:"renderCustomerResourcesList",value:function(){this.showChildView("customerResourcesList",new _.h({collection:E.BK.filterObjectsByOwnerType(this.model.resources,pt.N.Customer,this.currentUser.get("customerId")),editable:!0,videoId:this.options.videoId,channelName:this.channelName,analyticsOptions:{location:ft.LocationContext.EditVideoResources}}))}},{key:"renderAddLinks",value:function(e){this.showChildView("addLinks",new ze({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:ft.LocationContext.EditVideoResources},videoId:this.options.videoId};this.renderClickViewLinkList(e),this.renderCustomerLinkList(e)}},{key:"renderClickViewLinkList",value:function(e){if(this.isClickViewContent){var t=E.BK.filterObjectsByOwnerType(this.model.links,pt.N.ClickView);this.showChildView("clickViewLinkList",new Je.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 Je.c(Object.assign(Object.assign({},e),{customCollection:E.BK.filterObjectsByOwnerType(this.model.links,pt.N.Customer,this.currentUser.get("customerId")),editable:!0})))}},{key:"fetchData",value:function(){var e=this;this.model=this.videoDataService.getVideo(this.options.videoId),this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.isClickViewContent=this.model&&!E.BK.canEditVideo(this.model),this.folder=this.model&&this.model.categories.first(),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"viewOptions",value:function(){return{isClickViewContent:this.isClickViewContent}}},{key:"onRender",value:function(){this.renderTabs(),this.renderSubtitleFileSelect(),this.renderSubtitleUploadList(),this.renderSubtitlesLists(),this.renderResourcesFileSelect(),this.renderResourcesUploadList(),this.renderResourcesLists(),this.renderAddLinks(),this.renderLinkLists(),this.startPollingConcatenation()}},{key:"onDestroy",value:function(){this.subtitleUploadService.destroy(),this.resourceUploadService.destroy()}}],n&&gt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(r.Q.View)},36022:function(e,t,n){"use strict";n.d(t,{M:function(){return g}});var o=n(39479),i=n(48088),r=n(31647),s=n(11306),l=n(63791),a=n(17391),u=n(61843),c=n(94407),p=n.n(c),f={svg:"QbFgf",typeaheadContainer:"Y3ErG",disabled:"VTCM4"};function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function b(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(v,e);var t,n,c,h,g=(c=v,h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(c);if(h){var n=m(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return b(this,e)});function v(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),g.call(this,e)}return t=v,(n=[{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||r.Q.ErrorHelper.throw(new s.H("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new r.Q.Model),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=i.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"bindings",get:function(){var e,t,n;return e={},t="[name=".concat(this.options.inputName,"]"),n={observe:this.options.stickItProperty,setOptions:{validate:!0}},t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{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 o.isArray(this.options.typeaheadConfigs)?a.J.getSearchSources(this.options.typeaheadConfigs):a.J.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?o.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return o.isObject(this.options.actionOptions)?o.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){o.isObject(this.options.callbacks)&&(o.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",o.bind(this.options.callbacks.onRender,this)),o.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),o.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",o.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",o.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:f},this.options),{showRemove:this.shouldShowRemove(),svgRemove:l.Nj.getSvg(l.vn.Close)})}},{key:"onRender",value:function(){var e=this;this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),i.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(),i.Validation.unbind(this)}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),v}(r.Q.Component)},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>\r\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,s=e.lambda,l=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<div class="file-drop '+l(s(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:"")+'">\r\n <button class="browse btn btn-outline-dark mr-2">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"browse",{name:"lang",hash:{},data:i}))+'</button>\r\n <span class="text-muted align-middle">'+l(s(null!=(r=null!=t?t.options:t)?r.alternateText:r,t))+"</span>\r\n</div>\r\n"},4:function(e,t,n,o,i){return" col-6 "},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,s=e.lambda;return"<h5>"+e.escapeExpression(s(null!=(r=null!=t?t.options:t)?r.title:r,t))+"</h5>\r\n<p>"+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.description:r,t))?r:"")+"</p>\r\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},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,s,l=e.escapeExpression;return'<div class="'+l("function"==typeof(s=null!=(s=n.dropMask||(null!=t?t.dropMask:t))?s:e.hooks.helperMissing)?s.call(null!=t?t:e.nullContext||{},{name:"dropMask",hash:{},data:i}):s)+'">\r\n <h3>'+l(e.lambda(null!=(r=null!=t?t.options:t)?r.fileDropText:r,t))+"</h3>\r\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,s=e.lambda;return'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' float-right text-success">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.tickSvg:r,t))?r:"")+"</span>\r\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' cursor-pointer cancel-upload close float-right">&times;</span>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,s,l=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 mr-2 '+a(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\r\n<span class="align-middle">\r\n '+a(typeof(s=null!=(s=n.name||(null!=t?t.name:t))?s:c)===p?s.call(u,{name:"name",hash:{},data:i}):s)+"\r\n</span>\r\n"+(null!=(r=n.if.call(u,null!=(r=null!=t?t.options:t)?r.finished:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")+'\r\n<div class="progress my-2 '+a(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.progress:r,t))+' mt-2">\r\n <div class="progress-bar bg-info" style="width: '+a(typeof(s=null!=(s=n.progress||(null!=t?t.progress:t))?s:c)===p?s.call(u,{name:"progress",hash:{},data:i}):s)+'%" aria-valuenow="'+a(typeof(s=null!=(s=n.progress||(null!=t?t.progress:t))?s:c)===p?s.call(u,{name:"progress",hash:{},data:i}):s)+'" aria-valuemin="0" aria-valuemax="100"></div>\r\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,s=e.lambda,l=e.escapeExpression;return'<a class="float-right '+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-muted delete">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,s,l=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<span class="d-inline-block align-middle mr-2 '+a(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\r\n<a href="'+a("function"==typeof(s=null!=(s=n.url||(null!=t?t.url:t))?s:e.hooks.helperMissing)?s.call(u,{name:"url",hash:{},data:i}):s)+"?name="+a(l(null!=(r=null!=t?t.options:t)?r.name:r,t))+'" class="align-middle">\r\n '+a(l(null!=(r=null!=t?t.options:t)?r.name:r,t))+"\r\n</a>\r\n"+(null!=(r=n.unless.call(u,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},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>\r\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return"<p>"+l((n.lang||t&&t.lang||s).call(r,"subheading",{name:"lang",hash:{},data:i}))+'</p>\r\n<div class="form-group mb-1">\r\n <label for="url">'+l((n.lang||t&&t.lang||s).call(r,"urlLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n <input name="url" id="url" class="form-control" type="text" placeholder="'+l((n.lang||t&&t.lang||s).call(r,"urlPlaceholder",{name:"lang",hash:{},data:i}))+'">\r\n <div class="form-feedback"></div>\r\n</div>\r\n<div class="form-group mb-1" id="name-container" style="display: none;">\r\n <input type="text" class="form-control" name="name" placeholder="'+l((n.lang||t&&t.lang||s).call(r,"namePlaceholder",{name:"lang",hash:{},data:i}))+'">\r\n <div class="form-feedback"></div>\r\n</div>\r\n<div class="attach-btn-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h5 class="pt-2">Resource links</h5>\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.hide:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},97781: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,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.progress:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:""},2:function(e,t,n,o,i){e.propertyIsEnumerable;var r,s=e.escapeExpression;return' <span class="m-3 text-muted">'+s(e.lambda(null!=(r=null!=t?t.options:t)?r.progress:r,t))+'</span>\r\n <p class="pt-2">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\r\n"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.failed:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:""},5:function(e,t,n,o,i){return e.propertyIsEnumerable,'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,s=e.lambda,l=e.escapeExpression;return"<h4>"+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.heading:r,t))+"</h4>\r\n<p>"+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line1:r,t))+"</p>\r\n<p>"+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line2:r,t))+'</p>\r\n<div class="btn-region"></div>\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.processing:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?r:"")},useData:!0})},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">\r\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)+'\r\n</h2>\r\n<div class="breadcrumbs-region"></div>\r\n<div class="tabs-region pl-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>\r\n <div class="form-group">\r\n <label for="language">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+'</label>\r\n <div class="typahead-region"></div>\r\n </div>\r\n</form>'},useData:!0})},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>\r\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n<div class="subtitles-list-region"></div>'},useData:!0})},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,s=null!=t?t:e.nullContext||{};return'<div class="tab-region"></div>\r\n\r\n<div class="row py-3">\r\n <div class="'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickview-subtitles-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="subtitles-upload-region"></div>\r\n <div class="subtitles-upload-list-region p-0 col-8"></div>\r\n <div class="customer-subtitles-list-region p-0 col-8"></div>\r\n </div>\r\n</div>\r\n\r\n<div class="row border-top py-3">\r\n <div class="'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickview-resources-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="resources-upload-region"></div>\r\n <div class="resources-upload-list-region p-0 col-8"></div>\r\n <div class="customer-resources-list-region p-0 col-8"></div>\r\n </div>\r\n</div>\r\n\r\n<div class="row border-top py-3">\r\n <div class="'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickview-link-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="add-links-region mb-2"></div>\r\n <div class="customer-link-list-region p-0 col-8"></div>\r\n </div>\r\n</div>'},useData:!0})},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,s=e.lambda,l=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<input\r\n name="'+l(s(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\r\n type="text"\r\n class="form-control '+(null!=(r=n.unless.call(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:"")+" "+l(s(null!=(r=null!=t?t.options:t)?r.additionalClasses:r,t))+'"\r\n id="'+l(s(null!=(r=null!=t?t.options:t)?r.inputId:r,t))+'"\r\n autocomplete="off"\r\n placeholder="'+l(s(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'"\r\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:"")+"\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:"")+'\r\n></input>\r\n<span class="svg-container mb-2 '+l(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svg:r,t))+' remove" style="display: none;">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svgRemove:r,t))?r:"")+"</span>"},useData:!0})}}]);