module.exports=[272264,(a,b,c)=>{let d,e,f;var g=Object.create,h=Object.defineProperty,i=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,k=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,m=(a,b,c,d)=>{if(b&&"object"==typeof b||"function"==typeof b)for(let e of j(b))l.call(a,e)||e===c||h(a,e,{get:()=>b[e],enumerable:!(d=i(b,e))||d.enumerable});return a},n=(a,b,c)=>{let d;return(d="symbol"!=typeof b?b+"":b)in a?h(a,d,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[d]=c,c},o={},p={default:()=>u};for(var q in p)h(o,q,{get:p[q],enumerable:!0});b.exports=m(h({},"__esModule",{value:!0}),o);var r=(f=null!=(d=a.r(572131))?g(k(d)):{},m(!e&&d&&d.__esModule?f:h(f,"default",{value:d,enumerable:!0}),d));let s="64px",t={};class u extends r.Component{constructor(){super(...arguments),n(this,"mounted",!1),n(this,"state",{image:null}),n(this,"handleKeyPress",a=>{("Enter"===a.key||" "===a.key)&&this.props.onClick()})}componentDidMount(){this.mounted=!0,this.fetchImage(this.props)}componentDidUpdate(a){let{url:b,light:c}=this.props;(a.url!==b||a.light!==c)&&this.fetchImage(this.props)}componentWillUnmount(){this.mounted=!1}fetchImage({url:a,light:b,oEmbedUrl:c}){if(!r.default.isValidElement(b))return"string"==typeof b?void this.setState({image:b}):t[a]?void this.setState({image:t[a]}):(this.setState({image:null}),window.fetch(c.replace("{url}",a)).then(a=>a.json()).then(b=>{if(b.thumbnail_url&&this.mounted){let c=b.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");this.setState({image:c}),t[a]=c}}))}render(){let{light:a,onClick:b,playIcon:c,previewTabIndex:d,previewAriaLabel:e}=this.props,{image:f}=this.state,g=r.default.isValidElement(a),h={display:"flex",alignItems:"center",justifyContent:"center"},i={preview:{width:"100%",height:"100%",backgroundImage:f&&!g?`url(${f})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...h},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:s,width:s,height:s,position:g?"absolute":void 0,...h},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},j=r.default.createElement("div",{style:i.shadow,className:"react-player__shadow"},r.default.createElement("div",{style:i.playIcon,className:"react-player__play-icon"}));return r.default.createElement("div",{style:i.preview,className:"react-player__preview",onClick:b,tabIndex:d,onKeyPress:this.handleKeyPress,...e?{"aria-label":e}:{}},g?a:null,c||j)}}}];

//# sourceMappingURL=node_modules_react-player_lazy_Preview_d2250cec.js.map