@tonconnect/ui 1.0.0-beta.2 → 1.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tonconnect-ui.min.js +134 -134
- package/dist/tonconnect-ui.min.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +38 -4201
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +64 -4221
- package/lib/index.umd.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__publicField=(e,t,n)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),n),__async=(e,t,n)=>new Promise(((r,o)=>{var i=e=>{try{a(n.next(e))}catch(t){o(t)}},s=e=>{try{a(n.throw(e))}catch(t){o(t)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,s);a((n=n.apply(e,t)).next())}));!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TON_CONNECT_UI={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var r,o,i,s={exports:{}};o=t,i=function(){var e={};function t(e){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e))throw new TypeError("invalid encoding")}return e.decodeUTF8=function(e){if("string"!=typeof e)throw new TypeError("expected string");var t,n=unescape(encodeURIComponent(e)),r=new Uint8Array(n.length);for(t=0;t<n.length;t++)r[t]=n.charCodeAt(t);return r},e.encodeUTF8=function(e){var t,n=[];for(t=0;t<e.length;t++)n.push(String.fromCharCode(e[t]));return decodeURIComponent(escape(n.join("")))},"undefined"==typeof atob?void 0!==Buffer.from?(e.encodeBase64=function(e){return Buffer.from(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(Buffer.from(e,"base64"),0))}):(e.encodeBase64=function(e){return new Buffer(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(new Buffer(e,"base64"),0))}):(e.encodeBase64=function(e){var t,n=[],r=e.length;for(t=0;t<r;t++)n.push(String.fromCharCode(e[t]));return btoa(n.join(""))},e.decodeBase64=function(e){t(e);var n,r=atob(e),o=new Uint8Array(r.length);for(n=0;n<r.length;n++)o[n]=r.charCodeAt(n);return o}),e},(r=s).exports?r.exports=i():(o.nacl||(o.nacl={}),o.nacl.util=i());const a=s.exports;function l(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var c={exports:{}};const u=n(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));!function(e){!function(e){var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},n=function(){throw new Error("no PRNG")},r=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var i=t(),s=t([1]),a=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),d=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),h=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),g=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function y(e,t,n,r,o){var i,s=0;for(i=0;i<o;i++)s|=e[t+i]^n[r+i];return(1&s-1>>>8)-1}function m(e,t,n,r){return y(e,t,n,r,16)}function v(e,t,n,r){return y(e,t,n,r,32)}function w(e,t,n,r){!function(e,t,n,r){for(var o,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,g=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,m=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,v=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,b=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,x=i,C=s,_=a,S=l,E=c,R=u,k=d,O=h,L=f,A=g,T=p,P=y,M=m,N=v,$=w,j=b,I=0;I<20;I+=2)x^=(o=(M^=(o=(L^=(o=(E^=(o=x+M|0)<<7|o>>>25)+x|0)<<9|o>>>23)+E|0)<<13|o>>>19)+L|0)<<18|o>>>14,R^=(o=(C^=(o=(N^=(o=(A^=(o=R+C|0)<<7|o>>>25)+R|0)<<9|o>>>23)+A|0)<<13|o>>>19)+N|0)<<18|o>>>14,T^=(o=(k^=(o=(_^=(o=($^=(o=T+k|0)<<7|o>>>25)+T|0)<<9|o>>>23)+$|0)<<13|o>>>19)+_|0)<<18|o>>>14,j^=(o=(P^=(o=(O^=(o=(S^=(o=j+P|0)<<7|o>>>25)+j|0)<<9|o>>>23)+S|0)<<13|o>>>19)+O|0)<<18|o>>>14,x^=(o=(S^=(o=(_^=(o=(C^=(o=x+S|0)<<7|o>>>25)+x|0)<<9|o>>>23)+C|0)<<13|o>>>19)+_|0)<<18|o>>>14,R^=(o=(E^=(o=(O^=(o=(k^=(o=R+E|0)<<7|o>>>25)+R|0)<<9|o>>>23)+k|0)<<13|o>>>19)+O|0)<<18|o>>>14,T^=(o=(A^=(o=(L^=(o=(P^=(o=T+A|0)<<7|o>>>25)+T|0)<<9|o>>>23)+P|0)<<13|o>>>19)+L|0)<<18|o>>>14,j^=(o=($^=(o=(N^=(o=(M^=(o=j+$|0)<<7|o>>>25)+j|0)<<9|o>>>23)+M|0)<<13|o>>>19)+N|0)<<18|o>>>14;x=x+i|0,C=C+s|0,_=_+a|0,S=S+l|0,E=E+c|0,R=R+u|0,k=k+d|0,O=O+h|0,L=L+f|0,A=A+g|0,T=T+p|0,P=P+y|0,M=M+m|0,N=N+v|0,$=$+w|0,j=j+b|0,e[0]=x>>>0&255,e[1]=x>>>8&255,e[2]=x>>>16&255,e[3]=x>>>24&255,e[4]=C>>>0&255,e[5]=C>>>8&255,e[6]=C>>>16&255,e[7]=C>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=E>>>0&255,e[17]=E>>>8&255,e[18]=E>>>16&255,e[19]=E>>>24&255,e[20]=R>>>0&255,e[21]=R>>>8&255,e[22]=R>>>16&255,e[23]=R>>>24&255,e[24]=k>>>0&255,e[25]=k>>>8&255,e[26]=k>>>16&255,e[27]=k>>>24&255,e[28]=O>>>0&255,e[29]=O>>>8&255,e[30]=O>>>16&255,e[31]=O>>>24&255,e[32]=L>>>0&255,e[33]=L>>>8&255,e[34]=L>>>16&255,e[35]=L>>>24&255,e[36]=A>>>0&255,e[37]=A>>>8&255,e[38]=A>>>16&255,e[39]=A>>>24&255,e[40]=T>>>0&255,e[41]=T>>>8&255,e[42]=T>>>16&255,e[43]=T>>>24&255,e[44]=P>>>0&255,e[45]=P>>>8&255,e[46]=P>>>16&255,e[47]=P>>>24&255,e[48]=M>>>0&255,e[49]=M>>>8&255,e[50]=M>>>16&255,e[51]=M>>>24&255,e[52]=N>>>0&255,e[53]=N>>>8&255,e[54]=N>>>16&255,e[55]=N>>>24&255,e[56]=$>>>0&255,e[57]=$>>>8&255,e[58]=$>>>16&255,e[59]=$>>>24&255,e[60]=j>>>0&255,e[61]=j>>>8&255,e[62]=j>>>16&255,e[63]=j>>>24&255}(e,t,n,r)}function b(e,t,n,r){!function(e,t,n,r){for(var o,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,g=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,m=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,v=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,b=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,x=0;x<20;x+=2)i^=(o=(m^=(o=(f^=(o=(c^=(o=i+m|0)<<7|o>>>25)+i|0)<<9|o>>>23)+c|0)<<13|o>>>19)+f|0)<<18|o>>>14,u^=(o=(s^=(o=(v^=(o=(g^=(o=u+s|0)<<7|o>>>25)+u|0)<<9|o>>>23)+g|0)<<13|o>>>19)+v|0)<<18|o>>>14,p^=(o=(d^=(o=(a^=(o=(w^=(o=p+d|0)<<7|o>>>25)+p|0)<<9|o>>>23)+w|0)<<13|o>>>19)+a|0)<<18|o>>>14,b^=(o=(y^=(o=(h^=(o=(l^=(o=b+y|0)<<7|o>>>25)+b|0)<<9|o>>>23)+l|0)<<13|o>>>19)+h|0)<<18|o>>>14,i^=(o=(l^=(o=(a^=(o=(s^=(o=i+l|0)<<7|o>>>25)+i|0)<<9|o>>>23)+s|0)<<13|o>>>19)+a|0)<<18|o>>>14,u^=(o=(c^=(o=(h^=(o=(d^=(o=u+c|0)<<7|o>>>25)+u|0)<<9|o>>>23)+d|0)<<13|o>>>19)+h|0)<<18|o>>>14,p^=(o=(g^=(o=(f^=(o=(y^=(o=p+g|0)<<7|o>>>25)+p|0)<<9|o>>>23)+y|0)<<13|o>>>19)+f|0)<<18|o>>>14,b^=(o=(w^=(o=(v^=(o=(m^=(o=b+w|0)<<7|o>>>25)+b|0)<<9|o>>>23)+m|0)<<13|o>>>19)+v|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=u>>>0&255,e[5]=u>>>8&255,e[6]=u>>>16&255,e[7]=u>>>24&255,e[8]=p>>>0&255,e[9]=p>>>8&255,e[10]=p>>>16&255,e[11]=p>>>24&255,e[12]=b>>>0&255,e[13]=b>>>8&255,e[14]=b>>>16&255,e[15]=b>>>24&255,e[16]=d>>>0&255,e[17]=d>>>8&255,e[18]=d>>>16&255,e[19]=d>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=f>>>0&255,e[25]=f>>>8&255,e[26]=f>>>16&255,e[27]=f>>>24&255,e[28]=g>>>0&255,e[29]=g>>>8&255,e[30]=g>>>16&255,e[31]=g>>>24&255}(e,t,n,r)}var x=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function C(e,t,n,r,o,i,s){var a,l,c=new Uint8Array(16),u=new Uint8Array(64);for(l=0;l<16;l++)c[l]=0;for(l=0;l<8;l++)c[l]=i[l];for(;o>=64;){for(w(u,c,s,x),l=0;l<64;l++)e[t+l]=n[r+l]^u[l];for(a=1,l=8;l<16;l++)a=a+(255&c[l])|0,c[l]=255&a,a>>>=8;o-=64,t+=64,r+=64}if(o>0)for(w(u,c,s,x),l=0;l<o;l++)e[t+l]=n[r+l]^u[l];return 0}function _(e,t,n,r,o){var i,s,a=new Uint8Array(16),l=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=r[s];for(;n>=64;){for(w(l,a,o,x),s=0;s<64;s++)e[t+s]=l[s];for(i=1,s=8;s<16;s++)i=i+(255&a[s])|0,a[s]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(w(l,a,o,x),s=0;s<n;s++)e[t+s]=l[s];return 0}function S(e,t,n,r,o){var i=new Uint8Array(32);b(i,r,o,x);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=r[a+16];return _(e,t,n,s,i)}function E(e,t,n,r,o,i,s){var a=new Uint8Array(32);b(a,i,s,x);for(var l=new Uint8Array(8),c=0;c<8;c++)l[c]=i[c+16];return C(e,t,n,r,o,l,a)}var R=function(e){var t,n,r,o,i,s,a,l;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),l=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|l<<8),this.r[9]=l>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function k(e,t,n,r,o,i){var s=new R(i);return s.update(n,r,o),s.finish(e,t),0}function O(e,t,n,r,o,i){var s=new Uint8Array(16);return k(s,0,n,r,o,i),m(e,t,s,0)}function L(e,t,n,r,o){var i;if(n<32)return-1;for(E(e,0,t,0,n,r,o),k(e,16,e,32,n-32,e),i=0;i<16;i++)e[i]=0;return 0}function A(e,t,n,r,o){var i,s=new Uint8Array(32);if(n<32)return-1;if(S(s,0,32,r,o),0!==O(t,16,t,32,n-32,s))return-1;for(E(e,0,t,0,n,r,o),i=0;i<32;i++)e[i]=0;return 0}function T(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function P(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function M(e,t,n){for(var r,o=~(n-1),i=0;i<16;i++)r=o&(e[i]^t[i]),e[i]^=r,t[i]^=r}function N(e,n){var r,o,i,s=t(),a=t();for(r=0;r<16;r++)a[r]=n[r];for(P(a),P(a),P(a),o=0;o<2;o++){for(s[0]=a[0]-65517,r=1;r<15;r++)s[r]=a[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,M(a,s,1-i)}for(r=0;r<16;r++)e[2*r]=255&a[r],e[2*r+1]=a[r]>>8}function $(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return N(n,e),N(r,t),v(n,0,r,0)}function j(e){var t=new Uint8Array(32);return N(t,e),1&t[0]}function I(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function U(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function W(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function B(e,t,n){var r,o,i=0,s=0,a=0,l=0,c=0,u=0,d=0,h=0,f=0,g=0,p=0,y=0,m=0,v=0,w=0,b=0,x=0,C=0,_=0,S=0,E=0,R=0,k=0,O=0,L=0,A=0,T=0,P=0,M=0,N=0,$=0,j=n[0],I=n[1],U=n[2],W=n[3],B=n[4],K=n[5],D=n[6],F=n[7],q=n[8],H=n[9],V=n[10],z=n[11],G=n[12],Y=n[13],Q=n[14],J=n[15];i+=(r=t[0])*j,s+=r*I,a+=r*U,l+=r*W,c+=r*B,u+=r*K,d+=r*D,h+=r*F,f+=r*q,g+=r*H,p+=r*V,y+=r*z,m+=r*G,v+=r*Y,w+=r*Q,b+=r*J,s+=(r=t[1])*j,a+=r*I,l+=r*U,c+=r*W,u+=r*B,d+=r*K,h+=r*D,f+=r*F,g+=r*q,p+=r*H,y+=r*V,m+=r*z,v+=r*G,w+=r*Y,b+=r*Q,x+=r*J,a+=(r=t[2])*j,l+=r*I,c+=r*U,u+=r*W,d+=r*B,h+=r*K,f+=r*D,g+=r*F,p+=r*q,y+=r*H,m+=r*V,v+=r*z,w+=r*G,b+=r*Y,x+=r*Q,C+=r*J,l+=(r=t[3])*j,c+=r*I,u+=r*U,d+=r*W,h+=r*B,f+=r*K,g+=r*D,p+=r*F,y+=r*q,m+=r*H,v+=r*V,w+=r*z,b+=r*G,x+=r*Y,C+=r*Q,_+=r*J,c+=(r=t[4])*j,u+=r*I,d+=r*U,h+=r*W,f+=r*B,g+=r*K,p+=r*D,y+=r*F,m+=r*q,v+=r*H,w+=r*V,b+=r*z,x+=r*G,C+=r*Y,_+=r*Q,S+=r*J,u+=(r=t[5])*j,d+=r*I,h+=r*U,f+=r*W,g+=r*B,p+=r*K,y+=r*D,m+=r*F,v+=r*q,w+=r*H,b+=r*V,x+=r*z,C+=r*G,_+=r*Y,S+=r*Q,E+=r*J,d+=(r=t[6])*j,h+=r*I,f+=r*U,g+=r*W,p+=r*B,y+=r*K,m+=r*D,v+=r*F,w+=r*q,b+=r*H,x+=r*V,C+=r*z,_+=r*G,S+=r*Y,E+=r*Q,R+=r*J,h+=(r=t[7])*j,f+=r*I,g+=r*U,p+=r*W,y+=r*B,m+=r*K,v+=r*D,w+=r*F,b+=r*q,x+=r*H,C+=r*V,_+=r*z,S+=r*G,E+=r*Y,R+=r*Q,k+=r*J,f+=(r=t[8])*j,g+=r*I,p+=r*U,y+=r*W,m+=r*B,v+=r*K,w+=r*D,b+=r*F,x+=r*q,C+=r*H,_+=r*V,S+=r*z,E+=r*G,R+=r*Y,k+=r*Q,O+=r*J,g+=(r=t[9])*j,p+=r*I,y+=r*U,m+=r*W,v+=r*B,w+=r*K,b+=r*D,x+=r*F,C+=r*q,_+=r*H,S+=r*V,E+=r*z,R+=r*G,k+=r*Y,O+=r*Q,L+=r*J,p+=(r=t[10])*j,y+=r*I,m+=r*U,v+=r*W,w+=r*B,b+=r*K,x+=r*D,C+=r*F,_+=r*q,S+=r*H,E+=r*V,R+=r*z,k+=r*G,O+=r*Y,L+=r*Q,A+=r*J,y+=(r=t[11])*j,m+=r*I,v+=r*U,w+=r*W,b+=r*B,x+=r*K,C+=r*D,_+=r*F,S+=r*q,E+=r*H,R+=r*V,k+=r*z,O+=r*G,L+=r*Y,A+=r*Q,T+=r*J,m+=(r=t[12])*j,v+=r*I,w+=r*U,b+=r*W,x+=r*B,C+=r*K,_+=r*D,S+=r*F,E+=r*q,R+=r*H,k+=r*V,O+=r*z,L+=r*G,A+=r*Y,T+=r*Q,P+=r*J,v+=(r=t[13])*j,w+=r*I,b+=r*U,x+=r*W,C+=r*B,_+=r*K,S+=r*D,E+=r*F,R+=r*q,k+=r*H,O+=r*V,L+=r*z,A+=r*G,T+=r*Y,P+=r*Q,M+=r*J,w+=(r=t[14])*j,b+=r*I,x+=r*U,C+=r*W,_+=r*B,S+=r*K,E+=r*D,R+=r*F,k+=r*q,O+=r*H,L+=r*V,A+=r*z,T+=r*G,P+=r*Y,M+=r*Q,N+=r*J,b+=(r=t[15])*j,s+=38*(C+=r*U),a+=38*(_+=r*W),l+=38*(S+=r*B),c+=38*(E+=r*K),u+=38*(R+=r*D),d+=38*(k+=r*F),h+=38*(O+=r*q),f+=38*(L+=r*H),g+=38*(A+=r*V),p+=38*(T+=r*z),y+=38*(P+=r*G),m+=38*(M+=r*Y),v+=38*(N+=r*Q),w+=38*($+=r*J),i=(r=(i+=38*(x+=r*I))+(o=1)+65535)-65536*(o=Math.floor(r/65536)),s=(r=s+o+65535)-65536*(o=Math.floor(r/65536)),a=(r=a+o+65535)-65536*(o=Math.floor(r/65536)),l=(r=l+o+65535)-65536*(o=Math.floor(r/65536)),c=(r=c+o+65535)-65536*(o=Math.floor(r/65536)),u=(r=u+o+65535)-65536*(o=Math.floor(r/65536)),d=(r=d+o+65535)-65536*(o=Math.floor(r/65536)),h=(r=h+o+65535)-65536*(o=Math.floor(r/65536)),f=(r=f+o+65535)-65536*(o=Math.floor(r/65536)),g=(r=g+o+65535)-65536*(o=Math.floor(r/65536)),p=(r=p+o+65535)-65536*(o=Math.floor(r/65536)),y=(r=y+o+65535)-65536*(o=Math.floor(r/65536)),m=(r=m+o+65535)-65536*(o=Math.floor(r/65536)),v=(r=v+o+65535)-65536*(o=Math.floor(r/65536)),w=(r=w+o+65535)-65536*(o=Math.floor(r/65536)),b=(r=b+o+65535)-65536*(o=Math.floor(r/65536)),i=(r=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(r/65536)),s=(r=s+o+65535)-65536*(o=Math.floor(r/65536)),a=(r=a+o+65535)-65536*(o=Math.floor(r/65536)),l=(r=l+o+65535)-65536*(o=Math.floor(r/65536)),c=(r=c+o+65535)-65536*(o=Math.floor(r/65536)),u=(r=u+o+65535)-65536*(o=Math.floor(r/65536)),d=(r=d+o+65535)-65536*(o=Math.floor(r/65536)),h=(r=h+o+65535)-65536*(o=Math.floor(r/65536)),f=(r=f+o+65535)-65536*(o=Math.floor(r/65536)),g=(r=g+o+65535)-65536*(o=Math.floor(r/65536)),p=(r=p+o+65535)-65536*(o=Math.floor(r/65536)),y=(r=y+o+65535)-65536*(o=Math.floor(r/65536)),m=(r=m+o+65535)-65536*(o=Math.floor(r/65536)),v=(r=v+o+65535)-65536*(o=Math.floor(r/65536)),w=(r=w+o+65535)-65536*(o=Math.floor(r/65536)),b=(r=b+o+65535)-65536*(o=Math.floor(r/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=c,e[5]=u,e[6]=d,e[7]=h,e[8]=f,e[9]=g,e[10]=p,e[11]=y,e[12]=m,e[13]=v,e[14]=w,e[15]=b}function K(e,t){B(e,t,t)}function D(e,n){var r,o=t();for(r=0;r<16;r++)o[r]=n[r];for(r=253;r>=0;r--)K(o,o),2!==r&&4!==r&&B(o,o,n);for(r=0;r<16;r++)e[r]=o[r]}function F(e,n){var r,o=t();for(r=0;r<16;r++)o[r]=n[r];for(r=250;r>=0;r--)K(o,o),1!==r&&B(o,o,n);for(r=0;r<16;r++)e[r]=o[r]}function q(e,n,r){var o,i,s=new Uint8Array(32),l=new Float64Array(80),c=t(),u=t(),d=t(),h=t(),f=t(),g=t();for(i=0;i<31;i++)s[i]=n[i];for(s[31]=127&n[31]|64,s[0]&=248,I(l,r),i=0;i<16;i++)u[i]=l[i],h[i]=c[i]=d[i]=0;for(c[0]=h[0]=1,i=254;i>=0;--i)M(c,u,o=s[i>>>3]>>>(7&i)&1),M(d,h,o),U(f,c,d),W(c,c,d),U(d,u,h),W(u,u,h),K(h,f),K(g,c),B(c,d,c),B(d,u,f),U(f,c,d),W(c,c,d),K(u,c),W(d,h,g),B(c,d,a),U(c,c,h),B(d,d,c),B(c,h,g),B(h,u,l),K(u,f),M(c,u,o),M(d,h,o);for(i=0;i<16;i++)l[i+16]=c[i],l[i+32]=d[i],l[i+48]=u[i],l[i+64]=h[i];var p=l.subarray(32),y=l.subarray(16);return D(p,p),B(y,y,p),N(e,y),0}function H(e,t){return q(e,t,o)}function V(e,t){return n(t,32),H(e,t)}function z(e,t,n){var o=new Uint8Array(32);return q(o,n,t),b(e,r,o,x)}R.prototype.blocks=function(e,t,n){for(var r,o,i,s,a,l,c,u,d,h,f,g,p,y,m,v,w,b,x,C=this.fin?0:2048,_=this.h[0],S=this.h[1],E=this.h[2],R=this.h[3],k=this.h[4],O=this.h[5],L=this.h[6],A=this.h[7],T=this.h[8],P=this.h[9],M=this.r[0],N=this.r[1],$=this.r[2],j=this.r[3],I=this.r[4],U=this.r[5],W=this.r[6],B=this.r[7],K=this.r[8],D=this.r[9];n>=16;)h=d=0,h+=(_+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*M,h+=(S+=8191&(r>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*D),h+=(E+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*K),h+=(R+=8191&(i>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*B),d=(h+=(k+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*W))>>>13,h&=8191,h+=(O+=a>>>1&8191)*(5*U),h+=(L+=8191&(a>>>14|(l=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*I),h+=(A+=8191&(l>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*j),h+=(T+=8191&(c>>>8|(u=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*$),f=d+=(h+=(P+=u>>>5|C)*(5*N))>>>13,f+=_*N,f+=S*M,f+=E*(5*D),f+=R*(5*K),d=(f+=k*(5*B))>>>13,f&=8191,f+=O*(5*W),f+=L*(5*U),f+=A*(5*I),f+=T*(5*j),d+=(f+=P*(5*$))>>>13,f&=8191,g=d,g+=_*$,g+=S*N,g+=E*M,g+=R*(5*D),d=(g+=k*(5*K))>>>13,g&=8191,g+=O*(5*B),g+=L*(5*W),g+=A*(5*U),g+=T*(5*I),p=d+=(g+=P*(5*j))>>>13,p+=_*j,p+=S*$,p+=E*N,p+=R*M,d=(p+=k*(5*D))>>>13,p&=8191,p+=O*(5*K),p+=L*(5*B),p+=A*(5*W),p+=T*(5*U),y=d+=(p+=P*(5*I))>>>13,y+=_*I,y+=S*j,y+=E*$,y+=R*N,d=(y+=k*M)>>>13,y&=8191,y+=O*(5*D),y+=L*(5*K),y+=A*(5*B),y+=T*(5*W),m=d+=(y+=P*(5*U))>>>13,m+=_*U,m+=S*I,m+=E*j,m+=R*$,d=(m+=k*N)>>>13,m&=8191,m+=O*M,m+=L*(5*D),m+=A*(5*K),m+=T*(5*B),v=d+=(m+=P*(5*W))>>>13,v+=_*W,v+=S*U,v+=E*I,v+=R*j,d=(v+=k*$)>>>13,v&=8191,v+=O*N,v+=L*M,v+=A*(5*D),v+=T*(5*K),w=d+=(v+=P*(5*B))>>>13,w+=_*B,w+=S*W,w+=E*U,w+=R*I,d=(w+=k*j)>>>13,w&=8191,w+=O*$,w+=L*N,w+=A*M,w+=T*(5*D),b=d+=(w+=P*(5*K))>>>13,b+=_*K,b+=S*B,b+=E*W,b+=R*U,d=(b+=k*I)>>>13,b&=8191,b+=O*j,b+=L*$,b+=A*N,b+=T*M,x=d+=(b+=P*(5*D))>>>13,x+=_*D,x+=S*K,x+=E*B,x+=R*W,d=(x+=k*U)>>>13,x&=8191,x+=O*I,x+=L*j,x+=A*$,x+=T*N,_=h=8191&(d=(d=((d+=(x+=P*M)>>>13)<<2)+d|0)+(h&=8191)|0),S=f+=d>>>=13,E=g&=8191,R=p&=8191,k=y&=8191,O=m&=8191,L=v&=8191,A=w&=8191,T=b&=8191,P=x&=8191,t+=16,n-=16;this.h[0]=_,this.h[1]=S,this.h[2]=E,this.h[3]=R,this.h[4]=k,this.h[5]=O,this.h[6]=L,this.h[7]=A,this.h[8]=T,this.h[9]=P},R.prototype.finish=function(e,t){var n,r,o,i,s=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,s[0]=this.h[0]+5,n=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this.h[i]+n,n=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,r=(1^n)-1,i=0;i<10;i++)s[i]&=r;for(r=~r,i=0;i<10;i++)this.h[i]=this.h[i]&r|s[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},R.prototype.update=function(e,t,n){var r,o;if(this.leftover){for((o=16-this.leftover)>n&&(o=n),r=0;r<o;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(e,t,o),t+=o,n-=o),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var G=L,Y=A;var Q=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function J(e,t,n,r){for(var o,i,s,a,l,c,u,d,h,f,g,p,y,m,v,w,b,x,C,_,S,E,R,k,O,L,A=new Int32Array(16),T=new Int32Array(16),P=e[0],M=e[1],N=e[2],$=e[3],j=e[4],I=e[5],U=e[6],W=e[7],B=t[0],K=t[1],D=t[2],F=t[3],q=t[4],H=t[5],V=t[6],z=t[7],G=0;r>=128;){for(C=0;C<16;C++)_=8*C+G,A[C]=n[_+0]<<24|n[_+1]<<16|n[_+2]<<8|n[_+3],T[C]=n[_+4]<<24|n[_+5]<<16|n[_+6]<<8|n[_+7];for(C=0;C<80;C++)if(o=P,i=M,s=N,a=$,l=j,c=I,u=U,W,h=B,f=K,g=D,p=F,y=q,m=H,v=V,z,R=65535&(E=z),k=E>>>16,O=65535&(S=W),L=S>>>16,R+=65535&(E=(q>>>14|j<<18)^(q>>>18|j<<14)^(j>>>9|q<<23)),k+=E>>>16,O+=65535&(S=(j>>>14|q<<18)^(j>>>18|q<<14)^(q>>>9|j<<23)),L+=S>>>16,R+=65535&(E=q&H^~q&V),k+=E>>>16,O+=65535&(S=j&I^~j&U),L+=S>>>16,S=Q[2*C],R+=65535&(E=Q[2*C+1]),k+=E>>>16,O+=65535&S,L+=S>>>16,S=A[C%16],k+=(E=T[C%16])>>>16,O+=65535&S,L+=S>>>16,O+=(k+=(R+=65535&E)>>>16)>>>16,R=65535&(E=x=65535&R|k<<16),k=E>>>16,O=65535&(S=b=65535&O|(L+=O>>>16)<<16),L=S>>>16,R+=65535&(E=(B>>>28|P<<4)^(P>>>2|B<<30)^(P>>>7|B<<25)),k+=E>>>16,O+=65535&(S=(P>>>28|B<<4)^(B>>>2|P<<30)^(B>>>7|P<<25)),L+=S>>>16,k+=(E=B&K^B&D^K&D)>>>16,O+=65535&(S=P&M^P&N^M&N),L+=S>>>16,d=65535&(O+=(k+=(R+=65535&E)>>>16)>>>16)|(L+=O>>>16)<<16,w=65535&R|k<<16,R=65535&(E=p),k=E>>>16,O=65535&(S=a),L=S>>>16,k+=(E=x)>>>16,O+=65535&(S=b),L+=S>>>16,M=o,N=i,$=s,j=a=65535&(O+=(k+=(R+=65535&E)>>>16)>>>16)|(L+=O>>>16)<<16,I=l,U=c,W=u,P=d,K=h,D=f,F=g,q=p=65535&R|k<<16,H=y,V=m,z=v,B=w,C%16==15)for(_=0;_<16;_++)S=A[_],R=65535&(E=T[_]),k=E>>>16,O=65535&S,L=S>>>16,S=A[(_+9)%16],R+=65535&(E=T[(_+9)%16]),k+=E>>>16,O+=65535&S,L+=S>>>16,b=A[(_+1)%16],R+=65535&(E=((x=T[(_+1)%16])>>>1|b<<31)^(x>>>8|b<<24)^(x>>>7|b<<25)),k+=E>>>16,O+=65535&(S=(b>>>1|x<<31)^(b>>>8|x<<24)^b>>>7),L+=S>>>16,b=A[(_+14)%16],k+=(E=((x=T[(_+14)%16])>>>19|b<<13)^(b>>>29|x<<3)^(x>>>6|b<<26))>>>16,O+=65535&(S=(b>>>19|x<<13)^(x>>>29|b<<3)^b>>>6),L+=S>>>16,L+=(O+=(k+=(R+=65535&E)>>>16)>>>16)>>>16,A[_]=65535&O|L<<16,T[_]=65535&R|k<<16;R=65535&(E=B),k=E>>>16,O=65535&(S=P),L=S>>>16,S=e[0],k+=(E=t[0])>>>16,O+=65535&S,L+=S>>>16,L+=(O+=(k+=(R+=65535&E)>>>16)>>>16)>>>16,e[0]=P=65535&O|L<<16,t[0]=B=65535&R|k<<16,R=65535&(E=K),k=E>>>16,O=65535&(S=M),L=S>>>16,S=e[1],k+=(E=t[1])>>>16,O+=65535&S,L+=S>>>16,L+=(O+=(k+=(R+=65535&E)>>>16)>>>16)>>>16,e[1]=M=65535&O|L<<16,t[1]=K=65535&R|k<<16,R=65535&(E=D),k=E>>>16,O=65535&(S=N),L=S>>>16,S=e[2],k+=(E=t[2])>>>16,O+=65535&S,L+=S>>>16,L+=(O+=(k+=(R+=65535&E)>>>16)>>>16)>>>16,e[2]=N=65535&O|L<<16,t[2]=D=65535&R|k<<16,R=65535&(E=F),k=E>>>16,O=65535&(S=$),L=S>>>16,S=e[3],k+=(E=t[3])>>>16,O+=65535&S,L+=S>>>16,L+=(O+=(k+=(R+=65535&E)>>>16)>>>16)>>>16,e[3]=$=65535&O|L<<16,t[3]=F=65535&R|k<<16,R=65535&(E=q),k=E>>>16,O=65535&(S=j),L=S>>>16,S=e[4],k+=(E=t[4])>>>16,O+=65535&S,L+=S>>>16,L+=(O+=(k+=(R+=65535&E)>>>16)>>>16)>>>16,e[4]=j=65535&O|L<<16,t[4]=q=65535&R|k<<16,R=65535&(E=H),k=E>>>16,O=65535&(S=I),L=S>>>16,S=e[5],k+=(E=t[5])>>>16,O+=65535&S,L+=S>>>16,L+=(O+=(k+=(R+=65535&E)>>>16)>>>16)>>>16,e[5]=I=65535&O|L<<16,t[5]=H=65535&R|k<<16,R=65535&(E=V),k=E>>>16,O=65535&(S=U),L=S>>>16,S=e[6],k+=(E=t[6])>>>16,O+=65535&S,L+=S>>>16,L+=(O+=(k+=(R+=65535&E)>>>16)>>>16)>>>16,e[6]=U=65535&O|L<<16,t[6]=V=65535&R|k<<16,R=65535&(E=z),k=E>>>16,O=65535&(S=W),L=S>>>16,S=e[7],k+=(E=t[7])>>>16,O+=65535&S,L+=S>>>16,L+=(O+=(k+=(R+=65535&E)>>>16)>>>16)>>>16,e[7]=W=65535&O|L<<16,t[7]=z=65535&R|k<<16,G+=128,r-=128}return r}function Z(e,t,n){var r,o=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),a=n;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,J(o,i,t,n),n%=128,r=0;r<n;r++)s[r]=t[a-n+r];for(s[n]=128,s[(n=256-128*(n<112?1:0))-9]=0,p(s,n-8,a/536870912|0,a<<3),J(o,i,s,n),r=0;r<8;r++)p(e,8*r,o[r],i[r]);return 0}function X(e,n){var r=t(),o=t(),i=t(),s=t(),a=t(),l=t(),c=t(),u=t(),h=t();W(r,e[1],e[0]),W(h,n[1],n[0]),B(r,r,h),U(o,e[0],e[1]),U(h,n[0],n[1]),B(o,o,h),B(i,e[3],n[3]),B(i,i,d),B(s,e[2],n[2]),U(s,s,s),W(a,o,r),W(l,s,i),U(c,s,i),U(u,o,r),B(e[0],a,l),B(e[1],u,c),B(e[2],c,l),B(e[3],a,u)}function ee(e,t,n){var r;for(r=0;r<4;r++)M(e[r],t[r],n)}function te(e,n){var r=t(),o=t(),i=t();D(i,n[2]),B(r,n[0],i),B(o,n[1],i),N(e,o),e[31]^=j(r)<<7}function ne(e,t,n){var r,o;for(T(e[0],i),T(e[1],s),T(e[2],s),T(e[3],i),o=255;o>=0;--o)ee(e,t,r=n[o/8|0]>>(7&o)&1),X(t,e),X(e,e),ee(e,t,r)}function re(e,n){var r=[t(),t(),t(),t()];T(r[0],h),T(r[1],f),T(r[2],s),B(r[3],h,f),ne(e,r,n)}function oe(e,r,o){var i,s=new Uint8Array(64),a=[t(),t(),t(),t()];for(o||n(r,32),Z(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,re(a,s),te(e,a),i=0;i<32;i++)r[i+32]=e[i];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function se(e,t){var n,r,o,i;for(r=63;r>=32;--r){for(n=0,o=r-32,i=r-12;o<i;++o)t[o]+=n-16*t[r]*ie[o-(r-32)],n=Math.floor((t[o]+128)/256),t[o]-=256*n;t[o]+=n,t[r]=0}for(n=0,o=0;o<32;o++)t[o]+=n-(t[31]>>4)*ie[o],n=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=n*ie[o];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function ae(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;se(e,n)}function le(e,n,r,o){var i,s,a=new Uint8Array(64),l=new Uint8Array(64),c=new Uint8Array(64),u=new Float64Array(64),d=[t(),t(),t(),t()];Z(a,o,32),a[0]&=248,a[31]&=127,a[31]|=64;var h=r+64;for(i=0;i<r;i++)e[64+i]=n[i];for(i=0;i<32;i++)e[32+i]=a[32+i];for(Z(c,e.subarray(32),r+32),ae(c),re(d,c),te(e,d),i=32;i<64;i++)e[i]=o[i];for(Z(l,e,r+64),ae(l),i=0;i<64;i++)u[i]=0;for(i=0;i<32;i++)u[i]=c[i];for(i=0;i<32;i++)for(s=0;s<32;s++)u[i+s]+=l[i]*a[s];return se(e.subarray(32),u),h}function ce(e,n,r,o){var a,l=new Uint8Array(32),u=new Uint8Array(64),d=[t(),t(),t(),t()],h=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),o=t(),a=t(),l=t(),u=t(),d=t(),h=t();return T(e[2],s),I(e[1],n),K(a,e[1]),B(l,a,c),W(a,a,e[2]),U(l,e[2],l),K(u,l),K(d,u),B(h,d,u),B(r,h,a),B(r,r,l),F(r,r),B(r,r,a),B(r,r,l),B(r,r,l),B(e[0],r,l),K(o,e[0]),B(o,o,l),$(o,a)&&B(e[0],e[0],g),K(o,e[0]),B(o,o,l),$(o,a)?-1:(j(e[0])===n[31]>>7&&W(e[0],i,e[0]),B(e[3],e[0],e[1]),0)}(h,o))return-1;for(a=0;a<r;a++)e[a]=n[a];for(a=0;a<32;a++)e[a+32]=o[a];if(Z(u,e,r),ae(u),ne(d,h,u),re(h,n.subarray(32)),X(d,h),te(l,d),r-=64,v(n,0,l,0)){for(a=0;a<r;a++)e[a]=0;return-1}for(a=0;a<r;a++)e[a]=n[a+64];return r}var ue=32,de=24,he=16,fe=32,ge=32,pe=de,ye=64,me=32,ve=64;function we(e,t){if(e.length!==ue)throw new Error("bad key size");if(t.length!==de)throw new Error("bad nonce size")}function be(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function xe(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:b,crypto_stream_xor:E,crypto_stream:S,crypto_stream_salsa20_xor:C,crypto_stream_salsa20:_,crypto_onetimeauth:k,crypto_onetimeauth_verify:O,crypto_verify_16:m,crypto_verify_32:v,crypto_secretbox:L,crypto_secretbox_open:A,crypto_scalarmult:q,crypto_scalarmult_base:H,crypto_box_beforenm:z,crypto_box_afternm:G,crypto_box:function(e,t,n,r,o,i){var s=new Uint8Array(32);return z(s,o,i),G(e,t,n,r,s)},crypto_box_open:function(e,t,n,r,o,i){var s=new Uint8Array(32);return z(s,o,i),Y(e,t,n,r,s)},crypto_box_keypair:V,crypto_hash:Z,crypto_sign:le,crypto_sign_keypair:oe,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:ue,crypto_secretbox_NONCEBYTES:de,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:he,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:fe,crypto_box_SECRETKEYBYTES:ge,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:pe,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ye,crypto_sign_PUBLICKEYBYTES:me,crypto_sign_SECRETKEYBYTES:ve,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:c,L:ie,pack25519:N,unpack25519:I,M:B,A:U,S:K,Z:W,pow2523:F,add:X,set25519:T,modL:se,scalarmult:ne,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,n){be(e,t,n),we(n,t);for(var r=new Uint8Array(32+e.length),o=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+32]=e[i];return L(o,r,r.length,t,n),o.subarray(he)},e.secretbox.open=function(e,t,n){be(e,t,n),we(n,t);for(var r=new Uint8Array(he+e.length),o=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+he]=e[i];return r.length<32||0!==A(o,r,r.length,t,n)?null:o.subarray(32)},e.secretbox.keyLength=ue,e.secretbox.nonceLength=de,e.secretbox.overheadLength=he,e.scalarMult=function(e,t){if(be(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return q(n,e,t),n},e.scalarMult.base=function(e){if(be(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return H(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,o){var i=e.box.before(r,o);return e.secretbox(t,n,i)},e.box.before=function(e,t){be(e,t),function(e,t){if(e.length!==fe)throw new Error("bad public key size");if(t.length!==ge)throw new Error("bad secret key size")}(e,t);var n=new Uint8Array(32);return z(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,o){var i=e.box.before(r,o);return e.secretbox.open(t,n,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(fe),t=new Uint8Array(ge);return V(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(be(e),e.length!==ge)throw new Error("bad secret key size");var t=new Uint8Array(fe);return H(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=fe,e.box.secretKeyLength=ge,e.box.sharedKeyLength=32,e.box.nonceLength=pe,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(be(e,t),t.length!==ve)throw new Error("bad secret key size");var n=new Uint8Array(ye+e.length);return le(n,e,e.length,t),n},e.sign.open=function(e,t){if(be(e,t),t.length!==me)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=ce(n,e,e.length,t);if(r<0)return null;for(var o=new Uint8Array(r),i=0;i<o.length;i++)o[i]=n[i];return o},e.sign.detached=function(t,n){for(var r=e.sign(t,n),o=new Uint8Array(ye),i=0;i<o.length;i++)o[i]=r[i];return o},e.sign.detached.verify=function(e,t,n){if(be(e,t,n),t.length!==ye)throw new Error("bad signature size");if(n.length!==me)throw new Error("bad public key size");var r,o=new Uint8Array(ye+e.length),i=new Uint8Array(ye+e.length);for(r=0;r<ye;r++)o[r]=t[r];for(r=0;r<e.length;r++)o[r+ye]=e[r];return ce(i,o,o.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(me),t=new Uint8Array(ve);return oe(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(be(e),e.length!==ve)throw new Error("bad secret key size");for(var t=new Uint8Array(me),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(be(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(me),n=new Uint8Array(ve),r=0;r<32;r++)n[r]=e[r];return oe(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=me,e.sign.secretKeyLength=ve,e.sign.seedLength=32,e.sign.signatureLength=ye,e.hash=function(e){be(e);var t=new Uint8Array(64);return Z(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return be(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===y(e,0,t,0,e.length))},e.setPRNG=function(e){n=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){e.setPRNG((function(e,n){var r,o=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(o.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=o[r];xe(o)}))}else void 0!==l&&(t=u)&&t.randomBytes&&e.setPRNG((function(e,n){var r,o=t.randomBytes(n);for(r=0;r<n;r++)e[r]=o[r];xe(o)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})}(c);const d=c.exports;var h,f,g,p,y,m,v,w,b,x,C,_;(f=h||(h={}))[f.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",f[f.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",f[f.MANIFEST_NOT_FOUND_ERROR=2]="MANIFEST_NOT_FOUND_ERROR",f[f.MANIFEST_CONTENT_ERROR=3]="MANIFEST_CONTENT_ERROR",f[f.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",f[f.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",f[f.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",(p=g||(g={}))[p.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",p[p.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",(m=y||(y={}))[m.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",m[m.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",m[m.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",m[m.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",m[m.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",(w=v||(v={}))[w.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",w[w.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",w[w.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",w[w.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",w[w.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",(x=b||(b={}))[x.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",x[x.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",x[x.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",x[x.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",(_=C||(C={})).MAINNET="-239",_.TESTNET="-3";const S={encode:function(e,t=!1){let n;return e instanceof Uint8Array?n=e:("string"!=typeof e&&(e=JSON.stringify(e)),n=a.decodeUTF8(e)),function(e,t){const n=a.encodeBase64(e);return t?encodeURIComponent(n):n}(n,t)},decode:function(e,t=!1){const n=function(e,t){return t&&(e=decodeURIComponent(e)),a.decodeBase64(e)}(e,t);return{toString:()=>a.encodeUTF8(n),toObject(){try{return JSON.parse(a.encodeUTF8(n))}catch(e){return null}},toUint8Array:()=>n}}};function E(e){let t="";return e.forEach((e=>{t+=("0"+(255&e).toString(16)).slice(-2)})),t}function R(e){if(e.length%2!=0)throw new Error(`Cannot convert ${e} to bytesArray`);const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)t[n/2]=parseInt(e.slice(n,n+2),16);return t}class k{constructor(e){this.nonceLength=24,this.keyPair=e?this.createKeypairFromString(e):this.createKeypair(),this.sessionId=E(this.keyPair.publicKey)}createKeypair(){return d.box.keyPair()}createKeypairFromString(e){return{publicKey:R(e.publicKey),secretKey:R(e.secretKey)}}createNonce(){return d.randomBytes(this.nonceLength)}encrypt(e,t){const n=(new TextEncoder).encode(e),r=this.createNonce();return function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(r,d.box(n,r,t,this.keyPair.secretKey))}decrypt(e,t){const[n,r]=function(e,t){if(t>=e.length)throw new Error("Index is out of buffer");return[e.slice(0,t),e.slice(t)]}(e,this.nonceLength),o=d.box.open(r,n,t,this.keyPair.secretKey);if(!o)throw new Error(`Decryption error: \n message: ${e.toString()} \n sender pubkey: ${t.toString()} \n keypair pubkey: ${this.keyPair.publicKey.toString()} \n keypair secretkey: ${this.keyPair.secretKey.toString()}`);return(new TextDecoder).decode(o)}stringifyKeypair(){return{publicKey:E(this.keyPair.publicKey),secretKey:E(this.keyPair.secretKey)}}}function O(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(t){i(t)}}function a(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}class L extends Error{constructor(e,t){super(e,t),this.message=`${L.prefix} ${this.constructor.name}${this.info?": "+this.info:""}${e?"\n"+e:""}`,Object.setPrototypeOf(this,L.prototype)}get info(){return""}}L.prefix="[TON_CONNECT_SDK_ERROR]";class A extends L{get info(){return"Passed DappMetadata is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,A.prototype)}}class T extends L{get info(){return"Passed `tonconnect-manifest.json` contains errors. Check format of your manifest. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest"}constructor(...e){super(...e),Object.setPrototypeOf(this,T.prototype)}}class P extends L{get info(){return"Manifest not found. Make sure you added `tonconnect-manifest.json` to the root of your app or passed correct manifestUrl. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest"}constructor(...e){super(...e),Object.setPrototypeOf(this,P.prototype)}}class M extends L{get info(){return"Wallet connection called but wallet already connected. To avoid the error, disconnect the wallet before doing a new connection."}constructor(...e){super(...e),Object.setPrototypeOf(this,M.prototype)}}class N extends L{get info(){return"Send transaction or other protocol methods called while wallet is not connected."}constructor(...e){super(...e),Object.setPrototypeOf(this,N.prototype)}}class $ extends L{get info(){return"User rejects the action in the wallet."}constructor(...e){super(...e),Object.setPrototypeOf(this,$.prototype)}}class j extends L{get info(){return"Request to the wallet contains errors."}constructor(...e){super(...e),Object.setPrototypeOf(this,j.prototype)}}class I extends L{get info(){return"App tries to send rpc request to the injected wallet while not connected."}constructor(...e){super(...e),Object.setPrototypeOf(this,I.prototype)}}class U extends L{get info(){return"There is an attempt to connect to the injected wallet while it is not exists in the webpage."}constructor(...e){super(...e),Object.setPrototypeOf(this,U.prototype)}}class W extends L{get info(){return"Storage was not specified in the `DappMetadata` and default `localStorage` was not detected in the environment."}constructor(...e){super(...e),Object.setPrototypeOf(this,W.prototype)}}class B extends L{get info(){return"An error occurred while fetching the wallets list."}constructor(...e){super(...e),Object.setPrototypeOf(this,B.prototype)}}class K extends L{get info(){return"Passed address is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,K.prototype)}}class D extends L{get info(){return"Passed hex is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,D.prototype)}}class F extends L{constructor(...e){super(...e),Object.setPrototypeOf(this,F.prototype)}}const q={[h.UNKNOWN_ERROR]:F,[h.USER_REJECTS_ERROR]:$,[h.BAD_REQUEST_ERROR]:j,[h.UNKNOWN_APP_ERROR]:I,[h.MANIFEST_NOT_FOUND_ERROR]:P,[h.MANIFEST_CONTENT_ERROR]:T};const H=new class{parseError(e){let t=F;return e.code in q&&(t=q[e.code]||F),new t(e.message)}};class V{isError(e){return"error"in e}}const z={[y.UNKNOWN_ERROR]:F,[y.USER_REJECTS_ERROR]:$,[y.BAD_REQUEST_ERROR]:j,[y.UNKNOWN_APP_ERROR]:I};const G=new class extends V{convertToRpcRequest(e){return{method:"sendTransaction",params:[JSON.stringify(e)]}}parseAndThrowError(e){let t=F;throw e.error.code in z&&(t=z[e.error.code]||F),new t(e.error.message)}convertFromRpcResponse(e){return{boc:e.result}}};class Y{constructor(e,t){this.storage=e,this.storeKey="ton-connect-storage_http-bridge-gateway::"+t}storeLastEventId(e){return O(this,void 0,void 0,(function*(){return this.storage.setItem(this.storeKey,e)}))}removeLastEventId(){return O(this,void 0,void 0,(function*(){return this.storage.removeItem(this.storeKey)}))}getLastEventId(){return O(this,void 0,void 0,(function*(){const e=yield this.storage.getItem(this.storeKey);return e||null}))}}function Q(e,t){return function(e){return"/"===e.slice(-1)?e.slice(0,-1):e}(e)+"/"+t}class J{constructor(e,t,n,r,o){this.bridgeUrl=t,this.sessionId=n,this.listener=r,this.errorsListener=o,this.ssePath="events",this.postPath="message",this.heartbeatMessage="heartbeat",this.defaultTtl=300,this.isClosed=!1,this.bridgeGatewayStorage=new Y(e,t)}registerSession(){return O(this,void 0,void 0,(function*(){const e=new URL(Q(this.bridgeUrl,this.ssePath));e.searchParams.append("client_id",this.sessionId);const t=yield this.bridgeGatewayStorage.getLastEventId();if(!this.isClosed)return t&&e.searchParams.append("last_event_id",t),this.eventSource=new EventSource(e.toString()),new Promise(((e,t)=>{this.eventSource.onerror=t,this.eventSource.onopen=()=>{this.eventSource.onerror=this.errorsHandler.bind(this),this.eventSource.onmessage=this.messagesHandler.bind(this),e()}}))}))}send(e,t,n,r){return O(this,void 0,void 0,(function*(){const o=new URL(Q(this.bridgeUrl,this.postPath));o.searchParams.append("client_id",this.sessionId),o.searchParams.append("to",t),o.searchParams.append("ttl",(r||this.defaultTtl).toString()),o.searchParams.append("topic",n),yield fetch(o,{method:"post",body:S.encode(e)})}))}pause(){var e;null===(e=this.eventSource)||void 0===e||e.close()}unPause(){return this.registerSession()}close(){var e;this.isClosed=!0,null===(e=this.eventSource)||void 0===e||e.close()}setListener(e){this.listener=e}setErrorsListener(e){this.errorsListener=e}errorsHandler(e){var t,n;if(!this.isClosed){if((null===(t=this.eventSource)||void 0===t?void 0:t.readyState)===EventSource.CLOSED)return this.eventSource.close(),void this.registerSession();if((null===(n=this.eventSource)||void 0===n?void 0:n.readyState)===EventSource.CONNECTING)return void console.debug("[TON_CONNET_SDK_ERROR]: Bridge error",JSON.stringify(e));this.errorsListener(e)}}messagesHandler(e){return O(this,void 0,void 0,(function*(){if(e.data!==this.heartbeatMessage&&(yield this.bridgeGatewayStorage.storeLastEventId(e.lastEventId),!this.isClosed)){let n;try{n=JSON.parse(e.data)}catch(t){throw new L(`Bridge message parse failed, message ${t.data}`)}this.listener(n)}}))}}class Z{constructor(e){this.storage=e,this.storeKey="ton-connect-storage_bridge-connection"}storeConnection(e){return O(this,void 0,void 0,(function*(){if("injected"===e.type)return this.storage.setItem(this.storeKey,JSON.stringify(e));const t={sessionKeyPair:e.session.sessionCrypto.stringifyKeypair(),walletPublicKey:e.session.walletPublicKey,bridgeUrl:e.session.bridgeUrl},n={type:"http",connectEvent:e.connectEvent,session:t,lastWalletEventId:e.lastWalletEventId,nextRpcRequestId:e.nextRpcRequestId};return this.storage.setItem(this.storeKey,JSON.stringify(n))}))}removeConnection(){return O(this,void 0,void 0,(function*(){return this.storage.removeItem(this.storeKey)}))}getConnection(){return O(this,void 0,void 0,(function*(){const e=yield this.storage.getItem(this.storeKey);if(!e)return null;const t=JSON.parse(e);if("injected"===t.type)return t;const n=new k(t.session.sessionKeyPair);return{type:"http",connectEvent:t.connectEvent,lastWalletEventId:t.lastWalletEventId,nextRpcRequestId:t.nextRpcRequestId,session:{sessionCrypto:n,bridgeUrl:t.session.bridgeUrl,walletPublicKey:t.session.walletPublicKey}}}))}getHttpConnection(){return O(this,void 0,void 0,(function*(){const e=yield this.getConnection();if(!e)throw new L("Trying to read HTTP connection source while nothing is stored");if("injected"===e.type)throw new L("Trying to read HTTP connection source while injected connection is stored");return e}))}getInjectedConnection(){return O(this,void 0,void 0,(function*(){const e=yield this.getConnection();if(!e)throw new L("Trying to read Injected bridge connection source while nothing is stored");if("http"===(null==e?void 0:e.type))throw new L("Trying to read Injected bridge connection source while HTTP connection is stored");return e}))}storedConnectionType(){return O(this,void 0,void 0,(function*(){const e=yield this.storage.getItem(this.storeKey);if(!e)return null;return JSON.parse(e).type}))}storeLastWalletEventId(e){return O(this,void 0,void 0,(function*(){const t=yield this.getConnection();if(t&&"http"===t.type)return t.lastWalletEventId=e,this.storeConnection(t)}))}getLastWalletEventId(){return O(this,void 0,void 0,(function*(){const e=yield this.getConnection();if(e&&"lastWalletEventId"in e)return e.lastWalletEventId}))}increaseNextRpcRequestId(){return O(this,void 0,void 0,(function*(){const e=yield this.getConnection();if(e){const t=e.nextRpcRequestId||0;return e.nextRpcRequestId=t+1,this.storeConnection(e)}}))}getNextRpcRequestId(){return O(this,void 0,void 0,(function*(){const e=yield this.getConnection();return e&&e.nextRpcRequestId||0}))}}function X(...e){try{console.debug("[TON_CONNECT_SDK]",...e)}catch(t){}}function ee(...e){try{console.error("[TON_CONNECT_SDK]",...e)}catch(t){}}class te{constructor(e,t){this.storage=e,this.walletConnectionSource=t,this.type="http",this.standardUniversalLink="tc://",this.pendingRequests=new Map,this.session=null,this.gateway=null,this.pendingGateways=[],this.listeners=[],this.connectionStorage=new Z(e)}static fromStorage(e){return O(this,void 0,void 0,(function*(){const t=new Z(e),n=yield t.getHttpConnection();return new te(e,{bridgeUrl:n.session.bridgeUrl})}))}connect(e){this.closeGateways();const t=new k;let n="",r=this.standardUniversalLink;return Array.isArray(this.walletConnectionSource)?(this.pendingGateways=this.walletConnectionSource.map((e=>{const n=new J(this.storage,e.bridgeUrl,t.sessionId,(()=>{}),(e=>{console.error(e)}));return n.setListener((t=>this.pendingGatewaysListener(n,e.bridgeUrl,t))),n})),this.pendingGateways.forEach((e=>e.registerSession()))):(n=this.walletConnectionSource.bridgeUrl,this.walletConnectionSource.universalLink&&(r=this.walletConnectionSource.universalLink),this.gateway=new J(this.storage,this.walletConnectionSource.bridgeUrl,t.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),this.gateway.registerSession()),this.session={sessionCrypto:t,bridgeUrl:n},this.generateUniversalLink(r,e)}restoreConnection(){return O(this,void 0,void 0,(function*(){if(Array.isArray(this.walletConnectionSource))throw new L("Internal error. Connection source is array while WalletConnectionSourceHTTP was expected.");this.closeGateways();const e=yield this.connectionStorage.getHttpConnection();e&&(this.session=e.session,this.gateway=new J(this.storage,this.walletConnectionSource.bridgeUrl,e.session.sessionCrypto.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),yield this.gateway.registerSession(),this.listeners.forEach((t=>t(e.connectEvent))))}))}sendRequest(e,t){return new Promise(((n,r)=>O(this,void 0,void 0,(function*(){if(!this.gateway||!this.session||!("walletPublicKey"in this.session))throw new L("Trying to send bridge request without session");const o=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),X("Send http-bridge request:",Object.assign(Object.assign({},e),{id:o}));const i=this.session.sessionCrypto.encrypt(JSON.stringify(Object.assign(Object.assign({},e),{id:o})),R(this.session.walletPublicKey));this.gateway.send(i,this.session.walletPublicKey,e.method).catch(r),this.pendingRequests.set(o.toString(),n),null==t||t()}))))}closeConnection(){this.closeGateways(),this.listeners=[],this.session=null,this.gateway=null}disconnect(){return O(this,void 0,void 0,(function*(){return new Promise((e=>O(this,void 0,void 0,(function*(){let t=!1;const n=()=>{t=!0,this.removeBridgeAndSession().then(e)};try{yield this.sendRequest({method:"disconnect",params:[]},n)}catch(r){console.debug(r),t||this.removeBridgeAndSession().then(e)}}))))}))}listen(e){return this.listeners.push(e),()=>this.listeners=this.listeners.filter((t=>t!==e))}pause(){var e;null===(e=this.gateway)||void 0===e||e.pause(),this.pendingGateways.forEach((e=>e.pause()))}unPause(){return O(this,void 0,void 0,(function*(){const e=this.pendingGateways.map((e=>e.unPause()));this.gateway&&e.push(this.gateway.unPause()),yield Promise.all(e)}))}pendingGatewaysListener(e,t,n){return O(this,void 0,void 0,(function*(){if(this.pendingGateways.includes(e))return this.closeGateways({except:e}),this.session.bridgeUrl=t,this.gateway=e,this.gateway.setErrorsListener(this.gatewayErrorsListener.bind(this)),this.gateway.setListener(this.gatewayListener.bind(this)),this.gatewayListener(n);e.close()}))}gatewayListener(e){return O(this,void 0,void 0,(function*(){const t=JSON.parse(this.session.sessionCrypto.decrypt(S.decode(e.message).toUint8Array(),R(e.from)));if(X("Wallet message received:",t),!("event"in t)){const e=t.id.toString(),n=this.pendingRequests.get(e);return n?(n(t),void this.pendingRequests.delete(e)):void X(`Response id ${e} doesn't match any request's id`)}if(void 0!==t.id){const e=yield this.connectionStorage.getLastWalletEventId();if(void 0!==e&&t.id<=e)return void ee(`Received event id (=${t.id}) must be greater than stored last wallet event id (=${e}) `);"connect"!==t.event&&(yield this.connectionStorage.storeLastWalletEventId(t.id))}const n=this.listeners;"connect"===t.event&&(yield this.updateSession(t,e.from)),"disconnect"===t.event&&(yield this.removeBridgeAndSession()),n.forEach((e=>e(t)))}))}gatewayErrorsListener(e){return O(this,void 0,void 0,(function*(){throw new L(`Bridge error ${JSON.stringify(e)}`)}))}updateSession(e,t){return O(this,void 0,void 0,(function*(){this.session=Object.assign(Object.assign({},this.session),{walletPublicKey:t});const n=e.payload.items.find((e=>"ton_addr"===e.name)),r=Object.assign(Object.assign({},e),{payload:Object.assign(Object.assign({},e.payload),{items:[n]})});yield this.connectionStorage.storeConnection({type:"http",session:this.session,lastWalletEventId:e.id,connectEvent:r,nextRpcRequestId:0})}))}removeBridgeAndSession(){return O(this,void 0,void 0,(function*(){this.closeConnection(),yield this.connectionStorage.removeConnection()}))}generateUniversalLink(e,t){const n=new URL(e);return n.searchParams.append("v",2..toString()),n.searchParams.append("id",this.session.sessionCrypto.sessionId),n.searchParams.append("r",JSON.stringify(t)),n.toString()}closeGateways(e){var t;null===(t=this.gateway)||void 0===t||t.close(),this.pendingGateways.filter((t=>t!==(null==e?void 0:e.except))).forEach((e=>e.close())),this.pendingGateways=[]}}function ne(e,t){return re(e,[t])}function re(e,t){return!(!e||"object"!=typeof e)&&t.every((t=>t in e))}function oe(){if("undefined"!=typeof window)return window}function ie(){var e;const t=null===(e=oe())||void 0===e?void 0:e.location.origin;return t?t+"/tonconnect-manifest.json":""}class se{constructor(e,t){this.injectedWalletKey=t,this.type="injected",this.unsubscribeCallback=null,this.listenSubscriptions=!1,this.listeners=[];const n=se.window;if(!se.isWindowContainsWallet(n,t))throw new U;this.connectionStorage=new Z(e),this.injectedWallet=n[t].tonconnect}static fromStorage(e){return O(this,void 0,void 0,(function*(){const t=new Z(e),n=yield t.getInjectedConnection();return new se(e,n.jsBridgeKey)}))}static isWalletInjected(e){return se.isWindowContainsWallet(this.window,e)}static isInsideWalletBrowser(e){return!!se.isWindowContainsWallet(this.window,e)&&this.window[e].tonconnect.isWalletBrowser}static getCurrentlyInjectedWallets(){if(!this.window)return[];return Object.entries(this.window).filter((([e,t])=>function(e){try{return!(!ne(e,"tonconnect")||!ne(e.tonconnect,"walletInfo"))&&re(e.tonconnect.walletInfo,["name","image","about_url"])}catch(t){return!1}}(t))).map((([e,t])=>({name:t.tonconnect.walletInfo.name,aboutUrl:t.tonconnect.walletInfo.about_url,imageUrl:t.tonconnect.walletInfo.image,tondns:t.tonconnect.walletInfo.tondns,jsBridgeKey:e,injected:!0,embedded:t.tonconnect.isWalletBrowser})))}static isWindowContainsWallet(e,t){return!!e&&t in e&&"object"==typeof e[t]&&"tonconnect"in e[t]}connect(e){this._connect(2,e)}restoreConnection(){return O(this,void 0,void 0,(function*(){try{X("Injected Provider restoring connection...");const e=yield this.injectedWallet.restoreConnection();X("Injected Provider restoring connection response",e),"connect"===e.event?(this.makeSubscriptions(),this.listeners.forEach((t=>t(e)))):yield this.connectionStorage.removeConnection()}catch(e){yield this.connectionStorage.removeConnection(),console.error(e)}}))}closeConnection(){this.listenSubscriptions&&this.injectedWallet.disconnect(),this.closeAllListeners()}disconnect(){return O(this,void 0,void 0,(function*(){return new Promise((e=>{const t=()=>{this.closeAllListeners(),this.connectionStorage.removeConnection().then(e)};try{this.injectedWallet.disconnect(),t()}catch(n){X(n),this.sendRequest({method:"disconnect",params:[]},t)}}))}))}closeAllListeners(){var e;this.listenSubscriptions=!1,this.listeners=[],null===(e=this.unsubscribeCallback)||void 0===e||e.call(this)}listen(e){return this.listeners.push(e),()=>this.listeners=this.listeners.filter((t=>t!==e))}sendRequest(e,t){return O(this,void 0,void 0,(function*(){const n=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),X("Send injected-bridge request:",Object.assign(Object.assign({},e),{id:n}));const r=this.injectedWallet.send(Object.assign(Object.assign({},e),{id:n}));return r.then((e=>X("Wallet message received:",e))),null==t||t(),r}))}_connect(e,t){return O(this,void 0,void 0,(function*(){try{X(`Injected Provider connect request: protocolVersion: ${e}, message:`,t);const n=yield this.injectedWallet.connect(e,t);X("Injected Provider connect response:",n),"connect"===n.event&&(yield this.updateSession(),this.makeSubscriptions()),this.listeners.forEach((e=>e(n)))}catch(n){X(n);const e={event:"connect_error",payload:{code:0,message:null==n?void 0:n.toString()}};this.listeners.forEach((t=>t(e)))}}))}makeSubscriptions(){this.listenSubscriptions=!0,this.unsubscribeCallback=this.injectedWallet.listen((e=>{X("Wallet message received:",e),this.listenSubscriptions&&this.listeners.forEach((t=>t(e))),"disconnect"===e.event&&this.disconnect()}))}updateSession(){return this.connectionStorage.storeConnection({type:"injected",jsBridgeKey:this.injectedWalletKey,nextRpcRequestId:0})}}se.window=oe();class ae{constructor(){const e=oe();if(!(null==e?void 0:e.localStorage))throw new W;this.window=e}getItem(e){return O(this,void 0,void 0,(function*(){return Promise.resolve(this.window.localStorage.getItem(e))}))}removeItem(e){return O(this,void 0,void 0,(function*(){return this.window.localStorage.removeItem(e),Promise.resolve()}))}setItem(e,t){return this.window.localStorage.setItem(e,t),Promise.resolve()}}function le(e){return function(e){return"jsBridgeKey"in e}(e)&&e.injected}function ce(e){return le(e)&&e.embedded}function ue(e){return"bridgeUrl"in e}const de=[{name:"Tonkeeper",image:"https://tonkeeper.com/assets/tonconnect-icon.png",tondns:"tonkeeper.ton",about_url:"https://tonkeeper.com",universal_url:"https://app.tonkeeper.com/ton-connect",bridge:[{type:"sse",url:"https://bridge.tonapi.io/bridge"},{type:"js",key:"tonkeeper"}]},{name:"OpenMask",image:"https://raw.githubusercontent.com/OpenProduct/openmask-extension/main/public/openmask-logo-288.png",about_url:"https://www.openmask.app/",bridge:[{type:"js",key:"openmask"}]},{name:"MyTonWallet",image:"https://mytonwallet.io/icon-256.png",about_url:"https://mytonwallet.io",bridge:[{type:"js",key:"mytonwallet"}]}];class he{constructor(e){this.walletsListCache=null,this.walletsListSource="https://raw.githubusercontent.com/ton-blockchain/wallets-list/main/wallets.json",e&&(this.walletsListSource=e)}getWallets(){return O(this,void 0,void 0,(function*(){return this.walletsListCache||(this.walletsListCache=this.fetchWalletsList(),this.walletsListCache.catch((()=>this.walletsListCache=null))),this.walletsListCache}))}getEmbeddedWallet(){return O(this,void 0,void 0,(function*(){const e=(yield this.getWallets()).filter(ce);return 1!==e.length?null:e[0]}))}fetchWalletsList(){return O(this,void 0,void 0,(function*(){let e=[];try{const t=yield fetch(this.walletsListSource);if(e=yield t.json(),!Array.isArray(e))throw new B("Wrong wallets list format, wallets list must be an array.");const n=e.filter((e=>!this.isCorrectWalletConfigDTO(e)));n.length&&(ee(`Wallet(s) ${n.map((e=>e.name)).join(", ")} config format is wrong. They were removed from the wallets list.`),e=e.filter((e=>this.isCorrectWalletConfigDTO(e))))}catch(n){ee(n),e=de}let t=[];try{t=se.getCurrentlyInjectedWallets()}catch(n){ee(n)}return this.mergeWalletsLists(this.walletConfigDTOListToWalletConfigList(e),t)}))}walletConfigDTOListToWalletConfigList(e){return e.map((e=>{const t={name:e.name,imageUrl:e.image,aboutUrl:e.about_url,tondns:e.tondns};return e.bridge.forEach((n=>{if("sse"===n.type&&(t.bridgeUrl=n.url,t.universalLink=e.universal_url,t.deepLink=e.deepLink),"js"===n.type){const e=n.key;t.jsBridgeKey=e,t.injected=se.isWalletInjected(e),t.embedded=se.isInsideWalletBrowser(e)}})),t}))}mergeWalletsLists(e,t){return[...new Set(e.concat(t).map((e=>e.name))).values()].map((n=>{const r=e.find((e=>e.name===n)),o=t.find((e=>e.name===n));return Object.assign(Object.assign({},r&&Object.assign({},r)),o&&Object.assign({},o))}))}isCorrectWalletConfigDTO(e){if(!e||"object"!=typeof e)return!1;if(!("name"in e)||!("image"in e)||!("about_url"in e))return!1;if(!("bridge"in e)||!Array.isArray(e.bridge)||!e.bridge.length)return!1;const t=e.bridge;if(t.some((e=>!e||"object"!=typeof e||!("type"in e))))return!1;const n=t.find((e=>"sse"===e.type));if(n&&(!("url"in n)||!n.url||!e.universal_url))return!1;const r=t.find((e=>"js"===e.type));return!!(!r||"key"in r&&r.key)}}class fe extends L{get info(){return"Wallet doesn't support requested feature method."}constructor(...e){super(...e),Object.setPrototypeOf(this,fe.prototype)}}function ge(e,t){const n=e.includes("SendTransaction"),r=e.find((e=>e&&"object"==typeof e&&"SendTransaction"===e.name));if(!n&&!r)throw new fe("Wallet doesn't support SendTransaction feature.");if(r&&void 0!==r.maxMessages){if(r.maxMessages<t.requiredMessagesNumber)throw new fe(`Wallet is not able to handle such SendTransaction request. Max support messages number is ${r.maxMessages}, but ${t.requiredMessagesNumber} is required.`)}else!function(...e){try{console.warn("[TON_CONNECT_SDK]",...e)}catch(t){}}("Connected wallet didn't provide information about max allowed messages in the SendTransaction request. Request may be rejected by the wallet.")}class pe{constructor(e){if(this.walletsList=new he,this._wallet=null,this.provider=null,this.statusChangeSubscriptions=[],this.statusChangeErrorSubscriptions=[],this.dappSettings={manifestUrl:(null==e?void 0:e.manifestUrl)||ie(),storage:(null==e?void 0:e.storage)||new ae},this.walletsList=new he(null==e?void 0:e.walletsListSource),!this.dappSettings.manifestUrl)throw new A("Dapp tonconnect-manifest.json must be specified if window.location.origin is undefined. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest");this.bridgeConnectionStorage=new Z(this.dappSettings.storage),(null==e?void 0:e.disableAutoPauseConnection)||this.addWindowFocusAndBlurSubscriptions()}static getWallets(){return this.walletsList.getWallets()}get connected(){return null!==this._wallet}get account(){var e;return(null===(e=this._wallet)||void 0===e?void 0:e.account)||null}get wallet(){return this._wallet}set wallet(e){this._wallet=e,this.statusChangeSubscriptions.forEach((e=>e(this._wallet)))}getWallets(){return this.walletsList.getWallets()}onStatusChange(e,t){return this.statusChangeSubscriptions.push(e),t&&this.statusChangeErrorSubscriptions.push(t),()=>{this.statusChangeSubscriptions=this.statusChangeSubscriptions.filter((t=>t!==e)),t&&(this.statusChangeErrorSubscriptions=this.statusChangeErrorSubscriptions.filter((e=>e!==t)))}}connect(e,t){var n;if(this.connected)throw new M;return null===(n=this.provider)||void 0===n||n.closeConnection(),this.provider=this.createProvider(e),this.provider.connect(this.createConnectRequest(t))}restoreConnection(){return O(this,void 0,void 0,(function*(){const[e,t]=yield Promise.all([this.bridgeConnectionStorage.storedConnectionType(),this.walletsList.getEmbeddedWallet()]);try{switch(e){case"http":this.provider=yield te.fromStorage(this.dappSettings.storage);break;case"injected":this.provider=yield se.fromStorage(this.dappSettings.storage);break;default:if(!t)return;this.provider=yield this.createProvider(t)}}catch(n){return yield this.bridgeConnectionStorage.removeConnection(),void(this.provider=null)}return this.provider.listen(this.walletEventsListener.bind(this)),this.provider.restoreConnection()}))}sendTransaction(e){return O(this,void 0,void 0,(function*(){this.checkConnection(),ge(this.wallet.device.features,{requiredMessagesNumber:e.messages.length});const{validUntil:t}=e,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["validUntil"]),r=e.from||this.account.address,o=e.network||this.account.chain,i=yield this.provider.sendRequest(G.convertToRpcRequest(Object.assign(Object.assign({},n),{valid_until:t,from:r,network:o})));return G.isError(i)?G.parseAndThrowError(i):G.convertFromRpcResponse(i)}))}disconnect(){return O(this,void 0,void 0,(function*(){if(!this.connected)throw new N;yield this.provider.disconnect(),this.onWalletDisconnected()}))}pauseConnection(){var e;"http"===(null===(e=this.provider)||void 0===e?void 0:e.type)&&this.provider.pause()}unPauseConnection(){var e;return"http"!==(null===(e=this.provider)||void 0===e?void 0:e.type)?Promise.resolve():this.provider.unPause()}addWindowFocusAndBlurSubscriptions(){const e=function(){if("undefined"!=typeof document)return document}();if(e)try{e.addEventListener("visibilitychange",(()=>{e.hidden?this.pauseConnection():this.unPauseConnection()}))}catch(t){console.error("Cannot subscribe to the document.visibilitychange: ",t)}}createProvider(e){let t;return t=!Array.isArray(e)&&"jsBridgeKey"in e?new se(this.dappSettings.storage,e.jsBridgeKey):new te(this.dappSettings.storage,e),t.listen(this.walletEventsListener.bind(this)),t}walletEventsListener(e){switch(e.event){case"connect":this.onWalletConnected(e.payload);break;case"connect_error":this.onWalletConnectError(e.payload);break;case"disconnect":this.onWalletDisconnected()}}onWalletConnected(e){const t=e.items.find((e=>"ton_addr"===e.name)),n=e.items.find((e=>"ton_proof"===e.name));if(!t)throw new L("ton_addr connection item was not found");const r={device:e.device,provider:this.provider.type,account:{address:t.address,chain:t.network,walletStateInit:t.walletStateInit,publicKey:t.publicKey}};n&&(r.connectItems={tonProof:n}),this.wallet=r}onWalletConnectError(e){const t=H.parseError(e);if(this.statusChangeErrorSubscriptions.forEach((e=>e(t))),console.debug(t),t instanceof P||t instanceof T)throw console.error(t),t}onWalletDisconnected(){this.wallet=null}checkConnection(){if(!this.connected)throw new N}createConnectRequest(e){const t=[{name:"ton_addr"}];return(null==e?void 0:e.tonProof)&&t.push({name:"ton_proof",payload:e.tonProof}),{manifestUrl:this.dappSettings.manifestUrl,items:t}}}pe.walletsList=new he,pe.isWalletInjected=e=>se.isWalletInjected(e),pe.isInsideWalletBrowser=e=>se.isInsideWalletBrowser(e);const ye=17,me=128;function ve(e,t=!1){const{wc:n,hex:r}=function(e){if(!e.includes(":"))throw new K(`Wrong address ${e}. Address must include ":".`);const t=e.split(":");if(2!==t.length)throw new K(`Wrong address ${e}. Address must include ":" only once.`);const n=parseInt(t[0]);if(0!==n&&-1!==n)throw new K(`Wrong address ${e}. WC must be eq 0 or -1, but ${n} received.`);const r=t[1];if(64!==(null==r?void 0:r.length))throw new K(`Wrong address ${e}. Hex part must be 64bytes length, but ${null==r?void 0:r.length} received.`);return{wc:n,hex:be(r)}}(e);let o=ye;t&&(o|=me);const i=new Int8Array(34);i[0]=o,i[1]=n,i.set(r,2);const s=new Uint8Array(36);return s.set(i),s.set(function(e){const t=4129;let n=0;const r=new Uint8Array(e.length+2);r.set(e);for(let o of r){let e=128;for(;e>0;)n<<=1,o&e&&(n+=1),e>>=1,n>65535&&(n&=65535,n^=t)}return new Uint8Array([Math.floor(n/256),n%256])}(i),34),S.encode(s).replace(/\+/g,"-").replace(/\//g,"_")}const we={};for(let ka=0;ka<=255;ka++){let e=ka.toString(16);e.length<2&&(e="0"+e),we[e]=ka}function be(e){const t=(e=e.toLowerCase()).length;if(t%2!=0)throw new D("Hex string must have length a multiple of 2: "+e);const n=t/2,r=new Uint8Array(n);for(let o=0;o<n;o++){const t=2*o,n=e.substring(t,t+2);if(!we.hasOwnProperty(n))throw new D("Invalid hex character: "+n);r[o]=we[n]}return r}const xe={};const Ce=Symbol("solid-proxy"),_e=Symbol("solid-track"),Se={equals:(e,t)=>e===t};let Ee=rt;const Re=1,ke=2,Oe={owned:null,cleanups:null,context:null,owner:null},Le={};var Ae=null;let Te,Pe=null,Me=null,Ne=null,$e=null,je=0;function Ie(e,t){const n=Me,r=Ae,o=0===e.length,i=o?Oe:{owned:null,cleanups:null,context:null,owner:void 0===t?r:t},s=o?e:()=>e((()=>He((()=>at(i)))));Ae=i,Me=null;try{return nt(s,!0)}finally{Me=n,Ae=r}}function Ue(e,t){const n={value:e,observers:null,observerSlots:null,comparator:(t=t?Object.assign({},Se,t):Se).equals||void 0};return[Je.bind(n),e=>("function"==typeof e&&(e=e(n.value)),Ze(n,e))]}function We(e,t,n){Xe(et(e,t,!0,Re))}function Be(e,t,n){Xe(et(e,t,!1,Re))}function Ke(e,t,n){Ee=ot;const r=et(e,t,!1,Re);r.user=!0,$e?$e.push(r):Xe(r)}function De(e,t,n){n=n?Object.assign({},Se,n):Se;const r=et(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Xe(r),Je.bind(r)}function Fe(e,t,n){let r,o,i;2===arguments.length&&"object"==typeof t||1===arguments.length?(r=!0,o=e,i=t||{}):(r=e,o=t,i=n||{});let s=null,a=Le,l=null,c=!1,u="initialValue"in i,d="function"==typeof r&&De(r);const h=new Set,[f,g]=(i.storage||Ue)(i.initialValue),[p,y]=Ue(void 0),[m,v]=Ue(void 0,{equals:!1}),[w,b]=Ue(u?"ready":"unresolved");if(xe.context){let e;l=`${xe.context.id}${xe.context.count++}`,"initial"===i.ssrLoadFrom?a=i.initialValue:xe.load&&(e=xe.load(l))&&(a=e[0])}function x(e,t,n,r){return s===e&&(s=null,u=!0,e!==a&&t!==a||!i.onHydrated||queueMicrotask((()=>i.onHydrated(r,{value:t}))),a=Le,function(e,t){nt((()=>{void 0===t&&g((()=>e)),b(void 0!==t?"errored":"ready"),y(t);for(const e of h.keys())e.decrement();h.clear()}),!1)}(t,n)),t}function C(){const e=Te,t=f(),n=p();if(void 0!==n&&!s)throw n;return Me&&!Me.user&&e&&We((()=>{m(),s&&(e.resolved||h.has(e)||(e.increment(),h.add(e)))})),t}function _(e=!0){if(!1!==e&&c)return;c=!1;const t=d?d():r;if(null==t||!1===t)return void x(s,He(f));const n=a!==Le?a:He((()=>o(t,{value:f(),refetching:e})));return"object"==typeof n&&n&&"then"in n?(s=n,c=!0,queueMicrotask((()=>c=!1)),nt((()=>{b(u?"refreshing":"pending"),v()}),!1),n.then((e=>x(n,e,void 0,t)),(e=>x(n,void 0,lt(e),t)))):(x(s,n,void 0,t),n)}return Object.defineProperties(C,{state:{get:()=>w()},error:{get:()=>p()},loading:{get(){const e=w();return"pending"===e||"refreshing"===e}},latest:{get(){if(!u)return C();const e=p();if(e&&!s)throw e;return f()}}}),d?We((()=>_(!1))):_(!1),[C,{refetch:_,mutate:g}]}function qe(e){return nt(e,!1)}function He(e){if(null===Me)return e();const t=Me;Me=null;try{return e()}finally{Me=t}}function Ve(e){return null===Ae||(null===Ae.cleanups?Ae.cleanups=[e]:Ae.cleanups.push(e)),e}function ze(){return Me}function Ge(e,t){const n=Symbol("context");return{id:n,Provider:ht(n),defaultValue:e}}function Ye(e){let t;return void 0!==(t=ut(Ae,e.id))?t:e.defaultValue}function Qe(e){const t=De(e),n=De((()=>dt(t())));return n.toArray=()=>{const e=n();return Array.isArray(e)?e:null!=e?[e]:[]},n}function Je(){const e=Pe;if(this.sources&&(this.state||e))if(this.state===Re||e)Xe(this);else{const e=Ne;Ne=null,nt((()=>it(this)),!1),Ne=e}if(Me){const e=this.observers?this.observers.length:0;Me.sources?(Me.sources.push(this),Me.sourceSlots.push(e)):(Me.sources=[this],Me.sourceSlots=[e]),this.observers?(this.observers.push(Me),this.observerSlots.push(Me.sources.length-1)):(this.observers=[Me],this.observerSlots=[Me.sources.length-1])}return this.value}function Ze(e,t,n){let r=e.value;return e.comparator&&e.comparator(r,t)||(e.value=t,e.observers&&e.observers.length&&nt((()=>{for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t],r=Pe&&Pe.running;r&&Pe.disposed.has(n),(r&&!n.tState||!r&&!n.state)&&(n.pure?Ne.push(n):$e.push(n),n.observers&&st(n)),r||(n.state=Re)}if(Ne.length>1e6)throw Ne=[],new Error}),!1)),t}function Xe(e){if(!e.fn)return;at(e);const t=Ae,n=Me,r=je;Me=Ae=e,function(e,t,n){let r;try{r=e.fn(t)}catch(o){e.pure&&(e.state=Re,e.owned&&e.owned.forEach(at),e.owned=null),ct(o)}(!e.updatedAt||e.updatedAt<=n)&&(null!=e.updatedAt&&"observers"in e?Ze(e,r):e.value=r,e.updatedAt=n)}(e,e.value,r),Me=n,Ae=t}function et(e,t,n,r=Re,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Ae,context:null,pure:n};return null===Ae||Ae!==Oe&&(Ae.owned?Ae.owned.push(i):Ae.owned=[i]),i}function tt(e){const t=Pe;if(0===e.state||t)return;if(e.state===ke||t)return it(e);if(e.suspense&&He(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<je);)(e.state||t)&&n.push(e);for(let r=n.length-1;r>=0;r--)if((e=n[r]).state===Re||t)Xe(e);else if(e.state===ke||t){const t=Ne;Ne=null,nt((()=>it(e,n[0])),!1),Ne=t}}function nt(e,t){if(Ne)return e();let n=!1;t||(Ne=[]),$e?n=!0:$e=[],je++;try{const t=e();return function(e){Ne&&(rt(Ne),Ne=null);if(e)return;const t=$e;$e=null,t.length&&nt((()=>Ee(t)),!1)}(n),t}catch(r){n||($e=null),Ne=null,ct(r)}}function rt(e){for(let t=0;t<e.length;t++)tt(e[t])}function ot(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:tt(r)}var r;for(xe.context&&(xe.context=r),t=0;t<n;t++)tt(e[t])}function it(e,t){const n=Pe;e.state=0;for(let r=0;r<e.sources.length;r+=1){const o=e.sources[r];o.sources&&(o.state===Re||n?o!==t&&tt(o):(o.state===ke||n)&&it(o,t))}}function st(e){const t=Pe;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];r.state&&!t||(r.state=ke,r.pure?Ne.push(r):$e.push(r),r.observers&&st(r))}}function at(e){let t;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const e=r.pop(),o=t.observerSlots.pop();n<r.length&&(e.sourceSlots[o]=n,r[n]=e,t.observerSlots[n]=o)}}if(e.owned){for(t=0;t<e.owned.length;t++)at(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function lt(e){return e instanceof Error||"string"==typeof e?e:new Error("Unknown error")}function ct(e){throw e=lt(e)}function ut(e,t){return e?e.context&&void 0!==e.context[t]?e.context[t]:ut(e.owner,t):void 0}function dt(e){if("function"==typeof e&&!e.length)return dt(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=dt(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function ht(e,t){return function(t){let n;return Be((()=>n=He((()=>(Ae.context={[e]:t.value},Qe((()=>t.children)))))),void 0),n}}const ft=Symbol("fallback");function gt(e){for(let t=0;t<e.length;t++)e[t]()}function pt(e,t){return He((()=>e(t||{})))}function yt(){return!0}const mt={get:(e,t,n)=>t===Ce?n:e.get(t),has:(e,t)=>t===Ce||e.has(t),set:yt,deleteProperty:yt,getOwnPropertyDescriptor:(e,t)=>({configurable:!0,enumerable:!0,get:()=>e.get(t),set:yt,deleteProperty:yt}),ownKeys:e=>e.keys()};function vt(e){return(e="function"==typeof e?e():e)?e:{}}function wt(...e){let t=!1;for(let r=0;r<e.length;r++){const n=e[r];t=t||!!n&&Ce in n,e[r]="function"==typeof n?(t=!0,De(n)):n}if(t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const r=vt(e[n])[t];if(void 0!==r)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in vt(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(vt(e[n])));return[...new Set(t)]}},mt);const n={};for(let r=e.length-1;r>=0;r--)if(e[r]){const t=Object.getOwnPropertyDescriptors(e[r]);for(const r in t)r in n||Object.defineProperty(n,r,{enumerable:!0,get(){for(let t=e.length-1;t>=0;t--){const n=(e[t]||{})[r];if(void 0!==n)return n}}})}return n}function bt(e,...t){const n=new Set(t.flat());if(Ce in e){const r=t.map((t=>new Proxy({get:n=>t.includes(n)?e[n]:void 0,has:n=>t.includes(n)&&n in e,keys:()=>t.filter((t=>t in e))},mt)));return r.push(new Proxy({get:t=>n.has(t)?void 0:e[t],has:t=>!n.has(t)&&t in e,keys:()=>Object.keys(e).filter((e=>!n.has(e)))},mt)),r}const r=Object.getOwnPropertyDescriptors(e);return t.push(Object.keys(r).filter((e=>!n.has(e)))),t.map((t=>{const n={};for(let o=0;o<t.length;o++){const i=t[o];i in e&&Object.defineProperty(n,i,r[i]?r[i]:{get:()=>e[i],set:()=>!0,enumerable:!0})}return n}))}function xt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return De(function(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return Ve((()=>gt(i))),()=>{let l,c,u=e()||[];return u[_e],He((()=>{let e,t,h,f,g,p,y,m,v,w=u.length;if(0===w)0!==s&&(gt(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[ft],o[0]=Ie((e=>(i[0]=e,n.fallback()))),s=1);else if(0===s){for(o=new Array(w),c=0;c<w;c++)r[c]=u[c],o[c]=Ie(d);s=w}else{for(h=new Array(w),f=new Array(w),a&&(g=new Array(w)),p=0,y=Math.min(s,w);p<y&&r[p]===u[p];p++);for(y=s-1,m=w-1;y>=p&&m>=p&&r[y]===u[m];y--,m--)h[m]=o[y],f[m]=i[y],a&&(g[m]=a[y]);for(e=new Map,t=new Array(m+1),c=m;c>=p;c--)v=u[c],l=e.get(v),t[c]=void 0===l?-1:l,e.set(v,c);for(l=p;l<=y;l++)v=r[l],c=e.get(v),void 0!==c&&-1!==c?(h[c]=o[l],f[c]=i[l],a&&(g[c]=a[l]),c=t[c],e.set(v,c)):i[l]();for(c=p;c<w;c++)c in h?(o[c]=h[c],i[c]=f[c],a&&(a[c]=g[c],a[c](c))):o[c]=Ie(d);o=o.slice(0,s=w),r=u.slice(0)}return o}));function d(e){if(i[c]=e,a){const[e,n]=Ue(c);return a[c]=n,t(u[c],e)}return t(u[c])}}}((()=>e.each),e.children,t||void 0))}function Ct(e){let t=!1;const n=e.keyed,r=De((()=>e.when),void 0,{equals:(e,n)=>t?e===n:!e==!n});return De((()=>{const o=r();if(o){const r=e.children,i="function"==typeof r&&r.length>0;return t=n||i,i?He((()=>r(o))):r}return e.fallback}),void 0,void 0)}function _t(e){let t=!1,n=!1;const r=Qe((()=>e.children)),o=De((()=>{let e=r();Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++){const r=e[t].when;if(r)return n=!!e[t].keyed,[t,r,e[t]]}return[-1]}),void 0,{equals:(e,n)=>e[0]===n[0]&&(t?e[1]===n[1]:!e[1]==!n[1])&&e[2]===n[2]});return De((()=>{const[r,i,s]=o();if(r<0)return e.fallback;const a=s.children,l="function"==typeof a&&a.length>0;return t=n||l,l?He((()=>a(i))):a}),void 0,void 0)}function St(e){return e}const Et=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline","allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"]),Rt=new Set(["innerHTML","textContent","innerText","children"]),kt=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Ot=Object.assign(Object.create(null),{class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"}),Lt=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),At=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),Tt={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};const Pt="_$DX_DELEGATE";function Mt(e,t,n){const r=document.createElement("template");r.innerHTML=e;let o=r.content.firstChild;return n&&(o=o.firstChild),o}function Nt(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function $t(e,t){null==t?e.removeAttribute("class"):e.className=t}function jt(e,t={},n,r){const o={};return r||Be((()=>o.children=Ft(e,t.children,o.children))),Be((()=>t.ref&&t.ref(e))),Be((()=>function(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if("children"===s)continue;o[s]=Kt(e,s,null,o[s],n,i)}for(const s in t){if("children"===s){r||Ft(e,t.children);continue}const a=t[s];o[s]=Kt(e,s,a,o[s],n,i)}}(e,t,n,!0,o,!0))),o}function It(e,t,n){return He((()=>e(t,n)))}function Ut(e,t,n,r){if(void 0===n||r||(r=[]),"function"!=typeof t)return Ft(e,t,r,n);Be((r=>Ft(e,t(),r,n)),r)}function Wt(e){let t,n;return xe.context&&(t=xe.registry.get(n=function(){const e=xe.context;return`${e.id}${e.count++}`}()))?(xe.completed&&xe.completed.add(t),xe.registry.delete(n),t):e.cloneNode(!0)}function Bt(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function Kt(e,t,n,r,o,i){let s,a,l;if("style"===t)return function(e,t,n){if(!t)return n?Nt(e,"style"):t;const r=e.style;if("string"==typeof t)return r.cssText=t;let o,i;for(i in"string"==typeof n&&(r.cssText=n=void 0),n||(n={}),t||(t={}),n)null==t[i]&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}(e,n,r);if("classList"===t)return function(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const r=o[i];r&&"undefined"!==r&&!t[r]&&(Bt(e,r,!1),delete n[r])}for(i=0,s=r.length;i<s;i++){const o=r[i],s=!!t[o];o&&"undefined"!==o&&n[o]!==s&&s&&(Bt(e,o,!0),n[o]=s)}return n}(e,n,r);if(n===r)return r;if("ref"===t)i||n(e);else if("on:"===t.slice(0,3)){const o=t.slice(3);r&&e.removeEventListener(o,r),n&&e.addEventListener(o,n)}else if("oncapture:"===t.slice(0,10)){const o=t.slice(10);r&&e.removeEventListener(o,r,!0),n&&e.addEventListener(o,n,!0)}else if("on"===t.slice(0,2)){const o=t.slice(2).toLowerCase(),i=Lt.has(o);if(!i&&r){const t=Array.isArray(r)?r[0]:r;e.removeEventListener(o,t)}(i||n)&&(function(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n)}(e,o,n,i),i&&function(e,t=window.document){const n=t[Pt]||(t[Pt]=new Set);for(let r=0,o=e.length;r<o;r++){const o=e[r];n.has(o)||(n.add(o),t.addEventListener(o,Dt))}}([o]))}else if((l=Rt.has(t))||!o&&(Ot[t]||(a=Et.has(t)))||(s=e.nodeName.includes("-")))"class"===t||"className"===t?$t(e,n):!s||a||l?e[Ot[t]||t]=n:e[(c=t,c.toLowerCase().replace(/-([a-z])/g,((e,t)=>t.toUpperCase())))]=n;else{const r=o&&t.indexOf(":")>-1&&Tt[t.split(":")[0]];r?function(e,t,n,r){null==r?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r)}(e,r,t,n):Nt(e,kt[t]||t,n)}var c;return n}function Dt(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n||document}),xe.registry&&!xe.done&&(xe.done=!0,document.querySelectorAll("[id^=pl-]").forEach((t=>{for(;t&&8!==t.nodeType&&t.nodeValue!=="pl-"+e;){let e=t.nextSibling;t.remove(),t=e}t&&t.remove()})));n;){const r=n[t];if(r&&!n.disabled){const o=n[`${t}Data`];if(void 0!==o?r.call(n,o,e):r.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function Ft(e,t,n,r,o){for(xe.context&&!n&&(n=[...e.childNodes]);"function"==typeof n;)n=n();if(t===n)return n;const i=typeof t,s=void 0!==r;if(e=s&&n[0]&&n[0].parentNode||e,"string"===i||"number"===i){if(xe.context)return n;if("number"===i&&(t=t.toString()),s){let o=n[0];o&&3===o.nodeType?o.data=t:o=document.createTextNode(t),n=Vt(e,n,r,o)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t}else if(null==t||"boolean"===i){if(xe.context)return n;n=Vt(e,n,r)}else{if("function"===i)return Be((()=>{let o=t();for(;"function"==typeof o;)o=o();n=Ft(e,o,n,r)})),()=>n;if(Array.isArray(t)){const i=[],a=n&&Array.isArray(n);if(qt(i,t,n,o))return Be((()=>n=Ft(e,i,n,r,!0))),()=>n;if(xe.context){if(!i.length)return n;for(let e=0;e<i.length;e++)if(i[e].parentNode)return n=i}if(0===i.length){if(n=Vt(e,n,r),s)return n}else a?0===n.length?Ht(e,i,r):function(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;)if(t[s]!==n[a]){for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const t=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],t)}else if(i===a)for(;s<o;)c&&c.has(t[s])||t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const r=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],r),t[o]=n[i]}else{if(!c){c=new Map;let e=a;for(;e<i;)c.set(n[e],e++)}const r=c.get(t[s]);if(null!=r)if(a<r&&r<i){let l,u=s,d=1;for(;++u<o&&u<i&&null!=(l=c.get(t[u]))&&l===r+d;)d++;if(d>r-a){const o=t[s];for(;a<r;)e.insertBefore(n[a++],o)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}else s++,a++}(e,n,i):(n&&Vt(e),Ht(e,i));n=i}else if(t instanceof Node){if(xe.context&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Vt(e,n,r,t);Vt(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}}return n}function qt(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let s=t[i],a=n&&n[i];if(s instanceof Node)e.push(s);else if(null==s||!0===s||!1===s);else if(Array.isArray(s))o=qt(e,s,a)||o;else if("function"==typeof s)if(r){for(;"function"==typeof s;)s=s();o=qt(e,Array.isArray(s)?s:[s],Array.isArray(a)?a:[a])||o}else e.push(s),o=!0;else{const t=String(s);a&&3===a.nodeType&&a.data===t?e.push(a):e.push(document.createTextNode(t))}}return o}function Ht(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Vt(e,t,n,r){if(void 0===n)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let r=!1;for(let i=t.length-1;i>=0;i--){const s=t[i];if(o!==s){const t=s.parentNode===e;r||i?t&&s.remove():t?e.replaceChild(o,s):e.insertBefore(o,n)}else r=!0}}else e.insertBefore(o,n);return[o]}const zt="http://www.w3.org/2000/svg";function Gt(e,t=!1){return t?document.createElementNS(zt,e):document.createElement(e)}function Yt(e){const{useShadow:t}=e,n=document.createTextNode(""),r=e.mount||document.body;function o(){if(xe.context){const[t,n]=Ue(!1);return queueMicrotask((()=>n(!0))),()=>t()&&e.children}return()=>e.children}if(r instanceof HTMLHeadElement){const[e,t]=Ue(!1),n=()=>t(!0);Ie((t=>Ut(r,(()=>e()?t():o()()),null))),Ve((()=>{xe.context?queueMicrotask(n):n()}))}else{const i=Gt(e.isSVG?"g":"div",e.isSVG),s=t&&i.attachShadow?i.attachShadow({mode:"open"}):i;Object.defineProperty(i,"_$host",{get:()=>n.parentNode,configurable:!0}),Ut(s,o()),r.appendChild(i),e.ref&&e.ref(i),Ve((()=>r.removeChild(i)))}return n}function Qt(e){const[t,n]=bt(e,["component"]),r=De((()=>t.component));return De((()=>{const e=r();switch(typeof e){case"function":return He((()=>e(n)));case"string":const t=At.has(e),r=xe.context?Wt():Gt(e,t);return jt(r,n,t),r}}))}const[Jt,Zt]=Ue(!1),[Xt,en]=Ue(null),[tn,nn]=Ue(null);let rn={data:""},on=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||rn,sn=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,an=/\/\*[^]*?\*\/| +/g,ln=/\n+/g,cn=(e,t)=>{let n="",r="",o="";for(let i in e){let s=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+s+";":r+="f"==i[1]?cn(s,i):i+"{"+cn(s,"k"==i[1]?"":t)+"}":"object"==typeof s?r+=cn(s,t?t.replace(/([^,])+/g,(e=>i.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=s&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=cn.p?cn.p(i,s):i+":"+s+";")}return n+(t&&o?t+"{"+o+"}":o)+r},un={},dn=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+dn(e[n]);return t}return e},hn=(e,t,n,r,o)=>{let i=dn(e),s=un[i]||(un[i]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(i));if(!un[s]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=sn.exec(e.replace(an,""));)t[4]?r.shift():t[3]?(n=t[3].replace(ln," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(ln," ").trim();return r[0]})(e);un[s]=cn(o?{["@keyframes "+s]:t}:t,n?"":"."+s)}let a=n&&un.g?un.g:null;return n&&(un.g=un[s]),l=un[s],c=t,u=r,(d=a)?c.data=c.data.replace(d,l):-1===c.data.indexOf(l)&&(c.data=u?l+c.data:c.data+l),s;var l,c,u,d},fn=(e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":cn(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),"");function gn(e){let t=this||{},n=e.call?e(t.p):e;return hn(n.unshift?n.raw?fn(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,on(t.target),t.g,t.o,t.k)}gn.bind({g:1});let pn=gn.bind({k:1});const yn=Ge();function mn(e){return pt(yn.Provider,{value:e.theme,get children(){return e.children}})}function vn(){return Ye(yn)}function wn(e){let t=this||{};return(...n)=>{const r=r=>{const o=wt(r,{theme:Ye(yn)}),i=wt(o,{get class(){const e=o.class,r="class"in o&&/^go[0-9]+/.test(e);return[e,gn.apply({target:t.target,o:r,p:o,g:t.g},n)].filter(Boolean).join(" ")}}),[s,a]=bt(i,["as","theme"]),l=a,c=s.as||e;let u;return"function"==typeof c?u=c(l):1==t.g?(u=document.createElement(c),jt(u,l)):u=Qt(wt({component:c},l)),u};return r.class=e=>He((()=>gn.apply({target:t.target,p:e,g:t.g},n))),r}}const bn=new Proxy(wn,{get:(e,t)=>e(t)});function xn(){const e=wn.call({g:1},"div").apply(null,arguments);return function(t){return e(t),null}}const Cn={common:{close:"Закрыть",get:"Скачать",learnMore:"Подробнее",openExtension:"Расширение",copyLink:"Копировать ссылку",copied:"Скопировано!",yourWallet:"вашем кошельке"},button:{connectWallet:"Подключить кошелёк",dropdown:{copy:"Скопировать адрес",copied:"Адрес скопирован!",disconnect:"Отключить кошелёк"}},notifications:{confirm:{header:"Откройте {{ name }}, чтобы подтвердить транзакцию."},transactionSent:{header:"Транзакция отправлена",text:"Ваша транзакция будет обработана через несколько секунд."},transactionCanceled:{header:"Транзакция отменена",text:"Состояние вашего счёта не изменится."}},walletModal:{loading:"Список кошельков загружается",qrCode:"QR-код",wallets:"Кошельки",universalQRModal:{scanQR:"Отсканируйте код ниже с помощью камеры в вашем TON-кошельке.",openWallet:"Открыть кошелёк",openInstalledWallet:"Открыть кошелёк",dontHave:"Подробнее о TON кошельках"},desktopSelectWalletModal:{selectWallet:"Выберите кошелёк для подключения."},mobileSelectWalletModal:{connectWallet:"Подключите кошелёк",selectWallet:"$walletModal.desktopSelectWalletModal.selectWallet",installedWallet:"Открыть кошелёк"},qrCodeModal:{connectWith:"Подключиться через {{ name }}",scan:"Отсканируйте код ниже.",openWallet:"Открыть {{ name }}",openExtension:"Расширение",dontHave:"У вас нет {{ name }}?"}},actionModal:{confirmTransaction:{header:"Подтвердите действие в {{ name }}",text:"Это займет пару секунд."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"}},_n={en:Sn({common:{close:"Close",get:"GET",learnMore:"Learn more",openExtension:"Open Extension",copyLink:"Copy Link",copied:"Copied!",yourWallet:"your wallet"},button:{connectWallet:"Connect Wallet",dropdown:{copy:"Copy address",copied:"Address copied!",disconnect:"Disconnect"}},notifications:{confirm:{header:"Open {{ name }} to confirm the transaction."},transactionSent:{header:"Transaction sent",text:"Your transaction will be processed in a few seconds."},transactionCanceled:{header:"Transaction canceled",text:"There will be no changes to your account."}},walletModal:{loading:"Loading wallets",qrCode:"QR Code",wallets:"Wallets",universalQRModal:{scanQR:"Scan the code below with a camera in your TON wallet.",openWallet:"Open Wallet",openInstalledWallet:"Open Wallet",dontHave:"Explore TON wallets"},desktopSelectWalletModal:{selectWallet:"Select a wallet to connect."},mobileSelectWalletModal:{connectWallet:"Connect a Wallet",selectWallet:"$walletModal.desktopSelectWalletModal.selectWallet",installedWallet:"Installed Wallet"},qrCodeModal:{connectWith:"Connect with {{ name }}",scan:"Scan the code below.",openWallet:"Open {{ name }}",openExtension:"Open Extension",dontHave:"Don't have {{ name }}?"}},actionModal:{confirmTransaction:{header:"Confirm the transaction in {{ name }}",text:"It will only take a moment."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"}}),ru:Sn(Cn)};function Sn(e){const t=n=>{Object.entries(n).forEach((([r,o])=>{if("object"==typeof o&&o)return t(o);if("string"==typeof o){if("$"===o[0]){const t=o.slice(1).split(".");let i=e;t.forEach((e=>{if(!(e in i))throw new Error(`Cannot parse translations: there is no property ${e} in translation`);i=i[e]})),n[r]=i}"\\$"===o.slice(0,2)&&(n[r]=o.slice(1))}}))};return t(e),e}const En=Ge(),Rn=Symbol("store-raw"),kn=Symbol("store-node"),On=Symbol("store-name");function Ln(e,t){let n=e[Ce];if(!n&&(Object.defineProperty(e,Ce,{value:n=new Proxy(e,jn)}),!Array.isArray(e))){const t=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let o=0,i=t.length;o<i;o++){const i=t[o];r[i].get&&Object.defineProperty(e,i,{enumerable:r[i].enumerable,get:r[i].get.bind(n)})}}return n}function An(e){let t;return null!=e&&"object"==typeof e&&(e[Ce]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Tn(e,t=new Set){let n,r,o,i;if(n=null!=e&&e[Rn])return n;if(!An(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,i=e.length;n<i;n++)o=e[n],(r=Tn(o,t))!==o&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const n=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let a=0,l=n.length;a<l;a++)i=n[a],s[i].get||(o=e[i],(r=Tn(o,t))!==o&&(e[i]=r))}return e}function Pn(e){let t=e[kn];return t||Object.defineProperty(e,kn,{value:t={}}),t}function Mn(e,t,n){return e[t]||(e[t]=$n(n))}function Nn(e){if(ze()){const t=Pn(e);(t._||(t._=$n()))()}}function $n(e){const[t,n]=Ue(e,{equals:!1,internal:!0});return t.$=n,t}const jn={get(e,t,n){if(t===Rn)return e;if(t===Ce)return n;if(t===_e)return Nn(e),n;const r=Pn(e),o=r.hasOwnProperty(t);let i=o?r[t]():e[t];if(t===kn||"__proto__"===t)return i;if(!o){const n=Object.getOwnPropertyDescriptor(e,t);!ze()||"function"==typeof i&&!e.hasOwnProperty(t)||n&&n.get||(i=Mn(r,t,i)())}return An(i)?Ln(i):i},has(e,t){return t===Rn||t===Ce||t===_e||t===kn||"__proto__"===t||(this.get(e,t,e),t in e)},set:()=>!0,deleteProperty:()=>!0,ownKeys:function(e){return Nn(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor:function(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return n&&!n.get&&n.configurable&&t!==Ce&&t!==kn&&t!==On?(delete n.value,delete n.writable,n.get=()=>e[Ce][t],n):n}};function In(e,t,n,r=!1){if(!r&&e[t]===n)return;const o=e[t],i=e.length;void 0===n?delete e[t]:e[t]=n;let s,a=Pn(e);(s=Mn(a,t,o))&&s.$((()=>n)),Array.isArray(e)&&e.length!==i&&(s=Mn(a,"length",i))&&s.$(e.length),(s=a._)&&s.$()}function Un(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];In(e,o,t[o])}}function Wn(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const i=typeof r,s=Array.isArray(e);if(Array.isArray(r)){for(let o=0;o<r.length;o++)Wn(e,[r[o]].concat(t),n);return}if(s&&"function"===i){for(let o=0;o<e.length;o++)r(e[o],o)&&Wn(e,[o].concat(t),n);return}if(s&&"object"===i){const{from:o=0,to:i=e.length-1,by:s=1}=r;for(let r=o;r<=i;r+=s)Wn(e,[r].concat(t),n);return}if(t.length>1)return void Wn(e[r],t,[r].concat(n));o=e[r],n=[r].concat(n)}let i=t[0];"function"==typeof i&&(i=i(o,n),i===o)||void 0===r&&null==i||(i=Tn(i),void 0===r||An(o)&&An(i)&&!Array.isArray(i)?Un(o,i):In(e,r,i))}function Bn(...[e,t]){const n=Tn(e||{}),r=Array.isArray(n);return[Ln(n),function(...e){qe((()=>{r&&1===e.length?function(e,t){if("function"==typeof t&&(t=t(e)),t=Tn(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const r=t[n];e[n]!==r&&In(e,n,r)}In(e,"length",r)}else Un(e,t)}(n,e[0]):Wn(n,e)}))}]}var Kn=(e=>(e.DARK="DARK",e.LIGHT="LIGHT",e))(Kn||{});const Dn={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#31A6F5",foreground:"#FFFFFF"},accent:"#31A6F5",icon:{primary:"#0F0F0F",secondary:"#7A8999",tertiary:"#C1CAD2",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#FFFFFF",secondary:"#F1F3F5",segment:"#FFFFFF"},text:{primary:"#0F0F0F",secondary:"#6A7785"}};var Fn=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===qn}(e)}(e)};var qn="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Hn(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Qn((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Vn(e,t,n){return e.concat(t).map((function(e){return Hn(e,n)}))}function zn(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function Gn(e,t){try{return t in e}catch(n){return!1}}function Yn(e,t,n){var r={};return n.isMergeableObject(e)&&zn(e).forEach((function(t){r[t]=Hn(e[t],n)})),zn(t).forEach((function(o){(function(e,t){return Gn(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(Gn(e,o)&&n.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return Qn;var n=t.customMerge(e);return"function"==typeof n?n:Qn}(o,n)(e[o],t[o],n):r[o]=Hn(t[o],n))})),r}function Qn(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Vn,n.isMergeableObject=n.isMergeableObject||Fn,n.cloneUnlessOtherwiseSpecified=Hn;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Yn(e,t,n):Hn(t,n)}Qn.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return Qn(e,n,t)}),{})};var Jn=Qn;function Zn(e){return"[object Object]"===Object.prototype.toString.call(e)}function Xn(e){var t,n;return!1!==Zn(e)&&(void 0===(t=e.constructor)||!1!==Zn(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}function er(e,t){if(!e)return t;return Jn(t,e,{arrayMerge:(e,t,n)=>t,isMergeableObject:Xn})}const[tr,nr]=Bn({theme:Kn.LIGHT,colors:Dn,borderRadius:"m"}),rr={[Kn.LIGHT]:Dn,[Kn.DARK]:{constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#31A6F5",foreground:"#FFFFFF"},accent:"#E5E5EA",icon:{primary:"#E5E5EA",secondary:"#909099",tertiary:"#434347",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#121214",secondary:"#18181A",segment:"#262629"},text:{primary:"#E5E5EA",secondary:"#7D7D85"}}},or={[Kn.LIGHT]:void 0,[Kn.DARK]:void 0};function ir(e,t){t&&(or[Kn.DARK]=er(t[Kn.DARK],or[Kn.DARK]),or[Kn.LIGHT]=er(t[Kn.LIGHT],or[Kn.LIGHT])),nr({theme:e,colors:er(or[e],rr[e])})}const sr="tc-root",ar="tc-disable-scroll",lr="tc-using-mouse",cr=()=>{document.body.addEventListener("mousedown",(()=>document.body.classList.add(lr))),document.body.addEventListener("keydown",(e=>{"Tab"===e.key&&document.body.classList.remove(lr)}));return pt(xn`
|
|
2
|
-
${
|
|
1
|
+
var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__publicField=(e,t,n)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),n),__async=(e,t,n)=>new Promise(((r,o)=>{var i=e=>{try{a(n.next(e))}catch(t){o(t)}},s=e=>{try{a(n.throw(e))}catch(t){o(t)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,s);a((n=n.apply(e,t)).next())}));!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TON_CONNECT_UI={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var r,o,i,s={exports:{}};o=t,i=function(){var e={};function t(e){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e))throw new TypeError("invalid encoding")}return e.decodeUTF8=function(e){if("string"!=typeof e)throw new TypeError("expected string");var t,n=unescape(encodeURIComponent(e)),r=new Uint8Array(n.length);for(t=0;t<n.length;t++)r[t]=n.charCodeAt(t);return r},e.encodeUTF8=function(e){var t,n=[];for(t=0;t<e.length;t++)n.push(String.fromCharCode(e[t]));return decodeURIComponent(escape(n.join("")))},"undefined"==typeof atob?void 0!==Buffer.from?(e.encodeBase64=function(e){return Buffer.from(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(Buffer.from(e,"base64"),0))}):(e.encodeBase64=function(e){return new Buffer(e).toString("base64")},e.decodeBase64=function(e){return t(e),new Uint8Array(Array.prototype.slice.call(new Buffer(e,"base64"),0))}):(e.encodeBase64=function(e){var t,n=[],r=e.length;for(t=0;t<r;t++)n.push(String.fromCharCode(e[t]));return btoa(n.join(""))},e.decodeBase64=function(e){t(e);var n,r=atob(e),o=new Uint8Array(r.length);for(n=0;n<r.length;n++)o[n]=r.charCodeAt(n);return o}),e},(r=s).exports?r.exports=i():(o.nacl||(o.nacl={}),o.nacl.util=i());const a=s.exports;function l(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var c={exports:{}};const u=n(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));!function(e){!function(e){var t=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},n=function(){throw new Error("no PRNG")},r=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var i=t(),s=t([1]),a=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),d=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),h=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),g=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function y(e,t,n,r,o){var i,s=0;for(i=0;i<o;i++)s|=e[t+i]^n[r+i];return(1&s-1>>>8)-1}function m(e,t,n,r){return y(e,t,n,r,16)}function v(e,t,n,r){return y(e,t,n,r,32)}function w(e,t,n,r){!function(e,t,n,r){for(var o,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,g=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,m=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,v=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,b=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,x=i,C=s,_=a,E=l,S=c,R=u,L=d,k=h,O=f,A=g,T=p,M=y,P=m,N=v,I=w,$=b,j=0;j<20;j+=2)x^=(o=(P^=(o=(O^=(o=(S^=(o=x+P|0)<<7|o>>>25)+x|0)<<9|o>>>23)+S|0)<<13|o>>>19)+O|0)<<18|o>>>14,R^=(o=(C^=(o=(N^=(o=(A^=(o=R+C|0)<<7|o>>>25)+R|0)<<9|o>>>23)+A|0)<<13|o>>>19)+N|0)<<18|o>>>14,T^=(o=(L^=(o=(_^=(o=(I^=(o=T+L|0)<<7|o>>>25)+T|0)<<9|o>>>23)+I|0)<<13|o>>>19)+_|0)<<18|o>>>14,$^=(o=(M^=(o=(k^=(o=(E^=(o=$+M|0)<<7|o>>>25)+$|0)<<9|o>>>23)+E|0)<<13|o>>>19)+k|0)<<18|o>>>14,x^=(o=(E^=(o=(_^=(o=(C^=(o=x+E|0)<<7|o>>>25)+x|0)<<9|o>>>23)+C|0)<<13|o>>>19)+_|0)<<18|o>>>14,R^=(o=(S^=(o=(k^=(o=(L^=(o=R+S|0)<<7|o>>>25)+R|0)<<9|o>>>23)+L|0)<<13|o>>>19)+k|0)<<18|o>>>14,T^=(o=(A^=(o=(O^=(o=(M^=(o=T+A|0)<<7|o>>>25)+T|0)<<9|o>>>23)+M|0)<<13|o>>>19)+O|0)<<18|o>>>14,$^=(o=(I^=(o=(N^=(o=(P^=(o=$+I|0)<<7|o>>>25)+$|0)<<9|o>>>23)+P|0)<<13|o>>>19)+N|0)<<18|o>>>14;x=x+i|0,C=C+s|0,_=_+a|0,E=E+l|0,S=S+c|0,R=R+u|0,L=L+d|0,k=k+h|0,O=O+f|0,A=A+g|0,T=T+p|0,M=M+y|0,P=P+m|0,N=N+v|0,I=I+w|0,$=$+b|0,e[0]=x>>>0&255,e[1]=x>>>8&255,e[2]=x>>>16&255,e[3]=x>>>24&255,e[4]=C>>>0&255,e[5]=C>>>8&255,e[6]=C>>>16&255,e[7]=C>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=E>>>0&255,e[13]=E>>>8&255,e[14]=E>>>16&255,e[15]=E>>>24&255,e[16]=S>>>0&255,e[17]=S>>>8&255,e[18]=S>>>16&255,e[19]=S>>>24&255,e[20]=R>>>0&255,e[21]=R>>>8&255,e[22]=R>>>16&255,e[23]=R>>>24&255,e[24]=L>>>0&255,e[25]=L>>>8&255,e[26]=L>>>16&255,e[27]=L>>>24&255,e[28]=k>>>0&255,e[29]=k>>>8&255,e[30]=k>>>16&255,e[31]=k>>>24&255,e[32]=O>>>0&255,e[33]=O>>>8&255,e[34]=O>>>16&255,e[35]=O>>>24&255,e[36]=A>>>0&255,e[37]=A>>>8&255,e[38]=A>>>16&255,e[39]=A>>>24&255,e[40]=T>>>0&255,e[41]=T>>>8&255,e[42]=T>>>16&255,e[43]=T>>>24&255,e[44]=M>>>0&255,e[45]=M>>>8&255,e[46]=M>>>16&255,e[47]=M>>>24&255,e[48]=P>>>0&255,e[49]=P>>>8&255,e[50]=P>>>16&255,e[51]=P>>>24&255,e[52]=N>>>0&255,e[53]=N>>>8&255,e[54]=N>>>16&255,e[55]=N>>>24&255,e[56]=I>>>0&255,e[57]=I>>>8&255,e[58]=I>>>16&255,e[59]=I>>>24&255,e[60]=$>>>0&255,e[61]=$>>>8&255,e[62]=$>>>16&255,e[63]=$>>>24&255}(e,t,n,r)}function b(e,t,n,r){!function(e,t,n,r){for(var o,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,d=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,f=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,g=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,m=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,v=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,b=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,x=0;x<20;x+=2)i^=(o=(m^=(o=(f^=(o=(c^=(o=i+m|0)<<7|o>>>25)+i|0)<<9|o>>>23)+c|0)<<13|o>>>19)+f|0)<<18|o>>>14,u^=(o=(s^=(o=(v^=(o=(g^=(o=u+s|0)<<7|o>>>25)+u|0)<<9|o>>>23)+g|0)<<13|o>>>19)+v|0)<<18|o>>>14,p^=(o=(d^=(o=(a^=(o=(w^=(o=p+d|0)<<7|o>>>25)+p|0)<<9|o>>>23)+w|0)<<13|o>>>19)+a|0)<<18|o>>>14,b^=(o=(y^=(o=(h^=(o=(l^=(o=b+y|0)<<7|o>>>25)+b|0)<<9|o>>>23)+l|0)<<13|o>>>19)+h|0)<<18|o>>>14,i^=(o=(l^=(o=(a^=(o=(s^=(o=i+l|0)<<7|o>>>25)+i|0)<<9|o>>>23)+s|0)<<13|o>>>19)+a|0)<<18|o>>>14,u^=(o=(c^=(o=(h^=(o=(d^=(o=u+c|0)<<7|o>>>25)+u|0)<<9|o>>>23)+d|0)<<13|o>>>19)+h|0)<<18|o>>>14,p^=(o=(g^=(o=(f^=(o=(y^=(o=p+g|0)<<7|o>>>25)+p|0)<<9|o>>>23)+y|0)<<13|o>>>19)+f|0)<<18|o>>>14,b^=(o=(w^=(o=(v^=(o=(m^=(o=b+w|0)<<7|o>>>25)+b|0)<<9|o>>>23)+m|0)<<13|o>>>19)+v|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=u>>>0&255,e[5]=u>>>8&255,e[6]=u>>>16&255,e[7]=u>>>24&255,e[8]=p>>>0&255,e[9]=p>>>8&255,e[10]=p>>>16&255,e[11]=p>>>24&255,e[12]=b>>>0&255,e[13]=b>>>8&255,e[14]=b>>>16&255,e[15]=b>>>24&255,e[16]=d>>>0&255,e[17]=d>>>8&255,e[18]=d>>>16&255,e[19]=d>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=f>>>0&255,e[25]=f>>>8&255,e[26]=f>>>16&255,e[27]=f>>>24&255,e[28]=g>>>0&255,e[29]=g>>>8&255,e[30]=g>>>16&255,e[31]=g>>>24&255}(e,t,n,r)}var x=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function C(e,t,n,r,o,i,s){var a,l,c=new Uint8Array(16),u=new Uint8Array(64);for(l=0;l<16;l++)c[l]=0;for(l=0;l<8;l++)c[l]=i[l];for(;o>=64;){for(w(u,c,s,x),l=0;l<64;l++)e[t+l]=n[r+l]^u[l];for(a=1,l=8;l<16;l++)a=a+(255&c[l])|0,c[l]=255&a,a>>>=8;o-=64,t+=64,r+=64}if(o>0)for(w(u,c,s,x),l=0;l<o;l++)e[t+l]=n[r+l]^u[l];return 0}function _(e,t,n,r,o){var i,s,a=new Uint8Array(16),l=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=r[s];for(;n>=64;){for(w(l,a,o,x),s=0;s<64;s++)e[t+s]=l[s];for(i=1,s=8;s<16;s++)i=i+(255&a[s])|0,a[s]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(w(l,a,o,x),s=0;s<n;s++)e[t+s]=l[s];return 0}function E(e,t,n,r,o){var i=new Uint8Array(32);b(i,r,o,x);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=r[a+16];return _(e,t,n,s,i)}function S(e,t,n,r,o,i,s){var a=new Uint8Array(32);b(a,i,s,x);for(var l=new Uint8Array(8),c=0;c<8;c++)l[c]=i[c+16];return C(e,t,n,r,o,l,a)}var R=function(e){var t,n,r,o,i,s,a,l;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,n=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|n<<3),r=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|r<<6),o=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|o<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(o>>>4|i<<12),this.r[5]=i>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|s<<2),a=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|a<<5),l=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(a>>>8|l<<8),this.r[9]=l>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function L(e,t,n,r,o,i){var s=new R(i);return s.update(n,r,o),s.finish(e,t),0}function k(e,t,n,r,o,i){var s=new Uint8Array(16);return L(s,0,n,r,o,i),m(e,t,s,0)}function O(e,t,n,r,o){var i;if(n<32)return-1;for(S(e,0,t,0,n,r,o),L(e,16,e,32,n-32,e),i=0;i<16;i++)e[i]=0;return 0}function A(e,t,n,r,o){var i,s=new Uint8Array(32);if(n<32)return-1;if(E(s,0,32,r,o),0!==k(t,16,t,32,n-32,s))return-1;for(S(e,0,t,0,n,r,o),i=0;i<32;i++)e[i]=0;return 0}function T(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function M(e){var t,n,r=1;for(t=0;t<16;t++)n=e[t]+r+65535,r=Math.floor(n/65536),e[t]=n-65536*r;e[0]+=r-1+37*(r-1)}function P(e,t,n){for(var r,o=~(n-1),i=0;i<16;i++)r=o&(e[i]^t[i]),e[i]^=r,t[i]^=r}function N(e,n){var r,o,i,s=t(),a=t();for(r=0;r<16;r++)a[r]=n[r];for(M(a),M(a),M(a),o=0;o<2;o++){for(s[0]=a[0]-65517,r=1;r<15;r++)s[r]=a[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,P(a,s,1-i)}for(r=0;r<16;r++)e[2*r]=255&a[r],e[2*r+1]=a[r]>>8}function I(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return N(n,e),N(r,t),v(n,0,r,0)}function $(e){var t=new Uint8Array(32);return N(t,e),1&t[0]}function j(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function W(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function U(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function B(e,t,n){var r,o,i=0,s=0,a=0,l=0,c=0,u=0,d=0,h=0,f=0,g=0,p=0,y=0,m=0,v=0,w=0,b=0,x=0,C=0,_=0,E=0,S=0,R=0,L=0,k=0,O=0,A=0,T=0,M=0,P=0,N=0,I=0,$=n[0],j=n[1],W=n[2],U=n[3],B=n[4],K=n[5],D=n[6],F=n[7],q=n[8],H=n[9],V=n[10],z=n[11],G=n[12],Y=n[13],Q=n[14],J=n[15];i+=(r=t[0])*$,s+=r*j,a+=r*W,l+=r*U,c+=r*B,u+=r*K,d+=r*D,h+=r*F,f+=r*q,g+=r*H,p+=r*V,y+=r*z,m+=r*G,v+=r*Y,w+=r*Q,b+=r*J,s+=(r=t[1])*$,a+=r*j,l+=r*W,c+=r*U,u+=r*B,d+=r*K,h+=r*D,f+=r*F,g+=r*q,p+=r*H,y+=r*V,m+=r*z,v+=r*G,w+=r*Y,b+=r*Q,x+=r*J,a+=(r=t[2])*$,l+=r*j,c+=r*W,u+=r*U,d+=r*B,h+=r*K,f+=r*D,g+=r*F,p+=r*q,y+=r*H,m+=r*V,v+=r*z,w+=r*G,b+=r*Y,x+=r*Q,C+=r*J,l+=(r=t[3])*$,c+=r*j,u+=r*W,d+=r*U,h+=r*B,f+=r*K,g+=r*D,p+=r*F,y+=r*q,m+=r*H,v+=r*V,w+=r*z,b+=r*G,x+=r*Y,C+=r*Q,_+=r*J,c+=(r=t[4])*$,u+=r*j,d+=r*W,h+=r*U,f+=r*B,g+=r*K,p+=r*D,y+=r*F,m+=r*q,v+=r*H,w+=r*V,b+=r*z,x+=r*G,C+=r*Y,_+=r*Q,E+=r*J,u+=(r=t[5])*$,d+=r*j,h+=r*W,f+=r*U,g+=r*B,p+=r*K,y+=r*D,m+=r*F,v+=r*q,w+=r*H,b+=r*V,x+=r*z,C+=r*G,_+=r*Y,E+=r*Q,S+=r*J,d+=(r=t[6])*$,h+=r*j,f+=r*W,g+=r*U,p+=r*B,y+=r*K,m+=r*D,v+=r*F,w+=r*q,b+=r*H,x+=r*V,C+=r*z,_+=r*G,E+=r*Y,S+=r*Q,R+=r*J,h+=(r=t[7])*$,f+=r*j,g+=r*W,p+=r*U,y+=r*B,m+=r*K,v+=r*D,w+=r*F,b+=r*q,x+=r*H,C+=r*V,_+=r*z,E+=r*G,S+=r*Y,R+=r*Q,L+=r*J,f+=(r=t[8])*$,g+=r*j,p+=r*W,y+=r*U,m+=r*B,v+=r*K,w+=r*D,b+=r*F,x+=r*q,C+=r*H,_+=r*V,E+=r*z,S+=r*G,R+=r*Y,L+=r*Q,k+=r*J,g+=(r=t[9])*$,p+=r*j,y+=r*W,m+=r*U,v+=r*B,w+=r*K,b+=r*D,x+=r*F,C+=r*q,_+=r*H,E+=r*V,S+=r*z,R+=r*G,L+=r*Y,k+=r*Q,O+=r*J,p+=(r=t[10])*$,y+=r*j,m+=r*W,v+=r*U,w+=r*B,b+=r*K,x+=r*D,C+=r*F,_+=r*q,E+=r*H,S+=r*V,R+=r*z,L+=r*G,k+=r*Y,O+=r*Q,A+=r*J,y+=(r=t[11])*$,m+=r*j,v+=r*W,w+=r*U,b+=r*B,x+=r*K,C+=r*D,_+=r*F,E+=r*q,S+=r*H,R+=r*V,L+=r*z,k+=r*G,O+=r*Y,A+=r*Q,T+=r*J,m+=(r=t[12])*$,v+=r*j,w+=r*W,b+=r*U,x+=r*B,C+=r*K,_+=r*D,E+=r*F,S+=r*q,R+=r*H,L+=r*V,k+=r*z,O+=r*G,A+=r*Y,T+=r*Q,M+=r*J,v+=(r=t[13])*$,w+=r*j,b+=r*W,x+=r*U,C+=r*B,_+=r*K,E+=r*D,S+=r*F,R+=r*q,L+=r*H,k+=r*V,O+=r*z,A+=r*G,T+=r*Y,M+=r*Q,P+=r*J,w+=(r=t[14])*$,b+=r*j,x+=r*W,C+=r*U,_+=r*B,E+=r*K,S+=r*D,R+=r*F,L+=r*q,k+=r*H,O+=r*V,A+=r*z,T+=r*G,M+=r*Y,P+=r*Q,N+=r*J,b+=(r=t[15])*$,s+=38*(C+=r*W),a+=38*(_+=r*U),l+=38*(E+=r*B),c+=38*(S+=r*K),u+=38*(R+=r*D),d+=38*(L+=r*F),h+=38*(k+=r*q),f+=38*(O+=r*H),g+=38*(A+=r*V),p+=38*(T+=r*z),y+=38*(M+=r*G),m+=38*(P+=r*Y),v+=38*(N+=r*Q),w+=38*(I+=r*J),i=(r=(i+=38*(x+=r*j))+(o=1)+65535)-65536*(o=Math.floor(r/65536)),s=(r=s+o+65535)-65536*(o=Math.floor(r/65536)),a=(r=a+o+65535)-65536*(o=Math.floor(r/65536)),l=(r=l+o+65535)-65536*(o=Math.floor(r/65536)),c=(r=c+o+65535)-65536*(o=Math.floor(r/65536)),u=(r=u+o+65535)-65536*(o=Math.floor(r/65536)),d=(r=d+o+65535)-65536*(o=Math.floor(r/65536)),h=(r=h+o+65535)-65536*(o=Math.floor(r/65536)),f=(r=f+o+65535)-65536*(o=Math.floor(r/65536)),g=(r=g+o+65535)-65536*(o=Math.floor(r/65536)),p=(r=p+o+65535)-65536*(o=Math.floor(r/65536)),y=(r=y+o+65535)-65536*(o=Math.floor(r/65536)),m=(r=m+o+65535)-65536*(o=Math.floor(r/65536)),v=(r=v+o+65535)-65536*(o=Math.floor(r/65536)),w=(r=w+o+65535)-65536*(o=Math.floor(r/65536)),b=(r=b+o+65535)-65536*(o=Math.floor(r/65536)),i=(r=(i+=o-1+37*(o-1))+(o=1)+65535)-65536*(o=Math.floor(r/65536)),s=(r=s+o+65535)-65536*(o=Math.floor(r/65536)),a=(r=a+o+65535)-65536*(o=Math.floor(r/65536)),l=(r=l+o+65535)-65536*(o=Math.floor(r/65536)),c=(r=c+o+65535)-65536*(o=Math.floor(r/65536)),u=(r=u+o+65535)-65536*(o=Math.floor(r/65536)),d=(r=d+o+65535)-65536*(o=Math.floor(r/65536)),h=(r=h+o+65535)-65536*(o=Math.floor(r/65536)),f=(r=f+o+65535)-65536*(o=Math.floor(r/65536)),g=(r=g+o+65535)-65536*(o=Math.floor(r/65536)),p=(r=p+o+65535)-65536*(o=Math.floor(r/65536)),y=(r=y+o+65535)-65536*(o=Math.floor(r/65536)),m=(r=m+o+65535)-65536*(o=Math.floor(r/65536)),v=(r=v+o+65535)-65536*(o=Math.floor(r/65536)),w=(r=w+o+65535)-65536*(o=Math.floor(r/65536)),b=(r=b+o+65535)-65536*(o=Math.floor(r/65536)),i+=o-1+37*(o-1),e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=c,e[5]=u,e[6]=d,e[7]=h,e[8]=f,e[9]=g,e[10]=p,e[11]=y,e[12]=m,e[13]=v,e[14]=w,e[15]=b}function K(e,t){B(e,t,t)}function D(e,n){var r,o=t();for(r=0;r<16;r++)o[r]=n[r];for(r=253;r>=0;r--)K(o,o),2!==r&&4!==r&&B(o,o,n);for(r=0;r<16;r++)e[r]=o[r]}function F(e,n){var r,o=t();for(r=0;r<16;r++)o[r]=n[r];for(r=250;r>=0;r--)K(o,o),1!==r&&B(o,o,n);for(r=0;r<16;r++)e[r]=o[r]}function q(e,n,r){var o,i,s=new Uint8Array(32),l=new Float64Array(80),c=t(),u=t(),d=t(),h=t(),f=t(),g=t();for(i=0;i<31;i++)s[i]=n[i];for(s[31]=127&n[31]|64,s[0]&=248,j(l,r),i=0;i<16;i++)u[i]=l[i],h[i]=c[i]=d[i]=0;for(c[0]=h[0]=1,i=254;i>=0;--i)P(c,u,o=s[i>>>3]>>>(7&i)&1),P(d,h,o),W(f,c,d),U(c,c,d),W(d,u,h),U(u,u,h),K(h,f),K(g,c),B(c,d,c),B(d,u,f),W(f,c,d),U(c,c,d),K(u,c),U(d,h,g),B(c,d,a),W(c,c,h),B(d,d,c),B(c,h,g),B(h,u,l),K(u,f),P(c,u,o),P(d,h,o);for(i=0;i<16;i++)l[i+16]=c[i],l[i+32]=d[i],l[i+48]=u[i],l[i+64]=h[i];var p=l.subarray(32),y=l.subarray(16);return D(p,p),B(y,y,p),N(e,y),0}function H(e,t){return q(e,t,o)}function V(e,t){return n(t,32),H(e,t)}function z(e,t,n){var o=new Uint8Array(32);return q(o,n,t),b(e,r,o,x)}R.prototype.blocks=function(e,t,n){for(var r,o,i,s,a,l,c,u,d,h,f,g,p,y,m,v,w,b,x,C=this.fin?0:2048,_=this.h[0],E=this.h[1],S=this.h[2],R=this.h[3],L=this.h[4],k=this.h[5],O=this.h[6],A=this.h[7],T=this.h[8],M=this.h[9],P=this.r[0],N=this.r[1],I=this.r[2],$=this.r[3],j=this.r[4],W=this.r[5],U=this.r[6],B=this.r[7],K=this.r[8],D=this.r[9];n>=16;)h=d=0,h+=(_+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*P,h+=(E+=8191&(r>>>13|(o=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*D),h+=(S+=8191&(o>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*K),h+=(R+=8191&(i>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*B),d=(h+=(L+=8191&(s>>>4|(a=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*U))>>>13,h&=8191,h+=(k+=a>>>1&8191)*(5*W),h+=(O+=8191&(a>>>14|(l=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*j),h+=(A+=8191&(l>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*$),h+=(T+=8191&(c>>>8|(u=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*I),f=d+=(h+=(M+=u>>>5|C)*(5*N))>>>13,f+=_*N,f+=E*P,f+=S*(5*D),f+=R*(5*K),d=(f+=L*(5*B))>>>13,f&=8191,f+=k*(5*U),f+=O*(5*W),f+=A*(5*j),f+=T*(5*$),d+=(f+=M*(5*I))>>>13,f&=8191,g=d,g+=_*I,g+=E*N,g+=S*P,g+=R*(5*D),d=(g+=L*(5*K))>>>13,g&=8191,g+=k*(5*B),g+=O*(5*U),g+=A*(5*W),g+=T*(5*j),p=d+=(g+=M*(5*$))>>>13,p+=_*$,p+=E*I,p+=S*N,p+=R*P,d=(p+=L*(5*D))>>>13,p&=8191,p+=k*(5*K),p+=O*(5*B),p+=A*(5*U),p+=T*(5*W),y=d+=(p+=M*(5*j))>>>13,y+=_*j,y+=E*$,y+=S*I,y+=R*N,d=(y+=L*P)>>>13,y&=8191,y+=k*(5*D),y+=O*(5*K),y+=A*(5*B),y+=T*(5*U),m=d+=(y+=M*(5*W))>>>13,m+=_*W,m+=E*j,m+=S*$,m+=R*I,d=(m+=L*N)>>>13,m&=8191,m+=k*P,m+=O*(5*D),m+=A*(5*K),m+=T*(5*B),v=d+=(m+=M*(5*U))>>>13,v+=_*U,v+=E*W,v+=S*j,v+=R*$,d=(v+=L*I)>>>13,v&=8191,v+=k*N,v+=O*P,v+=A*(5*D),v+=T*(5*K),w=d+=(v+=M*(5*B))>>>13,w+=_*B,w+=E*U,w+=S*W,w+=R*j,d=(w+=L*$)>>>13,w&=8191,w+=k*I,w+=O*N,w+=A*P,w+=T*(5*D),b=d+=(w+=M*(5*K))>>>13,b+=_*K,b+=E*B,b+=S*U,b+=R*W,d=(b+=L*j)>>>13,b&=8191,b+=k*$,b+=O*I,b+=A*N,b+=T*P,x=d+=(b+=M*(5*D))>>>13,x+=_*D,x+=E*K,x+=S*B,x+=R*U,d=(x+=L*W)>>>13,x&=8191,x+=k*j,x+=O*$,x+=A*I,x+=T*N,_=h=8191&(d=(d=((d+=(x+=M*P)>>>13)<<2)+d|0)+(h&=8191)|0),E=f+=d>>>=13,S=g&=8191,R=p&=8191,L=y&=8191,k=m&=8191,O=v&=8191,A=w&=8191,T=b&=8191,M=x&=8191,t+=16,n-=16;this.h[0]=_,this.h[1]=E,this.h[2]=S,this.h[3]=R,this.h[4]=L,this.h[5]=k,this.h[6]=O,this.h[7]=A,this.h[8]=T,this.h[9]=M},R.prototype.finish=function(e,t){var n,r,o,i,s=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,s[0]=this.h[0]+5,n=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this.h[i]+n,n=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,r=(1^n)-1,i=0;i<10;i++)s[i]&=r;for(r=~r,i=0;i<10;i++)this.h[i]=this.h[i]&r|s[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},R.prototype.update=function(e,t,n){var r,o;if(this.leftover){for((o=16-this.leftover)>n&&(o=n),r=0;r<o;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(o=n-n%16,this.blocks(e,t,o),t+=o,n-=o),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var G=O,Y=A;var Q=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function J(e,t,n,r){for(var o,i,s,a,l,c,u,d,h,f,g,p,y,m,v,w,b,x,C,_,E,S,R,L,k,O,A=new Int32Array(16),T=new Int32Array(16),M=e[0],P=e[1],N=e[2],I=e[3],$=e[4],j=e[5],W=e[6],U=e[7],B=t[0],K=t[1],D=t[2],F=t[3],q=t[4],H=t[5],V=t[6],z=t[7],G=0;r>=128;){for(C=0;C<16;C++)_=8*C+G,A[C]=n[_+0]<<24|n[_+1]<<16|n[_+2]<<8|n[_+3],T[C]=n[_+4]<<24|n[_+5]<<16|n[_+6]<<8|n[_+7];for(C=0;C<80;C++)if(o=M,i=P,s=N,a=I,l=$,c=j,u=W,U,h=B,f=K,g=D,p=F,y=q,m=H,v=V,z,R=65535&(S=z),L=S>>>16,k=65535&(E=U),O=E>>>16,R+=65535&(S=(q>>>14|$<<18)^(q>>>18|$<<14)^($>>>9|q<<23)),L+=S>>>16,k+=65535&(E=($>>>14|q<<18)^($>>>18|q<<14)^(q>>>9|$<<23)),O+=E>>>16,R+=65535&(S=q&H^~q&V),L+=S>>>16,k+=65535&(E=$&j^~$&W),O+=E>>>16,E=Q[2*C],R+=65535&(S=Q[2*C+1]),L+=S>>>16,k+=65535&E,O+=E>>>16,E=A[C%16],L+=(S=T[C%16])>>>16,k+=65535&E,O+=E>>>16,k+=(L+=(R+=65535&S)>>>16)>>>16,R=65535&(S=x=65535&R|L<<16),L=S>>>16,k=65535&(E=b=65535&k|(O+=k>>>16)<<16),O=E>>>16,R+=65535&(S=(B>>>28|M<<4)^(M>>>2|B<<30)^(M>>>7|B<<25)),L+=S>>>16,k+=65535&(E=(M>>>28|B<<4)^(B>>>2|M<<30)^(B>>>7|M<<25)),O+=E>>>16,L+=(S=B&K^B&D^K&D)>>>16,k+=65535&(E=M&P^M&N^P&N),O+=E>>>16,d=65535&(k+=(L+=(R+=65535&S)>>>16)>>>16)|(O+=k>>>16)<<16,w=65535&R|L<<16,R=65535&(S=p),L=S>>>16,k=65535&(E=a),O=E>>>16,L+=(S=x)>>>16,k+=65535&(E=b),O+=E>>>16,P=o,N=i,I=s,$=a=65535&(k+=(L+=(R+=65535&S)>>>16)>>>16)|(O+=k>>>16)<<16,j=l,W=c,U=u,M=d,K=h,D=f,F=g,q=p=65535&R|L<<16,H=y,V=m,z=v,B=w,C%16==15)for(_=0;_<16;_++)E=A[_],R=65535&(S=T[_]),L=S>>>16,k=65535&E,O=E>>>16,E=A[(_+9)%16],R+=65535&(S=T[(_+9)%16]),L+=S>>>16,k+=65535&E,O+=E>>>16,b=A[(_+1)%16],R+=65535&(S=((x=T[(_+1)%16])>>>1|b<<31)^(x>>>8|b<<24)^(x>>>7|b<<25)),L+=S>>>16,k+=65535&(E=(b>>>1|x<<31)^(b>>>8|x<<24)^b>>>7),O+=E>>>16,b=A[(_+14)%16],L+=(S=((x=T[(_+14)%16])>>>19|b<<13)^(b>>>29|x<<3)^(x>>>6|b<<26))>>>16,k+=65535&(E=(b>>>19|x<<13)^(x>>>29|b<<3)^b>>>6),O+=E>>>16,O+=(k+=(L+=(R+=65535&S)>>>16)>>>16)>>>16,A[_]=65535&k|O<<16,T[_]=65535&R|L<<16;R=65535&(S=B),L=S>>>16,k=65535&(E=M),O=E>>>16,E=e[0],L+=(S=t[0])>>>16,k+=65535&E,O+=E>>>16,O+=(k+=(L+=(R+=65535&S)>>>16)>>>16)>>>16,e[0]=M=65535&k|O<<16,t[0]=B=65535&R|L<<16,R=65535&(S=K),L=S>>>16,k=65535&(E=P),O=E>>>16,E=e[1],L+=(S=t[1])>>>16,k+=65535&E,O+=E>>>16,O+=(k+=(L+=(R+=65535&S)>>>16)>>>16)>>>16,e[1]=P=65535&k|O<<16,t[1]=K=65535&R|L<<16,R=65535&(S=D),L=S>>>16,k=65535&(E=N),O=E>>>16,E=e[2],L+=(S=t[2])>>>16,k+=65535&E,O+=E>>>16,O+=(k+=(L+=(R+=65535&S)>>>16)>>>16)>>>16,e[2]=N=65535&k|O<<16,t[2]=D=65535&R|L<<16,R=65535&(S=F),L=S>>>16,k=65535&(E=I),O=E>>>16,E=e[3],L+=(S=t[3])>>>16,k+=65535&E,O+=E>>>16,O+=(k+=(L+=(R+=65535&S)>>>16)>>>16)>>>16,e[3]=I=65535&k|O<<16,t[3]=F=65535&R|L<<16,R=65535&(S=q),L=S>>>16,k=65535&(E=$),O=E>>>16,E=e[4],L+=(S=t[4])>>>16,k+=65535&E,O+=E>>>16,O+=(k+=(L+=(R+=65535&S)>>>16)>>>16)>>>16,e[4]=$=65535&k|O<<16,t[4]=q=65535&R|L<<16,R=65535&(S=H),L=S>>>16,k=65535&(E=j),O=E>>>16,E=e[5],L+=(S=t[5])>>>16,k+=65535&E,O+=E>>>16,O+=(k+=(L+=(R+=65535&S)>>>16)>>>16)>>>16,e[5]=j=65535&k|O<<16,t[5]=H=65535&R|L<<16,R=65535&(S=V),L=S>>>16,k=65535&(E=W),O=E>>>16,E=e[6],L+=(S=t[6])>>>16,k+=65535&E,O+=E>>>16,O+=(k+=(L+=(R+=65535&S)>>>16)>>>16)>>>16,e[6]=W=65535&k|O<<16,t[6]=V=65535&R|L<<16,R=65535&(S=z),L=S>>>16,k=65535&(E=U),O=E>>>16,E=e[7],L+=(S=t[7])>>>16,k+=65535&E,O+=E>>>16,O+=(k+=(L+=(R+=65535&S)>>>16)>>>16)>>>16,e[7]=U=65535&k|O<<16,t[7]=z=65535&R|L<<16,G+=128,r-=128}return r}function Z(e,t,n){var r,o=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),a=n;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,J(o,i,t,n),n%=128,r=0;r<n;r++)s[r]=t[a-n+r];for(s[n]=128,s[(n=256-128*(n<112?1:0))-9]=0,p(s,n-8,a/536870912|0,a<<3),J(o,i,s,n),r=0;r<8;r++)p(e,8*r,o[r],i[r]);return 0}function X(e,n){var r=t(),o=t(),i=t(),s=t(),a=t(),l=t(),c=t(),u=t(),h=t();U(r,e[1],e[0]),U(h,n[1],n[0]),B(r,r,h),W(o,e[0],e[1]),W(h,n[0],n[1]),B(o,o,h),B(i,e[3],n[3]),B(i,i,d),B(s,e[2],n[2]),W(s,s,s),U(a,o,r),U(l,s,i),W(c,s,i),W(u,o,r),B(e[0],a,l),B(e[1],u,c),B(e[2],c,l),B(e[3],a,u)}function ee(e,t,n){var r;for(r=0;r<4;r++)P(e[r],t[r],n)}function te(e,n){var r=t(),o=t(),i=t();D(i,n[2]),B(r,n[0],i),B(o,n[1],i),N(e,o),e[31]^=$(r)<<7}function ne(e,t,n){var r,o;for(T(e[0],i),T(e[1],s),T(e[2],s),T(e[3],i),o=255;o>=0;--o)ee(e,t,r=n[o/8|0]>>(7&o)&1),X(t,e),X(e,e),ee(e,t,r)}function re(e,n){var r=[t(),t(),t(),t()];T(r[0],h),T(r[1],f),T(r[2],s),B(r[3],h,f),ne(e,r,n)}function oe(e,r,o){var i,s=new Uint8Array(64),a=[t(),t(),t(),t()];for(o||n(r,32),Z(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,re(a,s),te(e,a),i=0;i<32;i++)r[i+32]=e[i];return 0}var ie=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function se(e,t){var n,r,o,i;for(r=63;r>=32;--r){for(n=0,o=r-32,i=r-12;o<i;++o)t[o]+=n-16*t[r]*ie[o-(r-32)],n=Math.floor((t[o]+128)/256),t[o]-=256*n;t[o]+=n,t[r]=0}for(n=0,o=0;o<32;o++)t[o]+=n-(t[31]>>4)*ie[o],n=t[o]>>8,t[o]&=255;for(o=0;o<32;o++)t[o]-=n*ie[o];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function ae(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;se(e,n)}function le(e,n,r,o){var i,s,a=new Uint8Array(64),l=new Uint8Array(64),c=new Uint8Array(64),u=new Float64Array(64),d=[t(),t(),t(),t()];Z(a,o,32),a[0]&=248,a[31]&=127,a[31]|=64;var h=r+64;for(i=0;i<r;i++)e[64+i]=n[i];for(i=0;i<32;i++)e[32+i]=a[32+i];for(Z(c,e.subarray(32),r+32),ae(c),re(d,c),te(e,d),i=32;i<64;i++)e[i]=o[i];for(Z(l,e,r+64),ae(l),i=0;i<64;i++)u[i]=0;for(i=0;i<32;i++)u[i]=c[i];for(i=0;i<32;i++)for(s=0;s<32;s++)u[i+s]+=l[i]*a[s];return se(e.subarray(32),u),h}function ce(e,n,r,o){var a,l=new Uint8Array(32),u=new Uint8Array(64),d=[t(),t(),t(),t()],h=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),o=t(),a=t(),l=t(),u=t(),d=t(),h=t();return T(e[2],s),j(e[1],n),K(a,e[1]),B(l,a,c),U(a,a,e[2]),W(l,e[2],l),K(u,l),K(d,u),B(h,d,u),B(r,h,a),B(r,r,l),F(r,r),B(r,r,a),B(r,r,l),B(r,r,l),B(e[0],r,l),K(o,e[0]),B(o,o,l),I(o,a)&&B(e[0],e[0],g),K(o,e[0]),B(o,o,l),I(o,a)?-1:($(e[0])===n[31]>>7&&U(e[0],i,e[0]),B(e[3],e[0],e[1]),0)}(h,o))return-1;for(a=0;a<r;a++)e[a]=n[a];for(a=0;a<32;a++)e[a+32]=o[a];if(Z(u,e,r),ae(u),ne(d,h,u),re(h,n.subarray(32)),X(d,h),te(l,d),r-=64,v(n,0,l,0)){for(a=0;a<r;a++)e[a]=0;return-1}for(a=0;a<r;a++)e[a]=n[a+64];return r}var ue=32,de=24,he=16,fe=32,ge=32,pe=de,ye=64,me=32,ve=64;function we(e,t){if(e.length!==ue)throw new Error("bad key size");if(t.length!==de)throw new Error("bad nonce size")}function be(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function xe(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:b,crypto_stream_xor:S,crypto_stream:E,crypto_stream_salsa20_xor:C,crypto_stream_salsa20:_,crypto_onetimeauth:L,crypto_onetimeauth_verify:k,crypto_verify_16:m,crypto_verify_32:v,crypto_secretbox:O,crypto_secretbox_open:A,crypto_scalarmult:q,crypto_scalarmult_base:H,crypto_box_beforenm:z,crypto_box_afternm:G,crypto_box:function(e,t,n,r,o,i){var s=new Uint8Array(32);return z(s,o,i),G(e,t,n,r,s)},crypto_box_open:function(e,t,n,r,o,i){var s=new Uint8Array(32);return z(s,o,i),Y(e,t,n,r,s)},crypto_box_keypair:V,crypto_hash:Z,crypto_sign:le,crypto_sign_keypair:oe,crypto_sign_open:ce,crypto_secretbox_KEYBYTES:ue,crypto_secretbox_NONCEBYTES:de,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:he,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:fe,crypto_box_SECRETKEYBYTES:ge,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:pe,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ye,crypto_sign_PUBLICKEYBYTES:me,crypto_sign_SECRETKEYBYTES:ve,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:c,L:ie,pack25519:N,unpack25519:j,M:B,A:W,S:K,Z:U,pow2523:F,add:X,set25519:T,modL:se,scalarmult:ne,scalarbase:re},e.randomBytes=function(e){var t=new Uint8Array(e);return n(t,e),t},e.secretbox=function(e,t,n){be(e,t,n),we(n,t);for(var r=new Uint8Array(32+e.length),o=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+32]=e[i];return O(o,r,r.length,t,n),o.subarray(he)},e.secretbox.open=function(e,t,n){be(e,t,n),we(n,t);for(var r=new Uint8Array(he+e.length),o=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+he]=e[i];return r.length<32||0!==A(o,r,r.length,t,n)?null:o.subarray(32)},e.secretbox.keyLength=ue,e.secretbox.nonceLength=de,e.secretbox.overheadLength=he,e.scalarMult=function(e,t){if(be(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return q(n,e,t),n},e.scalarMult.base=function(e){if(be(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return H(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,o){var i=e.box.before(r,o);return e.secretbox(t,n,i)},e.box.before=function(e,t){be(e,t),function(e,t){if(e.length!==fe)throw new Error("bad public key size");if(t.length!==ge)throw new Error("bad secret key size")}(e,t);var n=new Uint8Array(32);return z(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,o){var i=e.box.before(r,o);return e.secretbox.open(t,n,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(fe),t=new Uint8Array(ge);return V(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(be(e),e.length!==ge)throw new Error("bad secret key size");var t=new Uint8Array(fe);return H(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},e.box.publicKeyLength=fe,e.box.secretKeyLength=ge,e.box.sharedKeyLength=32,e.box.nonceLength=pe,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(e,t){if(be(e,t),t.length!==ve)throw new Error("bad secret key size");var n=new Uint8Array(ye+e.length);return le(n,e,e.length,t),n},e.sign.open=function(e,t){if(be(e,t),t.length!==me)throw new Error("bad public key size");var n=new Uint8Array(e.length),r=ce(n,e,e.length,t);if(r<0)return null;for(var o=new Uint8Array(r),i=0;i<o.length;i++)o[i]=n[i];return o},e.sign.detached=function(t,n){for(var r=e.sign(t,n),o=new Uint8Array(ye),i=0;i<o.length;i++)o[i]=r[i];return o},e.sign.detached.verify=function(e,t,n){if(be(e,t,n),t.length!==ye)throw new Error("bad signature size");if(n.length!==me)throw new Error("bad public key size");var r,o=new Uint8Array(ye+e.length),i=new Uint8Array(ye+e.length);for(r=0;r<ye;r++)o[r]=t[r];for(r=0;r<e.length;r++)o[r+ye]=e[r];return ce(i,o,o.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(me),t=new Uint8Array(ve);return oe(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(be(e),e.length!==ve)throw new Error("bad secret key size");for(var t=new Uint8Array(me),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},e.sign.keyPair.fromSeed=function(e){if(be(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(me),n=new Uint8Array(ve),r=0;r<32;r++)n[r]=e[r];return oe(t,n,!0),{publicKey:t,secretKey:n}},e.sign.publicKeyLength=me,e.sign.secretKeyLength=ve,e.sign.seedLength=32,e.sign.signatureLength=ye,e.hash=function(e){be(e);var t=new Uint8Array(64);return Z(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return be(e,t),0!==e.length&&0!==t.length&&(e.length===t.length&&0===y(e,0,t,0,e.length))},e.setPRNG=function(e){n=e},function(){var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;if(t&&t.getRandomValues){e.setPRNG((function(e,n){var r,o=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(o.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=o[r];xe(o)}))}else void 0!==l&&(t=u)&&t.randomBytes&&e.setPRNG((function(e,n){var r,o=t.randomBytes(n);for(r=0;r<n;r++)e[r]=o[r];xe(o)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})}(c);const d=c.exports;var h,f,g,p,y,m,v,w,b,x;(f=h||(h={}))[f.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",f[f.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",f[f.MANIFEST_NOT_FOUND_ERROR=2]="MANIFEST_NOT_FOUND_ERROR",f[f.MANIFEST_CONTENT_ERROR=3]="MANIFEST_CONTENT_ERROR",f[f.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",f[f.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",f[f.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",e.CONNECT_ITEM_ERROR_CODES=void 0,(g=e.CONNECT_ITEM_ERROR_CODES||(e.CONNECT_ITEM_ERROR_CODES={}))[g.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",g[g.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",(y=p||(p={}))[y.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",y[y.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",y[y.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",y[y.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",y[y.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",(v=m||(m={}))[v.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",v[v.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",v[v.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",v[v.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",v[v.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",(b=w||(w={}))[b.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",b[b.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",b[b.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",b[b.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED",e.CHAIN=void 0,(x=e.CHAIN||(e.CHAIN={})).MAINNET="-239",x.TESTNET="-3";const C={encode:function(e,t=!1){let n;return e instanceof Uint8Array?n=e:("string"!=typeof e&&(e=JSON.stringify(e)),n=a.decodeUTF8(e)),function(e,t){const n=a.encodeBase64(e);return t?encodeURIComponent(n):n}(n,t)},decode:function(e,t=!1){const n=function(e,t){return t&&(e=decodeURIComponent(e)),a.decodeBase64(e)}(e,t);return{toString:()=>a.encodeUTF8(n),toObject(){try{return JSON.parse(a.encodeUTF8(n))}catch(e){return null}},toUint8Array:()=>n}}};function _(e){let t="";return e.forEach((e=>{t+=("0"+(255&e).toString(16)).slice(-2)})),t}function E(e){if(e.length%2!=0)throw new Error(`Cannot convert ${e} to bytesArray`);const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)t[n/2]=parseInt(e.slice(n,n+2),16);return t}class S{constructor(e){this.nonceLength=24,this.keyPair=e?this.createKeypairFromString(e):this.createKeypair(),this.sessionId=_(this.keyPair.publicKey)}createKeypair(){return d.box.keyPair()}createKeypairFromString(e){return{publicKey:E(e.publicKey),secretKey:E(e.secretKey)}}createNonce(){return d.randomBytes(this.nonceLength)}encrypt(e,t){const n=(new TextEncoder).encode(e),r=this.createNonce();return function(e,t){const n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(r,d.box(n,r,t,this.keyPair.secretKey))}decrypt(e,t){const[n,r]=function(e,t){if(t>=e.length)throw new Error("Index is out of buffer");return[e.slice(0,t),e.slice(t)]}(e,this.nonceLength),o=d.box.open(r,n,t,this.keyPair.secretKey);if(!o)throw new Error(`Decryption error: \n message: ${e.toString()} \n sender pubkey: ${t.toString()} \n keypair pubkey: ${this.keyPair.publicKey.toString()} \n keypair secretkey: ${this.keyPair.secretKey.toString()}`);return(new TextDecoder).decode(o)}stringifyKeypair(){return{publicKey:_(this.keyPair.publicKey),secretKey:_(this.keyPair.secretKey)}}}function R(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(t){i(t)}}function a(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}class L extends Error{constructor(e,t){super(e,t),this.message=`${L.prefix} ${this.constructor.name}${this.info?": "+this.info:""}${e?"\n"+e:""}`,Object.setPrototypeOf(this,L.prototype)}get info(){return""}}L.prefix="[TON_CONNECT_SDK_ERROR]";class k extends L{get info(){return"Passed DappMetadata is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,k.prototype)}}class O extends L{get info(){return"Passed `tonconnect-manifest.json` contains errors. Check format of your manifest. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest"}constructor(...e){super(...e),Object.setPrototypeOf(this,O.prototype)}}class A extends L{get info(){return"Manifest not found. Make sure you added `tonconnect-manifest.json` to the root of your app or passed correct manifestUrl. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest"}constructor(...e){super(...e),Object.setPrototypeOf(this,A.prototype)}}class T extends L{get info(){return"Wallet connection called but wallet already connected. To avoid the error, disconnect the wallet before doing a new connection."}constructor(...e){super(...e),Object.setPrototypeOf(this,T.prototype)}}class M extends L{get info(){return"Send transaction or other protocol methods called while wallet is not connected."}constructor(...e){super(...e),Object.setPrototypeOf(this,M.prototype)}}class P extends L{get info(){return"User rejects the action in the wallet."}constructor(...e){super(...e),Object.setPrototypeOf(this,P.prototype)}}class N extends L{get info(){return"Request to the wallet contains errors."}constructor(...e){super(...e),Object.setPrototypeOf(this,N.prototype)}}class I extends L{get info(){return"App tries to send rpc request to the injected wallet while not connected."}constructor(...e){super(...e),Object.setPrototypeOf(this,I.prototype)}}class $ extends L{get info(){return"There is an attempt to connect to the injected wallet while it is not exists in the webpage."}constructor(...e){super(...e),Object.setPrototypeOf(this,$.prototype)}}class j extends L{get info(){return"Storage was not specified in the `DappMetadata` and default `localStorage` was not detected in the environment."}constructor(...e){super(...e),Object.setPrototypeOf(this,j.prototype)}}class W extends L{get info(){return"An error occurred while fetching the wallets list."}constructor(...e){super(...e),Object.setPrototypeOf(this,W.prototype)}}class U extends L{get info(){return"Passed address is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,U.prototype)}}class B extends L{get info(){return"Passed hex is in incorrect format."}constructor(...e){super(...e),Object.setPrototypeOf(this,B.prototype)}}class K extends L{constructor(...e){super(...e),Object.setPrototypeOf(this,K.prototype)}}const D={[h.UNKNOWN_ERROR]:K,[h.USER_REJECTS_ERROR]:P,[h.BAD_REQUEST_ERROR]:N,[h.UNKNOWN_APP_ERROR]:I,[h.MANIFEST_NOT_FOUND_ERROR]:A,[h.MANIFEST_CONTENT_ERROR]:O};const F=new class{parseError(e){let t=K;return e.code in D&&(t=D[e.code]||K),new t(e.message)}};class q{isError(e){return"error"in e}}const H={[p.UNKNOWN_ERROR]:K,[p.USER_REJECTS_ERROR]:P,[p.BAD_REQUEST_ERROR]:N,[p.UNKNOWN_APP_ERROR]:I};const V=new class extends q{convertToRpcRequest(e){return{method:"sendTransaction",params:[JSON.stringify(e)]}}parseAndThrowError(e){let t=K;throw e.error.code in H&&(t=H[e.error.code]||K),new t(e.error.message)}convertFromRpcResponse(e){return{boc:e.result}}};class z{constructor(e,t){this.storage=e,this.storeKey="ton-connect-storage_http-bridge-gateway::"+t}storeLastEventId(e){return R(this,void 0,void 0,(function*(){return this.storage.setItem(this.storeKey,e)}))}removeLastEventId(){return R(this,void 0,void 0,(function*(){return this.storage.removeItem(this.storeKey)}))}getLastEventId(){return R(this,void 0,void 0,(function*(){const e=yield this.storage.getItem(this.storeKey);return e||null}))}}function G(e,t){return function(e){return"/"===e.slice(-1)?e.slice(0,-1):e}(e)+"/"+t}class Y{constructor(e,t,n,r,o){this.bridgeUrl=t,this.sessionId=n,this.listener=r,this.errorsListener=o,this.ssePath="events",this.postPath="message",this.heartbeatMessage="heartbeat",this.defaultTtl=300,this.isClosed=!1,this.bridgeGatewayStorage=new z(e,t)}registerSession(){return R(this,void 0,void 0,(function*(){const e=new URL(G(this.bridgeUrl,this.ssePath));e.searchParams.append("client_id",this.sessionId);const t=yield this.bridgeGatewayStorage.getLastEventId();if(!this.isClosed)return t&&e.searchParams.append("last_event_id",t),this.eventSource=new EventSource(e.toString()),new Promise(((e,t)=>{this.eventSource.onerror=t,this.eventSource.onopen=()=>{this.eventSource.onerror=this.errorsHandler.bind(this),this.eventSource.onmessage=this.messagesHandler.bind(this),e()}}))}))}send(e,t,n,r){return R(this,void 0,void 0,(function*(){const o=new URL(G(this.bridgeUrl,this.postPath));o.searchParams.append("client_id",this.sessionId),o.searchParams.append("to",t),o.searchParams.append("ttl",(r||this.defaultTtl).toString()),o.searchParams.append("topic",n),yield fetch(o,{method:"post",body:C.encode(e)})}))}pause(){var e;null===(e=this.eventSource)||void 0===e||e.close()}unPause(){return this.registerSession()}close(){var e;this.isClosed=!0,null===(e=this.eventSource)||void 0===e||e.close()}setListener(e){this.listener=e}setErrorsListener(e){this.errorsListener=e}errorsHandler(e){var t,n;if(!this.isClosed){if((null===(t=this.eventSource)||void 0===t?void 0:t.readyState)===EventSource.CLOSED)return this.eventSource.close(),void this.registerSession();if((null===(n=this.eventSource)||void 0===n?void 0:n.readyState)===EventSource.CONNECTING)return void console.debug("[TON_CONNET_SDK_ERROR]: Bridge error",JSON.stringify(e));this.errorsListener(e)}}messagesHandler(e){return R(this,void 0,void 0,(function*(){if(e.data!==this.heartbeatMessage&&(yield this.bridgeGatewayStorage.storeLastEventId(e.lastEventId),!this.isClosed)){let n;try{n=JSON.parse(e.data)}catch(t){throw new L(`Bridge message parse failed, message ${t.data}`)}this.listener(n)}}))}}class Q{constructor(e){this.storage=e,this.storeKey="ton-connect-storage_bridge-connection"}storeConnection(e){return R(this,void 0,void 0,(function*(){if("injected"===e.type)return this.storage.setItem(this.storeKey,JSON.stringify(e));const t={sessionKeyPair:e.session.sessionCrypto.stringifyKeypair(),walletPublicKey:e.session.walletPublicKey,bridgeUrl:e.session.bridgeUrl},n={type:"http",connectEvent:e.connectEvent,session:t,lastWalletEventId:e.lastWalletEventId,nextRpcRequestId:e.nextRpcRequestId};return this.storage.setItem(this.storeKey,JSON.stringify(n))}))}removeConnection(){return R(this,void 0,void 0,(function*(){return this.storage.removeItem(this.storeKey)}))}getConnection(){return R(this,void 0,void 0,(function*(){const e=yield this.storage.getItem(this.storeKey);if(!e)return null;const t=JSON.parse(e);if("injected"===t.type)return t;const n=new S(t.session.sessionKeyPair);return{type:"http",connectEvent:t.connectEvent,lastWalletEventId:t.lastWalletEventId,nextRpcRequestId:t.nextRpcRequestId,session:{sessionCrypto:n,bridgeUrl:t.session.bridgeUrl,walletPublicKey:t.session.walletPublicKey}}}))}getHttpConnection(){return R(this,void 0,void 0,(function*(){const e=yield this.getConnection();if(!e)throw new L("Trying to read HTTP connection source while nothing is stored");if("injected"===e.type)throw new L("Trying to read HTTP connection source while injected connection is stored");return e}))}getInjectedConnection(){return R(this,void 0,void 0,(function*(){const e=yield this.getConnection();if(!e)throw new L("Trying to read Injected bridge connection source while nothing is stored");if("http"===(null==e?void 0:e.type))throw new L("Trying to read Injected bridge connection source while HTTP connection is stored");return e}))}storedConnectionType(){return R(this,void 0,void 0,(function*(){const e=yield this.storage.getItem(this.storeKey);if(!e)return null;return JSON.parse(e).type}))}storeLastWalletEventId(e){return R(this,void 0,void 0,(function*(){const t=yield this.getConnection();if(t&&"http"===t.type)return t.lastWalletEventId=e,this.storeConnection(t)}))}getLastWalletEventId(){return R(this,void 0,void 0,(function*(){const e=yield this.getConnection();if(e&&"lastWalletEventId"in e)return e.lastWalletEventId}))}increaseNextRpcRequestId(){return R(this,void 0,void 0,(function*(){const e=yield this.getConnection();if(e){const t=e.nextRpcRequestId||0;return e.nextRpcRequestId=t+1,this.storeConnection(e)}}))}getNextRpcRequestId(){return R(this,void 0,void 0,(function*(){const e=yield this.getConnection();return e&&e.nextRpcRequestId||0}))}}function J(...e){try{console.debug("[TON_CONNECT_SDK]",...e)}catch(t){}}function Z(...e){try{console.error("[TON_CONNECT_SDK]",...e)}catch(t){}}class X{constructor(e,t){this.storage=e,this.walletConnectionSource=t,this.type="http",this.standardUniversalLink="tc://",this.pendingRequests=new Map,this.session=null,this.gateway=null,this.pendingGateways=[],this.listeners=[],this.connectionStorage=new Q(e)}static fromStorage(e){return R(this,void 0,void 0,(function*(){const t=new Q(e),n=yield t.getHttpConnection();return new X(e,{bridgeUrl:n.session.bridgeUrl})}))}connect(e){this.closeGateways();const t=new S;let n="",r=this.standardUniversalLink;return Array.isArray(this.walletConnectionSource)?(this.pendingGateways=this.walletConnectionSource.map((e=>{const n=new Y(this.storage,e.bridgeUrl,t.sessionId,(()=>{}),(e=>{console.error(e)}));return n.setListener((t=>this.pendingGatewaysListener(n,e.bridgeUrl,t))),n})),this.pendingGateways.forEach((e=>e.registerSession()))):(n=this.walletConnectionSource.bridgeUrl,this.walletConnectionSource.universalLink&&(r=this.walletConnectionSource.universalLink),this.gateway=new Y(this.storage,this.walletConnectionSource.bridgeUrl,t.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),this.gateway.registerSession()),this.session={sessionCrypto:t,bridgeUrl:n},this.generateUniversalLink(r,e)}restoreConnection(){return R(this,void 0,void 0,(function*(){if(Array.isArray(this.walletConnectionSource))throw new L("Internal error. Connection source is array while WalletConnectionSourceHTTP was expected.");this.closeGateways();const e=yield this.connectionStorage.getHttpConnection();e&&(this.session=e.session,this.gateway=new Y(this.storage,this.walletConnectionSource.bridgeUrl,e.session.sessionCrypto.sessionId,this.gatewayListener.bind(this),this.gatewayErrorsListener.bind(this)),yield this.gateway.registerSession(),this.listeners.forEach((t=>t(e.connectEvent))))}))}sendRequest(e,t){return new Promise(((n,r)=>R(this,void 0,void 0,(function*(){if(!this.gateway||!this.session||!("walletPublicKey"in this.session))throw new L("Trying to send bridge request without session");const o=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),J("Send http-bridge request:",Object.assign(Object.assign({},e),{id:o}));const i=this.session.sessionCrypto.encrypt(JSON.stringify(Object.assign(Object.assign({},e),{id:o})),E(this.session.walletPublicKey));this.gateway.send(i,this.session.walletPublicKey,e.method).catch(r),this.pendingRequests.set(o.toString(),n),null==t||t()}))))}closeConnection(){this.closeGateways(),this.listeners=[],this.session=null,this.gateway=null}disconnect(){return R(this,void 0,void 0,(function*(){return new Promise((e=>R(this,void 0,void 0,(function*(){let t=!1;const n=()=>{t=!0,this.removeBridgeAndSession().then(e)};try{yield this.sendRequest({method:"disconnect",params:[]},n)}catch(r){console.debug(r),t||this.removeBridgeAndSession().then(e)}}))))}))}listen(e){return this.listeners.push(e),()=>this.listeners=this.listeners.filter((t=>t!==e))}pause(){var e;null===(e=this.gateway)||void 0===e||e.pause(),this.pendingGateways.forEach((e=>e.pause()))}unPause(){return R(this,void 0,void 0,(function*(){const e=this.pendingGateways.map((e=>e.unPause()));this.gateway&&e.push(this.gateway.unPause()),yield Promise.all(e)}))}pendingGatewaysListener(e,t,n){return R(this,void 0,void 0,(function*(){if(this.pendingGateways.includes(e))return this.closeGateways({except:e}),this.session.bridgeUrl=t,this.gateway=e,this.gateway.setErrorsListener(this.gatewayErrorsListener.bind(this)),this.gateway.setListener(this.gatewayListener.bind(this)),this.gatewayListener(n);e.close()}))}gatewayListener(e){return R(this,void 0,void 0,(function*(){const t=JSON.parse(this.session.sessionCrypto.decrypt(C.decode(e.message).toUint8Array(),E(e.from)));if(J("Wallet message received:",t),!("event"in t)){const e=t.id.toString(),n=this.pendingRequests.get(e);return n?(n(t),void this.pendingRequests.delete(e)):void J(`Response id ${e} doesn't match any request's id`)}if(void 0!==t.id){const e=yield this.connectionStorage.getLastWalletEventId();if(void 0!==e&&t.id<=e)return void Z(`Received event id (=${t.id}) must be greater than stored last wallet event id (=${e}) `);"connect"!==t.event&&(yield this.connectionStorage.storeLastWalletEventId(t.id))}const n=this.listeners;"connect"===t.event&&(yield this.updateSession(t,e.from)),"disconnect"===t.event&&(yield this.removeBridgeAndSession()),n.forEach((e=>e(t)))}))}gatewayErrorsListener(e){return R(this,void 0,void 0,(function*(){throw new L(`Bridge error ${JSON.stringify(e)}`)}))}updateSession(e,t){return R(this,void 0,void 0,(function*(){this.session=Object.assign(Object.assign({},this.session),{walletPublicKey:t});const n=e.payload.items.find((e=>"ton_addr"===e.name)),r=Object.assign(Object.assign({},e),{payload:Object.assign(Object.assign({},e.payload),{items:[n]})});yield this.connectionStorage.storeConnection({type:"http",session:this.session,lastWalletEventId:e.id,connectEvent:r,nextRpcRequestId:0})}))}removeBridgeAndSession(){return R(this,void 0,void 0,(function*(){this.closeConnection(),yield this.connectionStorage.removeConnection()}))}generateUniversalLink(e,t){const n=new URL(e);return n.searchParams.append("v",2..toString()),n.searchParams.append("id",this.session.sessionCrypto.sessionId),n.searchParams.append("r",JSON.stringify(t)),n.toString()}closeGateways(e){var t;null===(t=this.gateway)||void 0===t||t.close(),this.pendingGateways.filter((t=>t!==(null==e?void 0:e.except))).forEach((e=>e.close())),this.pendingGateways=[]}}function ee(e,t){return te(e,[t])}function te(e,t){return!(!e||"object"!=typeof e)&&t.every((t=>t in e))}function ne(){if("undefined"!=typeof window)return window}function re(){var e;const t=null===(e=ne())||void 0===e?void 0:e.location.origin;return t?t+"/tonconnect-manifest.json":""}class oe{constructor(e,t){this.injectedWalletKey=t,this.type="injected",this.unsubscribeCallback=null,this.listenSubscriptions=!1,this.listeners=[];const n=oe.window;if(!oe.isWindowContainsWallet(n,t))throw new $;this.connectionStorage=new Q(e),this.injectedWallet=n[t].tonconnect}static fromStorage(e){return R(this,void 0,void 0,(function*(){const t=new Q(e),n=yield t.getInjectedConnection();return new oe(e,n.jsBridgeKey)}))}static isWalletInjected(e){return oe.isWindowContainsWallet(this.window,e)}static isInsideWalletBrowser(e){return!!oe.isWindowContainsWallet(this.window,e)&&this.window[e].tonconnect.isWalletBrowser}static getCurrentlyInjectedWallets(){if(!this.window)return[];return Object.entries(this.window).filter((([e,t])=>function(e){try{return!(!ee(e,"tonconnect")||!ee(e.tonconnect,"walletInfo"))&&te(e.tonconnect.walletInfo,["name","image","about_url"])}catch(t){return!1}}(t))).map((([e,t])=>({name:t.tonconnect.walletInfo.name,aboutUrl:t.tonconnect.walletInfo.about_url,imageUrl:t.tonconnect.walletInfo.image,tondns:t.tonconnect.walletInfo.tondns,jsBridgeKey:e,injected:!0,embedded:t.tonconnect.isWalletBrowser})))}static isWindowContainsWallet(e,t){return!!e&&t in e&&"object"==typeof e[t]&&"tonconnect"in e[t]}connect(e){this._connect(2,e)}restoreConnection(){return R(this,void 0,void 0,(function*(){try{J("Injected Provider restoring connection...");const e=yield this.injectedWallet.restoreConnection();J("Injected Provider restoring connection response",e),"connect"===e.event?(this.makeSubscriptions(),this.listeners.forEach((t=>t(e)))):yield this.connectionStorage.removeConnection()}catch(e){yield this.connectionStorage.removeConnection(),console.error(e)}}))}closeConnection(){this.listenSubscriptions&&this.injectedWallet.disconnect(),this.closeAllListeners()}disconnect(){return R(this,void 0,void 0,(function*(){return new Promise((e=>{const t=()=>{this.closeAllListeners(),this.connectionStorage.removeConnection().then(e)};try{this.injectedWallet.disconnect(),t()}catch(n){J(n),this.sendRequest({method:"disconnect",params:[]},t)}}))}))}closeAllListeners(){var e;this.listenSubscriptions=!1,this.listeners=[],null===(e=this.unsubscribeCallback)||void 0===e||e.call(this)}listen(e){return this.listeners.push(e),()=>this.listeners=this.listeners.filter((t=>t!==e))}sendRequest(e,t){return R(this,void 0,void 0,(function*(){const n=(yield this.connectionStorage.getNextRpcRequestId()).toString();yield this.connectionStorage.increaseNextRpcRequestId(),J("Send injected-bridge request:",Object.assign(Object.assign({},e),{id:n}));const r=this.injectedWallet.send(Object.assign(Object.assign({},e),{id:n}));return r.then((e=>J("Wallet message received:",e))),null==t||t(),r}))}_connect(e,t){return R(this,void 0,void 0,(function*(){try{J(`Injected Provider connect request: protocolVersion: ${e}, message:`,t);const n=yield this.injectedWallet.connect(e,t);J("Injected Provider connect response:",n),"connect"===n.event&&(yield this.updateSession(),this.makeSubscriptions()),this.listeners.forEach((e=>e(n)))}catch(n){J(n);const e={event:"connect_error",payload:{code:0,message:null==n?void 0:n.toString()}};this.listeners.forEach((t=>t(e)))}}))}makeSubscriptions(){this.listenSubscriptions=!0,this.unsubscribeCallback=this.injectedWallet.listen((e=>{J("Wallet message received:",e),this.listenSubscriptions&&this.listeners.forEach((t=>t(e))),"disconnect"===e.event&&this.disconnect()}))}updateSession(){return this.connectionStorage.storeConnection({type:"injected",jsBridgeKey:this.injectedWalletKey,nextRpcRequestId:0})}}oe.window=ne();class ie{constructor(){const e=ne();if(!(null==e?void 0:e.localStorage))throw new j;this.window=e}getItem(e){return R(this,void 0,void 0,(function*(){return Promise.resolve(this.window.localStorage.getItem(e))}))}removeItem(e){return R(this,void 0,void 0,(function*(){return this.window.localStorage.removeItem(e),Promise.resolve()}))}setItem(e,t){return this.window.localStorage.setItem(e,t),Promise.resolve()}}function se(e){return le(e)&&e.injected}function ae(e){return se(e)&&e.embedded}function le(e){return"jsBridgeKey"in e}function ce(e){return"bridgeUrl"in e}const ue=[{name:"Tonkeeper",image:"https://tonkeeper.com/assets/tonconnect-icon.png",tondns:"tonkeeper.ton",about_url:"https://tonkeeper.com",universal_url:"https://app.tonkeeper.com/ton-connect",bridge:[{type:"sse",url:"https://bridge.tonapi.io/bridge"},{type:"js",key:"tonkeeper"}]},{name:"OpenMask",image:"https://raw.githubusercontent.com/OpenProduct/openmask-extension/main/public/openmask-logo-288.png",about_url:"https://www.openmask.app/",bridge:[{type:"js",key:"openmask"}]},{name:"MyTonWallet",image:"https://mytonwallet.io/icon-256.png",about_url:"https://mytonwallet.io",bridge:[{type:"js",key:"mytonwallet"}]}];class de{constructor(e){this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null,this.walletsListSource="https://raw.githubusercontent.com/ton-blockchain/wallets-list/main/wallets.json",(null==e?void 0:e.walletsListSource)&&(this.walletsListSource=e.walletsListSource),(null==e?void 0:e.cacheTTLMs)&&(this.cacheTTLMs=e.cacheTTLMs)}getWallets(){return R(this,void 0,void 0,(function*(){return this.cacheTTLMs&&this.walletsListCacheCreationTimestamp&&Date.now()>this.walletsListCacheCreationTimestamp+this.cacheTTLMs&&(this.walletsListCache=null),this.walletsListCache||(this.walletsListCache=this.fetchWalletsList(),this.walletsListCache.then((()=>{this.walletsListCacheCreationTimestamp=Date.now()})).catch((()=>{this.walletsListCache=null,this.walletsListCacheCreationTimestamp=null}))),this.walletsListCache}))}getEmbeddedWallet(){return R(this,void 0,void 0,(function*(){const e=(yield this.getWallets()).filter(ae);return 1!==e.length?null:e[0]}))}fetchWalletsList(){return R(this,void 0,void 0,(function*(){let e=[];try{const t=yield fetch(this.walletsListSource);if(e=yield t.json(),!Array.isArray(e))throw new W("Wrong wallets list format, wallets list must be an array.");const n=e.filter((e=>!this.isCorrectWalletConfigDTO(e)));n.length&&(Z(`Wallet(s) ${n.map((e=>e.name)).join(", ")} config format is wrong. They were removed from the wallets list.`),e=e.filter((e=>this.isCorrectWalletConfigDTO(e))))}catch(n){Z(n),e=ue}let t=[];try{t=oe.getCurrentlyInjectedWallets()}catch(n){Z(n)}return this.mergeWalletsLists(this.walletConfigDTOListToWalletConfigList(e),t)}))}walletConfigDTOListToWalletConfigList(e){return e.map((e=>{const t={name:e.name,imageUrl:e.image,aboutUrl:e.about_url,tondns:e.tondns};return e.bridge.forEach((n=>{if("sse"===n.type&&(t.bridgeUrl=n.url,t.universalLink=e.universal_url,t.deepLink=e.deepLink),"js"===n.type){const e=n.key;t.jsBridgeKey=e,t.injected=oe.isWalletInjected(e),t.embedded=oe.isInsideWalletBrowser(e)}})),t}))}mergeWalletsLists(e,t){return[...new Set(e.concat(t).map((e=>e.name))).values()].map((n=>{const r=e.find((e=>e.name===n)),o=t.find((e=>e.name===n));return Object.assign(Object.assign({},r&&Object.assign({},r)),o&&Object.assign({},o))}))}isCorrectWalletConfigDTO(e){if(!e||"object"!=typeof e)return!1;if(!("name"in e)||!("image"in e)||!("about_url"in e))return!1;if(!("bridge"in e)||!Array.isArray(e.bridge)||!e.bridge.length)return!1;const t=e.bridge;if(t.some((e=>!e||"object"!=typeof e||!("type"in e))))return!1;const n=t.find((e=>"sse"===e.type));if(n&&(!("url"in n)||!n.url||!e.universal_url))return!1;const r=t.find((e=>"js"===e.type));return!!(!r||"key"in r&&r.key)}}class he extends L{get info(){return"Wallet doesn't support requested feature method."}constructor(...e){super(...e),Object.setPrototypeOf(this,he.prototype)}}function fe(e,t){const n=e.includes("SendTransaction"),r=e.find((e=>e&&"object"==typeof e&&"SendTransaction"===e.name));if(!n&&!r)throw new he("Wallet doesn't support SendTransaction feature.");if(r&&void 0!==r.maxMessages){if(r.maxMessages<t.requiredMessagesNumber)throw new he(`Wallet is not able to handle such SendTransaction request. Max support messages number is ${r.maxMessages}, but ${t.requiredMessagesNumber} is required.`)}else!function(...e){try{console.warn("[TON_CONNECT_SDK]",...e)}catch(t){}}("Connected wallet didn't provide information about max allowed messages in the SendTransaction request. Request may be rejected by the wallet.")}class ge{constructor(e){if(this.walletsList=new de,this._wallet=null,this.provider=null,this.statusChangeSubscriptions=[],this.statusChangeErrorSubscriptions=[],this.dappSettings={manifestUrl:(null==e?void 0:e.manifestUrl)||re(),storage:(null==e?void 0:e.storage)||new ie},this.walletsList=new de({walletsListSource:null==e?void 0:e.walletsListSource,cacheTTLMs:null==e?void 0:e.walletsListCacheTTLMs}),!this.dappSettings.manifestUrl)throw new k("Dapp tonconnect-manifest.json must be specified if window.location.origin is undefined. See more https://github.com/ton-connect/docs/blob/main/requests-responses.md#app-manifest");this.bridgeConnectionStorage=new Q(this.dappSettings.storage),(null==e?void 0:e.disableAutoPauseConnection)||this.addWindowFocusAndBlurSubscriptions()}static getWallets(){return this.walletsList.getWallets()}get connected(){return null!==this._wallet}get account(){var e;return(null===(e=this._wallet)||void 0===e?void 0:e.account)||null}get wallet(){return this._wallet}set wallet(e){this._wallet=e,this.statusChangeSubscriptions.forEach((e=>e(this._wallet)))}getWallets(){return this.walletsList.getWallets()}onStatusChange(e,t){return this.statusChangeSubscriptions.push(e),t&&this.statusChangeErrorSubscriptions.push(t),()=>{this.statusChangeSubscriptions=this.statusChangeSubscriptions.filter((t=>t!==e)),t&&(this.statusChangeErrorSubscriptions=this.statusChangeErrorSubscriptions.filter((e=>e!==t)))}}connect(e,t){var n;if(this.connected)throw new T;return null===(n=this.provider)||void 0===n||n.closeConnection(),this.provider=this.createProvider(e),this.provider.connect(this.createConnectRequest(t))}restoreConnection(){return R(this,void 0,void 0,(function*(){const[e,t]=yield Promise.all([this.bridgeConnectionStorage.storedConnectionType(),this.walletsList.getEmbeddedWallet()]);try{switch(e){case"http":this.provider=yield X.fromStorage(this.dappSettings.storage);break;case"injected":this.provider=yield oe.fromStorage(this.dappSettings.storage);break;default:if(!t)return;this.provider=yield this.createProvider(t)}}catch(n){return yield this.bridgeConnectionStorage.removeConnection(),void(this.provider=null)}return this.provider.listen(this.walletEventsListener.bind(this)),this.provider.restoreConnection()}))}sendTransaction(e){return R(this,void 0,void 0,(function*(){this.checkConnection(),fe(this.wallet.device.features,{requiredMessagesNumber:e.messages.length});const{validUntil:t}=e,n=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["validUntil"]),r=e.from||this.account.address,o=e.network||this.account.chain,i=yield this.provider.sendRequest(V.convertToRpcRequest(Object.assign(Object.assign({},n),{valid_until:t,from:r,network:o})));return V.isError(i)?V.parseAndThrowError(i):V.convertFromRpcResponse(i)}))}disconnect(){return R(this,void 0,void 0,(function*(){if(!this.connected)throw new M;yield this.provider.disconnect(),this.onWalletDisconnected()}))}pauseConnection(){var e;"http"===(null===(e=this.provider)||void 0===e?void 0:e.type)&&this.provider.pause()}unPauseConnection(){var e;return"http"!==(null===(e=this.provider)||void 0===e?void 0:e.type)?Promise.resolve():this.provider.unPause()}addWindowFocusAndBlurSubscriptions(){const e=function(){if("undefined"!=typeof document)return document}();if(e)try{e.addEventListener("visibilitychange",(()=>{e.hidden?this.pauseConnection():this.unPauseConnection()}))}catch(t){console.error("Cannot subscribe to the document.visibilitychange: ",t)}}createProvider(e){let t;return t=!Array.isArray(e)&&"jsBridgeKey"in e?new oe(this.dappSettings.storage,e.jsBridgeKey):new X(this.dappSettings.storage,e),t.listen(this.walletEventsListener.bind(this)),t}walletEventsListener(e){switch(e.event){case"connect":this.onWalletConnected(e.payload);break;case"connect_error":this.onWalletConnectError(e.payload);break;case"disconnect":this.onWalletDisconnected()}}onWalletConnected(e){const t=e.items.find((e=>"ton_addr"===e.name)),n=e.items.find((e=>"ton_proof"===e.name));if(!t)throw new L("ton_addr connection item was not found");const r={device:e.device,provider:this.provider.type,account:{address:t.address,chain:t.network,walletStateInit:t.walletStateInit,publicKey:t.publicKey}};n&&(r.connectItems={tonProof:n}),this.wallet=r}onWalletConnectError(e){const t=F.parseError(e);if(this.statusChangeErrorSubscriptions.forEach((e=>e(t))),console.debug(t),t instanceof A||t instanceof O)throw console.error(t),t}onWalletDisconnected(){this.wallet=null}checkConnection(){if(!this.connected)throw new M}createConnectRequest(e){const t=[{name:"ton_addr"}];return(null==e?void 0:e.tonProof)&&t.push({name:"ton_proof",payload:e.tonProof}),{manifestUrl:this.dappSettings.manifestUrl,items:t}}}ge.walletsList=new de,ge.isWalletInjected=e=>oe.isWalletInjected(e),ge.isInsideWalletBrowser=e=>oe.isInsideWalletBrowser(e);const pe=17,ye=128;function me(e,t=!1){const{wc:n,hex:r}=function(e){if(!e.includes(":"))throw new U(`Wrong address ${e}. Address must include ":".`);const t=e.split(":");if(2!==t.length)throw new U(`Wrong address ${e}. Address must include ":" only once.`);const n=parseInt(t[0]);if(0!==n&&-1!==n)throw new U(`Wrong address ${e}. WC must be eq 0 or -1, but ${n} received.`);const r=t[1];if(64!==(null==r?void 0:r.length))throw new U(`Wrong address ${e}. Hex part must be 64bytes length, but ${null==r?void 0:r.length} received.`);return{wc:n,hex:we(r)}}(e);let o=pe;t&&(o|=ye);const i=new Int8Array(34);i[0]=o,i[1]=n,i.set(r,2);const s=new Uint8Array(36);return s.set(i),s.set(function(e){const t=4129;let n=0;const r=new Uint8Array(e.length+2);r.set(e);for(let o of r){let e=128;for(;e>0;)n<<=1,o&e&&(n+=1),e>>=1,n>65535&&(n&=65535,n^=t)}return new Uint8Array([Math.floor(n/256),n%256])}(i),34),C.encode(s).replace(/\+/g,"-").replace(/\//g,"_")}const ve={};for(let Sa=0;Sa<=255;Sa++){let e=Sa.toString(16);e.length<2&&(e="0"+e),ve[e]=Sa}function we(e){const t=(e=e.toLowerCase()).length;if(t%2!=0)throw new B("Hex string must have length a multiple of 2: "+e);const n=t/2,r=new Uint8Array(n);for(let o=0;o<n;o++){const t=2*o,n=e.substring(t,t+2);if(!ve.hasOwnProperty(n))throw new B("Invalid hex character: "+n);r[o]=ve[n]}return r}const be={};const xe=Symbol("solid-proxy"),Ce=Symbol("solid-track"),_e={equals:(e,t)=>e===t};let Ee=nt;const Se=1,Re=2,Le={owned:null,cleanups:null,context:null,owner:null},ke={};var Oe=null;let Ae,Te=null,Me=null,Pe=null,Ne=null,Ie=0;function $e(e,t){const n=Me,r=Oe,o=0===e.length,i=o?Le:{owned:null,cleanups:null,context:null,owner:void 0===t?r:t},s=o?e:()=>e((()=>qe((()=>st(i)))));Oe=i,Me=null;try{return tt(s,!0)}finally{Me=n,Oe=r}}function je(e,t){const n={value:e,observers:null,observerSlots:null,comparator:(t=t?Object.assign({},_e,t):_e).equals||void 0};return[Qe.bind(n),e=>("function"==typeof e&&(e=e(n.value)),Je(n,e))]}function We(e,t,n){Ze(Xe(e,t,!0,Se))}function Ue(e,t,n){Ze(Xe(e,t,!1,Se))}function Be(e,t,n){Ee=rt;const r=Xe(e,t,!1,Se);r.user=!0,Ne?Ne.push(r):Ze(r)}function Ke(e,t,n){n=n?Object.assign({},_e,n):_e;const r=Xe(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Ze(r),Qe.bind(r)}function De(e,t,n){let r,o,i;2===arguments.length&&"object"==typeof t||1===arguments.length?(r=!0,o=e,i=t||{}):(r=e,o=t,i=n||{});let s=null,a=ke,l=null,c=!1,u="initialValue"in i,d="function"==typeof r&&Ke(r);const h=new Set,[f,g]=(i.storage||je)(i.initialValue),[p,y]=je(void 0),[m,v]=je(void 0,{equals:!1}),[w,b]=je(u?"ready":"unresolved");if(be.context){let e;l=`${be.context.id}${be.context.count++}`,"initial"===i.ssrLoadFrom?a=i.initialValue:be.load&&(e=be.load(l))&&(a=e[0])}function x(e,t,n,r){return s===e&&(s=null,u=!0,e!==a&&t!==a||!i.onHydrated||queueMicrotask((()=>i.onHydrated(r,{value:t}))),a=ke,function(e,t){tt((()=>{void 0===t&&g((()=>e)),b(void 0!==t?"errored":"ready"),y(t);for(const e of h.keys())e.decrement();h.clear()}),!1)}(t,n)),t}function C(){const e=Ae,t=f(),n=p();if(void 0!==n&&!s)throw n;return Me&&!Me.user&&e&&We((()=>{m(),s&&(e.resolved||h.has(e)||(e.increment(),h.add(e)))})),t}function _(e=!0){if(!1!==e&&c)return;c=!1;const t=d?d():r;if(null==t||!1===t)return void x(s,qe(f));const n=a!==ke?a:qe((()=>o(t,{value:f(),refetching:e})));return"object"==typeof n&&n&&"then"in n?(s=n,c=!0,queueMicrotask((()=>c=!1)),tt((()=>{b(u?"refreshing":"pending"),v()}),!1),n.then((e=>x(n,e,void 0,t)),(e=>x(n,void 0,at(e),t)))):(x(s,n,void 0,t),n)}return Object.defineProperties(C,{state:{get:()=>w()},error:{get:()=>p()},loading:{get(){const e=w();return"pending"===e||"refreshing"===e}},latest:{get(){if(!u)return C();const e=p();if(e&&!s)throw e;return f()}}}),d?We((()=>_(!1))):_(!1),[C,{refetch:_,mutate:g}]}function Fe(e){return tt(e,!1)}function qe(e){if(null===Me)return e();const t=Me;Me=null;try{return e()}finally{Me=t}}function He(e){return null===Oe||(null===Oe.cleanups?Oe.cleanups=[e]:Oe.cleanups.push(e)),e}function Ve(){return Me}function ze(e,t){const n=Symbol("context");return{id:n,Provider:dt(n),defaultValue:e}}function Ge(e){let t;return void 0!==(t=ct(Oe,e.id))?t:e.defaultValue}function Ye(e){const t=Ke(e),n=Ke((()=>ut(t())));return n.toArray=()=>{const e=n();return Array.isArray(e)?e:null!=e?[e]:[]},n}function Qe(){const e=Te;if(this.sources&&(this.state||e))if(this.state===Se||e)Ze(this);else{const e=Pe;Pe=null,tt((()=>ot(this)),!1),Pe=e}if(Me){const e=this.observers?this.observers.length:0;Me.sources?(Me.sources.push(this),Me.sourceSlots.push(e)):(Me.sources=[this],Me.sourceSlots=[e]),this.observers?(this.observers.push(Me),this.observerSlots.push(Me.sources.length-1)):(this.observers=[Me],this.observerSlots=[Me.sources.length-1])}return this.value}function Je(e,t,n){let r=e.value;return e.comparator&&e.comparator(r,t)||(e.value=t,e.observers&&e.observers.length&&tt((()=>{for(let t=0;t<e.observers.length;t+=1){const n=e.observers[t],r=Te&&Te.running;r&&Te.disposed.has(n),(r&&!n.tState||!r&&!n.state)&&(n.pure?Pe.push(n):Ne.push(n),n.observers&&it(n)),r||(n.state=Se)}if(Pe.length>1e6)throw Pe=[],new Error}),!1)),t}function Ze(e){if(!e.fn)return;st(e);const t=Oe,n=Me,r=Ie;Me=Oe=e,function(e,t,n){let r;try{r=e.fn(t)}catch(o){e.pure&&(e.state=Se,e.owned&&e.owned.forEach(st),e.owned=null),lt(o)}(!e.updatedAt||e.updatedAt<=n)&&(null!=e.updatedAt&&"observers"in e?Je(e,r):e.value=r,e.updatedAt=n)}(e,e.value,r),Me=n,Oe=t}function Xe(e,t,n,r=Se,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:Oe,context:null,pure:n};return null===Oe||Oe!==Le&&(Oe.owned?Oe.owned.push(i):Oe.owned=[i]),i}function et(e){const t=Te;if(0===e.state||t)return;if(e.state===Re||t)return ot(e);if(e.suspense&&qe(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<Ie);)(e.state||t)&&n.push(e);for(let r=n.length-1;r>=0;r--)if((e=n[r]).state===Se||t)Ze(e);else if(e.state===Re||t){const t=Pe;Pe=null,tt((()=>ot(e,n[0])),!1),Pe=t}}function tt(e,t){if(Pe)return e();let n=!1;t||(Pe=[]),Ne?n=!0:Ne=[],Ie++;try{const t=e();return function(e){Pe&&(nt(Pe),Pe=null);if(e)return;const t=Ne;Ne=null,t.length&&tt((()=>Ee(t)),!1)}(n),t}catch(r){n||(Ne=null),Pe=null,lt(r)}}function nt(e){for(let t=0;t<e.length;t++)et(e[t])}function rt(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:et(r)}var r;for(be.context&&(be.context=r),t=0;t<n;t++)et(e[t])}function ot(e,t){const n=Te;e.state=0;for(let r=0;r<e.sources.length;r+=1){const o=e.sources[r];o.sources&&(o.state===Se||n?o!==t&&et(o):(o.state===Re||n)&&ot(o,t))}}function it(e){const t=Te;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];r.state&&!t||(r.state=Re,r.pure?Pe.push(r):Ne.push(r),r.observers&&it(r))}}function st(e){let t;if(e.sources)for(;e.sources.length;){const t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){const e=r.pop(),o=t.observerSlots.pop();n<r.length&&(e.sourceSlots[o]=n,r[n]=e,t.observerSlots[n]=o)}}if(e.owned){for(t=0;t<e.owned.length;t++)st(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function at(e){return e instanceof Error||"string"==typeof e?e:new Error("Unknown error")}function lt(e){throw e=at(e)}function ct(e,t){return e?e.context&&void 0!==e.context[t]?e.context[t]:ct(e.owner,t):void 0}function ut(e){if("function"==typeof e&&!e.length)return ut(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=ut(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function dt(e,t){return function(t){let n;return Ue((()=>n=qe((()=>(Oe.context={[e]:t.value},Ye((()=>t.children)))))),void 0),n}}const ht=Symbol("fallback");function ft(e){for(let t=0;t<e.length;t++)e[t]()}function gt(e,t){return qe((()=>e(t||{})))}function pt(){return!0}const yt={get:(e,t,n)=>t===xe?n:e.get(t),has:(e,t)=>t===xe||e.has(t),set:pt,deleteProperty:pt,getOwnPropertyDescriptor:(e,t)=>({configurable:!0,enumerable:!0,get:()=>e.get(t),set:pt,deleteProperty:pt}),ownKeys:e=>e.keys()};function mt(e){return(e="function"==typeof e?e():e)?e:{}}function vt(...e){let t=!1;for(let r=0;r<e.length;r++){const n=e[r];t=t||!!n&&xe in n,e[r]="function"==typeof n?(t=!0,Ke(n)):n}if(t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const r=mt(e[n])[t];if(void 0!==r)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in mt(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(mt(e[n])));return[...new Set(t)]}},yt);const n={};for(let r=e.length-1;r>=0;r--)if(e[r]){const t=Object.getOwnPropertyDescriptors(e[r]);for(const r in t)r in n||Object.defineProperty(n,r,{enumerable:!0,get(){for(let t=e.length-1;t>=0;t--){const n=(e[t]||{})[r];if(void 0!==n)return n}}})}return n}function wt(e,...t){const n=new Set(t.flat());if(xe in e){const r=t.map((t=>new Proxy({get:n=>t.includes(n)?e[n]:void 0,has:n=>t.includes(n)&&n in e,keys:()=>t.filter((t=>t in e))},yt)));return r.push(new Proxy({get:t=>n.has(t)?void 0:e[t],has:t=>!n.has(t)&&t in e,keys:()=>Object.keys(e).filter((e=>!n.has(e)))},yt)),r}const r=Object.getOwnPropertyDescriptors(e);return t.push(Object.keys(r).filter((e=>!n.has(e)))),t.map((t=>{const n={};for(let o=0;o<t.length;o++){const i=t[o];i in e&&Object.defineProperty(n,i,r[i]?r[i]:{get:()=>e[i],set:()=>!0,enumerable:!0})}return n}))}function bt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return Ke(function(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return He((()=>ft(i))),()=>{let l,c,u=e()||[];return u[Ce],qe((()=>{let e,t,h,f,g,p,y,m,v,w=u.length;if(0===w)0!==s&&(ft(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[ht],o[0]=$e((e=>(i[0]=e,n.fallback()))),s=1);else if(0===s){for(o=new Array(w),c=0;c<w;c++)r[c]=u[c],o[c]=$e(d);s=w}else{for(h=new Array(w),f=new Array(w),a&&(g=new Array(w)),p=0,y=Math.min(s,w);p<y&&r[p]===u[p];p++);for(y=s-1,m=w-1;y>=p&&m>=p&&r[y]===u[m];y--,m--)h[m]=o[y],f[m]=i[y],a&&(g[m]=a[y]);for(e=new Map,t=new Array(m+1),c=m;c>=p;c--)v=u[c],l=e.get(v),t[c]=void 0===l?-1:l,e.set(v,c);for(l=p;l<=y;l++)v=r[l],c=e.get(v),void 0!==c&&-1!==c?(h[c]=o[l],f[c]=i[l],a&&(g[c]=a[l]),c=t[c],e.set(v,c)):i[l]();for(c=p;c<w;c++)c in h?(o[c]=h[c],i[c]=f[c],a&&(a[c]=g[c],a[c](c))):o[c]=$e(d);o=o.slice(0,s=w),r=u.slice(0)}return o}));function d(e){if(i[c]=e,a){const[e,n]=je(c);return a[c]=n,t(u[c],e)}return t(u[c])}}}((()=>e.each),e.children,t||void 0))}function xt(e){let t=!1;const n=e.keyed,r=Ke((()=>e.when),void 0,{equals:(e,n)=>t?e===n:!e==!n});return Ke((()=>{const o=r();if(o){const r=e.children,i="function"==typeof r&&r.length>0;return t=n||i,i?qe((()=>r(o))):r}return e.fallback}),void 0,void 0)}function Ct(e){let t=!1,n=!1;const r=Ye((()=>e.children)),o=Ke((()=>{let e=r();Array.isArray(e)||(e=[e]);for(let t=0;t<e.length;t++){const r=e[t].when;if(r)return n=!!e[t].keyed,[t,r,e[t]]}return[-1]}),void 0,{equals:(e,n)=>e[0]===n[0]&&(t?e[1]===n[1]:!e[1]==!n[1])&&e[2]===n[2]});return Ke((()=>{const[r,i,s]=o();if(r<0)return e.fallback;const a=s.children,l="function"==typeof a&&a.length>0;return t=n||l,l?qe((()=>a(i))):a}),void 0,void 0)}function _t(e){return e}const Et=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline","allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"]),St=new Set(["innerHTML","textContent","innerText","children"]),Rt=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Lt=Object.assign(Object.create(null),{class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"}),kt=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Ot=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),At={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};const Tt="_$DX_DELEGATE";function Mt(e,t,n){const r=document.createElement("template");r.innerHTML=e;let o=r.content.firstChild;return n&&(o=o.firstChild),o}function Pt(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function Nt(e,t){null==t?e.removeAttribute("class"):e.className=t}function It(e,t={},n,r){const o={};return r||Ue((()=>o.children=Dt(e,t.children,o.children))),Ue((()=>t.ref&&t.ref(e))),Ue((()=>function(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if("children"===s)continue;o[s]=Bt(e,s,null,o[s],n,i)}for(const s in t){if("children"===s){r||Dt(e,t.children);continue}const a=t[s];o[s]=Bt(e,s,a,o[s],n,i)}}(e,t,n,!0,o,!0))),o}function $t(e,t,n){return qe((()=>e(t,n)))}function jt(e,t,n,r){if(void 0===n||r||(r=[]),"function"!=typeof t)return Dt(e,t,r,n);Ue((r=>Dt(e,t(),r,n)),r)}function Wt(e){let t,n;return be.context&&(t=be.registry.get(n=function(){const e=be.context;return`${e.id}${e.count++}`}()))?(be.completed&&be.completed.add(t),be.registry.delete(n),t):e.cloneNode(!0)}function Ut(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function Bt(e,t,n,r,o,i){let s,a,l;if("style"===t)return function(e,t,n){if(!t)return n?Pt(e,"style"):t;const r=e.style;if("string"==typeof t)return r.cssText=t;let o,i;for(i in"string"==typeof n&&(r.cssText=n=void 0),n||(n={}),t||(t={}),n)null==t[i]&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}(e,n,r);if("classList"===t)return function(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const r=o[i];r&&"undefined"!==r&&!t[r]&&(Ut(e,r,!1),delete n[r])}for(i=0,s=r.length;i<s;i++){const o=r[i],s=!!t[o];o&&"undefined"!==o&&n[o]!==s&&s&&(Ut(e,o,!0),n[o]=s)}return n}(e,n,r);if(n===r)return r;if("ref"===t)i||n(e);else if("on:"===t.slice(0,3)){const o=t.slice(3);r&&e.removeEventListener(o,r),n&&e.addEventListener(o,n)}else if("oncapture:"===t.slice(0,10)){const o=t.slice(10);r&&e.removeEventListener(o,r,!0),n&&e.addEventListener(o,n,!0)}else if("on"===t.slice(0,2)){const o=t.slice(2).toLowerCase(),i=kt.has(o);if(!i&&r){const t=Array.isArray(r)?r[0]:r;e.removeEventListener(o,t)}(i||n)&&(function(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n)}(e,o,n,i),i&&function(e,t=window.document){const n=t[Tt]||(t[Tt]=new Set);for(let r=0,o=e.length;r<o;r++){const o=e[r];n.has(o)||(n.add(o),t.addEventListener(o,Kt))}}([o]))}else if((l=St.has(t))||!o&&(Lt[t]||(a=Et.has(t)))||(s=e.nodeName.includes("-")))"class"===t||"className"===t?Nt(e,n):!s||a||l?e[Lt[t]||t]=n:e[(c=t,c.toLowerCase().replace(/-([a-z])/g,((e,t)=>t.toUpperCase())))]=n;else{const r=o&&t.indexOf(":")>-1&&At[t.split(":")[0]];r?function(e,t,n,r){null==r?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r)}(e,r,t,n):Pt(e,Rt[t]||t,n)}var c;return n}function Kt(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>n||document}),be.registry&&!be.done&&(be.done=!0,document.querySelectorAll("[id^=pl-]").forEach((t=>{for(;t&&8!==t.nodeType&&t.nodeValue!=="pl-"+e;){let e=t.nextSibling;t.remove(),t=e}t&&t.remove()})));n;){const r=n[t];if(r&&!n.disabled){const o=n[`${t}Data`];if(void 0!==o?r.call(n,o,e):r.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function Dt(e,t,n,r,o){for(be.context&&!n&&(n=[...e.childNodes]);"function"==typeof n;)n=n();if(t===n)return n;const i=typeof t,s=void 0!==r;if(e=s&&n[0]&&n[0].parentNode||e,"string"===i||"number"===i){if(be.context)return n;if("number"===i&&(t=t.toString()),s){let o=n[0];o&&3===o.nodeType?o.data=t:o=document.createTextNode(t),n=Ht(e,n,r,o)}else n=""!==n&&"string"==typeof n?e.firstChild.data=t:e.textContent=t}else if(null==t||"boolean"===i){if(be.context)return n;n=Ht(e,n,r)}else{if("function"===i)return Ue((()=>{let o=t();for(;"function"==typeof o;)o=o();n=Dt(e,o,n,r)})),()=>n;if(Array.isArray(t)){const i=[],a=n&&Array.isArray(n);if(Ft(i,t,n,o))return Ue((()=>n=Dt(e,i,n,r,!0))),()=>n;if(be.context){if(!i.length)return n;for(let e=0;e<i.length;e++)if(i[e].parentNode)return n=i}if(0===i.length){if(n=Ht(e,n,r),s)return n}else a?0===n.length?qt(e,i,r):function(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;)if(t[s]!==n[a]){for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const t=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],t)}else if(i===a)for(;s<o;)c&&c.has(t[s])||t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const r=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],r),t[o]=n[i]}else{if(!c){c=new Map;let e=a;for(;e<i;)c.set(n[e],e++)}const r=c.get(t[s]);if(null!=r)if(a<r&&r<i){let l,u=s,d=1;for(;++u<o&&u<i&&null!=(l=c.get(t[u]))&&l===r+d;)d++;if(d>r-a){const o=t[s];for(;a<r;)e.insertBefore(n[a++],o)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}else s++,a++}(e,n,i):(n&&Ht(e),qt(e,i));n=i}else if(t instanceof Node){if(be.context&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Ht(e,n,r,t);Ht(e,n,null,t)}else null!=n&&""!==n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t);n=t}}return n}function Ft(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let s=t[i],a=n&&n[i];if(s instanceof Node)e.push(s);else if(null==s||!0===s||!1===s);else if(Array.isArray(s))o=Ft(e,s,a)||o;else if("function"==typeof s)if(r){for(;"function"==typeof s;)s=s();o=Ft(e,Array.isArray(s)?s:[s],Array.isArray(a)?a:[a])||o}else e.push(s),o=!0;else{const t=String(s);a&&3===a.nodeType&&a.data===t?e.push(a):e.push(document.createTextNode(t))}}return o}function qt(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function Ht(e,t,n,r){if(void 0===n)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let r=!1;for(let i=t.length-1;i>=0;i--){const s=t[i];if(o!==s){const t=s.parentNode===e;r||i?t&&s.remove():t?e.replaceChild(o,s):e.insertBefore(o,n)}else r=!0}}else e.insertBefore(o,n);return[o]}const Vt="http://www.w3.org/2000/svg";function zt(e,t=!1){return t?document.createElementNS(Vt,e):document.createElement(e)}function Gt(e){const{useShadow:t}=e,n=document.createTextNode(""),r=e.mount||document.body;function o(){if(be.context){const[t,n]=je(!1);return queueMicrotask((()=>n(!0))),()=>t()&&e.children}return()=>e.children}if(r instanceof HTMLHeadElement){const[e,t]=je(!1),n=()=>t(!0);$e((t=>jt(r,(()=>e()?t():o()()),null))),He((()=>{be.context?queueMicrotask(n):n()}))}else{const i=zt(e.isSVG?"g":"div",e.isSVG),s=t&&i.attachShadow?i.attachShadow({mode:"open"}):i;Object.defineProperty(i,"_$host",{get:()=>n.parentNode,configurable:!0}),jt(s,o()),r.appendChild(i),e.ref&&e.ref(i),He((()=>r.removeChild(i)))}return n}function Yt(e){const[t,n]=wt(e,["component"]),r=Ke((()=>t.component));return Ke((()=>{const e=r();switch(typeof e){case"function":return qe((()=>e(n)));case"string":const t=Ot.has(e),r=be.context?Wt():zt(e,t);return It(r,n,t),r}}))}const[Qt,Jt]=je(!1),[Zt,Xt]=je(null),[en,tn]=je(null);let nn={data:""},rn=e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||nn,on=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,sn=/\/\*[^]*?\*\/| +/g,an=/\n+/g,ln=(e,t)=>{let n="",r="",o="";for(let i in e){let s=e[i];"@"==i[0]?"i"==i[1]?n=i+" "+s+";":r+="f"==i[1]?ln(s,i):i+"{"+ln(s,"k"==i[1]?"":t)+"}":"object"==typeof s?r+=ln(s,t?t.replace(/([^,])+/g,(e=>i.replace(/(^:.*)|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):i):null!=s&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=ln.p?ln.p(i,s):i+":"+s+";")}return n+(t&&o?t+"{"+o+"}":o)+r},cn={},un=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+un(e[n]);return t}return e},dn=(e,t,n,r,o)=>{let i=un(e),s=cn[i]||(cn[i]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(i));if(!cn[s]){let t=i!==e?e:(e=>{let t,n,r=[{}];for(;t=on.exec(e.replace(sn,""));)t[4]?r.shift():t[3]?(n=t[3].replace(an," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(an," ").trim();return r[0]})(e);cn[s]=ln(o?{["@keyframes "+s]:t}:t,n?"":"."+s)}let a=n&&cn.g?cn.g:null;return n&&(cn.g=cn[s]),l=cn[s],c=t,u=r,(d=a)?c.data=c.data.replace(d,l):-1===c.data.indexOf(l)&&(c.data=u?l+c.data:c.data+l),s;var l,c,u,d},hn=(e,t,n)=>e.reduce(((e,r,o)=>{let i=t[o];if(i&&i.call){let e=i(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;i=t?"."+t:e&&"object"==typeof e?e.props?"":ln(e,""):!1===e?"":e}return e+r+(null==i?"":i)}),"");function fn(e){let t=this||{},n=e.call?e(t.p):e;return dn(n.unshift?n.raw?hn(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,rn(t.target),t.g,t.o,t.k)}fn.bind({g:1});let gn=fn.bind({k:1});const pn=ze();function yn(e){return gt(pn.Provider,{value:e.theme,get children(){return e.children}})}function mn(){return Ge(pn)}function vn(e){let t=this||{};return(...n)=>{const r=r=>{const o=vt(r,{theme:Ge(pn)}),i=vt(o,{get class(){const e=o.class,r="class"in o&&/^go[0-9]+/.test(e);return[e,fn.apply({target:t.target,o:r,p:o,g:t.g},n)].filter(Boolean).join(" ")}}),[s,a]=wt(i,["as","theme"]),l=a,c=s.as||e;let u;return"function"==typeof c?u=c(l):1==t.g?(u=document.createElement(c),It(u,l)):u=Yt(vt({component:c},l)),u};return r.class=e=>qe((()=>fn.apply({target:t.target,p:e,g:t.g},n))),r}}const wn=new Proxy(vn,{get:(e,t)=>e(t)});function bn(){const e=vn.call({g:1},"div").apply(null,arguments);return function(t){return e(t),null}}const xn={common:{close:"Закрыть",get:"Скачать",learnMore:"Подробнее",openExtension:"Расширение",copyLink:"Копировать ссылку",copied:"Скопировано!",yourWallet:"вашем кошельке"},button:{connectWallet:"Подключить кошелёк",dropdown:{copy:"Скопировать адрес",copied:"Адрес скопирован!",disconnect:"Отключить кошелёк"}},notifications:{confirm:{header:"Откройте {{ name }}, чтобы подтвердить транзакцию."},transactionSent:{header:"Транзакция отправлена",text:"Ваша транзакция будет обработана через несколько секунд."},transactionCanceled:{header:"Транзакция отменена",text:"Состояние вашего счёта не изменится."}},walletModal:{loading:"Список кошельков загружается",qrCode:"QR-код",wallets:"Кошельки",universalQRModal:{scanQR:"Отсканируйте код ниже с помощью камеры в вашем TON-кошельке.",openWallet:"Открыть кошелёк",openInstalledWallet:"Открыть кошелёк",dontHave:"Подробнее о TON кошельках"},desktopSelectWalletModal:{selectWallet:"Выберите кошелёк для подключения."},mobileSelectWalletModal:{connectWallet:"Подключите кошелёк",selectWallet:"$walletModal.desktopSelectWalletModal.selectWallet",installedWallet:"Открыть кошелёк"},qrCodeModal:{connectWith:"Подключиться через {{ name }}",scan:"Отсканируйте код ниже.",openWallet:"Открыть {{ name }}",openExtension:"Расширение",dontHave:"У вас нет {{ name }}?"}},actionModal:{confirmTransaction:{header:"Подтвердите действие в {{ name }}",text:"Это займет пару секунд."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"}},Cn={en:_n({common:{close:"Close",get:"GET",learnMore:"Learn more",openExtension:"Open Extension",copyLink:"Copy Link",copied:"Copied!",yourWallet:"your wallet"},button:{connectWallet:"Connect Wallet",dropdown:{copy:"Copy address",copied:"Address copied!",disconnect:"Disconnect"}},notifications:{confirm:{header:"Open {{ name }} to confirm the transaction."},transactionSent:{header:"Transaction sent",text:"Your transaction will be processed in a few seconds."},transactionCanceled:{header:"Transaction canceled",text:"There will be no changes to your account."}},walletModal:{loading:"Loading wallets",qrCode:"QR Code",wallets:"Wallets",universalQRModal:{scanQR:"Scan the code below with a camera in your TON wallet.",openWallet:"Open Wallet",openInstalledWallet:"Open Wallet",dontHave:"Explore TON wallets"},desktopSelectWalletModal:{selectWallet:"Select a wallet to connect."},mobileSelectWalletModal:{connectWallet:"Connect a Wallet",selectWallet:"$walletModal.desktopSelectWalletModal.selectWallet",installedWallet:"Installed Wallet"},qrCodeModal:{connectWith:"Connect with {{ name }}",scan:"Scan the code below.",openWallet:"Open {{ name }}",openExtension:"Open Extension",dontHave:"Don't have {{ name }}?"}},actionModal:{confirmTransaction:{header:"Confirm the transaction in {{ name }}",text:"It will only take a moment."},transactionSent:"$notifications.transactionSent",transactionCanceled:"$notifications.transactionCanceled"}}),ru:_n(xn)};function _n(e){const t=n=>{Object.entries(n).forEach((([r,o])=>{if("object"==typeof o&&o)return t(o);if("string"==typeof o){if("$"===o[0]){const t=o.slice(1).split(".");let i=e;t.forEach((e=>{if(!(e in i))throw new Error(`Cannot parse translations: there is no property ${e} in translation`);i=i[e]})),n[r]=i}"\\$"===o.slice(0,2)&&(n[r]=o.slice(1))}}))};return t(e),e}const En=ze(),Sn=Symbol("store-raw"),Rn=Symbol("store-node"),Ln=Symbol("store-name");function kn(e,t){let n=e[xe];if(!n&&(Object.defineProperty(e,xe,{value:n=new Proxy(e,In)}),!Array.isArray(e))){const t=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let o=0,i=t.length;o<i;o++){const i=t[o];r[i].get&&Object.defineProperty(e,i,{enumerable:r[i].enumerable,get:r[i].get.bind(n)})}}return n}function On(e){let t;return null!=e&&"object"==typeof e&&(e[xe]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function An(e,t=new Set){let n,r,o,i;if(n=null!=e&&e[Sn])return n;if(!On(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,i=e.length;n<i;n++)o=e[n],(r=An(o,t))!==o&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const n=Object.keys(e),s=Object.getOwnPropertyDescriptors(e);for(let a=0,l=n.length;a<l;a++)i=n[a],s[i].get||(o=e[i],(r=An(o,t))!==o&&(e[i]=r))}return e}function Tn(e){let t=e[Rn];return t||Object.defineProperty(e,Rn,{value:t={}}),t}function Mn(e,t,n){return e[t]||(e[t]=Nn(n))}function Pn(e){if(Ve()){const t=Tn(e);(t._||(t._=Nn()))()}}function Nn(e){const[t,n]=je(e,{equals:!1,internal:!0});return t.$=n,t}const In={get(e,t,n){if(t===Sn)return e;if(t===xe)return n;if(t===Ce)return Pn(e),n;const r=Tn(e),o=r.hasOwnProperty(t);let i=o?r[t]():e[t];if(t===Rn||"__proto__"===t)return i;if(!o){const n=Object.getOwnPropertyDescriptor(e,t);!Ve()||"function"==typeof i&&!e.hasOwnProperty(t)||n&&n.get||(i=Mn(r,t,i)())}return On(i)?kn(i):i},has(e,t){return t===Sn||t===xe||t===Ce||t===Rn||"__proto__"===t||(this.get(e,t,e),t in e)},set:()=>!0,deleteProperty:()=>!0,ownKeys:function(e){return Pn(e),Reflect.ownKeys(e)},getOwnPropertyDescriptor:function(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return n&&!n.get&&n.configurable&&t!==xe&&t!==Rn&&t!==Ln?(delete n.value,delete n.writable,n.get=()=>e[xe][t],n):n}};function $n(e,t,n,r=!1){if(!r&&e[t]===n)return;const o=e[t],i=e.length;void 0===n?delete e[t]:e[t]=n;let s,a=Tn(e);(s=Mn(a,t,o))&&s.$((()=>n)),Array.isArray(e)&&e.length!==i&&(s=Mn(a,"length",i))&&s.$(e.length),(s=a._)&&s.$()}function jn(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];$n(e,o,t[o])}}function Wn(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const i=typeof r,s=Array.isArray(e);if(Array.isArray(r)){for(let o=0;o<r.length;o++)Wn(e,[r[o]].concat(t),n);return}if(s&&"function"===i){for(let o=0;o<e.length;o++)r(e[o],o)&&Wn(e,[o].concat(t),n);return}if(s&&"object"===i){const{from:o=0,to:i=e.length-1,by:s=1}=r;for(let r=o;r<=i;r+=s)Wn(e,[r].concat(t),n);return}if(t.length>1)return void Wn(e[r],t,[r].concat(n));o=e[r],n=[r].concat(n)}let i=t[0];"function"==typeof i&&(i=i(o,n),i===o)||void 0===r&&null==i||(i=An(i),void 0===r||On(o)&&On(i)&&!Array.isArray(i)?jn(o,i):$n(e,r,i))}function Un(...[e,t]){const n=An(e||{}),r=Array.isArray(n);return[kn(n),function(...e){Fe((()=>{r&&1===e.length?function(e,t){if("function"==typeof t&&(t=t(e)),t=An(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const r=t[n];e[n]!==r&&$n(e,n,r)}$n(e,"length",r)}else jn(e,t)}(n,e[0]):Wn(n,e)}))}]}var Bn=(e=>(e.DARK="DARK",e.LIGHT="LIGHT",e))(Bn||{});const Kn={constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#31A6F5",foreground:"#FFFFFF"},accent:"#31A6F5",icon:{primary:"#0F0F0F",secondary:"#7A8999",tertiary:"#C1CAD2",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#FFFFFF",secondary:"#F1F3F5",segment:"#FFFFFF"},text:{primary:"#0F0F0F",secondary:"#6A7785"}};var Dn=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Fn}(e)}(e)};var Fn="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function qn(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Yn((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Hn(e,t,n){return e.concat(t).map((function(e){return qn(e,n)}))}function Vn(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function zn(e,t){try{return t in e}catch(n){return!1}}function Gn(e,t,n){var r={};return n.isMergeableObject(e)&&Vn(e).forEach((function(t){r[t]=qn(e[t],n)})),Vn(t).forEach((function(o){(function(e,t){return zn(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(zn(e,o)&&n.isMergeableObject(t[o])?r[o]=function(e,t){if(!t.customMerge)return Yn;var n=t.customMerge(e);return"function"==typeof n?n:Yn}(o,n)(e[o],t[o],n):r[o]=qn(t[o],n))})),r}function Yn(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Hn,n.isMergeableObject=n.isMergeableObject||Dn,n.cloneUnlessOtherwiseSpecified=qn;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Gn(e,t,n):qn(t,n)}Yn.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return Yn(e,n,t)}),{})};var Qn=Yn;function Jn(e){return"[object Object]"===Object.prototype.toString.call(e)}function Zn(e){var t,n;return!1!==Jn(e)&&(void 0===(t=e.constructor)||!1!==Jn(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}function Xn(e,t){if(!e)return t;return Qn(t,e,{arrayMerge:(e,t,n)=>t,isMergeableObject:Zn})}const[er,tr]=Un({theme:Bn.LIGHT,colors:Kn,borderRadius:"m"}),nr={[Bn.LIGHT]:Kn,[Bn.DARK]:{constant:{black:"#000000",white:"#FFFFFF"},connectButton:{background:"#31A6F5",foreground:"#FFFFFF"},accent:"#E5E5EA",icon:{primary:"#E5E5EA",secondary:"#909099",tertiary:"#434347",success:"#29CC6A",error:"#F5A73B"},background:{primary:"#121214",secondary:"#18181A",segment:"#262629"},text:{primary:"#E5E5EA",secondary:"#7D7D85"}}},rr={[Bn.LIGHT]:void 0,[Bn.DARK]:void 0};function or(e,t){t&&(rr[Bn.DARK]=Xn(t[Bn.DARK],rr[Bn.DARK]),rr[Bn.LIGHT]=Xn(t[Bn.LIGHT],rr[Bn.LIGHT])),tr({theme:e,colors:Xn(rr[e],nr[e])})}const ir="tc-root",sr="tc-disable-scroll",ar="tc-using-mouse",lr=()=>{document.body.addEventListener("mousedown",(()=>document.body.classList.add(ar))),document.body.addEventListener("keydown",(e=>{"Tab"===e.key&&document.body.classList.remove(ar)}));return gt(bn`
|
|
2
|
+
${ir} * {
|
|
3
3
|
margin: 0;
|
|
4
4
|
padding: 0;
|
|
5
5
|
box-sizing: border-box;
|
|
@@ -10,37 +10,37 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
10
10
|
-webkit-tap-highlight-color: transparent;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
${
|
|
13
|
+
${ir} img {
|
|
14
14
|
-webkit-user-select: none;
|
|
15
15
|
-webkit-touch-callout: none;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
${
|
|
18
|
+
${ir} *:focus {
|
|
19
19
|
outline: #08f auto 2px;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
${
|
|
22
|
+
${ir} li {
|
|
23
23
|
list-style: none;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
${
|
|
26
|
+
${ir} button {
|
|
27
27
|
outline: none;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
body.${
|
|
30
|
+
body.${sr} {
|
|
31
31
|
position: fixed;
|
|
32
32
|
overflow-y: scroll;
|
|
33
33
|
right: 0;
|
|
34
34
|
left: 0;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
body.${
|
|
37
|
+
body.${ar} ${ir} *:focus {
|
|
38
38
|
outline: none;
|
|
39
39
|
}
|
|
40
|
-
`,{})},
|
|
40
|
+
`,{})},cr=wn.div`
|
|
41
41
|
background-color: ${e=>e.theme.colors.background.secondary};
|
|
42
|
-
`,
|
|
43
|
-
background-color: ${e=>"flat"===e.appearance?"transparent":
|
|
42
|
+
`,ur=e=>{let t;const[n,r]=je(null);return Be((()=>{const t=new window.Image;return t.src=e.src,t.alt=e.alt||"",t.setAttribute("draggable","false"),e.class&&t.classList.add(e.class),t.complete?r(t):(t.addEventListener("load",(()=>r(t))),()=>t.removeEventListener("load",(()=>r(t))))})),[gt(xt,{get when(){return n()},get children(){return n()}}),gt(xt,{get when(){return!n()},get children(){return gt(cr,{get class(){return e.class},ref(e){"function"==typeof t?t(e):t=e}})}})]};function dr(e,t){return"#"===e[0]&&(e=function(e){"#"===e[0]&&(e=e.slice(1));const t=parseInt(e,16);return[t>>16&255,t>>8&255,255&t].join(",")}(e)),`rgba(${e}, ${t})`}function hr(e){return e.toString()+"px"}class fr extends L{constructor(...e){super(...e),Object.setPrototypeOf(this,fr.prototype)}}function gr(e,t="_self"){return window.open(e,t,"noreferrer noopener")}function pr(e){gr(e,"_blank")}function yr(e,t){return function(e,t,n){const r=new URL(e);return r.searchParams.append(t,n),r.toString()}(e,"ret",t)}function mr(){if("undefined"==typeof localStorage)throw new fr("window.localStorage is undefined. localStorage is required for TonConnectUI")}function vr(){if("undefined"!=typeof window)return window}const wr={mobile:440,tablet:1020};function br(e){const t=vr();if(!t)return"desktop"===e;const n=t.innerWidth;switch(e){case"desktop":return n>wr.tablet;case"tablet":return n>wr.mobile;default:return n<=wr.mobile}}function xr(e){switch(e){case"mobile":return`@media (max-width: ${wr.mobile}px)`;case"tablet":return`@media (max-width: ${wr.tablet}px) (min-width: ${wr.mobile}px)`;default:return`@media (min-width: ${wr.tablet}px)`}}const Cr="@media (hover: none)",_r="@media not all and (hover: none)",Er={m:"100vh",s:"8px",none:"0"},Sr={s:.02,m:.04},Rr=wn.button`
|
|
43
|
+
background-color: ${e=>"flat"===e.appearance?"transparent":dr(e.theme.colors.accent,.12)};
|
|
44
44
|
color: ${e=>e.theme.colors.accent};
|
|
45
45
|
|
|
46
46
|
padding: ${e=>"flat"===e.appearance?"0":"9px 16px"};
|
|
@@ -54,25 +54,25 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
54
54
|
|
|
55
55
|
transition: transform 0.125s ease-in-out;
|
|
56
56
|
|
|
57
|
-
${
|
|
57
|
+
${_r} {
|
|
58
58
|
&:hover {
|
|
59
|
-
transform: ${e=>e.disabled?"unset":`scale(${1+
|
|
59
|
+
transform: ${e=>e.disabled?"unset":`scale(${1+Sr[e.scale]})`};
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
&:active {
|
|
64
|
-
transform: ${e=>e.disabled?"unset":`scale(${1-
|
|
64
|
+
transform: ${e=>e.disabled?"unset":`scale(${1-Sr[e.scale]})`};
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
${
|
|
67
|
+
${Cr} {
|
|
68
68
|
&:active {
|
|
69
|
-
transform: ${e=>e.disabled?"unset":`scale(${1-2*
|
|
69
|
+
transform: ${e=>e.disabled?"unset":`scale(${1-2*Sr[e.scale]})`};
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
`;function
|
|
73
|
-
transform: rotate(${e
|
|
72
|
+
`;function Lr(e){const t=qe((()=>Object.keys(e).filter((e=>e.startsWith("data-"))))),[n]=wt(e,t);return n}const kr=e=>{const t=Lr(e);return gt(Rr,vt({get appearance(){return e.appearance||"primary"},get class(){return e.class},onClick:t=>{var n;return null==(n=e.onClick)?void 0:n.call(e,t)},onMouseEnter:t=>{var n;return null==(n=e.onMouseEnter)?void 0:n.call(e,t)},onMouseLeave:t=>{var n;return null==(n=e.onMouseLeave)?void 0:n.call(e,t)},ref(t){const n=e.ref;"function"==typeof n?n(t):e.ref=t},get disabled(){return e.disabled},get scale(){return e.scale||"m"},"data-tc-button":"true"},t,{get children(){return e.children}}))};var Or={exports:{}};!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var s=n.apply(null,o);s&&e.push(s)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&e.push(a)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(Or);const Ar=Or.exports;function Tr(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}const Mr=e=>{let t,n=!0;const[r,o]=je(),[i,s]=je(),a=Ye((()=>e.children)),{onBeforeEnter:l,onEnter:c,onAfterEnter:u,onBeforeExit:d,onExit:h,onAfterExit:f}=e,g=Ke((()=>{const t=e.name||"s";return{enterActiveClass:e.enterActiveClass||t+"-enter-active",enterClass:e.enterClass||t+"-enter",enterToClass:e.enterToClass||t+"-enter-to",exitActiveClass:e.exitActiveClass||t+"-exit-active",exitClass:e.exitClass||t+"-exit",exitToClass:e.exitToClass||t+"-exit-to"}}));function p(t,a){if(!n||e.appear){let n=function(l){!t||l&&l.target!==t||(t.removeEventListener("transitionend",n),t.removeEventListener("animationend",n),t.classList.remove(...h),t.classList.remove(...f),Fe((()=>{r()!==t&&o(t),i()===t&&s(void 0)})),u&&u(t),"inout"===e.mode&&y(t,a))};const d=g().enterClass.split(" "),h=g().enterActiveClass.split(" "),f=g().enterToClass.split(" ");l&&l(t),t.classList.add(...d),t.classList.add(...h),Tr((()=>{t.classList.remove(...d),t.classList.add(...f),c&&c(t,(()=>n())),(!c||c.length<2)&&(t.addEventListener("transitionend",n),t.addEventListener("animationend",n))}))}a&&!e.mode?s(t):o(t)}function y(t,n){const i=g().exitClass.split(" "),s=g().exitActiveClass.split(" "),a=g().exitToClass.split(" ");if(!n.parentNode)return l();function l(i){i&&i.target!==n||(n.removeEventListener("transitionend",l),n.removeEventListener("animationend",l),n.classList.remove(...s),n.classList.remove(...a),r()===n&&o(void 0),f&&f(n),"outin"===e.mode&&p(t,n))}d&&d(n),n.classList.add(...i),n.classList.add(...s),Tr((()=>{n.classList.remove(...i),n.classList.add(...a)})),h&&h(n,(()=>l())),(!h||h.length<2)&&(n.addEventListener("transitionend",l),n.addEventListener("animationend",l))}return We((r=>{for(t=a();"function"==typeof t;)t=t();return qe((()=>(t&&t!==r&&("outin"!==e.mode?p(t,r):n&&o(t)),r&&r!==t&&"inout"!==e.mode&&y(t,r),n=!1,t)))})),[r,i]};function Pr(e){const{top:t,bottom:n,left:r,right:o,width:i,height:s}=e.getBoundingClientRect(),a=e.parentNode.getBoundingClientRect();return{top:t-a.top,bottom:n,left:r-a.left,right:o,width:i,height:s}}const Nr=e=>{const t=Ye((()=>e.children)),n=Ke((()=>{const t=e.name||"s";return{enterActiveClass:e.enterActiveClass||t+"-enter-active",enterClass:e.enterClass||t+"-enter",enterToClass:e.enterToClass||t+"-enter-to",exitActiveClass:e.exitActiveClass||t+"-exit-active",exitClass:e.exitClass||t+"-exit",exitToClass:e.exitToClass||t+"-exit-to",moveClass:e.moveClass||t+"-move"}})),{onBeforeEnter:r,onEnter:o,onAfterEnter:i,onBeforeExit:s,onExit:a,onAfterExit:l}=e,[c,u]=je();let d=[],h=!0;return We((()=>{const e=t(),c=[...e],f=new Set(e),g=new Set(d),p=n().enterClass.split(" "),y=n().enterActiveClass.split(" "),m=n().enterToClass.split(" "),v=n().exitClass.split(" "),w=n().exitActiveClass.split(" "),b=n().exitToClass.split(" ");for(let t=0;t<e.length;t++){const n=e[t];if(!h&&!g.has(n)){let e=function(t){!n||t&&t.target!==n||(n.removeEventListener("transitionend",e),n.removeEventListener("animationend",e),n.classList.remove(...y),n.classList.remove(...m),i&&i(n))};r&&r(n),n.classList.add(...p),n.classList.add(...y),Tr((()=>{n.classList.remove(...p),n.classList.add(...m),o&&o(n,(()=>e())),(!o||o.length<2)&&(n.addEventListener("transitionend",e),n.addEventListener("animationend",e))}))}}for(let t=0;t<d.length;t++){const e=d[t];if(!f.has(e)&&e.parentNode){let n=function(t){t&&t.target!==e||(e.removeEventListener("transitionend",n),e.removeEventListener("animationend",n),e.classList.remove(...w),e.classList.remove(...b),l&&l(e),d=d.filter((t=>t!==e)),u(d))};c.splice(t,0,e),s&&s(e),e.classList.add(...v),e.classList.add(...w),Tr((()=>{e.classList.remove(...v),e.classList.add(...b)})),a&&a(e,(()=>n())),(!a||a.length<2)&&(e.addEventListener("transitionend",n),e.addEventListener("animationend",n))}}d=c,u(c)})),Be((e=>{const t=c();return t.forEach((t=>{let n;(n=e.get(t))?n.new&&(n.new=!1,n.newPos=Pr(t)):e.set(t,n={pos:Pr(t),new:!h}),n.new&&t.addEventListener("transitionend",(()=>{n.new=!1,t.parentNode&&(n.newPos=Pr(t))}),{once:!0}),n.newPos&&(n.pos=n.newPos),n.newPos=Pr(t)})),h?(h=!1,e):(t.forEach((t=>{const n=e.get(t),r=n.pos,o=n.newPos,i=r.left-o.left,s=r.top-o.top;if(i||s){n.moved=!0;const e=t.style;e.transform=`translate(${i}px,${s}px)`,e.transitionDuration="0s"}})),document.body.offsetHeight,t.forEach((t=>{const r=e.get(t);if(r.moved){let e=function(n){n&&n.target!==t||!t.parentNode||n&&!/transform$/.test(n.propertyName)||(t.removeEventListener("transitionend",e),t.classList.remove(...i))};r.moved=!1;const o=t.style,i=n().moveClass.split(" ");t.classList.add(...i),o.transform=o.transitionDuration="",t.addEventListener("transitionend",e)}})),e)}),new Map),c};const Ir=Mt('<svg><path d="M9.1 3.40012L5.5 8.0001L9.1 12.6001" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path></svg>',0,!0),$r={left:0,top:90,right:180,bottom:270},jr=e=>{const t=mn();return gt(wn("svg")`
|
|
73
|
+
transform: rotate(${e=>$r[e.svgDirection]}deg);
|
|
74
74
|
transition: transform 0.1s ease-in-out;
|
|
75
|
-
`,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",get svgDirection(){return e.direction||"left"},get children(){const n=
|
|
75
|
+
`,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",get svgDirection(){return e.direction||"left"},get children(){const n=Ir.cloneNode(!0);return Ue((()=>Pt(n,"stroke",e.fill||t.colors.icon.secondary))),n}})},Wr=Mt('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.90003 3.89991L8.00002 7.9999M8.00002 7.9999L12.1 12.0999M8.00002 7.9999L12.1 3.8999M8.00002 7.9999L3.90002 12.0999" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"></path></svg>'),Ur=e=>{const t=mn();return(()=>{const n=Wr.cloneNode(!0),r=n.firstChild;return Ue((()=>Pt(r,"stroke",e.fill||t.colors.icon.secondary))),n})()},Br=wn.button`
|
|
76
76
|
padding: 0;
|
|
77
77
|
display: flex;
|
|
78
78
|
justify-content: center;
|
|
@@ -86,7 +86,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
86
86
|
|
|
87
87
|
transition: transform 0.125s ease-in-out;
|
|
88
88
|
|
|
89
|
-
${
|
|
89
|
+
${_r} {
|
|
90
90
|
&:hover {
|
|
91
91
|
transform: scale(1.04);
|
|
92
92
|
}
|
|
@@ -96,12 +96,12 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
96
96
|
transform: scale(0.96);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
${
|
|
99
|
+
${Cr} {
|
|
100
100
|
&:active {
|
|
101
101
|
transform: scale(0.92);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
`,
|
|
104
|
+
`,Kr=e=>{const t=Lr(e),n=()=>e.icon||"close";return gt(Br,vt({get class(){return e.class},onClick:()=>e.onClick(),"data-tc-icon-button":"true"},t,{get children(){return[gt(xt,{get when(){return!!e.children},get children(){return e.children}}),gt(xt,{get when(){return!e.children},get children(){return gt(Ct,{get children(){return[gt(_t,{get when(){return"close"===n()},get children(){return gt(Ur,{get fill(){return e.fill}})}}),gt(_t,{get when(){return"arrow"===n()},get children(){return gt(jr,{get fill(){return e.fill}})}})]}})}})]}}))},Dr=wn.div`
|
|
105
105
|
display: flex;
|
|
106
106
|
align-items: center;
|
|
107
107
|
justify-content: center;
|
|
@@ -113,38 +113,38 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
113
113
|
height: 100%;
|
|
114
114
|
background-color: rgba(0, 0, 0, 0.4);
|
|
115
115
|
|
|
116
|
-
${
|
|
116
|
+
${xr("mobile")} {
|
|
117
117
|
align-items: flex-end;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
@media (min-width: ${
|
|
120
|
+
@media (min-width: ${wr.mobile.toString()}px) and (max-height: 600px) {
|
|
121
121
|
padding: 48px 0;
|
|
122
122
|
align-items: flex-start;
|
|
123
123
|
overflow: scroll;
|
|
124
124
|
}
|
|
125
|
-
`,
|
|
125
|
+
`,Fr=fn`
|
|
126
126
|
position: relative;
|
|
127
127
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 16px 64px rgba(0, 0, 0, 0.16);
|
|
128
128
|
min-height: 100px;
|
|
129
129
|
width: 440px;
|
|
130
130
|
padding: 44px 56px 24px;
|
|
131
131
|
|
|
132
|
-
${
|
|
132
|
+
${xr("mobile")} {
|
|
133
133
|
width: 100%;
|
|
134
134
|
}
|
|
135
|
-
`,
|
|
135
|
+
`,qr=wn(Kr)`
|
|
136
136
|
position: absolute;
|
|
137
137
|
right: 16px;
|
|
138
138
|
top: 16px;
|
|
139
|
-
`,
|
|
139
|
+
`,Hr=Mt("<div></div>"),Vr=function(e,t){const n=n=>{var r;return!e.contains(n.target)&&(null==(r=t())?void 0:r())};document.body.addEventListener("click",n),He((()=>document.body.removeEventListener("click",n)))},zr=function(e,t){const n=e=>{var n,r;"Escape"===e.key&&(null==(n=document.activeElement)||n.blur(),null==(r=t())||r())};document.body.addEventListener("keydown",n),He((()=>document.body.removeEventListener("keydown",n)))},Gr={m:"24px",s:"16px",none:"0"},Yr=e=>{const t=mn(),n=Lr(e);return Be((()=>{e.opened?document.documentElement.scrollHeight!==document.documentElement.clientHeight&&(document.body.style.top=hr(-document.documentElement.scrollTop),document.body.classList.add(sr)):(document.body.classList.remove(sr),document.documentElement.scrollTo({top:-parseFloat(getComputedStyle(document.body).top)}),document.body.style.top="auto")})),gt(Mr,{onBeforeEnter:e=>{const t=br("mobile")?200:100;e.animate([{opacity:0},{opacity:1}],{duration:t}),br("mobile")&&e.firstElementChild.animate([{transform:"translateY(390px)"},{transform:"translateY(0)"}],{duration:t})},onExit:(e,t)=>{const n=br("mobile")?200:100,r=e.animate([{opacity:1},{opacity:0}],{duration:n});if(br("mobile")){const o=e.firstElementChild.animate([{transform:"translateY(0)"},{transform:"translateY(390px)"}],{duration:n});Promise.all([r.finished,o.finished]).then(t)}else r.finished.then(t)},get children(){return gt(xt,{get when(){return e.opened},get children(){return gt(Dr,vt({"data-tc-modal":"true"},n,{get children(){const n=Hr.cloneNode(!0);return $t(zr,n,(()=>()=>e.onClose())),$t(Vr,n,(()=>()=>e.onClose())),jt(n,gt(qr,{icon:"close",onClick:()=>e.onClose()}),null),jt(n,(()=>e.children),null),Ue((()=>Nt(n,Ar(Fr,e.class,fn`
|
|
140
140
|
background-color: ${t.colors.background.primary};
|
|
141
|
-
border-radius: ${
|
|
141
|
+
border-radius: ${Gr[t.borderRadius]};
|
|
142
142
|
|
|
143
|
-
${
|
|
144
|
-
border-radius: ${
|
|
145
|
-
${
|
|
143
|
+
${xr("mobile")} {
|
|
144
|
+
border-radius: ${Gr[t.borderRadius]}
|
|
145
|
+
${Gr[t.borderRadius]} 0 0;
|
|
146
146
|
}
|
|
147
|
-
`)))),n}}))}})}})},
|
|
147
|
+
`)))),n}}))}})}})},Qr={m:"22px",s:"12px",none:"0"},Jr={m:"18px",s:"8px",none:"0"},Zr=wn.div`
|
|
148
148
|
display: grid;
|
|
149
149
|
grid-template: 1fr / 1fr 1fr;
|
|
150
150
|
width: fit-content;
|
|
@@ -153,10 +153,10 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
153
153
|
|
|
154
154
|
position: relative;
|
|
155
155
|
padding: 4px;
|
|
156
|
-
border-radius: ${e=>
|
|
156
|
+
border-radius: ${e=>Qr[e.theme.borderRadius]};
|
|
157
157
|
|
|
158
158
|
background-color: ${e=>e.theme.colors.background.secondary};
|
|
159
|
-
`,
|
|
159
|
+
`,Xr=wn.div`
|
|
160
160
|
position: absolute;
|
|
161
161
|
top: 4px;
|
|
162
162
|
left: 4px;
|
|
@@ -164,15 +164,15 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
164
164
|
height: calc(100% - 8px);
|
|
165
165
|
width: calc(50% - 4px);
|
|
166
166
|
|
|
167
|
-
border-radius: ${e=>
|
|
167
|
+
border-radius: ${e=>Jr[e.theme.borderRadius]};
|
|
168
168
|
background-color: ${e=>e.theme.colors.background.segment};
|
|
169
169
|
|
|
170
170
|
transform: ${e=>e.right?"translateX(100%)":"translateX(0)"};
|
|
171
171
|
|
|
172
172
|
transition: transform 0.13s ease-in-out;
|
|
173
|
-
`,
|
|
173
|
+
`,eo=wn.input`
|
|
174
174
|
display: none;
|
|
175
|
-
`,
|
|
175
|
+
`,to=wn.label`
|
|
176
176
|
padding: 9px 12px;
|
|
177
177
|
z-index: 1;
|
|
178
178
|
|
|
@@ -187,18 +187,18 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
187
187
|
> * {
|
|
188
188
|
${e=>e.isActive?"":`color: ${e.theme.colors.text.secondary};`}
|
|
189
189
|
}
|
|
190
|
-
`,
|
|
190
|
+
`,no={m:"16px",s:"8px",none:"0"},ro=wn.div`
|
|
191
191
|
display: flex;
|
|
192
192
|
align-items: center;
|
|
193
193
|
position: relative;
|
|
194
194
|
background-color: ${e=>e.theme.colors.background.secondary};
|
|
195
|
-
border-radius: ${e=>
|
|
196
|
-
padding: ${
|
|
197
|
-
height: ${
|
|
195
|
+
border-radius: ${e=>no[e.theme.borderRadius]};
|
|
196
|
+
padding: ${hr(24)} 0;
|
|
197
|
+
height: ${hr(304)};
|
|
198
198
|
width: 100%;
|
|
199
199
|
|
|
200
200
|
overflow: hidden;
|
|
201
|
-
`,
|
|
201
|
+
`,oo=wn.div`
|
|
202
202
|
position: relative;
|
|
203
203
|
|
|
204
204
|
width: fit-content;
|
|
@@ -217,20 +217,20 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
217
217
|
path {
|
|
218
218
|
fill: ${e=>e.theme.colors.text.primary};
|
|
219
219
|
}
|
|
220
|
-
`,
|
|
220
|
+
`,io=wn.div`
|
|
221
221
|
position: absolute;
|
|
222
|
-
width: ${
|
|
223
|
-
height: ${
|
|
222
|
+
width: ${hr(60)};
|
|
223
|
+
height: ${hr(60)};
|
|
224
224
|
background: ${e=>e.theme.colors.background.secondary};
|
|
225
225
|
|
|
226
226
|
display: flex;
|
|
227
227
|
align-items: center;
|
|
228
228
|
justify-content: center;
|
|
229
|
-
`,
|
|
230
|
-
width: ${e=>
|
|
231
|
-
height: ${e=>
|
|
229
|
+
`,so=wn(ur)`
|
|
230
|
+
width: ${e=>hr(e.size)};
|
|
231
|
+
height: ${e=>hr(e.size)};
|
|
232
232
|
border-radius: 12px;
|
|
233
|
-
`,
|
|
233
|
+
`,ao=wn(kr)`
|
|
234
234
|
filter: drop-shadow(0px 2px 8px rgba(0, 0, 0, 0.08));
|
|
235
235
|
position: absolute;
|
|
236
236
|
bottom: 14px;
|
|
@@ -248,14 +248,14 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
248
248
|
&:active {
|
|
249
249
|
transform: translate(-50%, 0) scale(0.96);
|
|
250
250
|
}
|
|
251
|
-
`;var co={exports:{}};!function(e,t){var n=function(){var e=function(e,t){var n=e,r=u[t],o=null,i=0,s=null,a=[],l={},c=function(e,t){o=function(e){for(var t=new Array(e),n=0;n<e;n+=1){t[n]=new Array(e);for(var r=0;r<e;r+=1)t[n][r]=null}return t}(i=4*n+17),d(0,0),d(i-7,0),d(0,i-7),f(),h(),p(e,t),n>=7&&g(e),null==s&&(s=m(n,r,a)),y(s,t)},d=function(e,t){for(var n=-1;n<=7;n+=1)if(!(e+n<=-1||i<=e+n))for(var r=-1;r<=7;r+=1)t+r<=-1||i<=t+r||(o[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},h=function(){for(var e=8;e<i-8;e+=1)null==o[e][6]&&(o[e][6]=e%2==0);for(var t=8;t<i-8;t+=1)null==o[6][t]&&(o[6][t]=t%2==0)},f=function(){for(var e=w.getPatternPosition(n),t=0;t<e.length;t+=1)for(var r=0;r<e.length;r+=1){var i=e[t],s=e[r];if(null==o[i][s])for(var a=-2;a<=2;a+=1)for(var l=-2;l<=2;l+=1)o[i+a][s+l]=-2==a||2==a||-2==l||2==l||0==a&&0==l}},g=function(e){for(var t=w.getBCHTypeNumber(n),r=0;r<18;r+=1){var s=!e&&1==(t>>r&1);o[Math.floor(r/3)][r%3+i-8-3]=s}for(r=0;r<18;r+=1){s=!e&&1==(t>>r&1);o[r%3+i-8-3][Math.floor(r/3)]=s}},p=function(e,t){for(var n=r<<3|t,s=w.getBCHTypeInfo(n),a=0;a<15;a+=1){var l=!e&&1==(s>>a&1);a<6?o[a][8]=l:a<8?o[a+1][8]=l:o[i-15+a][8]=l}for(a=0;a<15;a+=1){l=!e&&1==(s>>a&1);a<8?o[8][i-a-1]=l:a<9?o[8][15-a-1+1]=l:o[8][15-a-1]=l}o[i-8][8]=!e},y=function(e,t){for(var n=-1,r=i-1,s=7,a=0,l=w.getMaskFunction(t),c=i-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var u=0;u<2;u+=1)if(null==o[r][c-u]){var d=!1;a<e.length&&(d=1==(e[a]>>>s&1)),l(r,c-u)&&(d=!d),o[r][c-u]=d,-1==(s-=1)&&(a+=1,s=7)}if((r+=n)<0||i<=r){r-=n,n=-n;break}}},m=function(e,t,n){for(var r=C.getRSBlocks(e,t),o=_(),i=0;i<n.length;i+=1){var s=n[i];o.put(s.getMode(),4),o.put(s.getLength(),w.getLengthInBits(s.getMode(),e)),s.write(o)}var a=0;for(i=0;i<r.length;i+=1)a+=r[i].dataCount;if(o.getLengthInBits()>8*a)throw"code length overflow. ("+o.getLengthInBits()+">"+8*a+")";for(o.getLengthInBits()+4<=8*a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*a||(o.put(236,8),o.getLengthInBits()>=8*a));)o.put(17,8);return function(e,t){for(var n=0,r=0,o=0,i=new Array(t.length),s=new Array(t.length),a=0;a<t.length;a+=1){var l=t[a].dataCount,c=t[a].totalCount-l;r=Math.max(r,l),o=Math.max(o,c),i[a]=new Array(l);for(var u=0;u<i[a].length;u+=1)i[a][u]=255&e.getBuffer()[u+n];n+=l;var d=w.getErrorCorrectPolynomial(c),h=x(i[a],d.getLength()-1).mod(d);for(s[a]=new Array(d.getLength()-1),u=0;u<s[a].length;u+=1){var f=u+h.getLength()-s[a].length;s[a][u]=f>=0?h.getAt(f):0}}var g=0;for(u=0;u<t.length;u+=1)g+=t[u].totalCount;var p=new Array(g),y=0;for(u=0;u<r;u+=1)for(a=0;a<t.length;a+=1)u<i[a].length&&(p[y]=i[a][u],y+=1);for(u=0;u<o;u+=1)for(a=0;a<t.length;a+=1)u<s[a].length&&(p[y]=s[a][u],y+=1);return p}(o,r)};l.addData=function(e,t){var n=null;switch(t=t||"Byte"){case"Numeric":n=S(e);break;case"Alphanumeric":n=E(e);break;case"Byte":n=R(e);break;case"Kanji":n=k(e);break;default:throw"mode:"+t}a.push(n),s=null},l.isDark=function(e,t){if(e<0||i<=e||t<0||i<=t)throw e+","+t;return o[e][t]},l.getModuleCount=function(){return i},l.make=function(){if(n<1){for(var e=1;e<40;e++){for(var t=C.getRSBlocks(e,r),o=_(),i=0;i<a.length;i++){var s=a[i];o.put(s.getMode(),4),o.put(s.getLength(),w.getLengthInBits(s.getMode(),e)),s.write(o)}var u=0;for(i=0;i<t.length;i++)u+=t[i].dataCount;if(o.getLengthInBits()<=8*u)break}n=e}c(!1,function(){for(var e=0,t=0,n=0;n<8;n+=1){c(!0,n);var r=w.getLostPoint(l);(0==n||e>r)&&(e=r,t=n)}return t}())},l.createTableTag=function(e,t){e=e||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;",n+='">',n+="<tbody>";for(var r=0;r<l.getModuleCount();r+=1){n+="<tr>";for(var o=0;o<l.getModuleCount();o+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+e+"px;",n+=" height: "+e+"px;",n+=" background-color: ",n+=l.isDark(r,o)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return n+="</tbody>",n+="</table>"},l.createSvgTag=function(e,t,n,r){var o={};"object"==typeof arguments[0]&&(e=(o=arguments[0]).cellSize,t=o.margin,n=o.alt,r=o.title),e=e||2,t=void 0===t?4*e:t,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(r="string"==typeof r?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-title":null;var i,s,a,c,u=l.getModuleCount()*e+2*t,d="";for(c="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",d+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',d+=o.scalable?"":' width="'+u+'px" height="'+u+'px"',d+=' viewBox="0 0 '+u+" "+u+'" ',d+=' preserveAspectRatio="xMinYMin meet"',d+=r.text||n.text?' role="img" aria-labelledby="'+v([r.id,n.id].join(" ").trim())+'"':"",d+=">",d+=r.text?'<title id="'+v(r.id)+'">'+v(r.text)+"</title>":"",d+=n.text?'<description id="'+v(n.id)+'">'+v(n.text)+"</description>":"",d+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',d+='<path d="',s=0;s<l.getModuleCount();s+=1)for(a=s*e+t,i=0;i<l.getModuleCount();i+=1)l.isDark(s,i)&&(d+="M"+(i*e+t)+","+a+c);return d+='" stroke="transparent" fill="black"/>',d+="</svg>"},l.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var n=l.getModuleCount()*e+2*t,r=t,o=n-t;return A(n,n,(function(t,n){if(r<=t&&t<o&&r<=n&&n<o){var i=Math.floor((t-r)/e),s=Math.floor((n-r)/e);return l.isDark(s,i)?0:1}return 1}))},l.createImgTag=function(e,t,n){e=e||2,t=void 0===t?4*e:t;var r=l.getModuleCount()*e+2*t,o="";return o+="<img",o+=' src="',o+=l.createDataURL(e,t),o+='"',o+=' width="',o+=r,o+='"',o+=' height="',o+=r,o+='"',n&&(o+=' alt="',o+=v(n),o+='"'),o+="/>"};var v=function(e){for(var t="",n=0;n<e.length;n+=1){var r=e.charAt(n);switch(r){case"<":t+="<";break;case">":t+=">";break;case"&":t+="&";break;case'"':t+=""";break;default:t+=r}}return t};return l.createASCII=function(e,t){if((e=e||1)<2)return function(e){e=void 0===e?2:e;var t,n,r,o,i,s=1*l.getModuleCount()+2*e,a=e,c=s-e,u={"██":"█","█ ":"▀"," █":"▄"," ":" "},d={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(t=0;t<s;t+=2){for(r=Math.floor((t-a)/1),o=Math.floor((t+1-a)/1),n=0;n<s;n+=1)i="█",a<=n&&n<c&&a<=t&&t<c&&l.isDark(r,Math.floor((n-a)/1))&&(i=" "),a<=n&&n<c&&a<=t+1&&t+1<c&&l.isDark(o,Math.floor((n-a)/1))?i+=" ":i+="█",h+=e<1&&t+1>=c?d[i]:u[i];h+="\n"}return s%2&&e>0?h.substring(0,h.length-s-1)+Array(s+1).join("▀"):h.substring(0,h.length-1)}(t);e-=1,t=void 0===t?2*e:t;var n,r,o,i,s=l.getModuleCount()*e+2*t,a=t,c=s-t,u=Array(e+1).join("██"),d=Array(e+1).join(" "),h="",f="";for(n=0;n<s;n+=1){for(o=Math.floor((n-a)/e),f="",r=0;r<s;r+=1)i=1,a<=r&&r<c&&a<=n&&n<c&&l.isDark(o,Math.floor((r-a)/e))&&(i=0),f+=i?u:d;for(o=0;o<e;o+=1)h+=f+"\n"}return h.substring(0,h.length-1)},l.renderTo2dContext=function(e,t){t=t||2;for(var n=l.getModuleCount(),r=0;r<n;r++)for(var o=0;o<n;o++)e.fillStyle=l.isDark(r,o)?"black":"white",e.fillRect(r*t,o*t,t,t)},l};e.stringToBytes=(e.stringToBytesFuncs={default:function(e){for(var t=[],n=0;n<e.length;n+=1){var r=e.charCodeAt(n);t.push(255&r)}return t}}).default,e.createStringToBytes=function(e,t){var n=function(){for(var n=L(e),r=function(){var e=n.read();if(-1==e)throw"eof";return e},o=0,i={};;){var s=n.read();if(-1==s)break;var a=r(),l=r()<<8|r();i[String.fromCharCode(s<<8|a)]=l,o+=1}if(o!=t)throw o+" != "+t;return i}(),r="?".charCodeAt(0);return function(e){for(var t=[],o=0;o<e.length;o+=1){var i=e.charCodeAt(o);if(i<128)t.push(i);else{var s=n[e.charAt(o)];"number"==typeof s?(255&s)==s?t.push(s):(t.push(s>>>8),t.push(255&s)):t.push(r)}}return t}};var t,n,r,o,i,s=1,a=2,l=4,c=8,u={L:1,M:0,Q:3,H:2},d=0,h=1,f=2,g=3,p=4,y=5,m=6,v=7,w=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,r=7973,i=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(o={}).getBCHTypeInfo=function(e){for(var t=e<<10;i(t)-i(n)>=0;)t^=n<<i(t)-i(n);return 21522^(e<<10|t)},o.getBCHTypeNumber=function(e){for(var t=e<<12;i(t)-i(r)>=0;)t^=r<<i(t)-i(r);return e<<12|t},o.getPatternPosition=function(e){return t[e-1]},o.getMaskFunction=function(e){switch(e){case d:return function(e,t){return(e+t)%2==0};case h:return function(e,t){return e%2==0};case f:return function(e,t){return t%3==0};case g:return function(e,t){return(e+t)%3==0};case p:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case y:return function(e,t){return e*t%2+e*t%3==0};case m:return function(e,t){return(e*t%2+e*t%3)%2==0};case v:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw"bad maskPattern:"+e}},o.getErrorCorrectPolynomial=function(e){for(var t=x([1],0),n=0;n<e;n+=1)t=t.multiply(x([1,b.gexp(n)],0));return t},o.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case s:return 10;case a:return 9;case l:case c:return 8;default:throw"mode:"+e}else if(t<27)switch(e){case s:return 12;case a:return 11;case l:return 16;case c:return 10;default:throw"mode:"+e}else{if(!(t<41))throw"type:"+t;switch(e){case s:return 14;case a:return 13;case l:return 16;case c:return 12;default:throw"mode:"+e}}},o.getLostPoint=function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r+=1)for(var o=0;o<t;o+=1){for(var i=0,s=e.isDark(r,o),a=-1;a<=1;a+=1)if(!(r+a<0||t<=r+a))for(var l=-1;l<=1;l+=1)o+l<0||t<=o+l||0==a&&0==l||s==e.isDark(r+a,o+l)&&(i+=1);i>5&&(n+=3+i-5)}for(r=0;r<t-1;r+=1)for(o=0;o<t-1;o+=1){var c=0;e.isDark(r,o)&&(c+=1),e.isDark(r+1,o)&&(c+=1),e.isDark(r,o+1)&&(c+=1),e.isDark(r+1,o+1)&&(c+=1),0!=c&&4!=c||(n+=3)}for(r=0;r<t;r+=1)for(o=0;o<t-6;o+=1)e.isDark(r,o)&&!e.isDark(r,o+1)&&e.isDark(r,o+2)&&e.isDark(r,o+3)&&e.isDark(r,o+4)&&!e.isDark(r,o+5)&&e.isDark(r,o+6)&&(n+=40);for(o=0;o<t;o+=1)for(r=0;r<t-6;r+=1)e.isDark(r,o)&&!e.isDark(r+1,o)&&e.isDark(r+2,o)&&e.isDark(r+3,o)&&e.isDark(r+4,o)&&!e.isDark(r+5,o)&&e.isDark(r+6,o)&&(n+=40);var u=0;for(o=0;o<t;o+=1)for(r=0;r<t;r+=1)e.isDark(r,o)&&(u+=1);return n+=Math.abs(100*u/t/t-50)/5*10},o),b=function(){for(var e=new Array(256),t=new Array(256),n=0;n<8;n+=1)e[n]=1<<n;for(n=8;n<256;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;n<255;n+=1)t[e[n]]=n;var r={glog:function(e){if(e<1)throw"glog("+e+")";return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]}};return r}();function x(e,t){if(void 0===e.length)throw e.length+"/"+t;var n=function(){for(var n=0;n<e.length&&0==e[n];)n+=1;for(var r=new Array(e.length-n+t),o=0;o<e.length-n;o+=1)r[o]=e[o+n];return r}(),r={getAt:function(e){return n[e]},getLength:function(){return n.length},multiply:function(e){for(var t=new Array(r.getLength()+e.getLength()-1),n=0;n<r.getLength();n+=1)for(var o=0;o<e.getLength();o+=1)t[n+o]^=b.gexp(b.glog(r.getAt(n))+b.glog(e.getAt(o)));return x(t,0)},mod:function(e){if(r.getLength()-e.getLength()<0)return r;for(var t=b.glog(r.getAt(0))-b.glog(e.getAt(0)),n=new Array(r.getLength()),o=0;o<r.getLength();o+=1)n[o]=r.getAt(o);for(o=0;o<e.getLength();o+=1)n[o]^=b.gexp(b.glog(e.getAt(o))+t);return x(n,0).mod(e)}};return r}var C=function(){var e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(e,t){var n={};return n.totalCount=e,n.dataCount=t,n},n={};return n.getRSBlocks=function(n,r){var o=function(t,n){switch(n){case u.L:return e[4*(t-1)+0];case u.M:return e[4*(t-1)+1];case u.Q:return e[4*(t-1)+2];case u.H:return e[4*(t-1)+3];default:return}}(n,r);if(void 0===o)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+r;for(var i=o.length/3,s=[],a=0;a<i;a+=1)for(var l=o[3*a+0],c=o[3*a+1],d=o[3*a+2],h=0;h<l;h+=1)s.push(t(c,d));return s},n}(),_=function(){var e=[],t=0,n={getBuffer:function(){return e},getAt:function(t){var n=Math.floor(t/8);return 1==(e[n]>>>7-t%8&1)},put:function(e,t){for(var r=0;r<t;r+=1)n.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return t},putBit:function(n){var r=Math.floor(t/8);e.length<=r&&e.push(0),n&&(e[r]|=128>>>t%8),t+=1}};return n},S=function(e){var t=s,n=e,r={getMode:function(){return t},getLength:function(e){return n.length},write:function(e){for(var t=n,r=0;r+2<t.length;)e.put(o(t.substring(r,r+3)),10),r+=3;r<t.length&&(t.length-r==1?e.put(o(t.substring(r,r+1)),4):t.length-r==2&&e.put(o(t.substring(r,r+2)),7))}},o=function(e){for(var t=0,n=0;n<e.length;n+=1)t=10*t+i(e.charAt(n));return t},i=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+e};return r},E=function(e){var t=a,n=e,r={getMode:function(){return t},getLength:function(e){return n.length},write:function(e){for(var t=n,r=0;r+1<t.length;)e.put(45*o(t.charAt(r))+o(t.charAt(r+1)),11),r+=2;r<t.length&&e.put(o(t.charAt(r)),6)}},o=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);if("A"<=e&&e<="Z")return e.charCodeAt(0)-"A".charCodeAt(0)+10;switch(e){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+e}};return r},R=function(t){var n=l,r=e.stringToBytes(t),o={getMode:function(){return n},getLength:function(e){return r.length},write:function(e){for(var t=0;t<r.length;t+=1)e.put(r[t],8)}};return o},k=function(t){var n=c,r=e.stringToBytesFuncs.SJIS;if(!r)throw"sjis not supported.";!function(e,t){var n=r("友");if(2!=n.length||38726!=(n[0]<<8|n[1]))throw"sjis not supported."}();var o=r(t),i={getMode:function(){return n},getLength:function(e){return~~(o.length/2)},write:function(e){for(var t=o,n=0;n+1<t.length;){var r=(255&t[n])<<8|255&t[n+1];if(33088<=r&&r<=40956)r-=33088;else{if(!(57408<=r&&r<=60351))throw"illegal char at "+(n+1)+"/"+r;r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13),n+=2}if(n<t.length)throw"illegal char at "+(n+1)}};return i},O=function(){var e=[],t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,n,r){n=n||0,r=r||e.length;for(var o=0;o<r;o+=1)t.writeByte(e[o+n])},writeString:function(e){for(var n=0;n<e.length;n+=1)t.writeByte(e.charCodeAt(n))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var n=0;n<e.length;n+=1)n>0&&(t+=","),t+=e[n];return t+="]"}};return t},L=function(e){var t=e,n=0,r=0,o=0,i={read:function(){for(;o<8;){if(n>=t.length){if(0==o)return-1;throw"unexpected end of file./"+o}var e=t.charAt(n);if(n+=1,"="==e)return o=0,-1;e.match(/^\s$/)||(r=r<<6|s(e.charCodeAt(0)),o+=6)}var i=r>>>o-8&255;return o-=8,i}},s=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw"c:"+e};return i},A=function(e,t,n){for(var r=function(e,t){var n=e,r=t,o=new Array(e*t),i={setPixel:function(e,t,r){o[t*n+e]=r},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(r),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(r),e.writeByte(0);var t=s(2);e.writeByte(2);for(var o=0;t.length-o>255;)e.writeByte(255),e.writeBytes(t,o,255),o+=255;e.writeByte(t.length-o),e.writeBytes(t,o,t.length-o),e.writeByte(0),e.writeString(";")}},s=function(e){for(var t=1<<e,n=1+(1<<e),r=e+1,i=a(),s=0;s<t;s+=1)i.add(String.fromCharCode(s));i.add(String.fromCharCode(t)),i.add(String.fromCharCode(n));var l,c,u,d=O(),h=(l=d,c=0,u=0,{write:function(e,t){if(e>>>t!=0)throw"length over";for(;c+t>=8;)l.writeByte(255&(e<<c|u)),t-=8-c,e>>>=8-c,u=0,c=0;u|=e<<c,c+=t},flush:function(){c>0&&l.writeByte(u)}});h.write(t,r);var f=0,g=String.fromCharCode(o[f]);for(f+=1;f<o.length;){var p=String.fromCharCode(o[f]);f+=1,i.contains(g+p)?g+=p:(h.write(i.indexOf(g),r),i.size()<4095&&(i.size()==1<<r&&(r+=1),i.add(g+p)),g=p)}return h.write(i.indexOf(g),r),h.write(n,r),h.flush(),d.toByteArray()},a=function(){var e={},t=0,n={add:function(r){if(n.contains(r))throw"dup key:"+r;e[r]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return n};return i}(e,t),o=0;o<t;o+=1)for(var i=0;i<e;i+=1)r.setPixel(i,o,n(i,o));var s=O();r.write(s);for(var a=function(){var e=0,t=0,n=0,r="",o={},i=function(e){r+=String.fromCharCode(s(63&e))},s=function(e){if(e<0);else{if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw"n:"+e};return o.writeByte=function(r){for(e=e<<8|255&r,t+=8,n+=1;t>=6;)i(e>>>t-6),t-=6},o.flush=function(){if(t>0&&(i(e<<6-t),e=0,t=0),n%3!=0)for(var o=3-n%3,s=0;s<o;s+=1)r+="="},o.toString=function(){return r},o}(),l=s.toByteArray(),c=0;c<l.length;c+=1)a.writeByte(l[c]);return a.flush(),"data:image/gif;base64,"+a};return e}();n.stringToBytesFuncs["UTF-8"]=function(e){return function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?t.push(192|r>>6,128|63&r):r<55296||r>=57344?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return t}(e)},e.exports=n}(co);const uo=co.exports;function ho(e){return(null==navigator?void 0:navigator.clipboard)?navigator.clipboard.writeText(e):(function(e){const t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}finally{document.body.removeChild(t)}}(e),Promise.resolve())}var fo=(e,t,n)=>{const r=t.trim().split(".").reduce(((e,t)=>e?e[t]:void 0),e);return void 0!==r?r:n},go=(e={},t=(navigator.language in e?navigator.language:Object.keys(e)[0]))=>{const[n,r]=Ue(t),[o,i]=Bn(e);return[(e,t,r)=>{const i=fo(o[n()],e,r||"");return"function"==typeof i?i(t):"string"==typeof i?((e,t,n=/{{(.*?)}}/g)=>e.replace(n,((e,n)=>fo(t,n,""))))(i,t||{}):i},{add(e,t){i(e,(e=>Object.assign(e||{},t)))},locale:e=>e?r(e):n(),dict:e=>fo(o,e)}]},po=Ge({}),yo=()=>Ye(po);const mo=e=>{const[t]=yo();return De((()=>{var n;return t(e.translationKey,e.translationValues,null==(n=e.children)?void 0:n.toString())}))},vo=Mt("<div></div>"),wo={translationKey:"common.copyLink",text:"Copy Link"},bo={translationKey:"common.copied",text:"Copied!"},xo=e=>{let t,n,r;const[o,i]=Ue(!1),[s,a]=Ue(!1),[l,c]=Ue(!1),[u,d]=Ue(wo),[h,f]=Ue(48);Ke((()=>i(s()||l()))),Ke((()=>!o()&&d(wo))),Ke((()=>{const o=uo(0,"L");o.addData(e.sourceUrl),o.make(),t.innerHTML=o.createSvgTag(4,0);const i=t.firstElementChild.clientWidth,s=Math.round(256/i*1e5)/1e5;if(r){const e=4*Math.ceil(60/(4*s)),t=fr(4*Math.ceil((i-e)/8));r.style.top=t,r.style.left=t,r.style.height=fr(e),r.style.width=fr(e),f(Math.round(48/s))}n.style.transform=`scale(${s})`}));let g=null;const p=()=>{ho(e.sourceUrl),d(bo),null!=g&&clearTimeout(g),g=setTimeout((()=>d(wo)),3e3)};return pt(oo,{get class(){return e.class},get children(){return[pt(io,{ref(e){"function"==typeof n?n(e):n=e},onMouseEnter:()=>c(!0),onMouseLeave:()=>setTimeout((()=>c(!1))),get children(){return[(()=>{const e=vo.cloneNode(!0);return"function"==typeof t?It(t,e):t=e,e})(),pt(Ct,{get when(){return e.imageUrl},get children(){return pt(so,{ref(e){"function"==typeof r?r(e):r=e},get children(){return pt(ao,{get src(){return e.imageUrl},alt:"",get size(){return h()}})}})}})]}}),pt(Mr,{onBeforeEnter:e=>{e.animate([{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:200})},onExit:(e,t)=>{e.animate([{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:200}).finished.then((()=>{t()}))},get children(){return pt(Ct,{get when(){return o()&&!e.disableCopy},get children(){return pt(lo,{onClick:p,onMouseEnter:()=>o()&&a(!0),onMouseLeave:()=>setTimeout((()=>a(!1))),get children(){return pt(mo,{get translationKey(){return u().translationKey},get children(){return u().text}})}})}})}})]}})},Co=bn.div`
|
|
251
|
+
`;var lo={exports:{}};!function(e,t){var n=function(){var e=function(e,t){var n=e,r=u[t],o=null,i=0,s=null,a=[],l={},c=function(e,t){o=function(e){for(var t=new Array(e),n=0;n<e;n+=1){t[n]=new Array(e);for(var r=0;r<e;r+=1)t[n][r]=null}return t}(i=4*n+17),d(0,0),d(i-7,0),d(0,i-7),f(),h(),p(e,t),n>=7&&g(e),null==s&&(s=m(n,r,a)),y(s,t)},d=function(e,t){for(var n=-1;n<=7;n+=1)if(!(e+n<=-1||i<=e+n))for(var r=-1;r<=7;r+=1)t+r<=-1||i<=t+r||(o[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},h=function(){for(var e=8;e<i-8;e+=1)null==o[e][6]&&(o[e][6]=e%2==0);for(var t=8;t<i-8;t+=1)null==o[6][t]&&(o[6][t]=t%2==0)},f=function(){for(var e=w.getPatternPosition(n),t=0;t<e.length;t+=1)for(var r=0;r<e.length;r+=1){var i=e[t],s=e[r];if(null==o[i][s])for(var a=-2;a<=2;a+=1)for(var l=-2;l<=2;l+=1)o[i+a][s+l]=-2==a||2==a||-2==l||2==l||0==a&&0==l}},g=function(e){for(var t=w.getBCHTypeNumber(n),r=0;r<18;r+=1){var s=!e&&1==(t>>r&1);o[Math.floor(r/3)][r%3+i-8-3]=s}for(r=0;r<18;r+=1){s=!e&&1==(t>>r&1);o[r%3+i-8-3][Math.floor(r/3)]=s}},p=function(e,t){for(var n=r<<3|t,s=w.getBCHTypeInfo(n),a=0;a<15;a+=1){var l=!e&&1==(s>>a&1);a<6?o[a][8]=l:a<8?o[a+1][8]=l:o[i-15+a][8]=l}for(a=0;a<15;a+=1){l=!e&&1==(s>>a&1);a<8?o[8][i-a-1]=l:a<9?o[8][15-a-1+1]=l:o[8][15-a-1]=l}o[i-8][8]=!e},y=function(e,t){for(var n=-1,r=i-1,s=7,a=0,l=w.getMaskFunction(t),c=i-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var u=0;u<2;u+=1)if(null==o[r][c-u]){var d=!1;a<e.length&&(d=1==(e[a]>>>s&1)),l(r,c-u)&&(d=!d),o[r][c-u]=d,-1==(s-=1)&&(a+=1,s=7)}if((r+=n)<0||i<=r){r-=n,n=-n;break}}},m=function(e,t,n){for(var r=C.getRSBlocks(e,t),o=_(),i=0;i<n.length;i+=1){var s=n[i];o.put(s.getMode(),4),o.put(s.getLength(),w.getLengthInBits(s.getMode(),e)),s.write(o)}var a=0;for(i=0;i<r.length;i+=1)a+=r[i].dataCount;if(o.getLengthInBits()>8*a)throw"code length overflow. ("+o.getLengthInBits()+">"+8*a+")";for(o.getLengthInBits()+4<=8*a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*a||(o.put(236,8),o.getLengthInBits()>=8*a));)o.put(17,8);return function(e,t){for(var n=0,r=0,o=0,i=new Array(t.length),s=new Array(t.length),a=0;a<t.length;a+=1){var l=t[a].dataCount,c=t[a].totalCount-l;r=Math.max(r,l),o=Math.max(o,c),i[a]=new Array(l);for(var u=0;u<i[a].length;u+=1)i[a][u]=255&e.getBuffer()[u+n];n+=l;var d=w.getErrorCorrectPolynomial(c),h=x(i[a],d.getLength()-1).mod(d);for(s[a]=new Array(d.getLength()-1),u=0;u<s[a].length;u+=1){var f=u+h.getLength()-s[a].length;s[a][u]=f>=0?h.getAt(f):0}}var g=0;for(u=0;u<t.length;u+=1)g+=t[u].totalCount;var p=new Array(g),y=0;for(u=0;u<r;u+=1)for(a=0;a<t.length;a+=1)u<i[a].length&&(p[y]=i[a][u],y+=1);for(u=0;u<o;u+=1)for(a=0;a<t.length;a+=1)u<s[a].length&&(p[y]=s[a][u],y+=1);return p}(o,r)};l.addData=function(e,t){var n=null;switch(t=t||"Byte"){case"Numeric":n=E(e);break;case"Alphanumeric":n=S(e);break;case"Byte":n=R(e);break;case"Kanji":n=L(e);break;default:throw"mode:"+t}a.push(n),s=null},l.isDark=function(e,t){if(e<0||i<=e||t<0||i<=t)throw e+","+t;return o[e][t]},l.getModuleCount=function(){return i},l.make=function(){if(n<1){for(var e=1;e<40;e++){for(var t=C.getRSBlocks(e,r),o=_(),i=0;i<a.length;i++){var s=a[i];o.put(s.getMode(),4),o.put(s.getLength(),w.getLengthInBits(s.getMode(),e)),s.write(o)}var u=0;for(i=0;i<t.length;i++)u+=t[i].dataCount;if(o.getLengthInBits()<=8*u)break}n=e}c(!1,function(){for(var e=0,t=0,n=0;n<8;n+=1){c(!0,n);var r=w.getLostPoint(l);(0==n||e>r)&&(e=r,t=n)}return t}())},l.createTableTag=function(e,t){e=e||2;var n="";n+='<table style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: "+(t=void 0===t?4*e:t)+"px;",n+='">',n+="<tbody>";for(var r=0;r<l.getModuleCount();r+=1){n+="<tr>";for(var o=0;o<l.getModuleCount();o+=1)n+='<td style="',n+=" border-width: 0px; border-style: none;",n+=" border-collapse: collapse;",n+=" padding: 0px; margin: 0px;",n+=" width: "+e+"px;",n+=" height: "+e+"px;",n+=" background-color: ",n+=l.isDark(r,o)?"#000000":"#ffffff",n+=";",n+='"/>';n+="</tr>"}return n+="</tbody>",n+="</table>"},l.createSvgTag=function(e,t,n,r){var o={};"object"==typeof arguments[0]&&(e=(o=arguments[0]).cellSize,t=o.margin,n=o.alt,r=o.title),e=e||2,t=void 0===t?4*e:t,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-description":null,(r="string"==typeof r?{text:r}:r||{}).text=r.text||null,r.id=r.text?r.id||"qrcode-title":null;var i,s,a,c,u=l.getModuleCount()*e+2*t,d="";for(c="l"+e+",0 0,"+e+" -"+e+",0 0,-"+e+"z ",d+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',d+=o.scalable?"":' width="'+u+'px" height="'+u+'px"',d+=' viewBox="0 0 '+u+" "+u+'" ',d+=' preserveAspectRatio="xMinYMin meet"',d+=r.text||n.text?' role="img" aria-labelledby="'+v([r.id,n.id].join(" ").trim())+'"':"",d+=">",d+=r.text?'<title id="'+v(r.id)+'">'+v(r.text)+"</title>":"",d+=n.text?'<description id="'+v(n.id)+'">'+v(n.text)+"</description>":"",d+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',d+='<path d="',s=0;s<l.getModuleCount();s+=1)for(a=s*e+t,i=0;i<l.getModuleCount();i+=1)l.isDark(s,i)&&(d+="M"+(i*e+t)+","+a+c);return d+='" stroke="transparent" fill="black"/>',d+="</svg>"},l.createDataURL=function(e,t){e=e||2,t=void 0===t?4*e:t;var n=l.getModuleCount()*e+2*t,r=t,o=n-t;return A(n,n,(function(t,n){if(r<=t&&t<o&&r<=n&&n<o){var i=Math.floor((t-r)/e),s=Math.floor((n-r)/e);return l.isDark(s,i)?0:1}return 1}))},l.createImgTag=function(e,t,n){e=e||2,t=void 0===t?4*e:t;var r=l.getModuleCount()*e+2*t,o="";return o+="<img",o+=' src="',o+=l.createDataURL(e,t),o+='"',o+=' width="',o+=r,o+='"',o+=' height="',o+=r,o+='"',n&&(o+=' alt="',o+=v(n),o+='"'),o+="/>"};var v=function(e){for(var t="",n=0;n<e.length;n+=1){var r=e.charAt(n);switch(r){case"<":t+="<";break;case">":t+=">";break;case"&":t+="&";break;case'"':t+=""";break;default:t+=r}}return t};return l.createASCII=function(e,t){if((e=e||1)<2)return function(e){e=void 0===e?2:e;var t,n,r,o,i,s=1*l.getModuleCount()+2*e,a=e,c=s-e,u={"██":"█","█ ":"▀"," █":"▄"," ":" "},d={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(t=0;t<s;t+=2){for(r=Math.floor((t-a)/1),o=Math.floor((t+1-a)/1),n=0;n<s;n+=1)i="█",a<=n&&n<c&&a<=t&&t<c&&l.isDark(r,Math.floor((n-a)/1))&&(i=" "),a<=n&&n<c&&a<=t+1&&t+1<c&&l.isDark(o,Math.floor((n-a)/1))?i+=" ":i+="█",h+=e<1&&t+1>=c?d[i]:u[i];h+="\n"}return s%2&&e>0?h.substring(0,h.length-s-1)+Array(s+1).join("▀"):h.substring(0,h.length-1)}(t);e-=1,t=void 0===t?2*e:t;var n,r,o,i,s=l.getModuleCount()*e+2*t,a=t,c=s-t,u=Array(e+1).join("██"),d=Array(e+1).join(" "),h="",f="";for(n=0;n<s;n+=1){for(o=Math.floor((n-a)/e),f="",r=0;r<s;r+=1)i=1,a<=r&&r<c&&a<=n&&n<c&&l.isDark(o,Math.floor((r-a)/e))&&(i=0),f+=i?u:d;for(o=0;o<e;o+=1)h+=f+"\n"}return h.substring(0,h.length-1)},l.renderTo2dContext=function(e,t){t=t||2;for(var n=l.getModuleCount(),r=0;r<n;r++)for(var o=0;o<n;o++)e.fillStyle=l.isDark(r,o)?"black":"white",e.fillRect(r*t,o*t,t,t)},l};e.stringToBytes=(e.stringToBytesFuncs={default:function(e){for(var t=[],n=0;n<e.length;n+=1){var r=e.charCodeAt(n);t.push(255&r)}return t}}).default,e.createStringToBytes=function(e,t){var n=function(){for(var n=O(e),r=function(){var e=n.read();if(-1==e)throw"eof";return e},o=0,i={};;){var s=n.read();if(-1==s)break;var a=r(),l=r()<<8|r();i[String.fromCharCode(s<<8|a)]=l,o+=1}if(o!=t)throw o+" != "+t;return i}(),r="?".charCodeAt(0);return function(e){for(var t=[],o=0;o<e.length;o+=1){var i=e.charCodeAt(o);if(i<128)t.push(i);else{var s=n[e.charAt(o)];"number"==typeof s?(255&s)==s?t.push(s):(t.push(s>>>8),t.push(255&s)):t.push(r)}}return t}};var t,n,r,o,i,s=1,a=2,l=4,c=8,u={L:1,M:0,Q:3,H:2},d=0,h=1,f=2,g=3,p=4,y=5,m=6,v=7,w=(t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,r=7973,i=function(e){for(var t=0;0!=e;)t+=1,e>>>=1;return t},(o={}).getBCHTypeInfo=function(e){for(var t=e<<10;i(t)-i(n)>=0;)t^=n<<i(t)-i(n);return 21522^(e<<10|t)},o.getBCHTypeNumber=function(e){for(var t=e<<12;i(t)-i(r)>=0;)t^=r<<i(t)-i(r);return e<<12|t},o.getPatternPosition=function(e){return t[e-1]},o.getMaskFunction=function(e){switch(e){case d:return function(e,t){return(e+t)%2==0};case h:return function(e,t){return e%2==0};case f:return function(e,t){return t%3==0};case g:return function(e,t){return(e+t)%3==0};case p:return function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0};case y:return function(e,t){return e*t%2+e*t%3==0};case m:return function(e,t){return(e*t%2+e*t%3)%2==0};case v:return function(e,t){return(e*t%3+(e+t)%2)%2==0};default:throw"bad maskPattern:"+e}},o.getErrorCorrectPolynomial=function(e){for(var t=x([1],0),n=0;n<e;n+=1)t=t.multiply(x([1,b.gexp(n)],0));return t},o.getLengthInBits=function(e,t){if(1<=t&&t<10)switch(e){case s:return 10;case a:return 9;case l:case c:return 8;default:throw"mode:"+e}else if(t<27)switch(e){case s:return 12;case a:return 11;case l:return 16;case c:return 10;default:throw"mode:"+e}else{if(!(t<41))throw"type:"+t;switch(e){case s:return 14;case a:return 13;case l:return 16;case c:return 12;default:throw"mode:"+e}}},o.getLostPoint=function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r+=1)for(var o=0;o<t;o+=1){for(var i=0,s=e.isDark(r,o),a=-1;a<=1;a+=1)if(!(r+a<0||t<=r+a))for(var l=-1;l<=1;l+=1)o+l<0||t<=o+l||0==a&&0==l||s==e.isDark(r+a,o+l)&&(i+=1);i>5&&(n+=3+i-5)}for(r=0;r<t-1;r+=1)for(o=0;o<t-1;o+=1){var c=0;e.isDark(r,o)&&(c+=1),e.isDark(r+1,o)&&(c+=1),e.isDark(r,o+1)&&(c+=1),e.isDark(r+1,o+1)&&(c+=1),0!=c&&4!=c||(n+=3)}for(r=0;r<t;r+=1)for(o=0;o<t-6;o+=1)e.isDark(r,o)&&!e.isDark(r,o+1)&&e.isDark(r,o+2)&&e.isDark(r,o+3)&&e.isDark(r,o+4)&&!e.isDark(r,o+5)&&e.isDark(r,o+6)&&(n+=40);for(o=0;o<t;o+=1)for(r=0;r<t-6;r+=1)e.isDark(r,o)&&!e.isDark(r+1,o)&&e.isDark(r+2,o)&&e.isDark(r+3,o)&&e.isDark(r+4,o)&&!e.isDark(r+5,o)&&e.isDark(r+6,o)&&(n+=40);var u=0;for(o=0;o<t;o+=1)for(r=0;r<t;r+=1)e.isDark(r,o)&&(u+=1);return n+=Math.abs(100*u/t/t-50)/5*10},o),b=function(){for(var e=new Array(256),t=new Array(256),n=0;n<8;n+=1)e[n]=1<<n;for(n=8;n<256;n+=1)e[n]=e[n-4]^e[n-5]^e[n-6]^e[n-8];for(n=0;n<255;n+=1)t[e[n]]=n;var r={glog:function(e){if(e<1)throw"glog("+e+")";return t[e]},gexp:function(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return e[t]}};return r}();function x(e,t){if(void 0===e.length)throw e.length+"/"+t;var n=function(){for(var n=0;n<e.length&&0==e[n];)n+=1;for(var r=new Array(e.length-n+t),o=0;o<e.length-n;o+=1)r[o]=e[o+n];return r}(),r={getAt:function(e){return n[e]},getLength:function(){return n.length},multiply:function(e){for(var t=new Array(r.getLength()+e.getLength()-1),n=0;n<r.getLength();n+=1)for(var o=0;o<e.getLength();o+=1)t[n+o]^=b.gexp(b.glog(r.getAt(n))+b.glog(e.getAt(o)));return x(t,0)},mod:function(e){if(r.getLength()-e.getLength()<0)return r;for(var t=b.glog(r.getAt(0))-b.glog(e.getAt(0)),n=new Array(r.getLength()),o=0;o<r.getLength();o+=1)n[o]=r.getAt(o);for(o=0;o<e.getLength();o+=1)n[o]^=b.gexp(b.glog(e.getAt(o))+t);return x(n,0).mod(e)}};return r}var C=function(){var e=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(e,t){var n={};return n.totalCount=e,n.dataCount=t,n},n={};return n.getRSBlocks=function(n,r){var o=function(t,n){switch(n){case u.L:return e[4*(t-1)+0];case u.M:return e[4*(t-1)+1];case u.Q:return e[4*(t-1)+2];case u.H:return e[4*(t-1)+3];default:return}}(n,r);if(void 0===o)throw"bad rs block @ typeNumber:"+n+"/errorCorrectionLevel:"+r;for(var i=o.length/3,s=[],a=0;a<i;a+=1)for(var l=o[3*a+0],c=o[3*a+1],d=o[3*a+2],h=0;h<l;h+=1)s.push(t(c,d));return s},n}(),_=function(){var e=[],t=0,n={getBuffer:function(){return e},getAt:function(t){var n=Math.floor(t/8);return 1==(e[n]>>>7-t%8&1)},put:function(e,t){for(var r=0;r<t;r+=1)n.putBit(1==(e>>>t-r-1&1))},getLengthInBits:function(){return t},putBit:function(n){var r=Math.floor(t/8);e.length<=r&&e.push(0),n&&(e[r]|=128>>>t%8),t+=1}};return n},E=function(e){var t=s,n=e,r={getMode:function(){return t},getLength:function(e){return n.length},write:function(e){for(var t=n,r=0;r+2<t.length;)e.put(o(t.substring(r,r+3)),10),r+=3;r<t.length&&(t.length-r==1?e.put(o(t.substring(r,r+1)),4):t.length-r==2&&e.put(o(t.substring(r,r+2)),7))}},o=function(e){for(var t=0,n=0;n<e.length;n+=1)t=10*t+i(e.charAt(n));return t},i=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+e};return r},S=function(e){var t=a,n=e,r={getMode:function(){return t},getLength:function(e){return n.length},write:function(e){for(var t=n,r=0;r+1<t.length;)e.put(45*o(t.charAt(r))+o(t.charAt(r+1)),11),r+=2;r<t.length&&e.put(o(t.charAt(r)),6)}},o=function(e){if("0"<=e&&e<="9")return e.charCodeAt(0)-"0".charCodeAt(0);if("A"<=e&&e<="Z")return e.charCodeAt(0)-"A".charCodeAt(0)+10;switch(e){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+e}};return r},R=function(t){var n=l,r=e.stringToBytes(t),o={getMode:function(){return n},getLength:function(e){return r.length},write:function(e){for(var t=0;t<r.length;t+=1)e.put(r[t],8)}};return o},L=function(t){var n=c,r=e.stringToBytesFuncs.SJIS;if(!r)throw"sjis not supported.";!function(e,t){var n=r("友");if(2!=n.length||38726!=(n[0]<<8|n[1]))throw"sjis not supported."}();var o=r(t),i={getMode:function(){return n},getLength:function(e){return~~(o.length/2)},write:function(e){for(var t=o,n=0;n+1<t.length;){var r=(255&t[n])<<8|255&t[n+1];if(33088<=r&&r<=40956)r-=33088;else{if(!(57408<=r&&r<=60351))throw"illegal char at "+(n+1)+"/"+r;r-=49472}r=192*(r>>>8&255)+(255&r),e.put(r,13),n+=2}if(n<t.length)throw"illegal char at "+(n+1)}};return i},k=function(){var e=[],t={writeByte:function(t){e.push(255&t)},writeShort:function(e){t.writeByte(e),t.writeByte(e>>>8)},writeBytes:function(e,n,r){n=n||0,r=r||e.length;for(var o=0;o<r;o+=1)t.writeByte(e[o+n])},writeString:function(e){for(var n=0;n<e.length;n+=1)t.writeByte(e.charCodeAt(n))},toByteArray:function(){return e},toString:function(){var t="";t+="[";for(var n=0;n<e.length;n+=1)n>0&&(t+=","),t+=e[n];return t+="]"}};return t},O=function(e){var t=e,n=0,r=0,o=0,i={read:function(){for(;o<8;){if(n>=t.length){if(0==o)return-1;throw"unexpected end of file./"+o}var e=t.charAt(n);if(n+=1,"="==e)return o=0,-1;e.match(/^\s$/)||(r=r<<6|s(e.charCodeAt(0)),o+=6)}var i=r>>>o-8&255;return o-=8,i}},s=function(e){if(65<=e&&e<=90)return e-65;if(97<=e&&e<=122)return e-97+26;if(48<=e&&e<=57)return e-48+52;if(43==e)return 62;if(47==e)return 63;throw"c:"+e};return i},A=function(e,t,n){for(var r=function(e,t){var n=e,r=t,o=new Array(e*t),i={setPixel:function(e,t,r){o[t*n+e]=r},write:function(e){e.writeString("GIF87a"),e.writeShort(n),e.writeShort(r),e.writeByte(128),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(0),e.writeByte(255),e.writeByte(255),e.writeByte(255),e.writeString(","),e.writeShort(0),e.writeShort(0),e.writeShort(n),e.writeShort(r),e.writeByte(0);var t=s(2);e.writeByte(2);for(var o=0;t.length-o>255;)e.writeByte(255),e.writeBytes(t,o,255),o+=255;e.writeByte(t.length-o),e.writeBytes(t,o,t.length-o),e.writeByte(0),e.writeString(";")}},s=function(e){for(var t=1<<e,n=1+(1<<e),r=e+1,i=a(),s=0;s<t;s+=1)i.add(String.fromCharCode(s));i.add(String.fromCharCode(t)),i.add(String.fromCharCode(n));var l,c,u,d=k(),h=(l=d,c=0,u=0,{write:function(e,t){if(e>>>t!=0)throw"length over";for(;c+t>=8;)l.writeByte(255&(e<<c|u)),t-=8-c,e>>>=8-c,u=0,c=0;u|=e<<c,c+=t},flush:function(){c>0&&l.writeByte(u)}});h.write(t,r);var f=0,g=String.fromCharCode(o[f]);for(f+=1;f<o.length;){var p=String.fromCharCode(o[f]);f+=1,i.contains(g+p)?g+=p:(h.write(i.indexOf(g),r),i.size()<4095&&(i.size()==1<<r&&(r+=1),i.add(g+p)),g=p)}return h.write(i.indexOf(g),r),h.write(n,r),h.flush(),d.toByteArray()},a=function(){var e={},t=0,n={add:function(r){if(n.contains(r))throw"dup key:"+r;e[r]=t,t+=1},size:function(){return t},indexOf:function(t){return e[t]},contains:function(t){return void 0!==e[t]}};return n};return i}(e,t),o=0;o<t;o+=1)for(var i=0;i<e;i+=1)r.setPixel(i,o,n(i,o));var s=k();r.write(s);for(var a=function(){var e=0,t=0,n=0,r="",o={},i=function(e){r+=String.fromCharCode(s(63&e))},s=function(e){if(e<0);else{if(e<26)return 65+e;if(e<52)return e-26+97;if(e<62)return e-52+48;if(62==e)return 43;if(63==e)return 47}throw"n:"+e};return o.writeByte=function(r){for(e=e<<8|255&r,t+=8,n+=1;t>=6;)i(e>>>t-6),t-=6},o.flush=function(){if(t>0&&(i(e<<6-t),e=0,t=0),n%3!=0)for(var o=3-n%3,s=0;s<o;s+=1)r+="="},o.toString=function(){return r},o}(),l=s.toByteArray(),c=0;c<l.length;c+=1)a.writeByte(l[c]);return a.flush(),"data:image/gif;base64,"+a};return e}();n.stringToBytesFuncs["UTF-8"]=function(e){return function(e){for(var t=[],n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t.push(r):r<2048?t.push(192|r>>6,128|63&r):r<55296||r>=57344?t.push(224|r>>12,128|r>>6&63,128|63&r):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r))}return t}(e)},e.exports=n}(lo);const co=lo.exports;function uo(e){return(null==navigator?void 0:navigator.clipboard)?navigator.clipboard.writeText(e):(function(e){const t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}finally{document.body.removeChild(t)}}(e),Promise.resolve())}var ho=(e,t,n)=>{const r=t.trim().split(".").reduce(((e,t)=>e?e[t]:void 0),e);return void 0!==r?r:n},fo=(e={},t=(navigator.language in e?navigator.language:Object.keys(e)[0]))=>{const[n,r]=je(t),[o,i]=Un(e);return[(e,t,r)=>{const i=ho(o[n()],e,r||"");return"function"==typeof i?i(t):"string"==typeof i?((e,t,n=/{{(.*?)}}/g)=>e.replace(n,((e,n)=>ho(t,n,""))))(i,t||{}):i},{add(e,t){i(e,(e=>Object.assign(e||{},t)))},locale:e=>e?r(e):n(),dict:e=>ho(o,e)}]},go=ze({}),po=()=>Ge(go);const yo=e=>{const[t]=po();return Ke((()=>{var n;return t(e.translationKey,e.translationValues,null==(n=e.children)?void 0:n.toString())}))},mo=Mt("<div></div>"),vo={translationKey:"common.copyLink",text:"Copy Link"},wo={translationKey:"common.copied",text:"Copied!"},bo=e=>{let t,n,r;const[o,i]=je(!1),[s,a]=je(!1),[l,c]=je(!1),[u,d]=je(vo),[h,f]=je(48);Be((()=>i(s()||l()))),Be((()=>!o()&&d(vo))),Be((()=>{const o=co(0,"L");o.addData(e.sourceUrl),o.make(),t.innerHTML=o.createSvgTag(4,0);const i=t.firstElementChild.clientWidth,s=Math.round(256/i*1e5)/1e5;if(r){const e=4*Math.ceil(60/(4*s)),t=hr(4*Math.ceil((i-e)/8));r.style.top=t,r.style.left=t,r.style.height=hr(e),r.style.width=hr(e),f(Math.round(48/s))}n.style.transform=`scale(${s})`}));let g=null;const p=()=>{uo(e.sourceUrl),d(wo),null!=g&&clearTimeout(g),g=setTimeout((()=>d(vo)),3e3)};return gt(ro,{get class(){return e.class},get children(){return[gt(oo,{ref(e){"function"==typeof n?n(e):n=e},onMouseEnter:()=>c(!0),onMouseLeave:()=>setTimeout((()=>c(!1))),get children(){return[(()=>{const e=mo.cloneNode(!0);return"function"==typeof t?$t(t,e):t=e,e})(),gt(xt,{get when(){return e.imageUrl},get children(){return gt(io,{ref(e){"function"==typeof r?r(e):r=e},get children(){return gt(so,{get src(){return e.imageUrl},alt:"",get size(){return h()}})}})}})]}}),gt(Mr,{onBeforeEnter:e=>{e.animate([{opacity:0,transform:"translate(-50%, 44px)"},{opacity:1,transform:"translate(-50%, 0)"}],{duration:200})},onExit:(e,t)=>{e.animate([{opacity:1,transform:"translate(-50%, 0)"},{opacity:0,transform:"translate(-50%, 44px)"}],{duration:200}).finished.then((()=>{t()}))},get children(){return gt(xt,{get when(){return o()&&!e.disableCopy},get children(){return gt(ao,{onClick:p,onMouseEnter:()=>o()&&a(!0),onMouseLeave:()=>setTimeout((()=>a(!1))),get children(){return gt(yo,{get translationKey(){return u().translationKey},get children(){return u().text}})}})}})}})]}})},xo=wn.div`
|
|
252
252
|
font-style: normal;
|
|
253
253
|
font-weight: ${e=>e.fontWeight};
|
|
254
254
|
font-size: ${e=>e.fontSize};
|
|
255
255
|
line-height: ${e=>e.lineHeight};
|
|
256
256
|
|
|
257
257
|
color: ${e=>e.color};
|
|
258
|
-
`,
|
|
258
|
+
`,Co=e=>{const t=mn(),[n]=po();let r;const o=vt({fontSize:"14px",fontWeight:"510",lineHeight:"130%"},e);return Be((()=>{r&&"unset"!==o.cursor&&"pointer"!==getComputedStyle(r).cursor&&(r.style.cursor="default")})),gt(xo,{get fontSize(){return o.fontSize},get fontWeight(){return o.fontWeight},get lineHeight(){return o.lineHeight},get color(){return e.color||t.colors.text.primary},get class(){return o.class},ref(e){"function"==typeof r?r(e):r=e},"data-tc-text":"true",get children(){var e;return Ke((()=>!!o.translationKey))()?n(o.translationKey,o.translationValues,null==(e=o.children)?void 0:e.toString()):o.children}})},_o=wn.button`
|
|
259
259
|
cursor: pointer;
|
|
260
260
|
border: none;
|
|
261
261
|
background-color: unset;
|
|
@@ -268,7 +268,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
268
268
|
|
|
269
269
|
transition: transform 0.125s ease-in-out;
|
|
270
270
|
|
|
271
|
-
${
|
|
271
|
+
${_r} {
|
|
272
272
|
&:hover {
|
|
273
273
|
transform: scale(1.04);
|
|
274
274
|
}
|
|
@@ -278,36 +278,36 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
278
278
|
transform: scale(0.96);
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
${
|
|
281
|
+
${xr("mobile")} {
|
|
282
282
|
padding: 8px 4px;
|
|
283
283
|
height: 124px;
|
|
284
284
|
width: 82px;
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
${
|
|
287
|
+
${Cr} {
|
|
288
288
|
&:active {
|
|
289
289
|
transform: scale(0.92);
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
`,Eo=
|
|
292
|
+
`,Eo=wn(ur)`
|
|
293
293
|
width: 48px;
|
|
294
294
|
height: 48px;
|
|
295
295
|
border-radius: 12px;
|
|
296
296
|
|
|
297
297
|
margin-bottom: 8px;
|
|
298
298
|
|
|
299
|
-
${
|
|
299
|
+
${xr("mobile")} {
|
|
300
300
|
width: 64px;
|
|
301
301
|
height: 64px;
|
|
302
302
|
border-radius: 16px;
|
|
303
303
|
}
|
|
304
|
-
`,
|
|
304
|
+
`,So=wn(Co)`
|
|
305
305
|
font-weight: 590;
|
|
306
306
|
max-width: 76px;
|
|
307
307
|
white-space: nowrap;
|
|
308
308
|
text-overflow: ellipsis;
|
|
309
309
|
overflow: hidden;
|
|
310
|
-
`,
|
|
310
|
+
`,Ro=e=>gt(_o,{get class(){return e.class},onClick:()=>e.onClick(),"data-tc-wallet-item":"true",get children(){return[gt(Eo,{get src(){return e.iconUrl},alt:""}),gt(So,{get children(){return e.name}})]}}),Lo=wn.h1`
|
|
311
311
|
font-style: normal;
|
|
312
312
|
font-weight: 700;
|
|
313
313
|
font-size: 24px;
|
|
@@ -321,7 +321,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
321
321
|
margin-bottom: 6px;
|
|
322
322
|
|
|
323
323
|
cursor: default;
|
|
324
|
-
`,
|
|
324
|
+
`,ko=e=>{const[t]=po();return gt(Lo,{get class(){return e.class},"data-tc-h1":"true",get children(){var n;return Ke((()=>!!e.translationKey))()?t(e.translationKey,e.translationValues,null==(n=e.children)?void 0:n.toString()):e.children}})},Oo=wn.h2`
|
|
325
325
|
font-style: normal;
|
|
326
326
|
font-weight: 510;
|
|
327
327
|
font-size: 16px;
|
|
@@ -335,7 +335,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
335
335
|
margin-bottom: 32px;
|
|
336
336
|
|
|
337
337
|
cursor: default;
|
|
338
|
-
`,
|
|
338
|
+
`,Ao=e=>{const[t]=po();return gt(Oo,{get class(){return e.class},"data-tc-h2":"true",get children(){var n;return Ke((()=>!!e.translationKey))()?t(e.translationKey,e.translationValues,null==(n=e.children)?void 0:n.toString()):e.children}})},To=wn.h3`
|
|
339
339
|
font-style: normal;
|
|
340
340
|
font-weight: 590;
|
|
341
341
|
font-size: 15px;
|
|
@@ -347,8 +347,8 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
347
347
|
margin-bottom: 0;
|
|
348
348
|
|
|
349
349
|
cursor: default;
|
|
350
|
-
`,Mo=e=>{const[t]=
|
|
351
|
-
animation: ${
|
|
350
|
+
`,Mo=e=>{const[t]=po();return gt(To,{"data-tc-h3":"true",get children(){var n;return Ke((()=>!!e.translationKey))()?t(e.translationKey,e.translationValues,null==(n=e.children)?void 0:n.toString()):e.children}})},Po=Mt('<svg width="18" height="17" viewBox="0 0 18 17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.5 15.999L16.5 0.999023M16.5 0.999023V12.999M16.5 0.999023H4.5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>'),No=e=>{const t=mn();return(()=>{const n=Po.cloneNode(!0),r=n.firstChild;return Ue((()=>Pt(r,"stroke",e.fill||t.colors.icon.secondary))),n})()},Io=Mt('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.1839 17.7069C13.6405 18.6507 13.3688 19.1226 13.0591 19.348C12.4278 19.8074 11.5723 19.8074 10.941 19.348C10.6312 19.1226 10.3595 18.6507 9.81613 17.7069L5.52066 10.2464C4.76864 8.94024 4.39263 8.28717 4.33762 7.75894C4.2255 6.68236 4.81894 5.65591 5.80788 5.21589C6.29309 5 7.04667 5 8.55383 5H15.4462C16.9534 5 17.7069 5 18.1922 5.21589C19.1811 5.65591 19.7745 6.68236 19.6624 7.75894C19.6074 8.28717 19.2314 8.94024 18.4794 10.2464L14.1839 17.7069ZM11.1 16.3412L6.56139 8.48002C6.31995 8.06185 6.19924 7.85276 6.18146 7.68365C6.14523 7.33896 6.33507 7.01015 6.65169 6.86919C6.80703 6.80002 7.04847 6.80002 7.53133 6.80002H7.53134L11.1 6.80002V16.3412ZM12.9 16.3412L17.4387 8.48002C17.6801 8.06185 17.8008 7.85276 17.8186 7.68365C17.8548 7.33896 17.665 7.01015 17.3484 6.86919C17.193 6.80002 16.9516 6.80002 16.4687 6.80002L12.9 6.80002V16.3412Z"></path></svg>'),$o=e=>{const t=mn();return(()=>{const n=Io.cloneNode(!0),r=n.firstChild;return Ue((()=>Pt(r,"fill",e.fill||t.colors.icon.primary))),n})()},jo=Mt('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="11"></circle><path d="M17.1364 9.6364C17.4879 9.28493 17.4879 8.71508 17.1364 8.36361C16.7849 8.01214 16.2151 8.01214 15.8636 8.36361L10 14.2272L8.1364 12.3636C7.78493 12.0121 7.21508 12.0121 6.86361 12.3636C6.51214 12.7151 6.51214 13.2849 6.86361 13.6364L9.36361 16.1364C9.71508 16.4879 10.2849 16.4879 10.6364 16.1364L17.1364 9.6364Z"></path></svg>'),Wo=Mt('<svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="36" cy="36" r="33"></circle><path d="M50.9142 28.4142C51.6953 27.6332 51.6953 26.3668 50.9142 25.5858C50.1332 24.8047 48.8668 24.8047 48.0858 25.5858L30 43.6716L23.9142 37.5858C23.1332 36.8047 21.8668 36.8047 21.0858 37.5858C20.3047 38.3668 20.3047 39.6332 21.0858 40.4142L28.5858 47.9142C29.3668 48.6953 30.6332 48.6953 31.4142 47.9142L50.9142 28.4142Z"></path></svg>'),Uo=e=>{const t=mn(),n=()=>e.fill||t.colors.icon.success;return Ke((()=>{const r=Ke((()=>"s"===(e.size||"s")));return()=>r()?(()=>{const r=jo.cloneNode(!0),o=r.firstChild,i=o.nextSibling;return Ue((s=>{const a=e.class,l=n(),c=t.colors.constant.white;return a!==s._v$&&Pt(r,"class",s._v$=a),l!==s._v$2&&Pt(o,"fill",s._v$2=l),c!==s._v$3&&Pt(i,"fill",s._v$3=c),s}),{_v$:void 0,_v$2:void 0,_v$3:void 0}),r})():(()=>{const r=Wo.cloneNode(!0),o=r.firstChild,i=o.nextSibling;return Ue((s=>{const a=e.class,l=n(),c=t.colors.constant.white;return a!==s._v$4&&Pt(r,"class",s._v$4=a),l!==s._v$5&&Pt(o,"fill",s._v$5=l),c!==s._v$6&&Pt(i,"fill",s._v$6=c),s}),{_v$4:void 0,_v$5:void 0,_v$6:void 0}),r})()})())},Bo=Mt('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12" cy="12" r="11"></circle><path d="M7.86361 9.1364C7.51214 8.78493 7.51214 8.21508 7.86361 7.86361C8.21508 7.51214 8.78493 7.51214 9.1364 7.86361L12 10.7272L14.8636 7.86361C15.2151 7.51214 15.7849 7.51214 16.1364 7.86361C16.4879 8.21508 16.4879 8.78493 16.1364 9.1364L13.2728 12L16.1364 14.8636C16.4879 15.2151 16.4879 15.7849 16.1364 16.1364C15.7849 16.4879 15.2151 16.4879 14.8636 16.1364L12 13.2728L9.1364 16.1364C8.78493 16.4879 8.21508 16.4879 7.86361 16.1364C7.51214 15.7849 7.51214 15.2151 7.86361 14.8636L10.7272 12L7.86361 9.1364Z"></path></svg>'),Ko=Mt('<svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="36" cy="36" r="33"></circle><path d="M24.0858 26.9142C23.3047 26.1332 23.3047 24.8668 24.0858 24.0858C24.8668 23.3047 26.1332 23.3047 26.9142 24.0858L36 33.1716L45.0858 24.0858C45.8668 23.3047 47.1332 23.3047 47.9142 24.0858C48.6953 24.8668 48.6953 26.1332 47.9142 26.9142L38.8284 36L47.9142 45.0858C48.6953 45.8668 48.6953 47.1332 47.9142 47.9142C47.1332 48.6953 45.8668 48.6953 45.0858 47.9142L36 38.8284L26.9142 47.9142C26.1332 48.6953 24.8668 48.6953 24.0858 47.9142C23.3047 47.1332 23.3047 45.8668 24.0858 45.0858L33.1716 36L24.0858 26.9142Z"></path></svg>'),Do=e=>{const t=mn(),n=()=>e.fill||t.colors.icon.error;return Ke((()=>{const r=Ke((()=>"s"===(e.size||"s")));return()=>r()?(()=>{const r=Bo.cloneNode(!0),o=r.firstChild,i=o.nextSibling;return Ue((s=>{const a=e.class,l=n(),c=t.colors.constant.white;return a!==s._v$&&Pt(r,"class",s._v$=a),l!==s._v$2&&Pt(o,"fill",s._v$2=l),c!==s._v$3&&Pt(i,"fill",s._v$3=c),s}),{_v$:void 0,_v$2:void 0,_v$3:void 0}),r})():(()=>{const r=Ko.cloneNode(!0),o=r.firstChild,i=o.nextSibling;return Ue((s=>{const a=e.class,l=n(),c=t.colors.constant.white;return a!==s._v$4&&Pt(r,"class",s._v$4=a),l!==s._v$5&&Pt(o,"fill",s._v$5=l),c!==s._v$6&&Pt(i,"fill",s._v$6=c),s}),{_v$4:void 0,_v$5:void 0,_v$6:void 0}),r})()})())},Fo=Mt('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.55 5.85123C18.9459 7.81184 20.1094 12.1541 18.1488 15.55C16.1882 18.9459 11.8459 20.1094 8.44998 18.1488C8.01952 17.9003 7.46909 18.0478 7.22056 18.4782C6.97203 18.9087 7.11952 19.4591 7.54998 19.7076C11.8068 22.1653 17.2499 20.7068 19.7076 16.45C22.1653 12.1932 20.7068 6.75005 16.45 4.29239C12.1932 1.83472 6.75003 3.29321 4.29236 7.55001C4.04383 7.98047 4.19132 8.53091 4.62178 8.77943C5.05224 9.02796 5.60268 8.88048 5.8512 8.45001C7.81181 5.05413 12.1541 3.89062 15.55 5.85123Z"></path></svg>'),qo=Mt('<svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M24 56.7846C35.479 63.412 50.1572 59.479 56.7846 47.9999C63.412 36.5209 59.479 21.8427 48 15.2153C36.521 8.58791 21.8428 12.5209 15.2154 23.9999" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"></path></svg>'),Ho=e=>{const t=mn(),n=()=>e.fill||t.colors.icon.tertiary,r=fn`
|
|
351
|
+
animation: ${gn`
|
|
352
352
|
0% {
|
|
353
353
|
transform: rotate(0deg);
|
|
354
354
|
}
|
|
@@ -356,18 +356,18 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
356
356
|
transform: rotate(360deg);
|
|
357
357
|
}
|
|
358
358
|
`} 1s linear infinite;
|
|
359
|
-
`;return
|
|
359
|
+
`;return Ke((()=>{const t=Ke((()=>"s"===(e.size||"s")));return()=>t()?(()=>{const t=Fo.cloneNode(!0),o=t.firstChild;return Ue((i=>{const s=Ar(r,e.class),a=n();return s!==i._v$&&Pt(t,"class",i._v$=s),a!==i._v$2&&Pt(o,"fill",i._v$2=a),i}),{_v$:void 0,_v$2:void 0}),t})():(()=>{const t=qo.cloneNode(!0),o=t.firstChild;return Ue((i=>{const s=Ar(r,e.class),a=n();return s!==i._v$3&&Pt(t,"class",i._v$3=s),a!==i._v$4&&Pt(o,"stroke",i._v$4=a),i}),{_v$3:void 0,_v$4:void 0}),t})()})())},Vo=ze(),zo=Mt('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M7.76228 2.09998H10.2378C11.0458 2.09997 11.7067 2.09996 12.2438 2.14384C12.7997 2.18926 13.3017 2.28614 13.7706 2.52505C14.5045 2.89896 15.1011 3.49558 15.475 4.22941C15.7139 4.6983 15.8108 5.20038 15.8562 5.75629C15.9001 6.29337 15.9001 6.95422 15.9001 7.76227V8.1H16.2377C17.0457 8.09999 17.7066 8.09998 18.2437 8.14386C18.7996 8.18928 19.3017 8.28616 19.7705 8.52507C20.5044 8.89898 21.101 9.4956 21.4749 10.2294C21.7138 10.6983 21.8107 11.2004 21.8561 11.7563C21.9 12.2934 21.9 12.9542 21.9 13.7623V16.2377C21.9 17.0458 21.9 17.7066 21.8561 18.2437C21.8107 18.7996 21.7138 19.3017 21.4749 19.7706C21.101 20.5044 20.5044 21.101 19.7705 21.4749C19.3017 21.7138 18.7996 21.8107 18.2437 21.8561C17.7066 21.9 17.0458 21.9 16.2378 21.9H13.7623C12.9543 21.9 12.2934 21.9 11.7563 21.8561C11.2004 21.8107 10.6983 21.7138 10.2294 21.4749C9.49561 21.101 8.89898 20.5044 8.52508 19.7706C8.28616 19.3017 8.18928 18.7996 8.14386 18.2437C8.09998 17.7066 8.09999 17.0458 8.1 16.2377V15.9H7.76227C6.95426 15.9 6.29335 15.9 5.75629 15.8561C5.20038 15.8107 4.6983 15.7138 4.22941 15.4749C3.49558 15.101 2.89896 14.5044 2.52505 13.7705C2.28614 13.3017 2.18926 12.7996 2.14384 12.2437C2.09996 11.7066 2.09997 11.0458 2.09998 10.2377V7.76228C2.09997 6.95424 2.09996 6.29336 2.14384 5.75629C2.18926 5.20038 2.28614 4.6983 2.52505 4.22941C2.89896 3.49558 3.49558 2.89896 4.22941 2.52505C4.6983 2.28614 5.20038 2.18926 5.75629 2.14384C6.29336 2.09996 6.95425 2.09997 7.76228 2.09998ZM8.1 14.1V13.7623C8.09999 12.9542 8.09998 12.2934 8.14386 11.7563C8.18928 11.2004 8.28616 10.6983 8.52508 10.2294C8.89898 9.4956 9.49561 8.89898 10.2294 8.52507C10.6983 8.28616 11.2004 8.18928 11.7563 8.14386C12.2934 8.09998 12.9542 8.09999 13.7623 8.1H14.1001V7.79998C14.1001 6.94505 14.0994 6.35798 14.0622 5.90287C14.0259 5.45827 13.9593 5.21944 13.8712 5.0466C13.6699 4.65146 13.3486 4.3302 12.9535 4.12886C12.7806 4.04079 12.5418 3.97419 12.0972 3.93786C11.6421 3.90068 11.055 3.89998 10.2001 3.89998H7.79998C6.94505 3.89998 6.35798 3.90068 5.90287 3.93786C5.45827 3.97419 5.21944 4.04079 5.0466 4.12886C4.65146 4.3302 4.3302 4.65146 4.12886 5.0466C4.04079 5.21944 3.97419 5.45827 3.93786 5.90287C3.90068 6.35798 3.89998 6.94505 3.89998 7.79998V10.2C3.89998 11.0549 3.90068 11.642 3.93786 12.0971C3.97419 12.5417 4.04079 12.7805 4.12886 12.9534C4.3302 13.3485 4.65146 13.6698 5.0466 13.8711C5.21944 13.9592 5.45827 14.0258 5.90287 14.0621C6.35798 14.0993 6.94505 14.1 7.79998 14.1H8.1ZM11.0466 10.1289C11.2195 10.0408 11.4583 9.97421 11.9029 9.93788C12.358 9.9007 12.9451 9.9 13.8 9.9H16.2C17.0549 9.9 17.642 9.9007 18.0971 9.93788C18.5417 9.97421 18.7805 10.0408 18.9534 10.1289C19.3485 10.3302 19.6698 10.6515 19.8711 11.0466C19.9592 11.2195 20.0258 11.4583 20.0621 11.9029C20.0993 12.358 20.1 12.9451 20.1 13.8V16.2C20.1 17.0549 20.0993 17.642 20.0621 18.0971C20.0258 18.5417 19.9592 18.7805 19.8711 18.9534C19.6698 19.3485 19.3485 19.6698 18.9534 19.8711C18.7805 19.9592 18.5417 20.0258 18.0971 20.0621C17.642 20.0993 17.0549 20.1 16.2 20.1H13.8C12.9451 20.1 12.358 20.0993 11.9029 20.0621C11.4583 20.0258 11.2195 19.9592 11.0466 19.8711C10.6515 19.6698 10.3302 19.3485 10.1289 18.9534C10.0408 18.7805 9.97421 18.5417 9.93788 18.0971C9.9007 17.642 9.9 17.0549 9.9 16.2V13.8C9.9 12.9451 9.9007 12.358 9.93788 11.9029C9.97421 11.4583 10.0408 11.2195 10.1289 11.0466C10.3302 10.6515 10.6515 10.3302 11.0466 10.1289Z"></path></svg>'),Go=e=>{const t=mn();return(()=>{const n=zo.cloneNode(!0),r=n.firstChild;return Ue((()=>Pt(r,"fill",e.fill||t.colors.icon.primary))),n})()},Yo=Mt('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.7624 3.10001C7.95435 3.1 7.29349 3.09999 6.75642 3.14387C6.2005 3.18929 5.69842 3.28617 5.22954 3.52508C4.4957 3.89899 3.89908 4.49561 3.52517 5.22944C3.28626 5.69833 3.18938 6.20041 3.14396 6.75632C3.10008 7.2934 3.10009 7.95424 3.1001 8.76229V15.2377C3.10009 16.0458 3.10008 16.7066 3.14396 17.2437C3.18938 17.7996 3.28626 18.3017 3.52517 18.7706C3.89908 19.5044 4.4957 20.101 5.22954 20.4749C5.69842 20.7138 6.2005 20.8107 6.75642 20.8561C7.29349 20.9 7.95434 20.9 8.76239 20.9H12.0001C12.4972 20.9 12.9001 20.4971 12.9001 20C12.9001 19.503 12.4972 19.1 12.0001 19.1H8.8001C7.94517 19.1 7.3581 19.0993 6.90299 19.0621C6.45839 19.0258 6.21956 18.9592 6.04672 18.8711C5.65158 18.6698 5.33032 18.3485 5.12898 17.9534C5.04092 17.7805 4.97431 17.5417 4.93798 17.0971C4.9008 16.642 4.9001 16.0549 4.9001 15.2V8.80001C4.9001 7.94508 4.9008 7.35801 4.93798 6.9029C4.97431 6.4583 5.04092 6.21947 5.12898 6.04663C5.33032 5.65149 5.65158 5.33023 6.04672 5.12889C6.21956 5.04082 6.45839 4.97422 6.90299 4.93789C7.3581 4.90071 7.94517 4.90001 8.8001 4.90001H12.0001C12.4972 4.90001 12.9001 4.49706 12.9001 4.00001C12.9001 3.50295 12.4972 3.10001 12.0001 3.10001H8.7624Z"></path><path d="M17.6364 7.3636C17.2849 7.01212 16.7151 7.01212 16.3636 7.3636C16.0121 7.71507 16.0121 8.28492 16.3636 8.63639L18.8272 11.1H9.00001C8.50295 11.1 8.10001 11.5029 8.10001 12C8.10001 12.497 8.50295 12.9 9.00001 12.9H18.8272L16.3636 15.3636C16.0121 15.7151 16.0121 16.2849 16.3636 16.6364C16.7151 16.9879 17.2849 16.9879 17.6364 16.6364L21.6364 12.6364C21.9879 12.2849 21.9879 11.7151 21.6364 11.3636L17.6364 7.3636Z"></path></svg>'),Qo=e=>{const t=mn(),n=()=>e.fill||t.colors.icon.primary;return(()=>{const e=Yo.cloneNode(!0),t=e.firstChild,r=t.nextSibling;return Ue((e=>{const o=n(),i=n();return o!==e._v$&&Pt(t,"fill",e._v$=o),i!==e._v$2&&Pt(r,"fill",e._v$2=i),e}),{_v$:void 0,_v$2:void 0}),e})()},Jo={m:"8px",s:"4px",none:"0"},Zo={m:"16px",s:"8px",none:"0"},Xo=wn.div`
|
|
360
360
|
width: 256px;
|
|
361
361
|
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
|
|
362
|
-
border-radius: ${e=>
|
|
362
|
+
border-radius: ${e=>Zo[e.theme.borderRadius]};
|
|
363
363
|
|
|
364
364
|
background-color: ${e=>e.theme.colors.background.primary}
|
|
365
365
|
|
|
366
366
|
color: ${e=>e.theme.colors.text.primary}
|
|
367
|
-
`,
|
|
367
|
+
`,ei=wn.ul`
|
|
368
368
|
background-color: ${e=>e.theme.colors.background.primary};
|
|
369
369
|
padding: 8px;
|
|
370
|
-
`,
|
|
370
|
+
`,ti=wn.button`
|
|
371
371
|
display: flex;
|
|
372
372
|
align-items: center;
|
|
373
373
|
gap: 8px;
|
|
@@ -377,7 +377,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
377
377
|
|
|
378
378
|
background-color: ${e=>e.theme.colors.background.primary};
|
|
379
379
|
border: none;
|
|
380
|
-
border-radius: ${e=>
|
|
380
|
+
border-radius: ${e=>Jo[e.theme.borderRadius]};
|
|
381
381
|
cursor: pointer;
|
|
382
382
|
|
|
383
383
|
transition: background-color, transform 0.1s ease-in-out;
|
|
@@ -389,7 +389,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
389
389
|
&:active {
|
|
390
390
|
transform: scale(0.96);
|
|
391
391
|
}
|
|
392
|
-
`,
|
|
392
|
+
`,ni=Mt("<li></li>"),ri=e=>gt(Co,{get translationKey(){return e.translationKey},fontSize:"15px",fontWeight:"590",get children(){return e.children}}),oi={m:"16px",s:"8px",none:"0"},ii=wn.div`
|
|
393
393
|
width: 256px;
|
|
394
394
|
padding: 12px 16px;
|
|
395
395
|
display: flex;
|
|
@@ -397,127 +397,127 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
397
397
|
|
|
398
398
|
background-color: ${e=>e.theme.colors.background.primary};
|
|
399
399
|
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
|
|
400
|
-
border-radius: ${e=>
|
|
401
|
-
`,
|
|
400
|
+
border-radius: ${e=>oi[e.theme.borderRadius]};
|
|
401
|
+
`,si=wn.div`
|
|
402
402
|
width: 192px;
|
|
403
|
-
`,
|
|
403
|
+
`,ai=wn(Co)`
|
|
404
404
|
margin-top: 4px;
|
|
405
405
|
color: ${e=>e.theme.colors.text.secondary};
|
|
406
|
-
`,
|
|
406
|
+
`,li=e=>{const t=Lr(e);return gt(ii,vt({get class(){return e.class},"data-tc-notification":"true"},t,{get children(){return[gt(si,{get children(){return[gt(Mo,{get translationKey(){return e.header.translationKey},get translationValues(){return e.header.translationValues},get children(){return e.children}}),gt(xt,{get when(){return e.text},get children(){return gt(ai,{get translationKey(){return e.text.translationKey},get translationValues(){return e.text.translationValues}})}})]}}),Ke((()=>e.icon))]}}))},ci=wn(Ho)`
|
|
407
407
|
align-self: center;
|
|
408
|
-
`,
|
|
408
|
+
`,ui=e=>{var t;const n=Ge(Vo),[r]=po(),o=(null==(t=n.wallet)?void 0:t.name)||r("common.yourWallet",{},"your wallet");return gt(li,{header:{translationKey:"notifications.confirm.header",translationValues:{name:o}},get class(){return e.class},get icon(){return gt(ci,{})},"data-tc-notification-confirm":"true",children:"Confirm operation in your wallet"})},di=wn(Do)`
|
|
409
409
|
margin-top: 2px;
|
|
410
|
-
`,
|
|
410
|
+
`,hi=e=>gt(li,{header:{translationKey:"notifications.transactionCanceled.header"},text:{translationKey:"notifications.transactionCanceled.text"},get icon(){return gt(di,{})},get class(){return e.class},"data-tc-notification-tx-cancelled":"true",children:"Transaction cancelled"}),fi=wn(Uo)`
|
|
411
411
|
margin-top: 2px;
|
|
412
|
-
`,
|
|
412
|
+
`,gi=e=>gt(li,{header:{translationKey:"notifications.transactionSent.header"},text:{translationKey:"notifications.transactionSent.text"},get icon(){return gt(fi,{})},get class(){return e.class},"data-tc-notification-tx-sent":"true",children:"Transaction sent"}),pi=fn`
|
|
413
413
|
transform: translateY(-8px);
|
|
414
414
|
margin-bottom: 12px;
|
|
415
|
-
`,
|
|
415
|
+
`,yi=Mt('<div data-tc-list-notifications="true"></div>'),mi=wn(kr)`
|
|
416
416
|
background-color: ${e=>e.theme.colors.connectButton.background};
|
|
417
417
|
color: ${e=>e.theme.colors.connectButton.foreground};
|
|
418
|
-
box-shadow: ${e=>`0 4px 24px ${
|
|
418
|
+
box-shadow: ${e=>`0 4px 24px ${dr(e.theme.colors.constant.black,.16)}`};
|
|
419
419
|
padding: 8px 16px 8px 12px;
|
|
420
420
|
|
|
421
421
|
display: flex;
|
|
422
422
|
align-items: center;
|
|
423
423
|
gap: 4px;
|
|
424
424
|
height: 40px;
|
|
425
|
-
`,
|
|
425
|
+
`,vi=wn(mi)`
|
|
426
426
|
padding: 12px 16px;
|
|
427
427
|
min-width: 148px;
|
|
428
428
|
justify-content: center;
|
|
429
429
|
background-color: ${e=>e.theme.colors.background.primary};
|
|
430
|
-
`,
|
|
430
|
+
`,wi=wn(kr)`
|
|
431
431
|
min-width: 148px;
|
|
432
432
|
height: 40px;
|
|
433
433
|
|
|
434
434
|
background-color: ${e=>e.theme.colors.background.primary};
|
|
435
435
|
color: ${e=>e.theme.colors.connectButton.foreground};
|
|
436
|
-
box-shadow: ${e=>`0 4px 24px ${
|
|
436
|
+
box-shadow: ${e=>`0 4px 24px ${dr(e.theme.colors.constant.black,.16)}`};
|
|
437
437
|
|
|
438
438
|
display: flex;
|
|
439
439
|
align-items: center;
|
|
440
440
|
justify-content: center;
|
|
441
|
-
`,
|
|
441
|
+
`,bi=wn(Ho)`
|
|
442
442
|
height: 18px;
|
|
443
443
|
width: 18px;
|
|
444
|
-
`,
|
|
444
|
+
`,xi=wn.div`
|
|
445
445
|
display: flex;
|
|
446
446
|
flex-direction: column;
|
|
447
447
|
align-items: flex-end;
|
|
448
|
-
`,
|
|
448
|
+
`,Ci=wn((t=>{const n=Ge(Vo),[r,o]=je(!1),i=()=>__async(this,null,(function*(){const t=me(n.account.address,n.account.chain===e.CHAIN.TESTNET);yield uo(t),o(!0),setTimeout((()=>o(!1)),1e3)}));return gt(Xo,{ref(e){const n=t.ref;"function"==typeof n?n(e):t.ref=e},get class(){return t.class},"data-tc-dropdown":"true",get children(){return gt(ei,{get children(){return[(()=>{const e=ni.cloneNode(!0);return jt(e,gt(ti,{onClick:()=>i(),get children(){return[gt(Go,{}),gt(xt,{get when(){return!r()},get children(){return gt(ri,{translationKey:"button.dropdown.copy",children:"Copy address"})}}),gt(xt,{get when(){return r()},get children(){return gt(ri,{translationKey:"button.dropdown.copied",children:"Address copied!"})}})]}})),e})(),(()=>{const e=ni.cloneNode(!0);return jt(e,gt(ti,{onClick:()=>(n.disconnect(),void t.onClose()),get children(){return[gt(Qo,{}),gt(ri,{translationKey:"button.dropdown.disconnect",children:"Disconnect"})]}})),e})()]}})}})}))`
|
|
449
449
|
box-sizing: border-box;
|
|
450
450
|
overflow: hidden;
|
|
451
451
|
margin-top: 12px;
|
|
452
|
-
`,
|
|
452
|
+
`,_i=wn((e=>{const t=[],[n,r]=je([]);let o=-1;return Be(function(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return n=>{let s;if(r){s=Array(e.length);for(let t=0;t<e.length;t++)s[t]=e[t]()}else s=e();if(i)return void(i=!1);const a=qe((()=>t(s,o,n)));return o=s,a}}(en,(e=>{if(e&&e.showNotification){o++;const n=o;r((t=>t.filter((e=>"confirm-transaction"!==e.action)).concat({id:n,action:e.name}))),t.push(setTimeout((()=>r((e=>e.filter((e=>e.id!==n))))),4500))}}))),He((()=>{t.forEach(clearTimeout)})),(()=>{const t=yi.cloneNode(!0);return jt(t,gt(Nr,{onBeforeEnter:e=>{e.animate([{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-8px)"}],{duration:200})},onExit:(e,t)=>{e.animate([{opacity:1,transform:"translateY(-8px)"},{opacity:0,transform:"translateY(-30px)"}],{duration:200}).finished.then(t)},get children(){return gt(bt,{get each(){return n()},children:e=>gt(Ct,{get children(){return[gt(_t,{get when(){return"transaction-sent"===e.action},get children(){return gt(gi,{class:pi})}}),gt(_t,{get when(){return"transaction-canceled"===e.action},get children(){return gt(hi,{class:pi})}}),gt(_t,{get when(){return"confirm-transaction"===e.action},get children(){return gt(ui,{class:pi})}})]}})})}})),Ue((()=>Nt(t,e.class))),t})()}))`
|
|
453
453
|
> div:first-child {
|
|
454
454
|
margin-top: 20px;
|
|
455
455
|
}
|
|
456
|
-
`;function Ei(e){return e.split("-")[0]}function Ri(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,s=r.y+r.height/2-o.height/2,a=function(e){return["top","bottom"].includes(Ei(e))?"x":"y"}(t),l="y"===a?"height":"width";const c=r[l]/2-o[l]/2,u="x"===a;let d;switch(Ei(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:s};break;case"left":d={x:r.x-o.width,y:s};break;default:d={x:r.x,y:r.y}}switch(function(e){return e.split("-")[1]}(t)){case"start":d[a]-=c*(n&&u?-1:1);break;case"end":d[a]+=c*(n&&u?-1:1)}return d}const ki=(e,t,n)=>__async(this,null,(function*(){const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=yield null==s.isRTL?void 0:s.isRTL(t);if("production"!=={}.NODE_ENV){if(null==s&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),a.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "))}let c=yield s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ri(c,r,l),h=r,f={},g=0;for(let n=0;n<a.length;n++){const{name:i,fn:p}=a[n],{x:y,y:m,data:v,reset:w}=yield p({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=y?y:u,d=null!=m?m:d,f=__spreadProps(__spreadValues({},f),{[i]:__spreadValues(__spreadValues({},f[i]),v)}),"production"!=={}.NODE_ENV&&g>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),w&&g<=50&&(g++,"object"==typeof w&&(w.placement&&(h=w.placement),w.rects&&(c=!0===w.rects?yield s.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:d}=Ri(c,h,l))),n=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}}));function Oi(e){return __spreadProps(__spreadValues({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function Li(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Ai(e){return Li(e).getComputedStyle(e)}function Ti(e){return ji(e)?(e.nodeName||"").toLowerCase():""}let Pi;function Mi(){if(Pi)return Pi;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(Pi=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),Pi):navigator.userAgent}function Ni(e){return e instanceof Li(e).HTMLElement}function $i(e){return e instanceof Li(e).Element}function ji(e){return e instanceof Li(e).Node}function Ii(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof Li(e).ShadowRoot||e instanceof ShadowRoot}function Ui(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ai(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function Wi(e){return["table","td","th"].includes(Ti(e))}function Bi(e){const t=/firefox/i.test(Mi()),n=Ai(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function Ki(){return!/^((?!chrome|android).)*safari/i.test(Mi())}function Di(e){return["html","body","#document"].includes(Ti(e))}const Fi=Math.min,qi=Math.max,Hi=Math.round,Vi={x:1,y:1};function zi(e){const t=!$i(e)&&e.contextElement?e.contextElement:$i(e)?e:null;if(!t)return Vi;const n=t.getBoundingClientRect(),r=Ai(t);if("border-box"!==r.boxSizing)return Ni(t)?{x:t.offsetWidth>0&&Hi(n.width)/t.offsetWidth||1,y:t.offsetHeight>0&&Hi(n.height)/t.offsetHeight||1}:Vi;let o=n.width/parseFloat(r.width),i=n.height/parseFloat(r.height);return o&&Number.isFinite(o)||(o=1),i&&Number.isFinite(i)||(i=1),{x:o,y:i}}function Gi(e,t,n,r){var o,i,s,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let c=Vi;t&&(r?$i(r)&&(c=zi(r)):c=zi(e));const u=$i(e)?Li(e):window,d=!Ki()&&n,h=(l.left+(d&&null!=(o=null==(i=u.visualViewport)?void 0:i.offsetLeft)?o:0))/c.x,f=(l.top+(d&&null!=(s=null==(a=u.visualViewport)?void 0:a.offsetTop)?s:0))/c.y,g=l.width/c.x,p=l.height/c.y;return{width:g,height:p,top:f,right:h+g,bottom:f+p,left:h,x:h,y:f}}function Yi(e){return((ji(e)?e.ownerDocument:e.document)||window.document).documentElement}function Qi(e){return $i(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ji(e){return Gi(Yi(e)).left+Qi(e).scrollLeft}function Zi(e,t,n){const r=Ni(t),o=Yi(t),i=Gi(e,!0,"fixed"===n,t);let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==Ti(t)||Ui(o))&&(s=Qi(t)),Ni(t)){const e=Gi(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=Ji(o));return{x:i.left+s.scrollLeft-a.x,y:i.top+s.scrollTop-a.y,width:i.width,height:i.height}}function Xi(e){if("html"===Ti(e))return e;const t=e.assignedSlot||e.parentNode||(Ii(e)?e.host:null)||Yi(e);return Ii(t)?t.host:t}function es(e){return Ni(e)&&"fixed"!==Ai(e).position?e.offsetParent:null}function ts(e){const t=Li(e);let n=es(e);for(;n&&Wi(n)&&"static"===Ai(n).position;)n=es(n);return n&&("html"===Ti(n)||"body"===Ti(n)&&"static"===Ai(n).position&&!Bi(n))?t:n||function(e){let t=Xi(e);for(;Ni(t)&&!Di(t);){if(Bi(t))return t;t=Xi(t)}return null}(e)||t}function ns(e){const t=Xi(e);return Di(t)?e.ownerDocument.body:Ni(t)&&Ui(t)?t:ns(t)}function rs(e,t){var n;void 0===t&&(t=[]);const r=ns(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=Li(r);return o?t.concat(i,i.visualViewport||[],Ui(r)?r:[]):t.concat(r,rs(r))}function os(e,t,n){return"viewport"===t?Oi(function(e,t){const n=Li(e),r=Yi(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Ki();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n)):$i(t)?function(e,t){const n=Gi(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ni(e)?zi(e):{x:1,y:1},s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{top:c,left:l,right:l+s,bottom:c+a,x:l,y:c,width:s,height:a}}(t,n):Oi(function(e){var t;const n=Yi(e),r=Qi(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=qi(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=qi(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+Ji(e);const l=-r.scrollTop;return"rtl"===Ai(o||n).direction&&(a+=qi(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(Yi(e)))}const is={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=rs(e).filter((e=>$i(e)&&"body"!==Ti(e))),o=null;const i="fixed"===Ai(e).position;let s=i?Xi(e):e;for(;$i(s)&&!Di(s);){const e=Ai(s),t=Bi(s);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==s)),s=Xi(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=os(t,n,o);return e.top=qi(r.top,e.top),e.right=Fi(r.right,e.right),e.bottom=Fi(r.bottom,e.bottom),e.left=qi(r.left,e.left),e}),os(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Ni(n),i=Yi(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Ti(n)||Ui(i))&&(s=Qi(n)),Ni(n))){const e=Gi(n);a=zi(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}},isElement:$i,getDimensions:function(e){if(Ni(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Gi(e);return{width:t.width,height:t.height}},getOffsetParent:ts,getDocumentElement:Yi,getScale:zi,getElementRects(e){return __async(this,null,(function*(){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||ts,i=this.getDimensions;return{reference:Zi(t,yield o(n),r),floating:__spreadValues({x:0,y:0},yield i(n))}}))},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Ai(e).direction};function ss(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=!0,animationFrame:a=!1}=r,l=o&&!a,c=l||i?[...$i(e)?rs(e):e.contextElement?rs(e.contextElement):[],...rs(t)]:[];c.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let u,d=null;if(s){let r=!0;d=new ResizeObserver((()=>{r||n(),r=!1})),$i(e)&&!a&&d.observe(e),$i(e)||!e.contextElement||a||d.observe(e.contextElement),d.observe(t)}let h=a?Gi(e):null;return a&&function t(){const r=Gi(e);!h||r.x===h.x&&r.y===h.y&&r.width===h.width&&r.height===h.height||n();h=r,u=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{l&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,a&&cancelAnimationFrame(u)}}const as=(e,t,n)=>{const r=new Map,o=__spreadValues({platform:is},n),i=__spreadProps(__spreadValues({},o.platform),{_c:r});return ki(e,t,__spreadProps(__spreadValues({},o),{platform:i}))};const ls=Mt('<tc-root data-tc-dropdown-container="true"></tc-root>'),cs=()=>{const e=vn(),t=Ye(En),n=Ye(zo),[r,o]=Ue(!1),[i,s]=Ue(t.account),[a,l]=Ue(!0);let c;const[u,d]=Ue(),[h,f]=Ue(),g=function(e,t,n){let r=()=>{var e;return null!=(e=null==n?void 0:n.placement)?e:"bottom"},o=()=>{var e;return null!=(e=null==n?void 0:n.strategy)?e:"absolute"},[i,s]=Ue({x:null,y:null,placement:r(),strategy:o(),middlewareData:{}}),[a,l]=Ue();Ke((()=>{let e=a();if(e)throw e.value}));let c=De((()=>(e(),t(),{})));function u(){let i=e(),a=t();if(i&&a){let e=c();as(i,a,{middleware:null==n?void 0:n.middleware,placement:r(),strategy:o()}).then((t=>{e===c()&&s(t)}),(e=>{l(e)}))}}return Ke((()=>{let i=e(),s=t();if(null==n||n.middleware,r(),o(),i&&s)if(null!=n&&n.whileElementsMounted){let e=n.whileElementsMounted(i,s,u);e&&Ve(e)}else u()})),{get x(){return i().x},get y(){return i().y},get placement(){return i().placement},get strategy(){return i().strategy},get middlewareData(){return i().middlewareData},update:u}}(h,u,{whileElementsMounted:ss,placement:"bottom-end"});n.connectionRestored.then((()=>l(!1)));const p=t.onStatusChange((e=>{if(!e)return o(!1),void s(null);s(e.account)})),y=e=>{if(!i()||!r())return;const t=h().contains(e.target),n=c.contains(e.target);t||n||o(!1)};var m;return m=()=>{document.body.addEventListener("click",y)},Ke((()=>He(m))),Ve((()=>{document.body.removeEventListener("click",y),p()})),pt(Qt,{component:sr,get children(){return[pt(Ct,{get when(){return a()},get children(){return pt(bi,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return pt(xi,{})}})}}),pt(Ct,{get when(){return!a()},get children(){return[pt(Ct,{get when(){return!i()},get children(){return pt(vi,{onClick:()=>n.connectWallet(),"data-tc-connect-button":"true",get children(){return[pt(Io,{get fill(){return e.colors.connectButton.foreground}}),pt(_o,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return e.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),pt(Ct,{get when(){return i()},get children(){return pt(Ci,{get children(){return[pt(wi,{onClick:()=>o((e=>!e)),ref:f,"data-tc-dropdown-button":"true",get children(){return[pt(_o,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return(()=>{const e=i();if(e){const t=ve(e.address,e.chain===C.TESTNET);return t.slice(0,4)+"…"+t.slice(-4)}return""})()}}),pt(Ur,{direction:"bottom"})]}}),pt(Yt,{get children(){const e=He((()=>document.importNode(ls,!0)));return It(d,e),e.style.setProperty("z-index","999"),e._$owner=Ae,Ut(e,pt(Mr,{onBeforeEnter:e=>{e.animate([{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(e,t)=>{e.animate([{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(t)},get children(){return pt(Ct,{get when(){return r()},get children(){return pt(_i,{get hidden(){return!r()},onClose:()=>o(!1),ref(e){"function"==typeof c?c(e):c=e}})}})}}),null),Ut(e,pt(Si,{}),null),Be((t=>{var n,r;const o=g.strategy,i=`${null!=(n=g.y)?n:0}px`,s=`${null!=(r=g.x)?r:0}px`;return o!==t._v$&&e.style.setProperty("position",t._v$=o),i!==t._v$2&&e.style.setProperty("top",t._v$2=i),s!==t._v$3&&e.style.setProperty("left",t._v$3=s),t}),{_v$:void 0,_v$2:void 0,_v$3:void 0}),e}})]}})}})]}})]}})},us={m:"16px",s:"8px",none:"0"},ds=bn.div``,hs=bn(Lo)`
|
|
456
|
+
`;function Ei(e){return e.split("-")[0]}function Si(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,s=r.y+r.height/2-o.height/2,a=function(e){return["top","bottom"].includes(Ei(e))?"x":"y"}(t),l="y"===a?"height":"width";const c=r[l]/2-o[l]/2,u="x"===a;let d;switch(Ei(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:s};break;case"left":d={x:r.x-o.width,y:s};break;default:d={x:r.x,y:r.y}}switch(function(e){return e.split("-")[1]}(t)){case"start":d[a]-=c*(n&&u?-1:1);break;case"end":d[a]+=c*(n&&u?-1:1)}return d}const Ri=(e,t,n)=>__async(this,null,(function*(){const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=yield null==s.isRTL?void 0:s.isRTL(t);if("production"!=={}.NODE_ENV){if(null==s&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),a.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "))}let c=yield s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Si(c,r,l),h=r,f={},g=0;for(let n=0;n<a.length;n++){const{name:i,fn:p}=a[n],{x:y,y:m,data:v,reset:w}=yield p({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:f,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=y?y:u,d=null!=m?m:d,f=__spreadProps(__spreadValues({},f),{[i]:__spreadValues(__spreadValues({},f[i]),v)}),"production"!=={}.NODE_ENV&&g>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),w&&g<=50&&(g++,"object"==typeof w&&(w.placement&&(h=w.placement),w.rects&&(c=!0===w.rects?yield s.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:d}=Si(c,h,l))),n=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:f}}));function Li(e){return __spreadProps(__spreadValues({},e),{top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height})}function ki(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Oi(e){return ki(e).getComputedStyle(e)}function Ai(e){return Ii(e)?(e.nodeName||"").toLowerCase():""}let Ti;function Mi(){if(Ti)return Ti;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(Ti=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),Ti):navigator.userAgent}function Pi(e){return e instanceof ki(e).HTMLElement}function Ni(e){return e instanceof ki(e).Element}function Ii(e){return e instanceof ki(e).Node}function $i(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof ki(e).ShadowRoot||e instanceof ShadowRoot}function ji(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Oi(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function Wi(e){return["table","td","th"].includes(Ai(e))}function Ui(e){const t=/firefox/i.test(Mi()),n=Oi(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function Bi(){return!/^((?!chrome|android).)*safari/i.test(Mi())}function Ki(e){return["html","body","#document"].includes(Ai(e))}const Di=Math.min,Fi=Math.max,qi=Math.round,Hi={x:1,y:1};function Vi(e){const t=!Ni(e)&&e.contextElement?e.contextElement:Ni(e)?e:null;if(!t)return Hi;const n=t.getBoundingClientRect(),r=Oi(t);if("border-box"!==r.boxSizing)return Pi(t)?{x:t.offsetWidth>0&&qi(n.width)/t.offsetWidth||1,y:t.offsetHeight>0&&qi(n.height)/t.offsetHeight||1}:Hi;let o=n.width/parseFloat(r.width),i=n.height/parseFloat(r.height);return o&&Number.isFinite(o)||(o=1),i&&Number.isFinite(i)||(i=1),{x:o,y:i}}function zi(e,t,n,r){var o,i,s,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect();let c=Hi;t&&(r?Ni(r)&&(c=Vi(r)):c=Vi(e));const u=Ni(e)?ki(e):window,d=!Bi()&&n,h=(l.left+(d&&null!=(o=null==(i=u.visualViewport)?void 0:i.offsetLeft)?o:0))/c.x,f=(l.top+(d&&null!=(s=null==(a=u.visualViewport)?void 0:a.offsetTop)?s:0))/c.y,g=l.width/c.x,p=l.height/c.y;return{width:g,height:p,top:f,right:h+g,bottom:f+p,left:h,x:h,y:f}}function Gi(e){return((Ii(e)?e.ownerDocument:e.document)||window.document).documentElement}function Yi(e){return Ni(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Qi(e){return zi(Gi(e)).left+Yi(e).scrollLeft}function Ji(e,t,n){const r=Pi(t),o=Gi(t),i=zi(e,!0,"fixed"===n,t);let s={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==Ai(t)||ji(o))&&(s=Yi(t)),Pi(t)){const e=zi(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=Qi(o));return{x:i.left+s.scrollLeft-a.x,y:i.top+s.scrollTop-a.y,width:i.width,height:i.height}}function Zi(e){if("html"===Ai(e))return e;const t=e.assignedSlot||e.parentNode||($i(e)?e.host:null)||Gi(e);return $i(t)?t.host:t}function Xi(e){return Pi(e)&&"fixed"!==Oi(e).position?e.offsetParent:null}function es(e){const t=ki(e);let n=Xi(e);for(;n&&Wi(n)&&"static"===Oi(n).position;)n=Xi(n);return n&&("html"===Ai(n)||"body"===Ai(n)&&"static"===Oi(n).position&&!Ui(n))?t:n||function(e){let t=Zi(e);for(;Pi(t)&&!Ki(t);){if(Ui(t))return t;t=Zi(t)}return null}(e)||t}function ts(e){const t=Zi(e);return Ki(t)?e.ownerDocument.body:Pi(t)&&ji(t)?t:ts(t)}function ns(e,t){var n;void 0===t&&(t=[]);const r=ts(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=ki(r);return o?t.concat(i,i.visualViewport||[],ji(r)?r:[]):t.concat(r,ns(r))}function rs(e,t,n){return"viewport"===t?Li(function(e,t){const n=ki(e),r=Gi(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Bi();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n)):Ni(t)?function(e,t){const n=zi(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Pi(e)?Vi(e):{x:1,y:1},s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{top:c,left:l,right:l+s,bottom:c+a,x:l,y:c,width:s,height:a}}(t,n):Li(function(e){var t;const n=Gi(e),r=Yi(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Fi(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=Fi(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+Qi(e);const l=-r.scrollTop;return"rtl"===Oi(o||n).direction&&(a+=Fi(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(Gi(e)))}const os={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=ns(e).filter((e=>Ni(e)&&"body"!==Ai(e))),o=null;const i="fixed"===Oi(e).position;let s=i?Zi(e):e;for(;Ni(s)&&!Ki(s);){const e=Oi(s),t=Ui(s);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==s)),s=Zi(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=rs(t,n,o);return e.top=Fi(r.top,e.top),e.right=Di(r.right,e.right),e.bottom=Di(r.bottom,e.bottom),e.left=Fi(r.left,e.left),e}),rs(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=Pi(n),i=Gi(n);if(n===i)return t;let s={scrollLeft:0,scrollTop:0},a={x:1,y:1};const l={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Ai(n)||ji(i))&&(s=Yi(n)),Pi(n))){const e=zi(n);a=Vi(n),l.x=e.x+n.clientLeft,l.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+l.x,y:t.y*a.y-s.scrollTop*a.y+l.y}},isElement:Ni,getDimensions:function(e){if(Pi(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=zi(e);return{width:t.width,height:t.height}},getOffsetParent:es,getDocumentElement:Gi,getScale:Vi,getElementRects(e){return __async(this,null,(function*(){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||es,i=this.getDimensions;return{reference:Ji(t,yield o(n),r),floating:__spreadValues({x:0,y:0},yield i(n))}}))},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Oi(e).direction};function is(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=!0,animationFrame:a=!1}=r,l=o&&!a,c=l||i?[...Ni(e)?ns(e):e.contextElement?ns(e.contextElement):[],...ns(t)]:[];c.forEach((e=>{l&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));let u,d=null;if(s){let r=!0;d=new ResizeObserver((()=>{r||n(),r=!1})),Ni(e)&&!a&&d.observe(e),Ni(e)||!e.contextElement||a||d.observe(e.contextElement),d.observe(t)}let h=a?zi(e):null;return a&&function t(){const r=zi(e);!h||r.x===h.x&&r.y===h.y&&r.width===h.width&&r.height===h.height||n();h=r,u=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{l&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,a&&cancelAnimationFrame(u)}}const ss=(e,t,n)=>{const r=new Map,o=__spreadValues({platform:os},n),i=__spreadProps(__spreadValues({},o.platform),{_c:r});return Ri(e,t,__spreadProps(__spreadValues({},o),{platform:i}))};const as=Mt('<tc-root data-tc-dropdown-container="true"></tc-root>'),ls=()=>{const t=mn(),n=Ge(En),r=Ge(Vo),[o,i]=je(!1),[s,a]=je(n.account),[l,c]=je(!0);let u;const[d,h]=je(),[f,g]=je(),p=function(e,t,n){let r=()=>{var e;return null!=(e=null==n?void 0:n.placement)?e:"bottom"},o=()=>{var e;return null!=(e=null==n?void 0:n.strategy)?e:"absolute"},[i,s]=je({x:null,y:null,placement:r(),strategy:o(),middlewareData:{}}),[a,l]=je();Be((()=>{let e=a();if(e)throw e.value}));let c=Ke((()=>(e(),t(),{})));function u(){let i=e(),a=t();if(i&&a){let e=c();ss(i,a,{middleware:null==n?void 0:n.middleware,placement:r(),strategy:o()}).then((t=>{e===c()&&s(t)}),(e=>{l(e)}))}}return Be((()=>{let i=e(),s=t();if(null==n||n.middleware,r(),o(),i&&s)if(null!=n&&n.whileElementsMounted){let e=n.whileElementsMounted(i,s,u);e&&He(e)}else u()})),{get x(){return i().x},get y(){return i().y},get placement(){return i().placement},get strategy(){return i().strategy},get middlewareData(){return i().middlewareData},update:u}}(f,d,{whileElementsMounted:is,placement:"bottom-end"});r.connectionRestored.then((()=>c(!1)));const y=n.onStatusChange((e=>{if(!e)return i(!1),void a(null);a(e.account)})),m=e=>{if(!s()||!o())return;const t=f().contains(e.target),n=u.contains(e.target);t||n||i(!1)};var v;return v=()=>{document.body.addEventListener("click",m)},Be((()=>qe(v))),He((()=>{document.body.removeEventListener("click",m),y()})),gt(Yt,{component:ir,get children(){return[gt(xt,{get when(){return l()},get children(){return gt(wi,{disabled:!0,"data-tc-connect-button-loading":"true",get children(){return gt(bi,{})}})}}),gt(xt,{get when(){return!l()},get children(){return[gt(xt,{get when(){return!s()},get children(){return gt(mi,{onClick:()=>r.connectWallet(),"data-tc-connect-button":"true",get children(){return[gt($o,{get fill(){return t.colors.connectButton.foreground}}),gt(Co,{translationKey:"button.connectWallet",fontSize:"15px",lineHeight:"18px",fontWeight:"590",get color(){return t.colors.connectButton.foreground},children:"Connect wallet"})]}})}}),gt(xt,{get when(){return s()},get children(){return gt(xi,{get children(){return[gt(vi,{onClick:()=>i((e=>!e)),ref:g,"data-tc-dropdown-button":"true",get children(){return[gt(Co,{fontSize:"15px",fontWeight:"590",lineHeight:"18px",get children(){return(()=>{const t=s();if(t){const n=me(t.address,t.chain===e.CHAIN.TESTNET);return n.slice(0,4)+"…"+n.slice(-4)}return""})()}}),gt(jr,{direction:"bottom"})]}}),gt(Gt,{get children(){const e=qe((()=>document.importNode(as,!0)));return $t(h,e),e.style.setProperty("z-index","999"),e._$owner=Oe,jt(e,gt(Mr,{onBeforeEnter:e=>{e.animate([{opacity:0,transform:"translateY(-8px)"},{opacity:1,transform:"translateY(0)"}],{duration:150})},onExit:(e,t)=>{e.animate([{opacity:1,transform:"translateY(0)"},{opacity:0,transform:"translateY(-8px)"}],{duration:150}).finished.then(t)},get children(){return gt(xt,{get when(){return o()},get children(){return gt(Ci,{get hidden(){return!o()},onClose:()=>i(!1),ref(e){"function"==typeof u?u(e):u=e}})}})}}),null),jt(e,gt(_i,{}),null),Ue((t=>{var n,r;const o=p.strategy,i=`${null!=(n=p.y)?n:0}px`,s=`${null!=(r=p.x)?r:0}px`;return o!==t._v$&&e.style.setProperty("position",t._v$=o),i!==t._v$2&&e.style.setProperty("top",t._v$2=i),s!==t._v$3&&e.style.setProperty("left",t._v$3=s),t}),{_v$:void 0,_v$2:void 0,_v$3:void 0}),e}})]}})}})]}})]}})},cs={m:"16px",s:"8px",none:"0"},us=wn.div``,ds=wn(ko)`
|
|
457
457
|
max-width: 320px;
|
|
458
458
|
margin: 0 auto 6px;
|
|
459
|
-
`,
|
|
459
|
+
`,hs=wn(Kr)`
|
|
460
460
|
position: absolute;
|
|
461
461
|
top: 16px;
|
|
462
462
|
left: 16px;
|
|
463
|
-
`,
|
|
463
|
+
`,fs=wn(bo)`
|
|
464
464
|
margin-bottom: 16px;
|
|
465
|
-
`,
|
|
465
|
+
`,gs=wn.div`
|
|
466
466
|
display: flex;
|
|
467
467
|
gap: 16px;
|
|
468
468
|
height: 56px;
|
|
469
469
|
margin-bottom: 24px;
|
|
470
|
-
`,
|
|
470
|
+
`,ps=wn(kr)`
|
|
471
471
|
padding: 0 16px;
|
|
472
472
|
height: 56px;
|
|
473
473
|
font-size: 16px;
|
|
474
474
|
line-height: 20px;
|
|
475
475
|
width: 100%;
|
|
476
|
-
border-radius: ${e=>
|
|
477
|
-
`,
|
|
476
|
+
border-radius: ${e=>cs[e.theme.borderRadius]};
|
|
477
|
+
`,ys=wn.div`
|
|
478
478
|
display: flex;
|
|
479
479
|
justify-content: space-between;
|
|
480
480
|
align-items: center;
|
|
481
|
-
`,
|
|
481
|
+
`,ms=wn(Co)`
|
|
482
482
|
padding-left: 8px;
|
|
483
483
|
color: ${e=>e.theme.colors.text.secondary};
|
|
484
484
|
font-size: 16px;
|
|
485
|
-
`,[ws
|
|
485
|
+
`,[vs,ws]=Un({buttonRootId:null,language:"en",returnStrategy:"back",walletsListConfiguration:{}}),bs=wn.a`
|
|
486
486
|
display: block;
|
|
487
487
|
text-decoration: unset;
|
|
488
|
-
`,
|
|
488
|
+
`,xs=e=>gt(bs,vt({get href(){return e.href},get target(){return e.blank?"_blank":"_self"}},(()=>e.blank?{rel:"noreferrer noopener"}:{}),{get children(){return e.children}})),Cs=e=>{const t=Ge(En),n=Ke((()=>t.connect({universalLink:e.wallet.universalLink,bridgeUrl:e.wallet.bridgeUrl},e.additionalRequest)));return gt(us,{"data-tc-wallet-qr-modal-desktop":"true",get children(){return[gt(hs,{icon:"arrow",onClick:()=>e.onBackClick()}),gt(ds,{translationKey:"walletModal.qrCodeModal.connectWith",get translationValues(){return{name:e.wallet.name}},get children(){return["Connect with ",Ke((()=>e.wallet.name))]}}),gt(Ao,{translationKey:"walletModal.qrCodeModal.scan",get translationValues(){return{name:e.wallet.name}},get children(){return["Scan QR code with your phone’s or ",Ke((()=>e.wallet.name)),"’s camera."]}}),gt(fs,{disableCopy:!1,get sourceUrl(){return n()},get imageUrl(){return e.wallet.imageUrl}}),gt(gs,{get children(){return[gt(ps,{scale:"s",onClick:()=>{Xt(__spreadProps(__spreadValues({},e.wallet),{openMethod:"universal-link"})),pr(yr(n(),vs.returnStrategy))},get children(){return gt(yo,{translationKey:"walletModal.qrCodeModal.openWallet",get translationValues(){return{name:e.wallet.name}},get children(){return["Open ",Ke((()=>e.wallet.name))]}})}}),gt(xt,{get when(){return se(e.wallet)},get children(){return gt(ps,{scale:"s",onClick:()=>{Xt(e.wallet),t.connect({jsBridgeKey:e.wallet.jsBridgeKey},e.additionalRequest)},get children(){return gt(yo,{translationKey:"common.openExtension",children:"Open Extension"})}})}})]}}),gt(ys,{get children(){return[gt(ms,{translationKey:"walletModal.qrCodeModal.dontHave",get translationValues(){return{name:e.wallet.name}},get children(){return["Don't have ",Ke((()=>e.wallet.name)),"?"]}}),gt(xs,{get href(){return e.wallet.aboutUrl},blank:!0,get children(){return gt(kr,{get children(){return gt(yo,{translationKey:"common.get",children:"GET"})}})}})]}})]}})},_s=wn(Yr)`
|
|
489
489
|
padding-left: 24px;
|
|
490
490
|
padding-right: 24px;
|
|
491
491
|
|
|
492
|
-
${
|
|
492
|
+
${xr("mobile")} {
|
|
493
493
|
padding-left: 0;
|
|
494
494
|
padding-right: 0;
|
|
495
495
|
|
|
496
496
|
min-height: 364px;
|
|
497
497
|
}
|
|
498
|
-
`,Es=
|
|
498
|
+
`,Es=wn(ko)`
|
|
499
499
|
margin-top: 12px;
|
|
500
500
|
|
|
501
|
-
${
|
|
501
|
+
${xr("mobile")} {
|
|
502
502
|
padding: 0 10px;
|
|
503
503
|
}
|
|
504
|
-
`,
|
|
504
|
+
`,Ss=wn.div`
|
|
505
505
|
margin: 30px 0;
|
|
506
506
|
width: 100%;
|
|
507
507
|
display: flex;
|
|
508
508
|
justify-content: center;
|
|
509
509
|
|
|
510
|
-
${
|
|
510
|
+
${xr("mobile")} {
|
|
511
511
|
height: 160px;
|
|
512
512
|
align-items: center;
|
|
513
513
|
}
|
|
514
|
-
`,
|
|
514
|
+
`,Rs=wn(Co)`
|
|
515
515
|
min-width: 84px;
|
|
516
516
|
text-align: center;
|
|
517
517
|
font-weight: 590;
|
|
518
|
-
`,
|
|
518
|
+
`,Ls=wn((e=>{const t="tabBar"+Math.floor(1e4*Math.random());return gt(Zr,{get class(){return e.class},"data-tc-tab-bar":"true",get children(){return[gt(Xr,{get right(){return 1===e.selectedTabIndex}}),gt(to,{get isActive(){return 0===e.selectedTabIndex},get children(){return[gt(eo,{type:"radio",name:t,get checked(){return 0===e.selectedTabIndex},onInput:()=>{var t;return null==(t=e.onSelectedTabIndexChange)?void 0:t.call(e,0)}}),Ke((()=>e.tab1))]}}),gt(to,{get isActive(){return 1===e.selectedTabIndex},get children(){return[gt(eo,{type:"radio",get checked(){return 1===e.selectedTabIndex},name:t,onInput:()=>{var t;return null==(t=e.onSelectedTabIndexChange)?void 0:t.call(e,1)}}),Ke((()=>e.tab2))]}})]}})}))`
|
|
519
519
|
margin: 0 auto 22px;
|
|
520
|
-
`;function
|
|
520
|
+
`;function ks(e){return"jsBridgeKey"in e?__spreadProps(__spreadValues({},e),{injected:ge.isWalletInjected(e.jsBridgeKey),embedded:ge.isInsideWalletBrowser(e.jsBridgeKey)}):e}function Os(e,t){var n,r,o,i;return t?((null==(n=t.includeWallets)?void 0:n.length)&&(r="name",o=e,i=t.includeWallets.map(ks),e=o.map((e=>{const t=i.find((t=>t[r]===e[r]));return i=i.filter((t=>t[r]!==e[r])),void 0===t?e:t})).concat(i)),e):e}const[As,Ts]=je(br("mobile"));vr()&&window.addEventListener("resize",(()=>Ts(br("mobile"))));const Ms=wn.ul`
|
|
521
521
|
display: flex;
|
|
522
522
|
margin: 0 auto 24px;
|
|
523
523
|
width: fit-content;
|
|
@@ -533,7 +533,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
533
533
|
|
|
534
534
|
-ms-overflow-style: none;
|
|
535
535
|
scrollbar-width: none;
|
|
536
|
-
`,
|
|
536
|
+
`,Ps=wn.li`
|
|
537
537
|
width: 82px;
|
|
538
538
|
min-width: 82px;
|
|
539
539
|
height: 124px;
|
|
@@ -547,7 +547,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
547
547
|
|
|
548
548
|
transition: transform 0.1s ease-in-out;
|
|
549
549
|
|
|
550
|
-
${
|
|
550
|
+
${_r} {
|
|
551
551
|
&:hover {
|
|
552
552
|
transform: scale(1.04);
|
|
553
553
|
}
|
|
@@ -557,12 +557,12 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
557
557
|
transform: scale(0.96);
|
|
558
558
|
}
|
|
559
559
|
|
|
560
|
-
${
|
|
560
|
+
${Cr} {
|
|
561
561
|
&:active {
|
|
562
562
|
transform: scale(0.92);
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
-
|
|
565
|
+
`,Ns=wn.div`
|
|
566
566
|
width: 1px;
|
|
567
567
|
margin: 0 10px;
|
|
568
568
|
height: 24px;
|
|
@@ -570,7 +570,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
570
570
|
top: 30px;
|
|
571
571
|
|
|
572
572
|
background-color: ${e=>e.theme.colors.icon.tertiary};
|
|
573
|
-
`,
|
|
573
|
+
`,Is=wn.div`
|
|
574
574
|
width: 64px;
|
|
575
575
|
height: 64px;
|
|
576
576
|
border-radius: 16px;
|
|
@@ -578,38 +578,38 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
578
578
|
align-items: center;
|
|
579
579
|
justify-content: center;
|
|
580
580
|
|
|
581
|
-
background-color: ${e=>
|
|
581
|
+
background-color: ${e=>dr(e.theme.colors.accent,.12)};
|
|
582
582
|
color: ${e=>e.theme.colors.accent};
|
|
583
583
|
|
|
584
584
|
margin-bottom: 8px;
|
|
585
|
-
|
|
585
|
+
`,$s=wn(Ao)`
|
|
586
586
|
margin-bottom: 24px;
|
|
587
587
|
padding: 0 24px;
|
|
588
588
|
min-height: 44px;
|
|
589
|
-
`,
|
|
589
|
+
`,js=wn(kr)`
|
|
590
590
|
display: block;
|
|
591
591
|
margin: 0 auto;
|
|
592
|
-
`,Ws="https://ton.org/wallets",
|
|
592
|
+
`,Ws="https://ton.org/wallets",Us=Mt('<div data-tc-wallets-modal-mobile="true"></div>'),Bs=Mt("<li></li>"),Ks=e=>{const t=vs.connector,n=mn(),r=()=>{const n=t.connect(e.walletsList.filter(ce).map((e=>({bridgeUrl:e.bridgeUrl,universalLink:e.universalLink}))),e.additionalRequest);Xt({openMethod:"universal-link"}),gr(yr(n,vs.returnStrategy))};return(()=>{const o=Us.cloneNode(!0);return jt(o,gt(ko,{translationKey:"walletModal.mobileSelectWalletModal.connectWallet",children:"Connect a wallet"}),null),jt(o,gt($s,{translationKey:"walletModal.mobileSelectWalletModal.selectWallet",children:"Select your wallet from the options to get started."}),null),jt(o,gt(Ms,{get children(){return[gt(Ps,{onClick:r,get children(){return[gt(Is,{get children(){return gt(No,{get fill(){return n.colors.accent}})}}),gt(Co,{fontWeight:590,translationKey:"walletModal.mobileSelectWalletModal.installedWallet",children:"Installed wallet"})]}}),gt(Ns,{children:" "}),gt(bt,{get each(){return e.walletsList.filter((e=>"bridgeUrl"in e))},children:n=>(()=>{const r=Bs.cloneNode(!0);return jt(r,gt(Ro,{get iconUrl(){return n.imageUrl},get name(){return n.name},onClick:()=>{var r;"universalLink"in(r=n)?(Xt(__spreadProps(__spreadValues({},r),{openMethod:"universal-link"})),gr(yr(t.connect({universalLink:r.universalLink,bridgeUrl:r.bridgeUrl},e.additionalRequest),vs.returnStrategy))):pr(r.aboutUrl)}})),r})()})]}}),null),jt(o,gt(xs,{get href(){return Ws},blank:!0,get children(){return gt(js,{get children(){return gt(yo,{translationKey:"common.learnMore",children:"Learn more"})}})}}),null),o})()},Ds={m:"16px",s:"8px",none:"0"},Fs={m:"8px",s:"4px",none:"0"},qs=wn.div`
|
|
593
593
|
display: flex;
|
|
594
594
|
flex-direction: column;
|
|
595
595
|
align-items: center;
|
|
596
|
-
`,
|
|
596
|
+
`,Hs=wn(Ao)`
|
|
597
597
|
max-width: 320px;
|
|
598
598
|
margin-bottom: 24px;
|
|
599
|
-
`,
|
|
599
|
+
`,Vs=wn(bo)`
|
|
600
600
|
margin-bottom: 16px;
|
|
601
|
-
`,
|
|
601
|
+
`,zs=wn.div`
|
|
602
602
|
display: flex;
|
|
603
603
|
gap: 16px;
|
|
604
604
|
width: 100%;
|
|
605
|
-
`,
|
|
605
|
+
`,Gs=wn(kr)`
|
|
606
606
|
position: relative;
|
|
607
607
|
font-size: 16px;
|
|
608
608
|
line-height: 20px;
|
|
609
609
|
width: 100%;
|
|
610
610
|
padding: 0 16px;
|
|
611
611
|
height: 56px;
|
|
612
|
-
border-radius: ${e=>
|
|
612
|
+
border-radius: ${e=>Ds[e.theme.borderRadius]};
|
|
613
613
|
|
|
614
614
|
&:hover {
|
|
615
615
|
${e=>e.disableEventsAnimation?"transform: unset;":""}
|
|
@@ -618,7 +618,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
618
618
|
&:active {
|
|
619
619
|
${e=>e.disableEventsAnimation?"transform: unset;":""}
|
|
620
620
|
}
|
|
621
|
-
`,
|
|
621
|
+
`,Ys=wn.ul`
|
|
622
622
|
position: absolute;
|
|
623
623
|
bottom: 100%;
|
|
624
624
|
left: 0;
|
|
@@ -628,9 +628,9 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
628
628
|
transform: translateY(-16px);
|
|
629
629
|
|
|
630
630
|
background-color: ${e=>e.theme.colors.background.primary};
|
|
631
|
-
border-radius: ${e=>
|
|
631
|
+
border-radius: ${e=>Ds[e.theme.borderRadius]};
|
|
632
632
|
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
|
|
633
|
-
`,
|
|
633
|
+
`,Qs=wn.li`
|
|
634
634
|
padding: 8px;
|
|
635
635
|
|
|
636
636
|
display: flex;
|
|
@@ -638,7 +638,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
638
638
|
gap: 8px;
|
|
639
639
|
|
|
640
640
|
cursor: pointer;
|
|
641
|
-
border-radius: ${e=>
|
|
641
|
+
border-radius: ${e=>Fs[e.theme.borderRadius]};
|
|
642
642
|
|
|
643
643
|
transition: background-color, transform 0.1s ease-in-out;
|
|
644
644
|
|
|
@@ -649,30 +649,30 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
649
649
|
&:active {
|
|
650
650
|
transform: scale(0.96);
|
|
651
651
|
}
|
|
652
|
-
`,
|
|
652
|
+
`,Js=wn(ur)`
|
|
653
653
|
width: 24px;
|
|
654
654
|
height: 24px;
|
|
655
655
|
|
|
656
656
|
border-radius: 6px;
|
|
657
|
-
`,
|
|
657
|
+
`,Zs=wn.div`
|
|
658
658
|
margin-top: 23px;
|
|
659
659
|
margin-bottom: 1px;
|
|
660
660
|
width: 100%;
|
|
661
661
|
display: flex;
|
|
662
662
|
justify-content: center;
|
|
663
663
|
align-items: center;
|
|
664
|
-
`;
|
|
664
|
+
`;wn(Co)`
|
|
665
665
|
color: ${e=>e.theme.colors.text.secondary};
|
|
666
666
|
font-size: 16px;
|
|
667
|
-
`;const
|
|
667
|
+
`;const Xs=e=>{const[t,n]=je(!1),r=vs.connector,o=e.walletsList.filter(ce).map((e=>({bridgeUrl:e.bridgeUrl,universalLink:e.universalLink}))),i=e.walletsList.filter(se);Xt({openMethod:"qrcode"});const s=Ke((()=>r.connect(o,e.additionalRequest))),a=()=>{let t=!1;function n(){t=!0,Xt({openMethod:"universal-link"}),window.removeEventListener("blur",n)}window.addEventListener("blur",n),gr(yr(s(),vs.returnStrategy)),setTimeout((()=>{t||e.openWalletFallback(),window.removeEventListener("blur",n)}),200)},l=t=>{if(t.stopPropagation(),1===i.length){const t=i[0];return Xt(t),void r.connect({jsBridgeKey:t.jsBridgeKey},e.additionalRequest)}n((e=>!e))};return gt(qs,{onClick:()=>n(!1),"data-tc-universal-qr-desktop":"true",get children(){return[gt(Hs,{translationKey:"walletModal.universalQRModal.scanQR",children:"Scan QR code with a TON Connect compatible wallet."}),gt(Vs,{get sourceUrl(){return s()},get disableCopy(){return t()}}),gt(zs,{get children(){return[gt(Gs,{onClick:a,scale:"s",get children(){return[gt(xt,{get when(){return i.length},get children(){return gt(yo,{translationKey:"walletModal.universalQRModal.openWallet",children:"Open Wallet"})}}),gt(xt,{get when(){return!i.length},get children(){return gt(yo,{translationKey:"walletModal.universalQRModal.openInstalledWallet",children:"Open Installed Wallet"})}})]}}),gt(xt,{get when(){return i.length},get children(){return gt(Gs,{onClick:l,get disableEventsAnimation(){return t()},scale:"s",get children(){return[gt(Mr,{onBeforeEnter:e=>{e.animate([{opacity:0,transform:"translateY(0)"},{opacity:1,transform:"translateY(-16px)"}],{duration:150})},onExit:(e,t)=>{e.animate([{opacity:1,transform:"translateY(-16px)"},{opacity:0,transform:"translateY(0)"}],{duration:150}).finished.then(t)},get children(){return gt(xt,{get when(){return t()},get children(){return gt(Ys,{get children(){return gt(bt,{each:i,children:t=>gt(Qs,{onClick:()=>{return Xt(n=t),void r.connect({jsBridgeKey:n.jsBridgeKey},e.additionalRequest);var n},get children(){return[gt(Js,{get src(){return t.imageUrl},alt:""}),gt(Co,{fontWeight:590,get children(){return t.name}})]}})})}})}})}}),gt(yo,{translationKey:"common.openExtension",children:"Open Extension"})]}})}})]}}),gt(xt,{get when(){return!i.length},get children(){return gt(Zs,{get children(){return gt(xs,{get href(){return Ws},blank:!0,get children(){return gt(kr,{appearance:"flat",class:fn`
|
|
668
668
|
font-size: 15px;
|
|
669
|
-
`,get children(){return
|
|
669
|
+
`,get children(){return gt(yo,{translationKey:"common.learnMore",children:"Learn more"})}})}})}})}})]}})},ea=wn.div`
|
|
670
670
|
display: flex;
|
|
671
671
|
flex-direction: column;
|
|
672
672
|
align-items: center;
|
|
673
|
-
`,
|
|
673
|
+
`,ta=wn(Ao)`
|
|
674
674
|
margin-bottom: 26px;
|
|
675
|
-
`,
|
|
675
|
+
`,na=wn.ul`
|
|
676
676
|
display: grid;
|
|
677
677
|
grid-template-columns: repeat(auto-fit, 92px);
|
|
678
678
|
justify-content: center;
|
|
@@ -696,18 +696,18 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
696
696
|
background: #cacaca;
|
|
697
697
|
border-radius: 12px;
|
|
698
698
|
}
|
|
699
|
-
`,
|
|
699
|
+
`,ra=wn(kr)`
|
|
700
700
|
display: block;
|
|
701
701
|
margin: 0 auto 1px;
|
|
702
702
|
font-size: 15px;
|
|
703
|
-
`,
|
|
703
|
+
`,oa=Mt("<li></li>"),ia=e=>gt(ea,{"data-tc-select-wallet-desktop":"true",get children(){return[gt(ta,{translationKey:"walletModal.desktopSelectWalletModal.selectWallet",children:"Choose your preferred wallet from the options to get started."}),gt(na,{get children(){return gt(bt,{get each(){return e.walletsList},children:t=>(()=>{const n=oa.cloneNode(!0);return jt(n,gt(Ro,{get iconUrl(){return t.imageUrl},get name(){return t.name},onClick:()=>e.onSelect(t)})),n})()})}}),gt(xs,{get href(){return Ws},blank:!0,get children(){return gt(ra,{appearance:"flat",get children(){return gt(yo,{translationKey:"common.learnMore",children:"Learn more"})}})}})]}}),sa=Mt('<div data-tc-wallets-modal-desktop="true"></div>'),aa=()=>{const{locale:e}=po()[1];Be((()=>e(vs.language)));const t=Ge(En),n=Ge(Vo),[r]=De((()=>n.getWallets())),[o,i]=je(null),[s,a]=je(0),l=Ke((()=>{if("ready"!==r.state)return null;let e=Os(r(),vs.walletsListConfiguration);const t=vs.preferredWalletName,n=e.find((e=>e.name===t)),o=e.filter((e=>e.name===t)).length>=2;return t&&n&&!o&&(e=[n].concat(e.filter((e=>e.name!==t)))),e})),c=()=>{var e;return"loading"===(null==(e=vs.connectRequestParameters)?void 0:e.state)},u=Ke((()=>{var e;if(!c())return null==(e=vs.connectRequestParameters)?void 0:e.value})),d=()=>{Jt(!1),i(null)},h=e=>se(e)?(Xt(e),void t.connect({jsBridgeKey:e.jsBridgeKey},u())):ce(e)?(Xt(__spreadProps(__spreadValues({},e),{openMethod:"qrcode"})),void i(e)):void pr(e.aboutUrl);return He(t.onStatusChange((e=>{e&&d()}))),gt(_s,{get opened(){return Qt()},onClose:d,"data-tc-wallets-modal-container":"true",get children(){return[gt(xt,{get when(){return c()||!l()},get children(){return[gt(Es,{translationKey:"walletModal.loading",children:"Wallets list is loading"}),gt(Ss,{get children(){return gt(Ho,{size:"m"})}})]}}),gt(xt,{get when(){return Ke((()=>!c()))()&&l()},get children(){return[gt(xt,{get when(){return As()},get children(){return gt(Ks,{get walletsList(){return l()},get additionalRequest(){return u()}})}}),gt(xt,{get when(){return!As()},get children(){return[gt(xt,{get when(){return!o()},get children(){const e=sa.cloneNode(!0);return jt(e,gt(Ls,{get tab1(){return gt(Rs,{translationKey:"walletModal.qrCode",cursor:"unset",children:"QR Code"})},get tab2(){return gt(Rs,{translationKey:"walletModal.wallets",cursor:"unset",children:"Wallets"})},get selectedTabIndex(){return s()},onSelectedTabIndexChange:a}),null),jt(e,gt(Ct,{get children(){return[gt(_t,{get when(){return 0===s()},get children(){return gt(Xs,{get walletsList(){return l()},get additionalRequest(){return u()},openWalletFallback:()=>a(1)})}}),gt(_t,{get when(){return 1===s()},get children(){return gt(ia,{get walletsList(){return l()},onSelect:h})}})]}}),null),e}}),gt(xt,{get when(){return o()},get children(){return gt(Cs,{get additionalRequest(){return u()},get wallet(){return o()},onBackClick:()=>i(null)})}})]}})]}})]}})},la=wn.div`
|
|
704
704
|
display: flex;
|
|
705
705
|
flex-direction: column;
|
|
706
706
|
align-items: center;
|
|
707
707
|
padding-bottom: 8px;
|
|
708
|
-
`,
|
|
708
|
+
`,ca=wn(ko)`
|
|
709
709
|
margin-top: 16px;
|
|
710
|
-
`,
|
|
710
|
+
`,ua=wn(Co)`
|
|
711
711
|
font-weight: 510;
|
|
712
712
|
font-size: 16px;
|
|
713
713
|
line-height: 20px;
|
|
@@ -715,7 +715,7 @@ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnP
|
|
|
715
715
|
max-width: 250px;
|
|
716
716
|
|
|
717
717
|
color: ${e=>e.theme.colors.text.secondary};
|
|
718
|
-
`,
|
|
718
|
+
`,da=wn(kr)`
|
|
719
719
|
margin-top: 32px;
|
|
720
|
-
`,fa=e=>{const t=Or(e);return pt(ca,wt(t,{get children(){return[De((()=>e.icon)),pt(ua,{get translationKey(){return e.headerTranslationKey},get translationValues(){return e.headerTranslationValues}}),pt(da,{get translationKey(){return e.textTranslationKey},get translationValues(){return e.textTranslationValues}}),pt(Ct,{get when(){return!1!==e.showButton},get children(){return pt(ha,{onClick:()=>e.onClose(),get children(){return pt(mo,{translationKey:"common.close",children:"Close"})}})}})]}}))},ga=e=>{var t;const n=Ye(zo),[r]=yo(),o=(null==(t=n.wallet)?void 0:t.name)||r("common.yourWallet",{},"your wallet");return pt(fa,{headerTranslationKey:"actionModal.confirmTransaction.header",headerTranslationValues:{name:o},textTranslationKey:"actionModal.confirmTransaction.text",get icon(){return pt(Vo,{size:"m"})},onClose:()=>e.onClose(),showButton:!1,"data-tc-confirm-modal":"true"})},pa=e=>pt(fa,{headerTranslationKey:"actionModal.transactionCanceled.header",textTranslationKey:"actionModal.transactionCanceled.text",get icon(){return pt(Fo,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-canceled-modal":"true"}),ya=e=>pt(fa,{headerTranslationKey:"actionModal.transactionSent.header",textTranslationKey:"actionModal.transactionSent.text",get icon(){return pt(Bo,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-sent-modal":"true"}),ma=()=>pt(Qr,{get opened(){var e;return De((()=>null!==tn()))()&&!0===(null==(e=tn())?void 0:e.openModal)},onClose:()=>nn(null),"data-tc-actions-modal-container":"true",get children(){return pt(_t,{get children(){return[pt(St,{get when(){return"transaction-sent"===tn().name},get children(){return pt(ya,{onClose:()=>nn(null)})}}),pt(St,{get when(){return"transaction-canceled"===tn().name},get children(){return pt(pa,{onClose:()=>nn(null)})}}),pt(St,{get when(){return"confirm-transaction"===tn().name},get children(){return pt(ga,{onClose:()=>nn(null)})}})]}})}}),va=e=>{const t=go(_n,ws.language);return customElements.define(sr,class extends HTMLDivElement{},{extends:"div"}),document.body.hasAttribute("ontouchstart")||document.body.setAttribute("ontouchstart",""),pt(po.Provider,{value:t,get children(){return pt(zo.Provider,{get value(){return e.tonConnectUI},get children(){return pt(En.Provider,{get value(){return ws.connector},get children(){return[pt(cr,{}),pt(mn,{theme:tr,get children(){return[pt(Ct,{get when(){return ws.buttonRootId},get children(){return pt(Yt,{get mount(){return document.getElementById(ws.buttonRootId)},get children(){return pt(cs,{})}})}}),pt(Qt,{component:sr,get children(){return[pt(la,{}),pt(ma,{})]}})]}})]}})}})}})},wa=()=>{setTimeout((()=>Zt(!0)))},ba=e=>{setTimeout((()=>nn(e)))},xa=()=>{setTimeout((()=>nn(null)))},Ca=()=>Xt(),_a=(e,t)=>function(e,t,n,r={}){let o;return Ie((r=>{o=r,t===document?e():Ut(t,e(),t.firstChild?null:void 0,n)}),r.owner),()=>{o(),t.textContent=""}}((()=>pt(va,{tonConnectUI:t})),document.getElementById(e));class Sa{constructor(){__publicField(this,"localStorage"),__publicField(this,"storageKey","ton-connect-ui_wallet-info"),vr(),this.localStorage=localStorage}setWalletInfo(e){this.localStorage.setItem(this.storageKey,JSON.stringify(e))}getWalletInfo(){const e=this.localStorage.getItem(this.storageKey);return e?JSON.parse(e):null}removeWalletInfo(){this.localStorage.removeItem(this.storageKey)}}class Ea{constructor(){__publicField(this,"localStorage"),__publicField(this,"storageKey","ton-connect-ui_preferred-wallet"),vr(),this.localStorage=localStorage}setPreferredWalletName(e){this.localStorage.setItem(this.storageKey,e)}getPreferredWalletName(){return this.localStorage.getItem(this.storageKey)||void 0}}class Ra{constructor(e){if(__publicField(this,"walletInfoStorage",new Sa),__publicField(this,"preferredWalletStorage",new Ea),__publicField(this,"connector"),__publicField(this,"walletInfo",null),__publicField(this,"systemThemeChangeUnsubscribe",null),__publicField(this,"actionsConfiguration"),__publicField(this,"walletsList"),__publicField(this,"connectRequestParametersCallback"),__publicField(this,"connectionRestored",Promise.resolve(!1)),e&&"connector"in e&&e.connector)this.connector=e.connector;else{if(!(e&&"manifestUrl"in e&&e.manifestUrl))throw new gr("You have to specify a `manifestUrl` or a `connector` in the options.");this.connector=new pe({manifestUrl:e.manifestUrl})}this.walletsList=this.getWallets(),this.walletsList.then((e=>{return t=e.map((e=>e.imageUrl)),void[...new Set(t)].forEach((e=>{(new window.Image).src=e}));var t}));const t=this.normalizeWidgetRoot(null==e?void 0:e.widgetRootId);this.subscribeToWalletChange(),!1!==(null==e?void 0:e.restoreConnection)&&(this.connectionRestored=new Promise((e=>__async(this,null,(function*(){yield this.connector.restoreConnection(),this.connector.connected||this.walletInfoStorage.removeWalletInfo(),e(this.connector.connected)}))))),this.uiOptions=er(e,{uiPreferences:{theme:"SYSTEM"}});const n=this.preferredWalletStorage.getPreferredWalletName();bs({connector:this.connector,preferredWalletName:n}),_a(t,this)}static getWallets(){return pe.getWallets()}get connected(){return this.connector.connected}get account(){return this.connector.account}get wallet(){return this.connector.wallet&&this.walletInfo?__spreadValues(__spreadValues({},this.connector.wallet),this.walletInfo):null}set uiOptions(e){var t,n,r,o,i,s,a;this.checkButtonRootExist(e.buttonRootId),this.actionsConfiguration=e.actionsConfiguration,(null==(t=e.uiPreferences)?void 0:t.theme)?"SYSTEM"!==(null==(n=e.uiPreferences)?void 0:n.theme)?(null==(r=this.systemThemeChangeUnsubscribe)||r.call(this),ir(e.uiPreferences.theme,e.uiPreferences.colorsSet)):(ir(window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?Kn.LIGHT:Kn.DARK,e.uiPreferences.colorsSet),this.systemThemeChangeUnsubscribe||(this.systemThemeChangeUnsubscribe=function(e){const t=t=>e(t.matches?Kn.DARK:Kn.LIGHT);return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t),()=>window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",t)}(ir))):(null==(o=e.uiPreferences)?void 0:o.colorsSet)&&(s=e.uiPreferences.colorsSet,or[Kn.DARK]=er(s[Kn.DARK],or[Kn.DARK]),or[Kn.LIGHT]=er(s[Kn.LIGHT],or[Kn.LIGHT]),nr((e=>({colors:er(or[e.theme],rr[e.theme])})))),(null==(i=e.uiPreferences)?void 0:i.borderRadius)&&(a=e.uiPreferences.borderRadius,nr({borderRadius:a})),bs((t=>{var n;const r=er(__spreadValues(__spreadValues(__spreadValues({},e.language&&{language:e.language}),!!(null==(n=e.actionsConfiguration)?void 0:n.returnStrategy)&&{returnStrategy:e.actionsConfiguration.returnStrategy}),!!e.walletsListConfiguration&&{walletsListConfiguration:e.walletsListConfiguration}),Tn(t));return void 0!==e.buttonRootId&&(r.buttonRootId=e.buttonRootId),r}))}setConnectRequestParameters(e){var t;bs({connectRequestParameters:e}),"ready"!==(null==e?void 0:e.state)&&e||null==(t=this.connectRequestParametersCallback)||t.call(this,null==e?void 0:e.value)}getWallets(){return __async(this,null,(function*(){return this.connector.getWallets()}))}onStatusChange(e,t){return this.connector.onStatusChange((t=>__async(this,null,(function*(){if(t){const n=yield this.getSelectedWalletInfo(t);e(__spreadValues(__spreadValues({},t),n||this.walletInfoStorage.getWalletInfo()))}else e(t)}))),t)}connectWallet(){return __async(this,null,(function*(){const e=(yield this.getWallets()).find(ce);if(e){const t=t=>{en(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},t)},n=ws.connectRequestParameters;"loading"===(null==n?void 0:n.state)?this.connectRequestParametersCallback=t:t(null==n?void 0:n.value)}else wa();return new Promise(((e,t)=>{const n=this.connector.onStatusChange((r=>__async(this,null,(function*(){if(n(),r){const t=yield this.getSelectedWalletInfo(r);e(__spreadValues(__spreadValues({},r),t||this.walletInfoStorage.getWalletInfo()))}else t(new gr("Wallet was not connected"))}))),t)}))}))}disconnect(){return xa(),this.walletInfoStorage.removeWalletInfo(),this.connector.disconnect()}sendTransaction(e,t){return __async(this,null,(function*(){if(!this.connected||!this.walletInfo)throw new gr("Connect wallet to send a transaction.");const{notifications:n,modals:r,returnStrategy:o}=this.getModalsAndNotificationsConfiguration(t);"universalLink"in this.walletInfo&&"universal-link"===this.walletInfo.openMethod&&pr(mr(this.walletInfo.universalLink,o)),ba({name:"confirm-transaction",showNotification:n.includes("before"),openModal:r.includes("before")});try{const t=yield this.connector.sendTransaction(e);return ba({name:"transaction-sent",showNotification:n.includes("success"),openModal:r.includes("success")}),t}catch(i){throw ba({name:"transaction-canceled",showNotification:n.includes("error"),openModal:r.includes("error")}),i instanceof L?i:(console.error(i),new gr("Unhandled error:"+i))}}))}subscribeToWalletChange(){this.connector.onStatusChange((e=>__async(this,null,(function*(){var t;e?(yield this.updateWalletInfo(e),this.setPreferredWalletName((null==(t=this.walletInfo)?void 0:t.name)||e.device.appName)):this.walletInfoStorage.removeWalletInfo()}))))}setPreferredWalletName(e){this.preferredWalletStorage.setPreferredWalletName(e),bs({preferredWalletName:e})}getSelectedWalletInfo(e){return __async(this,null,(function*(){let t,n=Ca();if(!n)return null;if("name"in n)t=n;else{const r=As(yield this.walletsList,ws.walletsListConfiguration).find((t=>t.name.toLowerCase()===e.device.appName.toLowerCase()));if(!r)throw new gr(`Cannot find WalletInfo for the '${e.device.appName}' wallet`);t=__spreadValues(__spreadValues({},r),n)}return t}))}updateWalletInfo(e){return __async(this,null,(function*(){const t=yield this.getSelectedWalletInfo(e);t?(this.walletInfo=t,this.walletInfoStorage.setWalletInfo(t)):this.walletInfo=this.walletInfoStorage.getWalletInfo()}))}normalizeWidgetRoot(e){if(!e||!document.getElementById(e)){e="tc-widget-root";const t=document.createElement("div");t.id=e,document.body.appendChild(t)}return e}checkButtonRootExist(e){if(null!=e&&!document.getElementById(e))throw new gr(`${e} element not found in the document.`)}getModalsAndNotificationsConfiguration(e){var t,n,r;const o=["before","success","error"];let i=o;(null==(t=this.actionsConfiguration)?void 0:t.notifications)&&"all"!==(null==(n=this.actionsConfiguration)?void 0:n.notifications)&&(i=this.actionsConfiguration.notifications),(null==e?void 0:e.notifications)&&(i="all"===e.notifications?o:e.notifications);let s=["before"];return(null==(r=this.actionsConfiguration)?void 0:r.modals)&&(s="all"===this.actionsConfiguration.modals?o:this.actionsConfiguration.modals),(null==e?void 0:e.modals)&&(s="all"===e.modals?o:e.modals),{notifications:i,modals:s,returnStrategy:(null==e?void 0:e.returnStrategy)||"back"}}}e.THEME=Kn,e.TonConnectUI=Ra,e.TonConnectUIError=gr,e.default=Ra,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
720
|
+
`,ha=e=>{const t=Lr(e);return gt(la,vt(t,{get children(){return[Ke((()=>e.icon)),gt(ca,{get translationKey(){return e.headerTranslationKey},get translationValues(){return e.headerTranslationValues}}),gt(ua,{get translationKey(){return e.textTranslationKey},get translationValues(){return e.textTranslationValues}}),gt(xt,{get when(){return!1!==e.showButton},get children(){return gt(da,{onClick:()=>e.onClose(),get children(){return gt(yo,{translationKey:"common.close",children:"Close"})}})}})]}}))},fa=e=>{var t;const n=Ge(Vo),[r]=po(),o=(null==(t=n.wallet)?void 0:t.name)||r("common.yourWallet",{},"your wallet");return gt(ha,{headerTranslationKey:"actionModal.confirmTransaction.header",headerTranslationValues:{name:o},textTranslationKey:"actionModal.confirmTransaction.text",get icon(){return gt(Ho,{size:"m"})},onClose:()=>e.onClose(),showButton:!1,"data-tc-confirm-modal":"true"})},ga=e=>gt(ha,{headerTranslationKey:"actionModal.transactionCanceled.header",textTranslationKey:"actionModal.transactionCanceled.text",get icon(){return gt(Do,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-canceled-modal":"true"}),pa=e=>gt(ha,{headerTranslationKey:"actionModal.transactionSent.header",textTranslationKey:"actionModal.transactionSent.text",get icon(){return gt(Uo,{size:"m"})},onClose:()=>e.onClose(),"data-tc-transaction-sent-modal":"true"}),ya=()=>gt(Yr,{get opened(){var e;return Ke((()=>null!==en()))()&&!0===(null==(e=en())?void 0:e.openModal)},onClose:()=>tn(null),"data-tc-actions-modal-container":"true",get children(){return gt(Ct,{get children(){return[gt(_t,{get when(){return"transaction-sent"===en().name},get children(){return gt(pa,{onClose:()=>tn(null)})}}),gt(_t,{get when(){return"transaction-canceled"===en().name},get children(){return gt(ga,{onClose:()=>tn(null)})}}),gt(_t,{get when(){return"confirm-transaction"===en().name},get children(){return gt(fa,{onClose:()=>tn(null)})}})]}})}}),ma=e=>{const t=fo(Cn,vs.language);return customElements.define(ir,class extends HTMLDivElement{},{extends:"div"}),document.body.hasAttribute("ontouchstart")||document.body.setAttribute("ontouchstart",""),gt(go.Provider,{value:t,get children(){return gt(Vo.Provider,{get value(){return e.tonConnectUI},get children(){return gt(En.Provider,{get value(){return vs.connector},get children(){return[gt(lr,{}),gt(yn,{theme:er,get children(){return[gt(xt,{get when(){return vs.buttonRootId},get children(){return gt(Gt,{get mount(){return document.getElementById(vs.buttonRootId)},get children(){return gt(ls,{})}})}}),gt(Yt,{component:ir,get children(){return[gt(aa,{}),gt(ya,{})]}})]}})]}})}})}})},va=()=>{setTimeout((()=>Jt(!0)))},wa=e=>{setTimeout((()=>tn(e)))},ba=()=>{setTimeout((()=>tn(null)))},xa=()=>Zt(),Ca=(e,t)=>function(e,t,n,r={}){let o;return $e((r=>{o=r,t===document?e():jt(t,e(),t.firstChild?null:void 0,n)}),r.owner),()=>{o(),t.textContent=""}}((()=>gt(ma,{tonConnectUI:t})),document.getElementById(e));class _a{constructor(){__publicField(this,"localStorage"),__publicField(this,"storageKey","ton-connect-ui_wallet-info"),mr(),this.localStorage=localStorage}setWalletInfo(e){this.localStorage.setItem(this.storageKey,JSON.stringify(e))}getWalletInfo(){const e=this.localStorage.getItem(this.storageKey);return e?JSON.parse(e):null}removeWalletInfo(){this.localStorage.removeItem(this.storageKey)}}class Ea{constructor(){__publicField(this,"localStorage"),__publicField(this,"storageKey","ton-connect-ui_preferred-wallet"),mr(),this.localStorage=localStorage}setPreferredWalletName(e){this.localStorage.setItem(this.storageKey,e)}getPreferredWalletName(){return this.localStorage.getItem(this.storageKey)||void 0}}e.BadRequestError=N,e.FetchWalletsError=W,e.LocalstorageNotFoundError=j,e.ParseHexError=B,e.THEME=Bn,e.TonConnect=ge,e.TonConnectError=L,e.TonConnectUI=class{constructor(e){if(__publicField(this,"walletInfoStorage",new _a),__publicField(this,"preferredWalletStorage",new Ea),__publicField(this,"connector"),__publicField(this,"walletInfo",null),__publicField(this,"systemThemeChangeUnsubscribe",null),__publicField(this,"actionsConfiguration"),__publicField(this,"walletsList"),__publicField(this,"connectRequestParametersCallback"),__publicField(this,"connectionRestored",Promise.resolve(!1)),e&&"connector"in e&&e.connector)this.connector=e.connector;else{if(!(e&&"manifestUrl"in e&&e.manifestUrl))throw new fr("You have to specify a `manifestUrl` or a `connector` in the options.");this.connector=new ge({manifestUrl:e.manifestUrl})}this.walletsList=this.getWallets(),this.walletsList.then((e=>{return t=e.map((e=>e.imageUrl)),void[...new Set(t)].forEach((e=>{(new window.Image).src=e}));var t}));const t=this.normalizeWidgetRoot(null==e?void 0:e.widgetRootId);this.subscribeToWalletChange(),!1!==(null==e?void 0:e.restoreConnection)&&(this.connectionRestored=new Promise((e=>__async(this,null,(function*(){yield this.connector.restoreConnection(),this.connector.connected||this.walletInfoStorage.removeWalletInfo(),e(this.connector.connected)}))))),this.uiOptions=Xn(e,{uiPreferences:{theme:"SYSTEM"}});const n=this.preferredWalletStorage.getPreferredWalletName();ws({connector:this.connector,preferredWalletName:n}),Ca(t,this)}static getWallets(){return ge.getWallets()}get connected(){return this.connector.connected}get account(){return this.connector.account}get wallet(){return this.connector.wallet&&this.walletInfo?__spreadValues(__spreadValues({},this.connector.wallet),this.walletInfo):null}set uiOptions(e){var t,n,r,o,i,s,a;this.checkButtonRootExist(e.buttonRootId),this.actionsConfiguration=e.actionsConfiguration,(null==(t=e.uiPreferences)?void 0:t.theme)?"SYSTEM"!==(null==(n=e.uiPreferences)?void 0:n.theme)?(null==(r=this.systemThemeChangeUnsubscribe)||r.call(this),or(e.uiPreferences.theme,e.uiPreferences.colorsSet)):(or(window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?Bn.LIGHT:Bn.DARK,e.uiPreferences.colorsSet),this.systemThemeChangeUnsubscribe||(this.systemThemeChangeUnsubscribe=function(e){const t=t=>e(t.matches?Bn.DARK:Bn.LIGHT);return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t),()=>window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",t)}(or))):(null==(o=e.uiPreferences)?void 0:o.colorsSet)&&(s=e.uiPreferences.colorsSet,rr[Bn.DARK]=Xn(s[Bn.DARK],rr[Bn.DARK]),rr[Bn.LIGHT]=Xn(s[Bn.LIGHT],rr[Bn.LIGHT]),tr((e=>({colors:Xn(rr[e.theme],nr[e.theme])})))),(null==(i=e.uiPreferences)?void 0:i.borderRadius)&&(a=e.uiPreferences.borderRadius,tr({borderRadius:a})),ws((t=>{var n;const r=Xn(__spreadValues(__spreadValues(__spreadValues({},e.language&&{language:e.language}),!!(null==(n=e.actionsConfiguration)?void 0:n.returnStrategy)&&{returnStrategy:e.actionsConfiguration.returnStrategy}),!!e.walletsListConfiguration&&{walletsListConfiguration:e.walletsListConfiguration}),An(t));return void 0!==e.buttonRootId&&(r.buttonRootId=e.buttonRootId),r}))}setConnectRequestParameters(e){var t;ws({connectRequestParameters:e}),"ready"!==(null==e?void 0:e.state)&&e||null==(t=this.connectRequestParametersCallback)||t.call(this,null==e?void 0:e.value)}getWallets(){return __async(this,null,(function*(){return this.connector.getWallets()}))}onStatusChange(e,t){return this.connector.onStatusChange((t=>__async(this,null,(function*(){if(t){const n=yield this.getSelectedWalletInfo(t);e(__spreadValues(__spreadValues({},t),n||this.walletInfoStorage.getWalletInfo()))}else e(t)}))),t)}connectWallet(){return __async(this,null,(function*(){const e=(yield this.getWallets()).find(ae);if(e){const t=t=>{Xt(e),this.connector.connect({jsBridgeKey:e.jsBridgeKey},t)},n=vs.connectRequestParameters;"loading"===(null==n?void 0:n.state)?this.connectRequestParametersCallback=t:t(null==n?void 0:n.value)}else va();return new Promise(((e,t)=>{const n=this.connector.onStatusChange((r=>__async(this,null,(function*(){if(n(),r){const t=yield this.getSelectedWalletInfo(r);e(__spreadValues(__spreadValues({},r),t||this.walletInfoStorage.getWalletInfo()))}else t(new fr("Wallet was not connected"))}))),t)}))}))}disconnect(){return ba(),this.walletInfoStorage.removeWalletInfo(),this.connector.disconnect()}sendTransaction(e,t){return __async(this,null,(function*(){if(!this.connected||!this.walletInfo)throw new fr("Connect wallet to send a transaction.");const{notifications:n,modals:r,returnStrategy:o}=this.getModalsAndNotificationsConfiguration(t);"universalLink"in this.walletInfo&&"universal-link"===this.walletInfo.openMethod&&gr(yr(this.walletInfo.universalLink,o)),wa({name:"confirm-transaction",showNotification:n.includes("before"),openModal:r.includes("before")});try{const t=yield this.connector.sendTransaction(e);return wa({name:"transaction-sent",showNotification:n.includes("success"),openModal:r.includes("success")}),t}catch(i){throw wa({name:"transaction-canceled",showNotification:n.includes("error"),openModal:r.includes("error")}),i instanceof L?i:(console.error(i),new fr("Unhandled error:"+i))}}))}subscribeToWalletChange(){this.connector.onStatusChange((e=>__async(this,null,(function*(){var t;e?(yield this.updateWalletInfo(e),this.setPreferredWalletName((null==(t=this.walletInfo)?void 0:t.name)||e.device.appName)):this.walletInfoStorage.removeWalletInfo()}))))}setPreferredWalletName(e){this.preferredWalletStorage.setPreferredWalletName(e),ws({preferredWalletName:e})}getSelectedWalletInfo(e){return __async(this,null,(function*(){let t,n=xa();if(!n)return null;if("name"in n)t=n;else{const r=Os(yield this.walletsList,vs.walletsListConfiguration).find((t=>t.name.toLowerCase()===e.device.appName.toLowerCase()));if(!r)throw new fr(`Cannot find WalletInfo for the '${e.device.appName}' wallet`);t=__spreadValues(__spreadValues({},r),n)}return t}))}updateWalletInfo(e){return __async(this,null,(function*(){const t=yield this.getSelectedWalletInfo(e);t?(this.walletInfo=t,this.walletInfoStorage.setWalletInfo(t)):this.walletInfo=this.walletInfoStorage.getWalletInfo()}))}normalizeWidgetRoot(e){if(!e||!document.getElementById(e)){e="tc-widget-root";const t=document.createElement("div");t.id=e,document.body.appendChild(t)}return e}checkButtonRootExist(e){if(null!=e&&!document.getElementById(e))throw new fr(`${e} element not found in the document.`)}getModalsAndNotificationsConfiguration(e){var t,n,r;const o=["before","success","error"];let i=o;(null==(t=this.actionsConfiguration)?void 0:t.notifications)&&"all"!==(null==(n=this.actionsConfiguration)?void 0:n.notifications)&&(i=this.actionsConfiguration.notifications),(null==e?void 0:e.notifications)&&(i="all"===e.notifications?o:e.notifications);let s=["before"];return(null==(r=this.actionsConfiguration)?void 0:r.modals)&&(s="all"===this.actionsConfiguration.modals?o:this.actionsConfiguration.modals),(null==e?void 0:e.modals)&&(s="all"===e.modals?o:e.modals),{notifications:i,modals:s,returnStrategy:(null==e?void 0:e.returnStrategy)||"back"}}},e.TonConnectUIError=fr,e.UnknownAppError=I,e.UnknownError=K,e.UserRejectsError=P,e.WalletAlreadyConnectedError=T,e.WalletNotConnectedError=M,e.WalletNotInjectedError=$,e.WalletsListManager=de,e.WrongAddressError=U,e.isWalletInfoCurrentlyEmbedded=ae,e.isWalletInfoCurrentlyInjected=se,e.isWalletInfoInjectable=le,e.isWalletInfoInjected=function(e){return"jsBridgeKey"in e},e.isWalletInfoRemote=ce,e.toUserFriendlyAddress=me,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
721
721
|
//# sourceMappingURL=tonconnect-ui.min.js.map
|