티스토리 수익 글 보기

티스토리 수익 글 보기

!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]=”84968ff2-7419-4e41-932b-a244043e7ecb”,e._sentryDebugIdIdentifier=”sentry-dbid-84968ff2-7419-4e41-932b-a244043e7ecb”)}catch(e){}}(),(self.webpackChunktwitch_twilight=self.webpackChunktwitch_twilight||[]).push([[74145],{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}()},988886:function(e,n,t){“use strict”;t.d(n,{D:function(){return a},M:function(){return r}});var i=t(296540),o=t(134920),r=function(e){var n=e.sourceAsset,t=e.portraitAsset,o=i.useState(“landscape-only”),r=o[0],s=o[1];return i.useEffect((function(){s(a({sourceAsset:n,portraitAsset:t}))}),[t,n]),{contentFormat:r}},a=function(e){var n=e.sourceAsset,t=e.portraitAsset,i=t&&!t.portraitMetadata;return n&&i&&(0,o.Mk)()?”dual-format”:!n&&i&&(0,o.a7)()?”portrait-only”:”landscape-only”}},243707:function(e,n,t){“use strict”;t.d(n,{Ip:function(){return g},JF:function(){return m},hq:function(){return f}});var i=t(891975),o=t(632017),r=t.n(o),a=t(296540),s=t(29896),u=t(876531),l=t(988886),c=t(936536),d=t(501096),h=t(843920),v=t.n(h),p=3e5,f=function(e){var n,t,o=e.onPollComplete,c=a.useState(!1),d=c[0],h=c[1],f=a.useState(!1),g=f[0],b=f[1],k=(0,s._l)(v(),{fetchPolicy:”no-cache”,pollInterval:2e3,onError:function(){b(!0),h(!0)},notifyOnNetworkStatusChange:!0,onCompleted:function(e){(null==e?void 0:e.clip)||(q(),w())}}),S=k[0],M=k[1],y=M.data,w=M.stopPolling,C=a.useRef(y),D=m(null===(n=null==y?void 0:y.clip)||void 0===n?void 0:n.assets),x=D.sourceAsset,T=D.portraitAsset,N=a.useState(void 0),_=N[0],A=N[1],I=a.useState(!1),E=I[0],L=I[1],j=a.useState((null==x?void 0:x.creationState)===u.j2q.CREATING),R=j[0],O=j[1],P=a.useState((null==T?void 0:T.creationState)===u.j2q.CREATING),F=P[0],V=P[1],q=a.useCallback((function(){O(!1),h(!0),V(!1),b(!0),A(!0),w()}),[w]),U=a.useCallback((function(){null==o||o(),O(!1),V(!1),A(!0),w()}),[o,w]),W=a.useRef();(0,i.S)((function(){return function(){return clearTimeout(W.current)}})),a.useEffect((function(){if(e.clipSlug){S({variables:{slug:e.clipSlug}});var n=setTimeout(q,p);W.current=n,A(!1)}}),[e.clipSlug,S,q]),a.useEffect((function(){var e,n=m(null===(e=null==y?void 0:y.clip)||void 0===e?void 0:e.assets),t=n.sourceAsset,i=n.portraitAsset,o=null==t?void 0:t.creationState,a=null==i?void 0:i.creationState,s=”portrait-only”===(0,l.D)({sourceAsset:t,portraitAsset:i});if((s?a:o)&&!r()(C.current,y)){if(o!==u.j2q.CREATING||R||O(!0),a!==u.j2q.CREATING||F||V(!0),o===u.j2q.FAILED&&(O(!1),h(!0)),a===u.j2q.FAILED&&(V(!1),b(!0)),!a&&o!==u.j2q.CREATING)return C.current=y,void U();o!==u.j2q.CREATING&&a!==u.j2q.CREATING&&(C.current=y,U()),s&&a!==u.j2q.CREATING&&(C.current=y,U())}}),[y,null===(t=null==y?void 0:y.clip)||void 0===t?void 0:t.assets,F,R,w,o,U]);var X=function(e){var n,t,i,o,r,a,s,u,l,c,h,v,p,f,b,k=m(null===(n=null==e?void 0:e.clip)||void 0===n?void 0:n.assets);return{source:{asset:k.sourceAsset,hasError:d},portrait:{asset:k.portraitAsset,hasError:g},exportAsset:null!==(i=null!==(t=k.portraitAsset)&&void 0!==t?t:k.sourceAsset)&&void 0!==i?i:null,clip:null==e?void 0:e.clip,broadcasterDisplayName:null===(r=null===(o=null==e?void 0:e.clip)||void 0===o?void 0:o.broadcaster)||void 0===r?void 0:r.displayName,broadcasterID:null===(s=null===(a=null==e?void 0:e.clip)||void 0===a?void 0:a.broadcaster)||void 0===s?void 0:s.id,broadcasterLogin:null===(l=null===(u=null==e?void 0:e.clip)||void 0===u?void 0:u.broadcaster)||void 0===l?void 0:l.login,createdAt:null===(c=null==e?void 0:e.clip)||void 0===c?void 0:c.createdAt,createdBy:null===(v=null===(h=null==e?void 0:e.clip)||void 0===h?void 0:h.curator)||void 0===v?void 0:v.id,durationSeconds:null===(p=null==e?void 0:e.clip)||void 0===p?void 0:p.durationSeconds,title:null===(f=null==e?void 0:e.clip)||void 0===f?void 0:f.title,viewCount:null===(b=null==e?void 0:e.clip)||void 0===b?void 0:b.viewCount,hasRepolled:E,hasPollEnded:_,onRePollClipRenderStatus:G,isPollingForSourceAsset:R,isPollingForPortraitAsset:F}},G=function(){if(e.clipSlug){L(!0),A(!1);var n=setTimeout(w,p);return W.current=n,S({variables:{slug:e.clipSlug}}).then((function(e){var n,t,i=X(e.data);return(null===(n=i.source.asset)||void 0===n?void 0:n.creationState)!==u.j2q.CREATING||R||O(!0),(null===(t=i.source.asset)||void 0===t?void 0:t.creationState)!==u.j2q.CREATING||F||V(!0),i}))}};return X(y)};function m(e){var n,t;if(!(null==e?void 0:e.length))return{sourceAsset:null,portraitAsset:null};var i=[],o=[];function r(e,n){var t=new Date(e.createdAt);return new Date(n.createdAt).getTime()-t.getTime()}return e.forEach((function(e){(0,c.e)(e)?o.push(e):i.push(e)})),i.sort(r),o.sort(r),{sourceAsset:null!==(n=i[0])&&void 0!==n?n:null,portraitAsset:null!==(t=o[0])&&void 0!==t?t:null}}function g(e){var n,t,i,o=e.exportAsset,r=e.clip,a=e.download,s=null===(n=null==o?void 0:o.videoQualities)||void 0===n?void 0:n[0].sourceURL,u=null===(t=null==r?void 0:r.playbackAccessToken)||void 0===t?void 0:t.value,l=null===(i=null==r?void 0:r.playbackAccessToken)||void 0===i?void 0:i.signature,h=(0,c.q)(o)?”LANDSCAPE”:”PORTRAIT”;if(s&&u&&l){var v=(0,d.D)({createdAt:o.createdAt,slug:r.slug,aspectRatioType:h});return(0,d.F)(s,u,l,a?{requestContentAsDownload:!0,fileName:v}:void 0)}}},501096:function(e,n,t){“use strict”;t.d(n,{D:function(){return a},F:function(){return r}});var i=t(917705),o=t(882439);function r(e,n,t,i){var r=e.match(/\.[^.]*$/);return””.concat(e,”?”).concat((0,o.stringify)({token:n,sig:t,”response-content-disposition”:(null==i?void 0:i.requestContentAsDownload)?’attachment; filename=”‘.concat(i.fileName).concat(r,'”‘):void 0}))}var a=function(e){var n=e.createdAt,t=e.slug,o=”LANDSCAPE”===e.aspectRatioType,r=isNaN(new Date(n).getTime())?new Date:new Date(n),a=(0,i.format)(r,”YYYYMMDD”);return””.concat(a,”_”).concat(t,”_”).concat(o?”source”:”portrait”)}},988651:function(e,n,t){“use strict”;t.d(n,{FQ:function(){return u},Uk:function(){return c},mO:function(){return s},u5:function(){return d}});var i,o,r=t(661988),a=t(903327),s=((i={twitter:”twitter”,reddit:”reddit”,vkontake:”vkontakte”,facebook:”facebook”}).copy=”link”,i[“copy-input”]=”option_link”,i.download=”download”,i.embed=”embed”,i),u={Game:”TopClipsGame”,Channel:”TopClipsChannel”},l=((o={MyClips:”my_clips”,ClipsOfMyChannel:”my_clips_channel”,TopClipsGame:”clips_game”,TopClipsChannel:”channel_clips”}).clips_edit=”clips_edit”,o.clips_viewing=”clips_viewing”,o.clips_watch=”clips_watch”,o),c=function(e,n,t,i,o){return function(a){r.x2.tracking.__track_SSRMigrationFixme(“video_share”,{vod_id:e,vod_type:”clip”,share_platform:s[a],location:l[o],game:n,channel_id:Number(t||0),channel:i,live:null})}},d=function(e,n,t,i,o,s){return function(){r.x2.tracking.__track_SSRMigrationFixme(“video_share”,{vod_id:e,vod_type:”clip”,share_platform:a.tz.Link,location:l[o],game:n,channel_id:Number(t||0),channel:i,live:null,shared_item_url:s})}}},199837:function(e,n,t){“use strict”;t.d(n,{h:function(){return d}});var i=t(331635),o=t(474848),r=t(296540),a=t(29896),s=t(911906),u=t(249448),l=t(690145),c=t.n(l);function d(){return function(e){var n=e;return function(e){var t,l,d=r.useContext(s.kl).content,h=(0,u.P3)(d)?d:null,v=null==h?void 0:h.collectionID,p=null==h?void 0:h.vodID,f=(0,a.IT)(c(),{skip:!(v&&!p),variables:{id:null!=v?v:””}}),m=f.data,g=f.loading,b=f.error,k=null!=p?p:null===(l=null===(t=null==m?void 0:m.collection)||void 0===t?void 0:t.items.edges[0])||void 0===l?void 0:l.node.id;return(0,o.jsx)(n,(0,i.__assign)({},e,{collectionContent:h,collectionLoading:g,collectionError:b,collectionVodID:k}))}}}},854622:function(e,n,t){“use strict”;t.d(n,{e:function(){return s}});var i=t(296540),o=t(868238),r=t(151702),a=t(265827);function s(e,n,t){var s=(0,a.q)(e,n),u=s.withContext;return{withMemoContext:function(e){return function(n){var a=u(e||t),s=(0,o.Zz)(a,i.memo)(n);return s.displayName=(0,r.K)(“withVideoPlayerContext”,n),s}},context:s.context}}},911906:function(e,n,t){“use strict”;t.d(n,{cj:function(){return d},df:function(){return v},kl:function(){return h}});var i=t(331635),o=t(474848),r=t(296540),a=t(212276),s=t(331337),u=t(854622),l={behaviors:{},callbacks:{},content:{type:a.FC.Invalid},type:s.C.Site},c=(0,u.e)(“PlayerPublicPropsContext”,l,(function(e){return{playerPublicPropsContext:e}})),d=c.withMemoContext,h=c.context,v=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(n,e),n.prototype.render=function(){return(0,o.jsx)(h.Provider,{value:this.props,children:this.props.children||null})},n}(r.PureComponent)},174485:function(e,n,t){“use strict”;t.d(n,{P:function(){return f}});var i=t(331635),o=t(474848),r=t(959340),a=t(914421),s=t(724422),u=t(296540),l=t(353236),c=t(665736),d=t(156894),h=t(349673),v=t(481926),p=t(285289),f=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={hoverLocation:0,isMouseOver:!1},n.throttleTimer=new l.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,l=e.thumbAriaAttributes,v=t,f=[{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)(c.l,{currentTimeInSeconds:this.state.hoverLocation,durationInSeconds:v,show:this.state.isMouseOver}),(0,o.jsx)(p.e,{currentTimeInSeconds:n,durationInSeconds:v,overlay:i}),(0,o.jsx)(d.y,{seekbarMin:0,seekbarMax:v,thumbLocation:n,segments:f,onThumbLocationChange:this.handleThumbLocationChange,onMouseOverLocationChange:this.handleMouseOverLocationChange,onMouseOverChange:this.handleMouseOverChange,alwaysShowThumb:u,thumbAriaAttributes:l})]})},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(661988)),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),l=t(86011),c=t(324602),d=t(312663),h=t(67813),v=t(723319),p=t(296540),f=t(85517),m=t(250740),g=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={},n.wrapperRef=p.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,m.X)(this.props.currentTimeInSeconds),n=(0,f.K)(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:l.j.TopCenter,size:c.$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)(d.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}(p.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 c}});var i=t(331635),o=t(474848),r=t(296540),a=t(682620),s=t(119611),u=t(552462),l=t(548015),c=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,c=this.state,d=c.draggingThumbLocation,h=c.isMouseOver,v=null!==d,p=(0,o.jsx)(u._,{ariaAttributes:r,show:h||v||n}),f=null!==d?d:this.props.thumbLocation,m=(0,l.Y)(this.props.segments,{seekbarMin:t,thumbLocation:f});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:f,thumb:p,segments:m})})},n}(r.Component)},682620:function(e,n,t){“use strict”;t.d(n,{j:function(){return f}});var i,o=t(331635),r=t(474848),a=t(959340),s=t(914421),u=t(97774),l=t(216042),c=t(296540),d=t(246942),h=t.n(d),v=t(854732);!function(e){e.Segment=”seekbar-segment__segment”}(i||(i={}));var p=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),c=(0,v.N)(this.props.end,t,n),d=(a-t)/o*100,p=Math.max(c-a,0)/o*100,f=h()([“seekbar-segment”,this.props.className]);return(0,r.jsx)(l.S,{className:f,position:s.yX.Absolute,borderRadius:u.Z.Medium,children:(0,r.jsx)(“span”,{style:{insetInlineStart:””.concat(d,”%”),width:””.concat(p,”%”),backgroundColor:this.props.color},”data-test-selector”:i.Segment})})},n}(c.PureComponent),f=function(e){var n=e.thumb,t=e.min,i=e.max,l=e.segments,c=Math.max(i-t,0),d=((0,v.N)(e.thumbLocation,t,i)-t)/c*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:[l.map((function(e){return(0,r.jsx)(p,(0,o.__assign)({seekbarMin:t,seekbarMax:i},e),e.id)})),(0,r.jsx)(m,{leftPercentageOffset:d,children:n})]})},m=function(e){var n=(0,v.N)(e.leftPercentageOffset,0,100);return(0,r.jsx)(l.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 l}});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 l=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,d.Click)},n.handleMouseDown=function(e){n.processMouseEventOrTouch(e,d.DragStart),n.addMouseDocumentHandlers()},n.handleMouseMove=function(e){n.processMouseEventOrTouch(e,d.MouseMove)},n.handleMouseUp=function(e){n.processMouseEventOrTouch(e,d.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,d.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,d.DragChange)},n.handleDocumentMouseUp=function(e){n.processMouseEventOrTouch(e,d.DragEnd),n.removeDocumentHandlers()},n.handleDocumentTouchMove=function(e){var t=c(n.touchIdentifier,e.touches);t&&n.processMouseEventOrTouch(t,d.DragChange)},n.handleDocumentTouchEnd=function(e){var t=c(n.touchIdentifier,e.changedTouches);t&&(n.touchIdentifier=h,n.processMouseEventOrTouch(t,d.DragEnd),n.removeDocumentHandlers())},n.processMouseEventOrTouch=function(e,t){var i=n.props,r=i.seekbarMin,a=i.seekbarMax,s=i.allowedMin,l=i.allowedMax,c=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,l=a.width;if(0===l)return t;var c=n-s,d=(0,u.N)(c/l,0,1)*(i-t)+t,h=void 0===r?t:r,v=void 0===o?i:o;return(0,u.N)(d,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:l});switch(t){case d.Click:n.props.onClick(c);break;case d.DragStart:n.props.onDragStart(c);break;case d.DragChange:n.props.onDragChange(c);break;case d.DragEnd:n.props.onDragEnd(c);break;case d.MouseMove:n.props.onMouseMove(c)}},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 c(e,n){return Array.from(n).find((function(n){return n.identifier===e}))}var d,h=-1;!function(e){e.DragStart=”drag-start”,e.DragChange=”drag-change”,e.DragEnd=”drag-end”,e.Click=”click”,e.MouseMove=”mousemove”}(d||(d={}))},552462:function(e,n,t){“use strict”;t.d(n,{_:function(){return l}});var i=t(331635),o=t(474848),r=t(67813),a=t(723319),s=t(959340),u=t(843004),l=(t(296540),function(e){var n,t,l;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===(l=e.ariaAttributes)||void 0===l?void 0:l[“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(661988);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 L},H:function(){return j}});var i,o=t(331635),r=t(474848),a=t(959340),s=t(914421),u=t(724422),l=t(296540),c=t(353236),d=t(156894),h=t(349673),v=t(67813),p=t(723319),f=t(826094),m=t(868238),g=t(661988),b=t(276337),k=t(199837),S=t(911906),M=t(249448),y=t(894320),w=t(479970),C=t(852340),D=t.n(C);function x(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 T(e){return e.data&&e.data.video&&e.data.video.seekPreviewsURL}!function(e){e.Low=”low”,e.High=”high”}(i||(i={}));var N=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={},n}return(0,o.__extends)(n,e),n.prototype.render=function(){var e=this.state.seekPreviews,n=T(this.props),t=!!this.props.data&&!this.props.data.loading;return(0,r.jsx)(v.e,{type:p.ES.Fade,duration:p.Cf.Short,show:t&&this.props.show,children:(0,r.jsx)(w.$c,{currentTimeInSeconds:this.props.currentTimeInSeconds,durationInSeconds:this.props.durationInSeconds,seekPreviewsURL:n||void 0,seekPreview:e&&e[0]})})},n.prototype.componentDidUpdate=function(e){return(0,o.__awaiter)(this,void 0,void 0,(function(){var n,t,i;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:if(!(n=T(this.props))||n===T(e))return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,x(n)];case 2:return t=o.sent(),this.setState({seekPreviews:t}),[3,4];case 3:return i=o.sent(),g.vF.warn((0,f.d)(i,{useRawMessage:!0})),[3,4];case 4:return[2]}}))}))},n}(l.Component),_=(0,m.Zz)((0,S.cj)((function(e){return{vodID:(0,M.hq)(e.content),includePrivateVODs:(0,y.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}}))(N),A=t(312663),I=t(250740),E=function(e){var n=e.currentTimeInSeconds,t=e.durationInSeconds,i=(0,I.X)(n),o=(0,I.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)(A.N,{“data-a-target”:”player-seekbar-current-time”,color:s.Q1.Overlay,children:i}),(0,r.jsx)(A.N,{“data-a-target”:”player-seekbar-duration”,”data-a-value”:t,color:s.Q1.Overlay,children:o})]})},L=25,j=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(L),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,l=n.vodLength,c=n.mutedSegments,v=n.editingSegments,p=l,f=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)”}}))}(c),!0);return(0,r.jsxs)(a.P,{display:s.nl.Flex,flexDirection:s.bo.Column,alignItems:s.k2.Stretch,children:[(0,r.jsx)(_,{currentTimeInSeconds:this.state.hoverLocation,durationInSeconds:p,show:this.state.isMouseOver}),(0,r.jsx)(E,{currentTimeInSeconds:t,durationInSeconds:p}),(0,r.jsx)(d.y,{alwaysShowThumb:!!v,seekbarMin:0,seekbarMax:p,thumbLocation:t,onThumbLocationChange:this.handleThumbLocationChange,onThumbDragStart:this.handleThumbDragStart,onMouseOverLocationChange:this.handleMouseOverLocationChange,onMouseOverChange:this.handleMouseOverChange,segments:f})]})},n}(l.Component)},479970:function(e,n,t){“use strict”;t.d(n,{$c:function(){return g}});var i,o=t(331635),r=t(474848),a=t(920962),s=t(959340),u=t(914421),l=t(808681),c=t(86011),d=t(324602),h=t(312663),v=t(296540),p=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=148,g=function(e){function n(){var n=null!==e&&e.apply(this,arguments)||this;return n.state={},n.wrapperRef=v.createRef(),n.seekbarRef=null,n.setSeekbarRef=function(e){n.seekbarRef=e},n}return(0,o.__extends)(n,e),n.prototype.render=function(){if(0===this.props.durationInSeconds)return null;var e=(0,p.X)(this.props.currentTimeInSeconds),n=(0,f.K)(this.props.currentTimeInSeconds/this.props.durationInSeconds,this.state.wrapperWidth,this.state.seekbarWidth).offset;return(0,r.jsx)(a.h,{overlay:!0,children:(0,r.jsx)(s.P,{display:u.nl.Flex,ref:this.setSeekbarRef,children:(0,r.jsx)(“div”,{className:”vod-seekbar-preview-overlay__wrapper”,”data-test-selector”:i.Wrapper,style:{position:u.yX.Relative,marginInlineStart:””.concat(n,”px”)},children:(0,r.jsx)(l.E,{direction:c.j.TopCenter,size:d.$V.Auto,offsetY:”-2rem”,show:!0,children:(0,r.jsxs)(“div”,{ref:this.wrapperRef,children:[this.renderPreviewImage(),(0,r.jsx)(s.P,{display:u.nl.Flex,justifyContent:u.A9.Center,padding:{x:.5},children:(0,r.jsx)(h.N,{color:u.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.prototype.renderPreviewImage=function(){var e=this.props,n=e.currentTimeInSeconds,t=e.seekPreviewsURL,o=e.seekPreview;if(!t||!o)return null;var a=m/o.width*o.height,s=Math.floor(n/o.interval),l=Math.floor(s/(o.rows*o.cols)),c=s%(o.rows*o.cols),d=o.images[l],h=c%o.cols*m,v=Math.floor(c/o.cols)*a,p=t.substring(0,t.lastIndexOf(“/”));return(0,r.jsx)(“div”,{“data-test-selector”:i.PreviewImage,style:{backgroundImage:”url(“.concat(p,”/”).concat(d,”)”),width:m,height:a,backgroundPosition:”-“.concat(h,”px -“).concat(v,”px”),backgroundSize:””.concat(m*o.cols,”px”),position:u.yX.Relative}})},n}(v.Component)},85517:function(e,n,t){“use strict”;function i(e,n,t){if(!n||!t)return{offset:0};var i=e*t,o=n/2;return it-o?{offset:t-o}:{offset:i}}t.d(n,{K:function(){return i}})},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