/* esm.sh - es-toolkit@1.53.0/dist/array/sampleSize */
import{randomInt as h}from"../math/randomInt.mjs";function f(e,o){if(o>e.length)throw new Error("Size must be less than or equal to the length of array.");let l=new Array(o),r=new Set;for(let t=e.length-o,s=0;t<e.length;t++,s++){let n=h(0,t+1);r.has(n)&&(n=t),r.add(n),l[s]=e[n]}return l}export{f as sampleSize};
//# sourceMappingURL=sampleSize.mjs.map