let t;const o=new Uint8Array(16);function r(){if(!t&&(t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!t))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return t(o)}const n=[];for(let d=0;d<256;++d)n.push((d+256).toString(16).slice(1));const e={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function u(t,o,u){if(e.randomUUID&&!o&&!t)return e.randomUUID();const d=(t=t||{}).random||(t.rng||r)();if(d[6]=15&d[6]|64,d[8]=63&d[8]|128,o){u=u||0;for(let t=0;t<16;++t)o[u+t]=d[t];return o}return function(t,o=0){return(n[t[o+0]]+n[t[o+1]]+n[t[o+2]]+n[t[o+3]]+"-"+n[t[o+4]]+n[t[o+5]]+"-"+n[t[o+6]]+n[t[o+7]]+"-"+n[t[o+8]]+n[t[o+9]]+"-"+n[t[o+10]]+n[t[o+11]]+n[t[o+12]]+n[t[o+13]]+n[t[o+14]]+n[t[o+15]]).toLowerCase()}(d)}export{u as v};
