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