1(("undefined"!=typeof self?self:this).__LOADABLE_LOADED_CHUNKS__=("undefined"!=typeof self?self:this).__LOADABLE_LOADED_CHUNKS__||[]).push([[4014],{26491:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return D}});r(15735),r(58188),r(28673),r(6886),r(14121),r(96708),r(71245),r(66466),r(88233),r(18178),r(96928),r(61229),r(34769),r(34115),r(95342),r(68625),r(1939),r(62775),r(634),r(20796);var n=r(2784),i=r(45697),o=r.n(i),a=r(91506),s=(r(77950),r(94908),r(7799)),u=r(511),c=function(){var e=(0,s.Z)().location;return e?u.Z.parse(e.search,{ignoreQueryPrefix:!0}):{}},l=r(63617),f=r(90068),p=r(39285),d=r(88996),y=r(52322);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 v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){m(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function m(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function O(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function S(e,t){return S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},S(e,t)}function _(e){var t=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}}();return function(){var r,n=A(e);if(t){var i=A(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return P(this,r)}}function P(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?w(e):t}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function E(e){try{var t=new URL(e).pathname.toLowerCase();if(t.endsWith(".m3u8"))return"application/x-mpegURL";if(t.endsWith(".webm"))return"video/webm"}catch(e){}return"video/mp4"}var j=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}}),t&&S(e,t)}(u,e);var t,r,i,o=_(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=o.call(this,e)).wrapperRef=n.createRef(),t.state={userStartedPlay:!1,play:!1},t._isInFullscreen=!1,t.onPlay=t.onPlay.bind(w(t)),t.onPause=t.onPause.bind(w(t)),t.onFullscreenChange=t.onFullscreenChange.bind(w(t)),t.receiveMessage=t.receiveMessage.bind(w(t)),t}return t=u,(r=[{key:"componentDidMount",value:function(){(0,s.Z)().addEventListener("message",this.receiveMessage,!1),"true"===c().autoplay&&this.setState({userStartedPlay:!0}),this.setupVisibilityObserver()}},{key:"componentWillUnmount",value:function(){(0,s.Z)().removeEventListener("message",this.receiveMessage),this.visibilityObserver&&this.visibilityObserver.disconnect()}},{key:"setupVisibilityObserver",value:function(){var e=this,t=(0,s.Z)();t.IntersectionObserver&&this.wrapperRef.current&&(this.visibilityObserver=new t.IntersectionObserver((function(t){if(!t[0].isIntersecting){e.setState({play:!1});var r=e.wrapperRef.current&&e.wrapperRef.current.querySelector("video");r&&!r.paused&&r.pause()}}),{threshold:0}),this.visibilityObserver.observe(this.wrapperRef.current))}},{key:"receiveMessage",value:function(e){try{if(!e.data||"string"!=typeof e.data)return;var t=JSON.parse(e.data),r=c().cardId;if(t.to!==r)return;"MEDIA_STATUS"!==t.type&&"APP_STATUS"!==t.type||("PLAY-MUTE"===t.data?this.state.userStartedPlay&&this.setState({play:!0}):"PAUSE"!==t.data&&"PAUSE-INVIEW"!==t.data&&"RESUME"!==t.data||this.setState({play:!1}))}catch(e){}}}
1,{key:"notifyMediaStatus",value:function(e){var t=c().cardId,r=JSON.stringify({type:"MEDIA_STATUS",data:JSON.stringify({status:e,mediaType:"video"}),from:t});(0,s.Z)().parent.postMessage(r,"*")}},{key:"notifyAdStatus",value:function(e){(0,s.Z)().parent.postMessage(e,"*")}},{key:"onFullscreenChange",value:function(e){this._isInFullscreen=e,e?this._wasPlayingOnEnterFullscreen=this.state.play:this._wasPlayingOnEnterFullscreen&&this.state.userStartedPlay&&this.setState({play:!0})}},{key:"onPlay",value:function(){this.notifyMediaStatus("play"),this.setState({play:!0,userStartedPlay:!0})}},{key:"onPause",value:function(){this._isInFullscreen||(this.notifyMediaStatus("pause"),this.setState({play:!1}))}},{key:"render",value:function(){var e=this,t=c(),r=t.track,n=t.imageSource,i=t.prerollAds,o=t.autoplay,s=t.muted,u=t.npa,f=t.publisher_id,p=t.video_duration,d=t.section_id,h=t.orientation,v=t.midrollTime,m=g(t,["track","imageSource","prerollAds","autoplay","muted","npa","publisher_id","video_duration","section_id","orientation","midrollTime"]),O="true"===i,S="true"===o,_="true"===s,P=v?Number(v):0,w=Number.isFinite(P)?P:0,A=decodeURIComponent(this.props.routing.params.source),j=A,D=f,R=p,T=h;try{var k=new URL(A),M=k.searchParams.get("fp_partner"),U=k.searchParams.get("fp_duration"),F=k.searchParams.get("fp_orientation");M&&!D&&(D=M),U&&!R&&(R=U),F&&!T&&(T=F),k.searchParams.delete("fp_partner"),k.searchParams.delete("fp_duration"),k.searchParams.delete("fp_orientation"),j=k.searchParams.toString().length>0?k.toString():"".concat(k.origin).concat(k.pathname).concat(k.hash)}catch(e){}var I="vertical"===T?"480x640":"640x480",L=O||w>0,N=L?(0,l.Z)(b({publisher_id:D,video_duration:R,section_id:d,sz:I,vpa:S?"auto":"click",vpmute:_?1:0,plcmt:w>0?2:1,description_url:j},void 0!==u&&{npa:u})):void 0;return(0,y.jsx)("div",{className:"video-player__embedded-wrapper",ref:this.wrapperRef,children:(0,y.jsx)(a.Z,b({videoJSOptions:{},isEmbedded:!0,autoPlay:S,source:j,mimeType:E(j),track:!!r,poster:n,videoTrackerOptions:m,videoEvents:{pause:this.onPause,play:this.onPlay,adstart:function(){return e.notifyAdStatus("AD_STARTED")},adend:function(){return e.notifyAdStatus("AD_ENDED")},"ads-ad-started":function(){return e.notifyAdStatus("AD_STARTED")},contentresumed:function(){return e.notifyAdStatus("AD_ENDED")}},play:this.state.play,prerollAds:L,midrollTime:w,muted:_,onFullscreenChange:this.onFullscreenChange},L&&{overrideAdTagUrl:N,forceVideoAds:!0}))})}}])&&O(t.prototype,r),i&&O(t,i),u}(n.Component);j.propTypes={routing:o().object.isRequired};var D=(0,f.Z)(p.Z,d.Z)(j)},53775:function(e,t,r){var n=r(9859).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&n(e)}},66466:function(e,t,r){r(23103)({target:"Number",stat:!0},{isFinite:r(53775)})},96708:function(e,t,r){"use strict";var n,i=r(23103),o=r(65968),a=r(97933).f,s=r(34237),u=r(83326),c=r(47272),l=r(58885),f=r(48127),p=r(24231),d=o("".endsWith),y=o("".slice),h=Math.min,v=f("endsWith");i({target:"String",proto:!0,forced:!!(p||v||(n=a(String.prototype,"endsWith"),!n||n.writable))&&!v},{endsWith:function(e){var t=u(l(this));c(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,i=void 0===r?n:h(s(r),n),o=u(e);return d?d(t,o,i):y(t,i-o.length,i)===o}})}}]); 2//# sourceMappingURL=app-views-embeddable-html-video-player.8054908e7dc6d6420dd0.bundle.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.