var m=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),d={randomUUID:m};var a,l=new Uint8Array(16);function i(){if(!a){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");a=crypto.getRandomValues.bind(crypto)}return a(l)}var e=[];for(let t=0;t<256;++t)e.push((t+256).toString(16).slice(1));function p(t,r=0){return(e[t[r+0]]+e[t[r+1]]+e[t[r+2]]+e[t[r+3]]+"-"+e[t[r+4]]+e[t[r+5]]+"-"+e[t[r+6]]+e[t[r+7]]+"-"+e[t[r+8]]+e[t[r+9]]+"-"+e[t[r+10]]+e[t[r+11]]+e[t[r+12]]+e[t[r+13]]+e[t[r+14]]+e[t[r+15]]).toLowerCase()}function x(t,r,o){t=t||{};let n=t.random??t.rng?.()??i();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,r){if(o=o||0,o<0||o+16>r.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);for(let u=0;u<16;++u)r[o+u]=n[u];return r}return p(n)}function c(t,r,o){return d.randomUUID&&!r&&!t?d.randomUUID():x(t,r,o)}var f=c;export{f as a};
//# sourceMappingURL=chunk-QXXFZBB5.js.map
