1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5468],{36491:(t,r,e)=>{"use strict";function n(t,r){return btoa(function(t){let r="";for(let e=0;e<t.length;e+=1)r+=String.fromCharCode(t[e]);return r}(t)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function i(){return BigInt("115792089210356248762697446949407573530086143415290314195533631308867097853951")}function o(){return BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b")}function u(t){return BigInt("0x"+function(t){let r="";for(let e=0;e<t.length;e++){let n=t[e].toString(16);r+=n.length>1?n:"0"+n}return r}(t))}function l(t,r){let e=t.toString(16),n=2*r,i="";if(n<e.length)throw Error(`cannot pack integer with ${e.length} hex chars into ${r} bytes`);var o=(i="0".repeat(n-e.length))+e;if(o.length%2!=0)throw Error("Hex string length must be multiple of 2");let u=new Uint8Array(o.length/2);for(let t=0;t<o.length;t+=2)u[t/2]=parseInt(o.substring(t,t+2),16);return u}function a(t,r){return(t&BigInt(1)<<BigInt(r))!==BigInt(0)}e.d(r,{S:()=>g});var c=e(82655);function g(t){let r,{uncompressedPrivateKeyHex:e,compressedPublicKeyHex:g}=t;try{r=function(t){let r=33,e=65;if(t.length!==r&&t.length!==e)throw Error("Invalid length: point is not in compressed or uncompressed format");if((2===t[0]||3===t[0])&&t.length==r){let r=3===t[0],e=u(t.subarray(1,t.length)),c=i();if(e<BigInt(0)||e>=c)throw Error("x is out of range");let g=function(t,r){let e=i(),n=e-BigInt(3),u=o(),l=function(t,r){if(r<=BigInt(0))throw Error("p must be positive");let e=t%r;if(a(r,0)&&a(r,1)){let t=function(t,r,e){if(r===BigInt(0))return BigInt(1);let n=t,i=r.toString(2);for(let r=1;r<i.length;++r)n=n*n%e,"1"===i[r]&&(n=n*t%e);return n}(e,r+BigInt(1)>>BigInt(2),r);if(t*t%r!==e)throw Error("could not find a modular square root");return t}throw Error("unsupported modulus value")}(((t*t+n)*t+u)%e,e);return r!==a(l,0)&&(l=(e-l)%e),l}(e,r);return{kty:"EC",crv:"P-256",x:n(l(e,32)),y:n(l(g,32)),ext:!0}}if(4===t[0]&&t.length==e){let r=u(t.subarray(1,33)),e=u(t.subarray(33,65)),a=i();if(r<BigInt(0)||r>=a||e<BigInt(0)||e>=a||!function(t,r){let e=i(),n=e-BigInt(3),u=o();return r**BigInt(2)%e==((t*t+n)*t+u)%e}(r,e))throw Error("invalid uncompressed x and y coordinates");return{kty:"EC",crv:"P-256",x:n(l(r,32)),y:n(l(e,32)),ext:!0}}throw Error("invalid format")}((0,c.Ks)(g))}catch(t){throw Error("unable to load API key: invalid public key. Did you switch your public and private key by accident? Is your public key a valid, compressed P-256 public key?")}return r.d=(0,c.el)(e,c.Ev),r}},58733:()=>{},95468:(t,r,e)=>{"use strict";e.r(r),e.d(r,{signWithApiKey:()=>u});var n=e(58733),i=e(36491),o=e(81029).hp;let u=async t=>{let{content:r,publicKey:e,privateKey:u}=t,l=n.createPrivateKey({key:(0,i.S)({uncompressedPrivateKeyHex:u,compressedPublicKeyHex:e}),format:"jwk"}),a=n.createSign("SHA256");return a.write(o.from(r)),a.end(),a.sign(l,"hex")}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.