PageSourceSearch

https://axal.com/_next/static/chunks/4812.111beb2f2779665c.js

js axal.com collected 2026-10-09 22:54:01 UTC 57,332 bytes, 1 lines download raw bytes

vendor: 7,329 bytes, line 1
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4812],{8386:(e,t,r)=>{r.d(t,{Dg:()=>g,Ej:()=>p,Fl:()=>B,HT:()=>f,M7:()=>h,di:()=>b,ii:()=>E,oB:()=>c,sH:()=>d,tf:()=>y,u:()=>v,uK:()=>u,xW:()=>l});var n=r(94233),i=r(72971),o=r(89726);let s=new TextEncoder,a=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function l(...e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}function f(e){return e instanceof Uint8Array?u(e):Array.isArray(e)?u(new Uint8Array(e)):e}function u(e,t={}){let r="";for(let t=0;t<e.length;t++)r+=a[e[t]];let n=`0x${r}`;return"number"==typeof t.size?(o.Sl(n,t.size),h(n,t.size)):n}function c(e,t={}){var r,n;let i,{signed:s,size:a}=t,l=BigInt(e);a?i=s?(1n<<8n*BigInt(a)-1n)-1n:2n**(8n*BigInt(a))-1n:"number"==typeof e&&(i=BigInt(Number.MAX_SAFE_INTEGER));let f="bigint"==typeof i&&s?-i-1n:0;if(i&&l>i||l<f){let t="bigint"==typeof e?"n":"";throw new x({max:i?`${i}${t}`:void 0,min:`${f}${t}`,signed:s,size:a,value:`${e}${t}`})}let u=(s&&l<0?(1n<<BigInt(8*a))+BigInt(l):l).toString(16),d=`0x${u}`;return a?(r=d,n=a,o.eV(r,{dir:"left",size:n})):d}function d(e,t={}){return u(s.encode(e),t)}function h(e,t){return o.eV(e,{dir:"right",size:t})}function b(e,t,r,n={}){let{strict:i}=n;o.kK(e,t);let s=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return i&&o.X(s,t,r),s}function p(e){return Math.ceil((e.length-2)/2)}function g(e,t={}){let{signed:r}=t;t.size&&o.Sl(e,t.size);let n=BigInt(e);if(!r)return n;let i=(1n<<8n*BigInt((e.length-2)/2))-1n;return n<=i>>1n?n:n-i-1n}function y(e,t={}){let{strict:r=!1}=t;try{return!function(e,t={}){let{strict:r=!1}=t;if(!e||"string"!=typeof e)throw new m(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e)||!e.startsWith("0x"))throw new w(e)}(e,{strict:r}),!0}catch{return!1}}class x extends n.C{constructor({max:e,min:t,signed:r,size:n,value:i}){super(`Number \`${i}\` is not in safe${n?` ${8*n}-bit`:""}${r?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}n.C;class m extends n.C{constructor(e){super(`Value \`${"object"==typeof e?i.A(e):e}\` of type \`${typeof e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class w extends n.C{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}n.C;class v extends n.C{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class E extends n.C{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class B extends n.C{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}},31356:e=>{var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,s){if("function"!=typeof n)throw TypeError("The listener must be a function");var a=new i(n,o||e,s),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,i,o,s){var a=r?r+e:e;if(!this._events[a])return!1;var l,f,u=this._events[a],c=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),c){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,n),!0;case 4:return u.fn.call(u.context,t,n,i),!0;case 5:return u.fn.call(u.context,t,n,i,o),!0;case 6:return u.fn.call(u.context,t,n,i,o,s),!0}for(f=1,l=Array(c-1);f<c;f++)l[f-1]=arguments[f];u.fn.apply(u.context,l)}else{var d,h=u.length;for(f=0;f<h;f++)switch(u[f].once&&this.removeListener(e,u[f].fn,void 0,!0),c){case 1:u[f].fn.call(u[f].context);break;case 2:u[f].fn.call(u[f].context,t);break;case 3:u[f].fn.call(u[f].context,t,n);break;case 4:u[f].fn.call(u[f].context,t,n,i);break;default:if(!l)for(d=1,l=Array(c-1);d<c;d++)l[d-1]=arguments[d];u[f].fn.apply(u[f].context,l)}}return!0},a.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var l=0,f=[],u=a.length;l<u;l++)(a[l].fn!==t||i&&!a[l].once||n&&a[l].context!==n)&&f.push(a[l]);f.length?this._events[o]=1===f.length?f[0]:f:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a},39423:(e,t,r)=>{r.d(t,{aD:()=>a,nj:()=>l});var n=r(94233),i=r(8386),o=r(72971);let s=2n**256n-1n;function a(e){if(130!==e.length&&132!==e.length)throw new f({signature:e});let t=BigInt(i.di(e,0,32)),r=BigInt(i.di(e,32,64)),n=(()=>{let t=Number(`0x${e.slice(130)}`);if(!Number.isNaN(t))try{var r=t;if(0===r||27===r)return 0;if(1===r||28===r)return 1;if(r>=35)return+(r%2==0);throw new b({value:r})}catch{throw new h({value:t})}})();return void 0===n?{r:t,s:r}:{r:t,s:r,yParity:n}}function l(e){!function(e,t={}){let{recovered:r}=t;if(void 0===e.r||void 0===e.s||r&&void 0===e.yParity)throw new u({signature:e});if(e.r<0n||e.r>s)throw new c({value:e.r});if(e.s<0n||e.s>s)throw new d({value:e.s});if("number"==typeof e.yParity&&0!==e.yParity&&1!==e.yParity)throw new h({value:e.yParity})}(e);let t=e.r,r=e.s;return i.xW(i.oB(t,{size:32}),i.oB(r,{size:32}),"number"==typeof e.yParity?i.oB(function(e){if(0===e)return 27;if(1===e)return 28;throw new h({value:e})}(e.yParity),{size:1}):"0x")}class f extends n.C{constructor({signature:e}){super(`Value \`${e}
1\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${i.Ej(i.HT(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class u extends n.C{constructor({signature:e}){super(`Signature \`${o.A(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class c extends n.C{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class d extends n.C{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class h extends n.C{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class b extends n.C{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}},59878:(e,t,r)=>{r.d(t,{y:()=>i});let n=e=>{let t,r=new Set,n=(e,n)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=n?n:"object"!=typeof i||null===i)?i:Object.assign({},t,i),r.forEach(r=>r(t,e))}},i=()=>t,o={setState:n,getState:i,getInitialState:()=>s,subscribe:e=>(r.add(e),()=>r.delete(e))},s=t=e(n,i,o);return o},i=e=>e?n(e):n},72971:(e,t,r)=>{r.d(t,{A:()=>n});function n(e,t,r){return JSON.stringify(e,(e,r)=>"function"==typeof t?t(e,r):"bigint"==typeof r?r.toString()+"#__bigint":r,r)}},73296:(e,t,r)=>{function n(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var n;let i=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),o=null!=(n=r.getItem(e))?n:null;return o instanceof Promise?o.then(i):i(o)},setItem:(e,n)=>r.setItem(e,JSON.stringify(n,null==t?void 0:t.replacer)),removeItem:e=>r.removeItem(e)}}r.d(t,{KU:()=>n,Zr:()=>o});let i=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>i(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>i(t)(e)}}},o=(e,t)=>(r,o,s)=>{let a,l={storage:n(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},f=!1,u=new Set,c=new Set,d=l.storage;if(!d)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),r(...e)},o,s);let h=()=>{let e=l.partialize({...o()});return d.setItem(l.name,{state:e,version:l.version})},b=s.setState;s.setState=(e,t)=>{b(e,t),h()};let p=e((...e)=>{r(...e),h()},o,s);s.getInitialState=()=>p;let g=()=>{var e,t;if(!d)return;f=!1,u.forEach(e=>{var t;return e(null!=(t=o())?t:p)});let n=(null==(t=l.onRehydrateStorage)?void 0:t.call(l,null!=(e=o())?e:p))||void 0;return i(d.getItem.bind(d))(l.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===l.version)return[!1,e.state];else{if(l.migrate){let t=l.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[n,i]=e;if(r(a=l.merge(i,null!=(t=o())?t:p),!0),n)return h()}).then(()=>{null==n||n(a,void 0),a=o(),f=!0,c.forEach(e=>e(a))}).catch(e=>{null==n||n(void 0,e)})};return s.persist={setOptions:e=>{l={...l,...e},e.storage&&(d=e.storage)},clearStorage:()=>{null==d||d.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>g(),hasHydrated:()=>f,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},l.skipHydration||g(),a||p}},77560:(e,t,r)=>{r.d(t,{u:()=>y,ii:()=>x,HT:()=>f,ci:()=>u,aD:()=>c,Ej:()=>d,di:()=>h,Dg:()=>b,tf:()=>p});var n=r(94233),i=r(8386),o=r(72971);let s={zero:48,nine:57,A:65,F:70,a:97,f:102};function a(e){return e>=s.zero&&e<=s.nine?e-s.zero:e>=s.A&&e<=s.F?e-(s.A-10):e>=s.a&&e<=s.f?e-(s.a-10):void 0}var l=r(89726);function f(e){return e instanceof Uint8Array?e:"string"==typeof e?c(e):u(e)}function u(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function c(e,t={}){let{size:r}=t,o=e;r&&(l.Sl(e,r),o=i.M7(e,r));let s=o.slice(2);s.length%2&&(s=`0${s}`);let f=s.length/2,u=new Uint8Array(f);for(let e=0,t=0;e<f;e++){let r=a(s.charCodeAt(t++)),i=a(s.charCodeAt(t++));if(void 0===r||void 0===i)throw new n.C(`Invalid byte sequence ("${s[t-2]}${s[t-1]}" in "${s}").`);u[e]=16*r+i}return u}function d(e){return e.length}function h(e,t,r,n={}){let{strict:i}=n;if("number"==typeof t&&t>0&&t>d(e)-1)throw new x({offset:t,position:"start",size:d(e)});let o=e.slice(t,r);return i&&function(e,t,r){if("number"==typeof t&&"number"==typeof r&&d(e)!==r-t)throw new x({offset:r,position:"end",size:d(e)})}(o,t,r),o}function b(e,t={}){let{size:r}=t;void 0!==r&&function(e,t){if(d(e)>t)throw new y({givenSize:d(e),maxSize:t})}(e,r);let n=i.uK(e,t);return i.Dg(n,t)}function p(e){try{if(!(e instanceof Uint8Array)&&(!e||"object"!=typeof e||!("BYTES_PER_ELEMENT"in e)||1!==e.BYTES_PER_ELEMENT||"Uint8Array"!==e.constructor.name))throw new g(e);return!0}catch{return!1}}n.C;class g extends n.C{constructor(e){super(`Value \`${"object"==typeof e?o.A(e):e}\` of type \`${typeof e}
1\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}class y extends n.C{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class x extends n.C{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}}n.C},79951:(e,t,r)=>{r.d(t,{$:()=>n});function n(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n);else for(r in t)t[r]&&(i&&(i+=" "),i+=r);return i}(e))&&(n&&(n+=" "),n+=t);return n}},87447:(e,t,r)=>{r.d(t,{HT:()=>l,nj:()=>u});var n=r(77560),i=r(94233),o=r(8386),s=r(72971);function a(e,t={}){let{compressed:r}=t,{prefix:n,x:i,y:o}=e;if(!1===r||"bigint"==typeof i&&"bigint"==typeof o){if(4!==n)throw new d({prefix:n,cause:new b});return}if(!0===r||"bigint"==typeof i&&void 0===o){if(3!==n&&2!==n)throw new d({prefix:n,cause:new h});return}throw new c({publicKey:e})}function l(e){let t=(()=>{if(o.tf(e))return f(e);if(n.tf(e)){var t;return t=e,f(o.uK(t))}let{prefix:r,x:i,y:s}=e;return"bigint"==typeof i&&"bigint"==typeof s?{prefix:r??4,x:i,y:s}:{prefix:r,x:i}})();return a(t),t}function f(e){if(132!==e.length&&130!==e.length&&68!==e.length)throw new p({publicKey:e});if(130===e.length)return{prefix:4,x:BigInt(o.di(e,0,32)),y:BigInt(o.di(e,32,64))};if(132===e.length){let t=Number(o.di(e,0,1));return{prefix:t,x:BigInt(o.di(e,1,33)),y:BigInt(o.di(e,33,65))}}return{prefix:Number(o.di(e,0,1)),x:BigInt(o.di(e,1,33))}}function u(e,t={}){a(e);let{prefix:r,x:n,y:i}=e,{includePrefix:s=!0}=t;return o.xW(s?o.oB(r,{size:1}):"0x",o.oB(n,{size:32}),"bigint"==typeof i?o.oB(i,{size:32}):"0x")}class c extends i.C{constructor({publicKey:e}){super(`Value \`${s.A(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class d extends i.C{constructor({prefix:e,cause:t}){super(`Prefix "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class h extends i.C{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class b extends i.C{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}class p extends i.C{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${o.Ej(o.HT(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}},89692:(e,t,r)=>{r.d(t,{e_:()=>A});var n=r(77560);let i=new TextDecoder,o=Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[t,e.charCodeAt(0)]));({...Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[e.charCodeAt(0),t])),61:0,45:62,95:63});var s=r(94233);function a(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function l(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function f(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function u(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function c(e,t){return e<<32-t|e>>>t}function d(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}(e)),a(e),e}class h{}class b extends h{constructor(e,t,r,n){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.buffer=new Uint8Array(e),this.view=u(this.buffer)}update(e){l(this),a(e=d(e));let{view:t,buffer:r,blockLen:n}=this,i=e.length;for(let o=0;o<i;){let s=Math.min(n-this.pos,i-o);if(s===n){let t=u(e);for(;n<=i-o;o+=n)this.process(t,o);continue}r.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){l(this);a(e);let t=this.outputLen;if(e.length<t)throw Error("digestInto() expects output buffer of length at least "+t);this.finished=!0;let{buffer:r,view:n,blockLen:i,isLE:o}=this,{pos:s}=this;r[s++]=128,f(this.buffer.subarray(s)),this.padOffset>i-s&&(this.process(n,0),s=0);for(let e=s;e<i;e++)r[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),o=BigInt(0xffffffff),s=Number(r>>i&o),a=Number(r&o),l=4*!!n,f=4*!n;e.setUint32(t+l,s,n),e.setUint32(t+f,a,n)}(n,i-8,BigInt(8*this.length),o),this.process(n,0);let c=u(e),d=this.outputLen;if(d%4)throw Error("_sha2: outputLen should be aligned to 32bit");let h=d/4,b=this.get();if(h>b.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<h;e++)c.setUint32(4*e,b[e],o)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.destroyed=o,e.finished=i,e.length=n,e.pos=s,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}
1let p=Uint32Array.from([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),g=BigInt(0x100000000-1),y=BigInt(32),x=Uint32Array.from([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),m=new Uint32Array(64);class w extends b{constructor(e=32){super(64,e,8,!1),this.A=0|p[0],this.B=0|p[1],this.C=0|p[2],this.D=0|p[3],this.E=0|p[4],this.F=0|p[5],this.G=0|p[6],this.H=0|p[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)m[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=m[e-15],r=m[e-2],n=c(t,7)^c(t,18)^t>>>3,i=c(r,17)^c(r,19)^r>>>10;m[e]=i+m[e-7]+n+m[e-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:l,H:f}=this;for(let e=0;e<64;e++){var u,d,h,b;let t=f+(c(s,6)^c(s,11)^c(s,25))+((u=s)&a^~u&l)+x[e]+m[e]|0,p=(c(r,2)^c(r,13)^c(r,22))+((d=r)&(h=n)^d&(b=i)^h&b)|0;f=l,l=a,a=s,s=o+t|0,o=i,i=n,n=r,r=t+p|0}r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,l=l+this.G|0,f=f+this.H|0,this.set(r,n,i,o,s,a,l,f)}roundClean(){f(m)}destroy(){this.set(0,0,0,0,0,0,0,0),f(this.buffer)}}!function(e,t=!1){let r=e.length,n=new Uint32Array(r),i=new Uint32Array(r);for(let o=0;o<r;o++){let{h:r,l:s}=function(e,t=!1){return t?{h:Number(e&g),l:Number(e>>y&g)}:{h:0|Number(e>>y&g),l:0|Number(e&g)}}(e[o],t);[n[o],i[o]]=[r,s]}}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e3585
15771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e)));let v=function(e){let t=t=>e().update(d(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}(()=>new w);var E=r(8386);function B(e,t={}){let{as:r="string"==typeof e?"Hex":"Bytes"}=t,i=v(n.HT(e));return"Bytes"===r?i:E.uK(i)}function A(e){let{challenge:t,crossOrigin:r,extraClientData:s,flag:a,origin:l,rpId:f,signCount:u,userVerification:c="required"}=e,d=function(e={}){let{flag:t=5,rpId:r=window.location.hostname,signCount:n=0}=e,i=B(E.sH(r)),o=E.oB(t,{size:1}),s=E.oB(n,{size:4});return E.xW(i,o,s)}({flag:a,rpId:f,signCount:u}),h=function(e){let{challenge:t,crossOrigin:r=!1,extraClientData:s,origin:a=window.location.origin}=e;return JSON.stringify({type:"webauthn.get",challenge:function(e,t={}){return function(e,t={}){let{pad:r=!0,url:n=!1}=t,s=new Uint8Array(4*Math.ceil(e.length/3));for(let t=0,r=0;r<e.length;t+=4,r+=3){let n=(e[r]<<16)+(e[r+1]<<8)+(0|e[r+2]);s[t]=o[n>>18],s[t+1]=o[n>>12&63],s[t+2]=o[n>>6&63],s[t+3]=o[63&n]}let a=e.length%3,l=4*Math.floor(e.length/3)+(a&&a+1),f=i.decode(new Uint8Array(s.buffer,0,l));return r&&1===a&&(f+="=="),r&&2===a&&(f+="="),n&&(f=f.replaceAll("+","-").replaceAll("/","_")),f}(n.aD(e),t)}(t,{url:!0,pad:!1}),origin:a,crossOrigin:r,...s})}({challenge:t,crossOrigin:r,extraClientData:s,origin:l}),b=B(E.sH(h)),p=h.indexOf('"challenge"'),g=h.indexOf('"type"');return{metadata:{authenticatorData:d,clientDataJSON:h,challengeIndex:p,typeIndex:g,userVerificationRequired:"required"===c},payload:E.xW(d,b)}}Uint8Array.from([105,171,180,181,160,222,75,198,42,42,32,31,141,37,186,233]),s.C,s.C},89726:(e,t,r)=>{r.d(t,{Sl:()=>i,X:()=>s,eV:()=>a,kK:()=>o});var n=r(8386);function i(e,t){if(n.Ej(e)>t)throw new n.u({givenSize:n.Ej(e),maxSize:t})}function o(e,t){if("number"==typeof t&&t>0&&t>n.Ej(e)-1)throw new n.ii({offset:t,position:"start",size:n.Ej(e)})}function s(e,t,r){if("number"==typeof t&&"number"==typeof r&&n.Ej(e)!==r-t)throw new n.ii({offset:r,position:"end",size:n.Ej(e)})}function a(e,t={}){let{dir:r,size:i=32}=t;if(0===i)return e;let o=e.replace("0x","");if(o.length>2*i)throw new n.Fl({size:Math.ceil(o.length/2),targetSize:i,type:"Hex"});return`0x${o["right"===r?"padEnd":"padStart"](2*i,"0")}`}},91552:(e,t,r)=>{r.d(t,{Yz:()=>eH,_S:()=>ej});var n={};function i(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function o(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function s(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}r.r(n),r.d(n,{aK:()=>F,e8:()=>O,DO:()=>S,dJ:()=>k,OG:()=>M,My:()=>P,Ph:()=>N,lX:()=>_,Id:()=>q,fg:()=>Z,qj:()=>$,aT:()=>j,r4:()=>V,aY:()=>A,x:()=>Y,lq:()=>L,z:()=>R,zW:()=>z,Q5:()=>G});let a="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function l(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function f(e,t){return e<<32-t|e>>>t}function u(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}(e)),o(e),e}class c{clone(){return this._cloneInto()}}function d(e=32){if(a&&"function"==typeof a.getRandomValues)return a.getRandomValues(new Uint8Array(e));if(a&&"function"==typeof a.randomBytes)return a.randomBytes(e);throw Error("crypto.getRandomValues must be defined")}class h extends c{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=l(this.buffer)}update(e){s(this);let{view:t,buffer:r,blockLen:n}=this,i=(e=u(e)).length;for(let o=0;o<i;){let s=Math.min(n-this.pos,i-o);if(s===n){let t=l(e);for(;n<=i-o;o+=n)this.process(t,o);continue}r.set(e.subarray(o,o+s),this.pos),this.pos+=s,o+=s,this.pos===n&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){s(this);o(e);let t=this.outputLen;if(e.length<t)throw Error("digestInto() expects output buffer of length at least "+t);this.finished=!0;let{buffer:r,view:n,blockLen:i,isLE:a}=this,{pos:f}=this;r[f++]=128,this.buffer.subarray(f).fill(0),this.padOffset>i-f&&(this.process(n,0),f=0);for(let e=f;e<i;e++)r[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let i=BigInt(32),o=BigInt(0xffffffff),s=Number(r>>i&o),a=Number(r&o),l=4*!!n,f=4*!n;e.setUint32(t+l,s,n),e.setUint32(t+f,a,n)}(n,i-8,BigInt(8*this.length),a),this.process(n,0);let u=l(e),c=this.outputLen;if(c%4)throw Error("_sha2: outputLen should be aligned to 32bit");let d=c/4,h=this.get();if(d>h.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e<d;e++)u.setUint32(4*e,h[e],a)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}let b=new Uint32Array([0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc
176c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2]),p=new Uint32Array([0x6a09e667,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19]),g=new Uint32Array(64);class y extends h{constructor(){super(64,32,8,!1),this.A=0|p[0],this.B=0|p[1],this.C=0|p[2],this.D=0|p[3],this.E=0|p[4],this.F=0|p[5],this.G=0|p[6],this.H=0|p[7]}get(){let{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)g[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=g[e-15],r=g[e-2],n=f(t,7)^f(t,18)^t>>>3,i=f(r,17)^f(r,19)^r>>>10;g[e]=i+g[e-7]+n+g[e-16]|0}let{A:r,B:n,C:i,D:o,E:s,F:a,G:l,H:u}=this;for(let e=0;e<64;e++){var c,d,h,p;let t=u+(f(s,6)^f(s,11)^f(s,25))+((c=s)&a^~c&l)+b[e]+g[e]|0,y=(f(r,2)^f(r,13)^f(r,22))+((d=r)&(h=n)^d&(p=i)^h&p)|0;u=l,l=a,a=s,s=o+t|0,o=i,i=n,n=r,r=t+y|0}r=r+this.A|0,n=n+this.B|0,i=i+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(r,n,i,o,s,a,l,u)}roundClean(){g.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}let x=function(e){let t=t=>e().update(u(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}(()=>new y);class m extends c{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,function(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.wrapConstructor");i(e.outputLen),i(e.blockLen)}(e);let r=u(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?e.create().update(r).digest():r);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return s(this),this.iHash.update(e),this}digestInto(e){s(this),o(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}let w=(e,t,r)=>new m(e,t).update(r).digest();w.create=(e,t)=>new m(e,t);let v=BigInt(0),E=BigInt(1),B=BigInt(2);function A(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function S(e){if(!A(e))throw Error("Uint8Array expected")}function O(e,t){if("boolean"!=typeof t)throw Error(e+" boolean expected, got "+t)}let I=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function P(e){S(e);let t="";for(let r=0;r<e.length;r++)t+=I[e[r]];return t}function z(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function C(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?v:BigInt("0x"+e)}let U={_0:48,_9:57,A:65,F:70,a:97,f:102};function H(e){return e>=U._0&&e<=U._9?e-U._0:e>=U.A&&e<=U.F?e-(U.A-10):e>=U.a&&e<=U.f?e-(U.a-10):void 0}function j(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){let r=H(e.charCodeAt(i)),o=H(e.charCodeAt(i+1));if(void 0===r||void 0===o)throw Error('hex string expected, got non-hex character "'+(e[i]+e[i+1])+'" at index '+i);n[t]=16*r+o}return n}function N(e){return C(P(e))}function _(e){return S(e),C(P(Uint8Array.from(e).reverse()))}function L(e,t){return j(e.toString(16).padStart(2*t,"0"))}function R(e,t){return L(e,t).reverse()}function $(e,t,r){let n;if("string"==typeof t)try{n=j(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if(A(t))n=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let i=n.length;if("number"==typeof r&&i!==r)throw Error(e+" of length "+r+" expected, got "+i);return n}function q(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];S(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}let T=e=>"bigint"==typeof e&&v<=e;function V(e,t,r){return T(e)&&T(t)&&T(r)&&t<=e&&e<r}function F(e,t,r,n){if(!V(t,r,n))throw Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)}function k(e){let t;for(t=0;e>v;e>>=E,t+=1);return t}let M=e=>(B<<BigInt(e-1))-E,D=e=>new Uint8Array(e),K=e=>Uint8Array.from(e);function Z(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=D(e),i=D(e),o=0,s=()=>{n.fill(1),i.fill(0),o=0},a=(...e)=>r(i,n,...e),l=(e=D())=>{i=a(K([0]),e),n=a(),0!==e.length&&(i=a(K([1]),e),n=a())},f=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e<t;){let t=(n=a()).slice();r.push(t),e+=n.length}return q(...r)};return(e,t)=>{let r;for(s(),l(e);!(r=t(f()));)l();return s(),r}}let W={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||A(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function G(e,t,r={}){let n=(t,r,n)=>{let i=W[r];if("function"!=typeof i)throw Error("invalid validator function");let o=e[t];if((!n||void 0!==o)&&!i(o,e))throw Error("param "+String(t)+" is invali
1d. Expected "+r+", got "+o)};for(let[e,r]of Object.entries(t))n(e,r,!1);for(let[e,t]of Object.entries(r))n(e,t,!0);return e}function Y(e){let t=new WeakMap;return(r,...n)=>{let i=t.get(r);if(void 0!==i)return i;let o=e(r,...n);return t.set(r,o),o}}let J=BigInt(0),X=BigInt(1),Q=BigInt(2),ee=BigInt(3),et=BigInt(4),er=BigInt(5),en=BigInt(8);function ei(e,t){let r=e%t;return r>=J?r:t+r}function eo(e,t){if(e===J)throw Error("invert: expected non-zero number");if(t<=J)throw Error("invert: expected positive modulus, got "+t);let r=ei(e,t),n=t,i=J,o=X,s=X,a=J;for(;r!==J;){let e=n/r,t=n%r,l=i-s*e,f=o-a*e;n=r,r=t,i=s,o=a,s=l,a=f}if(n!==X)throw Error("invert: does not exist");return ei(i,t)}let es=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function ea(e,t){let r=void 0!==t?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function el(e,t,r=!1,n={}){let i;if(e<=J)throw Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:o,nByteLength:s}=ea(e,t);if(s>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let a=Object.freeze({ORDER:e,isLE:r,BITS:o,BYTES:s,MASK:M(o),ZERO:J,ONE:X,create:t=>ei(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return J<=t&&t<e},is0:e=>e===J,isOdd:e=>(e&X)===X,neg:t=>ei(-t,e),eql:(e,t)=>e===t,sqr:t=>ei(t*t,e),add:(t,r)=>ei(t+r,e),sub:(t,r)=>ei(t-r,e),mul:(t,r)=>ei(t*r,e),pow:(e,t)=>(function(e,t,r){if(r<J)throw Error("invalid exponent, negatives unsupported");if(r===J)return e.ONE;if(r===X)return t;let n=e.ONE,i=t;for(;r>J;)r&X&&(n=e.mul(n,i)),i=e.sqr(i),r>>=X;return n})(a,e,t),div:(t,r)=>ei(t*eo(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>eo(t,e),sqrt:n.sqrt||(t=>(i||(i=function(e){if(e%et===ee){let t=(e+X)/et;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}if(e%en===er){let t=(e-er)/en;return function(e,r){let n=e.mul(r,Q),i=e.pow(n,t),o=e.mul(r,i),s=e.mul(e.mul(o,Q),i),a=e.mul(o,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),r))throw Error("Cannot find square root");return a}}return function(e){let t,r,n,i=(e-X)/Q;for(t=e-X,r=0;t%Q===J;t/=Q,r++);for(n=Q;n<e&&function(e,t,r){if(t<J)throw Error("invalid exponent, negatives unsupported");if(r<=J)throw Error("invalid modulus");if(r===X)return J;let n=X;for(;t>J;)t&X&&(n=n*e%r),e=e*e%r,t>>=X;return n}(n,i,e)!==e-X;n++)if(n>1e3)throw Error("Cannot find square root: likely non-prime P");if(1===r){let t=(e+X)/et;return function(e,r){let n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw Error("Cannot find square root");return n}}let o=(t+X)/Q;return function(e,s){if(e.pow(s,i)===e.neg(e.ONE))throw Error("Cannot find square root");let a=r,l=e.pow(e.mul(e.ONE,n),t),f=e.pow(s,o),u=e.pow(s,t);for(;!e.eql(u,e.ONE);){if(e.eql(u,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(u);t<a&&!e.eql(r,e.ONE);t++)r=e.sqr(r);let r=e.pow(l,X<<BigInt(a-t-1));l=e.sqr(r),f=e.mul(f,r),u=e.mul(u,l),a=t}return f}}(e)}(e)),i(a,t))),invertBatch:e=>(function(e,t){let r=Array(t.length),n=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),i=e.inv(n);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),i),r})(a,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?R(e,s):L(e,s),fromBytes:e=>{if(e.length!==s)throw Error("Field.fromBytes: expected "+s+" bytes, got "+e.length);return r?_(e):N(e)}});return Object.freeze(a)}function ef(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function eu(e){let t=ef(e);return t+Math.ceil(t/2)}let ec=BigInt(0),ed=BigInt(1);function eh(e,t){let r=t.negate();return e?r:t}function eb(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function ep(e,t){return eb(e,t),{windows:Math.ceil(t/e)+1,windowSize:2**(e-1)}}let eg=new WeakMap,ey=new WeakMap;function ex(e){return ey.get(e)||1}function em(e){return G(e.Fp,es.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),G(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...ea(e.n,e.nBitLength),...e,...{p:e.Fp.ORDER}})}function ew(e){void 0!==e.lowS&&O("lowS",e.lowS),void 0!==e.prehash&&O("prehash",e.prehash)}let{Ph:ev,aT:eE}=n;
1class eB extends Error{constructor(e=""){super(e)}}let eA={Err:eB,_tlv:{encode:(e,t)=>{let{Err:r}=eA;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&t.length)throw new r("tlv.encode: unpadded data");let n=t.length/2,i=z(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let o=n>127?z(i.length/2|128):"";return z(e)+o+i+t},decode(e,t){let{Err:r}=eA,n=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[n++]!==e)throw new r("tlv.decode: wrong tlv");let i=t[n++],o=0;if(128&i){let e=127&i;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");let s=t.subarray(n,n+e);if(s.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===s[0])throw new r("tlv.decode(long): zero leftmost byte");for(let e of s)o=o<<8|e;if(n+=e,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=i;let s=t.subarray(n,n+o);if(s.length!==o)throw new r("tlv.decode: wrong value length");return{v:s,l:t.subarray(n+o)}}},_int:{encode(e){let{Err:t}=eA;if(e<eS)throw new t("integer: negative integers are not allowed");let r=z(e);if(8&Number.parseInt(r[0],16)&&(r="00"+r),1&r.length)throw new t("unexpected DER parsing assertion: unpadded hex");return r},decode(e){let{Err:t}=eA;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return ev(e)}},toSig(e){let{Err:t,_int:r,_tlv:n}=eA,i="string"==typeof e?eE(e):e;S(i);let{v:o,l:s}=n.decode(48,i);if(s.length)throw new t("invalid signature: left bytes after parsing");let{v:a,l:l}=n.decode(2,o),{v:f,l:u}=n.decode(2,l);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:r.decode(a),s:r.decode(f)}},hexFromSig(e){let{_tlv:t,_int:r}=eA,n=t.encode(2,r.encode(e.r)),i=t.encode(2,r.encode(e.s));return t.encode(48,n+i)}},eS=BigInt(0),eO=BigInt(1),eI=(BigInt(2),BigInt(3));BigInt(4);let eP=el(BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff")),ez=function(e,t){let r=t=>(function(e){let t=function(e){let t=em(e);return G(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n:n}=t,i=r.BYTES+1,o=2*r.BYTES+1;function s(e){return ei(e,n)}let{ProjectivePoint:a,normPrivateKeyToScalar:l,weierstrassEquation:f,isWithinCurveOrder:u}=function(e){var t;let r=function(e){let t=em(e);G(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:i}=t;if(r){if(!n.eql(i,n.ZERO))throw Error("invalid endomorphism, can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error("invalid endomorphism, expected beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:n}=r,i=el(r.n,r.nBitLength),o=r.toBytes||((e,t,r)=>{let i=t.toAffine();return q(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),s=r.fromBytes||(e=>{let t=e.subarray(1);return{x:n.fromBytes(t.subarray(0,n.BYTES)),y:n.fromBytes(t.subarray(n.BYTES,2*n.BYTES))}});function a(e){let{a:t,b:i}=r,o=n.sqr(e),s=n.mul(o,e);return n.add(n.add(s,n.mul(e,t)),i)}
1if(!n.eql(n.sqr(r.Gy),a(r.Gx)))throw Error("bad generator point: equation left != right");function l(e){let t,{allowedPrivateKeyLengths:n,nByteLength:i,wrapPrivateKey:o,n:s}=r;if(n&&"bigint"!=typeof e){if(A(e)&&(e=P(e)),"string"!=typeof e||!n.includes(e.length))throw Error("invalid private key");e=e.padStart(2*i,"0")}try{t="bigint"==typeof e?e:N($("private key",e,i))}catch(t){throw Error("invalid private key, expected hex or "+i+" bytes, got "+typeof e)}return o&&(t=ei(t,s)),F("private key",t,eO,s),t}function f(e){if(!(e instanceof d))throw Error("ProjectivePoint expected")}let u=Y((e,t)=>{let{px:r,py:i,pz:o}=e;if(n.eql(o,n.ONE))return{x:r,y:i};let s=e.is0();null==t&&(t=s?n.ONE:n.inv(o));let a=n.mul(r,t),l=n.mul(i,t),f=n.mul(o,t);if(s)return{x:n.ZERO,y:n.ZERO};if(!n.eql(f,n.ONE))throw Error("invZ was invalid");return{x:a,y:l}}),c=Y(e=>{if(e.is0()){if(r.allowInfinityPoint&&!n.is0(e.py))return;throw Error("bad point: ZERO")}let{x:t,y:i}=e.toAffine();if(!n.isValid(t)||!n.isValid(i))throw Error("bad point: x or y not FE");let o=n.sqr(i),s=a(t);if(!n.eql(o,s))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class d{constructor(e,t,r){if(this.px=e,this.py=t,this.pz=r,null==e||!n.isValid(e))throw Error("x required");if(null==t||!n.isValid(t))throw Error("y required");if(null==r||!n.isValid(r))throw Error("z required");Object.freeze(this)}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!n.isValid(t)||!n.isValid(r))throw Error("invalid affine point");if(e instanceof d)throw Error("projective point not allowed");let i=e=>n.eql(e,n.ZERO);return i(t)&&i(r)?d.ZERO:new d(t,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=n.invertBatch(e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(d.fromAffine)}static fromHex(e){let t=d.fromAffine(s($("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(l(e))}static msm(e,t){return function(e,t,r,n){if(!Array.isArray(r))throw Error("array expected");r.forEach((t,r)=>{if(!(t instanceof e))throw Error("invalid point at index "+r)});if(!Array.isArray(n))throw Error("array of scalars expected");if(n.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)}),r.length!==n.length)throw Error("arrays of points and scalars must have equal length");let i=e.ZERO,o=k(BigInt(r.length)),s=o>12?o-3:o>4?o-2:o?2:1,a=(1<<s)-1,l=Array(a+1).fill(i),f=Math.floor((t.BITS-1)/s)*s,u=i;for(let e=f;e>=0;e-=s){l.fill(i);for(let t=0;t<n.length;t++){let i=Number(n[t]>>BigInt(e)&BigInt(a));l[i]=l[i].add(r[t])}let t=i;for(let e=l.length-1,r=i;e>0;e--)r=r.add(l[e]),t=t.add(r);if(u=u.add(t),0!==e)for(let e=0;e<s;e++)u=u.double()}return u}(d,i,e,t)}_setWindowSize(e){b.setWindowSize(this,e)}assertValidity(){c(this)}hasEvenY(){let{y:e}=this.toAffine();if(n.isOdd)return!n.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){f(e);let{px:t,py:r,pz:i}=this,{px:o,py:s,pz:a}=e,l=n.eql(n.mul(t,a),n.mul(o,i)),u=n.eql(n.mul(r,a),n.mul(s,i));return l&&u}negate(){return new d(this.px,n.neg(this.py),this.pz)}double(){let{a:e,b:t}=r,i=n.mul(t,eI),{px:o,py:s,pz:a}=this,l=n.ZERO,f=n.ZERO,u=n.ZERO,c=n.mul(o,o),h=n.mul(s,s),b=n.mul(a,a),p=n.mul(o,s);return p=n.add(p,p),u=n.mul(o,a),u=n.add(u,u),l=n.mul(e,u),f=n.mul(i,b),f=n.add(l,f),l=n.sub(h,f),f=n.add(h,f),f=n.mul(l,f),l=n.mul(p,l),u=n.mul(i,u),b=n.mul(e,b),p=n.sub(c,b),p=n.mul(e,p),p=n.add(p,u),u=n.add(c,c),c=n.add(u,c),c=n.add(c,b),c=n.mul(c,p),f=n.add(f,c),b=n.mul(s,a),b=n.add(b,b),c=n.mul(b,p),l=n.sub(l,c),u=n.mul(b,h),u=n.add(u,u),new d(l,f,u=n.add(u,u))}add(e){f(e);let{px:t,py:i,pz:o}=this,{px:s,py:a,pz:l}
1=e,u=n.ZERO,c=n.ZERO,h=n.ZERO,b=r.a,p=n.mul(r.b,eI),g=n.mul(t,s),y=n.mul(i,a),x=n.mul(o,l),m=n.add(t,i),w=n.add(s,a);m=n.mul(m,w),w=n.add(g,y),m=n.sub(m,w),w=n.add(t,o);let v=n.add(s,l);return w=n.mul(w,v),v=n.add(g,x),w=n.sub(w,v),v=n.add(i,o),u=n.add(a,l),v=n.mul(v,u),u=n.add(y,x),v=n.sub(v,u),h=n.mul(b,w),u=n.mul(p,x),h=n.add(u,h),u=n.sub(y,h),h=n.add(y,h),c=n.mul(u,h),y=n.add(g,g),y=n.add(y,g),x=n.mul(b,x),w=n.mul(p,w),y=n.add(y,x),x=n.sub(g,x),x=n.mul(b,x),w=n.add(w,x),g=n.mul(y,w),c=n.add(c,g),g=n.mul(v,w),u=n.mul(m,u),u=n.sub(u,g),g=n.mul(m,y),h=n.mul(v,h),new d(u,c,h=n.add(h,g))}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return b.wNAFCached(this,e,d.normalizeZ)}multiplyUnsafe(e){let{endo:t,n:i}=r;F("scalar",e,eS,i);let o=d.ZERO;if(e===eS)return o;if(this.is0()||e===eO)return this;if(!t||b.hasPrecomputes(this))return b.wNAFCachedUnsafe(this,e,d.normalizeZ);let{k1neg:s,k1:a,k2neg:l,k2:f}=t.splitScalar(e),u=o,c=o,h=this;for(;a>eS||f>eS;)a&eO&&(u=u.add(h)),f&eO&&(c=c.add(h)),h=h.double(),a>>=eO,f>>=eO;return s&&(u=u.negate()),l&&(c=c.negate()),c=new d(n.mul(c.px,t.beta),c.py,c.pz),u.add(c)}multiply(e){let t,i,{endo:o,n:s}=r;if(F("scalar",e,eO,s),o){let{k1neg:r,k1:s,k2neg:a,k2:l}=o.splitScalar(e),{p:f,f:u}=this.wNAF(s),{p:c,f:h}=this.wNAF(l);f=b.constTimeNegate(r,f),c=b.constTimeNegate(a,c),c=new d(n.mul(c.px,o.beta),c.py,c.pz),t=f.add(c),i=u.add(h)}else{let{p:r,f:n}=this.wNAF(e);t=r,i=n}return d.normalizeZ([t,i])[0]}multiplyAndAddUnsafe(e,t,r){let n=d.BASE,i=(e,t)=>t!==eS&&t!==eO&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){return u(this,e)}isTorsionFree(){let{h:e,isTorsionFree:t}=r;if(e===eO)return!0;if(t)return t(d,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:t}=r;return e===eO?this:t?t(d,this):this.multiplyUnsafe(r.h)}toRawBytes(e=!0){return O("isCompressed",e),this.assertValidity(),o(d,this,e)}toHex(e=!0){return O("isCompressed",e),P(this.toRawBytes(e))}}d.BASE=new d(r.Gx,r.Gy,n.ONE),d.ZERO=new d(n.ZERO,n.ONE,n.ZERO);let h=r.nBitLength,b=(t=r.endo?Math.ceil(h/2):h,{constTimeNegate:eh,hasPrecomputes:e=>1!==ex(e),unsafeLadder(e,t,r=d.ZERO){let n=e;for(;t>ec;)t&ed&&(r=r.add(n)),n=n.double(),t>>=ed;return r},precomputeWindow(e,r){let{windows:n,windowSize:i}=ep(r,t),o=[],s=e,a=s;for(let e=0;e<n;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(e,r,n){let{windows:i,windowSize:o}=ep(e,t),s=d.ZERO,a=d.BASE,l=BigInt(2**e-1),f=2**e,u=BigInt(e);for(let e=0;e<i;e++){let t=e*o,i=Number(n&l);n>>=u,i>o&&(i-=f,n+=ed);let c=t+Math.abs(i)-1,d=e%2!=0,h=i<0;0===i?a=a.add(eh(d,r[t])):s=s.add(eh(h,r[c]))}return{p:s,f:a}},wNAFUnsafe(e,r,n,i=d.ZERO){let{windows:o,windowSize:s}=ep(e,t),a=BigInt(2**e-1),l=2**e,f=BigInt(e);for(let e=0;e<o;e++){let t=e*s;if(n===ec)break;let o=Number(n&a);if(n>>=f,o>s&&(o-=l,n+=ed),0===o)continue;let u=r[t+Math.abs(o)-1];o<0&&(u=u.negate()),i=i.add(u)}return i},getPrecomputes(e,t,r){let n=eg.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&eg.set(t,r(n))),n},wNAFCached(e,t,r){let n=ex(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)},wNAFCachedUnsafe(e,t,r,n){let i=ex(e);return 1===i?this.unsafeLadder(e,t,n):this.wNAFUnsafe(i,this.getPrecomputes(i,e,r),t,n)},setWindowSize(e,r){eb(r,t),ey.set(e,r),eg.delete(e)}});return{CURVE:r,ProjectivePoint:d,normPrivateKeyToScalar:l,weierstrassEquation:a,isWithinCurveOrder:function(e){return V(e,eO,r.n)}}}({...t,toBytes(e,t,n){let i=t.toAffine(),o=r.toBytes(i.x),s=q;return(O("isCompressed",n),n)?s(Uint8Array.from([t.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,r.toBytes(i.y))},fromBytes(e){let t=e.length,n=e[0],s=e.subarray(1);if(t===i&&(2===n||3===n)){let e,t=N(s);if(!V(t,eO,r.ORDER))throw Error("Point is not on curve");let i=f(t);try{e=r.sqrt(i)}catch(e){throw Error("Point is not on curve"+(e instanceof Error?": "+e.message:""))}return(1&n)==1!=((e&eO)===eO)&&(e=r.neg(e)),{x:t,y:e}}if(t===o&&4===n)return{x:r.fromBytes(s.subarray(0,r.BYTES)),y:r.fromBytes(s.subarray(r.BYTES,2*r.BYTES))};throw Error("invalid Point, expected length of "+i+", or uncompressed "+o+", got "+t)}}),c=e=>P(L(e,t.nByteLength)),d=(e,t,r)=>N(e.slice(t,r));class h{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){let r=t.nByteLength;return new h(d(e=$("compactSignature",e,2*r),0,r),d(e,r,2*r))}static fromDER(e){let{r:t,s:r}=eA.toSig($("DER",e));return new h(t,r)}assertValidity(){F("r",this.r,eO,n),F("s",this.s,eO,n)}addRecoveryBit(e){return new h(this.r,this.s,e)}recoverPublicKey(e){let{r:i,s:o,recovery:l}=this,f=g($("msgHash",e));if(null==l||![0,1,2,3].includes(l))throw Error("recovery id invalid");let u=2===l||3===l?i+t.n:i;if(u>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let d=(1&l)==0?"02":"03",h=a.fromHex(d+c(u)),b=eo(u,n),p=s(-f*b),y=s(o*b),x=a.BASE.multiplyAndAddUnsafe(h,p,y);if(!x)throw Error("point at infinify");return x.assertValidity(),x}hasHighS(){return this.s>n>>eO}normalizeS(){return this.hasHighS()?new h(this.r,s(-this.s),this.recovery):this}toDERRawBytes(){return j(this.toDERHex())}toDERHex(){return eA.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return j(this.toCompactHex())}toCompactHex(){return c(this.r)+c(this.s)}}function b(e){let t=A(e),r="string"==typeof e,n=(t||r)&&e.length;return t?n===i||n===o:r?n===2*i||n===2*o:e instanceof a}let p=t.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let r=N(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},g=t.bits2int_modN||function(e){return s(p(e))},y=M(t.nBitLength);function x(e){return F("num < 2^"+t.nBitLength,e,eS,y),L(e,t.nByteLength)}let m={lowS:t.lowS,prehash:!1},w={lowS:t.lowS,prehash:!1};return a.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return a.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(b(e))throw Error("first arg must be private key");if(!b(t))throw Error("second arg must be public key");return a.fromHex(t).multiply(l(e)).toRawBytes(r)},sign:function(e,i,o=m){let{seed:f,k2sig:c}=function(e,i,o=m){if(["recovered","canonical"].some(e=>e in o))throw Error("sign() legacy options not supported");let{hash:f,randomBytes:c}=t,{lowS:d,prehash:b,extraEntropy:y}=o;null==d&&(d=!0),e=$("msgHash",e),ew(o),b&&(e=$("prehashed msgHash",f(e)));let w=g(e),v=l(i),E=[x(v),x(w)];if(null!=y&&!1!==y){let e=!0===y?c(r.BYTES):y;E.push($("extraEntropy",e))}return{seed:q(...E),k2sig:function(e){var t;let r=p(e);if(!u(r))return;let i=eo(r,n),o=a.BASE.multiply(r).toAffine(),l=s(o.x);if(l===eS)return;let f=s(i*s(w+l*v));if(f===eS)return;let c=2*(o.x!==l)|Number(o.y&eO),b=f;return d&&f>n>>eO&&(b=(t=f)>n>>eO?s(-t):t,c^=1),new h(l,b,c)}}}(e,i,o);return Z(t.hash.outputLen,t.nByteLength,t.hmac)(f,c)},verify:function(e,r,i,o=w){let l,f;r=$("msgHash",r),i=$("publicKey",i);let{lowS:u,prehash:c,format:d}=o;if(ew(o),"strict"in o)throw Error("options.strict was renamed to lowS");if(void 0!==d&&"compact"!==d&&"der"!==d)throw Error("format must be compact or der");let b="string"==typeof e||A(e),p=!b&&!d&&"object"==typeof e&&null!==e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!b&&!p)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(p&&(f=new h(e.r,e.s)),b){try{"compact"!==d&&(f=h.fromDER(e))}catch(e){if(!(e instanceof eA.Err))throw e}f||"der"===d||(f=h.fromCompact(e))}l=a.fromHex(i)}catch(e){return!1}if(!f||u&&f.hasHighS())return!1;c&&(r=t.hash(r));let{r:y,s:x}=f,m=g(r),v=eo(x,n),E=s(m*v),B=s(y*v),S=a.BASE.multiplyAndAddUnsafe(l,E,B)?.toAffine();return!!S&&s(S.x)===y},ProjectivePoint:a,Signature:h,utils:{isValidPrivateKey(e){try{return l(e),!0}catch(e){return!1}},normPrivateKeyToScalar:l,randomPrivateKey:()=>{let e=eu(t.n);return function(e,t,r=!1){let n=e.length,i=ef(t),o=eu(t);if(n<16||n<o||n>1024)throw Error("expected "+o+"-1024 bytes of input, got "+n);let s=ei(r?_(e):N(e),t-X)+X;return r?R(s,i):L(s,i)}(t.randomBytes(e),t.n)},precompute:(e=8,t=a.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}})({...e,hash:t,hmac:(e,...r)=>w(t,e,function(...e){let t=0;for(let r=0;r<e.length;r++){let n=e[r];o(n),t+=n.length}let r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){let i=e[t];r.set(i,n),n+=i.length}return r}(...r)),randomBytes:d});return{...r(t),create:r}}({a:eP.create(BigInt("-3")),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Fp:eP,n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),G
1y:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),h:BigInt(1),lowS:!1},x);var eC=r(77560),eU=r(87447);async function eH(e={}){let{extractable:t=!1}=e,r=await globalThis.crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},t,["sign","verify"]),n=await globalThis.crypto.subtle.exportKey("raw",r.publicKey),i=eU.HT(new Uint8Array(n));return{privateKey:r.privateKey,publicKey:i}}async function ej(e){let{payload:t,privateKey:r}=e,n=await globalThis.crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},r,eC.HT(t)),i=eC.ci(new Uint8Array(n)),o=eC.Dg(eC.di(i,0,32)),s=eC.Dg(eC.di(i,32,64));return s>ez.CURVE.n/2n&&(s=ez.CURVE.n-s),{r:o,s}}},94233:(e,t,r)=>{r.d(t,{C:()=>n});class n extends Error{constructor(e,t={}){let r=(()=>{if(t.cause instanceof n){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause?.message?t.cause.message:t.details})(),i=t.cause instanceof n&&t.cause.docsPath||t.docsPath,o=`https://oxlib.sh${i??""}`;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...r||i?["",r?`Details: ${r}`:void 0,i?`See: ${o}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"[email protected]"}),this.cause=t.cause,this.details=r,this.docs=o,this.docsPath=i,this.shortMessage=e}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,r):r?null:t}(this,e)}}},97787:(e,t,r)=>{r.d(t,{b:()=>n});var n=r(31356)}}]);

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.