import { urlAlphabet as h } from "./url-alphabet/index.js";
let i = (t) => crypto.getRandomValues(new Uint8Array(t)), d = (t, e, l) => {
  let n = (2 << Math.log2(t.length - 1)) - 1, o = -~(1.6 * n * e / t.length);
  return (a = e) => {
    let r = "";
    for (; ; ) {
      let u = l(o), m = o | 0;
      for (; m--; )
        if (r += t[u[m] & n] || "", r.length >= a) return r;
    }
  };
}, s = (t, e = 21) => d(t, e | 0, i), y = (t = 21) => {
  let e = "", l = crypto.getRandomValues(new Uint8Array(t |= 0));
  for (; t--; )
    e += h[l[t] & 63];
  return e;
};
export {
  s as customAlphabet,
  d as customRandom,
  y as nanoid,
  i as random,
  h as urlAlphabet
};
//# sourceMappingURL=index.browser.js.map
