function o(t){if(!Number.isInteger(t)||t<=0)throw new Error("maxExclusive must be a positive integer");if(t===1)return 0;let e=globalThis.crypto;if(!e?.getRandomValues)return 0;let n=new Uint32Array(1),a=Math.floor(4294967296/t)*t,r=0;do e.getRandomValues(n),r=n[0]??0;while(r>=a);return r%t}function u(t){if(t.length!==0)return t[o(t.length)]}function c(t=""){let e=globalThis.crypto,n=typeof e?.randomUUID=="function"?e.randomUUID():`${Date.now()}-${o(1e6)}`;return t?`${t}${n}`:n}export{o as a,u as b,c};
