@clickview/library-editor 1.34.0 → 1.35.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{6999-library-editor-f5cb81c301.chunk.css → 1032-library-editor-7f570b5bae.chunk.css} +5 -2
  3. package/dist/css/1703-library-editor-f3611612bc.chunk.css +6 -0
  4. package/dist/css/1876-library-editor-f3611612bc.chunk.css +6 -0
  5. package/dist/css/{1911-library-editor-cbb76b4f54.chunk.css → 2548-library-editor-0d9c69dcc2.chunk.css} +5 -2
  6. package/dist/css/376-library-editor-6d718e6fc5.chunk.css +8 -0
  7. package/dist/css/{6220-library-editor-89476df956.chunk.css → 3838-library-editor-278d6bb099.chunk.css} +5 -2
  8. package/dist/css/{61-library-editor-07a7bc7368.chunk.css → 61-library-editor-54b70c4868.chunk.css} +1 -1
  9. package/dist/css/{4177-library-editor-ff74264957.chunk.css → 6539-library-editor-9f1f85b87c.chunk.css} +5 -2
  10. package/dist/css/7471-library-editor-94699d5c5e.chunk.css +17 -0
  11. package/dist/css/{1887-library-editor-2e08f3d5c2.chunk.css → 9267-library-editor-bb7ada7014.chunk.css} +5 -2
  12. package/dist/css/{9309-library-editor-aad2f294a9.chunk.css → 9309-library-editor-4f83101450.chunk.css} +1 -1
  13. package/dist/css/{library-editor-app-f36801ade7.css → library-editor-app-9e70719a5d.css} +3 -1
  14. package/dist/languages/en.json +1 -1
  15. package/dist/scripts/{1010-a4704e61de.chunk.js → 1010-4ef589d008.chunk.js} +1 -1
  16. package/dist/scripts/{6999-1b7d8256a1.chunk.js → 1032-3728f9df89.chunk.js} +1 -1
  17. package/dist/scripts/{1086-1e49d7436c.chunk.js → 1086-341076633d.chunk.js} +1 -1
  18. package/dist/scripts/{1216-3680236a27.chunk.js → 1216-1770d561b9.chunk.js} +1 -1
  19. package/dist/scripts/{1269-6898014713.chunk.js → 1269-f10222a29e.chunk.js} +1 -1
  20. package/dist/scripts/1409-9429160d1d.chunk.js +1 -0
  21. package/dist/scripts/{1492-815b776897.chunk.js → 1492-85fc4f1440.chunk.js} +1 -1
  22. package/dist/scripts/{1601-d11282915d.chunk.js → 1601-0550afd76f.chunk.js} +2 -2
  23. package/dist/scripts/1703-cb95448dd7.chunk.js +1 -0
  24. package/dist/scripts/{1832-2c91ee3a51.chunk.js → 1832-5a04f29a50.chunk.js} +1 -1
  25. package/dist/scripts/1876-8cbd30a64a.chunk.js +1 -0
  26. package/dist/scripts/2254-a44369c23f.chunk.js +1 -0
  27. package/dist/scripts/{2417-5006b87aa9.chunk.js → 2417-4aa80cae75.chunk.js} +1 -1
  28. package/dist/scripts/{243-7cbcd679de.chunk.js → 243-637db87e01.chunk.js} +1 -1
  29. package/dist/scripts/2548-b757efc24f.chunk.js +1 -0
  30. package/dist/scripts/259-eb6c27e0ba.chunk.js +1 -0
  31. package/dist/scripts/2601-7fbe77582f.chunk.js +1 -0
  32. package/dist/scripts/2644-1e60bf9d9a.chunk.js +1 -0
  33. package/dist/scripts/{2692-4dec659d9d.chunk.js → 2692-79a41634fc.chunk.js} +1 -1
  34. package/dist/scripts/{2803-687b620987.chunk.js → 2803-bf2efe7108.chunk.js} +1 -1
  35. package/dist/scripts/{2842-230d775b71.chunk.js → 2842-1fe369f593.chunk.js} +1 -1
  36. package/dist/scripts/2849-52940803ca.chunk.js +2 -0
  37. package/dist/scripts/2849-52940803ca.chunk.js.LICENSE.txt +32 -0
  38. package/dist/scripts/{2888-0eeb8ded06.chunk.js → 2888-81722c9a17.chunk.js} +1 -1
  39. package/dist/scripts/{299-500f0b6af0.chunk.js → 299-2b1b8399d8.chunk.js} +1 -1
  40. package/dist/scripts/2998-ed2a612f50.chunk.js +1 -0
  41. package/dist/scripts/35-ddade9da12.chunk.js +1 -0
  42. package/dist/scripts/{3639-914a724862.chunk.js → 3639-573b6e5774.chunk.js} +1 -1
  43. package/dist/scripts/{3746-e0c3fc3e93.chunk.js → 3746-5bf623b37c.chunk.js} +1 -1
  44. package/dist/scripts/376-16d0d5c7fe.chunk.js +1 -0
  45. package/dist/scripts/{3763-6f873cc545.chunk.js → 3763-04bb9b9f59.chunk.js} +1 -1
  46. package/dist/scripts/3838-de148f8ce8.chunk.js +1 -0
  47. package/dist/scripts/{4201-84a6867187.chunk.js → 4201-069a0ae82b.chunk.js} +1 -1
  48. package/dist/scripts/{4591-55fa691940.chunk.js → 4591-9edc896170.chunk.js} +1 -1
  49. package/dist/scripts/{4860-d42be62696.chunk.js → 4860-70078a99af.chunk.js} +1 -1
  50. package/dist/scripts/{514-0d0d21f74f.chunk.js → 514-73f47c096f.chunk.js} +1 -1
  51. package/dist/scripts/5286-ff323ac9a4.chunk.js +1 -0
  52. package/dist/scripts/{5412-789cbf80a3.chunk.js → 5412-a5b5c4e8df.chunk.js} +1 -1
  53. package/dist/scripts/{5418-c1287e4896.chunk.js → 5418-8f4b817a2a.chunk.js} +1 -1
  54. package/dist/scripts/{5424-b185ba8a45.chunk.js → 5424-40969425da.chunk.js} +1 -1
  55. package/dist/scripts/{546-d293c45084.chunk.js → 546-9821b7a137.chunk.js} +1 -1
  56. package/dist/scripts/5524-b4a0c38b11.chunk.js +1 -0
  57. package/dist/scripts/5698-569428a4cd.chunk.js +1 -0
  58. package/dist/scripts/5707-a14bfb1cf4.chunk.js +1 -0
  59. package/dist/scripts/{5747-05c9d61fe0.chunk.js → 5747-76d3bf1ac9.chunk.js} +1 -1
  60. package/dist/scripts/61-d1ed7b849d.chunk.js +2 -0
  61. package/dist/scripts/{6357-8477d01a86.chunk.js → 6357-38195d7d56.chunk.js} +1 -1
  62. package/dist/scripts/{6505-f069c1fbe4.chunk.js → 6505-a3cd826b3d.chunk.js} +1 -1
  63. package/dist/scripts/6539-73d88ad7a8.chunk.js +1 -0
  64. package/dist/scripts/6673-e06bde51a3.chunk.js +2 -0
  65. package/dist/scripts/{6732-59d6dff740.chunk.js → 6732-926ba6e4a7.chunk.js} +1 -1
  66. package/dist/scripts/{6774-c9e8698d5c.chunk.js → 6774-bc3e91ef9f.chunk.js} +1 -1
  67. package/dist/scripts/{6788-f89668cddb.chunk.js → 6788-162a034c8f.chunk.js} +1 -1
  68. package/dist/scripts/{7002-29951169db.chunk.js → 7002-2abf4ab235.chunk.js} +1 -1
  69. package/dist/scripts/{7053-86b05dc741.chunk.js → 7053-31953ee49e.chunk.js} +1 -1
  70. package/dist/scripts/7071-666cb9ad06.chunk.js +1 -0
  71. package/dist/scripts/{708-ac4137af9c.chunk.js → 708-387b4a22ae.chunk.js} +1 -1
  72. package/dist/scripts/7190-0ca846cc20.chunk.js +1 -0
  73. package/dist/scripts/{7376-753fc6cb76.chunk.js → 7376-88ce2513f1.chunk.js} +1 -1
  74. package/dist/scripts/7471-66a3ac412d.chunk.js +1 -0
  75. package/dist/scripts/8213-e81d88992f.chunk.js +1 -0
  76. package/dist/scripts/{8362-e662057f79.chunk.js → 8362-9f5d02162b.chunk.js} +1 -1
  77. package/dist/scripts/8542-c87f824a21.chunk.js +1 -0
  78. package/dist/scripts/8726-188275719c.chunk.js +1 -0
  79. package/dist/scripts/{8727-6104f06be6.chunk.js → 8727-25b7a07d5e.chunk.js} +1 -1
  80. package/dist/scripts/{8762-97ee795453.chunk.js → 8762-19b69b9933.chunk.js} +1 -1
  81. package/dist/scripts/{8906-2f788f9242.chunk.js → 8906-03db1bdbc3.chunk.js} +1 -1
  82. package/dist/scripts/9215-c65cf4202e.chunk.js +2 -0
  83. package/dist/scripts/9219-4054e7058c.chunk.js +1 -0
  84. package/dist/scripts/9267-93c60091a6.chunk.js +1 -0
  85. package/dist/scripts/9309-cd4d33317f.chunk.js +1 -0
  86. package/dist/scripts/{9357-8cae90b1de.chunk.js → 9357-4f30f5eb0d.chunk.js} +1 -1
  87. package/dist/scripts/{9695-ad43223301.chunk.js → 9695-0ee92974f3.chunk.js} +1 -1
  88. package/dist/scripts/9927-1c47de191d.chunk.js +1 -0
  89. package/dist/scripts/bundle-e4bf8d2629.min.js +2 -0
  90. package/package.json +1 -1
  91. package/dist/scripts/1364-17e2eeefbc.chunk.js +0 -1
  92. package/dist/scripts/1409-7dec2a8e18.chunk.js +0 -1
  93. package/dist/scripts/1887-1f10bdcd32.chunk.js +0 -1
  94. package/dist/scripts/1911-90a2329c55.chunk.js +0 -1
  95. package/dist/scripts/2254-28945bd10d.chunk.js +0 -1
  96. package/dist/scripts/259-1e858db89a.chunk.js +0 -1
  97. package/dist/scripts/3096-ce0ed4447d.chunk.js +0 -1
  98. package/dist/scripts/3525-54f3afe02c.chunk.js +0 -2
  99. package/dist/scripts/4177-2ce1a9bdaa.chunk.js +0 -1
  100. package/dist/scripts/4885-8b2fae075e.chunk.js +0 -1
  101. package/dist/scripts/5524-b4527dfc81.chunk.js +0 -1
  102. package/dist/scripts/5698-74d4735cbc.chunk.js +0 -1
  103. package/dist/scripts/61-b53ce2761e.chunk.js +0 -2
  104. package/dist/scripts/6220-dfa7ef3ad3.chunk.js +0 -1
  105. package/dist/scripts/6532-0b999572cf.chunk.js +0 -2
  106. package/dist/scripts/6532-0b999572cf.chunk.js.LICENSE.txt +0 -13
  107. package/dist/scripts/6995-861706c8b2.chunk.js +0 -1
  108. package/dist/scripts/7190-921073f4ef.chunk.js +0 -1
  109. package/dist/scripts/7634-8a81b8d57d.chunk.js +0 -1
  110. package/dist/scripts/8947-c600642573.chunk.js +0 -1
  111. package/dist/scripts/9215-23e4e44ad3.chunk.js +0 -2
  112. package/dist/scripts/9219-f1a3581014.chunk.js +0 -1
  113. package/dist/scripts/9309-f68d1f311a.chunk.js +0 -1
  114. package/dist/scripts/9927-faf9b990b5.chunk.js +0 -1
  115. package/dist/scripts/9976-e00c6a4cb7.chunk.js +0 -1
  116. package/dist/scripts/bundle-4cce60eb9f.min.js +0 -2
  117. /package/dist/css/{7634-library-editor-de43a47ac6.chunk.css → 2601-library-editor-de43a47ac6.chunk.css} +0 -0
  118. /package/dist/css/{9976-library-editor-94bb070288.chunk.css → 2644-library-editor-94bb070288.chunk.css} +0 -0
  119. /package/dist/css/{3525-library-editor-6c6933c94d.chunk.css → 6673-library-editor-6c6933c94d.chunk.css} +0 -0
  120. /package/dist/scripts/{101-5640626835.chunk.js → 101-a8b13989d6.chunk.js} +0 -0
  121. /package/dist/scripts/{1601-d11282915d.chunk.js.LICENSE.txt → 1601-0550afd76f.chunk.js.LICENSE.txt} +0 -0
  122. /package/dist/scripts/{3969-07f2d1c976.chunk.js → 3969-5585d517d7.chunk.js} +0 -0
  123. /package/dist/scripts/{4245-b2e9ec5ba5.chunk.js → 4245-6b79d9b8b4.chunk.js} +0 -0
  124. /package/dist/scripts/{4523-14445af8ad.chunk.js → 4523-befa1c95fa.chunk.js} +0 -0
  125. /package/dist/scripts/{5891-8b9423d292.chunk.js → 5891-7eac8c2776.chunk.js} +0 -0
  126. /package/dist/scripts/{6093-d497dc9474.chunk.js → 6093-a270c23508.chunk.js} +0 -0
  127. /package/dist/scripts/{3525-54f3afe02c.chunk.js.LICENSE.txt → 61-d1ed7b849d.chunk.js.LICENSE.txt} +0 -0
  128. /package/dist/scripts/{61-b53ce2761e.chunk.js.LICENSE.txt → 6673-e06bde51a3.chunk.js.LICENSE.txt} +0 -0
  129. /package/dist/scripts/{6963-881ab7febf.chunk.js → 6963-bb36f098b6.chunk.js} +0 -0
  130. /package/dist/scripts/{9215-23e4e44ad3.chunk.js.LICENSE.txt → 9215-c65cf4202e.chunk.js.LICENSE.txt} +0 -0
  131. /package/dist/scripts/{bundle-4cce60eb9f.min.js.LICENSE.txt → bundle-e4bf8d2629.min.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9357],{39357:function(e,t,n){"use strict";n.r(t),n.d(t,{ThumbnailUploadView:function(){return O}});var r=n(48088),o=n(39479),i=n(11306),a=n(21679),u=n(57857),c=n(99249),l=n(31647),s=n(10101),p=n(58025),f=n(88172),h=n(48090),d=n(29457),m=n(18375),y=n(61843),g=n(68826),v=n.n(g);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function w(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,(void 0,o=function(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===b(o)?o:String(o)),r)}var o}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(E,e);var t,n,g,O,I=(g=E,O=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=C(g);if(O){var n=C(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function E(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),I.call(this,e)}return t=E,(n=[{key:"initialize",value:function(){this.videoDataService=a.u.getInstance(h.Or.Video,this),this.imageUploadDataService=a.u.getInstance(h.Or.ImageUpload,this),this.navLockService=a.u.getInstance(h.K9.NavLock,this),this.viewModel=c.r.get("image:storage"),this.bindListeners(),this.initImageEl()}},{key:"name",get:function(){return"ThumbnailUploadView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.thumbnailUpload"}},{key:"template",get:function(){return v()}},{key:"channelName",get:function(){return y.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.Yw,title:u.T.getPhrase(this.lang,"resizeAndCrop"),size:"modal-lg",spinnerButtonOptions:{channelName:this.channelName,buttonText:u.T.getPhrase(this.lang,"crop"),onClick:function(){return e.onClickCrop()}}}]}},{key:"regions",value:function(){return{cropper:{el:".cropper-region",replaceElement:!0}}}},{key:"events",value:function(){return{"shown.bs.modal":"renderCropper"}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,p.Y.ImageCropped,this.onImageCropped),this.listenTo(h.Vk.VIDEO,"".concat(h.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(h.Vk.VIDEO,"".concat(h.M_.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),(function(){return e.triggerMethod("hide")}))}},{key:"initImageEl",value:function(){this.viewModel.get("dataUrl")||l.Q.Ry.throw(new i.H("DataUrl must be set on the image:storage ViewModel")),this.imageEl=new Image,this.imageEl.src=this.viewModel.get("dataUrl"),this.viewModel.unset("dataUrl")}},{key:"getCropRegionWidth",value:function(){return this.$el.find(".modal-body").width()}},{key:"onClickCrop",value:function(){r.Radio.channel(this.channelName).trigger(p.Y.CropImage),r.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner)}},{key:"onImageCropped",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,d.__.Thumbnails,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this,n=this.model.thumbnail&&this.model.thumbnail.id;this.videoDataService.addOrUpdateThumbnail(this.options.videoId,e,n,(function(){return t.triggerMethod("hide")}))}},{key:"renderCropper",value:function(){var e=new m.E({dataUrl:this.imageEl.src,width:this.imageEl.width,height:this.imageEl.height});this.showChildView("cropper",new p.a({model:e,channelName:this.channelName,imageType:d.__.Thumbnails,minWidth:h.yE[d.__.Thumbnails].width,minHeight:h.yE[d.__.Thumbnails].height,getCropRegionWidth:o.bind(this.getCropRegionWidth,this)}))}},{key:"onBeforeRender",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model,spinnerEl:y.Kp.getSpinner({size:y.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onBeforeDestroy",value:function(){c.r.get("upload:thumbnail:options").get("lockNav")&&this.navLockService.lock()}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),E}(l.Q.G7)},58025:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},a:function(){return d}});var r,o=n(48088),i=n(51934),a=n.n(i),u=n(31647),c=n(91465),l=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},s(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===s(o)?o:String(o)),r)}var o}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));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&&f(e,t)}(d,e);var t,n,i,u,c=(i=d,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(i);if(u){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),c.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return l()}},{key:"className",get:function(){return"text-center"}},{key:"elements",get:function(){return{image:".img"}}},{key:"getMinCropBoxWidth",value:function(){return this.options.minWidth*this.getViewportToImageRatio()}},{key:"getMinCropBoxHeight",value:function(){return this.options.minHeight*this.getViewportToImageRatio()}},{key:"getViewportToImageRatio",value:function(){return this.options.getCropRegionWidth()/this.model.get("width")}},{key:"crop",value:function(){var e=this.cropper.getCroppedCanvas().toDataURL(this.getImageMimeType());o.Radio.channel(this.options.channelName).trigger(r.ImageCropped,e)}},{key:"getImageMimeType",value:function(){var e=this.model.get("dataUrl").match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(e)return e[1]}},{key:"renderCropper",value:function(){this.getMinCropBoxWidth();var e=this.getUI("image").get(0);this.cropper=new(a())(e,{viewMode:1,aspectRatio:this.options.minWidth/this.options.minHeight,minCropBoxWidth:this.getMinCropBoxWidth(),minCropBoxHeight:this.getMinCropBoxHeight(),autoCropArea:1})}},{key:"onRender",value:function(){this.renderCropper()}},{key:"onBeforeDestroy",value:function(){this.cropper.destroy()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(u.Q.wA)},68826:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,n,r,o){return'<div class="cropper-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},91465:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:o}):i)+'" class="img img-fluid" />'},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9357],{39357:function(e,t,n){"use strict";n.r(t),n.d(t,{ThumbnailUploadView:function(){return O}});var r=n(48088),o=n(39479),i=n(11306),a=n(21679),u=n(57857),c=n(99249),l=n(31647),s=n(10101),p=n(58025),f=n(88172),h=n(93479),d=n(29457),m=n(18375),y=n(93569),g=n(68826),v=n.n(g);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function w(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,(void 0,o=function(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===b(o)?o:String(o)),r)}var o}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function C(e){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},C(e)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(E,e);var t,n,g,O,I=(g=E,O=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=C(g);if(O){var n=C(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function E(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),I.call(this,e)}return t=E,(n=[{key:"initialize",value:function(){this.videoDataService=a.u.getInstance(h.Or.Video,this),this.imageUploadDataService=a.u.getInstance(h.Or.ImageUpload,this),this.navLockService=a.u.getInstance(h.K9.NavLock,this),this.viewModel=c.r.get("image:storage"),this.bindListeners(),this.initImageEl()}},{key:"name",get:function(){return"ThumbnailUploadView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.thumbnailUpload"}},{key:"template",get:function(){return v()}},{key:"channelName",get:function(){return y.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.Yw,title:u.T.getPhrase(this.lang,"resizeAndCrop"),size:"modal-lg",spinnerButtonOptions:{channelName:this.channelName,buttonText:u.T.getPhrase(this.lang,"crop"),onClick:function(){return e.onClickCrop()}}}]}},{key:"regions",value:function(){return{cropper:{el:".cropper-region",replaceElement:!0}}}},{key:"events",value:function(){return{"shown.bs.modal":"renderCropper"}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,p.Y.ImageCropped,this.onImageCropped),this.listenTo(h.Vk.VIDEO,"".concat(h.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(h.Vk.VIDEO,"".concat(h.M_.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),(function(){return e.triggerMethod("hide")}))}},{key:"initImageEl",value:function(){this.viewModel.get("dataUrl")||l.Q.Ry.throw(new i.H("DataUrl must be set on the image:storage ViewModel")),this.imageEl=new Image,this.imageEl.src=this.viewModel.get("dataUrl"),this.viewModel.unset("dataUrl")}},{key:"getCropRegionWidth",value:function(){return this.$el.find(".modal-body").width()}},{key:"onClickCrop",value:function(){r.Radio.channel(this.channelName).trigger(p.Y.CropImage),r.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner)}},{key:"onImageCropped",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,d.__.Thumbnails,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this,n=this.model.thumbnail&&this.model.thumbnail.id;this.videoDataService.addOrUpdateThumbnail(this.options.videoId,e,n,(function(){return t.triggerMethod("hide")}))}},{key:"renderCropper",value:function(){var e=new m.E({dataUrl:this.imageEl.src,width:this.imageEl.width,height:this.imageEl.height});this.showChildView("cropper",new p.a({model:e,channelName:this.channelName,imageType:d.__.Thumbnails,minWidth:h.yE[d.__.Thumbnails].width,minHeight:h.yE[d.__.Thumbnails].height,getCropRegionWidth:o.bind(this.getCropRegionWidth,this)}))}},{key:"onBeforeRender",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model,spinnerEl:y.Kp.getSpinner({size:y.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onBeforeDestroy",value:function(){c.r.get("upload:thumbnail:options").get("lockNav")&&this.navLockService.lock()}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),E}(l.Q.G7)},58025:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},a:function(){return d}});var r,o=n(48088),i=n(51934),a=n.n(i),u=n(31647),c=n(91465),l=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},s(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===s(o)?o:String(o)),r)}var o}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));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&&f(e,t)}(d,e);var t,n,i,u,c=(i=d,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(i);if(u){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),c.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return l()}},{key:"className",get:function(){return"text-center"}},{key:"elements",get:function(){return{image:".img"}}},{key:"getMinCropBoxWidth",value:function(){return this.options.minWidth*this.getViewportToImageRatio()}},{key:"getMinCropBoxHeight",value:function(){return this.options.minHeight*this.getViewportToImageRatio()}},{key:"getViewportToImageRatio",value:function(){return this.options.getCropRegionWidth()/this.model.get("width")}},{key:"crop",value:function(){var e=this.cropper.getCroppedCanvas().toDataURL(this.getImageMimeType());o.Radio.channel(this.options.channelName).trigger(r.ImageCropped,e)}},{key:"getImageMimeType",value:function(){var e=this.model.get("dataUrl").match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(e)return e[1]}},{key:"renderCropper",value:function(){this.getMinCropBoxWidth();var e=this.getUI("image").get(0);this.cropper=new(a())(e,{viewMode:1,aspectRatio:this.options.minWidth/this.options.minHeight,minCropBoxWidth:this.getMinCropBoxWidth(),minCropBoxHeight:this.getMinCropBoxHeight(),autoCropArea:1})}},{key:"onRender",value:function(){this.renderCropper()}},{key:"onBeforeDestroy",value:function(){this.cropper.destroy()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(u.Q.wA)},68826:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,n,r,o){return'<div class="cropper-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},91465:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:o}):i)+'" class="img img-fluid" />'},useData:!0})}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9695],{49695:function(t,e,n){"use strict";n.r(e),n.d(e,{UploadCompleteView:function(){return b}});var r=n(21679),o=n(57857),i=n(31647),l=n(48090),a=n(27169),u=n.n(a),c={completeImage:"TcxNH"};function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==p(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===p(o)?o:String(o)),r)}var o}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(m,t);var e,n,i,a,b=(i=m,a=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(t){return!1}}(),function(){var t,e=y(i);if(a){var n=y(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function m(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,m),b.apply(this,arguments)}return e=m,(n=[{key:"initialize",value:function(){this.videoUploadService=r.u.getInstance(l.K9.VideoUpload,this)}},{key:"name",get:function(){return"UploadCompleteView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"upload.uploadComplete"}},{key:"template",get:function(){return u()}},{key:"className",get:function(){return"p-3 my-3 bg-white rounded text-center"}},{key:"appLinks",get:function(){return{".back-to-library-applink":{application:l.OV.LIBRARY_EDITOR,action:l.eX.LibraryEditor.HOME}}}},{key:"viewOptions",value:function(){return{styles:c,count:this.videoUploadService.getCollection().length,imageUrl:l.Wn.Shared.SUCCESS}}},{key:"onBeforeDestroy",value:function(){this.videoUploadService.getCollection().reset()}}])&&s(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),m}(i.Q.G7)},27169:function(t,e,n){var r=n(32227);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){t.propertyIsEnumerable;var i,l=null!=e?e:t.nullContext||{},a=t.hooks.helperMissing,u=t.escapeExpression,c=t.lambda;return"<h1>"+u((n.lang||e&&e.lang||a).call(l,"inLibrary",{name:"lang",hash:{smartCount:null!=(i=null!=e?e.options:e)?i.count:i},data:o}))+'</h1>\n<div class="my-3">\n <img src='+u(c(null!=(i=null!=e?e.options:e)?i.imageUrl:i,e))+' class="'+u(c(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.completeImage:i,e))+' my-4 img-fluid"/>\n</div>\n<p>'+u((n.lang||e&&e.lang||a).call(l,"isProcessing",{name:"lang",hash:{smartCount:null!=(i=null!=e?e.options:e)?i.count:i},data:o}))+'</p>\n<a class="back-to-library-applink btn btn-dark">'+u((n.lang||e&&e.lang||a).call(l,"back",{name:"lang",hash:{},data:o}))+"</a>"},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9695],{49695:function(t,e,n){"use strict";n.r(e),n.d(e,{UploadCompleteView:function(){return b}});var r=n(21679),o=n(57857),i=n(31647),l=n(93479),a=n(27169),u=n.n(a),c={completeImage:"TcxNH"};function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==p(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===p(o)?o:String(o)),r)}var o}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(m,t);var e,n,i,a,b=(i=m,a=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(t){return!1}}(),function(){var t,e=y(i);if(a){var n=y(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function m(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,m),b.apply(this,arguments)}return e=m,(n=[{key:"initialize",value:function(){this.videoUploadService=r.u.getInstance(l.K9.VideoUpload,this)}},{key:"name",get:function(){return"UploadCompleteView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"upload.uploadComplete"}},{key:"template",get:function(){return u()}},{key:"className",get:function(){return"p-3 my-3 bg-white rounded text-center"}},{key:"appLinks",get:function(){return{".back-to-library-applink":{application:l.OV.LIBRARY_EDITOR,action:l.eX.LibraryEditor.HOME}}}},{key:"viewOptions",value:function(){return{styles:c,count:this.videoUploadService.getCollection().length,imageUrl:l.Wn.Shared.SUCCESS}}},{key:"onBeforeDestroy",value:function(){this.videoUploadService.getCollection().reset()}}])&&s(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),m}(i.Q.G7)},27169:function(t,e,n){var r=n(32227);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){t.propertyIsEnumerable;var i,l=null!=e?e:t.nullContext||{},a=t.hooks.helperMissing,u=t.escapeExpression,c=t.lambda;return"<h1>"+u((n.lang||e&&e.lang||a).call(l,"inLibrary",{name:"lang",hash:{smartCount:null!=(i=null!=e?e.options:e)?i.count:i},data:o}))+'</h1>\n<div class="my-3">\n <img src='+u(c(null!=(i=null!=e?e.options:e)?i.imageUrl:i,e))+' class="'+u(c(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.completeImage:i,e))+' my-4 img-fluid"/>\n</div>\n<p>'+u((n.lang||e&&e.lang||a).call(l,"isProcessing",{name:"lang",hash:{smartCount:null!=(i=null!=e?e.options:e)?i.count:i},data:o}))+'</p>\n<a class="back-to-library-applink btn btn-dark">'+u((n.lang||e&&e.lang||a).call(l,"back",{name:"lang",hash:{},data:o}))+"</a>"},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9927],{67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function l(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(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,c(r.key),r)}}function c(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(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&&u(e,t)}(p,e);var t,n,r,c,f=(r=p,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=s(r);if(c){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function p(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),f.apply(this,arguments)}return t=p,(n=[{key:"defaults",value:function(){return l(l({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.Hn)},79927:function(e,t,n){"use strict";n.r(t),n.d(t,{DownloadToLocalCacheView:function(){return C}});var r=n(21679),o=n(57857),i=n(31647),l=n(10101),a=n(88172),c=n(93479),u=n(87175),s=n(67670),f=n(19226),p=n(93569),h=n(9231),y=n.n(h),d={image:"wnpu5"};function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function 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,(void 0,o=function(e,t){if("object"!==b(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===b(o)?o:String(o)),r)}var o}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(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)}(O,e);var t,n,h,C,w=(h=O,C=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=g(h);if(C){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function O(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,O),w.call(this,e)}return t=O,(n=[{key:"initialize",value:function(){this.localCacheDataService=r.u.getInstance(c.Or.LocalCache,this),this.bindListeners()}},{key:"name",get:function(){return"DownloadToLocalCacheView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"shared.downloadToLocalCache"}},{key:"template",get:function(){return y()}},{key:"channelName",get:function(){return p.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return this.spinnerModel=new s.v,[{behaviorClass:l.Yw,title:o.T.getPhrase(this.lang,"popupHeading"),spinnerButtonOptions:this.getSpinnerButtonOptions}]}},{key:"bindListeners",value:function(){var e=this;this.listenTo(c.Vk.USER,"".concat(c.M_.CURRENT_USER,":sync"),this.render),this.listenTo(c.Vk.LOCAL_CACHE,"".concat(c.M_.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(c.Vk.LOCAL_CACHE,"".concat(c.M_.LOCAL_CACHE_DOWNLOADS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(c.Vk.LOCAL_CACHE,"".concat(c.M_.ADD_VIDEO_TO_LOCAL_CACHE,":sync"),(function(){return e.triggerMethod("hide")})),this.listenTo(c.Vk.LOCAL_CACHE,"".concat(c.M_.ADD_VIDEO_TO_LOCAL_CACHE,":error"),(function(){return e.triggerMethod("hide")}))}},{key:"getSpinnerButtonOptions",value:function(){var e=this;if(!this.localCacheDownloads||!this.localCacheDownloads.length)return{model:this.spinnerModel,channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"buttonText"),onClick:function(){return e.onClickAddToLocalCache()}}}},{key:"onClickAddToLocalCache",value:function(){this.spinnerModel.set(a.ZV.ShowSpinner,!0),this.localCacheDataService.downloadVideoToLocalCache(this.model.get("deviceId"),this.options.videoId)}},{key:"requiredResources",get:function(){return{currentUser:f.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this.localCacheDataService.getDevices(this.currentUser.get("customerId"));return this.localCacheDownloads=this.localCacheDataService.getDownloadsForVideos([this.options.videoId]),!(e&&this.localCacheDownloads&&(this.model=p.o8.getNewestDeviceUserCanManage(e,this.currentUser.get("customerId")),this.model?(this.spinnerModel.set(a.ZV.Disabled,!1),0):(setTimeout((function(){return i.Q.Ry.throw(new u.HH)}),0),1)))}},{key:"viewOptions",value:function(){return{styles:d,dataFetched:!!this.model&&!!this.localCacheDownloads,spinnerEl:p.Kp.getSpinner({size:p.Ey.Large,extraClasses:"mx-auto"}),alreadyDownloaded:this.localCacheDownloads&&this.localCacheDownloads.length,imageUrl:c.Wn.Shared.LOCAL_CACHE}}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),O}(i.Q.G7)},9231:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.alreadyDownloaded:i,{name:"unless",hash:{},fn:e.program(4,o,0),inverse:e.program(6,o,0),data:o}))?i:""},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,c=e.escapeExpression,u=e.lambda;return'<p class="mb-3"><strong>'+c((n.lang||t&&t.lang||a).call(l,"description",{name:"lang",hash:{},data:o}))+'</strong></p>\n<img class="img-fluid '+c(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+' mb-3" src="'+c(u(null!=(i=null!=t?t.options:t)?i.imageUrl:i,t))+'" />\n<p>'+c((n.lang||t&&t.lang||a).call(l,"nextStep",{name:"lang",hash:{},data:o}))+"</p>\n"},6:function(e,t,n,r,o){return e.propertyIsEnumerable,'<p class="m-0">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"alreadyAdded",{name:"lang",hash:{},data:o}))+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})}}]);