@clickview/library-editor 1.25.1-rc.3 → 1.25.1-rc.5
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/{601-library-editor-6c921eb7e6.chunk.css → 7003-library-editor-2c84580afb.chunk.css} +1 -0
- package/dist/scripts/1203-9fbf7ca27c.chunk.js +1 -0
- package/dist/scripts/1302-f63d0e33d4.chunk.js +1 -0
- package/dist/scripts/{1601-edb9741335.chunk.js → 1601-8506cc1931.chunk.js} +1 -1
- package/dist/scripts/{1934-6ad36e29e8.chunk.js → 1934-5ad8a742d1.chunk.js} +1 -1
- package/dist/scripts/{2235-b3cd707d9b.chunk.js → 2235-a51a488251.chunk.js} +1 -1
- package/dist/scripts/2802-4c36587c19.chunk.js +2 -0
- package/dist/scripts/3969-cc256ead55.chunk.js +1 -0
- package/dist/scripts/5173-2890589c1d.chunk.js +1 -0
- package/dist/scripts/5745-7c15af247c.chunk.js +2 -0
- package/dist/scripts/7003-43e18daa8f.chunk.js +1 -0
- package/dist/scripts/7433-004b87431c.chunk.js +1 -0
- package/dist/scripts/bundle-0364d6eb5a.min.js +2 -0
- package/package.json +2 -2
- package/dist/scripts/1203-d1f4613a9b.chunk.js +0 -1
- package/dist/scripts/1302-59a643012f.chunk.js +0 -1
- package/dist/scripts/2802-cd41bf6824.chunk.js +0 -2
- package/dist/scripts/3969-e3fbefd3c5.chunk.js +0 -1
- package/dist/scripts/5173-9036f3cf73.chunk.js +0 -1
- package/dist/scripts/5745-674628d114.chunk.js +0 -2
- package/dist/scripts/601-13ccaffbc4.chunk.js +0 -1
- package/dist/scripts/7433-bb3409c1b1.chunk.js +0 -1
- package/dist/scripts/bundle-9c90de09a0.min.js +0 -2
- /package/dist/scripts/{101-8ec15bee27.chunk.js → 101-1b313fa1d4.chunk.js} +0 -0
- /package/dist/scripts/{1010-495ed5b057.chunk.js → 1010-ca375ea298.chunk.js} +0 -0
- /package/dist/scripts/{1086-e0c35124d8.chunk.js → 1086-432a82ef43.chunk.js} +0 -0
- /package/dist/scripts/{1216-a2598733fc.chunk.js → 1216-b158f5b30c.chunk.js} +0 -0
- /package/dist/scripts/{1269-81499213c1.chunk.js → 1269-ae5662c337.chunk.js} +0 -0
- /package/dist/scripts/{1364-ddf808d91c.chunk.js → 1364-27227cb9ea.chunk.js} +0 -0
- /package/dist/scripts/{1409-9c325bfbf6.chunk.js → 1409-5c9ccc0eed.chunk.js} +0 -0
- /package/dist/scripts/{1492-e654b09987.chunk.js → 1492-9a81d1c02a.chunk.js} +0 -0
- /package/dist/scripts/{1601-edb9741335.chunk.js.LICENSE.txt → 1601-8506cc1931.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{1832-b4f69b0fd2.chunk.js → 1832-613d79c046.chunk.js} +0 -0
- /package/dist/scripts/{1887-6c9b7d0d52.chunk.js → 1887-76b0fd9aa6.chunk.js} +0 -0
- /package/dist/scripts/{1911-5e683c9b57.chunk.js → 1911-cd0a151176.chunk.js} +0 -0
- /package/dist/scripts/{1934-6ad36e29e8.chunk.js.LICENSE.txt → 1934-5ad8a742d1.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2235-b3cd707d9b.chunk.js.LICENSE.txt → 2235-a51a488251.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2417-4edd116408.chunk.js → 2417-8b5ab4ad51.chunk.js} +0 -0
- /package/dist/scripts/{243-e0bfb4d88b.chunk.js → 243-067ae4d848.chunk.js} +0 -0
- /package/dist/scripts/{259-55c7fc7184.chunk.js → 259-df398b9b9c.chunk.js} +0 -0
- /package/dist/scripts/{2692-8b9ce6d0c8.chunk.js → 2692-8403612d84.chunk.js} +0 -0
- /package/dist/scripts/{2774-ef379088c6.chunk.js → 2774-1262de963e.chunk.js} +0 -0
- /package/dist/scripts/{2802-cd41bf6824.chunk.js.LICENSE.txt → 2802-4c36587c19.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2803-2e8648e8ca.chunk.js → 2803-7231f4be38.chunk.js} +0 -0
- /package/dist/scripts/{2888-0f677d5125.chunk.js → 2888-5ece2f0f83.chunk.js} +0 -0
- /package/dist/scripts/{299-13a1cb926c.chunk.js → 299-59960eb1e8.chunk.js} +0 -0
- /package/dist/scripts/{3096-833a22293c.chunk.js → 3096-fe9cc06f34.chunk.js} +0 -0
- /package/dist/scripts/{3400-490d569d7b.chunk.js → 3400-56708f7b29.chunk.js} +0 -0
- /package/dist/scripts/{3639-0c4394da2f.chunk.js → 3639-171fda38a7.chunk.js} +0 -0
- /package/dist/scripts/{3746-3a1de06d91.chunk.js → 3746-6f5b5a2fcd.chunk.js} +0 -0
- /package/dist/scripts/{3763-cc802927a4.chunk.js → 3763-f45112e3de.chunk.js} +0 -0
- /package/dist/scripts/{4177-f92af9cdd8.chunk.js → 4177-45fdfc2c83.chunk.js} +0 -0
- /package/dist/scripts/{4201-d103a971ea.chunk.js → 4201-7d1f283d72.chunk.js} +0 -0
- /package/dist/scripts/{4245-49b849b0dc.chunk.js → 4245-67a2281073.chunk.js} +0 -0
- /package/dist/scripts/{4523-0a07686211.chunk.js → 4523-3075a1635d.chunk.js} +0 -0
- /package/dist/scripts/{4591-0a3d8964f9.chunk.js → 4591-fdd3eadc94.chunk.js} +0 -0
- /package/dist/scripts/{4784-e36e57b687.chunk.js → 4784-0375519622.chunk.js} +0 -0
- /package/dist/scripts/{4860-c11ea3fe12.chunk.js → 4860-1a94c015d1.chunk.js} +0 -0
- /package/dist/scripts/{4885-51a4e2d76a.chunk.js → 4885-b8973e6de8.chunk.js} +0 -0
- /package/dist/scripts/{514-230489ab81.chunk.js → 514-13bd352060.chunk.js} +0 -0
- /package/dist/scripts/{5235-a2c89ffb8c.chunk.js → 5235-8544c306cb.chunk.js} +0 -0
- /package/dist/scripts/{5412-692a3bbb8f.chunk.js → 5412-310b4da022.chunk.js} +0 -0
- /package/dist/scripts/{5418-d146408d5f.chunk.js → 5418-ca4c25006a.chunk.js} +0 -0
- /package/dist/scripts/{5424-023fbdfbfb.chunk.js → 5424-5f199fbee1.chunk.js} +0 -0
- /package/dist/scripts/{546-f2da7e6a4d.chunk.js → 546-aa654737db.chunk.js} +0 -0
- /package/dist/scripts/{5745-674628d114.chunk.js.LICENSE.txt → 5745-7c15af247c.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5747-fd9faedf91.chunk.js → 5747-913973a09d.chunk.js} +0 -0
- /package/dist/scripts/{5891-9ceb4b7880.chunk.js → 5891-21e298b6c5.chunk.js} +0 -0
- /package/dist/scripts/{6093-4f3bdb8793.chunk.js → 6093-7b2b90be00.chunk.js} +0 -0
- /package/dist/scripts/{6220-3b7c856833.chunk.js → 6220-dfffc6e938.chunk.js} +0 -0
- /package/dist/scripts/{6357-5e6070a3bd.chunk.js → 6357-62893f6f4b.chunk.js} +0 -0
- /package/dist/scripts/{6505-d7aba5e2db.chunk.js → 6505-85e1903ba6.chunk.js} +0 -0
- /package/dist/scripts/{6732-6c0786ffcb.chunk.js → 6732-add13fc1c4.chunk.js} +0 -0
- /package/dist/scripts/{6756-94bb6b5f39.chunk.js → 6756-4592679960.chunk.js} +0 -0
- /package/dist/scripts/{6774-1f7e305c42.chunk.js → 6774-f236f0c3d1.chunk.js} +0 -0
- /package/dist/scripts/{6788-f3afed33f5.chunk.js → 6788-00bbbe31a8.chunk.js} +0 -0
- /package/dist/scripts/{6963-ff2c300d8c.chunk.js → 6963-313bade400.chunk.js} +0 -0
- /package/dist/scripts/{6991-32da7c36e9.chunk.js → 6991-3de5e82cd2.chunk.js} +0 -0
- /package/dist/scripts/{6995-fd92ff8e0e.chunk.js → 6995-e5548eaaf9.chunk.js} +0 -0
- /package/dist/scripts/{6999-c384cbbe94.chunk.js → 6999-24d00eecda.chunk.js} +0 -0
- /package/dist/scripts/{7002-de9a9a1326.chunk.js → 7002-a1993c554e.chunk.js} +0 -0
- /package/dist/scripts/{7053-29490a2986.chunk.js → 7053-e44f9c1383.chunk.js} +0 -0
- /package/dist/scripts/{708-27bc94c368.chunk.js → 708-746d480e1f.chunk.js} +0 -0
- /package/dist/scripts/{7190-2232eadecd.chunk.js → 7190-2b771b4ed4.chunk.js} +0 -0
- /package/dist/scripts/{7376-4fb1663f80.chunk.js → 7376-2fb495140d.chunk.js} +0 -0
- /package/dist/scripts/{7634-8c2e7bcf7a.chunk.js → 7634-dcf20044f4.chunk.js} +0 -0
- /package/dist/scripts/{8362-de0f79ef2d.chunk.js → 8362-bb9462bd7c.chunk.js} +0 -0
- /package/dist/scripts/{8495-617e725501.chunk.js → 8495-67592fe142.chunk.js} +0 -0
- /package/dist/scripts/{8622-fdb4968c23.chunk.js → 8622-0a214a5d0a.chunk.js} +0 -0
- /package/dist/scripts/{8727-092d1aa912.chunk.js → 8727-961c0e087d.chunk.js} +0 -0
- /package/dist/scripts/{8762-4a1455ca7c.chunk.js → 8762-5a27627048.chunk.js} +0 -0
- /package/dist/scripts/{8906-fde329353f.chunk.js → 8906-ae09cfc5a1.chunk.js} +0 -0
- /package/dist/scripts/{8947-9234bf22e8.chunk.js → 8947-f439edff7a.chunk.js} +0 -0
- /package/dist/scripts/{9357-2e40b56d53.chunk.js → 9357-a12544a19a.chunk.js} +0 -0
- /package/dist/scripts/{9695-d74a71dffd.chunk.js → 9695-be71e00a4d.chunk.js} +0 -0
- /package/dist/scripts/{9770-59c927b3ae.chunk.js → 9770-8ea8b26cc3.chunk.js} +0 -0
- /package/dist/scripts/{9927-00d928c591.chunk.js → 9927-3a30c8d5e5.chunk.js} +0 -0
- /package/dist/scripts/{9976-36d84746c0.chunk.js → 9976-031a8d95f8.chunk.js} +0 -0
- /package/dist/scripts/{bundle-9c90de09a0.min.js.LICENSE.txt → bundle-0364d6eb5a.min.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{polyfills-0e075c1575.min.js → polyfills-710a1c39c4.min.js} +0 -0
package/dist/bundles.json
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
.Zw6d9{display:flex;flex-wrap:wrap}.jlL1c{background-color:#f1f1f1;color:#b5b5b5}.jlL1c:hover{background-color:#f1f1f1;color:#b5b5b5}.too_N{width:5rem}.OjtN8{line-height:1.1rem}.X9joI{opacity:1}.X9joI:not(:disabled):hover{opacity:1}
|
|
12
12
|
.EcurS{line-height:1rem;font-weight:600}.FypfE{background-color:#d8edfa}
|
|
13
13
|
.j84HW{line-height:1rem;font-weight:600}
|
|
14
|
+
.O8f8H{height:1.5rem;width:3.5rem}.ThKam{height:2.2rem;width:5rem}.JIp3h{row-gap:.3125rem}
|
|
14
15
|
.t0svX,.CFRo3{width:1.875rem;height:1.875rem}.ZMMQu{display:none}.CFRo3{color:#313543;background-color:rgba(241,241,241,.5);border-radius:50%}.CFRo3:hover{color:#d9584f;background-color:rgba(241,241,241,.7)}.CFRo3:hover .truFo{display:none}.CFRo3:hover .ZMMQu{opacity:.75;display:inline-block}.t0svX{color:#d9584f;background-color:rgba(241,241,241,.8)}.t0svX .truFo{display:none}.t0svX .ZMMQu{display:inline-block}.t0svX:hover .ZMMQu{opacity:1}
|
|
15
16
|
.fVSzb{width:100%;height:100%}
|
|
16
17
|
.vdd4V{position:relative;width:100%;height:100%}.vdd4V img{position:absolute;top:0;bottom:0;left:0;right:0}.Ez0E7{padding-bottom:56.25%}.H9bQA{padding-bottom:177.77778%}.Nudts{padding-bottom:100%}.IOvDH{padding-bottom:18.5%}.iiY56{padding-bottom:150%}.aDJiJ img{height:auto}.wDpui img{width:auto;margin:0 auto}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1203],{74269:function(t,e,n){n.r(e),n.d(e,{DialogHelper:function(){return _}});var r,o=n(1024),i=n.n(o),a=n(44645),u=n(53808),c=n(71575),l=n(51934),s=n.n(l),f=n(85610),m=n(88483);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function d(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==p(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===p(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var h=(d(r={},m.__.Thumbnails,{width:1280,height:720}),d(r,m.__.Banners,{width:1200,height:222}),d(r,m.__.Covers,{width:512,height:512}),d(r,m.__.Posters,{width:1e3,height:1500}),d(r,m.__.TallPosters,{width:1080,height:1920}),d(r,m.__.HeroBanners,{width:1920,height:640}),d(r,m.__.None,{width:1,height:1}),d(r,m.__.Avatars,{width:256,height:256}),d(r,m.__.Logos,{width:128,height:128}),r),g=n(57857);function b(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return v(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(t,e):void 0}}(t,e)||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 v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var y=g.T.encloseNamespace("shared.imageCropper"),C=/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/;function w(t){var e=b(i().useState(!1),2),n=e[0],r=e[1],o=b(i().useState(!1),2),a=o[0],u=o[1],l=i().useRef(),m=i().useRef();return i().useEffect((function(){var e=new Image;e.src=t.src;var n=l.current.offsetWidth/e.width,o=h[t.imageType],i={viewMode:2,autoCropArea:1,ready:function(){return r(!0)}};return o&&(i.minCropBoxWidth=o.width*n,i.minCropBoxHeight=o.height*n,i.aspectRatio=o.width/o.height),m.current=new(s())(l.current,i),function(){m.current.destroy()}}),[]),i().createElement(c.G,{title:y("title"),closePopup:t.closePopup,size:t.popupSize},i().createElement("div",null,i().createElement("img",{src:t.src,alt:t.alt,ref:l,className:"img img-fluid"})),i().createElement(f.u,null,i().createElement(f.u.Cancel,{onClick:t.closePopup}),i().createElement(f.u.Submit,{onClick:function(){if(n){var e=m.current.getCroppedCanvas().toDataURL(function(t){var e=t.match(C);if(e)return e[1]}(t.src));u(!0),t.onClickCrop(e,t.closePopup)}},text:y("crop"),variant:"dark",showSpinner:a})))}w.defaultProps={popupSize:"lg"};var P="shared.shared-utils",_={render:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,a.s)(document.getElementById("dialog-region"));function r(){var t;u.q.isFunction(null===(t=e.cancelButtonProps)||void 0===t?void 0:t.onClick)&&e.cancelButtonProps.onClick(),n.unmount()}var o=Object.assign(Object.assign({},e.submitButtonProps?e.submitButtonProps:{}),{onClick:function(){var t;u.q.isFunction(null===(t=e.submitButtonProps)||void 0===t?void 0:t.onClick)&&e.submitButtonProps.onClick(),n.unmount(),r()}}),l=Object.assign(Object.assign({},e.cancelButtonProps?e.cancelButtonProps:{}),{onClick:function(){r()}});n.render(i().createElement(c.G,{title:e.title,closePopup:r,size:e.size,centered:e.centered,bodyClassName:"overflow-hidden",dialogClassName:e.dialogClassName},t,!e.hideButtons&&i().createElement(f.u,{className:e.buttonContainerClassName},e.cancelButtonProps&&i().createElement(f.u.Cancel,Object.assign({},l)),e.submitButtonProps&&i().createElement(f.u.Submit,Object.assign({},o)))))},renderCropper:function(t){var e=(0,a.s)(document.getElementById("dialog-region"));e.render(i().createElement(w,Object.assign({},t,{closePopup:function(){return e.unmount()}})))},getDefaultSubmitButton:function(){return{variant:"dark",text:g.T.getPhrase(P,"confirm")}},getDefaultCancelButton:function(){return{variant:"light",text:g.T.getPhrase(P,"cancel")}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1302],{23689:function(e,t,n){"use strict";n.d(t,{i:function(){return m}});var a=n(1024),r=n(48088),i=n(21679),o=n(11306),c=n(53808),l=n(51092),s={fetch:function(e,t){var n=e.dataServiceName,a=e.eventPrefix,s=e.fetchData,u=e.setData,d=e.onError,m=e.deleteEventPrefix;if(c.q.isFunction(s)){if(c.q.isFunction(u)){var v=d&&c.q.isFunction(d),f=i.u.getInstance(n),p=r.Radio.channel(f.channelName),y="".concat(a,":request"),g="".concat(a,":sync"),h="".concat(a,":error"),b="".concat(a,":invalidate"),E=m&&"".concat(m,":sync"),N=function(){return t(!1)},w=function(){return t(!0)},S=function(){return t(!1)},C=function(){return p.off(b,S)};p.once(y,N),p.once(g,w),p.once(b,S),v&&p.once(h,d),E&&p.once(E,C);var k=s(f);return k&&(t(!0),e.setData(k)),function(){i.u.releaseInstance(n),p.off(y,N),p.off(g,w),p.off(b,S),v&&p.off(h,d),E&&p.off(E,C)}}l.ErrorHelper.throw(new o.H("A setData function must be passed to fetch"))}else l.ErrorHelper.throw(new o.H("A fetchData function must be passed to fetch"))}};function u(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.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)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function m(e,t){var n,r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=(n=a.useState(!1),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(n,r)||u(n,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.")}()),c=o[0],l=o[1];a.useEffect((function(){l(!1)}),function(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(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.")}()}(t)),a.useEffect((function(){if(i)return s.fetch(e,l)}),[c,i])}},41777:function(e,t,n){"use strict";n.d(t,{u:function(){return m}});var a=n(1024),r=n.n(a);function i(e){var t;return r().createElement("img",{alt:"",role:"presentation",src:e.src,className:"".concat("NsLci"," ").concat(null!==(t=e.className)&&void 0!==t?t:"")})}var o=n(31647),c=n(53808),l=n(17439),s=n(54753),u=n(52076);function d(e){var t=e.className||"btn btn-dark";return e.disabled&&(t+=" disabled"),e.icon?r().createElement(l.h,{className:t,onClick:e.onClick,appLink:e.appLink,svgName:e.icon,href:e.href,openInNewTab:e.openInNewTab,disabled:e.disabled},e.text):!e.appLink||c.q.isFunction(e.onClick)||e.disabled?e.href&&!e.disabled?r().createElement("a",{className:t,href:e.href,target:e.openInNewTab?"_blank":null},e.text):r().createElement("button",{disabled:e.disabled,onClick:function(){e.disabled||(c.q.isFunction(e.onClick)&&e.onClick(),e.appLink&&o.Q.AppLinkHelper.trigger(e.appLink),u.k.logUserAction(e.analyticsData,e.analyticsOptions))},className:t},e.text):r().createElement(s.F,{appLink:e.appLink,className:t,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions},e.text)}function m(e){var t;return r().createElement("div",{className:"text-center d-flex flex-column align-items-center ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.children)}m.defaultProps={className:"pt-5"},m.Image=function(e){return r().createElement(i,Object.assign({},e))},m.Cta=function(e){return r().createElement(d,Object.assign({},e))},m.Heading=function(e){return r().createElement("h2",{className:e.className||"h6"},e.children)},m.Info=function(e){return e.injectHtml?r().createElement("p",{className:e.className||"mb-3 w-50",dangerouslySetInnerHTML:{__html:e.children}}):r().createElement("p",{className:e.className||"mb-3 w-50"},e.children)}},17439:function(e,t,n){"use strict";n.d(t,{h:function(){return u}});var a=n(1024),r=n(31647),i=n(53808),o=n(52076),c=n(39396),l=n(54753),s={iconButton:"aGxoe",iconWithText:"_cjiV",svg:"q6vwS",iconOnly:"T1CzO"};function u(e){var t="".concat(e.className," ").concat(s.iconButton);e.children?t+=" ".concat(s.iconWithText):t+=" ".concat(s.iconOnly),e.disabled&&(t+=" disabled");var n=a.createElement(c.x,{svgName:e.svgName,className:"svg-container ".concat(s.svg),size:e.svgSize});return e.appLink||e.href?e.href?a.createElement("a",{className:t,href:e.href,onClick:function(t){t.preventDefault(),e.analyticsData&&e.analyticsOptions&&o.k.logUserAction(e.analyticsData,e.analyticsOptions),i.q.isFunction(e.onClick)&&e.onClick(t),r.Q.LocationUtils.PageLoad(e.href,e.openInNewTab)}},n,e.children):a.createElement(l.F,{appLink:e.appLink,className:t,onClick:e.onClick,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled},n,e.children):a.createElement("button",{type:"button",className:t,onClick:function(t){e.analyticsData&&e.analyticsOptions&&o.k.logUserAction(e.analyticsData,e.analyticsOptions),i.q.isFunction(e.onClick)&&e.onClick(t)},disabled:e.disabled},n,e.children)}},72564:function(e,t,n){"use strict";n.d(t,{Q:function(){return d},M:function(){return m}});var a=n(1024),r=n(63151),i={padNumber:function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}},o=n(54753),c=n(74421),l={isSeries:function(e){return(null==e?void 0:e.typeId)===c.E.Series},buildSeriesSeasonEpisodeText:function(e,t,n){if(!e)return"";if(!t||!n)return e.toUpperCase();var a=i.padNumber(t,2),r=i.padNumber(n,2);return"".concat(e.toUpperCase()," S").concat(a," • E").concat(r)}},s=n(22218),u={appLink:"b0KLR",hoverUnderline:"YR5Q7",small:"ts6Yo"};function d(e){var t=e.video,n=t.season;if(!t.episodeNumber||!n)return a.createElement(a.Fragment,null);var r=i.padNumber(n.number,2),o=i.padNumber(t.episodeNumber,2);return a.createElement("span",{className:"d-inline-block ".concat(e.appLink?u.hoverUnderline:"")},e.withSeriesTitle&&a.createElement(a.Fragment,null," "),!!r&&"S".concat(r," • "),"E",o)}function m(e){var t,n=e.appLink,i=e.video,c=e.className,m=void 0===c?"":c,v=null==i?void 0:i.series;if(!v||!v.id)return a.createElement(a.Fragment,null);var f=n&&Object.assign(Object.assign({},n),{args:[v.id,r.m.slugify(v.name)]}),p=Object.assign(Object.assign({},e.analyticsData),{id:null==v?void 0:v.id,name:null==v?void 0:v.name,videoId:null==i?void 0:i.id,videoName:null==i?void 0:i.name}),y=Object.assign(Object.assign({},e.analyticsOptions),{entity:s.py.Series,actionType:s.Vw.Click,descriptor:s._S.Title}),g=l.buildSeriesSeasonEpisodeText(v.name,null===(t=i.season)||void 0===t?void 0:t.number,i.episodeNumber);return f?a.createElement("div",null,a.createElement(o.F,{appLink:f,className:"text-uppercase d-block text-truncate mb-0 ".concat(u.appLink," ").concat("sm"===e.size?"".concat(u.small," font-weight-normal"):""," ").concat(m),analyticsData:p,analyticsOptions:y,title:g},v.name,a.createElement(d,Object.assign({},e,{withSeriesTitle:!0})))):a.createElement("div",{className:"text-uppercase text-truncate mb-0 ".concat(u.appLink," ").concat("sm"===e.size?"".concat(u.small," font-weight-normal"):""," ").concat(m),title:g},v.name,a.createElement(d,Object.assign({},e,{withSeriesTitle:!0})))}},34564:function(e,t,n){"use strict";n.d(t,{z:function(){return u}});var a=n(1024),r=n.n(a),i=n(54753),o=n(89603),c=n(63791),l=n(39396),s=n(91807);function u(e){var t,n,a=e.tag,u=e.appLink,d=e.onClick,m=e.disabled,v=e.tagClass,f=void 0===v?"tag":v,p=a.name.toLowerCase(),y=null===(t=a.tagType)||void 0===t?void 0:t.toLowerCase(),g="badge-pill py-1 px-2 my-1 mr-1 ".concat(f," ").concat(function(e){switch(e){case o.Q.Pedagogy:case o.Q.Skill:return"pedagogy-tag text-white";case o.Q.Hidden:return"hidden-tag";case o.Q.Normal:default:return""}}(y)),h=y===o.Q.Normal&&!!(null===(n=e.themeColours)||void 0===n?void 0:n.secondary);h&&(g+=" text-white"),!u&&!d||m||(g+=" cursor-pointer"),m&&(g+=" "+s.Z.disabled),e.onRemove&&(g+=" "+s.Z.badge),u||(g+=" d-inline-block");var b=h?{backgroundColor:e.themeColours.secondary}:{};return u?r().createElement(i.F,{onClick:d,appLink:u,className:g,title:p,style:b},r().createElement("span",{className:"text-truncate text-nowrap"},p)):r().createElement("span",{onClick:d,className:g,title:p,style:b},r().createElement("span",{className:"text-truncate text-nowrap"},p,e.onRemove&&r().createElement("button",{onClick:e.onRemove,className:"".concat(s.Z.close," close font-size-normal")},r().createElement(l.x,{size:l.S.Small,svgName:c.vn.Close,className:"d-inline-block svg-container"}))))}},24828:function(e,t,n){"use strict";n.d(t,{o:function(){return a}});var a=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},8371:function(e,t,n){"use strict";var a;n.d(t,{b:function(){return a}}),function(e){e.AU="cv-ap-southeast-1",e.NZ="cv-ap-southeast-2",e.UK="cv-eu-west-1",e.US="cv-na-west-1"}(a||(a={}))},82378:function(e,t,n){"use strict";n.d(t,{i:function(){return i}});var a=n(1024),r=n(94223);function i(e,t){var n=e,i=t,o=(0,r.P)(e&&function(e){return n(e).key});return(0,a.useEffect)((function(){o&&o.shouldInitialFetch&&t&&i()}),[null==o?void 0:o.shouldInitialFetch,t]),(0,a.useEffect)((function(){o&&o.nextCursor&&!o.isFetching&&t&&i(o.nextCursor)}),[null==o?void 0:o.nextCursor,null==o?void 0:o.isFetching,t]),o}},32557:function(e,t,n){"use strict";n.d(t,{X:function(){return y},L:function(){return g}});var a=n(1024),r=n.n(a),i=n(85887),o=n(53808),c=function(){var e=r().useRef(!0);return r().useEffect((function(){return function(){e.current=!1}}),[]),e};function l(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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.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)?s(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 s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var u=275,d=5,m={className:"",delay:0,style:null},v={screenX:0,screenY:0};function f(e,t){var n;e.current&&(t.className&&(null===(n=e.current.classList)||void 0===n||n.add(t.className)),t.style&&Object.keys(t.style).forEach((function(n){e.current.style[n]=t.style[n]})))}function p(e,t){var n;e.current&&(t.className&&(null===(n=e.current.classList)||void 0===n||n.remove(t.className)),t.style&&Object.keys(t.style).forEach((function(t){e.current.style[t]=null})))}function y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,t=c(),n=l(a.useState(e),2),r=n[0],s=n[1],u=l(a.useState(!1),2),d=u[0],v=u[1],y=a.useRef(null);a.useEffect((function(){i.t.isEqual(e,r)||s(e)}),[e]);var g=o.q.throttle((function(){f(y,r),t.current&&v(!0)}),r.delay,{leading:!1}),h=function(){o.q.isFunction(g.cancel)&&g.cancel(),p(y,r),t.current&&v(!1)};return a.useLayoutEffect((function(){var e=y.current;if(e)return e.addEventListener("mouseenter",g),e.addEventListener("mouseleave",h),function(){e.removeEventListener("mouseenter",g),e.removeEventListener("mouseleave",h)}}),[y.current,r]),[y,d]}function g(e){var t=l(a.useState(e),2),n=t[0],r=t[1],c=a.useRef(Object.assign({},v)),s=a.useRef(!1),m=a.useRef(0),y=a.useRef(null),g=l(a.useState(!1),2),h=g[0],b=g[1];function E(){m.current&&(window.clearTimeout(m.current),m.current=0)}function N(){s.current=!0}function w(e){if(s.current){var t,a,r=Object.assign({},c.current);c.current.screenX=e.screenX,c.current.screenY=e.screenY,function(e,t){return Math.abs(e.screenX-t.screenX)>d||Math.abs(e.screenY-t.screenY)>d}(r,e)&&E(),t=function(){f(y,n),b(!0)},a=n.delay||u,m.current||(m.current=window.setTimeout(t,a))}}function S(){E(),p(y,n),s.current=!1,b(!1)}return a.useEffect((function(){i.t.isEqual(e,n)||r(e)}),[e]),a.useLayoutEffect((function(){if(y.current){var e=o.q.throttle(w,25,{leading:!1});return y.current.addEventListener("mouseenter",N),y.current.addEventListener("mousemove",e),y.current.addEventListener("mouseleave",S),function(){y.current&&(y.current.removeEventListener("mouseenter",N),y.current.removeEventListener("mousemove",e),y.current.removeEventListener("mouseleave",S))}}}),[y.current,n]),[y,h]}},29267:function(e,t,n){"use strict";n.d(t,{Y:function(){return i}});var a=n(64038);function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function i(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.prevent,o=n.rootMargin,c=n.triggerOnce,l=void 0===c||c,s=(e=a.useInView({triggerOnce:l,rootMargin:o}),t=3,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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.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)?r(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],d=s[1],m=s[2];return!0!==i&&void 0!==window.IntersectionObserver||(d=!0,u=null),{ref:u,inView:d,initialized:!!m}}},94223:function(e,t,n){"use strict";n.d(t,{P:function(){return l}});var a=n(1024),r=n(58566),i=n(86120),o=n(53808);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function l(e,t,n){function l(e){if(e)return o.q.isFunction(t)?t(e):e.data}function s(e){var t,a;if(e)return n?n(e):null===(a=null===(t=e.pagination)||void 0===t?void 0:t.cursors)||void 0===a?void 0:a.next}return(0,r.useSelector)((0,a.useMemo)((function(){return function(t){if(o.q.isFunction(e)){for(var n=e,a=o.q.isFunction(e)&&n(),r=a&&i.a.getResponse(t,a),u=r&&r.isFetching,d=r&&r.statusCode,m=r&&r.hasCompleted,v=r&&r.shouldFetch,f=l(r&&r.data),p=s(r&&r.data),y=function(e){var t;if(e)return null===(t=e)||void 0===t?void 0:t.count}(r&&r.data);p&&(r=i.a.getResponse(t,n(p)),u=u||r.isFetching,d=r.statusCode,m=r.hasCompleted,!r.shouldFetch);){var g=l(r.data);g&&f.push.apply(f,function(e){if(Array.isArray(e))return c(e)}(E=g)||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 c(e,t);var n=Object.prototype.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)?c(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.")}());var h=s(r.data);p=h===p?null:h}var b={shouldInitialFetch:v,items:f,nextCursor:p,isFetching:u,statusCode:d,hasCompleted:m};return"number"==typeof y&&(b.totalItems=y),b}var E}}),[e]))}n(35656).o.Ok},6697:function(e,t,n){"use strict";n.d(t,{y:function(){return r}});var a=n(57857),r={getEnglishName:function(e,t){var n,r,i=e.language;return r=(null==t?void 0:t.filter((function(e){return e.language!==i}))).length>0?CVLanguages.getFullEnglishName(i):CVLanguages.getEnglishName(i),(null===(n=e.metadata)||void 0===n?void 0:n.autoGenerated)?a.T.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:r}):r}}},22231:function(e,t,n){"use strict";function a(e,t){return t[e.charCodeAt(0)%t.length]}n.d(t,{x:function(){return a}})},61421:function(e,t,n){"use strict";n.d(t,{x:function(){return R}});var a=n(1024),r=n.n(a),i=n(66703),o=n(45458),c=n(56285),l=n(50997),s=n(89707),u=n(72564),d={seriesLink:"Z5BW7"},m="libraryRequests.videoDetails";function v(e){var t,n;return(null===(n=null===(t=e.items)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)?r().createElement("p",{className:"mb-0"},e.items.data.map((function(e,t){return r().createElement("span",{key:t},e.name)}))):null}function f(e){return r().createElement(r().Fragment,null,r().createElement("div",{className:"col-3"},r().createElement("label",null,r().createElement(i.x,{namespace:m,phrase:e.phrase}))),r().createElement("div",{className:"col-9 mb-3"},e.children))}function p(e){var t,n,a,i,m,p,y,g,h,b,E,N,w,S,C=e.libraryRequest.object;return r().createElement("div",{className:"row"},((null==C?void 0:C.name)||e.libraryRequest.name)&&r().createElement(f,{phrase:"title"},(null==C?void 0:C.name)||e.libraryRequest.name),!!C&&r().createElement(r().Fragment,null,!!C.series&&r().createElement(f,{phrase:"series"},r().createElement("a",{target:"_blank",href:(N=C.series,w=e.config,S="series/".concat(N.id),s.k.getMainProductUrl(w,S,S)),className:"".concat(d.seriesLink," text-reset")},C.series.name,r().createElement(u.Q,{video:C,withSeriesTitle:!0}))),!!(null===(t=C.rating)||void 0===t?void 0:t.code)&&r().createElement(f,{phrase:"rating"},r().createElement("div",{className:"d-flex"},r().createElement(o.C,{type:o.g.Rating,data:C.rating}))),!!C.description&&r().createElement(f,{phrase:"description"},r().createElement("span",{className:"pre-wrap"},C.description)),!!C.productionYear&&r().createElement(f,{phrase:"productionYear"},C.productionYear),!!(null===(a=null===(n=C.producers)||void 0===n?void 0:n.data)||void 0===a?void 0:a.length)&&r().createElement(f,{phrase:"producers"},r().createElement(v,{items:C.producers})),!!(null===(m=null===(i=C.directors)||void 0===i?void 0:i.data)||void 0===m?void 0:m.length)&&r().createElement(f,{phrase:"directors"},r().createElement(v,{items:C.directors})),!!(null===(y=null===(p=C.productionCompanies)||void 0===p?void 0:p.data)||void 0===y?void 0:y.length)&&r().createElement(f,{phrase:"productionCompanies"},r().createElement(v,{items:C.productionCompanies})),!!(null===(h=null===(g=C.distributors)||void 0===g?void 0:g.data)||void 0===h?void 0:h.length)&&r().createElement(f,{phrase:"distributors"},r().createElement(v,{items:C.distributors})),!e.hideBroadcastInfo&&!!(null===(b=C.channel)||void 0===b?void 0:b.name)&&r().createElement(f,{phrase:"channel"},null===(E=C.channel)||void 0===E?void 0:E.name),!e.hideBroadcastInfo&&!!C.dateBroadcast&&r().createElement(f,{phrase:"broadcastDate"},c.O.format(C.dateBroadcast,l.K4.FULL_YEAR))))}var y=n(53808);function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}n(30582);var h=r().createContext({setPageMetadata:function(e){return e},revertPageMetadata:function(){},hasProvider:!1});function b(e){var t,n,i=e.view,o=e.options,c=void 0===o?{}:o,l=e.className,s=void 0===l?"":l,u=e.dependencies,d=void 0===u?[]:u,m=a.useMemo((function(){return new i(c)}),d);t=m.title,n=r().useContext(h),a.useEffect((function(){"boolean"!=typeof t&&n.setPageMetadata({title:t})}),[t]);var v=function(e,t){var n,r=a.useRef(null);return a.useEffect((function(){if(e){var t=r.current;return e.render(),t.hasChildNodes()?t.replaceChild(e.el,t.firstChild):t.appendChild(e.el),e.triggerMethod&&e.triggerMethod("attach"),e.trigger("rendered"),function(){y.q.isFunction(e.close)?e.close():y.q.isFunction(e.destroy)&&e.destroy()}}}),function(e){if(Array.isArray(e))return g(e)}(n=t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.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}}(n)||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.")}()),r}(m,[m]);return i?a.createElement("div",{ref:v,className:s}):a.createElement(a.Fragment,null)}var E=n(70065),N=n(61356),w=n(71192);function S(e){var t;return r().createElement("div",{className:"col-12 mb-3 p-0"},r().createElement(b,{view:N.c,options:{model:new w.n(e.video,{parse:!0}),webPlayerUrl:e.webPlayerUrl,analyticsOptions:{location:E.LocationContext.VideoRequest},currentUser:e.currentUser,createViewKey:e.createViewKey,playerApiUrl:e.playerApiUrl},dependencies:[null===(t=e.video)||void 0===t?void 0:t.id]}))}var C=n(82602),k=n(38182),O=n(83891),j={avatarContainer:"hwnEk",comment:"LyFKD"},x=n(57857),T="libraryRequests.comments",A=x.T.encloseNamespace(T);function I(e){var t,n,a,i,o,c,l=e.comment,s="".concat(null===(t=l.user)||void 0===t?void 0:t.name," ").concat(null===(n=l.user)||void 0===n?void 0:n.surname);return l.user||(s=A("deletedUser")),r().createElement("div",{className:"d-flex ".concat(j.comment)},r().createElement("div",{className:"".concat(j.avatarContainer," mr-2 flex-shrink-0")},r().createElement(k.q,{imageUrl:null===(i=null===(a=l.user)||void 0===a?void 0:a.avatar)||void 0===i?void 0:i.url,imageCdnUrl:e.imageCdnUrl,initials:O.l.getInitials(null===(o=l.user)||void 0===o?void 0:o.name,null===(c=l.user)||void 0===c?void 0:c.surname)})),r().createElement("div",null,r().createElement("span",{className:"font-weight-bold pr-2"},s),r().createElement("span",{className:"text-muted"},(0,C.WU)(l.dateCreated)),r().createElement("p",{className:"mb-0"},l.message)))}function L(e){var t;return(null===(t=e.comments)||void 0===t?void 0:t.length)?r().createElement("div",{className:"pb-3 border-bottom mb-3"},r().createElement("h2",{className:"h5"},r().createElement(i.x,{namespace:T,phrase:"comments"})),r().createElement("div",{className:"border rounded p-2"},e.comments.map((function(t,n){return r().createElement(I,{key:n,comment:t,imageCdnUrl:e.imageCdnUrl})})))):r().createElement(r().Fragment,null)}var P=n(8371),F="libraryRequests.info";function R(e){return r().createElement("div",{className:"bg-white rounded p-3"},r().createElement(L,{comments:e.comments,imageCdnUrl:e.config.get("imageCdnUrl")}),r().createElement("h2",{className:"h5"},r().createElement(i.x,{namespace:F,phrase:"videoDetails"})),r().createElement(S,{video:e.libraryRequest.object,webPlayerUrl:e.config.get("webPlayerUrl"),currentUser:e.currentUser,createViewKey:e.createViewKey,playerApiUrl:e.config.get("playerApiUrl")}),r().createElement(p,{libraryRequest:e.libraryRequest,hideBroadcastInfo:e.currentUser.get("instanceRegion")===P.b.US,config:e.config}))}},49824:function(e,t,n){"use strict";n.d(t,{j:function(){return i}});var a=n(1024),r=n.n(a);function i(){return r().createElement("div",{className:"bg-white rounded p-3"},r().createElement("div",{className:"partial-loading-background mb-2",style:{height:"1.25rem",width:"9rem"}}),r().createElement("div",{className:"col-12 mb-3 p-0"},r().createElement("div",{className:"responsive-img partial-loading-background rounded"})),r().createElement("div",{className:"row"},r().createElement("div",{className:"col-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"3.4rem"}})),r().createElement("div",{className:"col-9 mb-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"9rem"}})),r().createElement("div",{className:"col-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"5rem"}})),r().createElement("div",{className:"col-9 mb-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"2rem"}})),r().createElement("div",{className:"col-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"7rem"}})),r().createElement("div",{className:"col-9 mb-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"16rem"}}))))}},18844:function(e,t,n){"use strict";n.d(t,{q:function(){return At}});var a=n(1024),r=n.n(a),i=n(98495),o=n(82602),c=n(70065),l=n(57857),s=n(53808),u=n(63791),d=n(39396),m=n(2491),v=n(40221),f=n(37360),p=n(18830),y={isFavouritedByCurrentUser:function(e){var t;return!(1!==(null===(t=null==e?void 0:e.favouritedBy)||void 0===t?void 0:t.data.length))},isFavouritedByUser:function(e,t){var n;return!!v.m.findWhere(null===(n=null==e?void 0:e.favouritedBy)||void 0===n?void 0:n.data,{id:null==t?void 0:t.id})},updateVideoState:function(e,t,n){return{id:e.id,favouritedBy:{data:n?[{id:t.id}]:[],pagination:{limit:25,cursors:{next:"",previous:""}}}}},showFavouriteButton:function(e,t){var n;return!(!(null===(n=p.M.getCanBeConsumed(e))||void 0===n?void 0:n.canConsume)||!t&&!f.V.isTabletOrMobile()&&!y.isFavouritedByCurrentUser(e))}},g=n(58424),h={favourited:"t0svX",favouriteButton:"CFRo3",heart:"ZMMQu",heartOutline:"truFo"};function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var E=l.T.encloseNamespace("shared.favouriteButton");function N(e){var t,n,r=(0,m.Z)(),i=y.isFavouritedByCurrentUser(e.video),o=(t=a.useState(i),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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.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)?b(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.")}()),c=o[0],l=o[1];a.useEffect((function(){l(i)}),[i]);var v="".concat("d-flex align-items-center justify-content-center"," cursor-pointer ").concat(h.favouriteButton," ").concat(c?h.favourited:"");return e.className&&(v+=" ".concat(e.className)),s.q.isFunction(e.setFavourite)&&s.q.isFunction(e.canFavourite)&&e.canFavourite(e.video)?a.createElement(g.L,{className:v,onClick:function(){var t=!c;l(t),e.setFavourite(e.video,t,null,(function(){r.error(E(p.M.isClip(e.video)?t?"favouriteClipError":"unfavouriteClipError":p.M.isInteractive(e.video)?t?"favouriteInteractiveError":"unfavouriteInteractiveError":t?"favouriteVideoError":"unfavouriteVideoError")),l(!t)}),e.analyticsData,e.analyticsOptions)}},a.createElement(d.x,{svgName:u.vn.Heart,className:"svg-container ".concat(h.heart)}),a.createElement(d.x,{svgName:u.vn.HeartOutline,className:"svg-container ".concat(h.heartOutline)})):a.createElement(a.Fragment,null)}var w=n(85887),S=n(29267),C="fVSzb";function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var O=a.memo((function(e){var t,n,r=e.forceLoad,i=e.extraClasses,o=void 0===i?"":i,c=e.errorFallbackImageSrc,l=e.preventLoad,s=void 0!==l&&l,u=e.src,d=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n}(e,["forceLoad","extraClasses","errorFallbackImageSrc","preventLoad","src"]),m=(0,S.Y)({rootMargin:"500px"}),v=m.ref,f=m.inView,p=(t=a.useState(!1),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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.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)?k(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.")}()),y=p[0],g=p[1];function h(){return y&&c?c:e.src}if(a.useEffect((function(){if((r||f)&&!s){var e=new Image;return e.onerror=function(){g(!0),c&&(e.src=c)},e.src=u,function(){return e.onerror=null}}}),[f,s]),y&&!c)return a.createElement(a.Fragment,null);if(!v)return a.createElement("img",Object.assign({className:"".concat(C," ").concat(o),alt:"",src:h()},d));var b=Object.assign(Object.assign({alt:""},d),!f&&!r||s?{}:{src:h()});return r||(b.ref=v),a.createElement("img",Object.assign({className:"".concat(C," ").concat(o)},b))})),j=n(54753),x=n(87013),T={image:"vdd4V",thumbnail:"Ez0E7",tallPoster:"H9bQA",cover:"Nudts",banner:"IOvDH",poster:"iiY56",pdf:"aDJiJ",link:"wDpui"},A=n(88483);function I(e){var t=T.image,n="";return e.imageType===A.__.Thumbnails&&(n="thumbnail ".concat(T.thumbnail)),e.imageType===A.__.TallPosters&&(n=T.tallPoster),e.imageType===A.__.Covers&&(n=T.cover),e.imageType===A.__.Banners&&(n=T.banner),e.imageType===A.__.Posters&&(n=T.poster),e.imageType===A.__.Pdf&&(n=T.pdf),e.imageType===A.__.Link&&(n=T.link),n&&(t+=" ".concat(n)),e.className&&(t+=" ".concat(e.className)),t}function L(e){var t=e.data,n=e.imageOptions,r=e.appLink,i=e.preload,o=e.preventLoad,c=e.analyticsOptions,l=e.analyticsData,s=e.imageClassName,u="";"string"==typeof t?u=t:w.t.isObject(t)&&(u=t.url);var d=u&&n?x.j.createUrl(u,n):u;return a.createElement("div",{className:I(e),style:e.imageStyle},a.createElement(j.F,{appLink:r,analyticsData:l,analyticsOptions:c,onClick:e.onClick},e.children,d&&a.createElement(O,{src:d,forceLoad:i,preventLoad:o,extraClasses:s,errorFallbackImageSrc:e.errorFallbackImageSrc})))}var P=n(72564),F=n(44550),R=n(45458);function U(e){var t=p.M.getVideoProgress(e.video),n=t&&e.video.duration&&t/e.video.duration*1e5;return n?a.createElement("div",{className:"bg-primary h-100",style:{width:"".concat(n,"%")}}):a.createElement(a.Fragment,null)}var M={bottomBar:"YnXtZ"};function V(e){return p.M.isVideo(e.video)?r().createElement("div",{className:M.bottomBar},r().createElement(U,{video:e.video})):r().createElement(r().Fragment,null)}var D={padlock:"w4cg8",sm:"JpIYd"};function q(e){var t="sm"===e.size?d.S.Small:d.S.Standard;return r().createElement("div",{className:"".concat(D.padlock," ").concat("sm"===e.size?D.sm:""," bg-white cursor-default d-flex align-items-center justify-content-center")},r().createElement(d.x,{svgName:u.vn.Lock,size:t}))}var _,z,B,H=n(63946),Q={baseFallbackContainer:"ZvbeV",svgFallbackContainer:"atIHN",subjectFallbackContainer:"m20L7",subjectFallbackContainerSmall:"QIbxu",subjectFallbackContainerLarge:"z_sHT",seriesItemFallback:"epoLB",playlistItemFallback:"h1S5T",playlistFallback:"ZbKBN",posterFallback:"I1mTo",subjectFallback:"kNG8Z",fallbackThumbnailImage:"nKsWZ",videoFallback:"LolCW",folderFallback:"mdrT5"},W=n(22231),Z=n(24828);function K(e){var t,n=e.type,r=e.mediaType,i=e.extraClasses,o=e.containerClassSize;if(n===_.Video)return a.createElement("div",{className:"".concat(Q.videoFallback," ").concat(e.extraClasses," bg-light-blue")});if(n===_.Folder)return a.createElement("div",{className:"".concat(Q.folderFallback," ").concat(e.extraClasses," ").concat((0,W.x)(e.name,Z.o))});var c=function(e){return e===_.SeriesThumbnail?Q.seriesItemFallback:e===_.PlaylistThumbnail?Q.playlistItemFallback:e===_.Playlist?Q.playlistFallback:e===_.Series||e===_.TallSubject?Q.posterFallback:e===_.Subject?"".concat(Q.subjectFallback," svg-container d-inline-block"):""}(n),l=function(e){return e===_.SeriesThumbnail||e===_.PlaylistThumbnail?u.vn.Play:e===_.Playlist?u.vn.Image:e===_.Series?u.vn.Series:e===_.Subject||e===_.TallSubject?u.vn.Subject:""}(n),s=function(e){return e===_.Subject?d.S.ExtraLarge:d.S.Standard}(n),m="".concat(function(e,t,n){if(t===_.Subject){var a=n===B.Large?Q.subjectFallbackContainerLarge:Q.subjectFallbackContainerSmall;return"".concat(Q.subjectFallbackContainer," ").concat(a)}return e===z.Svg?t===_.SeriesThumbnail||t===_.PlaylistThumbnail?"".concat(Q.svgFallbackContainer," rounded-lg"):Q.svgFallbackContainer:Q.baseFallbackContainer}(r,n,o));return i&&(m+=" ".concat(e.extraClasses)),a.createElement("div",{className:m},r===z.Svg?a.createElement(d.x,{svgName:l,className:"".concat(c," ").concat(null!==(t=e.svgContainerClassName)&&void 0!==t?t:""),tagName:"div",size:s}):a.createElement("div",{className:Q.fallbackThumbnailImage,style:{backgroundImage:"url('".concat(l,"')")}}))}!function(e){e[e.Playlist=0]="Playlist",e[e.PlaylistThumbnail=1]="PlaylistThumbnail",e[e.Series=2]="Series",e[e.SeriesThumbnail=3]="SeriesThumbnail",e[e.Subject=4]="Subject",e[e.TallSubject=5]="TallSubject",e[e.Video=6]="Video",e[e.Folder=7]="Folder"}(_||(_={})),function(e){e[e.Svg=0]="Svg",e[e.Image=1]="Image"}(z||(z={})),function(e){e[e.Large=0]="Large",e[e.Small=1]="Small"}(B||(B={})),K.defaultProps={mediaType:z.Svg,containerClassSize:B.Large};var X={badge:"Sc3C4",svg:"Ag_ex",text:"Ipmb3",sm:"Pi49o"},Y=l.T.encloseNamespace("shared.videoTypeBadge");function G(e){var t="".concat(X.badge," rounded-pill text-white ").concat("sm"===e.size?X.sm:"");return r().createElement(r().Fragment,null,p.M.isClip(e.video)&&r().createElement("div",{className:"".concat(t," bg-dark-blue")},r().createElement(d.x,{className:"svg-container d-block ".concat(X.svg),size:"sm"===e.size?d.S.Small:d.S.Standard,svgName:u.vn.Clip}),r().createElement("span",{className:X.text},Y("clip"))),p.M.isInteractive(e.video)&&r().createElement("div",{className:"".concat(t," bg-green")},r().createElement(d.x,{className:"svg-container ".concat(X.svg),size:"sm"===e.size?d.S.Small:d.S.Standard,svgName:u.vn.Interactive}),r().createElement("span",{className:X.text},Y("interactive"))))}G.default={size:"md"};var $,J={videoTypeBadge:"ft_ST",overlayContainer:"qu3A3",topRightContainer:"XAfZW",overlay:"NTrtm",downScale:"puKcM",title:"_6FukN",gradient:"rXzR8",playIcon:"dndOA",videoProgress:"yhWf4",badgeContainer:"AtgmC",clipProgress:"E2egN",interactiveProgress:"WycwR"};function ee(e){var t="mb-1";return e&&(t+=J.downScale),t}function te(e){var t=e.video,n=e.appLink,a=e.imageOptions,i=e.setFavourite,o=e.canFavourite,l=e.preload,s=e.hovering,m=p.M.getCanBeConsumed(e.video).canNavigate,v=Object.assign(Object.assign({},e.analyticsOptions),{entity:p.M.getAnalyticsEntity(t)}),f=y.showFavouriteButton(e.video,s),g=p.M.isVideo(t),h=!g,b=p.M.getRating(e.video);return r().createElement(H.u,{title:p.M.getPrivacyReasoning(e.video),spanHack:!0,spanHackClassName:""},r().createElement("div",{className:"position-relative rounded-lg overflow-hidden"},f&&r().createElement("div",{className:J.topRightContainer},r().createElement(N,{setFavourite:i,canFavourite:o,video:t,analyticsData:e.analyticsData,analyticsOptions:v})),!m&&r().createElement("div",{className:J.topRightContainer},r().createElement(q,null)),h&&r().createElement("div",{className:J.videoTypeBadge},r().createElement(G,{video:t})),r().createElement(L,{data:p.M.getThumbnail(t),appLink:m?n:null,imageType:A.__.Thumbnails,imageOptions:a,preload:l,className:J.gradient,analyticsData:Object.assign(Object.assign({},e.analyticsData),{id:t.id,name:t.name}),analyticsOptions:Object.assign(Object.assign({},v),{actionType:c.UserAction.Click,descriptor:c.ClickDescriptor.Thumbnail})},!(!s||!m)&&r().createElement(d.x,{className:J.playIcon,svgName:u.vn.PlayCircle}),r().createElement(K,{type:_.Video}),r().createElement("div",{className:J.overlayContainer},r().createElement("div",{className:J.overlay},r().createElement("div",{className:"".concat(ee(s)," ").concat(J.title)},g&&p.M.hasSeries(t)&&r().createElement(P.M,{className:"text-shadow clamp-1",video:t,appLink:null,analyticsOptions:null}),r().createElement("span",{className:"h6 text-reset text-shadow clamp-1"},p.M.getTitle(t))),r().createElement(V,{video:t}),s&&r().createElement(F.c,{className:"mt-1"},p.M.isVideo(t)&&r().createElement(r().Fragment,null,r().createElement(R.C,{type:R.g.Rating,data:b}),t.hasSubtitle&&r().createElement("span",{className:"badge p-0"},r().createElement(d.x,{svgName:u.vn.CloseCaptionBadge})),r().createElement(R.C,{type:R.g.Interactive,data:t.hasInteractives}),r().createElement(R.C,{type:R.g.DurationExact,data:p.M.getDuration(e.video)}))))))))}!function(e){e[e.Below=1]="Below",e[e.Overlay=2]="Overlay",e[e.Independent=3]="Independent"}($||($={}));var ne,ae={mask:"qpc7L",small:"L8Oxs",video:"b8kJW",playlist:"eo2p2",maskContainer:"lpwag"};function re(e){var t=e.type,n=e.size,r=function(e){return e===ne.Video?ae.video:e===ne.Playlist?ae.playlist:""}(t),i=function(e){return e===ne.Video?u.vn.PlayCircle:""}(t);return a.createElement("div",{className:"".concat(ae.maskContainer," ").concat("sm"===n?ae.small:"")},a.createElement("div",{className:ae.mask}),a.createElement(d.x,{svgName:i,className:r}))}!function(e){e[e.Video=0]="Video",e[e.Playlist=1]="Playlist",e[e.Series=2]="Series"}(ne||(ne={})),re.defaults={size:"md"};var ie=n(9579),oe=n(74421),ce={unchecked:"maxOx",checked:"k3CBB",checkMark:"Czq9C"};function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var se=l.T.encloseNamespace("shared.toggleActivityStatusButton");function ue(e){var t,n,r=(0,m.Z)(),i=(t=a.useState(e.activityStatus===ie.T.Complete),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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return le(e,t);var n=Object.prototype.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.")}()),o=i[0],c=i[1];a.useEffect((function(){c(e.activityStatus===ie.T.Complete)}),[e.activityStatus]);var l="cursor-pointer rounded-circle ".concat(o?ce.checked:ce.unchecked);return e.className&&(l+=" ".concat(e.className)),e.shareId&&e.activityStatus&&e.activityStatus!==ie.T.None&&s.q.isFunction(e.setActivityStatus)?a.createElement("div",{className:l,onClick:function(){var t=!o;c(t);var n=t?ie.T.Complete:ie.T.Incomplete;e.setActivityStatus(e.shareId,e.sharedEntity,n,null,(function(){r.error(se(function(){switch(e.sharedEntity.typeId){case oe.E.Video:return t?"completeVideoActivityError":"uncompleteVideoActivityError";case oe.E.Clip:return t?"completeClipActivityError":"uncompleteClipActivityError";case oe.E.Interactive:return t?"completeInteractiveActivityError":"uncompleteInteractiveActivityError";case oe.E.Playlist:return t?"completePlaylistActivityError":"uncompletePlaylistActivityError";case oe.E.Series:return t?"completeSeriesActivityError":"uncompleteSeriesActivityError"}}())),c(!t)}))}},a.createElement(d.x,{svgName:u.vn.Check,className:"svg-container ".concat(ce.checkMark)})):a.createElement(a.Fragment,null)}var de={container:"efxnE",cvIcon:"OJ_ZQ",action:"vWvGn"};function me(e){return p.M.getCanBeConsumed(e.video).canNavigate?function(e){var t;return!(null===(t=p.M.getCanBeConsumed(e.video))||void 0===t?void 0:t.canConsume)||!(!s.q.isFunction(e.setFavourite)||!s.q.isFunction(e.canFavourite))||!!s.q.isFunction(e.setActivityStatus)}(e)?r().createElement("div",{className:"".concat(de.container," d-flex align-items-center")},r().createElement(N,{setFavourite:e.setFavourite,canFavourite:e.canFavourite,video:e.video,className:de.action,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions}),r().createElement(ue,{activityStatus:e.activityStatus,setActivityStatus:e.setActivityStatus,sharedEntity:e.sharedEntity,shareId:e.shareId,className:de.action})):r().createElement(r().Fragment,null):r().createElement("div",{className:de.container},r().createElement(q,{size:e.size}))}var ve=n(32557);function fe(e){return e.audience?a.createElement("div",{className:"audience-label border rounded-pill d-inline-block px-2 text-nowrap \n ".concat("border-"+e.border," ").concat(e.className?e.className:"")},e.audience.name):a.createElement(a.Fragment,null)}var pe={badgeContainer:"fy9Un",sm:"Rb0TL"};function ye(e){var t=p.M.getRating(e.video),n=!!e.audience&&"sm"!==e.size,a=!n&&!e.hideRating&&!!t&&"sm"!==e.size;return!e.hideDuration||n||a?r().createElement(F.c,{className:"".concat(pe.badgeContainer," ").concat("sm"===e.size?pe.sm:"")},n&&r().createElement(fe,{audience:e.audience,className:"bg-white text-dark",border:"dark"}),a&&r().createElement(R.C,{type:R.g.Rating,data:t}),!e.hideDuration&&r().createElement(R.C,{type:e.newDurationStyle?R.g.DurationApproximate:R.g.DurationExact,data:p.M.getDuration(e.video)})):r().createElement(r().Fragment,null)}ye.defaultProps={newDurationStyle:!0,size:"md"};var ge={titleOverlay:"krg9f",clip:"MPRU6",large:"g5_ww",interactive:"Zzo3e",titleBelow:"tZjPt",overlayContainer:"EElm1",videoTypeBadge:"pwC3i",gradient:"LS_EH"};function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var be="shared.staticVideoThumbnail";function Ee(e){var t,n=e.video,a=e.seriesAppLink,i=e.textPosition,o=e.appLink,s=i===$.Overlay,u=p.M.getCanBeConsumed(e.video).canNavigate,d="";return s?(d=ge.titleOverlay,u&&(p.M.isClip(n)&&(d+=" "+ge.clip),p.M.isInteractive(n)&&(d+=" "+ge.interactive))):d=ge.titleBelow,r().createElement("div",{className:d},p.M.isVideo(n)&&p.M.hasSeries(n)&&r().createElement(P.M,{className:s?"text-shadow clamp-1":"clamp-2",video:n,appLink:s?null:a,analyticsOptions:{location:c.LocationContext.VideoThumbnail}}),s||!u?r().createElement("span",{className:"h6 text-reset text-shadow clamp-1"},null!==(t=n.name)&&void 0!==t?t:l.T.getPhrase(be,"videoUnavailable")):r().createElement(j.F,{className:"h6 text-reset clamp-2",appLink:o},n.name))}function Ne(e){var t,n,a,i=e.video,o=e.appLink,l=e.textPosition,s=e.imageOptions,u=e.setFavourite,d=e.preload,m=(t=(0,ve.X)(),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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var n=Object.prototype.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}}(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.")}()),v=m[0],f=m[1],g=p.M.getCanBeConsumed(i).canNavigate,h=Object.assign(Object.assign({},e.analyticsOptions),{entity:p.M.getAnalyticsEntity(i)}),b=!!o&&!e.hideMask&&g,E=p.M.getPrivacyReasoning(e.video,e.showSignIn),N=!p.M.isVideo(e.video);return r().createElement(H.u,{title:E,spanHack:!0,spanHackClassName:""},r().createElement("div",{className:(a="position-relative",a+=o&&g?" cursor-pointer":" cursor-default",e.extraClasses&&(a+=" ".concat(e.extraClasses)),l===$.Overlay&&(a+=" rounded overflow-hidden"),a),ref:v},r().createElement(me,{video:i,shareId:e.shareId,sharedEntity:e.sharedEntity,activityStatus:e.activityStatus,setActivityStatus:e.setActivityStatus,setFavourite:u,canFavourite:function(){var t;return(null===(t=e.canFavourite)||void 0===t?void 0:t.call(e,e.video))&&y.showFavouriteButton(i,f)},analyticsData:e.analyticsData,analyticsOptions:h,size:e.size}),r().createElement(L,{data:p.M.getThumbnail(i),appLink:g?o:null,imageType:A.__.Thumbnails,imageOptions:s,preload:d,className:function(){var t="overflow-hidden ".concat("sm"===e.size?"rounded":"rounded-lg");return l===$.Overlay?"".concat(t," ").concat(ge.gradient):t}(),analyticsData:Object.assign(Object.assign({},e.analyticsData),{id:i.id,name:i.name}),analyticsOptions:Object.assign(Object.assign({},h),{actionType:c.UserAction.Click,descriptor:c.ClickDescriptor.Thumbnail})},b&&r().createElement(re,{type:ne.Video,size:e.size}),r().createElement(K,{type:_.Video}),r().createElement("div",{className:ge.overlayContainer},l===$.Overlay&&r().createElement(Ee,Object.assign({},e)),r().createElement(V,{video:i}),N&&r().createElement("div",{className:ge.videoTypeBadge},r().createElement(G,{video:i,size:e.size})),r().createElement(ye,{video:e.video,audience:e.audience,hideRating:e.hideRating,hideDuration:e.hideDuration,newDurationStyle:e.newDurationStyle,size:e.size}))),l===$.Below&&r().createElement(Ee,Object.assign({},e))))}var we=n(45428);function Se(e){if(!e.yearGroups)return r().createElement(r().Fragment,null);var t=we.l.mapRestrictionToText(e.video._restrictions,e.yearGroups);return p.M.getCanBeConsumed(e.video).canConsume&&t?r().createElement(H.u,{spanHack:!0,spanHackClassName:e.className||"pl-1",title:t,placement:e.tooltipPlacement||"top"},r().createElement(d.x,{svgName:u.vn.Lock,size:"sm"===e.size?d.S.Small:d.S.Standard})):r().createElement(r().Fragment,null)}function Ce(e){var t=e.video,n=e.appLink,a=e.seriesAppLink,i=e.hideSeries,o=p.M.getCanBeConsumed(t).canNavigate;return r().createElement("div",{className:"mt-2"},r().createElement("div",{className:"d-flex flex-column ".concat("rULXI")},p.M.isVideo(t)&&p.M.hasSeries(t)&&!i&&r().createElement(P.M,{className:"text-truncate ".concat("h9k1p"),video:t,appLink:a,analyticsOptions:{location:c.LocationContext.VideoThumbnail}}),r().createElement(j.F,{className:"h6 text-reset clamp-2 align-middle",appLink:o?n:null},t.name,r().createElement(Se,{video:e.video,yearGroups:e.yearGroups,size:"sm"}))))}var ke,Oe=n(17082),je=n(31647),xe=n(11306),Te=r().createContext({});!function(e){e.Left="8px",e.Right="calc(100% - 8px)",e.Center="center"}(ke||(ke={}));var Ae=function(e,t,n){var a,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1.2,i=e.x,o=e.y,c=e.width,l=e.height,s=document.getElementById("content-width-reference");if(!s)return{};var u=t||c*r,d=t?t*(l/c):l*r,m=t?u/c:r;a=i-(u-c)/2,u<n&&(a-=(n-u)/2,d=l*(m=(u=n)/c));var v=o-(d-l)/2+window.scrollY,f=a,p=ke.Center;return a-s.offsetLeft<8&&(f=i-4,p=ke.Left),s.offsetWidth+s.offsetLeft-(a+u)<8&&(f=t?i+c-t:i-c*(m-1)+8,p=ke.Right),{left:f,top:v,height:d,width:u,transformOrigin:p,position:"absolute",originalWidth:c,originalHeight:l}},Ie={positionWrapper:"jO7pW",animationWrapper:"xXfXO",zoom:"BrrtL"};function Le(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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Pe(e,t);var n=Object.prototype.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)?Pe(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 Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Fe(e){var t,n,a=e.hoverableComponent,i=e.componentProps,o=e.minHoverWidth,c=e.fixedHoverWidth,l=e.hoverScale,s=r().useContext(Te).setPreviewContentNode;void 0===s&&je.Q.ErrorHelper.throw(new xe.H("Please use VideoPreviewContext inside a VideoPreviewContextProvider"));var u=r().useMemo((function(){return(0,Oe.oD)()}),[]),d=Le((0,ve.L)({delay:100}),2),m=d[0],v=d[1],f=Le((0,ve.X)(),2),p=f[0],y=f[1],g=Le(r().useState(!1),2),h=g[0],b=(g[1],r().useRef(null)),E=r().useRef(!1),N=v||y;r().useEffect((function(){E.current!==N&&(s(N||h?u:null),E.current=N)}),[N]);var w=(null===(n=null===(t=b.current)||void 0===t?void 0:t.getBoundingClientRect)||void 0===n?void 0:n.call(t))||{},S=w.x,C=w.y,k=w.width,O=w.height,j=r().useMemo((function(){return Ae({x:S,y:C,width:k,height:O},c,o,l)}),[S,C,k,O,l]),x=j?j.originalWidth/j.width:1,T=a;return r().createElement("div",{ref:b},r().createElement("div",{ref:m},r().createElement(T,Object.assign({isHovering:!1},i))),(N||h)&&r().createElement(Oe.Nq,{node:u},r().createElement("div",{className:"".concat(Ie.positionWrapper," ").concat(Ie.animationWrapper),style:Object.assign({"--scale":x},j),ref:p},r().createElement(T,Object.assign({isHovering:!0,hoverPositionConfig:j,cleanPortalNode:function(){return s(null)}},i)))))}Fe.ReferenceContainer=function(e){return r().createElement("div",{id:"content-width-reference"},e.children)};function Re(e){return r().createElement("div",{className:"p-1 pr-2 badge-pill d-inline-flex align-items-center mr-1 cursor-pointer ".concat("OjHQZ"," ").concat(e.active?"kD1xM":"")},r().createElement(d.x,{className:"".concat("SS2zL"," rounded-circle bg-").concat(e.iconVariant," text-white"),svgName:e.svgName}),r().createElement("span",{className:"pl-1 text-nowrap user-select-none"},e.text))}var Ue=r().forwardRef((function(e,t){return r().createElement("div",{ref:t,onTouchStart:function(){var t;null===(t=e.setActive)||void 0===t||t.call(e,(function(e){return!e}))}},r().createElement(Re,{svgName:u.vn.Video,iconVariant:"blue",text:l.T.getPhrase("shared.whatsIncluded","whatsIncluded"),active:e.active}))})),Me=r().forwardRef((function(e,t){return r().createElement("div",{ref:t,onTouchStart:function(){var t;null===(t=e.setActive)||void 0===t||t.call(e,(function(e){return!e}))}},r().createElement(Re,{svgName:u.vn.StarOutline,iconVariant:"navy",text:l.T.getPhrase("shared.whyThisVideo","whyThisVideo"),active:e.active}))})),Ve=n(89603),De=n(66703),qe=n(34564),_e=n(91807);function ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Be(e){var t;switch(null===(t=e.tagType)||void 0===t?void 0:t.toLowerCase()){case Ve.Q.Pedagogy:return 0;case Ve.Q.Skill:return 1;default:return 2}}function He(e){if(!e.tags)return r().createElement(r().Fragment,null);var t,n=(t=e.tags,function(e){if(Array.isArray(e))return ze(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return ze(e,t);var n=Object.prototype.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)?ze(e,t):void 0}}(t)||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.")}()).sort((function(e,t){return Be(e)-Be(t)}));return r().createElement("div",{className:_e.Z.tagList},n.map((function(t){var n="function"==typeof e.getAppLink?e.getAppLink(t):null,a="function"==typeof e.onRemove?function(){return e.onRemove(t)}:null;return r().createElement(qe.z,{key:t.id,tag:t,appLink:n,themeColours:e.themeColours,onRemove:a})})))}var Qe="KQ5Wt",We="shared.whyThisVideo";function Ze(e){var t,n,a,i,o,c,l=null!==(a=null===(n=null===(t=e.video.tags)||void 0===t?void 0:t.data)||void 0===n?void 0:n.filter((function(e){return e.tagType===Ve.Q.Pedagogy})))&&void 0!==a?a:[],s=null!==(c=null===(o=null===(i=e.video.tags)||void 0===i?void 0:i.data)||void 0===o?void 0:o.filter((function(e){return e.tagType===Ve.Q.Skill})))&&void 0!==c?c:[];return r().createElement(r().Fragment,null,!!l.length&&r().createElement("h3",{className:"font-size-normal font-weight-500"},r().createElement(De.x,{namespace:We,phrase:"pedagogy"})),l.map((function(e){return r().createElement("div",{key:e.name,className:"px-2 py-1 rounded-lg ".concat(Qe)},r().createElement(qe.z,{tag:e}),e.description&&r().createElement("p",{className:"mb-2 pt-1"},e.description))})),!!s.length&&r().createElement(r().Fragment,null,r().createElement("h3",{className:"font-size-normal font-weight-500"},r().createElement(De.x,{namespace:We,phrase:"skills"})),r().createElement("div",{className:"p-2 rounded-lg ".concat(Qe)},r().createElement(He,{tags:s}))))}var Ke=n(68003),Xe=n(52076),Ye=n(86257),Ge=n(13799),$e={imageStyle:"I9E5O",item:"tqUFn",background:"s1dNr",thumbnailContainer:"EDiGi",teacherPack:"_tdVE",text:"g5NWS",hoverState:"xRYhX",atomGuide:"X39wU",studentActivity:"X9pMl",additionalMaterials:"qRVUo",userUploaded:"_18JaV",imageTypeResource:"KYtZL"},Je={width:200,resizeType:A.Nq.Cover};function et(e,t){var n,a,r;if("thumbnail"in t&&(null===(n=t.thumbnail)||void 0===n?void 0:n.url))return x.j.createUrl(null===(a=t.thumbnail)||void 0===a?void 0:a.url,Object.assign({},Je));var i=Ke._.safeUrlConcat(e,"/v1/previews");return"metadata"in t?t.metadata.type===Ye.L.Pdf?x.j.createResourceImage(i,t.url,Je):t.metadata.type===Ye.L.Image?x.j.createUrl(t.url,{size:A.h2.Medium,resizeType:A.Nq.Cover}):(null===(r=t.pdf)||void 0===r?void 0:r.url)?x.j.createResourceImage(i,t.pdf.url,Je):(t.metadata.type,Ye.L.Zip,"/images/zip-resource.png"):x.j.createResourceImage(i,t.url,Object.assign({},Je))}function tt(e){var t;return"metadata"in e?e.metadata.type===Ye.L.Pdf?A.__.Pdf:e.metadata.type===Ye.L.Image?A.__.Thumbnails:(null===(t=e.pdf)||void 0===t?void 0:t.url)?A.__.Pdf:(e.metadata.type,Ye.L.Zip,A.__.Thumbnails):A.__.Link}function nt(e){var t,n,a,i,o,l,s,u=null,d=0;"metadata"in e.data&&(u=e.data.metadata,d=null!==(a=null===(n=null===(t=e.data.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==a?a:0);var m="".concat(null!==(o=null===(i=e.theme)||void 0===i?void 0:i.containerClass)&&void 0!==o?o:""," pt-3 px-3 rounded-lg d-flex flex-column align-items-center")+" justify-content-end ".concat(function(e){switch(e){case"atom-guide":return $e.atomGuide;case"student-activity":return $e.studentActivity;case"teacher-pack":return $e.teacherPack;case"additional-materials":return $e.additionalMaterials;default:return $e.userUploaded}}(null==u?void 0:u.resourceType)," ").concat($e.background," ").concat(e.applyHoverState?$e.hoverState:""," ");return r().createElement("div",{className:m},!e.hideHeading&&r().createElement(H.u,{title:e.data.name},r().createElement("h3",{className:"text-center text-break h5 mb-3 ".concat($e.text)},r().createElement("span",{className:"clamp-1"},e.data.name))),r().createElement("div",{className:"".concat(null!==(s=null===(l=e.theme)||void 0===l?void 0:l.thumbnailContainerClass)&&void 0!==s?s:""," w-75 overflow-hidden ").concat($e.thumbnailContainer," ").concat($e.imageStyle)},r().createElement(L,{data:et(e.imageCdnUrl,e.data),imageType:tt(e.data),imageStyle:{transform:"rotate(".concat(d,"deg)")},analyticsOptions:{location:c.LocationContext.SlidingListItem},errorFallbackImageSrc:e.imageErrorFallbackUrl,imageClassName:(null==u?void 0:u.type)===Ye.L.Image?"".concat($e.imageTypeResource," ").concat($e.imageStyle):"",preload:e.preloadImage,preventLoad:!e.preloadImage})))}nt.defaultProps={preloadImage:!0,actionBehaviour:"normal"},r().memo((function(e){var t,n,a,i,o=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n}(e,[]),l=(t=e.data,n=e.actionBehaviour,i=r().useContext(Ge.X),"public"===n||!i.xs&&!i.sm&&"resource"===t.type&&"metadata"in t&&(t.metadata.type===Ye.L.Image||(t.metadata.type===Ye.L.Pdf?!!t.url:!!(null===(a=t.pdf)||void 0===a?void 0:a.url)))),s=Object.assign(Object.assign({},e.analyticsData),e.data),u=Object.assign(Object.assign({},e.analyticsOptions),{actionType:c.UserAction.Click,entity:e.data.typeId===oe.E.Resource?c.EntityType.Resource:c.EntityType.Link});function d(){Xe.k.logUserAction(s,u)}var m,v=!!e.data.url;return o.applyHoverState=l||v,r().createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat($e.item)},(m="d-block no-decoration","link"===e.data.type?r().createElement("a",{href:e.data.url,target:"_blank",className:m,onClick:d},r().createElement(nt,Object.assign({},o))):l?r().createElement(j.F,{appLink:e.getAppLink(e.data),className:m,analyticsData:s,analyticsOptions:u},r().createElement(nt,Object.assign({},o))):v?r().createElement("a",{href:e.data.url,className:m,onClick:d},r().createElement(nt,Object.assign({},o))):r().createElement("div",{className:m},r().createElement(nt,Object.assign({},o)))))}));var at=n(6697),rt={container:"c4Hun",icon:"telfV",resourceContainer:"bdBNU",resourceThumbnailContainer:"QN5kl"};function it(e){return r().createElement("div",{className:"".concat(rt.container," p-2 rounded-lg")},r().createElement("div",{className:"d-flex align-items-center"},r().createElement("div",{className:"".concat(rt.icon," bg-").concat(e.iconVariant," text-white rounded-circle")},r().createElement(d.x,{svgName:e.svgName})),r().createElement("div",{className:"pl-2 font-weight-500"},e.text)),e.children)}function ot(e){return function(e){if(Array.isArray(e))return ct(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 ct(e,t);var n=Object.prototype.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)?ct(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 ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var lt=l.T.encloseNamespace("shared.whatsIncluded");function st(e){var t,n,a,i,o,c,l,s=null===(n=null===(t=e.video.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length,d=[].concat(ot((null===(a=e.video.resources)||void 0===a?void 0:a.data)||[]),ot((null===(i=e.video.links)||void 0===i?void 0:i.data)||[])),m=d.length,v=null!==(l=null===(c=null===(o=e.video.subtitles)||void 0===o?void 0:o.data)||void 0===c?void 0:c.map((function(t){var n,a;return at.y.getEnglishName(t,null!==(a=null===(n=e.video.subtitles)||void 0===n?void 0:n.data)&&void 0!==a?a:[])})))&&void 0!==l?l:[];return r().createElement(r().Fragment,null,s>0&&r().createElement(it,{text:lt("totalInteractives",{smartCount:s}),svgName:u.vn.Interactive,iconVariant:"green"}),m>0&&r().createElement(it,{text:lt("totalResources",{smartCount:m}),svgName:u.vn.Resources,iconVariant:"indigo"},r().createElement("div",{className:"row no-gutters mx-n1 pt-2"},d.slice(0,3).map((function(t){return r().createElement("div",{key:t.id,className:"col-4 px-1"},r().createElement(nt,{data:t,imageCdnUrl:e.imageCdnUrl,theme:{containerClass:rt.resourceContainer,thumbnailContainerClass:rt.resourceThumbnailContainer},preloadImage:e.isShowing,hideHeading:!0}))})))),!!(null==v?void 0:v.length)&&r().createElement(it,{text:lt("videoSettings"),svgName:u.vn.CloseCaptionBadge,iconVariant:"dark"},r().createElement("div",{className:"d-flex align-items-center pt-1"},r().createElement("div",{className:"pl-1"},v.join(", ")))))}function ut(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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return dt(e,t);var n=Object.prototype.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)?dt(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 dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}st.defaultProps={isShowing:!0},n(91656);var mt=r().createContext({hasProvider:!1});function vt(e){var t,n=r().useContext(mt);if(null===(t=n.useInitialize)||void 0===t||t.call(n,e),!n.hasProvider)return r().createElement(r().Fragment,null);if("picture-in-picture"===n.mode)return r().createElement(r().Fragment,null);if("default"===n.mode)return r().createElement(Oe.t0,{node:n.portalNode});var a=n.started,i="".concat("TzWQw"," ").concat(a?"d-block":"d-none"," rounded-top-lg overflow-hidden");return r().createElement("div",{className:i},r().createElement(Oe.t0,{node:n.portalNode}),";")}var ft={videoTypeBadge:"qz_5t",preview:"whbhf",details:"vMaXP",isHovering:"tR1jA",videoGuidanceTags:"KJrT1",dropdown:"oZXV7",show:"EiQ04",topRightContainer:"FAuzc"};function pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var yt=function(e){var t,n,a=e.video,o=e.appLink,l=e.imageOptions,s=e.preload,u=e.setFavourite,d=e.canFavourite,m=e.isHovering,v=p.M.getCanBeConsumed(a),f=v.canNavigate,g=v.canConsume,h=!p.M.isVideo(a),b=(t=r().useState(!1),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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return pt(e,t);var n=Object.prototype.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)?pt(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.")}()),E=b[0],w=b[1],S=function(){var e=ut(r().useState("none"),2),t=e[0],n=e[1],a=ut((0,ve.X)(),2),i=a[0],o=a[1],c=ut((0,ve.X)(),2),l=c[0],s=c[1];return r().useEffect((function(){o&&"why-this-video"!==t?n("why-this-video"):s&&"whats-included"!==t&&n("whats-included")}),[o,s,t]),{whyThisVideoRef:i,whatsIncludedRef:l,videoGuidance:t}}(),C=S.videoGuidance,k=S.whyThisVideoRef,O=S.whatsIncludedRef,j=r().useMemo((function(){return p.M.showWhyThisVideo(a)}),[a]),x=r().useMemo((function(){return p.M.showWhatsIncluded(a)}),[a]);r().useEffect((function(){return function(){var t;null===(t=e.cleanPortalNode)||void 0===t||t.call(e)}}),[]);var T="position-relative bg-white";e.extraClasses&&(T+=" ".concat(e.extraClasses)),m&&(T+=" rounded-lg shadow-lg");var I=Object.assign(Object.assign({},e.analyticsOptions),{entity:p.M.getAnalyticsEntity(a)}),P=e.isHovering&&g,F=y.showFavouriteButton(e.video,m),R=x||j,U="none"!==C;return r().createElement("div",{className:T},F&&r().createElement("div",{className:ft.topRightContainer},r().createElement(N,{setFavourite:u,canFavourite:d,video:a,analyticsData:e.analyticsData,analyticsOptions:I})),!f&&r().createElement("div",{className:ft.topRightContainer},r().createElement(H.u,{title:p.M.getPrivacyReasoning(e.video),spanHack:!0,spanHackClassName:""},r().createElement(q,null))),r().createElement("div",{className:"position-relative"},r().createElement(L,{onClick:function(){var t;return null===(t=e.cleanPortalNode)||void 0===t?void 0:t.call(e)},data:p.M.getThumbnail(a),appLink:f?o:null,imageType:A.__.Thumbnails,imageOptions:l,preload:s,className:"overflow-hidden ".concat(m?ft.preview:"rounded-lg ".concat(ft.original)),analyticsData:Object.assign(Object.assign({},e.analyticsData),{id:a.id,name:a.name}),analyticsOptions:Object.assign(Object.assign({},I),{actionType:c.UserAction.Click,descriptor:c.ClickDescriptor.Thumbnail})},r().createElement(K,{type:_.Video}),r().createElement(V,{video:a}),r().createElement("div",{className:"p-absolute w-100 h-100 text-white"},h&&r().createElement("div",{className:ft.videoTypeBadge},r().createElement(G,{video:a})),r().createElement(ye,{video:e.video,audience:e.audience,hideRating:e.hideRating,hideDuration:e.hideDuration}))),P&&r().createElement(vt,{objectId:e.video.id,objectTypeId:e.video.typeId,mode:"hover"})),!m&&!e.hideTitle&&r().createElement(Ce,Object.assign({},e)),r().createElement("div",{className:"".concat(ft.details," ").concat(m?"".concat(ft.isHovering," box-shadow"):"")},m&&r().createElement(r().Fragment,null,r().createElement("div",{className:"".concat(E?"box-shadow":""," ").concat(m?ft.videoGuidanceTags:"")},r().createElement(Ce,Object.assign({},e)),R&&m&&r().createElement("div",{className:"d-flex justify-content-start align-items-center pt-2"},j&&r().createElement(Me,{ref:k,active:"why-this-video"===C}),x&&r().createElement(Ue,{ref:O,active:"whats-included"===C}))),R&&m&&r().createElement(i.ZP,{autoHeight:!0,autoHeightMax:160,onUpdate:function(e){var t=e.top;E&&0===t?w(!1):!E&&t>0&&w(!0)}},r().createElement("div",{className:"".concat(ft.dropdown," ").concat(U?ft.show:"")},"why-this-video"===C&&r().createElement(Ze,{video:e.video}),"whats-included"===C&&r().createElement(st,{video:e.video,imageCdnUrl:e.imageCdnUrl}),"none"!==C&&r().createElement("div",{className:"pb-2"}))))))};function gt(e){return r().createElement(r().Fragment,null,r().createElement(Fe,{hoverableComponent:yt,componentProps:e,fixedHoverWidth:400,minHoverWidth:400}))}function ht(e){switch(e.type){case"static":case"cosmetic":return a.createElement(Ne,Object.assign({},e));case"expandable":return a.createElement(te,Object.assign({},e));case"popout":return a.createElement(gt,Object.assign({},e));default:return}}ht.defaultProps={hideRating:!0,size:"md"};var bt=n(99910),Et=n(64038),Nt={container:"VwD1b",spinner:"eJ85e"};function wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function St(e){var t,n,r=(t=Et.useInView(),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 a,r,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(a=i.call(n)).done)&&(c.push(a.value),c.length!==t);l=!0);}catch(e){s=!0,r=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return wt(e,t);var n=Object.prototype.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}}(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.")}()),i=r[0],o=r[1];return a.useEffect((function(){var t;e.fetchOnScroll&&o&&!e.isFetching&&(null===(t=e.fetchNext)||void 0===t||t.call(e,e.nextCursor))}),[o,e.isFetching]),a.createElement("div",{className:"p-3 text-center ".concat(Nt.container),ref:i},e.isFetching?a.createElement(bt.Spinner,{as:"span",animation:"border",role:"status",className:Nt.spinner}):a.createElement(d.x,{svgName:u.vn.ChevronDown,className:"svg-container cursor-pointer",size:d.S.Large,onClick:function(){var t;return null===(t=e.fetchNext)||void 0===t?void 0:t.call(e,e.nextCursor)}}))}St.defaultProps={fetchOnScroll:!1};var Ct={navItem:"GyyRT",active:"aVNhj",navContainer:"uQ6as",navItemHeading:"NjJLh"},kt=n(50072),Ot=n(65402),jt=n(70868),xt="libraryRequests.leftNav";function Tt(e){var t,n,a=e.libraryRequest,i=a.sender&&"".concat(a.sender.name," ").concat(a.sender.surname),l=(null===(t=a.object)||void 0===t?void 0:t.name)||a.name;return r().createElement(j.F,{className:"d-flex py-3 px-3 text-decoration-none ".concat(Ct.navItem," ").concat(e.active?Ct.active:""),appLink:Object.assign(Object.assign({},e.appLink),{args:[a.id],params:e.queryParams}),onClick:function(){return jt.t.preventScrollTop()}},r().createElement("div",{className:"col-5 px-0"},r().createElement(ht,{video:null!==(n=a.object)&&void 0!==n?n:{},type:"cosmetic",imageOptions:{size:A.h2.Small},textPosition:$.Independent,hideMask:!0})),r().createElement("div",{className:"col-7 pr-0"},r().createElement("div",{className:"d-flex justify-content-between w-100"},r().createElement("div",{className:"overflow-hidden"},r().createElement(P.M,{video:a.object,analyticsOptions:{location:c.LocationContext.LibraryRequestDetails}}),!!l&&r().createElement("h5",{className:"m-0 mb-0 h6",title:l},r().createElement("span",{className:"text-truncate pb-1 d-block ".concat(Ct.navItemHeading)},l))),a.status!==kt.l.Pending&&r().createElement("div",{className:"flex-shrink-0 ml-1"},r().createElement(Ot.h,{status:a.status}))),!!i&&r().createElement("div",null,r().createElement(De.x,{namespace:xt,phrase:a.status===kt.l.AutoApproved?"addedBy":"requestedBy",options:{fullName:i}})),r().createElement("div",null,(0,o.WU)(a.dateCreated))))}function At(e){return r().createElement("div",{className:"".concat(Ct.navContainer," bg-white rounded overflow-hidden")},r().createElement(i.ZP,{hideTracksWhenNotNeeded:!0},e.libraryRequests.map((function(t,n){return r().createElement(Tt,{libraryRequest:t,key:n,active:e.selectedId===t.id,appLink:e.appLink,queryParams:e.queryParams})})),(e.nextCursor||e.isFetching)&&r().createElement(St,{isFetching:e.isFetching,fetchNext:e.fetchNext,nextCursor:e.nextCursor,fetchOnScroll:!0})))}},7044:function(e,t,n){"use strict";n.d(t,{p:function(){return o}});var a=n(1024),r=n.n(a);function i(){return r().createElement("div",{className:"d-flex p-3"},r().createElement("div",{className:"col-5 px-0"},r().createElement("div",{className:"responsive-img partial-loading-background rounded"})),r().createElement("div",{className:"col-7 pr-0"},r().createElement("div",{className:"partial-loading-background mb-1",style:{height:"1.25rem",width:"9rem"}}),r().createElement("div",{className:"partial-loading-background",style:{height:"1rem",width:"4rem"}})))}function o(){return r().createElement("div",{className:"bg-white rounded"},Array(5).fill(null).map((function(e,t){return r().createElement(i,{key:t})})))}},17950:function(e,t,n){"use strict";n.d(t,{F:function(){return b}});var a=n(1024),r=n.n(a),i=n(57857),o=n(90335),c=n(53808),l=n(54753);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==s(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==s(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===s(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d="shared.videoSortSelect",m=c.q.memoize((function(){var e;return u(e={},o.D.RecentlyAdded,{name:i.T.getPhrase(d,"recentlyAdded")}),u(e,o.D.AtoZ,{name:i.T.getPhrase(d,"atoz")}),u(e,o.D.ZtoA,{name:i.T.getPhrase(d,"ztoa")}),u(e,o.D.Newest,{name:i.T.getPhrase(d,"newest")}),u(e,o.D.Oldest,{name:i.T.getPhrase(d,"oldest")}),u(e,o.D.Series,{name:i.T.getPhrase(d,"series")}),e}));function v(e){var t=e.sortTypes||m();return a.createElement("div",{className:"dropdown"},a.createElement("a",{className:"btn btn-".concat(e.variant," ml-2 dropdown-toggle"),type:"button",id:"sort-select","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},t[e.type].name),a.createElement("div",{className:"dropdown-menu dropdown-menu-right","aria-labelledby":"sort-select"},Object.keys(t).map((function(n){var r="dropdown-item";return n===e.type&&(r+=" active"),a.createElement(l.F,{key:n,className:r,appLink:e.getSortAppLink(n),analyticsData:{sort:t[n].name},analyticsOptions:e.analyticsOptions},t[n].name)}))))}v.defaultProps={variant:"light"};var f=n(70065);function p(e){return p="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},p(e)}function y(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==p(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===p(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=i.T.encloseNamespace("libraryRequests.sort"),h=function(){var e;return y(e={},o.D.Newest,{name:g("newest")}),y(e,o.D.Oldest,{name:g("oldest")}),e};function b(e){var t=h();return r().createElement(v,{variant:"outline-dark",type:e.queryParams.sort||o.D.Newest,getSortAppLink:function(t){return Object.assign(Object.assign({},e.appLink),{params:Object.assign(Object.assign({},e.queryParams),{sort:t})})},sortTypes:t,analyticsOptions:{location:f.LocationContext.LibraryRequestDetails,entity:f.EntityType.LibraryRequest,actionType:f.UserAction.Sort,workflowPhase:f.WorkflowPhase.Complete}})}},65402:function(e,t,n){"use strict";n.d(t,{h:function(){return d},$:function(){return u}});var a=n(1024),r=n.n(a),i=n(39396),o=n(63791),c=n(50072),l={svgContainer:"O2Czg"},s=n(57857).T.encloseNamespace("libraryRequests.statusIcon");function u(e){switch(e){case c.l.AutoApproved:return s("autoApproved");case c.l.Approved:return s("approved");case c.l.Closed:return s("closed");case c.l.Rejected:return s("rejected")}return""}function d(e){var t="",n="".concat(l.svgContainer," text-white d-inline-block svg-container rounded-circle ");switch(e.status){case c.l.AutoApproved:t=o.vn.Check,n+="bg-secondary";break;case c.l.Approved:t=o.vn.Check,n+="bg-success";break;case c.l.Closed:t=o.vn.Minus,n+="bg-secondary";break;case c.l.Rejected:t=o.vn.Close,n+="bg-danger"}return r().createElement(i.x,{svgName:t,className:n,size:i.S.Small,title:u(e.status),tooltipSpanHack:!0,tooltipPlacement:"top"})}},9416:function(e,t,n){"use strict";n.d(t,{A:function(){return v}});var a=n(1024),r=n.n(a),i=n(58424),o=n(54753),c=n(52076),l={pillTabSelector:"Hdi6o",pillItem:"hUJx1"},s=n(45458);function u(e){var t;return r().createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},r().createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat(l.pillTabSelector)},e.tabs.map((function(e){return r().createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?r().createElement(o.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"cursor-pointer d-flex justify-content-center text-decoration-none text-reset px-2 ".concat(l.pillItem)},e.name,"number"==typeof e.count&&r().createElement("div",{className:"pl-2"},r().createElement(s.C,{type:s.g.Count,data:e.count}))):r().createElement(i.L,{className:"".concat(l.pillItem," d-flex justify-content-center p-2"),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&c.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},e.name,"number"==typeof e.count&&r().createElement("div",{className:"pl-2"},r().createElement(s.C,{type:s.g.Count,data:e.count}))))}))))}var d=n(50997),m=n(57857).T.encloseNamespace("libraryRequests.tabs");function v(e){var t=[{name:m("pending"),appLink:{application:d.OV.LIBRARY_REQUESTS,action:d.eX.LibraryRequests.PENDING_REQUESTS,args:[""]},active:"pending"===e.active},{name:m("past"),appLink:{application:d.OV.LIBRARY_REQUESTS,action:d.eX.LibraryRequests.PAST_REQUESTS,args:[""]},active:"past"===e.active}];return r().createElement("div",{className:"mb-3"},r().createElement(u,{tabs:t}))}},50072:function(e,t,n){"use strict";var a;n.d(t,{l:function(){return a}}),function(e){e.Pending="Pending",e.Approved="Approved",e.Rejected="Rejected",e.Closed="Closed",e.AutoApproved="AutoApproved"}(a||(a={}))},41026:function(e,t,n){"use strict";n.d(t,{K:function(){return l}});var a=n(1024),r=n.n(a),i=n(57857),o=n(89375),c=i.T.encloseNamespace("libraryRequests.libraryRequestTitle");function l(e){var t,n=(null===(t=null==e?void 0:e.object)||void 0===t?void 0:t.name)||(null==e?void 0:e.name),a=c("title")+(n?" - ".concat(n):"");r().useEffect((function(){return o.j.setPageTitle(a)}),[a])}},59198:function(e,t,n){"use strict";n.d(t,{s:function(){return o}});var a=n(25796),r=n(86120),i=n(82378);function o(e){var t=r.a.useGetFetch(),n=function(t){return a.y.comments(e,t)};return(0,i.i)(!!e&&n,(function(e){return t(n(e))}))}},85739:function(e,t,n){"use strict";n.d(t,{p:function(){return l}});var a=n(1024),r=n.n(a),i=n(86120),o=n(94223),c=n(25796);function l(e,t){var n=i.a.useGetFetch(),a=function(n){return c.y.libraryRequests(e,t,n)},l=function(e){return n(a(e))},s=(0,o.P)(a&&function(e){return a(e).key});return r().useEffect((function(){s&&s.shouldInitialFetch&&l()}),[e,t]),Object.assign(Object.assign({},s),{fetchNext:l})}},30328:function(e,t,n){"use strict";n.d(t,{A:function(){return o}});var a=n(31647),r=n(1024),i=n.n(r);function o(e){var t=e.id,n=e.appLink,r=e.requests;i().useEffect((function(){!t&&(null==r?void 0:r.length)&&a.Q.AppLinkHelper.trigger(Object.assign(Object.assign({},n),{args:[r[0].id]}),{replace:!0})}),[t,null==r?void 0:r.length])}},64429:function(e,t,n){"use strict";n.d(t,{m:function(){return l}});var a=n(1024),r=n.n(a),i=n(50072),o=n(31647),c=n(50997);function l(e,t,n){r().useEffect((function(){e&&(e.status===i.l.Pending&&"pending"!==t&&o.Q.AppLinkHelper.trigger({application:c.OV.LIBRARY_REQUESTS,action:c.eX.LibraryRequests.PENDING_REQUESTS,args:[e.id],params:n},{replace:!0}),e.status!==i.l.Pending&&"pending"===t&&o.Q.AppLinkHelper.trigger({application:c.OV.LIBRARY_REQUESTS,action:c.eX.LibraryRequests.PAST_REQUESTS,args:[e.id],params:n},{replace:!0}))}),[e,t])}},61356:function(e,t,n){"use strict";n.d(t,{c:function(){return w}});var a=n(39479),r=n(48088),i=n(31647),o=n(70065),c=n(52076),l=n(88483),s=n(2772),u=n(10101),d=n(61843),m=n(48090),v=n(89167),f=n(37339),p=n.n(f),y=n(264),g=n(73396);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 b(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!==h(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a.key),"symbol"===h(r)?r:String(r)),a)}var r}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(S,e);var t,n,i,f,w=(i=S,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=N(i);if(f){var n=N(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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)}(this,e)});function S(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,S),(t=w.call(this,e))._viewKeyRequested=!1,t}return t=S,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"VideoPreviewComponent"}},{key:"template",get:function(){return p()}},{key:"instanceChannelName",get:function(){return d.N0.generateUniqueChannelName(this)}},{key:"defaults",get:function(){return{captureAnalytics:!0}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.Im,selector:".lazy-img",callback:function(){r.Radio.channel(e.instanceChannelName).trigger("show:play:icon")},minBrowserSupportVersion:m.v9}]}},{key:"regions",value:function(){return{player:{el:".video-player-region",replaceElement:!1},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"bindListeners",value:function(){this.options.channelName&&this.listenTo(this.options.channelName,"update:chapter:time",this.onUpdateWebplayer)}},{key:"onUpdateWebplayer",value:function(e){return y.g.hasLite?this.playerViewKey?this.player?void this.seekToChapter(e):(this.listenToOnce(this.options.channelName,"player:loaded",a.bind(this.seekToChapter,this,e)),void this.renderVideoPreview()):(this.listenToOnce(this.options.channelName,"player:loaded",a.bind(this.seekToChapter,this,e)),void this.requestViewKey()):this.webPlayer?void this.seekToChapter(e):(this.listenToOnce(this.options.channelName,"webplayer:loaded",a.bind(this.seekToChapter,this,e)),void this.renderVideoPreview())}},{key:"seekToChapter",value:function(e){this.player?this.player.currentTime(e):this.webPlayer.seekTo(e)}},{key:"requestViewKey",value:function(){var e=this;this.playerViewKey||this._viewKeyRequested||(this._viewKeyRequested=!0,this.options.createViewKey(this.model.get("id"),(function(t){e.playerViewKey=t,e.renderVideoPreview()})))}},{key:"onClick",value:function(){this.model.get("id")&&(y.g.hasLite?this.requestViewKey():this.webPlayer||this.renderVideoPreview())}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new s.Z({model:this.model,thumbnailOptions:{size:l.h2.Medium},playIcon:!0,lazyload:!0,channelName:this.instanceChannelName}))}},{key:"renderVideoPreview",value:function(){if(this.playerViewKey)return this.player=new g.l({model:this.playerViewKey,playerApiUrl:this.options.playerApiUrl,channelName:this.options.channelName}),void this.showChildView("player",this.player);this.webPlayer=new v.Q({model:this.model,webPlayerUrl:this.options.webPlayerUrl,parentChannelName:this.options.channelName,autoplay:!0,analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{entity:o.EntityType.Video}),captureAnalytics:this.options.captureAnalytics,currentUser:this.options.currentUser}),this.showChildView("player",this.webPlayer)}},{key:"onRender",value:function(){this.playerViewKey?this.renderVideoPreview():this.renderThumbnail()}}])&&b(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),S}(i.Q.Component)},37339:function(e,t,n){var a=n(32227);e.exports=(a.default||a).template({1:function(e,t,n,a,r){return"cursor-pointer "},compiler:[8,">= 4.3.0"],main:function(e,t,n,a,r){var i;return e.propertyIsEnumerable,'<div class="video-player-region '+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.id:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'responsize-img">\n <div class="thumbnail-region"></div>\n</div>'},useData:!0})},91807:function(e,t){"use strict";t.Z={tagList:"Zw6d9",disabled:"jlL1c",partialTag:"too_N",badge:"OjtN8",close:"X9joI"}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 1601-
|
|
1
|
+
/*! For license information please see 1601-8506cc1931.chunk.js.LICENSE.txt */
|
|
2
2
|
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1601],{70680:function(e,t,n){"use strict";n.d(t,{r:function(){return y}});var r=n(31647),i=n(88172),o=n(61843),a=n(57857),s=n(26457),c=n(40622),l=n(97781),u=n.n(l);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 p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==h(e)||null===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)}(r.key),"symbol"===h(i)?i:String(i)),r)}var i}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(m,e);var t,n,l,y,v=(l=m,y=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(l);if(y){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return 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)}(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),v.call(this,e)}return t=m,(n=[{key:"initialize",value:function(){this.spinnerModel=new r.Q.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,c.LibraryEditorActions.MergeChapters,this.onClickMergeChapters)}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return u()}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(i.ZV.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==s.Um.New&&this.model.get("status")!==s.Um.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:a.T.getPhrase(this.lang,"mergeChapters"),subtitles:a.T.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:a.T.getPhrase(this.lang,"enabledCustomSubtitles")},t=new i.Py({buttonText:e[this.options.type],extraButtonClass:"btn-dark ".concat("XKFne"),model:this.spinnerModel,spinnerOptions:{size:o.Ey.Small,type:o.dR.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:c.LibraryEditorActions.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:a.T.getPhrase(this.lang,"chaptersHeading"),line1:a.T.getPhrase(this.lang,"chaptersInfo1"),line2:a.T.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:a.T.getPhrase(this.lang,"subtitlesHeading"),line1:a.T.getPhrase(this.lang,"subtitlesInfo1"),line2:a.T.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:a.T.getPhrase(this.lang,"cvSubtitlesHeading"),line1:a.T.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:a.T.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&a.T.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(i.ZV.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===s.Um.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(r.Q.Component)},21053:function(e,t,n){"use strict";n.d(t,{W:function(){return v}});var r=n(48088),i=n(31647),o={svgContainer:"mtegw"},a=n(43791),s=n.n(a),c=n(48090),l=n(35630),u=n(57085),h=n(57857);function p(e){return p="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},p(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===p(i)?i:String(i)),r)}var i}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(m,e);var t,n,i,a,v=(i=m,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(i);if(a){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),v.call(this,e)}return t=m,(n=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return s()}},{key:"viewOptions",value:function(){return{styles:o}}},{key:"onSave",value:function(){r.Radio.channel(c.OV.LIBRARY_EDITOR).trigger(c.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:h.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:h.T.getPhrase(this.lang,"chapters")};case"resources":return{name:h.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new l.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new u.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.Q.Component)},16704:function(e,t,n){"use strict";n.r(t),n.d(t,{EditChaptersView:function(){return q}});var r=n(39479),i=n(31647),o=n(21679),a=n(57857),s=n(99748),c=n(59054),l=n(99952),u=n(74749),h=n(61843),p=n(48090),f=n(48404),d=n(29457),y=n(70065),v=n(52076),m=n(89167),g=n(13156),b=n(19226),w=n(73396),C=n(264),E=n(21053),k=n(70680),P=n(45114),T=n(70693),O=n(56906),S=n(40622),L=n(7190),_=n(26457),x=n(61159),R=n.n(x),j=n(95061);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 I(){I=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var o=t&&t.prototype instanceof p?t:p,a=Object.create(o.prototype),s=new T(i||[]);return r(a,"_invoke",{value:C(e,n,s)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h={};function p(){}function f(){}function d(){}var y={};c(y,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(O([])));m&&m!==t&&n.call(m,o)&&(y=m);var g=d.prototype=p.prototype=Object.create(y);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function i(r,o,a,s){var c=u(e[r],e,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==V(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(h).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(c.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function C(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=u(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=d,r(g,"constructor",{value:d,configurable:!0}),r(d,"constructor",{value:f,configurable:!0}),f.displayName=c(d,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,c(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,a,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new w(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(g),c(g,s,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=O,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==V(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==V(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===V(i)?i:String(i)),r)}var i}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}function U(e){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},U(e)}var q=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(B,e);var t,n,x,q,M=(x=B,q=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=U(x);if(q){var n=U(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===V(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function B(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,B),(t=M.call(this,e))._viewKeyRequested=!1,t}return t=B,(n=[{key:"initialize",value:function(){this.bindListeners(),this.initializeDataServices(),h.Si.initBackButton()}},{key:"name",get:function(){return"EditVideoChaptersView"}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editChapters"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"template",get:function(){return R()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:d.LP.EditVideoTabs},webplayer:{replaceElement:!0,el:".webplayer-region",partialLoading:d.LP.WebPlayer},addChapter:{replaceElement:!0,el:".add-chapter-region",partialLoading:d.LP.EditVideoChaptersForm},chapterList:{replaceElement:!0,el:".chapter-list-region",partialLoading:d.LP.EditVideoChapterList}}}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.Vk.CHAPTER,"".concat(p.M_.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError),this.listenTo(this.channelName,S.LibraryEditorActions.CreateChapter,this.onCreateChapter),this.listenTo(this.channelName,S.LibraryEditorActions.UpdateChapter,this.onUpdateChapter),this.listenTo(this.channelName,S.LibraryEditorActions.DeleteChapter,this.onDeleteChapter),this.listenTo(this.channelName,S.LibraryEditorActions.UpdateChapterTime,this.onTimeInputUpdate),this.listenTo(this.channelName,S.LibraryEditorActions.SeekToChapter,this.onSeekToChapter),this.listenTo(this.channelName,S.LibraryEditorActions.MergeChapters,this.onMergeChapters)}},{key:"initializeDataServices",value:function(){this.videoDataService=o.u.getInstance(p.Or.Video,this),this.chapterDataService=o.u.getInstance(p.Or.Chapter,this),this.playerDataService=o.u.getInstance(p.Or.Player,this)}},{key:"onVideoDataError",value:function(e){switch(e.type){case s.h.NotFound:i.Q.ErrorHelper.throw(new O.l1);break;case s.h.Forbidden:i.Q.ErrorHelper.throw(new O.aV)}}},{key:"onConcatenateDataError",value:function(e){e.type===s.h.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"updateChapters",value:function(){var e=this;if(C.g.hasLite){var t=this.chapters.toJSON().reverse().reduce((function(t,n){var r,i=t[t.length-1];return[].concat(function(e){if(Array.isArray(e))return D(e)}(r=t)||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 D(e,t);var n=Object.prototype.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)?D(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.")}(),[{timestamp:n.startTime,endTimestamp:(null==i?void 0:i.timestamp)||e.player.duration(),name:n.name}])}),[]).reverse();this.player.setChapters(t)}}},{key:"onCreateChapter",value:function(e){0===this.chapters.length&&0!==e.startTime&&this.createChapter({name:a.T.getPhrase(this.lang,"intro"),startTime:0}),this.createChapter(e)}},{key:"createChapter",value:function(e){var t=this,n=new u.W(e);this.chapters.add(n),n.set("loading",!0),this.chapterDataService.createChapter(this.model.get("id"),e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.renderChapterForm(),t.updateChapters(),t.logAction(e,y.UserAction.Create)}))}},{key:"onUpdateChapter",value:function(e){var t=this,n=this.chapters.find((function(t){return t.get("id")===e.id}));n.set("loading",!0);var r=g.J.updatedChaptersAlert(this.model.get("name"));this.chapterDataService.updateChapter(n.id,e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.updateChapters(),t.logAction(e,y.UserAction.Edit)}),r)}},{key:"onDeleteChapter",value:function(e){var t=this;e.set("loading",!0),this.chapterDataService.deleteChapter(e.id,(function(){t.logAction(e,y.UserAction.Delete),t.chapters.remove(e),t.updateChapters()}))}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"onTimeInputUpdate",value:function(e){e>=0&&e<=h.X4.millisecondsToSeconds(this.model.get("duration"))&&(this.player?this.player.currentTime(e):this.webPlayer.seekTo(e))}},{key:"logAction",value:function(e,t){var n=Object.assign({videoId:this.model.get("id")},e.pick("id","name","startTime"));v.k.logUserAction(n,{actionType:t,entity:y.EntityType.Chapter,location:y.LocationContext.EditVideoChapters})}},{key:"onSeekToChapter",value:function(e){return t=this,n=void 0,r=void 0,i=I().mark((function t(){var n,r;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e<0)){t.next=2;break}return t.abrupt("return");case 2:if(!this.player){t.next=9;break}return t.next=5,this.player.getChapters();case 5:return n=t.sent,r=n[e],this.player.currentTime(r.timestamp),t.abrupt("return");case 9:this.webPlayer.seekToChapter(e);case 10:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(e,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}c((i=i.apply(t,n||[])).next())}));var t,n,r,i}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[_.Um.SingleFile,_.Um.ConcatenationFailed];r.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==_.Um.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.render()}))}},{key:"renderChapterList",value:function(){this.showChildView("chapterList",new T.Q({collection:this.chapters,duration:this.model.get("duration"),channelName:this.channelName,showActions:!this.hasPhysicalChapters.get("value"),editable:!this.hasPhysicalChapters.get("value"),showHeader:!0}))}},{key:"renderChapterForm",value:function(){this.showChildView("addChapter",new P.L({model:new u.W,collection:this.chapters,creating:!0,duration:this.model.get("duration"),channelName:this.channelName,playerViewModelKey:"".concat(p._2.NAME,"-").concat(this.model.get("id"))}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("addChapter",new k.r({type:"chapters",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderEditComponents",value:function(){if(this.hasPhysicalChapters.get("value"))return this.renderConcatenationRequest(),void this.mapPhysicalChapters();this.renderChapterForm(),this.renderChapterList()}},{key:"renderTabs",value:function(){var e=h.BK.canEditVideo(this.model);this.showChildView("tabs",new E.W({model:this.model,tabs:h.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-chapters-applink",context:"chapters",folder:this.folder,libraries:this.libraries}))}},{key:"renderWebPlayer",value:function(){if(this.playerViewKey)return this.player=new w.l({model:this.playerViewKey,playerApiUrl:this.config.get("playerApiUrl"),channelName:this.channelName,inactivityTimeout:0}),void this.showChildView("webplayer",this.player);this.webPlayer=new m.Q({model:this.model,webPlayerUrl:this.config.get("webPlayerUrl"),captureAnalytics:!1,currentUser:this.currentUser}),this.showChildView("webplayer",this.webPlayer)}},{key:"mapPhysicalChapters",value:function(){var e=this;this.renderPartialLoading("chapterList");var t=function(t){e.chapters=new l.q(L.$k.mapPhysicalChapters(t)),e.renderChapterList()};this.player?this.player.getChapters().then(t):this.webPlayer.query("getChapters",t)}},{key:"redirectToVideoDetails",value:function(){i.Q.AppLinkHelper.trigger({application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.VIDEO_DETAILS,args:[this.model.get("id")]},{replace:!0})}},{key:"fetchData",value:function(){var e=this;if(this.model=this.videoDataService.getVideo(this.options.videoId),this.model){if(!h.BK.canEditVideo(this.model))return void this.redirectToVideoDetails();this.chapters=this.model.chapters,this.folder=this.model.categories.first(),C.g.hasLite&&!this._viewKeyRequested&&(this._viewKeyRequested=!0,this.playerDataService.createViewKey(this.model.get("id"),c.f.MasterObject,(function(t){e.playerViewKey=t,e.render()})))}this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||C.g.hasLite&&!this.playerViewKey||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"requiredResources",get:function(){return{config:f.p.config,currentUser:b.K.currentUser,libraries:j.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"onRender",value:function(){this.renderTabs(),this.renderWebPlayer(),this.renderEditComponents(),this.startPollingConcatenation()}}])&&A(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),B}(i.Q.View)},97781: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=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.progress:o,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?o:""},2:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.escapeExpression;return' <span class="m-3 text-muted">'+a(e.lambda(null!=(o=null!=t?t.options:t)?o.progress:o,t))+'</span>\n <p class="pt-2">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\n"},4:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.failed:o,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?o:""},5:function(e,t,n,r,i){return e.propertyIsEnumerable,'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return"<h4>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.heading:o,t))+"</h4>\n<p>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.line1:o,t))+"</p>\n<p>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.line2:o,t))+'</p>\n<div class="btn-region"></div>\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.processing:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?o:"")},useData:!0})},43791: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){var o;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(o=null!=(o=n.name||(null!=t?t.name:t))?o:e.hooks.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):o)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region pl-2"></div>'},useData:!0})},61159: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="tab-region w-100"></div>\n<div class="row">\n <div class="col-6 pt-3">\n <div class="webplayer-region"></div>\n <div class="add-chapter-region"></div>\n </div>\n <div class="col-6 mb-2 pt-3">\n <div class="chapter-list-region"></div>\n </div>\n</div>'},useData:!0})}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 1934-
|
|
1
|
+
/*! For license information please see 1934-5ad8a742d1.chunk.js.LICENSE.txt */
|
|
2
2
|
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1934],{51934:function(t){t.exports=function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function i(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function a(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function n(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(n,!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(n).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function o(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var r="undefined"!=typeof window&&void 0!==window.document,h=r?window:{},s=!!r&&"ontouchstart"in h.document.documentElement,c=!!r&&"PointerEvent"in h,l="cropper",d="all",p="crop",u="move",m="zoom",g="e",f="w",v="s",w="n",b="ne",x="nw",y="se",M="sw",C="".concat(l,"-crop"),D="".concat(l,"-disabled"),k="".concat(l,"-hidden"),B="".concat(l,"-hide"),O="".concat(l,"-invisible"),T="".concat(l,"-modal"),E="".concat(l,"-move"),W="".concat(l,"Action"),N="".concat(l,"Preview"),H="crop",L="move",z="none",Y="crop",X="cropend",R="cropmove",S="cropstart",A="dblclick",j=c?"pointerdown":s?"touchstart":"mousedown",P=c?"pointermove":s?"touchmove":"mousemove",I=c?"pointerup pointercancel":s?"touchend touchcancel":"mouseup",U="ready",q="resize",$="wheel",_="zoom",Q="image/jpeg",K=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,Z=/^data:/,G=/^data:image\/jpeg;base64,/,V=/^img|canvas$/i,F={viewMode:0,dragMode:H,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},J=Number.isNaN||h.isNaN;function tt(t){return"number"==typeof t&&!J(t)}var et=function(t){return t>0&&t<1/0};function it(t){return void 0===t}function at(e){return"object"===t(e)&&null!==e}var nt=Object.prototype.hasOwnProperty;function ot(t){if(!at(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&nt.call(i,"isPrototypeOf")}catch(t){return!1}}function rt(t){return"function"==typeof t}var ht=Array.prototype.slice;function st(t){return Array.from?Array.from(t):ht.call(t)}function ct(t,e){return t&&rt(e)&&(Array.isArray(t)||tt(t.length)?st(t).forEach((function(i,a){e.call(t,i,a,t)})):at(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var lt=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a<e;a++)i[a-1]=arguments[a];return at(t)&&i.length>0&&i.forEach((function(e){at(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},dt=/\.\d*(?:0|9){12}\d*$/;function pt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return dt.test(t)?Math.round(t*e)/e:t}var ut=/^width|height|left|top|marginLeft|marginTop$/;function mt(t,e){var i=t.style;ct(e,(function(t,e){ut.test(e)&&tt(t)&&(t="".concat(t,"px")),i[e]=t}))}function gt(t,e){if(e)if(tt(t.length))ct(t,(function(t){gt(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function ft(t,e){e&&(tt(t.length)?ct(t,(function(t){ft(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function vt(t,e,i){e&&(tt(t.length)?ct(t,(function(t){vt(t,e,i)})):i?gt(t,e):ft(t,e))}var wt=/([a-z\d])([A-Z])/g;function bt(t){return t.replace(wt,"$1-$2").toLowerCase()}function xt(t,e){return at(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(bt(e)))}function yt(t,e,i){at(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(bt(e)),i)}var Mt=/\s\s*/,Ct=function(){var t=!1;if(r){var e=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});h.addEventListener("test",i,a),h.removeEventListener("test",i,a)}return t}();function Dt(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Mt).forEach((function(e){if(!Ct){var o=t.listeners;o&&o[e]&&o[e][i]&&(n=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,n,a)}))}function kt(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Mt).forEach((function(e){if(a.once&&!Ct){var o=t.listeners,r=void 0===o?{}:o;n=function(){delete r[e][i],t.removeEventListener(e,n,a);for(var o=arguments.length,h=new Array(o),s=0;s<o;s++)h[s]=arguments[s];i.apply(t,h)},r[e]||(r[e]={}),r[e][i]&&t.removeEventListener(e,r[e][i],a),r[e][i]=n,t.listeners=r}t.addEventListener(e,n,a)}))}function Bt(t,e,i){var a;return rt(Event)&&rt(CustomEvent)?a=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(a=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(a)}function Ot(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var Tt=h.location,Et=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Wt(t){var e=t.match(Et);return null!==e&&(e[1]!==Tt.protocol||e[2]!==Tt.hostname||e[3]!==Tt.port)}function Nt(t){var e="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Ht(t){var e=t.rotate,i=t.scaleX,a=t.scaleY,n=t.translateX,o=t.translateY,r=[];tt(n)&&0!==n&&r.push("translateX(".concat(n,"px)")),tt(o)&&0!==o&&r.push("translateY(".concat(o,"px)")),tt(e)&&0!==e&&r.push("rotate(".concat(e,"deg)")),tt(i)&&1!==i&&r.push("scaleX(".concat(i,")")),tt(a)&&1!==a&&r.push("scaleY(".concat(a,")"));var h=r.length?r.join(" "):"none";return{WebkitTransform:h,msTransform:h,transform:h}}function Lt(t,e){var i=t.pageX,a=t.pageY,o={endX:i,endY:a};return e?o:n({startX:i,startY:a},o)}function zt(t){var e=t.aspectRatio,i=t.height,a=t.width,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=et(a),r=et(i);if(o&&r){var h=i*e;"contain"===n&&h>a||"cover"===n&&h<a?i=a/e:a=i*e}else o?i=a/e:r&&(a=i*e);return{width:a,height:i}}var Yt=String.fromCharCode;var Xt=/^data:.*,/;function Rt(t){var e,i=new DataView(t);try{var a,n,o;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var r=i.byteLength,h=2;h+1<r;){if(255===i.getUint8(h)&&225===i.getUint8(h+1)){n=h;break}h+=1}if(n){var s=n+10;if("Exif"===function(t,e,i){var a="";i+=e;for(var n=e;n<i;n+=1)a+=Yt(t.getUint8(n));return a}(i,n+4,4)){var c=i.getUint16(s);if(((a=18761===c)||19789===c)&&42===i.getUint16(s+2,a)){var l=i.getUint32(s+4,a);l>=8&&(o=s+l)}}}if(o){var d,p,u=i.getUint16(o,a);for(p=0;p<u;p+=1)if(d=o+12*p+2,274===i.getUint16(d,a)){d+=8,e=i.getUint16(d,a),i.setUint16(d,1,a);break}}}catch(t){e=1}return e}var St={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,a=this.cropper;gt(a,k),ft(t,k);var n={width:Math.max(i.offsetWidth,Number(e.minContainerWidth)||200),height:Math.max(i.offsetHeight,Number(e.minContainerHeight)||100)};this.containerData=n,mt(a,{width:n.width,height:n.height}),gt(t,k),ft(a,k)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,a=Math.abs(e.rotate)%180==90,n=a?e.naturalHeight:e.naturalWidth,o=a?e.naturalWidth:e.naturalHeight,r=n/o,h=t.width,s=t.height;t.height*r>t.width?3===i?h=t.height*r:s=t.width/r:3===i?s=t.width/r:h=t.height*r;var c={aspectRatio:r,naturalWidth:n,naturalHeight:o,width:h,height:s};c.left=(t.width-h)/2,c.top=(t.height-s)/2,c.oldLeft=c.left,c.oldTop=c.top,this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),this.initialImageData=lt({},e),this.initialCanvasData=lt({},c)},limitCanvas:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=i.viewMode,h=n.aspectRatio,s=this.cropped&&o;if(t){var c=Number(i.minCanvasWidth)||0,l=Number(i.minCanvasHeight)||0;r>1?(c=Math.max(c,a.width),l=Math.max(l,a.height),3===r&&(l*h>c?c=l*h:l=c/h)):r>0&&(c?c=Math.max(c,s?o.width:0):l?l=Math.max(l,s?o.height:0):s&&(c=o.width,(l=o.height)*h>c?c=l*h:l=c/h));var d=zt({aspectRatio:h,width:c,height:l});c=d.width,l=d.height,n.minWidth=c,n.minHeight=l,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(r>(s?0:1)){var p=a.width-n.width,u=a.height-n.height;n.minLeft=Math.min(0,p),n.minTop=Math.min(0,u),n.maxLeft=Math.max(0,p),n.maxTop=Math.max(0,u),s&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===r&&(n.width>=a.width&&(n.minLeft=Math.min(0,p),n.maxLeft=Math.max(0,p)),n.height>=a.height&&(n.minTop=Math.min(0,u),n.maxTop=Math.max(0,u))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height},renderCanvas:function(t,e){var i=this.canvasData,a=this.imageData;if(e){var n=function(t){var e=t.width,i=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:i,height:e};var n=a%90*Math.PI/180,o=Math.sin(n),r=Math.cos(n),h=e*r+i*o,s=e*o+i*r;return a>90?{width:s,height:h}:{width:h,height:s}}({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=n.width,r=n.height,h=i.width*(o/i.naturalWidth),s=i.height*(r/i.naturalHeight);i.left-=(h-i.width)/2,i.top-=(s-i.height)/2,i.width=h,i.height=s,i.aspectRatio=o/r,i.naturalWidth=o,i.naturalHeight=r,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,mt(this.canvas,lt({width:i.width,height:i.height},Ht({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,a=i.naturalWidth*(e.width/e.naturalWidth),n=i.naturalHeight*(e.height/e.naturalHeight);lt(i,{width:a,height:n,left:(e.width-a)/2,top:(e.height-n)/2}),mt(this.image,lt({width:i.width,height:i.height},Ht(lt({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,a=Number(t.autoCropArea)||.8,n={width:e.width,height:e.height};i&&(e.height*i>e.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*a),n.height=Math.max(n.minHeight,n.height*a),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=lt({},n)},limitCropBox:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=this.limited,h=i.aspectRatio;if(t){var s=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,l=r?Math.min(a.width,n.width,n.width+n.left,a.width-n.left):a.width,d=r?Math.min(a.height,n.height,n.height+n.top,a.height-n.top):a.height;s=Math.min(s,a.width),c=Math.min(c,a.height),h&&(s&&c?c*h>s?c=s/h:s=c*h:s?c=s/h:c&&(s=c*h),d*h>l?d=l/h:l=d*h),o.minWidth=Math.min(s,l),o.minHeight=Math.min(c,d),o.maxWidth=l,o.maxHeight=d}e&&(r?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(a.width,n.left+n.width)-o.width,o.maxTop=Math.min(a.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&yt(this.face,W,i.width>=e.width&&i.height>=e.height?u:d),mt(this.cropBox,lt({width:i.width,height:i.height},Ht({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Bt(this.element,Y,this.getData())}},At={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,a=e?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=a,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,i){var r=i;"string"==typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,ct(r,(function(t){var i=document.createElement("img");yt(t,N,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=a,i.alt=n,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){ct(this.previews,(function(t){var e=xt(t,N);mt(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(at(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(bt(e)))}(t,N)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,a=i.width,n=i.height,o=t.width,r=t.height,h=i.left-e.left-t.left,s=i.top-e.top-t.top;this.cropped&&!this.disabled&&(mt(this.viewBoxImage,lt({width:o,height:r},Ht(lt({translateX:-h,translateY:-s},t)))),ct(this.previews,(function(e){var i=xt(e,N),c=i.width,l=i.height,d=c,p=l,u=1;a&&(p=n*(u=c/a)),n&&p>l&&(d=a*(u=l/n),p=l),mt(e,{width:d,height:p}),mt(e.getElementsByTagName("img")[0],lt({width:o*u,height:r*u},Ht(lt({translateX:-h*u,translateY:-s*u},t))))})))}},jt={bind:function(){var t=this.element,e=this.options,i=this.cropper;rt(e.cropstart)&&kt(t,S,e.cropstart),rt(e.cropmove)&&kt(t,R,e.cropmove),rt(e.cropend)&&kt(t,X,e.cropend),rt(e.crop)&&kt(t,Y,e.crop),rt(e.zoom)&&kt(t,_,e.zoom),kt(i,j,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&kt(i,$,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&kt(i,A,this.onDblclick=this.dblclick.bind(this)),kt(t.ownerDocument,P,this.onCropMove=this.cropMove.bind(this)),kt(t.ownerDocument,I,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&kt(window,q,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;rt(e.cropstart)&&Dt(t,S,e.cropstart),rt(e.cropmove)&&Dt(t,R,e.cropmove),rt(e.cropend)&&Dt(t,X,e.cropend),rt(e.crop)&&Dt(t,Y,e.crop),rt(e.zoom)&&Dt(t,_,e.zoom),Dt(i,j,this.onCropStart),e.zoomable&&e.zoomOnWheel&&Dt(i,$,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Dt(i,A,this.onDblclick),Dt(t.ownerDocument,P,this.onCropMove),Dt(t.ownerDocument,I,this.onCropEnd),e.responsive&&Dt(window,q,this.onResize)}},Pt={resize:function(){var t=this.options,e=this.container,i=this.containerData,a=Number(t.minContainerWidth)||200,n=Number(t.minContainerHeight)||100;if(!(this.disabled||i.width<=a||i.height<=n)){var o,r,h=e.offsetWidth/i.width;1===h&&e.offsetHeight===i.height||(t.restore&&(o=this.getCanvasData(),r=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(ct(o,(function(t,e){o[e]=t*h}))),this.setCropBoxData(ct(r,(function(t,e){r[e]=t*h})))))}},dblclick:function(){var t,e;this.disabled||this.options.dragMode===z||this.setDragMode((t=this.dragBox,e=C,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?L:H))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(tt(e)&&1!==e||tt(i)&&0!==i||t.ctrlKey))){var a,n=this.options,o=this.pointers;t.changedTouches?ct(t.changedTouches,(function(t){o[t.identifier]=Lt(t)})):o[t.pointerId||0]=Lt(t),a=Object.keys(o).length>1&&n.zoomable&&n.zoomOnTouch?m:xt(t.target,W),K.test(a)&&!1!==Bt(this.element,S,{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,a===p&&(this.cropping=!0,gt(this.dragBox,T)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==Bt(this.element,R,{originalEvent:t,action:e})&&(t.changedTouches?ct(t.changedTouches,(function(t){lt(i[t.identifier]||{},Lt(t,!0))})):lt(i[t.pointerId||0]||{},Lt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?ct(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,vt(this.dragBox,T,this.cropped&&this.options.modal)),Bt(this.element,X,{originalEvent:t,action:e}))}}},It={change:function(t){var e,i=this.options,a=this.canvasData,o=this.containerData,r=this.cropBoxData,h=this.pointers,s=this.action,c=i.aspectRatio,l=r.left,C=r.top,D=r.width,B=r.height,O=l+D,T=C+B,E=0,W=0,N=o.width,H=o.height,L=!0;!c&&t.shiftKey&&(c=D&&B?D/B:1),this.limited&&(E=r.minLeft,W=r.minTop,N=E+Math.min(o.width,a.width,a.left+a.width),H=W+Math.min(o.height,a.height,a.top+a.height));var z=h[Object.keys(h)[0]],Y={x:z.endX-z.startX,y:z.endY-z.startY},X=function(t){switch(t){case g:O+Y.x>N&&(Y.x=N-O);break;case f:l+Y.x<E&&(Y.x=E-l);break;case w:C+Y.y<W&&(Y.y=W-C);break;case v:T+Y.y>H&&(Y.y=H-T)}};switch(s){case d:l+=Y.x,C+=Y.y;break;case g:if(Y.x>=0&&(O>=N||c&&(C<=W||T>=H))){L=!1;break}X(g),(D+=Y.x)<0&&(s=f,l-=D=-D),c&&(B=D/c,C+=(r.height-B)/2);break;case w:if(Y.y<=0&&(C<=W||c&&(l<=E||O>=N))){L=!1;break}X(w),B-=Y.y,C+=Y.y,B<0&&(s=v,C-=B=-B),c&&(D=B*c,l+=(r.width-D)/2);break;case f:if(Y.x<=0&&(l<=E||c&&(C<=W||T>=H))){L=!1;break}X(f),D-=Y.x,l+=Y.x,D<0&&(s=g,l-=D=-D),c&&(B=D/c,C+=(r.height-B)/2);break;case v:if(Y.y>=0&&(T>=H||c&&(l<=E||O>=N))){L=!1;break}X(v),(B+=Y.y)<0&&(s=w,C-=B=-B),c&&(D=B*c,l+=(r.width-D)/2);break;case b:if(c){if(Y.y<=0&&(C<=W||O>=N)){L=!1;break}X(w),B-=Y.y,C+=Y.y,D=B*c}else X(w),X(g),Y.x>=0?O<N?D+=Y.x:Y.y<=0&&C<=W&&(L=!1):D+=Y.x,Y.y<=0?C>W&&(B-=Y.y,C+=Y.y):(B-=Y.y,C+=Y.y);D<0&&B<0?(s=M,C-=B=-B,l-=D=-D):D<0?(s=x,l-=D=-D):B<0&&(s=y,C-=B=-B);break;case x:if(c){if(Y.y<=0&&(C<=W||l<=E)){L=!1;break}X(w),B-=Y.y,C+=Y.y,D=B*c,l+=r.width-D}else X(w),X(f),Y.x<=0?l>E?(D-=Y.x,l+=Y.x):Y.y<=0&&C<=W&&(L=!1):(D-=Y.x,l+=Y.x),Y.y<=0?C>W&&(B-=Y.y,C+=Y.y):(B-=Y.y,C+=Y.y);D<0&&B<0?(s=y,C-=B=-B,l-=D=-D):D<0?(s=b,l-=D=-D):B<0&&(s=M,C-=B=-B);break;case M:if(c){if(Y.x<=0&&(l<=E||T>=H)){L=!1;break}X(f),D-=Y.x,l+=Y.x,B=D/c}else X(v),X(f),Y.x<=0?l>E?(D-=Y.x,l+=Y.x):Y.y>=0&&T>=H&&(L=!1):(D-=Y.x,l+=Y.x),Y.y>=0?T<H&&(B+=Y.y):B+=Y.y;D<0&&B<0?(s=b,C-=B=-B,l-=D=-D):D<0?(s=y,l-=D=-D):B<0&&(s=x,C-=B=-B);break;case y:if(c){if(Y.x>=0&&(O>=N||T>=H)){L=!1;break}X(g),B=(D+=Y.x)/c}else X(v),X(g),Y.x>=0?O<N?D+=Y.x:Y.y>=0&&T>=H&&(L=!1):D+=Y.x,Y.y>=0?T<H&&(B+=Y.y):B+=Y.y;D<0&&B<0?(s=x,C-=B=-B,l-=D=-D):D<0?(s=M,l-=D=-D):B<0&&(s=b,C-=B=-B);break;case u:this.move(Y.x,Y.y),L=!1;break;case m:this.zoom(function(t){var e=n({},t),i=[];return ct(t,(function(t,a){delete e[a],ct(e,(function(e){var a=Math.abs(t.startX-e.startX),n=Math.abs(t.startY-e.startY),o=Math.abs(t.endX-e.endX),r=Math.abs(t.endY-e.endY),h=Math.sqrt(a*a+n*n),s=(Math.sqrt(o*o+r*r)-h)/h;i.push(s)}))})),i.sort((function(t,e){return Math.abs(t)<Math.abs(e)})),i[0]}(h),t),L=!1;break;case p:if(!Y.x||!Y.y){L=!1;break}e=Ot(this.cropper),l=z.startX-e.left,C=z.startY-e.top,D=r.minWidth,B=r.minHeight,Y.x>0?s=Y.y>0?y:b:Y.x<0&&(l-=D,s=Y.y>0?M:x),Y.y<0&&(C-=B),this.cropped||(ft(this.cropBox,k),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}L&&(r.width=D,r.height=B,r.left=l,r.top=C,this.action=s,this.renderCropBox()),ct(h,(function(t){t.startX=t.endX,t.startY=t.endY}))}},Ut={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&>(this.dragBox,T),ft(this.cropBox,k),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=lt({},this.initialImageData),this.canvasData=lt({},this.initialCanvasData),this.cropBoxData=lt({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(lt(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),ft(this.dragBox,T),gt(this.cropBox,k)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,ct(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,ft(this.cropper,D)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,gt(this.cropper,D)),this},destroy:function(){var t=this.element;return t[l]?(t[l]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=i.left,n=i.top;return this.moveTo(it(t)?t:a+Number(t),it(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(tt(t)&&(i.left=t,a=!0),tt(e)&&(i.top=e,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var a=this.options,n=this.canvasData,o=n.width,r=n.height,h=n.naturalWidth,s=n.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&a.zoomable){var c=h*t,l=s*t;if(!1===Bt(this.element,_,{ratio:t,oldRatio:o/h,originalEvent:i}))return this;if(i){var d=this.pointers,p=Ot(this.cropper),u=d&&Object.keys(d).length?function(t){var e=0,i=0,a=0;return ct(t,(function(t){var n=t.startX,o=t.startY;e+=n,i+=o,a+=1})),{pageX:e/=a,pageY:i/=a}}(d):{pageX:i.pageX,pageY:i.pageY};n.left-=(c-o)*((u.pageX-p.left-n.left)/o),n.top-=(l-r)*((u.pageY-p.top-n.top)/r)}else ot(e)&&tt(e.x)&&tt(e.y)?(n.left-=(c-o)*((e.x-n.left)/o),n.top-=(l-r)*((e.y-n.top)/r)):(n.left-=(c-o)/2,n.top-=(l-r)/2);n.width=c,n.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return tt(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,tt(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(tt(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(tt(t)&&(i.scaleX=t,a=!0),tt(e)&&(i.scaleY=e,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,a=this.imageData,n=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-n.left,y:o.top-n.top,width:o.width,height:o.height};var r=a.width/a.naturalWidth;if(ct(t,(function(e,i){t[i]=e/r})),e){var h=Math.round(t.y+t.height),s=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=s-t.x,t.height=h-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=a.rotate||0),i.scalable&&(t.scaleX=a.scaleX||1,t.scaleY=a.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,a=this.canvasData,n={};if(this.ready&&!this.disabled&&ot(t)){var o=!1;e.rotatable&&tt(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(tt(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),tt(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;tt(t.x)&&(n.left=t.x*r+a.left),tt(t.y)&&(n.top=t.y*r+a.top),tt(t.width)&&(n.width=t.width*r),tt(t.height)&&(n.height=t.height*r),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?lt({},this.containerData):{}},getImageData:function(){return this.sized?lt({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&ct(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&ot(t)&&(tt(t.left)&&(e.left=t.left),tt(t.top)&&(e.top=t.top),tt(t.width)?(e.width=t.width,e.height=t.width/i):tt(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,a=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&ot(t)&&(tt(t.left)&&(a.left=t.left),tt(t.top)&&(a.top=t.top),tt(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),tt(t.height)&&t.height!==a.height&&(i=!0,a.height=t.height),n&&(e?a.height=a.width/n:i&&(a.width=a.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=function(t,e,i,a){var n=e.aspectRatio,r=e.naturalWidth,h=e.naturalHeight,s=e.rotate,c=void 0===s?0:s,l=e.scaleX,d=void 0===l?1:l,p=e.scaleY,u=void 0===p?1:p,m=i.aspectRatio,g=i.naturalWidth,f=i.naturalHeight,v=a.fillColor,w=void 0===v?"transparent":v,b=a.imageSmoothingEnabled,x=void 0===b||b,y=a.imageSmoothingQuality,M=void 0===y?"low":y,C=a.maxWidth,D=void 0===C?1/0:C,k=a.maxHeight,B=void 0===k?1/0:k,O=a.minWidth,T=void 0===O?0:O,E=a.minHeight,W=void 0===E?0:E,N=document.createElement("canvas"),H=N.getContext("2d"),L=zt({aspectRatio:m,width:D,height:B}),z=zt({aspectRatio:m,width:T,height:W},"cover"),Y=Math.min(L.width,Math.max(z.width,g)),X=Math.min(L.height,Math.max(z.height,f)),R=zt({aspectRatio:n,width:D,height:B}),S=zt({aspectRatio:n,width:T,height:W},"cover"),A=Math.min(R.width,Math.max(S.width,r)),j=Math.min(R.height,Math.max(S.height,h)),P=[-A/2,-j/2,A,j];return N.width=pt(Y),N.height=pt(X),H.fillStyle=w,H.fillRect(0,0,Y,X),H.save(),H.translate(Y/2,X/2),H.rotate(c*Math.PI/180),H.scale(d,u),H.imageSmoothingEnabled=x,H.imageSmoothingQuality=M,H.drawImage.apply(H,[t].concat(o(P.map((function(t){return Math.floor(pt(t))}))))),H.restore(),N}(this.image,this.imageData,e,t);if(!this.cropped)return i;var a=this.getData(),n=a.x,r=a.y,h=a.width,s=a.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(n*=c,r*=c,h*=c,s*=c);var l=h/s,d=zt({aspectRatio:l,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=zt({aspectRatio:l,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=zt({aspectRatio:l,width:t.width||(1!==c?i.width:h),height:t.height||(1!==c?i.height:s)}),m=u.width,g=u.height;m=Math.min(d.width,Math.max(p.width,m)),g=Math.min(d.height,Math.max(p.height,g));var f=document.createElement("canvas"),v=f.getContext("2d");f.width=pt(m),f.height=pt(g),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,m,g);var w=t.imageSmoothingEnabled,b=void 0===w||w,x=t.imageSmoothingQuality;v.imageSmoothingEnabled=b,x&&(v.imageSmoothingQuality=x);var y,M,C,D,k,B,O=i.width,T=i.height,E=n,W=r;E<=-h||E>O?(E=0,y=0,C=0,k=0):E<=0?(C=-E,E=0,k=y=Math.min(O,h+E)):E<=O&&(C=0,k=y=Math.min(h,O-E)),y<=0||W<=-s||W>T?(W=0,M=0,D=0,B=0):W<=0?(D=-W,W=0,B=M=Math.min(T,s+W)):W<=T&&(D=0,B=M=Math.min(s,T-W));var N=[E,W,y,M];if(k>0&&B>0){var H=m/h;N.push(C*H,D*H,k*H,B*H)}return v.drawImage.apply(v,[i].concat(o(N.map((function(t){return Math.floor(pt(t))}))))),f},setAspectRatio:function(t){var e=this.options;return this.disabled||it(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var n=t===H,o=e.movable&&t===L;t=n||o?t:z,e.dragMode=t,yt(i,W,t),vt(i,C,n),vt(i,E,o),e.cropBoxMovable||(yt(a,W,t),vt(a,C,n),vt(a,E,o))}return this}},qt=h.Cropper,$t=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e||!V.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=lt({},F,ot(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return i=t,n=[{key:"noConflict",value:function(){return window.Cropper=qt,t}},{key:"setDefaults",value:function(t){lt(F,ot(t)&&t)}}],(a=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e[l]){if(e[l]=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e,i,a,n,o=this;if(t){this.url=t,this.imageData={};var r=this.element,h=this.options;if(h.rotatable||h.scalable||(h.checkOrientation=!1),h.checkOrientation&&window.ArrayBuffer)if(Z.test(t))G.test(t)?this.read((e=t.replace(Xt,""),i=atob(e),a=new ArrayBuffer(i.length),ct(n=new Uint8Array(a),(function(t,e){n[e]=i.charCodeAt(e)})),a)):this.clone();else{var s=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=s,s.onabort=c,s.onerror=c,s.ontimeout=c,s.onprogress=function(){s.getResponseHeader("content-type")!==Q&&s.abort()},s.onload=function(){o.read(s.response)},s.onloadend=function(){o.reloading=!1,o.xhr=null},h.checkCrossOrigin&&Wt(t)&&r.crossOrigin&&(t=Nt(t)),s.open("GET",t),s.responseType="arraybuffer",s.withCredentials="use-credentials"===r.crossOrigin,s.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,a=Rt(t),n=0,o=1,r=1;if(a>1){this.url=function(t,e){for(var i=[],a=new Uint8Array(t);a.length>0;)i.push(Yt.apply(null,st(a.subarray(0,8192)))),a=a.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,Q);var h=function(t){var e=0,i=1,a=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:a=-1;break;case 5:e=90,a=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:a}}(a);n=h.rotate,o=h.scaleX,r=h.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=o,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,a=e;this.options.checkCrossOrigin&&Wt(e)&&(i||(i="anonymous"),a=Nt(e)),this.crossOrigin=i,this.crossOriginUrl=a;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=a||e,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),gt(n,B),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=h.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(h.navigator.userAgent),a=function(e,i){lt(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var n=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){a(n.width,n.height),i||o.removeChild(n)},n.src=e.src,i||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(n))}else a(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,a=t.parentNode,n=document.createElement("div");n.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>';var o=n.querySelector(".".concat(l,"-container")),r=o.querySelector(".".concat(l,"-canvas")),h=o.querySelector(".".concat(l,"-drag-box")),s=o.querySelector(".".concat(l,"-crop-box")),c=s.querySelector(".".concat(l,"-face"));this.container=a,this.cropper=o,this.canvas=r,this.dragBox=h,this.cropBox=s,this.viewBox=o.querySelector(".".concat(l,"-view-box")),this.face=c,r.appendChild(i),gt(t,k),a.insertBefore(o,t.nextSibling),this.isImg||ft(i,B),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,gt(s,k),e.guides||gt(s.getElementsByClassName("".concat(l,"-dashed")),k),e.center||gt(s.getElementsByClassName("".concat(l,"-center")),k),e.background&>(o,"".concat(l,"-bg")),e.highlight||gt(c,O),e.cropBoxMovable&&(gt(c,E),yt(c,W,d)),e.cropBoxResizable||(gt(s.getElementsByClassName("".concat(l,"-line")),k),gt(s.getElementsByClassName("".concat(l,"-point")),k)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),rt(e.ready)&&kt(t,U,e.ready,{once:!0}),Bt(t,U)}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),ft(this.element,k))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&e(i.prototype,a),n&&e(i,n),t;var i,a,n}();return lt($t.prototype,St,At,jt,Pt,It,Ut),$t}()}}]);
|