import{__require as r}from"./global-this.mjs";import{__require as e}from"./function-uncurry-this.mjs";var n,t;function a(){if(t)return n;t=1;var a=r(),i=e(),o=a.Uint8Array,s=a.SyntaxError,u=a.parseInt,h=Math.min,c=/[^\da-f]/i,f=i(c.exec),l=i("".slice);return n=function(r,e){var n=r.length;if(n%2!=0)throw new s("String should be an even number of characters");for(var t=e?h(e.length,n/2):n/2,a=e||new o(t),i=0,m=0;m<t;){var v=l(r,i,i+=2);if(f(c,v))throw new s("String should only contain hex characters");a[m++]=u(v,16)}return{bytes:a,read:i}}}export{a as __require};