!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="bdeb50dd-7b00-40a8-9e09-a5168b49a9cc",e._sentryDebugIdIdentifier="sentry-dbid-bdeb50dd-7b00-40a8-9e09-a5168b49a9cc")}catch(e){}}(),(self.webpackChunktwitch_twilight=self.webpackChunktwitch_twilight||[]).push([[74485],{353236:function(e,n,t){"use strict";t.d(n,{U:function(){return i}});var i=function(){function e(e,n){var t=this;this.throttleDuration=0,this.throttled=!1,this.timeout=0,this.unthrottle=function(){t.trailing&&t.trailingFn&&t.trailingFn(),t.clear()},this.throttleDuration=e,this.trailing=!(n&&n.skipTrailing)}return e.prototype.invoke=function(e){this.throttled?this.trailingFn=e:(this.throttled=!0,this.timeout=setTimeout(this.unthrottle,this.throttleDuration),e())},e.prototype.clear=function(){clearTimeout(this.timeout),this.timeout=0,this.throttled=!1,delete this.trailingFn},e}()},199837:function(e,n,t){"use strict";t.d(n,{h:function(){return l}});var i=t(331635),o=t(474848),r=t(296540),a=t(29896),s=t(911906),u=t(249448),c=t(690145),d=t.n(c);function l(){return function(e){var n=e;return function(e){var t,c,l=r.useContext(s.kl).content,h=(0,u.P3)(l)?l:null,v=null==h?void 0:h.collectionID,f=null==h?void 0:h.vodID,m=(0,a.IT)(d(),{skip:!(v&&!f),variables:{id:null!=v?v:""}}),p=m.data,g=m.loading,b=m.error,k=null!=f?f:null===(c=null===(t=null==p?void 0:p.collection)||void 0===t?void 0:t.items.edges[0])||void 0===c?void 0:c.node.id;return(0,o.jsx)(n,(0,i.__assign)({},e,{collectionContent:h,collectionLoading:g,collectionError:b,collectionVodID:k}))}}}},174485:function(e,n,t){"use strict";t.d(n,{P:function(){return m}});var i=t(331635),o=t(474848),r=t(959340),a=t(914421),s=t(724422),u=t(296540),c=t(353236),d=t(665736),l=t(156894),h=t(349673),v=t(481926),f=t(285289),m=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={hoverLocation:0,isMouseOver:!1},n.throttleTimer=new c.U(v.Q),n.handleMouseOverLocationChange=function(e){n.throttleTimer.invoke((function(){n.setState((function(n){return n.hoverLocation===e?null:{hoverLocation:e}}))}))},n.handleMouseOverChange=function(e){n.setState((function(n){return n.isMouseOver===e?null:{isMouseOver:e}}))},n.handleThumbLocationChange=function(e){n.props.onThumbLocationChanged(e)},n}return(0,i.__extends)(n,e),n.prototype.render=function(){var e=this.props,n=e.thumbLocation,t=e.clipLength,i=e.overlay,u=e.alwaysShowThumb,c=e.thumbAriaAttributes,v=t,m=[{type:h.b.FillToThumb,id:"watched-segment",color:s.K["color-twitch-purple-10"]}];return(0,o.jsxs)(r.P,{display:a.nl.Flex,flexDirection:a.bo.Column,alignItems:a.k2.Stretch,children:[(0,o.jsx)(d.l,{currentTimeInSeconds:this.state.hoverLocation,durationInSeconds:v,show:this.state.isMouseOver}),(0,o.jsx)(f.e,{currentTimeInSeconds:n,durationInSeconds:v,overlay:i}),(0,o.jsx)(l.y,{seekbarMin:0,seekbarMax:v,thumbLocation:n,segments:m,onThumbLocationChange:this.handleThumbLocationChange,onMouseOverLocationChange:this.handleMouseOverLocationChange,onMouseOverChange:this.handleMouseOverChange,alwaysShowThumb:u,thumbAriaAttributes:c})]})},n}(u.Component)},285289:function(e,n,t){"use strict";t.d(n,{e:function(){return u}});var i=t(474848),o=t(959340),r=t(914421),a=t(312663),s=(t(296540),t(883474)),u=function(e){var n=e.currentTimeInSeconds,t=e.durationInSeconds,u=Math.floor(Math.max(0,t-n));return(0,i.jsx)(o.P,{display:r.nl.Flex,justifyContent:r.A9.End,className:"vod-seekbar-time-labels",children:(0,i.jsx)(a.N,{color:!1===e.overlay?r.Q1.Base:r.Q1.Overlay,"aria-label":(0,s.hw)("Remaining time in seconds","ClipSeekbar"),children:u})})}},665736:function(e,n,t){"use strict";t.d(n,{l:function(){return b}});var i=t(331635),o=t(474848),r=t(920962),a=t(959340),s=t(914421),u=t(808681),c=t(86011),d=t(324602),l=t(312663),h=t(67813),v=t(723319),f=t(296540),m=t(85517),p=t(250740),g=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={},n.wrapperRef=f.createRef(),n.seekbarRef=null,n.setSeekbarRef=function(e){n.seekbarRef=e},n}return(0,i.__extends)(n,e),n.prototype.render=function(){if(0===this.props.durationInSeconds)return null;var e=(0,p.X)(this.props.currentTimeInSeconds),n=(0,m.Kb)(this.props.currentTimeInSeconds/this.props.durationInSeconds,this.state.wrapperWidth,this.state.seekbarWidth).offset;return(0,o.jsx)(r.h,{overlay:!0,children:(0,o.jsx)(a.P,{display:s.nl.Flex,ref:this.setSeekbarRef,children:(0,o.jsx)("div",{style:{position:s.yX.Relative,marginInlineStart:"".concat(n,"px")},children:(0,o.jsx)(u.E,{direction:c.j.TopCenter,size:d.$V.Auto,offsetY:"-2rem",show:!0,children:(0,o.jsx)("div",{ref:this.wrapperRef,children:(0,o.jsx)(a.P,{display:s.nl.Flex,justifyContent:s.A9.Center,padding:{x:.5},children:(0,o.jsx)(l.N,{color:s.Q1.Overlay,children:e})})})})})})})},n.prototype.componentDidMount=function(){if(this.wrapperRef.current&&this.seekbarRef){var e=this.wrapperRef.current.getBoundingClientRect().width,n=this.seekbarRef.getBoundingClientRect().width;this.setState({wrapperWidth:e,seekbarWidth:n})}},n}(f.Component),b=function(e){return(0,o.jsx)(h.e,{type:v.ES.Fade,duration:v.Cf.Short,show:e.show,children:(0,o.jsx)(g,(0,i.__assign)({},e))})}},156894:function(e,n,t){"use strict";t.d(n,{y:function(){return d}});var i=t(331635),o=t(474848),r=t(296540),a=t(682620),s=t(119611),u=t(552462),c=t(548015),d=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={draggingThumbLocation:null,isMouseOver:!1},n.handleDragChange=function(e){n.setState({draggingThumbLocation:e})},n.handleDragStart=function(e){n.setState({draggingThumbLocation:e}),n.props.onThumbDragStart&&n.props.onThumbDragStart()},n.handleThumbLocationChange=function(e){n.props.onThumbLocationChange&&n.props.onThumbLocationChange(e),n.setState({draggingThumbLocation:null})},n.handleMouseEnter=function(){n.setState({isMouseOver:!0}),n.props.onMouseOverChange&&n.props.onMouseOverChange(!0)},n.handleMouseLeave=function(){n.setState({isMouseOver:!1}),n.props.onMouseOverChange&&n.props.onMouseOverChange(!1)},n.handleMouseMove=function(e){n.props.onMouseOverLocationChange&&n.props.onMouseOverLocationChange(e)},n}return(0,i.__extends)(n,e),n.prototype.render=function(){var e=this.props,n=e.alwaysShowThumb,t=e.seekbarMin,i=e.seekbarMax,r=e.thumbAriaAttributes,d=this.state,l=d.draggingThumbLocation,h=d.isMouseOver,v=null!==l,f=(0,o.jsx)(u._,{ariaAttributes:r,show:h||v||n}),m=null!==l?l:this.props.thumbLocation,p=(0,c.Y)(this.props.segments,{seekbarMin:t,thumbLocation:m});return(0,o.jsx)(s.P,{onDragStart:this.handleDragStart,onDragChange:this.handleDragChange,onDragEnd:this.handleThumbLocationChange,onClick:this.handleThumbLocationChange,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove,seekbarMin:t,seekbarMax:i,allowedMin:this.props.minAllowedThumbLocation,allowedMax:this.props.maxAllowedThumbLocation,children:(0,o.jsx)(a.j,{min:t,max:i,thumbLocation:m,thumb:f,segments:p})})},n}(r.Component)},682620:function(e,n,t){"use strict";t.d(n,{j:function(){return m}});var i,o=t(331635),r=t(474848),a=t(959340),s=t(914421),u=t(97774),c=t(216042),d=t(296540),l=t(246942),h=t.n(l),v=t(854732);!function(e){e.Segment="seekbar-segment__segment"}(i||(i={}));var f=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,o.__extends)(n,e),n.prototype.render=function(){var e=this.props,n=e.seekbarMax,t=e.seekbarMin,o=Math.max(n-t,0),a=(0,v.N)(this.props.start,t,n),d=(0,v.N)(this.props.end,t,n),l=(a-t)/o*100,f=Math.max(d-a,0)/o*100,m=h()(["seekbar-segment",this.props.className]);return(0,r.jsx)(c.S,{className:m,position:s.yX.Absolute,borderRadius:u.Z.Medium,children:(0,r.jsx)("span",{style:{insetInlineStart:"".concat(l,"%"),width:"".concat(f,"%"),backgroundColor:this.props.color},"data-test-selector":i.Segment})})},n}(d.PureComponent),m=function(e){var n=e.thumb,t=e.min,i=e.max,c=e.segments,d=Math.max(i-t,0),l=((0,v.N)(e.thumbLocation,t,i)-t)/d*100;return(0,r.jsxs)(a.P,{className:"seekbar-bar",display:s.nl.Flex,alignItems:s.k2.Center,borderRadius:u.Z.Medium,position:s.yX.Relative,width:"100%",children:[c.map((function(e){return(0,r.jsx)(f,(0,o.__assign)({seekbarMin:t,seekbarMax:i},e),e.id)})),(0,r.jsx)(p,{leftPercentageOffset:l,children:n})]})},p=function(e){var n=(0,v.N)(e.leftPercentageOffset,0,100);return(0,r.jsx)(c.S,{position:s.yX.Absolute,children:(0,r.jsx)("span",{style:{insetInlineStart:"".concat(n,"%")},children:e.children})})}},119611:function(e,n,t){"use strict";t.d(n,{P:function(){return c}});var i,o=t(331635),r=t(474848),a=t(216042),s=t(296540),u=t(854732);!function(e){e.InteractionArea="seekbar-interaction-area__interactionArea"}(i||(i={}));var c=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.seekbarWrapperRef=s.createRef(),n.touchIdentifier=h,n.handleMouseClick=function(e){n.processMouseEventOrTouch(e,l.Click)},n.handleMouseDown=function(e){n.processMouseEventOrTouch(e,l.DragStart),n.addMouseDocumentHandlers()},n.handleMouseMove=function(e){n.processMouseEventOrTouch(e,l.MouseMove)},n.handleMouseUp=function(e){n.processMouseEventOrTouch(e,l.DragEnd),n.removeDocumentHandlers()},n.handleMouseEnter=function(){n.props.onMouseEnter&&n.props.onMouseEnter()},n.handleMouseLeave=function(){n.props.onMouseLeave&&n.props.onMouseLeave()},n.handleTouchStart=function(e){var t=e.touches[0];n.touchIdentifier=t.identifier,n.processMouseEventOrTouch(t,l.DragStart),n.addTouchDocumentHandlers()},n.addMouseDocumentHandlers=function(){document.addEventListener("mousemove",n.handleDocumentMouseMove),document.addEventListener("mouseup",n.handleDocumentMouseUp)},n.addTouchDocumentHandlers=function(){document.addEventListener("touchmove",n.handleDocumentTouchMove),document.addEventListener("touchend",n.handleDocumentTouchEnd),document.addEventListener("touchcancel",n.handleDocumentTouchEnd)},n.removeDocumentHandlers=function(){document.removeEventListener("mousemove",n.handleDocumentMouseMove),document.removeEventListener("mouseup",n.handleDocumentMouseUp),document.removeEventListener("touchmove",n.handleDocumentTouchMove),document.removeEventListener("touchend",n.handleDocumentTouchEnd),document.removeEventListener("touchcancel",n.handleDocumentTouchEnd)},n.handleDocumentMouseMove=function(e){e.preventDefault&&e.preventDefault(),n.processMouseEventOrTouch(e,l.DragChange)},n.handleDocumentMouseUp=function(e){n.processMouseEventOrTouch(e,l.DragEnd),n.removeDocumentHandlers()},n.handleDocumentTouchMove=function(e){var t=d(n.touchIdentifier,e.touches);t&&n.processMouseEventOrTouch(t,l.DragChange)},n.handleDocumentTouchEnd=function(e){var t=d(n.touchIdentifier,e.changedTouches);t&&(n.touchIdentifier=h,n.processMouseEventOrTouch(t,l.DragEnd),n.removeDocumentHandlers())},n.processMouseEventOrTouch=function(e,t){var i=n.props,r=i.seekbarMin,a=i.seekbarMax,s=i.allowedMin,c=i.allowedMax,d=function(e,n,t,i,r){void 0===r&&(r={});if(!n)return t;var a=function(e){var n=e.eventClientX,t=e.seekbarMin,i=e.seekbarMax,o=e.allowedMax,r=e.allowedMin,a=e.seekbarWrapperRect,s=a.left,c=a.width;if(0===c)return t;var d=n-s,l=(0,u.N)(d/c,0,1)*(i-t)+t,h=void 0===r?t:r,v=void 0===o?i:o;return(0,u.N)(l,h,v)}((0,o.__assign)({seekbarWrapperRect:n.getBoundingClientRect(),eventClientX:e,seekbarMin:t,seekbarMax:i},r));return a}(e.clientX,n.seekbarWrapperRef.current,r,a,{allowedMin:s,allowedMax:c});switch(t){case l.Click:n.props.onClick(d);break;case l.DragStart:n.props.onDragStart(d);break;case l.DragChange:n.props.onDragChange(d);break;case l.DragEnd:n.props.onDragEnd(d);break;case l.MouseMove:n.props.onMouseMove(d)}},n}return(0,o.__extends)(n,e),n.prototype.componentWillUnmount=function(){this.removeDocumentHandlers()},n.prototype.render=function(){return(0,r.jsx)(a.S,{padding:{y:1},className:"seekbar-interaction-area",children:(0,r.jsx)("div",{ref:this.seekbarWrapperRef,onClick:this.handleMouseClick,onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,onTouchStart:this.handleTouchStart,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,"data-test-selector":i.InteractionArea,"data-a-target":"player-seekbar",children:this.props.children})})},n}(s.Component);function d(e,n){return Array.from(n).find((function(n){return n.identifier===e}))}var l,h=-1;!function(e){e.DragStart="drag-start",e.DragChange="drag-change",e.DragEnd="drag-end",e.Click="click",e.MouseMove="mousemove"}(l||(l={}))},552462:function(e,n,t){"use strict";t.d(n,{_:function(){return c}});var i=t(331635),o=t(474848),r=t(67813),a=t(723319),s=t(959340),u=t(843004),c=(t(296540),function(e){var n,t,c;return(0,o.jsx)(r.e,{show:!!e.show,type:a.ES.Fade,children:(0,o.jsx)(s.P,(0,i.__assign)({},e.ariaAttributes,{"aria-label":(null===(n=e.ariaAttributes)||void 0===n?void 0:n["aria-live"])||null===(t=e.ariaAttributes)||void 0===t?void 0:t["aria-label"],className:"seekbar-thumb",role:"slider",tabIndex:0,children:(0,o.jsx)(u.L,{children:null===(c=e.ariaAttributes)||void 0===c?void 0:c["aria-label"]})}))})})},349673:function(e,n,t){"use strict";var i;t.d(n,{b:function(){return i}}),function(e){e.Fixed="fixed",e.FillToThumb="fill-to-thumb",e.AfterThumb="after-thumb"}(i||(i={}))},854732:function(e,n,t){"use strict";t.d(n,{N:function(){return o}});var i=t(883474);function o(e,n,t){return n>t?(i.x2.logger.withCategory("clamp-number").warn("Tried to clamp a number, but min is greater than max",{value:e,min:n,max:t}),e):Math.max(n,Math.min(t,e))}},548015:function(e,n,t){"use strict";t.d(n,{Y:function(){return o}});var i=t(349673);function o(e,n){return e?e.map((function(e){switch(e.type){case i.b.Fixed:return r(e,n);case i.b.AfterThumb:return a(e,n);case i.b.FillToThumb:return s(e,n);default:return null}})).filter((function(e){return!!e})):[]}var r=function(e){return{id:e.id,color:e.color,start:e.start,end:e.end}},a=function(e,n){return{id:e.id,color:e.color,start:n.thumbLocation,end:n.thumbLocation+e.length}},s=function(e,n){return{id:e.id,color:e.color,start:n.seekbarMin,end:n.thumbLocation}}},481926:function(e,n,t){"use strict";t.d(n,{Q:function(){return O},H:function(){return N}});var i,o=t(331635),r=t(474848),a=t(959340),s=t(914421),u=t(724422),c=t(296540),d=t(353236),l=t(156894),h=t(349673),v=t(67813),f=t(723319),m=t(826094),p=t(868238),g=t(883474),b=t(276337),k=t(199837),M=t(911906),S=t(249448),w=t(894320),x=t(479970),y=t(852340),D=t.n(y);function T(e){return(0,o.__awaiter)(this,void 0,Promise,(function(){var n;return(0,o.__generator)(this,(function(t){switch(t.label){case 0:return[4,fetch(e)];case 1:if(200===(n=t.sent()).status)return[2,n.json()];throw new Error("Could not fetch seek previews at ".concat(e))}}))}))}function C(e,n){if(e){var t=Math.floor(n/e.interval),i=Math.floor(t/(e.rows*e.cols)),o=Math.min(i,e.images.length-1);return e.images[o]}}!function(e){e.Low="low",e.High="high"}(i||(i={}));var L=(0,p.Zz)((0,M.cj)((function(e){return{vodID:(0,S.hq)(e.content),includePrivateVODs:(0,w.wk)({playerPublicPropsContext:e}).includePrivateVODs||!1}})),(0,k.h)(),(0,b._v)(D(),{options:function(e){var n;return{variables:{videoID:null!==(n=e.vodID)&&void 0!==n?n:e.collectionVodID,includePrivate:e.includePrivateVODs||!1}}},skip:function(e){return!e.vodID&&!e.collectionVodID}}))((function(e){var n=function(e){return e.data&&e.data.video&&e.data.video.seekPreviewsURL}(e),t=(0,c.useState)(new Set),a=t[0],s=t[1],u=(0,c.useState)(void 0),d=u[0],l=u[1],h=(0,c.useState)(void 0),p=h[0],b=h[1],k=(0,c.useCallback)((function(e){s((function(n){return n.add(e)}))}),[]);(0,c.useEffect)((function(){if(n){(0,o.__awaiter)(void 0,void 0,void 0,(function(){var e,t,r,a,u;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,T(n)];case 1:return(e=o.sent())&&0!==e.length?(t=e[0],l(t),r=e.find((function(e){return e.quality===i.Low})),a=e.find((function(e){return e.quality===i.High})),r&&r.width>=160?l(r):a&&l(a),b(a),s(new Set),[3,3]):(s(new Set),[2]);case 2:return u=o.sent(),g.vF.warn((0,m.d)(u,{useRawMessage:!0})),[3,3];case 3:return[2]}}))}))}}),[n]),(0,c.useEffect)((function(){var t=Math.floor(e.currentTimeInSeconds),i=C(p,t);if(p&&i&&!a.has(i)){var o=null==n?void 0:n.substring(0,n.lastIndexOf("/")),r="".concat(o,"/").concat(i),s=new Image;s.onload=function(){return k(i)},s.src=r}}),[e.currentTimeInSeconds,p,n,a,k]);var M=(0,c.useMemo)((function(){var n=Math.floor(e.currentTimeInSeconds),t=C(p,n);return t&&a.has(t)?p:d}),[e.currentTimeInSeconds,p,a,d]);return(0,r.jsx)(v.e,{type:f.ES.Fade,duration:f.Cf.Short,show:Boolean(M&&e.show),children:(0,r.jsx)(x.$,{currentTimeInSeconds:e.currentTimeInSeconds,durationInSeconds:e.durationInSeconds,seekPreviewsURL:n||void 0,seekPreview:M})})})),I=t(312663),j=t(250740),E=function(e){var n=e.currentTimeInSeconds,t=e.durationInSeconds,i=(0,j.X)(n),o=(0,j.X)(t);return(0,r.jsxs)(a.P,{display:s.nl.Flex,justifyContent:s.A9.Between,className:"vod-seekbar-time-labels",children:[(0,r.jsx)(I.N,{"data-a-target":"player-seekbar-current-time",color:s.Q1.Overlay,children:i}),(0,r.jsx)(I.N,{"data-a-target":"player-seekbar-duration","data-a-value":t,color:s.Q1.Overlay,children:o})]})},O=25,N=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={hoverLocation:0,isMouseOver:!1},n.throttleTimer=new d.U(O),n.handleThumbDragStart=function(){n.props.onThumbDragStart()},n.handleThumbLocationChange=function(e){n.props.onThumbLocationChanged(e)},n.handleMouseOverLocationChange=function(e){n.throttleTimer.invoke((function(){n.setState((function(n){return n.hoverLocation===e?null:{hoverLocation:e}}))}))},n.handleMouseOverChange=function(e){n.setState((function(n){return n.isMouseOver===e?null:{isMouseOver:e}}))},n}return(0,o.__extends)(n,e),n.prototype.render=function(){var e,n=this.props,t=n.thumbLocation,i=n.bufferDuration,c=n.vodLength,d=n.mutedSegments,v=n.editingSegments,f=c,m=v?function(e){if(!e)return[];return e.map((function(e,n){var t=e.startOffset,i=e.endOffset;return{type:h.b.Fixed,id:"editing-segment-".concat(n),start:t,end:i,color:u.K["color-yellow"]}}))}(v):(0,o.__spreadArray)([(e=i,{type:h.b.AfterThumb,id:"buffer-segment",color:"hsla(0, 0%, 100%, 0.85)",length:e}),{type:h.b.FillToThumb,id:"watched-segment",color:u.K["color-twitch-purple-10"]}],function(e){return e.map((function(e,n){var t=e.duration,i=e.offset;return{type:h.b.Fixed,id:"muted-segment-".concat(n),start:i,end:i+t,color:"rgba(212, 73, 73, 0.5)"}}))}(d),!0);return(0,r.jsxs)(a.P,{display:s.nl.Flex,flexDirection:s.bo.Column,alignItems:s.k2.Stretch,children:[(0,r.jsx)(L,{currentTimeInSeconds:this.state.hoverLocation,durationInSeconds:f,show:this.state.isMouseOver}),(0,r.jsx)(E,{currentTimeInSeconds:t,durationInSeconds:f}),(0,r.jsx)(l.y,{alwaysShowThumb:!!v,seekbarMin:0,seekbarMax:f,thumbLocation:t,onThumbLocationChange:this.handleThumbLocationChange,onThumbDragStart:this.handleThumbDragStart,onMouseOverLocationChange:this.handleMouseOverLocationChange,onMouseOverChange:this.handleMouseOverChange,segments:m})]})},n}(c.Component)},479970:function(e,n,t){"use strict";t.d(n,{$:function(){return m}});var i,o=t(474848),r=t(914421),a=t(920962),s=t(959340),u=t(808681),c=t(86011),d=t(324602),l=t(312663),h=t(296540),v=t(250740),f=t(85517);!function(e){e.PreviewImage="vod-seekbar-preview-overlay-preview-image",e.Wrapper="vod-seekbar-preview-overlay-wrapper"}(i||(i={}));var m=function(e){var n=e.currentTimeInSeconds,t=e.durationInSeconds,m=e.seekPreviewsURL,p=e.seekPreview,g=(0,h.useState)(),b=g[0],k=g[1],M=(0,h.useState)(),S=M[0],w=M[1],x=(0,h.useRef)(null),y=(0,h.useRef)(null);if((0,h.useEffect)((function(){if(x.current&&y.current){var e=x.current.getBoundingClientRect(),n=y.current.getBoundingClientRect();k(e.width),w(n.width)}}),[]),0===t)return null;var D=(0,v.X)(n),T=(0,f.Kb)(n/t,b,S).offset;return(0,o.jsx)(a.h,{overlay:!0,children:(0,o.jsx)(s.P,{display:r.nl.Flex,ref:y,children:(0,o.jsx)("div",{className:"vod-seekbar-preview-overlay__wrapper",style:{position:r.yX.Relative,marginInlineStart:"".concat(T,"px")},children:(0,o.jsx)(u.E,{direction:c.j.TopCenter,size:d.$V.Auto,offsetY:"-2rem",show:!0,children:(0,o.jsxs)("div",{ref:x,children:[function(){if(!m||!p)return null;var e=(0,f.hv)(n,p,m),t=e.offsetX,a=e.offsetY,s=e.imageURL,u=e.previewImageWidth,c=e.previewImageHeight,d=e.backgroundSize;return(0,o.jsx)("div",{"data-test-selector":i.PreviewImage,style:{backgroundImage:"url(".concat(s,")"),width:u,height:c,backgroundPosition:"-".concat(t,"px -").concat(a,"px"),backgroundSize:"".concat(d,"px"),position:r.yX.Relative}})}(),(0,o.jsx)(s.P,{display:r.nl.Flex,justifyContent:r.A9.Center,padding:{x:.5},children:(0,o.jsx)(l.N,{color:r.Q1.Overlay,children:D})})]})})})})})}},85517:function(e,n,t){"use strict";t.d(n,{Kb:function(){return o},hv:function(){return r}});var i=240;function o(e,n,t){if(!n||!t)return{offset:0};var i=e*t,o=n/2;return it-o?{offset:t-o}:{offset:i}}function r(e,n,t){var o=i,r=o/n.width*n.height,a=Math.floor(e/n.interval),s=Math.floor(a/(n.rows*n.cols)),u=a%(n.rows*n.cols),c=n.images[s],d=u%n.cols*o,l=Math.floor(u/n.cols)*r,h=t.substring(0,t.lastIndexOf("/"));return{sheet:s,index:u,offsetX:d,offsetY:l,imageURL:"".concat(h,"/").concat(c),previewImageWidth:o,previewImageHeight:r,backgroundSize:o*n.cols}}},250740:function(e,n,t){"use strict";function i(e){if(e<0||e>259200||!isFinite(e))return"00:00:00";var n=Math.floor(e/3600),t=Math.floor(e%3600/60),i=Math.floor(e%60);return"".concat(o(n,2),":").concat(o(t,2),":").concat(o(i,2))}function o(e,n){var t=e.toString();return t.length