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