Module 277515

1,513 characters · in 13a12afe4f91a7ee.js
Dependencies
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){function r(e,t,n){if(e.byteLength<t)throw Error("data.byteLength must be greater than or equal to desiredLength");if(t%n!=0)throw Error("desiredLength must be a multiple of groupSize");if(n>8)throw Error("groupSize must be less than or equal to 8");let r=BigInt(10**n),i="";for(let a=0;a<t;a+=n){let t=BigInt(0);for(let r=n;r>0;--r){let i=e[a+(n-r)];if(void 0===i)throw Error("Out of bounds access from data array");t=t<<8n|BigInt(i)}t%=r,i+=t.toString().padStart(n,"0")}return i}async function i(e,t,n){if(0!==e)throw Error("unsupported fingerprint format version");if(0===t.byteLength)throw Error("zero-length key");if(0===n.length)throw Error("zero-length user ID");let r=BigInt(n);if(r<0n||r>=2n**64n)throw Error("user ID out of range");let i=new Uint8Array(2+t.byteLength+8);i.set(t,2);let a=new DataView(i.buffer);return a.setUint16(0,e),a.setBigUint64(2+t.byteLength,r),i}n.d(t,{uo:()=>s,_x:()=>c,DB:()=>r}),n(393431),n(532706),n(42231),n(232424),n(949626),n(767709),n(65162);var a=n(495142);let o=Uint8Array.of(36,202,177,122,122,248,236,43,130,180,18,185,45,171,25,46),l={N:16384,r:8,p:2,dkLen:64};function u(e,t){for(let n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e[n]-t[n];return e.length-t.length}async function c(e,t,n,r,c){let E=await Promise.all([i(e,t,n),i(e,r,c)]);E.sort(u);let s=new Uint8Array(E[0].byteLength+E[1].byteLength);return s.set(E[0],0),s.set(E[1],E[0].byteLength),new Uint8Array(await (0,a.Q)(s,o,l))}var E=n(85526);function s(e){return E.fromByteArray(e)}}