(function(){try{var g=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};g["__faroBundleId_Speechify Chrome Extension"]="13.4.1"}catch(l){}})();
import{Af as r,Ff as i,Gf as c,Ie as m,Of as p,hd as u,y as g}from"./chunk-XMRXO6YU.js";import"./chunk-ODCFEFOB.js";import"./chunk-24ZZP5UQ.js";import"./chunk-GQY3J744.js";import"./chunk-NWEJW7RD.js";import"./chunk-ASZMUWWE.js";import"./chunk-4XRFE7WB.js";import"./chunk-6I7EUWRH.js";import{f as e,g as o,n as d}from"./chunk-CLPINNGF.js";d();o();var f=n=>n?!!/^https:\/\/meet\.google\.com\/[a-z]{3}-[a-z]{4}-[a-z]{3}/.test(n):!1;async function b(){if(!await m())return()=>{};if(await p("ceMeetingNoteTaking")!=="enabled")return()=>{};let a=window.opener&&f(window.opener?.location?.href);if(!f(window.location.href)&&!a)return()=>{};i.init({onParticipantsChange:async t=>{e.runtime.sendMessage({target:"offscreen",data:{type:"meeting-capture/update-participants",participants:t}})},onActiveSpeakerChange:async t=>{e.runtime.sendMessage({path:"scribe/update-active-speaker",request:{body:{speaker:t},meta:{}},hash:Math.random().toString(36).substring(7),isHermes:!0,target:"sidepanel"}),e.runtime.sendMessage({target:"offscreen",data:{type:"meeting-capture/update-active-speaker",speaker:t||null}})},onCallEnded:async()=>{await g("/meeting-capture/stop",{reason:"meeting_ended"})},onEnterPreMeetingPage:async()=>{e.runtime.sendMessage({path:"scribe/update-user-label",request:{body:{userLabel:r()},meta:{}},hash:Math.random().toString(36).substring(7),isHermes:!0,target:"sidepanel"}),e.runtime.sendMessage({target:"offscreen",data:{type:"meeting-capture/update-user-label",userLabel:r()||null}})},onMeetingStarted:async()=>{a||e.runtime.sendMessage({path:"scribe/meeting-started",request:{body:{},meta:{}},hash:Math.random().toString(36).substring(7),isHermes:!0,target:"sidepanel"})},onUserMuteStateChange:async t=>{e.runtime.sendMessage({target:"offscreen",data:{type:"meeting-capture/update-mute-state",isMuted:t}})}});let s=()=>{document.visibilityState==="visible"&&!a&&i.checkIsInMeeting()&&e.runtime.sendMessage({path:"scribe/meeting-focused",request:{body:{},meta:{}},hash:Math.random().toString(36).substring(7),isHermes:!0,target:"sidepanel"})};document.addEventListener("visibilitychange",s);let l=await u("SHOULD_SHOW_ACTIVATE_NOTETAKER_POPUP");return!a&&l&&c(),()=>{document.removeEventListener("visibilitychange",s)}}export{b as default};
//# sourceMappingURL=init-PRFFJVFB.js.map
