lete={};constt=window;null==t._ethers?console.log("WARNING: @ethersproject/hardware-wallet requires ethers loaded first"):e=t._ethers;varr="undefined"!=typeofglobal?global:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{},n=[],o=[],i="undefined"!=typeofUint8Array?Uint8Array:Array,s=!1;functiona(){s=!0;for(vare="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t<r;++t)n[t]=e[t],o[e.charCodeAt(t)]=t;o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63}functionu(e,t,r){for(varo,i,s=[],a=t;a<r;a+=3)o=(e[a]<<16)+(e[a+1]<<8)+e[a+2],s.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);returns.join("")}functionh(e){vart;s||a();for(varr=e.length,o=r%3,i="",h=[],f=0,c=r-o;f<c;f+=16383)h.push(u(e,f,f+16383>c?c:f+16383));return1===o?(t=e[r-1],i+=n[t>>2],i+=n[t<<4&63],i+="=="):2===o&&(t=(e[r-2]<<8)+e[r-1],i+=n[t>>10],i+=n[t>>4&63],i+=n[t<<2&63],i+="="),h.push(i),h.join("")}functionf(e,t,r,n,o){vari,s,a=8*o-n-1,u=(1<<a)-1,h=u>>1,f=-7,c=r?o-1:0,l=r?-1:1,p=e[t+c];for(c+=l,i=p&(1<<-f)-1,p>>=-f,f+=a;f>0;i=256*i+e[t+c],c+=l,f-=8);for(s=i&(1<<-f)-1,i>>=-f,f+=n;f>0;s=256*s+e[t+c],c+=l,f-=8);if(0===i)i=1-h;else{if(i===u)returns?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),i-=h}return(p?-1:1)*s*Math.pow(2,i-n)}functionc(e,t,r,n,o,i){vars,a,u,h=8*i-o-1,f=(1<<h)-1,c=f>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=f?(a=0,s=f):s+c>=1?(a=(t*u-1)*Math.pow(2,o),s+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,o),s=0));o>=8;e[r+p]=255&a,p+=d,a/=256,o-=8);for(s=s<<o|a,h+=o;h>0;e[r+p]=255&s,p+=d,s/=256,h-=8);e[r+p-d]|=128*g}varl={}.toString,p=Array.isArray||function(e){return"[object Array]"==l.call(e)};v.TYPED_ARRAY_SUPPORT=void0===r.TYPED_ARRAY_SUPPORT||r.TYPED_ARRAY_SUPPORT;d();functiond(){returnv.TYPED_ARRAY_SUPPORT?2147483647:1073741823}functiong(e,t){if(d()<t)thrownewRangeError("Invalid typed array length");returnv.TYPED_ARRAY_SUPPORT?(e=newUint8Array(t)).__proto__=v.prototype:(null===e&&(e=newv(t)),e.length=t),e}functionv(e,t,r){if(!(v.TYPED_ARRAY_SUPPORT||thisinstanceofv))returnnewv(e,t,r);if("number"==typeofe){if("string"==typeoft)thrownewError("If encoding is specified then the first argument must be a string");returnw(this,e)}returny(this,e,t,r)}functiony(e,t,r,n){if("number"==typeoft)thrownewTypeError('"value" argument must not be a number');return"undefined"!=typeofArrayBuffer&&tinstanceofArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)thrownewRangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))thrownewRangeError("'length' is out of bounds");t=void0===r&&void0===n?newUint8Array(t):void0===n?newUint8Array(t,r):newUint8Array(t,r,n);v.TYPED_ARRAY_SUPPORT?(e=t).__proto__=v.prototype:e=m(e,t);returne}(e,t,r,n):"string"==typeoft?function(e,t,r){"string"==typeofr&&""!==r||(r="utf8");if(!v.isEncoding(r))thrownewTypeError('"encoding" must be a valid string encoding');varn=0|A(t,r),o=(e=g(e,n)).write(t,r);o!==n&&(e=e.slice(0,o));returne}(e,t,r):function(e,t){if(T(t)){varr=0|_(t.length);return0===(e=g(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeofArrayBuffer&&t.bufferinstanceofArrayBuffer||"length"int)return"number"!=typeoft.length||(n=t.length)!=n?g(e,0):m(e,t);if("Buffer"===t.type&&p(t.data))returnm(e,t.data)}varn;thrownewTypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}functionE(e){if("number"!=typeofe)thrownewTypeError('"size" argument must be a number');if(e<0)thrownewRangeError('"size" argument must not be negative')}functionw(e,t){if(E(t),e=g(e,t<0?0:0|_(t)),!v.TYPED_ARRAY_SUPPORT)for(varr=0;r<t;++r)e[r]=0;returne}functionm(e,t){varr=t.length<0?0:0|_(t.length);e=g(e,r);for(varn=0;n<r;n+=1)e[n]=255&t[n];returne}function_(e){if(e>=d())thrownewRangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d()