(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9340],{75866:(e,t,a)=>{var l=Object.create,s=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,o=Object.getPrototypeOf,r=Object.prototype.hasOwnProperty,p=(e,t,a,l)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of i(t))r.call(e,o)||o===a||s(e,o,{get:()=>t[o],enumerable:!(l=n(t,o))||l.enumerable});return e},h=(e,t,a)=>(((e,t,a)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a)(e,"symbol"!=typeof t?t+"":t,a),a),u={};((e,t)=>{for(var a in t)s(e,a,{get:t[a],enumerable:!0})})(u,{default:()=>b}),e.exports=p(s({},"__esModule",{value:!0}),u);var y=((e,t,a)=>(a=null!=e?l(o(e)):{},p(!t&&e&&e.__esModule?a:s(a,"default",{value:e,enumerable:!0}),e)))(a(14232)),c=a(24657),d=a(73443);class b extends y.Component{constructor(){super(...arguments),h(this,"callPlayer",c.callPlayer),h(this,"playerID",this.props.config.playerId||`wistia-player-${(0,c.randomString)()}`),h(this,"onPlay",(...e)=>this.props.onPlay(...e)),h(this,"onPause",(...e)=>this.props.onPause(...e)),h(this,"onSeek",(...e)=>this.props.onSeek(...e)),h(this,"onEnded",(...e)=>this.props.onEnded(...e)),h(this,"onPlaybackRateChange",(...e)=>this.props.onPlaybackRateChange(...e)),h(this,"mute",()=>{this.callPlayer("mute")}),h(this,"unmute",()=>{this.callPlayer("unmute")})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){let{playing:t,muted:a,controls:l,onReady:s,config:n,onError:i}=this.props;(0,c.getSDK)("https://fast.wistia.com/assets/external/E-v1.js","Wistia").then(e=>{n.customControls&&n.customControls.forEach(t=>e.defineControl(t)),window._wq=window._wq||[],window._wq.push({id:this.playerID,options:{autoPlay:t,silentAutoPlay:"allow",muted:a,controlsVisibleOnLoad:l,fullscreenButton:l,playbar:l,playbackRateControl:l,qualityControl:l,volumeControl:l,settingsControl:l,smallPlayButton:l,...n.options},onReady:e=>{this.player=e,this.unbind(),this.player.bind("play",this.onPlay),this.player.bind("pause",this.onPause),this.player.bind("seek",this.onSeek),this.player.bind("end",this.onEnded),this.player.bind("playbackratechange",this.onPlaybackRateChange),s()}})},i)}unbind(){this.player.unbind("play",this.onPlay),this.player.unbind("pause",this.onPause),this.player.unbind("seek",this.onSeek),this.player.unbind("end",this.onEnded),this.player.unbind("playbackratechange",this.onPlaybackRateChange)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){this.unbind(),this.callPlayer("remove")}seekTo(e,t=!0){this.callPlayer("time",e),t||this.pause()}setVolume(e){this.callPlayer("volume",e)}setPlaybackRate(e){this.callPlayer("playbackRate",e)}getDuration(){return this.callPlayer("duration")}getCurrentTime(){return this.callPlayer("time")}getSecondsLoaded(){return null}render(){let{url:e}=this.props,t=e&&e.match(d.MATCH_URL_WISTIA)[1],a=`wistia_embed wistia_async_${t}`;return y.default.createElement("div",{id:this.playerID,key:t,className:a,style:{width:"100%",height:"100%"}})}}h(b,"displayName","Wistia"),h(b,"canPlay",d.canPlay.wistia),h(b,"loopOnEnded",!0)}}]);