(()=>{"use strict";self.onmessage=function(e){if("fetchScript"===e.data.type){const{src:s,widgetData:a}=e.data;fetch(s).then(t=>t.text()).then(t=>{self.postMessage({type:"scriptContent",scriptContent:t,widgetData:a,src:s})}).catch(t=>{console.error("Error loading script:",t)})}else"loadScript"===e.data.type&&(importScripts(e.data.url),self.postMessage({type:"status",status:"loaded"}))}})();