1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1555],{24967:(t,e,r)=>{"use strict";r.d(e,{PeraWalletConnect:()=>n.k});var n=r(31030);r(54615),r(79142),r(12389)},31030:(t,e,r)=>{"use strict";r.d(e,{P:()=>Z,a:()=>tb,b:()=>tw,c:()=>tg,d:()=>tv,e:()=>tm,f:()=>te,g:()=>V,h:()=>Q,i:()=>ty,j:()=>tt,k:()=>tT,r:()=>to});var n=r(54615),i=r(79142),o=r(12389),a=r(83123).hp,s="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},l=[],u=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,f=!1;function h(){f=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)l[e]=t[e],u[t.charCodeAt(e)]=e;u[45]=62,u[95]=63}function d(t){var e;f||h();for(var r=t.length,n=r%3,i="",o=[],a=0,s=r-n;a<s;a+=16383)o.push(function(t,e,r){for(var n,i=[],o=e;o<r;o+=3)i.push(l[(n=(t[o]<<16)+(t[o+1]<<8)+t[o+2])>>18&63]+l[n>>12&63]+l[n>>6&63]+l[63&n]);return i.join("")}(t,a,a+16383>s?s:a+16383));return 1===n?(i+=l[(e=t[r-1])>>2],i+=l[e<<4&63],i+="=="):2===n&&(i+=l[(e=(t[r-2]<<8)+t[r-1])>>10],i+=l[e>>4&63],i+=l[e<<2&63],i+="="),o.push(i),o.join("")}function p(t,e,r,n,i){var o,a,s=8*i-n-1,l=(1<<s)-1,u=l>>1,c=-7,f=r?i-1:0,h=r?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+t[e+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+f],f+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=u}return(d?-1:1)*a*Math.pow(2,o-n)}function g(t,e,r,n,i,o){var a,s,l,u=8*o-i-1,c=(1<<u)-1,f=c>>1,h=5960464477539062e-23*(23===i),d=n?0:o-1,p=n?1:-1,g=+(e<0||0===e&&1/e<0);for(isNaN(e=Math.abs(e))||e===1/0?(s=+!!isNaN(e),a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(a++,l/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(e*l-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;t[r+d]=255&a,d+=p,a/=256,u-=8);t[r+d-p]|=128*g}var w={}.toString,y=Array.isArray||function(t){return"[object Array]"==w.call(t)};function v(){return b.TYPED_ARRAY_SUPPORT?0x7fffffff:0x3fffffff}function m(t,e){if(v()<e)throw RangeError("Invalid typed array length");return b.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=b.prototype:(null===t&&(t=new b(e)),t.length=e),t}function b(t,e,r){if(!(b.TYPED_ARRAY_SUPPORT||this instanceof b))return new b(t,e,r);if("number"==typeof t){if("string"==typeof e)throw Error("If encoding is specified then the first argument must be a string");return T(this,t)}return A(this,t,e,r)}function A(t,e,r,n){if("number"==typeof e)throw TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw RangeError("'length' is out of bounds");return e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),b.TYPED_ARRAY_SUPPORT?(t=e).__proto__=b.prototype:t=_(t,e),t}(t,e,r,n):"string"==typeof e?function(t,e,r){if("string"==typeof r&&""!==r||(r="utf8"),!b.isEncoding(r))throw TypeError('"encoding" must be a valid string encoding');var n=0|N(e,r),i=(t=m(t,n)).write(e,r);return i!==n&&(t=t.slice(0,i)),t}(t,e,r):function(t,e){if(S(e)){var r,n=0|R(e.length);return 0===(t=m(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?m(t,0):_(t,e);if("Buffer"===e.type&&y(e.data))return _(t,e.data)}throw TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function E(t){if("number"!=typeof t)throw TypeError('"size" argument must be a number');if(t<0)throw RangeError('"size" argument must not be negative')}function T(t,e){if(E(e),t=m(t,e<0?0:0|R(e)),!b.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function _(t,e){var r=e.length<0?0:0|R(e.length);t=m(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function R(t){if(t>=v())throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+v().toString(16)+" bytes");return 0|t}function S(t){return!(null==t||!t._isBuffer)}function N(t,e){if(S(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&
vendor: 11,976 bytes, line 1
1(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(t).length;default:if(n)return G(t).length;e=(""+e).toLowerCase(),n=!0}}function C(t,e,r){var n,i,o,a=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){var n,i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var o="",a=e;a<r;++a){o+=(n=t[a])<16?"0"+n.toString(16):n.toString(16)}return o}(this,e,r);case"utf8":case"utf-8":return U(this,e,r);case"ascii":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}(this,e,r);case"latin1":case"binary":return function(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}(this,e,r);case"base64":return n=this,i=e,o=r,0===i&&o===n.length?d(n):d(n.slice(i,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}(this,e,r);default:if(a)throw TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),a=!0}}function I(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function P(t,e,r,n,i){if(0===t.length)return -1;if("string"==typeof r?(n=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),isNaN(r*=1)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=b.from(e,n)),S(e))return 0===e.length?-1:O(t,e,r,n,i);if("number"==typeof e)return e&=255,b.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):O(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function O(t,e,r,n,i){var o,a=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;a=2,s/=2,l/=2,r/=2}function u(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=r;o<s;o++)if(u(t,o)===u(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===l)return c*a}else -1!==c&&(o-=o-c),c=-1}else for(r+l>s&&(r=s-l),o=r;o>=0;o--){for(var f=!0,h=0;h<l;h++)if(u(t,o+h)!==u(e,h)){f=!1;break}if(f)return o}return -1}function L(t,e,r,n){return z(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function U(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,l,u=t[i],c=null,f=u>239?4:u>223?3:u>191?2:1;if(i+f<=r)switch(f){case 1:u<128&&(c=u);break;case 2:128==(192&(o=t[i+1]))&&(l=(31&u)<<6|63&o)>127&&(c=l);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(l=(15&u)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}var h=n.length;if(h<=M)return String.fromCharCode.apply(String,n);for(var d="",p=0;p<h;)d+=String.fromCharCode.apply(String,n.slice(p,p+=M));return d}b.TYPED_ARRAY_SUPPORT=void 0===s.TYPED_ARRAY_SUPPORT||s.TYPED_ARRAY_SUPPORT,v(),b.poolSize=8192,b._augment=function(t){return t.__proto__=b.prototype,t},b.from=function(t,e,r){return A(null,t,e,r)},b.TYPED_ARRAY_SUPPORT&&(b.prototype.__proto__=Uint8Array.prototype,b.__proto__=Uint8Array),b.alloc=function(t,e,r){return E(t),t<=0?m(null,t):void 0!==e?"string"==typeof r?m(null,t).fill(e,r):m(null,t).fill(e):m(null,t)},b.allocUnsafe=function(t){return T(null,t)},b.allocUnsafeSlow=function(t){return T(null,t)},b.isBuffer=function(t){return null!=t&&(!!t._isBuffer||F(t)||"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&F(t.slice(0,0)))},b.compare=function(t,e){if(!S(t)||!S(e))throw TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:+(n<r)},b.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},b.concat=function(t,e){if(!y(t))throw TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return b.alloc(0);if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var r,n=b.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(!S(o))throw TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},b.byteLength=N,b.prototype._isBuffer=!0,b.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)I(this,e,e+1);return this},b.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)I(this,e,e+3),I(this,e+1,e+2);return this},b.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)I(this,e,e+7),I(this,e+1,e+6),I(this,e+2,e+5),I(this,e+3,e+4);return this},b.prototype.toString=function(){var t=0|this.length;return 0===t?"":0==arguments.length?U(this,0,t):C.apply(this,arguments)},b.prototype.equals=function(t){if(!S(t))throw TypeError("Argument must be a Buffer");return this===t||0===b.compare(this,t)},b.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},b.prototype.compare=function(t,e,r,n,i){if(!S(t))throw TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),l=this.slice(n,i),u=t.slice(e,r),c=0;c<s;++c)if(l[c]!==u[c]){o=l[c],a=u[c];break}return o<a?-1:+(a<o)},b.prototype.includes=function(t,e,r){return -1!==this.indexOf(t,e,r)},b.prototype.indexOf=function(t,e,r){return P(this,t,e,r,!0)},b.prototype.lastIndexOf=function(t,e,r){return P(this,t,e,r,!1)},b.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i,o,a,s,l,u,c=this.length-e;if((void 0===r||r>c)&&(r=c),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var f=!1;;)switch(n){case"hex":return function(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))break;t[r+a]=s}return a}(this,t,e,r);case"utf8":case"utf-8":return i=e,o=r,z(G(t,this.length-i),this,i,o);case"ascii":case"latin1":case"binary":return L(this,t,e,r);case"base64":return a=e,s=r,z(q(t),this,a,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l=e,u=r,z(function(t,e){for(var r,n,i=[],o=0;o<t.length&&!((e-=2)<0);++o)n=(r=t.charCodeAt(o))>>8,i.push(r%256),i.push(n);return i}(t,this.length-l),this,l,u);default:if(f)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var M=4096;function B(t,e,r){if(t%1!=0||t<0)throw RangeError("offset is not uint");if(t+e>r)throw RangeError("Trying to access beyond buffer length")}function W(t,e,r,n,i,o){if(!S(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw RangeError('"value" argument is out of bounds');if(r+n>t.length)throw RangeError("Index out of range")}function D(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function x(t,e,r,n){e<0&&(e=0xffffffff+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function Y(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function k(t,e,r,n,i){return i||Y(t,0,r,4),g(t,e,r,n,23,4),r+4}function j(t,e,r,n,i){return i||Y(t,0,r,8),g(t,e,r,n,52,8),r+8}b.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),b.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=b.prototype;else{var i=e-t;r=new b(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},b.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||B(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},b.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||B(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},b.prototype.readUInt8=function(t,e){return e||B(t,1,this.length),this[t]},b.prototype.readUInt16LE=function(t,e){return e||B(t,2,this.length),this[t]|this[t+1]<<8},b.prototype.readUInt16BE=function(t,e){return e||B(t,2,this.length),this[t]<<8|this[t+1]},b.prototype.readUInt32LE=function(t,e){return e||B(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+0x1000000*this[t+3]},b.prototype.readUInt32BE=function(t,e){return e||B(t,4,this.length),0x1000000*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},b.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||B(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},b.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||B(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},b.prototype.readInt8=function(t,e){return e||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},b.prototype.readInt16LE=function(t,e){e||B(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?0xffff0000|r:r},b.prototype.readInt16BE=function(t,e){e||B(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?0xffff0000|r:r},b.prototype.readInt32LE=function(t,e){return e||B(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},b.prototype.readInt32BE=function(t,e){return e||B(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},b.prototype.readFloatLE=function(t,e){return e||B(t,4,this.length),p(this,t,!0,23,4)},b.prototype.readFloatBE=function(t,e){return e||B(t,4,this.length),p(this,t,!1,23,4)},b.prototype.readDoubleLE=function(t,e){return e||B(t,8,this.length),p(this,t,!0,52,8)},b.prototype.readDoubleBE=function(t,e){return e||B(t,8,this.length),p(this,t,!1,52,8)},b.prototype.writeUIntLE=function(t,e,r,n){t*=1,e|=0,r|=0,n||W(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},b.prototype.writeUIntBE=function(t,e,r,n){t*=1,e|=0,r|=0,n||W(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},b.prototype.writeUInt8=function(t,e,r){return t*=1,e|=0,r||W(this,t,e,1,255,0),b.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},b.prototype.writeUInt16LE=function(t,e,r){return t*=1,e|=0,r||W(this,t,e,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},b.prototype.writeUInt16BE=function(t,e,r){return t*=1,e|=0,r||W(this,t,e,2,65535,0),b.TYPED_ARRAY_SUPPORT?(this[e]=t>>>
18,this[e+1]=255&t):D(this,t,e,!1),e+2},b.prototype.writeUInt32LE=function(t,e,r){return t*=1,e|=0,r||W(this,t,e,4,0xffffffff,0),b.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):x(this,t,e,!0),e+4},b.prototype.writeUInt32BE=function(t,e,r){return t*=1,e|=0,r||W(this,t,e,4,0xffffffff,0),b.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):x(this,t,e,!1),e+4},b.prototype.writeIntLE=function(t,e,r,n){if(t*=1,e|=0,!n){var i=Math.pow(2,8*r-1);W(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a|0)-s&255;return e+r},b.prototype.writeIntBE=function(t,e,r,n){if(t*=1,e|=0,!n){var i=Math.pow(2,8*r-1);W(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a|0)-s&255;return e+r},b.prototype.writeInt8=function(t,e,r){return t*=1,e|=0,r||W(this,t,e,1,127,-128),b.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},b.prototype.writeInt16LE=function(t,e,r){return t*=1,e|=0,r||W(this,t,e,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},b.prototype.writeInt16BE=function(t,e,r){return t*=1,e|=0,r||W(this,t,e,2,32767,-32768),b.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},b.prototype.writeInt32LE=function(t,e,r){return t*=1,e|=0,r||W(this,t,e,4,0x7fffffff,-0x80000000),b.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):x(this,t,e,!0),e+4},b.prototype.writeInt32BE=function(t,e,r){return t*=1,e|=0,r||W(this,t,e,4,0x7fffffff,-0x80000000),t<0&&(t=0xffffffff+t+1),b.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):x(this,t,e,!1),e+4},b.prototype.writeFloatLE=function(t,e,r){return k(this,t,e,!0,r)},b.prototype.writeFloatBE=function(t,e,r){return k(this,t,e,!1,r)},b.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},b.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},b.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("sourceStart out of bounds");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!b.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},b.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i,o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!b.isEncoding(n))throw TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw RangeError("Out of range index");if(r<=e)return this;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=S(t)?t:G(new b(t,n).toString()),s=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%s]}return this};var $=/[^+\/0-9A-Za-z-_]/g;function G(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319||a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function q(t){return function(t){f||h();var e,r,n,i,o,a,s=t.length;if(s%4>0)throw Error("Invalid string. Length must be a multiple of 4");o="="===t[s-2]?2:+("="===t[s-1]),a=new c(3*s/4-o),n=o>0?s-4:s;var l=0;for(e=0,r=0;e<n;e+=4,r+=3)i=u[t.charCodeAt(e)]<<18|u[t.charCodeAt(e+1)]<<12|u[t.charCodeAt(e+2)]<<6|u[t.charCodeAt(e+3)],a[l++]=i>>16&255,a[l++]=i>>8&255,a[l++]=255&i;return 2===o?(i=u[t.charCodeAt(e)]<<2|u[t.charCodeAt(e+1)]>>4,a[l++]=255&i):1===o&&(i=u[t.charCodeAt(e)]<<10|u[t.charCodeAt(e+1)]<<4|u[t.charCodeAt(e+2)]>>2,a[l++]=i>>8&255,a[l++]=255&i),a}(function(t){var e;if((t=((e=t).trim?e.trim():e.replace(/^\s+|\s+$/g,"")).replace($,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function F(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function H(t,e,r,n){return new(r||(r=Promise))(function(i,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?i(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(a,s)}l((n=n.apply(t,e||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;
1class K extends Error{constructor(t,e,...r){super(...r),Error.captureStackTrace&&Error.captureStackTrace(this,K),this.name="PeraWalletConnectError",this.data=t,this.message=e}}let X=new class{constructor(t){this.listener=void 0,this.channel=t.channel}setupListener({onReceiveMessage:t}){this.close(),this.listener=e=>{if("object"==typeof e.data)try{e.data.channel===this.channel&&t(e)}catch(t){console.error(t)}},window.addEventListener("message",this.listener)}sendMessage({message:t,targetWindow:e,origin:r,timeout:n=1e3}){setTimeout(()=>{let n={channel:this.channel,message:t};e.postMessage(n,{targetOrigin:r||"*"})},n)}close(){this.listener&&(window.removeEventListener("message",this.listener),this.listener=void 0)}}({channel:"pera-web-wallet"});function J(t){return new Promise((e,r)=>{try{let n=window.open(t,"_blank"),i=0,o=setInterval(()=>{if(50===(i+=1))return clearInterval(o),void r(new K({type:"MESSAGE_NOT_RECEIVED"},"Couldn't open Pera Wallet, please try again."));n&&(!0===n.closed&&(clearInterval(o),r(new K({type:"OPERATION_CANCELLED"},"Operation cancelled by user"))),X.sendMessage({message:{type:"TAB_OPEN"},origin:t,targetWindow:n}))},700);X.setupListener({onReceiveMessage:t=>{"TAB_OPEN_RECEIVED"===t.data.message.type&&(clearInterval(o),e(n))}})}catch(t){r(t)}})}let V="pera-wallet-connect-modal-wrapper",Z="pera-wallet-redirect-modal-wrapper",Q="pera-wallet-sign-txn-toast-wrapper",tt="pera-wallet-sign-txn-modal-wrapper",te="pera-wallet-modal";function tr(t){let e=document.createElement("div");return e.setAttribute("id",t),document.body.appendChild(e),e}function tn(){tr(Z).innerHTML="<pera-wallet-redirect-modal></pera-wallet-redirect-modal>"}function ti(){tr(Q).innerHTML="<pera-wallet-sign-txn-toast></pera-wallet-sign-txn-toast>"}function to(t){let e=document.getElementById(t);e&&e.remove()}let ta={WALLET:"PeraWallet.Wallet",WALLETCONNECT:"walletconnect"};function ts(){return"undefined"==typeof localStorage?void 0:localStorage}function tl(t,e){var r;null==(r=ts())||r.setItem(ta.WALLET,JSON.stringify({type:e||"pera-wallet",accounts:t,selectedAccount:t[0]}))}function tu(){var t;let e=null==(t=ts())?void 0:t.getItem(ta.WALLET);return e?JSON.parse(e):null}function tc(){return new Promise((t,e)=>{var r,n;try{null==(r=ts())||r.removeItem(ta.WALLETCONNECT),null==(n=ts())||n.removeItem(ta.WALLET),t(void 0)}catch(t){e(t)}})}function tf(){return H(this,void 0,void 0,function*(){let t={bridgeURL:"",webWalletURL:"",isWebWalletAvailable:!1,shouldDisplayNewBadge:!1,shouldUseSound:!0,silent:!1,promoteMobile:!1};try{let e=yield function(t,e={}){return fetch(t,e).then(t=>t.json()).then(t=>t)}("https://wc.perawallet.app/config.json",{cache:"no-store"});void 0!==e.web_wallet&&e.web_wallet_url&&(t.isWebWalletAvailable=e.web_wallet),void 0!==e.display_new_badge&&(t.shouldDisplayNewBadge=e.display_new_badge),void 0!==e.use_sound&&(t.shouldUseSound=e.use_sound),void 0!==e.silent&&(t.silent=e.silent),void 0!==e.promote_mobile&&(t.promoteMobile=e.promote_mobile),t=Object.assign(Object.assign({},t),{bridgeURL:function(t){let e=t.slice();for(let t=e.length-1;t>0;t--){let r=Math.floor(Math.random()*(t+1));[e[t],e[r]]=[e[r],e[t]]}return e}(e.servers||[])[0]||"",webWalletURL:e.web_wallet_url||""})}catch(t){console.log(t)}return t})}function th(t){return Uint8Array.from(window.atob(t),t=>t.charCodeAt(0))}function td(t,e){return{id:1e3*Date.now()+Math.floor(1e3*Math.random()),jsonrpc:"2.0",method:t,params:e}}function tp(){return"undefined"!=typeof navigator}function tg(){return tp()&&/Android/i.test(navigator.userAgent)}function tw(){return tp()&&/iPhone|iPad|iPod/i.test(navigator.userAgent)}function ty(){return tp()&&/iPhone|iPod|Android/i.test(navigator.userAgent)}function tv(){if(!tp())return null;let{userAgent:t}=navigator;return t.match(/DuckDuckGo/i)?"DuckDuckGo":t.match(/OPX/i)?"Opera GX":navigator.brave?"Brave":o.getParser(navigator.userAgent).getBrowserName()}let tm="perawallet-wc://",tb="https://perawallet.app/download/";function tA(t){return{ROOT:`https://${t}`,CONNECT:`https://${t}/connect`,TRANSACTION_SIGN:`https://${t}/transaction/sign`}}
1function tE({method:t,signTxnRequestParams:e,signer:r,chainId:n,webWalletURL:i,resolve:o,reject:a}){let s=tA(i);!function(){H(this,void 0,void 0,function*(){try{let i=yield J(s.TRANSACTION_SIGN);if(i){let o;"SIGN_TXN"===t?o={type:"SIGN_TXN",txn:e}:"SIGN_DATA"===t&&r&&n&&(o={type:"SIGN_DATA",data:e,signer:r,chainId:n}),o&&X.sendMessage({message:o,origin:s.TRANSACTION_SIGN,targetWindow:i})}let l=setInterval(()=>{!0===(null==i?void 0:i.closed)&&(a(new K({type:`${t}_CANCELLED`},"Transaction signing is cancelled by user.")),clearInterval(l))},2e3);X.setupListener({onReceiveMessage:e=>(function({event:t,newPeraWalletTab:e,method:r,resolve:n,reject:i}){switch(t.data.message.type){case"SIGN_TXN_CALLBACK":null==e||e.close(),n(t.data.message.signedTxns.map(t=>th(t.signedTxn)));break;case"SIGN_DATA_CALLBACK":null==e||e.close(),n(t.data.message.signedData.map(t=>th(t.signedData)));break;case"SIGN_TXN_NETWORK_MISMATCH":i(new K({type:`${r}_NETWORK_MISMATCH`,detail:t.data.message.error},t.data.message.error||"Network mismatch"));break;case"SIGN_TXN_CALLBACK_ERROR":null==e||e.close(),i(new K({type:`${r}_CANCELLED`},t.data.message.error));break;case"SESSION_DISCONNECTED":null==e||e.close(),tc(),i(new K({type:"SESSION_DISCONNECTED",detail
1:t.data.message.error},t.data.message.error))}})({event:e,newPeraWalletTab:i,method:t,resolve:o,reject:a})})}catch(t){a(t)}})}()}class tT{constructor(t){this.bridge=(null==t?void 0:t.bridge)||"",this.connector=null,this.shouldShowSignTxnToast=void 0===(null==t?void 0:t.shouldShowSignTxnToast)||t.shouldShowSignTxnToast,this.chainId=null==t?void 0:t.chainId,this.compactMode=(null==t?void 0:t.compactMode)||!1,this.singleAccount=(null==t?void 0:t.singleAccount)||!1}get platform(){let t=tu(),e=null;return"pera-wallet"===(null==t?void 0:t.type)?e="mobile":"pera-wallet-web"===(null==t?void 0:t.type)&&(e="web"),e}get isConnected(){var t;return"mobile"===this.platform?!!this.connector:"web"===this.platform&&!!(null==(t=tu())?void 0:t.accounts.length)}get isPeraDiscoverBrowser(){return this.checkIsPeraDiscoverBrowser()}connect(t){return new Promise((e,r)=>H(this,void 0,void 0,function*(){var i;try{if(null==(i=this.connector)?void 0:i.connected)try{yield this.connector.killSession()}catch(t){}let{isWebWalletAvailable:o,bridgeURL:a,webWalletURL:s,shouldDisplayNewBadge:l,shouldUseSound:u,promoteMobile:c}=yield tf(),f=function({webWalletURL:t,chainId:e,resolve:r,reject:n}){let i=tA(t);return function(){return H(this,void 0,void 0,function*(){try{let t=yield J(i.CONNECT);t&&X.sendMessage({message:{type:"CONNECT",data:Object.assign(Object.assign({},function(){let t=document.querySelector('meta[name="name"]'),e=document.querySelector('meta[name="description"]'),{title:r}=document,n="";return t instanceof HTMLMetaElement&&(r=t.content),e instanceof HTMLMetaElement&&(n=e.content),{title:r,description:n,url:window.location.origin,favicon:function(){let t=document.getElementsByTagName("link"),e=[];for(let r=0;r<t.length;r++){let n=t[r],i=n.getAttribute("rel");if(i&&i.toLowerCase().indexOf("icon")>-1){let t=n.getAttribute("href");if(t&&-1===t.toLowerCase().indexOf("https:")&&-1===t.toLowerCase().indexOf("http:")&&0!==t.indexOf("//")){let r=`${window.location.protocol}//${window.location.host}`;if(0===t.indexOf("/"))r+=t;else{let e=window.location.pathname.split("/");e.pop(),r+=`${e.join("/")}/${t}`}e.push(r)}else if(0===(null==t?void 0:t.indexOf("//"))){let r=window.location.protocol+t;e.push(r)}else t&&e.push(t)}}return e}()[0]}}()),{chainId:e})},origin:i.CONNECT,targetWindow:t});let o=setInterval(()=>{!0===(null==t?void 0:t.closed)&&(n(new K({type:"CONNECT_CANCELLED"},"Connect is cancelled by user")),clearInterval(o),to(V))},2e3);X.setupListener({onReceiveMessage:e=>(function({event:t,newPeraWalletTab:e,resolve:r,reject:n}){if(r&&"CONNECT_CALLBACK"===t.data.message.type){let n=t.data.message.data.addresses;tl(n,"pera-wallet-web"),r(n),to(V),null==e||e.close()}else"CONNECT_NETWORK_MISMATCH"===t.data.message.type&&(n(new K({type:"CONNECT_NETWORK_MISMATCH",detail:t.data.message.error},t.data.message.error||"Your wallet is connected to a different network to this dApp. Update your wallet to the correct network (MainNet or TestNet) to continue.")),to(V),null==e||e.close())})({event:e,newPeraWalletTab:t,resolve:r,reject:n})})}catch(t){to(V),n(t)}})}}({resolve:e,reject:r,webWalletURL:s,chainId:this.chainId,isCompactMode:this.compactMode});o&&(window.onWebWalletConnect=f),this.connector=new n.A({bridge:this.bridge||a||"https://bridge.walletconnect.org",qrcodeModal:function({isWebWalletAvailable:t,shouldDisplayNewBadge:e,shouldUseSound:r,compactMode:n,promoteMobile:i,singleAccount:o,selectedAccount:a}){var s;return{open:(s={isWebWalletAvailable:t,shouldDisplayNewBadge:e,shouldUseSound:r,compactMode:n,promoteMobile:i,singleAccount:o,selectedAccount:a},t=>{if(!document.getElementById(V)){let e=tr(V),r=`${t}&algorand=true`,{isWebWalletAvailable:n,shouldDisplayNewBadge:i,shouldUseSound:o,compactMode:a,promoteMobile:l,singleAccount:u,selectedAccount:c}=s;e.innerHTML=`<pera-wallet-connect-modal uri="${r}" is-web-wallet-avaliable="${n}" should-display-new-badge="${i}" should-use-sound="${o}" compact-mode="${a}" promote-mobile="${l}" single-account="${u}" selected-account="${c||""}"></pera-wallet-connect-modal>`}}),close:()=>to(V)}}({isWebWalletAvailable:o,shouldDisplayNewBadge:l,shouldUseSound:u,compactMode:this.compactMode,promoteMobile:c,singleAccount:this.singleAccount,selectedAccount:null==t?void 0:t.selectedAccount})}),yield this.connector.createSession({chainId:this.chainId||4160}),function(t,e){var r,n,i,o;let a=document.getElementById(t),s=null==(n=null==(r=null==a?void 0:a.querySelector(t.replace("-wrapper","")))?void 0:r.shadowRoot)?void 0:n.querySelector(`.${te}`),l=null==(o=null==(i=null==s?void 0:s.querySelector("pera-wallet-modal-header"))?void 0:i.shadowRoot)?void 0:o.getElementById("pera-wallet-modal-header-close-button");null==l||l.addEventListener("click",()=>{e(),to(t)})}(V,()=>r(new K({type:"CONNECT_MODAL_CLOSED"},"Connect modal is closed by user"))),this.connector.on("connect",(t,n)=>{var i,o;t&&r(t),e((null==(i=this.connector)?void 0:i.accounts)||[]),tl((null==(o=this.connector)?void 0:o.accounts)||[])})}catch(t){console.log(t),r(new K({type:"SESSION_CONNECT",detail:t},t.message||"There was an error while connecting to Pera Wallet"))}}))}reconnectSession(){return new Promise((t,e)=>H(this,void 0,void 0,function*(){var r,i;try{let o=tu();if(!o)return void t([]);if("pera-wallet-web"===(null==o?void 0:o.type)){let{isWebWalletAvailable:r}=yield tf();r?t(o.accounts||[]):e(new K({type:"SESSION_RECONNECT",detail:"Pera Web is not available"},"Pera Web is not available"))}this.connector&&t(this.connector.accounts||[]),this.bridge=(null==(r=function(){var t;let e=null==(t=ts())?void 0:t.getItem(ta.WALLETCONNECT);return e?JSON.parse(e):null}())?void 0:r.bridge)||"",this.bridge&&(this.connector=new n.A({bridge:this.bridge}),t((null==(i=this.connector)?void 0:i.accounts)||[])),this.isConnected||t([])}catch(t){yield this.disconnect(),e(new K({type:"SESSION_RECONNECT",detail:t},t.message||"There was an error while reconnecting to Pera Wallet"))}}))}disconnect(){var t;return H(this,void 0,void 0,function*(){let e;this.isConnected&&"mobile"===this.platform&&(null==(e=null==(t=this.connector)?void 0:t.killSession())||e.then(()=>{this.connector=null})),yield tc()})}signTransactionWithMobile(t){return H(this,void 0,void 0,function*(){let e=td("algo_signTxn",[t]);try{try{let{silent:t}
1=yield tf(),r=(yield this.connector.sendCustomRequest(e,{forcePushNotification:!t})).filter(Boolean);return"string"==typeof r[0]?r.map(th):r.map(t=>Uint8Array.from(t))}catch(t){return yield Promise.reject(new K({type:"SIGN_TRANSACTIONS",detail:t},t.message||"Failed to sign transaction"))}}finally{to(Z),to(Q)}})}signTransactionWithWeb(t,e){return new Promise((r,n)=>tE({signTxnRequestParams:t,webWalletURL:e,method:"SIGN_TXN",resolve:r,reject:n}))}signDataWithMobile({data:t,signer:e,chainId:r}){return H(this,void 0,void 0,function*(){let n=td("algo_signData",t.map(t=>Object.assign(Object.assign({},t),{signer:e,chainId:r})));try{try{let{silent:t}=yield tf(),e=(yield this.connector.sendCustomRequest(n,{forcePushNotification:!t})).filter(Boolean);return"string"==typeof e[0]?e.map(th):e.map(t=>Uint8Array.from(t))}catch(t){return yield Promise.reject(new K({type:"SIGN_TRANSACTIONS",detail:t},t.message||"Failed to sign transaction"))}}finally{to(Z),to(Q)}})}signDataWithWeb({data:t,signer:e,chainId:r,webWalletURL:n}){return new Promise((i,o)=>tE({method:"SIGN_DATA",signTxnRequestParams:t,signer:e,chainId:r,webWalletURL:n,resolve:i,reject:o}))}checkIsPeraDiscoverBrowser(){return window.navigator.userAgent.includes("pera")}signTransaction(t,e){return H(this,void 0,void 0,function*(){if("mobile"===this.platform&&(ty()?tn():!ty()&&this.shouldShowSignTxnToast&&ti(),!this.connector))throw Error("PeraWalletConnect was not initialized correctly.");let r=t.flatMap(t=>t.map(t=>(function(t,e){var r;let n;e&&!(t.signers||[]).includes(e)&&(n=[]);let o={txn:(r=t.txn,a.from(i.Ay$.encodeUnsignedTransaction(r)).toString("base64"))};return Array.isArray(n)&&(o.signers=n),t.authAddr&&(o.authAddr=t.authAddr),t.message&&(o.message=t.message),t.msig&&(o.msig=t.msig),o})(t,e)));if("web"===this.platform){let{webWalletURL:t}=yield tf();return this.signTransactionWithWeb(r,t)}return this.signTransactionWithMobile(r)})}signData(t,e){return H(this,void 0,void 0,function*(){let r=this.chainId||4160;if("mobile"===this.platform&&(ty()?tn():!ty()&&this.shouldShowSignTxnToast&&ti(),!this.connector))throw Error("PeraWalletConnect was not initialized correctly.");if("web"===this.platform){let{webWalletURL:n}=yield tf();return this.signDataWithWeb({data:t,signer:e,chainId:r,webWalletURL:n})}let n=t.map(t=>Object.assign(Object.assign({},t),{data:a.from(t.data).toString("base64")}));return this.signDataWithMobile({data:n,signer:e,chainId:r})})}}"undefined"!=typeof window&&(window.global=window,window.Buffer=window.Buffer||b,Promise.all([r.e(4857),r.e(1557)]).then(r.bind(r,61557)))},67269:()=>{}}]);
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.