"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9913],{9913:function(e,t,n){n.d(t,{p:function(){return b},Z:function(){return y}});var r=n(59499),o=n(67294),i=n(57565),l=n(76972),u=n(83274),a=n(17674),c=n(7158),d=n(63906),s=n(62927),p=n(90076),f=n(35944);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"original",r=arguments.length>1?arguments[1]:void 0;if("disabled"===n)return 0;if("original"===n)return 1/(null!==(e=null==r?void 0:r.width)&&void 0!==e?e:1)*(null!==(t=null==r?void 0:r.height)&&void 0!==t?t:1);var o=(0,a.Z)(n,2);return 1/o[0]*o[1]}(k,null!==(m=null!==(g=null!=W?W:z)&&void 0!==g?g:null==B?void 0:B.thumbnail.image)&&void 0!==m?m:null==B?void 0:B.thumbnail.video),r=(0,o.useRef)(null),b=(v=(0,o.useState)(function(){return"100%"===N?0:N*n}))[0],y=v[1],(0,c.Z)(function(){var e;function t(){null!=r.current&&y(r.current.offsetWidth*n)}return t(),null===(e=visualViewport)||void 0===e||e.addEventListener("resize",t),function(){var e;null===(e=visualViewport)||void 0===e||e.removeEventListener("resize",t)}},[n,N,null===(t=r.current)||void 0===t?void 0:t.offsetWidth]),(0,o.useMemo)(function(){return{containerRef:r,computedHeight:b}},[b])),_=I.containerRef,q=I.computedHeight,x=(0,l.Z)(),T=x.initializePlayer,U=x.startVideo;return(0,f.tZ)(u.W2,{ref:_,cssWidth:N,cssHeight:null!==(O=null!=F?F:V?"auto":null)&&void 0!==O?O:q,shadow:void 0!==L&&L,className:S,children:null!=W&&W.height&&W.width?(0,f.tZ)(i.default,{componentName:"image",src:W.src,alt:W.alt,width:W.width,height:W.height,sizes:W.sizes,layout:void 0===A?"responsive":A,objectFit:D}):null!=z?(0,f.tZ)(d.n,{width:"100%",height:"100%",videoRef:M,poster:null!==(w=z.poster)&&void 0!==w?w:void 0,autoPlay:null===(j=z.autoPlay)||void 0===j||j,loop:null!==(P=z.loop)&&void 0!==P&&P,preload:z.preload,onEnded:z.onEnded,onTimeUpdate:null!=H?H:z.onTimeUpdate,controlsList:z.controlsList,children:(0,f.tZ)("source",{src:z.src,type:"video/mp4"})}):null!=V?(0,f.tZ)(p.Z,h(h({},V),{},{objectFit:D,aspectRatio:"original"===k?void 0:k,mediaRef:M})):null!=B?(0,f.BX)(u.bk,{onClick:function(){T({id:B.id,autoplay:!1,controls:!0}),U({config:{id:B.id}})},children:[(0,f.tZ)(u.rp,{position:B.playButtonPosition||"center"}),null!=B.thumbnail.image&&(0,f.tZ)(u.Mq,{componentName:"image",src:B.thumbnail.image.src,alt:B.thumbnail.image.alt,width:null!==(Z=B.thumbnail.image.width)&&void 0!==Z?Z:void 0,height:null!==(E=B.thumbnail.image.height)&&void 0!==E?E:void 0,layout:"responsive",objectFit:"cover"}),null!=B.thumbnail.video&&(0,f.tZ)(d.n,{width:"100%",height:"100%",autoPlay:!0,children:(0,f.tZ)("source",{src:B.thumbnail.video.src,type:"video/mp4"})})]}):null})}var y=b},63906:function(e,t,n){n.d(t,{n:function(){return s}});var r=n(59499),o=n(4730);n(67294);var i=n(83274),l=n(35944),u=["loop","poster","autoPlay","videoRef","hideControls"],a=["controls"];function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function d(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.ignoreLocales,n=(0,r.useRouter)();return!(void 0===t?[]:t).find(function(e){return e===n.locale})&&"/"===i(n.asPath)}var i=function(e){return e.split("?")[0].split("#")[0]}},7158:function(e,t,n){var r=n(67294).useLayoutEffect;t.Z=r}}]);