export default function({preset:o={},chapters:l,branding:i,src:e,analytics:t,automations:n,autoplay:d,blockAttributes:s={},provider:a="",provider_video_id:r="",youtube:u,type:p,isAdmin:v,i18n:y,storage:c={enabled:!v,key:`presto-player-${o.id}`}}){var _,w,g;const b=["settings"],m=[...["youtube","vimeo"].includes(a)?["pip"]:[]],h=["play-large","rewind","play","fast-forward","progress","current-time","mute","volume","captions","settings","pip","fullscreen"].filter(l=>((null==o?void 0:o[l])||b.includes(l))&&!m.includes(l));let k={id:null==s?void 0:s.id,title:(null==s?void 0:s.title)||"",blockAttributes:{...s,type:p},src:e,ajaxProgress:!0,analytics:t,preset:o,automations:n,mutedPreview:{enabled:null===(_=null==s?void 0:s.mutedPreview)||void 0===_?void 0:_.enabled},loop:{active:"loop"===(null==o?void 0:o.on_video_end)},chapters:l,controls:h,settings:["captions","quality","loop",...(null==o?void 0:o.speed)?["speed"]:[]],hideControls:null==o?void 0:o.auto_hide,captions:{active:null==o?void 0:o.captions_enabled,language:"auto",update:!1},logo:null==i?void 0:i.logo,logo_width:null==i?void 0:i.logo_width,hide_logo:null==o?void 0:o.hide_logo,lazy_load_youtube:null==o?void 0:o.lazy_load_youtube,save_player_position:!!(null==o?void 0:o.save_player_position),sticky_scroll:null==o?void 0:o.sticky_scroll,play_video_viewport:null==o?void 0:o.play_video_viewport,autoplay:!(!d||(null===(w=window.wp)||void 0===w?void 0:w.blocks)),...a?{provider:a}:{},...r?{provider_video_id:r}:{},...(null==s?void 0:s.poster)?{poster:s.poster}:{},invertTime:!(null==o?void 0:o.show_time_elapsed),storage:c,keyboard:{focused:!1,global:!1},resetOnEnd:!!(null==o?void 0:o.reset_on_end),vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,premium:!1,playsinline:!!(null==s?void 0:s.playsInline)},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!!(null==u?void 0:u.noCookie),playsinline:!!(null==s?void 0:s.playsInline)},tooltips:{controls:!0,seek:!0},i18n:y,..."original"!==(null==s?void 0:s.ratio)&&{ratio:null==s?void 0:s.ratio}};return(null===(g=null===window||void 0===window?void 0:window.wp)||void 0===g?void 0:g.hooks)&&(k=window.wp.hooks.applyFilters("presto.playerSettings",k)),k}