import{t as e}from"./chunk-mlkTr37E.js";var t=e(((e,t)=>{(function(e){var n={bytesToHex:function(e){return r(e)},hexToBytes:function(e){if(e.length%2==1)throw Error(`hexToBytes can't have a string with an odd number of characters.`);return e.indexOf(`0x`)===0&&(e=e.slice(2)),e.match(/../g).map(function(e){return parseInt(e,16)})}};function r(e){return e.map(function(e){return i(e.toString(16),2)}).join(``)}function i(e,t){return e.length>t?e:Array(t-e.length+1).join(`0`)+e}t!==void 0&&t.exports?t.exports=n:e.convertHex=n})(e)})),n=e(((e,t)=>{(function(e){var n={bytesToString:function(e){return e.map(function(e){return String.fromCharCode(e)}).join(``)},stringToBytes:function(e){return e.split(``).map(function(e){return e.charCodeAt(0)})}};n.UTF8={bytesToString:function(e){return decodeURIComponent(escape(n.bytesToString(e)))},stringToBytes:function(e){return n.stringToBytes(unescape(encodeURIComponent(e)))}},t!==void 0&&t.exports?t.exports=n:e.convertString=n})(e)})),r=e(((e,r)=>{(function(e){var i={};r!==void 0&&r.exports?(i.bytesToHex=t().bytesToHex,i.convertString=n(),r.exports=u):(i.bytesToHex=e.convertHex.bytesToHex,i.convertString=e.convertString,e.sha256=u);var a=[];(function(){function e(e){for(var t=Math.sqrt(e),n=2;n<=t;n++)if(!(e%n))return!1;return!0}function t(e){return(e-(e|0))*4294967296|0}for(var n=2,r=0;r<64;)e(n)&&(a[r]=t(n**(1/3)),r++),n++})();var o=function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},s=function(e){for(var t=[],n=0;n<e.length*32;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},c=[],l=function(e,t,n){for(var r=e[0],i=e[1],o=e[2],s=e[3],l=e[4],u=e[5],d=e[6],f=e[7],p=0;p<64;p++){if(p<16)c[p]=t[n+p]|0;else{var m=c[p-15],h=(m<<25|m>>>7)^(m<<14|m>>>18)^m>>>3,g=c[p-2],_=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[p]=h+c[p-7]+_+c[p-16]}var v=l&u^~l&d,y=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),x=(l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25),S=f+x+v+a[p]+c[p],C=b+y;f=d,d=u,u=l,l=s+S|0,s=o,o=i,i=r,r=S+C|0}e[0]=e[0]+r|0,e[1]=e[1]+i|0,e[2]=e[2]+o|0,e[3]=e[3]+s|0,e[4]=e[4]+l|0,e[5]=e[5]+u|0,e[6]=e[6]+d|0,e[7]=e[7]+f|0};function u(e,t){e.constructor===String&&(e=i.convertString.UTF8.stringToBytes(e));var n=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],r=o(e),a=e.length*8;r[a>>5]|=128<<24-a%32,r[(a+64>>9<<4)+15]=a;for(var c=0;c<r.length;c+=16)l(n,r,c);var u=s(n);return t&&t.asBytes?u:t&&t.asString?i.convertString.bytesToString(u):i.bytesToHex(u)}u.x2=function(e,t){return u(u(e,{asBytes:!0}),t)}})(e)}));export{r as t};