@clickview/library-editor 1.1.38-rc.2 → 1.1.39-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +3 -3
- package/dist/css/0-library-editor.chunk.css +26 -0
- package/dist/css/10-library-editor.chunk.css +25 -0
- package/dist/css/11-library-editor.chunk.css +135 -0
- package/dist/css/12-library-editor.chunk.css +18 -0
- package/dist/css/13-library-editor.chunk.css +21 -0
- package/dist/css/14-library-editor.chunk.css +76 -0
- package/dist/css/16-library-editor.chunk.css +52 -0
- package/dist/css/17-library-editor.chunk.css +14 -0
- package/dist/css/18-library-editor.chunk.css +18 -0
- package/dist/css/2-library-editor.chunk.css +143 -0
- package/dist/css/21-library-editor.chunk.css +52 -0
- package/dist/css/22-library-editor.chunk.css +12 -0
- package/dist/css/23-library-editor.chunk.css +25 -0
- package/dist/css/25-library-editor.chunk.css +35 -0
- package/dist/css/26-library-editor.chunk.css +20 -0
- package/dist/css/28-library-editor.chunk.css +63 -0
- package/dist/css/29-library-editor.chunk.css +80 -0
- package/dist/css/3-library-editor.chunk.css +15 -0
- package/dist/css/30-library-editor.chunk.css +33 -0
- package/dist/css/31-library-editor.chunk.css +30 -0
- package/dist/css/32-library-editor.chunk.css +45 -0
- package/dist/css/33-library-editor.chunk.css +13 -0
- package/dist/css/34-library-editor.chunk.css +19 -0
- package/dist/css/35-library-editor.chunk.css +18 -0
- package/dist/css/36-library-editor.chunk.css +12 -0
- package/dist/css/37-library-editor.chunk.css +5 -0
- package/dist/css/38-library-editor.chunk.css +5 -0
- package/dist/css/40-library-editor.chunk.css +24 -0
- package/dist/css/41-library-editor.chunk.css +76 -0
- package/dist/css/42-library-editor.chunk.css +44 -0
- package/dist/css/43-library-editor.chunk.css +30 -0
- package/dist/css/44-library-editor.chunk.css +12 -0
- package/dist/css/45-library-editor.chunk.css +25 -0
- package/dist/css/46-library-editor.chunk.css +24 -0
- package/dist/css/47-library-editor.chunk.css +84 -0
- package/dist/css/48-library-editor.chunk.css +4 -0
- package/dist/css/49-library-editor.chunk.css +33 -0
- package/dist/css/50-library-editor.chunk.css +20 -0
- package/dist/css/51-library-editor.chunk.css +37 -0
- package/dist/css/52-library-editor.chunk.css +64 -0
- package/dist/css/55-library-editor.chunk.css +3 -0
- package/dist/css/56-library-editor.chunk.css +3 -0
- package/dist/css/58-library-editor.chunk.css +3 -0
- package/dist/css/59-library-editor.chunk.css +3 -0
- package/dist/css/6-library-editor.chunk.css +42 -0
- package/dist/css/60-library-editor.chunk.css +16 -0
- package/dist/css/62-library-editor.chunk.css +4 -0
- package/dist/css/63-library-editor.chunk.css +168 -0
- package/dist/css/67-library-editor.chunk.css +76 -0
- package/dist/css/68-library-editor.chunk.css +15 -0
- package/dist/css/69-library-editor.chunk.css +15 -0
- package/dist/css/7-library-editor.chunk.css +10 -0
- package/dist/css/70-library-editor.chunk.css +21 -0
- package/dist/css/71-library-editor.chunk.css +38 -0
- package/dist/css/72-library-editor.chunk.css +14 -0
- package/dist/css/73-library-editor.chunk.css +35 -0
- package/dist/css/74-library-editor.chunk.css +27 -0
- package/dist/css/75-library-editor.chunk.css +4 -0
- package/dist/css/76-library-editor.chunk.css +4 -0
- package/dist/css/8-library-editor.chunk.css +7 -0
- package/dist/css/library-editor-app-0172108e71.css +135 -0
- package/dist/css/library-editor-app.css +9282 -0
- package/dist/en.json +1 -1
- package/dist/scripts/0-153ac9df2d.chunk.js +1 -0
- package/dist/scripts/0-b6c23a57b8.chunk.js +1 -0
- package/dist/scripts/0.chunk.js +64 -0
- package/dist/scripts/1-b0fc29397e.chunk.js +1 -0
- package/dist/scripts/1-e3773605c9.chunk.js +1 -0
- package/dist/scripts/1.chunk.js +75 -0
- package/dist/scripts/10-1be8093914.chunk.js +1 -0
- package/dist/scripts/10-8307bb975c.chunk.js +1 -0
- package/dist/scripts/10.chunk.js +62 -0
- package/dist/scripts/11-0cf6110035.chunk.js +11 -0
- package/dist/scripts/11-39d9259f5b.chunk.js +11 -0
- package/dist/scripts/11.chunk.js +317 -0
- package/dist/scripts/12-7a444721aa.chunk.js +1 -0
- package/dist/scripts/12-ddc68398b8.chunk.js +1 -0
- package/dist/scripts/12.chunk.js +56 -0
- package/dist/scripts/13-477bb67d4c.chunk.js +1 -0
- package/dist/scripts/13-8f8a6ce349.chunk.js +1 -0
- package/dist/scripts/13.chunk.js +25 -0
- package/dist/scripts/14-0ad406f161.chunk.js +1 -0
- package/dist/scripts/14-537dcac148.chunk.js +1 -0
- package/dist/scripts/14.chunk.js +272 -0
- package/dist/scripts/15-1ffea275a0.chunk.js +1 -0
- package/dist/scripts/15-4def28b998.chunk.js +1 -0
- package/dist/scripts/15.chunk.js +35 -0
- package/dist/scripts/16-5e62546a04.chunk.js +1 -0
- package/dist/scripts/16-c76924f3af.chunk.js +1 -0
- package/dist/scripts/16.chunk.js +79 -0
- package/dist/scripts/17-3c0509798b.chunk.js +1 -0
- package/dist/scripts/17-66be64118e.chunk.js +1 -0
- package/dist/scripts/17.chunk.js +40 -0
- package/dist/scripts/18.chunk.js +40 -0
- package/dist/scripts/19.chunk.js +43 -0
- package/dist/scripts/2-6cbd574810.chunk.js +1 -0
- package/dist/scripts/2-e16243d4f3.chunk.js +1 -0
- package/dist/scripts/2.chunk.js +33 -0
- package/dist/scripts/20-1f01111c46.chunk.js +1 -0
- package/dist/scripts/20-e47912d1b0.chunk.js +1 -0
- package/dist/scripts/20.chunk.js +18 -0
- package/dist/scripts/21-c319fe911a.chunk.js +1 -0
- package/dist/scripts/21-d91d5d02c9.chunk.js +1 -0
- package/dist/scripts/21.chunk.js +55 -0
- package/dist/scripts/22-c405a2829c.chunk.js +1 -0
- package/dist/scripts/22-d50d286ec0.chunk.js +1 -0
- package/dist/scripts/22.chunk.js +47 -0
- package/dist/scripts/23-0e07fa84ee.chunk.js +1 -0
- package/dist/scripts/23-c423962371.chunk.js +1 -0
- package/dist/scripts/23.chunk.js +47 -0
- package/dist/scripts/24-1f362efc95.chunk.js +1 -0
- package/dist/scripts/24-8dd3c1b2bb.chunk.js +1 -0
- package/dist/scripts/24.chunk.js +33 -0
- package/dist/scripts/25-7226ec568a.chunk.js +1 -0
- package/dist/scripts/25-b3bb5f40d5.chunk.js +1 -0
- package/dist/scripts/25.chunk.js +25 -0
- package/dist/scripts/26-1baa5543fd.chunk.js +1 -0
- package/dist/scripts/26-c29ef97409.chunk.js +1 -0
- package/dist/scripts/26.chunk.js +25 -0
- package/dist/scripts/27-60b9b73b0c.chunk.js +1 -0
- package/dist/scripts/27-d3686d48d4.chunk.js +1 -0
- package/dist/scripts/27.chunk.js +10 -0
- package/dist/scripts/28-4f694bc77e.chunk.js +1 -0
- package/dist/scripts/28-819f290d28.chunk.js +1 -0
- package/dist/scripts/28.chunk.js +334 -0
- package/dist/scripts/29-7189ce20ea.chunk.js +1 -0
- package/dist/scripts/29-87614591ad.chunk.js +1 -0
- package/dist/scripts/29.chunk.js +202 -0
- package/dist/scripts/3-2f121af17d.chunk.js +1 -0
- package/dist/scripts/3-92b657b9f3.chunk.js +1 -0
- package/dist/scripts/3.chunk.js +57 -0
- package/dist/scripts/30-b2f66f0afd.chunk.js +1 -0
- package/dist/scripts/30-ddae4b75d8.chunk.js +1 -0
- package/dist/scripts/30.chunk.js +137 -0
- package/dist/scripts/31-a37fe00be2.chunk.js +1 -0
- package/dist/scripts/31-b7048d8b68.chunk.js +1 -0
- package/dist/scripts/31.chunk.js +113 -0
- package/dist/scripts/32-2683b27ac6.chunk.js +1 -0
- package/dist/scripts/32-5d4dc8cc7a.chunk.js +1 -0
- package/dist/scripts/32.chunk.js +115 -0
- package/dist/scripts/33-10a1be6537.chunk.js +1 -0
- package/dist/scripts/33-6973d1398f.chunk.js +1 -0
- package/dist/scripts/33.chunk.js +93 -0
- package/dist/scripts/34-1d7773e790.chunk.js +1 -0
- package/dist/scripts/34-7ab862c582.chunk.js +1 -0
- package/dist/scripts/34.chunk.js +63 -0
- package/dist/scripts/35-068e9c8b75.chunk.js +1 -0
- package/dist/scripts/35-220f35ae1d.chunk.js +1 -0
- package/dist/scripts/35.chunk.js +48 -0
- package/dist/scripts/36-54886eec51.chunk.js +1 -0
- package/dist/scripts/36-dd1e44631a.chunk.js +1 -0
- package/dist/scripts/36.chunk.js +33 -0
- package/dist/scripts/37-8ba3a7efee.chunk.js +1 -0
- package/dist/scripts/37-ab87dc27ec.chunk.js +1 -0
- package/dist/scripts/37.chunk.js +25 -0
- package/dist/scripts/38-31d7ee384c.chunk.js +1 -0
- package/dist/scripts/38-9d94c34152.chunk.js +1 -0
- package/dist/scripts/38.chunk.js +25 -0
- package/dist/scripts/39-6353c29940.chunk.js +1 -0
- package/dist/scripts/39-6d31bbf9f2.chunk.js +1 -0
- package/dist/scripts/39.chunk.js +19 -0
- package/dist/scripts/4-16500ce8b5.chunk.js +1 -0
- package/dist/scripts/4-efdd6d1f63.chunk.js +1 -0
- package/dist/scripts/4.chunk.js +26 -0
- package/dist/scripts/40-0b63c70f7f.chunk.js +1 -0
- package/dist/scripts/40-1cfde7b518.chunk.js +1 -0
- package/dist/scripts/40.chunk.js +182 -0
- package/dist/scripts/41-cdbd260ebd.chunk.js +1 -0
- package/dist/scripts/41-dc122f1ff3.chunk.js +1 -0
- package/dist/scripts/41.chunk.js +175 -0
- package/dist/scripts/42-761edb9a10.chunk.js +1 -0
- package/dist/scripts/42-7face75a94.chunk.js +1 -0
- package/dist/scripts/42.chunk.js +176 -0
- package/dist/scripts/43-283104d0c2.chunk.js +1 -0
- package/dist/scripts/43-95935b47bd.chunk.js +1 -0
- package/dist/scripts/43.chunk.js +121 -0
- package/dist/scripts/44-905f6cce60.chunk.js +1 -0
- package/dist/scripts/44-d7c79e8244.chunk.js +1 -0
- package/dist/scripts/44.chunk.js +122 -0
- package/dist/scripts/45-2ed4b1a478.chunk.js +1 -0
- package/dist/scripts/45-d56b804684.chunk.js +1 -0
- package/dist/scripts/45.chunk.js +85 -0
- package/dist/scripts/46-c8e2513bf9.chunk.js +1 -0
- package/dist/scripts/46-f9c036bd93.chunk.js +1 -0
- package/dist/scripts/46.chunk.js +78 -0
- package/dist/scripts/47-033c1cf18a.chunk.js +1 -0
- package/dist/scripts/47-30b6b4142b.chunk.js +1 -0
- package/dist/scripts/47.chunk.js +70 -0
- package/dist/scripts/48-d3e24dd7a8.chunk.js +1 -0
- package/dist/scripts/48-f37fb199cf.chunk.js +1 -0
- package/dist/scripts/48.chunk.js +88 -0
- package/dist/scripts/49-4b5b4fb9e3.chunk.js +1 -0
- package/dist/scripts/49-66c283603e.chunk.js +1 -0
- package/dist/scripts/49.chunk.js +62 -0
- package/dist/scripts/5-67a1bdbb17.chunk.js +1 -0
- package/dist/scripts/5-8d1b34023d.chunk.js +1 -0
- package/dist/scripts/5.chunk.js +10 -0
- package/dist/scripts/50-388c6e19f3.chunk.js +1 -0
- package/dist/scripts/50-fffaebeef7.chunk.js +1 -0
- package/dist/scripts/50.chunk.js +64 -0
- package/dist/scripts/51-0bed92583d.chunk.js +1 -0
- package/dist/scripts/51-4fafb8656b.chunk.js +1 -0
- package/dist/scripts/51.chunk.js +55 -0
- package/dist/scripts/52-70b29cfcf6.chunk.js +1 -0
- package/dist/scripts/52-fddf83dbc3.chunk.js +1 -0
- package/dist/scripts/52.chunk.js +47 -0
- package/dist/scripts/53-1a468fef87.chunk.js +1 -0
- package/dist/scripts/53-56ab6f2900.chunk.js +1 -0
- package/dist/scripts/53.chunk.js +56 -0
- package/dist/scripts/54-516cafc464.chunk.js +1 -0
- package/dist/scripts/54-801ffeb350.chunk.js +1 -0
- package/dist/scripts/54.chunk.js +56 -0
- package/dist/scripts/55-9a90130bde.chunk.js +1 -0
- package/dist/scripts/55-b8c357346e.chunk.js +1 -0
- package/dist/scripts/55.chunk.js +41 -0
- package/dist/scripts/56-0bda1f8ade.chunk.js +1 -0
- package/dist/scripts/56-5673f452ea.chunk.js +1 -0
- package/dist/scripts/56.chunk.js +41 -0
- package/dist/scripts/57-3e97374d6d.chunk.js +1 -0
- package/dist/scripts/57-cd80296aa0.chunk.js +1 -0
- package/dist/scripts/57.chunk.js +50 -0
- package/dist/scripts/58-5494e053a7.chunk.js +1 -0
- package/dist/scripts/58-832e8483ea.chunk.js +1 -0
- package/dist/scripts/58.chunk.js +33 -0
- package/dist/scripts/59-602f845e8b.chunk.js +1 -0
- package/dist/scripts/59-b4d8ec05b3.chunk.js +1 -0
- package/dist/scripts/59.chunk.js +33 -0
- package/dist/scripts/6-84b5cb4d14.chunk.js +1 -0
- package/dist/scripts/6-d90b512b74.chunk.js +1 -0
- package/dist/scripts/6.chunk.js +40 -0
- package/dist/scripts/60-3dbafa2f5d.chunk.js +1 -0
- package/dist/scripts/60-636933248a.chunk.js +1 -0
- package/dist/scripts/60.chunk.js +33 -0
- package/dist/scripts/61-3acc614e23.chunk.js +1 -0
- package/dist/scripts/61-7c9eeed947.chunk.js +1 -0
- package/dist/scripts/61.chunk.js +33 -0
- package/dist/scripts/62-5c20137857.chunk.js +1 -0
- package/dist/scripts/62-ec5abf4e57.chunk.js +1 -0
- package/dist/scripts/62.chunk.js +25 -0
- package/dist/scripts/63-4098b3685f.chunk.js +1 -0
- package/dist/scripts/63-9acef1097c.chunk.js +1 -0
- package/dist/scripts/63.chunk.js +25 -0
- package/dist/scripts/64-5bd60a10f3.chunk.js +1 -0
- package/dist/scripts/64-f8649f76bd.chunk.js +1 -0
- package/dist/scripts/64.chunk.js +33 -0
- package/dist/scripts/65-1b7003dcf7.chunk.js +1 -0
- package/dist/scripts/65-763fb1cf2f.chunk.js +1 -0
- package/dist/scripts/65.chunk.js +34 -0
- package/dist/scripts/66-bd38ac79ea.chunk.js +1 -0
- package/dist/scripts/66-df6e6e9fbb.chunk.js +1 -0
- package/dist/scripts/66.chunk.js +33 -0
- package/dist/scripts/67-2219085773.chunk.js +1 -0
- package/dist/scripts/67-6cdda06875.chunk.js +1 -0
- package/dist/scripts/67.chunk.js +25 -0
- package/dist/scripts/68-c590eb4668.chunk.js +1 -0
- package/dist/scripts/68-cdd2cd8d38.chunk.js +1 -0
- package/dist/scripts/68.chunk.js +25 -0
- package/dist/scripts/69-d3c2ae5c90.chunk.js +1 -0
- package/dist/scripts/69-f4a16bd797.chunk.js +1 -0
- package/dist/scripts/69.chunk.js +25 -0
- package/dist/scripts/7-4bbf1e0b34.chunk.js +1 -0
- package/dist/scripts/7-9e2d8a8460.chunk.js +1 -0
- package/dist/scripts/7.chunk.js +33 -0
- package/dist/scripts/70-92ae764bf3.chunk.js +1 -0
- package/dist/scripts/70-de3cbb5854.chunk.js +1 -0
- package/dist/scripts/70.chunk.js +25 -0
- package/dist/scripts/71-3dd6771def.chunk.js +1 -0
- package/dist/scripts/71-7eded412b8.chunk.js +1 -0
- package/dist/scripts/71.chunk.js +25 -0
- package/dist/scripts/72-062179f577.chunk.js +1 -0
- package/dist/scripts/72-354b272679.chunk.js +1 -0
- package/dist/scripts/72.chunk.js +25 -0
- package/dist/scripts/73.chunk.js +25 -0
- package/dist/scripts/74.chunk.js +25 -0
- package/dist/scripts/75.chunk.js +25 -0
- package/dist/scripts/76.chunk.js +25 -0
- package/dist/scripts/77.chunk.js +26 -0
- package/dist/scripts/78.chunk.js +26 -0
- package/dist/scripts/79.chunk.js +26 -0
- package/dist/scripts/8-330d5d0848.chunk.js +1 -0
- package/dist/scripts/8-ea382936d8.chunk.js +1 -0
- package/dist/scripts/8.chunk.js +33 -0
- package/dist/scripts/80.chunk.js +26 -0
- package/dist/scripts/81.chunk.js +26 -0
- package/dist/scripts/82.chunk.js +26 -0
- package/dist/scripts/83.chunk.js +26 -0
- package/dist/scripts/84.chunk.js +26 -0
- package/dist/scripts/85.chunk.js +26 -0
- package/dist/scripts/86.chunk.js +18 -0
- package/dist/scripts/87.chunk.js +18 -0
- package/dist/scripts/88.chunk.js +18 -0
- package/dist/scripts/89.chunk.js +18 -0
- package/dist/scripts/9-7deb869eb3.chunk.js +1 -0
- package/dist/scripts/9-da5ea90d78.chunk.js +1 -0
- package/dist/scripts/9.chunk.js +18 -0
- package/dist/scripts/90.chunk.js +18 -0
- package/dist/scripts/91.chunk.js +18 -0
- package/dist/scripts/92.chunk.js +18 -0
- package/dist/scripts/bundle-0af60c1906.min.js +10 -0
- package/dist/scripts/bundle-192f70a7d0.min.js +10 -0
- package/dist/scripts/bundle-632a7b00a4.min.js +10 -0
- package/dist/scripts/bundle-aa32cea8e4.min.js +10 -0
- package/dist/scripts/{bundle-eb7f53a26f.min.js → bundle-cd66cc1369.min.js} +1 -1
- package/dist/scripts/bundle.js +7806 -0
- package/dist/scripts/polyfills-1bf177c7ab.min.js +1 -0
- package/dist/scripts/polyfills-5ebfaa4ff0.min.js +1 -0
- package/dist/scripts/polyfills.js +2701 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[34],{1006:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),i=n(250);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,a=c(l);function l(){return o(this,l),a.apply(this,arguments)}return t=l,(n=[{key:"defaults",value:function(){return e={},t=i.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&u(t.prototype,n),r&&u(t,r),l}(r.a.Model)},1012:function(e,t,n){"use strict";var r=n(1017),i=n(1013),a=(n(1014),n(3),n(1018)),o=(n(1020),n(1016));n.d(t,"a",(function(){return r.a})),n.d(t,"d",(function(){return i.g})),n.d(t,"g",(function(){return i.j})),n.d(t,"f",(function(){return i.i})),n.d(t,"c",(function(){return i.f})),n.d(t,"e",(function(){return i.h})),n.d(t,"b",(function(){return a.a})),n.d(t,"h",(function(){return o.a}))},1013:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"k",(function(){return p})),n.d(t,"g",(function(){return g})),n.d(t,"e",(function(){return h})),n.d(t,"j",(function(){return b})),n.d(t,"i",(function(){return v})),n.d(t,"c",(function(){return E})),n.d(t,"b",(function(){return k})),n.d(t,"d",(function(){return w})),n.d(t,"f",(function(){return P})),n.d(t,"h",(function(){return y}));var r=n(2),i=n(1),a=n(20),o=n(29),u=n(3),s="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=i.reduce(e,(function(e,n,r){var a=t[r];return n||a?i.isObject(n)&&i.isObject(a)&&!i.isUndefined(n.id)&&n.id===a.id?e:i.isArray(n)?f(n,a).length?e.concat(r):e:i.isEqual(n,a)?e:e.concat(r):e}),[]);if(n.length)return i.object(i.map(n,(function(n){return i.isArray(t[n])?[n,f(e[n],t[n])]:[n,t[n]]})))}}function f(e,t){var n=[];return i.each(t,(function(t){var r=i.findWhere(e,{id:t.id});if(!i.isUndefined(r)||0!==Object.keys(t).length){var a=i.isUndefined(r)?t:l(r,t);a&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(a.id=t.id,n.push(a))))}})),n}var d={getChanges:function(e,t){var n=l(i.omit(e.toJSON(),c),i.omit(t.toJSON(),c));if(n)return i.object(i.map(i.keys(n),(function(e){return[e,d.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(i.isObject(t)&&i.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return i.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new a.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var a=["distributors","producers","directors","productionCompanies"];for(var o in i.each(i.keys(n),(function(e){a.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(i.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var u=e.get(o);(u instanceof r.a.Model||u instanceof r.a.NestedModel)&&u.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return i.each(i.keys(e.toJSON()),(function(a){if(i.contains(n,a)){var o=e.get(a).map((function(e){return e.id})),u=t.get(a).map((function(e){return e.id})),s=i.filter(o,(function(e){return e&&!i.contains(u,e)}));s.length&&(r[a]=s)}})),r}},p={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"videoTitleRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?u.a.getPhrase(s,"episodeNumberLessThanOne"):e&&e>2147483647?u.a.getPhrase(s,"episodeNumberExceeds"):e%1!=0?u.a.getPhrase(s,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?u.a.getPhrase(s,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":u.a.getPhrase(s,"seasonNoEpisodeNumber")}},m=o().year(),h={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>m?u.a.getPhrase(s,"validProductionYears",{currentYear:m}):void 0):""}},g={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"resourceNameRequired")}}]},b={suggestion:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"suggestEditReasonExceeds")}}]},y={number:function(e){return e?+e<1?u.a.getPhrase(s,"seasonLessThanOne"):+e>3e3?u.a.getPhrase(s,"seasonExceeds"):+e%1!=0?u.a.getPhrase(s,"seasonNotWhole"):"":u.a.getPhrase(s,"seasonRequired")}},v={empty:function(){return u.a.getPhrase(s,"suggestEditRatingRequired")},original:function(){return u.a.getPhrase(s,"suggestEditRatingInvalid")}},P={url:[{required:!0,pattern:"url",msg:function(){return u.a.getPhrase(s,"linkUrlRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return u.a.getPhrase(s,"linkNameRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"linkNameExceeds")}}]},E={name:[{maxLength:128,msg:function(){return u.a.getPhrase(s,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"fieldValueExceeds")}}]},k={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":u.a.getPhrase(s,"fieldsInvalid"):""}};function w(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1014:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),i=n(48),a=n(159),o=n(3),u="libraryEditor.utils",s={name:[{required:!0,msg:function(){return o.a.getPhrase(u,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(u,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?i.a.calculateDestinationFolderDepth(e,n,t)>a.a.MAX_FOLDER_DEPTH?o.a.getPhrase(u,"maxFolderDepth",{maxDepth:a.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(u,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,i=e.folder,a=e.collection;return t&&n?r.extend({},s,c(i,a)):t?s:n?c(i,a):void 0}},1016:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(16),i=n(3),a=n(187),o=n(1032),u=n(61);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var f={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case u.a.HostedLibrary:case u.a.CustomLibrary:return e.get("name");case u.a.Exchange:return i.a.getPhrase(l,"exchange");case u.a.Workspace:return i.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case u.a.HostedLibrary:case u.a.CustomLibrary:return"bg-info";case u.a.Exchange:return"bg-green";case u.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(s(t={},c.Pdf,r.b.FilePDF),s(t,c.Image,r.b.FileImg),s(t,c.PowerPoint,r.b.FilePowerpoint),s(t,c.Document,r.b.FileWord),s(t,c.Excel,r.b.FileExcel),s(t,c.Zip,r.b.FileZip),s(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return i.a.getPhrase(l,"pdf");case c.Image:return i.a.getPhrase(l,"image");case c.Document:return i.a.getPhrase(l,"document");case c.Excel:return i.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return i.a.getPhrase(l,"presentation");case c.Zip:return i.a.getPhrase(l,"zipArchive");case c.File:return i.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:f.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case a.MetadataType.VideoTitle:t+="VideoTitle";break;case a.MetadataType.Description:t+="Description";break;case a.MetadataType.Rating:t+="Rating";break;case a.MetadataType.SeriesTitle:t+="SeriesTitle";break;case a.MetadataType.Season:t+="SeasonNumber";break;case a.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case a.MetadataType.BroadcastDate:t+="BroadcastDate";break;case a.MetadataType.Channel:t+="Channel";break;case a.MetadataType.ProductionYear:t+="ProductionYear";break;case a.MetadataType.Distributors:t+="Distributors";break;case a.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case a.MetadataType.Directors:t+="Directors";break;case a.MetadataType.Producers:t+="Producers";break;case a.MetadataType.Other:t+="Other"}return i.a.getPhrase(l,t)}}},1017:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1),i=n(12),a=n(3),o="libraryEditor.utils",u={isValidChapterTime:function(e,t,n,a){if(a){if(!r.isNumber(t))return s.StartTime.Invalid();if(t<0)return s.StartTime.Invalid();if(t>i.x.millisecondsToSeconds(n))return s.StartTime.Exceeds();if(a.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return s.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?s.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?s.Name.Exists():r.isEmpty(t.trim())?s.Name.Invalid():void 0:s.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},s={Name:{Invalid:function(){return a.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return a.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return a.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return a.a.getPhrase(o,"chapterStartTimeExceeds")}}}},1018:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i="libraryEditor.utils",a={name:[{required:!0,msg:function(){return r.a.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(i,"libraryNameExceeds")}}]}},1020:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(1013),a=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return a("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return a("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return a("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?a("episodeNumberLessThanOne"):e&&e>255?a("episodeNumberExceeds"):e&&e%1!=0?a("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?a("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":a("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.e.productionYear.apply(null,t)}}},1032:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var i=s(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(n,e);var t=o(n);function n(){return i(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1291:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var a;e.propertyIsEnumerable;return(null!=(a=e.lambda(null!=(a=null!=t?t.options:t)?a.spinnerEl:a,t))?a:"")+"\r\n"},3:function(e,t,n,r,i){return'<form>\r\n <div class="form-group">\r\n <label for="url" class="control-label">URL</label>\r\n <input name="url" id="url" type="text" class="form-control" placeholder="URL" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n <div class="form-group">\r\n <label for="name" class="control-label">Name</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="Name" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n</form>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var a;e.propertyIsEnumerable;return null!=(a=n.unless.call(null!=t?t:e.nullContext||{},null!=(a=null!=t?t.options:t)?a.dataFetched:a,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?a:""},useData:!0})},1410:function(e,t,n){"use strict";n.r(t),n.d(t,"EditLinkView",(function(){return w}));var r=n(6),i=n(2),a=n(5),o=n(30),u=n(42),s=n(289),c=n(250),l=n(12),f=n(0),d=n(182),p=n(1006),m=n(1012),h=n(1291),g=n.n(h);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})(e)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=k(e);if(t){var i=k(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){return!t||"object"!==b(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(E,e);var t,n,h,b=P(E);function E(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),b.call(this,e)}return t=E,(n=[{key:"initialize",value:function(){this.listenTo(f.e.LINK,"link:".concat(this.options.linkId,":sync"),this.render),this.linkDataService=a.a.getInstance(f.g.Link,this)}},{key:"name",get:function(){return"EditLinkView"}},{key:"title",get:function(){return"Edit link"}},{key:"template",get:function(){return g.a}},{key:"channelName",get:function(){return l.k.generateUniqueChannelName(this)}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.e,title:"Edit link",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new p.a,buttonText:"Save",onClick:function(t){return e.onSubmit(t)}}}]}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(r.Radio.channel(this.channelName).trigger(c.b.ShowSpinner),this.linkDataService.updateLink(this.options.videoId,this.viewModel,(function(){t.logAction(),i.a.AppLinkHelper.trigger({application:f.b.LIBRARY_EDITOR,action:f.a.LibraryEditor.EDIT_VIDEO_RESOURCES,args:[t.options.videoId]})})))}},{key:"logAction",value:function(){var e={id:this.options.linkId,parentId:+this.options.videoId,name:this.viewModel.get("name")};u.a.logUserAction(e,this.options.analyticsOptions)}},{key:"dataFetched",value:function(){return!!this.model&&!!this.viewModel}},{key:"onBeforeRender",value:function(){var e=this;this.model=this.linkDataService.getLink(this.options.linkId,(function(t){e.viewModel=o.a.get("link:".concat(e.options.linkId),t.toJSON(),{ctor:d.a}),e.viewModel.addValidation(m.c)})),this.dataFetched()&&this.spinnerModel.set(c.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:l.r.getSpinner({size:l.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.viewModel&&(this.stickit(this.viewModel),r.Validation.bind(this,{model:this.viewModel}))}},{key:"onClose",value:function(){this.unstickit()}}])&&y(t.prototype,n),h&&y(t,h),E}(i.a.View)}}]);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
(window["webpackJsonp_clickview_library_editor"] = window["webpackJsonp_clickview_library_editor"] || []).push([[34],{
|
|
2
|
+
|
|
3
|
+
/***/ "./src/apps/library-editor/components/chapter-form/ChapterForm.hbs":
|
|
4
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
5
|
+
|
|
6
|
+
eval("var Handlebars = __webpack_require__(\"handlebars\");\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression, alias4=depth0 != null ? depth0 : (container.nullContext || {}), alias5=container.hooks.helperMissing;\n\n return \" <div class=\\\"col-6 form-group\\\">\\r\\n <label class=\\\"d-block\\\" for=\\\"\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.timeId : stack1), depth0))\n + \"\\\">\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||alias5).call(alias4,\"startTimeLabel\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</label>\\r\\n <input\\r\\n class=\\\"form-control d-inline-block col-3 time-input hour-input\\\"\\r\\n type=\\\"number\\\"\\r\\n placeholder=\\\"\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||alias5).call(alias4,\"hoursPlaceholder\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"\\\"\\r\\n name=\\\"hours\\\"\\r\\n autocomplete=\\\"off\\\"\\r\\n \"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.hrDisabled : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"> <b>:</b>\\r\\n <input\\r\\n class=\\\"form-control d-inline-block col-3 time-input minute-input\\\"\\r\\n type=\\\"number\\\"\\r\\n placeholder=\\\"\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||alias5).call(alias4,\"minutesPlaceholder\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"\\\"\\r\\n name=\\\"minutes\\\"\\r\\n autocomplete=\\\"off\\\"\\r\\n \"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.minDisabled : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"> <b>:</b>\\r\\n <input\\r\\n class=\\\"form-control d-inline-block col-3 time-input second-input\\\"\\r\\n type=\\\"number\\\"\\r\\n placeholder=\\\"\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||alias5).call(alias4,\"secondsPlaceholder\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"\\\"\\r\\n name=\\\"seconds\\\"\\r\\n id=\\\"\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.timeId : stack1), depth0))\n + \"\\\"\\r\\n autocomplete=\\\"off\\\"\\r\\n \"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.secDisabled : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \">\\r\\n <div class=\\\"form-feedback\\\"></div>\\r\\n </div>\\r\\n\";\n},\"2\":function(container,depth0,helpers,partials,data) {\n return \"disabled\";\n},\"4\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return \" <button type=\\\"submit\\\" class=\\\"btn btn-primary btn-sm ml-2\\\">\\r\\n <span class=\\\"d-inline-block align-middle svg-container\\\">\"\n + ((stack1 = container.lambda(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.plusSvg : stack1), depth0)) != null ? stack1 : \"\")\n + \"</span>\\r\\n <span class=\\\"align-middle\\\">\"\n + container.escapeExpression((helpers.lang||(depth0 && depth0.lang)||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),\"add\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</span>\\r\\n </button>\\r\\n\";\n},\"6\":function(container,depth0,helpers,partials,data) {\n var alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=container.escapeExpression;\n\n return \" <button type=\\\"submit\\\" class=\\\"btn btn-primary btn-sm ml-2\\\">\"\n + alias4((helpers.lang||(depth0 && depth0.lang)||alias3).call(alias2,\"save\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</button>\\r\\n <button type=\\\"button\\\" class=\\\"btn btn-secondary btn-sm cancel ml-2\\\">\"\n + alias4((helpers.lang||(depth0 && depth0.lang)||alias3).call(alias2,\"cancel\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</button>\\r\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression, alias4=depth0 != null ? depth0 : (container.nullContext || {}), alias5=container.hooks.helperMissing;\n\n return \"<div class=\\\"row\\\">\\r\\n <div class=\\\"col-6 form-group\\\">\\r\\n <label for=\\\"\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.chapterId : stack1), depth0))\n + \"\\\">\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||alias5).call(alias4,\"nameLabel\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</label>\\r\\n <input type=\\\"text\\\" class=\\\"form-control chapter-name\\\" name=\\\"name\\\" id=\\\"\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.chapterId : stack1), depth0))\n + \"\\\" placeholder=\\\"\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||alias5).call(alias4,\"namePlaceholder\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"\\\" autofocus autocomplete=\\\"off\\\">\\r\\n <div class=\\\"form-feedback\\\"></div>\\r\\n </div>\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.enabled : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</div>\\r\\n\\r\\n<div class=\\\"row\\\">\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.creating : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.editing : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(6, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</div>\";\n},\"useData\":true});//# sourceURL=[module]\n//# sourceMappingUR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DQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapter-form/ChapterForm.hbs\n");
|
|
7
|
+
|
|
8
|
+
/***/ }),
|
|
9
|
+
|
|
10
|
+
/***/ "./src/apps/library-editor/components/chapter-form/ChapterFormComponent.ts":
|
|
11
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
12
|
+
|
|
13
|
+
"use strict";
|
|
14
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ChapterFormComponent\", function() { return ChapterFormComponent; });\n/* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"backbone\");\n/* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(backbone__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var libs_common_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"../../libs/common/src/backbone/index.ts\");\n/* harmony import */ var libs_common_backbone_services_ViewModelService__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"../../libs/common/src/backbone/services/ViewModelService.ts\");\n/* harmony import */ var libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\"../../libs/shared/src/utils/SvgHelper.ts\");\n/* harmony import */ var shared_behaviors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\"./src/shared/behaviors/index.ts\");\n/* harmony import */ var shared_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\"./src/shared/utils/index.ts\");\n/* harmony import */ var apps_library_editor_utils_ChapterHelper__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\"./src/apps/library-editor/utils/ChapterHelper.ts\");\n/* harmony import */ var apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\"./src/apps/library-editor/constants/index.ts\");\n/* harmony import */ var _ChapterForm_hbs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(\"./src/apps/library-editor/components/chapter-form/ChapterForm.hbs\");\n/* harmony import */ var _ChapterForm_hbs__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_ChapterForm_hbs__WEBPACK_IMPORTED_MODULE_8__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n\n\n\n\n\nvar ENTER_KEYCODE = 13;\nvar ChapterFormComponent = /*#__PURE__*/function (_Core$Component) {\n _inherits(ChapterFormComponent, _Core$Component);\n\n var _super = _createSuper(ChapterFormComponent);\n\n function ChapterFormComponent(options) {\n _classCallCheck(this, ChapterFormComponent);\n\n return _super.call(this, options);\n }\n\n _createClass(ChapterFormComponent, [{\n key: \"initialize\",\n value: function initialize() {\n if (this.options.playerViewModelKey) this.listenToPlayerViewModel();\n this.initViewModel();\n if (this.options.editing) this.syncTime();\n }\n }, {\n key: \"name\",\n get: function get() {\n return 'ChapterFormComponent';\n }\n }, {\n key: \"lang\",\n get: function get() {\n return 'libraryEditor.chapterForm';\n }\n }, {\n key: \"tagName\",\n get: function get() {\n return 'form';\n }\n }, {\n key: \"viewModelName\",\n get: function get() {\n return \"\".concat(this.name, \":\").concat(this.cid);\n }\n }, {\n key: \"template\",\n get: function get() {\n return _ChapterForm_hbs__WEBPACK_IMPORTED_MODULE_8___default.a;\n }\n }, {\n key: \"className\",\n get: function get() {\n return this.options.creating ? 'py-3' : 'border-top p-2';\n }\n }, {\n key: \"behaviors\",\n get: function get() {\n return [{\n behaviorClass: shared_behaviors__WEBPACK_IMPORTED_MODULE_4__[\"BackboneValidationBehavior\"],\n bindViewModel: true\n }, {\n behaviorClass: shared_behaviors__WEBPACK_IMPORTED_MODULE_4__[\"StickitBehavior\"],\n bindViewModel: true\n }];\n }\n }, {\n key: \"events\",\n value: function events() {\n return {\n 'submit': 'onSubmit',\n 'change .chapter-name': 'validateName',\n 'keyup .chapter-name': 'validateName',\n 'change .time-input': 'onTimeInputUpdate',\n 'click .time-input': 'onTimeInputUpdate',\n 'keyup .time-input': 'onTimeInputUpdate',\n 'click .cancel': 'destroyView'\n };\n }\n }, {\n key: \"bindings\",\n get: function get() {\n return {\n '[name=name]': {\n observe: 'name',\n setOptions: {\n validate: true\n }\n },\n '[name=hours]': {\n observe: 'hours',\n setOptions: {\n validate: true\n }\n },\n '[name=minutes]': {\n observe: 'minutes',\n setOptions: {\n validate: true\n }\n },\n '[name=seconds]': {\n observe: 'seconds',\n setOptions: {\n validate: true\n }\n }\n };\n }\n }, {\n key: \"initViewModel\",\n value: function initViewModel() {\n this.viewModel = libs_common_backbone_services_ViewModelService__WEBPACK_IMPORTED_MODULE_2__[\"ViewModelService\"].get(this.viewModelName, this.model.toJSON());\n }\n /**\r\n * Synchronise start time based on current player's playback position\r\n */\n\n }, {\n key: \"listenToPlayerViewModel\",\n value: function listenToPlayerViewModel() {\n var playerViewModel = libs_common_backbone_services_ViewModelService__WEBPACK_IMPORTED_MODULE_2__[\"ViewModelService\"].get(this.options.playerViewModelKey);\n this.listenTo(playerViewModel, 'change:currenttime', this.updateTime);\n }\n /**\r\n * Set the value of each time input, syncing with the webplayer current time\r\n */\n\n }, {\n key: \"updateTime\",\n value: function updateTime(player) {\n this.webPlayerTime = player.get('currenttime');\n this.syncTime();\n }\n }, {\n key: \"syncTime\",\n value: function syncTime() {\n // The start time of the chapter, or the current webplayer time\n var time = this.viewModel.get('startTime') || this.webPlayerTime;\n this.viewModel.set({\n hours: shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].getHoursComponent(time),\n minutes: shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].getMinutesComponent(time),\n seconds: shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].getSecondsComponent(time)\n });\n }\n /**\r\n * The time constructed from each time input in seconds\r\n * Returns -1 if any time component is negative, or all time components are undefined\r\n */\n\n }, {\n key: \"getNewTime\",\n value: function getNewTime() {\n if (!this.enabled()) return 0;\n return shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].parseTime(this.viewModel.pick('hours', 'minutes', 'seconds'));\n }\n /**\r\n * Whether the time input's are enabled\r\n * Is true for all chapters except for the first existing chapter\r\n */\n\n }, {\n key: \"enabled\",\n value: function enabled() {\n return this.options.creating || this.model.collection.indexOf(this.model) !== 0;\n }\n /**\r\n * Returns the maximum values for hours, minutes and seconds\r\n * based on the duration of the video\r\n */\n\n }, {\n key: \"maxTimes\",\n value: function maxTimes() {\n var duration = shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].millisecondsToSeconds(this.options.duration);\n var maxHr = shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].getHoursComponent(duration);\n var maxMin = maxHr > 0 ? 59 : shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].getMinutesComponent(duration);\n var maxSec = maxMin > 0 ? 59 : shared_utils__WEBPACK_IMPORTED_MODULE_5__[\"TimeHelpers\"].getSecondsComponent(duration);\n return {\n maxHr: maxHr,\n maxMin: maxMin,\n maxSec: maxSec\n };\n }\n /**\r\n * Called when any of the 3 time inputs are updated\r\n * If we are creating a chapter, the webplayer time is also updated\r\n */\n\n }, {\n key: \"onTimeInputUpdate\",\n value: function onTimeInputUpdate() {\n var channel = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName);\n channel.trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_7__[\"LibraryEditorActions\"].UpdateChapterTime, this.getNewTime());\n this.validateStartTime();\n }\n }, {\n key: \"destroyView\",\n value: function destroyView() {\n var channel = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName);\n channel.trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_7__[\"LibraryEditorActions\"].CancelChapterEdit);\n this.destroy();\n }\n /**\r\n * When a chapter is added or saved, validate the new values\r\n * and trigger appropriate event to update the chapter list\r\n */\n\n }, {\n key: \"onSubmit\",\n value: function onSubmit(e) {\n e.preventDefault();\n if (!this.validate()) return false;\n var newChapter = {\n id: this.viewModel.get('id'),\n name: this.viewModel.get('name'),\n startTime: this.getNewTime()\n };\n var channel = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName); // Update or create chapter depending on where the component is being rendered\n\n var chapterChangeEvent = apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_7__[\"LibraryEditorActions\"].CreateChapter;\n if (this.options.editing) chapterChangeEvent = apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_7__[\"LibraryEditorActions\"].UpdateChapter;\n channel.trigger(chapterChangeEvent, newChapter);\n this.stopListening(this.viewModel);\n libs_common_backbone_services_ViewModelService__WEBPACK_IMPORTED_MODULE_2__[\"ViewModelService\"].clear(this.viewModelName);\n }\n }, {\n key: \"validate\",\n value: function validate() {\n this.viewModel.validate();\n var validStartTime = this.validateStartTime();\n var validateName = this.validateName();\n return this.viewModel.isValid() && validStartTime && validateName;\n }\n }, {\n key: \"validateStartTime\",\n value: function validateStartTime() {\n var _this = this;\n\n var _Backbone$Validation$ = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Validation\"].callbacks,\n valid = _Backbone$Validation$.valid,\n invalid = _Backbone$Validation$.invalid;\n var parentCollection = this.model.collection || this.options.collection;\n var newTime = this.getNewTime();\n var invalidTimeMessage = apps_library_editor_utils_ChapterHelper__WEBPACK_IMPORTED_MODULE_6__[\"ChapterHelpers\"].isValidChapterTime(this.model, newTime, this.options.duration, parentCollection);\n var invalidTimeProps = [];\n var validTimeProps = ['seconds', 'minutes', 'hours'];\n\n if (newTime < 0) {\n invalidTimeProps = validTimeProps;\n } else if (invalidTimeMessage) {\n invalidTimeProps.push('seconds');\n if (newTime > 59) invalidTimeProps.push('minutes');\n if (newTime > 59 * 60) invalidTimeProps.push('hours');\n }\n\n validTimeProps.forEach(function (prop) {\n return valid(_this, prop, null);\n });\n invalidTimeProps.forEach(function (prop) {\n return invalid(_this, prop, invalidTimeMessage, null);\n });\n return !invalidTimeMessage;\n }\n }, {\n key: \"validateName\",\n value: function validateName(e) {\n if (e && e.keyCode === ENTER_KEYCODE) return;\n var _Backbone$Validation$2 = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Validation\"].callbacks,\n valid = _Backbone$Validation$2.valid,\n invalid = _Backbone$Validation$2.invalid;\n var parentCollection = this.model.collection || this.options.collection;\n var invalidNameMessage = apps_library_editor_utils_ChapterHelper__WEBPACK_IMPORTED_MODULE_6__[\"ChapterHelpers\"].isValidChapterName(this.model, this.viewModel.get('name'), parentCollection);\n if (!invalidNameMessage) valid(this, 'name', null);else invalid(this, 'name', invalidNameMessage, null);\n return !invalidNameMessage;\n }\n }, {\n key: \"viewOptions\",\n value: function viewOptions() {\n var _this$maxTimes = this.maxTimes(),\n maxHr = _this$maxTimes.maxHr,\n maxMin = _this$maxTimes.maxMin,\n maxSec = _this$maxTimes.maxSec;\n\n var secDisabled = maxSec === 0;\n var minDisabled = maxMin === 0;\n var hrDisabled = maxHr === 0;\n return Object.assign(Object.assign({}, this.options), {\n enabled: this.enabled(),\n timeId: \"\".concat(this.cid, \"-time\"),\n chapterId: \"\".concat(this.cid, \"-chapter-name\"),\n plusSvg: libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_3__[\"SvgHelper\"].getSvg(libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_3__[\"cvSvgLibrary\"].Plus),\n secDisabled: secDisabled,\n minDisabled: minDisabled,\n hrDisabled: hrDisabled\n });\n }\n }]);\n\n return ChapterFormComponent;\n}(libs_common_core__WEBPACK_IMPORTED_MODULE_1__[\"Core\"].Component);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXItZm9ybS9DaGFwdGVyRm9ybUNvbXBvbmVudC50cy5qcyIsInNvdXJjZXMiOlsiZmlsZTovL0M6L0NsaWNrVmlldyBQcm9qZWN0cy9AY2xpY2t2aWV3L3BhY2thZ2VzL3Byb2plY3RzL2xpYnJhcnktZWRpdG9yL3NyYy9hcHBzL2xpYnJhcnktZWRpdG9yL2NvbXBvbmVudHMvY2hhcHRlci1mb3JtL0NoYXB0ZXJGb3JtQ29tcG9uZW50LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIEJhY2tib25lIGZyb20gJ2JhY2tib25lJztcclxuaW1wb3J0IHsgT2JqZWN0SGFzaCwgUmFkaW8gfSBmcm9tICdiYWNrYm9uZSc7XHJcblxyXG5pbXBvcnQgeyBDb3JlIH0gZnJvbSAnbGlicy9jb21tb24vY29yZSc7XHJcbmltcG9ydCB7IFZpZXdNb2RlbFNlcnZpY2UgfSBmcm9tICdsaWJzL2NvbW1vbi9iYWNrYm9uZS9zZXJ2aWNlcy9WaWV3TW9kZWxTZXJ2aWNlJztcclxuaW1wb3J0IHsgU3ZnSGVscGVyLCBjdlN2Z0xpYnJhcnkgfSBmcm9tICdsaWJzL3NoY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QUFBQTtBQUFBO0FBQUE7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQUVBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQUE7QUFMQTtBQU9BO0FBcFFBO0FBQ0E7QUFEQTtBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapter-form/ChapterFormComponent.ts\n");
|
|
15
|
+
|
|
16
|
+
/***/ }),
|
|
17
|
+
|
|
18
|
+
/***/ "./src/apps/library-editor/components/chapter-list/ChapterComponentCollection.ts":
|
|
19
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
20
|
+
|
|
21
|
+
"use strict";
|
|
22
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ChapterComponentCollection\", function() { return ChapterComponentCollection; });\n/* harmony import */ var libs_common_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"../../libs/common/src/backbone/index.ts\");\n/* harmony import */ var apps_library_editor_components_chapter_list_ChapterItemComponent__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"./src/apps/library-editor/components/chapter-list/ChapterItemComponent.ts\");\n/* harmony import */ var apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"./src/apps/library-editor/constants/index.ts\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\nvar ChapterComponentCollection = /*#__PURE__*/function (_Core$ComponentCollec) {\n _inherits(ChapterComponentCollection, _Core$ComponentCollec);\n\n var _super = _createSuper(ChapterComponentCollection);\n\n function ChapterComponentCollection(options) {\n _classCallCheck(this, ChapterComponentCollection);\n\n return _super.call(this, options);\n }\n\n _createClass(ChapterComponentCollection, [{\n key: \"initialize\",\n value: function initialize() {\n this.bindEditorListeners();\n }\n }, {\n key: \"name\",\n get: function get() {\n return 'ChapterComponentCollection';\n }\n }, {\n key: \"className\",\n get: function get() {\n return 'chapters';\n }\n }, {\n key: \"childView\",\n get: function get() {\n return apps_library_editor_components_chapter_list_ChapterItemComponent__WEBPACK_IMPORTED_MODULE_1__[\"ChapterItemComponent\"];\n }\n }, {\n key: \"bindEditorListeners\",\n value: function bindEditorListeners() {\n if (!this.options.editable) return;\n this.listenTo(this.options.channelName, apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_2__[\"LibraryEditorActions\"].ToggleEdit, this.toggleEditForm);\n }\n /**\r\n * When a child view triggers its edit view, hide all other edit views\r\n */\n\n }, {\n key: \"toggleEditForm\",\n value: function toggleEditForm(model) {\n this.collection.each(function (m) {\n return m !== model && m.set('showEditor', false);\n });\n model.set('showEditor', !model.get('showEditor'));\n }\n }, {\n key: \"childViewOptions\",\n get: function get() {\n return {\n showActions: this.options.showActions,\n duration: this.options.duration,\n channelName: this.options.channelName\n };\n }\n }]);\n\n return ChapterComponentCollection;\n}(libs_common_core__WEBPACK_IMPORTED_MODULE_0__[\"Core\"].ComponentCollection);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXItbGlzdC9DaGFwdGVyQ29tcG9uZW50Q29sbGVjdGlvbi50cy5qcyIsInNvdXJjZXMiOlsiZmlsZTovL0M6L0NsaWNrVmlldyBQcm9qZWN0cy9AY2xpY2t2aWV3L3BhY2thZ2VzL3Byb2plY3RzL2xpYnJhcnktZWRpdG9yL3NyYy9hcHBzL2xpY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gZmFsc2UpKTtcclxuICAgIG1vZGVsLnNldCgnc2hvd0VkaXRvcicsICFtb2RlbC5nZXQoJ3Nob3dFZGl0b3InKSk7XHJcbiAgfVxyXG5cclxuICBwdWJsaWMgZ2V0IGNoaWxkVmlld09wdGlvbnMoKTogT2JqZWN0SGFzaCB7XHJcbiAgICByZXR1cm4ge1xyXG4gICAgICBzaG93QWN0aW9uczogdGhpcy5vcHRpb25zLnNob3dBY3Rpb25zLFxyXG4gICAgICBkdXJhdGlvbjogdGhpcy5vcHRpb25zLmR1cmF0aW9uLFxyXG4gICAgICBjaGFubmVsTmFtZTogdGhpcy5vcHRpb25zLmNoYW5uZWxOYW1lLFxyXG4gICAgfTtcclxuICB9XHJcbn1cclxuIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFDQTtBQUdBO0FBQ0E7QUFTQTtBQUFBO0FBQ0E7QUFEQTtBQUNBO0FBRUE7QUFBQTtBQUNBO0FBREE7QUFFQTtBQUNBO0FBTkE7QUFBQTtBQUFBO0FBUUE7QUFDQTtBQVRBO0FBQUE7QUFBQTtBQVlBO0FBQ0E7QUFiQTtBQUFBO0FBQUE7QUFnQkE7QUFDQTtBQWpCQTtBQUFBO0FBQUE7QUFvQkE7QUFDQTtBQXJCQTtBQUFBO0FBQUE7QUF3QkE7QUFHQTtBQUNBO0FBRUE7O0FBRUE7QUFDQTtBQWpDQTtBQUFBO0FBQUE7QUFrQ0E7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQXBDQTtBQUFBO0FBQUE7QUF1Q0E7QUFDQTtBQUNBO0FBQ0E7QUFIQTtBQUtBO0FBNUNBO0FBQ0E7QUFEQTtBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapter-list/ChapterComponentCollection.ts\n");
|
|
23
|
+
|
|
24
|
+
/***/ }),
|
|
25
|
+
|
|
26
|
+
/***/ "./src/apps/library-editor/components/chapter-list/ChapterItem.hbs":
|
|
27
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
28
|
+
|
|
29
|
+
eval("var Handlebars = __webpack_require__(\"handlebars\");\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return container.escapeExpression(container.lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.styles : stack1)) != null ? stack1.loading : stack1), depth0));\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression, alias4=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \" <div class=\\\"col-2 text-right\\\">\\r\\n <a class=\\\"action edit-chapter my-2 svg-container \"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.styles : stack1)) != null ? stack1.svgContainer : stack1), depth0))\n + \" d-inline-block text-muted\\\"\\r\\n title=\\\"\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||container.hooks.helperMissing).call(alias4,\"edit\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"\\\">\"\n + ((stack1 = alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.editSvg : stack1), depth0)) != null ? stack1 : \"\")\n + \"</a>\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.allowDelete : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" </div>\\r\\n\";\n},\"4\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression;\n\n return \" <a class=\\\"action delete-chapter my-2 svg-container \"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.styles : stack1)) != null ? stack1.svgContainer : stack1), depth0))\n + \" d-inline-block text-muted\\\"\\r\\n title=\\\"\"\n + alias3((helpers.lang||(depth0 && depth0.lang)||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),\"delete\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"\\\">\"\n + ((stack1 = alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.deleteSvg : stack1), depth0)) != null ? stack1 : \"\")\n + \"</a>\\r\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.lambda, alias4=container.escapeExpression;\n\n return \"<div class=\\\"row mx-0 border-top chapter-item \"\n + ((stack1 = helpers[\"if\"].call(alias2,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.loading : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\r\\n <div class=\\\"clickable-seek col-1\\\">\\r\\n <p class=\\\"m-0 py-2\\\">\"\n + alias4(alias3(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.index : stack1), depth0))\n + \"</p>\\r\\n </div>\\r\\n <div class=\\\"clickable-seek col-6\\\">\\r\\n <p class=\\\"m-0 py-2\\\">\"\n + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(alias2,{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n <div class=\\\"clickable-seek col-3 text-right\\\">\\r\\n <p class=\\\"m-0 py-2\\\">\"\n + alias4(alias3(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.time : stack1), depth0))\n + \"</p>\\r\\n </div>\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.showActions : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</div>\\r\\n<div class=\\\"edit-form-region\\\"></div>\\r\\n\";\n},\"useData\":true});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXItbGlzdC9DaGFwdGVySXRlbS5oYnMuanMiLCJzb3VyY2VzIjpbImZpbGU6Ly9DOi9DbGlja1ZpZXcgUHJvamVjdHMvQGNsaWNrdmlldy9wYWNrYWdlcy9wcm9qZWN0cy9saWJyYXJ5LWVkaXRvci9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXItbGlzdC9DaGFwdGVySXRlbS5oYnMiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIEhhbmRsZWJhcnMgPSByZXF1aXJlKCdoYW5kbGViYXJzJyk7XG5tb2R1bGUuZXhwb3J0cyA9IChIYW5kbGViYXJzWydkZWZhdWx0J10gfHwgSGFuZGxlYmFycykudGVtcGxhdGUoe1wiMVwiOmZ1bmN0aW9uKGNvbnRhaW5lcixkZXB0aDAsaGVscGVycyxwYXJ0aWFscyxkYXRhKSB7XG4gICAgdmFyIHN0YWNrMSwgYWxpYXMxPWNvbnRhaW5lci5wcm9wZXJ0eUlzRW51bWVyYWJsZTtcblxuICByZXR1cm4gY29udGFpbmVyLmVzY2FwZUV4cHJlc3Npb24oY29udGFpbmVyLmxhbWJkYSgoKHN0YWNrMSA9ICgoc3RhY2sxID0gKGRlcHRoMCAhPSBudWxsID8gZGVwdGgwLm9wdGlvbnMgOiBkZXB0aDApKSAhPSBudWxsID8gc3RhY2sxLnN0eWxl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BQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapter-list/ChapterItem.hbs\n");
|
|
30
|
+
|
|
31
|
+
/***/ }),
|
|
32
|
+
|
|
33
|
+
/***/ "./src/apps/library-editor/components/chapter-list/ChapterItemComponent.ts":
|
|
34
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
35
|
+
|
|
36
|
+
"use strict";
|
|
37
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ChapterItemComponent\", function() { return ChapterItemComponent; });\n/* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"backbone\");\n/* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(backbone__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var libs_common_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"../../libs/common/src/backbone/index.ts\");\n/* harmony import */ var libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"../../libs/shared/src/utils/SvgHelper.ts\");\n/* harmony import */ var libs_shared_legacy_behaviors_tooltip_TooltipBehavior__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(\"../../libs/shared/src/legacy/behaviors/tooltip/TooltipBehavior.ts\");\n/* harmony import */ var shared_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(\"./src/shared/utils/index.ts\");\n/* harmony import */ var apps_library_editor_components_chapter_form_ChapterFormComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(\"./src/apps/library-editor/components/chapter-form/ChapterFormComponent.ts\");\n/* harmony import */ var apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(\"./src/apps/library-editor/constants/index.ts\");\n/* harmony import */ var _ChapterItem_hbs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(\"./src/apps/library-editor/components/chapter-list/ChapterItem.hbs\");\n/* harmony import */ var _ChapterItem_hbs__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_ChapterItem_hbs__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _chapter_item_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(\"./src/apps/library-editor/components/chapter-list/chapter-item.scss\");\n/* harmony import */ var _chapter_item_scss__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_chapter_item_scss__WEBPACK_IMPORTED_MODULE_8__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\n\n\n\n\n\n\nvar ChapterItemComponent = /*#__PURE__*/function (_Core$Component) {\n _inherits(ChapterItemComponent, _Core$Component);\n\n var _super = _createSuper(ChapterItemComponent);\n\n function ChapterItemComponent(options) {\n _classCallCheck(this, ChapterItemComponent);\n\n return _super.call(this, options);\n }\n\n _createClass(ChapterItemComponent, [{\n key: \"initialize\",\n value: function initialize() {\n this.bindListeners();\n }\n }, {\n key: \"name\",\n get: function get() {\n return 'ChapterItemComponent';\n }\n }, {\n key: \"lang\",\n get: function get() {\n return 'libraryEditor.chapterItem';\n }\n }, {\n key: \"instanceChannelName\",\n get: function get() {\n return \"\".concat(this.name).concat(this.cid);\n }\n }, {\n key: \"template\",\n get: function get() {\n return _ChapterItem_hbs__WEBPACK_IMPORTED_MODULE_7___default.a;\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"chapter \".concat(_chapter_item_scss__WEBPACK_IMPORTED_MODULE_8___default.a.chapterItem);\n }\n }, {\n key: \"behaviors\",\n get: function get() {\n return [{\n behaviorClass: libs_shared_legacy_behaviors_tooltip_TooltipBehavior__WEBPACK_IMPORTED_MODULE_3__[\"TooltipBehavior\"],\n selector: '.action'\n }];\n }\n }, {\n key: \"regions\",\n value: function regions() {\n return {\n editForm: {\n replaceElement: false,\n el: '.edit-form-region'\n }\n };\n }\n }, {\n key: \"elements\",\n get: function get() {\n return {\n chapterItem: '.chapter-item',\n editChapter: '.edit-chapter',\n deleteChapter: '.delete-chapter'\n };\n }\n }, {\n key: \"events\",\n value: function events() {\n return {\n 'click @ui.editChapter': 'onEditChapter',\n 'click @ui.deleteChapter': 'onDeleteChapter',\n 'click .clickable-seek': 'onClick'\n };\n }\n }, {\n key: \"bindListeners\",\n value: function bindListeners() {\n this.listenTo(this.instanceChannelName, apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].CancelChapterEdit, this.onCancelEdit);\n this.listenTo(this.instanceChannelName, apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].UpdateChapter, this.onUpdateChapter);\n this.listenTo(this.instanceChannelName, apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].UpdateChapterTime, this.onUpdateChapterTime);\n this.listenTo(this.model, 'change:showEditor', this.onShowEditorChange);\n this.listenTo(this.model, 'change:loading', this.onLoadingChange);\n /**\r\n * Bind listener to the first chapter to ensure that it's actions are\r\n * updated to reflect the chapter collection's state.\r\n */\n\n var firstChapter = this.model.collection.first();\n\n if (this.model === firstChapter) {\n this.listenTo(this.model.collection, 'add remove sort', this.render);\n return;\n } // Re-render to ensure we display accurate indexes\n\n\n this.listenTo(this.model.collection, 'sort', this.render);\n }\n }, {\n key: \"onClick\",\n value: function onClick() {\n var channel = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName);\n if (this.model.get('isPhysicalChapter')) channel.trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].SeekToChapter, this.model.get('index'));else channel.trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].UpdateChapterTime, this.model.get('startTime'));\n }\n }, {\n key: \"onLoadingChange\",\n value: function onLoadingChange() {\n var tooltipState = this.model.get('loading') ? 'disable' : 'enable';\n this.getUI('editChapter').tooltip(tooltipState);\n this.getUI('deleteChapter').tooltip(tooltipState);\n this.model.set('showEditor', false, {\n silent: true\n });\n this.render();\n }\n }, {\n key: \"onShowEditorChange\",\n value: function onShowEditorChange() {\n if (this.model.get('loading')) return;\n this.model.get('showEditor') ? this.showEditView() : this.hideEditView();\n }\n }, {\n key: \"showEditView\",\n value: function showEditView() {\n this.renderEditForm();\n this.getUI('chapterItem').addClass(_chapter_item_scss__WEBPACK_IMPORTED_MODULE_8___default.a.darkBackground);\n }\n }, {\n key: \"hideEditView\",\n value: function hideEditView() {\n this.model.set('showEditor', false, {\n silent: true\n });\n this.getUI('chapterItem').removeClass(_chapter_item_scss__WEBPACK_IMPORTED_MODULE_8___default.a.darkBackground);\n this.detachChildView('editForm');\n }\n }, {\n key: \"onCancelEdit\",\n value: function onCancelEdit() {\n this.hideEditView();\n }\n }, {\n key: \"onDeleteChapter\",\n value: function onDeleteChapter() {\n if (this.model.get('loading')) return;\n var channel = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName);\n channel.trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].DeleteChapter, this.model);\n } // Proxy the update event and propogate up to the edit chapters parent\n\n }, {\n key: \"onUpdateChapter\",\n value: function onUpdateChapter(chapter) {\n backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName).trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].UpdateChapter, chapter);\n this.render();\n } // Proxy the update event and propogate up to the edit chapters parent\n\n }, {\n key: \"onUpdateChapterTime\",\n value: function onUpdateChapterTime(time) {\n backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName).trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].UpdateChapterTime, time);\n }\n }, {\n key: \"onEditChapter\",\n value: function onEditChapter() {\n var channel = backbone__WEBPACK_IMPORTED_MODULE_0__[\"Radio\"].channel(this.options.channelName);\n channel.trigger(apps_library_editor_constants__WEBPACK_IMPORTED_MODULE_6__[\"LibraryEditorActions\"].ToggleEdit, this.model);\n }\n }, {\n key: \"canDelete\",\n value: function canDelete(index) {\n var collectionLength = this.model.collection.length; // If the only chapter in the collection is the first chapter, allow deletion.\n\n if (index === 1 && collectionLength === 1) return true; // Don't let the first chapter be deleted if there multiple chapters.\n\n if (index === 1 && collectionLength > 1) return false; // All other chapters in th collection can be deleted.\n\n return true;\n }\n }, {\n key: \"viewOptions\",\n value: function viewOptions() {\n var index = this.model.collection.indexOf(this.model) + 1;\n var time = shared_utils__WEBPACK_IMPORTED_MODULE_4__[\"TimeHelpers\"].trimToMinutes(shared_utils__WEBPACK_IMPORTED_MODULE_4__[\"TimeHelpers\"].secondsToHoursFormatted(this.model.get('startTime')));\n return Object.assign(Object.assign({}, this.options), {\n styles: _chapter_item_scss__WEBPACK_IMPORTED_MODULE_8___default.a,\n time: time,\n index: index,\n loading: this.model.get('loading'),\n allowDelete: this.canDelete(index),\n editSvg: libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_2__[\"SvgHelper\"].getSvg(libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_2__[\"cvSvgLibrary\"].Edit),\n deleteSvg: libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_2__[\"SvgHelper\"].getSvg(libs_shared_utils_SvgHelper__WEBPACK_IMPORTED_MODULE_2__[\"cvSvgLibrary\"].Delete)\n });\n }\n }, {\n key: \"renderEditForm\",\n value: function renderEditForm() {\n this.showChildView('editForm', new apps_library_editor_components_chapter_form_ChapterFormComponent__WEBPACK_IMPORTED_MODULE_5__[\"ChapterFormComponent\"]({\n model: this.model,\n editing: true,\n channelName: this.instanceChannelName,\n duration: this.options.duration\n }));\n } // This is super trash - but calling dispose does nothing. \n\n }, {\n key: \"onBeforeDetach\",\n value: function onBeforeDetach() {\n $('.tooltip').remove();\n }\n }]);\n\n return ChapterItemComponent;\n}(libs_common_core__WEBPACK_IMPORTED_MODULE_1__[\"Core\"].Component);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXItbGlzdC9DaGFwdGVySXRlbUNvbXBvbmVudC50cy5qcyIsInNvdXJjZXMiOlsiZmlsZTovL0M6L0NsaWNrVmlldyBQcm9qZWN0cy9AY2xpY2t2aWV3L3BhY2thZ2VzL3Byb2plY3RzL2xpYnJhcnktZWRpdG9yL3NyYy9hcHBzL2xpYnJhcnktZWRpdG9yL2NvbXBvbmVudHMvY2hhcHRlci1saXN0L0NoYXB0ZXJJdGVtQ29tcG9uZW50LnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE9iamVjdEhhc2gsIFJhZGlvIH0gZnJvbSAnYmFja2JvbmUnO1xyXG5pbXBvcnQgeyBDb3JlIH0g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qTEE7QUFBQTtBQUFBO0FBb0xBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFKQTtBQU1BO0FBQ0E7QUEzTEE7QUFBQTtBQUFBO0FBOExBO0FBQ0E7QUEvTEE7QUFDQTtBQURBO0FBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapter-list/ChapterItemComponent.ts\n");
|
|
38
|
+
|
|
39
|
+
/***/ }),
|
|
40
|
+
|
|
41
|
+
/***/ "./src/apps/library-editor/components/chapter-list/chapter-item.scss":
|
|
42
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
43
|
+
|
|
44
|
+
eval("// extracted by mini-css-extract-plugin\nmodule.exports = {\"darkBackground\":\"cv--darkBackground--2jtQl\",\"loading\":\"cv--loading--152ia\",\"svgContainer\":\"cv--svgContainer--xdD5o\",\"chapterItem\":\"cv--chapterItem--3G38c\"};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXItbGlzdC9jaGFwdGVyLWl0ZW0uc2Nzcy5qcyIsInNvdXJjZXMiOlsiZmlsZTovL0M6L0NsaWNrVmlldyBQcm9qZWN0cy9AY2xpY2t2aWV3L3BhY2thZ2VzL3Byb2plY3RzL2xpYnJhcnktZWRpdG9yL3NyYy9hcHBzL2xpYnJhcnktZWRpdG9yL2NvbXBvbmVudHMvY2hhcHRlci1saXN0L2NoYXB0ZXItaXRlbS5zY3NzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxubW9kdWxlLmV4cG9ydHMgPSB7XCJkYXJrQmFja2dyb3VuZFwiOlwiY3YtLWRhcmtCYWNrZ3JvdW5kLS0yanRRbFwiLFwibG9hZGluZ1wiOlwiY3YtLWxvYWRpbmctLTE1MmlhXCIsXCJzdmdDb250YWluZXJcIjpcImN2LS1zdmdDb250YWluZXItLXhkRDVvXCIsXCJjaGFwdGVySXRlbVwiOlwiY3YtLWNoYXB0ZXJJdGVtLS0zRzM4Y1wifTsiXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapter-list/chapter-item.scss\n");
|
|
45
|
+
|
|
46
|
+
/***/ }),
|
|
47
|
+
|
|
48
|
+
/***/ "./src/apps/library-editor/components/chapters/Chapters.hbs":
|
|
49
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
50
|
+
|
|
51
|
+
eval("var Handlebars = __webpack_require__(\"handlebars\");\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=container.escapeExpression;\n\n return \"<h5>\"\n + alias4((helpers.lang||(depth0 && depth0.lang)||alias3).call(alias2,\"chapters\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</h5>\\r\\n<div class=\\\"row mt-3 m-0 border-bottom\\\">\\r\\n <div class=\\\"col-1\\\">\\r\\n <label>#</label>\\r\\n </div>\\r\\n <div class=\\\"col-6\\\">\\r\\n <label>\"\n + alias4((helpers.lang||(depth0 && depth0.lang)||alias3).call(alias2,\"nameLabel\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</label>\\r\\n </div>\\r\\n <div class=\\\"col-3 text-right\\\">\\r\\n <label>\"\n + alias4((helpers.lang||(depth0 && depth0.lang)||alias3).call(alias2,\"startLabel\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</>\\r\\n </div>\\r\\n</div>\\r\\n<div class=\\\"chapter-list-region\\\"></div>\";\n},\"useData\":true});//# sourceURL=[module]\n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chapters.hbs\n");
|
|
52
|
+
|
|
53
|
+
/***/ }),
|
|
54
|
+
|
|
55
|
+
/***/ "./src/apps/library-editor/components/chapters/ChaptersComponent.ts":
|
|
56
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
57
|
+
|
|
58
|
+
"use strict";
|
|
59
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"ChaptersComponent\", function() { return ChaptersComponent; });\n/* harmony import */ var libs_common_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(\"../../libs/common/src/backbone/index.ts\");\n/* harmony import */ var apps_library_editor_components_chapter_list_ChapterComponentCollection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(\"./src/apps/library-editor/components/chapter-list/ChapterComponentCollection.ts\");\n/* harmony import */ var _Chapters_hbs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(\"./src/apps/library-editor/components/chapters/Chapters.hbs\");\n/* harmony import */ var _Chapters_hbs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_Chapters_hbs__WEBPACK_IMPORTED_MODULE_2__);\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n\n\n\nvar ChaptersComponent = /*#__PURE__*/function (_Core$Component) {\n _inherits(ChaptersComponent, _Core$Component);\n\n var _super = _createSuper(ChaptersComponent);\n\n function ChaptersComponent(options) {\n _classCallCheck(this, ChaptersComponent);\n\n return _super.call(this, options);\n }\n\n _createClass(ChaptersComponent, [{\n key: \"name\",\n get: function get() {\n return 'ChaptersComponent';\n }\n }, {\n key: \"template\",\n get: function get() {\n return _Chapters_hbs__WEBPACK_IMPORTED_MODULE_2___default.a;\n }\n }, {\n key: \"lang\",\n get: function get() {\n return 'libraryEditor.chapters';\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"chapters \".concat(!this.options.editable && 'py-3 border-top');\n }\n }, {\n key: \"regions\",\n value: function regions() {\n return {\n chapterList: {\n replaceElement: true,\n el: '.chapter-list-region'\n }\n };\n }\n }, {\n key: \"viewOptions\",\n value: function viewOptions() {\n return {\n showHeader: this.options.showHeader\n };\n }\n }, {\n key: \"onRender\",\n value: function onRender() {\n this.showChildView('chapterList', new apps_library_editor_components_chapter_list_ChapterComponentCollection__WEBPACK_IMPORTED_MODULE_1__[\"ChapterComponentCollection\"]({\n collection: this.collection,\n duration: this.options.duration,\n channelName: this.options.channelName,\n showActions: this.options.showActions,\n editable: this.options.editable\n }));\n }\n }]);\n\n return ChaptersComponent;\n}(libs_common_core__WEBPACK_IMPORTED_MODULE_0__[\"Core\"].Component);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvYXBwcy9saWJyYXJ5LWVkaXRvci9jb21wb25lbnRzL2NoYXB0ZXJzL0NoYXB0ZXJzQ29tcG9uZW50LnRzLmpzIiwic291cmNlcyI6WyJmaWxlOi8vQzovQ2xpY2tWaWV3IFByb2plY3RzL0BjbGlja3ZpZXcvcGFja2FnZXMvcHJvamVjdHMvbGlicmFyeS1lZGl0b3Ivc3JjL2FwcHMvbGlicmFyeS1lZGl0b3IvY29tcG9uZW50cy9jaGFwdGVycy9DaGFwdGVyc0NvbXBvbmVudC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb3JlIH0gZnJvbSAnbGlicy9jb21tb24vY29yZSc7XHJcbmltcG9ydCB7IE9iamVjdEhhc2ggfSBmcm9tICdiYWNrYm9uZSc7XHJcblxyXG5pbXBvc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QUFDQTtBQVVBO0FBQUE7QUFDQTtBQURBO0FBQ0E7QUFFQTtBQUFBO0FBQ0E7QUFEQTtBQUVBO0FBQ0E7QUFOQTtBQUFBO0FBQUE7QUFRQTtBQUNBO0FBVEE7QUFBQTtBQUFBO0FBWUE7QUFDQTtBQWJBO0FBQUE7QUFBQTtBQWdCQTtBQUNBO0FBakJBO0FBQUE7QUFBQTtBQW9CQTtBQUNBO0FBckJBO0FBQUE7QUFBQTtBQXdCQTtBQUNBO0FBQ0E7QUFDQTtBQUZBO0FBREE7QUFNQTtBQTlCQTtBQUFBO0FBQUE7QUFpQ0E7QUFDQTtBQURBO0FBR0E7QUFwQ0E7QUFBQTtBQUFBO0FBdUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUxBO0FBT0E7QUE5Q0E7QUFDQTtBQURBO0FBQUEiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/apps/library-editor/components/chapters/ChaptersComponent.ts\n");
|
|
60
|
+
|
|
61
|
+
/***/ })
|
|
62
|
+
|
|
63
|
+
}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[35],{1006:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),a=n(250);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})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var a=f(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,i=c(l);function l(){return o(this,l),i.apply(this,arguments)}return t=l,(n=[{key:"defaults",value:function(){return e={},t=a.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&u(t.prototype,n),r&&u(t,r),l}(r.a.Model)},1012:function(e,t,n){"use strict";var r=n(1017),a=n(1013),i=(n(1014),n(3),n(1018)),o=(n(1020),n(1016));n.d(t,"a",(function(){return r.a})),n.d(t,"d",(function(){return a.g})),n.d(t,"g",(function(){return a.j})),n.d(t,"f",(function(){return a.i})),n.d(t,"c",(function(){return a.f})),n.d(t,"e",(function(){return a.h})),n.d(t,"b",(function(){return i.a})),n.d(t,"h",(function(){return o.a}))},1013:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"k",(function(){return p})),n.d(t,"g",(function(){return g})),n.d(t,"e",(function(){return m})),n.d(t,"j",(function(){return b})),n.d(t,"i",(function(){return v})),n.d(t,"c",(function(){return E})),n.d(t,"b",(function(){return w})),n.d(t,"d",(function(){return x})),n.d(t,"f",(function(){return P})),n.d(t,"h",(function(){return y}));var r=n(2),a=n(1),i=n(20),o=n(29),u=n(3),s="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=a.reduce(e,(function(e,n,r){var i=t[r];return n||i?a.isObject(n)&&a.isObject(i)&&!a.isUndefined(n.id)&&n.id===i.id?e:a.isArray(n)?f(n,i).length?e.concat(r):e:a.isEqual(n,i)?e:e.concat(r):e}),[]);if(n.length)return a.object(a.map(n,(function(n){return a.isArray(t[n])?[n,f(e[n],t[n])]:[n,t[n]]})))}}function f(e,t){var n=[];return a.each(t,(function(t){var r=a.findWhere(e,{id:t.id});if(!a.isUndefined(r)||0!==Object.keys(t).length){var i=a.isUndefined(r)?t:l(r,t);i&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(i.id=t.id,n.push(i))))}})),n}var d={getChanges:function(e,t){var n=l(a.omit(e.toJSON(),c),a.omit(t.toJSON(),c));if(n)return a.object(a.map(a.keys(n),(function(e){return[e,d.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(a.isObject(t)&&a.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return a.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new i.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var i=["distributors","producers","directors","productionCompanies"];for(var o in a.each(a.keys(n),(function(e){i.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(a.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var u=e.get(o);(u instanceof r.a.Model||u instanceof r.a.NestedModel)&&u.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return a.each(a.keys(e.toJSON()),(function(i){if(a.contains(n,i)){var o=e.get(i).map((function(e){return e.id})),u=t.get(i).map((function(e){return e.id})),s=a.filter(o,(function(e){return e&&!a.contains(u,e)}));s.length&&(r[i]=s)}})),r}},p={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"videoTitleRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?u.a.getPhrase(s,"episodeNumberLessThanOne"):e&&e>2147483647?u.a.getPhrase(s,"episodeNumberExceeds"):e%1!=0?u.a.getPhrase(s,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?u.a.getPhrase(s,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":u.a.getPhrase(s,"seasonNoEpisodeNumber")}},h=o().year(),m={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>h?u.a.getPhrase(s,"validProductionYears",{currentYear:h}):void 0):""}},g={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"resourceNameRequired")}}]},b={suggestion:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"suggestEditReasonExceeds")}}]},y={number:function(e){return e?+e<1?u.a.getPhrase(s,"seasonLessThanOne"):+e>3e3?u.a.getPhrase(s,"seasonExceeds"):+e%1!=0?u.a.getPhrase(s,"seasonNotWhole"):"":u.a.getPhrase(s,"seasonRequired")}},v={empty:function(){return u.a.getPhrase(s,"suggestEditRatingRequired")},original:function(){return u.a.getPhrase(s,"suggestEditRatingInvalid")}},P={url:[{required:!0,pattern:"url",msg:function(){return u.a.getPhrase(s,"linkUrlRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return u.a.getPhrase(s,"linkNameRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"linkNameExceeds")}}]},E={name:[{maxLength:128,msg:function(){return u.a.getPhrase(s,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"fieldValueExceeds")}}]},w={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":u.a.getPhrase(s,"fieldsInvalid"):""}};function x(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1014:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),a=n(48),i=n(159),o=n(3),u="libraryEditor.utils",s={name:[{required:!0,msg:function(){return o.a.getPhrase(u,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(u,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?a.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?o.a.getPhrase(u,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(u,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,a=e.folder,i=e.collection;return t&&n?r.extend({},s,c(a,i)):t?s:n?c(a,i):void 0}},1016:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(16),a=n(3),i=n(187),o=n(1032),u=n(61);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var f={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case u.a.HostedLibrary:case u.a.CustomLibrary:return e.get("name");case u.a.Exchange:return a.a.getPhrase(l,"exchange");case u.a.Workspace:return a.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case u.a.HostedLibrary:case u.a.CustomLibrary:return"bg-info";case u.a.Exchange:return"bg-green";case u.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(s(t={},c.Pdf,r.b.FilePDF),s(t,c.Image,r.b.FileImg),s(t,c.PowerPoint,r.b.FilePowerpoint),s(t,c.Document,r.b.FileWord),s(t,c.Excel,r.b.FileExcel),s(t,c.Zip,r.b.FileZip),s(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return a.a.getPhrase(l,"pdf");case c.Image:return a.a.getPhrase(l,"image");case c.Document:return a.a.getPhrase(l,"document");case c.Excel:return a.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return a.a.getPhrase(l,"presentation");case c.Zip:return a.a.getPhrase(l,"zipArchive");case c.File:return a.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:f.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case i.MetadataType.VideoTitle:t+="VideoTitle";break;case i.MetadataType.Description:t+="Description";break;case i.MetadataType.Rating:t+="Rating";break;case i.MetadataType.SeriesTitle:t+="SeriesTitle";break;case i.MetadataType.Season:t+="SeasonNumber";break;case i.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case i.MetadataType.BroadcastDate:t+="BroadcastDate";break;case i.MetadataType.Channel:t+="Channel";break;case i.MetadataType.ProductionYear:t+="ProductionYear";break;case i.MetadataType.Distributors:t+="Distributors";break;case i.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case i.MetadataType.Directors:t+="Directors";break;case i.MetadataType.Producers:t+="Producers";break;case i.MetadataType.Other:t+="Other"}return a.a.getPhrase(l,t)}}},1017:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1),a=n(12),i=n(3),o="libraryEditor.utils",u={isValidChapterTime:function(e,t,n,i){if(i){if(!r.isNumber(t))return s.StartTime.Invalid();if(t<0)return s.StartTime.Invalid();if(t>a.x.millisecondsToSeconds(n))return s.StartTime.Exceeds();if(i.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return s.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?s.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?s.Name.Exists():r.isEmpty(t.trim())?s.Name.Invalid():void 0:s.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},s={Name:{Invalid:function(){return i.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return i.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return i.a.getPhrase(o,"chapterStartTimeExceeds")}}}},1018:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(3),a="libraryEditor.utils",i={name:[{required:!0,msg:function(){return r.a.getPhrase(a,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(a,"libraryNameExceeds")}}]}},1020:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),a=n(1013),i=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return i("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return i("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return i("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?i("episodeNumberLessThanOne"):e&&e>255?i("episodeNumberExceeds"):e&&e%1!=0?i("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?i("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":i("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.e.productionYear.apply(null,t)}}},1032:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var a=s(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(n,e);var t=o(n);function n(){return a(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1266:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,a){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,a){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},o=e.hooks.helperMissing,u=e.escapeExpression;return'<form>\r\n <div class="form-group">\r\n <label for="name" class="control-label">'+u((n.lang||t&&t.lang||o).call(i,"fileName",{name:"lang",hash:{},data:a}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+u((n.lang||t&&t.lang||o).call(i,"fileName",{name:"lang",hash:{},data:a}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n</form>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,a){var i;e.propertyIsEnumerable;return 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,a,0),inverse:e.program(3,a,0),data:a}))?i:""},useData:!0})},1400:function(e,t,n){"use strict";n.r(t),n.d(t,"EditResourceView",(function(){return O}));var r=n(1),a=n(6),i=n(42),o=n(2),u=n(5),s=n(30),c=n(289),l=n(250),f=n(0),d=n(12),p=n(1006),h=n(175),m=n(3),g=n(1012),b=n(1266),y=n.n(b);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})(e)}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=N(e);if(t){var a=N(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return x(this,n)}}function x(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&E(e,t)}(x,e);var t,n,b,v=w(x);function x(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,x),v.call(this,e)}return t=x,(n=[{key:"initialize",value:function(){this.listenTo(f.e.RESOURCE,"resource:".concat(this.options.resourceId,":sync"),this.render),this.resourceDataService=u.a.getInstance(f.g.Resource,this)}},{key:"name",get:function(){return"EditResourceView"}},{key:"lang",get:function(){return"libraryEditor.editResource"}},{key:"title",get:function(){return m.a.getPhrase(this.lang,"title")}},{key:"template",get:function(){return y.a}},{key:"channelName",get:function(){return d.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.e,title:m.a.getPhrase(this.lang,"edit"),spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new p.a,buttonText:m.a.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{name:"#name",feedback:".form-feedback"}}},{key:"events",value:function(){return{submit:"onSubmit","shown.bs.modal":"onModalShown"}}},{key:"onSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(a.Radio.channel(this.channelName).trigger(l.b.ShowSpinner),this.resourceDataService.updateResource(this.options.videoId,this.viewModel,(function(){t.logAction(),o.a.AppLinkHelper.trigger({application:f.b.LIBRARY_EDITOR,action:f.a.LibraryEditor.EDIT_VIDEO_RESOURCES,args:[t.options.videoId]})})))}},{key:"logAction",value:function(){var e={id:this.options.resourceId,parentId:+this.options.videoId,name:this.viewModel.get("name")};i.a.logUserAction(e,this.options.analyticsOptions)}},{key:"selectAllWithoutExtension",value:function(){if(this.model){var e=this.model.get("name").split(".").slice(0,-1).join("."),t=this.getUI("name");t.each((function(n,a){if(r.isFunction(a.setSelectionRange))t.focus(),a.setSelectionRange(0,e.length);else if(r.isFunction(a.createTextRange)){var i=a.createTextRange();i.collapse(!0),i.moveEnd("character",e.length),i.moveStart("character",0),i.select()}}))}}},{key:"onModalShown",value:function(){this.selectAllWithoutExtension()}},{key:"dataFetched",value:function(){return!!this.model&&!!this.viewModel}},{key:"onBeforeRender",value:function(){var e=this;this.model=this.resourceDataService.getResource(this.options.resourceId,(function(t){e.viewModel=s.a.get("resource:".concat(e.options.resourceId),t.toJSON(),{ctor:h.a}),e.viewModel.addValidation(g.d)})),this.dataFetched()&&this.spinnerModel.set(l.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:d.r.getSpinner({size:d.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.viewModel&&(this.stickit(this.viewModel),a.Validation.bind(this,{model:this.viewModel}),this.selectAllWithoutExtension())}},{key:"onClose",value:function(){this.unstickit(),a.Validation.unbind(this)}}])&&P(t.prototype,n),b&&P(t,b),x}(o.a.View)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[35],{1009:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),a=n(252);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})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var a=f(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return l(this,n)}}function l(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(l,e);var t,n,r,i=c(l);function l(){return o(this,l),i.apply(this,arguments)}return t=l,(n=[{key:"defaults",value:function(){return e={},t=a.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&u(t.prototype,n),r&&u(t,r),l}(r.a.Model)},1015:function(e,t,n){"use strict";var r=n(1020),a=n(1016),i=(n(1017),n(3),n(1021)),o=(n(1023),n(1019));n.d(t,"a",(function(){return r.a})),n.d(t,"d",(function(){return a.g})),n.d(t,"g",(function(){return a.j})),n.d(t,"f",(function(){return a.i})),n.d(t,"c",(function(){return a.f})),n.d(t,"e",(function(){return a.h})),n.d(t,"b",(function(){return i.a})),n.d(t,"h",(function(){return o.a}))},1016:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"k",(function(){return p})),n.d(t,"g",(function(){return g})),n.d(t,"e",(function(){return m})),n.d(t,"j",(function(){return b})),n.d(t,"i",(function(){return v})),n.d(t,"c",(function(){return E})),n.d(t,"b",(function(){return w})),n.d(t,"d",(function(){return x})),n.d(t,"f",(function(){return P})),n.d(t,"h",(function(){return y}));var r=n(2),a=n(1),i=n(20),o=n(29),u=n(3),s="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=a.reduce(e,(function(e,n,r){var i=t[r];return n||i?a.isObject(n)&&a.isObject(i)&&!a.isUndefined(n.id)&&n.id===i.id?e:a.isArray(n)?f(n,i).length?e.concat(r):e:a.isEqual(n,i)?e:e.concat(r):e}),[]);if(n.length)return a.object(a.map(n,(function(n){return a.isArray(t[n])?[n,f(e[n],t[n])]:[n,t[n]]})))}}function f(e,t){var n=[];return a.each(t,(function(t){var r=a.findWhere(e,{id:t.id});if(!a.isUndefined(r)||0!==Object.keys(t).length){var i=a.isUndefined(r)?t:l(r,t);i&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(i.id=t.id,n.push(i))))}})),n}var d={getChanges:function(e,t){var n=l(a.omit(e.toJSON(),c),a.omit(t.toJSON(),c));if(n)return a.object(a.map(a.keys(n),(function(e){return[e,d.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(a.isObject(t)&&a.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return a.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new i.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var i=["distributors","producers","directors","productionCompanies"];for(var o in a.each(a.keys(n),(function(e){i.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(a.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var u=e.get(o);(u instanceof r.a.Model||u instanceof r.a.NestedModel)&&u.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return a.each(a.keys(e.toJSON()),(function(i){if(a.contains(n,i)){var o=e.get(i).map((function(e){return e.id})),u=t.get(i).map((function(e){return e.id})),s=a.filter(o,(function(e){return e&&!a.contains(u,e)}));s.length&&(r[i]=s)}})),r}},p={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"videoTitleRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?u.a.getPhrase(s,"episodeNumberLessThanOne"):e&&e>2147483647?u.a.getPhrase(s,"episodeNumberExceeds"):e%1!=0?u.a.getPhrase(s,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?u.a.getPhrase(s,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":u.a.getPhrase(s,"seasonNoEpisodeNumber")}},h=o().year(),m={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>h?u.a.getPhrase(s,"validProductionYears",{currentYear:h}):void 0):""}},g={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"resourceNameRequired")}}]},b={suggestion:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"suggestEditReasonExceeds")}}]},y={number:function(e){return e?+e<1?u.a.getPhrase(s,"seasonLessThanOne"):+e>3e3?u.a.getPhrase(s,"seasonExceeds"):+e%1!=0?u.a.getPhrase(s,"seasonNotWhole"):"":u.a.getPhrase(s,"seasonRequired")}},v={empty:function(){return u.a.getPhrase(s,"suggestEditRatingRequired")},original:function(){return u.a.getPhrase(s,"suggestEditRatingInvalid")}},P={url:[{required:!0,pattern:"url",msg:function(){return u.a.getPhrase(s,"linkUrlRequired")}},{maxLength:65535,msg:function(){return u.a.getPhrase(s,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return u.a.getPhrase(s,"linkNameRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"linkNameExceeds")}}]},E={name:[{maxLength:128,msg:function(){return u.a.getPhrase(s,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"fieldValueExceeds")}}]},w={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":u.a.getPhrase(s,"fieldsInvalid"):""}};function x(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1017:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),a=n(48),i=n(159),o=n(3),u="libraryEditor.utils",s={name:[{required:!0,msg:function(){return o.a.getPhrase(u,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(u,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?a.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?o.a.getPhrase(u,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(u,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,a=e.folder,i=e.collection;return t&&n?r.extend({},s,c(a,i)):t?s:n?c(a,i):void 0}},1019:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(17),a=n(3),i=n(187),o=n(1035),u=n(61);function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var f={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case u.a.HostedLibrary:case u.a.CustomLibrary:return e.get("name");case u.a.Exchange:return a.a.getPhrase(l,"exchange");case u.a.Workspace:return a.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case u.a.HostedLibrary:case u.a.CustomLibrary:return"bg-info";case u.a.Exchange:return"bg-green";case u.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(s(t={},c.Pdf,r.b.FilePDF),s(t,c.Image,r.b.FileImg),s(t,c.PowerPoint,r.b.FilePowerpoint),s(t,c.Document,r.b.FileWord),s(t,c.Excel,r.b.FileExcel),s(t,c.Zip,r.b.FileZip),s(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return a.a.getPhrase(l,"pdf");case c.Image:return a.a.getPhrase(l,"image");case c.Document:return a.a.getPhrase(l,"document");case c.Excel:return a.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return a.a.getPhrase(l,"presentation");case c.Zip:return a.a.getPhrase(l,"zipArchive");case c.File:return a.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:f.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case i.MetadataType.VideoTitle:t+="VideoTitle";break;case i.MetadataType.Description:t+="Description";break;case i.MetadataType.Rating:t+="Rating";break;case i.MetadataType.SeriesTitle:t+="SeriesTitle";break;case i.MetadataType.Season:t+="SeasonNumber";break;case i.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case i.MetadataType.BroadcastDate:t+="BroadcastDate";break;case i.MetadataType.Channel:t+="Channel";break;case i.MetadataType.ProductionYear:t+="ProductionYear";break;case i.MetadataType.Distributors:t+="Distributors";break;case i.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case i.MetadataType.Directors:t+="Directors";break;case i.MetadataType.Producers:t+="Producers";break;case i.MetadataType.Other:t+="Other"}return a.a.getPhrase(l,t)}}},1020:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(1),a=n(13),i=n(3),o="libraryEditor.utils",u={isValidChapterTime:function(e,t,n,i){if(i){if(!r.isNumber(t))return s.StartTime.Invalid();if(t<0)return s.StartTime.Invalid();if(t>a.x.millisecondsToSeconds(n))return s.StartTime.Exceeds();if(i.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return s.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?s.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?s.Name.Exists():r.isEmpty(t.trim())?s.Name.Invalid():void 0:s.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},s={Name:{Invalid:function(){return i.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return i.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return i.a.getPhrase(o,"chapterStartTimeExceeds")}}}},1021:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(3),a="libraryEditor.utils",i={name:[{required:!0,msg:function(){return r.a.getPhrase(a,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(a,"libraryNameExceeds")}}]}},1023:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),a=n(1016),i=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return i("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return i("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return i("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?i("episodeNumberLessThanOne"):e&&e>255?i("episodeNumberExceeds"):e&&e%1!=0?i("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?i("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":i("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.e.productionYear.apply(null,t)}}},1035:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var a=s(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(n,e);var t=o(n);function n(){return a(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1269:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,a){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,a){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},o=e.hooks.helperMissing,u=e.escapeExpression;return'<form>\r\n <div class="form-group">\r\n <label for="name" class="control-label">'+u((n.lang||t&&t.lang||o).call(i,"fileName",{name:"lang",hash:{},data:a}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+u((n.lang||t&&t.lang||o).call(i,"fileName",{name:"lang",hash:{},data:a}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n</form>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,a){var i;e.propertyIsEnumerable;return 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,a,0),inverse:e.program(3,a,0),data:a}))?i:""},useData:!0})},1403:function(e,t,n){"use strict";n.r(t),n.d(t,"EditResourceView",(function(){return O}));var r=n(1),a=n(6),i=n(42),o=n(2),u=n(5),s=n(30),c=n(291),l=n(252),f=n(0),d=n(13),p=n(1009),h=n(175),m=n(3),g=n(1015),b=n(1269),y=n.n(b);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})(e)}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=N(e);if(t){var a=N(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return x(this,n)}}function x(e,t){return!t||"object"!==v(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(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}}),t&&E(e,t)}(x,e);var t,n,b,v=w(x);function x(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,x),v.call(this,e)}return t=x,(n=[{key:"initialize",value:function(){this.listenTo(f.e.RESOURCE,"resource:".concat(this.options.resourceId,":sync"),this.render),this.resourceDataService=u.a.getInstance(f.g.Resource,this)}},{key:"name",get:function(){return"EditResourceView"}},{key:"lang",get:function(){return"libraryEditor.editResource"}},{key:"title",get:function(){return m.a.getPhrase(this.lang,"title")}},{key:"template",get:function(){return y.a}},{key:"channelName",get:function(){return d.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.e,title:m.a.getPhrase(this.lang,"edit"),spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new p.a,buttonText:m.a.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{name:"#name",feedback:".form-feedback"}}},{key:"events",value:function(){return{submit:"onSubmit","shown.bs.modal":"onModalShown"}}},{key:"onSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(a.Radio.channel(this.channelName).trigger(l.b.ShowSpinner),this.resourceDataService.updateResource(this.options.videoId,this.viewModel,(function(){t.logAction(),o.a.AppLinkHelper.trigger({application:f.b.LIBRARY_EDITOR,action:f.a.LibraryEditor.EDIT_VIDEO_RESOURCES,args:[t.options.videoId]})})))}},{key:"logAction",value:function(){var e={id:this.options.resourceId,parentId:+this.options.videoId,name:this.viewModel.get("name")};i.a.logUserAction(e,this.options.analyticsOptions)}},{key:"selectAllWithoutExtension",value:function(){if(this.model){var e=this.model.get("name").split(".").slice(0,-1).join("."),t=this.getUI("name");t.each((function(n,a){if(r.isFunction(a.setSelectionRange))t.focus(),a.setSelectionRange(0,e.length);else if(r.isFunction(a.createTextRange)){var i=a.createTextRange();i.collapse(!0),i.moveEnd("character",e.length),i.moveStart("character",0),i.select()}}))}}},{key:"onModalShown",value:function(){this.selectAllWithoutExtension()}},{key:"dataFetched",value:function(){return!!this.model&&!!this.viewModel}},{key:"onBeforeRender",value:function(){var e=this;this.model=this.resourceDataService.getResource(this.options.resourceId,(function(t){e.viewModel=s.a.get("resource:".concat(e.options.resourceId),t.toJSON(),{ctor:h.a}),e.viewModel.addValidation(g.d)})),this.dataFetched()&&this.spinnerModel.set(l.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:d.r.getSpinner({size:d.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.viewModel&&(this.stickit(this.viewModel),a.Validation.bind(this,{model:this.viewModel}),this.selectAllWithoutExtension())}},{key:"onClose",value:function(){this.unstickit(),a.Validation.unbind(this)}}])&&P(t.prototype,n),b&&P(t,b),x}(o.a.View)}}]);
|