import{__require as e}from"./global-this.mjs";import{__require as r}from"./get-built-in-node-module.mjs";import{__require as t}from"./structured-clone-proper-transfer.mjs";var n,s;function o(){if(s)return n;s=1;var o,a,u,i,f=e(),l=r(),m=t(),_=f.structuredClone,c=f.ArrayBuffer,p=f.MessageChannel,g=!1;if(m)g=function(e){_(e,{transfer:[e]})};else if(c)try{p||(o=l("worker_threads"))&&(p=o.MessageChannel),p&&(a=new p,u=new c(2),i=function(e){a.port1.postMessage(null,[e])},2===u.byteLength&&(i(u),0===u.byteLength&&(g=i)))}catch(e){}return n=g}export{o as __require};