import{__require as r}from"./global-this.mjs";import{__require as e}from"./function-uncurry-this.mjs";import{__require as t}from"./function-uncurry-this-accessor.mjs";import{__require as o}from"./to-index.mjs";import{__require as i}from"./array-buffer-not-detached.mjs";import{__require as a}from"./array-buffer-byte-length.mjs";import{__require as s}from"./detach-transferable.mjs";import{__require as n}from"./structured-clone-proper-transfer.mjs";var u,m;function f(){if(m)return u;m=1;var f=r(),_=e(),p=t(),c=o(),y=i(),h=a(),l=s(),q=n(),d=f.structuredClone,j=f.ArrayBuffer,g=f.DataView,v=Math.min,b=j.prototype,w=g.prototype,x=_(b.slice),B=p(b,"resizable","get"),I=p(b,"maxByteLength","get"),L=_(w.getInt8),z=_(w.setInt8);return u=(q||l)&&function(r,e,t){var o,i=h(r),a=void 0===e?i:c(e),s=!B||!B(r);if(y(r),q&&(r=d(r,{transfer:[r]}),i===a&&(t||s)))return r;if(i>=a&&(!t||s))o=x(r,0,a);else{var n=t&&!s&&I?{maxByteLength:I(r)}:void 0;o=new j(a,n);for(var u=new g(r),m=new g(o),f=v(a,i),_=0;_<f;_++)z(m,_,L(u,_))}return q||l(r),o}}export{f as __require};