@clickview/library-editor 1.35.0-rc.1 → 1.35.0-rc.3

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 (92) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{1703-library-editor-f3611612bc.chunk.css → 1703-library-editor-22d3cf78a3.chunk.css} +1 -1
  3. package/dist/css/{1876-library-editor-f3611612bc.chunk.css → 1876-library-editor-22d3cf78a3.chunk.css} +1 -1
  4. package/dist/css/{2601-library-editor-de43a47ac6.chunk.css → 2601-library-editor-0db14cf497.chunk.css} +1 -1
  5. package/dist/css/{6505-library-editor-f5fbc19cce.chunk.css → 6505-library-editor-0862b9edab.chunk.css} +1 -1
  6. package/dist/css/{library-editor-app-9e70719a5d.css → library-editor-app-ad7039f1c8.css} +4 -0
  7. package/dist/languages/en.json +1 -1
  8. package/dist/scripts/{1010-4ef589d008.chunk.js → 1010-4d193dac9e.chunk.js} +1 -1
  9. package/dist/scripts/{1032-3728f9df89.chunk.js → 1032-417348711d.chunk.js} +1 -1
  10. package/dist/scripts/{1086-341076633d.chunk.js → 1086-aad27f7c95.chunk.js} +1 -1
  11. package/dist/scripts/{1409-9429160d1d.chunk.js → 1409-ac31418286.chunk.js} +1 -1
  12. package/dist/scripts/{1492-85fc4f1440.chunk.js → 1492-58e6c2cfda.chunk.js} +1 -1
  13. package/dist/scripts/{1601-0550afd76f.chunk.js → 1601-b0af727472.chunk.js} +2 -2
  14. package/dist/scripts/1703-ffaf83218d.chunk.js +1 -0
  15. package/dist/scripts/{1832-5a04f29a50.chunk.js → 1832-714a73ab92.chunk.js} +1 -1
  16. package/dist/scripts/1876-dbf77c66df.chunk.js +1 -0
  17. package/dist/scripts/{2254-a44369c23f.chunk.js → 2254-799d6c5eee.chunk.js} +1 -1
  18. package/dist/scripts/{2417-4aa80cae75.chunk.js → 2417-96e0949602.chunk.js} +1 -1
  19. package/dist/scripts/{243-637db87e01.chunk.js → 243-918a686085.chunk.js} +1 -1
  20. package/dist/scripts/2548-6a87ecc6d8.chunk.js +1 -0
  21. package/dist/scripts/{259-eb6c27e0ba.chunk.js → 259-ec48acb47c.chunk.js} +1 -1
  22. package/dist/scripts/{2601-7fbe77582f.chunk.js → 2601-a6525c17a2.chunk.js} +1 -1
  23. package/dist/scripts/{2644-1e60bf9d9a.chunk.js → 2644-999d466e90.chunk.js} +1 -1
  24. package/dist/scripts/{2692-79a41634fc.chunk.js → 2692-4703edbf92.chunk.js} +1 -1
  25. package/dist/scripts/{2803-bf2efe7108.chunk.js → 2803-536f4de2e5.chunk.js} +1 -1
  26. package/dist/scripts/{2888-81722c9a17.chunk.js → 2888-82154ef78f.chunk.js} +1 -1
  27. package/dist/scripts/{299-2b1b8399d8.chunk.js → 299-b7dbf0ebbf.chunk.js} +1 -1
  28. package/dist/scripts/2998-f85af341b9.chunk.js +1 -0
  29. package/dist/scripts/35-03ea4ab137.chunk.js +1 -0
  30. package/dist/scripts/{3639-573b6e5774.chunk.js → 3639-33630e86bc.chunk.js} +1 -1
  31. package/dist/scripts/{3746-5bf623b37c.chunk.js → 3746-44c2f70e92.chunk.js} +1 -1
  32. package/dist/scripts/376-4824e2507c.chunk.js +1 -0
  33. package/dist/scripts/{3763-04bb9b9f59.chunk.js → 3763-1b221d69b3.chunk.js} +1 -1
  34. package/dist/scripts/{3838-de148f8ce8.chunk.js → 3838-1b742c6e78.chunk.js} +1 -1
  35. package/dist/scripts/3969-aac649e660.chunk.js +1 -0
  36. package/dist/scripts/{4201-069a0ae82b.chunk.js → 4201-d2cd82d164.chunk.js} +1 -1
  37. package/dist/scripts/4523-d2c7bc4ef6.chunk.js +1 -0
  38. package/dist/scripts/{4591-9edc896170.chunk.js → 4591-f4bbb00b24.chunk.js} +1 -1
  39. package/dist/scripts/{4860-70078a99af.chunk.js → 4860-b4b567b013.chunk.js} +1 -1
  40. package/dist/scripts/{514-73f47c096f.chunk.js → 514-899d11ac93.chunk.js} +1 -1
  41. package/dist/scripts/5286-24bd355a31.chunk.js +1 -0
  42. package/dist/scripts/{5412-a5b5c4e8df.chunk.js → 5412-1bb7fe0d88.chunk.js} +1 -1
  43. package/dist/scripts/{5424-464a4aefd8.chunk.js → 5424-84c95bcb01.chunk.js} +1 -1
  44. package/dist/scripts/{546-9821b7a137.chunk.js → 546-08908e5aea.chunk.js} +1 -1
  45. package/dist/scripts/5698-a34aef1372.chunk.js +1 -0
  46. package/dist/scripts/5707-ed924036d6.chunk.js +1 -0
  47. package/dist/scripts/{5747-76d3bf1ac9.chunk.js → 5747-7d4c5072db.chunk.js} +1 -1
  48. package/dist/scripts/{61-0f468de54f.chunk.js → 61-8487d036e5.chunk.js} +2 -2
  49. package/dist/scripts/{6505-a3cd826b3d.chunk.js → 6505-b7d19d5c03.chunk.js} +1 -1
  50. package/dist/scripts/{6539-73d88ad7a8.chunk.js → 6539-3126f0fbda.chunk.js} +1 -1
  51. package/dist/scripts/{6673-9c020ef1e9.chunk.js → 6673-012b6a34e6.chunk.js} +2 -2
  52. package/dist/scripts/{6732-926ba6e4a7.chunk.js → 6732-a50459c84d.chunk.js} +1 -1
  53. package/dist/scripts/{6774-bc3e91ef9f.chunk.js → 6774-d9478103b4.chunk.js} +1 -1
  54. package/dist/scripts/{6788-162a034c8f.chunk.js → 6788-587666f144.chunk.js} +1 -1
  55. package/dist/scripts/6963-9d33991743.chunk.js +1 -0
  56. package/dist/scripts/{7002-2abf4ab235.chunk.js → 7002-913b8786d0.chunk.js} +1 -1
  57. package/dist/scripts/{7053-31953ee49e.chunk.js → 7053-27fd687560.chunk.js} +1 -1
  58. package/dist/scripts/7071-c6667f44f5.chunk.js +1 -0
  59. package/dist/scripts/{708-387b4a22ae.chunk.js → 708-83d4f20c11.chunk.js} +1 -1
  60. package/dist/scripts/{7376-88ce2513f1.chunk.js → 7376-30a7796bd8.chunk.js} +1 -1
  61. package/dist/scripts/7471-e4a571d23d.chunk.js +1 -0
  62. package/dist/scripts/{8213-e81d88992f.chunk.js → 8213-76e961afd7.chunk.js} +1 -1
  63. package/dist/scripts/{8362-9f5d02162b.chunk.js → 8362-ee0581a213.chunk.js} +1 -1
  64. package/dist/scripts/{8726-188275719c.chunk.js → 8726-9cf2439dab.chunk.js} +1 -1
  65. package/dist/scripts/{8727-25b7a07d5e.chunk.js → 8727-2db647e01c.chunk.js} +1 -1
  66. package/dist/scripts/{8762-19b69b9933.chunk.js → 8762-b961ffc598.chunk.js} +1 -1
  67. package/dist/scripts/{8906-03db1bdbc3.chunk.js → 8906-b3e2cf9511.chunk.js} +1 -1
  68. package/dist/scripts/9267-f7ac5e862e.chunk.js +1 -0
  69. package/dist/scripts/{9357-4f30f5eb0d.chunk.js → 9357-730d572872.chunk.js} +1 -1
  70. package/dist/scripts/{9695-0ee92974f3.chunk.js → 9695-8485f54457.chunk.js} +1 -1
  71. package/dist/scripts/{9927-1c47de191d.chunk.js → 9927-a5554b6c8f.chunk.js} +1 -1
  72. package/dist/scripts/{bundle-8d08568d30.min.js → bundle-ef4f6966cb.min.js} +2 -2
  73. package/package.json +1 -1
  74. package/dist/scripts/1703-cb95448dd7.chunk.js +0 -1
  75. package/dist/scripts/1876-8cbd30a64a.chunk.js +0 -1
  76. package/dist/scripts/2548-f2a5958159.chunk.js +0 -1
  77. package/dist/scripts/2998-ed2a612f50.chunk.js +0 -1
  78. package/dist/scripts/35-ddade9da12.chunk.js +0 -1
  79. package/dist/scripts/376-16d0d5c7fe.chunk.js +0 -1
  80. package/dist/scripts/3969-5585d517d7.chunk.js +0 -1
  81. package/dist/scripts/4523-befa1c95fa.chunk.js +0 -1
  82. package/dist/scripts/5286-ff323ac9a4.chunk.js +0 -1
  83. package/dist/scripts/5698-b2bf4d1d48.chunk.js +0 -1
  84. package/dist/scripts/5707-a14bfb1cf4.chunk.js +0 -1
  85. package/dist/scripts/6963-bb36f098b6.chunk.js +0 -1
  86. package/dist/scripts/7071-666cb9ad06.chunk.js +0 -1
  87. package/dist/scripts/7471-66a3ac412d.chunk.js +0 -1
  88. package/dist/scripts/9267-93c60091a6.chunk.js +0 -1
  89. /package/dist/scripts/{1601-0550afd76f.chunk.js.LICENSE.txt → 1601-b0af727472.chunk.js.LICENSE.txt} +0 -0
  90. /package/dist/scripts/{61-0f468de54f.chunk.js.LICENSE.txt → 61-8487d036e5.chunk.js.LICENSE.txt} +0 -0
  91. /package/dist/scripts/{6673-9c020ef1e9.chunk.js.LICENSE.txt → 6673-012b6a34e6.chunk.js.LICENSE.txt} +0 -0
  92. /package/dist/scripts/{bundle-8d08568d30.min.js.LICENSE.txt → bundle-ef4f6966cb.min.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8906],{11224:function(e,t,n){"use strict";n.r(t),n.d(t,{AddToExchangeView:function(){return k}});var r=n(21186),o=n(21679),i=n(57857),l=n(68003),u=n(31647),c=n(10101),a=n(88172),s=n(20072),f=n(93479),p=n(67670),d=n(48404),y=n(93569),h=n(28274),b=n.n(h);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 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"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===v(o)?o:String(o)),r)}var o}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(O,e);var t,n,u,h,k=(u=O,h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w(u);if(h){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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)}(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),k.call(this,e)}return t=O,(n=[{key:"initialize",value:function(){this.libraryDataService=o.u.getInstance(f.Or.Library,this),this.videoDataService=o.u.getInstance(f.Or.Video,this),this.alertService=o.u.getInstance(f.K9.Alerts,this),this.listenTo(f.Vk.LIBRARY,"exchange:".concat(10,":sync"),this.render),this.listenTo(this.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"AddToExchangeView"}},{key:"lang",get:function(){return"libraryEditor.addToExchange"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return b()}},{key:"channelName",get:function(){return y.N0.generateUniqueChannelName(this)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{folderDropdown:".folder-dropdown-region"}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:i.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new p.v,channelName:this.channelName,buttonText:i.T.getPhrase(this.lang,"add"),onClick:function(t){return e.onClickSubmit(t)}}}]}},{key:"getExchange",value:function(){return this.exchangeLibraries.first()}},{key:"onClickSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.spinnerModel.set(a.ZV.ShowSpinner,!0),this.videoDataService.copyVideo(this.options.videoId,this.getExchange().get("id"),this.folder.get("id"),(function(){t.alertService.createAlert({heading:"Request submitted",message:"We will notify you once your Exchange request has been approved",type:r.NK.Success}),t.triggerMethod("hide")}))}},{key:"onFolderSelected",value:function(e){this.folder=e,this.spinnerModel.set(a.ZV.Disabled,!1),y.PU.setSelected(this.folderTreeKey,e,this.getExchange().children)}},{key:"requiredResources",get:function(){return{config:d.p.config}}},{key:"onBeforeRender",value:function(){this.exchangeLibraries=this.libraryDataService.getExchange(10)}},{key:"onRender",value:function(){this.exchangeLibraries&&this.showChildView("folderDropdown",new s.Y({collection:this.getExchange().children,channelName:this.channelName,folderTreeKey:this.folderTreeKey}))}},{key:"viewOptions",value:function(){return{foldersLoaded:!!this.exchangeLibraries,guidelinesUrl:l._.safeUrlConcat(this.config.get("onlineUrl"),"/exchange/community-guidelines"),spinnerEl:y.Kp.getSpinner({size:y.Ey.Large,extraClasses:"mx-auto"})}}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),O}(u.Q.G7)},20072:function(e,t,n){"use strict";n.d(t,{Y:function(){return b}});var r=n(48088),o=n(57857),i=n(31647),l=n(50299),u=n(93569),c=n(68979),a=n.n(c),s={selectBtn:"tZUtI",list:"MxlSt",selector:"qHvbU",customItem:"aJzJB"};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function 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,d(r.key),r)}}function d(e){var t=function(e,t){if("object"!==f(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===f(t)?t:String(t)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(v,e);var t,n,i,c,b=(i=v,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=h(i);if(c){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function v(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),b.call(this,e)}return t=v,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e}({},t))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return a()}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".button-text"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=u.PU.getSelected(this.options.folderTreeKey,this.collection),i=r?r.get("name"):o.T.getPhrase(this.lang,"button");this.getUI("button").text(i)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.J({styles:s,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:s.list,extraClasses:s.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:s,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),v}(i.Q.wA)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function 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 u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,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 a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(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&&a(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)}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.Hn)},28274: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,'<div class="alert alert-info" role="alert">\n The ClickView Exchange is a community for educators, read our <a class="info-link" href="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.guidelinesUrl:i,t))+'" target="_blank">community guidelines</a> and let\'s ensure that we keep the Exchange a place we\'re proud of!\n</div>\n<p>After you submit your video to the Exchange, we will review it and notify you when your video has been made available.</p>\n<div class="form-group">\n <label>Select a folder</label>\n <div class="folder-dropdown-region"></div>\n</div>\n'},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.foldersLoaded:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},68979:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn fw-bold rounded-0 w-100 text-start '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,u=e.escapeExpression;return'<button\n class="'+u(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' form-select form-control"\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n name='+u(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+'\n>\n <span class="d-block text-truncate button-text">\n '+u(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'\n </span>\n</button>\n<div class="dropdown-menu '+u(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\n <div class="selector-region"></div>\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\n<div class="form-feedback"></div>'},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8906],{11224:function(e,t,n){"use strict";n.r(t),n.d(t,{AddToExchangeView:function(){return k}});var r=n(21186),o=n(21679),i=n(57857),l=n(68003),u=n(31647),c=n(10101),a=n(88172),s=n(20072),f=n(57098),p=n(67670),d=n(48404),y=n(93569),h=n(28274),b=n.n(h);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 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"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===v(o)?o:String(o)),r)}var o}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(O,e);var t,n,u,h,k=(u=O,h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w(u);if(h){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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)}(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),k.call(this,e)}return t=O,(n=[{key:"initialize",value:function(){this.libraryDataService=o.u.getInstance(f.Or.Library,this),this.videoDataService=o.u.getInstance(f.Or.Video,this),this.alertService=o.u.getInstance(f.K9.Alerts,this),this.listenTo(f.Vk.LIBRARY,"exchange:".concat(10,":sync"),this.render),this.listenTo(this.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"AddToExchangeView"}},{key:"lang",get:function(){return"libraryEditor.addToExchange"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return b()}},{key:"channelName",get:function(){return y.N0.generateUniqueChannelName(this)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{folderDropdown:".folder-dropdown-region"}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:i.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new p.v,channelName:this.channelName,buttonText:i.T.getPhrase(this.lang,"add"),onClick:function(t){return e.onClickSubmit(t)}}}]}},{key:"getExchange",value:function(){return this.exchangeLibraries.first()}},{key:"onClickSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.spinnerModel.set(a.ZV.ShowSpinner,!0),this.videoDataService.copyVideo(this.options.videoId,this.getExchange().get("id"),this.folder.get("id"),(function(){t.alertService.createAlert({heading:"Request submitted",message:"We will notify you once your Exchange request has been approved",type:r.NK.Success}),t.triggerMethod("hide")}))}},{key:"onFolderSelected",value:function(e){this.folder=e,this.spinnerModel.set(a.ZV.Disabled,!1),y.PU.setSelected(this.folderTreeKey,e,this.getExchange().children)}},{key:"requiredResources",get:function(){return{config:d.p.config}}},{key:"onBeforeRender",value:function(){this.exchangeLibraries=this.libraryDataService.getExchange(10)}},{key:"onRender",value:function(){this.exchangeLibraries&&this.showChildView("folderDropdown",new s.Y({collection:this.getExchange().children,channelName:this.channelName,folderTreeKey:this.folderTreeKey}))}},{key:"viewOptions",value:function(){return{foldersLoaded:!!this.exchangeLibraries,guidelinesUrl:l._.safeUrlConcat(this.config.get("onlineUrl"),"/exchange/community-guidelines"),spinnerEl:y.Kp.getSpinner({size:y.Ey.Large,extraClasses:"mx-auto"})}}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),O}(u.Q.G7)},20072:function(e,t,n){"use strict";n.d(t,{Y:function(){return b}});var r=n(48088),o=n(57857),i=n(31647),l=n(50299),u=n(93569),c=n(68979),a=n.n(c),s={selectBtn:"tZUtI",list:"MxlSt",selector:"qHvbU",customItem:"aJzJB"};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function 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,d(r.key),r)}}function d(e){var t=function(e,t){if("object"!==f(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===f(t)?t:String(t)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(v,e);var t,n,i,c,b=(i=v,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=h(i);if(c){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function v(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),b.call(this,e)}return t=v,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return(t=d(t))in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e}({},t))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return a()}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".button-text"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=u.PU.getSelected(this.options.folderTreeKey,this.collection),i=r?r.get("name"):o.T.getPhrase(this.lang,"button");this.getUI("button").text(i)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.J({styles:s,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:s.list,extraClasses:s.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:s,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),v}(i.Q.wA)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function 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 u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,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 a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(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&&a(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)}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.Hn)},28274: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,'<div class="alert alert-info" role="alert">\n The ClickView Exchange is a community for educators, read our <a class="info-link" href="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.guidelinesUrl:i,t))+'" target="_blank">community guidelines</a> and let\'s ensure that we keep the Exchange a place we\'re proud of!\n</div>\n<p>After you submit your video to the Exchange, we will review it and notify you when your video has been made available.</p>\n<div class="form-group">\n <label>Select a folder</label>\n <div class="folder-dropdown-region"></div>\n</div>\n'},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.foldersLoaded:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},68979:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn fw-bold rounded-0 w-100 text-start '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,u=e.escapeExpression;return'<button\n class="'+u(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' form-select form-control"\n data-bs-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n name='+u(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+'\n>\n <span class="d-block text-truncate button-text">\n '+u(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'\n </span>\n</button>\n<div class="dropdown-menu '+u(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\n <div class="selector-region"></div>\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\n<div class="form-feedback"></div>'},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9267],{59054:function(e,t,r){"use strict";var n;r.d(t,{f:function(){return n}}),function(e){e.Share="share",e.MasterObject="masterobject"}(n||(n={}))},61519:function(e,t,r){"use strict";r.r(t),r.d(t,{SearchView:function(){return X}});var n=r(48088),i=r(39479),o=r(21679),c=r(57857),a=r(99249),s=r(31647),u=r(11543),l=r(59054),f=r(47022),h=r(33303),y=r(70763),p=r(57098),d=r(21251),g=r(33800),v=r(51174),b=r(48404),m=r(64649),S=r(19226),w=r(95061),C=r(13809),O=r(80867),k=r(29457),R=r(96605),P=r.n(R);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function j(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==E(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===E(i)?i:String(i)),n)}var i}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}var _=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)}(a,e);var t,r,n,i,o=(n=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=M(n);if(i){var r=M(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===E(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e)}return t=a,(r=[{key:"name",get:function(){return"SearchResultsComponent"}},{key:"template",get:function(){return P()}},{key:"lang",get:function(){return"search.searchResults"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{results:{replaceElement:!0,el:".results-region",partialLoading:k.LP.VideoList}}}},{key:"onBeforeRender",value:function(){return!!this.collection}},{key:"onRender",value:function(){var e=new O.Y({collection:this.collection,videosWithMetadata:this.options.videosWithMetadata,application:p.OV.SEARCH,videoItemComponentType:C.UC.Search,collectionIdentifier:null,config:this.options.config,emptyStateType:k.ub.Search,emptyStateOptions:{heading:c.T.getPhrase(this.lang,"emptyStateHeading",{query:this.options.query}),description:c.T.getPhrase(this.lang,"emptyStateDescription")},collectionViewChannel:this.options.collectionViewChannel,customerHasExchange:this.options.customerHasExchange,currentUser:this.options.currentUser,playerApiUrl:this.options.playerApiUrl,createViewKey:this.options.createViewKey,hasCursors:this.options.hasCursors,showEmptyState:!0,libraries:this.options.libraries,products:this.options.products});this.showChildView("results",e)}}])&&j(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(s.Q.wA),T=r(8614),D=r(15709),x=r.n(D);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 q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==I(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==I(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===I(i)?i:String(i)),n)}var i}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}var H=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(c,e);var t,r,n,i,o=(n=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=F(n);if(i){var r=F(this).constructor;e=Reflect.construct(t,arguments,r)}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 c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),o.call(this,e)}return t=c,(r=[{key:"name",get:function(){return"SearchHeaderComponent"}},{key:"template",get:function(){return x()}},{key:"lang",get:function(){return"search.searchHeader"}},{key:"className",get:function(){return"bg-white border-bottom p-3"}},{key:"regions",value:function(){return{filters:{el:".filters-region",replaceElement:!0}}}},{key:"renderFilters",value:function(){var e=new T.b5({collection:this.collection,channelName:this.options.channelName});this.showChildView("filters",e)}},{key:"onRender",value:function(){this.renderFilters()}}])&&q(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(s.Q.wA),N=r(21769),Q=r(44937),U=r(5344),W=r(28434),B=r.n(W);function K(e){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},K(e)}function L(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,z(n.key),n)}}function z(e){var t=function(e,t){if("object"!==K(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==K(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===K(t)?t:String(t)}function G(e,t){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},G(e,t)}function J(e){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},J(e)}var X=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}(R,e);var t,r,C,O,k=(C=R,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=J(C);if(O){var r=J(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===K(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function R(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,R),k.call(this,e)}return t=R,(r=[{key:"initialize",value:function(){this.initializeQuery(),this.bindListeners(),this.contextualSearchService=o.u.getInstance(u.D.ContextualSearch,this),this.searchDataService=o.u.getInstance(u.Z.Search,this),this.videoDataService=o.u.getInstance(g.O.Video,this),this.ratingsDataService=o.u.getInstance(g.O.Ratings,this),this.playerDataService=o.u.getInstance(g.O.Player,this),this.videoMixinService=o.u.getInstance(g.K.VideoMixin,this),this.collectionIdentifier=new h.J(Object.assign({collectionPrefix:d.M.SEARCH_VIDEOS},this.options.queryParams)),this.createViewKey=this.createViewKey.bind(this)}},{key:"initializeQuery",value:function(){this.queryModel=this.getSearchModel()}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.RATINGS,"".concat(d.M.RATINGS,":sync"),this.render),this.listenTo(p.Vk.RESTRICTED_VIDEO,"".concat(d.M.RESTRICTED_OBJECTS,":").concat(d.M.SEARCH_VIDEOS,":invalidate"),this.updateRestrictedVideos),this.listenTo(this.channelName,p.Vy.Filters.FILTER_CHANGED,i.debounce(this.onFilterChange,100)),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata),this.listenTo(N.I.TagFilter,"change:relevant:tags",this.updateSearchResults)}},{key:"name",get:function(){return"SearchView"}},{key:"title",get:function(){return c.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"search.search"}},{key:"template",get:function(){return B()}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{header:{replaceElement:!0,el:".header-region"},results:{replaceElement:!0,el:".results-region"},pagination:{el:".pagination-region",replaceElement:!0}}}},{key:"getSearchModel",value:function(){return a.r.get("search",{ctor:Q.AE})}},{key:"fetchSearchData",value:function(){this.ratings=this.ratingsDataService.getAllRatings(),this.ratings&&!this.filterCollection&&this.initializeFilterCollection()}},{key:"initializeFilterCollection",value:function(){this.filterCollection=U.qr.getFilterCollection(this.sources,this.ratings),this.setQueryParams()}},{key:"setQueryParams",value:function(){U.yf.setQueryParams(Object.assign(Object.assign({},this.options.queryParams),this.getContextParams()),this.queryModel,this.filterCollection)}},{key:"getContextParams",value:function(){if(!this.queryModel.get("query"))return n.Radio.channel(p.jr.CONTEXTUAL_SEARCH).trigger("reset:search:context"),{};var e,t,r,i=this.contextualSearchService.getSearchContext();return i&&i.get("filterParam")?(e={},t=i.get("filterParam"),r=i.get("filterValue"),(t=z(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e):{}}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,l.f.MasterObject,t)}},{key:"onFilterChange",value:function(){s.Q.C$.trigger({application:p.OV.SEARCH,action:p.eX.Search.HOME,params:U.yf.getRouteQueryParams(this.queryModel,this.filterCollection,this.sources)})}},{key:"setVideosWithMetadata",value:function(){this.resultCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new y.t(this.resultCollection.map((function(e){return(0,v.Z)({id:e.get("id"),typeId:e.get("typeId")})}))))}},{key:"updateSearchResults",value:function(){var e=this;this.resultCollection=null,this.renderResults(),this.queryString=U.yf.getQueryString(this.queryModel,this.filterCollection,this.sources,this.collectionIdentifier.cursor);var t=function(){return s.Q.C$.trigger({application:p.OV.SEARCH,action:p.eX.Search.HOME,params:U.yf.getRouteQueryParams(e.queryModel,e.filterCollection,e.sources)})};this.queryString?this.searchDataService.searchVideos(this.queryString,this.collectionIdentifier,t):t()}},{key:"renderHeader",value:function(){var e=new H({collection:this.filterCollection,channelName:this.channelName});this.showChildView("header",e)}},{key:"renderResults",value:function(){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new _({collection:this.resultCollection,videosWithMetadata:this.videosWithMetadata,config:this.config,collectionViewChannel:this.channelName,customerHasExchange:this.exchanges.any(),currentUser:this.currentUser,playerApiUrl:this.config.get("playerApiUrl"),createViewKey:this.createViewKey,hasCursors:!!e,libraries:this.sources,query:this.queryModel.get("query"),products:this.products});this.showChildView("results",t)}},{key:"renderPagination",value:function(){if(this.resultCollection&&this.resultCollection.length){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new f.Q({cursors:e,appLink:{application:p.OV.SEARCH,action:p.eX.Search.HOME,params:U.yf.getRouteQueryParams(this.queryModel,this.filterCollection,this.sources)}});this.showChildView("pagination",t)}}},{key:"fetchResults",value:function(){var e=this;if(this.filterCollection){this.queryString=U.yf.getQueryString(this.queryModel,this.filterCollection,this.sources,this.collectionIdentifier.cursor);var t=U.yf.getDynamicFilterQueryString(this.queryModel,this.filterCollection);if(this.dynamicFiltersFetched||this.searchDataService.getDynamicFilters(t,(function(t){e.dynamicFiltersFetched||(e.filterCollection.add(t.toJSON(),{merge:!0}),e.dynamicFiltersFetched=!0,e.render())})),!this.resultCollection){var r=function(t){e.resultCollection=t,e.setVideosWithMetadata(),e.render()};this.queryString?this.searchDataService.searchVideos(this.queryString,this.collectionIdentifier,r):r(new y.t([]))}}}},{key:"fetchVideoWithMetadata",value:function(e,t){var r=this;this.videoDataService.getUnionVideo(e,t,(function(t){var n=r.videosWithMetadata.get(e);n&&(n.set(t.toJSON()),n.set({dataFetched:!0}))}))}},{key:"updateRestrictedVideos",value:function(){var e=this;this.videoMixinService.getAndMixinVideoCollectionRestrictions(this.resultCollection,this.collectionIdentifier,(function(){return e.render()}))}},{key:"requiredResources",get:function(){return{config:b.p.config,sources:w.T.libraries,exchanges:w.T.exchanges,currentUser:S.K.currentUser,products:m.s.products}}},{key:"onBeforeRender",value:function(){return this.fetchSearchData(),this.fetchResults(),!0}},{key:"onRender",value:function(){this.renderHeader(),this.renderResults(),this.renderPagination()}},{key:"onBeforeDestroy",value:function(){this.queryModel.clear()}}])&&L(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),R}(s.Q.G7)},13809:function(e,t,r){"use strict";r.d(t,{UC:function(){return n.U}});var n=r(58688);r(19969),r(14898)},96605:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return'<div class="results-region"></div>'},useData:!0})},15709:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return e.propertyIsEnumerable,"<h3>"+e.escapeExpression((r.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"header",{name:"lang",hash:{},data:i}))+'</h3>\n<div class="filters-region"></div>'},useData:!0})},28434:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return'<div class="header-region"></div>\n<div class="results-region"></div>\n<div class="pagination-region"></div>'},useData:!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(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
+ (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(57098),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(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})}}]);
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(57098),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 +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})}}]);
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(57098),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})}}]);