(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,4927,(e,t,r)=>{let s,l,a;var o=Object.create,i=Object.defineProperty,n=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,u=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,h=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let l of p(t))c.call(e,l)||l===r||i(e,l,{get:()=>t[l],enumerable:!(s=n(t,l))||s.enumerable});return e},y=(e,t,r)=>{let s;return(s="symbol"!=typeof t?t+"":t)in e?i(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r,r},d={},b={default:()=>B};for(var f in b)i(d,f,{get:b[f],enumerable:!0});t.exports=h(i({},"__esModule",{value:!0}),d);var m=(a=null!=(s=e.r(271645))?o(u(s)):{},h(!l&&s&&s.__esModule?a:i(a,"default",{value:s,enumerable:!0}),s)),g=e.r(762406),P=e.r(933066);let v="https://connect.facebook.net/en_US/sdk.js",O="fbAsyncInit";class B extends m.Component{constructor(){super(...arguments),y(this,"callPlayer",g.callPlayer),y(this,"playerID",this.props.config.playerId||`facebook-player-${(0,g.randomString)()}`),y(this,"mute",()=>{this.callPlayer("mute")}),y(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,t){t?(0,g.getSDK)(v,"FB",O).then(e=>e.XFBML.parse()):(0,g.getSDK)(v,"FB",O).then(e=>{e.init({appId:this.props.config.appId,xfbml:!0,version:this.props.config.version}),e.Event.subscribe("xfbml.render",e=>{this.props.onLoaded()}),e.Event.subscribe("xfbml.ready",e=>{"video"===e.type&&e.id===this.playerID&&(this.player=e.instance,this.player.subscribe("startedPlaying",this.props.onPlay),this.player.subscribe("paused",this.props.onPause),this.player.subscribe("finishedPlaying",this.props.onEnded),this.player.subscribe("startedBuffering",this.props.onBuffer),this.player.subscribe("finishedBuffering",this.props.onBufferEnd),this.player.subscribe("error",this.props.onError),this.props.muted?this.callPlayer("mute"):this.callPlayer("unmute"),this.props.onReady(),document.getElementById(this.playerID).querySelector("iframe").style.visibility="visible")})})}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentPosition")}getSecondsLoaded(){return null}render(){let{attributes:e}=this.props.config;return m.default.createElement("div",{style:{width:"100%",height:"100%"},id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false",...e})}}y(B,"displayName","Facebook"),y(B,"canPlay",P.canPlay.facebook),y(B,"loopOnEnded",!0)}]);