@clickview/library-editor 1.54.0 → 1.54.1-dev.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 (164) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/{826-library-editor-2797c4568f.chunk.css → 4001-library-editor-da87291909.chunk.css} +3 -2
  3. package/dist/css/{library-editor-app-cade5e4b6a.css → library-editor-app-08d619de95.css} +2 -2
  4. package/dist/languages/en.json +1 -1
  5. package/dist/scripts/101-1aa755b98b.chunk.js +1 -0
  6. package/dist/scripts/{1010-37e7c83417.chunk.js → 1010-2c4e71bac2.chunk.js} +1 -1
  7. package/dist/scripts/{1086-7632f7b45b.chunk.js → 1086-d0efa1a0ca.chunk.js} +1 -1
  8. package/dist/scripts/1216-9d2e314558.chunk.js +1 -0
  9. package/dist/scripts/{1269-02d8d91784.chunk.js → 1269-ec70091b19.chunk.js} +1 -1
  10. package/dist/scripts/{1409-79be9fc25d.chunk.js → 1409-f3fea6c3c3.chunk.js} +1 -1
  11. package/dist/scripts/1537-2945b91924.chunk.js +1 -0
  12. package/dist/scripts/{1703-4d41a9e919.chunk.js → 1703-0e6940a3c0.chunk.js} +1 -1
  13. package/dist/scripts/{1832-305c691701.chunk.js → 1832-9fd96d5efe.chunk.js} +1 -1
  14. package/dist/scripts/{1876-33e86bc26f.chunk.js → 1876-fc815ba31e.chunk.js} +1 -1
  15. package/dist/scripts/1973-074d4e72c2.chunk.js +1 -0
  16. package/dist/scripts/209-f9e52775b1.chunk.js +1 -0
  17. package/dist/scripts/{243-526e36736c.chunk.js → 243-d27b3c7903.chunk.js} +1 -1
  18. package/dist/scripts/2516-0290fc7712.chunk.js +1 -0
  19. package/dist/scripts/{259-e1c3eb98ce.chunk.js → 259-d6a4aa6694.chunk.js} +1 -1
  20. package/dist/scripts/{2601-f14eacbf73.chunk.js → 2601-d42245cb40.chunk.js} +1 -1
  21. package/dist/scripts/2639-efe1222211.chunk.js +2 -0
  22. package/dist/scripts/2639-efe1222211.chunk.js.LICENSE.txt +8 -0
  23. package/dist/scripts/{2644-60bdfc1c95.chunk.js → 2644-cadc6531d6.chunk.js} +1 -1
  24. package/dist/scripts/2648-61a84bc983.chunk.js +1 -0
  25. package/dist/scripts/{2692-1ddd87476e.chunk.js → 2692-b7dff9da8a.chunk.js} +1 -1
  26. package/dist/scripts/{2803-fbb9d2439d.chunk.js → 2803-026f3af7cb.chunk.js} +1 -1
  27. package/dist/scripts/{2888-c2c8b859cd.chunk.js → 2888-a406bcd564.chunk.js} +1 -1
  28. package/dist/scripts/2955-521e238d27.chunk.js +1 -0
  29. package/dist/scripts/299-32a1391000.chunk.js +1 -0
  30. package/dist/scripts/{2998-aae0ec14de.chunk.js → 2998-a3c3a1e950.chunk.js} +1 -1
  31. package/dist/scripts/{3400-ebc91cde7a.chunk.js → 3400-326dc33968.chunk.js} +1 -1
  32. package/dist/scripts/{35-278014f3ca.chunk.js → 35-d04a61537f.chunk.js} +1 -1
  33. package/dist/scripts/{3551-17275d533c.chunk.js → 3551-97ac416527.chunk.js} +1 -1
  34. package/dist/scripts/{3639-c5cc04c72d.chunk.js → 3639-171b53e474.chunk.js} +1 -1
  35. package/dist/scripts/3746-9f89d2e526.chunk.js +1 -0
  36. package/dist/scripts/376-4d9e8d5305.chunk.js +1 -0
  37. package/dist/scripts/{3763-47619f0e54.chunk.js → 3763-21a9bc8c81.chunk.js} +1 -1
  38. package/dist/scripts/3969-14f58e46c8.chunk.js +1 -0
  39. package/dist/scripts/4001-5f16bcaff3.chunk.js +2 -0
  40. package/dist/scripts/4024-e76b07c207.chunk.js +1 -0
  41. package/dist/scripts/{4201-ffd35af9cb.chunk.js → 4201-9f363cadea.chunk.js} +1 -1
  42. package/dist/scripts/{4245-9262674448.chunk.js → 4245-3680566469.chunk.js} +1 -1
  43. package/dist/scripts/{8727-30dadf014c.chunk.js → 4506-e3e16c1c39.chunk.js} +1 -1
  44. package/dist/scripts/4523-e918636e67.chunk.js +1 -0
  45. package/dist/scripts/{4591-78600e384c.chunk.js → 4591-84bc2f21f0.chunk.js} +1 -1
  46. package/dist/scripts/471-9ae0a7d088.chunk.js +2 -0
  47. package/dist/scripts/{4860-6001ab4e2a.chunk.js → 4860-7e9c7b578f.chunk.js} +1 -1
  48. package/dist/scripts/4984-e55e0bfa17.chunk.js +1 -0
  49. package/dist/scripts/514-9e42f33112.chunk.js +2 -0
  50. package/dist/scripts/514-9e42f33112.chunk.js.LICENSE.txt +6 -0
  51. package/dist/scripts/{5173-d333602893.chunk.js → 5173-6fe93f90b8.chunk.js} +1 -1
  52. package/dist/scripts/{5286-b5a0097954.chunk.js → 5286-c55bd5882c.chunk.js} +1 -1
  53. package/dist/scripts/535-96be75b325.chunk.js +1 -0
  54. package/dist/scripts/{5412-e2505df3a4.chunk.js → 5412-abf3c7ab24.chunk.js} +1 -1
  55. package/dist/scripts/{5418-f84d0ff359.chunk.js → 5418-4cf3592f6a.chunk.js} +1 -1
  56. package/dist/scripts/{5424-65be3c657c.chunk.js → 5424-fb9af4cac5.chunk.js} +1 -1
  57. package/dist/scripts/5524-83e92242a1.chunk.js +1 -0
  58. package/dist/scripts/5698-74d4a95cab.chunk.js +1 -0
  59. package/dist/scripts/{5707-41459498e9.chunk.js → 5707-2455798bbe.chunk.js} +1 -1
  60. package/dist/scripts/{5747-f28298b80d.chunk.js → 5747-dc100fe944.chunk.js} +1 -1
  61. package/dist/scripts/5850-21711256a9.chunk.js +1 -0
  62. package/dist/scripts/5891-1f548b9c62.chunk.js +1 -0
  63. package/dist/scripts/{6093-e19df1d1fa.chunk.js → 6093-c4d7d99258.chunk.js} +1 -1
  64. package/dist/scripts/61-35a4e0dd3d.chunk.js +2 -0
  65. package/dist/scripts/{6352-d267f9afea.chunk.js → 6352-9f5498c43f.chunk.js} +1 -1
  66. package/dist/scripts/6637-3078ed12bc.chunk.js +1 -0
  67. package/dist/scripts/6725-52d65e0d02.chunk.js +2 -0
  68. package/dist/scripts/{6732-85afd02f41.chunk.js → 6732-0223b7e084.chunk.js} +1 -1
  69. package/dist/scripts/{6774-a002ac7253.chunk.js → 6774-7d16e3a1b2.chunk.js} +1 -1
  70. package/dist/scripts/{6788-dc6b522995.chunk.js → 6788-1baf5483df.chunk.js} +1 -1
  71. package/dist/scripts/6963-2e5edf04ac.chunk.js +1 -0
  72. package/dist/scripts/{7053-00950d18ae.chunk.js → 7053-5f6f2bf8ee.chunk.js} +1 -1
  73. package/dist/scripts/7071-9ae15d6979.chunk.js +1 -0
  74. package/dist/scripts/7153-11798dda90.chunk.js +1 -0
  75. package/dist/scripts/{7190-2b40df1e89.chunk.js → 7190-b143292308.chunk.js} +1 -1
  76. package/dist/scripts/7295-c5ccbfe2be.chunk.js +1 -0
  77. package/dist/scripts/{7376-e3bf3a94f9.chunk.js → 7376-e476873e22.chunk.js} +1 -1
  78. package/dist/scripts/{7408-49b32d5829.chunk.js → 7408-eb04403233.chunk.js} +1 -1
  79. package/dist/scripts/7416-bafece2a3d.chunk.js +1 -0
  80. package/dist/scripts/7827-53c10fe9d7.chunk.js +1 -0
  81. package/dist/scripts/8080-540165cb5c.chunk.js +1 -0
  82. package/dist/scripts/8113-eb9901344c.chunk.js +1 -0
  83. package/dist/scripts/{8213-6c873c853e.chunk.js → 8213-4d11becb33.chunk.js} +1 -1
  84. package/dist/scripts/{8362-267efdac61.chunk.js → 8362-2712404025.chunk.js} +1 -1
  85. package/dist/scripts/8542-7dbc2fa676.chunk.js +1 -0
  86. package/dist/scripts/8591-920b0560e4.chunk.js +1 -0
  87. package/dist/scripts/{8726-2d0bc64637.chunk.js → 8726-10013d1e22.chunk.js} +1 -1
  88. package/dist/scripts/8757-8ba60a3c5f.chunk.js +2 -0
  89. package/dist/scripts/8757-8ba60a3c5f.chunk.js.LICENSE.txt +44 -0
  90. package/dist/scripts/{8762-be126e413d.chunk.js → 8762-0c818e61d0.chunk.js} +1 -1
  91. package/dist/scripts/{8906-2ae58fb990.chunk.js → 8906-3052c24e98.chunk.js} +1 -1
  92. package/dist/scripts/{8952-27f5ea4a16.chunk.js → 8952-5dfd08cdc7.chunk.js} +2 -2
  93. package/dist/scripts/9077-fd1d054d31.chunk.js +1 -0
  94. package/dist/scripts/9134-8845590ece.chunk.js +1 -0
  95. package/dist/scripts/{9357-e71ea6a34d.chunk.js → 9357-04700677af.chunk.js} +1 -1
  96. package/dist/scripts/9369-cacc5f30e5.chunk.js +2 -0
  97. package/dist/scripts/9383-26ce3e3847.chunk.js +1 -0
  98. package/dist/scripts/{9695-636ea0ef64.chunk.js → 9695-8b46921478.chunk.js} +1 -1
  99. package/dist/scripts/{9927-7a935c955d.chunk.js → 9927-1a5a65a341.chunk.js} +1 -1
  100. package/dist/scripts/bundle-5d010f1f12.min.js +2 -0
  101. package/dist/scripts/bundle-5d010f1f12.min.js.LICENSE.txt +133 -0
  102. package/dist/scripts/{polyfills-5ce436cbbe.min.js → polyfills-e4d8584da7.min.js} +1 -1
  103. package/package.json +4 -4
  104. package/dist/scripts/101-c8fa0bf8c0.chunk.js +0 -1
  105. package/dist/scripts/112-4f413f94c0.chunk.js +0 -1
  106. package/dist/scripts/1216-83f6fbc7be.chunk.js +0 -1
  107. package/dist/scripts/152-808e046b1f.chunk.js +0 -2
  108. package/dist/scripts/1973-7a1768228d.chunk.js +0 -1
  109. package/dist/scripts/2417-e85abc4005.chunk.js +0 -1
  110. package/dist/scripts/2482-ded3090c15.chunk.js +0 -1
  111. package/dist/scripts/2648-0a58c0fc05.chunk.js +0 -1
  112. package/dist/scripts/2802-d428814c29.chunk.js +0 -2
  113. package/dist/scripts/2802-d428814c29.chunk.js.LICENSE.txt +0 -8
  114. package/dist/scripts/299-e59ef1fc4f.chunk.js +0 -1
  115. package/dist/scripts/343-4f77983932.chunk.js +0 -1
  116. package/dist/scripts/3746-1fd61fe062.chunk.js +0 -1
  117. package/dist/scripts/376-0ae51da38f.chunk.js +0 -1
  118. package/dist/scripts/3969-c636ff3159.chunk.js +0 -1
  119. package/dist/scripts/4024-8372510247.chunk.js +0 -1
  120. package/dist/scripts/4523-e244d0dae2.chunk.js +0 -1
  121. package/dist/scripts/5046-7f741b88da.chunk.js +0 -1
  122. package/dist/scripts/514-eeb95eba47.chunk.js +0 -1
  123. package/dist/scripts/535-b26597b4d0.chunk.js +0 -1
  124. package/dist/scripts/5524-04583b6e40.chunk.js +0 -1
  125. package/dist/scripts/5850-996ea58208.chunk.js +0 -1
  126. package/dist/scripts/5891-bf6bb58afe.chunk.js +0 -1
  127. package/dist/scripts/61-29f179811f.chunk.js +0 -2
  128. package/dist/scripts/6532-48f3f080f5.chunk.js +0 -2
  129. package/dist/scripts/6963-68cce4d38c.chunk.js +0 -1
  130. package/dist/scripts/7002-48057608dc.chunk.js +0 -1
  131. package/dist/scripts/7071-78d0b6c0cb.chunk.js +0 -1
  132. package/dist/scripts/708-4faf09f1e5.chunk.js +0 -1
  133. package/dist/scripts/7153-b581d35045.chunk.js +0 -1
  134. package/dist/scripts/7295-5a82c36f28.chunk.js +0 -1
  135. package/dist/scripts/7827-ef0d617862.chunk.js +0 -1
  136. package/dist/scripts/8113-d678e76098.chunk.js +0 -1
  137. package/dist/scripts/8234-d793dd9bda.chunk.js +0 -1
  138. package/dist/scripts/826-c6d1a46e45.chunk.js +0 -2
  139. package/dist/scripts/8542-475ab8438e.chunk.js +0 -1
  140. package/dist/scripts/8591-149f4a2b62.chunk.js +0 -1
  141. package/dist/scripts/9369-f43ee314be.chunk.js +0 -2
  142. package/dist/scripts/9383-2c77c78fe8.chunk.js +0 -1
  143. package/dist/scripts/bundle-8f42183790.min.js +0 -2
  144. package/dist/scripts/bundle-8f42183790.min.js.LICENSE.txt +0 -1
  145. package/typings/libs/CVEvents.d.ts +0 -13
  146. package/typings/libs/CVLanguages.d.ts +0 -24
  147. package/typings/libs/LazyLoad.d.ts +0 -30
  148. package/typings/libs/LazyLoad.ts +0 -27
  149. package/typings/libs/cookiesjs.d.ts +0 -24
  150. /package/dist/css/{2417-library-editor-46f8e6e95b.chunk.css → 1537-library-editor-46f8e6e95b.chunk.css} +0 -0
  151. /package/dist/css/{2482-library-editor-1b6dc45d45.chunk.css → 209-library-editor-1b6dc45d45.chunk.css} +0 -0
  152. /package/dist/css/{343-library-editor-d2f704c6a5.chunk.css → 2955-library-editor-d2f704c6a5.chunk.css} +0 -0
  153. /package/dist/css/{112-library-editor-6a2d152d7d.chunk.css → 6637-library-editor-6a2d152d7d.chunk.css} +0 -0
  154. /package/dist/css/{152-library-editor-01b4461ff1.chunk.css → 6725-library-editor-01b4461ff1.chunk.css} +0 -0
  155. /package/dist/css/{708-library-editor-7ffe353138.chunk.css → 8080-library-editor-7ffe353138.chunk.css} +0 -0
  156. /package/dist/css/{5046-library-editor-765ea88cb0.chunk.css → 9077-library-editor-765ea88cb0.chunk.css} +0 -0
  157. /package/dist/css/{8234-library-editor-5a1c6fc3b4.chunk.css → 9134-library-editor-5a1c6fc3b4.chunk.css} +0 -0
  158. /package/dist/scripts/{61-29f179811f.chunk.js.LICENSE.txt → 4001-5f16bcaff3.chunk.js.LICENSE.txt} +0 -0
  159. /package/dist/scripts/{6532-48f3f080f5.chunk.js.LICENSE.txt → 471-9ae0a7d088.chunk.js.LICENSE.txt} +0 -0
  160. /package/dist/scripts/{546-40961bc779.chunk.js → 546-2cf4378b0c.chunk.js} +0 -0
  161. /package/dist/scripts/{826-c6d1a46e45.chunk.js.LICENSE.txt → 61-35a4e0dd3d.chunk.js.LICENSE.txt} +0 -0
  162. /package/dist/scripts/{152-808e046b1f.chunk.js.LICENSE.txt → 6725-52d65e0d02.chunk.js.LICENSE.txt} +0 -0
  163. /package/dist/scripts/{8952-27f5ea4a16.chunk.js.LICENSE.txt → 8952-5dfd08cdc7.chunk.js.LICENSE.txt} +0 -0
  164. /package/dist/scripts/{9369-f43ee314be.chunk.js.LICENSE.txt → 9369-cacc5f30e5.chunk.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[3763],{33763:function(e,t,n){"use strict";n.r(t),n.d(t,{BannerUploadView:function(){return E}});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(57098),d=n(29457),y=n(18375),g=n(93569),m=n(66266),b=n.n(m);function v(e){return v="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},v(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,k(r.key),r)}}function k(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var E=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=O(t),function(e,t){if(t&&("object"==v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,C()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(t,e),n=t,(m=[{key:"initialize",value:function(){this.libraryDataService=a.u.getInstance(h.Or.Library,this),this.imageUploadDataService=a.u.getInstance(h.Or.ImageUpload,this),this.viewModel=c.r.get("image:storage"),this.bindListeners(),this.initImageEl()}},{key:"name",get:function(){return"BannerUploadView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.bannerUpload"}},{key:"template",get:function(){return b()}},{key:"channelName",get:function(){return g.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_.FOLDER,":").concat(this.options.folderId,":sync"),this.render),this.listenTo(h.Vk.VIDEO,"".concat(h.M_.UPDATE_FOLDER_BANNER,":").concat(this.options.folderId,":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.__.Banners,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this,n={folderId:this.options.folderId,imageModel:e,currentImageId:this.model.banner&&this.model.banner.id};this.libraryDataService.addOrUpdateBanner(n,(function(){return t.triggerMethod("hide")}))}},{key:"renderCropper",value:function(){var e=new y.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.__.Banners,minWidth:h.yE[d.__.Banners].width,minHeight:h.yE[d.__.Banners].height,getCropRegionWidth:o.bind(this.getCropRegionWidth,this)}))}},{key:"onBeforeRender",value:function(){this.model=this.libraryDataService.getFolder(this.options.folderId)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model,spinnerEl:g.Kp.getSpinner({size:g.Ey.Large,extraClasses:"mx-auto"})}}}])&&w(n.prototype,m),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,m}(l.Q.G7)},58025:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},a:function(){return g}});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,f(r.key),r)}}function f(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=d(t),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return 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(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(u.Q.wA)},66266: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([[3763],{33763:function(e,t,n){"use strict";n.r(t),n.d(t,{BannerUploadView:function(){return E}});var r=n(43823),o=n(21161),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(57098),d=n(29457),y=n(18375),g=n(93569),m=n(66266),b=n.n(m);function v(e){return v="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},v(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,k(r.key),r)}}function k(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=v(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}var E=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=O(t),function(e,t){if(t&&("object"==v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,C()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(t,e),n=t,(m=[{key:"initialize",value:function(){this.libraryDataService=a.u.getInstance(h.Or.Library,this),this.imageUploadDataService=a.u.getInstance(h.Or.ImageUpload,this),this.viewModel=c.r.get("image:storage"),this.bindListeners(),this.initImageEl()}},{key:"name",get:function(){return"BannerUploadView"}},{key:"title",get:function(){return u.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.bannerUpload"}},{key:"template",get:function(){return b()}},{key:"channelName",get:function(){return g.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_.FOLDER,":").concat(this.options.folderId,":sync"),this.render),this.listenTo(h.Vk.VIDEO,"".concat(h.M_.UPDATE_FOLDER_BANNER,":").concat(this.options.folderId,":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.__.Banners,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this,n={folderId:this.options.folderId,imageModel:e,currentImageId:this.model.banner&&this.model.banner.id};this.libraryDataService.addOrUpdateBanner(n,(function(){return t.triggerMethod("hide")}))}},{key:"renderCropper",value:function(){var e=new y.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.__.Banners,minWidth:h.yE[d.__.Banners].width,minHeight:h.yE[d.__.Banners].height,getCropRegionWidth:o.bind(this.getCropRegionWidth,this)}))}},{key:"onBeforeRender",value:function(){this.model=this.libraryDataService.getFolder(this.options.folderId)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model,spinnerEl:g.Kp.getSpinner({size:g.Ey.Large,extraClasses:"mx-auto"})}}}])&&w(n.prototype,m),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,m}(l.Q.G7)},58025:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},a:function(){return g}});var r,o=n(43823),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,f(r.key),r)}}function f(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=d(t),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,h()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return 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(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(u.Q.wA)},66266:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(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(31197);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:o}):i)+'" class="img img-fluid" />'},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[3969],{89375:function(e,r,t){t.d(r,{j:function(){return i}});var a=t(31647),n=" - ClickView",i={setPageTitle:function(e){e&&a.Q.Ab.SetPageTitle(function(e){return e.length+12<=60?e+n:e.substring(0,57)+"..."+n}(e))}}},86242:function(e,r,t){t.d(r,{Oo:function(){return f},b2:function(){return v}});var a=t(32735),n=t(57857),i=t(49642),c=t(90547),l=t(5256),o=t(89146),u=t(85475),s=t(39396);function m(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var a,n,i,c,l=[],o=!0,u=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;o=!1}else for(;!(o=(a=i.call(t)).done)&&(l.push(a.value),l.length!==r);o=!0);}catch(e){u=!0,n=e}finally{try{if(!o&&null!=t.return&&(c=t.return(),Object(c)!==c))return}finally{if(u)throw n}}return l}}(e,r)||function(e,r){if(e){if("string"==typeof e)return b(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?b(e,r):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=Array(r);t<r;t++)a[t]=e[t];return a}var d=n.T.encloseNamespace("shared.breadcrumbComponent"),y=a.forwardRef((function(e,r){var t=e.breadcrumb,n=t.name,c=t.appLink,l=t.active,o=e.withBackIcon,m=n,b=null;return m.length>48&&(m=n.slice(0,48)+"...",b=n),a.createElement("li",{className:"breadcrumb-item".concat(l?" active":""),title:b},l?a.createElement("strong",null,m):a.createElement(i.F,{appLink:c,ref:r},o&&a.createElement(s.x,{svgName:u.vn.ChevronLeft,size:s.S.Small}),a.createElement("span",{className:o?"ms-2":""},m)))})),f=function(e){var r=e.breadcrumbs,t=(0,l.a)(c.r.XS),n=(null==r?void 0:r.length)||0,i=m(a.useState(!1),2),o=i[0],u=i[1],s=m(a.useState(!1),2),b=s[0],f=s[1],v=a.useRef(null);if(a.useEffect((function(){var e,t=null!==(e=null==r?void 0:r.reduce((function(e,r){return e+r.name.length}),0))&&void 0!==e?e:0;n>4&&t>64&&u(!0)}),[null==r?void 0:r.length]),a.useLayoutEffect((function(){var e;b&&(null===(e=v.current)||void 0===e||e.focus())}),[v.current,b]),!n||t&&n<2)return a.createElement(a.Fragment,null);if(t)return a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},a.createElement(y,{breadcrumb:r[n-2],withBackIcon:!0})));var g=a.createElement(y,{breadcrumb:r[0]}),p=n>2?a.createElement(y,{breadcrumb:r[1]}):a.createElement(a.Fragment,null),h=n>3?a.createElement(y,{breadcrumb:r[n-2]}):a.createElement(a.Fragment,null),E=n>1?a.createElement(y,{breadcrumb:r[n-1]}):a.createElement(a.Fragment,null),w=r.slice(2,n-2);return a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},g,p,o?a.createElement("li",{className:"breadcrumb-item"},a.createElement("button",{className:"btn-link",onClick:function(){u(!1),f(!0)},"aria-label":d("expand")},"...")):w.map((function(e,r){return a.createElement(y,{key:r,breadcrumb:e,ref:0===r?v:null})})),h,E))},v=a.memo((function(e){var r=e.numItems,t=void 0===r?3:r;return(0,l.a)(c.r.XS)?a.createElement("div",{className:"partial-loading-background",style:{height:"1.3125rem",width:"6rem"}}):a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},o.u.getPartialLoadingItems({numItems:t}).map((function(e,r){var t=e.width;return a.createElement("li",{key:r,className:"breadcrumb-item"},a.createElement("span",{className:"d-inline-block partial-loading-background",style:{width:t},dangerouslySetInnerHTML:{__html:"&nbsp"}}))}))))}))},84611:function(e,r,t){t.d(r,{f:function(){return c}});var a=t(32735),n=t(39396),i={circle:"Uxnsl",img:"BQ87Y"};function c(e){var r;return e.imageUrl||e.svgName?e.imageUrl?a.createElement("div",{className:"".concat(i.img," rounded-circle h-100 w-100"),style:{backgroundImage:"url(".concat(e.imageUrl,")")}}," "):a.createElement("div",{className:"".concat(i.circle," ").concat(e.variant?"bg-".concat(e.variant):""," text-").concat(e.textVariant," rounded-circle h-100 w-100 ").concat(null!==(r=e.svgWrapperClassName)&&void 0!==r?r:"")},a.createElement(n.x,{svgName:e.svgName,size:e.svgSize})):a.createElement(a.Fragment,null)}c.defaultProps={textVariant:"white"}},90547:function(e,r,t){var a;t.d(r,{r:function(){return a}}),function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(a||(a={}))},34107:function(e,r,t){t.d(r,{D:function(){return l}});var a=t(2248),n=t(68003),i=t(40221),c=t(84657),l={domainLibraries:function(e,r,t,a){return{url:n._.urlBuilder("/api/domain/v2/me/libraries",{type:e,maxCategoryDepth:0}),key:"libraries:".concat(e.sort().join(":")),formatData:function(e){return e.map((function(e){return e.data}))},success:r,error:t,always:a}},libraryRequestLibraries:function(){return{url:"{gateway}/v1/library-requests/libraries",key:"libraries"}},librariesWithCategories:function(){return{url:n._.urlBuilder("/api/domain/v2/me/libraries",{type:["sharedLibrary","customLibrary","unpublishedCustomLibrary"],maxCategoryDepth:5}),key:"libraries:with:categories",normalize:!1}},librariesWithOwnerLogos:function(e,r,t,a){return e.sort(),{url:n._.urlBuilder("/api/domain/v2/objects",{query:c.v.LIBRARY_COLLECTION,id:e}),key:"libraries:owner:logo:".concat(e.join(",")),success:r,error:t,always:a}},library:function(e,r,t,a){return{url:n._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:c.v.LIBRARY}),key:"library:".concat(e),success:r,error:t,always:a}},exchange:function(e){return{url:n._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"categorytree"}),key:"exchange"}},streamableLearning:function(){return{url:"{gateway}/v1/streamable-learning-library",key:"streamable:learning"}},librarySubscribers:function(e,r){var t={};return r&&(t.cursor=r),{url:n._.urlBuilder("{gateway}/v1/library-requests/libraries/".concat(e,"/subscribers"),t),key:"library:subscribers:".concat(e,":").concat(r)}},libraryOwner:function(e){return{url:"{gateway}/v1/library-requests/libraries/".concat(e,"/subscribers?ownerOnly=true"),key:"library:owner:".concat(e),formatData:function(e){return i.m.first(e.data)}}},updateSubscriberPermissions:function(e,r,t,n,i){return{url:"{gateway}/v1/libraries/".concat(e,"/library-request-permissions"),key:"update:subscriber:permissions:".concat(e,":").concat(r),type:a.k.PUT,data:{customerId:r,granted:t},invalidationKeys:["library:owner:".concat(e),"library:subscribers:".concat(e)],success:n,error:i}},removeSubscriber:function(e,r,t,n){return{url:"{gateway}/v1/objects/".concat(e,"/subscribedcustomers?memberId=").concat(r),key:"revoke:subscription:".concat(e,":").concat(r),type:a.k.DELETE,invalidationKeys:["library:subscribers:".concat(e)],success:t,error:n}},folder:function(e,r,t,a){return{url:"{gateway}/v1/objects/".concat(e,"?query=banner,libraries"),key:"library:folder:".concat(e),success:r,error:t,always:a}},videoFolders:function(e){return{url:"{gateway}/v1/objects/".concat(e,"/categories?query=libraries"),key:"video:folders:".concat(e)}},folderParentTree:function(e,r,t,a){return{url:"/api/domain/v2/categories/".concat(e,"/parent-tree?includeAll=false"),key:"folder:parent:tree".concat(e),success:r,error:t,always:a}},childFolders:function(e,r,t,a,n){var i="{gateway}/v1/objects/".concat(e,"/categories?query={limit:100}thumbnail"),c="child:folders:".concat(e);return r&&(i+="&cursor=".concat(r),c+=":".concat(r)),{url:i,key:c,formatData:function(e){var r=e.data.sort((function(e,r){return e.name.toLowerCase().localeCompare(r.name.toLowerCase())}));return Object.assign(Object.assign({},e),{data:r})},success:t,error:a,always:n}},addToLibrary:function(e,r){var t=["folder","videos",e.metadata.destinationCategoryId,r].filter((function(e){return!!e})).join(":");return{url:"{gateway}/v1/library-requests",key:"add:".concat(e.objectId,":to:").concat(e.destinationLibraryId,":").concat(e.metadata.destinationCategoryId),type:a.k.POST,data:e,invalidationKeys:t}},libraries:function(){return{url:"{gateway}/v1/users/me/libraries",key:"objects:libraries"}}}},89146:function(e,r,t){function a(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,a=Array(r);t<r;t++)a[t]=e[t];return a}t.d(r,{u:function(){return i}});var n={numItems:5,minWidth:50,maxWidth:100},i={getPartialLoadingItems:function(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign(Object.assign({},n),r);return(e=Array(t.numItems),function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,r){if(e){if("string"==typeof e)return a(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?a(e,r):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(){return{width:"".concat(Math.max(Math.floor(Math.random()*t.maxWidth),t.minWidth),"px")}}))}}},52814:function(e,r,t){t.d(r,{y:function(){return n}});var a=t(32735);function n(){return a.createElement("div",{className:"partial-loading-background w-100 rounded-3",style:{height:"3.5rem"}}," ")}},23969:function(e,r,t){t.r(r),t.d(r,{LibraryRequestSettingsLibrariesView:function(){return w}});var a=t(32735),n=t(57857),i=t(31647),c=t(86120),l=t(40221),o=t(89375),u=t(86242),s=t(66703),m=t(34107),b=t(50997),d=t(52814),y=t(49642),f=t(84611),v=t(85475),g={libraryIcon:"hQt1a"};function p(e){var r,t;return a.createElement(y.F,{className:"p-2 border rounded-3 d-flex align-items-center mb-2 text-decoration-none",appLink:{application:b.OV.LIBRARY_REQUESTS,action:b.eX.LibraryRequests.LIBRARY_REQUEST_SETTINGS,args:[e.library.id]}},a.createElement("div",{className:"".concat(g.libraryIcon," me-2")},a.createElement(f.f,{svgName:v.vn.Library,imageUrl:null===(t=null===(r=e.library.owner)||void 0===r?void 0:r.logo)||void 0===t?void 0:t.url,variant:"ultramarine"})),a.createElement("h3",{className:"h6 mb-0"},e.library.name))}var h="libraryEditor.libraryRequestSettingsLibraries",E=n.T.encloseNamespace(h);function w(){var e=c.a.useBasicFetch(m.D.domainLibraries(["customLibrary","unpublishedCustomLibrary"]));a.useEffect((function(){return o.j.setPageTitle(E("libraryRequestSettings"))}),[]),a.useEffect((function(){e.data&&(e.data.length>1||i.Q.C$.trigger({application:b.OV.LIBRARY_REQUESTS,action:b.eX.LibraryRequests.LIBRARY_REQUEST_SETTINGS,args:[l.m.first(e.data).id]},{replace:!0}))}),[e.data]);var r=[{name:E("libraryEditor"),appLink:{application:b.OV.LIBRARY_EDITOR,action:b.eX.LibraryEditor.HOME}},{name:E("libraryRequestSettings"),appLink:{application:b.OV.LIBRARY_REQUESTS,action:b.eX.LibraryRequests.LIBRARY_REQUEST_SETTINGS_LIBRARIES},active:!0}];return a.createElement("div",{className:"bg-white p-3"},a.createElement("h1",{className:"h3 mb-2"},a.createElement(s.x,{namespace:h,phrase:"libraryRequestSettings"})),a.createElement(u.Oo,{breadcrumbs:r}),a.createElement("hr",null),a.createElement("h2",{className:"h5 mb-2"},a.createElement(s.x,{namespace:h,phrase:"myLibraries"})),e.data?a.createElement(a.Fragment,null,e.data.map((function(e){return a.createElement(p,{key:e.id,library:e})}))):a.createElement(a.Fragment,null,a.createElement("div",{className:"mb-2"},a.createElement(d.y,null)),a.createElement("div",{className:"mb-2"},a.createElement(d.y,null))))}}}]);