var e,t;"function"==typeof(e=globalThis.define)&&(t=e,e=null),function(t,r,n,o,i){var u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof u[o]&&u[o],c=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(e,r){if(!c[e]){if(!t[e]){var n="function"==typeof u[o]&&u[o];if(!r&&n)return n(e,!0);if(a)return a(e,!0);if(l&&"string"==typeof e)return l(e);var i=Error("Cannot find module '"+e+"'");throw i.code="MODULE_NOT_FOUND",i}f.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},f.cache={};var s=c[e]=new d.Module(e);t[e][0].call(s.exports,f,s,s.exports,this)}return c[e].exports;function f(e){var t=f.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=t,d.cache=c,d.parent=a,d.register=function(e,r){t[e]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return u[o]}}),u[o]=d;for(var s=0;s<r.length;s++)d(r[s]);if(n){var f=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof e&&e.amd?e(function(){return f}):i&&(this[i]=f)}}({kgW6q:[function(e,t,r){e("../../../background")},{"../../../background":"8VaxY"}],"8VaxY":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),chrome.sidePanel.setPanelBehavior({openPanelOnActionClick:!1}).catch(console.error),chrome.commands.onCommand.addListener(e=>{"toggle-listening"===e&&chrome.runtime.sendMessage({type:"toggle-listening"}).catch(()=>{chrome.tabs.query({active:!0,currentWindow:!0}).then(([e])=>{e?.windowId&&chrome.sidePanel.open({windowId:e.windowId}).catch(console.error)})})}),chrome.runtime.onMessage.addListener((e,t,r)=>{if("get-tab-audio-stream-id"===e.type){let t=e.tabId;return chrome.tabCapture.getMediaStreamId({targetTabId:t,consumerTabId:t},e=>{chrome.runtime.lastError?r({error:chrome.runtime.lastError.message}):r({streamId:e})}),!0}if("CDP_CLICK"===e.type){let{tabId:t,selector:n}=e;return(async()=>{try{let e=await chrome.scripting.executeScript({target:{tabId:t},func:e=>{let t=document.querySelector(e);if(!t)return null;let r=t.getBoundingClientRect();return{x:r.left+r.width/2,y:r.top+r.height/2}},args:[n]}),o=e[0]?.result;if(!o){r({error:`Element not found: ${n}`});return}let i={tabId:t};await chrome.debugger.attach(i,"1.3");try{await chrome.debugger.sendCommand(i,"Input.dispatchMouseEvent",{type:"mousePressed",x:o.x,y:o.y,button:"left",clickCount:1}),await chrome.debugger.sendCommand(i,"Input.dispatchMouseEvent",{type:"mouseReleased",x:o.x,y:o.y,button:"left",clickCount:1})}finally{await chrome.debugger.detach(i)}r({success:!0})}catch(e){r({error:e instanceof Error?e.message:String(e)})}})(),!0}})},{"@parcel/transformer-js/src/esmodule-helpers.js":"f6DG4"}],f6DG4:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||t.hasOwnProperty(r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["kgW6q"],"kgW6q","parcelRequire12f1"),globalThis.define=t;