@clickview/library-editor 1.1.57 → 1.2.0-rc.1

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 (88) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/en.json +1 -1
  3. package/dist/scripts/{0-7a0a00671e.chunk.js → 0-3146283f04.chunk.js} +1 -1
  4. package/dist/scripts/1-8f308c9df2.chunk.js +1 -0
  5. package/dist/scripts/{10-9adc2cda45.chunk.js → 10-1f8e4712fb.chunk.js} +1 -1
  6. package/dist/scripts/{11-ff467086e1.chunk.js → 11-efbe8b672b.chunk.js} +1 -1
  7. package/dist/scripts/{12-24c4543472.chunk.js → 12-9a649bd1e8.chunk.js} +1 -1
  8. package/dist/scripts/{13-10636e2af5.chunk.js → 13-d003ff9e41.chunk.js} +1 -1
  9. package/dist/scripts/{14-9b1ecd3e9e.chunk.js → 14-79273eff4c.chunk.js} +1 -1
  10. package/dist/scripts/{15-e4ef6f64cf.chunk.js → 15-1a0756e067.chunk.js} +1 -1
  11. package/dist/scripts/{16-ea4e41f570.chunk.js → 16-bbf0f01fe8.chunk.js} +1 -1
  12. package/dist/scripts/{17-9353ded8cd.chunk.js → 17-3056f1e460.chunk.js} +1 -1
  13. package/dist/scripts/{18-fb56568492.chunk.js → 18-4c5983938e.chunk.js} +1 -1
  14. package/dist/scripts/{19-85a94ac004.chunk.js → 19-f6bd3a3d49.chunk.js} +1 -1
  15. package/dist/scripts/{2-6e60c5cd87.chunk.js → 2-d90f461b10.chunk.js} +1 -1
  16. package/dist/scripts/{22-a4903ff45c.chunk.js → 22-f0e56683c3.chunk.js} +1 -1
  17. package/dist/scripts/{23-b47ac20bca.chunk.js → 23-cdce4174d1.chunk.js} +1 -1
  18. package/dist/scripts/{24-f431e57e2a.chunk.js → 24-afd2aa2bfc.chunk.js} +1 -1
  19. package/dist/scripts/25-b8aeb90fea.chunk.js +1 -0
  20. package/dist/scripts/{26-4931172ebc.chunk.js → 26-08a7f60500.chunk.js} +1 -1
  21. package/dist/scripts/{27-adae09a46f.chunk.js → 27-4fdfe99ba0.chunk.js} +1 -1
  22. package/dist/scripts/{28-696a0da105.chunk.js → 28-bb3ced1465.chunk.js} +1 -1
  23. package/dist/scripts/29-ef11dca9b5.chunk.js +1 -0
  24. package/dist/scripts/3-f02b82314e.chunk.js +1 -0
  25. package/dist/scripts/{30-92d387d3d9.chunk.js → 30-41819d54db.chunk.js} +1 -1
  26. package/dist/scripts/{31-7e545aa0de.chunk.js → 31-adedea4916.chunk.js} +1 -1
  27. package/dist/scripts/{32-7328345fae.chunk.js → 32-92b6dc1186.chunk.js} +1 -1
  28. package/dist/scripts/33-dda4dfbdee.chunk.js +1 -0
  29. package/dist/scripts/34-0f61f7fc7d.chunk.js +1 -0
  30. package/dist/scripts/35-df3c6c90f7.chunk.js +1 -0
  31. package/dist/scripts/{36-c347fda103.chunk.js → 36-97a61b13fd.chunk.js} +1 -1
  32. package/dist/scripts/{37-74139562b8.chunk.js → 37-5f0b4c4b24.chunk.js} +1 -1
  33. package/dist/scripts/{38-f300998fdd.chunk.js → 38-1806441e62.chunk.js} +1 -1
  34. package/dist/scripts/{39-b3dc9c44a0.chunk.js → 39-cb06876d63.chunk.js} +1 -1
  35. package/dist/scripts/{4-a6f41aa1cf.chunk.js → 4-3556f5cd86.chunk.js} +1 -1
  36. package/dist/scripts/{40-3e0329bded.chunk.js → 40-dedc900f03.chunk.js} +1 -1
  37. package/dist/scripts/{41-14984944f5.chunk.js → 41-2a772649ef.chunk.js} +1 -1
  38. package/dist/scripts/{42-a83543523b.chunk.js → 42-edd884c6e1.chunk.js} +1 -1
  39. package/dist/scripts/{43-1dd75e9a7c.chunk.js → 43-7cb12bb043.chunk.js} +1 -1
  40. package/dist/scripts/{44-b009aed5ee.chunk.js → 44-6e38e6c3da.chunk.js} +1 -1
  41. package/dist/scripts/{45-8784f71efb.chunk.js → 45-7696788c78.chunk.js} +1 -1
  42. package/dist/scripts/{46-84948e5396.chunk.js → 46-6fae0cec47.chunk.js} +1 -1
  43. package/dist/scripts/{47-e8ee683c6b.chunk.js → 47-c5e053926b.chunk.js} +1 -1
  44. package/dist/scripts/{48-f7d6b635d4.chunk.js → 48-c62f428014.chunk.js} +1 -1
  45. package/dist/scripts/{49-85880607e1.chunk.js → 49-0221ac925c.chunk.js} +1 -1
  46. package/dist/scripts/{5-441004c068.chunk.js → 5-f2fad668b9.chunk.js} +1 -1
  47. package/dist/scripts/{50-7119810c07.chunk.js → 50-6c9cd76347.chunk.js} +1 -1
  48. package/dist/scripts/{51-4073403c2a.chunk.js → 51-4c4cb2a786.chunk.js} +1 -1
  49. package/dist/scripts/{52-83ac3c5f59.chunk.js → 52-1a2a4d664f.chunk.js} +1 -1
  50. package/dist/scripts/{53-44b9074b42.chunk.js → 53-4420fdb2ff.chunk.js} +1 -1
  51. package/dist/scripts/{54-f87b2698de.chunk.js → 54-7ad2a43bae.chunk.js} +1 -1
  52. package/dist/scripts/{55-02e36c66d8.chunk.js → 55-6bdc1394e8.chunk.js} +1 -1
  53. package/dist/scripts/{56-7e9d94a656.chunk.js → 56-0e7f151d8f.chunk.js} +1 -1
  54. package/dist/scripts/{57-4ad9ab266e.chunk.js → 57-e02ec7e3aa.chunk.js} +1 -1
  55. package/dist/scripts/{58-6ebe979a17.chunk.js → 58-23f2f08ffa.chunk.js} +1 -1
  56. package/dist/scripts/{59-09ad6d94e9.chunk.js → 59-73f62422ee.chunk.js} +1 -1
  57. package/dist/scripts/{6-f1f3ea7cec.chunk.js → 6-41fbd1d098.chunk.js} +1 -1
  58. package/dist/scripts/{60-d4f9eaf20d.chunk.js → 60-02ac1d0885.chunk.js} +1 -1
  59. package/dist/scripts/{61-45cfc05bd5.chunk.js → 61-11806e7f0f.chunk.js} +1 -1
  60. package/dist/scripts/{62-4242c25552.chunk.js → 62-36cd4edbe1.chunk.js} +1 -1
  61. package/dist/scripts/{63-779b927a04.chunk.js → 63-221a784003.chunk.js} +1 -1
  62. package/dist/scripts/{64-29f65ce8e5.chunk.js → 64-de212ef1ff.chunk.js} +1 -1
  63. package/dist/scripts/{65-0e5cd44c96.chunk.js → 65-2a3fe2cf9f.chunk.js} +1 -1
  64. package/dist/scripts/{66-782fe6a351.chunk.js → 66-3d86df4f03.chunk.js} +1 -1
  65. package/dist/scripts/{67-c749606e6f.chunk.js → 67-4044e5776b.chunk.js} +1 -1
  66. package/dist/scripts/{68-9ef5b70dc6.chunk.js → 68-d9ac81db0f.chunk.js} +1 -1
  67. package/dist/scripts/{69-ea32cbf274.chunk.js → 69-4523125605.chunk.js} +1 -1
  68. package/dist/scripts/{7-00dd3cbb22.chunk.js → 7-7d08599cb1.chunk.js} +1 -1
  69. package/dist/scripts/{70-876856aed0.chunk.js → 70-cac4a9fb87.chunk.js} +1 -1
  70. package/dist/scripts/{71-89a356a899.chunk.js → 71-59ded4dd7b.chunk.js} +1 -1
  71. package/dist/scripts/{72-6e08024788.chunk.js → 72-8329bfea82.chunk.js} +1 -1
  72. package/dist/scripts/{73-7cc4cc7383.chunk.js → 73-dfe0e3c96a.chunk.js} +1 -1
  73. package/dist/scripts/{74-8ffb258210.chunk.js → 74-1aee6ab328.chunk.js} +1 -1
  74. package/dist/scripts/{8-878942d96f.chunk.js → 8-b20f6d3c66.chunk.js} +1 -1
  75. package/dist/scripts/9-4baf495c07.chunk.js +1 -0
  76. package/dist/scripts/bundle-2b257bc7e1.min.js +10 -0
  77. package/dist/scripts/polyfills-c68217e80d.min.js +1 -0
  78. package/package.json +2 -2
  79. package/dist/scripts/1-709b927521.chunk.js +0 -1
  80. package/dist/scripts/25-560da8ad7f.chunk.js +0 -1
  81. package/dist/scripts/29-c2c961a586.chunk.js +0 -1
  82. package/dist/scripts/3-aa6f0c5b23.chunk.js +0 -1
  83. package/dist/scripts/33-128143c106.chunk.js +0 -1
  84. package/dist/scripts/34-c915802337.chunk.js +0 -1
  85. package/dist/scripts/35-a166f1b8e3.chunk.js +0 -1
  86. package/dist/scripts/9-da8328e091.chunk.js +0 -1
  87. package/dist/scripts/bundle-e3d4c2e087.min.js +0 -10
  88. package/dist/scripts/polyfills-4de7102781.min.js +0 -1
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[25],{1048:function(e,t,n){"use strict";var r=n(1052),o=n(1049),i=(n(1050),n(3),n(1053)),a=(n(1055),n(1051));n.d(t,"a",(function(){return r.a})),n.d(t,"d",(function(){return o.g})),n.d(t,"g",(function(){return o.j})),n.d(t,"f",(function(){return o.i})),n.d(t,"c",(function(){return o.f})),n.d(t,"e",(function(){return o.h})),n.d(t,"b",(function(){return i.a})),n.d(t,"h",(function(){return a.a}))},1049:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"k",(function(){return d})),n.d(t,"g",(function(){return m})),n.d(t,"e",(function(){return y})),n.d(t,"j",(function(){return b})),n.d(t,"i",(function(){return v})),n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return C})),n.d(t,"d",(function(){return O})),n.d(t,"f",(function(){return k})),n.d(t,"h",(function(){return g}));var r=n(2),o=n(1),i=n(19),a=n(29),s=n(3),l="libraryEditor.utils",u=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function c(e,t){if(e){var n=o.reduce(e,(function(e,n,r){var i=t[r];return n||i?o.isObject(n)&&o.isObject(i)&&!o.isUndefined(n.id)&&n.id===i.id?e:o.isArray(n)?p(n,i).length?e.concat(r):e:o.isEqual(n,i)?e:e.concat(r):e}),[]);if(n.length)return o.object(o.map(n,(function(n){return o.isArray(t[n])?[n,p(e[n],t[n])]:[n,t[n]]})))}}function p(e,t){var n=[];return o.each(t,(function(t){var r=o.findWhere(e,{id:t.id});if(!o.isUndefined(r)||0!==Object.keys(t).length){var i=o.isUndefined(r)?t:c(r,t);i&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(i.id=t.id,n.push(i))))}})),n}var f={getChanges:function(e,t){var n=c(o.omit(e.toJSON(),u),o.omit(t.toJSON(),u));if(n)return o.object(o.map(o.keys(n),(function(e){return[e,f.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(o.isObject(t)&&o.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return o.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new i.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var i=["distributors","producers","directors","productionCompanies"];for(var a in o.each(o.keys(n),(function(e){i.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(o.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[a]&&e.associations[a]){var s=e.get(a);(s instanceof r.a.Model||s instanceof r.a.NestedModel)&&s.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return o.each(o.keys(e.toJSON()),(function(i){if(o.contains(n,i)){var a=e.get(i).map((function(e){return e.id})),s=t.get(i).map((function(e){return e.id})),l=o.filter(a,(function(e){return e&&!o.contains(s,e)}));l.length&&(r[i]=l)}})),r}},d={name:[{required:!0,msg:function(){return s.a.getPhrase(l,"videoTitleRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(l,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return s.a.getPhrase(l,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?s.a.getPhrase(l,"episodeNumberLessThanOne"):e&&e>2147483647?s.a.getPhrase(l,"episodeNumberExceeds"):e%1!=0?s.a.getPhrase(l,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?s.a.getPhrase(l,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":s.a.getPhrase(l,"seasonNoEpisodeNumber")}},h=a().year(),y={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>h?s.a.getPhrase(l,"validProductionYears",{currentYear:h}):void 0):""}},m={name:[{required:!0,msg:function(){return s.a.getPhrase(l,"resourceNameRequired")}}]},b={suggestion:[{required:!0,msg:function(){return s.a.getPhrase(l,"suggestEditRequired")}},{maxLength:16e3,msg:function(){return s.a.getPhrase(l,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return s.a.getPhrase(l,"suggestEditReasonRequired")}},{maxLength:16e3,msg:function(){return s.a.getPhrase(l,"suggestEditReasonExceeds")}}]},g={number:function(e){return e?+e<1?s.a.getPhrase(l,"seasonLessThanOne"):+e>3e3?s.a.getPhrase(l,"seasonExceeds"):+e%1!=0?s.a.getPhrase(l,"seasonNotWhole"):"":s.a.getPhrase(l,"seasonRequired")}},v={empty:function(){return s.a.getPhrase(l,"suggestEditRatingRequired")},original:function(){return s.a.getPhrase(l,"suggestEditRatingInvalid")}},k={url:[{required:!0,pattern:"url",msg:function(){return s.a.getPhrase(l,"linkUrlRequired")}},{maxLength:16e3,msg:function(){return s.a.getPhrase(l,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return s.a.getPhrase(l,"linkNameRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(l,"linkNameExceeds")}}]},w={name:[{maxLength:128,msg:function(){return s.a.getPhrase(l,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return s.a.getPhrase(l,"fieldValueExceeds")}}]},C={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":s.a.getPhrase(l,"fieldsInvalid"):""}};function O(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1050:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(48),i=n(169),a=n(3),s="libraryEditor.utils",l={name:[{required:!0,msg:function(){return a.a.getPhrase(s,"folderNameRequired")}},{maxLength:255,msg:function(){return a.a.getPhrase(s,"folderNameExceeds")}}]},u=function(e,t){return{parentId:function(n){return n?o.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?a.a.getPhrase(s,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":a.a.getPhrase(s,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,o=e.folder,i=e.collection;return t&&n?r.extend({},l,u(o,i)):t?l:n?u(o,i):void 0}},1051:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(16),o=n(3),i=n(200),a=n(1068),s=n(62);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u,c="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(u||(u={}));var p={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case s.a.HostedLibrary:case s.a.CustomLibrary:return e.get("name");case s.a.Exchange:return o.a.getPhrase(c,"exchange");case s.a.Workspace:return o.a.getPhrase(c,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case s.a.HostedLibrary:case s.a.CustomLibrary:return"bg-info";case s.a.Exchange:return"bg-green";case s.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(l(t={},u.Pdf,r.b.FilePDF),l(t,u.Image,r.b.FileImg),l(t,u.PowerPoint,r.b.FilePowerpoint),l(t,u.Document,r.b.FileWord),l(t,u.Excel,r.b.FileExcel),l(t,u.Zip,r.b.FileZip),l(t,u.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case u.Pdf:return"icon-red";case u.Image:return"icon-purple";case u.Document:return"icon-blue";case u.Excel:return"icon-green";case u.PowerPoint:return"icon-orange";case u.Zip:return"icon-teal";case u.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case u.Pdf:return o.a.getPhrase(c,"pdf");case u.Image:return o.a.getPhrase(c,"image");case u.Document:return o.a.getPhrase(c,"document");case u.Excel:return o.a.getPhrase(c,"spreadsheet");case u.PowerPoint:return o.a.getPhrase(c,"presentation");case u.Zip:return o.a.getPhrase(c,"zipArchive");case u.File:return o.a.getPhrase(c,"file");default:return""}},translateMetadataCollectionNames:function(e){return new a.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:p.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case i.MetadataType.VideoTitle:t+="VideoTitle";break;case i.MetadataType.Description:t+="Description";break;case i.MetadataType.Rating:t+="Rating";break;case i.MetadataType.SeriesTitle:t+="SeriesTitle";break;case i.MetadataType.Season:t+="SeasonNumber";break;case i.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case i.MetadataType.BroadcastDate:t+="BroadcastDate";break;case i.MetadataType.Channel:t+="Channel";break;case i.MetadataType.ProductionYear:t+="ProductionYear";break;case i.MetadataType.Distributors:t+="Distributors";break;case i.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case i.MetadataType.Directors:t+="Directors";break;case i.MetadataType.Producers:t+="Producers";break;case i.MetadataType.Other:t+="Other"}return o.a.getPhrase(c,t)}}},1052:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),o=n(13),i=n(3),a="libraryEditor.utils",s={isValidChapterTime:function(e,t,n,i){if(i){if(!r.isNumber(t))return l.StartTime.Invalid();if(t<0)return l.StartTime.Invalid();if(t>o.x.millisecondsToSeconds(n))return l.StartTime.Exceeds();if(i.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return l.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?l.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?l.Name.Exists():r.isEmpty(t.trim())?l.Name.Invalid():void 0:l.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},l={Name:{Invalid:function(){return i.a.getPhrase(a,"chapterNameInvalid")},Exists:function(){return i.a.getPhrase(a,"chapterNameExists")},MaxLength:function(){return i.a.getPhrase(a,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.a.getPhrase(a,"chapterStartTimeInvalid")},Exists:function(){return i.a.getPhrase(a,"chapterStartTimeExists")},Exceeds:function(){return i.a.getPhrase(a,"chapterStartTimeExceeds")}}}},1053:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(3),o="libraryEditor.utils",i={name:[{required:!0,msg:function(){return r.a.getPhrase(o,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(o,"libraryNameExceeds")}}]}},1055:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),o=n(1049),i=r.a.encloseNamespace("libraryEditor.utils"),a={name:[{required:!0,msg:function(){return i("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return i("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return i("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?i("episodeNumberLessThanOne"):e&&e>255?i("episodeNumberExceeds"):e&&e%1!=0?i("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?i("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":i("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return o.e.productionYear.apply(null,t)}}},1068:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var o=u(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(u,e);var t,n,r,l=s(u);function u(){return i(this,u),l.apply(this,arguments)}return t=u,n&&o(t.prototype,n),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(n(2).a.Collection)},1095:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(1),o=n(2),i=n(1096),a=n.n(i),s=n(1097),l=n.n(s);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(s,e);var t,n,o,i=f(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),i.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"TabsView"}},{key:"className",get:function(){var e="bg-white py-2 border-bottom";return this.options.className&&(e+=" ".concat(this.options.className)),e}},{key:"template",get:function(){return l.a}},{key:"appLinks",get:function(){var e={};return this.options.tabs.forEach((function(t){return e[t.link.selector]=t.link.appLink})),e}},{key:"viewOptions",value:function(){var e=this.options.tabs.map((function(e){return Object.assign(Object.assign({},e),{link:e.link.selector.replace(".","")})}));return{styles:a.a,tabs:e}}},{key:"setActiveTab",value:function(){var e=this,t=!1;if(this.options.tabs.forEach((function(n){n.active=!1,n.link.selector===e.options.activeTab&&(n.active=!0,t=!0)})),!t){var n=r.first(this.options.tabs);n&&(n.active=!0)}}},{key:"onBeforeRender",value:function(){this.setActiveTab()}}])&&c(t.prototype,n),o&&c(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.a.Component)},1096:function(e,t,n){e.exports={link:"_5idZs",active:"_3Ty4M"}},1097:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o,i,a){var s;e.propertyIsEnumerable;return null!=(s=n.unless.call(null!=t?t:e.nullContext||{},null!=t?t.hide:t,{name:"unless",hash:{},fn:e.program(2,o,0,i,a),inverse:e.noop,data:o}))?s:""},2:function(e,t,n,r,o,i,a){e.propertyIsEnumerable;var s,l=e.lambda,u=e.escapeExpression;return' <a class="'+u(l(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.link:s,t))+" p-2 "+u(l(null!=t?t.link:t,t))+" "+(null!=(s=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.active:t,{name:"if",hash:{},fn:e.program(3,o,0,i,a),inverse:e.noop,data:o}))?s:"")+'">'+u(l(null!=t?t.name:t,t))+"</a>\r\n"},3:function(e,t,n,r,o,i,a){var s;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.active:s,t))+" border-bottom border-primary text-primary"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o,i,a){var s;e.propertyIsEnumerable;return null!=(s=n.each.call(null!=t?t:e.nullContext||{},null!=(s=null!=t?t.options:t)?s.tabs:s,{name:"each",hash:{},fn:e.program(1,o,0,i,a),inverse:e.noop,data:o}))?s:""},useData:!0,useDepths:!0})},1109:function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n(1),o=n(6),i=n(2),a=n(19),s=n(16),l=n(99),u=n(13),c=n(1157),p=n.n(c),f=n(1158),d=n.n(f);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(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 v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(h,e);var t,n,c,f=b(h);function h(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),f.call(this,e)}return t=h,(n=[{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return p.a}},{key:"className",get:function(){return"search-container ".concat(d.a.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.k.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||i.a.ErrorHelper.throw(new a.a("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new i.a.Model),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=o.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"bindings",get:function(){var e,t,n,r="[name=".concat(this.options.inputName,"]");return e={},t=r,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 r.isArray(this.options.typeaheadConfigs)?l.a.getSearchSources(this.options.typeaheadConfigs):l.a.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?r.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return r.isObject(this.options.actionOptions)?r.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){r.isObject(this.options.callbacks)&&(r.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",r.bind(this.options.callbacks.onRender,this)),r.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),r.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",r.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",r.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:d.a},this.options),{showRemove:this.shouldShowRemove(),svgRemove:s.a.getSvg(s.b.Close)})}},{key:"onRender",value:function(){var e=this;this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),o.Validation.bind(this),this.toggleRemove(),this.options.autofocus&&window.requestAnimationFrame((function(){e.getUI("input").focus()}))}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),o.Validation.unbind(this)}}])&&y(t.prototype,n),c&&y(t,c),Object.defineProperty(t,"prototype",{writable:!1}),h}(i.a.Component)},1115:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(6),o=n(2),i=n(16),a=n(1116),s=n.n(a),l=n(1117),u=n.n(l),c=n(0),p=n(1095);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(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:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&h(e,t)}(l,e);var t,n,o,a=y(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0}}}},{key:"template",get:function(){return u.a}},{key:"appLinks",get:function(){var e,t,n,r=this.options.goBackTab.link;return e={},t=r.selector,n=r.appLink,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"viewOptions",value:function(){var e=Object.assign(Object.assign({},this.options.goBackTab),{link:this.options.goBackTab.link.selector.replace(".","")});return{styles:s.a,backTab:e,backArrow:i.a.getSvg(i.b.ArrowLeft)}}},{key:"onSave",value:function(){r.Radio.channel(c.b.LIBRARY_EDITOR).trigger(c.a.LibraryEditor.SAVE_VIDEO)}},{key:"onRender",value:function(){this.showChildView("tabs",new p.a({tabs:this.options.tabs,activeTab:this.options.activeTab}))}}])&&d(t.prototype,n),o&&d(t,o),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.a.Component)},1116:function(e,t,n){e.exports={svgContainer:"_27gR6"}},1117:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression;return'<div class="row">\r\n <h4>\r\n <a class="d-inline-flex align-items-center '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.link:i,t))+" "+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.backTab:i)?i.link:i,t))+'">\r\n <span class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+' d-inline-block mx-2">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.backArrow:i,t))?i:"")+"</span>\r\n "+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.backTab:i)?i.name:i,t))+'\r\n </a>\r\n </h4>\r\n</div>\r\n<div class="tabs-region pl-2"></div>'},useData:!0})},1131:function(e,t,n){"use strict";var r=n(2),o=n(6),i=n(1144),a=n.n(i),s=n(111),l=n(4),u=n(42),c=n(16),p=n(1132),f=n(1145),d=n.n(f),h=n(1146),y=n.n(h);function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function k(e,t){if(t&&("object"===m(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 w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(i,e);var t,n,r,o=v(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return d.a}},{key:"className",get:function(){return"".concat(y.a.container," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":this.options.getEditAppLink(this.model.get("id"))}}},{key:"onClickEdit",value:function(){var e=u.a.mergeOptions(this.options.analyticsOptions,{actionType:l.UserAction.Edit,entity:l.EntityType.Resource,workflowPhase:l.WorkflowPhase.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};u.a.logUserAction(t,e)}},{key:"onClickDelete",value:function(){s.a.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){var e=this.model.get("metadata"),t=e?e.type:"";return{editable:this.options.editable,extension:p.a.mapTypeToExtension(t),svg:c.a.getSvg(p.a.mapTypeToSvg(t)),iconClass:p.a.mapTypeToClass(t),resourceType:p.a.mapTypeToName(t),editSvg:c.a.getSvg(c.b.Edit),trashSvg:c.a.getSvg(c.b.Delete)}}}])&&b(t.prototype,n),r&&b(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component),O=n(3),S=n(120),P=n(152),E=n(207);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function j(e,t,n){return t&&R(e.prototype,t),n&&R(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function N(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&&_(e,t)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=D(e);if(t){var o=D(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return L(this,n)}}function L(e,t){if(t&&("object"===T(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 D(e){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"b",(function(){return V})),n.d(t,"a",(function(){return U}));var V=function(e){N(n,e);var t=I(n);function n(e){return x(this,n),t.call(this,e)}return j(n,[{key:"name",get:function(){return"VideoResourcesComponentCollection"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"childView",get:function(){return C}},{key:"childViewOptions",get:function(){var e=this;return{editable:this.options.editable,videoId:this.options.videoId,analyticsOptions:this.options.analyticsOptions,onClickDelete:function(t){return e.onClickDelete(t)},getEditAppLink:function(t){return{application:S.a.LIBRARY_EDITOR,action:P.a.LibraryEditor.EDIT_RESOURCE,args:[e.options.videoId,t]}}}}},{key:"onClickDelete",value:function(e){var t=this;new E.a({title:O.a.getPhrase(this.lang,"removeHeading"),text:O.a.getPhrase(this.lang,"removeBody",{resourceName:e.get("name")}),buttons:[{text:O.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:O.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){o.Radio.channel(t.options.channelName).trigger("delete:resource",e.get("id"))}))}}]),n}(r.a.ComponentCollection),U=function(e){N(n,e);var t=I(n);function n(e){return x(this,n),t.call(this,e)}return j(n,[{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return a.a}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{resources:{replaceElement:!0,el:".resource-list-region"}}}},{key:"renderResources",value:function(){var e=new V({collection:this.options.customCollection||this.model.resources,editable:this.options.editable||!1,videoId:this.options.videoId||this.model.get("id"),channelName:this.options.parentChannelName||this.channelName});this.showChildView("resources",e)}},{key:"viewOptions",value:function(){return{resourcesHeadingText:this.options.headerText||O.a.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}}]),n}(r.a.Component)},1132:function(e,t,n){"use strict";var r,o=n(3),i=n(16),a=n(62);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={})),n.d(t,"a",(function(){return u}));var l="shared.shared-utils",u={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.type){case a.a.HostedLibrary:case a.a.CustomLibrary:return e.name;case a.a.Exchange:return o.a.getPhrase(l,"exchange");case a.a.Workspace:return o.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case a.a.HostedLibrary:case a.a.CustomLibrary:return"bg-info";case a.a.Exchange:return"bg-green";case a.a.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t,n=(s(t={},r.Pdf,i.b.FilePDF),s(t,r.Image,i.b.FileImg),s(t,r.PowerPoint,i.b.FilePowerpoint),s(t,r.Document,i.b.FileWord),s(t,r.Excel,i.b.FileExcel),s(t,r.Zip,i.b.FileZip),s(t,r.File,i.b.File),t)[e];return n||(n=i.b.Folder),n},mapTypeToClass:function(e){switch(e){case r.Pdf:return"icon-red";case r.Image:return"icon-purple";case r.Document:return"icon-blue";case r.Excel:return"icon-green";case r.PowerPoint:return"icon-orange";case r.Zip:return"icon-teal";case r.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case r.Pdf:return o.a.getPhrase(l,"pdf");case r.Image:return o.a.getPhrase(l,"image");case r.Document:return o.a.getPhrase(l,"document");case r.Excel:return o.a.getPhrase(l,"spreadsheet");case r.PowerPoint:return o.a.getPhrase(l,"presentation");case r.Zip:return o.a.getPhrase(l,"zipArchive");case r.File:return o.a.getPhrase(l,"file");default:return""}}}},1144:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.resourcesHeadingText:i,t))+"</h5>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n<div class="resource-list-region"></div>'},useData:!0})},1145:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda;return'<a class="float-right svg-container cursor-pointer text-muted delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\r\n<a class="float-right svg-container cursor-pointer text-muted edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<span title="'+l(s(null!=(i=null!=t?t.options:t)?i.resourceType:i,t))+'" class="d-inline-block align-middle mr-2 svg-container '+l(s(null!=(i=null!=t?t.options:t)?i.iconClass:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\r\n<a href="'+l("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:c)?a.call(u,{name:"url",hash:{},data:o}):a)+"?name="+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:o}):a)+'" class="align-middle">\r\n '+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:o}):a)+"\r\n</a>\r\n"+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1146:function(e,t,n){e.exports={container:"f6lVD"}},1151:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression;return'<a class="float-right '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.actionSvg:i,t))+' text-muted delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\r\n<a class="float-right '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.actionSvg:i,t))+' text-muted edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<span class="d-inline-block align-middle mr-2 icon-blue '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.linkSvg:i,t))?i:"")+'</span>\r\n<a href="'+l("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:c)?a.call(u,{name:"url",hash:{},data:o}):a)+'" target="_blank" class="align-middle">\r\n '+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:o}):a)+"\r\n</a>\r\n"+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1152:function(e,t,n){e.exports={container:"_3Qewt",svgContainer:"_3T40U",actionSvg:"_3FRzz"}},1153:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.headingText:i,t))+"</h5>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n<div class="links-region"></div>'},useData:!0})},1157:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,r,o){return"autofocus"},5:function(e,t,n,r,o){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<input\r\n name="'+s(a(null!=(i=null!=t?t.options:t)?i.inputName:i,t))+'"\r\n type="text"\r\n class="form-control '+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+" "+s(a(null!=(i=null!=t?t.options:t)?i.additionalClasses:i,t))+'"\r\n id="'+s(a(null!=(i=null!=t?t.options:t)?i.inputId:i,t))+'"\r\n autocomplete="off"\r\n placeholder="'+s(a(null!=(i=null!=t?t.options:t)?i.placeholderText:i,t))+'"\r\n '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.autofocus:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n "+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"unless",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n></input>\r\n<span class="svg-container mb-2 '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svg:i,t))+' remove" style="display: none;">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.svgRemove:i,t))?i:"")+"</span>"},useData:!0})},1158:function(e,t,n){e.exports={svg:"_1iL3O",typeaheadContainer:"_1SWXc",disabled:"_3C2O8"}},1159:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(2),o=n(265),i=n(13),a=n(3),s=n(306),l=n(200),u=n(1160),c=n.n(u),p=n(1161),f=n.n(p);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(d,e);var t,n,u,p=m(d);function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),p.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.spinnerModel=new r.a.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,l.LibraryEditorActions.MergeChapters,this.onClickMergeChapters)}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return c.a}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(o.c.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==s.a.New&&this.model.get("status")!==s.a.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:a.a.getPhrase(this.lang,"mergeChapters"),subtitles:a.a.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:a.a.getPhrase(this.lang,"enabledCustomSubtitles")},t=new o.a({buttonText:e[this.options.type],extraButtonClass:"btn-primary ".concat(f.a.btn),model:this.spinnerModel,spinnerOptions:{size:i.s.Small,type:i.t.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:l.LibraryEditorActions.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:a.a.getPhrase(this.lang,"chaptersHeading"),line1:a.a.getPhrase(this.lang,"chaptersInfo1"),line2:a.a.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:a.a.getPhrase(this.lang,"subtitlesHeading"),line1:a.a.getPhrase(this.lang,"subtitlesInfo1"),line2:a.a.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:a.a.getPhrase(this.lang,"cvSubtitlesHeading"),line1:a.a.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:a.a.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&a.a.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(o.c.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===s.a.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}}])&&h(t.prototype,n),u&&h(t,u),Object.defineProperty(t,"prototype",{writable:!1}),d}(r.a.Component)},1160:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.progress:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:""},2:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.escapeExpression;return' <span class="m-3 text-muted">'+a(e.lambda(null!=(i=null!=t?t.options:t)?i.progress:i,t))+'</span>\r\n <p class="pt-2">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:o}))+"</p>\r\n"},4:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.failed:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:""},5:function(e,t,n,r,o){e.propertyIsEnumerable;return'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:o}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression;return"<h4>"+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.componentOptions:i)?i.heading:i,t))+"</h4>\r\n<p>"+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.componentOptions:i)?i.line1:i,t))+"</p>\r\n<p>"+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.componentOptions:i)?i.line2:i,t))+'</p>\r\n<div class="btn-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.processing:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(4,o,0),data:o}))?i:"")},useData:!0})},1161:function(e,t,n){e.exports={btn:"_59zg9"}},1197:function(e,t,n){"use strict";var r=n(2),o=n(6),i=n(16),a=n(4),s=n(42),l=n(13),u=n(0),c=n(1151),p=n.n(c),f=n(1152),d=n.n(f),h=n(3);function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var o=k(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(f,e);var t,n,r,c=g(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),c.call(this,e)}return t=f,(n=[{key:"name",get:function(){return"LinkItemComponent"}},{key:"template",get:function(){return p.a}},{key:"className",get:function(){return"".concat(d.a.container," rounded p-2 mb-2")}},{key:"lang",get:function(){return"libraryEditor.editLinks"}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":{application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.EDIT_LINK,args:[this.options.videoId,this.model.get("id")]}}}},{key:"onClickEdit",value:function(){var e=s.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Edit,entity:a.EntityType.Resource,workflowPhase:a.WorkflowPhase.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};s.a.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new l.d({title:h.a.getPhrase(this.lang,"removeHeading"),text:h.a.getPhrase(this.lang,"removeConfirm",{name:l.w.escapeExpression(this.model.get("name"))}),buttons:[{text:h.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:h.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:l.k.generateUniqueChannelName(this)}).render().done((function(){o.Radio.channel(e.options.channelName).trigger("delete:link",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:d.a,editable:this.options.editable,linkSvg:i.a.getSvg(i.b.Link),editSvg:i.a.getSvg(i.b.Edit),trashSvg:i.a.getSvg(i.b.Delete)}}}])&&m(t.prototype,n),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(r.a.Component),C=n(1153),O=n.n(C);function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function T(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R(e,t)}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return N(this,n)}}function N(e,t){if(t&&("object"===S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return I}));var I=function(e){x(n,e);var t=j(n);function n(e){return P(this,n),t.call(this,e)}return T(n,[{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return O.a}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{links:{el:".links-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return this.options}},{key:"onRender",value:function(){this.showChildView("links",new L({collection:this.options.customCollection||this.model.get("links"),channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions,editable:this.options.editable,videoId:this.options.videoId,headingText:this.options.headingText,emptyStateText:this.options.emptyStateText}))}}]),n}(r.a.Component),L=function(e){x(n,e);var t=j(n);function n(e){return P(this,n),t.call(this,e)}return T(n,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return w}}]),n}(r.a.ComponentCollection)},1291:function(e,t,n){e.exports={fileDrop:"_3-Sp5",dropMask:"TuDHp",dragOver:"_3Dz1H"}},1292:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,s=e.escapeExpression;return'<div class="'+s("function"==typeof(a=null!=(a=n.dropMask||(null!=t?t.dropMask:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"dropMask",hash:{},data:o}):a)+'">\r\n <h3>'+s(e.lambda(null!=(i=null!=t?t.options:t)?i.fileDropText:i,t))+"</h3>\r\n</div>"},useData:!0})},1293:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<p class="alert alert-warning mb-0">'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.limitText:i,t))+"</p>\r\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<div class="file-drop '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.fileDrop:i,t))+" p-2"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.limitText:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+'">\r\n <button class="browse btn btn-light mr-2">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"browse",{name:"lang",hash:{},data:o}))+'</button>\r\n <span class="text-muted align-middle">'+s(a(null!=(i=null!=t?t.options:t)?i.alternateText:i,t))+"</span>\r\n</div>\r\n"},4:function(e,t,n,r,o){return" col-6 "},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda;return"<h5>"+e.escapeExpression(a(null!=(i=null!=t?t.options:t)?i.title:i,t))+"</h5>\r\n<p>"+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+"</p>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.limitText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")},useData:!0})},1294:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda;return'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+' float-right text-success">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.tickSvg:i,t))?i:"")+"</span>\r\n"},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+' cursor-pointer cancel-upload close float-right">&times;</span>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<span class="d-inline-block align-middle mr-2 '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\r\n<span class="align-middle">\r\n '+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:o}):a)+"\r\n</span>\r\n"+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.finished:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")+'\r\n<div class="progress my-2 '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.progress:i,t))+' mt-2">\r\n <div class="progress-bar bg-info" style="width: '+l("function"==typeof(a=null!=(a=n.progress||(null!=t?t.progress:t))?a:c)?a.call(u,{name:"progress",hash:{},data:o}):a)+'%" aria-valuenow="'+l("function"==typeof(a=null!=(a=n.progress||(null!=t?t.progress:t))?a:c)?a.call(u,{name:"progress",hash:{},data:o}):a)+'" aria-valuemin="0" aria-valuemax="100"></div>\r\n</div>'},useData:!0})},1295:function(e,t,n){e.exports={svgContainer:"QNFLR",progress:"_1q_ig"}},1296:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;return'<form>\r\n <div class="form-group">\r\n <label for="language">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="typahead-region"></div>\r\n </div>\r\n</form>'},useData:!0})},1297:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression;return'<a class="float-right '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.actionSvg:i,t))+' text-muted delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<span class="d-inline-block align-middle mr-2 '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\r\n<a href="'+l("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:e.hooks.helperMissing)?a.call(u,{name:"url",hash:{},data:o}):a)+"?name="+l(s(null!=(i=null!=t?t.options:t)?i.name:i,t))+'" class="align-middle">\r\n '+l(s(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n</a>\r\n"+(null!=(i=n.unless.call(u,null!=(i=null!=t?t.options:t)?i.isClickViewContent:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1298:function(e,t,n){e.exports={container:"_2GdEa",svgContainer:"_186X3",actionSvg:"_3_l1b"}},1299:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.headerText:i,t))+"</h5>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n<div class="subtitles-list-region"></div>'},useData:!0})},1300:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<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!=(i=null!=t?t.options:t)?i.limit:i},data:o}))+"</p>\r\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(i,"subheading",{name:"lang",hash:{},data:o}))+'</p>\r\n<div class="form-group mb-1">\r\n <label for="url">'+s((n.lang||t&&t.lang||a).call(i,"urlLabel",{name:"lang",hash:{},data:o}))+'</label>\r\n <input name="url" id="url" class="form-control" type="text" placeholder="'+s((n.lang||t&&t.lang||a).call(i,"urlPlaceholder",{name:"lang",hash:{},data:o}))+'">\r\n <div class="form-feedback"></div>\r\n</div>\r\n<div class="form-group mb-1" id="name-container" style="display: none;">\r\n <input type="text" class="form-control" name="name" placeholder="'+s((n.lang||t&&t.lang||a).call(i,"namePlaceholder",{name:"lang",hash:{},data:o}))+'">\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,r,o){var i;e.propertyIsEnumerable;return'<h5 class="pt-2">Resource Links</h5>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.hide:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")},useData:!0})},1301:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return"col-5"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=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!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.isClickViewContent:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\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!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.isClickViewContent:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\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!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.isClickViewContent:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\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})},1469:function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(6),i=n(2),a=n(5),s=n(3),l=n(15),u=n(121),c=n(325),p=n(45),f=n(189),d=n(317),h=n(697),y=n(1291),m=n.n(y),b=n(1292),g=n.n(b),v=n(1293),k=n.n(v);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var o=E(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}function P(e,t){if(t&&("object"===w(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 E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&O(e,t)}(i,e);var t,n,r,o=S(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"FileSelectComponent"}},{key:"template",get:function(){return k.a}},{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:d.a,buttonSelector:".browse",channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple,mimeType:this.options.mimeType},{behaviorClass:h.a,channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple}]}},{key:"events",value:function(){var e,t,n,r="dragleave .".concat(m.a.dropMask);return n="onDragLeave",(t=r)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(m.a.dragOver)}},{key:"onDragOver",value:function(e){this.$el.addClass(m.a.dragOver),e.preventDefault()}},{key:"onDragLeave",value:function(){this.$el.removeClass(m.a.dragOver)}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({},this.options),{styles:m.a,limitText:this.options.limitText,isClickViewContent:this.options.isClickViewContent})}},{key:"onRender",value:function(){this.getUI("dropArea").append(g()({dropMask:m.a.dropMask,fileDropText:s.a.getPhrase(this.lang,"drop")}))}}])&&C(t.prototype,n),r&&C(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(i.a.Component),x=n(0),R=n(13),j=n(185),N=n(9),_=n(305),I=n(144),L=n(1131),D=n(1159),V=n(16),U=n(1294),B=n.n(U),F=n(1295),M=n.n(F),A=n(111);function q(e){return(q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Y(e);if(t){var o=Y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return W(this,n)}}function W(e,t){if(t&&("object"===q(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:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&z(e,t)}(i,e);var t,n,r,o=J(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"FileUploadComponent"}},{key:"template",get:function(){return B.a}},{key:"events",value:function(){return{"click .cancel-upload":"onClickCancelUpload"}}},{key:"onClickCancelUpload",value:function(){A.a.isFunction(this.options.onClickCancelUpload)&&this.options.onClickCancelUpload(this.model.get("id"))}},{key:"viewOptions",value:function(){return{styles:M.a,svg:V.a.getSvg(V.b.Folder),tickSvg:V.a.getSvg(V.b.Check),finished:this.model.get("progress")>=100}}}])&&H(t.prototype,n),r&&H(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(i.a.Component);function Q(e){return(Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=te(e);if(t){var o=te(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ee(this,n)}}function ee(e,t){if(t&&("object"===Q(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 te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ne=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&&G(e,t)}(a,e);var t,n,r,i=K(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"FileUploadsComponentCollection"}},{key:"childView",get:function(){return Z}},{key:"childViewOptions",get:function(){var e=this;return{onClickCancelUpload:function(t){o.Radio.channel(e.options.channelName).trigger("cancel:upload",t)}}}}])&&X(t.prototype,n),r&&X(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(i.a.ComponentCollection),re=n(30),oe=n(1109),ie=n(140),ae={handleQuery:function(){return function(e,t){var n=[];if(e){var o=CVLanguages.getEnglishNameContains(e);return r.each(o,(function(e,t){n.push({key:t,name:e.englishName})})),t(n)}t()}},getTypeaheadConfig:function(){return function(){return{name:"languages",source:ae.handleQuery(),limit:5,display:function(e){return e.name},templates:{suggestion:ie.d,pending:ie.b,notFound:ie.c}}}}},se=n(1296),le=n.n(se);function ue(e){return(ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pe(e,t){return(pe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=he(e);if(t){var o=he(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return de(this,n)}}function de(e,t){if(t&&("object"===ue(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:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ye=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&&pe(e,t)}(i,e);var t,n,r,o=fe(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"initialize",value:function(e){this.model=re.a.get("subtitle:language",e.defaultLanguage),this.model.addValidation(R.u),this.listenTo(this.channelName,"select:language",this.onLanguageSelected)}},{key:"template",get:function(){return le.a}},{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:_.e,title:s.a.getPhrase(this.lang,"heading"),buttons:[{text:s.a.getPhrase(this.lang,"submit"),type:"submit",className:"btn btn-primary submit"}]},{behaviorClass:_.a}]}},{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:ae.getTypeaheadConfig()}]}},{key:"renderTypeahead",value:function(){this.showChildView("typeahead",new oe.a({model:this.model,parentChannelName:this.channelName,inputId:"language",selectEvent:"select:language",typeaheadConfigs:this.getTypeaheadConfigs()}))}},{key:"onLanguageSelected",value:function(e){this.model.set("code",e.key)}},{key:"onClickSubmit",value:function(){this.model.validate(),this.model.isValid()&&(this.options.promise.resolve(this.model.toJSON()),this.triggerMethod("hide"))}},{key:"onBeforeDestroy",value:function(){"pending"===this.options.promise.state()&&this.options.promise.reject()}},{key:"onRender",value:function(){this.renderTypeahead()}}])&&ce(t.prototype,n),r&&ce(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(i.a.Component),me=n(1115),be=n(1132),ge=function(e,t){var n,r,o=e.language;return r=(null==t?void 0:t.filter((function(e){return e.language!==o}))).length>0?CVLanguages.getFullEnglishName(o):CVLanguages.getEnglishName(o),(null===(n=e.metadata)||void 0===n?void 0:n.autoGenerated)?s.a.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:r}):r},ve=n(1297),ke=n.n(ve),we=n(1298),Ce=n.n(we);function Oe(e){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pe(e,t){return(Pe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ee(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xe(e);if(t){var o=xe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Te(this,n)}}function Te(e,t){if(t&&("object"===Oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function xe(e){return(xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pe(e,t)}(i,e);var t,n,r,o=Ee(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"SubtitleItemComponent"}},{key:"template",get:function(){return ke.a}},{key:"className",get:function(){return"".concat(Ce.a.container," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete"}}},{key:"getEnglishName",value:function(){return ge(this.model.toJSON(),this.model.collection.toJSON())}},{key:"onClickDelete",value:function(){!this.options.isClickViewContent&&A.a.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){return{styles:Ce.a,svg:V.a.getSvg(be.a.mapTypeToSvg("subtitle")),trashSvg:V.a.getSvg(V.b.Delete),name:this.getEnglishName(),isClickViewContent:this.options.isClickViewContent}}}])&&Se(t.prototype,n),r&&Se(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(i.a.Component),je=n(207),Ne=n(1299),_e=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})(e)}function Le(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ve(e,t,n){return t&&De(e.prototype,t),n&&De(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ue(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&&Be(e,t)}function Be(e,t){return(Be=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ae(e);if(t){var o=Ae(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Me(this,n)}}function Me(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:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qe=function(e){Ue(n,e);var t=Fe(n);function n(e){return Le(this,n),t.call(this,e)}return Ve(n,[{key:"name",get:function(){return"VideoSubtitlesComponent"}},{key:"template",get:function(){return _e.a}},{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 He({collection:this.collection,channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}))}}]),n}(i.a.Component),He=function(e){Ue(n,e);var t=Fe(n);function n(e){return Le(this,n),t.call(this,e)}return Ve(n,[{key:"name",get:function(){return"VideoSubtitlesComponentCollection"}},{key:"lang",get:function(){return"libraryEditor.videoSubtitles"}},{key:"childView",get:function(){return Re}},{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 je.a({title:s.a.getPhrase(this.lang,"removeHeading"),text:s.a.getPhrase(this.lang,"removeBody",{language:this.getEnglishName(e)}),buttons:[{text:s.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:s.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){o.Radio.channel(t.options.channelName).trigger("delete:subtitle",e.get("id"))}))}},{key:"getEnglishName",value:function(e){return ge(e.toJSON(),e.collection.toJSON())}}]),n}(i.a.ComponentCollection),ze=n(265),Je=n(1048),We=n(1300),Ye=n.n(We);function Ze(e){return(Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qe(e,t){return(Qe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ke(e);if(t){var o=Ke(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ge(this,n)}}function Ge(e,t){if(t&&("object"===Ze(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:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var 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&&Qe(e,t)}(a,e);var t,n,r,i=Xe(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).showNameField=!1,t.disableBtn=!0,t}return t=a,(n=[{key:"initialize",value:function(){this.model=re.a.get(this.viewModelName),this.model.addValidation(Je.c),this.bindListeners()}},{key:"name",get:function(){return"AddLinksComponent"}},{key:"template",get:function(){return Ye.a}},{key:"lang",get:function(){return"libraryEditor.addLinks"}},{key:"tagName",get:function(){return"form"}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"regions",value:function(){return{attachBtn:".attach-btn-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:_.f},{behaviorClass:_.a}]}},{key:"elements",get:function(){return{nameField:"#name-container"}}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change:url",this.onChangeUrl),this.listenTo(this.model,"change:name",this.onChangeName),this.listenTo(this.options.channelName,"attach:link",this.onClickAttach)}},{key:"onChangeUrl",value:function(){this.showNameField&&!this.model.isValid("url")?(this.getUI("nameField").hide(),this.model.set("name",""),this.showNameField=!1):!this.showNameField&&this.model.isValid("url")&&(this.getUI("nameField").show(),this.showNameField=!0)}},{key:"onChangeName",value:function(){this.model.validate("name"),this.disableBtn=!this.model.isValid(),this.renderAttachButton()}},{key:"onClickAttach",value:function(){var e=this.model.toJSON();this.model.clear(),o.Radio.channel(this.options.channelName).trigger("add:link",e),this.render()}},{key:"renderAttachButton",value:function(){this.options.hide||this.showChildView("attachBtn",new ze.a({saveEvent:"attach:link",channelName:this.options.channelName,buttonText:s.a.getPhrase(this.lang,"attach"),extraButtonClass:"btn-light attach",disabled:this.disableBtn,buttonType:"submit",spinnerOptions:{size:R.s.Medium,type:R.t.Light,extraClasses:"mx-auto"}}))}},{key:"viewOptions",value:function(){return{limit:this.options.limit,hide:this.options.hide}}},{key:"onRender",value:function(){this.renderAttachButton(),this.stickit(),o.Validation.bind(this)}},{key:"onClose",value:function(){this.unstickit(),o.Validation.unbind(this)}}])&&$e(t.prototype,n),r&&$e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(i.a.Component),tt=n(1197),nt=n(37);function rt(e){return(rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ot(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function it(e,t){return(it=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function at(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lt(e);if(t){var o=lt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return st(this,n)}}function st(e,t){if(t&&("object"===rt(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 lt(e){return(lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ut="shared.errors.tooManyResources",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&&it(e,t)}(i,e);var t,n,r,o=at(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,"Cannot add that many resources")).resourceLimit=e,t}return t=i,(n=[{key:"name",get:function(){return"TooManyResourcesError"}},{key:"dialogOptions",get:function(){return{title:s.a.getPhrase(ut,"heading"),text:s.a.getPhrase(ut,"body",{resourceLimit:this.resourceLimit}),buttons:[{text:s.a.getPhrase(ut,"okay"),className:"btn btn-primary",success:!0}]}}}])&&ot(t.prototype,n),r&&ot(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(nt.a);function pt(e){return(pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ft(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dt(e,t){return(dt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ht(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=mt(e);if(t){var o=mt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return yt(this,n)}}function yt(e,t){if(t&&("object"===pt(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 mt(e){return(mt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bt=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&&dt(e,t)}(i,e);var t,n,r,o=ht(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,"Cannot add that many subtitles")).subtileLimit=e,t}return t=i,(n=[{key:"name",get:function(){return"TooManySubtitlesError"}},{key:"dialogOptions",get:function(){return{title:s.a.getPhrase("shared.errors.tooManySubtitles","heading"),text:s.a.getPhrase("shared.errors.tooManySubtitles","body",{subtitleLimit:this.subtileLimit}),buttons:[{text:s.a.getPhrase("shared.errors.tooManySubtitles","okay"),className:"btn btn-primary",success:!0}]}}}])&&ft(t.prototype,n),r&&ft(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(nt.a),gt=n(206),vt=n(200),kt=n(306),wt=n(266),Ct=n(4),Ot=n(42),St=n(1301),Pt=n.n(St);function Et(e){return(Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Tt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xt(e,t){return(xt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Nt(e);if(t){var o=Nt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return jt(this,n)}}function jt(e,t){if(t&&("object"===Et(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 Nt(e){return(Nt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"EditResourcesView",(function(){return _t}));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&&xt(e,t)}(y,e);var t,n,d,h=Rt(y);function y(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),h.call(this,e)}return t=y,(n=[{key:"initialize",value:function(){this.initializeUploadServices(),this.bindDataListeners(),this.bindViewListeners(),this.bindFileSelectListeners(),R.v.initBackButton(),this.chapterDataService=a.a.getInstance(x.g.Chapter,this),this.videoDataService=a.a.getInstance(x.g.Video,this),this.linkDataService=a.a.getInstance(x.g.Link,this),this.resourceDataService=a.a.getInstance(x.g.Resource,this),this.subtitleDataService=a.a.getInstance(x.g.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 Pt.a}},{key:"props",get:function(){return["videoDataService"]}},{key:"className",get:function(){return"bg-white p-3"}},{key:"channelName",get:function(){return R.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:_.d}]}},{key:"requiredResources",get:function(){return{currentUser:I.b.currentUser}}},{key:"initializeUploadServices",value:function(){this.resourceUploadService=new c.b,this.listenTo(x.w.RESOURCE_UPLOAD,p.a.UPLOAD_COMPLETE,this.onResourceUploadComplete),this.subtitleUploadService=new c.c,this.listenTo(x.w.SUBTITLE_UPLOAD,p.a.UPLOAD_COMPLETE,this.onSubtitleUploadComplete)}},{key:"bindDataListeners",value:function(){this.listenTo(x.e.VIDEO,"".concat(x.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(x.e.VIDEO,"".concat(x.f.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(x.e.VIDEO,"".concat(x.f.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(x.e.CHAPTER,"".concat(x.f.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError)}},{key:"bindViewListeners",value:function(){this.listenTo(this.channelName,"add:link",this.onAddLink),this.listenTo(this.channelName,"delete:subtitle",this.onDeleteSubtitle),this.listenTo(this.channelName,"delete:resource",this.onDeleteResource),this.listenTo(this.channelName,"delete:link",this.onDeleteLink),this.listenTo(this.channelName,"cancel:upload",this.onCancelUpload),this.listenTo(this.channelName,vt.LibraryEditorActions.MergeChapters,this.onMergeChapters)}},{key:"bindFileSelectListeners",value:function(){this.listenTo(this.getSubtitleSelectChannelName(),p.a.FILES_SELECTED,this.onSubtitleFilesAdded),this.listenTo(this.getResourceSelectChannelName(),p.a.FILES_SELECTED,this.onResourceFilesAdded)}},{key:"getSubtitleSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"subtitles")}},{key:"getResourceSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"resources")}},{key:"onVideoDataError",value:function(e){switch(e.type){case u.a.NotFound:i.a.ErrorHelper.throw(new gt.l);break;case u.a.Forbidden:i.a.ErrorHelper.throw(new gt.f)}}},{key:"onConcatenateDataError",value:function(e){e.type===u.a.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"onSubtitleFilesAdded",value:function(e,t){e.length>5-this.model.subtitles.length?i.a.ErrorHelper.throw(new bt(5)):(t&&(this.interactionType=t),this.subtitleUploadService.addFiles(e))}},{key:"onResourceFilesAdded",value:function(e,t){e.length>25-this.model.resources.length?i.a.ErrorHelper.throw(new ct(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:N.h.EditVideoTabs},subtitlesUpload:{el:".subtitles-upload-region",partialLoading:N.h.EditVideoUploadArea},subtitlesUploadList:".subtitles-upload-list-region",customerSubtitlesList:".customer-subtitles-list-region",clickViewSubtitlesList:".clickview-subtitles-list-region",resourcesUpload:{el:".resources-upload-region",partialLoading:N.h.EditVideoUploadArea},resourcesUploadList:".resources-upload-list-region",customerResourcesList:".customer-resources-list-region",clickViewResourcesList:".clickview-resources-list-region",addLinks:{el:".add-links-region",partialLoading:N.h.EditVideoUploadArea},customerLinkList:".customer-link-list-region",clickViewLinkList:".clickview-link-list-region"}}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[kt.a.SingleFile,kt.a.ConcatenationFailed];r.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")!==kt.a.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.videoDataService.hasPhysicalChapters(e.options.videoId,(function(t){e.hasPhysicalChapters=t,e.renderSubtitleFileSelect()}))}))}},{key:"onDeleteResource",value:function(e){var t=this;this.resourceDataService.deleteResource(this.options.videoId,e,(function(){t.logDeleteAction(Ct.EntityType.Resource,e),t.render()}))}},{key:"onDeleteSubtitle",value:function(e){var t=this;this.subtitleDataService.deleteSubtitle(this.options.videoId,e,(function(){t.logDeleteAction(Ct.EntityType.Subtitle,e),t.render()}))}},{key:"onDeleteLink",value:function(e){var t=this;this.linkDataService.deleteLink(this.options.videoId,e,(function(){t.logDeleteAction(Ct.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(),r={fileId:n.fileInfo.id,uploadId:n.file.cvUpload.uploadId,name:n.fileInfo.name,type:f.a.getResourceType(n.fileInfo.extension),extension:n.fileInfo.extension,fileSize:n.fileInfo.size,fileUrl:n.fileInfo.url,ingestUrl:n.file.cvUpload.ingestUrl,metaData:{type:f.a.getResourceType(n.fileInfo.extension)},contribution:!1,url:n.fileInfo.url,fileIdType:2};this.resourceUploads.push(r),this.resourceUploadCount--,this.resourceUploadCount>0||(this.resourceDataService.addResource(this.options.videoId,this.resourceUploads,(function(e){t.model.resources.add(e);var n=t.resourceUploadService.getCollection().filter((function(t){return t.get("fileInfo").id===e.get("fileId")}));t.resourceUploadService.getCollection().remove(n),t.logUploadAction(e),t.render()})),this.resourceUploads=[])}},{key:"onSubtitleUploadComplete",value:function(e){var t=this,n=$.Deferred(),r=new ye({defaultLanguage:{code:"en",name:"English"},promise:n});n.done((function(n){var r=e.toJSON(),o={fileId:r.fileInfo.id,name:n.name,language:n.code,type:f.a.getResourceType(r.fileInfo.extension),fileIdType:2};t.subtitleDataService.addSubtitle(t.options.videoId,o,(function(n){t.model.subtitles.add(n),t.subtitleUploadService.getCollection().remove(e),t.logUploadAction(n),t.render()}))})).fail((function(){t.subtitleUploadService.cancelUpload(e.get("id"))})),o.Radio.channel(l.a.POPUP).trigger(i.a.EventNames.SHOW_POPUP,r)}},{key:"logUploadAction",value:function(e){var t=e instanceof j.a?Ct.EntityType.Resource:Ct.EntityType.Subtitle,n=Ot.a.mapInteractionType(this.interactionType),r={location:Ct.LocationContext.EditVideoResources,actionType:Ct.UserAction.Upload,entity:t,descriptor:n};Ot.a.logUserAction(e,r)}},{key:"logDeleteAction",value:function(e,t){var n={location:Ct.LocationContext.EditVideoResources,actionType:Ct.UserAction.Delete,entity:e},r={id:t,parentId:+this.options.videoId};Ot.a.logUserAction(r,n)}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"renderTabs",value:function(){var e=!R.j.canEditVideo(this.model);this.showChildView("tabs",new me.a({tabs:R.v.getEditVideoTabs(this.options.videoId,{hideChaptersTab:e}),activeTab:".edit-resources-subtitles-applink",goBackTab:R.v.getBackButton(this.options.videoId)}))}},{key:"renderSubtitleFileSelect",value:function(){if(this.hasPhysicalChapters.get("value"))this.renderConcatenationRequest();else{var e=s.a.getPhrase(this.lang,"subtitlesLimit",{limit:5});this.showChildView("subtitlesUpload",new T({title:this.isClickViewContent?s.a.getPhrase(this.lang,"customerSubtitles"):s.a.getPhrase(this.lang,"subtitles"),description:s.a.getPhrase(this.lang,"subtitlesInfo"),alternateText:s.a.getPhrase(this.lang,"subtitlesAlternative"),mimeType:f.b.SUBTITLES,channelName:this.getSubtitleSelectChannelName(),acceptMultiple:!1,limitText:this.model.subtitles.length>=5?e:null,isClickViewContent:this.isClickViewContent}))}}},{key:"renderSubtitleUploadList",value:function(){var e=this.subtitleUploadService.getCollection();this.showChildView("subtitlesUploadList",new ne({collection:e,channelName:this.channelName}))}},{key:"renderSubtitlesLists",value:function(){this.renderClickViewSubtitlesList(),this.renderCustomerSubtitlesList()}},{key:"renderClickViewSubtitlesList",value:function(){if(this.isClickViewContent){var e=R.j.filterObjectsByOwnerType(this.model.subtitles,wt.a.ClickView);this.showChildView("clickViewSubtitlesList",new qe({collection:e,channelName:this.channelName,isClickViewContent:!0,headerText:s.a.getPhrase(this.lang,"clickViewSubtitles"),emptyStateText:e.models.length?"":s.a.getPhrase(this.lang,"clickViewSubtitlesEmpty")}))}}},{key:"renderCustomerSubtitlesList",value:function(){this.showChildView("customerSubtitlesList",new qe({collection:R.j.filterObjectsByOwnerType(this.model.subtitles,wt.a.Customer,this.currentUser.get("customerId")),channelName:this.channelName}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("subtitlesUpload",new D.a({type:this.isClickViewContent?"clickViewSubtitles":"subtitles",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderResourcesFileSelect",value:function(){var e=s.a.getPhrase(this.lang,"resourcesLimit",{limit:25});this.showChildView("resourcesUpload",new T({title:this.isClickViewContent?s.a.getPhrase(this.lang,"customerResources"):s.a.getPhrase(this.lang,"resources"),description:s.a.getPhrase(this.lang,"resourcesDescription"),alternateText:s.a.getPhrase(this.lang,"resourcesAlternative"),mimeType:f.b.RESOURCES,channelName:this.getResourceSelectChannelName(),limitText:this.model.resources.length>=25?e:null,isClickViewContent:this.isClickViewContent}))}},{key:"renderResourcesUploadList",value:function(){var e=this.resourceUploadService.getCollection();this.showChildView("resourcesUploadList",new ne({collection:e,channelName:this.channelName}))}},{key:"renderResourcesLists",value:function(){this.renderClickViewResourcesList(),this.renderCustomerResourcesList()}},{key:"renderClickViewResourcesList",value:function(){if(this.isClickViewContent){var e=R.j.filterObjectsByOwnerType(this.model.resources,wt.a.ClickView);this.showChildView("clickViewResourcesList",new L.a({model:this.model,customCollection:e,editable:!1,videoId:this.options.videoId,parentChannelName:this.channelName,headerText:s.a.getPhrase(this.lang,"clickViewResources"),emptyStateText:e.models.length?"":s.a.getPhrase(this.lang,"clickViewResourcesEmpty"),analyticsOptions:{location:Ct.LocationContext.EditVideoResources}}))}}},{key:"renderCustomerResourcesList",value:function(){this.showChildView("customerResourcesList",new L.b({collection:R.j.filterObjectsByOwnerType(this.model.resources,wt.a.Customer,this.currentUser.get("customerId")),editable:!0,videoId:this.options.videoId,channelName:this.channelName,analyticsOptions:{location:Ct.LocationContext.EditVideoResources}}))}},{key:"renderAddLinks",value:function(e){this.showChildView("addLinks",new et({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:Ct.LocationContext.EditVideoResources},videoId:this.options.videoId};this.renderClickViewLinkList(e),this.renderCustomerLinkList(e)}},{key:"renderClickViewLinkList",value:function(e){if(this.isClickViewContent){var t=R.j.filterObjectsByOwnerType(this.model.links,wt.a.ClickView);this.showChildView("clickViewLinkList",new tt.a(Object.assign(Object.assign({},e),{headingText:"Resource Links by ClickView",emptyStateText:t.models.length?"":"There are no ClickView links for this video",customCollection:t,editable:!1})))}}},{key:"renderCustomerLinkList",value:function(e){this.showChildView("customerLinkList",new tt.a(Object.assign(Object.assign({},e),{customCollection:R.j.filterObjectsByOwnerType(this.model.links,wt.a.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&&!R.j.canEditVideo(this.model),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"viewOptions",value:function(){return{isClickViewContent:this.isClickViewContent}}},{key:"onRender",value:function(){this.renderTabs(),this.renderSubtitleFileSelect(),this.renderSubtitleUploadList(),this.renderSubtitlesLists(),this.renderResourcesFileSelect(),this.renderResourcesUploadList(),this.renderResourcesLists(),this.renderAddLinks(),this.renderLinkLists(),this.startPollingConcatenation()}},{key:"onDestroy",value:function(){this.subtitleUploadService.destroy(),this.resourceUploadService.destroy()}}])&&Tt(t.prototype,n),d&&Tt(t,d),Object.defineProperty(t,"prototype",{writable:!1}),y}(i.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[29],{1043:function(e,t,n){"use strict";var o,r;n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return r})),function(e){e[e.Base=0]="Base",e[e.AwaitingReview=1]="AwaitingReview",e[e.PastReleases=2]="PastReleases",e[e.VideoAccess=3]="VideoAccess",e[e.ProcessingVideo=4]="ProcessingVideo",e[e.Draggable=5]="Draggable",e[e.Search=6]="Search"}(o||(o={})),function(e){e.Checkbox="checkbox",e.Thumbnail="thumbnail",e.Metadata="metadata",e.VideoActions="videoActions",e.VideoInfo="videoInfo"}(r||(r={}))},1072:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return w}));var o,r,i=n(2),l=n(13),a=n(3),s=n(1136),u=n.n(s),c=n(1137),p=n.n(c);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function 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 h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(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 m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Small="sm",e.Large="lg"}(r||(r={}));var b=(v(o={},r.Small,3),v(o,r.Large,5),o),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&&h(e,t)}(s,e);var t,n,o,i=y(s);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=i.call(this,e)).showingMore=!1,t}return t=s,(n=[{key:"name",get:function(){return"VideoDescriptionComponent"}},{key:"template",get:function(){return u.a}},{key:"lang",get:function(){return"shared.videoDescription"}},{key:"defaults",get:function(){return{size:"sm"}}},{key:"elements",get:function(){return{description:".description",ellipsis:this.options.allowExpand?".".concat(p.a.showMoreEllipsis):".".concat(p.a.singleEllipsis)}}},{key:"events",value:function(){return v({},"click .".concat(p.a.showMoreEllipsis),"onClickShowMore")}},{key:"onClickShowMore",value:function(e){e.preventDefault(),this.showingMore?this.showLessDescription():this.showMoreDescription()}},{key:"getDescription",value:function(){return this.options.linkify?l.w.linkifyText(l.w.escapeExpression(this.model.get("description"))):this.options.highlighter?l.w.wordsHighlighter(l.w.escapeExpression(this.model.get("description")),this.model.get("_matchedWords")):void 0}},{key:"getDescriptionElements",value:function(){return{descriptionTextEl:this.getUI("description"),ellipsisEl:this.getUI("ellipsis")}}},{key:"showMoreDescription",value:function(){var e=this.getDescriptionElements(),t=e.descriptionTextEl,n=e.ellipsisEl;t.removeClass(p.a.truncateLarge).addClass(p.a.open),n.text(a.a.getPhrase(this.lang,"showLess")),this.showingMore=!0}},{key:"showLessDescription",value:function(){var e,t=this.getDescriptionElements(),n=t.descriptionTextEl,o=t.ellipsisEl;this.options.size===r.Small&&(e="truncateSmall"),this.options.size===r.Large&&(e="truncateLarge"),n.addClass(p.a[e]),o.text(this.options.allowExpand?"... ".concat(a.a.getPhrase(this.lang,"showMore")):"...").removeClass(p.a.hideEllipsis).addClass(p.a.showEllipsis),this.showingMore=!1}},{key:"truncateDescription",value:function(){if(this.options.truncate){var e=this.getDescriptionElements().descriptionTextEl,t=b[this.options.size];e.height()<=21*t||this.showLessDescription()}}},{key:"viewOptions",value:function(){return{styles:p.a,truncate:this.options.truncate,expandable:this.options.allowExpand,description:this.getDescription()}}},{key:"onAttach",value:function(){this.truncateDescription()}}])&&d(t.prototype,n),o&&d(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(i.a.Component)},1088:function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var o=n(1),r=n(6),i=n(2),l=n(4),a=n(42),s=n(205),u=n(203),c=n(305),p=n(13),f=n(0),d=n(1193),h=n(1138),y=n.n(h);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function 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 v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=k(e);if(t){var r=k(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===g(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 k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(g,e);var t,n,i,h=b(g);function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),h.call(this,e)}return t=g,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"VideoPreviewComponent"}},{key:"template",get:function(){return y.a}},{key:"instanceChannelName",get:function(){return p.k.generateUniqueChannelName(this)}},{key:"defaults",get:function(){return{captureAnalytics:!0}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.c,selector:".lazy-img",callback:function(){r.Radio.channel(e.instanceChannelName).trigger("show:play:icon")},minBrowserSupportVersion:f.p}]}},{key:"regions",value:function(){return{player:{el:".video-player-region",replaceElement:!1},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"bindListeners",value:function(){this.options.channelName&&this.listenTo(this.options.channelName,"update:chapter:time",this.onUpdateWebplayer)}},{key:"onUpdateWebplayer",value:function(e){if(!this.player)return this.listenToOnce(this.options.channelName,"webplayer:loaded",o.bind(this.seekToChapter,this,e)),void this.renderVideoPreview();this.seekToChapter(e)}},{key:"seekToChapter",value:function(e){this.player.seekTo(e)}},{key:"onClick",value:function(){this.player||this.renderVideoPreview()}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new u.a({model:this.model,thumbnailOptions:{size:s.a.Medium},playIcon:!0,lazyload:!0,channelName:this.instanceChannelName}))}},{key:"renderVideoPreview",value:function(){this.player=new d.a({model:this.model,webPlayerUrl:this.options.webPlayerUrl,parentChannelName:this.options.channelName,autoplay:!0,analyticsOptions:a.a.mergeOptions(this.options.analyticsOptions,{entity:l.EntityType.Video}),captureAnalytics:this.options.captureAnalytics,currentUser:this.options.currentUser}),this.showChildView("player",this.player)}},{key:"onRender",value:function(){this.renderThumbnail()}}])&&m(t.prototype,n),i&&m(t,i),Object.defineProperty(t,"prototype",{writable:!1}),g}(i.a.Component)},1136:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return' <div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.descriptionWrapper:i,t))+'">\r\n <p class="description '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.expandable:i,{name:"if",hash:{},fn:e.program(2,r,0),inverse:e.program(4,r,0),data:r}))?i:"")+"</p>\r\n </div>\r\n"},2:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.showMoreEllipsis:i,t))+" "+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">... '+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"showMore",{name:"lang",hash:{},data:r}))+"</span>"},4:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.singleEllipsis:i,t))+" "+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">...</span>'},6:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda;return' <p class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.truncate:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(6,r,0),data:r}))?i:""},useData:!0})},1137:function(e,t,n){e.exports={columnNames:"_1a1Re",descriptionWrapper:"_2MZC5",description:"_3U9j9",ellipsis:"_1YjUg",singleEllipsis:"_3SNtn",showMoreEllipsis:"xy3i9",showEllipsis:"_1_L9t",hideEllipsis:"TCdgP",open:"_18ojI",truncateSmall:"nLuVF",truncateLarge:"sEELY"}},1138:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="video-player-region cursor-pointer responsize-img">\r\n <div class="thumbnail-region"></div>\r\n</div>'},useData:!0})},1407:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="videos-region"></div>'},useData:!0})},1408:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;return'<p class="text-uppercase text-muted">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"description",{name:"lang",hash:{},data:r}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.description:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'<div class="description-region"></div>\r\n<div class="webplayer-region col-5 pl-0"></div>'},useData:!0})},1409:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;return" <span>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"series",{name:"lang",hash:{series:null!=t?t.series:t},data:r}))+"</span>\r\n"},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return" "+(null!=(i=n.if.call(l,null!=t?t.series:t,{name:"if",hash:{},fn:e.program(4,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n <span>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"folder",{name:"lang",hash:{folder:null!=t?t.category:t},data:r}))+"</span>\r\n"},4:function(e,t,n,o,r){return'<span class="mx-1">|</span>'},6:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return' <span class="badge p-1 tool-tip '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.rating:i,t))+" "+a(l(null!=(i=null!=t?t.options:t)?i.ratingColorClass:i,t))+'" title="'+a(l(null!=(i=null!=t?t.rating:t)?i.name:i,t))+'">'+a(l(null!=(i=null!=t?t.rating:t)?i.code:i,t))+"</span>\r\n"},8:function(e,t,n,o,r){var i;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},t,{name:"if",hash:{},fn:e.program(9,r,0),inverse:e.noop,data:r}))?i:""},9:function(e,t,n,o,r){return' <div class="text-danger">'+e.escapeExpression(e.lambda(t,t))+"</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,a=null!=t?t:e.nullContext||{};return'<div>\r\n <a class="h6">'+e.escapeExpression("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:e.hooks.helperMissing)?l.call(a,{name:"name",hash:{},data:r}):l)+"</a>\r\n</div>\r\n<div>\r\n"+(null!=(i=n.if.call(a,null!=t?t.series:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+(null!=(i=n.if.call(a,null!=t?t.category:t,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+"</div>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.rating:t)?i.code:i,{name:"if",hash:{},fn:e.program(6,r,0),inverse:e.noop,data:r}))?i:"")+(null!=(i=n.each.call(a,null!=(i=null!=t?t.options:t)?i.errorStrings:i,{name:"each",hash:{},fn:e.program(8,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},1410:function(e,t,n){e.exports={rating:"_3IJcl"}},1411:function(e,t,n){e.exports={svgContainer:"_-0ibU",selectedButton:"_28zhr",showPreview:"_2r4VF"}},1412:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return' <button class="btn btn-success use-online-copy '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectedButton:i,t))+'"><span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.checkSvg:i,t))?i:"")+"</span>"+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"resolve",{name:"lang",hash:{},data:r}))+"</button>\r\n"},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <button class="btn btn-link dismiss">'+a((n.lang||t&&t.lang||l).call(i,"dismiss",{name:"lang",hash:{},data:r}))+'</button>\r\n <button class="btn btn-outline-secondary use-online-copy">'+a((n.lang||t&&t.lang||l).call(i,"resolve",{name:"lang",hash:{},data:r}))+"</button>\r\n"},5:function(e,t,n,o,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hide",{name:"lang",hash:{},data:r}))},7:function(e,t,n,o,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"show",{name:"lang",hash:{},data:r}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.lambda,s=e.escapeExpression;return"<div>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.selected:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:"")+'</div>\r\n<div class="mt-4 cursor-pointer video-item-show-preview text-right '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.showPreview:i,t))+'">\r\n <span class="svg-container d-inline-block">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.previewSvg:i,t))?i:"")+"</span>\r\n "+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.previewDisplayed:i,{name:"if",hash:{},fn:e.program(5,r,0),inverse:e.program(7,r,0),data:r}))?i:"")+" "+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"preview",{name:"lang",hash:{},data:r}))+"\r\n</div>"},useData:!0})},1413:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return" cursor-pointer"},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing;return'<div class="'+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.doNotAdd:i,t))+' text-center">\r\n <p class="mb-0 mt-3">'+(null!=(i=(n.lang||t&&t.lang||s).call(a,"willNotBeAdded",{name:"lang",hash:{videoName:null!=t?t.name:t},data:r}))?i:"")+'</p>\r\n <p class="m-0">'+l((n.lang||t&&t.lang||s).call(a,"willBeRemoved",{name:"lang",hash:{},data:r}))+'</p>\r\n <button class="btn btn-link undo">'+l((n.lang||t&&t.lang||s).call(a,"undo",{name:"lang",hash:{},data:r}))+"</button>\r\n</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression,s=null!=t?t:e.nullContext||{};return'<div class="d-flex justify-content-between align-items-stretch p-3 drag-item '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.videoItem:i,t))+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.isClickable:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <div class="thumbnail-region d-inline-block '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.thumbnailContainer:i,t))+'"></div>\r\n <div class="metadata-region d-inline-block px-3 '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.metaContainer:i,t))+'"></div>\r\n <div class="video-actions-region d-inline-block '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.actionsContainer:i,t))+'"></div>\r\n</div>\r\n<div class="video-info-region '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.previewContainer:i,t))+'"></div>\r\n'+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.doNotAdd:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},1414:function(e,t,n){e.exports={component:"_13khy",thumbnailContainer:"_gEcp",metaContainer:"zuMb1",actionsContainer:"_1ppp8",videoItem:"_2Ru6c",doNotAdd:"_8l6WV"}},1415:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return'<span class="border-right d-inline-block align-middle pr-3">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"videosAdded",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.count:i},data:r}))+"</span>\r\n"},3:function(e,t,n,o,r){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.countPhrase:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'<span class="d-inline-block align-middle"><button class="btn btn-link clear-all"'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.submitDisabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+">"+s((n.lang||t&&t.lang||a).call(l,"reset",{name:"lang",hash:{},data:r}))+'</button></span>\r\n<button class="btn btn-primary align-middle ml-2 submit" '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.submitDisabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+">"+s((n.lang||t&&t.lang||a).call(l,"submit",{name:"lang",hash:{},data:r}))+"</button>"},useData:!0})},1416:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,a=e.escapeExpression,s=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<div class="m-auto text-warning '+a(e.lambda(null!=(i=null!=t?t.styles:t)?i.svgContainer:i,t))+'">'+(null!=(i="function"==typeof(l=null!=(l=n.warningSvg||(null!=t?t.warningSvg:t))?l:u)?l.call(s,{name:"warningSvg",hash:{},data:r}):l)?i:"")+"</div>\r\n<p>\r\n <div>"+(null!=(i="function"==typeof(l=null!=(l=n.onlineCopyCountText||(null!=t?t.onlineCopyCountText:t))?l:u)?l.call(s,{name:"onlineCopyCountText",hash:{},data:r}):l)?i:"")+' will be migrated to your Library Editor ignoring all warnings.</div>\r\n <span class="text-danger">\r\n '+a("function"==typeof(l=null!=(l=n.warningText||(null!=t?t.warningText:t))?l:u)?l.call(s,{name:"warningText",hash:{},data:r}):l)+"\r\n </span>\r\n</p> \r\n"},3:function(e,t,n,o,r){var i,l;e.propertyIsEnumerable;return"<p>"+(null!=(i="function"==typeof(l=null!=(l=n.doNotAddCountText||(null!=t?t.doNotAddCountText:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"doNotAddCountText",hash:{},data:r}):l)?i:"")+" will be removed from this list and will not be added to your library.</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(l,null!=t?t.onlineCopyCount:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+(null!=(i=n.if.call(l,null!=t?t.doNotAddCount:t,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},1417:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return' <h2 class="h3">'+s((n.lang||t&&t.lang||a).call(l,"couldNotBeMigrated",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.items:i},data:r}))+'</h2>\r\n <p class="mb-1">'+s((n.lang||t&&t.lang||a).call(l,"ensureValidity",{name:"lang",hash:{},data:r}))+'</p>\r\n <p class="mb-2"><a href="'+s(e.lambda(null!=(i=null!=t?t.options:t)?i.supportArticle:i,t))+'" target="_blank" class="text-info">'+s((n.lang||t&&t.lang||a).call(l,"moreInfo",{name:"lang",hash:{},data:r}))+'</a></p>\r\n <button class="approve-all btn btn-success d-inline-block mr-2" type="button">'+s((n.lang||t&&t.lang||a).call(l,"resolve",{name:"lang",hash:{},data:r}))+'</button>\r\n <button class="do-not-add btn btn-link d-inline-block" type="button">'+s((n.lang||t&&t.lang||a).call(l,"dismiss",{name:"lang",hash:{},data:r}))+"</button>\r\n"},3:function(e,t,n,o,r){return""},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<div class="tab-region '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.tabsContainer:i,t))+' border-bottom"></div>\r\n<div class="p-3 border-bottom '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.headingContainer:i,t))+'">\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.items:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:"")+'</div>\r\n<div class="videos-region '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.videoContainer:i,t))+'"></div>\r\n<div class="footer-region"></div>\r\n'},useData:!0})},1418:function(e,t,n){e.exports={migrationErrorView:"_1Jo6e",videoContainer:"_7tGnj",svgContainer:"csNIF",headingContainer:"_30NNv",tabsContainer:"_10__f"}},1470:function(e,t,n){"use strict";n.r(t);var o=n(1),r=n(2),i=n(5),l=n(30),a=n(3),s=n(16),u=n(309),c=n(4),p=n(42),f=n(201),d=n(0),h=n(9),y=n(13),g=n(305),m=n(1407),v=n(203),b=n(1043),w=n(103),k=n(1408),C=n(1072),E=n(1088);function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=_(e);if(t){var r=_(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return M(this,n)}}function M(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j,R=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&&S(e,t)}(i,e);var t,n,o,r=P(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"ErroredVideoPreviewComponent"}},{key:"className",get:function(){return"p-3 border-top"}},{key:"template",get:function(){return k}},{key:"lang",get:function(){return"migrationWizard.erroredVideoPreview"}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0},webplayer:{el:".webplayer-region"}}}},{key:"onRender",value:function(){this.showChildView("webplayer",new E.a({webPlayerUrl:this.options.webplayerUrl,model:new w.a({duration:1e3*this.model.get("duration"),thumbnail:{url:"".concat(this.options.imageCdnUrl,"v1/thumbnails/trackingcode/").concat(this.model.get("trackingCode"))},trackingCode:this.model.get("trackingCode")}),captureAnalytics:!1,currentUser:this.options.currentUser})),this.model.get("description")&&this.showChildView("description",new C.a({model:this.model,linkify:!0,size:C.b.Large,truncate:!0,allowExpand:!0}))}}])&&x(t.prototype,n),o&&x(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component),V=n(1409),D=n(1410),T=n(53);function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var I="migrationWizard.utils",A=function(){return a.a.getPhrase(I,"videoFileCorrupt")},U=function(){return a.a.getPhrase(I,"videoFileInformationMissing")},L=function(){return a.a.getPhrase(I,"resouceFileMissing")},B=(N(j={},T.f.BinaryRemoved,(function(){return""})),N(j,T.f.LocalFileNotFound,(function(){return a.a.getPhrase(I,"videoFileMissing")})),N(j,T.f.DbEmptyChapter,A),N(j,T.f.DbChapterChecksumNotFound,A),N(j,T.f.DbChapterDurationNotFound,U),N(j,T.f.DbChapterFileSizeNotFound,U),N(j,T.f.DbChapterChecksumNotMatch,U),N(j,T.f.DbChapterDurationNotMatch,U),N(j,T.f.DbChapterFileSizeNotMatch,U),N(j,T.f.SubtitleUploadFailure,(function(){return a.a.getPhrase(I,"subtitleFileMissing")})),N(j,T.f.ResourceUploadFailure,L),N(j,T.f.ResourceFileNotFound,L),N(j,T.f.ResourceFileInvalid,L),N(j,T.f.DbResourceChecksumNotFound,L),N(j,T.f.DbResourceExtensionNotFound,L),N(j,T.f.DbResourceFileSizeNotFound,L),N(j,T.f.DbResourceChecksumNotMatch,L),N(j,T.f.DbResourceFileSizeNotMatch,L),N(j,T.f.CoverImageUploadFailure,(function(){return a.a.getPhrase(I,"thumbnailMissing")})),j),z=function(e){return o.unique(o.map(e,(function(e){return B[e]()})))},F=n(1048);function W(e){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Z(e);if(t){var r=Z(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Y(this,n)}}function Y(e,t){if(t&&("object"===W(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 Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var K=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H(e,t)}(i,e);var t,n,o,r=J(i);function i(){return q(this,i),r.apply(this,arguments)}return t=i,(n=[{key:"name",get:function(){return"ErroredVideoMetadataComponent"}},{key:"template",get:function(){return V}},{key:"lang",get:function(){return"migrationWizard.erroredVideoMetadata"}},{key:"viewOptions",value:function(){return{styles:D,errorStrings:z(this.model.get("clientValidationResults")),ratingColorClass:this.model.get("rating")&&F.h.mapRatingToClass(this.model.get("rating").value)}}}])&&G(t.prototype,n),o&&G(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component),Q="use-online-copy",X="do-not-add",$="migration:errored:videos:preview",ee="migration:errored:videos:selected",te=n(1411),ne=n(1412);function oe(e){return(oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(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 ie(e,t){return(ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(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=se(e);if(t){var r=se(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return ae(this,n)}}function ae(e,t){if(t&&("object"===oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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&&ie(e,t)}(i,e);var t,n,o,r=le(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return t=i,(n=[{key:"initialize",value:function(){this.viewModel=l.a.get(ee),this.previewViewModel=l.a.get($),this.listenTo(this.viewModel,"change:".concat(this.model.get("id")),this.render)}},{key:"name",get:function(){return"ErroredVideoActionsComponent"}},{key:"template",get:function(){return ne}},{key:"lang",get:function(){return"migrationWizard.erroredVideoActions"}},{key:"className",get:function(){return"text-right"}},{key:"events",value:function(){return{"click .use-online-copy":"onClickSelect","click .dismiss":"onClickDismiss"}}},{key:"isSelected",value:function(){return this.viewModel.get(this.model.get("id"))===Q}},{key:"onClickSelect",value:function(e){e.stopPropagation(),this.previewViewModel.get(this.model.get("id"))&&this.previewViewModel.clear(),this.isSelected()?this.viewModel.unset(this.model.get("id")):this.viewModel.set(this.model.get("id"),Q)}},{key:"onClickDismiss",value:function(e){e.stopPropagation(),this.previewViewModel.get(this.model.get("id"))&&this.previewViewModel.clear(),this.viewModel.set(this.model.get("id"),X)}},{key:"viewOptions",value:function(){return{styles:te,selected:this.isSelected(),checkSvg:s.a.getSvg(s.b.Check),previewSvg:s.a.getSvg(s.b.Preview)}}}])&&re(t.prototype,n),o&&re(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component),ce=n(1413),pe=n(1414);function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function he(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||function(e,t){return e.__proto__=t,e})(e,t)}function ge(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 r=ve(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return me(this,n)}}function me(e,t){if(t&&("object"===fe(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:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var be=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)}(i,e);var t,n,o,r=ge(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return t=i,(n=[{key:"initialize",value:function(){this.viewModel=l.a.get(ee),this.previewViewModel=l.a.get($),this.listenTo(this.viewModel,"change:".concat(this.model.get("id")),this.render),this.listenTo(this.previewViewModel,"change:".concat(this.model.get("id")),this.render),this.listenTo(this.channelName,"thumbnail:load",this.onThumbnailLoad)}},{key:"name",get:function(){return"ErroredVideoItemComponent"}},{key:"template",get:function(){return ce}},{key:"lang",get:function(){return"migrationWizard.erroredVideoItem"}},{key:"channelName",get:function(){return y.k.generateUniqueChannelName(this)}},{key:"className",get:function(){return"border-bottom ".concat(pe.component)}},{key:"regions",value:function(){var e;return de(e={},b.a.Thumbnail,".thumbnail-region"),de(e,b.a.Metadata,".metadata-region"),de(e,b.a.VideoActions,".video-actions-region"),de(e,b.a.VideoInfo,".video-info-region"),e}},{key:"events",value:function(){return{"click .drag-item":"onClick","click .undo":"onClickUndo"}}},{key:"onThumbnailLoad",value:function(){this.thumbnailLoaded=!0}},{key:"onClick",value:function(){this.previewViewModel.get(this.model.get("id"))?this.previewViewModel.unset(this.model.get("id")):(this.previewViewModel.clear(),this.previewViewModel.set(this.model.get("id"),!0))}},{key:"onClickUndo",value:function(){this.viewModel.unset(this.model.get("id"))}},{key:"shouldLazyLoadThumbnail",value:function(){return!!y.h.isLazyLoadSupported(d.p)&&!this.thumbnailLoaded}},{key:"renderThumbnail",value:function(){var e=new v.a({model:new w.a({duration:1e3*this.model.get("duration"),thumbnail:{url:"".concat(this.options.imageCdnUrl,"v1/thumbnails/trackingcode/").concat(this.model.get("trackingCode"))}}),lazyload:this.shouldLazyLoadThumbnail(),channelName:this.channelName});this.showChildView(b.a.Thumbnail,e)}},{key:"renderMetadata",value:function(){var e=new K({model:this.model});this.showChildView(b.a.Metadata,e)}},{key:"renderActions",value:function(){var e=new ue({model:this.model});this.showChildView(b.a.VideoActions,e)}},{key:"renderPreview",value:function(){if(this.previewViewModel.get(this.model.get("id"))){var e=new R({model:this.model,webplayerUrl:this.options.webplayerUrl,imageCdnUrl:this.options.imageCdnUrl,currentUser:this.options.currentUser});this.showChildView(b.a.VideoInfo,e)}}},{key:"viewOptions",value:function(){return{styles:pe,doNotAdd:this.viewModel.get(this.model.get("id"))===X}}},{key:"onRender",value:function(){this.renderThumbnail(),this.renderMetadata(),this.renderActions(),this.renderPreview()}}])&&he(t.prototype,n),o&&he(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component);function we(e){return(we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ce(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ee(e,t,n){return t&&Ce(e.prototype,t),n&&Ce(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oe(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||function(e,t){return e.__proto__=t,e})(e,t)}function Se(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=Me(e);if(t){var r=Me(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Pe(this,n)}}function Pe(e,t){if(t&&("object"===we(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Me(e){return(Me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _e=function(e){Oe(n,e);var t=Se(n);function n(e){return ke(this,n),t.call(this,e)}return Ee(n,[{key:"name",get:function(){return"ErroredVideoItemComponentCollection"}},{key:"childView",get:function(){return be}},{key:"childViewOptions",get:function(){return this.options}}]),n}(r.a.ComponentCollection),je=function(e){Oe(n,e);var t=Se(n);function n(e){return ke(this,n),t.call(this,e)}return Ee(n,[{key:"name",get:function(){return"ErroredVideoListComponent"}},{key:"template",get:function(){return m}},{key:"behaviors",get:function(){return[{behaviorClass:g.c,selector:".lazy-img",minBrowserSupportVersion:d.p}]}},{key:"regions",value:function(){return{videos:{el:".videos-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("videos",new _e(this.options))}}]),n}(r.a.Component),Re=n(1415),Ve=n(6);function De(e){return(De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Te(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function Ne(e,t){return(Ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ie(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=Ue(e);if(t){var r=Ue(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Ae(this,n)}}function Ae(e,t){if(t&&("object"===De(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 Ue(e){return(Ue=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Le=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&&Ne(e,t)}(a,e);var t,n,r,i=Ie(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){this.viewModel=l.a.get(ee),this.listenTo(this.viewModel,"change",this.render)}},{key:"name",get:function(){return"ErroredVideoFooterComponent"}},{key:"template",get:function(){return Re}},{key:"lang",get:function(){return"migrationWizard.erroredVideoFooter"}},{key:"className",get:function(){return"border-top px-3 py-2 text-right"}},{key:"events",value:function(){return{"click .clear-all":"onClickClearAll","click .submit":"onClickSubmit"}}},{key:"onClickClearAll",value:function(){this.viewModel.clear()}},{key:"onClickSubmit",value:function(){Ve.Radio.channel(this.options.channelName).trigger(this.options.submitEvent)}},{key:"canSubmit",value:function(){return this.viewModel.keys().length>0}},{key:"countWillBeAdded",value:function(){var e=this;return o.filter(this.viewModel.keys(),(function(t){return e.viewModel.get(t)===Q})).length}},{key:"viewOptions",value:function(){return{count:this.countWillBeAdded(),submitDisabled:!this.canSubmit()}}}])&&Te(t.prototype,n),r&&Te(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.a.Component),Be=n(1129),ze=n(1120),Fe=n(1416),We=n(1417),qe=n(1418),Ge=n(144),He=n(308),Je=n(310);function Ye(e){return(Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ke(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||function(e,t){return e.__proto__=t,e})(e,t)}function Xe(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=et(e);if(t){var r=et(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return $e(this,n)}}function $e(e,t){if(t&&("object"===Ye(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 et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"MigrationErrorView",(function(){return tt}));var tt=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)}(v,e);var t,n,g,m=Xe(v);function v(){return Ze(this,v),m.apply(this,arguments)}return t=v,(n=[{key:"initialize",value:function(){this.migrationVideoDataService=i.a.getInstance(d.g.MigrationVideo,this),this.navLockService=i.a.getInstance(d.x.NavLock,this),this.viewModel=l.a.get(ee),this.previewViewModel=l.a.get($),this.listenTo(d.e.MIGRATION,"manual:review:videos:sync",this.render),this.listenTo(this.channelName,"submit",this.onSubmit),this.listenTo(this.viewModel,"change",this.onChangeSelected),this.page=1}},{key:"name",get:function(){return"MigrationErrorView"}},{key:"title",get:function(){return a.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.migrationError"}},{key:"channelName",get:function(){return y.k.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{videos:".videos-region"}}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0},videos:{el:".videos-region",partialLoading:h.h.VideoList},footer:{el:".footer-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:u.a,region:"videos",type:h.c.ManualReviewVideos,emptyStateComponents:d.h}]}},{key:"template",get:function(){return We}},{key:"className",get:function(){return"bg-white w-100 ".concat(qe.migrationErrorView)}},{key:"events",value:function(){return{"click .approve-all":"onClickApproveAll","click .do-not-add":"onClickDoNotAdd"}}},{key:"onClickApproveAll",value:function(){var e={};this.collection.each((function(t){e[t.get("id")]=Q})),this.viewModel.set(e)}},{key:"onClickDoNotAdd",value:function(){this.previewViewModel.clear();var e={};this.collection.each((function(t){e[t.get("id")]=X})),this.viewModel.set(e)}},{key:"onChangeSelected",value:function(){this.viewModel.keys().length?this.navLockService.lock({title:a.a.getPhrase(this.lang,"navLockTitle"),text:a.a.getPhrase(this.lang,"navLockBody")}):this.navLockService.unlock()}},{key:"getDialog",value:function(e,t){return new y.d({title:a.a.getPhrase(this.lang,"dialogHeading"),text:Fe({onlineCopyCount:e,onlineCopyCountText:a.a.getPhrase(this.lang,"videos",{smartCount:e}),warningText:a.a.getPhrase(this.lang,"warningText",{smartCount:e}),doNotAddCount:t,doNotAddCountText:a.a.getPhrase(this.lang,"videos",{smartCount:t}),styles:qe,warningSvg:s.a.getSvg(s.b.Warning)}),buttons:[{text:a.a.getPhrase(this.lang,"submit"),className:"btn btn-primary",success:!0}]})}},{key:"getSelectedVideos",value:function(){var e=this,t=this.collection.filter((function(t){return e.viewModel.get(t.get("id"))===Q})),n=o.groupBy(t,(function(e){return e.get("category")})),i=o.map(o.keys(n),(function(e){return{folderChord:e,videoIds:o.map(n[e],(function(e){return e.get("id")}))}}));return new r.a.Collection(i)}},{key:"onSubmit",value:function(){var e=this,t=[],n=[];o.each(this.viewModel.keys(),(function(o){var r=e.viewModel.get(o);r===X&&t.push(+o),r===Q&&n.push(+o)}));var i=this.getDialog(n.length,t.length),l=!1,a=!1,s=0,u=function(){l&&a&&(n.length?(e.viewModel.clear({silent:!0}),e.navLockService.unlock(),r.a.AppLinkHelper.trigger({application:d.b.MIGRATION_WIZARD,action:d.a.MigrationWizard.PROGRESS,args:[s]})):(e.viewModel.clear(),e.migrationVideoDataService.clearCacheAndGetCustomerMetadata(),e.migrationVideoDataService.getManualReviewVideos(),delete e.collectionSubset))};i.render().done((function(){e.logMigrationActions(n,t),t.length?e.migrationVideoDataService.updateMigrationStatus(t,Be.a.HasNotBeenMigrated,(function(){l=!0,u()})):l=!0,n.length?e.migrationVideoDataService.finaliseCustomerVideos(e.getSelectedVideos(),!0,(function(e){a=!0,s=e.get("id"),u()})):a=!0}))}},{key:"logMigrationActions",value:function(e,t){var n=this;if(e.length){var r=o.map(e,(function(t){return n.processLogData(t,e)}));this.logData(c.UserAction.ResolveWarning,r)}if(t.length){var i=o.map(t,(function(e){return n.processLogData(e,t)}));this.logData(c.UserAction.DismissWarning,i)}}},{key:"logData",value:function(e,t){var n={location:c.LocationContext.MigrationWarnings,entity:c.EntityType.Video},o=t.length===this.collection.length;p.a.logUserAction(t,p.a.mergeOptions(n,{actionType:e,descriptor:o?c.OperationDescriptor.All:c.OperationDescriptor.Single}))}},{key:"processLogData",value:function(e,t){var n=this.collection.get(e).pick("name","trackingCode");return{id:e,name:n.name,trackingCode:n.trackingCode,actionCount:t.length,warningCount:this.collection.length}}},{key:"requiredResources",get:function(){return{config:f.b.config,currentUser:Ge.b.currentUser}}},{key:"unBindScroll",value:function(){this.getUI("videos").off("scroll")}},{key:"bindScroll",value:function(){this.scrollBound||(this.getUI("videos").on("scroll",o.bind(this.onScroll,this)),this.scrollBound=!0)}},{key:"onScroll",value:function(){var e=this.getUI("videos"),t=e.children().height()-e.height()/2;e.scrollTop()+e.height()<t||25*this.page>this.collection.length||(this.collectionSubset.add(o.first(this.collection.rest(25*this.page),25)),this.page++)}},{key:"viewOptions",value:function(){var e,t;return{styles:qe,supportArticle:Je.a.getArticle(null===(e=this.config)||void 0===e?void 0:e.get("supportSiteUrl"),He.a.ManuelReview,null===(t=this.currentUser)||void 0===t?void 0:t.get("countryCode")),items:this.collection&&this.collection.length}}},{key:"onBeforeRender",value:function(){return this.collection=this.migrationVideoDataService.getManualReviewVideos(),this.collection&&!this.collectionSubset&&(this.collectionSubset=new r.a.Collection(this.collection.first(25))),!!this.collection}},{key:"onRender",value:function(){this.showChildView("tabs",new ze.h({selected:"migration-errors"})),this.showChildView("videos",new je({collection:this.collectionSubset,imageCdnUrl:this.config.get("imageCdnUrl"),webplayerUrl:this.config.get("webPlayerUrl"),currentUser:this.currentUser})),this.showChildView("footer",new Le({channelName:this.channelName,submitEvent:"submit"})),this.bindScroll()}},{key:"onBeforeDestroy",value:function(){this.unBindScroll()}},{key:"onDestroy",value:function(){l.a.clear($),l.a.clear(ee)}}])&&Ke(t.prototype,n),g&&Ke(t,g),Object.defineProperty(t,"prototype",{writable:!1}),v}(r.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[3],{1047:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(2),o=n(16),i=n(13),l=n(0),s=n(1222),a=n(1223),u=n.n(a);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===c(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 d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(c,e);var t,n,r,a=y(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,(n=[{key:"defaults",get:function(){return{styleUppercase:!0}}},{key:"name",get:function(){return"VideoItemSeriesComponent"}},{key:"template",get:function(){return u.a}},{key:"appLinks",get:function(){return this.options.seriesUrl?{}:{".series-applink":{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.SERIES,args:[this.model.series.get("id")]}}}},{key:"padNumber",value:function(e){if(!e)return null;var t=e.toString(),n=2;if(t.length>=n)return t;for(n-=t.length;n>0;)t="0"+t,n--;return t}},{key:"getSeriesName",value:function(){return this.options.highlight?i.w.wordsHighlighter(this.model.series.get("name"),this.model.get("_matchedWords")):this.model.series.get("name")}},{key:"viewOptions",value:function(){return{styles:s,seasonNumber:this.padNumber(this.model.season&&this.model.season.get("number")),episodeNumber:this.padNumber(this.model.get("episodeNumber")),seriesName:this.getSeriesName(),seriesUrl:this.options.seriesUrl,externalSvg:o.a.getSvg(o.b.NewWindow),styleUppercase:this.options.styleUppercase}}},{key:"onBeforeRender",value:function(){return this.model.series&&!!this.model.series.get("id")}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Component)},1056:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(1),o=n(2),i=n(312);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(c,e);var t,n,o,l=u(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),l.call(this,e)}return t=c,(n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.a}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,r=e.extraClasses,o="dropdown-menu-".concat(n);return r&&(o="".concat(o," ").concat(r)),o}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}])&&s(t.prototype,n),o&&s(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.ComponentCollection)},1072:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return w}));var r,o,i=n(2),l=n(13),s=n(3),a=n(1136),u=n.n(a),c=n(1137),p=n.n(c);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(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:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Small="sm",e.Large="lg"}(o||(o={}));var g=(v(r={},o.Small,3),v(r,o.Large,5),r),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&&h(e,t)}(a,e);var t,n,r,i=d(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).showingMore=!1,t}return t=a,(n=[{key:"name",get:function(){return"VideoDescriptionComponent"}},{key:"template",get:function(){return u.a}},{key:"lang",get:function(){return"shared.videoDescription"}},{key:"defaults",get:function(){return{size:"sm"}}},{key:"elements",get:function(){return{description:".description",ellipsis:this.options.allowExpand?".".concat(p.a.showMoreEllipsis):".".concat(p.a.singleEllipsis)}}},{key:"events",value:function(){return v({},"click .".concat(p.a.showMoreEllipsis),"onClickShowMore")}},{key:"onClickShowMore",value:function(e){e.preventDefault(),this.showingMore?this.showLessDescription():this.showMoreDescription()}},{key:"getDescription",value:function(){return this.options.linkify?l.w.linkifyText(l.w.escapeExpression(this.model.get("description"))):this.options.highlighter?l.w.wordsHighlighter(l.w.escapeExpression(this.model.get("description")),this.model.get("_matchedWords")):void 0}},{key:"getDescriptionElements",value:function(){return{descriptionTextEl:this.getUI("description"),ellipsisEl:this.getUI("ellipsis")}}},{key:"showMoreDescription",value:function(){var e=this.getDescriptionElements(),t=e.descriptionTextEl,n=e.ellipsisEl;t.removeClass(p.a.truncateLarge).addClass(p.a.open),n.text(s.a.getPhrase(this.lang,"showLess")),this.showingMore=!0}},{key:"showLessDescription",value:function(){var e,t=this.getDescriptionElements(),n=t.descriptionTextEl,r=t.ellipsisEl;this.options.size===o.Small&&(e="truncateSmall"),this.options.size===o.Large&&(e="truncateLarge"),n.addClass(p.a[e]),r.text(this.options.allowExpand?"... ".concat(s.a.getPhrase(this.lang,"showMore")):"...").removeClass(p.a.hideEllipsis).addClass(p.a.showEllipsis),this.showingMore=!1}},{key:"truncateDescription",value:function(){if(this.options.truncate){var e=this.getDescriptionElements().descriptionTextEl,t=g[this.options.size];e.height()<=21*t||this.showLessDescription()}}},{key:"viewOptions",value:function(){return{styles:p.a,truncate:this.options.truncate,expandable:this.options.allowExpand,description:this.getDescription()}}},{key:"onAttach",value:function(){this.truncateDescription()}}])&&y(t.prototype,n),r&&y(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(i.a.Component)},1088:function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n(1),o=n(6),i=n(2),l=n(4),s=n(42),a=n(205),u=n(203),c=n(305),p=n(13),f=n(0),y=n(1193),h=n(1138),d=n.n(h);function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var o=E(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===m(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 E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(m,e);var t,n,i,h=g(m);function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),h.call(this,e)}return t=m,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"VideoPreviewComponent"}},{key:"template",get:function(){return d.a}},{key:"instanceChannelName",get:function(){return p.k.generateUniqueChannelName(this)}},{key:"defaults",get:function(){return{captureAnalytics:!0}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.c,selector:".lazy-img",callback:function(){o.Radio.channel(e.instanceChannelName).trigger("show:play:icon")},minBrowserSupportVersion:f.p}]}},{key:"regions",value:function(){return{player:{el:".video-player-region",replaceElement:!1},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"bindListeners",value:function(){this.options.channelName&&this.listenTo(this.options.channelName,"update:chapter:time",this.onUpdateWebplayer)}},{key:"onUpdateWebplayer",value:function(e){if(!this.player)return this.listenToOnce(this.options.channelName,"webplayer:loaded",r.bind(this.seekToChapter,this,e)),void this.renderVideoPreview();this.seekToChapter(e)}},{key:"seekToChapter",value:function(e){this.player.seekTo(e)}},{key:"onClick",value:function(){this.player||this.renderVideoPreview()}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new u.a({model:this.model,thumbnailOptions:{size:a.a.Medium},playIcon:!0,lazyload:!0,channelName:this.instanceChannelName}))}},{key:"renderVideoPreview",value:function(){this.player=new y.a({model:this.model,webPlayerUrl:this.options.webPlayerUrl,parentChannelName:this.options.channelName,autoplay:!0,analyticsOptions:s.a.mergeOptions(this.options.analyticsOptions,{entity:l.EntityType.Video}),captureAnalytics:this.options.captureAnalytics,currentUser:this.options.currentUser}),this.showChildView("player",this.player)}},{key:"onRender",value:function(){this.renderThumbnail()}}])&&b(t.prototype,n),i&&b(t,i),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.a.Component)},1136:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return' <div class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.descriptionWrapper:i,t))+'">\r\n <p class="description '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.expandable:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.program(4,o,0),data:o}))?i:"")+"</p>\r\n </div>\r\n"},2:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.showMoreEllipsis:i,t))+" "+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">... '+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"showMore",{name:"lang",hash:{},data:o}))+"</span>"},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.singleEllipsis:i,t))+" "+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">...</span>'},6:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda;return' <p class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.truncate:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(6,o,0),data:o}))?i:""},useData:!0})},1137:function(e,t,n){e.exports={columnNames:"_1a1Re",descriptionWrapper:"_2MZC5",description:"_3U9j9",ellipsis:"_1YjUg",singleEllipsis:"_3SNtn",showMoreEllipsis:"xy3i9",showEllipsis:"_1_L9t",hideEllipsis:"TCdgP",open:"_18ojI",truncateSmall:"nLuVF",truncateLarge:"sEELY"}},1138:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="video-player-region cursor-pointer responsize-img">\r\n <div class="thumbnail-region"></div>\r\n</div>'},useData:!0})},1222:function(e,t,n){e.exports={svgContainer:"_1CUEt",series:"oZx-K"}},1223:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.series:i,t))},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'href="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.seriesUrl:i,t))+'" target="_blank"'},5:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.seasonNumber:i,{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o}))?i:"")+" E"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.episodeNumber:i,t))+"\r\n"},6:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"&nbsp;S"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.seasonNumber:i,t))+" &bull;"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return'<a class="series-applink text-muted '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.styleUppercase:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'" '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.seriesUrl:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+">\r\n "+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.seriesName:i,t))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.episodeNumber:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+"</a>"},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[33],{1042:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),i=n(265);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}function l(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 f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(l,e);var t,n,r,a=c(l);function l(){return o(this,l),a.apply(this,arguments)}return t=l,(n=[{key:"defaults",value:function(){return e={},t=i.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&u(t.prototype,n),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.a.Model)},1048:function(e,t,n){"use strict";var r=n(1052),i=n(1049),a=(n(1050),n(3),n(1053)),o=(n(1055),n(1051));n.d(t,"a",(function(){return r.a})),n.d(t,"d",(function(){return i.g})),n.d(t,"g",(function(){return i.j})),n.d(t,"f",(function(){return i.i})),n.d(t,"c",(function(){return i.f})),n.d(t,"e",(function(){return i.h})),n.d(t,"b",(function(){return a.a})),n.d(t,"h",(function(){return o.a}))},1049:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"k",(function(){return p})),n.d(t,"g",(function(){return b})),n.d(t,"e",(function(){return h})),n.d(t,"j",(function(){return g})),n.d(t,"i",(function(){return v})),n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return E})),n.d(t,"d",(function(){return k})),n.d(t,"f",(function(){return P})),n.d(t,"h",(function(){return y}));var r=n(2),i=n(1),a=n(19),o=n(29),u=n(3),s="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=i.reduce(e,(function(e,n,r){var a=t[r];return n||a?i.isObject(n)&&i.isObject(a)&&!i.isUndefined(n.id)&&n.id===a.id?e:i.isArray(n)?f(n,a).length?e.concat(r):e:i.isEqual(n,a)?e:e.concat(r):e}),[]);if(n.length)return i.object(i.map(n,(function(n){return i.isArray(t[n])?[n,f(e[n],t[n])]:[n,t[n]]})))}}function f(e,t){var n=[];return i.each(t,(function(t){var r=i.findWhere(e,{id:t.id});if(!i.isUndefined(r)||0!==Object.keys(t).length){var a=i.isUndefined(r)?t:l(r,t);a&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(a.id=t.id,n.push(a))))}})),n}var d={getChanges:function(e,t){var n=l(i.omit(e.toJSON(),c),i.omit(t.toJSON(),c));if(n)return i.object(i.map(i.keys(n),(function(e){return[e,d.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(i.isObject(t)&&i.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return i.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new a.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var a=["distributors","producers","directors","productionCompanies"];for(var o in i.each(i.keys(n),(function(e){a.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(i.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var u=e.get(o);(u instanceof r.a.Model||u instanceof r.a.NestedModel)&&u.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return i.each(i.keys(e.toJSON()),(function(a){if(i.contains(n,a)){var o=e.get(a).map((function(e){return e.id})),u=t.get(a).map((function(e){return e.id})),s=i.filter(o,(function(e){return e&&!i.contains(u,e)}));s.length&&(r[a]=s)}})),r}},p={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"videoTitleRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?u.a.getPhrase(s,"episodeNumberLessThanOne"):e&&e>2147483647?u.a.getPhrase(s,"episodeNumberExceeds"):e%1!=0?u.a.getPhrase(s,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?u.a.getPhrase(s,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":u.a.getPhrase(s,"seasonNoEpisodeNumber")}},m=o().year(),h={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>m?u.a.getPhrase(s,"validProductionYears",{currentYear:m}):void 0):""}},b={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"resourceNameRequired")}}]},g={suggestion:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditRequired")}},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditReasonRequired")}},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"suggestEditReasonExceeds")}}]},y={number:function(e){return e?+e<1?u.a.getPhrase(s,"seasonLessThanOne"):+e>3e3?u.a.getPhrase(s,"seasonExceeds"):+e%1!=0?u.a.getPhrase(s,"seasonNotWhole"):"":u.a.getPhrase(s,"seasonRequired")}},v={empty:function(){return u.a.getPhrase(s,"suggestEditRatingRequired")},original:function(){return u.a.getPhrase(s,"suggestEditRatingInvalid")}},P={url:[{required:!0,pattern:"url",msg:function(){return u.a.getPhrase(s,"linkUrlRequired")}},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return u.a.getPhrase(s,"linkNameRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"linkNameExceeds")}}]},w={name:[{maxLength:128,msg:function(){return u.a.getPhrase(s,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"fieldValueExceeds")}}]},E={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":u.a.getPhrase(s,"fieldsInvalid"):""}};function k(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1050:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),i=n(48),a=n(169),o=n(3),u="libraryEditor.utils",s={name:[{required:!0,msg:function(){return o.a.getPhrase(u,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(u,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?i.a.calculateDestinationFolderDepth(e,n,t)>a.a.MAX_FOLDER_DEPTH?o.a.getPhrase(u,"maxFolderDepth",{maxDepth:a.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(u,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,i=e.folder,a=e.collection;return t&&n?r.extend({},s,c(i,a)):t?s:n?c(i,a):void 0}},1051:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(16),i=n(3),a=n(200),o=n(1068),u=n(62);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var f={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case u.a.HostedLibrary:case u.a.CustomLibrary:return e.get("name");case u.a.Exchange:return i.a.getPhrase(l,"exchange");case u.a.Workspace:return i.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case u.a.HostedLibrary:case u.a.CustomLibrary:return"bg-info";case u.a.Exchange:return"bg-green";case u.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(s(t={},c.Pdf,r.b.FilePDF),s(t,c.Image,r.b.FileImg),s(t,c.PowerPoint,r.b.FilePowerpoint),s(t,c.Document,r.b.FileWord),s(t,c.Excel,r.b.FileExcel),s(t,c.Zip,r.b.FileZip),s(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return i.a.getPhrase(l,"pdf");case c.Image:return i.a.getPhrase(l,"image");case c.Document:return i.a.getPhrase(l,"document");case c.Excel:return i.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return i.a.getPhrase(l,"presentation");case c.Zip:return i.a.getPhrase(l,"zipArchive");case c.File:return i.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:f.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case a.MetadataType.VideoTitle:t+="VideoTitle";break;case a.MetadataType.Description:t+="Description";break;case a.MetadataType.Rating:t+="Rating";break;case a.MetadataType.SeriesTitle:t+="SeriesTitle";break;case a.MetadataType.Season:t+="SeasonNumber";break;case a.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case a.MetadataType.BroadcastDate:t+="BroadcastDate";break;case a.MetadataType.Channel:t+="Channel";break;case a.MetadataType.ProductionYear:t+="ProductionYear";break;case a.MetadataType.Distributors:t+="Distributors";break;case a.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case a.MetadataType.Directors:t+="Directors";break;case a.MetadataType.Producers:t+="Producers";break;case a.MetadataType.Other:t+="Other"}return i.a.getPhrase(l,t)}}},1052:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1),i=n(13),a=n(3),o="libraryEditor.utils",u={isValidChapterTime:function(e,t,n,a){if(a){if(!r.isNumber(t))return s.StartTime.Invalid();if(t<0)return s.StartTime.Invalid();if(t>i.x.millisecondsToSeconds(n))return s.StartTime.Exceeds();if(a.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return s.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?s.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?s.Name.Exists():r.isEmpty(t.trim())?s.Name.Invalid():void 0:s.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},s={Name:{Invalid:function(){return a.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return a.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return a.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return a.a.getPhrase(o,"chapterStartTimeExceeds")}}}},1053:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i="libraryEditor.utils",a={name:[{required:!0,msg:function(){return r.a.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(i,"libraryNameExceeds")}}]}},1055:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(1049),a=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return a("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return a("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return a("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?a("episodeNumberLessThanOne"):e&&e>255?a("episodeNumberExceeds"):e&&e%1!=0?a("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?a("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":a("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.e.productionYear.apply(null,t)}}},1068:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var i=c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return l}));var l=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&&o(e,t)}(c,e);var t,n,r,s=u(c);function c(){return a(this,c),s.apply(this,arguments)}return t=c,n&&i(t.prototype,n),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}(n(2).a.Collection)},1327:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var a;e.propertyIsEnumerable;return(null!=(a=e.lambda(null!=(a=null!=t?t.options:t)?a.spinnerEl:a,t))?a:"")+"\r\n"},3:function(e,t,n,r,i){return'<form>\r\n <div class="form-group">\r\n <label for="url" class="control-label">URL</label>\r\n <input name="url" id="url" type="text" class="form-control" placeholder="URL" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n <div class="form-group">\r\n <label for="name" class="control-label">Name</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="Name" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n</form>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var a;e.propertyIsEnumerable;return null!=(a=n.unless.call(null!=t?t:e.nullContext||{},null!=(a=null!=t?t.options:t)?a.dataFetched:a,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?a:""},useData:!0})},1446:function(e,t,n){"use strict";n.r(t),n.d(t,"EditLinkView",(function(){return k}));var r=n(6),i=n(2),a=n(5),o=n(30),u=n(42),s=n(305),c=n(265),l=n(13),f=n(0),d=n(192),p=n(1042),m=n(1048),h=n(1327),b=n.n(h);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var i=E(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===g(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 E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(w,e);var t,n,h,g=P(w);function w(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,w),g.call(this,e)}return t=w,(n=[{key:"initialize",value:function(){this.listenTo(f.e.LINK,"link:".concat(this.options.linkId,":sync"),this.render),this.linkDataService=a.a.getInstance(f.g.Link,this)}},{key:"name",get:function(){return"EditLinkView"}},{key:"title",get:function(){return"Edit link"}},{key:"template",get:function(){return b.a}},{key:"channelName",get:function(){return l.k.generateUniqueChannelName(this)}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.e,title:"Edit link",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new p.a,buttonText:"Save",onClick:function(t){return e.onSubmit(t)}}}]}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(r.Radio.channel(this.channelName).trigger(c.b.ShowSpinner),this.linkDataService.updateLink(this.options.videoId,this.viewModel,(function(){t.logAction(),i.a.AppLinkHelper.trigger({application:f.b.LIBRARY_EDITOR,action:f.a.LibraryEditor.EDIT_VIDEO_RESOURCES,args:[t.options.videoId]})})))}},{key:"logAction",value:function(){var e={id:this.options.linkId,parentId:+this.options.videoId,name:this.viewModel.get("name")};u.a.logUserAction(e,this.options.analyticsOptions)}},{key:"dataFetched",value:function(){return!!this.model&&!!this.viewModel}},{key:"onBeforeRender",value:function(){var e=this;this.model=this.linkDataService.getLink(this.options.linkId,(function(t){e.viewModel=o.a.get("link:".concat(e.options.linkId),t.toJSON(),{ctor:d.a}),e.viewModel.addValidation(m.c)})),this.dataFetched()&&this.spinnerModel.set(c.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:l.r.getSpinner({size:l.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.viewModel&&(this.stickit(this.viewModel),r.Validation.bind(this,{model:this.viewModel}))}},{key:"onClose",value:function(){this.unstickit()}}])&&y(t.prototype,n),h&&y(t,h),Object.defineProperty(t,"prototype",{writable:!1}),w}(i.a.View)}}]);