@clickview/library-editor 1.45.1 → 1.46.1-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 +2 -2
- package/dist/css/{101-library-editor-737d33c429.chunk.css → 101-library-editor-ea0aa41f12.chunk.css} +1 -1
- package/dist/css/{3778-library-editor-75b6a2eca6.chunk.css → 1260-library-editor-826bc90b86.chunk.css} +3 -4
- package/dist/css/{1601-library-editor-6b7ab30a3e.chunk.css → 1601-library-editor-4a6aafa66a.chunk.css} +1 -1
- package/dist/css/{1876-library-editor-22d3cf78a3.chunk.css → 1703-library-editor-3334df179f.chunk.css} +3 -3
- package/dist/css/{1703-library-editor-22d3cf78a3.chunk.css → 1876-library-editor-3334df179f.chunk.css} +3 -3
- package/dist/css/{2417-library-editor-1142af5a96.chunk.css → 2417-library-editor-1c2828a69b.chunk.css} +2 -2
- package/dist/css/{2601-library-editor-0db14cf497.chunk.css → 2601-library-editor-8922d361d6.chunk.css} +3 -3
- package/dist/css/{2644-library-editor-94bb070288.chunk.css → 2644-library-editor-cdc1c17774.chunk.css} +1 -1
- package/dist/css/{3087-library-editor-e17193216d.chunk.css → 3087-library-editor-7c76d2234e.chunk.css} +1 -1
- package/dist/css/{343-library-editor-9c019e516a.chunk.css → 343-library-editor-a5b4b92fa3.chunk.css} +1 -1
- package/dist/css/{456-library-editor-4494773a3a.chunk.css → 456-library-editor-a92bd26671.chunk.css} +1 -1
- package/dist/css/{61-library-editor-af56e745db.chunk.css → 61-library-editor-796336d468.chunk.css} +12 -12
- package/dist/css/{7408-library-editor-58e2f5e100.chunk.css → 7408-library-editor-2a67dae087.chunk.css} +2 -2
- package/dist/css/{8614-library-editor-e951fd6c97.chunk.css → 8614-library-editor-126f3beb94.chunk.css} +1 -1
- package/dist/css/{9383-library-editor-454e5b7acb.chunk.css → 9383-library-editor-a65f7ef186.chunk.css} +3 -3
- package/dist/css/{5185-library-editor-577789a2ba.chunk.css → 9677-library-editor-9461efc9c7.chunk.css} +11 -10
- package/dist/css/library-editor-app-f98ed58456.css +62 -0
- package/dist/languages/en.json +1 -1
- package/dist/scripts/101-1199c50c5c.chunk.js +1 -0
- package/dist/scripts/{1010-78c730c3d3.chunk.js → 1010-60f6dfd832.chunk.js} +1 -1
- package/dist/scripts/{1086-bf7355e402.chunk.js → 1086-2682e6d3f7.chunk.js} +1 -1
- package/dist/scripts/{112-9f396668ac.chunk.js → 112-24c19e2cde.chunk.js} +1 -1
- package/dist/scripts/{1216-7c3584c6ee.chunk.js → 1216-f3e3f911fa.chunk.js} +1 -1
- package/dist/scripts/1260-78c187f4ef.chunk.js +1 -0
- package/dist/scripts/{1269-99208bcecc.chunk.js → 1269-a34a1de36d.chunk.js} +1 -1
- package/dist/scripts/{1409-a161f8245a.chunk.js → 1409-93a72ff5bf.chunk.js} +1 -1
- package/dist/scripts/{1601-879d0665e7.chunk.js → 1601-cfa68d5d16.chunk.js} +2 -2
- package/dist/scripts/{1703-63ad0b3ce1.chunk.js → 1703-0ee4d1051b.chunk.js} +1 -1
- package/dist/scripts/{1832-882ab67791.chunk.js → 1832-23fead57c5.chunk.js} +1 -1
- package/dist/scripts/{1876-42c5fe7a33.chunk.js → 1876-a98a0d0a0b.chunk.js} +1 -1
- package/dist/scripts/2229-3110d984e1.chunk.js +1 -0
- package/dist/scripts/{2417-a7f6defb26.chunk.js → 2417-d1a2c3b7e1.chunk.js} +1 -1
- package/dist/scripts/{243-e21d40c982.chunk.js → 243-2012c53e96.chunk.js} +1 -1
- package/dist/scripts/{2482-b7ad002b09.chunk.js → 2482-955e4b3615.chunk.js} +1 -1
- package/dist/scripts/{259-671fc59e31.chunk.js → 259-7d1d480f6e.chunk.js} +1 -1
- package/dist/scripts/{2601-c4230f3cfd.chunk.js → 2601-bd6f95da25.chunk.js} +1 -1
- package/dist/scripts/{2644-4815c4b278.chunk.js → 2644-4ce78c8ca5.chunk.js} +1 -1
- package/dist/scripts/{2692-92122fb3d2.chunk.js → 2692-438539ccbe.chunk.js} +1 -1
- package/dist/scripts/{2888-2c0a5591ef.chunk.js → 2888-55edc16fd6.chunk.js} +1 -1
- package/dist/scripts/{299-9ab1d59d5c.chunk.js → 299-eeaac48864.chunk.js} +1 -1
- package/dist/scripts/{2998-234d4e79d4.chunk.js → 2998-24191bc8ab.chunk.js} +1 -1
- package/dist/scripts/{3087-f8664286fd.chunk.js → 3087-f5133d0df6.chunk.js} +1 -1
- package/dist/scripts/{3400-48eceba386.chunk.js → 3400-95d7a3a0d6.chunk.js} +1 -1
- package/dist/scripts/{343-6d71f27a71.chunk.js → 343-12058c1904.chunk.js} +1 -1
- package/dist/scripts/{35-3e0fe9666f.chunk.js → 35-7bfbab50e6.chunk.js} +1 -1
- package/dist/scripts/{3551-5456900410.chunk.js → 3551-5513258594.chunk.js} +1 -1
- package/dist/scripts/{376-7e5af8f053.chunk.js → 376-98c734f74f.chunk.js} +1 -1
- package/dist/scripts/{3763-64dc73b8c4.chunk.js → 3763-c5de5a36a1.chunk.js} +1 -1
- package/dist/scripts/{4201-228a2b8d76.chunk.js → 4201-6311ac5cac.chunk.js} +1 -1
- package/dist/scripts/{4245-cacf193d02.chunk.js → 4245-6e9e71cc7d.chunk.js} +1 -1
- package/dist/scripts/4365-7d121d1f6d.chunk.js +1 -0
- package/dist/scripts/4523-9752080367.chunk.js +1 -0
- package/dist/scripts/456-bf597ac34f.chunk.js +1 -0
- package/dist/scripts/{4591-c798b9d80a.chunk.js → 4591-9e342f97bc.chunk.js} +1 -1
- package/dist/scripts/{4860-f770422186.chunk.js → 4860-955b4bf901.chunk.js} +1 -1
- package/dist/scripts/{5046-432362ee4e.chunk.js → 5046-19d7090284.chunk.js} +1 -1
- package/dist/scripts/{514-20644e0a4e.chunk.js → 514-927a43219d.chunk.js} +1 -1
- package/dist/scripts/{5286-f967ae444b.chunk.js → 5286-293188ce69.chunk.js} +1 -1
- package/dist/scripts/{5412-e675c4ef4e.chunk.js → 5412-95152820bb.chunk.js} +1 -1
- package/dist/scripts/{5418-dce1baab7a.chunk.js → 5418-f31f79952c.chunk.js} +1 -1
- package/dist/scripts/{5424-50632a5025.chunk.js → 5424-f53a7d8068.chunk.js} +1 -1
- package/dist/scripts/{5707-bc3c7af0c0.chunk.js → 5707-41f283fd98.chunk.js} +1 -1
- package/dist/scripts/{5747-d8ee53162d.chunk.js → 5747-0ab2cc3678.chunk.js} +1 -1
- package/dist/scripts/5891-fd54bbba6a.chunk.js +1 -0
- package/dist/scripts/6081-b551510fc5.chunk.js +1 -0
- package/dist/scripts/{6093-7fe8c7fcce.chunk.js → 6093-7e5c1af050.chunk.js} +1 -1
- package/dist/scripts/61-56d9da10bd.chunk.js +2 -0
- package/dist/scripts/{6352-bbe31ba815.chunk.js → 6352-aaaf02499b.chunk.js} +1 -1
- package/dist/scripts/{6732-35dcc7a725.chunk.js → 6732-5bf9ec4e56.chunk.js} +1 -1
- package/dist/scripts/{6774-5af5e4b0b8.chunk.js → 6774-3cad51b5b7.chunk.js} +1 -1
- package/dist/scripts/6963-b0c3a2aab0.chunk.js +1 -0
- package/dist/scripts/{7002-8564980898.chunk.js → 7002-3686f9dcfb.chunk.js} +1 -1
- package/dist/scripts/{7053-79f4e3e275.chunk.js → 7053-38535c04ca.chunk.js} +1 -1
- package/dist/scripts/{7071-a0cb4a599c.chunk.js → 7071-5a543a7eec.chunk.js} +1 -1
- package/dist/scripts/708-c23337f233.chunk.js +1 -0
- package/dist/scripts/{7295-aa334844a4.chunk.js → 7295-594d2f2def.chunk.js} +1 -1
- package/dist/scripts/{7376-34e0848b6f.chunk.js → 7376-baac126511.chunk.js} +1 -1
- package/dist/scripts/{7408-64e0468c04.chunk.js → 7408-d742ffa35e.chunk.js} +1 -1
- package/dist/scripts/7942-f89817af29.chunk.js +1 -0
- package/dist/scripts/{8213-0a91276442.chunk.js → 8213-ef3077d565.chunk.js} +1 -1
- package/dist/scripts/{8362-9fa19d6e1e.chunk.js → 8362-e82bef3e07.chunk.js} +1 -1
- package/dist/scripts/8614-eaacae0502.chunk.js +2 -0
- package/dist/scripts/{8726-b262387b6e.chunk.js → 8726-edded1064e.chunk.js} +1 -1
- package/dist/scripts/{8727-2a68455289.chunk.js → 8727-2e314f9301.chunk.js} +1 -1
- package/dist/scripts/{8762-63efbfcfa7.chunk.js → 8762-4ee15995c8.chunk.js} +1 -1
- package/dist/scripts/{8906-5592870e17.chunk.js → 8906-3bde92a78d.chunk.js} +1 -1
- package/dist/scripts/{9357-2b5993c1b5.chunk.js → 9357-c5c5984ec8.chunk.js} +1 -1
- package/dist/scripts/{9383-7d95ed4d9b.chunk.js → 9383-b01e8ae3c8.chunk.js} +1 -1
- package/dist/scripts/9523-2ecd0578c4.chunk.js +1 -0
- package/dist/scripts/9677-e8e9037adf.chunk.js +2 -0
- package/dist/scripts/{9695-694c2d9147.chunk.js → 9695-a04e508364.chunk.js} +1 -1
- package/dist/scripts/{9927-8b7265b00a.chunk.js → 9927-a667775ac4.chunk.js} +1 -1
- package/dist/scripts/bundle-baa7524fc9.min.js +2 -0
- package/package.json +72 -72
- package/typings/libs/CVEvents.d.ts +12 -12
- package/typings/libs/CVLanguages.d.ts +24 -24
- package/typings/libs/Environment.d.ts +10 -10
- package/typings/libs/LazyLoad.d.ts +29 -29
- package/typings/libs/LazyLoad.ts +27 -27
- package/typings/libs/backbone.validation.d.ts +99 -99
- package/typings/libs/cloneDeep.d.ts +4 -4
- package/typings/libs/cookiesjs.d.ts +24 -24
- package/typings/libs/draft-convert.d.ts +3 -3
- package/typings/libs/google-api.d.ts +4 -4
- package/typings/libs/microsoft-teams.d.ts +2 -2
- package/typings/libs/trackjs.d.ts +2 -2
- package/typings/libs/videojs-contrib-quality-levels.d.ts +30 -30
- package/typings/utils/imports.d.ts +9 -9
- package/dist/css/101-library-editor-5af6f4e937.chunk.css +0 -2
- package/dist/css/2696-library-editor-4a7e07523b.chunk.css +0 -77
- package/dist/css/3746-library-editor-d4c68a200b.chunk.css +0 -1
- package/dist/css/3778-library-editor-e7f11db43a.chunk.css +0 -12
- package/dist/css/456-library-editor-e9cac790d6.chunk.css +0 -17
- package/dist/css/5524-library-editor-36f0a42508.chunk.css +0 -11
- package/dist/css/5891-library-editor-d4c68a200b.chunk.css +0 -1
- package/dist/css/61-library-editor-dab660c60e.chunk.css +0 -47
- package/dist/css/6963-library-editor-d4c68a200b.chunk.css +0 -1
- package/dist/css/8614-library-editor-5368f03ffe.chunk.css +0 -16
- package/dist/css/library-editor-app-899160fa5a.css +0 -62
- package/dist/css/library-editor-app-fbeb5c3df6.css +0 -62
- package/dist/scripts/101-c0d2df70fc.chunk.js +0 -1
- package/dist/scripts/101-dd5f891259.chunk.js +0 -1
- package/dist/scripts/2696-c93bc6ba82.chunk.js +0 -2
- package/dist/scripts/3087-31652fd164.chunk.js +0 -1
- package/dist/scripts/3746-092214a0a0.chunk.js +0 -1
- package/dist/scripts/3746-fab7340300.chunk.js +0 -1
- package/dist/scripts/3778-34a6c70ced.chunk.js +0 -1
- package/dist/scripts/3778-60cf0a97d4.chunk.js +0 -1
- package/dist/scripts/4523-6d51af0964.chunk.js +0 -1
- package/dist/scripts/456-a1c2432237.chunk.js +0 -1
- package/dist/scripts/456-b245f4891e.chunk.js +0 -1
- package/dist/scripts/5185-48169130b8.chunk.js +0 -2
- package/dist/scripts/5524-165e9fe50f.chunk.js +0 -1
- package/dist/scripts/5524-3ecfd1675f.chunk.js +0 -1
- package/dist/scripts/5850-5f1fb603a9.chunk.js +0 -1
- package/dist/scripts/5850-cc71016a8b.chunk.js +0 -1
- package/dist/scripts/5891-b72da0591f.chunk.js +0 -1
- package/dist/scripts/5891-f7bd1916f7.chunk.js +0 -1
- package/dist/scripts/61-1aa3a1edbc.chunk.js +0 -2
- package/dist/scripts/61-ad1f6f5f42.chunk.js +0 -2
- package/dist/scripts/6427-cbace62568.chunk.js +0 -1
- package/dist/scripts/6721-40652e0514.chunk.js +0 -1
- package/dist/scripts/6721-b31c7b97e8.chunk.js +0 -1
- package/dist/scripts/6963-386c2153af.chunk.js +0 -1
- package/dist/scripts/6963-688cb60ece.chunk.js +0 -1
- package/dist/scripts/708-0c400838a2.chunk.js +0 -1
- package/dist/scripts/8542-727d658bd8.chunk.js +0 -1
- package/dist/scripts/8614-d2aae15910.chunk.js +0 -2
- package/dist/scripts/8614-d2aae15910.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/8614-e48ce79761.chunk.js +0 -2
- package/dist/scripts/8614-e48ce79761.chunk.js.LICENSE.txt +0 -1
- package/dist/scripts/bundle-59de85bc08.min.js +0 -2
- package/dist/scripts/bundle-59de85bc08.min.js.LICENSE.txt +0 -1
- package/dist/scripts/bundle-6c5a619a82.min.js +0 -2
- package/dist/scripts/bundle-6c5a619a82.min.js.LICENSE.txt +0 -1
- /package/dist/css/{5524-library-editor-de77327cdc.chunk.css → 4365-library-editor-de77327cdc.chunk.css} +0 -0
- /package/dist/css/{3746-library-editor-46e4b6af59.chunk.css → 7942-library-editor-46e4b6af59.chunk.css} +0 -0
- /package/dist/scripts/{1601-879d0665e7.chunk.js.LICENSE.txt → 1601-cfa68d5d16.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2696-c93bc6ba82.chunk.js.LICENSE.txt → 61-56d9da10bd.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5185-48169130b8.chunk.js.LICENSE.txt → 8614-eaacae0502.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{61-1aa3a1edbc.chunk.js.LICENSE.txt → 9677-e8e9037adf.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{61-ad1f6f5f42.chunk.js.LICENSE.txt → bundle-baa7524fc9.min.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[101],{63038:function(e,t,r){"use strict";r.d(t,{n:function(){return O},W:function(){return S}});var n=r(1024),a=r(99910),o=r(92802),i=r(53808),l=r(85887),c=r(49642),s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r};function u(e){var t=e.label,r=e.checkboxLabelClassName,o=e.checkboxLabelFontWeight,i=e.className,l=s(e,["label","checkboxLabelClassName","checkboxLabelFontWeight","className"]);return n.createElement(a.Form.Group,{className:"form-group"},n.createElement("div",{className:"form-check ".concat(i||"")},n.createElement(O,Object.assign({className:"form-check-input"},l)),n.createElement(a.Form.Label,{className:"form-check-label cursor-pointer ".concat("normal"===o?"fw-normal":""," \n ").concat(r),htmlFor:l.id},t),e.checkboxAppLink&&e.checkboxAppLinkText&&n.createElement(n.Fragment,null,n.createElement("span",null," "),n.createElement(c.F,{appLink:e.checkboxAppLink,className:"info-link"},e.checkboxAppLinkText))))}var m=r(39396),f=r(66703),d={getCustomFormControlClassName:function(e,t,r,n,a,i){var l="";return l=function(e,t){var r="";return r="select"===e?"form-select":"form-control","sm"===t&&(r+=" ".concat(r,"-sm")),"lg"===t&&(r+=" ".concat(r,"-lg")),r}(i,n),(0,o.u9)(t,r)&&(0,o.u9)(e,r)&&(l+=" is-invalid"),a&&(l+=" ".concat(a)),l}},p=r(63791);function b(e){var t=(0,o.u6)().values[e.fieldName];return"string"!=typeof t?n.createElement(n.Fragment,null):n.createElement("div",{className:"float-end text-secondary fw-normal"},t.length,"/",e.limit," characters")}var y={revealPassword:"jCfI0",passwordInput:"RBJnf",passwordContainer:"d78lK",passwordContainerDisabled:"asbVo",infoTooltip:"wzyOG",spinner:"CycFx"};function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var h=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r},g="shared.formField";function O(e){var t,r,c=e.children,s=e.showLoadingSpinner,u=h(e,["children","showLoadingSpinner"]),f=(t=n.useState(e.type),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(t,r)||function(e,t){if(e){if("string"==typeof e)return v(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?v(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=f[0],b=f[1],g=i.q.isFunction(c)?function(e){return c(e)}:n.Children.count(c)?c:null;if("password"!==u.type)return s?n.createElement("div",{className:"position-relative"},n.createElement(o.gN,Object.assign({},l.t.omit(u,["formSize"])),g),n.createElement("div",{className:y.spinner},n.createElement(a.Spinner,{animation:"border",size:"sm"}))):n.createElement(o.gN,Object.assign({},l.t.omit(u,["formSize"])),g);var O="position-relative ".concat(y.passwordContainer);return u.className&&(O+=" ".concat(u.className)),u.disabled&&(O+=" ".concat(y.passwordContainerDisabled)),n.createElement("div",{className:O},n.createElement(o.gN,Object.assign({},l.t.omit(u,["formSize","type","className"]),{type:d,className:"".concat(y.passwordInput," border-0 w-100 h-100 outline-none rounded")}),g),"password"===u.type&&n.createElement(m.x,{svgName:"password"===d?p.vn.VisibleOn:p.vn.VisibleOff,className:"svg-container cursor-pointer ".concat(y.revealPassword),onClick:function(){b("password"===d?"text":"password")}}))}function S(e){var t=e.label,r=e.className,i=e.showCharacterCounter,c=e.showRequiredStar,s=e.infoTooltip,v=e.infoTooltipPlacement,S=e.infoText,w=e.formSize,E=e.showOptionalLabel,j=h(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoTooltipPlacement","infoText","formSize","showOptionalLabel"]),x=(0,o.u6)(),N=x.errors,C=x.touched,P=function(){};if("checkbox"===j.type){var A=l.t.omit(e,["formSize","infoTooltipPlacement"]);return e.disabled&&(A.onChange=P),n.createElement(u,Object.assign({},A))}var k=Object.assign(Object.assign({},j),{className:d.getCustomFormControlClassName(N,C,j.name,w,r,"string"==typeof e.as?e.as:null)});return e.disabled&&(k.onChange=P),n.createElement(a.Form.Group,{className:"form-group"},!!t&&n.createElement(a.Form.Label,{htmlFor:j.id,className:"d-flex align-items-center"},t,c&&n.createElement("span",{className:"text-danger"},"*"),s&&n.createElement(m.x,{className:"svg-container text-secondary ".concat(y.infoTooltip),svgName:p.vn.Info,title:s,tooltipPlacement:v,tooltipSpanHack:!0}),E&&n.createElement("span",{className:"text-secondary"}," ",n.createElement(f.x,{namespace:g,phrase:"optional"})),!!i&&!!j.maxLength&&n.createElement("div",{className:"ms-auto"},n.createElement(b,{fieldName:j.name,limit:j.maxLength}))),n.createElement(O,Object.assign({},k)),!!S&&n.createElement(a.Form.Text,{className:"text-secondary"},S),n.createElement(o.Bc,{name:j.name},(function(e){return n.createElement(a.Form.Control.Feedback,{type:"invalid"},e)})))}O.defaultProps={autoComplete:"off"},S.defaultProps={autoComplete:"off",infoTooltipPlacement:"top"}},86347:function(e,t,r){"use strict";r.d(t,{b:function(){return u},n:function(){return s}});var n=r(1024),a=r(92802),o=r(53808),i=r(85887);function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var c=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r};function s(e){var t=e.castInitialValues,r=e.castValuesOnSubmit,s=e.initialValues,u=e.onSubmit,m=c(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),f=t&&e.validationSchema?e.validationSchema.cast(function(e){if(!e)return{};var t=i.t.deepClone(e);return function e(r){Object.keys(t).forEach((function(n){t.hasOwnProperty(n)&&(i.t.isObject(r[n])?e(r[n]):null===t[n]&&delete t[n])}))}(t),t}(s)):s,d={allowInitialSubmit:e.allowInitialSubmit};return n.createElement(a.J9,Object.assign({enableReinitialize:!0},m,{initialValues:f,onSubmit:function(t,n){var a=n.setSubmitting,o=n.resetForm,i=n.setFieldError,c=r&&e.validationSchema?e.validationSchema.cast(t):t;u(c,(function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(r.reset&&o(),r.errors)for(var n=0,c=Object.entries(r.errors);n<c.length;n++){var s=(e=c[n],t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],m=s[1];i(u,m)}a(!1)}))},initialStatus:d}),o.q.isFunction(e.children)?function(t){return e.children(t)}:n.Children.count(e.children)?e.children:null)}function u(){return(0,a.u6)()}s.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},90335:function(e,t,r){"use strict";var n;r.d(t,{D:function(){return n}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series"}(n||(n={}))},50072:function(e,t,r){"use strict";var n;r.d(t,{l:function(){return n}}),function(e){e.Pending="Pending",e.Approved="Approved",e.Rejected="Rejected",e.Closed="Closed",e.AutoApproved="AutoApproved"}(n||(n={}))},85739:function(e,t,r){"use strict";r.d(t,{p:function(){return c}});var n=r(1024),a=r.n(n),o=r(86120),i=r(94223),l=r(25796);function c(e,t){var r=o.a.useGetFetch(),n=function(r){return l.y.libraryRequests(e,t,r)},c=function(e){return r(n(e))},s=(0,i.P)(n&&function(e){return n(e).key});return a().useEffect((function(){s&&s.shouldInitialFetch&&c()}),[e,t]),Object.assign(Object.assign({},s),{fetchNext:c})}},41228:function(e,t,r){"use strict";r.r(t),r.d(t,{RejectLibraryRequestView:function(){return A}});var n=r(1024),a=r.n(n),o=r(92802),i=r(5173),l=r(57857),c=r(31647),s=r(86120),u=r(52076),m=r(70065),f=r(63038),d=r(86347),p=r(71575),b=r(83996),y=r(66703),v=r(90335),h=r(2491),g=r(22430),O=r(50997),S=r(50072),w=r(25796),E=r(85739);function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var x="libraryRequests.reject",N=l.T.encloseNamespace(x),C=(0,i.Ry)().shape({message:(0,i.Z_)().required((function(){return N("required")})).max(500,(function(){return N("max")}))});function P(e){var t=(0,d.b)();return a().createElement(o.l0,null,a().createElement("p",null,a().createElement(y.x,{namespace:x,phrase:"message",options:{videoName:e.libraryRequest.object.name}})),a().createElement(f.W,{label:N("label"),as:"textarea",name:"message",id:"message",value:t.values.message,placeholder:N("placeholder")}),a().createElement(b.u,null,a().createElement(b.u.Cancel,{onClick:e.closePopup}),a().createElement(b.u.Submit,{text:N("reject"),variant:"danger",showSpinner:e.showSpinner})))}function A(e){var t,r,n,o=s.a.useGetFetch(),i=(0,h.Z)(),l=(r=a().useState(!1),n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o,i,l=[],c=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(e){s=!0,a=e}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(r,n)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=l[0],b=l[1],y=(0,E.p)(e.queryParams.sort||v.D.Newest,[S.l.Pending]),x=s.a.useBasicFetch(w.y.libraryRequest(e.libraryRequestId));function A(){!function(){var e,t,r,n,a={location:m.LZ.Popup,actionType:m.Vw.Reject,entity:m.py.LibraryRequest,workflowPhase:m.eu.Complete},o={id:x.data.id,videoId:null===(e=x.data.object)||void 0===e?void 0:e.id,requestingUserId:null===(t=x.data.sender)||void 0===t?void 0:t.id,sourceLibraryId:null===(r=x.data.sourceLibrary)||void 0===r?void 0:r.id,sourceFolderId:null===(n=x.data.sourceCategory)||void 0===n?void 0:n.id};u.k.logUserAction(o,a)}(),i.success(N("success"));var t=y.items.findIndex((function(t){return t.id.toString()===e.libraryRequestId.toString()})),r=y.items[t+1];c.Q.C$.trigger({application:O.OV.LIBRARY_REQUESTS,action:O.eX.LibraryRequests.PENDING_REQUESTS,args:[(null==r?void 0:r.id)||""],params:e.queryParams},{replace:!0})}var k=((null===(t=y.items)||void 0===t?void 0:t.length)||y.hasCompleted)&&!!x.data;return a().createElement(p.G,{title:N("title"),closePopup:e.closePopup,showLoadingSpinner:!k},k&&a().createElement(d.n,{initialValues:{message:""},validationSchema:C,onSubmit:function(t){b(!0);var r={response:S.l.Rejected,message:t.message};o(w.y.fulfilRequest(e.libraryRequestId,r,A,(function(e){return i.error(g.M.libraryApiError(e))}),e.closePopup))}},a().createElement(P,{libraryRequest:x.data,closePopup:e.closePopup,showSpinner:f})))}},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(this,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1010],{51010:function(e,t,n){"use strict";n.r(t),n.d(t,{DisableReviewView:function(){return P}});var r=n(21679),o=n(57857),i=n(31647),a=n(52076),u=n(70065),l=n(10101),c=n(88172),s=n(57098),f=n(67670),p=n(19226),y=n(93569),b=n(17654),v=n.n(b);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function g(e,t,n){return t=O(t),function(e,t){if(t&&("object"==h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,w()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(w=function(){return!!e})()}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}var P=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),g(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(t,e),n=t,(b=[{key:"initialize",value:function(){this.bindListeners(),this.contentUpdatesDataService=r.u.getInstance(s.Or.ContentUpdates,this)}},{key:"name",get:function(){return"DisableReviewView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"template",get:function(){return v()}},{key:"lang",get:function(){return"contentUpdates.disableReview"}},{key:"channelName",get:function(){return y.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:o.T.getPhrase(this.lang,"heading"),behaviorClass:l.Yw,spinnerButtonOptions:{model:this.spinnerModel=new f.v,channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"offBtn"),onClick:function(){return e.onClickDisable()}}}]}},{key:"bindListeners",value:function(){this.listenTo(s.Vk.VIDEO,"".concat(s.M_.VIDEOS_TO_REVIEW,":sync"),this.render)}},{key:"videosToReview",value:function(){return!!this.videoCollection&&!!this.videoCollection.length}},{key:"onClickDisable",value:function(){this.videosToReview()?this.approveAllThenDisableReview():this.disableReview(),this.triggerMethod("hide")}},{key:"approveAllThenDisableReview",value:function(){var e=this;this.contentUpdatesDataService.approveAllVideos((function(){return e.disableReview()}))}},{key:"disableReview",value:function(){this.contentUpdatesDataService.disableLibraryReview(this.redirectToPastReleases),this.logAction()}},{key:"redirectToPastReleases",value:function(){i.Q.C$.trigger({application:s.OV.CONTENT_UPDATES,action:s.eX.ContentUpdates.PAST_RELEASES})}},{key:"logAction",value:function(){var e={location:u.LZ.Popup,actionType:u.Vw.Disable,entity:u.py.CustomerSetting,descriptor:u.YK.LibraryReview,workflowPhase:u.eu.Complete},t={approvedCount:this.videoCollection.length};a.k.logUserAction(t,e)}},{key:"requiredResources",get:function(){return{currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){this.videoCollection=this.contentUpdatesDataService.getVideosToReview(),this.videoCollection&&this.spinnerModel.set(c.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){return{videosToReview:this.videosToReview(),dataFetched:!!this.videoCollection,spinnerEl:y.Kp.getSpinner({size:y.Ey.Large,extraClasses:"mx-auto"})}}}])&&d(n.prototype,b),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,b}(i.Q.G7)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return y}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(e,t,n){return t=f(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return a(a({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},17654:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1010],{51010:function(e,t,n){"use strict";n.r(t),n.d(t,{DisableReviewView:function(){return P}});var r=n(21679),o=n(57857),i=n(31647),a=n(52076),u=n(70065),l=n(10101),c=n(88172),s=n(57098),f=n(67670),p=n(19226),y=n(93569),b=n(17654),v=n.n(b);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function g(e,t,n){return t=O(t),function(e,t){if(t&&("object"==h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,w()?Reflect.construct(t,n||[],O(e).constructor):t.apply(e,n))}function w(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(w=function(){return!!e})()}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}var P=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),g(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(t,e),n=t,(b=[{key:"initialize",value:function(){this.bindListeners(),this.contentUpdatesDataService=r.u.getInstance(s.Or.ContentUpdates,this)}},{key:"name",get:function(){return"DisableReviewView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"template",get:function(){return v()}},{key:"lang",get:function(){return"contentUpdates.disableReview"}},{key:"channelName",get:function(){return y.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:o.T.getPhrase(this.lang,"heading"),behaviorClass:l.Yw,spinnerButtonOptions:{model:this.spinnerModel=new f.v,channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"offBtn"),onClick:function(){return e.onClickDisable()}}}]}},{key:"bindListeners",value:function(){this.listenTo(s.Vk.VIDEO,"".concat(s.M_.VIDEOS_TO_REVIEW,":sync"),this.render)}},{key:"videosToReview",value:function(){return!!this.videoCollection&&!!this.videoCollection.length}},{key:"onClickDisable",value:function(){this.videosToReview()?this.approveAllThenDisableReview():this.disableReview(),this.triggerMethod("hide")}},{key:"approveAllThenDisableReview",value:function(){var e=this;this.contentUpdatesDataService.approveAllVideos((function(){return e.disableReview()}))}},{key:"disableReview",value:function(){this.contentUpdatesDataService.disableLibraryReview(this.redirectToPastReleases),this.logAction()}},{key:"redirectToPastReleases",value:function(){i.Q.C$.trigger({application:s.OV.CONTENT_UPDATES,action:s.eX.ContentUpdates.PAST_RELEASES})}},{key:"logAction",value:function(){var e={location:u.LZ.Popup,actionType:u.Vw.Disable,entity:u.py.CustomerSetting,descriptor:u.YK.LibraryReview,workflowPhase:u.eu.Complete},t={approvedCount:this.videoCollection.length};a.k.logUserAction(t,e)}},{key:"requiredResources",get:function(){return{currentUser:p.K.currentUser}}},{key:"onBeforeRender",value:function(){this.videoCollection=this.contentUpdatesDataService.getVideosToReview(),this.videoCollection&&this.spinnerModel.set(c.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){return{videosToReview:this.videosToReview(),dataFetched:!!this.videoCollection,spinnerEl:y.Kp.getSpinner({size:y.Ey.Large,extraClasses:"mx-auto"})}}}])&&d(n.prototype,b),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,b}(i.Q.G7)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return y}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(e,t,n){return t=f(t),function(e,t){if(t&&("object"==i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return a(a({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&u(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},17654:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing,l=e.escapeExpression;return'<p class="m-0 pb-2">'+l((n.lang||t&&t.lang||u).call(a,"noReview",{name:"lang",hash:{},data:o}))+"</p>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.videosToReview:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+'<p class="m-0">'+l((n.lang||t&&t.lang||u).call(a,"undoInstructions",{name:"lang",hash:{},data:o}))+"</p>\n"},4:function(e,t,n,r,o){return e.propertyIsEnumerable,'<p class="m-0 pb-2">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"automaticApproval",{name:"lang",hash:{},data:o}))+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1086],{36537:function(e,t,n){"use strict";n.r(t),n.d(t,{MoveFolderView:function(){return E}});var r=n(48088),i=n(39479),o=n(21679),l=n(57857),a=n(99249),s=n(31647),u=n(52076),c=n(10101),d=n(60103),f=n(88172),h=n(57098),p=n(67670),y=n(60602),v=n(93569),b=n(77739),g=n(88441),m=n.n(g);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}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,k(r.key),r)}}function k(e){var t=function(e,t){if("object"!=w(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==w(t)?t:t+""}function S(e,t,n){return t=M(t),function(e,t){if(t&&("object"==w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,O()?Reflect.construct(t,n||[],M(e).constructor):t.apply(e,n))}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(O=function(){return!!e})()}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var E=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),S(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(t,e),n=t,g=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=o.u.getInstance(h.Or.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(h.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(h.Vk.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render)}},{key:"name",get:function(){return"MoveFolderView"}},{key:"title",get:function(){return l.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.moveFolder"}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return v.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:l.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new p.v,channelName:this.channelName,buttonText:l.T.getPhrase(this.lang,"move"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(r.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId,r={id:this.options.folderId,isSubfolder:n.toString()!==this.library.get("id").toString(),oldParentId:t,newParentId:n};u.k.logUserAction(r,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this,t=this.getParentIds(),n=t.oldParentId,r=t.newParentId;n!==r?this.libraryDataService.moveFolder(this.viewModel.get("id"),r,n,(function(){s.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.FOLDER,args:[e.viewModel.get("id")]}),e.triggerMethod("hide")})):s.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.FOLDER,args:[this.viewModel.get("id")]})}},{key:"getParentIds",value:function(){return{oldParentId:v.PU.getParent(this.options.folderId,this.collection).get("id"),newParentId:this.viewModel.get("parentId")}}},{key:"setUpCollection",value:function(e){this.collection||(this.library=v.PU.getLibrary(this.options.folderId,e),this.collection=new d.I([this.library]))}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=a.r.get(e,this.model.toJSON(),{ctor:y.g});var t=v.PU.getParent(this.options.folderId,this.collection);this.viewModel.set("parentId",t?t.get("id"):null),this.listenTo(this.viewModel,"change:parentId",this.onParentChange)}}},{key:"onParentChange",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId;this.spinnerModel.set(f.ZV.Disabled,t===n)}},{key:"getDisabledParentFolderIds",value:function(){var e=[this.model.get("id").toString()];return this.viewModel.get("parentId")&&e.push(this.viewModel.get("parentId").toString()),this.model.children?[].concat(e,function(e){return function(e){if(Array.isArray(e))return I(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return I(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(v.PU.flatten(this.model.children).map((function(e){return e.id.toString()})))):e}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new b.r({model:this.viewModel,collection:this.collection,library:this.library,channelName:this.channelName,editName:!1,editParent:!0,disabledParentFolderIds:this.getDisabledParentFolderIds()});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(i.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,i.bind(this.setUpModel,this))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:v.Kp.getSpinner({size:v.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}],g&&P(n.prototype,g),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,g}(s.Q.G7)},88441:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1086],{36537:function(e,t,n){"use strict";n.r(t),n.d(t,{MoveFolderView:function(){return E}});var r=n(48088),i=n(39479),o=n(21679),l=n(57857),a=n(99249),s=n(31647),u=n(52076),c=n(10101),d=n(60103),f=n(88172),h=n(57098),p=n(67670),y=n(60602),v=n(93569),b=n(77739),g=n(88441),m=n.n(g);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}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,k(r.key),r)}}function k(e){var t=function(e,t){if("object"!=w(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==w(t)?t:t+""}function S(e,t,n){return t=M(t),function(e,t){if(t&&("object"==w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,O()?Reflect.construct(t,n||[],M(e).constructor):t.apply(e,n))}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(O=function(){return!!e})()}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var E=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),S(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(t,e),n=t,g=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=o.u.getInstance(h.Or.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(h.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(h.Vk.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render)}},{key:"name",get:function(){return"MoveFolderView"}},{key:"title",get:function(){return l.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.moveFolder"}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return v.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:l.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new p.v,channelName:this.channelName,buttonText:l.T.getPhrase(this.lang,"move"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(r.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId,r={id:this.options.folderId,isSubfolder:n.toString()!==this.library.get("id").toString(),oldParentId:t,newParentId:n};u.k.logUserAction(r,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this,t=this.getParentIds(),n=t.oldParentId,r=t.newParentId;n!==r?this.libraryDataService.moveFolder(this.viewModel.get("id"),r,n,(function(){s.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.FOLDER,args:[e.viewModel.get("id")]}),e.triggerMethod("hide")})):s.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.FOLDER,args:[this.viewModel.get("id")]})}},{key:"getParentIds",value:function(){return{oldParentId:v.PU.getParent(this.options.folderId,this.collection).get("id"),newParentId:this.viewModel.get("parentId")}}},{key:"setUpCollection",value:function(e){this.collection||(this.library=v.PU.getLibrary(this.options.folderId,e),this.collection=new d.I([this.library]))}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=a.r.get(e,this.model.toJSON(),{ctor:y.g});var t=v.PU.getParent(this.options.folderId,this.collection);this.viewModel.set("parentId",t?t.get("id"):null),this.listenTo(this.viewModel,"change:parentId",this.onParentChange)}}},{key:"onParentChange",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId;this.spinnerModel.set(f.ZV.Disabled,t===n)}},{key:"getDisabledParentFolderIds",value:function(){var e=[this.model.get("id").toString()];return this.viewModel.get("parentId")&&e.push(this.viewModel.get("parentId").toString()),this.model.children?[].concat(e,function(e){return function(e){if(Array.isArray(e))return I(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return I(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(v.PU.flatten(this.model.children).map((function(e){return e.id.toString()})))):e}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new b.r({model:this.viewModel,collection:this.collection,library:this.library,channelName:this.channelName,editName:!1,editParent:!0,disabledParentFolderIds:this.getDisabledParentFolderIds()});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(i.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,i.bind(this.setUpModel,this))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:v.Kp.getSpinner({size:v.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}],g&&P(n.prototype,g),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,g}(s.Q.G7)},88441:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},3:function(e,t,n,r,i){return'<div class="folder-details-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[112],{9934:function(e,t,n){"use strict";n.r(t),n.d(t,{InteractiveDetailsView:function(){return ee}});var r=n(39479),i=n.n(r),o=n(99748),a=n(21679),c=n(31647),s=n(50997),l=n(57085),u=n(50002),f=n(30831),d=n(23130),p=n(4785),h=n.n(p);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function 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,b(r.key),r)}}function b(e){var t=function(e,t){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}function m(e,t,n){return t=w(t),function(e,t){if(t&&("object"==v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,g()?Reflect.construct(t,n||[],w(e).constructor):t.apply(e,n))}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(g=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}var k=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),m(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"InteractiveBasicInfoComponent"}},{key:"className",get:function(){return"py-3 pe-2"}},{key:"template",get:function(){return h()}},{key:"lang",get:function(){return"shared.interactiveBasicInfo"}},{key:"defaults",get:function(){return{truncateDescription:!0}}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0},interactives:{el:".interactives-region",replaceElement:!0},mediaTypeBadge:{el:".media-type-badge-region",replaceElement:!0}}}},{key:"renderDescription",value:function(){if(this.model&&this.model.get("description")){var e=new d.Z({model:this.model,linkify:!0,size:d.t.Large,truncate:this.options.truncateDescription,allowExpand:!0});this.showChildView("description",e)}}},{key:"renderInteractives",value:function(){if(this.model._timepoints.length){var e=new u.F({model:this.model});this.showChildView("interactives",e)}}},{key:"renderMediaTypeBadge",value:function(){var e=new f.Z({model:this.model});this.showChildView("mediaTypeBadge",e)}},{key:"onRender",value:function(){this.renderDescription(),this.renderInteractives(),this.renderMediaTypeBadge()}}])&&y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),O=n(57098),C=n(21251),I=n(33800),S=n(29457),T=n(48404),_=n(64649),j=n(19226),V=n(53609),P=(n(73176),n(79238),n(69051),n(17017),n(67743),n(67430),n(2496),n(60371),n(38890),n(42511),n(7427)),L=(n(91850),n(37570),n(37071),n(13809),n(39216)),D=n.n(L);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},R(e)}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,x(r.key),r)}}function x(e){var t=function(e,t){if("object"!=R(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==R(t)?t:t+""}function A(e,t,n){return t=F(t),function(e,t){if(t&&("object"==R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,M()?Reflect.construct(t,n||[],F(e).constructor):t.apply(e,n))}function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(M=function(){return!!e})()}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}function H(e,t){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},H(e,t)}var N=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),A(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"InteractiveSidebarInfoComponent"}},{key:"lang",get:function(){return"libraryEditor.interactiveSidebarInfo"}},{key:"className",get:function(){return"py-3 h-100"}},{key:"template",get:function(){return D()}},{key:"regions",value:function(){return{interactiveThumbnail:{el:".interactive-thumbnail-region",replaceElement:!0},folders:{el:".folders-region",replaceElement:!0}}}},{key:"renderInteractiveThumbnail",value:function(){this.showChildView("interactiveThumbnail",new V.b({model:this.model,config:this.options.config}))}},{key:"renderFolders",value:function(){this.model.get("categories")&&this.model.get("categories").length&&this.showChildView("folders",new P.V({model:this.model,libraries:this.options.libraries,showFolder:!0,hideLabel:!0}))}},{key:"viewOptions",value:function(){return{folders:this.model.categories&&this.model.categories.length,multipleFolders:this.model.categories.length>1}}},{key:"onRender",value:function(){this.renderInteractiveThumbnail(),this.renderFolders()}}])&&B(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),U=n(24397),Q=n(56906),z=n(95061),G=n(34620),J=n.n(G);function Z(e){return Z="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},Z(e)}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,K(r.key),r)}}function K(e){var t=function(e,t){if("object"!=Z(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Z(t)?t:t+""}function Y(e,t,n){return t=W(t),function(e,t){if(t&&("object"==Z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$()?Reflect.construct(t,n||[],W(e).constructor):t.apply(e,n))}function $(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($=function(){return!!e})()}function W(e){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},W(e)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X(e,t)}var ee=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Y(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.bindListeners(),this.videoDataService=a.u.getInstance(I.O.Video,this),this.localCacheDataService=a.u.getInstance(I.O.LocalCache,this)}},{key:"bindListeners",value:function(){this.listenTo(O.Vk.VIDEO,"".concat(C.M.INTERACTIVES,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(O.Vk.VIDEO,"".concat(C.M.INTERACTIVES,":").concat(this.options.interactiveId,":error"),this.onError),this.listenTo(O.Vk.VIDEO,"".concat(C.M.RESTRICTED_OBJECTS,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(O.Vk.VIDEO,"cache:cleared",this.render),this.listenTo(O.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(O.Vk.RESTRICTED_VIDEO,"".concat(C.M.RESTRICTED_OBJECTS,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(O.Vk.LOCAL_CACHE,"".concat(C.M.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(O.Vk.LOCAL_CACHE,"".concat(C.M.LOCAL_CACHE_DEVICES,":error"),this.onError)}},{key:"onError",value:function(e){switch(e.type){case o.h.NotFound:c.Q.Ry.throw(new Q.l1);break;case o.h.Forbidden:c.Q.Ry.throw(new Q.aV)}}},{key:"name",get:function(){return"InteractiveDetailsView"}},{key:"title",get:function(){return this.interactive&&this.interactive.get("name")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return J()}},{key:"className",get:function(){return"container-fluid h-100 bg-white rounded"}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1,partialLoading:S.LP.Breadcrumbs},header:{replaceElement:!0,el:".interactive-header-region",partialLoading:S.LP.VideoHeader},main:{replaceElement:!0,el:".main-interactive-information-region",partialLoading:S.LP.VideoSidebarInfo},basic:{replaceElement:!1,el:".basic-interactive-information-region",partialLoading:S.LP.InteractiveBasicInfo},interactives:{el:".interactives-region",replaceElement:!0}}}},{key:"getCustomLibraryFolders",value:function(){var e;if(!(null===(e=this.interactive)||void 0===e?void 0:e.categories)||!this.libraries)return[];var t=this.libraries.reduce((function(e,t){return e[t.id]=!0,e}),{});return this.interactive.categories.filter((function(e){var n=e.libraries.first().get("id");return t[n]}))}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.interactive&&this.showChildView("breadcrumbs",new l.n({folder:this.folder,libraries:this.libraries,video:this.interactive,enableLastItemAppLink:!1}))}},{key:"renderVideoHeader",value:function(){this.showChildView("header",new U.U({model:this.interactive,customerHasLocalCache:s.o8.customerHasLocalCache(this.devices,this.currentUser.get("customerId")),collectionIdentifier:this.folder&&new s.F7(this.folder.id,s.x$.GetCurrentSortType()),config:this.config,products:this.products,libraries:this.libraries}))}},{key:"renderSidebarInfo",value:function(){this.showChildView("main",new N({model:this.interactive,libraries:this.libraries,config:this.config}))}},{key:"renderBasicInfo",value:function(){this.interactive&&this.showChildView("basic",new k({model:this.interactive}))}},{key:"requiredResources",get:function(){return{config:T.p.config,currentUser:j.K.currentUser,libraries:z.T.libraries,products:_.s.products}}},{key:"onBeforeRender",value:function(){return this.interactive=this.videoDataService.getInteractive(this.options.interactiveId),this.interactive&&(this.folder=i().first(this.getCustomLibraryFolders())),this.devices=this.localCacheDataService.getDevices(this.currentUser.get("customerId")),!!this.interactive}},{key:"viewOptions",value:function(){if(this.interactive)return{hasFolder:!!this.folder}}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderVideoHeader(),this.renderSidebarInfo(),this.renderBasicInfo()}}])&&q(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.G7)},13809:function(e,t,n){"use strict";n.d(t,{UC:function(){return r.U}});var r=n(58688);n(19969),n(14898)},39216:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,' <div class="mt-3">\r\n <h5>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"folders",{name:"lang",hash:{smartCount:null!=(o=null!=t?t.options:t)?o.folders:o},data:i}))+'</h5>\r\n <div class="folders-region"></div>\r\n </div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,'<div class="h-100 ps-2 pe-2">\r\n <div class="interactive-thumbnail-region"></div>\r\n\r\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.folders:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+"</div>"},useData:!0})},34620:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="row border-bottom">\r\n <div class="interactive-header-region"></div>\r\n\r\n <div class="px-3 pb-3">\r\n <div class="breadcrumbs-region"></div>\r\n </div>\r\n</div>\r\n\r\n<div class="row">\r\n <div class="col-4">\r\n <div class="main-interactive-information-region"></div>\r\n </div>\r\n <div class="col-8">\r\n <div class="basic-interactive-information-region"></div>\r\n\r\n <div class="interactives-region"></div>\r\n </div>\r\n</div>'},useData:!0})},4785:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,s=e.escapeExpression;return' <div class="col-3 fw-semibold">'+s((n.lang||t&&t.lang||c).call(a,"title",{name:"lang",hash:{},data:i}))+'</div>\r\n <p class="col-9">'+s("function"==typeof(o=null!=(o=n.name||(null!=t?t.name:t))?o:c)?o.call(a,{name:"name",hash:{},data:i}):o)+"</p>\r\n"},3:function(e,t,n,r,i){return e.propertyIsEnumerable,' <div class="col-3 fw-semibold">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"description",{name:"lang",hash:{},data:i}))+'</div>\r\n <div class="col-9">\r\n <div class="description-region"></div>\r\n </div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,s=e.escapeExpression;return'<div class="position-relative">\r\n <h5 class="d-inline-block">'+s((n.lang||t&&t.lang||c).call(a,"heading",{name:"lang",hash:{},data:i}))+'</h5>\r\n</div>\r\n<div class="row mb-0">\r\n'+(null!=(o=n.if.call(a,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+"\r\n"+(null!=(o=n.if.call(a,null!=t?t.description:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+'\r\n <div class="col-3 fw-semibold">'+s((n.lang||t&&t.lang||c).call(a,"type",{name:"lang",hash:{},data:i}))+'</div>\r\n <div class="col-9 mb-2">\r\n <div class="media-type-badge-region"></div>\r\n </div>\r\n\r\n <div class="interactives-region"></div>\r\n</div>'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[112],{9934:function(e,t,n){"use strict";n.r(t),n.d(t,{InteractiveDetailsView:function(){return ee}});var r=n(39479),i=n.n(r),o=n(99748),a=n(21679),c=n(31647),s=n(50997),l=n(57085),u=n(50002),f=n(30831),d=n(23130),p=n(4785),h=n.n(p);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function 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,b(r.key),r)}}function b(e){var t=function(e,t){if("object"!=v(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}function m(e,t,n){return t=w(t),function(e,t){if(t&&("object"==v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,g()?Reflect.construct(t,n||[],w(e).constructor):t.apply(e,n))}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(g=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}var k=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),m(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"InteractiveBasicInfoComponent"}},{key:"className",get:function(){return"py-3 pe-2"}},{key:"template",get:function(){return h()}},{key:"lang",get:function(){return"shared.interactiveBasicInfo"}},{key:"defaults",get:function(){return{truncateDescription:!0}}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0},interactives:{el:".interactives-region",replaceElement:!0},mediaTypeBadge:{el:".media-type-badge-region",replaceElement:!0}}}},{key:"renderDescription",value:function(){if(this.model&&this.model.get("description")){var e=new d.Z({model:this.model,linkify:!0,size:d.t.Large,truncate:this.options.truncateDescription,allowExpand:!0});this.showChildView("description",e)}}},{key:"renderInteractives",value:function(){if(this.model._timepoints.length){var e=new u.F({model:this.model});this.showChildView("interactives",e)}}},{key:"renderMediaTypeBadge",value:function(){var e=new f.Z({model:this.model});this.showChildView("mediaTypeBadge",e)}},{key:"onRender",value:function(){this.renderDescription(),this.renderInteractives(),this.renderMediaTypeBadge()}}])&&y(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),O=n(57098),C=n(21251),I=n(33800),S=n(29457),T=n(48404),_=n(64649),j=n(19226),V=n(53609),P=(n(73176),n(79238),n(69051),n(17017),n(67743),n(67430),n(2496),n(60371),n(38890),n(42511),n(7427)),L=(n(91850),n(37570),n(37071),n(13809),n(39216)),D=n.n(L);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},R(e)}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,x(r.key),r)}}function x(e){var t=function(e,t){if("object"!=R(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==R(t)?t:t+""}function A(e,t,n){return t=F(t),function(e,t){if(t&&("object"==R(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,M()?Reflect.construct(t,n||[],F(e).constructor):t.apply(e,n))}function M(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(M=function(){return!!e})()}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}function H(e,t){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},H(e,t)}var N=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),A(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"InteractiveSidebarInfoComponent"}},{key:"lang",get:function(){return"libraryEditor.interactiveSidebarInfo"}},{key:"className",get:function(){return"py-3 h-100"}},{key:"template",get:function(){return D()}},{key:"regions",value:function(){return{interactiveThumbnail:{el:".interactive-thumbnail-region",replaceElement:!0},folders:{el:".folders-region",replaceElement:!0}}}},{key:"renderInteractiveThumbnail",value:function(){this.showChildView("interactiveThumbnail",new V.b({model:this.model,config:this.options.config}))}},{key:"renderFolders",value:function(){this.model.get("categories")&&this.model.get("categories").length&&this.showChildView("folders",new P.V({model:this.model,libraries:this.options.libraries,showFolder:!0,hideLabel:!0}))}},{key:"viewOptions",value:function(){return{folders:this.model.categories&&this.model.categories.length,multipleFolders:this.model.categories.length>1}}},{key:"onRender",value:function(){this.renderInteractiveThumbnail(),this.renderFolders()}}])&&B(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.wA),U=n(24397),Q=n(56906),z=n(95061),G=n(34620),J=n.n(G);function Z(e){return Z="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},Z(e)}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,K(r.key),r)}}function K(e){var t=function(e,t){if("object"!=Z(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Z(t)?t:t+""}function Y(e,t,n){return t=W(t),function(e,t){if(t&&("object"==Z(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,$()?Reflect.construct(t,n||[],W(e).constructor):t.apply(e,n))}function $(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($=function(){return!!e})()}function W(e){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},W(e)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X(e,t)}var ee=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Y(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.bindListeners(),this.videoDataService=a.u.getInstance(I.O.Video,this),this.localCacheDataService=a.u.getInstance(I.O.LocalCache,this)}},{key:"bindListeners",value:function(){this.listenTo(O.Vk.VIDEO,"".concat(C.M.INTERACTIVES,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(O.Vk.VIDEO,"".concat(C.M.INTERACTIVES,":").concat(this.options.interactiveId,":error"),this.onError),this.listenTo(O.Vk.VIDEO,"".concat(C.M.RESTRICTED_OBJECTS,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(O.Vk.VIDEO,"cache:cleared",this.render),this.listenTo(O.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(O.Vk.RESTRICTED_VIDEO,"".concat(C.M.RESTRICTED_OBJECTS,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(O.Vk.LOCAL_CACHE,"".concat(C.M.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(O.Vk.LOCAL_CACHE,"".concat(C.M.LOCAL_CACHE_DEVICES,":error"),this.onError)}},{key:"onError",value:function(e){switch(e.type){case o.h.NotFound:c.Q.Ry.throw(new Q.l1);break;case o.h.Forbidden:c.Q.Ry.throw(new Q.aV)}}},{key:"name",get:function(){return"InteractiveDetailsView"}},{key:"title",get:function(){return this.interactive&&this.interactive.get("name")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return J()}},{key:"className",get:function(){return"container-fluid h-100 bg-white rounded"}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1,partialLoading:S.LP.Breadcrumbs},header:{replaceElement:!0,el:".interactive-header-region",partialLoading:S.LP.VideoHeader},main:{replaceElement:!0,el:".main-interactive-information-region",partialLoading:S.LP.VideoSidebarInfo},basic:{replaceElement:!1,el:".basic-interactive-information-region",partialLoading:S.LP.InteractiveBasicInfo},interactives:{el:".interactives-region",replaceElement:!0}}}},{key:"getCustomLibraryFolders",value:function(){var e;if(!(null===(e=this.interactive)||void 0===e?void 0:e.categories)||!this.libraries)return[];var t=this.libraries.reduce((function(e,t){return e[t.id]=!0,e}),{});return this.interactive.categories.filter((function(e){var n=e.libraries.first().get("id");return t[n]}))}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.interactive&&this.showChildView("breadcrumbs",new l.n({folder:this.folder,libraries:this.libraries,video:this.interactive,enableLastItemAppLink:!1}))}},{key:"renderVideoHeader",value:function(){this.showChildView("header",new U.U({model:this.interactive,customerHasLocalCache:s.o8.customerHasLocalCache(this.devices,this.currentUser.get("customerId")),collectionIdentifier:this.folder&&new s.F7(this.folder.id,s.x$.GetCurrentSortType()),config:this.config,products:this.products,libraries:this.libraries}))}},{key:"renderSidebarInfo",value:function(){this.showChildView("main",new N({model:this.interactive,libraries:this.libraries,config:this.config}))}},{key:"renderBasicInfo",value:function(){this.interactive&&this.showChildView("basic",new k({model:this.interactive}))}},{key:"requiredResources",get:function(){return{config:T.p.config,currentUser:j.K.currentUser,libraries:z.T.libraries,products:_.s.products}}},{key:"onBeforeRender",value:function(){return this.interactive=this.videoDataService.getInteractive(this.options.interactiveId),this.interactive&&(this.folder=i().first(this.getCustomLibraryFolders())),this.devices=this.localCacheDataService.getDevices(this.currentUser.get("customerId")),!!this.interactive}},{key:"viewOptions",value:function(){if(this.interactive)return{hasFolder:!!this.folder}}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderVideoHeader(),this.renderSidebarInfo(),this.renderBasicInfo()}}])&&q(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(c.Q.G7)},13809:function(e,t,n){"use strict";n.d(t,{UC:function(){return r.U}});var r=n(58688);n(19969),n(14898)},39216:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,' <div class="mt-3">\n <h5>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"folders",{name:"lang",hash:{smartCount:null!=(o=null!=t?t.options:t)?o.folders:o},data:i}))+'</h5>\n <div class="folders-region"></div>\n </div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,'<div class="h-100 ps-2 pe-2">\n <div class="interactive-thumbnail-region"></div>\n\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.folders:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+"</div>"},useData:!0})},34620:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){return'<div class="row border-bottom">\n <div class="interactive-header-region"></div>\n\n <div class="px-3 pb-3">\n <div class="breadcrumbs-region"></div>\n </div>\n</div>\n\n<div class="row">\n <div class="col-4">\n <div class="main-interactive-information-region"></div>\n </div>\n <div class="col-8">\n <div class="basic-interactive-information-region"></div>\n\n <div class="interactives-region"></div>\n </div>\n</div>'},useData:!0})},4785:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,s=e.escapeExpression;return' <div class="col-3 fw-semibold">'+s((n.lang||t&&t.lang||c).call(a,"title",{name:"lang",hash:{},data:i}))+'</div>\n <p class="col-9">'+s("function"==typeof(o=null!=(o=n.name||(null!=t?t.name:t))?o:c)?o.call(a,{name:"name",hash:{},data:i}):o)+"</p>\n"},3:function(e,t,n,r,i){return e.propertyIsEnumerable,' <div class="col-3 fw-semibold">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"description",{name:"lang",hash:{},data:i}))+'</div>\n <div class="col-9">\n <div class="description-region"></div>\n </div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,s=e.escapeExpression;return'<div class="position-relative">\n <h5 class="d-inline-block">'+s((n.lang||t&&t.lang||c).call(a,"heading",{name:"lang",hash:{},data:i}))+'</h5>\n</div>\n<div class="row mb-0">\n'+(null!=(o=n.if.call(a,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=n.if.call(a,null!=t?t.description:t,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+'\n <div class="col-3 fw-semibold">'+s((n.lang||t&&t.lang||c).call(a,"type",{name:"lang",hash:{},data:i}))+'</div>\n <div class="col-9 mb-2">\n <div class="media-type-badge-region"></div>\n </div>\n\n <div class="interactives-region"></div>\n</div>'},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1216],{59054:function(e,t,n){"use strict";var o;n.d(t,{f:function(){return o}}),function(e){e.Share="share",e.MasterObject="masterobject"}(o||(o={}))},45114:function(e,t,n){"use strict";n.d(t,{L:function(){return w}});var o=n(48088),i=n(99249),r=n(31647),a=n(63791),l=n(10101),s=n(93569),c=n(40622),u=n(61596),p=n(89039),d=n.n(p);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,m(o.key),o)}}function m(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function y(e,t,n){return t=b(t),function(e,t){if(t&&("object"==h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,v()?Reflect.construct(t,n||[],b(e).constructor):t.apply(e,n))}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var w=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),y(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){var e=this;this.options.playerViewModelKey&&this.listenToPlayerViewModel(),this.initViewModel(),this.listenTo(this.options.channelName,"timeupdate",(function(t){e.webPlayerTime=t,e.syncTime()})),this.options.editing&&this.syncTime()}},{key:"name",get:function(){return"ChapterFormComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterForm"}},{key:"tagName",get:function(){return"form"}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"template",get:function(){return d()}},{key:"className",get:function(){return this.options.creating?"py-3":"border-top p-2"}},{key:"behaviors",get:function(){return[{behaviorClass:l.fS,bindViewModel:!0},{behaviorClass:l.Bp,bindViewModel:!0}]}},{key:"events",value:function(){return{submit:"onSubmit","change .chapter-name":"validateName","keyup .chapter-name":"validateName","change .time-input":"onTimeInputUpdate","click .time-input":"onTimeInputUpdate","keyup .time-input":"onTimeInputUpdate","click .cancel":"destroyView"}}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}},"[name=hours]":{observe:"hours",setOptions:{validate:!0}},"[name=minutes]":{observe:"minutes",setOptions:{validate:!0}},"[name=seconds]":{observe:"seconds",setOptions:{validate:!0}}}}},{key:"initViewModel",value:function(){this.viewModel=i.r.get(this.viewModelName,this.model.toJSON())}},{key:"listenToPlayerViewModel",value:function(){var e=i.r.get(this.options.playerViewModelKey);this.listenTo(e,"change:currenttime",this.updateTime)}},{key:"updateTime",value:function(e){this.webPlayerTime=e.get("currenttime"),this.syncTime()}},{key:"syncTime",value:function(){var e=this.viewModel.get("startTime")||this.webPlayerTime;this.viewModel.set({hours:s.X4.getHoursComponent(e)||"",minutes:s.X4.getMinutesComponent(e)||"",seconds:s.X4.getSecondsComponent(e)})}},{key:"getNewTime",value:function(){return this.enabled()?s.X4.parseTime(this.viewModel.pick("hours","minutes","seconds")):0}},{key:"enabled",value:function(){return this.options.creating||0!==this.model.collection.indexOf(this.model)}},{key:"maxTimes",value:function(){var e=s.X4.millisecondsToSeconds(this.options.duration),t=s.X4.getHoursComponent(e),n=t>0?59:s.X4.getMinutesComponent(e);return{maxHr:t,maxMin:n,maxSec:n>0?59:s.X4.getSecondsComponent(e)}}},{key:"onTimeInputUpdate",value:function(){o.Radio.channel(this.options.channelName).trigger(c.NT.UpdateChapterTime,this.getNewTime()),this.validateStartTime()}},{key:"destroyView",value:function(){o.Radio.channel(this.options.channelName).trigger(c.NT.CancelChapterEdit),this.destroy()}},{key:"onSubmit",value:function(e){if(e.preventDefault(),!this.validate())return!1;var t={id:this.viewModel.get("id"),name:this.viewModel.get("name"),startTime:this.getNewTime()},n=o.Radio.channel(this.options.channelName),r=c.NT.CreateChapter;this.options.editing&&(r=c.NT.UpdateChapter),n.trigger(r,t),this.stopListening(this.viewModel),i.r.clear(this.viewModelName)}},{key:"validate",value:function(){this.viewModel.validate();var e=this.validateStartTime(),t=this.validateName();return this.viewModel.isValid()&&e&&t}},{key:"validateStartTime",value:function(){var e=this,t=o.Validation.callbacks,n=t.valid,i=t.invalid,r=this.model.collection||this.options.collection,a=this.getNewTime(),l=u.$.isValidChapterTime(this.model,a,this.options.duration,r),s=[],c=["seconds","minutes","hours"];return a<0?s=c:l&&(s.push("seconds"),a>59&&s.push("minutes"),a>3540&&s.push("hours")),c.forEach((function(t){return n(e,t,null)})),s.forEach((function(t){return i(e,t,l,null)})),!l}},{key:"validateName",value:function(e){if(!e||13!==e.keyCode){var t=o.Validation.callbacks,n=t.valid,i=t.invalid,r=this.model.collection||this.options.collection,a=u.$.isValidChapterName(this.model,this.viewModel.get("name"),r);return a?i(this,"name",a,null):n(this,"name",null),!a}}},{key:"viewOptions",value:function(){var e=this.maxTimes(),t=e.maxHr,n=e.maxMin,o=0===e.maxSec,i=0===n,r=0===t;return Object.assign(Object.assign({},this.options),{enabled:this.enabled(),timeId:"".concat(this.cid,"-time"),chapterId:"".concat(this.cid,"-chapter-name"),plusSvg:a.Nj.getSvg(a.vn.Plus),secDisabled:o,minDisabled:i,hrDisabled:r})}}],r&&f(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},70693:function(e,t,n){"use strict";n.d(t,{Q:function(){return L}});var o=n(31647),i=n(48088),r=n(56210),a=n(63791),l=n(93569),s=n(45114),c=n(40622),u=n(95637),p=n.n(u),d={loading:"rOhrX",darkBackground:"Ubazj",svgContainer:"SiNm3",chapterItem:"MOpQI"};function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,m(o.key),o)}}function m(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function y(e,t,n){return t=b(t),function(e,t){if(t&&("object"==h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,v()?Reflect.construct(t,n||[],b(e).constructor):t.apply(e,n))}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var w=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),y(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"ChapterItemComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterItem"}},{key:"instanceChannelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"chapter ".concat(d.chapterItem)}},{key:"behaviors",get:function(){return[{behaviorClass:r.H,selector:".action"}]}},{key:"regions",value:function(){return{editForm:{replaceElement:!1,el:".edit-form-region"}}}},{key:"elements",get:function(){return{chapterItem:".chapter-item",editChapter:".edit-chapter",deleteChapter:".delete-chapter"}}},{key:"events",value:function(){return{"click @ui.editChapter":"onEditChapter","click @ui.deleteChapter":"onDeleteChapter","click .clickable-seek":"onClick"}}},{key:"bindListeners",value:function(){this.listenTo(this.instanceChannelName,c.NT.CancelChapterEdit,this.onCancelEdit),this.listenTo(this.instanceChannelName,c.NT.UpdateChapter,this.onUpdateChapter),this.listenTo(this.instanceChannelName,c.NT.UpdateChapterTime,this.onUpdateChapterTime),this.listenTo(this.model,"change:showEditor",this.onShowEditorChange),this.listenTo(this.model,"change:loading",this.onLoadingChange);var e=this.model.collection.first();this.model!==e?this.listenTo(this.model.collection,"sort",this.render):this.listenTo(this.model.collection,"add remove sort",this.render)}},{key:"onClick",value:function(){var e=i.Radio.channel(this.options.channelName);this.model.get("isPhysicalChapter")?e.trigger(c.NT.SeekToChapter,this.model.get("index")):e.trigger(c.NT.UpdateChapterTime,this.model.get("startTime"))}},{key:"onLoadingChange",value:function(){var e=this.model.get("loading")?"disable":"enable";this.getUI("editChapter").tooltip(e),this.getUI("deleteChapter").tooltip(e),this.model.set("showEditor",!1,{silent:!0}),this.render()}},{key:"onShowEditorChange",value:function(){this.model.get("loading")||(this.model.get("showEditor")?this.showEditView():this.hideEditView())}},{key:"showEditView",value:function(){this.renderEditForm(),this.getUI("chapterItem").addClass(d.darkBackground)}},{key:"hideEditView",value:function(){this.model.set("showEditor",!1,{silent:!0}),this.getUI("chapterItem").removeClass(d.darkBackground),this.detachChildView("editForm")}},{key:"onCancelEdit",value:function(){this.hideEditView()}},{key:"onDeleteChapter",value:function(){this.model.get("loading")||i.Radio.channel(this.options.channelName).trigger(c.NT.DeleteChapter,this.model)}},{key:"onUpdateChapter",value:function(e){i.Radio.channel(this.options.channelName).trigger(c.NT.UpdateChapter,e),this.render()}},{key:"onUpdateChapterTime",value:function(e){i.Radio.channel(this.options.channelName).trigger(c.NT.UpdateChapterTime,e)}},{key:"onEditChapter",value:function(){i.Radio.channel(this.options.channelName).trigger(c.NT.ToggleEdit,this.model)}},{key:"canDelete",value:function(e){var t=this.model.collection.length;return 1===e&&1===t||!(1===e&&t>1)}},{key:"viewOptions",value:function(){var e=this.model.collection.indexOf(this.model)+1,t=l.X4.trimToMinutes(l.X4.secondsToHoursFormatted(this.model.get("startTime")));return Object.assign(Object.assign({},this.options),{styles:d,time:t,index:e,loading:this.model.get("loading"),allowDelete:this.canDelete(e),editSvg:a.Nj.getSvg(a.vn.Edit),deleteSvg:a.Nj.getSvg(a.vn.Delete)})}},{key:"renderEditForm",value:function(){this.showChildView("editForm",new s.L({model:this.model,editing:!0,channelName:this.instanceChannelName,duration:this.options.duration}))}},{key:"onBeforeDetach",value:function(){$(".tooltip").remove()}}])&&f(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function C(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,T(o.key),o)}}function T(e){var t=function(e,t){if("object"!=k(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=k(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:t+""}function O(e,t,n){return t=j(t),function(e,t){if(t&&("object"==k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,E()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var N=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),O(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.bindEditorListeners()}},{key:"name",get:function(){return"ChapterComponentCollection"}},{key:"className",get:function(){return"chapters"}},{key:"childView",get:function(){return w}},{key:"bindEditorListeners",value:function(){this.options.editable&&this.listenTo(this.options.channelName,c.NT.ToggleEdit,this.toggleEditForm)}},{key:"toggleEditForm",value:function(e){this.collection.each((function(t){return t!==e&&t.set("showEditor",!1)})),e.set("showEditor",!e.get("showEditor"))}},{key:"childViewOptions",get:function(){return{showActions:this.options.showActions,duration:this.options.duration,channelName:this.options.channelName}}}])&&C(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.$W),P=n(46055),x=n.n(P);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function M(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,I(o.key),o)}}function I(e){var t=function(e,t){if("object"!=_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=_(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_(t)?t:t+""}function V(e,t,n){return t=R(t),function(e,t){if(t&&("object"==_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,D()?Reflect.construct(t,n||[],R(e).constructor):t.apply(e,n))}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D=function(){return!!e})()}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}var L=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),V(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"ChaptersComponent"}},{key:"template",get:function(){return x()}},{key:"lang",get:function(){return"libraryEditor.chapters"}},{key:"className",get:function(){return"chapters ".concat(!this.options.editable&&"py-3 border-top")}},{key:"regions",value:function(){return{chapterList:{replaceElement:!0,el:".chapter-list-region"}}}},{key:"viewOptions",value:function(){return{showHeader:this.options.showHeader}}},{key:"onRender",value:function(){this.showChildView("chapterList",new N({collection:this.collection,duration:this.options.duration,channelName:this.options.channelName,showActions:this.options.showActions,editable:this.options.editable}))}}])&&M(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA)},89039:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-6 form-group">\r\n <label class="d-block" for="'+l(a(null!=(r=null!=t?t.options:t)?r.timeId:r,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"startTimeLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n <div class="d-flex">\r\n <div class="d-flex col h-100 align-items-center">\r\n <input\r\n class="form-control d-inline-block time-input hour-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"hoursPlaceholder",{name:"lang",hash:{},data:i}))+'"\r\n name="hours"\r\n autocomplete="off"\r\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.hrDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n >\r\n <span class="px-1">:</span>\r\n </div>\r\n <div class="d-flex col h-100 align-items-center">\r\n <input\r\n class="form-control d-inline-block time-input minute-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"minutesPlaceholder",{name:"lang",hash:{},data:i}))+'"\r\n name="minutes"\r\n autocomplete="off"\r\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.minDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n >\r\n <span class="px-1">:</span>\r\n </div>\r\n <div class="d-flex col h-100">\r\n <input\r\n class="form-control d-inline-block time-input second-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"secondsPlaceholder",{name:"lang",hash:{},data:i}))+'"\r\n name="seconds"\r\n id="'+l(a(null!=(r=null!=t?t.options:t)?r.timeId:r,t))+'"\r\n autocomplete="off"\r\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.secDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n >\r\n </div>\r\n </div>\r\n <div class="form-feedback d-block"></div>\r\n </div>\r\n'},2:function(e,t,n,o,i){return"disabled"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <button type="submit" class="btn btn-dark ms-2">\r\n <span class="d-inline-block align-middle svg-container">'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.plusSvg:r,t))?r:"")+'</span>\r\n <span class="align-middle">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"add",{name:"lang",hash:{},data:i}))+"</span>\r\n </button>\r\n"},6:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return' <button type="submit" class="btn btn-dark ms-2">'+l((n.lang||t&&t.lang||a).call(r,"save",{name:"lang",hash:{},data:i}))+'</button>\r\n <button type="button" class="btn btn-secondary cancel ms-2">'+l((n.lang||t&&t.lang||a).call(r,"cancel",{name:"lang",hash:{},data:i}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<div class="row">\r\n <div class="col-6 form-group">\r\n <label for="'+l(a(null!=(r=null!=t?t.options:t)?r.chapterId:r,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"nameLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n <input type="text" class="form-control chapter-name" name="name" id="'+l(a(null!=(r=null!=t?t.options:t)?r.chapterId:r,t))+'" placeholder="'+l((n.lang||t&&t.lang||c).call(s,"namePlaceholder",{name:"lang",hash:{},data:i}))+'" autofocus autocomplete="off">\r\n <div class="form-feedback"></div>\r\n </div>\r\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.enabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\r\n\r\n<div class="row">\r\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.creating:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+"\r\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.editing:r,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},95637:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.loading:r,t))},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-2 text-end">\r\n <a class="action edit-chapter my-2 svg-container '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block text-secondary"\r\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"edit",{name:"lang",hash:{},data:i}))+'">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.editSvg:r,t))?r:"")+"</a>\r\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.allowDelete:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+" </div>\r\n"},4:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression;return' <a class="action delete-chapter my-2 svg-container '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block text-secondary"\r\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"delete",{name:"lang",hash:{},data:i}))+'">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.deleteSvg:r,t))?r:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,l=null!=t?t:e.nullContext||{},s=e.lambda,c=e.escapeExpression;return'<div class="row mx-0 border-top chapter-item '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.loading:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickable-seek col-1">\r\n <p class="m-0 py-2">'+c(s(null!=(r=null!=t?t.options:t)?r.index:r,t))+'</p>\r\n </div>\r\n <div class="clickable-seek col-6">\r\n <p class="m-0 py-2">'+c("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(l,{name:"name",hash:{},data:i}):a)+'</p>\r\n </div>\r\n <div class="clickable-seek col-3 text-end">\r\n <p class="m-0 py-2">'+c(s(null!=(r=null!=t?t.options:t)?r.time:r,t))+"</p>\r\n </div>\r\n"+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.showActions:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\r\n<div class="edit-form-region"></div>\r\n'},useData:!0})},46055:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return"<h5>"+l((n.lang||t&&t.lang||a).call(r,"chapters",{name:"lang",hash:{},data:i}))+'</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>'+l((n.lang||t&&t.lang||a).call(r,"nameLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n </div>\r\n <div class="col-3 text-end">\r\n <label>'+l((n.lang||t&&t.lang||a).call(r,"startLabel",{name:"lang",hash:{},data:i}))+'</>\r\n </div>\r\n</div>\r\n<div class="chapter-list-region"></div>'},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1216],{59054:function(e,t,n){"use strict";var o;n.d(t,{f:function(){return o}}),function(e){e.Share="share",e.MasterObject="masterobject"}(o||(o={}))},45114:function(e,t,n){"use strict";n.d(t,{L:function(){return w}});var o=n(48088),i=n(99249),r=n(31647),a=n(63791),l=n(10101),s=n(93569),c=n(40622),u=n(61596),p=n(89039),d=n.n(p);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,m(o.key),o)}}function m(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function y(e,t,n){return t=b(t),function(e,t){if(t&&("object"==h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,v()?Reflect.construct(t,n||[],b(e).constructor):t.apply(e,n))}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var w=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),y(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),n=t,r=[{key:"initialize",value:function(){var e=this;this.options.playerViewModelKey&&this.listenToPlayerViewModel(),this.initViewModel(),this.listenTo(this.options.channelName,"timeupdate",(function(t){e.webPlayerTime=t,e.syncTime()})),this.options.editing&&this.syncTime()}},{key:"name",get:function(){return"ChapterFormComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterForm"}},{key:"tagName",get:function(){return"form"}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"template",get:function(){return d()}},{key:"className",get:function(){return this.options.creating?"py-3":"border-top p-2"}},{key:"behaviors",get:function(){return[{behaviorClass:l.fS,bindViewModel:!0},{behaviorClass:l.Bp,bindViewModel:!0}]}},{key:"events",value:function(){return{submit:"onSubmit","change .chapter-name":"validateName","keyup .chapter-name":"validateName","change .time-input":"onTimeInputUpdate","click .time-input":"onTimeInputUpdate","keyup .time-input":"onTimeInputUpdate","click .cancel":"destroyView"}}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}},"[name=hours]":{observe:"hours",setOptions:{validate:!0}},"[name=minutes]":{observe:"minutes",setOptions:{validate:!0}},"[name=seconds]":{observe:"seconds",setOptions:{validate:!0}}}}},{key:"initViewModel",value:function(){this.viewModel=i.r.get(this.viewModelName,this.model.toJSON())}},{key:"listenToPlayerViewModel",value:function(){var e=i.r.get(this.options.playerViewModelKey);this.listenTo(e,"change:currenttime",this.updateTime)}},{key:"updateTime",value:function(e){this.webPlayerTime=e.get("currenttime"),this.syncTime()}},{key:"syncTime",value:function(){var e=this.viewModel.get("startTime")||this.webPlayerTime;this.viewModel.set({hours:s.X4.getHoursComponent(e)||"",minutes:s.X4.getMinutesComponent(e)||"",seconds:s.X4.getSecondsComponent(e)})}},{key:"getNewTime",value:function(){return this.enabled()?s.X4.parseTime(this.viewModel.pick("hours","minutes","seconds")):0}},{key:"enabled",value:function(){return this.options.creating||0!==this.model.collection.indexOf(this.model)}},{key:"maxTimes",value:function(){var e=s.X4.millisecondsToSeconds(this.options.duration),t=s.X4.getHoursComponent(e),n=t>0?59:s.X4.getMinutesComponent(e);return{maxHr:t,maxMin:n,maxSec:n>0?59:s.X4.getSecondsComponent(e)}}},{key:"onTimeInputUpdate",value:function(){o.Radio.channel(this.options.channelName).trigger(c.NT.UpdateChapterTime,this.getNewTime()),this.validateStartTime()}},{key:"destroyView",value:function(){o.Radio.channel(this.options.channelName).trigger(c.NT.CancelChapterEdit),this.destroy()}},{key:"onSubmit",value:function(e){if(e.preventDefault(),!this.validate())return!1;var t={id:this.viewModel.get("id"),name:this.viewModel.get("name"),startTime:this.getNewTime()},n=o.Radio.channel(this.options.channelName),r=c.NT.CreateChapter;this.options.editing&&(r=c.NT.UpdateChapter),n.trigger(r,t),this.stopListening(this.viewModel),i.r.clear(this.viewModelName)}},{key:"validate",value:function(){this.viewModel.validate();var e=this.validateStartTime(),t=this.validateName();return this.viewModel.isValid()&&e&&t}},{key:"validateStartTime",value:function(){var e=this,t=o.Validation.callbacks,n=t.valid,i=t.invalid,r=this.model.collection||this.options.collection,a=this.getNewTime(),l=u.$.isValidChapterTime(this.model,a,this.options.duration,r),s=[],c=["seconds","minutes","hours"];return a<0?s=c:l&&(s.push("seconds"),a>59&&s.push("minutes"),a>3540&&s.push("hours")),c.forEach((function(t){return n(e,t,null)})),s.forEach((function(t){return i(e,t,l,null)})),!l}},{key:"validateName",value:function(e){if(!e||13!==e.keyCode){var t=o.Validation.callbacks,n=t.valid,i=t.invalid,r=this.model.collection||this.options.collection,a=u.$.isValidChapterName(this.model,this.viewModel.get("name"),r);return a?i(this,"name",a,null):n(this,"name",null),!a}}},{key:"viewOptions",value:function(){var e=this.maxTimes(),t=e.maxHr,n=e.maxMin,o=0===e.maxSec,i=0===n,r=0===t;return Object.assign(Object.assign({},this.options),{enabled:this.enabled(),timeId:"".concat(this.cid,"-time"),chapterId:"".concat(this.cid,"-chapter-name"),plusSvg:a.Nj.getSvg(a.vn.Plus),secDisabled:o,minDisabled:i,hrDisabled:r})}}],r&&f(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},70693:function(e,t,n){"use strict";n.d(t,{Q:function(){return L}});var o=n(31647),i=n(48088),r=n(56210),a=n(63791),l=n(93569),s=n(45114),c=n(40622),u=n(95637),p=n.n(u),d={loading:"rOhrX",darkBackground:"Ubazj",svgContainer:"SiNm3",chapterItem:"MOpQI"};function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,m(o.key),o)}}function m(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function y(e,t,n){return t=b(t),function(e,t){if(t&&("object"==h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,v()?Reflect.construct(t,n||[],b(e).constructor):t.apply(e,n))}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var w=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),y(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"ChapterItemComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterItem"}},{key:"instanceChannelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"chapter ".concat(d.chapterItem)}},{key:"behaviors",get:function(){return[{behaviorClass:r.H,selector:".action"}]}},{key:"regions",value:function(){return{editForm:{replaceElement:!1,el:".edit-form-region"}}}},{key:"elements",get:function(){return{chapterItem:".chapter-item",editChapter:".edit-chapter",deleteChapter:".delete-chapter"}}},{key:"events",value:function(){return{"click @ui.editChapter":"onEditChapter","click @ui.deleteChapter":"onDeleteChapter","click .clickable-seek":"onClick"}}},{key:"bindListeners",value:function(){this.listenTo(this.instanceChannelName,c.NT.CancelChapterEdit,this.onCancelEdit),this.listenTo(this.instanceChannelName,c.NT.UpdateChapter,this.onUpdateChapter),this.listenTo(this.instanceChannelName,c.NT.UpdateChapterTime,this.onUpdateChapterTime),this.listenTo(this.model,"change:showEditor",this.onShowEditorChange),this.listenTo(this.model,"change:loading",this.onLoadingChange);var e=this.model.collection.first();this.model!==e?this.listenTo(this.model.collection,"sort",this.render):this.listenTo(this.model.collection,"add remove sort",this.render)}},{key:"onClick",value:function(){var e=i.Radio.channel(this.options.channelName);this.model.get("isPhysicalChapter")?e.trigger(c.NT.SeekToChapter,this.model.get("index")):e.trigger(c.NT.UpdateChapterTime,this.model.get("startTime"))}},{key:"onLoadingChange",value:function(){var e=this.model.get("loading")?"disable":"enable";this.getUI("editChapter").tooltip(e),this.getUI("deleteChapter").tooltip(e),this.model.set("showEditor",!1,{silent:!0}),this.render()}},{key:"onShowEditorChange",value:function(){this.model.get("loading")||(this.model.get("showEditor")?this.showEditView():this.hideEditView())}},{key:"showEditView",value:function(){this.renderEditForm(),this.getUI("chapterItem").addClass(d.darkBackground)}},{key:"hideEditView",value:function(){this.model.set("showEditor",!1,{silent:!0}),this.getUI("chapterItem").removeClass(d.darkBackground),this.detachChildView("editForm")}},{key:"onCancelEdit",value:function(){this.hideEditView()}},{key:"onDeleteChapter",value:function(){this.model.get("loading")||i.Radio.channel(this.options.channelName).trigger(c.NT.DeleteChapter,this.model)}},{key:"onUpdateChapter",value:function(e){i.Radio.channel(this.options.channelName).trigger(c.NT.UpdateChapter,e),this.render()}},{key:"onUpdateChapterTime",value:function(e){i.Radio.channel(this.options.channelName).trigger(c.NT.UpdateChapterTime,e)}},{key:"onEditChapter",value:function(){i.Radio.channel(this.options.channelName).trigger(c.NT.ToggleEdit,this.model)}},{key:"canDelete",value:function(e){var t=this.model.collection.length;return 1===e&&1===t||!(1===e&&t>1)}},{key:"viewOptions",value:function(){var e=this.model.collection.indexOf(this.model)+1,t=l.X4.trimToMinutes(l.X4.secondsToHoursFormatted(this.model.get("startTime")));return Object.assign(Object.assign({},this.options),{styles:d,time:t,index:e,loading:this.model.get("loading"),allowDelete:this.canDelete(e),editSvg:a.Nj.getSvg(a.vn.Edit),deleteSvg:a.Nj.getSvg(a.vn.Delete)})}},{key:"renderEditForm",value:function(){this.showChildView("editForm",new s.L({model:this.model,editing:!0,channelName:this.instanceChannelName,duration:this.options.duration}))}},{key:"onBeforeDetach",value:function(){$(".tooltip").remove()}}])&&f(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA);function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function C(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,T(o.key),o)}}function T(e){var t=function(e,t){if("object"!=k(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=k(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:t+""}function O(e,t,n){return t=j(t),function(e,t){if(t&&("object"==k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,E()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var N=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),O(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.bindEditorListeners()}},{key:"name",get:function(){return"ChapterComponentCollection"}},{key:"className",get:function(){return"chapters"}},{key:"childView",get:function(){return w}},{key:"bindEditorListeners",value:function(){this.options.editable&&this.listenTo(this.options.channelName,c.NT.ToggleEdit,this.toggleEditForm)}},{key:"toggleEditForm",value:function(e){this.collection.each((function(t){return t!==e&&t.set("showEditor",!1)})),e.set("showEditor",!e.get("showEditor"))}},{key:"childViewOptions",get:function(){return{showActions:this.options.showActions,duration:this.options.duration,channelName:this.options.channelName}}}])&&C(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.$W),P=n(46055),x=n.n(P);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function M(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,I(o.key),o)}}function I(e){var t=function(e,t){if("object"!=_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=_(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_(t)?t:t+""}function V(e,t,n){return t=R(t),function(e,t){if(t&&("object"==_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,D()?Reflect.construct(t,n||[],R(e).constructor):t.apply(e,n))}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D=function(){return!!e})()}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}var L=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),V(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"ChaptersComponent"}},{key:"template",get:function(){return x()}},{key:"lang",get:function(){return"libraryEditor.chapters"}},{key:"className",get:function(){return"chapters ".concat(!this.options.editable&&"py-3 border-top")}},{key:"regions",value:function(){return{chapterList:{replaceElement:!0,el:".chapter-list-region"}}}},{key:"viewOptions",value:function(){return{showHeader:this.options.showHeader}}},{key:"onRender",value:function(){this.showChildView("chapterList",new N({collection:this.collection,duration:this.options.duration,channelName:this.options.channelName,showActions:this.options.showActions,editable:this.options.editable}))}}])&&M(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA)},89039:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-6 form-group">\n <label class="d-block" for="'+l(a(null!=(r=null!=t?t.options:t)?r.timeId:r,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"startTimeLabel",{name:"lang",hash:{},data:i}))+'</label>\n <div class="d-flex">\n <div class="d-flex col h-100 align-items-center">\n <input\n class="form-control d-inline-block time-input hour-input"\n type="number"\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"hoursPlaceholder",{name:"lang",hash:{},data:i}))+'"\n name="hours"\n autocomplete="off"\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.hrDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'\n >\n <span class="px-1">:</span>\n </div>\n <div class="d-flex col h-100 align-items-center">\n <input\n class="form-control d-inline-block time-input minute-input"\n type="number"\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"minutesPlaceholder",{name:"lang",hash:{},data:i}))+'"\n name="minutes"\n autocomplete="off"\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.minDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'\n >\n <span class="px-1">:</span>\n </div>\n <div class="d-flex col h-100">\n <input\n class="form-control d-inline-block time-input second-input"\n type="number"\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"secondsPlaceholder",{name:"lang",hash:{},data:i}))+'"\n name="seconds"\n id="'+l(a(null!=(r=null!=t?t.options:t)?r.timeId:r,t))+'"\n autocomplete="off"\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.secDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'\n >\n </div>\n </div>\n <div class="form-feedback d-block"></div>\n </div>\n'},2:function(e,t,n,o,i){return"disabled"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <button type="submit" class="btn btn-dark ms-2">\n <span class="d-inline-block align-middle svg-container">'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.plusSvg:r,t))?r:"")+'</span>\n <span class="align-middle">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"add",{name:"lang",hash:{},data:i}))+"</span>\n </button>\n"},6:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return' <button type="submit" class="btn btn-dark ms-2">'+l((n.lang||t&&t.lang||a).call(r,"save",{name:"lang",hash:{},data:i}))+'</button>\n <button type="button" class="btn btn-secondary cancel ms-2">'+l((n.lang||t&&t.lang||a).call(r,"cancel",{name:"lang",hash:{},data:i}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<div class="row">\n <div class="col-6 form-group">\n <label for="'+l(a(null!=(r=null!=t?t.options:t)?r.chapterId:r,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"nameLabel",{name:"lang",hash:{},data:i}))+'</label>\n <input type="text" class="form-control chapter-name" name="name" id="'+l(a(null!=(r=null!=t?t.options:t)?r.chapterId:r,t))+'" placeholder="'+l((n.lang||t&&t.lang||c).call(s,"namePlaceholder",{name:"lang",hash:{},data:i}))+'" autofocus autocomplete="off">\n <div class="form-feedback"></div>\n </div>\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.enabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\n\n<div class="row">\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.creating:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+"\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.editing:r,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},95637:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.loading:r,t))},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-2 text-end">\n <a class="action edit-chapter my-2 svg-container '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block text-secondary"\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"edit",{name:"lang",hash:{},data:i}))+'">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.editSvg:r,t))?r:"")+"</a>\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.allowDelete:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+" </div>\n"},4:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression;return' <a class="action delete-chapter my-2 svg-container '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block text-secondary"\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"delete",{name:"lang",hash:{},data:i}))+'">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.deleteSvg:r,t))?r:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,l=null!=t?t:e.nullContext||{},s=e.lambda,c=e.escapeExpression;return'<div class="row mx-0 border-top chapter-item '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.loading:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickable-seek col-1">\n <p class="m-0 py-2">'+c(s(null!=(r=null!=t?t.options:t)?r.index:r,t))+'</p>\n </div>\n <div class="clickable-seek col-6">\n <p class="m-0 py-2">'+c("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(l,{name:"name",hash:{},data:i}):a)+'</p>\n </div>\n <div class="clickable-seek col-3 text-end">\n <p class="m-0 py-2">'+c(s(null!=(r=null!=t?t.options:t)?r.time:r,t))+"</p>\n </div>\n"+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.showActions:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\n<div class="edit-form-region"></div>\n'},useData:!0})},46055:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return"<h5>"+l((n.lang||t&&t.lang||a).call(r,"chapters",{name:"lang",hash:{},data:i}))+'</h5>\n<div class="row mt-3 m-0 border-bottom">\n <div class="col-1">\n <label>#</label>\n </div>\n <div class="col-6">\n <label>'+l((n.lang||t&&t.lang||a).call(r,"nameLabel",{name:"lang",hash:{},data:i}))+'</label>\n </div>\n <div class="col-3 text-end">\n <label>'+l((n.lang||t&&t.lang||a).call(r,"startLabel",{name:"lang",hash:{},data:i}))+'</>\n </div>\n</div>\n<div class="chapter-list-region"></div>'},useData:!0})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1260],{39023:function(e,t,n){n.d(t,{X:function(){return i}});var r=n(1024);function i(e){var t=e.isLabelEllipsis,n=r.useRef(null);return r.useEffect((function(){n.current&&(e.checked?n.current.indeterminate&&(n.current.indeterminate=!1):!e.indeterminate||n.current.indeterminate?!e.indeterminate&&n.current.indeterminate&&(n.current.indeterminate=!1):n.current.indeterminate=!0)}),[n.current,e.indeterminate,e.checked]),r.createElement("div",{className:"form-check pe-2 ".concat(e.className)},r.createElement("input",{ref:n,type:"checkbox",className:"form-check-input",id:e.id,name:e.name,checked:e.checked,onChange:e.onChange,disabled:e.disabled,"aria-checked":e.checked,"aria-label":e.ariaLabel}),e.label&&r.createElement("label",{className:"form-check-label cursor-pointer align-top",htmlFor:e.id},r.createElement("span",{className:"".concat(t?"clamp-1":"")},e.label)))}i.defaultProps={checked:!1,label:"",className:""}},74483:function(e,t,n){var r;n.d(t,{w:function(){return r}}),function(e){e.Disabled="Disabled",e.Active="Active",e.Inactive="Inactive"}(r||(r={}))},11260:function(e,t,n){n.r(t),n.d(t,{PastRequestsView:function(){return qn}});var r=n(1024),i=n.n(r),a=n(57857),o=n(86120),l=n(23689),c=n(86242),s=n(66703),u=n(90335),d=n(15408),f=n(2491),m=n(30317),v=n(22430),p=n(50997),y=n(68893),g=n(48404),b=n(19226),h=n(95061),S=n(39396),E=n(63791),A=n(50072),C="libraryRequests.closedAlert";function w(e){var t;return(null===(t=e.libraryRequest)||void 0===t?void 0:t.status)!==A.l.Closed?i().createElement(i().Fragment,null):i().createElement("div",{className:"alert alert-warning mb-3 rounded d-flex align-items-center px-2",role:"alert"},i().createElement(S.x,{svgName:E.vn.Lock,className:"d-inline-block svg-container me-2"}),i().createElement(s.x,{namespace:C,phrase:"closedRequest"}))}var k=n(70065),L=n(40221),O=n(85887),N=n(99910),T=n(58424),_="search.filterActions";function j(e){return r.createElement("div",{className:"d-flex justify-content-between ".concat(e.className)},e.active?r.createElement(T.L,{className:"text-secondary hover-text-underline cursor-pointer",onClick:e.onClickReset},r.createElement(s.x,{namespace:_,phrase:"reset"})):r.createElement("div",{className:"invisible"}),r.createElement(T.L,{className:"info-link",onClick:e.onClickApply},r.createElement(s.x,{namespace:_,phrase:"apply"})))}j.defaultProps={active:!1,className:""};var R=(0,r.createContext)(null);function x(e,t){return"update"===t.type?t.payload:e}var I=n(53808),P=n(31647),F=n(52076);function D(e){return i().createElement("label",{htmlFor:e.id,className:"mb-0"},i().createElement("h3",{className:"h6 mb-2"},e.title))}var B=n(39023);function q(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function U(e){var t,n=Fe.displayTwoColumns(e.filter),i=e.draftState.selection;return r.createElement(r.Fragment,null,r.createElement(D,{title:e.filter.name}),r.createElement(N.Form,{className:"mb-3"},(t=e.filter.options.map((function(t){var a=e.filter.disabled||t.disabled,o=!!e.draftState.selection.find((function(e){return e.id.toString()===t.id.toString()})),l=Array.isArray(t.id)?t.id.join("_"):t.id;return r.createElement("li",null,r.createElement(B.X,{key:l,label:t.name,name:l,id:l,onChange:function(){return function(t,n){if(n){var r=-1;i.find((function(e,n){r>-1||e.id.toString()===t.id.toString()&&(r=n)}));var a=[].concat(q(i.slice(0,r)),q(i.slice(r+1)));e.setDraftState({active:!!a.length,selection:a})}else{var o=q(i);o.push(t),e.setDraftState({active:!!o.length,selection:o})}}(t,o)},checked:!a&&o,className:"my-1 ".concat(n?"col-md-6 col-12":""),isLabelEllipsis:n,disabled:a}))})),r.createElement("ul",{className:"list-unstyled ".concat(n?"d-flex flex-wrap":"")},t))))}function V(e,t){if(e){if("string"==typeof e)return G(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function X(e){var t,n,i,a=[],o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=V(e))){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}(e.filter.options);try{var l=function(){var o,l=i.value,c=e.filter.disabled||l.disabled,s=null===(t=e.draftState.selection)||void 0===t?void 0:t.find((function(e){return(null==e?void 0:e.id)===l.id})),u=null!==(n=l.secondLayerOptions)&&void 0!==n?n:[],d=function(e,t){var n,r,i=(null===(n=null==e?void 0:e.secondLayerSelection)||void 0===n?void 0:n.length)>0,a=(null===(r=null==e?void 0:e.secondLayerSelection)||void 0===r?void 0:r.length)===t.length;return i&&!a}(s,u),f=!d&&!!s;a.push(r.createElement(B.X,{key:l.id,label:l.name,name:l.id,id:l.id,indeterminate:d,onChange:function(){return e.onToggleItem(l,f||d)},checked:!c&&f,className:"my-1",disabled:c})),Fe.hasManyFilterOptions(u)&&a.push.apply(a,(o=u.map((function(t){var n,i=c||t.disabled,a=!!(null===(n=null==s?void 0:s.secondLayerSelection)||void 0===n?void 0:n.find((function(e){return e.id===t.id})));return r.createElement(B.X,{key:t.id,label:t.name,name:t.id,id:t.id,onChange:function(){return e.onToggleChildItem(t,a,l)},checked:!i&&a,className:"my-1 ms-3",disabled:i})})),function(e){if(Array.isArray(e))return G(e)}(o)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||V(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))};for(o.s();!(i=o.n()).done;)l()}catch(e){o.e(e)}finally{o.f()}return r.createElement(r.Fragment,null,a)}function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Q(e){var t,n,i,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Y(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}(e.filter.options);try{var o,l=function(){var a=i.value,o=e.filter.disabled||a.disabled,l=null===(t=e.draftState.selection)||void 0===t?void 0:t.find((function(e){return(null==e?void 0:e.id)===a.id})),c=(null!==(n=a.secondLayerOptions)&&void 0!==n?n:[]).map((function(t){var n,i=o||t.disabled,c=!!(null===(n=null==l?void 0:l.secondLayerSelection)||void 0===n?void 0:n.find((function(e){return e.id===t.id})));return r.createElement(B.X,{key:t.id,label:t.name,name:t.id,id:t.id,onChange:function(){return e.onToggleChildItem(t,c,a)},checked:!i&&c,className:"my-1",disabled:i})}));return{v:r.createElement(r.Fragment,null,c)}};for(a.s();!(i=a.n()).done;)if(o=l())return o.v}catch(e){a.e(e)}finally{a.f()}}function H(e){return function(e){if(Array.isArray(e))return W(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return W(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $(e){var t=e.filter.options;function n(t,n,r){var i,a,o=e.draftState.selection,l=o.findIndex((function(e){return e.id===r.id}));if(!n){var c=[].concat(H(null!==(a=null===(i=o[l])||void 0===i?void 0:i.secondLayerSelection)&&void 0!==a?a:[]),[t]);if(0===o.length||-1===l){var s=Object.assign(Object.assign({},r),{secondLayerSelection:c}),u=[].concat(H(o),[s]);return void e.setDraftState({active:!!u.length,selection:u})}if(-1!==l){var d=o.map((function(e){return e.id===r.id?Object.assign(Object.assign({},e),{secondLayerSelection:c}):e}));return void e.setDraftState({active:!!d.length,selection:d})}}var f=o.map((function(e){if(e.id===r.id){var n=L.m.removeItem(e.secondLayerSelection,t);return Object.assign(Object.assign({},r),{secondLayerSelection:n})}return e}));0===f[l].secondLayerSelection.length&&(f=L.m.removeItem(f,r)),e.setDraftState({active:!!f.length,selection:f})}return r.createElement(r.Fragment,null,r.createElement(D,{title:e.filter.name}),r.createElement(N.Form,{className:"mb-3"},Fe.hasManyFilterOptions(t)?r.createElement(X,Object.assign({onToggleItem:function(n,r){var i,a=e.draftState.selection,o=a.findIndex((function(e){return e.id===n.id}));if(!r){var l=null===(i=null==t?void 0:t.find((function(e){return e.id===n.id})).secondLayerOptions)||void 0===i?void 0:i.filter((function(e){return!e.disabled})),c=Object.assign(Object.assign({},n),{secondLayerSelection:l});if(0===a.length||-1===o){var s=[].concat(H(a),[c]);return void e.setDraftState({active:!0,selection:s})}if(-1!==o){var u=a.map((function(e){return e.id===n.id?c:e}));return void e.setDraftState({active:!!u.length,selection:u})}}var d=L.m.removeItemFromIndex(a,a.findIndex((function(e){return e.id===n.id})));e.setDraftState({active:!!d.length,selection:d})},onToggleChildItem:n},e)):r.createElement(Q,Object.assign({onToggleChildItem:n},e))))}var z=n(9063);function Z(e){var t=e.draftState.active;return r.createElement(r.Fragment,null,r.createElement(D,{id:e.filter.id,title:e.filter.name}),r.createElement("div",{className:"d-flex align-items-start justify-content-between"},r.createElement("p",{className:"d-inline-block w-75"},e.filter.description),r.createElement(z.Z,{id:e.filter.id,disabled:e.filter.disabled,onClick:function(){e.setDraftState({active:!t})},on:t})))}function K(e){return i().createElement(i().Fragment,null,e.filter.options.map((function(t){return i().createElement(N.Dropdown.Item,{key:t.id,onClick:function(){return function(t){e.setDraftState({active:!t.default,selection:[t]})}(t)},disabled:e.filter.disabled||t.disabled},t.name)})))}function J(e){return r.createElement(r.Fragment,null,r.createElement(D,{title:e.filter.name}),r.createElement(N.Form,null,r.createElement("ul",{className:"".concat(e.isOnMoreFilters?"d-flex flex-wrap":""," list-unstyled")},e.filter.options.map((function(t){var n,i=e.filter.disabled||t.disabled,a=(null===(n=L.m.first(e.draftState.selection))||void 0===n?void 0:n.id.toString())===t.id.toString();return r.createElement("li",{className:"".concat(e.isOnMoreFilters?"w-50":"")},r.createElement(N.Form.Check,{key:t.id,type:"radio",label:t.name,name:t.id,id:t.id,value:t.id,onChange:function(){return function(t){e.setDraftState({active:!t.default,selection:[t]})}(t)},checked:!i&&a,className:"".concat("B3rOI"),disabled:i}))})))))}var ee=n(63946),te=n(32557);function ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return re(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?re(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ie=a.T.encloseNamespace("shared.ratingRangeSelector");function ae(e){var t=ne((0,te.X)({delay:1}),2),n=t[0],r=t[1];if(i().useEffect((function(){e.onHover(r?e.rating:null,e.isRatingValid)}),[r]),!e.rating.code)return i().createElement(i().Fragment,null);var a=i().createElement(T.L,{ref:n,className:e.getButtonClasses(e.rating,e.isActive,r,e.isRatingValid),onClick:e.onClick,disabled:e.disabled},e.rating.code);return e.disabled?a:i().createElement(ee.u,{title:e.isRatingValid?e.rating.name:ie("invalidRating"),spanHack:!0},a)}function oe(e){var t=ne(i().useState([]),2),n=t[0],r=t[1];function a(t){return e.ratings.filter((function(e){return e.code&&e.value<=t.value}))}function o(t,n){t&&!e.isDisabled(t)?n&&r(a(t)):r([])}function l(t){return n.length?!!n.find((function(e){return e.id===t.id})):!!e.selections.find((function(e){return e.id===t.id}))}function c(t){if(!t)return!1;var n=e.yearGroups.findIndex((function(t){return t.value===e.yearGroup.value}));return 0===n||e.yearGroups.slice(0,n).every((function(e){return t.value>=e.rating.value}))}return i().createElement("div",null,i().createElement(N.ButtonGroup,{as:"ul",className:"list-unstyled"},e.ratings.map((function(t){var n;return i().createElement("li",null,i().createElement(ae,{key:t.id,rating:t,isRatingValid:!e.yearGroup||c(t),onClick:function(){return function(t){e.onSelectRange(a(t))}(t)},onHover:o,isActive:l(t),disabled:e.disabled||(null===(n=e.isDisabled)||void 0===n?void 0:n.call(e,t)),getButtonClasses:e.getButtonClasses}))}))))}oe.defaultProps={selections:[]};function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ce(e){var t,n,i=e.filter.options,a=i.filter((function(e){return e.code})),o=(t=a,n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return le(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],l=a[a.length-1];return r.createElement(r.Fragment,null,r.createElement(D,{title:e.filter.name}),r.createElement("div",{className:"mb-2"},r.createElement(oe,{ratings:i,selections:e.draftState.selection,onSelectRange:function(t){e.setDraftState({active:!!t.length,selection:t})},disabled:e.filter.disabled,isDisabled:function(e){return e.disabled},getButtonClasses:function(e,t,n){var r="btn border text-nowrap";return r+=t||n?" btn-dark":" btn-outline-dark",n&&(r+=" active"),1===a.length?r+=" rounded":o.id===e.id?r+=" sLa86":l.id===e.id?r+=" xDcnT":r+=" rounded-0",r}})))}var se="filters.";function ue(e){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ue(e)}var de,fe={type:!0},me=["sort","classification","presentation","audience","yearGroup","moviesAndTv","type","rating","interactives","clips","classroom","hasResources","hasSubtitles","productionYear","isHd","producedByClickView","duration","tagOrClassification","status","isAdmin","bulkActionType","userType","filter","channel","dateBroadcast","categoryId","hasInteractives","jobStatus","source"].reduce((function(e,t){return Object.assign(Object.assign({},e),(n={},i=!fe[t],(r=function(e){var t=function(e,t){if("object"!=ue(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ue(t)?t:t+""}(r=t))in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n));var n,r,i}),{});!function(e){e.MyVideos="my-videos",e.School="school",e.ExchangeArchive="exchange-archive",e.ClickView="clickview"}(de||(de={}));var ve=n(75459);function pe(e){return pe="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},pe(e)}function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}a.T.encloseNamespace("sharedSearch.utils");var ge,be,he,Se,Ee,Ae,Ce="".concat(se,"library"),we=function(e,t){return(Array.isArray(e)?e:[e]).reduce((function(e,n){return t.reduce((function(e,t){var r,i=e[Ce]||[];return n===de.MyVideos&&t.type===ve.r.Workspace||n===de.School&&t.type===ve.r.CustomLibrary||n===de.ExchangeArchive&&t.type===ve.r.Exchange||n===de.ClickView&&t.type===ve.r.HostedLibrary?Object.assign(Object.assign({},e),function(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=pe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=pe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pe(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},Ce,[].concat(function(e){if(Array.isArray(e))return ye(e)}(r=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return ye(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[t.id.toString()]))):e}),e)}),{})};!function(e){e.CLICKVIEW_CURATED="is_clickview_curated",e.MOVIES_AND_TV="is_movies_and_tv",e.STREAMABLE_CURATED="is_streamable_learning_curated"}(ge||(ge={})),n(11306),n(79410),n(56285),n(1268),n(74483),n(46237),n(38182),n(76044),function(e){e.Online="online",e.Primary="primary",e.Curator="curator"}(be||(be={})),n(52086),i().createContext({}),function(e){e[e.Unknown=0]="Unknown",e[e.Staff=1]="Staff",e[e.Learner=2]="Learner",e[e.MasterVideo=3]="MasterVideo"}(he||(he={})),function(e){e.YearGroupRollover="year-group-rollover",e.ChangeYearGroup="change-year-group",e.DeleteUser="delete-user",e.RemoveUser="remove-user",e.DeactivateUser="deactivate-user",e.ActivateUser="activate-user",e.AddToClassroom="add-to-classroom",e.ResetPassword="reset-password",e.SendResetPasswordEmail="send-reset-password-email",e.SendAccountActivationEmail="send-account-activation-email",e.CreateUser="create-user",e.AddToAudience="add-to-audience",e.AddToBackboneClassification="add-to-backbone-classification",e.AddToBackboneAudience="add-to-backbone-audience",e.AddToClassification="add-to-classification",e.AddToSeries="add-to-series",e.AddToDirector="add-to-director",e.AddToDistributor="add-to-distributor",e.AddToProductionCompany="add-to-production-company",e.AddToProducer="add-to-producer",e.AddToLibrary="add-to-library",e.AddToCurationTag="add-to-curation-tag",e.AddToSkillTag="add-to-skill-tag",e.AddToPedagogyTag="add-to-pedagogy-tag",e.AddToNormalTag="add-to-normal-tag",e.AddToHiddenTag="add-to-hidden-tag",e.AddResourceAndLink="add-resource-and-link",e.Rostering="rostering"}(Se||(Se={})),function(e){e[e.NoAction=1]="NoAction",e[e.Succeed=1]="Succeed",e[e.Unknown=10]="Unknown",e[e.CustomerNotFound=100]="CustomerNotFound",e[e.UserNotFound=101]="UserNotFound",e[e.EmailNotVerified=131]="EmailNotVerified",e[e.UserDisabled=133]="UserDisabled",e[e.InvalidYearGroup=200]="InvalidYearGroup",e[e.MissingYearGroup=201]="MissingYearGroup",e[e.NewYearGroupNotSet=202]="NewYearGroupNotSet",e[e.ObjectNotFoundInBackboneClassification=300]="ObjectNotFoundInBackboneClassification",e[e.ObjectNotFoundInBackboneAudience=301]="ObjectNotFoundInBackboneAudience"}(Ee||(Ee={})),function(e){e[e.RolloverYearGroup=1]="RolloverYearGroup",e[e.DeactivateUser=2]="DeactivateUser",e[e.ChangeYearGroup=3]="ChangeYearGroup",e[e.DeleteUser=4]="DeleteUser",e[e.CreateUser=5]="CreateUser",e[e.ResetPassword=6]="ResetPassword",e[e.AddUsersClassroom=7]="AddUsersClassroom",e[e.SendAccountReminderEmail=8]="SendAccountReminderEmail",e[e.ActivateUser=9]="ActivateUser",e[e.AddToBackboneClassification=10]="AddToBackboneClassification",e[e.AddToClassification=11]="AddToClassification",e[e.AddToBackboneAudience=12]="AddToBackboneAudience",e[e.AddToAudience=13]="AddToAudience",e[e.AddVideosSeries=14]="AddVideosSeries",e[e.AddVideosDistributor=15]="AddVideosDistributor",e[e.AddVideosProductionCompany=16]="AddVideosProductionCompany",e[e.AddVideosProducer=17]="AddVideosProducer",e[e.AddVideosDirector=18]="AddVideosDirector",e[e.AddVideosLibrary=19]="AddVideosLibrary",e[e.AddVideosResourceAndLinks=21]="AddVideosResourceAndLinks",e[e.AddVideosTag=22]="AddVideosTag",e[e.SendAccountActivationEmail=23]="SendAccountActivationEmail",e[e.RemoveUser=24]="RemoveUser",e[e.Rostering=25]="Rostering"}(Ae||(Ae={})),n(74421),n(84868),a.T.encloseNamespace("userManager.utils"),Ae.ActivateUser,Ae.AddUsersClassroom,Ae.ChangeYearGroup,Ae.DeactivateUser,Ae.DeleteUser,Ae.ResetPassword,Ae.RolloverYearGroup,Ae.SendAccountReminderEmail,Ae.CreateUser,Ae.SendAccountActivationEmail,Ae.RemoveUser;var ke=(a.T.encloseNamespace("sharedSearch.utils"),function(e){switch(e){case"bite-sized":return"...179999";case"short":return"180000...299999";case"medium":return"300000...899999";case"long":return"900000..."}}),Le=(a.T.encloseNamespace("sharedSearch.utils"),function(e){var t=(new Date).getFullYear();switch(e){case"any-year":return"";case"this-year":return"".concat(t,"...");case"last-3-years":return"".concat(t-3,"...");case"last-5-years":return"".concat(t-5,"...")}});function Oe(e,t){return e.split("-to-").map((function(e){return t.find((function(t){return t.code===e}))}))}function Ne(e){return Ne="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},Ne(e)}function Te(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Ne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ne(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _e(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Re(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}function je(e){return function(e){if(Array.isArray(e))return xe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Re(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Re(e,t){if(e){if("string"==typeof e)return xe(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xe(e,t):void 0}}function xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ie=a.T.encloseNamespace("sharedSearch.utils"),Pe={classification:!0,categoryId:!0,channel:!0},Fe={displayTwoLayers:function(e){var t=this;return"nested-checkbox"===e.type&&!!this.hasManyFilterOptions(e.options)&&!e.options.every((function(e){return!t.hasManyFilterOptions(null==e?void 0:e.secondLayerOptions)}))},hasManyFilterOptions:function(e){return e.length>=2},displayTwoColumns:function(e){var t;return Pe[e.id]&&(null===(t=e.options)||void 0===t?void 0:t.length)>=10},showPresentationFilter:function(e){var t,n;return!!(null===(t=e.options)||void 0===t?void 0:t.length)&&(e.options.length>1||!!(null===(n=L.m.first(e.options).secondLayerOptions)||void 0===n?void 0:n.length))},getMoreFilters:function(e){return{id:"moreFilters",name:Ie("moreFilters"),type:"more-filters",filters:e}},mapTypeToComponent:function(e){switch(e){case"switch":return function(e){return r.createElement(Z,Object.assign({key:e.id},e))};case"checkbox":return function(e){return r.createElement(U,Object.assign({key:e.id},e))};case"nested-checkbox":return function(e){return r.createElement($,Object.assign({key:e.id},e))};case"radio":return function(e){return r.createElement(J,Object.assign({key:e.id},e))};case"rating":return function(e){return r.createElement(ce,Object.assign({key:e.id},e))};case"dropdown":return function(e){return r.createElement(K,Object.assign({key:e.id},e))};default:return function(){return r.createElement(r.Fragment,null)}}},deriveInitialStateFromQuery:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0,i={sort:{active:!!e.sort,selection:De(e,t,"sort")},classification:{active:!!e.classification,selection:De(e,t,"classification")},presentation:{active:!!e.presentation,selection:De(e,t,"presentation")},type:{active:!!e.type,selection:De(e,t,"type")},rating:{active:!!e.rating,selection:De(e,t,"rating")},interactives:{active:e.interactives},clips:{active:e.clips},yearGroup:{active:!!e.yearGroup,selection:De(e,t,"yearGroup")},moviesAndTv:{active:!!e.moviesAndTv},classroom:{active:!!e.classroom,selection:De(e,t,"classroom")},audience:{active:!!e.audience,selection:De(e,t,"audience")},hasResources:{active:e.hasResources},hasSubtitles:{active:e.hasSubtitles},productionYear:{active:!!e.productionYear,selection:De(e,null==n?void 0:n.filters,"productionYear")},isHd:{active:e.isHd},producedByClickView:{active:e.producedByClickView},duration:{active:e.duration,selection:De(e,null==n?void 0:n.filters,"duration")},tagOrClassification:{active:!!e.tagOrClassification,selection:De(e,t,"tagOrClassification")},status:{active:!!e.status,selection:De(e,t,"status")},jobStatus:{active:!!e.jobStatus,selection:De(e,t,"jobStatus")},isAdmin:{active:e.isAdmin},bulkActionType:{active:!!e.bulkActionType,selection:De(e,t,"bulkActionType")},userType:{active:!!e.userType,selection:De(e,t,"userType")},filter:{active:!!e.filter,selection:De(e,t,"filter")},channel:{active:!!e.channel,selection:De(e,t,"channel")},dateBroadcast:{active:!!e.dateBroadcast,selection:De(e,t,"dateBroadcast")},categoryId:{active:!!e.categoryId,selection:De(e,t,"categoryId")},hasInteractives:{active:!!e.hasInteractives,selection:De(e,t,"hasInteractives")},source:{active:!!e.source,selection:De(e,t,"source")}},a=t.reduce((function(e,t){return e[t.id]=i[t.id],e}),{});return(null==n?void 0:n.filters)&&(a.moreFilters=n.filters.reduce((function(e,t){return e[t.id]=i[t.id],e}),{})),a.appLink=r,a},hasActiveFilters:function(e){var t=Object.keys(e);return!!t.length&&!!t.filter((function(t){return"query"!==t&&"cursor"!==t&&"page"!==t&&!(Array.isArray(e[t])&&!e[t].length)})).length},getLabel:function(e,t){var n,r;if(!(null===(n=null==t?void 0:t.selection)||void 0===n?void 0:n.length))return e.name;if("dropdown"===e.type)return L.m.first(t.selection).name;if("radio"===e.type){var i=L.m.first(t.selection);return!i||i.default?e.name:i.name}if("nested-checkbox"===e.type||"checkbox"===e.type){var a=e.options.find((function(e){return e.default&&t.selection.find((function(t){return t.id===e.id}))}));if(a)return e.name;if(e.secondaryId){var o=null===(r=t.selection)||void 0===r?void 0:r.reduce((function(t,n){var r,i,a,o=e.options,l=o.findIndex((function(e){return e.id===n.id}));return 0===(null===(r=o[l].secondLayerOptions)||void 0===r?void 0:r.length)?t+1:null!==(a=t+(null===(i=n.secondLayerSelection)||void 0===i?void 0:i.length))&&void 0!==a?a:0}),0);return"".concat(e.name," - ").concat(o)}return"".concat(e.name," - ").concat(t.selection.length)}if("rating"===e.type){if(!t.selection.length)return e.name;var l=L.m.first(t.selection),c=L.m.last(t.selection);return 1===t.selection.length?"".concat(e.name,": ").concat(l.code):"".concat(e.name,": ").concat(l.code," to ").concat(c.code)}},buildFrontendFilterParams:function(e,t){var n=Object.assign({},e);return t.forEach((function(e){var t,r;if(null==e?void 0:e.filter){var i=e.filter,a=i.id,o=i.type,l=e.state,c=l.active,s=l.selection;switch(o){case"switch":case"button":n[a]=c?"true":"";break;case"radio":case"dropdown":var u=1===(null===(t=e.state.selection)||void 0===t?void 0:t.length)&&(null===(r=L.m.first(e.state.selection))||void 0===r?void 0:r.default);n[a]=e.state.selection.length&&!u?L.m.first(e.state.selection).id:"";break;case"nested-checkbox":n[a]=c?s.map((function(e){return e.id})):null;var d,f=e.filter.secondaryId;f&&(n[f]=(d=[]).concat.apply(d,je(s.map((function(e){return e.secondLayerSelection.map((function(e){return e.id}))})))));break;case"checkbox":if(!c){n[a]=null;break}var m,v=[],p=_e(s);try{for(p.s();!(m=p.n()).done;){var y=m.value,g=y.id.toString().split(":");if(g.length>1){var b,h=_e(g);try{for(h.s();!(b=h.n()).done;){var S=b.value;v.push(S)}}catch(e){h.e(e)}finally{h.f()}}else v.push(y.id)}}catch(e){p.e(e)}finally{p.f()}n[a]=v;break;case"tag":n[a]=c?s.map((function(e){return e.id})):null;break;case"rating":n[a]=c?function(e){if(!(null==e?void 0:e.length))return"";var t=L.m.first(e),n=L.m.last(e);return 1===e.length?t.code:"".concat(t.code,"-to-").concat(n.code)}(s):null}n[a]||delete n[a]}})),O.t.omit(n,["cursor"])},buildBackendFilterParams:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,i=n?Te(Te({},"filters.presentation",arguments.length>2?arguments[2]:void 0),"isLearner",n):{};return Object.keys(e).reduce((function(n,i){var a=e[i];return Array.isArray(a)&&!a.length||!a?n:me[i]?"rating"===i?(n["".concat(se).concat(i)]=function(e,t){var n=Oe(e,t);if(1===n.length){var r=L.m.first(n);return"0...".concat(r.value)}var i=L.m.last(n);return"0...".concat(i.value)}(a,t),n):"productionYear"===i?(n["".concat(se).concat(i)]=Le(a),n):"duration"===i?(n["".concat(se).concat(i)]=ke(a),n):"moviesAndTv"===i?(n["".concat(se,"curationTag")]=ge.MOVIES_AND_TV,n):"source"===i?Object.assign(Object.assign({},n),we(a,r)):(n["".concat(se).concat(i)]=a,n):n}),i)},getAppliedIndices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.type;if(t){if(!Array.isArray(t))return[t];if(t.length)return t}return e.source?["video","clip","interactive"]:["series","video","playlist","classification","clip","interactive","company"]},applyFilter:function(e,t,n,r){if(!O.t.isEqual(t,n)){var i=Object.keys(n).map((function(t){var r,i,a=e.find((function(e){return e.id===t})),o=n[t],l=1===(null===(r=o.selection)||void 0===r?void 0:r.length)&&(null===(i=L.m.first(o.selection))||void 0===i?void 0:i.default);return{filter:a,state:{active:o.active&&!l,selection:o.selection}}})),a=P.Q.Ab.GetQuery();P.Q.C$.trigger(Object.assign(Object.assign({},r),{params:Fe.buildFrontendFilterParams(a,i)}),{replace:!0})}},mixinDisabledFields:function(e,t,n,r){var i,a=[].concat(je(n),je(null!==(i=null==r?void 0:r.filters)&&void 0!==i?i:[]));a=function(e,t,n){var r=n.reduce((function(e,t){return e[t]=!0,e}),{});return t.map((function(n){var i;if(!(null===(i=n.compatibleIndices)||void 0===i?void 0:i.length))return n;if(!n.compatibleIndices.find((function(e){return r[e]})))return Object.assign(Object.assign({},n),{disabled:!0});var a=Object.keys(e).filter((function(t){var n=e[t];return"active"in n&&n.active})),o=!1;return a.forEach((function(e){var r;if(!o){var i=t.find((function(t){return t.id===e}));if(null===(r=i.compatibleIndices)||void 0===r?void 0:r.length){var a=i.compatibleIndices.reduce((function(e,t){return e[t]=!0,e}),{});n.compatibleIndices.find((function(e){return a[e]}))||(o=!0)}}})),Object.assign(Object.assign({},n),{disabled:o})}))}(e,a,t),a=function(e,t){return t.map((function(n){if(!I.q.isFunction(n.disableOptions))return n;var r=n.disableOptions(n.options,t,e);return Object.assign(Object.assign({},n),{options:r})}))}(e,a);var o={mainFilters:a.filter((function(e){return n.find((function(t){return t.id===e.id}))}))};return(null==r?void 0:r.filters)&&(o.moreFilters=Object.assign(Object.assign({},r),{filters:a.filter((function(e){return r.filters.find((function(t){return t.id===e.id}))}))})),o},logFilterEvent:function(e,t,n,r,i){var a,o=[];null==e||e.forEach((function(e){var t=n[e.id];t.active&&o.push({type:e.id,selection:t.selection})})),null===(a=null==t?void 0:t.filters)||void 0===a||a.forEach((function(e){var t=n.moreFilters[e.id];t.active&&o.push({type:e.id,selection:t.selection})})),o.length||(i.descriptor=k.OR.Reset),F.k.logUserAction({query:null!=r?r:"",filters:o},F.k.mergeOptions(i,{workflowPhase:k.eu.Complete,actionType:k.Vw.Filter}))},getObjectTypeOptions:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return[{id:"classification",name:Ie("topics")},{id:"playlist",name:Ie("playlists")},{id:"series",name:Ie("series")},{id:"video",name:Ie("videos")},{id:"clip",name:Ie("clips")},{id:"interactive",name:Ie("interactives")}].filter((function(t){return!e.find((function(e){return e===t.id}))}))},getIsObjectTypeOptionDisabled:function(e,t,n){return e.map((function(e){var r=!1;return t.forEach((function(t){var i;if(!r){var a=n[t.id]||n.moreFilters[t.id];(null==a?void 0:a.active)&&(null===(i=t.compatibleIndices)||void 0===i?void 0:i.length)&&(t.compatibleIndices.find((function(t){return e.id===t}))||(r=!0))}})),Object.assign(Object.assign({},e),{disabled:r})}))},getNameSortOptions:function(){return[{id:"newest",name:Ie("newest")},{id:"oldest",name:Ie("oldest")},{id:"first-name-atoz",name:Ie("firstNameAToZ")},{id:"first-name-ztoa",name:Ie("firstNameZToA")},{id:"surname-atoz",name:Ie("surnameAToZ")},{id:"surname-ztoa",name:Ie("surnameZToA")}]},getYearGroupOptions:function(e){return(null==e?void 0:e.length)?e.map((function(e){return{id:e.value.toString(),name:e.name}})):[]},getStatusOptions:function(){return[{id:"active",name:Ie("active")},{id:"deactivated",name:Ie("deactivated")},{id:"pending",name:Ie("pending")}]},getJobStatusOptions:function(){return[{id:"completed",name:Ie("completed")},{id:"failed",name:Ie("errored")},{id:"inProgress",name:Ie("inProgress")}]},getTvFieldsOptions:function(){return[{id:"0",name:Ie("allFields"),default:!0},{id:"1",name:Ie("titleDescriptionField")},{id:"2",name:Ie("captionsField")}]},getTvChannelOptions:function(e){return(null==e?void 0:e.length)?e.map((function(e){return{id:e.name,name:e.name}})):[]},getTvDateBroadcastOptions:function(){return[{id:"any-time",name:Ie("anyTime"),default:!0},{id:"yesterday",name:Ie("yesterday")},{id:"last-week",name:Ie("lastWeek")},{id:"last-2-weeks",name:Ie("last2Weeks")}]},getCategoriesOptions:function(e){return(null==e?void 0:e.length)?e.map((function(e){return{id:e.data.id,name:e.data.name}})):[]}};function De(e){var t,n,r=arguments.length>2?arguments[2]:void 0,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).find((function(e){return e.id===r}));if(!i)return[];if(!e[r])return null!==(n=null===(t=i.options)||void 0===t?void 0:t.filter((function(e){return e.default})))&&void 0!==n?n:[];if("rating"===r)return function(e,t){if(Array.isArray(e))return e;var n=t.options,r=Oe(e,n),i=L.m.last(r);return n.filter((function(e){return e.value>0&&e.value<=i.value}))}(e[r],i);var a=e[r];return Array.isArray(a)||(a=[a]),"classification"===r?function(e,t){var n,r;return null!==(r=null===(n=null==e?void 0:e.options)||void 0===n?void 0:n.filter((function(e){return e.id.split(":").every((function(e){return t.find((function(t){return t.toString()===e.toString()}))}))})))&&void 0!==r?r:[]}(i,a):"presentation"===r?function(e,t,n){return Be(e,t).map((function(e){var t=n.audience,r=Be(e.secondLayerOptions,t);return Object.assign(Object.assign({},e),{secondLayerSelection:r})}))}(i.options,a,e):Be(i.options,a)}function Be(e,t){var n;return Array.isArray(t)||(t=[t]),null!==(n=null==e?void 0:e.filter((function(e){return t.find((function(t){return t.toString()===e.id.toString()}))})))&&void 0!==n?n:[]}var qe={hideCaret:"KDq7l",filterMenu:"E9o_Q",twoColumnsWidth:"C70vU",nestedCheckboxesWidth:"kUHcg",switchWidth:"bi1FH",moreFiltersWidth:"rbr22",svgContainer:"UwDMA"};function Me(e){return Me="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},Me(e)}function Ue(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ve(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ve(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Ge(e){var t=r.useContext(R).state,n=t[e.filter.id],i="dropdown"===e.filter.type,a=Ue(r.useState(e.filter.name),2),o=a[0],l=a[1],c=Ue(r.useState(!1),2),s=c[0],u=c[1],d=Ue(r.useState(n),2),f=d[0],m=d[1];function v(e){m(e),i&&p(e)}function p(){var r,i,a,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;Fe.applyFilter([e.filter],n,(r={},i=e.filter.id,a=o,(i=function(e){var t=function(e,t){if("object"!=Me(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Me(t)?t:t+""}(i))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r),t.appLink)}r.useEffect((function(){l(Fe.getLabel(e.filter,n)),m(n)}),[e.filter,null==n?void 0:n.selection]);var y,g=r.useMemo((function(){return e.filter.customComponent?e.filter.customComponent:Fe.mapTypeToComponent(e.filter.type)}),[e.filter.type]),b=e.hideCaret&&!i?qe.hideCaret:"",h=(y=e.filter,Fe.displayTwoColumns(y)?qe.twoColumnsWidth:"classification"===y.id?qe.classificationWidth:Fe.displayTwoLayers(y)?qe.nestedCheckboxesWidth:"switch"===y.type?qe.switchWidth:"");return"button"===e.filter.type?r.createElement(g,{filter:e.filter,draftState:f,setDraftState:v}):r.createElement(N.Dropdown,{onToggle:function(e){u(e),e||i||p()},show:s},r.createElement(N.Dropdown.Toggle,{id:"filterButton-".concat(e.filter.id),className:"".concat("fw-semibold mx-1 btn d-flex align-items-center"," ").concat(b),variant:n.active&&!i?"dark":"outline-dark",disabled:e.filter.disabled},!!e.filter.icon&&r.createElement("div",{className:qe.svgContainer},r.createElement(S.x,{svgName:e.filter.icon})),e.filter.labelPrefix," ",o),r.createElement(N.Dropdown.Menu,null,r.createElement("div",{className:"mx-1 ".concat(qe.filterMenu," ").concat(h," ").concat(i?"":"px-2 py-1")},r.createElement(g,{filter:e.filter,draftState:f,setDraftState:v}),!i&&!e.filter.disabled&&r.createElement(j,{active:f.active,onClickReset:function(){var t,n=null===(t=e.filter.options)||void 0===t?void 0:t.find((function(e){return e.default}));m({active:!1,selection:n?[n]:[]})},onClickApply:function(){p(),u(!1)}}))))}function Xe(e){return Xe="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},Xe(e)}Ge.defaultProps={hideCaret:!0};var Ye={getSetStateByKey:function(e,t,n){return function(r){return e((function(e){var i,a,o,l=I.q.isFunction(n)?n:I.q.useIdentity();return Object.assign(Object.assign({},e),(i={},a=t,o=l(r,e),(a=function(e){var t=function(e,t){if("object"!=Xe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Xe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xe(t)?t:t+""}(a))in i?Object.defineProperty(i,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[a]=o,i))}))}}};function Qe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return He(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?He(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function We(e){return Object.keys(e).reduce((function(t,n){return e[n].active?t+1:t}),0)}function $e(e){var t=r.useContext(R).state,n=t.moreFilters,i=Qe(r.useState(e.filter.name),2),a=i[0],o=i[1],l=Qe(r.useState(!1),2),c=l[0],s=l[1],u=Qe(r.useState(n),2),d=u[0],f=u[1],m=Qe(r.useState(We(n)),2),v=m[0],p=m[1],y=Object.keys(n).map((function(e){return"".concat(e,":").concat(n[e].active)})).join("-");function g(){Fe.applyFilter(e.filter.filters,n,d,t.appLink)}r.useEffect((function(){f(n),p(We(n))}),[e.filter,y]),r.useEffect((function(){o(v?"".concat(e.filter.name," - ").concat(v):e.filter.name)}),[v]);var b="fw-semibold ".concat(qe.hideCaret," mx-1 btn");return r.createElement(N.Dropdown,{onToggle:function(e){s(e),e||g()},show:c},r.createElement(N.Dropdown.Toggle,{id:e.filter.id,className:b,variant:v?"dark":"outline-dark"},a),r.createElement(N.Dropdown.Menu,{onClick:function(e){return e.stopPropagation()}},r.createElement("div",{className:"mx-1 ".concat(qe.moreFiltersWidth," ").concat("dropdown"!==e.filter.type?"px-2 py-1":"")},e.filter.filters.map((function(e){var t=e.customComponent?e.customComponent:Fe.mapTypeToComponent(e.type);return r.createElement("fieldset",{key:e.id},r.createElement(t,{filter:e,draftState:d[e.id],setDraftState:Ye.getSetStateByKey(f,e.id),isOnMoreFilters:!0}))})),r.createElement(j,{active:!!Object.keys(d).find((function(e){return d[e].active})),onClickReset:function(){var t=Object.keys(n).reduce((function(t,n){var r,i=null===(r=e.filter.filters.find((function(e){return e.id===n})).options)||void 0===r?void 0:r.find((function(e){return e.default}));return t[n]={active:!1,selection:i?[i]:[]},t}),{});f(t)},onClickApply:function(){g(),s(!1)}}))))}var ze,Ze={tagList:"Zw6d9",disabled:"jlL1c",partialTag:"too_N",badge:"OjtN8",close:"X9joI"},Ke=i().memo((function(e){var t=e.tagClass,n="partial-loading-background d-inline-block rounded-pill py-1 px-2 mb-1 me-1 text-nowrap ".concat(void 0===t?"":t," ").concat(Ze.partialTag);return i().createElement("div",{className:"mt-1"},i().createElement("span",{className:n}," "))})),Je=n(37360),et=n(49642),tt={seeMore:"yv0FS"},nt=a.T.encloseNamespace("shared.widgetHeader");function rt(e){return i().createElement("div",{className:"ms-3 ".concat(tt.seeMore)},i().createElement(et.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:k._S.SeeMore}),className:"text-decoration-none ".concat(e.appLink?"curated-widget-link":"")},i().createElement("p",{className:"hover-text-underline text-dark curated-widget-heading"},nt("seeMore"))))}function it(e){var t=!!e.description;return e.name||e.description?i().createElement("div",{className:"curated-widget-header"},i().createElement("div",{className:"d-flex justify-content-between"},!!e.name&&i().createElement("div",{className:tt.title},i().createElement(et.F,{appLink:e.appLink,analyticsOptions:e.analyticsOptions,analyticsData:e.analyticsData,className:"text-decoration-none ".concat(e.appLink?"curated-widget-link":""),onClick:e.onClick},i().createElement("h2",{className:"h4 curated-widget-heading"},e.name))),!!e.appLink&&!t&&!!e.showSeeMoreLink&&i().createElement(rt,Object.assign({},e))),t&&i().createElement("div",{className:"d-flex justify-content-between align-items-end"},i().createElement("p",{className:"description curated-widget-description ".concat(tt.description)},i().createElement("span",null,e.description)),!!e.appLink&&!!e.showSeeMoreLink&&i().createElement(rt,Object.assign({},e)))):i().createElement(i().Fragment,null)}!function(e){e.Percentage="%",e.Pixels="px"}(ze||(ze={}));var at=new Image;at.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=";var ot,lt=function(e){e.dataTransfer.setDragImage&&I.q.isFunction(e.dataTransfer.setDragImage)&&e.dataTransfer.setDragImage(at,0,0)},ct=Je.V.isTouchScreen(),st=r.forwardRef((function(e,t){var n,i,a,o,l=e.children,c=e.positionType,s=e.onDrag,u=e.onDragEnd,d=e.onTouchMove,f=e.onTouchEnd,m=e.percentageDragged,v=e.position,p=void 0===v?0:v;return r.createElement("div",Object.assign({className:"d-flex flex-nowrap position-relative w-100",style:(i=p,a=c,o=m,a===ze.Percentage&&o&&(i-=o),{transform:"translate3d(".concat(i).concat(a,", 0px, 0px)"),transition:"transform .4s ease-in-out"}),ref:t},(n={},s&&u&&(n.draggable=!0,n.onDragEnd=u,n.onDragStart=lt,n.onDragOver=s),d&&f&&ct&&(n.onTouchMoveCapture=d,n.onTouchEndCapture=f),n)),l)})),ut="VSAPU",dt="kgeXh";!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(ot||(ot={}));var ft,mt=r.memo((function(e){var t,n,i,a=e.direction===ot.Left,o=a?E.vn.ChevronLeft:E.vn.ChevronRight;return e.hide?r.createElement(r.Fragment,null):r.createElement("div",{className:"_ejId",style:"videos"===(null===(n=e.state)||void 0===n?void 0:n.contents)?{paddingBottom:56.25/(null===(i=e.state)||void 0===i?void 0:i.viewableItems)+"%"}:{height:"100%"}},e.useGradientBackdrop&&r.createElement("div",{className:a?"".concat("Pt3nx"," ").concat(e.leftGradientClassName):"".concat("ZuAif"," ").concat(e.rightGradientClassName)}),!e.hideExtendedClickableArea&&r.createElement("div",{role:"button",onClick:e.onClick,className:"".concat("AtsWP"," ").concat(a?ut:dt)}),r.createElement("div",{role:"button",className:"".concat((t="BVcIS",t+=a?" ".concat(ut," ").concat(e.leftButtonClassName):" ".concat(dt," ").concat(e.rightButtonClassName))," ").concat("gAsE9"," ").concat(e.className||""),onClick:e.onClick},e.hoverText&&r.createElement("span",{className:"ps-3 pe-2 ".concat("APA36")},e.hoverText),r.createElement(S.x,{svgName:o,size:S.S.Medium,className:"svg-container d-inline-block ".concat("Ev4hr")})))}));!function(e){e.Init="init",e.Next="next",e.Previous="previous",e.Resize="resize",e.Drag="drag",e.Update="update",e.JumpToIndex="jump-to-index"}(ft||(ft={}));var vt=n(90547),pt=n(5256),yt=n(29267);function gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var bt,ht,St,Et=n(89146);!function(e){e[e.Draft=0]="Draft",e[e.Published=1]="Published",e[e.Archived=2]="Archived"}(bt||(bt={})),function(e){e.ThumbnailHeroMedia="thumbnail_hero_media",e.ThumbnailFeaturedMedia="thumbnail_featured_media",e.ThumbnailSlidingListSmall="thumbnail_sliding_list_small",e.ThumbnailSlidingListSmallV2="thumbnail_sliding_list_small_v2",e.ThumbnailSlidingListLarge="thumbnail_sliding_list_large",e.ThumbnailFixedListMediaLarge="thumbnail_fixed_list_media_large",e.ThumbnailVerticalList="thumbnail_vertical_list",e.PopoutThumbnailSlidingListLarge="popout_thumbnail_sliding_list_large",e.PopoutThumbnailSlidingListSmall="popout_thumbnail_sliding_list_small",e.FeaturedThumbnailSlidingList="featured_thumbnail_sliding_list",e.ThumbnailFixedListXLarge="thumbnail_fixed_list_xlarge",e.CoverSlidingPillListSmall="cover_sliding_pill_list_small",e.CoverFixedPillListLarge="cover_fixed_pill_list_large",e.StatsCoverFixedPillListLarge="stats_cover_fixed_pill_list_large",e.CoverFixedPillListXSmall="cover_fixed_pill_list_xsmall",e.ThumbnailFixedListLarge="thumbnail_fixed_list_large",e.ThumbnailFixedListSmall="thumbnail_fixed_list_small",e.EditableCoverFixedPillListSmall="editable_cover_fixed_pill_list_small",e.HeroBanner="hero_banner",e.HeroThumbnailSmall="hero_thumbnail_small",e.HeroBlockColourSmall="hero_block_colour_small",e.CoverFixedTileList="cover_fixed_tile_list",e.PosterSlidingListLarge="poster_sliding_list_large",e.PosterSlidingListMedium="poster_sliding_list_medium",e.PosterSlidingListSmall="poster_sliding_list_small",e.HeroBannerSmall="hero_banner_small",e.Heading="heading",e.AuthorReviewer="author_reviewer",e.Question="question",e.QuestionAccordion="question_accordion",e.OnboardingSteps="onboarding_steps",e.CircleLogoSlidingList="circle_logo_sliding_list",e.FilterSlidingPillListSmall="filter_sliding_pill_list_small",e.EventIconSlidingList="event_icon_sliding_list"}(ht||(ht={})),function(e){e.CuratedMedia="curated_media",e.PlaylistMedia="playlist_media",e.ClassificationMedia="classification_media",e.LatestReleasedVideos="latest_released_videos",e.ContinueWatching="continue_watching_videos",e.CompanyLatestReleasedVideo="company_latest_released_video",e.CompanyVideos="company_videos",e.ClassificationLatestReleasedVideo="classification_latest_released_video",e.ClassificationLatestReleasedVideosV2="classification_latest_released_videos_v2",e.CompanyClassificationVideos="company_classification_videos",e.CuratedClassifications="curated_classifications",e.Classifications="classifications",e.ClassificationLatestReleasedVideos="classification_latest_released_videos",e.SpecialEventClassifications="special_event_classifications",e.LatestReleasedClassifications="latest_released_classifications",e.CuratedSeries="curated_series",e.CuratedPlaylists="curated_playlists",e.Blurb="blurb",e.DynamicBlurb="dynamic_blurb",e.AuthorReviewer="author_reviewer",e.Faq="faq",e.CuratedCompanies="curated_companies",e.Ratings="ratings",e.Presentations="presentations",e.UpcomingLivestreams="upcoming_livestreams",e.CuratedMultimedia="curated_multimedia",e.ClassificationPlaylists="classification_playlists",e.ClassificationSeries="classification_series",e.ClassificationFeaturedVideo="classification_featured_video",e.ClassificationPinnedVideos="classification_pinned_videos"}(St||(St={}));var At,Ct=n(71551);function wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e.Draft="Draft",e.Published="Published",e.Archived="Archived"}(At||(At={}));var kt={getSliderAnalyticsOptions:function(){return{actionType:k.Vw.Click,location:k.LZ.SlidingList,entity:k.py.Widget,descriptor:k._S.Slide}},getSliderItemAnalyticsOptions:function(){return{location:k.LZ.SlidingListItem}},getSliderHeadingAnalyticsOptions:function(){return{actionType:k.Vw.Click,location:k.LZ.SlidingList,entity:k.py.Widget,descriptor:k._S.Title}},useGetContent:function(e,t){return i().useMemo((function(){var n;if(!e)return{content:null,unfilteredContent:null};if(!Array.isArray(e))return{content:e,unfilteredContent:e};var r,i=null!==(n=null==t?void 0:t.reduce((function(e,t){return e[t.id]=t,e}),{}))&&void 0!==n?n:{},a=function(e){if(Array.isArray(e))return wt(e)}(r=e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return wt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wt(e,t):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=a.sort((function(e,t){var n,r,o,l,c=null!==(r=null===(n=i[e.id])||void 0===n?void 0:n.index)&&void 0!==r?r:a.findIndex((function(t){return t.id===e.id})),s=null!==(l=null===(o=i[t.id])||void 0===o?void 0:o.index)&&void 0!==l?l:a.findIndex((function(e){return e.id===t.id}));return c<s?-1:c>s?1:0}));return{content:o.filter((function(e){var t;return!(null===(t=i[e.id])||void 0===t?void 0:t.hidden)})),unfilteredContent:o}}),[e,t])},getCustomAppLink:function(e){var t,n,r,i,a,o;return(null===(t=e.metadata)||void 0===t?void 0:t.appLink)===Ct.OL.LatestReleases?null===(r=null===(n=e.appLinks)||void 0===n?void 0:n.latestReleases)||void 0===r?void 0:r.call(n):(null===(i=e.metadata)||void 0===i?void 0:i.appLink)===Ct.OL.ExploreAllTopics?null===(o=null===(a=e.appLinks)||void 0===a?void 0:a.allTopics)||void 0===o?void 0:o.call(a,e.presentation.id):null},getWidgetStatus:function(e){var t=e.status;if("string"==typeof t)switch(t){case At.Archived:t=bt.Archived;break;case At.Published:t=bt.Published;break;case At.Draft:t=bt.Draft}return t},formatResponseData:function(e,t){var n=e.content;if(!n)return e;if("author"in n)return e.content=[n],e;switch("data"in n?e.content=n.data:Array.isArray(n)||(e.content=[n]),e.widgetId){case St.ClassificationSeries:e.content=e.content.filter((function(e){var t;return!!(null===(t=e.tallPoster)||void 0===t?void 0:t.id)}));break;case St.ClassificationPlaylists:e.content=e.content.filter((function(e){var t;return!!(null===(t=e.cover)||void 0===t?void 0:t.id)}));break;case St.ContinueWatching:e.content=e.content.map((function(e){return e.object}));default:break;case St.Presentations:e.content=e.content.filter((function(e){var n;return e.id.toString()!==(null===(n=null==t?void 0:t.id)||void 0===n?void 0:n.toString())}))}return e},isWidgetInTableOfContents:function(e){return!!(null==e?void 0:e.showInTableOfContents)},hasNoContent:function(e){return e===St.Blurb},canDisplayOnScreenSize:function(e,t,n){return t!==St.Blurb||n!==ht.HeroBannerSmall||!e.xs&&!e.sm},isCompanyWidget:function(e){switch(e){case St.CompanyLatestReleasedVideo:case St.CompanyVideos:case St.UpcomingLivestreams:return!0;default:return!1}}},Lt=function(e,t,n){return function(){e.container.current&&(e.container.current.style.transition=""),t({type:ft.Resize,payload:{elementRefs:e,mediaQuery:n}})}},Ot=function(e){return function(){e.current&&(e.current.style.transition="transform .4s ease-in-out")}},Nt=function(e,t,n,r,i){return function(a){var o=a.clientX,l=r;l||(l=Object.assign(Object.assign({},t),{initialMouseX:o}),i(l),e.current.style.transition=""),n({type:ft.Drag,payload:{widgetSnapshot:l,currentMouseX:o}})}},Tt=function(e,t){return function(){e.current.style.transition="transform .4s ease-in-out",t(null)}};function _t(e){return e===vt.r.XS?200:e===vt.r.SM||e===vt.r.MD?350:500}var jt={offset:0,containerLeftPosition:null,containerRightPosition:null,firstElementPosition:null,lastElementPosition:null,hideLeftButton:!0,hideRightButton:!0,maxSlideDistance:0,leftOffsetLimit:null},Rt=function(e){var t=e.elementRefs,n=t.container,r=t.lastElement;if(!(null==n?void 0:n.current)||!(null==r?void 0:r.current))return jt;var i=n.current.getBoundingClientRect(),a=i.left,o=i.right,l=a,c=r.current.getBoundingClientRect().right,s=o-c;return Object.assign(Object.assign({},jt),{containerLeftPosition:a,containerRightPosition:o,firstElementPosition:l,lastElementPosition:c,hideRightButton:c<o,leftOffsetLimit:s,maxSlideDistance:_t(e.mediaQuery)})},xt=function(e){var t=Rt(Object.assign(Object.assign({},e),e.elementRefs));return Object.assign(Object.assign({},t),{maxSlideDistance:_t(e.mediaQuery)})},It=function(e){var t=e.firstElementPosition,n=e.lastElementPosition,r=e.maxSlideDistance,i=e.offset,a=e.containerRightPosition,o=n-a>=r?r:n-a;return{firstElementPosition:t-o,lastElementPosition:n-o,offset:i-o,hideRightButton:n-o===a,hideLeftButton:!1}},Pt=function(e){var t=e.containerLeftPosition,n=e.firstElementPosition,r=e.lastElementPosition,i=e.maxSlideDistance,a=e.offset,o=n+i<=t,l=o?i:Math.abs(a);return{firstElementPosition:n+l,lastElementPosition:r+l,offset:a+l,hideLeftButton:!o||n+l===t,hideRightButton:!1}},Ft=function(e,t){var n=t.widgetSnapshot,r=t.currentMouseX;if(n.hideLeftButton&&n.hideRightButton)return{};var i=n.initialMouseX-r,a=n.offset-i,o=n.firstElementPosition-i,l=n.lastElementPosition-i,c=!1,s=!1;return o>e.containerLeftPosition&&(a=0,o=e.containerLeftPosition,l=e.lastElementPosition,c=!0),l<=e.containerRightPosition&&(a=e.leftOffsetLimit,o=e.containerLeftPosition-Math.abs(e.leftOffsetLimit),l=n.containerRightPosition,s=!0),{offset:a,firstElementPosition:o,lastElementPosition:l,hideLeftButton:c,hideRightButton:s}};function Dt(e,t){switch(t.type){case ft.Init:return Object.assign(Object.assign({},e),Rt(t.payload));case ft.Resize:return Object.assign(Object.assign({},e),xt(t.payload));case ft.Next:return Object.assign(Object.assign({},e),It(e));case ft.Previous:return Object.assign(Object.assign({},e),Pt(e));case ft.Drag:return Object.assign(Object.assign({},e),Ft(e,t.payload));default:return e}}var Bt={itemSpacing:"fDc_6",mobileScroll:"aLSzv",leftGradient:"YheD1",leftGradientNoPadding:"Vl2_g",leftButton:"ISepF",leftButtonNoPadding:"N4rAS",rightGradient:"i9XEE",rightGradientNoPadding:"APhNv",rightButton:"OxM84",rightButtonNoPadding:"nmSQo"};function qt(e){return function(e){if(Array.isArray(e))return Vt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ut(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||Ut(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ut(e,t){if(e){if("string"==typeof e)return Vt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vt(e,t):void 0}}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Gt(e){var t,n,i,a,o,l,c,s=e.childComponent,u=e.staticChildren,d=e.getWidgetItemAnalyticsData,f=void 0===d?function(){}:d,m=Mt(r.useReducer(Dt,jt),2),v=m[0],p=m[1],y=Mt(r.useState(null),2),g=y[0],b=y[1],h={container:r.useRef(null),firstElement:r.useRef(null),lastElement:r.useRef(null)},S=(t=(0,pt.a)(vt.r.XS),n=(0,pt.a)(vt.r.SM),i=(0,pt.a)(vt.r.MD),a=(0,pt.a)(vt.r.LG),o=(0,pt.a)(vt.r.XL),l=(0,pt.a)(vt.r.XXL),c=vt.r.LG,t&&(c=vt.r.XS),n&&(c=vt.r.SM),i&&(c=vt.r.MD),a&&(c=vt.r.LG),o&&(c=vt.r.XL),l&&(c=vt.r.XXL),c),E=Je.V.isTabletOrMobile();!function(e,t){var n,i,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=function(){e(),window.clearTimeout(n),n=window.setTimeout(t,100)};r.useEffect((function(){return window.addEventListener("resize",t?o:e),function(){return window.removeEventListener("resize",t?o:e)}}),function(e){if(Array.isArray(e))return gt(e)}(i=a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return gt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gt(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}(Lt(h,p,S),Ot(h.container),[S]);var A=(0,yt.Y)({prevent:!e.lazyLoad}),C=A.ref,w=A.inView,k=e.collection;if(!e.collection&&I.q.isFunction(e.fetch)){var N=e.fetch(w);k=N.data}r.useEffect((function(){k&&!O.t.isEmpty(k)&&p({type:ft.Init,payload:{elementRefs:h,mediaQuery:S}})}),[k]);var T=r.useMemo((function(){var t,n;if(k){var i=null!==(t=null==u?void 0:u.filter((function(e){return"start"===e.position})))&&void 0!==t?t:[],a=null!==(n=null==u?void 0:u.filter((function(e){return"end"===e.position})))&&void 0!==n?n:[],o=k.map((function(t,n){var o;t===L.m.first(k)&&(null==i?void 0:i.length)&&(o=h.firstElement),t!==L.m.last(k)||(null==a?void 0:a.length)||(o=h.lastElement);var l=n+1===k.length;return r.createElement("div",{key:t.id,ref:o,className:"".concat(Bt.itemSpacing," ").concat(e.childClassName||""," ").concat(l&&E?"pe-4":"")},r.createElement(s,{getChildAppLink:e.getChildAppLink,data:t,getSubtitle:e.getSubtitle,analyticsData:Object.assign(Object.assign({itemIndex:n},e.analyticsData),f(t)),analyticsOptions:Object.assign(Object.assign({},null==e?void 0:e.analyticsOptions),kt.getSliderItemAnalyticsOptions())}))}));return i.length&&(o=[].concat(qt(i.map((function(t,n){var i=t.component;return r.createElement("div",{key:"first-widget-component:".concat(n),ref:0===n?h.firstElement:null,className:"".concat(Bt.itemSpacing," ").concat(e.childClassName||"")},r.createElement(i,null))}))),qt(o))),a.length&&(o=[].concat(qt(o),qt(a.map((function(t,n){var i=t.component;return r.createElement("div",{key:"end-widget-component:".concat(n),ref:n===a.length-1?h.lastElement:null,className:"".concat(Bt.itemSpacing," ").concat(e.childClassName||"")},r.createElement(i,null))}))))),r.createElement(r.Fragment,null,o)}}),[k].concat(qt(e.widgetDataDeps||[])));if(k&&!k.length&&!(null==u?void 0:u.length))return r.createElement(r.Fragment,null);if(!k||O.t.isEmpty(k))return r.createElement("div",{ref:C},r.createElement(Qt,{partialLoadingComponent:e.partialLoadingComponent,partialLoadingOptions:e.partialLoadingOptions}));var _=function(t){return Object.assign(Object.assign({},e.analyticsData),{name:e.heading,direction:t===ft.Next?"right":"left"})},j=E||e.hideButtons;return r.createElement("div",{className:"".concat(e.noNegativePadding?"":"mx-n4")},r.createElement("div",{className:"px-4"},r.createElement(it,{name:e.heading,description:e.description,appLink:e.headingAppLink})),r.createElement("div",{className:"position-relative"},r.createElement("div",{className:"".concat(e.noNegativePadding?"":"px-4"," py-3 my-n3 position-relative ").concat(E?Bt.mobileScroll:"overflow-hidden-x")},r.createElement("div",{className:"position-relative ".concat(e.hideButtons?"overflow-hidden-x":"")},!j&&r.createElement(mt,{direction:ot.Left,onClick:function(){p({type:ft.Previous}),F.k.logUserAction(_(ft.Previous),kt.getSliderAnalyticsOptions())},leftButtonClassName:"".concat(Bt.leftButton," ").concat(e.noNegativePadding?Bt.leftButtonNoPadding:""),leftGradientClassName:"".concat(Bt.leftGradient," ").concat(e.noNegativePadding?Bt.leftGradientNoPadding:""),hide:v.hideLeftButton,useGradientBackdrop:!0}),r.createElement(st,{position:v.offset,positionType:ze.Pixels,onDrag:Nt(h.container,v,p,g,b),onDragEnd:Tt(h.container,b),ref:h.container},T),!j&&r.createElement(mt,{direction:ot.Right,onClick:function(){p({type:ft.Next}),F.k.logUserAction(_(ft.Next),kt.getSliderAnalyticsOptions())},hide:v.hideRightButton,rightButtonClassName:"".concat(Bt.rightButton," ").concat(e.noNegativePadding?Bt.rightButtonNoPadding:""),rightGradientClassName:"".concat(Bt.rightGradient," ").concat(e.noNegativePadding?Bt.rightGradientNoPadding:""),useGradientBackdrop:!0})))))}Gt.defaultProps={heading:"",description:""};var Xt,Yt,Qt=function(e){var t=e.partialLoadingComponent,n=e.partialLoadingOptions;return r.createElement("div",{className:"d-flex flex-nowrap overflow-hidden"},Et.u.getPartialLoadingItems(n).map((function(e,n){return r.createElement(t,{key:n})})))};function Ht(e){var t,n,r=e.tag,a=e.appLink,o=e.onClick,l=e.disabled,c=e.tagClass,s=void 0===c?"tag":c,u=r.name.toLowerCase(),d=null===(t=r.tagType)||void 0===t?void 0:t.toLowerCase(),f=d===Xt.Normal&&e.themeColours&&!!(null===(n=e.themeColours)||void 0===n?void 0:n.secondary),m="rounded-pill py-1 px-2 my-1 me-1 ".concat(s," ").concat(function(e,t){switch(e){case Xt.Pedagogy:case Xt.Skill:return"pedagogy-tag text-white";case Xt.Hidden:return"hidden-tag fw-normal";case Xt.Normal:return t?"":"bg-gray-100 fw-normal";default:return""}}(d,f));f&&(m+=" text-white"),!a&&!o||l||(m+=" cursor-pointer"),l&&(m+=" "+Ze.disabled),e.onRemove&&(m+=" "+Ze.badge),a||(m+=" d-inline-block");var v=f?{backgroundColor:e.themeColours.secondary}:{};return a?i().createElement(et.F,{onClick:o,appLink:a,className:m,title:u,style:v},i().createElement("span",{className:"text-truncate text-nowrap"},u)):i().createElement("span",{onClick:o,className:m,title:u,style:v},i().createElement("span",{className:"text-truncate text-nowrap"},u,e.onRemove&&i().createElement("button",{onClick:e.onRemove,className:"".concat(Ze.close," btn-close font-size-normal"),role:"button","aria-label":"Close"})))}function Wt(e){var t=e.selectedItems.find((function(t){return t.id===e.data.id}))?"bg-gray-900 text-white":"bg-light";return i().createElement(Ht,{tag:e.data,appLink:e.appLink,tagClass:"no-decoration ".concat(t," lh-1"),onClick:function(){return e.onClick(e.data)}})}!function(e){e.Normal="normal",e.Pedagogy="pedagogy",e.Hidden="hidden",e.Skill="skill",e.Curation="curation"}(Xt||(Xt={})),function(e){e[e.Normal=0]="Normal",e[e.Pedagogy=1]="Pedagogy",e[e.Hidden=2]="Hidden",e[e.Skill=3]="Skill",e[e.Curation=4]="Curation"}(Yt||(Yt={}));var $t={tagItem:"j84HW"};function zt(e){return zt="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},zt(e)}function Zt(e){return function(e){if(Array.isArray(e))return Kt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Kt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Jt(e){var t,n,r,a,o=i().useContext(R).state;if(!(null===(t=e.filter)||void 0===t?void 0:t.id))return i().createElement(i().Fragment,null);var l=o[e.filter.id],c=l.selection,s=null!==(a=null===(r=null===(n=e.filter)||void 0===n?void 0:n.options)||void 0===r?void 0:r.filter((function(e){return!(null==c?void 0:c.find((function(t){return t.id===e.id})))})))&&void 0!==a?a:[];function u(t){var n,r,i,a=null,s=-1;if(c.find((function(e,n){s>-1||e.id.toString()===t.id.toString()&&(s=n)})),s>=0){var u=[].concat(Zt(c.slice(0,s)),Zt(c.slice(s+1)));a={active:!!u.length,selection:u}}else a={active:!0,selection:c.concat(t)};Fe.applyFilter([e.filter],l,(n={},r=e.filter.id,i=a,(r=function(e){var t=function(e,t){if("object"!=zt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=zt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==zt(t)?t:t+""}(r))in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,n),o.appLink)}var d,f=[].concat(Zt(c),Zt(e.isFetching?[]:s));return i().createElement("div",{className:e.isFetching||f.length?"py-2":""},i().createElement("div",{className:(d="mb-3",f.length&&e.isFetching?d+=" mt-n1":f.length||e.isFetching||(d+=" d-none"),d)},(!!f.length||e.isFetching)&&i().createElement(Gt,{collection:f,childComponent:function(e){return i().createElement(Wt,Object.assign({},e,{selectedItems:c,onClick:u}))},staticChildren:e.isFetching?new Array(3).fill({component:function(){return i().createElement(Ke,{tagClass:$t.tagItem})},position:"end"}):[],partialLoadingComponent:function(){return i().createElement("div",{className:"me-2"},i().createElement(Ke,{tagClass:"".concat($t.tagItem)}))}})))}function en(e){var t=r.useContext(R).state;return r.createElement(T.L,{onClick:function(){P.Q.C$.trigger(Object.assign(Object.assign({},t.appLink),{params:e.currentQueryParam?{query:e.currentQueryParam}:null}))},className:"".concat(e.alignLeft?"order-first":""," hover-text-underline cursor-pointer d-flex align-items-center mx-2")},r.createElement(s.x,{namespace:"search.resetButton",phrase:"reset"}))}var tn={partialFilterHeading:"O8f8H",partialButton:"ThKam",filtersContainer:"JIp3h"};function nn(e){return function(e){if(Array.isArray(e))return an(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||rn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function rn(e,t){if(e){if("string"==typeof e)return an(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?an(e,t):void 0}}function an(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function on(e){var t,n,i=e.queryParams,a=e.appLink,o=e.hideHeading,l=e.isFetchingOptions,c=e.constantIndices,u=void 0===c?[]:c,d=r.useMemo((function(){return Fe.deriveInitialStateFromQuery(i,e.mainFilters,e.moreFilters,a)}),[i,l]),f=(t=r.useReducer(x,d),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(t,n)||rn(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=f[0],v=f[1];r.useEffect((function(){O.t.isEqual(d,m)||(v({type:"update",payload:d}),e.analyticsOptions&&Fe.logFilterEvent(e.mainFilters,e.moreFilters,d,i.query,e.analyticsOptions))}),[d]);var p=L.m.uniq([].concat(nn(Fe.getAppliedIndices(i)),nn(u))),y=Fe.mixinDisabledFields(m,p,e.mainFilters,e.moreFilters),g=y.mainFilters,b=y.moreFilters,h=g.filter((function(e){return"tag"!==e.type})),S=g.find((function(e){return"tag"===e.type}));return r.createElement(R.Provider,{value:{state:m,dispatch:v}},r.createElement(s.D.Provider,{value:"search.searchFilters"},r.createElement("section",null,r.createElement("div",{className:"d-flex ".concat(e.hideDivider?"":"border-bottom pb-3 mb-3")},!o&&r.createElement("h2",{className:"h5 mb-0 d-inline-block pe-2 border-end d-flex align-items-center"},r.createElement(s.x,{phrase:"heading"})),r.createElement("div",{className:"d-flex flex-wrap ".concat(tn.filtersContainer," ").concat(o?"":"ms-2")},h.map((function(t){return r.createElement(Ge,{key:t.id,filter:t,hideCaret:e.hideCaret})})),b&&r.createElement($e,{filter:b}),Fe.hasActiveFilters(i)&&!e.hideResetButton&&r.createElement(en,{mainFilters:e.mainFilters,moreFilters:e.moreFilters,currentQueryParam:i.query,analyticsOptions:e.analyticsOptions,alignLeft:e.alignResetButtonLeft}))),r.createElement(Jt,{filter:S,queryParams:i,isFetching:e.isFetchingOptions}))))}var ln=a.T.encloseNamespace("libraryRequests.filters");function cn(e){return i().createElement(on,{queryParams:e.queryParams,mainFilters:[{id:"status",name:"Status",type:"checkbox",options:[{id:"approved",name:ln("approved")},{id:"rejected",name:ln("rejected")},{id:"closed",name:ln("closed")},{id:"autoApproved",name:ln("autoApproved")}],compatibleIndices:[]}],appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.PAST_REQUESTS,args:[e.id],params:e.queryParams},analyticsOptions:{entity:k.py.LibraryRequest,location:k.LZ.LibraryRequestDetails},constantIndices:[],hideDivider:!0})}var sn=n(46948),un=n(49824),dn=n(92966),fn=n(7044),mn=n(21974),vn=n(264),pn=n(65402),yn="libraryRequests.pastDetails";function gn(e){var t=(0,pn.$)(e.status);return i().createElement("span",{className:"ms-1"},t)}function bn(e){var t,n,r,a,o,l,u,d=e.libraryRequest.sourceLibrary||e.libraryRequest.sourceCategory,f="";e.libraryRequest.actionedBy&&(f="".concat(e.libraryRequest.actionedBy.name," ").concat(e.libraryRequest.actionedBy.surname));var m=function(e){switch(e){case A.l.AutoApproved:return"addedBy";case A.l.Approved:return"approvedBy";default:return"rejectedBy"}}(e.libraryRequest.status),v=e.libraryRequest.sender&&"".concat(null!==(n=null===(t=e.libraryRequest.sender)||void 0===t?void 0:t.name)&&void 0!==n?n:""," ").concat(null!==(a=null===(r=e.libraryRequest.sender)||void 0===r?void 0:r.surname)&&void 0!==a?a:""),y="";return(null===(o=e.libraryRequest.senderCustomer)||void 0===o?void 0:o.id.toString())!==e.user.get("customerId").toString()&&(y=null===(l=e.libraryRequest.senderCustomer)||void 0===l?void 0:l.name),i().createElement("div",{className:"bg-white rounded p-3 mb-3"},i().createElement("div",{className:"row"},i().createElement("div",{className:"col-3 offset-9 mb-n3"},i().createElement("div",{className:"d-flex justify-content-end align-items-start"},i().createElement(pn.h,{status:e.libraryRequest.status}),i().createElement(gn,{status:e.libraryRequest.status}))),i().createElement("div",{className:"col-12"},!!f&&i().createElement("div",{className:"row mb-3"},i().createElement("div",{className:"col-3 font-label"},i().createElement(s.x,{namespace:yn,phrase:m})),i().createElement("div",{className:"col-6"},f)),!!v&&e.libraryRequest.status!==A.l.AutoApproved&&i().createElement("div",{className:"row mb-3"},i().createElement("div",{className:"col-3"},i().createElement("label",null,i().createElement(s.x,{namespace:yn,phrase:"requestedBy"}))),i().createElement("div",{className:"col-6"},i().createElement(i().Fragment,null,v,!!y&&i().createElement(i().Fragment,null," (",y,")")))),i().createElement("div",{className:"row mb-3"},i().createElement("div",{className:"col-3 font-label"},d&&i().createElement(s.x,{namespace:yn,phrase:"videoSource"})),i().createElement("div",{className:"col-6"},!!e.libraryRequest.sourceLibrary&&i().createElement("span",{className:"badge p-1 me-1 text-white ".concat(mn.u.mapSourceToClass(e.libraryRequest.sourceLibrary.type))},mn.u.mapSourceToDisplayName(e.libraryRequest.sourceLibrary,vn.g.hasLite)),!!e.libraryRequest.sourceCategory&&i().createElement("span",{className:"ms-1"},e.libraryRequest.sourceCategory.name))),(null===(u=e.folderPath)||void 0===u?void 0:u.length)&&i().createElement("div",{className:"row"},i().createElement("div",{className:"col-3 font-label"},i().createElement(s.x,{namespace:yn,phrase:"libraryLocation"})),i().createElement("div",{className:"col-9"},i().createElement(c.Oo,{breadcrumbs:e.folderPath.map((function(e,t){return{name:e.name,appLink:{application:p.OV.LIBRARY_EDITOR,action:0===t?p.eX.LibraryEditor.LIBRARY:p.eX.LibraryEditor.FOLDER,args:[e.id]}}}))}))))))}function hn(){return i().createElement("div",{className:"bg-white rounded p-3 mb-3"},i().createElement("div",{className:"row"},i().createElement("div",{className:"col-3"},i().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"6rem"}})),i().createElement("div",{className:"col-6 mb-2"},i().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"9rem"}})),i().createElement("div",{className:"col-3 d-flex justify-content-end"},i().createElement("div",{className:"partial-loading-background rounded",style:{height:"1.25rem",width:"6rem"}})),i().createElement("div",{className:"col-3"},i().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"7rem"}})),i().createElement("div",{className:"col-6"},i().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"15rem"}}))))}var Sn=n(17950),En=n(9416),An=n(25796),Cn=n(41026),wn=n(59198),kn=n(85739),Ln=n(30328),On=n(64429),Nn=n(39123),Tn=n(41777),_n=n(56154),jn="libraryRequests.pastRequestsEmptyState",Rn=a.T.encloseNamespace(jn);function xn(e){return i().createElement("div",{className:"bg-white rounded p-3 py-5"},i().createElement(Tn.u,null,i().createElement(Tn.u.Image,{src:_n.W.EmptyStates.PAST_REQUESTS}),i().createElement(Tn.u.Info,{className:"mb-1"},i().createElement(s.x,{namespace:jn,phrase:"info"})),e.hasLibraries&&i().createElement(Tn.u.Cta,{text:Rn("cta"),className:"btn btn-link text-info",appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.LIBRARY_REQUEST_SETTINGS_LIBRARIES}})))}function In(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,l=[],c=!0,s=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Fn="libraryRequests.pastRequests",Dn=a.T.encloseNamespace(Fn),Bn=[A.l.Approved,A.l.Closed,A.l.Rejected,A.l.AutoApproved];function qn(e){var t,n,r,a,S,E=o.a.useGetFetch(),A=(0,f.Z)(),C=(0,kn.p)(e.queryParams.sort||u.D.Newest,e.queryParams.status||Bn),k=o.a.useBasicFetch(e.id&&An.y.libraryRequest(e.id)),L=(0,wn.s)(e.id),O=In(i().useState(null),2),N=O[0],T=O[1];(0,l.i)(h.T.getLibrariesFetchOptions((function(e){return T(e.toJSON())})),[]),(0,Nn.g)(T);var _=o.a.useBasicFetch(k.data&&(null===(t=k.data.destinationLibrary)||void 0===t?void 0:t.id)&&(null===(n=k.data.destinationCategory)||void 0===n?void 0:n.id)&&An.y.categoryPath(k.data.destinationLibrary.id,k.data.destinationCategory.id)),j=In(i().useState(null),2),R=j[0],x=j[1];(0,l.i)(g.p.getConfigFetchOptions(x),[]);var I=In(i().useState(null),2),P=I[0],F=I[1];(0,l.i)(b.K.getCurrentUserFetchOptions(F),[]);var D=o.a.useBasicFetch(d.N.currentUser());(0,m.v)(k),(0,Ln.A)({id:e.id,requests:C.items,appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.PAST_REQUESTS,params:e.queryParams}}),(0,On.m)(k.data,"past",e.queryParams),(0,Cn.K)(k.data);var B=((null===(r=C.items)||void 0===r?void 0:r.length)||C.hasCompleted)&&R&&D.data,q=k.data&&L.hasCompleted,M=!e.queryParams.status&&k.hasCompleted&&!(null===(a=C.items)||void 0===a?void 0:a.length);return i().createElement("div",null,i().createElement("h1",{className:"h2"},i().createElement(s.x,{namespace:Fn,phrase:"title"})),i().createElement("div",{className:"mb-3"},i().createElement(c.Oo,{breadcrumbs:[{name:Dn("libraryEditor"),appLink:{application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.HOME}},{name:Dn("title"),active:!0}]})),i().createElement(En.A,{active:"past"}),!M&&i().createElement("div",{className:"d-flex justify-content-between mb-3"},i().createElement(cn,{id:e.id,queryParams:e.queryParams}),i().createElement(Sn.F,{appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.PAST_REQUESTS,args:[e.id]},queryParams:e.queryParams})),!B||(null===(S=C.items)||void 0===S?void 0:S.length)?i().createElement("div",{className:"row"},i().createElement("div",{className:"col-4"},B?i().createElement(dn.q,{libraryRequests:C.items,selectedId:e.id,appLink:{application:p.OV.LIBRARY_REQUESTS,action:p.eX.LibraryRequests.PAST_REQUESTS},queryParams:e.queryParams,fetchNext:C.fetchNext,isFetching:C.isFetching,nextCursor:C.nextCursor}):i().createElement(fn.p,null)),i().createElement("div",{className:"col-8"},B&&q?i().createElement(i().Fragment,null,i().createElement(w,{libraryRequest:k.data}),i().createElement(bn,{libraryRequest:k.data,folderPath:_.data,user:P}),i().createElement(sn.x,{libraryRequest:k.data,currentUser:D.data,comments:L.items,config:R,user:P,createViewKey:function(t,n){var r=An.y.createViewKey(e.id,(function(e){return n(new y.y(e))}),(function(e){return A.error(v.M.libraryApiError(e))}));E(r)}})):i().createElement(i().Fragment,null,i().createElement(hn,null),i().createElement(un.j,null)))):i().createElement(xn,{hasLibraries:!!N.length}))}}}]);
|