import{c7 as O}from"./index-b5c8f851.js";import{i as R,t as L}from"./Indices-8bd7636c.js";function F(f,n,e){const l=Array.isArray(f),r=l?f.length/n:f.byteLength/(4*n),s=l?f:new Uint32Array(f,0,r*n),g=(e==null?void 0:e.minReduction)??0,y=(e==null?void 0:e.originalIndices)||null,q=y?y.length:0,c=(e==null?void 0:e.componentOffsets)||null;let U=0;if(c)for(let t=0;tU&&(U=a)}else U=r;const m=Math.floor(1.1*U)+1;(h==null||h.length<2*m)&&(h=new Uint32Array(O(2*m)));for(let t=0;t<2*m;t++)h[t]=0;let i=0;const w=!!c&&!!y,b=w?q:r;let A=R(r);const p=new Uint32Array(q),$=1.96;let C=g!==0?Math.ceil(4*$*$/(g*g)*g*(1-g)):b,d=1,I=c?c[1]:b;for(let t=0;t=m&&(u-=m)}x===i&&(h[2*u]=k,h[2*u+1]=a+1,i++),A[a]=x}if(g!==0&&1-i/r>>2)|0;return l>>>0}let h=null;export{F as e};