@metamask/browser-playground 0.7.2 → 0.7.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.
@@ -0,0 +1,3 @@
1
+ /*! For license information please see main.31e1a1d6.js.LICENSE.txt */
2
+ (()=>{var e={38:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessageSignature=o,t.verifySignMessage=function(e,t){const{message:n,account:{publicKey:r}}=e,{signedMessage:i,signature:s}=t;return o({message:n,signedMessage:i,signature:s,publicKey:r})};const r=n(5471),i=n(8636);function o(e){let{message:t,signedMessage:n,signature:o,publicKey:s}=e;return(0,i.bytesEqual)(t,n)&&r.ed25519.verify(o,n,s)}},100:(e,t,n)=>{const r=n(1314),i=n(9336);t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(e,t){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!r.isValid(t))throw new Error("Invalid version: "+t);return t>=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return i.testNumeric(e)?t.NUMERIC:i.testAlphanumeric(e)?t.ALPHANUMERIC:i.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+e)}}(e)}catch(r){return n}}},147:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(6912),t)},191:(e,t,n)=>{"use strict";function r(e){let{dir:t="left"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="string"===typeof e?e.replace("0x",""):e,r=0;for(let i=0;i<n.length-1&&"0"===n["left"===t?i:n.length-i-1].toString();i++)r++;return n="left"===t?n.slice(r):n.slice(0,n.length-r),"string"===typeof e?(1===n.length&&"right"===t&&(n="".concat(n,"0")),"0x".concat(n.length%2===1?"0".concat(n):n)):n}n.d(t,{B:()=>r})},214:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(4176),t),i(n(9994),t),i(n(7787),t)},224:(e,t,n)=>{const r=n(3250);function i(e,t){const n=e.a/255,r=t+'="'+e.hex+'"';return n<1?r+" "+t+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function o(e,t,n){let r=e+t;return"undefined"!==typeof n&&(r+=" "+n),r}t.render=function(e,t,n){const s=r.getOptions(t),a=e.modules.size,c=e.modules.data,l=a+2*s.margin,u=s.color.light.a?"<path "+i(s.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",d="<path "+i(s.color.dark,"stroke")+' d="'+function(e,t,n){let r="",i=0,s=!1,a=0;for(let c=0;c<e.length;c++){const l=Math.floor(c%t),u=Math.floor(c/t);l||s||(s=!0),e[c]?(a++,c>0&&l>0&&e[c-1]||(r+=s?o("M",l+n,.5+u+n):o("m",i,0),i=0,s=!1),l+1<t&&e[c+1]||(r+=o("h",a),a=0)):i++}return r}(c,a,s.margin)+'"/>',h='viewBox="0 0 '+l+" "+l+'"',f='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+h+' shape-rendering="crispEdges">'+u+d+"</svg>\n";return"function"===typeof n&&n(null,f),f}},226:(e,t,n)=>{"use strict";function r(e){let{strict:t=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!e&&("string"===typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x")))}n.d(t,{q:()=>r})},289:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Events=t.StandardEvents=void 0,t.StandardEvents="standard:events",t.Events=t.StandardEvents},410:(e,t,n)=>{const r=n(1605),i=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],o=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];t.getBlocksCount=function(e,t){switch(t){case r.L:return i[4*(e-1)+0];case r.M:return i[4*(e-1)+1];case r.Q:return i[4*(e-1)+2];case r.H:return i[4*(e-1)+3];default:return}},t.getTotalCodewordsCount=function(e,t){switch(t){case r.L:return o[4*(e-1)+0];case r.M:return o[4*(e-1)+1];case r.Q:return o[4*(e-1)+2];case r.H:return o[4*(e-1)+3];default:return}}},444:(e,t,n)=>{"use strict";function r(e,t){return function(e){var t;return Boolean("string"===typeof(null===e||void 0===e||null===(t=e.prototype)||void 0===t||null===(t=t.constructor)||void 0===t?void 0:t.name))}(e)?new e({message:t}):e({message:t})}n.d(t,{ME:()=>_,cK:()=>w});class i extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Assertion failed.";if(!e){if(t instanceof Error)throw t;throw r(arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,t)}}var s=n(621),a=n(6140),c=n(2494),l=n(2747);const{memoize:u}=l,d=/^(?:0x)?[0-9a-f]+$/i,h=/^0x[0-9a-f]+$/i,f=/^0x[0-9a-f]{40}$/,p=/^0x[0-9A-Fa-f]{40}$/,m=((0,s.T1)((0,a.Yj)(),d),(0,s.T1)((0,a.Yj)(),h),(0,s.T1)((0,a.Yj)(),f),(0,s.T1)((0,a.Yj)(),p),e=>"string"===typeof e);function g(e){return m(e)&&p.test(e)}function b(e){o(function(e){return m(e)&&d.test(e)}(e),"Value must be a hexadecimal string.")}const y=u(function(e){o(g(e),"Invalid hex address.");const t=function(e){if(e.startsWith("0x")||e.startsWith("0X"))return e.substring(2);return e}(e).toLowerCase(),n=(0,c.lY)(t),{length:r}=t,i=new Array(r);for(let o=0;o<r;o++){const e=1&o,r=n[o>>1],s=0===e?r>>4:15&r;i[o]=s>=8?t[o].toUpperCase():t[o]}return"0x".concat(i.join(""))});const v=u(function(e){return!!g(e)&&y(e)===e});u(function(e){return m(t=e)&&f.test(t)||v(e);var t});const w=e=>{return o("number"===typeof e,"Value must be a number."),o(e>=0,"Value must be a non-negative number."),o(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(t=e.toString(16)).startsWith("0x")?t:t.startsWith("0X")?"0x".concat(t.substring(2)):"0x".concat(t);var t},_=e=>{b(e);const t=parseInt(e,16);return o(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t}},509:(e,t,n)=>{"use strict";var r=n(2176),i=n(1693);var o="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},s=i.useSyncExternalStore,a=r.useRef,c=r.useEffect,l=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=a(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=l(function(){function e(e){if(!c){if(c=!0,s=e,e=r(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return a=t}return a=e}if(t=a,o(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(s=e,t):(s=e,a=n)}var s,a,c=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,n,r,i]);var f=s(e,d[0],d[1]);return c(function(){h.hasValue=!0,h.value=f},[f]),u(f),f}},620:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Connect=t.StandardConnect=void 0,t.StandardConnect="standard:connect",t.Connect=t.StandardConnect},621:(e,t,n)=>{"use strict";n.d(t,{T1:()=>s,YP:()=>a});var r=n(9740),i=n(3054),o=n(1099);function s(e,t){return a(e,"pattern",n=>t.test(n)||"Expected a ".concat(e.type," matching `/").concat(t.source,'/` but received "').concat(n,'"'))}function a(e,t,n){return new i._k((0,r.A)((0,r.A)({},e),{},{*refiner(i,s){yield*e.refiner(i,s);const a=n(i,s),c=(0,o.RF)(a,s,e,i);for(const e of c)yield(0,r.A)((0,r.A)({},e),{},{refinement:t})}}))}},625:(e,t,n)=>{"use strict";function r(e){return"string"===typeof e?{address:e,type:"json-rpc"}:e}n.d(t,{J:()=>r})},808:(e,t,n)=>{"use strict";n.d(t,{bk:()=>ci,Uv:()=>si,Yg:()=>qi,h:()=>li,CI:()=>Oa,Nw:()=>ui,pm:()=>Wi,TN:()=>mo,m9:()=>ho});var r=n(5806),i=n(4853),o=n(9804),s=n.n(o),a=n(7663);function c(e){let t=e.length;for(;--t>=0;)e[t]=0}const l=256,u=286,d=30,h=15,f=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),p=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),m=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),g=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),b=new Array(576);c(b);const y=new Array(60);c(y);const v=new Array(512);c(v);const w=new Array(256);c(w);const _=new Array(29);c(_);const k=new Array(d);function x(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let S,E,A;function P(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}c(k);const C=e=>e<256?v[e]:v[256+(e>>>7)],I=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},M=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,I(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},T=(e,t,n)=>{M(e,n[2*t],n[2*t+1])},O=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},N=(e,t,n)=>{const r=new Array(16);let i,o,s=0;for(i=1;i<=h;i++)s=s+n[i-1]<<1,r[i]=s;for(o=0;o<=t;o++){let t=e[2*o+1];0!==t&&(e[2*o]=O(r[t]++,t))}},B=e=>{let t;for(t=0;t<u;t++)e.dyn_ltree[2*t]=0;for(t=0;t<d;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},R=e=>{e.bi_valid>8?I(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},j=(e,t,n,r)=>{const i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},L=(e,t,n)=>{const r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&j(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!j(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},F=(e,t,n)=>{let r,i,o,s,a=0;if(0!==e.sym_next)do{r=255&e.pending_buf[e.sym_buf+a++],r+=(255&e.pending_buf[e.sym_buf+a++])<<8,i=e.pending_buf[e.sym_buf+a++],0===r?T(e,i,t):(o=w[i],T(e,o+l+1,t),s=f[o],0!==s&&(i-=_[o],M(e,i,s)),r--,o=C(r),T(e,o,n),s=p[o],0!==s&&(r-=k[o],M(e,r,s)))}while(a<e.sym_next);T(e,256,t)},z=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems;let s,a,c,l=-1;for(e.heap_len=0,e.heap_max=573,s=0;s<o;s++)0!==n[2*s]?(e.heap[++e.heap_len]=l=s,e.depth[s]=0):n[2*s+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=l<2?++l:0,n[2*c]=1,e.depth[c]=0,e.opt_len--,i&&(e.static_len-=r[2*c+1]);for(t.max_code=l,s=e.heap_len>>1;s>=1;s--)L(e,n,s);c=o;do{s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],L(e,n,1),a=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=a,n[2*c]=n[2*s]+n[2*a],e.depth[c]=(e.depth[s]>=e.depth[a]?e.depth[s]:e.depth[a])+1,n[2*s+1]=n[2*a+1]=c,e.heap[1]=c++,L(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,u,d,f,p,m,g=0;for(f=0;f<=h;f++)e.bl_count[f]=0;for(n[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)u=e.heap[l],f=n[2*n[2*u+1]+1]+1,f>c&&(f=c,g++),n[2*u+1]=f,u>r||(e.bl_count[f]++,p=0,u>=a&&(p=s[u-a]),m=n[2*u],e.opt_len+=m*(f+p),o&&(e.static_len+=m*(i[2*u+1]+p)));if(0!==g){do{for(f=c-1;0===e.bl_count[f];)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,g-=2}while(g>0);for(f=c;0!==f;f--)for(u=e.bl_count[f];0!==u;)d=e.heap[--l],d>r||(n[2*d+1]!==f&&(e.opt_len+=(f-n[2*d+1])*n[2*d],n[2*d+1]=f),u--)}})(e,t),N(n,l,e.bl_count)},D=(e,t,n)=>{let r,i,o=-1,s=t[1],a=0,c=7,l=4;for(0===s&&(c=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=s,s=t[2*(r+1)+1],++a<c&&i===s||(a<l?e.bl_tree[2*i]+=a:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,o=i,0===s?(c=138,l=3):i===s?(c=6,l=3):(c=7,l=4))},U=(e,t,n)=>{let r,i,o=-1,s=t[1],a=0,c=7,l=4;for(0===s&&(c=138,l=3),r=0;r<=n;r++)if(i=s,s=t[2*(r+1)+1],!(++a<c&&i===s)){if(a<l)do{T(e,i,e.bl_tree)}while(0!==--a);else 0!==i?(i!==o&&(T(e,i,e.bl_tree),a--),T(e,16,e.bl_tree),M(e,a-3,2)):a<=10?(T(e,17,e.bl_tree),M(e,a-3,3)):(T(e,18,e.bl_tree),M(e,a-11,7));a=0,o=i,0===s?(c=138,l=3):i===s?(c=6,l=3):(c=7,l=4)}};let W=!1;const q=(e,t,n,r)=>{M(e,0+(r?1:0),3),R(e),I(e,n),I(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n};var H=e=>{W||((()=>{let e,t,n,r,i;const o=new Array(16);for(n=0,r=0;r<28;r++)for(_[r]=n,e=0;e<1<<f[r];e++)w[n++]=r;for(w[n-1]=r,i=0,r=0;r<16;r++)for(k[r]=i,e=0;e<1<<p[r];e++)v[i++]=r;for(i>>=7;r<d;r++)for(k[r]=i<<7,e=0;e<1<<p[r]-7;e++)v[256+i++]=r;for(t=0;t<=h;t++)o[t]=0;for(e=0;e<=143;)b[2*e+1]=8,e++,o[8]++;for(;e<=255;)b[2*e+1]=9,e++,o[9]++;for(;e<=279;)b[2*e+1]=7,e++,o[7]++;for(;e<=287;)b[2*e+1]=8,e++,o[8]++;for(N(b,287,o),e=0;e<d;e++)y[2*e+1]=5,y[2*e]=O(e,5);S=new x(b,f,257,u,h),E=new x(y,p,0,d,h),A=new x(new Array(0),m,0,19,7)})(),W=!0),e.l_desc=new P(e.dyn_ltree,S),e.d_desc=new P(e.dyn_dtree,E),e.bl_desc=new P(e.bl_tree,A),e.bi_buf=0,e.bi_valid=0,B(e)},K=(e,t,n,r)=>{let i,o,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<l;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),z(e,e.l_desc),z(e,e.d_desc),s=(e=>{let t;for(D(e,e.dyn_ltree,e.l_desc.max_code),D(e,e.dyn_dtree,e.d_desc.max_code),z(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*g[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?q(e,t,n,r):4===e.strategy||o===i?(M(e,2+(r?1:0),3),F(e,b,y)):(M(e,4+(r?1:0),3),((e,t,n,r)=>{let i;for(M(e,t-257,5),M(e,n-1,5),M(e,r-4,4),i=0;i<r;i++)M(e,e.bl_tree[2*g[i]+1],3);U(e,e.dyn_ltree,t-1),U(e,e.dyn_dtree,n-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),F(e,e.dyn_ltree,e.dyn_dtree)),B(e),r&&R(e)},V=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(w[n]+l+1)]++,e.dyn_dtree[2*C(t)]++),e.sym_next===e.sym_end),$={_tr_init:H,_tr_stored_block:q,_tr_flush_block:K,_tr_tally:V,_tr_align:e=>{M(e,2,3),T(e,256,b),(e=>{16===e.bi_valid?(I(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}};var G=(e,t,n,r)=>{let i=65535&e,o=e>>>16&65535,s=0;for(;0!==n;){s=n>2e3?2e3:n,n-=s;do{i=i+t[r++]|0,o=o+i|0}while(--s);i%=65521,o%=65521}return i|o<<16};const Z=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var J=(e,t,n,r)=>{const i=Z,o=r+n;e^=-1;for(let s=r;s<o;s++)e=e>>>8^i[255&(e^t[s])];return-1^e},Y={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Q={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:X,_tr_stored_block:ee,_tr_flush_block:te,_tr_tally:ne,_tr_align:re}=$,{Z_NO_FLUSH:ie,Z_PARTIAL_FLUSH:oe,Z_FULL_FLUSH:se,Z_FINISH:ae,Z_BLOCK:ce,Z_OK:le,Z_STREAM_END:ue,Z_STREAM_ERROR:de,Z_DATA_ERROR:he,Z_BUF_ERROR:fe,Z_DEFAULT_COMPRESSION:pe,Z_FILTERED:me,Z_HUFFMAN_ONLY:ge,Z_RLE:be,Z_FIXED:ye,Z_DEFAULT_STRATEGY:ve,Z_UNKNOWN:we,Z_DEFLATED:_e}=Q,ke=258,xe=262,Se=42,Ee=113,Ae=666,Pe=(e,t)=>(e.msg=Y[t],t),Ce=e=>2*e-(e>4?9:0),Ie=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Me=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do{n=e.head[--r],e.head[r]=n>=i?n-i:0}while(--t);t=i,r=t;do{n=e.prev[--r],e.prev[r]=n>=i?n-i:0}while(--t)};let Te=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const Oe=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},Ne=(e,t)=>{te(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Oe(e.strm)},Be=(e,t)=>{e.pending_buf[e.pending++]=t},Re=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},je=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),0===i?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=G(e.adler,t,i,n):2===e.state.wrap&&(e.adler=J(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Le=(e,t)=>{let n,r,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match;const c=e.strstart>e.w_size-xe?e.strstart-(e.w_size-xe):0,l=e.window,u=e.w_mask,d=e.prev,h=e.strstart+ke;let f=l[o+s-1],p=l[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(n=t,l[n+s]===p&&l[n+s-1]===f&&l[n]===l[o]&&l[++n]===l[o+1]){o+=2,n++;do{}while(l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&o<h);if(r=ke-(h-o),o=h-ke,r>s){if(e.match_start=t,s=r,r>=a)break;f=l[o+s-1],p=l[o+s]}}}while((t=d[t&u])>c&&0!==--i);return s<=e.lookahead?s:e.lookahead},Fe=e=>{const t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-xe)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Me(e),r+=t),0===e.strm.avail_in)break;if(n=je(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=3)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Te(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Te(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<xe&&0!==e.strm.avail_in)},ze=(e,t)=>{let n,r,i,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,s=0,a=e.strm.avail_in;do{if(n=65535,i=e.bi_valid+42>>3,e.strm.avail_out<i)break;if(i=e.strm.avail_out-i,r=e.strstart-e.block_start,n>r+e.strm.avail_in&&(n=r+e.strm.avail_in),n>i&&(n=i),n<o&&(0===n&&t!==ae||t===ie||n!==r+e.strm.avail_in))break;s=t===ae&&n===r+e.strm.avail_in?1:0,ee(e,0,0,s),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,Oe(e.strm),r&&(r>n&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(je(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(0===s);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),s?4:t!==ie&&t!==ae&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(i=e.window_size-e.strstart,e.strm.avail_in>i&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),i>e.strm.avail_in&&(i=e.strm.avail_in),i&&(je(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=i>e.w_size-e.insert?e.w_size-e.insert:i),e.high_water<e.strstart&&(e.high_water=e.strstart),i=e.bi_valid+42>>3,i=e.pending_buf_size-i>65535?65535:e.pending_buf_size-i,o=i>e.w_size?e.w_size:i,r=e.strstart-e.block_start,(r>=o||(r||t===ae)&&t!==ie&&0===e.strm.avail_in&&r<=i)&&(n=r>i?i:r,s=t===ae&&0===e.strm.avail_in&&n===r?1:0,ee(e,e.block_start,n,s),e.block_start+=n,Oe(e.strm)),s?3:1)},De=(e,t)=>{let n,r;for(;;){if(e.lookahead<xe){if(Fe(e),e.lookahead<xe&&t===ie)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=Te(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-xe&&(e.match_length=Le(e,n)),e.match_length>=3)if(r=ne(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=Te(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Te(e,e.ins_h,e.window[e.strstart+1]);else r=ne(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Ne(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===ae?(Ne(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ne(e,!1),0===e.strm.avail_out)?1:2},Ue=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<xe){if(Fe(e),e.lookahead<xe&&t===ie)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=Te(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-xe&&(e.match_length=Le(e,n),e.match_length<=5&&(e.strategy===me||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,r=ne(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=Te(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(Ne(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=ne(e,0,e.window[e.strstart-1]),r&&Ne(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=ne(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===ae?(Ne(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ne(e,!1),0===e.strm.avail_out)?1:2};function We(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const qe=[new We(0,0,0,0,ze),new We(4,4,8,4,De),new We(4,5,16,8,De),new We(4,6,32,32,De),new We(4,4,16,16,Ue),new We(8,16,32,32,Ue),new We(8,16,128,128,Ue),new We(8,32,128,256,Ue),new We(32,128,258,1024,Ue),new We(32,258,258,4096,Ue)];function He(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=_e,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Ie(this.dyn_ltree),Ie(this.dyn_dtree),Ie(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Ie(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Ie(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ke=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Se&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Ee&&t.status!==Ae?1:0},Ve=e=>{if(Ke(e))return Pe(e,de);e.total_in=e.total_out=0,e.data_type=we;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?Se:Ee,e.adler=2===t.wrap?0:1,t.last_flush=-2,X(t),le},$e=e=>{const t=Ve(e);var n;return t===le&&((n=e.state).window_size=2*n.w_size,Ie(n.head),n.max_lazy_match=qe[n.level].max_lazy,n.good_match=qe[n.level].good_length,n.nice_match=qe[n.level].nice_length,n.max_chain_length=qe[n.level].max_chain,n.strstart=0,n.block_start=0,n.lookahead=0,n.insert=0,n.match_length=n.prev_length=2,n.match_available=0,n.ins_h=0),t},Ge=(e,t,n,r,i,o)=>{if(!e)return de;let s=1;if(t===pe&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>9||n!==_e||r<8||r>15||t<0||t>9||o<0||o>ye||8===r&&1!==s)return Pe(e,de);8===r&&(r=9);const a=new He;return e.state=a,a.strm=e,a.status=Se,a.wrap=s,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=t,a.strategy=o,a.method=n,$e(e)};var Ze={deflateInit:(e,t)=>Ge(e,t,_e,15,8,ve),deflateInit2:Ge,deflateReset:$e,deflateResetKeep:Ve,deflateSetHeader:(e,t)=>Ke(e)||2!==e.state.wrap?de:(e.state.gzhead=t,le),deflate:(e,t)=>{if(Ke(e)||t>ce||t<0)return e?Pe(e,de):de;const n=e.state;if(!e.output||0!==e.avail_in&&!e.input||n.status===Ae&&t!==ae)return Pe(e,0===e.avail_out?fe:de);const r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(Oe(e),0===e.avail_out)return n.last_flush=-1,le}else if(0===e.avail_in&&Ce(t)<=Ce(r)&&t!==ae)return Pe(e,fe);if(n.status===Ae&&0!==e.avail_in)return Pe(e,fe);if(n.status===Se&&0===n.wrap&&(n.status=Ee),n.status===Se){let t=_e+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=ge||n.level<2?0:n.level<6?1:6===n.level?2:3,t|=r<<6,0!==n.strstart&&(t|=32),t+=31-t%31,Re(n,t),0!==n.strstart&&(Re(n,e.adler>>>16),Re(n,65535&e.adler)),e.adler=1,n.status=Ee,Oe(e),0!==n.pending)return n.last_flush=-1,le}if(57===n.status)if(e.adler=0,Be(n,31),Be(n,139),Be(n,8),n.gzhead)Be(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Be(n,255&n.gzhead.time),Be(n,n.gzhead.time>>8&255),Be(n,n.gzhead.time>>16&255),Be(n,n.gzhead.time>>24&255),Be(n,9===n.level?2:n.strategy>=ge||n.level<2?4:0),Be(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(Be(n,255&n.gzhead.extra.length),Be(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=J(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(Be(n,0),Be(n,0),Be(n,0),Be(n,0),Be(n,0),Be(n,9===n.level?2:n.strategy>=ge||n.level<2?4:0),Be(n,3),n.status=Ee,Oe(e),0!==n.pending)return n.last_flush=-1,le;if(69===n.status){if(n.gzhead.extra){let t=n.pending,r=(65535&n.gzhead.extra.length)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=J(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,Oe(e),0!==n.pending)return n.last_flush=-1,le;t=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=J(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){let t,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(e.adler=J(e.adler,n.pending_buf,n.pending-r,r)),Oe(e),0!==n.pending)return n.last_flush=-1,le;r=0}t=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,Be(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>r&&(e.adler=J(e.adler,n.pending_buf,n.pending-r,r)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){let t,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(e.adler=J(e.adler,n.pending_buf,n.pending-r,r)),Oe(e),0!==n.pending)return n.last_flush=-1,le;r=0}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,Be(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>r&&(e.adler=J(e.adler,n.pending_buf,n.pending-r,r))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Oe(e),0!==n.pending))return n.last_flush=-1,le;Be(n,255&e.adler),Be(n,e.adler>>8&255),e.adler=0}if(n.status=Ee,Oe(e),0!==n.pending)return n.last_flush=-1,le}if(0!==e.avail_in||0!==n.lookahead||t!==ie&&n.status!==Ae){let r=0===n.level?ze(n,t):n.strategy===ge?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(Fe(e),0===e.lookahead)){if(t===ie)return 1;break}if(e.match_length=0,n=ne(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Ne(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===ae?(Ne(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ne(e,!1),0===e.strm.avail_out)?1:2})(n,t):n.strategy===be?((e,t)=>{let n,r,i,o;const s=e.window;for(;;){if(e.lookahead<=ke){if(Fe(e),e.lookahead<=ke&&t===ie)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=e.strstart-1,r=s[i],r===s[++i]&&r===s[++i]&&r===s[++i])){o=e.strstart+ke;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o);e.match_length=ke-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=ne(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=ne(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Ne(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===ae?(Ne(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Ne(e,!1),0===e.strm.avail_out)?1:2})(n,t):qe[n.level].func(n,t);if(3!==r&&4!==r||(n.status=Ae),1===r||3===r)return 0===e.avail_out&&(n.last_flush=-1),le;if(2===r&&(t===oe?re(n):t!==ce&&(ee(n,0,0,!1),t===se&&(Ie(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Oe(e),0===e.avail_out))return n.last_flush=-1,le}return t!==ae?le:n.wrap<=0?ue:(2===n.wrap?(Be(n,255&e.adler),Be(n,e.adler>>8&255),Be(n,e.adler>>16&255),Be(n,e.adler>>24&255),Be(n,255&e.total_in),Be(n,e.total_in>>8&255),Be(n,e.total_in>>16&255),Be(n,e.total_in>>24&255)):(Re(n,e.adler>>>16),Re(n,65535&e.adler)),Oe(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?le:ue)},deflateEnd:e=>{if(Ke(e))return de;const t=e.state.status;return e.state=null,t===Ee?Pe(e,he):le},deflateSetDictionary:(e,t)=>{let n=t.length;if(Ke(e))return de;const r=e.state,i=r.wrap;if(2===i||1===i&&r.status!==Se||r.lookahead)return de;if(1===i&&(e.adler=G(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===i&&(Ie(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const o=e.avail_in,s=e.next_in,a=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Fe(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=Te(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,Fe(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=s,e.input=a,e.avail_in=o,r.wrap=i,le},deflateInfo:"pako deflate (from Nodeca project)"};const Je=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Ye=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!==typeof n)throw new TypeError(n+"must be non-object");for(const t in n)Je(n,t)&&(e[t]=n[t])}}return e},Qe=e=>{let t=0;for(let r=0,i=e.length;r<i;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,i=0,o=e.length;r<o;r++){let t=e[r];n.set(t,i),i+=t.length}return n};let Xe=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(Na){Xe=!1}const et=new Uint8Array(256);for(let Ba=0;Ba<256;Ba++)et[Ba]=Ba>=252?6:Ba>=248?5:Ba>=240?4:Ba>=224?3:Ba>=192?2:1;et[254]=et[254]=1;var tt=e=>{if("function"===typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,n,r,i,o,s=e.length,a=0;for(i=0;i<s;i++)n=e.charCodeAt(i),55296===(64512&n)&&i+1<s&&(r=e.charCodeAt(i+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(a),o=0,i=0;o<a;i++)n=e.charCodeAt(i),55296===(64512&n)&&i+1<s&&(r=e.charCodeAt(i+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[o++]=n:n<2048?(t[o++]=192|n>>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},nt=(e,t)=>{const n=t||e.length;if("function"===typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let r,i;const o=new Array(2*n);for(i=0,r=0;r<n;){let t=e[r++];if(t<128){o[i++]=t;continue}let s=et[t];if(s>4)o[i++]=65533,r+=s-1;else{for(t&=2===s?31:3===s?15:7;s>1&&r<n;)t=t<<6|63&e[r++],s--;s>1?o[i++]=65533:t<65536?o[i++]=t:(t-=65536,o[i++]=55296|t>>10&1023,o[i++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Xe)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n})(o,i)},rt=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128===(192&e[n]);)n--;return n<0||0===n?t:n+et[e[n]]>t?n:t};var it=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const ot=Object.prototype.toString,{Z_NO_FLUSH:st,Z_SYNC_FLUSH:at,Z_FULL_FLUSH:ct,Z_FINISH:lt,Z_OK:ut,Z_STREAM_END:dt,Z_DEFAULT_COMPRESSION:ht,Z_DEFAULT_STRATEGY:ft,Z_DEFLATED:pt}=Q;function mt(e){this.options=Ye({level:ht,method:pt,chunkSize:16384,windowBits:15,memLevel:8,strategy:ft},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new it,this.strm.avail_out=0;let n=Ze.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==ut)throw new Error(Y[n]);if(t.header&&Ze.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"===typeof t.dictionary?tt(t.dictionary):"[object ArrayBuffer]"===ot.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=Ze.deflateSetDictionary(this.strm,e),n!==ut)throw new Error(Y[n]);this._dict_set=!0}}function gt(e,t){const n=new mt(t);if(n.push(e,!0),n.err)throw n.msg||Y[n.err];return n.result}mt.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=t===~~t?t:!0===t?lt:st,"string"===typeof e?n.input=tt(e):"[object ArrayBuffer]"===ot.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===at||o===ct)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(i=Ze.deflate(n,o),i===dt)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Ze.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ut;if(0!==n.avail_out){if(o>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},mt.prototype.onData=function(e){this.chunks.push(e)},mt.prototype.onEnd=function(e){e===ut&&(this.result=Qe(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var bt={Deflate:mt,deflate:gt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,gt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,gt(e,t)},constants:Q};const yt=16209;var vt=function(e,t){let n,r,i,o,s,a,c,l,u,d,h,f,p,m,g,b,y,v,w,_,k,x,S,E;const A=e.state;n=e.next_in,S=e.input,r=n+(e.avail_in-5),i=e.next_out,E=e.output,o=i-(t-e.avail_out),s=i+(e.avail_out-257),a=A.dmax,c=A.wsize,l=A.whave,u=A.wnext,d=A.window,h=A.hold,f=A.bits,p=A.lencode,m=A.distcode,g=(1<<A.lenbits)-1,b=(1<<A.distbits)-1;e:do{f<15&&(h+=S[n++]<<f,f+=8,h+=S[n++]<<f,f+=8),y=p[h&g];t:for(;;){if(v=y>>>24,h>>>=v,f-=v,v=y>>>16&255,0===v)E[i++]=65535&y;else{if(!(16&v)){if(0===(64&v)){y=p[(65535&y)+(h&(1<<v)-1)];continue t}if(32&v){A.mode=16191;break e}e.msg="invalid literal/length code",A.mode=yt;break e}w=65535&y,v&=15,v&&(f<v&&(h+=S[n++]<<f,f+=8),w+=h&(1<<v)-1,h>>>=v,f-=v),f<15&&(h+=S[n++]<<f,f+=8,h+=S[n++]<<f,f+=8),y=m[h&b];n:for(;;){if(v=y>>>24,h>>>=v,f-=v,v=y>>>16&255,!(16&v)){if(0===(64&v)){y=m[(65535&y)+(h&(1<<v)-1)];continue n}e.msg="invalid distance code",A.mode=yt;break e}if(_=65535&y,v&=15,f<v&&(h+=S[n++]<<f,f+=8,f<v&&(h+=S[n++]<<f,f+=8)),_+=h&(1<<v)-1,_>a){e.msg="invalid distance too far back",A.mode=yt;break e}if(h>>>=v,f-=v,v=i-o,_>v){if(v=_-v,v>l&&A.sane){e.msg="invalid distance too far back",A.mode=yt;break e}if(k=0,x=d,0===u){if(k+=c-v,v<w){w-=v;do{E[i++]=d[k++]}while(--v);k=i-_,x=E}}else if(u<v){if(k+=c+u-v,v-=u,v<w){w-=v;do{E[i++]=d[k++]}while(--v);if(k=0,u<w){v=u,w-=v;do{E[i++]=d[k++]}while(--v);k=i-_,x=E}}}else if(k+=u-v,v<w){w-=v;do{E[i++]=d[k++]}while(--v);k=i-_,x=E}for(;w>2;)E[i++]=x[k++],E[i++]=x[k++],E[i++]=x[k++],w-=3;w&&(E[i++]=x[k++],w>1&&(E[i++]=x[k++]))}else{k=i-_;do{E[i++]=E[k++],E[i++]=E[k++],E[i++]=E[k++],w-=3}while(w>2);w&&(E[i++]=E[k++],w>1&&(E[i++]=E[k++]))}break}}break}}while(n<r&&i<s);w=f>>3,n-=w,f-=w<<3,h&=(1<<f)-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?r-n+5:5-(n-r),e.avail_out=i<s?s-i+257:257-(i-s),A.hold=h,A.bits=f};const wt=15,_t=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),kt=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),xt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),St=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var Et=(e,t,n,r,i,o,s,a)=>{const c=a.bits;let l,u,d,h,f,p,m=0,g=0,b=0,y=0,v=0,w=0,_=0,k=0,x=0,S=0,E=null;const A=new Uint16Array(16),P=new Uint16Array(16);let C,I,M,T=null;for(m=0;m<=wt;m++)A[m]=0;for(g=0;g<r;g++)A[t[n+g]]++;for(v=c,y=wt;y>=1&&0===A[y];y--);if(v>y&&(v=y),0===y)return i[o++]=20971520,i[o++]=20971520,a.bits=1,0;for(b=1;b<y&&0===A[b];b++);for(v<b&&(v=b),k=1,m=1;m<=wt;m++)if(k<<=1,k-=A[m],k<0)return-1;if(k>0&&(0===e||1!==y))return-1;for(P[1]=0,m=1;m<wt;m++)P[m+1]=P[m]+A[m];for(g=0;g<r;g++)0!==t[n+g]&&(s[P[t[n+g]]++]=g);if(0===e?(E=T=s,p=20):1===e?(E=_t,T=kt,p=257):(E=xt,T=St,p=0),S=0,g=0,m=b,f=o,w=v,_=0,d=-1,x=1<<v,h=x-1,1===e&&x>852||2===e&&x>592)return 1;for(;;){C=m-_,s[g]+1<p?(I=0,M=s[g]):s[g]>=p?(I=T[s[g]-p],M=E[s[g]-p]):(I=96,M=0),l=1<<m-_,u=1<<w,b=u;do{u-=l,i[f+(S>>_)+u]=C<<24|I<<16|M}while(0!==u);for(l=1<<m-1;S&l;)l>>=1;if(0!==l?(S&=l-1,S+=l):S=0,g++,0===--A[m]){if(m===y)break;m=t[n+s[g]]}if(m>v&&(S&h)!==d){for(0===_&&(_=v),f+=b,w=m-_,k=1<<w;w+_<y&&(k-=A[w+_],!(k<=0));)w++,k<<=1;if(x+=1<<w,1===e&&x>852||2===e&&x>592)return 1;d=S&h,i[d]=v<<24|w<<16|f-o}}return 0!==S&&(i[f+S]=m-_<<24|64<<16),a.bits=v,0};const{Z_FINISH:At,Z_BLOCK:Pt,Z_TREES:Ct,Z_OK:It,Z_STREAM_END:Mt,Z_NEED_DICT:Tt,Z_STREAM_ERROR:Ot,Z_DATA_ERROR:Nt,Z_MEM_ERROR:Bt,Z_BUF_ERROR:Rt,Z_DEFLATED:jt}=Q,Lt=16180,Ft=16190,zt=16191,Dt=16192,Ut=16194,Wt=16199,qt=16200,Ht=16206,Kt=16209,Vt=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function $t(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Gt=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<Lt||t.mode>16211?1:0},Zt=e=>{if(Gt(e))return Ot;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Lt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,It},Jt=e=>{if(Gt(e))return Ot;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Zt(e)},Yt=(e,t)=>{let n;if(Gt(e))return Ot;const r=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Ot:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Jt(e))},Qt=(e,t)=>{if(!e)return Ot;const n=new $t;e.state=n,n.strm=e,n.window=null,n.mode=Lt;const r=Yt(e,t);return r!==It&&(e.state=null),r};let Xt,en,tn=!0;const nn=e=>{if(tn){Xt=new Int32Array(512),en=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Et(1,e.lens,0,288,Xt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Et(2,e.lens,0,32,en,0,e.work,{bits:5}),tn=!1}e.lencode=Xt,e.lenbits=9,e.distcode=en,e.distbits=5},rn=(e,t,n,r)=>{let i;const o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),r>=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),(r-=i)?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0};var on={inflateReset:Jt,inflateReset2:Yt,inflateResetKeep:Zt,inflateInit:e=>Qt(e,15),inflateInit2:Qt,inflate:(e,t)=>{let n,r,i,o,s,a,c,l,u,d,h,f,p,m,g,b,y,v,w,_,k,x,S=0;const E=new Uint8Array(4);let A,P;const C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Gt(e)||!e.output||!e.input&&0!==e.avail_in)return Ot;n=e.state,n.mode===zt&&(n.mode=Dt),s=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,l=n.hold,u=n.bits,d=a,h=c,x=It;e:for(;;)switch(n.mode){case Lt:if(0===n.wrap){n.mode=Dt;break}for(;u<16;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}if(2&n.wrap&&35615===l){0===n.wbits&&(n.wbits=15),n.check=0,E[0]=255&l,E[1]=l>>>8&255,n.check=J(n.check,E,2,0),l=0,u=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=Kt;break}if((15&l)!==jt){e.msg="unknown compression method",n.mode=Kt;break}if(l>>>=4,u-=4,k=8+(15&l),0===n.wbits&&(n.wbits=k),k>15||k>n.wbits){e.msg="invalid window size",n.mode=Kt;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&l?16189:zt,l=0,u=0;break;case 16181:for(;u<16;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}if(n.flags=l,(255&n.flags)!==jt){e.msg="unknown compression method",n.mode=Kt;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=Kt;break}n.head&&(n.head.text=l>>8&1),512&n.flags&&4&n.wrap&&(E[0]=255&l,E[1]=l>>>8&255,n.check=J(n.check,E,2,0)),l=0,u=0,n.mode=16182;case 16182:for(;u<32;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}n.head&&(n.head.time=l),512&n.flags&&4&n.wrap&&(E[0]=255&l,E[1]=l>>>8&255,E[2]=l>>>16&255,E[3]=l>>>24&255,n.check=J(n.check,E,4,0)),l=0,u=0,n.mode=16183;case 16183:for(;u<16;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&n.flags&&4&n.wrap&&(E[0]=255&l,E[1]=l>>>8&255,n.check=J(n.check,E,2,0)),l=0,u=0,n.mode=16184;case 16184:if(1024&n.flags){for(;u<16;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),512&n.flags&&4&n.wrap&&(E[0]=255&l,E[1]=l>>>8&255,n.check=J(n.check,E,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&(f=n.length,f>a&&(f=a),f&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+f),k)),512&n.flags&&4&n.wrap&&(n.check=J(n.check,r,f,o)),a-=f,o+=f,n.length-=f),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===a)break e;f=0;do{k=r[o+f++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k))}while(k&&f<a);if(512&n.flags&&4&n.wrap&&(n.check=J(n.check,r,f,o)),a-=f,o+=f,k)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===a)break e;f=0;do{k=r[o+f++],n.head&&k&&n.length<65536&&(n.head.comment+=String.fromCharCode(k))}while(k&&f<a);if(512&n.flags&&4&n.wrap&&(n.check=J(n.check,r,f,o)),a-=f,o+=f,k)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;u<16;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}if(4&n.wrap&&l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=Kt;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=zt;break;case 16189:for(;u<32;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}e.adler=n.check=Vt(l),l=0,u=0,n.mode=Ft;case Ft:if(0===n.havedict)return e.next_out=s,e.avail_out=c,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=u,Tt;e.adler=n.check=1,n.mode=zt;case zt:if(t===Pt||t===Ct)break e;case Dt:if(n.last){l>>>=7&u,u-=7&u,n.mode=Ht;break}for(;u<3;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}switch(n.last=1&l,l>>>=1,u-=1,3&l){case 0:n.mode=16193;break;case 1:if(nn(n),n.mode=Wt,t===Ct){l>>>=2,u-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=Kt}l>>>=2,u-=2;break;case 16193:for(l>>>=7&u,u-=7&u;u<32;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}if((65535&l)!==(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Kt;break}if(n.length=65535&l,l=0,u=0,n.mode=Ut,t===Ct)break e;case Ut:n.mode=16195;case 16195:if(f=n.length,f){if(f>a&&(f=a),f>c&&(f=c),0===f)break e;i.set(r.subarray(o,o+f),s),a-=f,o+=f,c-=f,s+=f,n.length-=f;break}n.mode=zt;break;case 16196:for(;u<14;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}if(n.nlen=257+(31&l),l>>>=5,u-=5,n.ndist=1+(31&l),l>>>=5,u-=5,n.ncode=4+(15&l),l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Kt;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;u<3;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}n.lens[C[n.have++]]=7&l,l>>>=3,u-=3}for(;n.have<19;)n.lens[C[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,A={bits:n.lenbits},x=Et(0,n.lens,0,19,n.lencode,0,n.work,A),n.lenbits=A.bits,x){e.msg="invalid code lengths set",n.mode=Kt;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;S=n.lencode[l&(1<<n.lenbits)-1],g=S>>>24,b=S>>>16&255,y=65535&S,!(g<=u);){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}if(y<16)l>>>=g,u-=g,n.lens[n.have++]=y;else{if(16===y){for(P=g+2;u<P;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}if(l>>>=g,u-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=Kt;break}k=n.lens[n.have-1],f=3+(3&l),l>>>=2,u-=2}else if(17===y){for(P=g+3;u<P;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}l>>>=g,u-=g,k=0,f=3+(7&l),l>>>=3,u-=3}else{for(P=g+7;u<P;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}l>>>=g,u-=g,k=0,f=11+(127&l),l>>>=7,u-=7}if(n.have+f>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Kt;break}for(;f--;)n.lens[n.have++]=k}}if(n.mode===Kt)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=Kt;break}if(n.lenbits=9,A={bits:n.lenbits},x=Et(1,n.lens,0,n.nlen,n.lencode,0,n.work,A),n.lenbits=A.bits,x){e.msg="invalid literal/lengths set",n.mode=Kt;break}if(n.distbits=6,n.distcode=n.distdyn,A={bits:n.distbits},x=Et(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,A),n.distbits=A.bits,x){e.msg="invalid distances set",n.mode=Kt;break}if(n.mode=Wt,t===Ct)break e;case Wt:n.mode=qt;case qt:if(a>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=u,vt(e,h),s=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,l=n.hold,u=n.bits,n.mode===zt&&(n.back=-1);break}for(n.back=0;S=n.lencode[l&(1<<n.lenbits)-1],g=S>>>24,b=S>>>16&255,y=65535&S,!(g<=u);){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}if(b&&0===(240&b)){for(v=g,w=b,_=y;S=n.lencode[_+((l&(1<<v+w)-1)>>v)],g=S>>>24,b=S>>>16&255,y=65535&S,!(v+g<=u);){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}l>>>=v,u-=v,n.back+=v}if(l>>>=g,u-=g,n.back+=g,n.length=y,0===b){n.mode=16205;break}if(32&b){n.back=-1,n.mode=zt;break}if(64&b){e.msg="invalid literal/length code",n.mode=Kt;break}n.extra=15&b,n.mode=16201;case 16201:if(n.extra){for(P=n.extra;u<P;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;S=n.distcode[l&(1<<n.distbits)-1],g=S>>>24,b=S>>>16&255,y=65535&S,!(g<=u);){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}if(0===(240&b)){for(v=g,w=b,_=y;S=n.distcode[_+((l&(1<<v+w)-1)>>v)],g=S>>>24,b=S>>>16&255,y=65535&S,!(v+g<=u);){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}l>>>=v,u-=v,n.back+=v}if(l>>>=g,u-=g,n.back+=g,64&b){e.msg="invalid distance code",n.mode=Kt;break}n.offset=y,n.extra=15&b,n.mode=16203;case 16203:if(n.extra){for(P=n.extra;u<P;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Kt;break}n.mode=16204;case 16204:if(0===c)break e;if(f=h-c,n.offset>f){if(f=n.offset-f,f>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Kt;break}f>n.wnext?(f-=n.wnext,p=n.wsize-f):p=n.wnext-f,f>n.length&&(f=n.length),m=n.window}else m=i,p=s-n.offset,f=n.length;f>c&&(f=c),c-=f,n.length-=f;do{i[s++]=m[p++]}while(--f);0===n.length&&(n.mode=qt);break;case 16205:if(0===c)break e;i[s++]=n.length,c--,n.mode=qt;break;case Ht:if(n.wrap){for(;u<32;){if(0===a)break e;a--,l|=r[o++]<<u,u+=8}if(h-=c,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?J(n.check,i,h,s-h):G(n.check,i,h,s-h)),h=c,4&n.wrap&&(n.flags?l:Vt(l))!==n.check){e.msg="incorrect data check",n.mode=Kt;break}l=0,u=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;u<32;){if(0===a)break e;a--,l+=r[o++]<<u,u+=8}if(4&n.wrap&&l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=Kt;break}l=0,u=0}n.mode=16208;case 16208:x=Mt;break e;case Kt:x=Nt;break e;case 16210:return Bt;default:return Ot}return e.next_out=s,e.avail_out=c,e.next_in=o,e.avail_in=a,n.hold=l,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<Kt&&(n.mode<Ht||t!==At))&&rn(e,e.output,e.next_out,h-e.avail_out),d-=e.avail_in,h-=e.avail_out,e.total_in+=d,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?J(n.check,i,h,e.next_out-h):G(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===zt?128:0)+(n.mode===Wt||n.mode===Ut?256:0),(0===d&&0===h||t===At)&&x===It&&(x=Rt),x},inflateEnd:e=>{if(Gt(e))return Ot;let t=e.state;return t.window&&(t.window=null),e.state=null,It},inflateGetHeader:(e,t)=>{if(Gt(e))return Ot;const n=e.state;return 0===(2&n.wrap)?Ot:(n.head=t,t.done=!1,It)},inflateSetDictionary:(e,t)=>{const n=t.length;let r,i,o;return Gt(e)?Ot:(r=e.state,0!==r.wrap&&r.mode!==Ft?Ot:r.mode===Ft&&(i=1,i=G(i,t,n,0),i!==r.check)?Nt:(o=rn(e,t,n,n),o?(r.mode=16210,Bt):(r.havedict=1,It)))},inflateInfo:"pako inflate (from Nodeca project)"};var sn=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const an=Object.prototype.toString,{Z_NO_FLUSH:cn,Z_FINISH:ln,Z_OK:un,Z_STREAM_END:dn,Z_NEED_DICT:hn,Z_STREAM_ERROR:fn,Z_DATA_ERROR:pn,Z_MEM_ERROR:mn}=Q;function gn(e){this.options=Ye({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new it,this.strm.avail_out=0;let n=on.inflateInit2(this.strm,t.windowBits);if(n!==un)throw new Error(Y[n]);if(this.header=new sn,on.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"===typeof t.dictionary?t.dictionary=tt(t.dictionary):"[object ArrayBuffer]"===an.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=on.inflateSetDictionary(this.strm,t.dictionary),n!==un)))throw new Error(Y[n])}function bn(e,t){const n=new gn(t);if(n.push(e),n.err)throw n.msg||Y[n.err];return n.result}gn.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let o,s,a;if(this.ended)return!1;for(s=t===~~t?t:!0===t?ln:cn,"[object ArrayBuffer]"===an.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=on.inflate(n,s),o===hn&&i&&(o=on.inflateSetDictionary(n,i),o===un?o=on.inflate(n,s):o===pn&&(o=hn));n.avail_in>0&&o===dn&&n.state.wrap>0&&0!==e[n.next_in];)on.inflateReset(n),o=on.inflate(n,s);switch(o){case fn:case pn:case hn:case mn:return this.onEnd(o),this.ended=!0,!1}if(a=n.avail_out,n.next_out&&(0===n.avail_out||o===dn))if("string"===this.options.to){let e=rt(n.output,n.next_out),t=n.next_out-e,i=nt(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(o!==un||0!==a){if(o===dn)return o=on.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},gn.prototype.onData=function(e){this.chunks.push(e)},gn.prototype.onEnd=function(e){e===un&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Qe(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var yn={Inflate:gn,inflate:bn,inflateRaw:function(e,t){return(t=t||{}).raw=!0,bn(e,t)},ungzip:bn,constants:Q};const{Deflate:vn,deflate:wn,deflateRaw:_n,gzip:kn}=bt,{Inflate:xn,inflate:Sn,inflateRaw:En,ungzip:An}=yn;var Pn=wn;class Cn extends Error{constructor(e){super(e.message),this.name=this.constructor.name,this.cause=e,Object.setPrototypeOf(this,this.constructor.prototype)}}class In extends Error{constructor(e,t){super(e),this.name=this.constructor.name,this.cause=t,Object.setPrototypeOf(this,this.constructor.prototype)}}class Mn extends In{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Transport request timed out",arguments.length>1?arguments[1]:void 0)}}function Tn(e){return Boolean(e)&&"object"===typeof e&&!Array.isArray(e)}const On=(e,t)=>Object.hasOwnProperty.call(e,t);var Nn;!function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(Nn=Nn||(Nn={}));var Bn=n(3235),Rn=n(9740),jn=n(6140),Ln=n(3054),Fn=n(4591);function zn(e,t,n){return new Ln._k((0,Rn.A)((0,Rn.A)({},e),{},{coercer:(r,i)=>(0,Ln.is)(r,t)?e.coercer(n(r,i),i):e.coercer(r,i)}))}var Dn=n(621);const Un=e=>(0,jn.Ik)(e);function Wn(e){let{path:t,branch:n}=e;const r=t[t.length-1];return On(n[n.length-2],r)}function qn(e){return new Ln._k((0,Rn.A)((0,Rn.A)({},e),{},{type:"optional ".concat(e.type),validator:(t,n)=>!Wn(n)||e.validator(t,n),refiner:(t,n)=>!Wn(n)||e.refiner(t,n)}))}function Hn(e){if(null===e||"boolean"===typeof e||"string"===typeof e)return!0;if("number"===typeof e&&Number.isFinite(e))return!0;if("object"===typeof e){let t=!0;if(Array.isArray(e)){for(let n=0;n<e.length;n++)if(!Hn(e[n])){t=!1;break}return t}const n=Object.entries(e);for(let e=0;e<n.length;e++)if("string"!==typeof n[e][0]||!Hn(n[e][1])){t=!1;break}return t}return!1}const Kn=(0,Fn.E8)("JSON",e=>Hn(e)),Vn=zn(Kn,(0,Dn.YP)((0,jn.bz)(),"JSON",e=>(0,Ln.is)(e,Kn)),e=>JSON.parse(JSON.stringify(e,(e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t})));function $n(e){try{return function(e){(0,Ln.vt)(e,Vn)}(e),!0}catch(t){return!1}}const Gn=(0,jn.eu)("2.0"),Zn=(0,jn.me)((0,jn.KC)([(0,jn.ai)(),(0,jn.Yj)()])),Jn=Un({code:(0,jn.nd)(),message:(0,jn.Yj)(),data:qn(Vn),stack:qn((0,jn.Yj)())}),Yn=(0,jn.KC)([(0,jn.g1)((0,jn.Yj)(),Vn),(0,jn.YO)(Vn)]);Un({id:Zn,jsonrpc:Gn,method:(0,jn.Yj)(),params:qn(Yn)}),Un({jsonrpc:Gn,method:(0,jn.Yj)(),params:qn(Yn)});(0,jn.Ik)({id:Zn,jsonrpc:Gn,result:(0,jn.lq)((0,jn.L5)()),error:(0,jn.lq)(Jn)});const Qn=Un({id:Zn,jsonrpc:Gn,result:Vn}),Xn=Un({id:Zn,jsonrpc:Gn,error:Jn});(0,jn.KC)([Qn,Xn]);const er={invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},tr={userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901},nr={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}},rr=er.internal,ir=(or(rr),"Unspecified server error.");function or(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Unspecified error message. This is a bug, please report it.";if(function(e){return Number.isInteger(e)}(e)){const t=e.toString();if(On(nr,t))return nr[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return ir}return t}function sr(e){return Array.isArray(e)?e.map(e=>$n(e)?e:Tn(e)?ar(e):null):Tn(e)?ar(e):$n(e)?e:null}function ar(e){return Object.getOwnPropertyNames(e).reduce((t,n)=>{const r=e[n];return $n(r)&&(t[n]=r),t},{})}const cr=null!==(lr=Bn)&&void 0!==lr&&lr.__esModule?lr.default:lr;var lr;class ur extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!==typeof t)throw new Error('"message" must be a non-empty string.');!function(e){return Tn(e)&&On(e,"cause")&&Tn(e.cause)}(n)?super(t):(super(t,{cause:n.cause}),On(this,"cause")||Object.assign(this,{cause:n.cause})),void 0!==n&&(this.data=n),this.code=e}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,function(e){if("object"!==typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(t){return!1}}(this.data)&&(e.data.cause=sr(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return cr(this.serialize(),hr,2)}}class dr extends ur{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}function hr(e,t){if("[Circular]"!==t)return t}const fr=e=>gr(er.internal,e),pr=e=>br(tr.unauthorized,e),mr=e=>{if(!e||"object"!==typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:r}=e;if(!n||"string"!==typeof n)throw new Error('"message" must be a nonempty string');return new dr(t,n,r)};function gr(e,t){const[n,r]=yr(t);return new ur(e,null!==n&&void 0!==n?n:or(e),r)}function br(e,t){const[n,r]=yr(t);return new dr(e,null!==n&&void 0!==n?n:or(e),r)}function yr(e){if(e){if("string"===typeof e)return[e];if("object"===typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!==typeof t)throw new Error("Must specify string message.");return[null!==t&&void 0!==t?t:void 0,n]}}return[]}var vr=n(4507),wr=n(5744);const _r=4294967295;let kr=Math.floor(Math.random()*_r);const xr=()=>(kr=(kr+1)%_r,kr);function Sr(e,t,n){return-1===t?e:new Promise((r,i)=>{const o=setTimeout(()=>{i(n?n():new Error("Timeout after ".concat(t,"ms")))},t);e.then(e=>{clearTimeout(o),r(e)}).catch(e=>{clearTimeout(o),i(e)})})}function Er(e){let t,n,{transport:r}=e;async function i(){r.isConnected()||(n||(n=r.connect()),await n)}async function o(){return t||(t=(async()=>{await i(),await async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{maxRetries:n=10,retryDelay:r=200,timeoutErrorClass:i}=t;for(let s=0;s<=n;s++)try{return await e()}catch(o){if(s>=n)throw o;if(i&&"function"===typeof i&&o instanceof i)continue;await new Promise(e=>setTimeout(e,r))}throw new Error("Max retries exceeded")}(()=>{var e;return r.request({method:"wallet_getSession"},{timeout:null!==(e=r.warmupTimeout)&&void 0!==e?e:1e3})})})()),await t}return i(),{createSession:async e=>(await o(),await Ar({transport:r,method:"wallet_createSession",params:e})),getSession:async()=>(await o(),await Ar({transport:r,method:"wallet_getSession"})),revokeSession:async e=>{await o(),t=void 0,n=void 0,await Ar({transport:r,method:"wallet_revokeSession",params:e}),await r.disconnect()},invokeMethod:async e=>(await o(),await Ar({transport:r,method:"wallet_invokeMethod",params:e})),extendsRpcApi:()=>Er({transport:r}),onNotification:e=>r.onNotification(e)}}async function Ar(e){let{transport:t,method:n,params:r,timeout:i}=e;const o=await t.request({method:n,params:r},{timeout:i});if(null!==o&&void 0!==o&&o.error)throw new Cn(o.error);return o.result}var Pr=n(2709);const Cr="metamask-contentscript",Ir="metamask-inpage",Mr="metamask-multichain-provider",Tr="metamask-provider",Or=-1,Nr=200;async function Br(){return new Promise((e,t)=>{const n=t=>{if(function(e){const{target:t,data:n}=e.data;return t===Ir&&(null===n||void 0===n?void 0:n.name)===Tr&&e.origin===location.origin}(t)){var i,o;const a=null===t||void 0===t||null===(i=t.data)||void 0===i||null===(i=i.data)||void 0===i?void 0:i.data;if("METAMASK_EXTENSION_CONNECT_CAN_RETRY"===(null===a||void 0===a?void 0:a.method))Rr();else if(null!==a&&void 0!==a&&null!==(o=a.result)&&void 0!==o&&o.extensionId){var s;const t=null===a||void 0===a||null===(s=a.result)||void 0===s?void 0:s.extensionId;e(t),window.removeEventListener("message",n),clearTimeout(r)}}},r=setTimeout(()=>{window.removeEventListener("message",n),t(new Error("MetaMask extension not found"))},1e4);window.addEventListener("message",n),Rr()})}function Rr(){window.postMessage({target:Cr,data:{name:Tr,data:{method:"metamask_getProviderState"}}},location.origin)}function jr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{extensionId:t}=e;const{defaultTimeout:n=Or,warmupTimeout:r=Nr}=e;let i,o=xr();const s=new Map,a=new Set;function c(e){const{data:t}=e;if(null===(null===t||void 0===t?void 0:t.id)||void 0===(null===t||void 0===t?void 0:t.id))!function(e){for(const t of a)try{t(e)}catch(Pe){console.log("[ChromeTransport] notifyCallbacks error:",Pe)}}(t);else if(s.has(t.id)){const e=s.get(t.id);s.delete(t.id),null===e||void 0===e||e(t)}}return{warmupTimeout:r,connect:async()=>{try{t||(t=await Br());const e=chrome.runtime.connect(t);let n=!0;if(e.onDisconnect.addListener(()=>{console.log("[ChromeTransport] chromePort disconnected"),i=void 0,n=!1}),await new Promise(e=>setTimeout(e,10)),!n)throw new Error("No extension found with id: ".concat(t));e.onMessage.addListener(c),i=e}catch(Pe){throw new In("Failed to connect to MetaMask",Pe)}},disconnect:async()=>{if(i)try{i.disconnect(),i=void 0,a.clear(),s.clear()}catch(Pe){console.log("[ChromeTransport] disconnect error:",Pe)}},isConnected:()=>void 0!==i,request:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{timeout:r=n}=t,a=i;if(!a)throw new In("Chrome port not connected");const c=o++,l=(0,Rn.A)({id:c,jsonrpc:"2.0"},e);try{return await Sr(new Promise(e=>{s.set(c,e),a.postMessage({type:"caip-348",data:l})}),r,()=>new Mn)}catch(Pe){throw s.has(c)&&s.delete(c),Pe}},onNotification:e=>(a.add(e),()=>{a.delete(e)})}}function Lr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultTimeout:t=Or,warmupTimeout:n=Nr}=e;let r=null;const i=new Map,o=new Set;function s(e){if(null===(null===e||void 0===e?void 0:e.id)||void 0===(null===e||void 0===e?void 0:e.id))!function(e){for(const t of o)try{t(e)}catch(Pe){console.log("[WindowPostMessageTransport] notifyCallbacks error:",Pe)}}(e);else if(i.has(e.id)){const t=i.get(e.id);i.delete(e.id),null===t||void 0===t||t(e)}}async function a(){r&&(window.removeEventListener("message",r),r=null),i.clear(),o.clear()}const c=()=>Boolean(r);return{warmupTimeout:n,connect:async()=>{c()&&await a(),r=e=>{const{target:t,data:n}=e.data;t===Ir&&(null===n||void 0===n?void 0:n.name)===Mr&&e.origin===location.origin&&s(n.data)},window.addEventListener("message",r)},disconnect:a,isConnected:c,request:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{timeout:r=t}=n;if(!c())throw new In("Transport not connected");const o=xr(),s=(0,Rn.A)({jsonrpc:"2.0",id:o},e);return Sr(new Promise(e=>{i.set(o,t=>e(t)),function(e){window.postMessage({target:Cr,data:{name:Mr,data:e}},location.origin)}(s)}),r,()=>new Mn).catch(e=>{throw i.has(o)&&i.delete(o),e})},onNotification:e=>(o.add(e),()=>{o.delete(e)})}}function Fr(){let{extensionId:e,defaultTimeout:t,warmupTimeout:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"undefined"!==typeof chrome&&chrome.runtime&&"function"===typeof chrome.runtime.connect?jr({extensionId:e,defaultTimeout:t,warmupTimeout:n}):Lr({defaultTimeout:t,warmupTimeout:n})}var zr=n(3563);function Dr(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(t){o(t)}}function a(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}function Ur(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(a){o=[6,a],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}var Wr="INSTALLED",qr="NOT_INSTALLED",Hr="REGISTERED",Kr="REGISTERING",Vr="RELOADING",$r={CHROME:"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn",FIREFOX:"https://addons.mozilla.org/firefox/addon/ether-metamask/",DEFAULT:"https://metamask.io"},Gr="REGISTRATION_IN_PROGRESS",Zr="FORWARDER_ID",Jr=function(){function e(t){var n=void 0===t?{}:t,r=n.forwarderOrigin,i=void 0===r?"https://fwd.metamask.io":r,o=n.forwarderMode,s=void 0===o?e.FORWARDER_MODE.INJECT:o;this.forwarderOrigin=i,this.forwarderMode=s,this.state=e.isMetaMaskInstalled()?Wr:qr;var a=e._detectBrowser();this.downloadUrl=a?$r[a]:$r.DEFAULT,this._onMessage=this._onMessage.bind(this),this._onMessageFromForwarder=this._onMessageFromForwarder.bind(this),this._openForwarder=this._openForwarder.bind(this),this._openDownloadPage=this._openDownloadPage.bind(this),this.startOnboarding=this.startOnboarding.bind(this),this.stopOnboarding=this.stopOnboarding.bind(this),window.addEventListener("message",this._onMessage),s===e.FORWARDER_MODE.INJECT&&"true"===sessionStorage.getItem(Gr)&&e._injectForwarder(this.forwarderOrigin)}return e.prototype._onMessage=function(e){if(e.origin===this.forwarderOrigin)return"metamask:reload"===e.data.type?this._onMessageFromForwarder(e):void console.debug("Unknown message from '"+e.origin+"' with data "+JSON.stringify(e.data))},e.prototype._onMessageUnknownStateError=function(e){throw new Error("Unknown state: '"+e+"'")},e.prototype._onMessageFromForwarder=function(t){return Dr(this,void 0,void 0,function(){return Ur(this,function(n){switch(n.label){case 0:switch(this.state){case Vr:return[3,1];case qr:return[3,2];case Wr:return[3,3];case Kr:return[3,5];case Hr:return[3,6]}return[3,7];case 1:return console.debug("Ignoring message while reloading"),[3,8];case 2:return console.debug("Reloading now to register with MetaMask"),this.state=Vr,location.reload(),[3,8];case 3:return console.debug("Registering with MetaMask"),this.state=Kr,[4,e._register()];case 4:return n.sent(),this.state=Hr,t.source.postMessage({type:"metamask:registrationCompleted"},t.origin),this.stopOnboarding(),[3,8];case 5:return console.debug("Already registering - ignoring reload message"),[3,8];case 6:return console.debug("Already registered - ignoring reload message"),[3,8];case 7:this._onMessageUnknownStateError(this.state),n.label=8;case 8:return[2]}})})},e.prototype.startOnboarding=function(){sessionStorage.setItem(Gr,"true"),this._openDownloadPage(),this._openForwarder()},e.prototype.stopOnboarding=function(){"true"===sessionStorage.getItem(Gr)&&(this.forwarderMode===e.FORWARDER_MODE.INJECT&&(console.debug("Removing forwarder"),e._removeForwarder()),sessionStorage.setItem(Gr,"false"))},e.prototype._openForwarder=function(){this.forwarderMode===e.FORWARDER_MODE.OPEN_TAB?window.open(this.forwarderOrigin,"_blank"):e._injectForwarder(this.forwarderOrigin)},e.prototype._openDownloadPage=function(){window.open(this.downloadUrl,"_blank")},e.isMetaMaskInstalled=function(){return Boolean(window.ethereum&&window.ethereum.isMetaMask)},e._register=function(){return window.ethereum.request({method:"wallet_registerOnboarding"})},e._injectForwarder=function(e){var t=document.body,n=document.createElement("iframe");n.setAttribute("height","0"),n.setAttribute("width","0"),n.setAttribute("style","display: none;"),n.setAttribute("src",e),n.setAttribute("id",Zr),t.insertBefore(n,t.children[0])},e._removeForwarder=function(){var e;null===(e=document.getElementById(Zr))||void 0===e||e.remove()},e._detectBrowser=function(){var e=s().parse(window.navigator.userAgent);return"Firefox"===e.browser.name?"FIREFOX":["Chrome","Chromium"].includes(e.browser.name||"")?"CHROME":null},e.FORWARDER_MODE={INJECT:"INJECT",OPEN_TAB:"OPEN_TAB"},e}();const Yr=Jr;var Qr,Xr,ei,ti,ni,ri,ii,oi,si,ai,ci,li,ui,di,hi=n(7802),fi=Object.defineProperty,pi=Object.defineProperties,mi=Object.getOwnPropertyDescriptors,gi=Object.getOwnPropertyNames,bi=Object.getOwnPropertySymbols,yi=Object.prototype.hasOwnProperty,vi=Object.prototype.propertyIsEnumerable,wi=e=>{throw TypeError(e)},_i=(e,t,n)=>t in e?fi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ki=(e,t)=>{for(var n in t||(t={}))yi.call(t,n)&&_i(e,n,t[n]);if(bi)for(var n of bi(t))vi.call(t,n)&&_i(e,n,t[n]);return e},xi=(e,t)=>pi(e,mi(t)),Si=(e,t)=>function(){return e&&(t=(0,e[gi(e)[0]])(e=0)),t},Ei=(e,t)=>{for(var n in t)fi(e,n,{get:t[n],enumerable:!0})},Ai=(e,t,n)=>t.has(e)||wi("Cannot "+n),Pi=(e,t,n)=>(Ai(e,t,"read from private field"),n?n.call(e):t.get(e)),Ci=(e,t,n)=>t.has(e)?wi("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ii=(e,t,n,r)=>(Ai(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Mi=(e,t,n)=>(Ai(e,t,"access private method"),n),Ti=(e,t,n)=>new Promise((r,i)=>{var o=e=>{try{a(n.next(e))}catch(t){i(t)}},s=e=>{try{a(n.throw(e))}catch(t){i(t)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,s);a((n=n.apply(e,t)).next())}),Oi=Si({"src/domain/errors/base.ts"(){Qr=class extends Error{constructor(e,t){super(e),this.message=e,this.code=t}}}}),Ni=Si({"src/domain/errors/rpc.ts"(){Oi(),(Xr=class e extends Qr{constructor(t,n,r){super("RPCErr".concat(e.code,": ").concat(r," on ").concat(t," for method ").concat(n),e.code),this.rpcEndpoint=t,this.method=n,this.httpStatus=r}}).code=50,ei=Xr,(ti=class e extends Qr{constructor(t){super("RPCErr".concat(e.code,": RPC Client response reason ").concat(t),e.code),this.reason=t}}).code=51,ni=ti,(ri=class e extends Qr{constructor(t){super("RPCErr".concat(e.code,": RPC Client fetch reason ").concat(t),e.code),this.reason=t}}).code=52,ii=ri,(oi=class e extends Qr{constructor(t,n,r){super("RPCErr".concat(e.code,": RPC Client invoke method reason (").concat(t,")"),e.code),this.reason=t,this.rpcCode=n,this.rpcMessage=r}}).code=53,si=oi}}),Bi=Si({"src/domain/errors/index.ts"(){Ni()}}),Ri=Si({"src/domain/events/index.ts"(){ci=class{constructor(){Ci(this,ai,new r.EventEmitter)}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Pi(this,ai).emit(e,...n)}on(e,t){return Pi(this,ai).on(e,t),()=>{this.off(e,t)}}off(e,t){Pi(this,ai).off(e,t)}removeListener(e,t){Pi(this,ai).off(e,t)}once(e,t){return Pi(this,ai).once(e,t),()=>{this.off(e,t)}}listenerCount(e){return Pi(this,ai).listenerCount(e)}},ai=new WeakMap}});function ji(e,t){return e.includes(t)||e.includes("metamask-sdk:*")||e.includes("*")}var Li,Fi,zi,Di=Si({"src/domain/logger/index.ts"(){li=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"214";const t=i(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"metamask-sdk");return t.color=e,t},ui=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"metamask-sdk";i.enable(e)},di=(e,t)=>Ti(null,null,function*(){var n;if("process"in globalThis&&(null==(n=null==hi?void 0:{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0})?void 0:n.DEBUG)){const{DEBUG:t}={};return ji(t,e)}const r=yield t.getDebug();return!!r&&ji(r,e)})}}),Ui=Si({"src/domain/multichain/api/constants.ts"(){Li={"eip155:1":"https://mainnet.infura.io/v3/","eip155:11155111":"https://sepolia.infura.io/v3/","eip155:560048":"https://hoodi.infura.io/v3/","eip155:59144":"https://linea-mainnet.infura.io/v3/","eip155:59141":"https://linea-sepolia.infura.io/v3/","eip155:137":"https://polygon-mainnet.infura.io/v3/","eip155:80002":"https://polygon-amoy.infura.io/v3/","eip155:10":"https://optimism-mainnet.infura.io/v3/","eip155:11155420":"https://optimism-sepolia.infura.io/v3/","eip155:42161":"https://arbitrum-mainnet.infura.io/v3/","eip155:421614":"https://arbitrum-sepolia.infura.io/v3/","eip155:8453":"https://base-mainnet.infura.io/v3/","eip155:84532":"https://base-sepolia.infura.io/v3/","eip155:81457":"https://blast-mainnet.infura.io/v3/","eip155:168587773":"https://blast-sepolia.infura.io/v3/","eip155:324":"https://zksync-mainnet.infura.io/v3/","eip155:300":"https://zksync-sepolia.infura.io/v3/","eip155:56":"https://bsc-mainnet.infura.io/v3/","eip155:97":"https://bsc-testnet.infura.io/v3/","eip155:204":"https://opbnb-mainnet.infura.io/v3/","eip155:5611":"https://opbnb-testnet.infura.io/v3/","eip155:534352":"https://scroll-mainnet.infura.io/v3/","eip155:534351":"https://scroll-sepolia.infura.io/v3/","eip155:5000":"https://mantle-mainnet.infura.io/v3/","eip155:5003":"https://mantle-sepolia.infura.io/v3/","eip155:1329":"https://sei-mainnet.infura.io/v3/","eip155:713715":"https://sei-testnet.infura.io/v3/","eip155:1923":"https://swellchain-mainnet.infura.io/v3/","eip155:1924":"https://swellchain-testnet.infura.io/v3/","eip155:130":"https://unichain-mainnet.infura.io/v3/","eip155:1301":"https://unichain-sepolia.infura.io/v3/","eip155:43111":"https://hemi-mainnet.infura.io/v3/","eip155:743111":"https://hemi-testnet.infura.io/v3/","eip155:6342":"https://megaeth-mainnet.infura.io/v3/","eip155:6342001":"https://megaeth-testnet.infura.io/v3/","eip155:143":"https://monad-mainnet.infura.io/v3/","eip155:10143":"https://monad-testnet.infura.io/v3/","eip155:11297108109":"https://palm-mainnet.infura.io/v3/","eip155:43114":"https://avalanche-mainnet.infura.io/v3/","eip155:43113":"https://avalanche-fuji.infura.io/v3/","eip155:42220":"https://celo-mainnet.infura.io/v3/","eip155:44787":"https://celo-sepolia.infura.io/v3/","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":"https://solana-mainnet.infura.io/v3/","solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1":"https://solana-devnet.infura.io/v3/"},Fi=new Set(["eth_blockNumber","eth_gasPrice","eth_maxPriorityFeePerGas","eth_blobBaseFee","eth_feeHistory","eth_getBalance","eth_getCode","eth_getStorageAt","eth_call","eth_estimateGas","eth_getLogs","eth_getProof","eth_getTransactionCount","eth_getBlockByNumber","eth_getBlockByHash","eth_getBlockTransactionCountByNumber","eth_getBlockTransactionCountByHash","eth_getUncleCountByBlockNumber","eth_getUncleCountByBlockHash","eth_getTransactionByHash","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByBlockHashAndIndex","eth_getTransactionReceipt","eth_getUncleByBlockNumberAndIndex","eth_getUncleByBlockHashAndIndex","eth_getFilterChanges","eth_getFilterLogs","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"]),zi=new Set(["eth_accounts","eth_chainId"])}});function Wi(e){let{infuraApiKey:t,caipChainIds:n}=e;return(n&&n.length>0?n:Object.keys(Li)).reduce((e,n)=>{const r=Li[n];return r&&(e[n]="".concat(r).concat(t)),e},{})}var qi,Hi,Ki=Si({"src/domain/multichain/api/infura.ts"(){Ui()}});var Vi,$i,Gi=Si({"src/domain/multichain/index.ts"(){Ri(),Ui(),Ki(),qi=(e=>(e.Browser="browser",e.MWP="mwp",e.UNKNOWN="unknown",e))(qi||{}),Hi=class extends ci{constructor(e){super(),this.options=e}mergeOptions(e){var t,n,r,i,o,s,a,c,l,u,d,h,f,p,m;const g=this.options;this.options=xi(ki({},g),{api:xi(ki({},g.api),{supportedNetworks:ki(ki({},g.api.supportedNetworks),null!=(n=null==(t=e.api)?void 0:t.supportedNetworks)?n:{})}),versions:ki(ki({},g.versions),null!=(r=e.versions)?r:{}),ui:xi(ki({},g.ui),{headless:null!=(o=null==(i=e.ui)?void 0:i.headless)?o:g.ui.headless,preferExtension:null!=(a=null==(s=e.ui)?void 0:s.preferExtension)?a:g.ui.preferExtension,showInstallModal:null!=(l=null==(c=e.ui)?void 0:c.showInstallModal)?l:g.ui.showInstallModal}),mobile:ki(ki({},g.mobile),null!=(u=e.mobile)?u:{}),transport:xi(ki({},null!=(d=g.transport)?d:{}),{extensionId:null!=(p=null==(h=e.transport)?void 0:h.extensionId)?p:null==(f=g.transport)?void 0:f.extensionId}),debug:null!=(m=e.debug)?m:g.debug})}}}});function Zi(){var e,t;if("undefined"!==typeof global&&"ReactNative"===(null==(e=null==global?void 0:global.navigator)?void 0:e.product))return!0;return"undefined"!==typeof window&&void 0!==window.navigator&&"ReactNative"===(null==(t=window.navigator)?void 0:t.product)}function Ji(){return Zi()?"react-native":"undefined"!==typeof window&&(null==window?void 0:window.navigator)&&"ReactNative"!==(null==navigator?void 0:navigator.product)?"undefined"!==typeof window&&Boolean(window.ReactNativeWebView)&&Boolean(window.navigator.userAgent.endsWith("MetaMaskMobile"))?"in-app-browser":function(){var e,t;const n=o.parse(window.navigator.userAgent);return"mobile"===(null==(e=null==n?void 0:n.platform)?void 0:e.type)||"tablet"===(null==(t=null==n?void 0:n.platform)?void 0:t.type)}()?"web-mobile":"web-desktop":"nodejs"}function Yi(){const e=Ji();return Zi()||"web-mobile"===e}function Qi(){return Ti(this,null,function*(){return $i})}var Xi,eo,to,no,ro,io=Si({"src/domain/platform/index.ts"(){Vi=(e=>(e.NonBrowser="nodejs",e.MetaMaskMobileWebview="in-app-browser",e.DesktopWeb="web-desktop",e.MobileWeb="web-mobile",e.ReactNative="react-native",e))(Vi||{}),$i=Ti(null,null,function*(){const e=Ji();return"nodejs"===e||"react-native"===e?Promise.resolve(!1):new Promise(e=>{const t=[],n=e=>{var n,r;(null==(r=null==(n=null==e?void 0:e.detail)?void 0:n.info)?void 0:r.rdns)&&t.push(e.detail)};window.addEventListener("eip6963:announceProvider",n),window.dispatchEvent(new Event("eip6963:requestProvider")),setTimeout(()=>{window.removeEventListener("eip6963:announceProvider",n);const r=t.some(e=>{var t,n;return null==(n=null==(t=null==e?void 0:e.info)?void 0:t.rdns)?void 0:n.startsWith("io.metamask")});e(r)},300)})})}}),oo=Si({"src/domain/store/adapter.ts"(){Xi=class{constructor(e){this.options=e}}}}),so=Si({"src/domain/store/client.ts"(){eo=class{}}}),ao=Si({"src/domain/store/index.ts"(){oo(),so()}}),co=Si({"src/domain/ui/types.ts"(){to=class{constructor(e){this.options=e}get isMounted(){return void 0!==this.instance}get data(){if("object"===typeof this.options&&this.options&&"link"in this.options)return this.options.link;if("object"===typeof this.options&&this.options&&"otpCode"in this.options)return this.options.otpCode;throw new Error("Invalid options")}set data(e){"object"===typeof this.options&&this.options&&"link"in this.options&&(this.options.link=e),"object"===typeof this.options&&this.options&&"otpCode"in this.options&&(this.options.otpCode=e)}}}}),lo=Si({"src/domain/ui/index.ts"(){co()}});function uo(e){var t,n,r,i;if("object"!==typeof e||null===e)return{code:void 0,message:""};if(e instanceof si)return{code:null!=(t=e.rpcCode)?t:e.code,message:null!=(r=null!=(n=e.rpcMessage)?n:e.message)?r:""};const o=e;return{code:o.code,message:null!=(i=o.message)?i:""}}function ho(e){if("object"!==typeof e||null===e)return!1;const{code:t,message:n}=uo(e),r=n.toLowerCase();return 4001===t||r.includes("reject")||r.includes("denied")||r.includes("cancel")||r.includes("user rejected")||r.includes("user denied")||r.includes("user cancelled")||r.includes("user canceled")}function fo(e){const t=function(e){var t,n;if("object"!==typeof e||null===e)return"unknown";const r=e,i=null!=(t=r.name)?t:"",o=null!=(n=r.message)?n:"",s=o.toLowerCase(),{code:a}=uo(e);if("number"===typeof a){if(-32601===a)return"wallet_method_unsupported";if(-32602===a)return"wallet_invalid_params";if(-32603===a)return"wallet_internal_error";if(a<=-32e3&&a>=-32099)return"wallet_internal_error";if(4100===a)return"wallet_unauthorized";if(4200===a)return"wallet_method_unsupported";if(4902===a)return"unrecognized_chain"}return"TransportTimeoutError"===i||"Request timeout"===o||s.includes("timed out")||s.includes("timeout")?"transport_timeout":"TransportError"===i||s.includes("not connected")||s.includes("transport disconnect")||s.includes("connection lost")||s.includes("socket closed")?"transport_disconnect":"unknown"}(e),{code:n,message:r}=uo(e),i=function(e){if(!e)return;let t=e;for(const{pattern:n,replacement:r}of ro)t=t.replace(n,r);return t.length>no&&(t="".concat(t.slice(0,no-1),"\u2026")),t}(r);return ki(ki({failure_reason:t},"number"===typeof n?{error_code:n}:{}),i?{error_message_sample:i}:{})}function po(e,t){return Ti(this,null,function*(){var n;const r=Eo(e.dapp),i=Ji(),o=yield t.getAnonId();return{mmconnect_versions:null!=(n=e.versions)?n:{},dapp_id:r,platform:i,anon_id:o}})}function mo(e,t,n,r,i){return Ti(this,null,function*(){var o;const s=Eo(e.dapp),a=yield t.getAnonId();return ki(ki(ki({mmconnect_versions:null!=(o=e.versions)?o:{},dapp_id:s,method:n.request.method,caip_chain_id:n.scope,anon_id:a,transport_type:r},(null==i?void 0:i.failure_reason)?{failure_reason:i.failure_reason}:{}),"number"===typeof(null==i?void 0:i.error_code)?{error_code:i.error_code}:{}),(null==i?void 0:i.error_message_sample)?{error_message_sample:i.error_message_sample}:{})})}var go=Si({"src/multichain/utils/analytics.ts"(){Do(),ko(),no=200,ro=[{pattern:/0x[0-9A-Fa-f]{40}/g,replacement:"<addr>"},{pattern:/(?:0x)?[0-9A-Fa-f]{16,}/g,replacement:"<hex>"},{pattern:/https?:\/\/(?:[\0-\x08\x0E-\x1F!#-&\(\*-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+/g,replacement:"<url>"},{pattern:/\b[a-z]{1,10}1[02-9ac-hj-np-z]{38,}\b/g,replacement:"<addr>"},{pattern:/\b[1-9A-HJ-NP-Za-km-z]{32,}\b/g,replacement:"<addr>"},{pattern:/[0-9]{10,}/g,replacement:"<num>"}]}});var bo,yo,vo,wo,_o=Si({"src/domain/utils/index.ts"(){go()}}),ko=Si({"src/domain/index.ts"(){Bi(),Ri(),Di(),Gi(),io(),ao(),lo(),_o()}});function xo(){if("undefined"!==typeof globalThis)return globalThis;if("undefined"!==typeof global)return global;if("undefined"!==typeof self)return self;if("undefined"!==typeof window)return window;throw new Error("Unable to locate global object")}function So(e){const t=Pn(e);return function(e){if("undefined"!==typeof btoa)return btoa(e);if("undefined"!==typeof Buffer)return Buffer.from(e).toString("base64");throw new Error("No base64 encoding method available")}(String.fromCharCode.apply(null,Array.from(t)))}function Eo(e){var t;return null!=(t=e.url)?t:e.name}function Ao(e,t,n){var r;const{mobile:i}=e;if(null==(r=null==i?void 0:i.useDeeplink)||r)"undefined"!==typeof window&&(window.location.href=t);else if("undefined"!==typeof document){const e=document.createElement("a");e.href=n,e.target="_self",e.rel="noreferrer noopener",e.click()}}function Po(e){return e.reduce((e,t)=>xi(ki({},e),{[t]:{methods:[],notifications:[],accounts:[]}}),{})}function Co(e,t,n,r){if(!(e.every(e=>t.includes(e))&&t.every(t=>e.includes(t))))return!1;const i=Object.values(n.sessionScopes).filter(e=>{let{accounts:t}=e;return Boolean(t)}).flatMap(e=>{let{accounts:t}=e;return null!=t?t:[]});return r.every(e=>i.includes(e))}function Io(e){return e.reduce((e,t)=>{try{return[...e,(0,a.Dz)(t)]}catch(n){const r=JSON.stringify(t);return console.error("Invalid CAIP account ID: ".concat(r),n),e}},[])}function Mo(e,t){var n;if(!e||!(null==t?void 0:t.length))return e;const r=Object.fromEntries(Object.entries(e).map(e=>{let[t,n]=e;var r,i,o;return[t,{methods:[...null!=(r=null==n?void 0:n.methods)?r:[]],notifications:[...null!=(i=null==n?void 0:n.notifications)?i:[]],accounts:[...null!=(o=null==n?void 0:n.accounts)?o:[]]}]})),i=new Map;for(const s of t){const e="".concat(s.chain.namespace,":").concat(s.chain.reference),t="".concat(s.chainId,":").concat(s.address);i.has(e)||i.set(e,[]),null==(n=i.get(e))||n.push(t)}for(const[s,c]of Object.entries(r))if(null==c?void 0:c.accounts)try{const e=s,t=(0,a.rW)(e),n="".concat(t.namespace,":").concat(t.reference),r=i.get(n);if(r){const e=new Set(c.accounts),t=r.filter(t=>!e.has(t));c.accounts.push(...t)}}catch(o){console.error("Invalid scope format: ".concat(s),o)}return r}var To,Oo,No,Bo,Ro,jo,Lo,Fo,zo,Do=Si({"src/multichain/utils/index.ts"(){ko(),bo=()=>{var e;if("undefined"===typeof document)return;let t;const n=document.getElementsByTagName("link");for(let r=0;r<n.length;r++)"icon"!==n[r].getAttribute("rel")&&"shortcut icon"!==n[r].getAttribute("rel")||(t=null!=(e=n[r].getAttribute("href"))?e:void 0);return t},yo=4294967295,vo=Math.floor(Math.random()*yo),wo=()=>vo=(vo+1)%yo}}),Uo=Si({"src/multichain/transports/constants.ts"(){To="metamask-multichain-provider"}}),Wo={};Ei(Wo,{MWPTransport:()=>zo});var qo=Si({"src/multichain/transports/mwp/index.ts"(){ko(),Do(),Uo(),Oo="cache_wallet_getSession",No="cache_eth_accounts",Bo="cache_eth_chainId",Ro="pending_session_request",jo=["wallet_getSession","wallet_createSession","wallet_sessionChanged"],Lo=["wallet_revokeSession","wallet_revokePermissions"],Fo=li("metamask-sdk:transport"),zo=class{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{requestTimeout:6e4,connectionTimeout:12e4,resumeTimeout:1e4};this.dappClient=e,this.kvstore=t,this.options=n,this.__pendingRequests=new Map,this.notificationCallbacks=new Set,this.dappClient.on("message",this.handleMessage.bind(this)),this.dappClient.on("session_request",e=>{this.currentSessionRequest=e,this.kvstore.set(Ro,JSON.stringify(e)).catch(e=>{Fo("Failed to store pending session request",e)})}),"undefined"!==typeof window&&"undefined"!==typeof window.addEventListener&&(this.windowFocusHandler=this.onWindowFocus.bind(this),window.addEventListener("focus",this.windowFocusHandler))}get pendingRequests(){return this.__pendingRequests}set pendingRequests(e){this.__pendingRequests=e}get sessionRequest(){return this.currentSessionRequest}getStoredPendingSessionRequest(){return Ti(this,null,function*(){try{const e=yield this.kvstore.get(Ro);return e?JSON.parse(e):null}catch(e){return null}})}removeStoredPendingSessionRequest(){return Ti(this,null,function*(){yield this.kvstore.delete(Ro)})}onWindowFocus(){this.isConnected()||this.dappClient.reconnect()}notifyCallbacks(e){this.notificationCallbacks.forEach(t=>t(e))}rejectRequest(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Error("Request rejected");const n=this.pendingRequests.get(e);n&&(this.pendingRequests.delete(e),clearTimeout(n.timeout),n.reject(t))}parseWalletError(e){const t=e;if("number"===typeof t.code&&"string"===typeof t.message){const{code:e,message:n}=t;return e>=1e3&&e<=4999?mr({code:e,message:n}):new ur(e,n)}const n=e instanceof Error?e.message:JSON.stringify(e);return fr({message:n})}handleMessage(e){if("object"===typeof e&&null!==e&&"data"in e){const t=e.data;if("id"in t&&"string"===typeof t.id){const e=this.pendingRequests.get(t.id);if(e){if(clearTimeout(e.timeout),"error"in t&&t.error)return this.pendingRequests.delete(t.id),void e.reject(this.parseWalletError(t.error));const n=xi(ki({},t),{method:"wallet_getSession"===e.method||"wallet_createSession"===e.method?"wallet_sessionChanged":e.method}),r=xi(ki({},t),{method:"wallet_getSession"===e.method||"wallet_createSession"===e.method?"wallet_sessionChanged":e.method,params:n.result});this.notifyCallbacks(r),e.resolve(n),this.pendingRequests.delete(t.id)}}else{if("metamask_chainChanged"===e.data.method&&this.kvstore.set(Bo,JSON.stringify(e.data.params.chainId)),"metamask_accountsChanged"===e.data.method&&this.kvstore.set(No,JSON.stringify(e.data.params)),"wallet_sessionChanged"===e.data.method){const t={result:e.data.params};this.kvstore.set(Oo,JSON.stringify(t))}this.notifyCallbacks(e.data)}}}onResumeSuccess(e,t,n){return Ti(this,null,function*(){var r,i,o,s,a,c,l;try{yield this.waitForWalletSessionIfNotCached();const u=yield this.request({method:"wallet_getSession"});if(u.error)return t(new Error(u.error.message));let d=u.result;if(d&&n){const e=Object.keys(null!=(r=null==d?void 0:d.sessionScopes)?r:{}),c=null!=(i=null==n?void 0:n.scopes)?i:[],l=Co(e,c,d,null!=(o=null==n?void 0:n.caipAccountIds)?o:[]);if(n.forceRequest||!l){const e={optionalScopes:Mo(Po(null!=(s=null==n?void 0:n.scopes)?s:[]),Io(null!=(a=null==n?void 0:n.caipAccountIds)?a:[]))},r=yield this.request({method:"wallet_createSession",params:e});if(r.error)return t(new Error(r.error.message));d=r.result}}else if(!d){const e={optionalScopes:Mo(Po(null!=(c=null==n?void 0:n.scopes)?c:[]),Io(null!=(l=null==n?void 0:n.caipAccountIds)?l:[]))},r=yield this.request({method:"wallet_createSession",params:e});if(r.error)return t(new Error(r.error.message));d=r.result}return yield this.removeStoredPendingSessionRequest(),this.notifyCallbacks({method:"wallet_sessionChanged",params:d}),e()}catch(Pe){return t(Pe)}})}init(){return Ti(this,null,function*(){})}sendEip1193Message(e,t){return Ti(this,null,function*(){const n=ki({jsonrpc:"2.0",id:String(wo())},e),r=yield this.getCachedResponse(n);return r?(this.notifyCallbacks(r),r):new Promise((e,r)=>{var i;const o=setTimeout(()=>{this.rejectRequest(n.id,new Mn)},null!=(i=null==t?void 0:t.timeout)?i:this.options.requestTimeout);this.pendingRequests.set(n.id,{request:n,method:n.method,resolve:t=>Ti(this,null,function*(){return yield this.storeWalletSession(n,t),e(t)}),reject:r,timeout:o}),this.dappClient.sendRequest({name:"metamask-provider",data:n}).catch(r)})})}connect(e){return Ti(this,null,function*(){const{dappClient:t}=this,n=yield this.getActiveSession();n&&Fo("active session found",{id:n.id,channel:n.channel,expiresAt:n.expiresAt});const r=yield this.getStoredPendingSessionRequest();let i,o;const s=new Promise((s,a)=>Ti(this,null,function*(){let c;c=new Promise(n?(r,i)=>{var o;"CONNECTED"===this.dappClient.state?this.onResumeSuccess(r,i,e):(this.dappClient.once("connected",()=>Ti(this,null,function*(){this.onResumeSuccess(r,i,e)})),t.resume(null!=(o=null==n?void 0:n.id)?o:""))}:(n,r)=>{var i,s;const a={optionalScopes:Mo(Po(null!=(i=null==e?void 0:e.scopes)?i:[]),Io(null!=(s=null==e?void 0:e.caipAccountIds)?s:[])),sessionProperties:null==e?void 0:e.sessionProperties},c={jsonrpc:"2.0",id:String(wo()),method:"wallet_createSession",params:a};o=e=>Ti(this,null,function*(){if("object"!==typeof e||null===e)return;if(!("data"in e))return;const t=e.data,i=t.id===c.id,o="wallet_createSession"===t.method||"wallet_sessionChanged"===t.method;return i||o?t.error?r(this.parseWalletError(t.error)):(yield this.storeWalletSession(c,t),yield this.removeStoredPendingSessionRequest(),this.notifyCallbacks(t),n()):void 0}),this.dappClient.on("message",o);const l=Ji(),u=["web-desktop","nodejs"].includes(l),d={name:To,data:c};t.connect({mode:"trusted",initialPayload:u?void 0:d}).then(()=>Ti(this,null,function*(){if(u)return t.sendRequest(d)})).catch(e=>{o&&this.dappClient.off("message",o),r(e)})}),i=setTimeout(()=>{a(new Mn)},r?this.options.resumeTimeout:this.options.connectionTimeout),c.then(s).catch(a)}));return s.catch(e=>Ti(this,null,function*(){throw yield this.dappClient.disconnect(),e})).finally(()=>{i&&clearTimeout(i),o&&(this.dappClient.off("message",o),o=void 0),this.removeStoredPendingSessionRequest()})})}disconnect(){return Ti(this,arguments,function(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return function*(){var n,r;const i=yield e.getCachedResponse({jsonrpc:"2.0",id:"0",method:"wallet_getSession"}),o=null!=(r=null==(n=null==i?void 0:i.result)?void 0:n.sessionScopes)?r:{},s=0===t.length?[]:Object.keys(o).filter(e=>!t.includes(e)),a=Object.fromEntries(Object.entries(o).filter(e=>{let[t]=e;return s.includes(t)}));e.request({method:"wallet_revokeSession",params:{scopes:t}}).catch(e=>{console.error("error revoking session",e)});s.some(e=>e.includes("eip155"))||(e.kvstore.delete(No),e.kvstore.delete(Bo)),s.length>0?e.kvstore.set(Oo,JSON.stringify({result:{sessionScopes:a}})):(e.kvstore.delete(Oo),"undefined"!==typeof window&&"undefined"!==typeof window.removeEventListener&&e.windowFocusHandler&&(window.removeEventListener("focus",e.windowFocusHandler),e.windowFocusHandler=void 0),yield e.dappClient.disconnect()),e.notifyCallbacks({method:"wallet_sessionChanged",params:{sessionScopes:a}})}()})}isConnected(){return"CONNECTED"===this.dappClient.state}attemptResumeSession(){return Ti(this,null,function*(){try{yield this.dappClient.reconnect(),yield new Promise((e,t)=>{const n=setTimeout(()=>{t(new Error("Resume timeout"))},2e3);this.isConnected()?(clearTimeout(n),e()):this.dappClient.once("connected",()=>{clearTimeout(n),e()})})}catch(e){return Promise.reject(new Error("Failed to resume session: ".concat(e.message)))}})}getCachedResponse(e){return Ti(this,null,function*(){var t;if("wallet_getSession"===e.method){const n=yield this.kvstore.get(Oo);if(n){const r=JSON.parse(n);return{id:e.id,jsonrpc:"2.0",result:null!=(t=r.params)?t:r.result,method:e.method}}}else if("eth_accounts"===e.method){const t=yield this.kvstore.get(No);if(t)return{id:e.id,jsonrpc:"2.0",result:JSON.parse(t),method:e.method}}else if("eth_chainId"===e.method){const t=yield this.kvstore.get(Bo);if(t)return{id:e.id,jsonrpc:"2.0",result:JSON.parse(t),method:e.method}}})}storeWalletSession(e,t){return Ti(this,null,function*(){t.error||(jo.includes(e.method)?yield this.kvstore.set(Oo,JSON.stringify(t)):"eth_accounts"===e.method?yield this.kvstore.set(No,JSON.stringify(t.result)):"eth_chainId"===e.method?yield this.kvstore.set(Bo,JSON.stringify(t.result)):Lo.includes(e.method)&&(yield this.kvstore.delete(Oo),yield this.kvstore.delete(No),yield this.kvstore.delete(Bo)))})}request(e,t){return Ti(this,null,function*(){const n=ki({jsonrpc:"2.0",id:String(wo())},e),r=yield this.getCachedResponse(n);return r?(this.notifyCallbacks(r),r):(this.isConnected()||(yield this.attemptResumeSession()),new Promise((e,r)=>{var i;const o=setTimeout(()=>{this.rejectRequest(n.id,new Mn)},null!=(i=null==t?void 0:t.timeout)?i:this.options.requestTimeout);this.pendingRequests.set(n.id,{request:n,method:n.method,resolve:t=>Ti(this,null,function*(){return yield this.storeWalletSession(n,t),e(t)}),reject:r,timeout:o}),this.dappClient.sendRequest({name:To,data:n}).catch(r)}))})}onNotification(e){return this.notificationCallbacks.add(e),()=>{this.notificationCallbacks.delete(e)}}getActiveSession(){return Ti(this,null,function*(){const{kvstore:e}=this,{SessionStore:t}=yield n.e(921).then(n.t.bind(n,5921,19)),r=yield t.create(e);try{const[e]=yield r.list();return e}catch(i){return void Fo("error getting active session",i)}})}waitForWalletSessionIfNotCached(){return Ti(this,null,function*(){if(yield this.kvstore.get(Oo))return;let e;const t=new Promise(t=>{e=this.onNotification(n=>{if("object"===typeof n&&null!==n&&"data"in n){const r=n.data;"wallet_getSession"!==r.method&&"wallet_sessionChanged"!==r.method||(e(),t())}})}),n=new Promise((t,n)=>{setTimeout(()=>{e(),this.removeStoredPendingSessionRequest(),n(new Mn)},this.options.resumeTimeout)});return Promise.race([t,n])})}}}}),Ho={};function Ko(){return Ti(this,null,function*(){const{decrypt:e,encrypt:t,PrivateKey:r,PublicKey:i}=yield n.e(288).then(n.t.bind(n,4288,19));return{generateKeyPair(){const e=new r;return{privateKey:new Uint8Array(e.secret),publicKey:e.publicKey.toBytes(!0)}},encrypt(e,n){return Ti(this,null,function*(){const r=Buffer.from(e,"utf8");return t(n,r).toString("base64")})},decrypt(t,n){return Ti(this,null,function*(){const r=Buffer.from(t,"base64"),i=yield e(n,r);return Buffer.from(i).toString("utf8")})},validatePeerKey(e){i.fromHex(Buffer.from(e).toString("hex"))}}})}Ei(Ho,{createKeyManager:()=>Ko});var Vo=Si({"src/multichain/transports/mwp/KeyManager.ts"(){}});var $o,Go,Zo,Jo,Yo,Qo,Xo,es=Si({"src/ui/modals/base/utils.ts"(){}}),ts=Si({"src/ui/modals/base/AbstractInstallModal.ts"(){es(),ko(),$o=li("metamask-sdk:ui"),Jo=class extends to{constructor(){super(...arguments),Ci(this,Go,null),Ci(this,Zo,-1)}get link(){return this.data}set link(e){this.data=e}get connectionRequest(){return this.options.connectionRequest}set connectionRequest(e){this.options.connectionRequest=e}updateLink(e){this.link=e,this.instance&&(this.instance.link=e)}updateExpiresIn(e){e>=0&&this.instance&&(this.instance.expiresIn=e)}startExpirationCheck(e){this.stopExpirationCheck();let t=e;Ii(this,Go,setInterval(()=>Ti(this,null,function*(){const{sessionRequest:e}=t,n=Date.now(),r=e.expiresAt-n,i=Math.floor(r/1e3);if(r>0&&function(e){return e<=10||(e<=30?e%5===0:e<=60?e%10===0:e<=300?e%30===0:e%60===0)}(i)&&Pi(this,Zo)!==i){const e=function(e){if(e<=0)return"EXPIRED";const t=Math.floor(e/1e3);return"".concat(t,"s")}(r);$o("[UI: InstallModal-nodejs()] QR code expires in: ".concat(e," (").concat(i,"s)")),Ii(this,Zo,i)}if(n>=e.expiresAt){this.stopExpirationCheck(),$o("[UI: InstallModal-nodejs()] \u23f0 QR code EXPIRED! Generating new one...");try{t=yield this.options.createConnectionRequest();const e=yield this.options.generateQRCode(t);Ii(this,Zo,-1),this.updateLink(e),this.updateExpiresIn(i),this.renderQRCode(e,t)}catch(o){$o("[UI: InstallModal-nodejs()] \u274c Error generating new QR code: ".concat(o))}}}),1e3))}stopExpirationCheck(){Pi(this,Go)&&(clearInterval(Pi(this,Go)),Ii(this,Go,null),$o("[UI: InstallModal-nodejs()] \ud83d\uded1 Stopped QR code expiration checking"))}},Go=new WeakMap,Zo=new WeakMap}}),ns=Si({"src/ui/modals/web/install.ts"(){ts(),Yo=class extends Jo{renderQRCode(){}mount(){var e;const{options:t}=this,n=document.createElement("mm-install-modal");n.showInstallModal=t.showInstallModal,n.addEventListener("close",e=>{const{detail:n}=e;t.onClose(null==n?void 0:n.shouldTerminate)}),n.addEventListener("startDesktopOnboarding",t.startDesktopOnboarding),n.link=t.link,this.instance=n,null==(e=t.parentElement)||e.appendChild(n),this.startExpirationCheck(t.connectionRequest)}unmount(){var e;const{options:t,instance:n}=this;this.stopExpirationCheck(),n&&(null==(e=t.parentElement)?void 0:e.contains(n))&&(t.parentElement.removeChild(n),this.instance=void 0)}}}}),rs=Si({"src/ui/modals/base/AbstractOTPModal.ts"(){ko(),Qo=class extends to{get otpCode(){return this.data}set otpCode(e){this.data=e}updateOTPCode(e){this.otpCode=e,this.instance&&(this.instance.otpCode=e)}}}}),is=Si({"src/ui/modals/web/otp.ts"(){rs(),Xo=class extends Qo{mount(){}unmount(){}}}}),os={};Ei(os,{InstallModal:()=>Yo,OTPCodeModal:()=>Xo});var ss,as,cs=Si({"src/ui/modals/web/index.ts"(){ns(),is()}}),ls={};Ei(ls,{StoreAdapterWeb:()=>as});var us=Si({"src/store/adapters/web.ts"(){ko(),ss=class e extends Xi{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"-kv-store",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.stores[0];super(),this.storeName=n,this.platform="web";const r="".concat(e.DB_NAME).concat(t);this.dbPromise=new Promise((t,n)=>{try{const i=this.internal.open(r,1);i.onerror=()=>n(new Error("Failed to open IndexedDB.")),i.onsuccess=()=>t(i.result),i.onupgradeneeded=()=>{const t=i.result;for(const n of e.stores)t.objectStoreNames.contains(n)||t.createObjectStore(n)}}catch(i){n(i)}})}get internal(){if("undefined"===typeof window||!window.indexedDB)throw new Error("indexedDB is not available in this environment");return window.indexedDB}get(e){return Ti(this,null,function*(){const{storeName:t}=this,n=yield this.dbPromise;return new Promise((r,i)=>{try{const o=n.transaction(t,"readonly"),s=o.objectStore(t).get(e);s.onerror=()=>i(new Error("Failed to get value from IndexedDB.")),s.onsuccess=()=>{var e;return r(null!=(e=s.result)?e:null)}}catch(o){i(o)}})})}set(e,t){return Ti(this,null,function*(){const{storeName:n}=this,r=yield this.dbPromise;return new Promise((i,o)=>{try{const s=r.transaction(n,"readwrite"),a=s.objectStore(n).put(t,e);a.onerror=()=>o(new Error("Failed to set value in IndexedDB.")),a.onsuccess=()=>i()}catch(s){o(s)}})})}delete(e){return Ti(this,null,function*(){const{storeName:t}=this,n=yield this.dbPromise;return new Promise((r,i)=>{try{const o=n.transaction(t,"readwrite"),s=o.objectStore(t).delete(e);s.onerror=()=>i(new Error("Failed to delete value from IndexedDB.")),s.onsuccess=()=>r()}catch(o){i(o)}})})}},ss.stores=["sdk-kv-store","key-value-pairs"],ss.DB_NAME="mmconnect",as=ss}});Do();var ds=xo();null!=ds.Buffer||(ds.Buffer=vr.Buffer),ko();var hs="https://metamask.app.link/connect",fs="metamask://connect";ko(),go(),Di(),Gi(),io(),ko();var ps=1;var ms,gs,bs,ys,vs,ws,_s=class extends Error{},ks=class{constructor(e,t){this.config=e,this.sdkInfo=t}request(e){return Ti(this,null,function*(){const{request:t}=e,n=JSON.stringify({jsonrpc:"2.0",method:t.method,params:t.params,id:ps+=1}),r=this.getRpcEndpoint(e.scope),i=yield this.fetchWithTimeout(r,n,"POST",this.getHeaders(r),3e4);return yield this.parseResponse(i)})}getRpcEndpoint(e){var t,n,r;const i=(null!=(r=null==(n=null==(t=this.config)?void 0:t.api)?void 0:n.supportedNetworks)?r:{})[e];if(!i)throw new _s("No RPC endpoint found for scope ".concat(e));return i}fetchWithTimeout(e,t,n,r,i){return Ti(this,null,function*(){const o=new AbortController,s=setTimeout(()=>o.abort(),i);try{const i=yield Pr(e,{method:n,headers:r,body:t,signal:o.signal});if(clearTimeout(s),!i.ok)throw new ei(e,n,i.status);return i}catch(a){if(clearTimeout(s),a instanceof ei)throw a;if(a instanceof Error&&"AbortError"===a.name)throw new ii("Request timeout after ".concat(i,"ms"));throw new ii(a.message)}})}parseResponse(e){return Ti(this,null,function*(){try{return(yield e.json()).result}catch(t){throw new ni(t.message)}})}getHeaders(e){const t={Accept:"application/json","Content-Type":"application/json"};return e.includes("infura")?xi(ki({},t),{"Metamask-Sdk-Info":this.sdkInfo}):t}};ko(),Do(),go();var xs=class{constructor(e,t,n,r){this.transport=e,this.rpcClient=t,this.config=n,this.transportType=r,Ci(this,ms)}invokeMethod(e){return Ti(this,null,function*(){const{method:t}=e.request;return Fi.has(t)?this.handleWithRpcNode(e):zi.has(t)?this.handleWithSdkState(e):this.handleWithWallet(e)})}handleWithWallet(e){return Ti(this,null,function*(){return Mi(this,ms,gs).call(this,e,()=>Ti(this,null,function*(){const t=this.transport.request({method:"wallet_invokeMethod",params:e}),{ui:n,mobile:r}=this.config,{showInstallModal:i=!1}=null!=n?n:{};Yi()&&!i&&setTimeout(()=>Ti(this,null,function*(){const e=yield this.transport.getActiveSession();if(!e)throw new Error("No active session found");const t="".concat(fs,"/mwp?id=").concat(encodeURIComponent(e.id));(null==r?void 0:r.preferredOpenLink)?r.preferredOpenLink(t,"_self"):Ao(this.config,t,hs)}),10);const o=yield t;if(o.error){const{error:e}=o;throw new si("RPC Request failed with code ".concat(e.code,": ").concat(e.message),e.code,e.message)}return o.result}))})}handleWithRpcNode(e){return Ti(this,null,function*(){try{return yield this.rpcClient.request(e)}catch(t){if(t instanceof _s)return this.handleWithWallet(e);throw t}})}handleWithSdkState(e){return Ti(this,null,function*(){return console.warn('Method "'.concat(e.request.method,'" is configured for SDK state handling, but this is not yet implemented. Falling back to wallet passthrough.')),this.handleWithWallet(e)})}};ms=new WeakSet,gs=function(e,t){return Ti(this,null,function*(){var n;yield Mi(this,ms,bs).call(this,e);try{const n=yield t();return yield Mi(this,ms,ys).call(this,e),n}catch(r){if(ho(r)?yield Mi(this,ms,ws).call(this,e):yield Mi(this,ms,vs).call(this,e,r),r instanceof si)throw r;const t=r;throw new si(null!=(n=t.message)?n:"Unknown error",t.code)}})},bs=function(e){return Ti(this,null,function*(){const t=yield mo(this.config,this.config.storage,e,this.transportType);wr.z.track("mmconnect_wallet_action_requested",t)})},ys=function(e){return Ti(this,null,function*(){const t=yield mo(this.config,this.config.storage,e,this.transportType);wr.z.track("mmconnect_wallet_action_succeeded",t)})},vs=function(e,t){return Ti(this,null,function*(){const n=yield mo(this.config,this.config.storage,e,this.transportType,fo(t));wr.z.track("mmconnect_wallet_action_failed",n)})},ws=function(e){return Ti(this,null,function*(){const t=yield mo(this.config,this.config.storage,e,this.transportType);wr.z.track("mmconnect_wallet_action_rejected",t)})},Do();var Ss,Es,As,Ps,Cs,Is,Ms,Ts,Os,Ns,Bs,Rs,js,Ls,Fs,zs,Ds,Us,Ws,qs=class{constructor(){Ci(this,Ms),Ci(this,Ss,new Set),Ci(this,Es,Fr()),Ci(this,As,{timeout:6e4}),Ci(this,Ps,new Map),Ci(this,Cs),Ci(this,Is)}sendEip1193Message(e,t){return Ti(this,null,function*(){Mi(this,Ms,Rs).call(this);const n=String(wo()),r=ki({jsonrpc:"2.0",id:n},e);return new Promise((e,i)=>{var o;const s=setTimeout(()=>{Pi(this,Ps).delete(n),i(new Error("Request timeout"))},null!=(o=null==t?void 0:t.timeout)?o:Pi(this,As).timeout);Pi(this,Ps).set(n,{resolve:t=>{e(t)},reject:i,timeout:s}),window.postMessage({target:"metamask-contentscript",data:{name:"metamask-provider",data:r}},location.origin)})})}init(){return Ti(this,null,function*(){yield Mi(this,Ms,js).call(this);let e={sessionScopes:{}};try{e=(yield this.request({method:"wallet_getSession"},Pi(this,As))).result}catch(t){console.error("Failed to get wallet session during DefaultTransport init")}Mi(this,Ms,Ts).call(this,{method:"wallet_sessionChanged",params:e})})}connect(e){return Ti(this,null,function*(){var t,n,r,i,o;yield Mi(this,Ms,js).call(this);const s=yield this.request({method:"wallet_getSession"},Pi(this,As));if(s.error)throw new Error(s.error.message);let a=s.result;const c={optionalScopes:Mo(Po(null!=(t=null==e?void 0:e.scopes)?t:[]),Io(null!=(n=null==e?void 0:e.caipAccountIds)?n:[])),sessionProperties:null==e?void 0:e.sessionProperties};if(a&&e&&!e.forceRequest){if(!Co(Object.keys(null!=(r=null==a?void 0:a.sessionScopes)?r:{}),null!=(i=null==e?void 0:e.scopes)?i:[],a,null!=(o=null==e?void 0:e.caipAccountIds)?o:[])){const e=yield this.request({method:"wallet_createSession",params:c},Pi(this,As));if(e.error)throw new Error(e.error.message);a=e.result}}else if(!a||(null==e?void 0:e.forceRequest)){const e=yield this.request({method:"wallet_createSession",params:c},Pi(this,As));if(e.error)throw new Error(e.error.message);a=e.result}Mi(this,Ms,Ts).call(this,{method:"wallet_sessionChanged",params:a})})}disconnect(){return Ti(this,arguments,function(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return function*(){yield e.request({method:"wallet_revokeSession",params:{scopes:t}})}()})}isConnected(){return Pi(this,Es).isConnected()}request(e){return Ti(this,arguments,function(e){var t=this;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Pi(this,As);return function*(){return Pi(t,Es).request(e,n)}()})}onNotification(e){return Pi(this,Es).onNotification(e),Pi(this,Ss).add(e),()=>{Pi(this,Ss).delete(e)}}getActiveSession(){return Ti(this,null,function*(){throw new Error("getActiveSession is purposely not implemented for the DefaultTransport")})}getStoredPendingSessionRequest(){return Ti(this,null,function*(){throw new Error("getStoredPendingSessionRequest is purposely not implemented for the DefaultTransport")})}};Ss=new WeakMap,Es=new WeakMap,As=new WeakMap,Ps=new WeakMap,Cs=new WeakMap,Is=new WeakMap,Ms=new WeakSet,Ts=function(e){for(const n of Pi(this,Ss))try{n(e)}catch(t){console.log("[WindowPostMessageTransport] notifyCallbacks error:",t)}},Os=function(e){var t,n;return"metamask-provider"===(null==(n=null==(t=null==e?void 0:e.data)?void 0:t.data)?void 0:n.name)&&e.origin===location.origin},Ns=function(e){var t,n;if(!Mi(this,Ms,Os).call(this,e))return;const r=null==(n=null==(t=null==e?void 0:e.data)?void 0:t.data)?void 0:n.data;if(("object"!==typeof r||null===r||!("method"in r))&&"object"===typeof r&&null!==r&&"id"in r&&("result"in r||"error"in r)){const e=String(r.id),t=Pi(this,Ps).get(e);if(t){clearTimeout(t.timeout),Pi(this,Ps).delete(e);const n=r;if("error"in n&&n.error){const e=new Error(n.error.message||"Request failed");"number"===typeof n.error.code&&(e.code=n.error.code),t.reject(e)}else t.resolve(n)}}},Bs=function(e){var t,n;if(!Mi(this,Ms,Os).call(this,e))return;const r=null==(n=null==(t=null==e?void 0:e.data)?void 0:t.data)?void 0:n.data;"object"===typeof r&&null!==r&&"method"in r&&Mi(this,Ms,Ts).call(this,r)},Rs=function(){Pi(this,Cs)||(Ii(this,Cs,Mi(this,Ms,Ns).bind(this)),Ii(this,Is,Mi(this,Ms,Bs).bind(this)),window.addEventListener("message",Pi(this,Cs)),window.addEventListener("message",Pi(this,Is)))},js=function(){return Ti(this,null,function*(){Mi(this,Ms,Rs).call(this),Pi(this,Es).isConnected()||(yield Pi(this,Es).connect())})},Do();var Hs=class{constructor(e){this.metamaskConnectMultichain=e,Ci(this,Fs),Ci(this,Ls,new Set)}isTransportDefined(){try{return Boolean(this.metamaskConnectMultichain.transport)}catch(e){return!1}}isTransportConnected(){return this.isTransportDefined()&&this.metamaskConnectMultichain.transport.isConnected()}clearNotificationCallbacks(){Pi(this,Ls).clear()}notifyCallbacks(e){Pi(this,Ls).forEach(t=>{t(e)})}clearTransportNotificationListener(){var e;null==(e=this.notificationListener)||e.call(this),this.notificationListener=void 0}setupTransportNotificationListener(){this.isTransportDefined()&&!this.notificationListener&&(this.notificationListener=this.metamaskConnectMultichain.transport.onNotification(this.notifyCallbacks.bind(this)))}connect(){return Ti(this,null,function*(){return Promise.resolve()})}disconnect(){return Ti(this,null,function*(){return Promise.resolve()})}isConnected(){return!0}request(e){return Ti(this,arguments,function(e){var t=this;return function*(){const n=wo(),r=ki({id:n,jsonrpc:"2.0"},e);switch(r.method){case"wallet_createSession":return Mi(t,Fs,zs).call(t,r);case"wallet_getSession":return Mi(t,Fs,Ds).call(t,r);case"wallet_revokeSession":return Mi(t,Fs,Us).call(t,r);case"wallet_invokeMethod":return Mi(t,Fs,Ws).call(t,r);default:throw new Error("Unsupported method: ".concat(r.method))}}()})}onNotification(e){return this.setupTransportNotificationListener(),Pi(this,Ls).add(e),()=>{Pi(this,Ls).delete(e)}}};Ls=new WeakMap,Fs=new WeakSet,zs=function(e){return Ti(this,null,function*(){const t=e.params,n=Object.keys(ki(ki({},t.optionalScopes),t.requiredScopes)),r=[];n.forEach(e=>{var n,i,o,s;const a=null==(n=t.requiredScopes)?void 0:n[e],c=null==(i=t.optionalScopes)?void 0:i[e];a&&r.push(...null!=(o=a.accounts)?o:[]),c&&r.push(...null!=(s=c.accounts)?s:[])});const i=[...new Set(r)];return yield this.metamaskConnectMultichain.connect(n,i,t.sessionProperties),this.metamaskConnectMultichain.transport.request({method:"wallet_getSession"})})},Ds=function(e){return Ti(this,null,function*(){return this.isTransportConnected()?this.metamaskConnectMultichain.transport.request({method:"wallet_getSession"}):{jsonrpc:"2.0",id:e.id,result:{sessionScopes:{}}}})},Us=function(e){return Ti(this,null,function*(){var t;const n=e.params,r=null!=(t=null==n?void 0:n.scopes)?t:[];try{return yield this.metamaskConnectMultichain.disconnect(r),{jsonrpc:"2.0",id:e.id,result:!0}}catch(i){return{jsonrpc:"2.0",id:e.id,result:!1}}})},Ws=function(e){return Ti(this,null,function*(){if(!this.isTransportConnected())return{error:pr()};return{result:this.metamaskConnectMultichain.invokeMethod(e.params)}})},Do();var Ks,Vs,$s,Gs,Zs,Js,Ys,Qs,Xs,ea,ta,na,ra,ia,oa,sa,aa,ca,la,ua,da,ha,fa,pa,ma,ga,ba,ya,va,wa=li("metamask-sdk:core"),_a="__METAMASK_CONNECT_MULTICHAIN_SINGLETON__";Vs=new WeakMap,$s=new WeakMap,Gs=new WeakMap,Zs=new WeakMap,Js=new WeakMap,Ys=new WeakMap,Qs=new WeakMap,Xs=new WeakMap,ea=new WeakMap,ta=new WeakSet,na=function(){return Ti(this,null,function*(){var e,t;const n=Ji();if(!("in-app-browser"===n||"web-desktop"===n||"web-mobile"===n)&&!("react-native"===n))return;const r=Eo(this.options.dapp),i=yield this.storage.getAnonId();Ii(this,Xs,i);const{integrationType:o}=null!=(e=this.options.analytics)?e:{integrationType:""};wr.z.setGlobalProperty("mmconnect_versions",null!=(t=this.options.versions)?t:{}),wr.z.setGlobalProperty("dapp_id",r),wr.z.setGlobalProperty("anon_id",i),wr.z.setGlobalProperty("platform",n),o&&wr.z.setGlobalProperty("integration_types",[o]),wr.z.enable()})},ra=function(e){return Ti(this,null,function*(){var t,n,r;if("object"===typeof e&&null!==e&&"method"in e){if("wallet_sessionChanged"===e.method){const r=null!=(n=null==(t=e.params)?void 0:t.sessionScopes)?n:{},i=Object.keys(r).length>0;if("loaded"===this.status&&!i)return;this.status=i?"connected":"disconnected"}this.emit(e.method,null!=(r=e.params)?r:e.result)}})},ia=function(){return Ti(this,null,function*(){const e=yield this.storage.getTransport(),t=yield Qi();if(e){if("browser"===e){if(t){const e=new qs;return Ii(this,Gs,e),Ii(this,Ys,"browser"),Pi(this,$s).setupTransportNotificationListener(),Ii(this,Qs,e.onNotification(Mi(this,ta,ra).bind(this))),e}}else if("mwp"===e){const{adapter:e}=this.options.storage,t=yield Mi(this,ta,ca).call(this),{MWPTransport:n}=yield Promise.resolve().then(()=>(qo(),Wo)),r=new n(t,e);return Ii(this,Zs,t),Ii(this,Gs,r),Ii(this,Ys,"mwp"),Pi(this,$s).setupTransportNotificationListener(),Ii(this,Qs,r.onNotification(Mi(this,ta,ra).bind(this))),r}yield this.storage.removeTransport()}})},oa=function(){return Ti(this,null,function*(){var e;if(yield Mi(this,ta,ia).call(this))this.transport.isConnected()||(this.status="connecting",yield this.transport.connect()),this.status="connected","mwp"===Pi(this,Ys)?yield this.storage.setTransport("mwp"):yield this.storage.setTransport("browser");else{this.status="loaded";const n=yield Qi(),r=null==(e=this.options.ui.preferExtension)||e;if(n&&r){yield Mi(this,ta,ma).call(this,{persist:!1});try{yield this.transport.init()}catch(t){console.error("Passive init failed:",t)}}}})},sa=function(){const e={dapp:this.options.dapp,sdk:{version:"0.0.0",platform:Ji()}};return Pi(this,Xs)&&(e.analytics={remote_session_id:Pi(this,Xs)}),e},aa=function(){return Ti(this,null,function*(){try{yield Mi(this,ta,na).call(this),yield Mi(this,ta,oa).call(this)}catch(e){yield this.storage.removeTransport(),this.status="pending",wa("MetaMaskSDK error during initialization",e)}})},ca=function(){return Ti(this,null,function*(){const[e,{DappClient:t},{createKeyManager:r}]=yield Promise.all([n.e(921).then(n.t.bind(n,5921,19)),Promise.all([n.e(921),n.e(127)]).then(n.bind(n,7127)),Promise.resolve().then(()=>(Vo(),Ho))]),i=yield r(),{adapter:o}=this.options.storage,s=yield e.SessionStore.create(o),a="undefined"!==typeof window?WebSocket:(yield n.e(435).then(n.t.bind(n,9435,19))).WebSocket;return new t({transport:yield e.WebSocketTransport.create({url:"wss://mm-sdk-relay.api.cx.metamask.io/connection/websocket",kvstore:o,websocket:a}),sessionstore:s,keymanager:i})})},la=function(){return Ti(this,null,function*(){if("mwp"===Pi(this,Ys))return;const{adapter:e}=this.options.storage,t=yield Mi(this,ta,ca).call(this);Ii(this,Zs,t);const{MWPTransport:n}=yield Promise.resolve().then(()=>(qo(),Wo)),r=new n(t,e);Ii(this,Gs,r),Ii(this,Ys,"mwp"),Pi(this,$s).setupTransportNotificationListener(),Ii(this,Qs,this.transport.onNotification(Mi(this,ta,ra).bind(this))),yield this.storage.setTransport("mwp")})},ua=function(){return Ti(this,null,function*(){var e;(null==(e=this.options.ui.factory.modal)?void 0:e.isMounted)&&(yield this.storage.removeTransport())})},da=function(){const e=Mi(this,ta,ua).bind(this);return"undefined"!==typeof window&&"undefined"!==typeof window.addEventListener&&window.addEventListener("beforeunload",e),()=>{"undefined"!==typeof window&&"undefined"!==typeof window.removeEventListener&&window.removeEventListener("beforeunload",e)}},ha=function(e,t,r,i){return Ti(this,null,function*(){return new Promise((o,s)=>{this.options.ui.factory.renderInstallModal(e,()=>Ti(this,null,function*(){return"CONNECTED"!==this.dappClient.state&&"CONNECTING"!==this.dappClient.state||(yield this.dappClient.disconnect()),new Promise(e=>{this.dappClient.on("session_request",t=>{e({sessionRequest:t,metadata:Mi(this,ta,sa).call(this)})}),(()=>Ti(this,null,function*(){var e;try{yield this.transport.connect({scopes:t,caipAccountIds:r,sessionProperties:i}),yield this.options.ui.factory.unload(),null==(e=this.options.ui.factory.modal)||e.unmount(),this.status="connected",yield this.storage.setTransport("mwp")}catch(o){const{ProtocolError:e,ErrorCode:t}=yield n.e(921).then(n.t.bind(n,5921,19));if(o instanceof e)o.code!==t.REQUEST_EXPIRED&&(this.status="disconnected",yield this.options.ui.factory.unload(o),s(o));else{this.status="disconnected";const e=o instanceof Error?o:new Error(String(o));yield this.options.ui.factory.unload(e),s(e)}}}))().catch(()=>{})})}),e=>Ti(this,null,function*(){e?(yield this.storage.removeTransport(),s(e)):(yield this.storage.setTransport("mwp"),o())}),e=>{this.emit("display_uri",e)}).catch(e=>{s(e instanceof Error?e:new Error(String(e)))})})})},fa=function(e,t,n,r){return Ti(this,null,function*(){null!=Pi(this,Js)||Ii(this,Js,Mi(this,ta,da).call(this)),this.options.ui.headless?yield Mi(this,ta,pa).call(this,t,n,r):yield Mi(this,ta,ha).call(this,e,t,n,r)})},pa=function(e,t,r){return Ti(this,null,function*(){return new Promise((i,o)=>{"CONNECTED"!==this.dappClient.state&&"CONNECTING"!==this.dappClient.state||this.dappClient.disconnect().catch(()=>{}),this.dappClient.on("session_request",e=>{const t={sessionRequest:e,metadata:Mi(this,ta,sa).call(this)},n=this.options.ui.factory.createConnectionDeeplink(t);this.emit("display_uri",n)}),this.transport.connect({scopes:e,caipAccountIds:t,sessionProperties:r}).then(()=>Ti(this,null,function*(){this.status="connected",yield this.storage.setTransport("mwp"),i()})).catch(e=>Ti(this,null,function*(){const{ProtocolError:t}=yield n.e(921).then(n.t.bind(n,5921,19));e instanceof t?(this.status="disconnected",yield this.storage.removeTransport(),o(e)):(this.status="disconnected",yield this.storage.removeTransport(),o(e instanceof Error?e:new Error(String(e))))}))})})},ma=function(){return Ti(this,arguments,function(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{persist:!0};return function*(){if("browser"===Pi(e,Ys))return Pi(e,Gs);(null==t?void 0:t.persist)&&(yield e.storage.setTransport("browser"));const n=new qs;return Ii(e,Qs,n.onNotification(Mi(e,ta,ra).bind(e))),Ii(e,Gs,n),Ii(e,Ys,"browser"),Pi(e,$s).setupTransportNotificationListener(),n}()})},ga=function(e,t,n){return Ti(this,null,function*(){return new Promise((r,i)=>Ti(this,null,function*(){const o=e=>{var t;if("object"!==typeof e||null===e||!("data"in e))return;const n=e.data;"object"===typeof n&&null!==n&&(n.error&&(this.dappClient.off("message",o),i(n.error)),(null==(t=null==n?void 0:n.result)?void 0:t.sessionScopes)&&this.dappClient.off("message",o))};let s;return this.dappClient.on("message",o),this.transport.isConnected()?s=setTimeout(()=>{this.openSimpleDeeplinkIfNeeded()},250):this.dappClient.once("session_request",e=>{var t;const n={sessionRequest:e,metadata:Mi(this,ta,sa).call(this)},r=this.options.ui.factory.createConnectionDeeplink(n),i=this.options.ui.factory.createConnectionUniversalLink(n);this.emit("display_uri",r),(null==(t=this.options.mobile)?void 0:t.preferredOpenLink)?this.options.mobile.preferredOpenLink(r,"_self"):Ao(this.options,r,i)}),this.transport.connect({scopes:e,caipAccountIds:t,sessionProperties:n}).then(r).catch(e=>Ti(this,null,function*(){yield this.storage.removeTransport(),this.dappClient.off("message",o),i(e instanceof Error?e:new Error(String(e)))})).finally(()=>{s&&clearTimeout(s)})}))})},ba=function(e,t,n){return Ti(this,null,function*(){return this.status="connecting",e.then(()=>Ti(this,null,function*(){this.status="connected";try{const e=yield po(this.options,this.storage);wr.z.track("mmconnect_connection_established",xi(ki({},e),{transport_type:n,user_permissioned_chains:t}))}catch(e){wa("Error tracking connection_established event",e)}})).catch(e=>Ti(this,null,function*(){this.status="disconnected";try{const t=yield po(this.options,this.storage);ho(e)?wr.z.track("mmconnect_connection_rejected",xi(ki({},t),{transport_type:n})):wr.z.track("mmconnect_connection_failed",ki(xi(ki({},t),{transport_type:n}),fo(e)))}catch(t){wa("Error tracking connection failed/rejected event",e)}throw e}))})},ya=function(){return Ti(this,null,function*(){var e;let t={sessionScopes:{},sessionProperties:{}};if(null==(e=Pi(this,Gs))?void 0:e.isConnected())try{const e=yield this.transport.request({method:"wallet_getSession"});e.result&&(t=e.result)}catch(n){}return t})},va=function(){return Ti(this,null,function*(){var e,t;const{ui:n}=this.options,{showInstallModal:r=!1}=null!=n?n:{};if(!(Yi()&&!r))return;const i=yield null==(e=Pi(this,Gs))?void 0:e.getStoredPendingSessionRequest();if(!i)return;const o={sessionRequest:i,metadata:Mi(this,ta,sa).call(this)},s=this.options.ui.factory.createConnectionDeeplink(o),a=this.options.ui.factory.createConnectionUniversalLink(o);(null==(t=this.options.mobile)?void 0:t.preferredOpenLink)?this.options.mobile.preferredOpenLink(s,"_self"):Ao(this.options,s,a)})};var ka=class e extends Hi{constructor(e){var t,n,r,i,o,s;const a=function(e){var t,n;const r=Ji(),i="web-desktop"===r||"web-mobile"===r||"in-app-browser"===r;if(!(null==(t=e.dapp)?void 0:t.name))throw new Error("You must provide dapp name");if(i&&(e.dapp=xi(ki({},e.dapp),{url:"".concat(window.location.protocol,"//").concat(window.location.host)})),!(null==(n=e.dapp)?void 0:n.url))throw new Error("You must provide dapp url");if("react-native"===r&&e.dapp.url){const t=function(e){var t;if(/^https?:\/\//.test(e))return;const n=e.match(/^((?:[\0-9;-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*):\/\//),r=((null!=(t=null==n?void 0:n[1])?t:e).toLowerCase().replace(/(?:[\0-,\.\/:-`\{-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,"-").replace(/^-+|-+$/g,"")||"unknown").slice(0,63).replace(/-+$/,"");return{url:"https://".concat(r,".rn.dapp.local"),nativeScheme:e}}(e.dapp.url);t&&(console.info('Normalizing dapp URL for React Native: "'.concat(e.dapp.url,'" -> "').concat(t.url,'"')),e.dapp=xi(ki({},e.dapp),{url:t.url,nativeScheme:t.nativeScheme}))}const o=/^(http|https):\/\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*$/;if(e.dapp){"iconUrl"in e.dapp&&e.dapp.iconUrl&&!o.test(e.dapp.iconUrl)&&(console.warn("Invalid dappMetadata.iconUrl: URL must start with http:// or https://"),e.dapp.iconUrl=void 0),"base64Icon"in e.dapp&&e.dapp.base64Icon&&e.dapp.base64Icon.length>163400&&(console.warn("Invalid dappMetadata.base64Icon: Base64-encoded icon string length must be less than 163400 characters"),e.dapp.base64Icon=void 0),e.dapp.url&&!o.test(e.dapp.url)&&console.warn("Invalid dappMetadata.url: URL must start with http:// or https://");const t=bo();if(t&&!("iconUrl"in e.dapp)&&!("base64Icon"in e.dapp)){const n="".concat(window.location.protocol,"//").concat(window.location.host).concat(t);e.dapp.iconUrl=n}}return e}(e),c=(null==(t=e.analytics)?void 0:t.integrationType)||"direct";super(xi(ki({},a),{ui:xi(ki({},a.ui),{preferExtension:null==(n=a.ui.preferExtension)||n,showInstallModal:null!=(r=a.ui.showInstallModal)&&r,headless:null!=(i=a.ui.headless)&&i}),analytics:xi(ki({},null!=(o=e.analytics)?o:{}),{integrationType:c}),versions:ki({"connect-multichain":"0.14.0"},null!=(s=e.versions)?s:{})})),Ci(this,ta),Ci(this,Vs),Ci(this,$s),Ci(this,Gs),Ci(this,Zs),Ci(this,Js),Ci(this,Ys),this._status="pending",Ci(this,Qs),Ci(this,Xs),Ci(this,ea,"Sdk/Javascript SdkVersion/".concat("0.0.0"," Platform/").concat(Ji()," dApp/").concat(null!=(Ks=this.options.dapp.url)?Ks:this.options.dapp.name," dAppTitle/").concat(this.options.dapp.name)),Ii(this,$s,new Hs(this)),Ii(this,Vs,Er({transport:Pi(this,$s)}))}get status(){return this._status}set status(e){this._status!==e&&(this._status=e,this.emit("stateChanged",e))}get provider(){return Pi(this,Vs)}get transport(){if(!Pi(this,Gs))throw new Error("Transport not initialized, establish connection first");return Pi(this,Gs)}get dappClient(){if(!Pi(this,Zs))throw new Error("DappClient not initialized, establish connection first");return Pi(this,Zs)}get transportType(){var e;return null!=(e=Pi(this,Ys))?e:"unknown"}get storage(){return this.options.storage}static create(t){return Ti(this,null,function*(){var n,r;const i=xo(),o=i[_a];if(o){const e=yield o;return e.mergeOptions(t),wr.z.setGlobalProperty("mmconnect_versions",null!=(n=e.options.versions)?n:{}),(null==(r=t.analytics)?void 0:r.integrationType)&&wr.z.setGlobalProperty("integration_types",[t.analytics.integrationType]),t.debug&&ui("metamask-sdk:*"),e}const s=Ti(null,null,function*(){var n;const r=new e(t);return(yield di("metamask-sdk:core",r.options.storage))&&ui("metamask-sdk:core"),yield Mi(n=r,ta,aa).call(n),r});return i[_a]=s,s.catch(e=>{i[_a]=void 0,console.error("Error initializing MetaMaskConnectMultichain",e)}),s})}connect(e,t,n,r){return Ti(this,null,function*(){var i;if("connecting"===this.status&&"mwp"===Pi(this,Ys))throw yield Mi(this,ta,va).call(this),new Error("Existing connection is pending. Please check your MetaMask Mobile app to continue.");const{ui:o}=this.options,s=Ji(),a="in-app-browser"===s||"web-desktop"===s,{preferExtension:c=!0,showInstallModal:l=!1}=o,u=Yi(),d=yield Qi();let h;h="in-app-browser"===s||a&&d&&c?"browser":"mwp";try{const t=yield po(this.options,this.storage),n=Object.keys(this.options.api.supportedNetworks);wr.z.track("mmconnect_connection_initiated",xi(ki({},t),{transport_type:h,dapp_configured_chains:n,dapp_requested_chains:e}))}catch(v){wa("Error tracking connection_initiated event",v)}const f=yield Mi(this,ta,ya).call(this),{mergedScopes:p,mergedCaipAccountIds:m,mergedSessionProperties:g}=function(e,t,n,r){const i=Object.keys(e.sessionScopes),o=[];return Object.values(e.sessionScopes).forEach(e=>{(null==e?void 0:e.accounts)&&Array.isArray(e.accounts)&&e.accounts.forEach(e=>{o.push(e)})}),{mergedScopes:Array.from(new Set([...i,...t])),mergedCaipAccountIds:Array.from(new Set([...o,...n])),mergedSessionProperties:ki(ki({},e.sessionProperties),r)}}(f,e,t,n),b=Object.keys(null!=g?g:{}).length>0?g:void 0;if((null==(i=Pi(this,Gs))?void 0:i.isConnected())&&!u)return Mi(this,ta,ba).call(this,Pi(this,Gs).connect({scopes:p,caipAccountIds:m,sessionProperties:b,forceRequest:r}).then(()=>Ti(this,null,function*(){return"mwp"===Pi(this,Ys)?this.storage.setTransport("mwp"):this.storage.setTransport("browser")})),e,h);if("in-app-browser"===s){const t=yield Mi(this,ta,ma).call(this);return Mi(this,ta,ba).call(this,t.connect({scopes:p,caipAccountIds:m,sessionProperties:b,forceRequest:r}),e,h)}if(a&&d&&c){const t=yield Mi(this,ta,ma).call(this);return Mi(this,ta,ba).call(this,t.connect({scopes:p,caipAccountIds:m,sessionProperties:b,forceRequest:r}),e,h)}yield Mi(this,ta,la).call(this);const y=d?l:!c||l;return u&&!y?Mi(this,ta,ba).call(this,Mi(this,ta,ga).call(this,p,m,b),e,h):Mi(this,ta,ba).call(this,Mi(this,ta,fa).call(this,y,p,m,b),e,h)})}emit(e,t){var n,r;null==(r=null==(n=this.options.transport)?void 0:n.onNotification)||r.call(n,{method:e,params:t}),super.emit(e,t)}disconnect(){return Ti(this,arguments,function(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return function*(){var n,r,i;const o=yield Mi(e,ta,ya).call(e),s=0===t.length?[]:Object.keys(o.sessionScopes).filter(e=>!t.includes(e));yield null==(n=Pi(e,Gs))?void 0:n.disconnect(t),0===s.length&&(yield e.storage.removeTransport(),"browser"!==Pi(e,Ys)&&(yield null==(r=Pi(e,Qs))?void 0:r.call(e),null==(i=Pi(e,Js))||i.call(e),Ii(e,Qs,void 0),Ii(e,Js,void 0),Ii(e,Gs,void 0),Ii(e,Ys,void 0),Pi(e,$s).clearTransportNotificationListener(),Ii(e,Zs,void 0)),e.status="disconnected")}()})}invokeMethod(e){return Ti(this,null,function*(){var t;const{transport:n,options:r}=this,i=new ks(r,Pi(this,ea));return new xs(n,i,r,null!=(t=Pi(this,Ys))?t:"unknown").invokeMethod(e)})}openSimpleDeeplinkIfNeeded(){const{ui:e,mobile:t}=this.options,{showInstallModal:n=!1}=null!=e?e:{};Yi()&&!n&&setTimeout(()=>Ti(this,null,function*(){const e=yield this.transport.getActiveSession();if(!e)throw new Error("No active session found");const n="".concat(fs,"/mwp?id=").concat(encodeURIComponent(e.id));(null==t?void 0:t.preferredOpenLink)?t.preferredOpenLink(n,"_self"):Ao(this.options,n,hs)}),10)}emitSessionChanged(){return Ti(this,null,function*(){var e,t;const n={sessionScopes:{}};if(!(null==(e=Pi(this,Gs))?void 0:e.isConnected()))return void this.emit("wallet_sessionChanged",n);const r=yield this.transport.request({method:"wallet_getSession"});this.emit("wallet_sessionChanged",null!=(t=r.result)?t:n)})}};Oi();var xa=class e extends Qr{constructor(t,n,r){super("StorageErr".concat(e.code,": ").concat(t," storage get error in key: ").concat(n," - ").concat(r),e.code),this.platform=t,this.key=n,this.reason=r}};xa.code=60;var Sa=xa,Ea=class e extends Qr{constructor(t,n,r){super("StorageErr".concat(e.code,": ").concat(t," storage set error in key: ").concat(n," - ").concat(r),e.code),this.platform=t,this.key=n,this.reason=r}};Ea.code=61;var Aa=Ea,Pa=class e extends Qr{constructor(t,n,r){super("StorageErr".concat(e.code,": ").concat(t," storage delete error in key: ").concat(n," - ").concat(r),e.code),this.platform=t,this.key=n,this.reason=r}};Pa.code=62;var Ca=Pa;Gi(),so();var Ia=class extends eo{constructor(e){super(),this.adapter=e}getTransport(){return Ti(this,null,function*(){try{const e=yield this.adapter.get("multichain-transport");return e?function(e){switch(e){case"browser":return"browser";case"mwp":return"mwp";default:return"unknown"}}(e):null}catch(Pe){throw new Sa(this.adapter.platform,"multichain-transport",Pe.message)}})}setTransport(e){return Ti(this,null,function*(){try{yield this.adapter.set("multichain-transport",e)}catch(Pe){throw new Aa(this.adapter.platform,"multichain-transport",Pe.message)}})}removeTransport(){return Ti(this,null,function*(){try{yield this.adapter.delete("multichain-transport")}catch(Pe){throw new Ca(this.adapter.platform,"multichain-transport",Pe.message)}})}getAnonId(){return Ti(this,null,function*(){try{const e=yield this.adapter.get("anonId");if(e)return e;const t=zr.A();return yield this.adapter.set("anonId",t),t}catch(Pe){throw new Sa(this.adapter.platform,"anonId",Pe.message)}})}getExtensionId(){return Ti(this,null,function*(){try{return yield this.adapter.get("extensionId")}catch(Pe){throw new Sa(this.adapter.platform,"extensionId",Pe.message)}})}setAnonId(e){return Ti(this,null,function*(){try{return yield this.adapter.set("anonId",e)}catch(Pe){throw new Aa(this.adapter.platform,"anonId",Pe.message)}})}setExtensionId(e){return Ti(this,null,function*(){try{return yield this.adapter.set("extensionId",e)}catch(Pe){throw new Aa(this.adapter.platform,"extensionId",Pe.message)}})}removeExtensionId(){return Ti(this,null,function*(){try{return yield this.adapter.delete("extensionId")}catch(Pe){throw new Ca(this.adapter.platform,"extensionId",Pe.message)}})}removeAnonId(){return Ti(this,null,function*(){try{return yield this.adapter.delete("anonId")}catch(Pe){throw new Ca(this.adapter.platform,"anonId",Pe.message)}})}getDebug(){return Ti(this,null,function*(){try{return yield this.adapter.get("DEBUG")}catch(Pe){throw new Sa(this.adapter.platform,"DEBUG",Pe.message)}})}};ko(),Do();var Ma=class{constructor(e){this.options=e,this.platform=Ji(),this.validateModals()}validateModals(){const e=["InstallModal","OTPCodeModal"].filter(e=>!this.options[e]);if(e.length>0)throw new Error("Missing required modals: ".concat(e.join(", ")))}unload(e){return Ti(this,null,function*(){var t,n;null==(t=this.modal)||t.unmount(),yield null==(n=this.successCallback)?void 0:n.call(this,e)})}get isMobile(){return"react-native"===this.platform}get isNode(){return"nodejs"===this.platform}get isWeb(){return"web-desktop"===this.platform||"in-app-browser"===this.platform||"web-mobile"===this.platform}getContainer(){return"undefined"===typeof document?void 0:document.createElement("div")}getMountedContainer(){if("undefined"===typeof document)return;const e=this.getContainer();return e&&document.body.appendChild(e),e}createConnectionDeeplink(e){if(!e)throw new Error("createConnectionDeeplink can only be called with a connection request");const t=So(JSON.stringify(e)),n=encodeURIComponent(t);return"".concat(fs,"/mwp?p=").concat(n,"&c=1")}createConnectionUniversalLink(e){if(!e)return"".concat(hs);const t=So(JSON.stringify(e)),n=encodeURIComponent(t);return"".concat(hs,"/mwp?p=").concat(n,"&c=1")}onCloseModal(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return Ti(this,null,function*(){return this.unload(e?new Error("User closed modal"):void 0)})}onStartDesktopOnboarding(){(new Yr).startOnboarding()}renderInstallModal(e,t,n,r){return Ti(this,null,function*(){var i,o;null==(i=this.modal)||i.unmount(),yield this.preload(),this.successCallback=n,this.displayUriCallback=r;const s=this.getMountedContainer(),a=yield t(),c=this.createConnectionDeeplink(a);null==(o=this.displayUriCallback)||o.call(this,c);const l=new this.options.InstallModal({expiresIn:(a.sessionRequest.expiresAt-Date.now())/1e3,connectionRequest:a,parentElement:s,showInstallModal:e,link:c,generateQRCode:e=>Ti(this,null,function*(){var t;const n=this.createConnectionDeeplink(e);return null==(t=this.displayUriCallback)||t.call(this,n),n}),onClose:this.onCloseModal.bind(this),startDesktopOnboarding:this.onStartDesktopOnboarding.bind(this),createConnectionRequest:t,onDisplayUri:this.displayUriCallback});this.modal=l,l.mount()})}renderOTPCodeModal(e,t,n){return Ti(this,null,function*(){var r;null==(r=this.modal)||r.unmount(),yield this.preload(),this.successCallback=t;const i=this.getMountedContainer(),o=yield e(),s=new this.options.OTPCodeModal({parentElement:i,otpCode:o,onClose:this.onCloseModal.bind(this),createOTPCode:e,updateOTPCode:e=>n(e,s)});this.modal=s,s.mount()})}};var Ta=class extends Ma{preload(){return Ti(this,null,function*(){return function(){return Ti(this,null,function*(){if("undefined"!==typeof document)try{const{defineCustomElements:e}=yield n.e(817).then(n.bind(n,3817));yield e()}catch(e){console.error("Failed to load customElements:",e)}})}()})}};ko();var Oa=e=>Ti(null,null,function*(){e.debug&&ui("metamask-sdk:*");const t=yield Promise.resolve().then(()=>(cs(),os));let n;if(e.storage)n=e.storage;else{const{StoreAdapterWeb:e}=yield Promise.resolve().then(()=>(us(),ls)),t=new e;n=new Ia(t)}const r=new Ta(t);return ka.create(xi(ki({},e),{storage:n,ui:xi(ki({},e.ui),{factory:r})}))})},812:(e,t,n)=>{"use strict";e.exports=n(7950)},882:(e,t,n)=>{"use strict";var r;n.d(t,{v4:()=>d});var i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const a=function(e){return"string"===typeof e&&s.test(e)};for(var c=[],l=0;l<256;++l)c.push((l+256).toString(16).substr(1));const u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase();if(!a(n))throw TypeError("Stringified UUID is invalid");return n};const d=function(e,t,n){var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return u(r)}},929:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SHA224:()=>m,SHA256:()=>p,SHA384:()=>k,SHA512:()=>_,SHA512_224:()=>E,SHA512_256:()=>A,sha224:()=>C,sha256:()=>P,sha384:()=>M,sha512:()=>I,sha512_224:()=>O,sha512_256:()=>T});var r=n(2766);function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}class s extends r.Vw{constructor(e,t,n,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=(0,r.O8)(this.buffer)}update(e){(0,r.CC)(this),e=(0,r.ZJ)(e),(0,r.DO)(e);const{view:t,buffer:n,blockLen:i}=this,o=e.length;for(let s=0;s<o;){const a=Math.min(i-this.pos,o-s);if(a===i){const t=(0,r.O8)(e);for(;i<=o-s;s+=i)this.process(t,s);continue}n.set(e.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.CC)(this),(0,r.Ht)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:i,isLE:o}=this;let{pos:s}=this;t[s++]=128,(0,r.uH)(this.buffer.subarray(s)),this.padOffset>i-s&&(this.process(n,0),s=0);for(let r=s;r<i;r++)t[r]=0;!function(e,t,n,r){if("function"===typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),o=BigInt(4294967295),s=Number(n>>i&o),a=Number(n&o),c=r?4:0,l=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+l,a,r)}(n,i-8,BigInt(8*this.length),o),this.process(n,0);const a=(0,r.O8)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let r=0;r<l;r++)a.setUint32(4*r,u[r],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:o,pos:s}=this;return e.destroyed=o,e.finished=i,e.length=r,e.pos=s,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const a=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),l=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),u=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);var d=n(4543);const h=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),f=new Uint32Array(64);class p extends s{constructor(){super(64,arguments.length>0&&void 0!==arguments[0]?arguments[0]:32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:o,G:s,H:a}=this;return[e,t,n,r,i,o,s,a]}set(e,t,n,r,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)f[r]=e.getUint32(t,!1);for(let i=16;i<64;i++){const e=f[i-15],t=f[i-2],n=(0,r.Ow)(e,7)^(0,r.Ow)(e,18)^e>>>3,o=(0,r.Ow)(t,17)^(0,r.Ow)(t,19)^t>>>10;f[i]=o+f[i-7]+n+f[i-16]|0}let{A:n,B:s,C:a,D:c,E:l,F:u,G:d,H:p}=this;for(let m=0;m<64;m++){const e=p+((0,r.Ow)(l,6)^(0,r.Ow)(l,11)^(0,r.Ow)(l,25))+i(l,u,d)+h[m]+f[m]|0,t=((0,r.Ow)(n,2)^(0,r.Ow)(n,13)^(0,r.Ow)(n,22))+o(n,s,a)|0;p=d,d=u,u=l,l=c+e|0,c=a,a=s,s=n,n=e+t|0}n=n+this.A|0,s=s+this.B|0,a=a+this.C|0,c=c+this.D|0,l=l+this.E|0,u=u+this.F|0,d=d+this.G|0,p=p+this.H|0,this.set(n,s,a,c,l,u,d,p)}roundClean(){(0,r.uH)(f)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,r.uH)(this.buffer)}}class m extends p{constructor(){super(28),this.A=0|c[0],this.B=0|c[1],this.C=0|c[2],this.D=0|c[3],this.E=0|c[4],this.F=0|c[5],this.G=0|c[6],this.H=0|c[7]}}const g=(()=>d.lD(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))))(),b=(()=>g[0])(),y=(()=>g[1])(),v=new Uint32Array(80),w=new Uint32Array(80);class _ extends s{constructor(){super(128,arguments.length>0&&void 0!==arguments[0]?arguments[0]:64,16,!1),this.Ah=0|u[0],this.Al=0|u[1],this.Bh=0|u[2],this.Bl=0|u[3],this.Ch=0|u[4],this.Cl=0|u[5],this.Dh=0|u[6],this.Dl=0|u[7],this.Eh=0|u[8],this.El=0|u[9],this.Fh=0|u[10],this.Fl=0|u[11],this.Gh=0|u[12],this.Gl=0|u[13],this.Hh=0|u[14],this.Hl=0|u[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:o,Dh:s,Dl:a,Eh:c,El:l,Fh:u,Fl:d,Gh:h,Gl:f,Hh:p,Hl:m}=this;return[e,t,n,r,i,o,s,a,c,l,u,d,h,f,p,m]}set(e,t,n,r,i,o,s,a,c,l,u,d,h,f,p,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|c,this.El=0|l,this.Fh=0|u,this.Fl=0|d,this.Gh=0|h,this.Gl=0|f,this.Hh=0|p,this.Hl=0|m}process(e,t){for(let d=0;d<16;d++,t+=4)v[d]=e.getUint32(t),w[d]=e.getUint32(t+=4);for(let b=16;b<80;b++){const e=0|v[b-15],t=0|w[b-15],n=d.rE(e,t,1)^d.rE(e,t,8)^d.xn(e,t,7),r=d.ry(e,t,1)^d.ry(e,t,8)^d.jm(e,t,7),i=0|v[b-2],o=0|w[b-2],s=d.rE(i,o,19)^d.qh(i,o,61)^d.xn(i,o,6),a=d.ry(i,o,19)^d.Ei(i,o,61)^d.jm(i,o,6),c=d.CW(r,a,w[b-7],w[b-16]),l=d.CQ(c,n,s,v[b-7],v[b-16]);v[b]=0|l,w[b]=0|c}let{Ah:n,Al:r,Bh:i,Bl:o,Ch:s,Cl:a,Dh:c,Dl:l,Eh:u,El:h,Fh:f,Fl:p,Gh:m,Gl:g,Hh:_,Hl:k}=this;for(let x=0;x<80;x++){const e=d.rE(u,h,14)^d.rE(u,h,18)^d.qh(u,h,41),t=d.ry(u,h,14)^d.ry(u,h,18)^d.Ei(u,h,41),S=u&f^~u&m,E=h&p^~h&g,A=d.F8(k,t,E,y[x],w[x]),P=d.TH(A,_,e,S,b[x],v[x]),C=0|A,I=d.rE(n,r,28)^d.qh(n,r,34)^d.qh(n,r,39),M=d.ry(n,r,28)^d.Ei(n,r,34)^d.Ei(n,r,39),T=n&i^n&s^i&s,O=r&o^r&a^o&a;_=0|m,k=0|g,m=0|f,g=0|p,f=0|u,p=0|h,({h:u,l:h}=d.WQ(0|c,0|l,0|P,0|C)),c=0|s,l=0|a,s=0|i,a=0|o,i=0|n,o=0|r;const N=d.Vl(C,M,O);n=d.Vr(N,P,I,T),r=0|N}({h:n,l:r}=d.WQ(0|this.Ah,0|this.Al,0|n,0|r)),({h:i,l:o}=d.WQ(0|this.Bh,0|this.Bl,0|i,0|o)),({h:s,l:a}=d.WQ(0|this.Ch,0|this.Cl,0|s,0|a)),({h:c,l:l}=d.WQ(0|this.Dh,0|this.Dl,0|c,0|l)),({h:u,l:h}=d.WQ(0|this.Eh,0|this.El,0|u,0|h)),({h:f,l:p}=d.WQ(0|this.Fh,0|this.Fl,0|f,0|p)),({h:m,l:g}=d.WQ(0|this.Gh,0|this.Gl,0|m,0|g)),({h:_,l:k}=d.WQ(0|this.Hh,0|this.Hl,0|_,0|k)),this.set(n,r,i,o,s,a,c,l,u,h,f,p,m,g,_,k)}roundClean(){(0,r.uH)(v,w)}destroy(){(0,r.uH)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class k extends _{constructor(){super(48),this.Ah=0|l[0],this.Al=0|l[1],this.Bh=0|l[2],this.Bl=0|l[3],this.Ch=0|l[4],this.Cl=0|l[5],this.Dh=0|l[6],this.Dl=0|l[7],this.Eh=0|l[8],this.El=0|l[9],this.Fh=0|l[10],this.Fl=0|l[11],this.Gh=0|l[12],this.Gl=0|l[13],this.Hh=0|l[14],this.Hl=0|l[15]}}const x=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),S=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class E extends _{constructor(){super(28),this.Ah=0|x[0],this.Al=0|x[1],this.Bh=0|x[2],this.Bl=0|x[3],this.Ch=0|x[4],this.Cl=0|x[5],this.Dh=0|x[6],this.Dl=0|x[7],this.Eh=0|x[8],this.El=0|x[9],this.Fh=0|x[10],this.Fl=0|x[11],this.Gh=0|x[12],this.Gl=0|x[13],this.Hh=0|x[14],this.Hl=0|x[15]}}class A extends _{constructor(){super(32),this.Ah=0|S[0],this.Al=0|S[1],this.Bh=0|S[2],this.Bl=0|S[3],this.Ch=0|S[4],this.Cl=0|S[5],this.Dh=0|S[6],this.Dl=0|S[7],this.Eh=0|S[8],this.El=0|S[9],this.Fh=0|S[10],this.Fl=0|S[11],this.Gh=0|S[12],this.Gl=0|S[13],this.Hh=0|S[14],this.Hl=0|S[15]}}const P=(0,r.qj)(()=>new p),C=(0,r.qj)(()=>new m),I=(0,r.qj)(()=>new _),M=(0,r.qj)(()=>new k),T=(0,r.qj)(()=>new A),O=(0,r.qj)(()=>new E)},948:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,o,s=null;function a(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];if(!a.enabled)return;const o=a,s=Number(new Date),c=s-(n||s);o.diff=c,o.prev=n,o.curr=s,n=s,r[0]=t.coerce(r[0]),"string"!==typeof r[0]&&r.unshift("%O");let l=0;r[0]=r[0].replace(/%([a-zA-Z%])/g,(e,n)=>{if("%%"===e)return"%";l++;const i=t.formatters[n];if("function"===typeof i){const t=r[l];e=i.call(o,t),r.splice(l,1),l--}return e}),t.formatArgs.call(o,r);(o.log||t.log).apply(o,r)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"===typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+("undefined"===typeof n?":":n)+e);return r.log=this.log,r}function i(e,t){let n=0,r=0,i=-1,o=0;for(;n<e.length;)if(r<t.length&&(t[r]===e[n]||"*"===t[r]))"*"===t[r]?(i=r,o=n,r++):(n++,r++);else{if(-1===i)return!1;r=i+1,o++,n=o}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names,...t.skips.map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"===typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const r of n)"-"===r[0]?t.skips.push(r.slice(1)):t.names.push(r)},t.enabled=function(e){for(const n of t.skips)if(i(e,n))return!1;for(const n of t.names)if(i(e,n))return!0;return!1},t.humanize=n(9405),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach(n=>{t[n]=e[n]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},1025:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletContext=void 0,t.useWallet=function(){return(0,r.useContext)(t.WalletContext)};const r=n(2176),i=[],o={autoConnect:!1,connecting:!1,connected:!1,disconnecting:!1,select(){s("call","select")},connect:()=>Promise.reject(s("call","connect")),disconnect:()=>Promise.reject(s("call","disconnect")),sendTransaction:()=>Promise.reject(s("call","sendTransaction")),signTransaction:()=>Promise.reject(s("call","signTransaction")),signAllTransactions:()=>Promise.reject(s("call","signAllTransactions")),signMessage:()=>Promise.reject(s("call","signMessage")),signIn:()=>Promise.reject(s("call","signIn"))};function s(e,t){const n=new Error("You have tried to ".concat(e,' "').concat(t,'" on a WalletContext without providing one. ')+"Make sure to render a WalletProvider as an ancestor of the component that uses WalletContext.");return console.error(n),n}Object.defineProperty(o,"wallets",{get:()=>(s("read","wallets"),i)}),Object.defineProperty(o,"wallet",{get:()=>(s("read","wallet"),null)}),Object.defineProperty(o,"publicKey",{get:()=>(s("read","publicKey"),null)}),t.WalletContext=(0,r.createContext)(o)},1030:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWalletAdapterCompatibleStandardWallet=function(e){return i.StandardConnect in e.features&&i.StandardEvents in e.features&&(r.SolanaSignAndSendTransaction in e.features||r.SolanaSignTransaction in e.features)};const r=n(6345),i=n(9210)},1099:(e,t,n)=>{"use strict";n.d(t,{Gv:()=>i,RF:()=>c,eF:()=>l,jT:()=>s,yy:()=>o});var r=n(9740);function i(e){return"object"===typeof e&&null!==e}function o(e){return"symbol"===typeof e?e.toString():"string"===typeof e?JSON.stringify(e):"".concat(e)}function s(e){const{done:t,value:n}=e.next();return t?void 0:n}function a(e,t,n,i){if(!0===e)return;!1===e?e={}:"string"===typeof e&&(e={message:e});const{path:s,branch:a}=t,{type:c}=n,{refinement:l,message:u="Expected a value of type `".concat(c,"`").concat(l?" with refinement `".concat(l,"`"):"",", but received: `").concat(o(i),"`")}=e;return(0,r.A)((0,r.A)({value:i,type:c,refinement:l,key:s[s.length-1],path:s,branch:a},e),{},{message:u})}function*c(e,t,n,r){(function(e){return i(e)&&"function"===typeof e[Symbol.iterator]})(e)||(e=[e]);for(const i of e){const e=a(i,t,n,r);e&&(yield e)}}function l(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){const{path:r=[],branch:o=[e],coerce:s=!1,mask:a=!1}=n,c={path:r,branch:o};if(s&&(e=t.coercer(e,c),a&&"type"!==t.type&&i(t.schema)&&i(e)&&!Array.isArray(e)))for(const n in e)void 0===t.schema[n]&&delete e[n];let u="valid";for(const i of t.validator(e,c))i.explanation=n.message,u="not_valid",yield[i,void 0];for(let[d,h,f]of t.entries(e,c)){const t=l(h,f,{path:void 0===d?r:[...r,d],branch:void 0===d?o:[...o,h],coerce:s,mask:a,message:n.message});for(const n of t)n[0]?(u=null===n[0].refinement||void 0===n[0].refinement?"not_valid":"not_refined",yield[n[0],void 0]):s&&(h=n[1],void 0===d?e=h:e instanceof Map?e.set(d,h):e instanceof Set?e.add(h):i(e)&&(void 0!==h||d in e)&&(e[d]=h))}if("not_valid"!==u)for(const i of t.refiner(e,c))i.explanation=n.message,u="not_refined",yield[i,void 0];"valid"===u&&(yield[void 0,e])}()}},1187:(e,t,n)=>{"use strict";n.d(t,{n:()=>v});var r=n(9740),i=n(1588),o=n(6961),s=n(2470),a=n(1478),c=n(2129),l=n(191),u=n(6469),d=n(6091),h=n(4456);function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"undefined"!==typeof t.size&&(0,d.Sl)(e,{size:t.size});const n=(0,h.My)(e,t);return(0,d.uU)(n,t)}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;if("undefined"!==typeof t.size&&((0,d.Sl)(n,{size:t.size}),n=(0,l.B)(n)),n.length>1||n[0]>1)throw new u.xO(n);return Boolean(n[0])}function m(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"undefined"!==typeof t.size&&(0,d.Sl)(e,{size:t.size});const n=(0,h.My)(e,t);return(0,d.ME)(n,t)}function g(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;return"undefined"!==typeof t.size&&((0,d.Sl)(n,{size:t.size}),n=(0,l.B)(n,{dir:"right"})),(new TextDecoder).decode(n)}var b=n(3530),y=n(5210);function v(e,t){const n="string"===typeof t?(0,b.aT)(t):t,r=(0,s.l)(n);if(0===(0,a.E)(n)&&e.length>0)throw new i.O;if((0,a.E)(t)&&(0,a.E)(t)<32)throw new i.Iy({data:"string"===typeof t?t:(0,h.My)(t),params:e,size:(0,a.E)(t)});let o=0;const c=[];for(let i=0;i<e.length;++i){const t=e[i];r.setPosition(o);const[n,s]=w(r,t,{staticPosition:0});o+=s,c.push(n)}return c}function w(e,t,n){let{staticPosition:s}=n;const a=(0,y.k)(t.type);if(a){const[n,i]=a;return function(e,t,n){let{length:r,staticPosition:i}=n;if(!r){const n=i+m(e.readBytes(k)),r=n+_;e.setPosition(n);const o=m(e.readBytes(_)),s=x(t);let a=0;const c=[];for(let i=0;i<o;++i){e.setPosition(r+(s?32*i:a));const[n,o]=w(e,t,{staticPosition:r});a+=o,c.push(n)}return e.setPosition(i+32),[c,32]}if(x(t)){const n=i+m(e.readBytes(k)),o=[];for(let i=0;i<r;++i){e.setPosition(n+32*i);const[r]=w(e,t,{staticPosition:n});o.push(r)}return e.setPosition(i+32),[o,32]}let o=0;const s=[];for(let a=0;a<r;++a){const[n,r]=w(e,t,{staticPosition:i+o});o+=r,s.push(n)}return[s,o]}(e,(0,r.A)((0,r.A)({},t),{},{type:i}),{length:n,staticPosition:s})}if("tuple"===t.type)return function(e,t,n){let{staticPosition:r}=n;const i=0===t.components.length||t.components.some(e=>{let{name:t}=e;return!t}),o=i?[]:{};let s=0;if(x(t)){const n=r+m(e.readBytes(k));for(let r=0;r<t.components.length;++r){const a=t.components[r];e.setPosition(n+s);const[c,l]=w(e,a,{staticPosition:n});s+=l,o[i?r:null===a||void 0===a?void 0:a.name]=c}return e.setPosition(r+32),[o,32]}for(let a=0;a<t.components.length;++a){const n=t.components[a],[c,l]=w(e,n,{staticPosition:r});o[i?a:null===n||void 0===n?void 0:n.name]=c,s+=l}return[o,s]}(e,t,{staticPosition:s});if("address"===t.type)return function(e){const t=e.readBytes(32);return[(0,o.o)((0,h.My)((0,c.A1)(t,-20))),32]}(e);if("bool"===t.type)return function(e){return[p(e.readBytes(32),{size:32}),32]}(e);if(t.type.startsWith("bytes"))return function(e,t,n){let{staticPosition:r}=n;const[i,o]=t.type.split("bytes");if(!o){const t=m(e.readBytes(32));e.setPosition(r+t);const n=m(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];const i=e.readBytes(n);return e.setPosition(r+32),[(0,h.My)(i),32]}const s=(0,h.My)(e.readBytes(Number.parseInt(o,10),32));return[s,32]}(e,t,{staticPosition:s});if(t.type.startsWith("uint")||t.type.startsWith("int"))return function(e,t){const n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),i=e.readBytes(32);return[r>48?f(i,{signed:n}):m(i,{signed:n}),32]}(e,t);if("string"===t.type)return function(e,t){let{staticPosition:n}=t;const r=m(e.readBytes(32)),i=n+r;e.setPosition(i);const o=m(e.readBytes(32));if(0===o)return e.setPosition(n+32),["",32];const s=e.readBytes(o,32),a=g((0,l.B)(s));return e.setPosition(n+32),[a,32]}(e,{staticPosition:s});throw new i.j(t.type,{docsPath:"/docs/contract/decodeAbiParameters"})}const _=32,k=32;function x(e){var t;const{type:n}=e;if("string"===n)return!0;if("bytes"===n)return!0;if(n.endsWith("[]"))return!0;if("tuple"===n)return null===(t=e.components)||void 0===t?void 0:t.some(x);const i=(0,y.k)(e.type);return!(!i||!x((0,r.A)((0,r.A)({},e),{},{type:i[1]})))}},1240:(e,t,n)=>{"use strict";var r=n(6473).Buffer;e.exports=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),n=0;n<t.length;n++)t[n]=255;for(var i=0;i<e.length;i++){var o=e.charAt(i),s=o.charCodeAt(0);if(255!==t[s])throw new TypeError(o+" is ambiguous");t[s]=i}var a=e.length,c=e.charAt(0),l=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function d(e){if("string"!==typeof e)throw new TypeError("Expected String");if(0===e.length)return r.alloc(0);for(var n=0,i=0,o=0;e[n]===c;)i++,n++;for(var s=(e.length-n)*l+1>>>0,u=new Uint8Array(s);n<e.length;){var d=e.charCodeAt(n);if(d>255)return;var h=t[d];if(255===h)return;for(var f=0,p=s-1;(0!==h||f<o)&&-1!==p;p--,f++)h+=a*u[p]>>>0,u[p]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");o=f,n++}for(var m=s-o;m!==s&&0===u[m];)m++;var g=r.allocUnsafe(i+(s-m));g.fill(0,0,i);for(var b=i;m!==s;)g[b++]=u[m++];return g}return{encode:function(t){if((Array.isArray(t)||t instanceof Uint8Array)&&(t=r.from(t)),!r.isBuffer(t))throw new TypeError("Expected Buffer");if(0===t.length)return"";for(var n=0,i=0,o=0,s=t.length;o!==s&&0===t[o];)o++,n++;for(var l=(s-o)*u+1>>>0,d=new Uint8Array(l);o!==s;){for(var h=t[o],f=0,p=l-1;(0!==h||f<i)&&-1!==p;p--,f++)h+=256*d[p]>>>0,d[p]=h%a>>>0,h=h/a>>>0;if(0!==h)throw new Error("Non-zero carry");i=f,o++}for(var m=l-i;m!==l&&0===d[m];)m++;for(var g=c.repeat(n);m<l;++m)g+=e.charAt(d[m]);return g},decodeUnsafe:d,decode:function(e){var t=d(e);if(t)return t;throw new Error("Non-base"+a+" character")}}}},1257:e=>{e.exports=function(){return"function"===typeof Promise&&Promise.prototype&&Promise.prototype.then}},1296:(e,t,n)=>{"use strict";n.d(t,{Fl:()=>o,NV:()=>s,ii:()=>i});var r=n(8090);class i extends r.C{constructor(e){let{offset:t,position:n,size:r}=e;super("Slice ".concat("start"===n?"starting":"ending",' at offset "').concat(t,'" is out-of-bounds (size: ').concat(r,")."),{name:"SliceOffsetOutOfBoundsError"})}}class o extends r.C{constructor(e){let{size:t,targetSize:n,type:r}=e;super("".concat(r.charAt(0).toUpperCase()).concat(r.slice(1).toLowerCase()," size (").concat(t,") exceeds padding size (").concat(n,")."),{name:"SizeExceedsPaddingSizeError"})}}class s extends r.C{constructor(e){let{size:t,targetSize:n,type:r}=e;super("".concat(r.charAt(0).toUpperCase()).concat(r.slice(1).toLowerCase()," is expected to be ").concat(n," ").concat(r," long, but is ").concat(t," ").concat(r," long."),{name:"InvalidBytesLengthError"})}}},1314:(e,t)=>{t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},1325:(e,t,n)=>{const r=n(100),i=n(4769),o=n(4437),s=n(5794),a=n(2254),c=n(9336),l=n(9178),u=n(3932);function d(e){return unescape(encodeURIComponent(e)).length}function h(e,t,n){const r=[];let i;for(;null!==(i=e.exec(n));)r.push({data:i[0],index:i.index,mode:t,length:i[0].length});return r}function f(e){const t=h(c.NUMERIC,r.NUMERIC,e),n=h(c.ALPHANUMERIC,r.ALPHANUMERIC,e);let i,o;l.isKanjiModeEnabled()?(i=h(c.BYTE,r.BYTE,e),o=h(c.KANJI,r.KANJI,e)):(i=h(c.BYTE_KANJI,r.BYTE,e),o=[]);return t.concat(n,i,o).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function p(e,t){switch(t){case r.NUMERIC:return i.getBitsLength(e);case r.ALPHANUMERIC:return o.getBitsLength(e);case r.KANJI:return a.getBitsLength(e);case r.BYTE:return s.getBitsLength(e)}}function m(e,t){let n;const c=r.getBestModeForData(e);if(n=r.from(t,c),n!==r.BYTE&&n.bit<c.bit)throw new Error('"'+e+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(c));switch(n!==r.KANJI||l.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new i(e);case r.ALPHANUMERIC:return new o(e);case r.KANJI:return new a(e);case r.BYTE:return new s(e)}}t.fromArray=function(e){return e.reduce(function(e,t){return"string"===typeof t?e.push(m(t,null)):t.data&&e.push(m(t.data,t.mode)),e},[])},t.fromString=function(e,n){const i=function(e){const t=[];for(let n=0;n<e.length;n++){const i=e[n];switch(i.mode){case r.NUMERIC:t.push([i,{data:i.data,mode:r.ALPHANUMERIC,length:i.length},{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.ALPHANUMERIC:t.push([i,{data:i.data,mode:r.BYTE,length:i.length}]);break;case r.KANJI:t.push([i,{data:i.data,mode:r.BYTE,length:d(i.data)}]);break;case r.BYTE:t.push([{data:i.data,mode:r.BYTE,length:d(i.data)}])}}return t}(f(e,l.isKanjiModeEnabled())),o=function(e,t){const n={},i={start:{}};let o=["start"];for(let s=0;s<e.length;s++){const a=e[s],c=[];for(let e=0;e<a.length;e++){const l=a[e],u=""+s+e;c.push(u),n[u]={node:l,lastCount:0},i[u]={};for(let e=0;e<o.length;e++){const s=o[e];n[s]&&n[s].node.mode===l.mode?(i[s][u]=p(n[s].lastCount+l.length,l.mode)-p(n[s].lastCount,l.mode),n[s].lastCount+=l.length):(n[s]&&(n[s].lastCount=l.length),i[s][u]=p(l.length,l.mode)+4+r.getCharCountIndicator(l.mode,t))}}o=c}for(let r=0;r<o.length;r++)i[o[r]].end=0;return{map:i,table:n}}(i,n),s=u.find_path(o.map,"start","end"),a=[];for(let t=1;t<s.length-1;t++)a.push(o.table[s[t]].node);return t.fromArray(function(e){return e.reduce(function(e,t){const n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===t.mode?(e[e.length-1].data+=t.data,e):(e.push(t),e)},[])}(a))},t.rawSplit=function(e){return t.fromArray(f(e,l.isKanjiModeEnabled()))}},1411:(e,t,n)=>{const r=n(1257),i=n(2745),o=n(4887),s=n(224);function a(e,t,n,o,s){const a=[].slice.call(arguments,1),c=a.length,l="function"===typeof a[c-1];if(!l&&!r())throw new Error("Callback required as last argument");if(!l){if(c<1)throw new Error("Too few arguments provided");return 1===c?(n=t,t=o=void 0):2!==c||t.getContext||(o=n,n=t,t=void 0),new Promise(function(r,s){try{const s=i.create(n,o);r(e(s,t,o))}catch(a){s(a)}})}if(c<2)throw new Error("Too few arguments provided");2===c?(s=n,n=t,t=o=void 0):3===c&&(t.getContext&&"undefined"===typeof s?(s=o,o=void 0):(s=o,o=n,n=t,t=void 0));try{const r=i.create(n,o);s(null,e(r,t,o))}catch(u){s(u)}}t.create=i.create,t.toCanvas=a.bind(null,o.render),t.toDataURL=a.bind(null,o.renderToDataURL),t.toString=a.bind(null,function(e,t,n){return s.render(e,n)})},1478:(e,t,n)=>{"use strict";n.d(t,{E:()=>i});var r=n(226);function i(e){return(0,r.q)(e,{strict:!1})?Math.ceil((e.length-2)/2):e.length}},1503:(e,t,n)=>{"use strict";n.d(t,{V:()=>o});var r=n(2129),i=n(8859);const o=e=>(0,r.di)((0,i.k)(e),0,4)},1588:(e,t,n)=>{"use strict";n.d(t,{EB:()=>y,Iy:()=>c,Iz:()=>g,MR:()=>b,Nc:()=>u,O:()=>l,Wq:()=>m,YE:()=>h,YF:()=>a,YW:()=>s,ZP:()=>f,d_:()=>x,dm:()=>k,gH:()=>d,j:()=>_,nK:()=>w,nM:()=>v,yy:()=>p});var r=n(2311),i=n(1478),o=n(8090);class s extends o.C{constructor(e){let{docsPath:t}=e;super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join("\n"),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class a extends o.C{constructor(e){let{docsPath:t}=e;super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join("\n"),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}o.C;class c extends o.C{constructor(e){let{data:t,params:n,size:i}=e;super(["Data size of ".concat(i," bytes is too small for given parameters.")].join("\n"),{metaMessages:["Params: (".concat((0,r.A)(n,{includeName:!0}),")"),"Data: ".concat(t," (").concat(i," bytes)")],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t,this.params=n,this.size=i}}class l extends o.C{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class u extends o.C{constructor(e){let{expectedLength:t,givenLength:n,type:r}=e;super(["ABI encoding array length mismatch for type ".concat(r,"."),"Expected length: ".concat(t),"Given length: ".concat(n)].join("\n"),{name:"AbiEncodingArrayLengthMismatchError"})}}class d extends o.C{constructor(e){let{expectedSize:t,value:n}=e;super('Size of bytes "'.concat(n,'" (bytes').concat((0,i.E)(n),") does not match expected size (bytes").concat(t,")."),{name:"AbiEncodingBytesSizeMismatchError"})}}class h extends o.C{constructor(e){let{expectedLength:t,givenLength:n}=e;super(["ABI encoding params/values length mismatch.","Expected length (params): ".concat(t),"Given length (values): ".concat(n)].join("\n"),{name:"AbiEncodingLengthMismatchError"})}}class f extends o.C{constructor(e,t){let{docsPath:n}=t;super(['Arguments (`args`) were provided to "'.concat(e,'", but "').concat(e,'" on the ABI does not contain any parameters (`inputs`).'),"Cannot encode error result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the inputs exist on it."].join("\n"),{docsPath:n,name:"AbiErrorInputsNotFoundError"})}}class p extends o.C{constructor(e){let{docsPath:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(["Error ".concat(e?'"'.concat(e,'" '):"","not found on ABI."),"Make sure you are using the correct ABI and that the error exists on it."].join("\n"),{docsPath:t,name:"AbiErrorNotFoundError"})}}class m extends o.C{constructor(e,t){let{docsPath:n}=t;super(['Encoded error signature "'.concat(e,'" not found on ABI.'),"Make sure you are using the correct ABI and that the error exists on it.","You can look up the decoded signature here: https://openchain.xyz/signatures?query=".concat(e,".")].join("\n"),{docsPath:n,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}o.C;o.C;o.C;class g extends o.C{constructor(e){let{docsPath:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(["Function ".concat(e?'"'.concat(e,'" '):"","not found on ABI."),"Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:t,name:"AbiFunctionNotFoundError"})}}class b extends o.C{constructor(e,t){let{docsPath:n}=t;super(['Function "'.concat(e,'" does not contain any `outputs` on ABI.'),"Cannot decode function result without knowing what the parameter types are.","Make sure you are using the correct ABI and that the function exists on it."].join("\n"),{docsPath:n,name:"AbiFunctionOutputsNotFoundError"})}}class y extends o.C{constructor(e,t){let{docsPath:n}=t;super(['Encoded function signature "'.concat(e,'" not found on ABI.'),"Make sure you are using the correct ABI and that the function exists on it.","You can look up the signature here: https://openchain.xyz/signatures?query=".concat(e,".")].join("\n"),{docsPath:n,name:"AbiFunctionSignatureNotFoundError"})}}class v extends o.C{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:["`".concat(e.type,"` in `").concat((0,r.B)(e.abiItem),"`, and"),"`".concat(t.type,"` in `").concat((0,r.B)(t.abiItem),"`"),"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}o.C;o.C;o.C;class w extends o.C{constructor(e,t){let{docsPath:n}=t;super(['Type "'.concat(e,'" is not a valid encoding type.'),"Please provide a valid ABI type."].join("\n"),{docsPath:n,name:"InvalidAbiEncodingType"})}}class _ extends o.C{constructor(e,t){let{docsPath:n}=t;super(['Type "'.concat(e,'" is not a valid decoding type.'),"Please provide a valid ABI type."].join("\n"),{docsPath:n,name:"InvalidAbiDecodingType"})}}class k extends o.C{constructor(e){super(['Value "'.concat(e,'" is not a valid array.')].join("\n"),{name:"InvalidArrayError"})}}class x extends o.C{constructor(e){super(['"'.concat(e,'" is not a valid definition type.'),'Valid types: "function", "event", "error"'].join("\n"),{name:"InvalidDefinitionTypeError"})}}o.C},1605:(e,t)=>{t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2},t.isValid=function(e){return e&&"undefined"!==typeof e.bit&&e.bit>=0&&e.bit<4},t.from=function(e,n){if(t.isValid(e))return e;try{return function(e){if("string"!==typeof e)throw new Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+e)}}(e)}catch(r){return n}}},1693:(e,t,n)=>{"use strict";e.exports=n(2466)},1713:(e,t,n)=>{"use strict";var r=n(7802),i=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,y={};function v(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||g}function w(){}function _(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||g}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},w.prototype=v.prototype;var k=_.prototype=new w;k.constructor=_,b(k,v.prototype),k.isPureReactComponent=!0;var x=Array.isArray,S={H:null,A:null,T:null,S:null,V:null},E=Object.prototype.hasOwnProperty;function A(e,t,n,r,o,s){return n=s.ref,{$$typeof:i,type:e,key:t,ref:void 0!==n?n:null,props:s}}function P(e){return"object"===typeof e&&null!==e&&e.$$typeof===i}var C=/\/+/g;function I(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function M(){}function T(e,t,n,r,s){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var c,l,u=!1;if(null===e)u=!0;else switch(a){case"bigint":case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case i:case o:u=!0;break;case p:return T((u=e._init)(e._payload),t,n,r,s)}}if(u)return s=s(e),u=""===r?"."+I(e,0):r,x(s)?(n="",null!=u&&(n=u.replace(C,"$&/")+"/"),T(s,t,n,"",function(e){return e})):null!=s&&(P(s)&&(c=s,l=n+(null==s.key||e&&e.key===s.key?"":(""+s.key).replace(C,"$&/")+"/")+u,s=A(c.type,l,void 0,0,0,c.props)),t.push(s)),1;u=0;var d,h=""===r?".":r+":";if(x(e))for(var f=0;f<e.length;f++)u+=T(r=e[f],t,n,a=h+I(r,f),s);else if("function"===typeof(f=null===(d=e)||"object"!==typeof d?null:"function"===typeof(d=m&&d[m]||d["@@iterator"])?d:null))for(e=f.call(e),f=0;!(r=e.next()).done;)u+=T(r=r.value,t,n,a=h+I(r,f++),s);else if("object"===a){if("function"===typeof e.then)return T(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"===typeof e.status?e.then(M,M):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,n,r,s);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return u}function O(e,t,n){if(null==e)return e;var r=[],i=0;return T(e,r,"","",function(e){return t.call(n,e,i++)}),r}function N(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var B="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof r&&"function"===typeof r.emit)return void r.emit("uncaughtException",e);console.error(e)};function R(){}t.Children={map:O,forEach:function(e,t,n){O(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!P(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=s,t.Profiler=c,t.PureComponent=_,t.StrictMode=a,t.Suspense=h,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return S.H.useMemoCache(e)}},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error("The argument must be a React element, but you passed "+e+".");var r=b({},e.props),i=e.key;if(null!=t)for(o in void 0!==t.ref&&void 0,void 0!==t.key&&(i=""+t.key),t)!E.call(t,o)||"key"===o||"__self"===o||"__source"===o||"ref"===o&&void 0===t.ref||(r[o]=t[o]);var o=arguments.length-2;if(1===o)r.children=n;else if(1<o){for(var s=Array(o),a=0;a<o;a++)s[a]=arguments[a+2];r.children=s}return A(e.type,i,void 0,0,0,r)},t.createContext=function(e){return(e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:l,_context:e},e},t.createElement=function(e,t,n){var r,i={},o=null;if(null!=t)for(r in void 0!==t.key&&(o=""+t.key),t)E.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var a=Array(s),c=0;c<s;c++)a[c]=arguments[c+2];i.children=a}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return A(e,o,void 0,0,0,i)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:d,render:e}},t.isValidElement=P,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:N}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=S.T,n={};S.T=n;try{var r=e(),i=S.S;null!==i&&i(n,r),"object"===typeof r&&null!==r&&"function"===typeof r.then&&r.then(R,B)}catch(o){B(o)}finally{S.T=t}},t.unstable_useCacheRefresh=function(){return S.H.useCacheRefresh()},t.use=function(e){return S.H.use(e)},t.useActionState=function(e,t,n){return S.H.useActionState(e,t,n)},t.useCallback=function(e,t){return S.H.useCallback(e,t)},t.useContext=function(e){return S.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return S.H.useDeferredValue(e,t)},t.useEffect=function(e,t,n){var r=S.H;if("function"===typeof n)throw Error("useEffect CRUD overload is not enabled in this build of React.");return r.useEffect(e,t)},t.useId=function(){return S.H.useId()},t.useImperativeHandle=function(e,t,n){return S.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return S.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return S.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return S.H.useMemo(e,t)},t.useOptimistic=function(e,t){return S.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return S.H.useReducer(e,t,n)},t.useRef=function(e){return S.H.useRef(e)},t.useState=function(e){return S.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return S.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return S.H.useTransition()},t.version="19.1.0"},1914:(e,t,n)=>{"use strict";n.d(t,{sc:()=>r});const r=n(929).sha256},1979:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7545);function i(e){var t=function(e,t){if("object"!=(0,r.A)(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=(0,r.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==(0,r.A)(t)?t:t+""}function o(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},2104:function(e,t){"use strict";var n,r=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};let o;Object.defineProperty(t,"__esModule",{value:!0}),t.DEPRECATED_getWallets=t.getWallets=void 0;const s=new Set;const a={};function c(){if(o)return o;if(o=Object.freeze({register:l,get:d,on:h}),"undefined"===typeof window)return o;const e=Object.freeze({register:l});try{window.addEventListener("wallet-standard:register-wallet",t=>{let{detail:n}=t;return n(e)})}catch(t){console.error("wallet-standard:register-wallet event listener could not be added\n",t)}try{window.dispatchEvent(new p(e))}catch(t){console.error("wallet-standard:app-ready event could not be dispatched\n",t)}return o}function l(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r;return(t=t.filter(e=>!s.has(e))).length?(t.forEach(e=>function(e){u=void 0,s.add(e)}(e)),null===(r=a.register)||void 0===r||r.forEach(e=>f(()=>e(...t))),function(){var e;t.forEach(e=>function(e){u=void 0,s.delete(e)}(e)),null===(e=a.unregister)||void 0===e||e.forEach(e=>f(()=>e(...t)))}):()=>{}}let u;function d(){return u||(u=[...s]),u}function h(e,t){var n;return(null===(n=a[e])||void 0===n?void 0:n.push(t))||(a[e]=[t]),function(){var n;a[e]=null===(n=a[e])||void 0===n?void 0:n.filter(e=>t!==e)}}function f(e){try{e()}catch(t){console.error(t)}}t.getWallets=c;class p extends Event{get detail(){return r(this,n,"f")}get type(){return"wallet-standard:app-ready"}constructor(e){super("wallet-standard:app-ready",{bubbles:!1,cancelable:!1,composed:!1}),n.set(this,void 0),i(this,n,e,"f")}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}}n=new WeakMap,t.DEPRECATED_getWallets=function(){if(o)return o;if(o=c(),"undefined"===typeof window)return o;const e=window.navigator.wallets||[];if(!Array.isArray(e))return console.error("window.navigator.wallets is not an array"),o;const{register:t}=o,n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.forEach(e=>f(()=>e({register:t})))};try{Object.defineProperty(window.navigator,"wallets",{value:Object.freeze({push:n})})}catch(r){return console.error("window.navigator.wallets could not be set"),o}return n(...e),o}},2129:(e,t,n)=>{"use strict";n.d(t,{A1:()=>l,di:()=>s});var r=n(1296),i=n(226),o=n(1478);function s(e,t,n){let{strict:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,i.q)(e,{strict:!1})?function(e,t,n){let{strict:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};a(e,t);const i="0x".concat(e.replace("0x","").slice(2*(null!==t&&void 0!==t?t:0),2*(null!==n&&void 0!==n?n:e.length)));r&&c(i,t,n);return i}(e,t,n,{strict:r}):l(e,t,n,{strict:r})}function a(e,t){if("number"===typeof t&&t>0&&t>(0,o.E)(e)-1)throw new r.ii({offset:t,position:"start",size:(0,o.E)(e)})}function c(e,t,n){if("number"===typeof t&&"number"===typeof n&&(0,o.E)(e)!==n-t)throw new r.ii({offset:n,position:"end",size:(0,o.E)(e)})}function l(e,t,n){let{strict:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};a(e,t);const i=e.slice(t,n);return r&&c(i,t,n),i}},2176:(e,t,n)=>{"use strict";e.exports=n(1713)},2188:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,k:()=>o});var r=n(4282);const i=[];for(let a=0;a<256;++a)i.push((a+256).toString(16).slice(1));function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase()}const s=function(e){const t=o(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0);if(!(0,r.A)(t))throw TypeError("Stringified UUID is invalid");return t}},2254:(e,t,n)=>{const r=n(100),i=n(9178);function o(e){this.mode=r.KANJI,this.data=e}o.getBitsLength=function(e){return 13*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=i.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),e.put(n,13)}},e.exports=o},2283:(e,t,n)=>{"use strict";function r(){let e=()=>{},t=()=>{};return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}n.d(t,{Y:()=>r})},2311:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,B:()=>i});var r=n(1588);function i(e){let{includeName:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new r.d_(e.type);return"".concat(e.name,"(").concat(o(e.inputs,{includeName:t}),")")}function o(e){let{includeName:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?e.map(e=>function(e,t){let{includeName:n}=t;if(e.type.startsWith("tuple"))return"(".concat(o(e.components,{includeName:n}),")").concat(e.type.slice(5));return e.type+(n&&e.name?" ".concat(e.name):"")}(e,{includeName:t})).join(t?", ":","):""}},2344:(e,t)=>{t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,r=3,i=40,o=10;function s(e,n,r){switch(e){case t.Patterns.PATTERN000:return(n+r)%2===0;case t.Patterns.PATTERN001:return n%2===0;case t.Patterns.PATTERN010:return r%3===0;case t.Patterns.PATTERN011:return(n+r)%3===0;case t.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2===0;case t.Patterns.PATTERN101:return n*r%2+n*r%3===0;case t.Patterns.PATTERN110:return(n*r%2+n*r%3)%2===0;case t.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){const t=e.size;let r=0,i=0,o=0,s=null,a=null;for(let c=0;c<t;c++){i=o=0,s=a=null;for(let l=0;l<t;l++){let t=e.get(c,l);t===s?i++:(i>=5&&(r+=n+(i-5)),s=t,i=1),t=e.get(l,c),t===a?o++:(o>=5&&(r+=n+(o-5)),a=t,o=1)}i>=5&&(r+=n+(i-5)),o>=5&&(r+=n+(o-5))}return r},t.getPenaltyN2=function(e){const t=e.size;let n=0;for(let r=0;r<t-1;r++)for(let i=0;i<t-1;i++){const t=e.get(r,i)+e.get(r,i+1)+e.get(r+1,i)+e.get(r+1,i+1);4!==t&&0!==t||n++}return n*r},t.getPenaltyN3=function(e){const t=e.size;let n=0,r=0,o=0;for(let i=0;i<t;i++){r=o=0;for(let s=0;s<t;s++)r=r<<1&2047|e.get(i,s),s>=10&&(1488===r||93===r)&&n++,o=o<<1&2047|e.get(s,i),s>=10&&(1488===o||93===o)&&n++}return n*i},t.getPenaltyN4=function(e){let t=0;const n=e.data.length;for(let r=0;r<n;r++)t+=e.data[r];return Math.abs(Math.ceil(100*t/n/5)-10)*o},t.applyMask=function(e,t){const n=t.size;for(let r=0;r<n;r++)for(let i=0;i<n;i++)t.isReserved(i,r)||t.xor(i,r,s(e,i,r))},t.getBestMask=function(e,n){const r=Object.keys(t.Patterns).length;let i=0,o=1/0;for(let s=0;s<r;s++){n(s),t.applyMask(s,e);const r=t.getPenaltyN1(e)+t.getPenaltyN2(e)+t.getPenaltyN3(e)+t.getPenaltyN4(e);t.applyMask(s,e),r<o&&(o=r,i=s)}return i}},2349:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MultiChainOpenRPCDocument=t.MetaMaskOpenRPCDocument=void 0;const i=r(n(9921));t.MetaMaskOpenRPCDocument=i.default;const o=r(n(3990));t.MultiChainOpenRPCDocument=o.default,t.default=i.default},2370:(e,t,n)=>{"use strict";n.d(t,{db:()=>o,eV:()=>i});var r=n(1296);function i(e){let{dir:t,size:n=32}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"===typeof e?o(e,{dir:t,size:n}):function(e){let{dir:t,size:n=32}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===n)return e;if(e.length>n)throw new r.Fl({size:e.length,targetSize:n,type:"bytes"});const i=new Uint8Array(n);for(let r=0;r<n;r++){const o="right"===t;i[o?r:n-r-1]=e[o?r:e.length-r-1]}return i}(e,{dir:t,size:n})}function o(e){let{dir:t,size:n=32}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===n)return e;const i=e.replace("0x","");if(i.length>2*n)throw new r.Fl({size:Math.ceil(i.length/2),targetSize:n,type:"hex"});return"0x".concat(i["right"===t?"padEnd":"padStart"](2*n,"0"))}},2387:(e,t,n)=>{"use strict";var r=n(7802),i=n(4442),o=n(2176),s=n(3989);function a(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function u(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function d(e){if(l(e)!==e)throw Error(a(188))}function h(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=h(e)))return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),_=Symbol.for("react.consumer"),k=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),P=Symbol.for("react.lazy");Symbol.for("react.scope");var C=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var I=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var M=Symbol.iterator;function T(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=M&&e[M]||e["@@iterator"])?e:null}var O=Symbol.for("react.client.reference");function N(e){if(null==e)return null;if("function"===typeof e)return e.$$typeof===O?null:e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case b:return"Fragment";case v:return"Profiler";case y:return"StrictMode";case S:return"Suspense";case E:return"SuspenseList";case C:return"Activity"}if("object"===typeof e)switch(e.$$typeof){case g:return"Portal";case k:return(e.displayName||"Context")+".Provider";case _:return(e._context.displayName||"Context")+".Consumer";case x:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case A:return null!==(t=e.displayName||null)?t:N(e.type)||"Memo";case P:t=e._payload,e=e._init;try{return N(e(t))}catch(n){}}return null}var B=Array.isArray,R=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L={pending:!1,data:null,method:null,action:null},F=[],z=-1;function D(e){return{current:e}}function U(e){0>z||(e.current=F[z],F[z]=null,z--)}function W(e,t){z++,F[z]=e.current,e.current=t}var q=D(null),H=D(null),K=D(null),V=D(null);function $(e,t){switch(W(K,t),W(H,e),W(q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?od(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=sd(t=od(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(q),W(q,e)}function G(){U(q),U(H),U(K)}function Z(e){null!==e.memoizedState&&W(V,e);var t=q.current,n=sd(t,e.type);t!==n&&(W(H,e),W(q,n))}function J(e){H.current===e&&(U(q),U(H)),V.current===e&&(U(V),Zd._currentValue=L)}var Y=Object.prototype.hasOwnProperty,Q=i.unstable_scheduleCallback,X=i.unstable_cancelCallback,ee=i.unstable_shouldYield,te=i.unstable_requestPaint,ne=i.unstable_now,re=i.unstable_getCurrentPriorityLevel,ie=i.unstable_ImmediatePriority,oe=i.unstable_UserBlockingPriority,se=i.unstable_NormalPriority,ae=i.unstable_LowPriority,ce=i.unstable_IdlePriority,le=i.log,ue=i.unstable_setDisableYieldValue,de=null,he=null;function fe(e){if("function"===typeof le&&ue(e),he&&"function"===typeof he.setStrictMode)try{he.setStrictMode(de,e)}catch(t){}}var pe=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(me(e)/ge|0)|0},me=Math.log,ge=Math.LN2;var be=256,ye=4194304;function ve(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194048&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function we(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var i=0,o=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var a=134217727&r;return 0!==a?0!==(r=a&~o)?i=ve(r):0!==(s&=a)?i=ve(s):n||0!==(n=a&~e)&&(i=ve(n)):0!==(a=r&~o)?i=ve(a):0!==s?i=ve(s):n||0!==(n=r&~e)&&(i=ve(n)),0===i?0:0!==t&&t!==i&&0===(t&o)&&((o=i&-i)>=(n=t&-t)||32===o&&0!==(4194048&n))?t:i}function _e(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function ke(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function xe(){var e=be;return 0===(4194048&(be<<=1))&&(be=256),e}function Se(){var e=ye;return 0===(62914560&(ye<<=1))&&(ye=4194304),e}function Ee(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ae(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Pe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-pe(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194090&n}function Ce(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ie(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Me(e){return 2<(e&=-e)?8<e?0!==(134217727&e)?32:268435456:8:2}function Te(){var e=j.p;return 0!==e?e:void 0===(e=window.event)?32:uh(e.type)}var Oe=Math.random().toString(36).slice(2),Ne="__reactFiber$"+Oe,Be="__reactProps$"+Oe,Re="__reactContainer$"+Oe,je="__reactEvents$"+Oe,Le="__reactListeners$"+Oe,Fe="__reactHandles$"+Oe,ze="__reactResources$"+Oe,De="__reactMarker$"+Oe;function Ue(e){delete e[Ne],delete e[Be],delete e[je],delete e[Le],delete e[Fe]}function We(e){var t=e[Ne];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Re]||n[Ne]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=wd(e);null!==e;){if(n=e[Ne])return n;e=wd(e)}return t}n=(e=n).parentNode}return null}function qe(e){if(e=e[Ne]||e[Re]){var t=e.tag;if(5===t||6===t||13===t||26===t||27===t||3===t)return e}return null}function He(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(a(33))}function Ke(e){var t=e[ze];return t||(t=e[ze]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ve(e){e[De]=!0}var $e=new Set,Ge={};function Ze(e,t){Je(e,t),Je(e+"Capture",t)}function Je(e,t){for(Ge[e]=t,e=0;e<t.length;e++)$e.add(t[e])}var Ye,Qe,Xe=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),et={},tt={};function nt(e,t,n){if(i=t,Y.call(tt,i)||!Y.call(et,i)&&(Xe.test(i)?tt[i]=!0:(et[i]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var i}function rt(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function it(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function ot(e){if(void 0===Ye)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ye=t&&t[1]||"",Qe=-1<n.stack.indexOf("\n at")?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+Ye+e+Qe}var st=!1;function at(e,t){if(!e||st)return"";st=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(i){var r=i}Reflect.construct(e,[],n)}else{try{n.call()}catch(o){r=o}e.call(n.prototype)}}else{try{throw Error()}catch(s){r=s}(n=e())&&"function"===typeof n.catch&&n.catch(function(){})}}catch(a){if(a&&r&&"string"===typeof a.stack)return[a.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=r.DetermineComponentFrameRoot(),s=o[0],a=o[1];if(s&&a){var c=s.split("\n"),l=a.split("\n");for(i=r=0;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;for(;i<l.length&&!l[i].includes("DetermineComponentFrameRoot");)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(1!==r||1!==i)do{if(r--,0>--i||c[r]!==l[i]){var u="\n"+c[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=i);break}}}finally{st=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ot(n):""}function ct(e){switch(e.tag){case 26:case 27:case 5:return ot(e.type);case 16:return ot("Lazy");case 13:return ot("Suspense");case 19:return ot("SuspenseList");case 0:case 15:return at(e.type,!1);case 11:return at(e.type.render,!1);case 1:return at(e.type,!0);case 31:return ot("Activity");default:return""}}function lt(e){try{var t="";do{t+=ct(e),e=e.return}while(e);return t}catch(n){return"\nError generating stack: "+n.message+"\n"+n.stack}}function ut(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function dt(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ht(e){e._valueTracker||(e._valueTracker=function(e){var t=dt(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ft(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=dt(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function pt(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var mt=/[\n"\\]/g;function gt(e){return e.replace(mt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function bt(e,t,n,r,i,o,s,a){e.name="",null!=s&&"function"!==typeof s&&"symbol"!==typeof s&&"boolean"!==typeof s?e.type=s:e.removeAttribute("type"),null!=t?"number"===s?(0===t&&""===e.value||e.value!=t)&&(e.value=""+ut(t)):e.value!==""+ut(t)&&(e.value=""+ut(t)):"submit"!==s&&"reset"!==s||e.removeAttribute("value"),null!=t?vt(e,s,ut(t)):null!=n?vt(e,s,ut(n)):null!=r&&e.removeAttribute("value"),null==i&&null!=o&&(e.defaultChecked=!!o),null!=i&&(e.checked=i&&"function"!==typeof i&&"symbol"!==typeof i),null!=a&&"function"!==typeof a&&"symbol"!==typeof a&&"boolean"!==typeof a?e.name=""+ut(a):e.removeAttribute("name")}function yt(e,t,n,r,i,o,s,a){if(null!=o&&"function"!==typeof o&&"symbol"!==typeof o&&"boolean"!==typeof o&&(e.type=o),null!=t||null!=n){if(!("submit"!==o&&"reset"!==o||void 0!==t&&null!==t))return;n=null!=n?""+ut(n):"",t=null!=t?""+ut(t):n,a||t===e.value||(e.value=t),e.defaultValue=t}r="function"!==typeof(r=null!=r?r:i)&&"symbol"!==typeof r&&!!r,e.checked=a?e.checked:!!r,e.defaultChecked=!!r,null!=s&&"function"!==typeof s&&"symbol"!==typeof s&&"boolean"!==typeof s&&(e.name=s)}function vt(e,t,n){"number"===t&&pt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function wt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ut(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function _t(e,t,n){null==t||((t=""+ut(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+ut(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function kt(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(a(92));if(B(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=ut(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r)}function xt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var St=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Et(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"===typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!==typeof n||0===n||St.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function At(e,t,n){if(null!=t&&"object"!==typeof t)throw Error(a(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Et(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Et(e,o,t[o])}function Pt(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ct=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),It=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Mt(e){return It.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Tt=null;function Ot(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Nt=null,Bt=null;function Rt(e){var t=qe(e);if(t&&(e=t.stateNode)){var n=e[Be]||null;e:switch(e=t.stateNode,t.type){case"input":if(bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+gt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Be]||null;if(!i)throw Error(a(90));bt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&ft(r)}break e;case"textarea":_t(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&wt(e,!!n.multiple,t,!1)}}}var jt=!1;function Lt(e,t,n){if(jt)return e(t,n);jt=!0;try{return e(t)}finally{if(jt=!1,(null!==Nt||null!==Bt)&&(Wl(),Nt&&(t=Nt,e=Bt,Bt=Nt=null,Rt(t),e)))for(t=0;t<e.length;t++)Rt(e[t])}}function Ft(e,t){var n=e.stateNode;if(null===n)return null;var r=n[Be]||null;if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(a(231,t,typeof n));return n}var zt=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),Dt=!1;if(zt)try{var Ut={};Object.defineProperty(Ut,"passive",{get:function(){Dt=!0}}),window.addEventListener("test",Ut,Ut),window.removeEventListener("test",Ut,Ut)}catch(Bh){Dt=!1}var Wt=null,qt=null,Ht=null;function Kt(){if(Ht)return Ht;var e,t,n=qt,r=n.length,i="value"in Wt?Wt.value:Wt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[o-t];t++);return Ht=i.slice(e,1<t?1-t:void 0)}function Vt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function $t(){return!0}function Gt(){return!1}function Zt(e){function t(t,n,r,i,o){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?$t:Gt,this.isPropagationStopped=Gt,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=$t)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=$t)},persist:function(){},isPersistent:$t}),t}var Jt,Yt,Qt,Xt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},en=Zt(Xt),tn=f({},Xt,{view:0,detail:0}),nn=Zt(tn),rn=f({},tn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Qt&&(Qt&&"mousemove"===e.type?(Jt=e.screenX-Qt.screenX,Yt=e.screenY-Qt.screenY):Yt=Jt=0,Qt=e),Jt)},movementY:function(e){return"movementY"in e?e.movementY:Yt}}),on=Zt(rn),sn=Zt(f({},rn,{dataTransfer:0})),an=Zt(f({},tn,{relatedTarget:0})),cn=Zt(f({},Xt,{animationName:0,elapsedTime:0,pseudoElement:0})),ln=Zt(f({},Xt,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),un=Zt(f({},Xt,{data:0})),dn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},fn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=fn[e])&&!!t[e]}function mn(){return pn}var gn=Zt(f({},tn,{key:function(e){if(e.key){var t=dn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Vt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?hn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mn,charCode:function(e){return"keypress"===e.type?Vt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Vt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),bn=Zt(f({},rn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),yn=Zt(f({},tn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mn})),vn=Zt(f({},Xt,{propertyName:0,elapsedTime:0,pseudoElement:0})),wn=Zt(f({},rn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),_n=Zt(f({},Xt,{newState:0,oldState:0})),kn=[9,13,27,32],xn=zt&&"CompositionEvent"in window,Sn=null;zt&&"documentMode"in document&&(Sn=document.documentMode);var En=zt&&"TextEvent"in window&&!Sn,An=zt&&(!xn||Sn&&8<Sn&&11>=Sn),Pn=String.fromCharCode(32),Cn=!1;function In(e,t){switch(e){case"keyup":return-1!==kn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Tn=!1;var On={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Nn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!On[e.type]:"textarea"===t}function Bn(e,t,n,r){Nt?Bt?Bt.push(r):Bt=[r]:Nt=r,0<(t=Ku(t,"onChange")).length&&(n=new en("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Rn=null,jn=null;function Ln(e){Lu(e,0)}function Fn(e){if(ft(He(e)))return e}function zn(e,t){if("change"===e)return t}var Dn=!1;if(zt){var Un;if(zt){var Wn="oninput"in document;if(!Wn){var qn=document.createElement("div");qn.setAttribute("oninput","return;"),Wn="function"===typeof qn.oninput}Un=Wn}else Un=!1;Dn=Un&&(!document.documentMode||9<document.documentMode)}function Hn(){Rn&&(Rn.detachEvent("onpropertychange",Kn),jn=Rn=null)}function Kn(e){if("value"===e.propertyName&&Fn(jn)){var t=[];Bn(t,jn,e,Ot(e)),Lt(Ln,t)}}function Vn(e,t,n){"focusin"===e?(Hn(),jn=n,(Rn=t).attachEvent("onpropertychange",Kn)):"focusout"===e&&Hn()}function $n(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Fn(jn)}function Gn(e,t){if("click"===e)return Fn(t)}function Zn(e,t){if("input"===e||"change"===e)return Fn(t)}var Jn="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function Yn(e,t){if(Jn(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Y.call(t,i)||!Jn(e[i],t[i]))return!1}return!0}function Qn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xn(e,t){var n,r=Qn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Qn(r)}}function er(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?er(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function tr(e){for(var t=pt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=pt((e=t.contentWindow).document)}return t}function nr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var rr=zt&&"documentMode"in document&&11>=document.documentMode,ir=null,or=null,sr=null,ar=!1;function cr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ar||null==ir||ir!==pt(r)||("selectionStart"in(r=ir)&&nr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},sr&&Yn(sr,r)||(sr=r,0<(r=Ku(or,"onSelect")).length&&(t=new en("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ir)))}function lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ur={animationend:lr("Animation","AnimationEnd"),animationiteration:lr("Animation","AnimationIteration"),animationstart:lr("Animation","AnimationStart"),transitionrun:lr("Transition","TransitionRun"),transitionstart:lr("Transition","TransitionStart"),transitioncancel:lr("Transition","TransitionCancel"),transitionend:lr("Transition","TransitionEnd")},dr={},hr={};function fr(e){if(dr[e])return dr[e];if(!ur[e])return e;var t,n=ur[e];for(t in n)if(n.hasOwnProperty(t)&&t in hr)return dr[e]=n[t];return e}zt&&(hr=document.createElement("div").style,"AnimationEvent"in window||(delete ur.animationend.animation,delete ur.animationiteration.animation,delete ur.animationstart.animation),"TransitionEvent"in window||delete ur.transitionend.transition);var pr=fr("animationend"),mr=fr("animationiteration"),gr=fr("animationstart"),br=fr("transitionrun"),yr=fr("transitionstart"),vr=fr("transitioncancel"),wr=fr("transitionend"),_r=new Map,kr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function xr(e,t){_r.set(e,t),Ze(t,[e])}kr.push("scrollEnd");var Sr=new WeakMap;function Er(e,t){if("object"===typeof e&&null!==e){var n=Sr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:lt(t)},Sr.set(e,t),t)}return{value:e,source:t,stack:lt(t)}}var Ar=[],Pr=0,Cr=0;function Ir(){for(var e=Pr,t=Cr=Pr=0;t<e;){var n=Ar[t];Ar[t++]=null;var r=Ar[t];Ar[t++]=null;var i=Ar[t];Ar[t++]=null;var o=Ar[t];if(Ar[t++]=null,null!==r&&null!==i){var s=r.pending;null===s?i.next=i:(i.next=s.next,s.next=i),r.pending=i}0!==o&&Nr(n,i,o)}}function Mr(e,t,n,r){Ar[Pr++]=e,Ar[Pr++]=t,Ar[Pr++]=n,Ar[Pr++]=r,Cr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Tr(e,t,n,r){return Mr(e,t,n,r),Br(e)}function Or(e,t){return Mr(e,null,null,t),Br(e)}function Nr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var i=!1,o=e.return;null!==o;)o.childLanes|=n,null!==(r=o.alternate)&&(r.childLanes|=n),22===o.tag&&(null===(e=o.stateNode)||1&e._visibility||(i=!0)),e=o,o=o.return;return 3===e.tag?(o=e.stateNode,i&&null!==t&&(i=31-pe(n),null===(r=(e=o.hiddenUpdates)[i])?e[i]=[t]:r.push(t),t.lane=536870912|n),o):null}function Br(e){if(50<Nl)throw Nl=0,Bl=null,Error(a(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Rr={};function jr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lr(e,t,n,r){return new jr(e,t,n,r)}function Fr(e){return!(!(e=e.prototype)||!e.isReactComponent)}function zr(e,t){var n=e.alternate;return null===n?((n=Lr(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Dr(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ur(e,t,n,r,i,o){var s=0;if(r=e,"function"===typeof e)Fr(e)&&(s=1);else if("string"===typeof e)s=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!==typeof t.precedence||"string"!==typeof t.href||""===t.href)break;return!0;case"link":if("string"!==typeof t.rel||"string"!==typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"===typeof t.precedence&&null==e);case"script":if(t.async&&"function"!==typeof t.async&&"symbol"!==typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"===typeof t.src)return!0}return!1}(e,n,q.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case C:return(e=Lr(31,n,t,i)).elementType=C,e.lanes=o,e;case b:return Wr(n.children,i,o,t);case y:s=8,i|=24;break;case v:return(e=Lr(12,n,t,2|i)).elementType=v,e.lanes=o,e;case S:return(e=Lr(13,n,t,i)).elementType=S,e.lanes=o,e;case E:return(e=Lr(19,n,t,i)).elementType=E,e.lanes=o,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case w:case k:s=10;break e;case _:s=9;break e;case x:s=11;break e;case A:s=14;break e;case P:s=16,r=null;break e}s=29,n=Error(a(130,null===e?"null":typeof e,"")),r=null}return(t=Lr(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Wr(e,t,n,r){return(e=Lr(7,e,r,t)).lanes=n,e}function qr(e,t,n){return(e=Lr(6,e,null,t)).lanes=n,e}function Hr(e,t,n){return(t=Lr(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kr=[],Vr=0,$r=null,Gr=0,Zr=[],Jr=0,Yr=null,Qr=1,Xr="";function ei(e,t){Kr[Vr++]=Gr,Kr[Vr++]=$r,$r=e,Gr=t}function ti(e,t,n){Zr[Jr++]=Qr,Zr[Jr++]=Xr,Zr[Jr++]=Yr,Yr=e;var r=Qr;e=Xr;var i=32-pe(r)-1;r&=~(1<<i),n+=1;var o=32-pe(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Qr=1<<32-pe(t)+i|n<<i|r,Xr=o+e}else Qr=1<<o|n<<i|r,Xr=e}function ni(e){null!==e.return&&(ei(e,1),ti(e,1,0))}function ri(e){for(;e===$r;)$r=Kr[--Vr],Kr[Vr]=null,Gr=Kr[--Vr],Kr[Vr]=null;for(;e===Yr;)Yr=Zr[--Jr],Zr[Jr]=null,Xr=Zr[--Jr],Zr[Jr]=null,Qr=Zr[--Jr],Zr[Jr]=null}var ii=null,oi=null,si=!1,ai=null,ci=!1,li=Error(a(519));function ui(e){throw gi(Er(Error(a(418,"")),e)),li}function di(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Ne]=e,t[Be]=r,n){case"dialog":Fu("cancel",t),Fu("close",t);break;case"iframe":case"object":case"embed":Fu("load",t);break;case"video":case"audio":for(n=0;n<Ru.length;n++)Fu(Ru[n],t);break;case"source":Fu("error",t);break;case"img":case"image":case"link":Fu("error",t),Fu("load",t);break;case"details":Fu("toggle",t);break;case"input":Fu("invalid",t),yt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0),ht(t);break;case"select":Fu("invalid",t);break;case"textarea":Fu("invalid",t),kt(t,r.value,r.defaultValue,r.children),ht(t)}"string"!==typeof(n=r.children)&&"number"!==typeof n&&"bigint"!==typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||Yu(t.textContent,n)?(null!=r.popover&&(Fu("beforetoggle",t),Fu("toggle",t)),null!=r.onScroll&&Fu("scroll",t),null!=r.onScrollEnd&&Fu("scrollend",t),null!=r.onClick&&(t.onclick=Qu),t=!0):t=!1,t||ui(e)}function hi(e){for(ii=e.return;ii;)switch(ii.tag){case 5:case 13:return void(ci=!1);case 27:case 3:return void(ci=!0);default:ii=ii.return}}function fi(e){if(e!==ii)return!1;if(!si)return hi(e),si=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||ad(e.type,e.memoizedProps)),t=!t),t&&oi&&ui(e),hi(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,n=0;e;){if(8===e.nodeType)if("/$"===(t=e.data)){if(0===n){oi=yd(e.nextSibling);break e}n--}else"$"!==t&&"$!"!==t&&"$?"!==t||n++;e=e.nextSibling}oi=null}}else 27===n?(n=oi,pd(e.type)?(e=vd,vd=null,oi=e):oi=n):oi=ii?yd(e.stateNode.nextSibling):null;return!0}function pi(){oi=ii=null,si=!1}function mi(){var e=ai;return null!==e&&(null===wl?wl=e:wl.push.apply(wl,e),ai=null),e}function gi(e){null===ai?ai=[e]:ai.push(e)}var bi=D(null),yi=null,vi=null;function wi(e,t,n){W(bi,t._currentValue),t._currentValue=n}function _i(e){e._currentValue=bi.current,U(bi)}function ki(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function xi(e,t,n,r){var i=e.child;for(null!==i&&(i.return=e);null!==i;){var o=i.dependencies;if(null!==o){var s=i.child;o=o.firstContext;e:for(;null!==o;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,null!==(c=o.alternate)&&(c.lanes|=n),ki(o.return,n,e),r||(s=null);break e}o=c.next}}else if(18===i.tag){if(null===(s=i.return))throw Error(a(341));s.lanes|=n,null!==(o=s.alternate)&&(o.lanes|=n),ki(s,n,e),s=null}else s=i.child;if(null!==s)s.return=i;else for(s=i;null!==s;){if(s===e){s=null;break}if(null!==(i=s.sibling)){i.return=s.return,s=i;break}s=s.return}i=s}}function Si(e,t,n,r){e=null;for(var i=t,o=!1;null!==i;){if(!o)if(0!==(524288&i.flags))o=!0;else if(0!==(262144&i.flags))break;if(10===i.tag){var s=i.alternate;if(null===s)throw Error(a(387));if(null!==(s=s.memoizedProps)){var c=i.type;Jn(i.pendingProps.value,s.value)||(null!==e?e.push(c):e=[c])}}else if(i===V.current){if(null===(s=i.alternate))throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(null!==e?e.push(Zd):e=[Zd])}i=i.return}null!==e&&xi(t,e,n,r),t.flags|=262144}function Ei(e){for(e=e.firstContext;null!==e;){if(!Jn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ai(e){yi=e,vi=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Pi(e){return Ii(yi,e)}function Ci(e,t){return null===yi&&Ai(e),Ii(e,t)}function Ii(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===vi){if(null===e)throw Error(a(308));vi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else vi=vi.next=t;return n}var Mi="undefined"!==typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ti=i.unstable_scheduleCallback,Oi=i.unstable_NormalPriority,Ni={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bi(){return{controller:new Mi,data:new Map,refCount:0}}function Ri(e){e.refCount--,0===e.refCount&&Ti(Oi,function(){e.controller.abort()})}var ji=null,Li=0,Fi=0,zi=null;function Di(){if(0===--Li&&null!==ji){null!==zi&&(zi.status="fulfilled");var e=ji;ji=null,Fi=0,zi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var Ui=R.S;R.S=function(e,t){"object"===typeof t&&null!==t&&"function"===typeof t.then&&function(e,t){if(null===ji){var n=ji=[];Li=0,Fi=Mu(),zi={status:"pending",value:void 0,then:function(e){n.push(e)}}}Li++,t.then(Di,Di)}(0,t),null!==Ui&&Ui(e,t)};var Wi=D(null);function qi(){var e=Wi.current;return null!==e?e:il.pooledCache}function Hi(e,t){W(Wi,null===t?Wi.current:t.pool)}function Ki(){var e=qi();return null===e?null:{parent:Ni._currentValue,pool:e}}var Vi=Error(a(460)),$i=Error(a(474)),Gi=Error(a(542)),Zi={then:function(){}};function Ji(e){return"fulfilled"===(e=e.status)||"rejected"===e}function Yi(){}function Qi(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Yi,Yi),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw to(e=t.reason),e;default:if("string"===typeof t.status)t.then(Yi,Yi);else{if(null!==(e=il)&&100<e.shellSuspendCounter)throw Error(a(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw to(e=t.reason),e}throw Xi=t,Vi}}var Xi=null;function eo(){if(null===Xi)throw Error(a(459));var e=Xi;return Xi=null,e}function to(e){if(e===Vi||e===Gi)throw Error(a(483))}var no=!1;function ro(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function io(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function oo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function so(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&rl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Br(e),Nr(e,null,n),t}return Mr(e,r,t,n),Br(e)}function ao(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194048&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ce(e,n)}}function co(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?i=o=s:o=o.next=s,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var lo=!1;function uo(){if(lo){if(null!==zi)throw zi}}function ho(e,t,n,r){lo=!1;var i=e.updateQueue;no=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(null!==a){i.shared.pending=null;var c=a,l=c.next;c.next=null,null===s?o=l:s.next=l,s=c;var u=e.alternate;null!==u&&((a=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===a?u.firstBaseUpdate=l:a.next=l,u.lastBaseUpdate=c))}if(null!==o){var d=i.baseState;for(s=0,u=l=c=null,a=o;;){var h=-536870913&a.lane,p=h!==a.lane;if(p?(sl&h)===h:(r&h)===h){0!==h&&h===Fi&&(lo=!0),null!==u&&(u=u.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var m=e,g=a;h=t;var b=n;switch(g.tag){case 1:if("function"===typeof(m=g.payload)){d=m.call(b,d,h);break e}d=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null===(h="function"===typeof(m=g.payload)?m.call(b,d,h):m)||void 0===h)break e;d=f({},d,h);break e;case 2:no=!0}}null!==(h=a.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=i.callbacks)?i.callbacks=[h]:p.push(h))}else p={lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===u?(l=u=p,c=d):u=u.next=p,s|=h;if(null===(a=a.next)){if(null===(a=i.shared.pending))break;a=(p=a).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}null===u&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,null===o&&(i.shared.lanes=0),pl|=s,e.lanes=s,e.memoizedState=d}}function fo(e,t){if("function"!==typeof e)throw Error(a(191,e));e.call(t)}function po(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)fo(n[e],t)}var mo=D(null),go=D(0);function bo(e,t){W(go,e=hl),W(mo,t),hl=e|t.baseLanes}function yo(){W(go,hl),W(mo,mo.current)}function vo(){hl=go.current,U(mo),U(go)}var wo=0,_o=null,ko=null,xo=null,So=!1,Eo=!1,Ao=!1,Po=0,Co=0,Io=null,Mo=0;function To(){throw Error(a(321))}function Oo(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Jn(e[n],t[n]))return!1;return!0}function No(e,t,n,r,i,o){return wo=o,_o=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=null===e||null===e.memoizedState?$s:Gs,Ao=!1,o=n(r,i),Ao=!1,Eo&&(o=Ro(t,n,r,i)),Bo(e),o}function Bo(e){R.H=Vs;var t=null!==ko&&null!==ko.next;if(wo=0,xo=ko=_o=null,So=!1,Co=0,Io=null,t)throw Error(a(300));null===e||Ca||null!==(e=e.dependencies)&&Ei(e)&&(Ca=!0)}function Ro(e,t,n,r){_o=e;var i=0;do{if(Eo&&(Io=null),Co=0,Eo=!1,25<=i)throw Error(a(301));if(i+=1,xo=ko=null,null!=e.updateQueue){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,null!=o.memoCache&&(o.memoCache.index=0)}R.H=Zs,o=t(n,r)}while(Eo);return o}function jo(){var e=R.H,t=e.useState()[0];return t="function"===typeof t.then?Wo(t):t,e=e.useState()[0],(null!==ko?ko.memoizedState:null)!==e&&(_o.flags|=1024),t}function Lo(){var e=0!==Po;return Po=0,e}function Fo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function zo(e){if(So){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}So=!1}wo=0,xo=ko=_o=null,Eo=!1,Co=Po=0,Io=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===xo?_o.memoizedState=xo=e:xo=xo.next=e,xo}function Uo(){if(null===ko){var e=_o.alternate;e=null!==e?e.memoizedState:null}else e=ko.next;var t=null===xo?_o.memoizedState:xo.next;if(null!==t)xo=t,ko=e;else{if(null===e){if(null===_o.alternate)throw Error(a(467));throw Error(a(310))}e={memoizedState:(ko=e).memoizedState,baseState:ko.baseState,baseQueue:ko.baseQueue,queue:ko.queue,next:null},null===xo?_o.memoizedState=xo=e:xo=xo.next=e}return xo}function Wo(e){var t=Co;return Co+=1,null===Io&&(Io=[]),e=Qi(Io,e,t),t=_o,null===(null===xo?t.memoizedState:xo.next)&&(t=t.alternate,R.H=null===t||null===t.memoizedState?$s:Gs),e}function qo(e){if(null!==e&&"object"===typeof e){if("function"===typeof e.then)return Wo(e);if(e.$$typeof===k)return Pi(e)}throw Error(a(438,String(e)))}function Ho(e){var t=null,n=_o.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=_o.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},_o.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=I;return t.index++,n}function Ko(e,t){return"function"===typeof t?t(e):t}function Vo(e){return $o(Uo(),ko,e)}function $o(e,t,n){var r=e.queue;if(null===r)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,null===i)e.memoizedState=o;else{var c=s=null,l=null,u=t=i.next,d=!1;do{var h=-536870913&u.lane;if(h!==u.lane?(sl&h)===h:(wo&h)===h){var f=u.revertLane;if(0===f)null!==l&&(l=l.next={lane:0,revertLane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),h===Fi&&(d=!0);else{if((wo&f)===f){u=u.next,f===Fi&&(d=!0);continue}h={lane:0,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===l?(c=l=h,s=o):l=l.next=h,_o.lanes|=f,pl|=f}h=u.action,Ao&&n(o,h),o=u.hasEagerState?u.eagerState:n(o,h)}else f={lane:h,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===l?(c=l=f,s=o):l=l.next=f,_o.lanes|=h,pl|=h;u=u.next}while(null!==u&&u!==t);if(null===l?s=o:l.next=c,!Jn(o,e.memoizedState)&&(Ca=!0,d&&null!==(n=zi)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return null===i&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Go(e){var t=Uo(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);Jn(o,t.memoizedState)||(Ca=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Zo(e,t,n){var r=_o,i=Uo(),o=si;if(o){if(void 0===n)throw Error(a(407));n=n()}else n=t();var s=!Jn((ko||i).memoizedState,n);if(s&&(i.memoizedState=n,Ca=!0),i=i.queue,ys(2048,8,Qo.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||null!==xo&&1&xo.memoizedState.tag){if(r.flags|=2048,ms(9,{destroy:void 0,resource:void 0},Yo.bind(null,r,i,n,t),null),null===il)throw Error(a(349));o||0!==(124&wo)||Jo(r,t,n)}return n}function Jo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=_o.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},_o.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Yo(e,t,n,r){t.value=n,t.getSnapshot=r,Xo(t)&&es(e)}function Qo(e,t,n){return n(function(){Xo(t)&&es(e)})}function Xo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jn(e,n)}catch(r){return!0}}function es(e){var t=Or(e,2);null!==t&&Ll(t,e,2)}function ts(e){var t=Do();if("function"===typeof e){var n=e;if(e=n(),Ao){fe(!0);try{n()}finally{fe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:e},t}function ns(e,t,n,r){return e.baseState=n,$o(e,ko,"function"===typeof r?r:Ko)}function rs(e,t,n,r,i){if(qs(e))throw Error(a(485));if(null!==(e=t.action)){var o={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};null!==R.T?n(!0):o.isTransition=!1,r(o),null===(n=t.pending)?(o.next=t.pending=o,is(t,o)):(o.next=n.next,t.pending=n.next=o)}}function is(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var o=R.T,s={};R.T=s;try{var a=n(i,r),c=R.S;null!==c&&c(s,a),os(e,t,a)}catch(l){as(e,t,l)}finally{R.T=o}}else try{os(e,t,o=n(i,r))}catch(u){as(e,t,u)}}function os(e,t,n){null!==n&&"object"===typeof n&&"function"===typeof n.then?n.then(function(n){ss(e,t,n)},function(n){return as(e,t,n)}):ss(e,t,n)}function ss(e,t,n){t.status="fulfilled",t.value=n,cs(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,is(e,n)))}function as(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,cs(t),t=t.next}while(t!==r)}e.action=null}function cs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ls(e,t){return t}function us(e,t){if(si){var n=il.formState;if(null!==n){e:{var r=_o;if(si){if(oi){t:{for(var i=oi,o=ci;8!==i.nodeType;){if(!o){i=null;break t}if(null===(i=yd(i.nextSibling))){i=null;break t}}i="F!"===(o=i.data)||"F"===o?i:null}if(i){oi=yd(i.nextSibling),r="F!"===i.data;break e}}ui(r)}r=!1}r&&(t=n[0])}}return(n=Do()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:t},n.queue=r,n=Ds.bind(null,_o,r),r.dispatch=n,r=ts(!1),o=Ws.bind(null,_o,!1,r.queue),i={state:t,dispatch:null,action:e,pending:null},(r=Do()).queue=i,n=rs.bind(null,_o,i,o,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ds(e){return hs(Uo(),ko,e)}function hs(e,t,n){if(t=$o(e,t,ls)[0],e=Vo(Ko)[0],"object"===typeof t&&null!==t&&"function"===typeof t.then)try{var r=Wo(t)}catch(s){if(s===Vi)throw Gi;throw s}else r=t;var i=(t=Uo()).queue,o=i.dispatch;return n!==t.memoizedState&&(_o.flags|=2048,ms(9,{destroy:void 0,resource:void 0},fs.bind(null,i,n),null)),[r,o,e]}function fs(e,t){e.action=t}function ps(e){var t=Uo(),n=ko;if(null!==n)return hs(t,n,e);Uo(),t=t.memoizedState;var r=(n=Uo()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ms(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=_o.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},_o.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function gs(){return Uo().memoizedState}function bs(e,t,n,r){var i=Do();r=void 0===r?null:r,_o.flags|=e,i.memoizedState=ms(1|t,{destroy:void 0,resource:void 0},n,r)}function ys(e,t,n,r){var i=Uo();r=void 0===r?null:r;var o=i.memoizedState.inst;null!==ko&&null!==r&&Oo(r,ko.memoizedState.deps)?i.memoizedState=ms(t,o,n,r):(_o.flags|=e,i.memoizedState=ms(1|t,o,n,r))}function vs(e,t){bs(8390656,8,e,t)}function ws(e,t){ys(2048,8,e,t)}function _s(e,t){return ys(4,2,e,t)}function ks(e,t){return ys(4,4,e,t)}function xs(e,t){if("function"===typeof t){e=e();var n=t(e);return function(){"function"===typeof n?n():t(null)}}if(null!==t&&void 0!==t)return e=e(),t.current=e,function(){t.current=null}}function Ss(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,ys(4,4,xs.bind(null,t,e),n)}function Es(){}function As(e,t){var n=Uo();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&Oo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ps(e,t){var n=Uo();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&Oo(t,r[1]))return r[0];if(r=e(),Ao){fe(!0);try{e()}finally{fe(!1)}}return n.memoizedState=[r,t],r}function Cs(e,t,n){return void 0===n||0!==(1073741824&wo)?e.memoizedState=t:(e.memoizedState=n,e=jl(),_o.lanes|=e,pl|=e,n)}function Is(e,t,n,r){return Jn(n,t)?n:null!==mo.current?(e=Cs(e,n,r),Jn(e,t)||(Ca=!0),e):0===(42&wo)?(Ca=!0,e.memoizedState=n):(e=jl(),_o.lanes|=e,pl|=e,t)}function Ms(e,t,n,r,i){var o=j.p;j.p=0!==o&&8>o?o:8;var s=R.T,a={};R.T=a,Ws(e,!1,t,n);try{var c=i(),l=R.S;if(null!==l&&l(a,c),null!==c&&"object"===typeof c&&"function"===typeof c.then)Us(e,t,function(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status="rejected",r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}(c,r),Rl());else Us(e,t,r,Rl())}catch(u){Us(e,t,{then:function(){},status:"rejected",reason:u},Rl())}finally{j.p=o,R.T=s}}function Ts(){}function Os(e,t,n,r){if(5!==e.tag)throw Error(a(476));var i=Ns(e).queue;Ms(e,i,t,L,null===n?Ts:function(){return Bs(e),n(r)})}function Ns(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:L,baseState:L,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:L},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function Bs(e){Us(e,Ns(e).next.queue,{},Rl())}function Rs(){return Pi(Zd)}function js(){return Uo().memoizedState}function Ls(){return Uo().memoizedState}function Fs(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=Rl(),r=so(t,e=oo(n),n);return null!==r&&(Ll(r,t,n),ao(r,t,n)),t={cache:Bi()},void(e.payload=t)}t=t.return}}function zs(e,t,n){var r=Rl();n={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},qs(e)?Hs(t,n):null!==(n=Tr(e,t,n,r))&&(Ll(n,e,r),Ks(n,t,r))}function Ds(e,t,n){Us(e,t,n,Rl())}function Us(e,t,n,r){var i={lane:r,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(qs(e))Hs(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Jn(a,s))return Mr(e,t,i,0),null===il&&Ir(),!1}catch(c){}if(null!==(n=Tr(e,t,i,r)))return Ll(n,e,r),Ks(n,t,r),!0}return!1}function Ws(e,t,n,r){if(r={lane:2,revertLane:Mu(),action:r,hasEagerState:!1,eagerState:null,next:null},qs(e)){if(t)throw Error(a(479))}else null!==(t=Tr(e,n,r,2))&&Ll(t,e,2)}function qs(e){var t=e.alternate;return e===_o||null!==t&&t===_o}function Hs(e,t){Eo=So=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ks(e,t,n){if(0!==(4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ce(e,n)}}var Vs={readContext:Pi,use:qo,useCallback:To,useContext:To,useEffect:To,useImperativeHandle:To,useLayoutEffect:To,useInsertionEffect:To,useMemo:To,useReducer:To,useRef:To,useState:To,useDebugValue:To,useDeferredValue:To,useTransition:To,useSyncExternalStore:To,useId:To,useHostTransitionStatus:To,useFormState:To,useActionState:To,useOptimistic:To,useMemoCache:To,useCacheRefresh:To},$s={readContext:Pi,use:qo,useCallback:function(e,t){return Do().memoizedState=[e,void 0===t?null:t],e},useContext:Pi,useEffect:vs,useImperativeHandle:function(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,bs(4194308,4,xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return bs(4194308,4,e,t)},useInsertionEffect:function(e,t){bs(4,2,e,t)},useMemo:function(e,t){var n=Do();t=void 0===t?null:t;var r=e();if(Ao){fe(!0);try{e()}finally{fe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(void 0!==n){var i=n(t);if(Ao){fe(!0);try{n(t)}finally{fe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=zs.bind(null,_o,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Do().memoizedState=e},useState:function(e){var t=(e=ts(e)).queue,n=Ds.bind(null,_o,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Es,useDeferredValue:function(e,t){return Cs(Do(),e,t)},useTransition:function(){var e=ts(!1);return e=Ms.bind(null,_o,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=_o,i=Do();if(si){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===il)throw Error(a(349));0!==(124&sl)||Jo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,vs(Qo.bind(null,r,o,e),[e]),r.flags|=2048,ms(9,{destroy:void 0,resource:void 0},Yo.bind(null,r,o,n,t),null),n},useId:function(){var e=Do(),t=il.identifierPrefix;if(si){var n=Xr;t="\xab"+t+"R"+(n=(Qr&~(1<<32-pe(Qr)-1)).toString(32)+n),0<(n=Po++)&&(t+="H"+n.toString(32)),t+="\xbb"}else t="\xab"+t+"r"+(n=Mo++).toString(32)+"\xbb";return e.memoizedState=t},useHostTransitionStatus:Rs,useFormState:us,useActionState:us,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ws.bind(null,_o,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ho,useCacheRefresh:function(){return Do().memoizedState=Fs.bind(null,_o)}},Gs={readContext:Pi,use:qo,useCallback:As,useContext:Pi,useEffect:ws,useImperativeHandle:Ss,useInsertionEffect:_s,useLayoutEffect:ks,useMemo:Ps,useReducer:Vo,useRef:gs,useState:function(){return Vo(Ko)},useDebugValue:Es,useDeferredValue:function(e,t){return Is(Uo(),ko.memoizedState,e,t)},useTransition:function(){var e=Vo(Ko)[0],t=Uo().memoizedState;return["boolean"===typeof e?e:Wo(e),t]},useSyncExternalStore:Zo,useId:js,useHostTransitionStatus:Rs,useFormState:ds,useActionState:ds,useOptimistic:function(e,t){return ns(Uo(),0,e,t)},useMemoCache:Ho,useCacheRefresh:Ls},Zs={readContext:Pi,use:qo,useCallback:As,useContext:Pi,useEffect:ws,useImperativeHandle:Ss,useInsertionEffect:_s,useLayoutEffect:ks,useMemo:Ps,useReducer:Go,useRef:gs,useState:function(){return Go(Ko)},useDebugValue:Es,useDeferredValue:function(e,t){var n=Uo();return null===ko?Cs(n,e,t):Is(n,ko.memoizedState,e,t)},useTransition:function(){var e=Go(Ko)[0],t=Uo().memoizedState;return["boolean"===typeof e?e:Wo(e),t]},useSyncExternalStore:Zo,useId:js,useHostTransitionStatus:Rs,useFormState:ps,useActionState:ps,useOptimistic:function(e,t){var n=Uo();return null!==ko?ns(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Ho,useCacheRefresh:Ls},Js=null,Ys=0;function Qs(e){var t=Ys;return Ys+=1,null===Js&&(Js=[]),Qi(Js,e,t)}function Xs(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function ea(e,t){if(t.$$typeof===p)throw Error(a(525));throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ta(e){return(0,e._init)(e._payload)}function na(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(e,t){return(e=zr(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function c(e,t,n,r){return null===t||6!==t.tag?((t=qr(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var o=n.type;return o===b?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"===typeof o&&null!==o&&o.$$typeof===P&&ta(o)===t.type)?(Xs(t=i(t,n.props),n),t.return=e,t):(Xs(t=Ur(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Hr(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,o){return null===t||7!==t.tag?((t=Wr(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t||"bigint"===typeof t)return(t=qr(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case m:return Xs(n=Ur(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case g:return(t=Hr(t,e.mode,n)).return=e,t;case P:return h(e,t=(0,t._init)(t._payload),n)}if(B(t)||T(t))return(t=Wr(t,e.mode,n,null)).return=e,t;if("function"===typeof t.then)return h(e,Qs(t),n);if(t.$$typeof===k)return h(e,Ci(e,t),n);ea(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n||"bigint"===typeof n)return null!==i?null:c(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case P:return f(e,t,n=(i=n._init)(n._payload),r)}if(B(n)||T(n))return null!==i?null:d(e,t,n,r,null);if("function"===typeof n.then)return f(e,t,Qs(n),r);if(n.$$typeof===k)return f(e,t,Ci(e,n),r);ea(e,n)}return null}function p(e,t,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r||"bigint"===typeof r)return c(t,e=e.get(n)||null,""+r,i);if("object"===typeof r&&null!==r){switch(r.$$typeof){case m:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case g:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case P:return p(e,t,n,r=(0,r._init)(r._payload),i)}if(B(r)||T(r))return d(t,e=e.get(n)||null,r,i,null);if("function"===typeof r.then)return p(e,t,n,Qs(r),i);if(r.$$typeof===k)return p(e,t,n,Ci(t,r),i);ea(t,r)}return null}function y(c,l,u,d){if("object"===typeof u&&null!==u&&u.type===b&&null===u.key&&(u=u.props.children),"object"===typeof u&&null!==u){switch(u.$$typeof){case m:e:{for(var v=u.key;null!==l;){if(l.key===v){if((v=u.type)===b){if(7===l.tag){n(c,l.sibling),(d=i(l,u.props.children)).return=c,c=d;break e}}else if(l.elementType===v||"object"===typeof v&&null!==v&&v.$$typeof===P&&ta(v)===l.type){n(c,l.sibling),Xs(d=i(l,u.props),u),d.return=c,c=d;break e}n(c,l);break}t(c,l),l=l.sibling}u.type===b?((d=Wr(u.props.children,c.mode,d,u.key)).return=c,c=d):(Xs(d=Ur(u.type,u.key,u.props,null,c.mode,d),u),d.return=c,c=d)}return s(c);case g:e:{for(v=u.key;null!==l;){if(l.key===v){if(4===l.tag&&l.stateNode.containerInfo===u.containerInfo&&l.stateNode.implementation===u.implementation){n(c,l.sibling),(d=i(l,u.children||[])).return=c,c=d;break e}n(c,l);break}t(c,l),l=l.sibling}(d=Hr(u,c.mode,d)).return=c,c=d}return s(c);case P:return y(c,l,u=(v=u._init)(u._payload),d)}if(B(u))return function(i,s,a,c){for(var l=null,u=null,d=s,m=s=0,g=null;null!==d&&m<a.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var b=f(i,d,a[m],c);if(null===b){null===d&&(d=g);break}e&&d&&null===b.alternate&&t(i,d),s=o(b,s,m),null===u?l=b:u.sibling=b,u=b,d=g}if(m===a.length)return n(i,d),si&&ei(i,m),l;if(null===d){for(;m<a.length;m++)null!==(d=h(i,a[m],c))&&(s=o(d,s,m),null===u?l=d:u.sibling=d,u=d);return si&&ei(i,m),l}for(d=r(d);m<a.length;m++)null!==(g=p(d,i,m,a[m],c))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),s=o(g,s,m),null===u?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),si&&ei(i,m),l}(c,l,u,d);if(T(u)){if("function"!==typeof(v=T(u)))throw Error(a(150));return function(i,s,c,l){if(null==c)throw Error(a(151));for(var u=null,d=null,m=s,g=s=0,b=null,y=c.next();null!==m&&!y.done;g++,y=c.next()){m.index>g?(b=m,m=null):b=m.sibling;var v=f(i,m,y.value,l);if(null===v){null===m&&(m=b);break}e&&m&&null===v.alternate&&t(i,m),s=o(v,s,g),null===d?u=v:d.sibling=v,d=v,m=b}if(y.done)return n(i,m),si&&ei(i,g),u;if(null===m){for(;!y.done;g++,y=c.next())null!==(y=h(i,y.value,l))&&(s=o(y,s,g),null===d?u=y:d.sibling=y,d=y);return si&&ei(i,g),u}for(m=r(m);!y.done;g++,y=c.next())null!==(y=p(m,i,g,y.value,l))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=o(y,s,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach(function(e){return t(i,e)}),si&&ei(i,g),u}(c,l,u=v.call(u),d)}if("function"===typeof u.then)return y(c,l,Qs(u),d);if(u.$$typeof===k)return y(c,l,Ci(c,u),d);ea(c,u)}return"string"===typeof u&&""!==u||"number"===typeof u||"bigint"===typeof u?(u=""+u,null!==l&&6===l.tag?(n(c,l.sibling),(d=i(l,u)).return=c,c=d):(n(c,l),(d=qr(u,c.mode,d)).return=c,c=d),s(c)):n(c,l)}return function(e,t,n,r){try{Ys=0;var i=y(e,t,n,r);return Js=null,i}catch(s){if(s===Vi||s===Gi)throw s;var o=Lr(29,s,null,e.mode);return o.lanes=r,o.return=e,o}}}var ra=na(!0),ia=na(!1),oa=D(null),sa=null;function aa(e){var t=e.alternate;W(da,1&da.current),W(oa,e),null===sa&&(null===t||null!==mo.current||null!==t.memoizedState)&&(sa=e)}function ca(e){if(22===e.tag){if(W(da,da.current),W(oa,e),null===sa){var t=e.alternate;null!==t&&null!==t.memoizedState&&(sa=e)}}else la()}function la(){W(da,da.current),W(oa,oa.current)}function ua(e){U(oa),sa===e&&(sa=null),U(da)}var da=D(0);function ha(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||bd(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function fa(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:f({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var pa={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Rl(),i=oo(r);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=so(e,i,r))&&(Ll(t,e,r),ao(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Rl(),i=oo(r);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),null!==(t=so(e,i,r))&&(Ll(t,e,r),ao(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Rl(),r=oo(n);r.tag=2,void 0!==t&&null!==t&&(r.callback=t),null!==(t=so(e,r,n))&&(Ll(t,e,n),ao(t,e,n))}};function ma(e,t,n,r,i,o,s){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,s):!t.prototype||!t.prototype.isPureReactComponent||(!Yn(n,r)||!Yn(i,o))}function ga(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&pa.enqueueReplaceState(t,t.state,null)}function ba(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)void 0===n[i]&&(n[i]=e[i]);return n}var ya="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof r&&"function"===typeof r.emit)return void r.emit("uncaughtException",e);console.error(e)};function va(e){ya(e)}function wa(e){console.error(e)}function _a(e){ya(e)}function ka(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function xa(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Sa(e,t,n){return(n=oo(n)).tag=3,n.payload={element:null},n.callback=function(){ka(e,t)},n}function Ea(e){return(e=oo(e)).tag=3,e}function Aa(e,t,n,r){var i=n.type.getDerivedStateFromError;if("function"===typeof i){var o=r.value;e.payload=function(){return i(o)},e.callback=function(){xa(t,n,r)}}var s=n.stateNode;null!==s&&"function"===typeof s.componentDidCatch&&(e.callback=function(){xa(t,n,r),"function"!==typeof i&&(null===El?El=new Set([this]):El.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Pa=Error(a(461)),Ca=!1;function Ia(e,t,n,r){t.child=null===e?ia(t,null,n,r):ra(t,e.child,n,r)}function Ma(e,t,n,r,i){n=n.render;var o=t.ref;if("ref"in r){var s={};for(var a in r)"ref"!==a&&(s[a]=r[a])}else s=r;return Ai(t),r=No(e,t,n,s,o,i),a=Lo(),null===e||Ca?(si&&a&&ni(t),t.flags|=1,Ia(e,t,r,i),t.child):(Fo(e,t,i),Ja(e,t,i))}function Ta(e,t,n,r,i){if(null===e){var o=n.type;return"function"!==typeof o||Fr(o)||void 0!==o.defaultProps||null!==n.compare?((e=Ur(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Oa(e,t,o,r,i))}if(o=e.child,!Ya(e,i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:Yn)(s,r)&&e.ref===t.ref)return Ja(e,t,i)}return t.flags|=1,(e=zr(o,r)).ref=t.ref,e.return=t,t.child=e}function Oa(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(Yn(o,r)&&e.ref===t.ref){if(Ca=!1,t.pendingProps=r=o,!Ya(e,i))return t.lanes=e.lanes,Ja(e,t,i);0!==(131072&e.flags)&&(Ca=!0)}}return ja(e,t,n,r,i)}function Na(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode){if(0!==(128&t.flags)){if(r=null!==o?o.baseLanes|n:n,null!==e){for(i=t.child=e.child,o=0;null!==i;)o=o|i.lanes|i.childLanes,i=i.sibling;t.childLanes=o&~r}else t.childLanes=0,t.child=null;return Ba(e,t,r,n)}if(0===(536870912&n))return t.lanes=t.childLanes=536870912,Ba(e,t,null!==o?o.baseLanes|n:n,n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Hi(0,null!==o?o.cachePool:null),null!==o?bo(t,o):yo(),ca(t)}else null!==o?(Hi(0,o.cachePool),bo(t,o),la(),t.memoizedState=null):(null!==e&&Hi(0,null),yo(),la());return Ia(e,t,i,n),t.child}function Ba(e,t,n,r){var i=qi();return i=null===i?null:{parent:Ni._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},null!==e&&Hi(0,null),yo(),ca(t),null!==e&&Si(e,t,r,!0),null}function Ra(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!==typeof n&&"object"!==typeof n)throw Error(a(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function ja(e,t,n,r,i){return Ai(t),n=No(e,t,n,r,void 0,i),r=Lo(),null===e||Ca?(si&&r&&ni(t),t.flags|=1,Ia(e,t,n,i),t.child):(Fo(e,t,i),Ja(e,t,i))}function La(e,t,n,r,i,o){return Ai(t),t.updateQueue=null,n=Ro(t,r,n,i),Bo(e),r=Lo(),null===e||Ca?(si&&r&&ni(t),t.flags|=1,Ia(e,t,n,o),t.child):(Fo(e,t,o),Ja(e,t,o))}function Fa(e,t,n,r,i){if(Ai(t),null===t.stateNode){var o=Rr,s=n.contextType;"object"===typeof s&&null!==s&&(o=Pi(s)),o=new n(r,o),t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,o.updater=pa,t.stateNode=o,o._reactInternals=t,(o=t.stateNode).props=r,o.state=t.memoizedState,o.refs={},ro(t),s=n.contextType,o.context="object"===typeof s&&null!==s?Pi(s):Rr,o.state=t.memoizedState,"function"===typeof(s=n.getDerivedStateFromProps)&&(fa(t,n,s,r),o.state=t.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(s=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),s!==o.state&&pa.enqueueReplaceState(o,o.state,null),ho(t,r,o,i),uo(),o.state=t.memoizedState),"function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){o=t.stateNode;var a=t.memoizedProps,c=ba(n,a);o.props=c;var l=o.context,u=n.contextType;s=Rr,"object"===typeof u&&null!==u&&(s=Pi(u));var d=n.getDerivedStateFromProps;u="function"===typeof d||"function"===typeof o.getSnapshotBeforeUpdate,a=t.pendingProps!==a,u||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(a||l!==s)&&ga(t,o,r,s),no=!1;var h=t.memoizedState;o.state=h,ho(t,r,o,i),uo(),l=t.memoizedState,a||h!==l||no?("function"===typeof d&&(fa(t,n,d,r),l=t.memoizedState),(c=no||ma(t,n,c,r,h,l,s))?(u||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(t.flags|=4194308)):("function"===typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=s,r=c):("function"===typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,io(e,t),u=ba(n,s=t.memoizedProps),o.props=u,d=t.pendingProps,h=o.context,l=n.contextType,c=Rr,"object"===typeof l&&null!==l&&(c=Pi(l)),(l="function"===typeof(a=n.getDerivedStateFromProps)||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==d||h!==c)&&ga(t,o,r,c),no=!1,h=t.memoizedState,o.state=h,ho(t,r,o,i),uo();var f=t.memoizedState;s!==d||h!==f||no||null!==e&&null!==e.dependencies&&Ei(e.dependencies)?("function"===typeof a&&(fa(t,n,a,r),f=t.memoizedState),(u=no||ma(t,n,u,r,h,f,c)||null!==e&&null!==e.dependencies&&Ei(e.dependencies))?(l||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,f,c),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,f,c)),"function"===typeof o.componentDidUpdate&&(t.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),o.props=r,o.state=f,o.context=c,r=u):("function"!==typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return o=r,Ra(e,t),r=0!==(128&t.flags),o||r?(o=t.stateNode,n=r&&"function"!==typeof n.getDerivedStateFromError?null:o.render(),t.flags|=1,null!==e&&r?(t.child=ra(t,e.child,null,i),t.child=ra(t,null,n,i)):Ia(e,t,n,i),t.memoizedState=o.state,e=t.child):e=Ja(e,t,i),e}function za(e,t,n,r){return pi(),t.flags|=256,Ia(e,t,n,r),t.child}var Da={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ua(e){return{baseLanes:e,cachePool:Ki()}}function Wa(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=bl),e}function qa(e,t,n){var r,i=t.pendingProps,o=!1,s=0!==(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&0!==(2&da.current)),r&&(o=!0,t.flags&=-129),r=0!==(32&t.flags),t.flags&=-33,null===e){if(si){if(o?aa(t):la(),si){var c,l=oi;if(c=l){e:{for(c=l,l=ci;8!==c.nodeType;){if(!l){l=null;break e}if(null===(c=yd(c.nextSibling))){l=null;break e}}l=c}null!==l?(t.memoizedState={dehydrated:l,treeContext:null!==Yr?{id:Qr,overflow:Xr}:null,retryLane:536870912,hydrationErrors:null},(c=Lr(18,null,null,0)).stateNode=l,c.return=t,t.child=c,ii=t,oi=null,c=!0):c=!1}c||ui(t)}if(null!==(l=t.memoizedState)&&null!==(l=l.dehydrated))return bd(l)?t.lanes=32:t.lanes=536870912,null;ua(t)}return l=i.children,i=i.fallback,o?(la(),l=Ka({mode:"hidden",children:l},o=t.mode),i=Wr(i,o,n,null),l.return=t,i.return=t,l.sibling=i,t.child=l,(o=t.child).memoizedState=Ua(n),o.childLanes=Wa(e,r,n),t.memoizedState=Da,i):(aa(t),Ha(t,l))}if(null!==(c=e.memoizedState)&&null!==(l=c.dehydrated)){if(s)256&t.flags?(aa(t),t.flags&=-257,t=Va(e,t,n)):null!==t.memoizedState?(la(),t.child=e.child,t.flags|=128,t=null):(la(),o=i.fallback,l=t.mode,i=Ka({mode:"visible",children:i.children},l),(o=Wr(o,l,n,null)).flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,ra(t,e.child,null,n),(i=t.child).memoizedState=Ua(n),i.childLanes=Wa(e,r,n),t.memoizedState=Da,t=o);else if(aa(t),bd(l)){if(r=l.nextSibling&&l.nextSibling.dataset)var u=r.dgst;r=u,(i=Error(a(419))).stack="",i.digest=r,gi({value:i,source:null,stack:null}),t=Va(e,t,n)}else if(Ca||Si(e,t,n,!1),r=0!==(n&e.childLanes),Ca||r){if(null!==(r=il)&&(0!==(i=0!==((i=0!==(42&(i=n&-n))?1:Ie(i))&(r.suspendedLanes|n))?0:i)&&i!==c.retryLane))throw c.retryLane=i,Or(e,i),Ll(r,e,i),Pa;"$?"===l.data||Gl(),t=Va(e,t,n)}else"$?"===l.data?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,oi=yd(l.nextSibling),ii=t,si=!0,ai=null,ci=!1,null!==e&&(Zr[Jr++]=Qr,Zr[Jr++]=Xr,Zr[Jr++]=Yr,Qr=e.id,Xr=e.overflow,Yr=t),(t=Ha(t,i.children)).flags|=4096);return t}return o?(la(),o=i.fallback,l=t.mode,u=(c=e.child).sibling,(i=zr(c,{mode:"hidden",children:i.children})).subtreeFlags=65011712&c.subtreeFlags,null!==u?o=zr(u,o):(o=Wr(o,l,n,null)).flags|=2,o.return=t,i.return=t,i.sibling=o,t.child=i,i=o,o=t.child,null===(l=e.child.memoizedState)?l=Ua(n):(null!==(c=l.cachePool)?(u=Ni._currentValue,c=c.parent!==u?{parent:u,pool:u}:c):c=Ki(),l={baseLanes:l.baseLanes|n,cachePool:c}),o.memoizedState=l,o.childLanes=Wa(e,r,n),t.memoizedState=Da,i):(aa(t),e=(n=e.child).sibling,(n=zr(n,{mode:"visible",children:i.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Ha(e,t){return(t=Ka({mode:"visible",children:t},e.mode)).return=e,e.child=t}function Ka(e,t){return(e=Lr(22,e,null,t)).lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Va(e,t,n){return ra(t,e.child,null,n),(e=Ha(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function $a(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),ki(e.return,t,n)}function Ga(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Za(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ia(e,t,r.children,n),0!==(2&(r=da.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&$a(e,n,t);else if(19===e.tag)$a(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}switch(W(da,r),i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ha(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ga(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ha(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ga(t,!0,n,null,o);break;case"together":Ga(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ja(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),pl|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(Si(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=zr(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=zr(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Ya(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Ei(e))}function Qa(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Ca=!0;else{if(!Ya(e,n)&&0===(128&t.flags))return Ca=!1,function(e,t,n){switch(t.tag){case 3:$(t,t.stateNode.containerInfo),wi(0,Ni,e.memoizedState.cache),pi();break;case 27:case 5:Z(t);break;case 4:$(t,t.stateNode.containerInfo);break;case 10:wi(0,t.type,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(aa(t),t.flags|=128,null):0!==(n&t.child.childLanes)?qa(e,t,n):(aa(t),null!==(e=Ja(e,t,n))?e.sibling:null);aa(t);break;case 19:var i=0!==(128&e.flags);if((r=0!==(n&t.childLanes))||(Si(e,t,n,!1),r=0!==(n&t.childLanes)),i){if(r)return Za(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),W(da,da.current),r)break;return null;case 22:case 23:return t.lanes=0,Na(e,t,n);case 24:wi(0,Ni,e.memoizedState.cache)}return Ja(e,t,n)}(e,t,n);Ca=0!==(131072&e.flags)}else Ca=!1,si&&0!==(1048576&t.flags)&&ti(t,Gr,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var r=t.elementType,i=r._init;if(r=i(r._payload),t.type=r,"function"!==typeof r){if(void 0!==r&&null!==r){if((i=r.$$typeof)===x){t.tag=11,t=Ma(null,t,r,e,n);break e}if(i===A){t.tag=14,t=Ta(null,t,r,e,n);break e}}throw t=N(r)||r,Error(a(306,t,""))}Fr(r)?(e=ba(r,e),t.tag=1,t=Fa(null,t,r,e,n)):(t.tag=0,t=ja(null,t,r,e,n))}return t;case 0:return ja(e,t,t.type,t.pendingProps,n);case 1:return Fa(e,t,r=t.type,i=ba(r,t.pendingProps),n);case 3:e:{if($(t,t.stateNode.containerInfo),null===e)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,io(e,t),ho(t,r,null,n);var s=t.memoizedState;if(r=s.cache,wi(0,Ni,r),r!==o.cache&&xi(t,[Ni],n,!0),uo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=za(e,t,r,n);break e}if(r!==i){gi(i=Er(Error(a(424)),t)),t=za(e,t,r,n);break e}if(9===(e=t.stateNode.containerInfo).nodeType)e=e.body;else e="HTML"===e.nodeName?e.ownerDocument.body:e;for(oi=yd(e.firstChild),ii=t,si=!0,ai=null,ci=!0,n=ia(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(pi(),r===i){t=Ja(e,t,n);break e}Ia(e,t,r,n)}t=t.child}return t;case 26:return Ra(e,t),null===e?(n=Id(t.type,null,t.pendingProps,null))?t.memoizedState=n:si||(n=t.type,e=t.pendingProps,(r=id(K.current).createElement(n))[Ne]=t,r[Be]=e,td(r,n,e),Ve(r),t.stateNode=r):t.memoizedState=Id(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Z(t),null===e&&si&&(r=t.stateNode=_d(t.type,t.pendingProps,K.current),ii=t,ci=!0,i=oi,pd(t.type)?(vd=i,oi=yd(r.firstChild)):oi=i),Ia(e,t,t.pendingProps.children,n),Ra(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&si&&((i=r=oi)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[De])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(o=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(o!==i.rel||e.getAttribute("href")!==(null==i.href||""===i.href?null:i.href)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin)||e.getAttribute("title")!==(null==i.title?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((o=e.getAttribute("src"))!==(null==i.src?null:i.src)||e.getAttribute("type")!==(null==i.type?null:i.type)||e.getAttribute("crossorigin")!==(null==i.crossOrigin?null:i.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var o=null==i.name?null:""+i.name;if("hidden"===i.type&&e.getAttribute("name")===o)return e}if(null===(e=yd(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,ci))?(t.stateNode=r,ii=t,oi=yd(r.firstChild),ci=!1,i=!0):i=!1),i||ui(t)),Z(t),i=t.type,o=t.pendingProps,s=null!==e?e.memoizedProps:null,r=o.children,ad(i,o)?r=null:null!==s&&ad(i,s)&&(t.flags|=32),null!==t.memoizedState&&(i=No(e,t,jo,null,null,n),Zd._currentValue=i),Ra(e,t),Ia(e,t,r,n),t.child;case 6:return null===e&&si&&((e=n=oi)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=yd(e.nextSibling)))return null}return e}(n,t.pendingProps,ci))?(t.stateNode=n,ii=t,oi=null,e=!0):e=!1),e||ui(t)),null;case 13:return qa(e,t,n);case 4:return $(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ra(t,null,r,n):Ia(e,t,r,n),t.child;case 11:return Ma(e,t,t.type,t.pendingProps,n);case 7:return Ia(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ia(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,wi(0,t.type,r.value),Ia(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Ai(t),r=r(i=Pi(i)),t.flags|=1,Ia(e,t,r,n),t.child;case 14:return Ta(e,t,t.type,t.pendingProps,n);case 15:return Oa(e,t,t.type,t.pendingProps,n);case 19:return Za(e,t,n);case 31:return r=t.pendingProps,n=t.mode,r={mode:r.mode,children:r.children},null===e?((n=Ka(r,n)).ref=t.ref,t.child=n,n.return=t,t=n):((n=zr(e.child,r)).ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return Na(e,t,n);case 24:return Ai(t),r=Pi(Ni),null===e?(null===(i=qi())&&(i=il,o=Bi(),i.pooledCache=o,o.refCount++,null!==o&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},ro(t),wi(0,Ni,i)):(0!==(e.lanes&n)&&(io(e,t),ho(t,null,null,n),uo()),i=e.memoizedState,o=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=i),wi(0,Ni,r)):(r=o.cache,wi(0,Ni,r),r!==i.cache&&xi(t,[Ni],n,!0))),Ia(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function Xa(e){e.flags|=4}function ec(e,t){if("stylesheet"!==t.type||0!==(4&t.state.loading))e.flags&=-16777217;else if(e.flags|=16777216,!Wd(t)){if(null!==(t=oa.current)&&((4194048&sl)===sl?null!==sa:(62914560&sl)!==sl&&0===(536870912&sl)||t!==sa))throw Xi=Zi,$i;e.flags|=8192}}function tc(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Se():536870912,e.lanes|=t,yl|=t)}function nc(e,t){if(!si)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function rc(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=65011712&i.subtreeFlags,r|=65011712&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function ic(e,t,n){var r=t.pendingProps;switch(ri(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return rc(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),_i(Ni),G(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(fi(t)?Xa(t):null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,mi())),rc(t),null;case 26:return n=t.memoizedState,null===e?(Xa(t),null!==n?(rc(t),ec(t,n)):(rc(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Xa(t),rc(t),ec(t,n)):(rc(t),t.flags&=-16777217):(e.memoizedProps!==r&&Xa(t),rc(t),t.flags&=-16777217),null;case 27:J(t),n=K.current;var i=t.type;if(null!==e&&null!=t.stateNode)e.memoizedProps!==r&&Xa(t);else{if(!r){if(null===t.stateNode)throw Error(a(166));return rc(t),null}e=q.current,fi(t)?di(t):(e=_d(i,r,n),t.stateNode=e,Xa(t))}return rc(t),null;case 5:if(J(t),n=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&Xa(t);else{if(!r){if(null===t.stateNode)throw Error(a(166));return rc(t),null}if(e=q.current,fi(t))di(t);else{switch(i=id(K.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":(e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"===typeof r.is?i.createElement("select",{is:r.is}):i.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"===typeof r.is?i.createElement(n,{is:r.is}):i.createElement(n)}}e[Ne]=t,e[Be]=r;e:for(i=t.child;null!==i;){if(5===i.tag||6===i.tag)e.appendChild(i.stateNode);else if(4!==i.tag&&27!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;null===i.sibling;){if(null===i.return||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(td(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Xa(t)}}return rc(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&Xa(t);else{if("string"!==typeof r&&null===t.stateNode)throw Error(a(166));if(e=K.current,fi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(i=ii))switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Ne]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||Yu(e.nodeValue,n)))||ui(t)}else(e=id(e).createTextNode(r))[Ne]=t,t.stateNode=e}return rc(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(i=fi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!i)throw Error(a(318));if(!(i=null!==(i=t.memoizedState)?i.dehydrated:null))throw Error(a(317));i[Ne]=t}else pi(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;rc(t),i=!1}else i=mi(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return 256&t.flags?(ua(t),t):(ua(t),null)}if(ua(t),0!==(128&t.flags))return t.lanes=n,t;if(n=null!==r,e=null!==e&&null!==e.memoizedState,n){i=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(i=r.alternate.memoizedState.cachePool.pool);var o=null;null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),tc(t,t.updateQueue),rc(t),null;case 4:return G(),null===e&&Uu(t.stateNode.containerInfo),rc(t),null;case 10:return _i(t.type),rc(t),null;case 19:if(U(da),null===(i=t.memoizedState))return rc(t),null;if(r=0!==(128&t.flags),null===(o=i.rendering))if(r)nc(i,!1);else{if(0!==fl||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(o=ha(e))){for(t.flags|=128,nc(i,!1),e=o.updateQueue,t.updateQueue=e,tc(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Dr(n,e),n=n.sibling;return W(da,1&da.current|2),t.child}e=e.sibling}null!==i.tail&&ne()>xl&&(t.flags|=128,r=!0,nc(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ha(o))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,tc(t,e),nc(i,!0),null===i.tail&&"hidden"===i.tailMode&&!o.alternate&&!si)return rc(t),null}else 2*ne()-i.renderingStartTime>xl&&536870912!==n&&(t.flags|=128,r=!0,nc(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=i.last)?e.sibling=o:t.child=o,i.last=o)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ne(),t.sibling=null,e=da.current,W(da,r?1&e|2:1&e),t):(rc(t),null);case 22:case 23:return ua(t),vo(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!==(536870912&n)&&0===(128&t.flags)&&(rc(t),6&t.subtreeFlags&&(t.flags|=8192)):rc(t),null!==(n=t.updateQueue)&&tc(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&U(Wi),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),_i(Ni),rc(t),null;case 25:case 30:return null}throw Error(a(156,t.tag))}function oc(e,t){switch(ri(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return _i(Ni),G(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return J(t),null;case 13:if(ua(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));pi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return U(da),null;case 4:return G(),null;case 10:return _i(t.type),null;case 22:case 23:return ua(t),vo(),null!==e&&U(Wi),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return _i(Ni),null;default:return null}}function sc(e,t){switch(ri(t),t.tag){case 3:_i(Ni),G();break;case 26:case 27:case 5:J(t);break;case 4:G();break;case 13:ua(t);break;case 19:U(da);break;case 10:_i(t.type);break;case 22:case 23:ua(t),vo(),null!==e&&U(Wi);break;case 24:_i(Ni)}}function ac(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var o=n.create,s=n.inst;r=o(),s.destroy=r}n=n.next}while(n!==i)}}catch(a){du(t,t.return,a)}}function cc(e,t,n){try{var r=t.updateQueue,i=null!==r?r.lastEffect:null;if(null!==i){var o=i.next;r=o;do{if((r.tag&e)===e){var s=r.inst,a=s.destroy;if(void 0!==a){s.destroy=void 0,i=t;var c=n,l=a;try{l()}catch(u){du(i,c,u)}}}r=r.next}while(r!==o)}}catch(u){du(t,t.return,u)}}function lc(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{po(t,n)}catch(r){du(e,e.return,r)}}}function uc(e,t,n){n.props=ba(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){du(e,t,r)}}function dc(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"===typeof n?e.refCleanup=n(r):n.current=r}}catch(i){du(e,t,i)}}function hc(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"===typeof r)try{r()}catch(i){du(e,t,i)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"===typeof n)try{n(null)}catch(o){du(e,t,o)}else n.current=null}function fc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(i){du(e,e.return,i)}}function pc(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(p in n){var h=n[p];if(n.hasOwnProperty(p)&&null!=h)switch(p){case"checked":case"value":break;case"defaultValue":l=h;default:r.hasOwnProperty(p)||Xu(e,t,p,null,r,h)}}for(var f in r){var p=r[f];if(h=n[f],r.hasOwnProperty(f)&&(null!=p||null!=h))switch(f){case"type":o=p;break;case"name":i=p;break;case"checked":u=p;break;case"defaultChecked":d=p;break;case"value":s=p;break;case"defaultValue":c=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(a(137,t));break;default:p!==h&&Xu(e,t,f,p,r,h)}}return void bt(e,s,c,l,u,d,o,i);case"select":for(o in p=s=c=f=null,n)if(l=n[o],n.hasOwnProperty(o)&&null!=l)switch(o){case"value":break;case"multiple":p=l;default:r.hasOwnProperty(o)||Xu(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(null!=o||null!=l))switch(i){case"value":f=o;break;case"defaultValue":c=o;break;case"multiple":s=o;default:o!==l&&Xu(e,t,i,o,r,l)}return t=c,n=s,r=p,void(null!=f?wt(e,!!n,f,!1):!!r!==!!n&&(null!=t?wt(e,!!n,t,!0):wt(e,!!n,n?[]:"",!1)));case"textarea":for(c in p=f=null,n)if(i=n[c],n.hasOwnProperty(c)&&null!=i&&!r.hasOwnProperty(c))switch(c){case"value":case"children":break;default:Xu(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(null!=i||null!=o))switch(s){case"value":f=i;break;case"defaultValue":p=i;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=i)throw Error(a(91));break;default:i!==o&&Xu(e,t,s,i,r,o)}return void _t(e,f,p);case"option":for(var m in n)if(f=n[m],n.hasOwnProperty(m)&&null!=f&&!r.hasOwnProperty(m))if("selected"===m)e.selected=!1;else Xu(e,t,m,null,r,f);for(l in r)if(f=r[l],p=n[l],r.hasOwnProperty(l)&&f!==p&&(null!=f||null!=p))if("selected"===l)e.selected=f&&"function"!==typeof f&&"symbol"!==typeof f;else Xu(e,t,l,f,r,p);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)f=n[g],n.hasOwnProperty(g)&&null!=f&&!r.hasOwnProperty(g)&&Xu(e,t,g,null,r,f);for(u in r)if(f=r[u],p=n[u],r.hasOwnProperty(u)&&f!==p&&(null!=f||null!=p))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(a(137,t));break;default:Xu(e,t,u,f,r,p)}return;default:if(Pt(t)){for(var b in n)f=n[b],n.hasOwnProperty(b)&&void 0!==f&&!r.hasOwnProperty(b)&&ed(e,t,b,void 0,r,f);for(d in r)f=r[d],p=n[d],!r.hasOwnProperty(d)||f===p||void 0===f&&void 0===p||ed(e,t,d,f,r,p);return}}for(var y in n)f=n[y],n.hasOwnProperty(y)&&null!=f&&!r.hasOwnProperty(y)&&Xu(e,t,y,null,r,f);for(h in r)f=r[h],p=n[h],!r.hasOwnProperty(h)||f===p||null==f&&null==p||Xu(e,t,h,f,r,p)}(r,e.type,n,t),r[Be]=t}catch(i){du(e,e.return,i)}}function mc(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&pd(e.type)||4===e.tag}function gc(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||mc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&pd(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function bc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Qu));else if(4!==r&&(27===r&&pd(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(bc(e,t,n),e=e.sibling;null!==e;)bc(e,t,n),e=e.sibling}function yc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&pd(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(yc(e,t,n),e=e.sibling;null!==e;)yc(e,t,n),e=e.sibling}function vc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);td(t,r,n),t[Ne]=e,t[Be]=n}catch(o){du(e,e.return,o)}}var wc=!1,_c=!1,kc=!1,xc="function"===typeof WeakSet?WeakSet:Set,Sc=null;function Ec(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Fc(e,n),4&r&&ac(5,n);break;case 1:if(Fc(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(s){du(n,n.return,s)}else{var i=ba(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){du(n,n.return,a)}}64&r&&lc(n),512&r&&dc(n,n.return);break;case 3:if(Fc(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{po(e,t)}catch(s){du(n,n.return,s)}}break;case 27:null===t&&4&r&&vc(n);case 26:case 5:Fc(e,n),null===t&&4&r&&fc(n),512&r&&dc(n,n.return);break;case 12:Fc(e,n);break;case 13:Fc(e,n),4&r&&Tc(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$?"!==e.data||"complete"===n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=mu.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||wc)){t=null!==t&&null!==t.memoizedState||_c,i=wc;var o=_c;wc=r,(_c=t)&&!o?Dc(e,n,0!==(8772&n.subtreeFlags)):Fc(e,n),wc=i,_c=o}break;case 30:break;default:Fc(e,n)}}function Ac(e){var t=e.alternate;null!==t&&(e.alternate=null,Ac(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ue(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Pc=null,Cc=!1;function Ic(e,t,n){for(n=n.child;null!==n;)Mc(e,t,n),n=n.sibling}function Mc(e,t,n){if(he&&"function"===typeof he.onCommitFiberUnmount)try{he.onCommitFiberUnmount(de,n)}catch(o){}switch(n.tag){case 26:_c||hc(n,t),Ic(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:_c||hc(n,t);var r=Pc,i=Cc;pd(n.type)&&(Pc=n.stateNode,Cc=!1),Ic(e,t,n),kd(n.stateNode),Pc=r,Cc=i;break;case 5:_c||hc(n,t);case 6:if(r=Pc,i=Cc,Pc=null,Ic(e,t,n),Cc=i,null!==(Pc=r))if(Cc)try{(9===Pc.nodeType?Pc.body:"HTML"===Pc.nodeName?Pc.ownerDocument.body:Pc).removeChild(n.stateNode)}catch(s){du(n,t,s)}else try{Pc.removeChild(n.stateNode)}catch(s){du(n,t,s)}break;case 18:null!==Pc&&(Cc?(md(9===(e=Pc).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Ch(e)):md(Pc,n.stateNode));break;case 4:r=Pc,i=Cc,Pc=n.stateNode.containerInfo,Cc=!0,Ic(e,t,n),Pc=r,Cc=i;break;case 0:case 11:case 14:case 15:_c||cc(2,n,t),_c||cc(4,n,t),Ic(e,t,n);break;case 1:_c||(hc(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount&&uc(n,t,r)),Ic(e,t,n);break;case 21:Ic(e,t,n);break;case 22:_c=(r=_c)||null!==n.memoizedState,Ic(e,t,n),_c=r;break;default:Ic(e,t,n)}}function Tc(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Ch(e)}catch(n){du(t,t.return,n)}}function Oc(e,t){var n=function(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new xc),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new xc),t;default:throw Error(a(435,e.tag))}}(e);t.forEach(function(t){var r=gu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}function Nc(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;e:for(;null!==c;){switch(c.tag){case 27:if(pd(c.type)){Pc=c.stateNode,Cc=!1;break e}break;case 5:Pc=c.stateNode,Cc=!1;break e;case 3:case 4:Pc=c.stateNode.containerInfo,Cc=!0;break e}c=c.return}if(null===Pc)throw Error(a(160));Mc(o,s,i),Pc=null,Cc=!1,null!==(o=i.alternate)&&(o.return=null),i.return=null}if(13878&t.subtreeFlags)for(t=t.child;null!==t;)Rc(t,e),t=t.sibling}var Bc=null;function Rc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Nc(t,e),jc(e),4&r&&(cc(3,e,e.return),ac(3,e),cc(5,e,e.return));break;case 1:Nc(t,e),jc(e),512&r&&(_c||null===n||hc(n,n.return)),64&r&&wc&&(null!==(e=e.updateQueue)&&(null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r))));break;case 26:var i=Bc;if(Nc(t,e),jc(e),512&r&&(_c||null===n||hc(n,n.return)),4&r){var o=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(r){case"title":(!(o=i.getElementsByTagName("title")[0])||o[De]||o[Ne]||"http://www.w3.org/2000/svg"===o.namespaceURI||o.hasAttribute("itemprop"))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector("head > title"))),td(o,r,n),o[Ne]=e,Ve(o),r=o;break e;case"link":var s=Dd("link","href",i).get(r+(n.href||""));if(s)for(var c=0;c<s.length;c++)if((o=s[c]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&o.getAttribute("rel")===(null==n.rel?null:n.rel)&&o.getAttribute("title")===(null==n.title?null:n.title)&&o.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){s.splice(c,1);break t}td(o=i.createElement(r),r,n),i.head.appendChild(o);break;case"meta":if(s=Dd("meta","content",i).get(r+(n.content||"")))for(c=0;c<s.length;c++)if((o=s[c]).getAttribute("content")===(null==n.content?null:""+n.content)&&o.getAttribute("name")===(null==n.name?null:n.name)&&o.getAttribute("property")===(null==n.property?null:n.property)&&o.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&o.getAttribute("charset")===(null==n.charSet?null:n.charSet)){s.splice(c,1);break t}td(o=i.createElement(r),r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[Ne]=e,Ve(o),r=o}e.stateNode=r}else Ud(i,e.type,e.stateNode);else e.stateNode=Rd(i,r,e.memoizedProps);else o!==r?(null===o?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):o.count--,null===r?Ud(i,e.type,e.stateNode):Rd(i,r,e.memoizedProps)):null===r&&null!==e.stateNode&&pc(e,e.memoizedProps,n.memoizedProps)}break;case 27:Nc(t,e),jc(e),512&r&&(_c||null===n||hc(n,n.return)),null!==n&&4&r&&pc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Nc(t,e),jc(e),512&r&&(_c||null===n||hc(n,n.return)),32&e.flags){i=e.stateNode;try{xt(i,"")}catch(p){du(e,e.return,p)}}4&r&&null!=e.stateNode&&pc(e,i=e.memoizedProps,null!==n?n.memoizedProps:i),1024&r&&(kc=!0);break;case 6:if(Nc(t,e),jc(e),4&r){if(null===e.stateNode)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(p){du(e,e.return,p)}}break;case 3:if(zd=null,i=Bc,Bc=Ed(t.containerInfo),Nc(t,e),Bc=i,jc(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ch(t.containerInfo)}catch(p){du(e,e.return,p)}kc&&(kc=!1,Lc(e));break;case 4:r=Bc,Bc=Ed(e.stateNode.containerInfo),Nc(t,e),jc(e),Bc=r;break;case 12:default:Nc(t,e),jc(e);break;case 13:Nc(t,e),jc(e),8192&e.child.flags&&null!==e.memoizedState!==(null!==n&&null!==n.memoizedState)&&(kl=ne()),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Oc(e,r)));break;case 22:i=null!==e.memoizedState;var l=null!==n&&null!==n.memoizedState,u=wc,d=_c;if(wc=u||i,_c=d||l,Nc(t,e),_c=d,wc=u,jc(e),8192&r)e:for(t=e.stateNode,t._visibility=i?-2&t._visibility:1|t._visibility,i&&(null===n||l||wc||_c||zc(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){l=n=t;try{if(o=l.stateNode,i)"function"===typeof(s=o.style).setProperty?s.setProperty("display","none","important"):s.display="none";else{c=l.stateNode;var h=l.memoizedProps.style,f=void 0!==h&&null!==h&&h.hasOwnProperty("display")?h.display:null;c.style.display=null==f||"boolean"===typeof f?"":(""+f).trim()}}catch(p){du(l,l.return,p)}}}else if(6===t.tag){if(null===n){l=t;try{l.stateNode.nodeValue=i?"":l.memoizedProps}catch(p){du(l,l.return,p)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&(null!==(r=e.updateQueue)&&(null!==(n=r.retryQueue)&&(r.retryQueue=null,Oc(e,n))));break;case 19:Nc(t,e),jc(e),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Oc(e,r)));case 30:case 21:}}function jc(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(mc(r)){n=r;break}r=r.return}if(null==n)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;yc(e,gc(e),i);break;case 5:var o=n.stateNode;32&n.flags&&(xt(o,""),n.flags&=-33),yc(e,gc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;bc(e,gc(e),s);break;default:throw Error(a(161))}}catch(c){du(e,e.return,c)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Lc(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Lc(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Fc(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Ec(e,t.alternate,t),t=t.sibling}function zc(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:cc(4,t,t.return),zc(t);break;case 1:hc(t,t.return);var n=t.stateNode;"function"===typeof n.componentWillUnmount&&uc(t,t.return,n),zc(t);break;case 27:kd(t.stateNode);case 26:case 5:hc(t,t.return),zc(t);break;case 22:null===t.memoizedState&&zc(t);break;default:zc(t)}e=e.sibling}}function Dc(e,t,n){for(n=n&&0!==(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,i=e,o=t,s=o.flags;switch(o.tag){case 0:case 11:case 15:Dc(i,o,n),ac(4,o);break;case 1:if(Dc(i,o,n),"function"===typeof(i=(r=o).stateNode).componentDidMount)try{i.componentDidMount()}catch(l){du(r,r.return,l)}if(null!==(i=(r=o).updateQueue)){var a=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(null!==c)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)fo(c[i],a)}catch(l){du(r,r.return,l)}}n&&64&s&&lc(o),dc(o,o.return);break;case 27:vc(o);case 26:case 5:Dc(i,o,n),n&&null===r&&4&s&&fc(o),dc(o,o.return);break;case 12:Dc(i,o,n);break;case 13:Dc(i,o,n),n&&4&s&&Tc(i,o);break;case 22:null===o.memoizedState&&Dc(i,o,n),dc(o,o.return);break;case 30:break;default:Dc(i,o,n)}t=t.sibling}}function Uc(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&Ri(n))}function Wc(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ri(e))}function qc(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)Hc(e,t,n,r),t=t.sibling}function Hc(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:qc(e,t,n,r),2048&i&&ac(9,t);break;case 1:case 13:default:qc(e,t,n,r);break;case 3:qc(e,t,n,r),2048&i&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&Ri(e)));break;case 12:if(2048&i){qc(e,t,n,r),e=t.stateNode;try{var o=t.memoizedProps,s=o.id,a=o.onPostCommit;"function"===typeof a&&a(s,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(c){du(t,t.return,c)}}else qc(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,null!==t.memoizedState?2&o._visibility?qc(e,t,n,r):Vc(e,t):2&o._visibility?qc(e,t,n,r):(o._visibility|=2,Kc(e,t,n,r,0!==(10256&t.subtreeFlags))),2048&i&&Uc(s,t);break;case 24:qc(e,t,n,r),2048&i&&Wc(t.alternate,t)}}function Kc(e,t,n,r,i){for(i=i&&0!==(10256&t.subtreeFlags),t=t.child;null!==t;){var o=e,s=t,a=n,c=r,l=s.flags;switch(s.tag){case 0:case 11:case 15:Kc(o,s,a,c,i),ac(8,s);break;case 23:break;case 22:var u=s.stateNode;null!==s.memoizedState?2&u._visibility?Kc(o,s,a,c,i):Vc(o,s):(u._visibility|=2,Kc(o,s,a,c,i)),i&&2048&l&&Uc(s.alternate,s);break;case 24:Kc(o,s,a,c,i),i&&2048&l&&Wc(s.alternate,s);break;default:Kc(o,s,a,c,i)}t=t.sibling}}function Vc(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Vc(n,r),2048&i&&Uc(r.alternate,r);break;case 24:Vc(n,r),2048&i&&Wc(r.alternate,r);break;default:Vc(n,r)}t=t.sibling}}var $c=8192;function Gc(e){if(e.subtreeFlags&$c)for(e=e.child;null!==e;)Zc(e),e=e.sibling}function Zc(e){switch(e.tag){case 26:Gc(e),e.flags&$c&&null!==e.memoizedState&&function(e,t,n){if(null===qd)throw Error(a(475));var r=qd;if("stylesheet"===t.type&&("string"!==typeof n.media||!1!==matchMedia(n.media).matches)&&0===(4&t.state.loading)){if(null===t.instance){var i=Md(n.href),o=e.querySelector(Td(i));if(o)return null!==(e=o._p)&&"object"===typeof e&&"function"===typeof e.then&&(r.count++,r=Kd.bind(r),e.then(r,r)),t.state.loading|=4,t.instance=o,void Ve(o);o=e.ownerDocument||e,n=Od(n),(i=xd.get(i))&&Ld(n,i),Ve(o=o.createElement("link"));var s=o;s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),td(o,"link",n),t.instance=o}null===r.stylesheets&&(r.stylesheets=new Map),r.stylesheets.set(t,e),(e=t.state.preload)&&0===(3&t.state.loading)&&(r.count++,t=Kd.bind(r),e.addEventListener("load",t),e.addEventListener("error",t))}}(Bc,e.memoizedState,e.memoizedProps);break;case 5:default:Gc(e);break;case 3:case 4:var t=Bc;Bc=Ed(e.stateNode.containerInfo),Gc(e),Bc=t;break;case 22:null===e.memoizedState&&(null!==(t=e.alternate)&&null!==t.memoizedState?(t=$c,$c=16777216,Gc(e),$c=t):Gc(e))}}function Jc(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function Yc(e){var t=e.deletions;if(0!==(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Sc=r,el(r,e)}Jc(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)Qc(e),e=e.sibling}function Qc(e){switch(e.tag){case 0:case 11:case 15:Yc(e),2048&e.flags&&cc(9,e,e.return);break;case 3:case 12:default:Yc(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,Xc(e)):Yc(e)}}function Xc(e){var t=e.deletions;if(0!==(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Sc=r,el(r,e)}Jc(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:cc(8,t,t.return),Xc(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,Xc(t));break;default:Xc(t)}e=e.sibling}}function el(e,t){for(;null!==Sc;){var n=Sc;switch(n.tag){case 0:case 11:case 15:cc(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:Ri(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,Sc=r;else e:for(n=e;null!==Sc;){var i=(r=Sc).sibling,o=r.return;if(Ac(r),r===n){Sc=null;break e}if(null!==i){i.return=o,Sc=i;break e}Sc=o}}}var tl={getCacheForType:function(e){var t=Pi(Ni),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n}},nl="function"===typeof WeakMap?WeakMap:Map,rl=0,il=null,ol=null,sl=0,al=0,cl=null,ll=!1,ul=!1,dl=!1,hl=0,fl=0,pl=0,ml=0,gl=0,bl=0,yl=0,vl=null,wl=null,_l=!1,kl=0,xl=1/0,Sl=null,El=null,Al=0,Pl=null,Cl=null,Il=0,Ml=0,Tl=null,Ol=null,Nl=0,Bl=null;function Rl(){if(0!==(2&rl)&&0!==sl)return sl&-sl;if(null!==R.T){return 0!==Fi?Fi:Mu()}return Te()}function jl(){0===bl&&(bl=0===(536870912&sl)||si?xe():536870912);var e=oa.current;return null!==e&&(e.flags|=32),bl}function Ll(e,t,n){(e!==il||2!==al&&9!==al)&&null===e.cancelPendingCommit||(Hl(e,0),Ul(e,sl,bl,!1)),Ae(e,n),0!==(2&rl)&&e===il||(e===il&&(0===(2&rl)&&(ml|=n),4===fl&&Ul(e,sl,bl,!1)),xu(e))}function Fl(e,t,n){if(0!==(6&rl))throw Error(a(327));for(var r=!n&&0===(124&t)&&0===(t&e.expiredLanes)||_e(e,t),i=r?function(e,t){var n=rl;rl|=2;var r=Vl(),i=$l();il!==e||sl!==t?(Sl=null,xl=ne()+500,Hl(e,t)):ul=_e(e,t);e:for(;;)try{if(0!==al&&null!==ol){t=ol;var o=cl;t:switch(al){case 1:al=0,cl=null,eu(e,t,o,1);break;case 2:case 9:if(Ji(o)){al=0,cl=null,Xl(t);break}t=function(){2!==al&&9!==al||il!==e||(al=7),xu(e)},o.then(t,t);break e;case 3:al=7;break e;case 4:al=5;break e;case 7:Ji(o)?(al=0,cl=null,Xl(t)):(al=0,cl=null,eu(e,t,o,7));break;case 5:var s=null;switch(ol.tag){case 26:s=ol.memoizedState;case 5:case 27:var c=ol;if(!s||Wd(s)){al=0,cl=null;var l=c.sibling;if(null!==l)ol=l;else{var u=c.return;null!==u?(ol=u,tu(u)):ol=null}break t}}al=0,cl=null,eu(e,t,o,5);break;case 6:al=0,cl=null,eu(e,t,o,6);break;case 8:ql(),fl=6;break e;default:throw Error(a(462))}}Yl();break}catch(d){Kl(e,d)}return vi=yi=null,R.H=r,R.A=i,rl=n,null!==ol?0:(il=null,sl=0,Ir(),fl)}(e,t):Zl(e,t,!0),o=r;;){if(0===i){ul&&!r&&Ul(e,t,0,!1);break}if(n=e.current.alternate,!o||Dl(n)){if(2===i){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=0!==(s=-536870913&e.pendingLanes)?s:536870912&s?536870912:0;if(0!==s){t=s;e:{var c=e;i=vl;var l=c.current.memoizedState.isDehydrated;if(l&&(Hl(c,s).flags|=256),2!==(s=Zl(c,s,!1))){if(dl&&!l){c.errorRecoveryDisabledLanes|=o,ml|=o,i=4;break e}o=wl,wl=i,null!==o&&(null===wl?wl=o:wl.push.apply(wl,o))}i=s}if(o=!1,2!==i)continue}}if(1===i){Hl(e,0),Ul(e,t,0,!0);break}e:{switch(r=e,o=i){case 0:case 1:throw Error(a(345));case 4:if((4194048&t)!==t)break;case 6:Ul(r,t,bl,!ll);break e;case 2:wl=null;break;case 3:case 5:break;default:throw Error(a(329))}if((62914560&t)===t&&10<(i=kl+300-ne())){if(Ul(r,t,bl,!ll),0!==we(r,0,!0))break e;r.timeoutHandle=ld(zl.bind(null,r,n,wl,Sl,_l,t,bl,ml,yl,ll,o,2,-0,0),i)}else zl(r,n,wl,Sl,_l,t,bl,ml,yl,ll,o,0,-0,0)}break}i=Zl(e,t,!1),o=!1}xu(e)}function zl(e,t,n,r,i,o,s,c,l,u,d,h,f,p){if(e.timeoutHandle=-1,(8192&(h=t.subtreeFlags)||16785408===(16785408&h))&&(qd={stylesheets:null,count:0,unsuspend:Hd},Zc(t),null!==(h=function(){if(null===qd)throw Error(a(475));var e=qd;return e.stylesheets&&0===e.count&&$d(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&$d(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}())))return e.cancelPendingCommit=h(ru.bind(null,e,t,o,n,r,i,s,c,l,d,1,f,p)),void Ul(e,o,s,!u);ru(e,t,o,n,r,i,s,c,l)}function Dl(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Jn(o(),i))return!1}catch(s){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ul(e,t,n,r){t&=~gl,t&=~ml,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var o=31-pe(i),s=1<<o;r[o]=-1,i&=~s}0!==n&&Pe(e,n,t)}function Wl(){return 0!==(6&rl)||(Su(0,!1),!1)}function ql(){if(null!==ol){if(0===al)var e=ol.return;else vi=yi=null,zo(e=ol),Js=null,Ys=0,e=ol;for(;null!==e;)sc(e.alternate,e),e=e.return;ol=null}}function Hl(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,ud(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),ql(),il=e,ol=n=zr(e.current,null),sl=t,al=0,cl=null,ll=!1,ul=_e(e,t),dl=!1,yl=bl=gl=ml=pl=fl=0,wl=vl=null,_l=!1,0!==(8&t)&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var i=31-pe(r),o=1<<i;t|=e[i],r&=~o}return hl=t,Ir(),n}function Kl(e,t){_o=null,R.H=Vs,t===Vi||t===Gi?(t=eo(),al=3):t===$i?(t=eo(),al=4):al=t===Pa?8:null!==t&&"object"===typeof t&&"function"===typeof t.then?6:1,cl=t,null===ol&&(fl=1,ka(e,Er(t,e.current)))}function Vl(){var e=R.H;return R.H=Vs,null===e?Vs:e}function $l(){var e=R.A;return R.A=tl,e}function Gl(){fl=4,ll||(4194048&sl)!==sl&&null!==oa.current||(ul=!0),0===(134217727&pl)&&0===(134217727&ml)||null===il||Ul(il,sl,bl,!1)}function Zl(e,t,n){var r=rl;rl|=2;var i=Vl(),o=$l();il===e&&sl===t||(Sl=null,Hl(e,t)),t=!1;var s=fl;e:for(;;)try{if(0!==al&&null!==ol){var a=ol,c=cl;switch(al){case 8:ql(),s=6;break e;case 3:case 2:case 9:case 6:null===oa.current&&(t=!0);var l=al;if(al=0,cl=null,eu(e,a,c,l),n&&ul){s=0;break e}break;default:l=al,al=0,cl=null,eu(e,a,c,l)}}Jl(),s=fl;break}catch(u){Kl(e,u)}return t&&e.shellSuspendCounter++,vi=yi=null,rl=r,R.H=i,R.A=o,null===ol&&(il=null,sl=0,Ir()),s}function Jl(){for(;null!==ol;)Ql(ol)}function Yl(){for(;null!==ol&&!ee();)Ql(ol)}function Ql(e){var t=Qa(e.alternate,e,hl);e.memoizedProps=e.pendingProps,null===t?tu(e):ol=t}function Xl(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=La(n,t,t.pendingProps,t.type,void 0,sl);break;case 11:t=La(n,t,t.pendingProps,t.type.render,t.ref,sl);break;case 5:zo(t);default:sc(n,t),t=Qa(n,t=ol=Dr(t,hl),hl)}e.memoizedProps=e.pendingProps,null===t?tu(e):ol=t}function eu(e,t,n,r){vi=yi=null,zo(t),Js=null,Ys=0;var i=t.return;try{if(function(e,t,n,r,i){if(n.flags|=32768,null!==r&&"object"===typeof r&&"function"===typeof r.then){if(null!==(t=n.alternate)&&Si(t,n,i,!0),null!==(n=oa.current)){switch(n.tag){case 13:return null===sa?Gl():null===n.alternate&&0===fl&&(fl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Zi?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),hu(e,r,i)),!1;case 22:return n.flags|=65536,r===Zi?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),hu(e,r,i)),!1}throw Error(a(435,n.tag))}return hu(e,r,i),Gl(),!1}if(si)return null!==(t=oa.current)?(0===(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==li&&gi(Er(e=Error(a(422),{cause:r}),n))):(r!==li&&gi(Er(t=Error(a(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,i&=-i,e.lanes|=i,r=Er(r,n),co(e,i=Sa(e.stateNode,r,i)),4!==fl&&(fl=2)),!1;var o=Error(a(520),{cause:r});if(o=Er(o,n),null===vl?vl=[o]:vl.push(o),4!==fl&&(fl=2),null===t)return!0;r=Er(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,co(n,e=Sa(n.stateNode,r,e)),!1;case 1:if(t=n.type,o=n.stateNode,0===(128&n.flags)&&("function"===typeof t.getDerivedStateFromError||null!==o&&"function"===typeof o.componentDidCatch&&(null===El||!El.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,Aa(i=Ea(i),e,n,r),co(n,i),!1}n=n.return}while(null!==n);return!1}(e,i,t,n,sl))return fl=1,ka(e,Er(n,e.current)),void(ol=null)}catch(o){if(null!==i)throw ol=i,o;return fl=1,ka(e,Er(n,e.current)),void(ol=null)}32768&t.flags?(si||1===r?e=!0:ul||0!==(536870912&sl)?e=!1:(ll=e=!0,(2===r||9===r||3===r||6===r)&&(null!==(r=oa.current)&&13===r.tag&&(r.flags|=16384))),nu(t,e)):tu(t)}function tu(e){var t=e;do{if(0!==(32768&t.flags))return void nu(t,ll);e=t.return;var n=ic(t.alternate,t,hl);if(null!==n)return void(ol=n);if(null!==(t=t.sibling))return void(ol=t);ol=t=e}while(null!==t);0===fl&&(fl=5)}function nu(e,t){do{var n=oc(e.alternate,e);if(null!==n)return n.flags&=32767,void(ol=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(ol=e);ol=e=n}while(null!==e);fl=6,ol=null}function ru(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do{cu()}while(0!==Al);if(0!==(6&rl))throw Error(a(327));if(null!==t){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,function(e,t,n,r,i,o){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var a=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=s&~n;0<n;){var u=31-pe(n),d=1<<u;a[u]=0,c[u]=-1;var h=l[u];if(null!==h)for(l[u]=null,u=0;u<h.length;u++){var f=h[u];null!==f&&(f.lane&=-536870913)}n&=~d}0!==r&&Pe(e,r,0),0!==o&&0===i&&0!==e.tag&&(e.suspendedLanes|=o&~(s&~t))}(e,n,o|=Cr,s,c,l),e===il&&(ol=il=null,sl=0),Cl=t,Pl=e,Il=n,Ml=o,Tl=i,Ol=r,0!==(10256&t.subtreeFlags)||0!==(10256&t.flags)?(e.callbackNode=null,e.callbackPriority=0,Q(se,function(){return lu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=0!==(13878&t.flags),0!==(13878&t.subtreeFlags)||r){r=R.T,R.T=null,i=j.p,j.p=2,s=rl,rl|=4;try{!function(e,t){if(e=e.containerInfo,nd=rh,nr(e=tr(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(g){n=null;break e}var s=0,c=-1,l=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(c=s+i),h!==o||0!==r&&3!==h.nodeType||(l=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===i&&(c=s),f===o&&++d===r&&(l=s),null!==(p=h.nextSibling))break;f=(h=f).parentNode}h=p}n=-1===c||-1===l?null:{start:c,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(rd={focusedElem:e,selectionRange:n},rh=!1,Sc=t;null!==Sc;)if(e=(t=Sc).child,0!==(1024&t.subtreeFlags)&&null!==e)e.return=t,Sc=e;else for(;null!==Sc;){switch(o=(t=Sc).alternate,e=t.flags,t.tag){case 0:case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(0!==(1024&e)&&null!==o){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var m=ba(n.type,i,(n.elementType,n.type));e=r.getSnapshotBeforeUpdate(m,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(b){du(n,n.return,b)}}break;case 3:if(0!==(1024&e))if(9===(n=(e=t.stateNode.containerInfo).nodeType))gd(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":gd(e);break;default:e.textContent=""}break;default:if(0!==(1024&e))throw Error(a(163))}if(null!==(e=t.sibling)){e.return=t.return,Sc=e;break}Sc=t.return}}(e,t)}finally{rl=s,j.p=i,R.T=r}}Al=1,iu(),ou(),su()}}function iu(){if(1===Al){Al=0;var e=Pl,t=Cl,n=0!==(13878&t.flags);if(0!==(13878&t.subtreeFlags)||n){n=R.T,R.T=null;var r=j.p;j.p=2;var i=rl;rl|=4;try{Rc(t,e);var o=rd,s=tr(e.containerInfo),a=o.focusedElem,c=o.selectionRange;if(s!==a&&a&&a.ownerDocument&&er(a.ownerDocument.documentElement,a)){if(null!==c&&nr(a)){var l=c.start,u=c.end;if(void 0===u&&(u=l),"selectionStart"in a)a.selectionStart=l,a.selectionEnd=Math.min(u,a.value.length);else{var d=a.ownerDocument||document,h=d&&d.defaultView||window;if(h.getSelection){var f=h.getSelection(),p=a.textContent.length,m=Math.min(c.start,p),g=void 0===c.end?m:Math.min(c.end,p);!f.extend&&m>g&&(s=g,g=m,m=s);var b=Xn(a,m),y=Xn(a,g);if(b&&y&&(1!==f.rangeCount||f.anchorNode!==b.node||f.anchorOffset!==b.offset||f.focusNode!==y.node||f.focusOffset!==y.offset)){var v=d.createRange();v.setStart(b.node,b.offset),f.removeAllRanges(),m>g?(f.addRange(v),f.extend(y.node,y.offset)):(v.setEnd(y.node,y.offset),f.addRange(v))}}}}for(d=[],f=a;f=f.parentNode;)1===f.nodeType&&d.push({element:f,left:f.scrollLeft,top:f.scrollTop});for("function"===typeof a.focus&&a.focus(),a=0;a<d.length;a++){var w=d[a];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}rh=!!nd,rd=nd=null}finally{rl=i,j.p=r,R.T=n}}e.current=t,Al=2}}function ou(){if(2===Al){Al=0;var e=Pl,t=Cl,n=0!==(8772&t.flags);if(0!==(8772&t.subtreeFlags)||n){n=R.T,R.T=null;var r=j.p;j.p=2;var i=rl;rl|=4;try{Ec(e,t.alternate,t)}finally{rl=i,j.p=r,R.T=n}}Al=3}}function su(){if(4===Al||3===Al){Al=0,te();var e=Pl,t=Cl,n=Il,r=Ol;0!==(10256&t.subtreeFlags)||0!==(10256&t.flags)?Al=5:(Al=0,Cl=Pl=null,au(e,e.pendingLanes));var i=e.pendingLanes;if(0===i&&(El=null),Me(n),t=t.stateNode,he&&"function"===typeof he.onCommitFiberRoot)try{he.onCommitFiberRoot(de,t,void 0,128===(128&t.current.flags))}catch(c){}if(null!==r){t=R.T,i=j.p,j.p=2,R.T=null;try{for(var o=e.onRecoverableError,s=0;s<r.length;s++){var a=r[s];o(a.value,{componentStack:a.stack})}}finally{R.T=t,j.p=i}}0!==(3&Il)&&cu(),xu(e),i=e.pendingLanes,0!==(4194090&n)&&0!==(42&i)?e===Bl?Nl++:(Nl=0,Bl=e):Nl=0,Su(0,!1)}}function au(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,Ri(t)))}function cu(e){return iu(),ou(),su(),lu()}function lu(){if(5!==Al)return!1;var e=Pl,t=Ml;Ml=0;var n=Me(Il),r=R.T,i=j.p;try{j.p=32>n?32:n,R.T=null,n=Tl,Tl=null;var o=Pl,s=Il;if(Al=0,Cl=Pl=null,Il=0,0!==(6&rl))throw Error(a(331));var c=rl;if(rl|=4,Qc(o.current),Hc(o,o.current,s,n),rl=c,Su(0,!1),he&&"function"===typeof he.onPostCommitFiberRoot)try{he.onPostCommitFiberRoot(de,o)}catch(l){}return!0}finally{j.p=i,R.T=r,au(e,t)}}function uu(e,t,n){t=Er(n,t),null!==(e=so(e,t=Sa(e.stateNode,t,2),2))&&(Ae(e,2),xu(e))}function du(e,t,n){if(3===e.tag)uu(e,e,n);else for(;null!==t;){if(3===t.tag){uu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===El||!El.has(r))){e=Er(n,e),null!==(r=so(t,n=Ea(2),2))&&(Aa(n,r,t,e),Ae(r,2),xu(r));break}}t=t.return}}function hu(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new nl;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(dl=!0,i.add(n),e=fu.bind(null,e,t,n),t.then(e,e))}function fu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,il===e&&(sl&n)===n&&(4===fl||3===fl&&(62914560&sl)===sl&&300>ne()-kl?0===(2&rl)&&Hl(e,0):gl|=n,yl===sl&&(yl=0)),xu(e)}function pu(e,t){0===t&&(t=Se()),null!==(e=Or(e,t))&&(Ae(e,t),xu(e))}function mu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),pu(e,n)}function gu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}null!==r&&r.delete(t),pu(e,n)}var bu=null,yu=null,vu=!1,wu=!1,_u=!1,ku=0;function xu(e){e!==yu&&null===e.next&&(null===yu?bu=yu=e:yu=yu.next=e),wu=!0,vu||(vu=!0,hd(function(){0!==(6&rl)?Q(ie,Eu):Au()}))}function Su(e,t){if(!_u&&wu){_u=!0;do{for(var n=!1,r=bu;null!==r;){if(!t)if(0!==e){var i=r.pendingLanes;if(0===i)var o=0;else{var s=r.suspendedLanes,a=r.pingedLanes;o=(1<<31-pe(42|e)+1)-1,o=201326741&(o&=i&~(s&~a))?201326741&o|1:o?2|o:0}0!==o&&(n=!0,Iu(r,o))}else o=sl,0===(3&(o=we(r,r===il?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||_e(r,o)||(n=!0,Iu(r,o));r=r.next}}while(n);_u=!1}}function Eu(){Au()}function Au(){wu=vu=!1;var e=0;0!==ku&&(function(){var e=window.event;if(e&&"popstate"===e.type)return e!==cd&&(cd=e,!0);return cd=null,!1}()&&(e=ku),ku=0);for(var t=ne(),n=null,r=bu;null!==r;){var i=r.next,o=Pu(r,t);0===o?(r.next=null,null===n?bu=i:n.next=i,null===i&&(yu=n)):(n=r,(0!==e||0!==(3&o))&&(wu=!0)),r=i}Su(e,!1)}function Pu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=-62914561&e.pendingLanes;0<o;){var s=31-pe(o),a=1<<s,c=i[s];-1===c?0!==(a&n)&&0===(a&r)||(i[s]=ke(a,t)):c<=t&&(e.expiredLanes|=a),o&=~a}if(n=sl,n=we(e,e===(t=il)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===al||9===al)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&X(r),e.callbackNode=null,e.callbackPriority=0;if(0===(3&n)||_e(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&X(r),Me(n)){case 2:case 8:n=oe;break;case 32:default:n=se;break;case 268435456:n=ce}return r=Cu.bind(null,e),n=Q(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&X(r),e.callbackPriority=2,e.callbackNode=null,2}function Cu(e,t){if(0!==Al&&5!==Al)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(cu()&&e.callbackNode!==n)return null;var r=sl;return 0===(r=we(e,e===il?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Fl(e,r,t),Pu(e,ne()),null!=e.callbackNode&&e.callbackNode===n?Cu.bind(null,e):null)}function Iu(e,t){if(cu())return null;Fl(e,t,!0)}function Mu(){return 0===ku&&(ku=xe()),ku}function Tu(e){return null==e||"symbol"===typeof e||"boolean"===typeof e?null:"function"===typeof e?e:Mt(""+e)}function Ou(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var Nu=0;Nu<kr.length;Nu++){var Bu=kr[Nu];xr(Bu.toLowerCase(),"on"+(Bu[0].toUpperCase()+Bu.slice(1)))}xr(pr,"onAnimationEnd"),xr(mr,"onAnimationIteration"),xr(gr,"onAnimationStart"),xr("dblclick","onDoubleClick"),xr("focusin","onFocus"),xr("focusout","onBlur"),xr(br,"onTransitionRun"),xr(yr,"onTransitionStart"),xr(vr,"onTransitionCancel"),xr(wr,"onTransitionEnd"),Je("onMouseEnter",["mouseout","mouseover"]),Je("onMouseLeave",["mouseout","mouseover"]),Je("onPointerEnter",["pointerout","pointerover"]),Je("onPointerLeave",["pointerout","pointerover"]),Ze("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ze("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ze("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ze("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ze("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ze("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ru="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ju=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ru));function Lu(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],c=a.instance,l=a.currentTarget;if(a=a.listener,c!==o&&i.isPropagationStopped())break e;o=a,i.currentTarget=l;try{o(i)}catch(u){ya(u)}i.currentTarget=null,o=c}else for(s=0;s<r.length;s++){if(c=(a=r[s]).instance,l=a.currentTarget,a=a.listener,c!==o&&i.isPropagationStopped())break e;o=a,i.currentTarget=l;try{o(i)}catch(u){ya(u)}i.currentTarget=null,o=c}}}}function Fu(e,t){var n=t[je];void 0===n&&(n=t[je]=new Set);var r=e+"__bubble";n.has(r)||(Wu(t,e,2,!1),n.add(r))}function zu(e,t,n){var r=0;t&&(r|=4),Wu(n,e,r,t)}var Du="_reactListening"+Math.random().toString(36).slice(2);function Uu(e){if(!e[Du]){e[Du]=!0,$e.forEach(function(t){"selectionchange"!==t&&(ju.has(t)||zu(t,!1,e),zu(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Du]||(t[Du]=!0,zu("selectionchange",!1,t))}}function Wu(e,t,n,r){switch(uh(t)){case 2:var i=ih;break;case 8:i=oh;break;default:i=sh}n=i.bind(null,t,n,e),i=void 0,!Dt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function qu(e,t,n,r,i){var o=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var a=r.stateNode.containerInfo;if(a===i)break;if(4===s)for(s=r.return;null!==s;){var c=s.tag;if((3===c||4===c)&&s.stateNode.containerInfo===i)return;s=s.return}for(;null!==a;){if(null===(s=We(a)))return;if(5===(c=s.tag)||6===c||26===c||27===c){r=o=s;continue e}a=a.parentNode}}r=r.return}Lt(function(){var r=o,i=Ot(n),s=[];e:{var a=_r.get(e);if(void 0!==a){var c=en,u=e;switch(e){case"keypress":if(0===Vt(n))break e;case"keydown":case"keyup":c=gn;break;case"focusin":u="focus",c=an;break;case"focusout":u="blur",c=an;break;case"beforeblur":case"afterblur":c=an;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=on;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=sn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=yn;break;case pr:case mr:case gr:c=cn;break;case wr:c=vn;break;case"scroll":case"scrollend":c=nn;break;case"wheel":c=wn;break;case"copy":case"cut":case"paste":c=ln;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=bn;break;case"toggle":case"beforetoggle":c=_n}var d=0!==(4&t),h=!d&&("scroll"===e||"scrollend"===e),f=d?null!==a?a+"Capture":null:a;d=[];for(var p,m=r;null!==m;){var g=m;if(p=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===p||null===f||null!=(g=Ft(m,f))&&d.push(Hu(m,g,p)),h)break;m=m.return}0<d.length&&(a=new c(a,u,null,n,i),s.push({event:a,listeners:d}))}}if(0===(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(a="mouseover"===e||"pointerover"===e)||n===Tt||!(u=n.relatedTarget||n.fromElement)||!We(u)&&!u[Re])&&(c||a)&&(a=i.window===i?i:(a=i.ownerDocument)?a.defaultView||a.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?We(u):null)&&(h=l(u),d=u.tag,u!==h||5!==d&&27!==d&&6!==d)&&(u=null)):(c=null,u=r),c!==u)){if(d=on,g="onMouseLeave",f="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=bn,g="onPointerLeave",f="onPointerEnter",m="pointer"),h=null==c?a:He(c),p=null==u?a:He(u),(a=new d(g,m+"leave",c,n,i)).target=h,a.relatedTarget=p,g=null,We(i)===r&&((d=new d(f,m+"enter",u,n,i)).target=p,d.relatedTarget=h,g=d),h=g,c&&u)e:{for(f=u,m=0,p=d=c;p;p=Vu(p))m++;for(p=0,g=f;g;g=Vu(g))p++;for(;0<m-p;)d=Vu(d),m--;for(;0<p-m;)f=Vu(f),p--;for(;m--;){if(d===f||null!==f&&d===f.alternate)break e;d=Vu(d),f=Vu(f)}d=null}else d=null;null!==c&&$u(s,a,c,d,!1),null!==u&&null!==h&&$u(s,h,u,d,!0)}if("select"===(c=(a=r?He(r):window).nodeName&&a.nodeName.toLowerCase())||"input"===c&&"file"===a.type)var b=zn;else if(Nn(a))if(Dn)b=Zn;else{b=$n;var y=Vn}else!(c=a.nodeName)||"input"!==c.toLowerCase()||"checkbox"!==a.type&&"radio"!==a.type?r&&Pt(r.elementType)&&(b=zn):b=Gn;switch(b&&(b=b(e,r))?Bn(s,b,n,i):(y&&y(e,a,r),"focusout"===e&&r&&"number"===a.type&&null!=r.memoizedProps.value&&vt(a,"number",a.value)),y=r?He(r):window,e){case"focusin":(Nn(y)||"true"===y.contentEditable)&&(ir=y,or=r,sr=null);break;case"focusout":sr=or=ir=null;break;case"mousedown":ar=!0;break;case"contextmenu":case"mouseup":case"dragend":ar=!1,cr(s,n,i);break;case"selectionchange":if(rr)break;case"keydown":case"keyup":cr(s,n,i)}var v;if(xn)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else Tn?In(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(An&&"ko"!==n.locale&&(Tn||"onCompositionStart"!==w?"onCompositionEnd"===w&&Tn&&(v=Kt()):(qt="value"in(Wt=i)?Wt.value:Wt.textContent,Tn=!0)),0<(y=Ku(r,w)).length&&(w=new un(w,e,null,n,i),s.push({event:w,listeners:y}),v?w.data=v:null!==(v=Mn(n))&&(w.data=v))),(v=En?function(e,t){switch(e){case"compositionend":return Mn(t);case"keypress":return 32!==t.which?null:(Cn=!0,Pn);case"textInput":return(e=t.data)===Pn&&Cn?null:e;default:return null}}(e,n):function(e,t){if(Tn)return"compositionend"===e||!xn&&In(e,t)?(e=Kt(),Ht=qt=Wt=null,Tn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return An&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(w=Ku(r,"onBeforeInput")).length&&(y=new un("onBeforeInput","beforeinput",null,n,i),s.push({event:y,listeners:w}),y.data=v)),function(e,t,n,r,i){if("submit"===t&&n&&n.stateNode===i){var o=Tu((i[Be]||null).action),s=r.submitter;s&&null!==(t=(t=s[Be]||null)?Tu(t.formAction):s.getAttribute("formAction"))&&(o=t,s=null);var a=new en("action","action",null,r,i);e.push({event:a,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==ku){var e=s?Ou(i,s):new FormData(i);Os(n,{pending:!0,data:e,method:i.method,action:o},null,e)}}else"function"===typeof o&&(a.preventDefault(),e=s?Ou(i,s):new FormData(i),Os(n,{pending:!0,data:e,method:i.method,action:o},o,e))},currentTarget:i}]})}}(s,e,r,n,i)}Lu(s,t)})}function Hu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ku(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;if(5!==(i=i.tag)&&26!==i&&27!==i||null===o||(null!=(i=Ft(e,n))&&r.unshift(Hu(e,i,o)),null!=(i=Ft(e,t))&&r.push(Hu(e,i,o))),3===e.tag)return r;e=e.return}return[]}function Vu(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function $u(e,t,n,r,i){for(var o=t._reactName,s=[];null!==n&&n!==r;){var a=n,c=a.alternate,l=a.stateNode;if(a=a.tag,null!==c&&c===r)break;5!==a&&26!==a&&27!==a||null===l||(c=l,i?null!=(l=Ft(n,o))&&s.unshift(Hu(n,l,c)):i||null!=(l=Ft(n,o))&&s.push(Hu(n,l,c))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var Gu=/\r\n?/g,Zu=/\u0000|\uFFFD/g;function Ju(e){return("string"===typeof e?e:""+e).replace(Gu,"\n").replace(Zu,"")}function Yu(e,t){return t=Ju(t),Ju(e)===t}function Qu(){}function Xu(e,t,n,r,i,o){switch(n){case"children":"string"===typeof r?"body"===t||"textarea"===t&&""===r||xt(e,r):("number"===typeof r||"bigint"===typeof r)&&"body"!==t&&xt(e,""+r);break;case"className":rt(e,"class",r);break;case"tabIndex":rt(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":rt(e,n,r);break;case"style":At(e,r,o);break;case"data":if("object"!==t){rt(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"===typeof r||"symbol"===typeof r||"boolean"===typeof r){e.removeAttribute(n);break}r=Mt(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"===typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"===typeof o&&("formAction"===n?("input"!==t&&Xu(e,t,"name",i.name,i,null),Xu(e,t,"formEncType",i.formEncType,i,null),Xu(e,t,"formMethod",i.formMethod,i,null),Xu(e,t,"formTarget",i.formTarget,i,null)):(Xu(e,t,"encType",i.encType,i,null),Xu(e,t,"method",i.method,i,null),Xu(e,t,"target",i.target,i,null))),null==r||"symbol"===typeof r||"boolean"===typeof r){e.removeAttribute(n);break}r=Mt(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=Qu);break;case"onScroll":null!=r&&Fu("scroll",e);break;case"onScrollEnd":null!=r&&Fu("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!==typeof r||!("__html"in r))throw Error(a(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(a(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!==typeof r&&"symbol"!==typeof r;break;case"muted":e.muted=r&&"function"!==typeof r&&"symbol"!==typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"===typeof r||"boolean"===typeof r||"symbol"===typeof r){e.removeAttribute("xlink:href");break}n=Mt(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!==typeof r&&"symbol"!==typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"===typeof r||"symbol"===typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Fu("beforetoggle",e),Fu("toggle",e),nt(e,"popover",r);break;case"xlinkActuate":it(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":it(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":it(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":it(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":it(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":it(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":it(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":it(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":it(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":nt(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&nt(e,n=Ct.get(n)||n,r)}}function ed(e,t,n,r,i,o){switch(n){case"style":At(e,r,o);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!==typeof r||!("__html"in r))throw Error(a(61));if(null!=(n=r.__html)){if(null!=i.children)throw Error(a(60));e.innerHTML=n}}break;case"children":"string"===typeof r?xt(e,r):("number"===typeof r||"bigint"===typeof r)&&xt(e,""+r);break;case"onScroll":null!=r&&Fu("scroll",e);break;case"onScrollEnd":null!=r&&Fu("scrollend",e);break;case"onClick":null!=r&&(e.onclick=Qu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:Ge.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),"function"===typeof(o=null!=(o=e[Be]||null)?o[n]:null)&&e.removeEventListener(t,o,i),"function"!==typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):nt(e,n,r):("function"!==typeof o&&null!==o&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i)))}}function td(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Fu("error",e),Fu("load",e);var r,i=!1,o=!1;for(r in n)if(n.hasOwnProperty(r)){var s=n[r];if(null!=s)switch(r){case"src":i=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:Xu(e,t,r,s,n,null)}}return o&&Xu(e,t,"srcSet",n.srcSet,n,null),void(i&&Xu(e,t,"src",n.src,n,null));case"input":Fu("invalid",e);var c=r=s=o=null,l=null,u=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(null!=d)switch(i){case"name":o=d;break;case"type":s=d;break;case"checked":l=d;break;case"defaultChecked":u=d;break;case"value":r=d;break;case"defaultValue":c=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(a(137,t));break;default:Xu(e,t,i,d,n,null)}}return yt(e,r,c,l,u,s,o,!1),void ht(e);case"select":for(o in Fu("invalid",e),i=s=r=null,n)if(n.hasOwnProperty(o)&&null!=(c=n[o]))switch(o){case"value":r=c;break;case"defaultValue":s=c;break;case"multiple":i=c;default:Xu(e,t,o,c,n,null)}return t=r,n=s,e.multiple=!!i,void(null!=t?wt(e,!!i,t,!1):null!=n&&wt(e,!!i,n,!0));case"textarea":for(s in Fu("invalid",e),r=o=i=null,n)if(n.hasOwnProperty(s)&&null!=(c=n[s]))switch(s){case"value":i=c;break;case"defaultValue":o=c;break;case"children":r=c;break;case"dangerouslySetInnerHTML":if(null!=c)throw Error(a(91));break;default:Xu(e,t,s,c,n,null)}return kt(e,i,o,r),void ht(e);case"option":for(l in n)if(n.hasOwnProperty(l)&&null!=(i=n[l]))if("selected"===l)e.selected=i&&"function"!==typeof i&&"symbol"!==typeof i;else Xu(e,t,l,i,n,null);return;case"dialog":Fu("beforetoggle",e),Fu("toggle",e),Fu("cancel",e),Fu("close",e);break;case"iframe":case"object":Fu("load",e);break;case"video":case"audio":for(i=0;i<Ru.length;i++)Fu(Ru[i],e);break;case"image":Fu("error",e),Fu("load",e);break;case"details":Fu("toggle",e);break;case"embed":case"source":case"link":Fu("error",e),Fu("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&null!=(i=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,t));default:Xu(e,t,u,i,n,null)}return;default:if(Pt(t)){for(d in n)n.hasOwnProperty(d)&&(void 0!==(i=n[d])&&ed(e,t,d,i,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(null!=(i=n[c])&&Xu(e,t,c,i,n,null))}var nd=null,rd=null;function id(e){return 9===e.nodeType?e:e.ownerDocument}function od(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function sd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function ad(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"bigint"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var cd=null;var ld="function"===typeof setTimeout?setTimeout:void 0,ud="function"===typeof clearTimeout?clearTimeout:void 0,dd="function"===typeof Promise?Promise:void 0,hd="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof dd?function(e){return dd.resolve(null).then(e).catch(fd)}:ld;function fd(e){setTimeout(function(){throw e})}function pd(e){return"head"===e}function md(e,t){var n=t,r=0,i=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0<r&&8>r){n=r;var s=e.ownerDocument;if(1&n&&kd(s.documentElement),2&n&&kd(s.body),4&n)for(kd(n=s.head),s=n.firstChild;s;){var a=s.nextSibling,c=s.nodeName;s[De]||"SCRIPT"===c||"STYLE"===c||"LINK"===c&&"stylesheet"===s.rel.toLowerCase()||n.removeChild(s),s=a}}if(0===i)return e.removeChild(o),void Ch(t);i--}else"$"===n||"$?"===n||"$!"===n?i++:r=n.charCodeAt(0)-48;else r=0;n=o}while(n);Ch(t)}function gd(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":gd(n),Ue(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function bd(e){return"$!"===e.data||"$?"===e.data&&"complete"===e.ownerDocument.readyState}function yd(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"F!"===t||"F"===t)break;if("/$"===t)return null}}return e}var vd=null;function wd(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}function _d(e,t,n){switch(t=id(n),e){case"html":if(!(e=t.documentElement))throw Error(a(452));return e;case"head":if(!(e=t.head))throw Error(a(453));return e;case"body":if(!(e=t.body))throw Error(a(454));return e;default:throw Error(a(451))}}function kd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ue(e)}var xd=new Map,Sd=new Set;function Ed(e){return"function"===typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Ad=j.d;j.d={f:function(){var e=Ad.f(),t=Wl();return e||t},r:function(e){var t=qe(e);null!==t&&5===t.tag&&"form"===t.type?Bs(t):Ad.r(e)},D:function(e){Ad.D(e),Cd("dns-prefetch",e,null)},C:function(e,t){Ad.C(e,t),Cd("preconnect",e,t)},L:function(e,t,n){Ad.L(e,t,n);var r=Pd;if(r&&e&&t){var i='link[rel="preload"][as="'+gt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(i+='[imagesrcset="'+gt(n.imageSrcSet)+'"]',"string"===typeof n.imageSizes&&(i+='[imagesizes="'+gt(n.imageSizes)+'"]')):i+='[href="'+gt(e)+'"]';var o=i;switch(t){case"style":o=Md(e);break;case"script":o=Nd(e)}xd.has(o)||(e=f({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),xd.set(o,e),null!==r.querySelector(i)||"style"===t&&r.querySelector(Td(o))||"script"===t&&r.querySelector(Bd(o))||(td(t=r.createElement("link"),"link",e),Ve(t),r.head.appendChild(t)))}},m:function(e,t){Ad.m(e,t);var n=Pd;if(n&&e){var r=t&&"string"===typeof t.as?t.as:"script",i='link[rel="modulepreload"][as="'+gt(r)+'"][href="'+gt(e)+'"]',o=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Nd(e)}if(!xd.has(o)&&(e=f({rel:"modulepreload",href:e},t),xd.set(o,e),null===n.querySelector(i))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Bd(o)))return}td(r=n.createElement("link"),"link",e),Ve(r),n.head.appendChild(r)}}},X:function(e,t){Ad.X(e,t);var n=Pd;if(n&&e){var r=Ke(n).hoistableScripts,i=Nd(e),o=r.get(i);o||((o=n.querySelector(Bd(i)))||(e=f({src:e,async:!0},t),(t=xd.get(i))&&Fd(e,t),Ve(o=n.createElement("script")),td(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}},S:function(e,t,n){Ad.S(e,t,n);var r=Pd;if(r&&e){var i=Ke(r).hoistableStyles,o=Md(e);t=t||"default";var s=i.get(o);if(!s){var a={loading:0,preload:null};if(s=r.querySelector(Td(o)))a.loading=5;else{e=f({rel:"stylesheet",href:e,"data-precedence":t},n),(n=xd.get(o))&&Ld(e,n);var c=s=r.createElement("link");Ve(c),td(c,"link",e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener("load",function(){a.loading|=1}),c.addEventListener("error",function(){a.loading|=2}),a.loading|=4,jd(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:a},i.set(o,s)}}},M:function(e,t){Ad.M(e,t);var n=Pd;if(n&&e){var r=Ke(n).hoistableScripts,i=Nd(e),o=r.get(i);o||((o=n.querySelector(Bd(i)))||(e=f({src:e,async:!0,type:"module"},t),(t=xd.get(i))&&Fd(e,t),Ve(o=n.createElement("script")),td(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}}};var Pd="undefined"===typeof document?null:document;function Cd(e,t,n){var r=Pd;if(r&&"string"===typeof t&&t){var i=gt(t);i='link[rel="'+e+'"][href="'+i+'"]',"string"===typeof n&&(i+='[crossorigin="'+n+'"]'),Sd.has(i)||(Sd.add(i),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(i)&&(td(t=r.createElement("link"),"link",e),Ve(t),r.head.appendChild(t)))}}function Id(e,t,n,r){var i,o,s,c,l=(l=K.current)?Ed(l):null;if(!l)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return"string"===typeof n.precedence&&"string"===typeof n.href?(t=Md(n.href),(r=(n=Ke(l).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"===typeof n.href&&"string"===typeof n.precedence){e=Md(n.href);var u=Ke(l).hoistableStyles,d=u.get(e);if(d||(l=l.ownerDocument||l,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,d),(u=l.querySelector(Td(e)))&&!u._p&&(d.instance=u,d.state.loading=5),xd.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},xd.set(e,n),u||(i=l,o=e,s=n,c=d.state,i.querySelector('link[rel="preload"][as="style"]['+o+"]")?c.loading=1:(o=i.createElement("link"),c.preload=o,o.addEventListener("load",function(){return c.loading|=1}),o.addEventListener("error",function(){return c.loading|=2}),td(o,"link",s),Ve(o),i.head.appendChild(o))))),t&&null===r)throw Error(a(528,""));return d}if(t&&null!==r)throw Error(a(529,""));return null;case"script":return t=n.async,"string"===typeof(n=n.src)&&t&&"function"!==typeof t&&"symbol"!==typeof t?(t=Nd(n),(r=(n=Ke(l).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Md(e){return'href="'+gt(e)+'"'}function Td(e){return'link[rel="stylesheet"]['+e+"]"}function Od(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Nd(e){return'[src="'+gt(e)+'"]'}function Bd(e){return"script[async]"+e}function Rd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+gt(n.href)+'"]');if(r)return t.instance=r,Ve(r),r;var i=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return Ve(r=(e.ownerDocument||e).createElement("style")),td(r,"style",i),jd(r,n.precedence,e),t.instance=r;case"stylesheet":i=Md(n.href);var o=e.querySelector(Td(i));if(o)return t.state.loading|=4,t.instance=o,Ve(o),o;r=Od(n),(i=xd.get(i))&&Ld(r,i),Ve(o=(e.ownerDocument||e).createElement("link"));var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),td(o,"link",r),t.state.loading|=4,jd(o,n.precedence,e),t.instance=o;case"script":return o=Nd(n.src),(i=e.querySelector(Bd(o)))?(t.instance=i,Ve(i),i):(r=n,(i=xd.get(o))&&Fd(r=f({},n),i),Ve(i=(e=e.ownerDocument||e).createElement("script")),td(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(a(443,t.type))}else"stylesheet"===t.type&&0===(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,jd(r,n.precedence,e));return t.instance}function jd(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,o=i,s=0;s<r.length;s++){var a=r[s];if(a.dataset.precedence===t)o=a;else if(o!==i)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function Ld(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function Fd(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var zd=null;function Dd(e,t,n){if(null===zd){var r=new Map,i=zd=new Map;i.set(n,r)}else(r=(i=zd).get(n))||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var o=n[i];if(!(o[De]||o[Ne]||"link"===e&&"stylesheet"===o.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==o.namespaceURI){var s=o.getAttribute(t)||"";s=e+s;var a=r.get(s);a?a.push(o):r.set(s,[o])}}return r}function Ud(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function Wd(e){return"stylesheet"!==e.type||0!==(3&e.state.loading)}var qd=null;function Hd(){}function Kd(){if(this.count--,0===this.count)if(this.stylesheets)$d(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var Vd=null;function $d(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,Vd=new Map,t.forEach(Gd,e),Vd=null,Kd.call(e))}function Gd(e,t){if(!(4&t.state.loading)){var n=Vd.get(e);if(n)var r=n.get(null);else{n=new Map,Vd.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<i.length;o++){var s=i[o];"LINK"!==s.nodeName&&"not all"===s.getAttribute("media")||(n.set(s.dataset.precedence,s),r=s)}r&&n.set(null,r)}s=(i=t.instance).getAttribute("data-precedence"),(o=n.get(s)||r)===r&&n.set(null,i),n.set(s,i),this.count++,r=Kd.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),o?o.parentNode.insertBefore(i,o.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(i,e.firstChild),t.state.loading|=4}}var Zd={$$typeof:k,Provider:null,Consumer:null,_currentValue:L,_currentValue2:L,_threadCount:0};function Jd(e,t,n,r,i,o,s,a){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ee(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ee(0),this.hiddenUpdates=Ee(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=o,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=a,this.incompleteTransitions=new Map}function Yd(e,t,n,r,i,o,s,a,c,l,u,d){return e=new Jd(e,t,n,s,a,c,l,d),t=1,!0===o&&(t|=24),o=Lr(3,null,null,t),e.current=o,o.stateNode=e,(t=Bi()).refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:r,isDehydrated:n,cache:t},ro(o),e}function Qd(e){return e?e=Rr:Rr}function Xd(e,t,n,r,i,o){i=Qd(i),null===r.context?r.context=i:r.pendingContext=i,(r=oo(t)).payload={element:n},null!==(o=void 0===o?null:o)&&(r.callback=o),null!==(n=so(e,r,t))&&(Ll(n,0,t),ao(n,e,t))}function eh(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function th(e,t){eh(e,t),(e=e.alternate)&&eh(e,t)}function nh(e){if(13===e.tag){var t=Or(e,67108864);null!==t&&Ll(t,0,67108864),th(e,67108864)}}var rh=!0;function ih(e,t,n,r){var i=R.T;R.T=null;var o=j.p;try{j.p=2,sh(e,t,n,r)}finally{j.p=o,R.T=i}}function oh(e,t,n,r){var i=R.T;R.T=null;var o=j.p;try{j.p=8,sh(e,t,n,r)}finally{j.p=o,R.T=i}}function sh(e,t,n,r){if(rh){var i=ah(r);if(null===i)qu(e,t,r,ch,n),vh(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return hh=wh(hh,e,t,n,r,i),!0;case"dragenter":return fh=wh(fh,e,t,n,r,i),!0;case"mouseover":return ph=wh(ph,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return mh.set(o,wh(mh.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,gh.set(o,wh(gh.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(vh(e,r),4&t&&-1<yh.indexOf(e)){for(;null!==i;){var o=qe(i);if(null!==o)switch(o.tag){case 3:if((o=o.stateNode).current.memoizedState.isDehydrated){var s=ve(o.pendingLanes);if(0!==s){var a=o;for(a.pendingLanes|=2,a.entangledLanes|=2;s;){var c=1<<31-pe(s);a.entanglements[1]|=c,s&=~c}xu(o),0===(6&rl)&&(xl=ne()+500,Su(0,!1))}}break;case 13:null!==(a=Or(o,2))&&Ll(a,0,2),Wl(),th(o,2)}if(null===(o=ah(r))&&qu(e,t,r,ch,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else qu(e,t,r,null,n)}}function ah(e){return lh(e=Ot(e))}var ch=null;function lh(e){if(ch=null,null!==(e=We(e))){var t=l(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=u(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ch=e,null}function uh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(re()){case ie:return 2;case oe:return 8;case se:case ae:return 32;case ce:return 268435456;default:return 32}default:return 32}}var dh=!1,hh=null,fh=null,ph=null,mh=new Map,gh=new Map,bh=[],yh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function vh(e,t){switch(e){case"focusin":case"focusout":hh=null;break;case"dragenter":case"dragleave":fh=null;break;case"mouseover":case"mouseout":ph=null;break;case"pointerover":case"pointerout":mh.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":gh.delete(t.pointerId)}}function wh(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=qe(t))&&nh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function _h(e){var t=We(e.target);if(null!==t){var n=l(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=u(n)))return e.blockedOn=t,void function(e,t){var n=j.p;try{return j.p=e,t()}finally{j.p=n}}(e.priority,function(){if(13===n.tag){var e=Rl();e=Ie(e);var t=Or(n,e);null!==t&&Ll(t,0,e),th(n,e)}})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function kh(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=ah(e.nativeEvent);if(null!==n)return null!==(t=qe(n))&&nh(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Tt=r,n.target.dispatchEvent(r),Tt=null,t.shift()}return!0}function xh(e,t,n){kh(e)&&n.delete(t)}function Sh(){dh=!1,null!==hh&&kh(hh)&&(hh=null),null!==fh&&kh(fh)&&(fh=null),null!==ph&&kh(ph)&&(ph=null),mh.forEach(xh),gh.forEach(xh)}function Eh(e,t){e.blockedOn===t&&(e.blockedOn=null,dh||(dh=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Sh)))}var Ah=null;function Ph(e){Ah!==e&&(Ah=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Ah===e&&(Ah=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if("function"!==typeof r){if(null===lh(r||n))continue;break}var o=qe(n);null!==o&&(e.splice(t,3),t-=3,Os(o,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Ch(e){function t(t){return Eh(t,e)}null!==hh&&Eh(hh,e),null!==fh&&Eh(fh,e),null!==ph&&Eh(ph,e),mh.forEach(t),gh.forEach(t);for(var n=0;n<bh.length;n++){var r=bh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<bh.length&&null===(n=bh[0]).blockedOn;)_h(n),null===n.blockedOn&&bh.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],s=i[Be]||null;if("function"===typeof o)s||Ph(n);else if(s){var a=null;if(o&&o.hasAttribute("formAction")){if(i=o,s=o[Be]||null)a=s.formAction;else if(null!==lh(i))continue}else a=s.action;"function"===typeof a?n[r+1]=a:(n.splice(r,3),r-=3),Ph(n)}}}function Ih(e){this._internalRoot=e}function Mh(e){this._internalRoot=e}Mh.prototype.render=Ih.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Xd(t.current,Rl(),e,t,null,null)},Mh.prototype.unmount=Ih.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;Xd(e.current,2,null,e,null,null),Wl(),t[Re]=null}},Mh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Te();e={blockedOn:null,target:e,priority:t};for(var n=0;n<bh.length&&0!==t&&t<bh[n].priority;n++);bh.splice(n,0,e),0===n&&_h(e)}};var Th=o.version;if("19.1.0"!==Th)throw Error(a(527,Th,"19.1.0"));j.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=l(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return d(i),e;if(o===r)return d(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?h(e):null)?null:e.stateNode};var Oh={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.1.0"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Nh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nh.isDisabled&&Nh.supportsFiber)try{de=Nh.inject(Oh),he=Nh}catch(Rh){}}t.createRoot=function(e,t){if(!c(e))throw Error(a(299));var n=!1,r="",i=va,o=wa,s=_a;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onUncaughtError&&(i=t.onUncaughtError),void 0!==t.onCaughtError&&(o=t.onCaughtError),void 0!==t.onRecoverableError&&(s=t.onRecoverableError),void 0!==t.unstable_transitionCallbacks&&t.unstable_transitionCallbacks),t=Yd(e,1,!1,null,0,n,r,i,o,s,0,null),e[Re]=t.current,Uu(e),new Ih(t)},t.hydrateRoot=function(e,t,n){if(!c(e))throw Error(a(299));var r=!1,i="",o=va,s=wa,l=_a,u=null;return null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(i=n.identifierPrefix),void 0!==n.onUncaughtError&&(o=n.onUncaughtError),void 0!==n.onCaughtError&&(s=n.onCaughtError),void 0!==n.onRecoverableError&&(l=n.onRecoverableError),void 0!==n.unstable_transitionCallbacks&&n.unstable_transitionCallbacks,void 0!==n.formState&&(u=n.formState)),(t=Yd(e,1,!0,t,0,r,i,o,s,l,0,u)).context=Qd(null),n=t.current,(i=oo(r=Ie(r=Rl()))).callback=null,so(n,i,r),n=r,t.current.lanes=n,Ae(t,n),xu(t),e[Re]=t.current,Uu(e),new Mh(t)},t.version="19.1.0"},2466:(e,t,n)=>{"use strict";var r=n(2176);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},o=r.useState,s=r.useEffect,a=r.useLayoutEffect,c=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(r){return!0}}var u="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return a(function(){i.value=n,i.getSnapshot=t,l(i)&&u({inst:i})},[e,n,t]),s(function(){return l(i)&&u({inst:i}),e(function(){l(i)&&u({inst:i})})},[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},2470:(e,t,n)=>{"use strict";n.d(t,{l:()=>c});var r=n(8090);class i extends r.C{constructor(e){let{offset:t}=e;super("Offset `".concat(t,"` cannot be negative."),{name:"NegativeOffsetError"})}}class o extends r.C{constructor(e){let{length:t,position:n}=e;super("Position `".concat(n,"` is out of bounds (`0 < position < ").concat(t,"`)."),{name:"PositionOutOfBoundsError"})}}class s extends r.C{constructor(e){let{count:t,limit:n}=e;super("Recursive read limit of `".concat(n,"` exceeded (recursive read count: `").concat(t,"`)."),{name:"RecursiveReadLimitExceededError"})}}const a={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new s({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new o({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new i({offset:e});const t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new i({offset:e});const t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){const t=null!==e&&void 0!==e?e:this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){const n=null!==t&&void 0!==t?t:this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){const t=null!==e&&void 0!==e?e:this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){const t=null!==e&&void 0!==e?e:this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){const t=null!==e&&void 0!==e?e:this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){const t=null!==e&&void 0!==e?e:this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();const e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();const n=this.inspectBytes(e);return this.position+=null!==t&&void 0!==t?t:e,n},readUint8(){this.assertReadLimit(),this._touch();const e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();const e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();const e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();const e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){const t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;const e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function c(e){let{recursiveReadLimit:t=8192}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Object.create(a);return n.bytes=e,n.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}},2494:(e,t,n)=>{"use strict";n.d(t,{lY:()=>_});var r=n(4543),i=n(2766);const o=BigInt(0),s=BigInt(1),a=BigInt(2),c=BigInt(7),l=BigInt(256),u=BigInt(113),d=[],h=[],f=[];for(let k=0,x=s,S=1,E=0;k<24;k++){[S,E]=[E,(2*S+3*E)%5],d.push(2*(5*E+S)),h.push((k+1)*(k+2)/2%64);let e=o;for(let t=0;t<7;t++)x=(x<<s^(x>>c)*u)%l,x&a&&(e^=s<<(s<<BigInt(t))-s);f.push(e)}const p=(0,r.lD)(f,!0),m=p[0],g=p[1],b=(e,t,n)=>n>32?(0,r.WM)(e,t,n):(0,r.P5)(e,t,n),y=(e,t,n)=>n>32?(0,r.im)(e,t,n):(0,r.B4)(e,t,n);class v extends i.Vw{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=r,this.rounds=o,(0,i.Fe)(n),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,i.DH)(this.state)}clone(){return this._cloneInto()}keccak(){(0,i.fd)(this.state32),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24;const n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let r=0;r<10;r++)n[r]=e[r]^e[r+10]^e[r+20]^e[r+30]^e[r+40];for(let r=0;r<10;r+=2){const t=(r+8)%10,i=(r+2)%10,o=n[i],s=n[i+1],a=b(o,s,1)^n[t],c=y(o,s,1)^n[t+1];for(let n=0;n<50;n+=10)e[r+n]^=a,e[r+n+1]^=c}let t=e[2],i=e[3];for(let n=0;n<24;n++){const r=h[n],o=b(t,i,r),s=y(t,i,r),a=d[n];t=e[a],i=e[a+1],e[a]=o,e[a+1]=s}for(let r=0;r<50;r+=10){for(let t=0;t<10;t++)n[t]=e[r+t];for(let t=0;t<10;t++)e[r+t]^=~n[(t+2)%10]&n[(t+4)%10]}e[0]^=m[r],e[1]^=g[r]}(0,i.uH)(n)}(this.state32,this.rounds),(0,i.fd)(this.state32),this.posOut=0,this.pos=0}update(e){(0,i.CC)(this),e=(0,i.ZJ)(e),(0,i.DO)(e);const{blockLen:t,state:n}=this,r=e.length;for(let i=0;i<r;){const o=Math.min(t-this.pos,r-i);for(let t=0;t<o;t++)n[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:n,blockLen:r}=this;e[n]^=t,0!==(128&t)&&n===r-1&&this.keccak(),e[r-1]^=128,this.keccak()}writeInto(e){(0,i.CC)(this,!1),(0,i.DO)(e),this.finish();const t=this.state,{blockLen:n}=this;for(let r=0,i=e.length;r<i;){this.posOut>=n&&this.keccak();const o=Math.min(n-this.posOut,i-r);e.set(t.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,i.Fe)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,i.Ht)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,i.uH)(this.state)}_cloneInto(e){const{blockLen:t,suffix:n,outputLen:r,rounds:i,enableXOF:o}=this;return e||(e=new v(t,n,r,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=n,e.outputLen=r,e.enableXOF=o,e.destroyed=this.destroyed,e}}const w=(e,t,n)=>(0,i.qj)(()=>new v(t,e,n)),_=(()=>w(1,136,32))()},2505:(e,t,n)=>{"use strict";n.d(t,{Ao:()=>r});const r=2n**256n-1n},2569:(e,t,n)=>{"use strict";n.d(t,{P:()=>a});var r=n(7543),i=n(6961);const o=/^0x[a-fA-F0-9]{40}$/,s=new r.A(8192);function a(e,t){const{strict:n=!0}=null!==t&&void 0!==t?t:{},r="".concat(e,".").concat(n);if(s.has(r))return s.get(r);const a=!!o.test(e)&&(e.toLowerCase()===e||!n||(0,i.o)(e)===e);return s.set(r,a),a}},2580:(e,t,n)=>{"use strict";n.d(t,{l:()=>o});var r=n(8090),i=n(6600);function o(e,t){const n=(e.details||"").toLowerCase(),o=e instanceof r.C?e.walk(e=>(null===e||void 0===e?void 0:e.code)===i.A7.code):e;return o instanceof r.C?new i.A7({cause:e,message:o.details}):i.A7.nodeMessage.test(n)?new i.A7({cause:e,message:e.details}):i.BG.nodeMessage.test(n)?new i.BG({cause:e,maxFeePerGas:null===t||void 0===t?void 0:t.maxFeePerGas}):i.jj.nodeMessage.test(n)?new i.jj({cause:e,maxFeePerGas:null===t||void 0===t?void 0:t.maxFeePerGas}):i.K0.nodeMessage.test(n)?new i.K0({cause:e,nonce:null===t||void 0===t?void 0:t.nonce}):i.Oh.nodeMessage.test(n)?new i.Oh({cause:e,nonce:null===t||void 0===t?void 0:t.nonce}):i.vW.nodeMessage.test(n)?new i.vW({cause:e,nonce:null===t||void 0===t?void 0:t.nonce}):i.k5.nodeMessage.test(n)?new i.k5({cause:e}):i.lY.nodeMessage.test(n)?new i.lY({cause:e,gas:null===t||void 0===t?void 0:t.gas}):i.Fo.nodeMessage.test(n)?new i.Fo({cause:e,gas:null===t||void 0===t?void 0:t.gas}):i.uC.nodeMessage.test(n)?new i.uC({cause:e}):i.lN.nodeMessage.test(n)?new i.lN({cause:e,maxFeePerGas:null===t||void 0===t?void 0:t.maxFeePerGas,maxPriorityFeePerGas:null===t||void 0===t?void 0:t.maxPriorityFeePerGas}):new i.RM({cause:e})}},2611:function(e,t){"use strict";var n,r=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};function o(e){const t=t=>{let{register:n}=t;return n(e)};try{window.dispatchEvent(new s(t))}catch(n){console.error("wallet-standard:register-wallet event could not be dispatched\n",n)}try{window.addEventListener("wallet-standard:app-ready",e=>{let{detail:n}=e;return t(n)})}catch(n){console.error("wallet-standard:app-ready event listener could not be added\n",n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.DEPRECATED_registerWallet=t.registerWallet=void 0,t.registerWallet=o;class s extends Event{get detail(){return r(this,n,"f")}get type(){return"wallet-standard:register-wallet"}constructor(e){super("wallet-standard:register-wallet",{bubbles:!1,cancelable:!1,composed:!1}),n.set(this,void 0),i(this,n,e,"f")}preventDefault(){throw new Error("preventDefault cannot be called")}stopImmediatePropagation(){throw new Error("stopImmediatePropagation cannot be called")}stopPropagation(){throw new Error("stopPropagation cannot be called")}}n=new WeakMap,t.DEPRECATED_registerWallet=function(e){var t;o(e);try{((t=window.navigator).wallets||(t.wallets=[])).push(t=>{let{register:n}=t;return n(e)})}catch(n){console.error("window.navigator.wallets could not be pushed\n",n)}}},2696:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useAnchorWallet=function(){const{publicKey:e,signTransaction:t,signAllTransactions:n}=(0,i.useWallet)();return(0,r.useMemo)(()=>e&&t&&n?{publicKey:e,signTransaction:t,signAllTransactions:n}:void 0,[e,t,n])};const r=n(2176),i=n(1025)},2709:(e,t,n)=>{var r="undefined"!==typeof globalThis&&globalThis||"undefined"!==typeof self&&self||"undefined"!==typeof n.g&&n.g,i=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="undefined"!==typeof e&&e||"undefined"!==typeof self&&self||"undefined"!==typeof n.g&&n.g||{},i="URLSearchParams"in r,o="Symbol"in r&&"iterator"in Symbol,s="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),a="FormData"in r,c="ArrayBuffer"in r;if(c)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!==typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function h(e){return"string"!==typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return o&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function m(e){if(!e._noBody)return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function g(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function b(e){var t=new FileReader,n=g(t);return t.readAsArrayBuffer(e),n}function y(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"===typeof e?this._bodyText=e:s&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():c&&s&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=y(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=y(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"===typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=m(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(s)return this.blob().then(b);throw new Error("could not read as ArrayBuffer")},this.text=function(){var e=m(this);if(e)return e;if(this._bodyBlob)return function(e){var t=new FileReader,n=g(t),r=/charset=([A-Za-z0-9_-]+)/.exec(e.type),i=r?r[1]:"utf-8";return t.readAsText(e,i),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(k)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(e,t){e=d(e),t=h(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},p.prototype.delete=function(e){delete this.map[d(e)]},p.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},p.prototype.set=function(e,t){this.map[d(e)]=h(t)},p.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},p.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),f(e)},p.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),f(e)},p.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),f(e)},o&&(p.prototype[Symbol.iterator]=p.prototype.entries);var w=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function _(e,t){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n=(t=t||{}).body;if(e instanceof _){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=function(e){var t=e.toUpperCase();return w.indexOf(t)>-1?t:e}(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||function(){if("AbortController"in r)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),("GET"===this.method||"HEAD"===this.method)&&("no-store"===t.cache||"no-cache"===t.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function k(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function x(e){var t=new p;return e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();try{t.append(r,i)}catch(o){console.warn("Response "+o.message)}}}),t}function S(e,t){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},v.call(_.prototype),v.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var E=[301,302,303,307,308];S.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code");return new S(null,{status:t,headers:{location:e}})},t.DOMException=r.DOMException;try{new t.DOMException}catch(P){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function A(e,n){return new Promise(function(i,o){var a=new _(e,n);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function u(){l.abort()}if(l.onload=function(){var e={statusText:l.statusText,headers:x(l.getAllResponseHeaders()||"")};0===a.url.indexOf("file://")&&(l.status<200||l.status>599)?e.status=200:e.status=l.status,e.url="responseURL"in l?l.responseURL:e.headers.get("X-Request-URL");var t="response"in l?l.response:l.responseText;setTimeout(function(){i(new S(t,e))},0)},l.onerror=function(){setTimeout(function(){o(new TypeError("Network request failed"))},0)},l.ontimeout=function(){setTimeout(function(){o(new TypeError("Network request timed out"))},0)},l.onabort=function(){setTimeout(function(){o(new t.DOMException("Aborted","AbortError"))},0)},l.open(a.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(a.url),!0),"include"===a.credentials?l.withCredentials=!0:"omit"===a.credentials&&(l.withCredentials=!1),"responseType"in l&&(s?l.responseType="blob":c&&(l.responseType="arraybuffer")),n&&"object"===typeof n.headers&&!(n.headers instanceof p||r.Headers&&n.headers instanceof r.Headers)){var f=[];Object.getOwnPropertyNames(n.headers).forEach(function(e){f.push(d(e)),l.setRequestHeader(e,h(n.headers[e]))}),a.headers.forEach(function(e,t){-1===f.indexOf(t)&&l.setRequestHeader(t,e)})}else a.headers.forEach(function(e,t){l.setRequestHeader(t,e)});a.signal&&(a.signal.addEventListener("abort",u),l.onreadystatechange=function(){4===l.readyState&&a.signal.removeEventListener("abort",u)}),l.send("undefined"===typeof a._bodyInit?null:a._bodyInit)})}A.polyfill=!0,r.fetch||(r.fetch=A,r.Headers=p,r.Request=_,r.Response=S),t.Headers=p,t.Request=_,t.Response=S,t.fetch=A}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=r.fetch?r:i;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},2745:(e,t,n)=>{const r=n(9178),i=n(1605),o=n(3375),s=n(5192),a=n(6065),c=n(7960),l=n(2344),u=n(410),d=n(5184),h=n(7327),f=n(9873),p=n(100),m=n(1325);function g(e,t,n){const r=e.size,i=f.getEncodedBits(t,n);let o,s;for(o=0;o<15;o++)s=1===(i>>o&1),o<6?e.set(o,8,s,!0):o<8?e.set(o+1,8,s,!0):e.set(r-15+o,8,s,!0),o<8?e.set(8,r-o-1,s,!0):o<9?e.set(8,15-o-1+1,s,!0):e.set(8,15-o-1,s,!0);e.set(r-8,8,1,!0)}function b(e,t,n){const i=new o;n.forEach(function(t){i.put(t.mode.bit,4),i.put(t.getLength(),p.getCharCountIndicator(t.mode,e)),t.write(i)});const s=8*(r.getSymbolTotalCodewords(e)-u.getTotalCodewordsCount(e,t));for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const a=(s-i.getLengthInBits())/8;for(let r=0;r<a;r++)i.put(r%2?17:236,8);return function(e,t,n){const i=r.getSymbolTotalCodewords(t),o=u.getTotalCodewordsCount(t,n),s=i-o,a=u.getBlocksCount(t,n),c=i%a,l=a-c,h=Math.floor(i/a),f=Math.floor(s/a),p=f+1,m=h-f,g=new d(m);let b=0;const y=new Array(a),v=new Array(a);let w=0;const _=new Uint8Array(e.buffer);for(let r=0;r<a;r++){const e=r<l?f:p;y[r]=_.slice(b,b+e),v[r]=g.encode(y[r]),b+=e,w=Math.max(w,e)}const k=new Uint8Array(i);let x,S,E=0;for(x=0;x<w;x++)for(S=0;S<a;S++)x<y[S].length&&(k[E++]=y[S][x]);for(x=0;x<m;x++)for(S=0;S<a;S++)k[E++]=v[S][x];return k}(i,e,t)}function y(e,t,n,i){let o;if(Array.isArray(e))o=m.fromArray(e);else{if("string"!==typeof e)throw new Error("Invalid data");{let r=t;if(!r){const t=m.rawSplit(e);r=h.getBestVersionForData(t,n)}o=m.fromString(e,r||40)}}const u=h.getBestVersionForData(o,n);if(!u)throw new Error("The amount of data is too big to be stored in a QR Code");if(t){if(t<u)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+u+".\n")}else t=u;const d=b(t,n,o),f=r.getSymbolSize(t),p=new s(f);return function(e,t){const n=e.size,r=c.getPositions(t);for(let i=0;i<r.length;i++){const t=r[i][0],o=r[i][1];for(let r=-1;r<=7;r++)if(!(t+r<=-1||n<=t+r))for(let i=-1;i<=7;i++)o+i<=-1||n<=o+i||(r>=0&&r<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===r||6===r)||r>=2&&r<=4&&i>=2&&i<=4?e.set(t+r,o+i,!0,!0):e.set(t+r,o+i,!1,!0))}}(p,t),function(e){const t=e.size;for(let n=8;n<t-8;n++){const t=n%2===0;e.set(n,6,t,!0),e.set(6,n,t,!0)}}(p),function(e,t){const n=a.getPositions(t);for(let r=0;r<n.length;r++){const t=n[r][0],i=n[r][1];for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)-2===n||2===n||-2===r||2===r||0===n&&0===r?e.set(t+n,i+r,!0,!0):e.set(t+n,i+r,!1,!0)}}(p,t),g(p,n,0),t>=7&&function(e,t){const n=e.size,r=h.getEncodedBits(t);let i,o,s;for(let a=0;a<18;a++)i=Math.floor(a/3),o=a%3+n-8-3,s=1===(r>>a&1),e.set(i,o,s,!0),e.set(o,i,s,!0)}(p,t),function(e,t){const n=e.size;let r=-1,i=n-1,o=7,s=0;for(let a=n-1;a>0;a-=2)for(6===a&&a--;;){for(let n=0;n<2;n++)if(!e.isReserved(i,a-n)){let r=!1;s<t.length&&(r=1===(t[s]>>>o&1)),e.set(i,a-n,r),o--,-1===o&&(s++,o=7)}if(i+=r,i<0||n<=i){i-=r,r=-r;break}}}(p,d),isNaN(i)&&(i=l.getBestMask(p,g.bind(null,p,n))),l.applyMask(i,p),g(p,n,i),{modules:p,version:t,errorCorrectionLevel:n,maskPattern:i,segments:o}}t.create=function(e,t){if("undefined"===typeof e||""===e)throw new Error("No input text");let n,o,s=i.M;return"undefined"!==typeof t&&(s=i.from(t.errorCorrectionLevel,i.M),n=h.from(t.version),o=l.from(t.maskPattern),t.toSJISFunc&&r.setToSJISFunction(t.toSJISFunc)),y(e,n,s,o)}},2747:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",c=16,l=32,u=64,d=128,h=256,f=1/0,p=9007199254740991,m=NaN,g=4294967295,b=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",c],["flip",512],["partial",l],["partialRight",u],["rearg",h]],y="[object Arguments]",v="[object Array]",w="[object Boolean]",_="[object Date]",k="[object Error]",x="[object Function]",S="[object GeneratorFunction]",E="[object Map]",A="[object Number]",P="[object Object]",C="[object Promise]",I="[object RegExp]",M="[object Set]",T="[object String]",O="[object Symbol]",N="[object WeakMap]",B="[object ArrayBuffer]",R="[object DataView]",j="[object Float32Array]",L="[object Float64Array]",F="[object Int8Array]",z="[object Int16Array]",D="[object Int32Array]",U="[object Uint8Array]",W="[object Uint8ClampedArray]",q="[object Uint16Array]",H="[object Uint32Array]",K=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,$=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,J=RegExp(G.source),Y=RegExp(Z.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),se=/^\s+/,ae=/\s/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,le=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,he=/[()=,{}\[\]\/\s]/,fe=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ge=/^[-+]0x[0-9a-f]+$/i,be=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,_e=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ke=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",Ee="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",Pe="a-z\\xdf-\\xf6\\xf8-\\xff",Ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Ie="\\ufe0e\\ufe0f",Me="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Te="['\u2019]",Oe="["+Se+"]",Ne="["+Me+"]",Be="["+Ee+"]",Re="\\d+",je="["+Ae+"]",Le="["+Pe+"]",Fe="[^"+Se+Me+Re+Ae+Pe+Ce+"]",ze="\\ud83c[\\udffb-\\udfff]",De="[^"+Se+"]",Ue="(?:\\ud83c[\\udde6-\\uddff]){2}",We="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Ce+"]",He="\\u200d",Ke="(?:"+Le+"|"+Fe+")",Ve="(?:"+qe+"|"+Fe+")",$e="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Ge="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ze="(?:"+Be+"|"+ze+")"+"?",Je="["+Ie+"]?",Ye=Je+Ze+("(?:"+He+"(?:"+[De,Ue,We].join("|")+")"+Je+Ze+")*"),Qe="(?:"+[je,Ue,We].join("|")+")"+Ye,Xe="(?:"+[De+Be+"?",Be,Ue,We,Oe].join("|")+")",et=RegExp(Te,"g"),tt=RegExp(Be,"g"),nt=RegExp(ze+"(?="+ze+")|"+Xe+Ye,"g"),rt=RegExp([qe+"?"+Le+"+"+$e+"(?="+[Ne,qe,"$"].join("|")+")",Ve+"+"+Ge+"(?="+[Ne,qe+Ke,"$"].join("|")+")",qe+"?"+Ke+"+"+$e,qe+"+"+Ge,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Re,Qe].join("|"),"g"),it=RegExp("["+He+Se+Ee+Ie+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,st=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],at=-1,ct={};ct[j]=ct[L]=ct[F]=ct[z]=ct[D]=ct[U]=ct[W]=ct[q]=ct[H]=!0,ct[y]=ct[v]=ct[B]=ct[w]=ct[R]=ct[_]=ct[k]=ct[x]=ct[E]=ct[A]=ct[P]=ct[I]=ct[M]=ct[T]=ct[N]=!1;var lt={};lt[y]=lt[v]=lt[B]=lt[R]=lt[w]=lt[_]=lt[j]=lt[L]=lt[F]=lt[z]=lt[D]=lt[E]=lt[A]=lt[P]=lt[I]=lt[M]=lt[T]=lt[O]=lt[U]=lt[W]=lt[q]=lt[H]=!0,lt[k]=lt[x]=lt[N]=!1;var ut={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ht=parseInt,ft="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,mt=ft||pt||Function("return this")(),gt=t&&!t.nodeType&&t,bt=gt&&e&&!e.nodeType&&e,yt=bt&&bt.exports===gt,vt=yt&&ft.process,wt=function(){try{var e=bt&&bt.require&&bt.require("util").types;return e||vt&&vt.binding&&vt.binding("util")}catch(t){}}(),_t=wt&&wt.isArrayBuffer,kt=wt&&wt.isDate,xt=wt&&wt.isMap,St=wt&&wt.isRegExp,Et=wt&&wt.isSet,At=wt&&wt.isTypedArray;function Pt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ct(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function It(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Mt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Tt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Ot(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function Nt(e,t){return!!(null==e?0:e.length)&&qt(e,t,0)>-1}function Bt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function jt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Lt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Ft(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function zt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Dt=$t("length");function Ut(e,t,n){var r;return n(e,function(e,n,i){if(t(e,n,i))return r=n,!1}),r}function Wt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function qt(e,t,n){return t===t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Wt(e,Kt,n)}function Ht(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function Kt(e){return e!==e}function Vt(e,t){var n=null==e?0:e.length;return n?Jt(e,t)/n:m}function $t(e){return function(t){return null==t?i:t[e]}}function Gt(e){return function(t){return null==e?i:e[t]}}function Zt(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}function Jt(e,t){for(var n,r=-1,o=e.length;++r<o;){var s=t(e[r]);s!==i&&(n=n===i?s:n+s)}return n}function Yt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Qt(e){return e?e.slice(0,gn(e)+1).replace(se,""):e}function Xt(e){return function(t){return e(t)}}function en(e,t){return Rt(t,function(t){return e[t]})}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&qt(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&qt(t,e[n],0)>-1;);return n}var on=Gt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),sn=Gt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function an(e){return"\\"+ut[e]}function cn(e){return it.test(e)}function ln(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function un(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&s!==a||(e[n]=a,o[i++]=n)}return o}function hn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function fn(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=[e,e]}),n}function pn(e){return cn(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):Dt(e)}function mn(e){return cn(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function gn(e){for(var t=e.length;t--&&ae.test(e.charAt(t)););return t}var bn=Gt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var yn=function e(t){var n=(t=null==t?mt:yn.defaults(mt.Object(),t,yn.pick(mt,st))).Array,r=t.Date,ae=t.Error,Se=t.Function,Ee=t.Math,Ae=t.Object,Pe=t.RegExp,Ce=t.String,Ie=t.TypeError,Me=n.prototype,Te=Se.prototype,Oe=Ae.prototype,Ne=t["__core-js_shared__"],Be=Te.toString,Re=Oe.hasOwnProperty,je=0,Le=function(){var e=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Fe=Oe.toString,ze=Be.call(Ae),De=mt._,Ue=Pe("^"+Be.call(Re).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),We=yt?t.Buffer:i,qe=t.Symbol,He=t.Uint8Array,Ke=We?We.allocUnsafe:i,Ve=un(Ae.getPrototypeOf,Ae),$e=Ae.create,Ge=Oe.propertyIsEnumerable,Ze=Me.splice,Je=qe?qe.isConcatSpreadable:i,Ye=qe?qe.iterator:i,Qe=qe?qe.toStringTag:i,Xe=function(){try{var e=ho(Ae,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,it=r&&r.now!==mt.Date.now&&r.now,ut=t.setTimeout!==mt.setTimeout&&t.setTimeout,ft=Ee.ceil,pt=Ee.floor,gt=Ae.getOwnPropertySymbols,bt=We?We.isBuffer:i,vt=t.isFinite,wt=Me.join,Dt=un(Ae.keys,Ae),Gt=Ee.max,vn=Ee.min,wn=r.now,_n=t.parseInt,kn=Ee.random,xn=Me.reverse,Sn=ho(t,"DataView"),En=ho(t,"Map"),An=ho(t,"Promise"),Pn=ho(t,"Set"),Cn=ho(t,"WeakMap"),In=ho(Ae,"create"),Mn=Cn&&new Cn,Tn={},On=Fo(Sn),Nn=Fo(En),Bn=Fo(An),Rn=Fo(Pn),jn=Fo(Cn),Ln=qe?qe.prototype:i,Fn=Ln?Ln.valueOf:i,zn=Ln?Ln.toString:i;function Dn(e){if(ta(e)&&!Hs(e)&&!(e instanceof Hn)){if(e instanceof qn)return e;if(Re.call(e,"__wrapped__"))return zo(e)}return new qn(e)}var Un=function(){function e(){}return function(t){if(!ea(t))return{};if($e)return $e(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Wn(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Hn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new $n;++t<n;)this.add(e[t])}function Zn(e){var t=this.__data__=new Vn(e);this.size=t.size}function Jn(e,t){var n=Hs(e),r=!n&&qs(e),i=!n&&!r&&Gs(e),o=!n&&!r&&!i&&la(e),s=n||r||i||o,a=s?Yt(e.length,Ce):[],c=a.length;for(var l in e)!t&&!Re.call(e,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||vo(l,c))||a.push(l);return a}function Yn(e){var t=e.length;return t?e[Gr(0,t-1)]:i}function Qn(e,t){return Ro(Ii(e),ar(t,0,e.length))}function Xn(e){return Ro(Ii(e))}function er(e,t,n){(n!==i&&!Ds(e[t],n)||n===i&&!(t in e))&&or(e,t,n)}function tr(e,t,n){var r=e[t];Re.call(e,t)&&Ds(r,n)&&(n!==i||t in e)||or(e,t,n)}function nr(e,t){for(var n=e.length;n--;)if(Ds(e[n][0],t))return n;return-1}function rr(e,t,n,r){return hr(e,function(e,i,o){t(r,e,n(e),o)}),r}function ir(e,t){return e&&Mi(t,Ta(t),e)}function or(e,t,n){"__proto__"==t&&Xe?Xe(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function sr(e,t){for(var r=-1,o=t.length,s=n(o),a=null==e;++r<o;)s[r]=a?i:Aa(e,t[r]);return s}function ar(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function cr(e,t,n,r,o,s){var a,c=1&t,l=2&t,u=4&t;if(n&&(a=o?n(e,r,o,s):n(e)),a!==i)return a;if(!ea(e))return e;var d=Hs(e);if(d){if(a=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Re.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!c)return Ii(e,a)}else{var h=mo(e),f=h==x||h==S;if(Gs(e))return xi(e,c);if(h==P||h==y||f&&!o){if(a=l||f?{}:bo(e),!c)return l?function(e,t){return Mi(e,po(e),t)}(e,function(e,t){return e&&Mi(t,Oa(t),e)}(a,e)):function(e,t){return Mi(e,fo(e),t)}(e,ir(a,e))}else{if(!lt[h])return o?e:{};a=function(e,t,n){var r=e.constructor;switch(t){case B:return Si(e);case w:case _:return new r(+e);case R:return function(e,t){var n=t?Si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case j:case L:case F:case z:case D:case U:case W:case q:case H:return Ei(e,n);case E:return new r;case A:case T:return new r(e);case I:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case M:return new r;case O:return i=e,Fn?Ae(Fn.call(i)):{}}var i}(e,h,c)}}s||(s=new Zn);var p=s.get(e);if(p)return p;s.set(e,a),sa(e)?e.forEach(function(r){a.add(cr(r,t,n,r,e,s))}):na(e)&&e.forEach(function(r,i){a.set(i,cr(r,t,n,i,e,s))});var m=d?i:(u?l?io:ro:l?Oa:Ta)(e);return It(m||e,function(r,i){m&&(r=e[i=r]),tr(a,i,cr(r,t,n,i,e,s))}),a}function lr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ae(e);r--;){var o=n[r],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function ur(e,t,n){if("function"!=typeof e)throw new Ie(o);return To(function(){e.apply(i,n)},t)}function dr(e,t,n,r){var i=-1,o=Nt,s=!0,a=e.length,c=[],l=t.length;if(!a)return c;n&&(t=Rt(t,Xt(n))),r?(o=Bt,s=!1):t.length>=200&&(o=tn,s=!1,t=new Gn(t));e:for(;++i<a;){var u=e[i],d=null==n?u:n(u);if(u=r||0!==u?u:0,s&&d===d){for(var h=l;h--;)if(t[h]===d)continue e;c.push(u)}else o(t,d,r)||c.push(u)}return c}Dn.templateSettings={escape:Q,evaluate:X,interpolate:ee,variable:"",imports:{_:Dn}},Dn.prototype=Wn.prototype,Dn.prototype.constructor=Dn,qn.prototype=Un(Wn.prototype),qn.prototype.constructor=qn,Hn.prototype=Un(Wn.prototype),Hn.prototype.constructor=Hn,Kn.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Kn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Kn.prototype.get=function(e){var t=this.__data__;if(In){var n=t[e];return n===s?i:n}return Re.call(t,e)?t[e]:i},Kn.prototype.has=function(e){var t=this.__data__;return In?t[e]!==i:Re.call(t,e)},Kn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=In&&t===i?s:t,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ze.call(t,n,1),--this.size,!0)},Vn.prototype.get=function(e){var t=this.__data__,n=nr(t,e);return n<0?i:t[n][1]},Vn.prototype.has=function(e){return nr(this.__data__,e)>-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},$n.prototype.clear=function(){this.size=0,this.__data__={hash:new Kn,map:new(En||Vn),string:new Kn}},$n.prototype.delete=function(e){var t=lo(this,e).delete(e);return this.size-=t?1:0,t},$n.prototype.get=function(e){return lo(this,e).get(e)},$n.prototype.has=function(e){return lo(this,e).has(e)},$n.prototype.set=function(e,t){var n=lo(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Gn.prototype.add=Gn.prototype.push=function(e){return this.__data__.set(e,s),this},Gn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Zn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Zn.prototype.get=function(e){return this.__data__.get(e)},Zn.prototype.has=function(e){return this.__data__.has(e)},Zn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!En||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $n(r)}return n.set(e,t),this.size=n.size,this};var hr=Ni(wr),fr=Ni(_r,!0);function pr(e,t){var n=!0;return hr(e,function(e,r,i){return n=!!t(e,r,i)}),n}function mr(e,t,n){for(var r=-1,o=e.length;++r<o;){var s=e[r],a=t(s);if(null!=a&&(c===i?a===a&&!ca(a):n(a,c)))var c=a,l=s}return l}function gr(e,t){var n=[];return hr(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function br(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=yo),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?br(a,t-1,n,r,i):jt(i,a):r||(i[i.length]=a)}return i}var yr=Bi(),vr=Bi(!0);function wr(e,t){return e&&yr(e,t,Ta)}function _r(e,t){return e&&vr(e,t,Ta)}function kr(e,t){return Ot(t,function(t){return Ys(e[t])})}function xr(e,t){for(var n=0,r=(t=vi(t,e)).length;null!=e&&n<r;)e=e[Lo(t[n++])];return n&&n==r?e:i}function Sr(e,t,n){var r=t(e);return Hs(e)?r:jt(r,n(e))}function Er(e){return null==e?e===i?"[object Undefined]":"[object Null]":Qe&&Qe in Ae(e)?function(e){var t=Re.call(e,Qe),n=e[Qe];try{e[Qe]=i;var r=!0}catch(s){}var o=Fe.call(e);r&&(t?e[Qe]=n:delete e[Qe]);return o}(e):function(e){return Fe.call(e)}(e)}function Ar(e,t){return e>t}function Pr(e,t){return null!=e&&Re.call(e,t)}function Cr(e,t){return null!=e&&t in Ae(e)}function Ir(e,t,r){for(var o=r?Bt:Nt,s=e[0].length,a=e.length,c=a,l=n(a),u=1/0,d=[];c--;){var h=e[c];c&&t&&(h=Rt(h,Xt(t))),u=vn(h.length,u),l[c]=!r&&(t||s>=120&&h.length>=120)?new Gn(c&&h):i}h=e[0];var f=-1,p=l[0];e:for(;++f<s&&d.length<u;){var m=h[f],g=t?t(m):m;if(m=r||0!==m?m:0,!(p?tn(p,g):o(d,g,r))){for(c=a;--c;){var b=l[c];if(!(b?tn(b,g):o(e[c],g,r)))continue e}p&&p.push(g),d.push(m)}}return d}function Mr(e,t,n){var r=null==(e=Co(e,t=vi(t,e)))?e:e[Lo(Jo(t))];return null==r?i:Pt(r,e,n)}function Tr(e){return ta(e)&&Er(e)==y}function Or(e,t,n,r,o){return e===t||(null==e||null==t||!ta(e)&&!ta(t)?e!==e&&t!==t:function(e,t,n,r,o,s){var a=Hs(e),c=Hs(t),l=a?v:mo(e),u=c?v:mo(t),d=(l=l==y?P:l)==P,h=(u=u==y?P:u)==P,f=l==u;if(f&&Gs(e)){if(!Gs(t))return!1;a=!0,d=!1}if(f&&!d)return s||(s=new Zn),a||la(e)?to(e,t,n,r,o,s):function(e,t,n,r,i,o,s){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case B:return!(e.byteLength!=t.byteLength||!o(new He(e),new He(t)));case w:case _:case A:return Ds(+e,+t);case k:return e.name==t.name&&e.message==t.message;case I:case T:return e==t+"";case E:var a=ln;case M:var c=1&r;if(a||(a=hn),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;r|=2,s.set(e,t);var u=to(a(e),a(t),r,i,o,s);return s.delete(e),u;case O:if(Fn)return Fn.call(e)==Fn.call(t)}return!1}(e,t,l,n,r,o,s);if(!(1&n)){var p=d&&Re.call(e,"__wrapped__"),m=h&&Re.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,b=m?t.value():t;return s||(s=new Zn),o(g,b,n,r,s)}}if(!f)return!1;return s||(s=new Zn),function(e,t,n,r,o,s){var a=1&n,c=ro(e),l=c.length,u=ro(t),d=u.length;if(l!=d&&!a)return!1;var h=l;for(;h--;){var f=c[h];if(!(a?f in t:Re.call(t,f)))return!1}var p=s.get(e),m=s.get(t);if(p&&m)return p==t&&m==e;var g=!0;s.set(e,t),s.set(t,e);var b=a;for(;++h<l;){var y=e[f=c[h]],v=t[f];if(r)var w=a?r(v,y,f,t,e,s):r(y,v,f,e,t,s);if(!(w===i?y===v||o(y,v,n,r,s):w)){g=!1;break}b||(b="constructor"==f)}if(g&&!b){var _=e.constructor,k=t.constructor;_==k||!("constructor"in e)||!("constructor"in t)||"function"==typeof _&&_ instanceof _&&"function"==typeof k&&k instanceof k||(g=!1)}return s.delete(e),s.delete(t),g}(e,t,n,r,o,s)}(e,t,n,r,Or,o))}function Nr(e,t,n,r){var o=n.length,s=o,a=!r;if(null==e)return!s;for(e=Ae(e);o--;){var c=n[o];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<s;){var l=(c=n[o])[0],u=e[l],d=c[1];if(a&&c[2]){if(u===i&&!(l in e))return!1}else{var h=new Zn;if(r)var f=r(u,d,l,e,t,h);if(!(f===i?Or(d,u,3,r,h):f))return!1}}return!0}function Br(e){return!(!ea(e)||(t=e,Le&&Le in t))&&(Ys(e)?Ue:ye).test(Fo(e));var t}function Rr(e){return"function"==typeof e?e:null==e?rc:"object"==typeof e?Hs(e)?Ur(e[0],e[1]):Dr(e):hc(e)}function jr(e){if(!So(e))return Dt(e);var t=[];for(var n in Ae(e))Re.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Lr(e){if(!ea(e))return function(e){var t=[];if(null!=e)for(var n in Ae(e))t.push(n);return t}(e);var t=So(e),n=[];for(var r in e)("constructor"!=r||!t&&Re.call(e,r))&&n.push(r);return n}function Fr(e,t){return e<t}function zr(e,t){var r=-1,i=Vs(e)?n(e.length):[];return hr(e,function(e,n,o){i[++r]=t(e,n,o)}),i}function Dr(e){var t=uo(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(n){return n===e||Nr(n,e,t)}}function Ur(e,t){return _o(e)&&Eo(t)?Ao(Lo(e),t):function(n){var r=Aa(n,e);return r===i&&r===t?Pa(n,e):Or(t,r,3)}}function Wr(e,t,n,r,o){e!==t&&yr(t,function(s,a){if(o||(o=new Zn),ea(s))!function(e,t,n,r,o,s,a){var c=Io(e,n),l=Io(t,n),u=a.get(l);if(u)return void er(e,n,u);var d=s?s(c,l,n+"",e,t,a):i,h=d===i;if(h){var f=Hs(l),p=!f&&Gs(l),m=!f&&!p&&la(l);d=l,f||p||m?Hs(c)?d=c:$s(c)?d=Ii(c):p?(h=!1,d=xi(l,!0)):m?(h=!1,d=Ei(l,!0)):d=[]:ia(l)||qs(l)?(d=c,qs(c)?d=ba(c):ea(c)&&!Ys(c)||(d=bo(l))):h=!1}h&&(a.set(l,d),o(d,l,r,s,a),a.delete(l));er(e,n,d)}(e,t,a,n,Wr,r,o);else{var c=r?r(Io(e,a),s,a+"",e,t,o):i;c===i&&(c=s),er(e,a,c)}},Oa)}function qr(e,t){var n=e.length;if(n)return vo(t+=t<0?n:0,n)?e[t]:i}function Hr(e,t,n){t=t.length?Rt(t,function(e){return Hs(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e}):[rc];var r=-1;t=Rt(t,Xt(co()));var i=zr(e,function(e,n,i){var o=Rt(t,function(t){return t(e)});return{criteria:o,index:++r,value:e}});return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;for(;++r<s;){var c=Ai(i[r],o[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)})}function Kr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=xr(e,s);n(a,s)&&Xr(o,vi(s,e),a)}return o}function Vr(e,t,n,r){var i=r?Ht:qt,o=-1,s=t.length,a=e;for(e===t&&(t=Ii(t)),n&&(a=Rt(e,Xt(n)));++o<s;)for(var c=0,l=t[o],u=n?n(l):l;(c=i(a,u,c,r))>-1;)a!==e&&Ze.call(a,c,1),Ze.call(e,c,1);return e}function $r(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;vo(i)?Ze.call(e,i,1):di(e,i)}}return e}function Gr(e,t){return e+pt(kn()*(t-e+1))}function Zr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pt(t/2))&&(e+=e)}while(t);return n}function Jr(e,t){return Oo(Po(e,t,rc),e+"")}function Yr(e){return Yn(Da(e))}function Qr(e,t){var n=Da(e);return Ro(n,ar(t,0,n.length))}function Xr(e,t,n,r){if(!ea(e))return e;for(var o=-1,s=(t=vi(t,e)).length,a=s-1,c=e;null!=c&&++o<s;){var l=Lo(t[o]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(o!=a){var d=c[l];(u=r?r(d,l,c):i)===i&&(u=ea(d)?d:vo(t[o+1])?[]:{})}tr(c,l,u),c=c[l]}return e}var ei=Mn?function(e,t){return Mn.set(e,t),e}:rc,ti=Xe?function(e,t){return Xe(e,"toString",{configurable:!0,enumerable:!1,value:ec(t),writable:!0})}:rc;function ni(e){return Ro(Da(e))}function ri(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function ii(e,t){var n;return hr(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!ca(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return si(e,t,rc,n)}function si(e,t,n,r){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=n(t))!==t,c=null===t,l=ca(t),u=t===i;o<s;){var d=pt((o+s)/2),h=n(e[d]),f=h!==i,p=null===h,m=h===h,g=ca(h);if(a)var b=r||m;else b=u?m&&(r||f):c?m&&f&&(r||!p):l?m&&f&&!p&&(r||!g):!p&&!g&&(r?h<=t:h<t);b?o=d+1:s=d}return vn(s,4294967294)}function ai(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!Ds(a,c)){var c=a;o[i++]=0===s?0:s}}return o}function ci(e){return"number"==typeof e?e:ca(e)?m:+e}function li(e){if("string"==typeof e)return e;if(Hs(e))return Rt(e,li)+"";if(ca(e))return zn?zn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,n){var r=-1,i=Nt,o=e.length,s=!0,a=[],c=a;if(n)s=!1,i=Bt;else if(o>=200){var l=t?null:Zi(e);if(l)return hn(l);s=!1,i=tn,c=new Gn}else c=t?[]:a;e:for(;++r<o;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,s&&d===d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),a.push(u)}else i(c,d,n)||(c!==a&&c.push(d),a.push(u))}return a}function di(e,t){return null==(e=Co(e,t=vi(t,e)))||delete e[Lo(Jo(t))]}function hi(e,t,n,r){return Xr(e,t,n(xr(e,t)),r)}function fi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ri(e,r?0:o,r?o+1:i):ri(e,r?o+1:0,r?i:o)}function pi(e,t){var n=e;return n instanceof Hn&&(n=n.value()),Lt(t,function(e,t){return t.func.apply(t.thisArg,jt([e],t.args))},n)}function mi(e,t,r){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],c=-1;++c<i;)c!=o&&(s[o]=dr(s[o]||a,e[c],t,r));return ui(br(s,1),t,r)}function gi(e,t,n){for(var r=-1,o=e.length,s=t.length,a={};++r<o;){var c=r<s?t[r]:i;n(a,e[r],c)}return a}function bi(e){return $s(e)?e:[]}function yi(e){return"function"==typeof e?e:rc}function vi(e,t){return Hs(e)?e:_o(e,t)?[e]:jo(ya(e))}var wi=Jr;function _i(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ri(e,t,n)}var ki=nt||function(e){return mt.clearTimeout(e)};function xi(e,t){if(t)return e.slice();var n=e.length,r=Ke?Ke(n):new e.constructor(n);return e.copy(r),r}function Si(e){var t=new e.constructor(e.byteLength);return new He(t).set(new He(e)),t}function Ei(e,t){var n=t?Si(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,s=ca(e),a=t!==i,c=null===t,l=t===t,u=ca(t);if(!c&&!u&&!s&&e>t||s&&a&&l&&!c&&!u||r&&a&&l||!n&&l||!o)return 1;if(!r&&!s&&!u&&e<t||u&&n&&o&&!r&&!s||c&&n&&o||!a&&o||!l)return-1}return 0}function Pi(e,t,r,i){for(var o=-1,s=e.length,a=r.length,c=-1,l=t.length,u=Gt(s-a,0),d=n(l+u),h=!i;++c<l;)d[c]=t[c];for(;++o<a;)(h||o<s)&&(d[r[o]]=e[o]);for(;u--;)d[c++]=e[o++];return d}function Ci(e,t,r,i){for(var o=-1,s=e.length,a=-1,c=r.length,l=-1,u=t.length,d=Gt(s-c,0),h=n(d+u),f=!i;++o<d;)h[o]=e[o];for(var p=o;++l<u;)h[p+l]=t[l];for(;++a<c;)(f||o<s)&&(h[p+r[a]]=e[o++]);return h}function Ii(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Mi(e,t,n,r){var o=!n;n||(n={});for(var s=-1,a=t.length;++s<a;){var c=t[s],l=r?r(n[c],e[c],c,n,e):i;l===i&&(l=e[c]),o?or(n,c,l):tr(n,c,l)}return n}function Ti(e,t){return function(n,r){var i=Hs(n)?Ct:rr,o=t?t():{};return i(n,e,co(r,2),o)}}function Oi(e){return Jr(function(t,n){var r=-1,o=n.length,s=o>1?n[o-1]:i,a=o>2?n[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&wo(n[0],n[1],a)&&(s=o<3?i:s,o=1),t=Ae(t);++r<o;){var c=n[r];c&&e(t,c,r,s)}return t})}function Ni(e,t){return function(n,r){if(null==n)return n;if(!Vs(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Ae(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Bi(e){return function(t,n,r){for(var i=-1,o=Ae(t),s=r(t),a=s.length;a--;){var c=s[e?a:++i];if(!1===n(o[c],c,o))break}return t}}function Ri(e){return function(t){var n=cn(t=ya(t))?mn(t):i,r=n?n[0]:t.charAt(0),o=n?_i(n,1).join(""):t.slice(1);return r[e]()+o}}function ji(e){return function(t){return Lt(Ya(qa(t).replace(et,"")),e,"")}}function Li(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Un(e.prototype),r=e.apply(n,t);return ea(r)?r:n}}function Fi(e){return function(t,n,r){var o=Ae(t);if(!Vs(t)){var s=co(n,3);t=Ta(t),n=function(e){return s(o[e],e,o)}}var a=e(t,n,r);return a>-1?o[s?t[a]:a]:i}}function zi(e){return no(function(t){var n=t.length,r=n,s=qn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new Ie(o);if(s&&!c&&"wrapper"==so(a))var c=new qn([],!0)}for(r=c?r:n;++r<n;){var l=so(a=t[r]),u="wrapper"==l?oo(a):i;c=u&&ko(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[so(u[0])].apply(c,u[3]):1==a.length&&ko(a)?c[l]():c.thru(a)}return function(){var e=arguments,r=e[0];if(c&&1==e.length&&Hs(r))return c.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}})}function Di(e,t,r,o,s,a,c,l,u,h){var f=t&d,p=1&t,m=2&t,g=24&t,b=512&t,y=m?i:Li(e);return function d(){for(var v=arguments.length,w=n(v),_=v;_--;)w[_]=arguments[_];if(g)var k=ao(d),x=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,k);if(o&&(w=Pi(w,o,s,g)),a&&(w=Ci(w,a,c,g)),v-=x,g&&v<h){var S=dn(w,k);return $i(e,t,Di,d.placeholder,r,w,S,l,u,h-v)}var E=p?r:this,A=m?E[e]:e;return v=w.length,l?w=function(e,t){var n=e.length,r=vn(t.length,n),o=Ii(e);for(;r--;){var s=t[r];e[r]=vo(s,n)?o[s]:i}return e}(w,l):b&&v>1&&w.reverse(),f&&u<v&&(w.length=u),this&&this!==mt&&this instanceof d&&(A=y||Li(A)),A.apply(E,w)}}function Ui(e,t){return function(n,r){return function(e,t,n,r){return wr(e,function(e,i,o){t(r,n(e),i,o)}),r}(n,e,t(r),{})}}function Wi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=li(n),r=li(r)):(n=ci(n),r=ci(r)),o=e(n,r)}return o}}function qi(e){return no(function(t){return t=Rt(t,Xt(co())),Jr(function(n){var r=this;return e(t,function(e){return Pt(e,r,n)})})})}function Hi(e,t){var n=(t=t===i?" ":li(t)).length;if(n<2)return n?Zr(t,e):t;var r=Zr(t,ft(e/pn(t)));return cn(t)?_i(mn(r),0,e).join(""):r.slice(0,e)}function Ki(e){return function(t,r,o){return o&&"number"!=typeof o&&wo(t,r,o)&&(r=o=i),t=fa(t),r===i?(r=t,t=0):r=fa(r),function(e,t,r,i){for(var o=-1,s=Gt(ft((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,o=o===i?t<r?1:-1:fa(o),e)}}function Vi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ga(t),n=ga(n)),e(t,n)}}function $i(e,t,n,r,o,s,a,c,d,h){var f=8&t;t|=f?l:u,4&(t&=~(f?u:l))||(t&=-4);var p=[e,t,o,f?s:i,f?a:i,f?i:s,f?i:a,c,d,h],m=n.apply(i,p);return ko(e)&&Mo(m,p),m.placeholder=r,No(m,e,t)}function Gi(e){var t=Ee[e];return function(e,n){if(e=ga(e),(n=null==n?0:vn(pa(n),292))&&vt(e)){var r=(ya(e)+"e").split("e");return+((r=(ya(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Zi=Pn&&1/hn(new Pn([,-0]))[1]==f?function(e){return new Pn(e)}:cc;function Ji(e){return function(t){var n=mo(t);return n==E?ln(t):n==M?fn(t):function(e,t){return Rt(t,function(t){return[t,e[t]]})}(t,e(t))}}function Yi(e,t,r,s,f,p,m,g){var b=2&t;if(!b&&"function"!=typeof e)throw new Ie(o);var y=s?s.length:0;if(y||(t&=-97,s=f=i),m=m===i?m:Gt(pa(m),0),g=g===i?g:pa(g),y-=f?f.length:0,t&u){var v=s,w=f;s=f=i}var _=b?i:oo(e),k=[e,t,r,s,f,v,w,p,m,g];if(_&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,s=r==d&&8==n||r==d&&n==h&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!s)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var c=t[3];if(c){var l=e[3];e[3]=l?Pi(l,c,t[4]):c,e[4]=l?dn(e[3],a):t[4]}(c=t[5])&&(l=e[5],e[5]=l?Ci(l,c,t[6]):c,e[6]=l?dn(e[5],a):t[6]);(c=t[7])&&(e[7]=c);r&d&&(e[8]=null==e[8]?t[8]:vn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(k,_),e=k[0],t=k[1],r=k[2],s=k[3],f=k[4],!(g=k[9]=k[9]===i?b?0:e.length:Gt(k[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)x=8==t||t==c?function(e,t,r){var o=Li(e);return function s(){for(var a=arguments.length,c=n(a),l=a,u=ao(s);l--;)c[l]=arguments[l];var d=a<3&&c[0]!==u&&c[a-1]!==u?[]:dn(c,u);return(a-=d.length)<r?$i(e,t,Di,s.placeholder,i,c,d,i,i,r-a):Pt(this&&this!==mt&&this instanceof s?o:e,this,c)}}(e,t,g):t!=l&&33!=t||f.length?Di.apply(i,k):function(e,t,r,i){var o=1&t,s=Li(e);return function t(){for(var a=-1,c=arguments.length,l=-1,u=i.length,d=n(u+c),h=this&&this!==mt&&this instanceof t?s:e;++l<u;)d[l]=i[l];for(;c--;)d[l++]=arguments[++a];return Pt(h,o?r:this,d)}}(e,t,r,s);else var x=function(e,t,n){var r=1&t,i=Li(e);return function t(){return(this&&this!==mt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,r);return No((_?ei:Mo)(x,k),e,t)}function Qi(e,t,n,r){return e===i||Ds(e,Oe[n])&&!Re.call(r,n)?t:e}function Xi(e,t,n,r,o,s){return ea(e)&&ea(t)&&(s.set(t,e),Wr(e,t,i,Xi,s),s.delete(t)),e}function eo(e){return ia(e)?i:e}function to(e,t,n,r,o,s){var a=1&n,c=e.length,l=t.length;if(c!=l&&!(a&&l>c))return!1;var u=s.get(e),d=s.get(t);if(u&&d)return u==t&&d==e;var h=-1,f=!0,p=2&n?new Gn:i;for(s.set(e,t),s.set(t,e);++h<c;){var m=e[h],g=t[h];if(r)var b=a?r(g,m,h,t,e,s):r(m,g,h,e,t,s);if(b!==i){if(b)continue;f=!1;break}if(p){if(!zt(t,function(e,t){if(!tn(p,t)&&(m===e||o(m,e,n,r,s)))return p.push(t)})){f=!1;break}}else if(m!==g&&!o(m,g,n,r,s)){f=!1;break}}return s.delete(e),s.delete(t),f}function no(e){return Oo(Po(e,i,Ko),e+"")}function ro(e){return Sr(e,Ta,fo)}function io(e){return Sr(e,Oa,po)}var oo=Mn?function(e){return Mn.get(e)}:cc;function so(e){for(var t=e.name+"",n=Tn[t],r=Re.call(Tn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function ao(e){return(Re.call(Dn,"placeholder")?Dn:e).placeholder}function co(){var e=Dn.iteratee||ic;return e=e===ic?Rr:e,arguments.length?e(arguments[0],arguments[1]):e}function lo(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function uo(e){for(var t=Ta(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Eo(i)]}return t}function ho(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Br(n)?n:i}var fo=gt?function(e){return null==e?[]:(e=Ae(e),Ot(gt(e),function(t){return Ge.call(e,t)}))}:mc,po=gt?function(e){for(var t=[];e;)jt(t,fo(e)),e=Ve(e);return t}:mc,mo=Er;function go(e,t,n){for(var r=-1,i=(t=vi(t,e)).length,o=!1;++r<i;){var s=Lo(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Xs(i)&&vo(s,i)&&(Hs(e)||qs(e))}function bo(e){return"function"!=typeof e.constructor||So(e)?{}:Un(Ve(e))}function yo(e){return Hs(e)||qs(e)||!!(Je&&e&&e[Je])}function vo(e,t){var n=typeof e;return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function wo(e,t,n){if(!ea(n))return!1;var r=typeof t;return!!("number"==r?Vs(n)&&vo(t,n.length):"string"==r&&t in n)&&Ds(n[t],e)}function _o(e,t){if(Hs(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ca(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Ae(t))}function ko(e){var t=so(e),n=Dn[t];if("function"!=typeof n||!(t in Hn.prototype))return!1;if(e===n)return!0;var r=oo(n);return!!r&&e===r[0]}(Sn&&mo(new Sn(new ArrayBuffer(1)))!=R||En&&mo(new En)!=E||An&&mo(An.resolve())!=C||Pn&&mo(new Pn)!=M||Cn&&mo(new Cn)!=N)&&(mo=function(e){var t=Er(e),n=t==P?e.constructor:i,r=n?Fo(n):"";if(r)switch(r){case On:return R;case Nn:return E;case Bn:return C;case Rn:return M;case jn:return N}return t});var xo=Ne?Ys:gc;function So(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Oe)}function Eo(e){return e===e&&!ea(e)}function Ao(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Ae(n)))}}function Po(e,t,r){return t=Gt(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=Gt(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var c=n(t+1);++o<t;)c[o]=i[o];return c[t]=r(a),Pt(e,this,c)}}function Co(e,t){return t.length<2?e:xr(e,ri(t,0,-1))}function Io(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var Mo=Bo(ei),To=ut||function(e,t){return mt.setTimeout(e,t)},Oo=Bo(ti);function No(e,t,n){var r=t+"";return Oo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return It(b,function(n){var r="_."+n[0];t&n[1]&&!Nt(e,r)&&e.push(r)}),e.sort()}(function(e){var t=e.match(le);return t?t[1].split(ue):[]}(r),n)))}function Bo(e){var t=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Ro(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var s=Gr(n,o),a=e[s];e[s]=e[n],e[n]=a}return e.length=t,e}var jo=function(e){var t=Bs(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,function(e,n,r,i){t.push(r?i.replace(fe,"$1"):n||e)}),t});function Lo(e){if("string"==typeof e||ca(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Fo(e){if(null!=e){try{return Be.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function zo(e){if(e instanceof Hn)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Do=Jr(function(e,t){return $s(e)?dr(e,br(t,1,$s,!0)):[]}),Uo=Jr(function(e,t){var n=Jo(t);return $s(n)&&(n=i),$s(e)?dr(e,br(t,1,$s,!0),co(n,2)):[]}),Wo=Jr(function(e,t){var n=Jo(t);return $s(n)&&(n=i),$s(e)?dr(e,br(t,1,$s,!0),i,n):[]});function qo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:pa(n);return i<0&&(i=Gt(r+i,0)),Wt(e,co(t,3),i)}function Ho(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=pa(n),o=n<0?Gt(r+o,0):vn(o,r-1)),Wt(e,co(t,3),o,!0)}function Ko(e){return(null==e?0:e.length)?br(e,1):[]}function Vo(e){return e&&e.length?e[0]:i}var $o=Jr(function(e){var t=Rt(e,bi);return t.length&&t[0]===e[0]?Ir(t):[]}),Go=Jr(function(e){var t=Jo(e),n=Rt(e,bi);return t===Jo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Ir(n,co(t,2)):[]}),Zo=Jr(function(e){var t=Jo(e),n=Rt(e,bi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Ir(n,i,t):[]});function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Yo=Jr(Qo);function Qo(e,t){return e&&e.length&&t&&t.length?Vr(e,t):e}var Xo=no(function(e,t){var n=null==e?0:e.length,r=sr(e,t);return $r(e,Rt(t,function(e){return vo(e,n)?+e:e}).sort(Ai)),r});function es(e){return null==e?e:xn.call(e)}var ts=Jr(function(e){return ui(br(e,1,$s,!0))}),ns=Jr(function(e){var t=Jo(e);return $s(t)&&(t=i),ui(br(e,1,$s,!0),co(t,2))}),rs=Jr(function(e){var t=Jo(e);return t="function"==typeof t?t:i,ui(br(e,1,$s,!0),i,t)});function is(e){if(!e||!e.length)return[];var t=0;return e=Ot(e,function(e){if($s(e))return t=Gt(e.length,t),!0}),Yt(t,function(t){return Rt(e,$t(t))})}function os(e,t){if(!e||!e.length)return[];var n=is(e);return null==t?n:Rt(n,function(e){return Pt(t,i,e)})}var ss=Jr(function(e,t){return $s(e)?dr(e,t):[]}),as=Jr(function(e){return mi(Ot(e,$s))}),cs=Jr(function(e){var t=Jo(e);return $s(t)&&(t=i),mi(Ot(e,$s),co(t,2))}),ls=Jr(function(e){var t=Jo(e);return t="function"==typeof t?t:i,mi(Ot(e,$s),i,t)}),us=Jr(is);var ds=Jr(function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,os(e,n)});function hs(e){var t=Dn(e);return t.__chain__=!0,t}function fs(e,t){return t(e)}var ps=no(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return sr(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Hn&&vo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:fs,args:[o],thisArg:i}),new qn(r,this.__chain__).thru(function(e){return t&&!e.length&&e.push(i),e})):this.thru(o)});var ms=Ti(function(e,t,n){Re.call(e,n)?++e[n]:or(e,n,1)});var gs=Fi(qo),bs=Fi(Ho);function ys(e,t){return(Hs(e)?It:hr)(e,co(t,3))}function vs(e,t){return(Hs(e)?Mt:fr)(e,co(t,3))}var ws=Ti(function(e,t,n){Re.call(e,n)?e[n].push(t):or(e,n,[t])});var _s=Jr(function(e,t,r){var i=-1,o="function"==typeof t,s=Vs(e)?n(e.length):[];return hr(e,function(e){s[++i]=o?Pt(t,e,r):Mr(e,t,r)}),s}),ks=Ti(function(e,t,n){or(e,n,t)});function xs(e,t){return(Hs(e)?Rt:zr)(e,co(t,3))}var Ss=Ti(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});var Es=Jr(function(e,t){if(null==e)return[];var n=t.length;return n>1&&wo(e,t[0],t[1])?t=[]:n>2&&wo(t[0],t[1],t[2])&&(t=[t[0]]),Hr(e,br(t,1),[])}),As=it||function(){return mt.Date.now()};function Ps(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Yi(e,d,i,i,i,i,t)}function Cs(e,t){var n;if("function"!=typeof t)throw new Ie(o);return e=pa(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Is=Jr(function(e,t,n){var r=1;if(n.length){var i=dn(n,ao(Is));r|=l}return Yi(e,r,t,n,i)}),Ms=Jr(function(e,t,n){var r=3;if(n.length){var i=dn(n,ao(Ms));r|=l}return Yi(t,r,e,n,i)});function Ts(e,t,n){var r,s,a,c,l,u,d=0,h=!1,f=!1,p=!0;if("function"!=typeof e)throw new Ie(o);function m(t){var n=r,o=s;return r=s=i,d=t,c=e.apply(o,n)}function g(e){var n=e-u;return u===i||n>=t||n<0||f&&e-d>=a}function b(){var e=As();if(g(e))return y(e);l=To(b,function(e){var n=t-(e-u);return f?vn(n,a-(e-d)):n}(e))}function y(e){return l=i,p&&r?m(e):(r=s=i,c)}function v(){var e=As(),n=g(e);if(r=arguments,s=this,u=e,n){if(l===i)return function(e){return d=e,l=To(b,t),h?m(e):c}(u);if(f)return ki(l),l=To(b,t),m(u)}return l===i&&(l=To(b,t)),c}return t=ga(t)||0,ea(n)&&(h=!!n.leading,a=(f="maxWait"in n)?Gt(ga(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),v.cancel=function(){l!==i&&ki(l),d=0,r=u=s=l=i},v.flush=function(){return l===i?c:y(As())},v}var Os=Jr(function(e,t){return ur(e,1,t)}),Ns=Jr(function(e,t,n){return ur(e,ga(t)||0,n)});function Bs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ie(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Bs.Cache||$n),n}function Rs(e){if("function"!=typeof e)throw new Ie(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Bs.Cache=$n;var js=wi(function(e,t){var n=(t=1==t.length&&Hs(t[0])?Rt(t[0],Xt(co())):Rt(br(t,1),Xt(co()))).length;return Jr(function(r){for(var i=-1,o=vn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Pt(e,this,r)})}),Ls=Jr(function(e,t){var n=dn(t,ao(Ls));return Yi(e,l,i,t,n)}),Fs=Jr(function(e,t){var n=dn(t,ao(Fs));return Yi(e,u,i,t,n)}),zs=no(function(e,t){return Yi(e,h,i,i,i,t)});function Ds(e,t){return e===t||e!==e&&t!==t}var Us=Vi(Ar),Ws=Vi(function(e,t){return e>=t}),qs=Tr(function(){return arguments}())?Tr:function(e){return ta(e)&&Re.call(e,"callee")&&!Ge.call(e,"callee")},Hs=n.isArray,Ks=_t?Xt(_t):function(e){return ta(e)&&Er(e)==B};function Vs(e){return null!=e&&Xs(e.length)&&!Ys(e)}function $s(e){return ta(e)&&Vs(e)}var Gs=bt||gc,Zs=kt?Xt(kt):function(e){return ta(e)&&Er(e)==_};function Js(e){if(!ta(e))return!1;var t=Er(e);return t==k||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!ia(e)}function Ys(e){if(!ea(e))return!1;var t=Er(e);return t==x||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Qs(e){return"number"==typeof e&&e==pa(e)}function Xs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function ea(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ta(e){return null!=e&&"object"==typeof e}var na=xt?Xt(xt):function(e){return ta(e)&&mo(e)==E};function ra(e){return"number"==typeof e||ta(e)&&Er(e)==A}function ia(e){if(!ta(e)||Er(e)!=P)return!1;var t=Ve(e);if(null===t)return!0;var n=Re.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Be.call(n)==ze}var oa=St?Xt(St):function(e){return ta(e)&&Er(e)==I};var sa=Et?Xt(Et):function(e){return ta(e)&&mo(e)==M};function aa(e){return"string"==typeof e||!Hs(e)&&ta(e)&&Er(e)==T}function ca(e){return"symbol"==typeof e||ta(e)&&Er(e)==O}var la=At?Xt(At):function(e){return ta(e)&&Xs(e.length)&&!!ct[Er(e)]};var ua=Vi(Fr),da=Vi(function(e,t){return e<=t});function ha(e){if(!e)return[];if(Vs(e))return aa(e)?mn(e):Ii(e);if(Ye&&e[Ye])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ye]());var t=mo(e);return(t==E?ln:t==M?hn:Da)(e)}function fa(e){return e?(e=ga(e))===f||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function pa(e){var t=fa(e),n=t%1;return t===t?n?t-n:t:0}function ma(e){return e?ar(pa(e),0,g):0}function ga(e){if("number"==typeof e)return e;if(ca(e))return m;if(ea(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ea(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Qt(e);var n=be.test(e);return n||ve.test(e)?ht(e.slice(2),n?2:8):ge.test(e)?m:+e}function ba(e){return Mi(e,Oa(e))}function ya(e){return null==e?"":li(e)}var va=Oi(function(e,t){if(So(t)||Vs(t))Mi(t,Ta(t),e);else for(var n in t)Re.call(t,n)&&tr(e,n,t[n])}),wa=Oi(function(e,t){Mi(t,Oa(t),e)}),_a=Oi(function(e,t,n,r){Mi(t,Oa(t),e,r)}),ka=Oi(function(e,t,n,r){Mi(t,Ta(t),e,r)}),xa=no(sr);var Sa=Jr(function(e,t){e=Ae(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&wo(t[0],t[1],o)&&(r=1);++n<r;)for(var s=t[n],a=Oa(s),c=-1,l=a.length;++c<l;){var u=a[c],d=e[u];(d===i||Ds(d,Oe[u])&&!Re.call(e,u))&&(e[u]=s[u])}return e}),Ea=Jr(function(e){return e.push(i,Xi),Pt(Ba,i,e)});function Aa(e,t,n){var r=null==e?i:xr(e,t);return r===i?n:r}function Pa(e,t){return null!=e&&go(e,t,Cr)}var Ca=Ui(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),e[t]=n},ec(rc)),Ia=Ui(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Fe.call(t)),Re.call(e,t)?e[t].push(n):e[t]=[n]},co),Ma=Jr(Mr);function Ta(e){return Vs(e)?Jn(e):jr(e)}function Oa(e){return Vs(e)?Jn(e,!0):Lr(e)}var Na=Oi(function(e,t,n){Wr(e,t,n)}),Ba=Oi(function(e,t,n,r){Wr(e,t,n,r)}),Ra=no(function(e,t){var n={};if(null==e)return n;var r=!1;t=Rt(t,function(t){return t=vi(t,e),r||(r=t.length>1),t}),Mi(e,io(e),n),r&&(n=cr(n,7,eo));for(var i=t.length;i--;)di(n,t[i]);return n});var ja=no(function(e,t){return null==e?{}:function(e,t){return Kr(e,t,function(t,n){return Pa(e,n)})}(e,t)});function La(e,t){if(null==e)return{};var n=Rt(io(e),function(e){return[e]});return t=co(t),Kr(e,n,function(e,n){return t(e,n[0])})}var Fa=Ji(Ta),za=Ji(Oa);function Da(e){return null==e?[]:en(e,Ta(e))}var Ua=ji(function(e,t,n){return t=t.toLowerCase(),e+(n?Wa(t):t)});function Wa(e){return Ja(ya(e).toLowerCase())}function qa(e){return(e=ya(e))&&e.replace(_e,on).replace(tt,"")}var Ha=ji(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Ka=ji(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Va=Ri("toLowerCase");var $a=ji(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});var Ga=ji(function(e,t,n){return e+(n?" ":"")+Ja(t)});var Za=ji(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ja=Ri("toUpperCase");function Ya(e,t,n){return e=ya(e),(t=n?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Qa=Jr(function(e,t){try{return Pt(e,i,t)}catch(n){return Js(n)?n:new ae(n)}}),Xa=no(function(e,t){return It(t,function(t){t=Lo(t),or(e,t,Is(e[t],e))}),e});function ec(e){return function(){return e}}var tc=zi(),nc=zi(!0);function rc(e){return e}function ic(e){return Rr("function"==typeof e?e:cr(e,1))}var oc=Jr(function(e,t){return function(n){return Mr(n,e,t)}}),sc=Jr(function(e,t){return function(n){return Mr(e,n,t)}});function ac(e,t,n){var r=Ta(t),i=kr(t,r);null!=n||ea(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=kr(t,Ta(t)));var o=!(ea(n)&&"chain"in n)||!!n.chain,s=Ys(e);return It(i,function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=Ii(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,jt([this.value()],arguments))})}),e}function cc(){}var lc=qi(Rt),uc=qi(Tt),dc=qi(zt);function hc(e){return _o(e)?$t(Lo(e)):function(e){return function(t){return xr(t,e)}}(e)}var fc=Ki(),pc=Ki(!0);function mc(){return[]}function gc(){return!1}var bc=Wi(function(e,t){return e+t},0),yc=Gi("ceil"),vc=Wi(function(e,t){return e/t},1),wc=Gi("floor");var _c=Wi(function(e,t){return e*t},1),kc=Gi("round"),xc=Wi(function(e,t){return e-t},0);return Dn.after=function(e,t){if("function"!=typeof t)throw new Ie(o);return e=pa(e),function(){if(--e<1)return t.apply(this,arguments)}},Dn.ary=Ps,Dn.assign=va,Dn.assignIn=wa,Dn.assignInWith=_a,Dn.assignWith=ka,Dn.at=xa,Dn.before=Cs,Dn.bind=Is,Dn.bindAll=Xa,Dn.bindKey=Ms,Dn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Hs(e)?e:[e]},Dn.chain=hs,Dn.chunk=function(e,t,r){t=(r?wo(e,t,r):t===i)?1:Gt(pa(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,c=n(ft(o/t));s<o;)c[a++]=ri(e,s,s+=t);return c},Dn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Dn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return jt(Hs(r)?Ii(r):[r],br(t,1))},Dn.cond=function(e){var t=null==e?0:e.length,n=co();return e=t?Rt(e,function(e){if("function"!=typeof e[1])throw new Ie(o);return[n(e[0]),e[1]]}):[],Jr(function(n){for(var r=-1;++r<t;){var i=e[r];if(Pt(i[0],this,n))return Pt(i[1],this,n)}})},Dn.conforms=function(e){return function(e){var t=Ta(e);return function(n){return lr(n,e,t)}}(cr(e,1))},Dn.constant=ec,Dn.countBy=ms,Dn.create=function(e,t){var n=Un(e);return null==t?n:ir(n,t)},Dn.curry=function e(t,n,r){var o=Yi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Dn.curryRight=function e(t,n,r){var o=Yi(t,c,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Dn.debounce=Ts,Dn.defaults=Sa,Dn.defaultsDeep=Ea,Dn.defer=Os,Dn.delay=Ns,Dn.difference=Do,Dn.differenceBy=Uo,Dn.differenceWith=Wo,Dn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=n||t===i?1:pa(t))<0?0:t,r):[]},Dn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,0,(t=r-(t=n||t===i?1:pa(t)))<0?0:t):[]},Dn.dropRightWhile=function(e,t){return e&&e.length?fi(e,co(t,3),!0,!0):[]},Dn.dropWhile=function(e,t){return e&&e.length?fi(e,co(t,3),!0):[]},Dn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&wo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=pa(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:pa(r))<0&&(r+=o),r=n>r?0:ma(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Dn.filter=function(e,t){return(Hs(e)?Ot:gr)(e,co(t,3))},Dn.flatMap=function(e,t){return br(xs(e,t),1)},Dn.flatMapDeep=function(e,t){return br(xs(e,t),f)},Dn.flatMapDepth=function(e,t,n){return n=n===i?1:pa(n),br(xs(e,t),n)},Dn.flatten=Ko,Dn.flattenDeep=function(e){return(null==e?0:e.length)?br(e,f):[]},Dn.flattenDepth=function(e,t){return(null==e?0:e.length)?br(e,t=t===i?1:pa(t)):[]},Dn.flip=function(e){return Yi(e,512)},Dn.flow=tc,Dn.flowRight=nc,Dn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Dn.functions=function(e){return null==e?[]:kr(e,Ta(e))},Dn.functionsIn=function(e){return null==e?[]:kr(e,Oa(e))},Dn.groupBy=ws,Dn.initial=function(e){return(null==e?0:e.length)?ri(e,0,-1):[]},Dn.intersection=$o,Dn.intersectionBy=Go,Dn.intersectionWith=Zo,Dn.invert=Ca,Dn.invertBy=Ia,Dn.invokeMap=_s,Dn.iteratee=ic,Dn.keyBy=ks,Dn.keys=Ta,Dn.keysIn=Oa,Dn.map=xs,Dn.mapKeys=function(e,t){var n={};return t=co(t,3),wr(e,function(e,r,i){or(n,t(e,r,i),e)}),n},Dn.mapValues=function(e,t){var n={};return t=co(t,3),wr(e,function(e,r,i){or(n,r,t(e,r,i))}),n},Dn.matches=function(e){return Dr(cr(e,1))},Dn.matchesProperty=function(e,t){return Ur(e,cr(t,1))},Dn.memoize=Bs,Dn.merge=Na,Dn.mergeWith=Ba,Dn.method=oc,Dn.methodOf=sc,Dn.mixin=ac,Dn.negate=Rs,Dn.nthArg=function(e){return e=pa(e),Jr(function(t){return qr(t,e)})},Dn.omit=Ra,Dn.omitBy=function(e,t){return La(e,Rs(co(t)))},Dn.once=function(e){return Cs(2,e)},Dn.orderBy=function(e,t,n,r){return null==e?[]:(Hs(t)||(t=null==t?[]:[t]),Hs(n=r?i:n)||(n=null==n?[]:[n]),Hr(e,t,n))},Dn.over=lc,Dn.overArgs=js,Dn.overEvery=uc,Dn.overSome=dc,Dn.partial=Ls,Dn.partialRight=Fs,Dn.partition=Ss,Dn.pick=ja,Dn.pickBy=La,Dn.property=hc,Dn.propertyOf=function(e){return function(t){return null==e?i:xr(e,t)}},Dn.pull=Yo,Dn.pullAll=Qo,Dn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Vr(e,t,co(n,2)):e},Dn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Vr(e,t,i,n):e},Dn.pullAt=Xo,Dn.range=fc,Dn.rangeRight=pc,Dn.rearg=zs,Dn.reject=function(e,t){return(Hs(e)?Ot:gr)(e,Rs(co(t,3)))},Dn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=co(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return $r(e,i),n},Dn.rest=function(e,t){if("function"!=typeof e)throw new Ie(o);return Jr(e,t=t===i?t:pa(t))},Dn.reverse=es,Dn.sampleSize=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:pa(t),(Hs(e)?Qn:Qr)(e,t)},Dn.set=function(e,t,n){return null==e?e:Xr(e,t,n)},Dn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Xr(e,t,n,r)},Dn.shuffle=function(e){return(Hs(e)?Xn:ni)(e)},Dn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&wo(e,t,n)?(t=0,n=r):(t=null==t?0:pa(t),n=n===i?r:pa(n)),ri(e,t,n)):[]},Dn.sortBy=Es,Dn.sortedUniq=function(e){return e&&e.length?ai(e):[]},Dn.sortedUniqBy=function(e,t){return e&&e.length?ai(e,co(t,2)):[]},Dn.split=function(e,t,n){return n&&"number"!=typeof n&&wo(e,t,n)&&(t=n=i),(n=n===i?g:n>>>0)?(e=ya(e))&&("string"==typeof t||null!=t&&!oa(t))&&!(t=li(t))&&cn(e)?_i(mn(e),0,n):e.split(t,n):[]},Dn.spread=function(e,t){if("function"!=typeof e)throw new Ie(o);return t=null==t?0:Gt(pa(t),0),Jr(function(n){var r=n[t],i=_i(n,0,t);return r&&jt(i,r),Pt(e,this,i)})},Dn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Dn.take=function(e,t,n){return e&&e.length?ri(e,0,(t=n||t===i?1:pa(t))<0?0:t):[]},Dn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=r-(t=n||t===i?1:pa(t)))<0?0:t,r):[]},Dn.takeRightWhile=function(e,t){return e&&e.length?fi(e,co(t,3),!1,!0):[]},Dn.takeWhile=function(e,t){return e&&e.length?fi(e,co(t,3)):[]},Dn.tap=function(e,t){return t(e),e},Dn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new Ie(o);return ea(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ts(e,t,{leading:r,maxWait:t,trailing:i})},Dn.thru=fs,Dn.toArray=ha,Dn.toPairs=Fa,Dn.toPairsIn=za,Dn.toPath=function(e){return Hs(e)?Rt(e,Lo):ca(e)?[e]:Ii(jo(ya(e)))},Dn.toPlainObject=ba,Dn.transform=function(e,t,n){var r=Hs(e),i=r||Gs(e)||la(e);if(t=co(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:ea(e)&&Ys(o)?Un(Ve(e)):{}}return(i?It:wr)(e,function(e,r,i){return t(n,e,r,i)}),n},Dn.unary=function(e){return Ps(e,1)},Dn.union=ts,Dn.unionBy=ns,Dn.unionWith=rs,Dn.uniq=function(e){return e&&e.length?ui(e):[]},Dn.uniqBy=function(e,t){return e&&e.length?ui(e,co(t,2)):[]},Dn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},Dn.unset=function(e,t){return null==e||di(e,t)},Dn.unzip=is,Dn.unzipWith=os,Dn.update=function(e,t,n){return null==e?e:hi(e,t,yi(n))},Dn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:hi(e,t,yi(n),r)},Dn.values=Da,Dn.valuesIn=function(e){return null==e?[]:en(e,Oa(e))},Dn.without=ss,Dn.words=Ya,Dn.wrap=function(e,t){return Ls(yi(t),e)},Dn.xor=as,Dn.xorBy=cs,Dn.xorWith=ls,Dn.zip=us,Dn.zipObject=function(e,t){return gi(e||[],t||[],tr)},Dn.zipObjectDeep=function(e,t){return gi(e||[],t||[],Xr)},Dn.zipWith=ds,Dn.entries=Fa,Dn.entriesIn=za,Dn.extend=wa,Dn.extendWith=_a,ac(Dn,Dn),Dn.add=bc,Dn.attempt=Qa,Dn.camelCase=Ua,Dn.capitalize=Wa,Dn.ceil=yc,Dn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ga(n))===n?n:0),t!==i&&(t=(t=ga(t))===t?t:0),ar(ga(e),t,n)},Dn.clone=function(e){return cr(e,4)},Dn.cloneDeep=function(e){return cr(e,5)},Dn.cloneDeepWith=function(e,t){return cr(e,5,t="function"==typeof t?t:i)},Dn.cloneWith=function(e,t){return cr(e,4,t="function"==typeof t?t:i)},Dn.conformsTo=function(e,t){return null==t||lr(e,t,Ta(t))},Dn.deburr=qa,Dn.defaultTo=function(e,t){return null==e||e!==e?t:e},Dn.divide=vc,Dn.endsWith=function(e,t,n){e=ya(e),t=li(t);var r=e.length,o=n=n===i?r:ar(pa(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Dn.eq=Ds,Dn.escape=function(e){return(e=ya(e))&&Y.test(e)?e.replace(Z,sn):e},Dn.escapeRegExp=function(e){return(e=ya(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Dn.every=function(e,t,n){var r=Hs(e)?Tt:pr;return n&&wo(e,t,n)&&(t=i),r(e,co(t,3))},Dn.find=gs,Dn.findIndex=qo,Dn.findKey=function(e,t){return Ut(e,co(t,3),wr)},Dn.findLast=bs,Dn.findLastIndex=Ho,Dn.findLastKey=function(e,t){return Ut(e,co(t,3),_r)},Dn.floor=wc,Dn.forEach=ys,Dn.forEachRight=vs,Dn.forIn=function(e,t){return null==e?e:yr(e,co(t,3),Oa)},Dn.forInRight=function(e,t){return null==e?e:vr(e,co(t,3),Oa)},Dn.forOwn=function(e,t){return e&&wr(e,co(t,3))},Dn.forOwnRight=function(e,t){return e&&_r(e,co(t,3))},Dn.get=Aa,Dn.gt=Us,Dn.gte=Ws,Dn.has=function(e,t){return null!=e&&go(e,t,Pr)},Dn.hasIn=Pa,Dn.head=Vo,Dn.identity=rc,Dn.includes=function(e,t,n,r){e=Vs(e)?e:Da(e),n=n&&!r?pa(n):0;var i=e.length;return n<0&&(n=Gt(i+n,0)),aa(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&qt(e,t,n)>-1},Dn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:pa(n);return i<0&&(i=Gt(r+i,0)),qt(e,t,i)},Dn.inRange=function(e,t,n){return t=fa(t),n===i?(n=t,t=0):n=fa(n),function(e,t,n){return e>=vn(t,n)&&e<Gt(t,n)}(e=ga(e),t,n)},Dn.invoke=Ma,Dn.isArguments=qs,Dn.isArray=Hs,Dn.isArrayBuffer=Ks,Dn.isArrayLike=Vs,Dn.isArrayLikeObject=$s,Dn.isBoolean=function(e){return!0===e||!1===e||ta(e)&&Er(e)==w},Dn.isBuffer=Gs,Dn.isDate=Zs,Dn.isElement=function(e){return ta(e)&&1===e.nodeType&&!ia(e)},Dn.isEmpty=function(e){if(null==e)return!0;if(Vs(e)&&(Hs(e)||"string"==typeof e||"function"==typeof e.splice||Gs(e)||la(e)||qs(e)))return!e.length;var t=mo(e);if(t==E||t==M)return!e.size;if(So(e))return!jr(e).length;for(var n in e)if(Re.call(e,n))return!1;return!0},Dn.isEqual=function(e,t){return Or(e,t)},Dn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Or(e,t,i,n):!!r},Dn.isError=Js,Dn.isFinite=function(e){return"number"==typeof e&&vt(e)},Dn.isFunction=Ys,Dn.isInteger=Qs,Dn.isLength=Xs,Dn.isMap=na,Dn.isMatch=function(e,t){return e===t||Nr(e,t,uo(t))},Dn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Nr(e,t,uo(t),n)},Dn.isNaN=function(e){return ra(e)&&e!=+e},Dn.isNative=function(e){if(xo(e))throw new ae("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Br(e)},Dn.isNil=function(e){return null==e},Dn.isNull=function(e){return null===e},Dn.isNumber=ra,Dn.isObject=ea,Dn.isObjectLike=ta,Dn.isPlainObject=ia,Dn.isRegExp=oa,Dn.isSafeInteger=function(e){return Qs(e)&&e>=-9007199254740991&&e<=p},Dn.isSet=sa,Dn.isString=aa,Dn.isSymbol=ca,Dn.isTypedArray=la,Dn.isUndefined=function(e){return e===i},Dn.isWeakMap=function(e){return ta(e)&&mo(e)==N},Dn.isWeakSet=function(e){return ta(e)&&"[object WeakSet]"==Er(e)},Dn.join=function(e,t){return null==e?"":wt.call(e,t)},Dn.kebabCase=Ha,Dn.last=Jo,Dn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=pa(n))<0?Gt(r+o,0):vn(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Wt(e,Kt,o,!0)},Dn.lowerCase=Ka,Dn.lowerFirst=Va,Dn.lt=ua,Dn.lte=da,Dn.max=function(e){return e&&e.length?mr(e,rc,Ar):i},Dn.maxBy=function(e,t){return e&&e.length?mr(e,co(t,2),Ar):i},Dn.mean=function(e){return Vt(e,rc)},Dn.meanBy=function(e,t){return Vt(e,co(t,2))},Dn.min=function(e){return e&&e.length?mr(e,rc,Fr):i},Dn.minBy=function(e,t){return e&&e.length?mr(e,co(t,2),Fr):i},Dn.stubArray=mc,Dn.stubFalse=gc,Dn.stubObject=function(){return{}},Dn.stubString=function(){return""},Dn.stubTrue=function(){return!0},Dn.multiply=_c,Dn.nth=function(e,t){return e&&e.length?qr(e,pa(t)):i},Dn.noConflict=function(){return mt._===this&&(mt._=De),this},Dn.noop=cc,Dn.now=As,Dn.pad=function(e,t,n){e=ya(e);var r=(t=pa(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Hi(pt(i),n)+e+Hi(ft(i),n)},Dn.padEnd=function(e,t,n){e=ya(e);var r=(t=pa(t))?pn(e):0;return t&&r<t?e+Hi(t-r,n):e},Dn.padStart=function(e,t,n){e=ya(e);var r=(t=pa(t))?pn(e):0;return t&&r<t?Hi(t-r,n)+e:e},Dn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),_n(ya(e).replace(se,""),t||0)},Dn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&wo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=fa(e),t===i?(t=e,e=0):t=fa(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=kn();return vn(e+o*(t-e+dt("1e-"+((o+"").length-1))),t)}return Gr(e,t)},Dn.reduce=function(e,t,n){var r=Hs(e)?Lt:Zt,i=arguments.length<3;return r(e,co(t,4),n,i,hr)},Dn.reduceRight=function(e,t,n){var r=Hs(e)?Ft:Zt,i=arguments.length<3;return r(e,co(t,4),n,i,fr)},Dn.repeat=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:pa(t),Zr(ya(e),t)},Dn.replace=function(){var e=arguments,t=ya(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Dn.result=function(e,t,n){var r=-1,o=(t=vi(t,e)).length;for(o||(o=1,e=i);++r<o;){var s=null==e?i:e[Lo(t[r])];s===i&&(r=o,s=n),e=Ys(s)?s.call(e):s}return e},Dn.round=kc,Dn.runInContext=e,Dn.sample=function(e){return(Hs(e)?Yn:Yr)(e)},Dn.size=function(e){if(null==e)return 0;if(Vs(e))return aa(e)?pn(e):e.length;var t=mo(e);return t==E||t==M?e.size:jr(e).length},Dn.snakeCase=$a,Dn.some=function(e,t,n){var r=Hs(e)?zt:ii;return n&&wo(e,t,n)&&(t=i),r(e,co(t,3))},Dn.sortedIndex=function(e,t){return oi(e,t)},Dn.sortedIndexBy=function(e,t,n){return si(e,t,co(n,2))},Dn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&Ds(e[r],t))return r}return-1},Dn.sortedLastIndex=function(e,t){return oi(e,t,!0)},Dn.sortedLastIndexBy=function(e,t,n){return si(e,t,co(n,2),!0)},Dn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=oi(e,t,!0)-1;if(Ds(e[n],t))return n}return-1},Dn.startCase=Ga,Dn.startsWith=function(e,t,n){return e=ya(e),n=null==n?0:ar(pa(n),0,e.length),t=li(t),e.slice(n,n+t.length)==t},Dn.subtract=xc,Dn.sum=function(e){return e&&e.length?Jt(e,rc):0},Dn.sumBy=function(e,t){return e&&e.length?Jt(e,co(t,2)):0},Dn.template=function(e,t,n){var r=Dn.templateSettings;n&&wo(e,t,n)&&(t=i),e=ya(e),t=_a({},t,r,Qi);var o,s,a=_a({},t.imports,r.imports,Qi),c=Ta(a),l=en(a,c),u=0,d=t.interpolate||ke,h="__p += '",f=Pe((t.escape||ke).source+"|"+d.source+"|"+(d===ee?pe:ke).source+"|"+(t.evaluate||ke).source+"|$","g"),p="//# sourceURL="+(Re.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++at+"]")+"\n";e.replace(f,function(t,n,r,i,a,c){return r||(r=i),h+=e.slice(u,c).replace(xe,an),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(s=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=c+t.length,t}),h+="';\n";var m=Re.call(t,"variable")&&t.variable;if(m){if(he.test(m))throw new ae("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(s?h.replace(K,""):h).replace(V,"$1").replace($,"$1;"),h="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var g=Qa(function(){return Se(c,p+"return "+h).apply(i,l)});if(g.source=h,Js(g))throw g;return g},Dn.times=function(e,t){if((e=pa(e))<1||e>p)return[];var n=g,r=vn(e,g);t=co(t),e-=g;for(var i=Yt(r,t);++n<e;)t(n);return i},Dn.toFinite=fa,Dn.toInteger=pa,Dn.toLength=ma,Dn.toLower=function(e){return ya(e).toLowerCase()},Dn.toNumber=ga,Dn.toSafeInteger=function(e){return e?ar(pa(e),-9007199254740991,p):0===e?e:0},Dn.toString=ya,Dn.toUpper=function(e){return ya(e).toUpperCase()},Dn.trim=function(e,t,n){if((e=ya(e))&&(n||t===i))return Qt(e);if(!e||!(t=li(t)))return e;var r=mn(e),o=mn(t);return _i(r,nn(r,o),rn(r,o)+1).join("")},Dn.trimEnd=function(e,t,n){if((e=ya(e))&&(n||t===i))return e.slice(0,gn(e)+1);if(!e||!(t=li(t)))return e;var r=mn(e);return _i(r,0,rn(r,mn(t))+1).join("")},Dn.trimStart=function(e,t,n){if((e=ya(e))&&(n||t===i))return e.replace(se,"");if(!e||!(t=li(t)))return e;var r=mn(e);return _i(r,nn(r,mn(t))).join("")},Dn.truncate=function(e,t){var n=30,r="...";if(ea(t)){var o="separator"in t?t.separator:o;n="length"in t?pa(t.length):n,r="omission"in t?li(t.omission):r}var s=(e=ya(e)).length;if(cn(e)){var a=mn(e);s=a.length}if(n>=s)return e;var c=n-pn(r);if(c<1)return r;var l=a?_i(a,0,c).join(""):e.slice(0,c);if(o===i)return l+r;if(a&&(c+=l.length-c),oa(o)){if(e.slice(c).search(o)){var u,d=l;for(o.global||(o=Pe(o.source,ya(me.exec(o))+"g")),o.lastIndex=0;u=o.exec(d);)var h=u.index;l=l.slice(0,h===i?c:h)}}else if(e.indexOf(li(o),c)!=c){var f=l.lastIndexOf(o);f>-1&&(l=l.slice(0,f))}return l+r},Dn.unescape=function(e){return(e=ya(e))&&J.test(e)?e.replace(G,bn):e},Dn.uniqueId=function(e){var t=++je;return ya(e)+t},Dn.upperCase=Za,Dn.upperFirst=Ja,Dn.each=ys,Dn.eachRight=vs,Dn.first=Vo,ac(Dn,function(){var e={};return wr(Dn,function(t,n){Re.call(Dn.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),Dn.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){Dn[e].placeholder=Dn}),It(["drop","take"],function(e,t){Hn.prototype[e]=function(n){n=n===i?1:Gt(pa(n),0);var r=this.__filtered__&&!t?new Hn(this):this.clone();return r.__filtered__?r.__takeCount__=vn(n,r.__takeCount__):r.__views__.push({size:vn(n,g),type:e+(r.__dir__<0?"Right":"")}),r},Hn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}}),It(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;Hn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:co(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),It(["head","last"],function(e,t){var n="take"+(t?"Right":"");Hn.prototype[e]=function(){return this[n](1).value()[0]}}),It(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");Hn.prototype[e]=function(){return this.__filtered__?new Hn(this):this[n](1)}}),Hn.prototype.compact=function(){return this.filter(rc)},Hn.prototype.find=function(e){return this.filter(e).head()},Hn.prototype.findLast=function(e){return this.reverse().find(e)},Hn.prototype.invokeMap=Jr(function(e,t){return"function"==typeof e?new Hn(this):this.map(function(n){return Mr(n,e,t)})}),Hn.prototype.reject=function(e){return this.filter(Rs(co(e)))},Hn.prototype.slice=function(e,t){e=pa(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Hn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=pa(t))<0?n.dropRight(-t):n.take(t-e)),n)},Hn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Hn.prototype.toArray=function(){return this.take(g)},wr(Hn.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Dn[r?"take"+("last"==t?"Right":""):t],s=r||/^find/.test(t);o&&(Dn.prototype[t]=function(){var t=this.__wrapped__,a=r?[1]:arguments,c=t instanceof Hn,l=a[0],u=c||Hs(t),d=function(e){var t=o.apply(Dn,jt([e],a));return r&&h?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(c=u=!1);var h=this.__chain__,f=!!this.__actions__.length,p=s&&!h,m=c&&!f;if(!s&&u){t=m?t:new Hn(this);var g=e.apply(t,a);return g.__actions__.push({func:fs,args:[d],thisArg:i}),new qn(g,h)}return p&&m?e.apply(this,a):(g=this.thru(d),p?r?g.value()[0]:g.value():g)})}),It(["pop","push","shift","sort","splice","unshift"],function(e){var t=Me[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Dn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Hs(i)?i:[],e)}return this[n](function(n){return t.apply(Hs(n)?n:[],e)})}}),wr(Hn.prototype,function(e,t){var n=Dn[t];if(n){var r=n.name+"";Re.call(Tn,r)||(Tn[r]=[]),Tn[r].push({name:t,func:n})}}),Tn[Di(i,2).name]=[{name:"wrapper",func:i}],Hn.prototype.clone=function(){var e=new Hn(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},Hn.prototype.reverse=function(){if(this.__filtered__){var e=new Hn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Hn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Hs(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=vn(t,e+s);break;case"takeRight":e=Gt(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,c=a-s,l=r?a:s-1,u=this.__iteratees__,d=u.length,h=0,f=vn(c,this.__takeCount__);if(!n||!r&&i==c&&f==c)return pi(e,this.__actions__);var p=[];e:for(;c--&&h<f;){for(var m=-1,g=e[l+=t];++m<d;){var b=u[m],y=b.iteratee,v=b.type,w=y(g);if(2==v)g=w;else if(!w){if(1==v)continue e;break e}}p[h++]=g}return p},Dn.prototype.at=ps,Dn.prototype.chain=function(){return hs(this)},Dn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},Dn.prototype.next=function(){this.__values__===i&&(this.__values__=ha(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Dn.prototype.plant=function(e){for(var t,n=this;n instanceof Wn;){var r=zo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Dn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Hn){var t=e;return this.__actions__.length&&(t=new Hn(this)),(t=t.reverse()).__actions__.push({func:fs,args:[es],thisArg:i}),new qn(t,this.__chain__)}return this.thru(es)},Dn.prototype.toJSON=Dn.prototype.valueOf=Dn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Dn.prototype.first=Dn.prototype.head,Ye&&(Dn.prototype[Ye]=function(){return this}),Dn}();mt._=yn,(r=function(){return yn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2766:(e,t,n)=>{"use strict";n.d(t,{Vw:()=>A,DO:()=>s,CC:()=>c,sd:()=>a,Fe:()=>o,Ht:()=>l,My:()=>v,uH:()=>d,Id:()=>E,qj:()=>P,O8:()=>h,aT:()=>k,aY:()=>i,po:()=>C,Ow:()=>f,fd:()=>g,ZJ:()=>S,DH:()=>u,AI:()=>x});const r="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function o(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function s(e){if(!i(e))throw new Error("Uint8Array expected");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(n.length>0&&!n.includes(e.length))throw new Error("Uint8Array expected of length "+n+", got length="+e.length)}function a(e){if("function"!==typeof e||"function"!==typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");o(e.outputLen),o(e.blockLen)}function c(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function l(e,t){s(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function u(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(let r=0;r<t.length;r++)t[r].fill(0)}function h(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function f(e,t){return e<<32-t|e>>>t}const p=(()=>68===new Uint8Array(new Uint32Array([287454020]).buffer)[0])();function m(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const g=p?e=>e:function(e){for(let t=0;t<e.length;t++)e[t]=m(e[t]);return e},b=(()=>"function"===typeof Uint8Array.from([]).toHex&&"function"===typeof Uint8Array.fromHex)(),y=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function v(e){if(s(e),b)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=y[e[n]];return t}const w={_0:48,_9:57,A:65,F:70,a:97,f:102};function _(e){return e>=w._0&&e<=w._9?e-w._0:e>=w.A&&e<=w.F?e-(w.A-10):e>=w.a&&e<=w.f?e-(w.a-10):void 0}function k(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);if(b)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let i=0,o=0;i<n;i++,o+=2){const t=_(e.charCodeAt(o)),n=_(e.charCodeAt(o+1));if(void 0===t||void 0===n){const t=e[o]+e[o+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+o)}r[i]=16*t+n}return r}function x(e){if("string"!==typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function S(e){return"string"===typeof e&&(e=x(e)),s(e),e}function E(){let e=0;for(let n=0;n<arguments.length;n++){const t=n<0||arguments.length<=n?void 0:arguments[n];s(t),e+=t.length}const t=new Uint8Array(e);for(let n=0,r=0;n<arguments.length;n++){const e=n<0||arguments.length<=n?void 0:arguments[n];t.set(e,r),r+=e.length}return t}class A{}function P(e){const t=t=>e().update(S(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function C(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(r&&"function"===typeof r.getRandomValues)return r.getRandomValues(new Uint8Array(e));if(r&&"function"===typeof r.randomBytes)return Uint8Array.from(r.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}},2958:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o});var r=n(6006),i=n(8599);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wei";return(0,i.J)(e,r.sz[t])}},3054:(e,t,n)=>{"use strict";n.d(t,{P$:()=>u,_k:()=>c,vt:()=>d,is:()=>h});var r=n(9740),i=n(4223);const o=["message","explanation"];class s extends TypeError{constructor(e,t){let n;const{message:r,explanation:s}=e,a=(0,i.A)(e,o),{path:c}=e,l=0===c.length?r:"At path: ".concat(c.join(".")," -- ").concat(r);super(null!==s&&void 0!==s?s:l),null!==s&&void 0!==s&&(this.cause=l),Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>null!==n&&void 0!==n?n:n=[e,...t()]}}var a=n(1099);class c{constructor(e){const{type:t,schema:n,validator:r,refiner:i,coercer:o=e=>e,entries:s=function*(){}}=e;this.type=t,this.schema=n,this.entries=s,this.coercer=o,this.validator=r?(e,t)=>{const n=r(e,t);return(0,a.RF)(n,t,this,e)}:()=>[],this.refiner=i?(e,t)=>{const n=i(e,t);return(0,a.RF)(n,t,this,e)}:()=>[]}assert(e,t){return function(e,t,n){const r=f(e,t,{message:n});if(r[0])throw r[0]}(e,this,t)}create(e,t){return d(e,this,t)}is(e){return h(e,this)}mask(e,t){return function(e,t,n){const r=f(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}validate(e){return f(e,this,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}const l="EXACT_OPTIONAL";class u extends c{constructor(e){super((0,r.A)((0,r.A)({},e),{},{type:"exact optional ".concat(e.type)})),this.brand=l}static isExactOptional(e){return(0,a.Gv)(e)&&"brand"in e&&e.brand===l}}function d(e,t,n){const r=f(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function h(e,t){return!f(e,t)[0]}function f(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=(0,a.eF)(e,t,n),i=(0,a.jT)(r);if(i[0]){return[new s(i[0],function*(){for(const e of r)e[0]&&(yield e[0])}),void 0]}return[void 0,i[1]]}},3093:(e,t,n)=>{"use strict";function r(e,t){let{format:n}=t;if(!n)return{};const r={};return function t(n){const i=Object.keys(n);for(const o of i)o in e&&(r[o]=e[o]),n[o]&&"object"===typeof n[o]&&!Array.isArray(n[o])&&t(n[o])}(n(e||{})),r}n.d(t,{o:()=>r})},3109:(e,t,n)=>{"use strict";t.I0=t.DH=t.NX=t.u8=t.cY=void 0,t.av=t.O6=t.w3=t.Wg=void 0;const r=n(4507);function i(e){if(!(e instanceof Uint8Array))throw new TypeError("b must be a Uint8Array")}function o(e){return i(e),r.Buffer.from(e.buffer,e.byteOffset,e.length)}class s{constructor(e,t){if(!Number.isInteger(e))throw new TypeError("span must be an integer");this.span=e,this.property=t}makeDestinationObject(){return{}}getSpan(e,t){if(0>this.span)throw new RangeError("indeterminate span");return this.span}replicate(e){const t=Object.create(this.constructor.prototype);return Object.assign(t,this),t.property=e,t}fromArray(e){}}function a(e,t){return t.property?e+"["+t.property+"]":e}class c extends s{isCount(){throw new Error("ExternalLayout is abstract")}}class l extends c{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0;if(!Number.isInteger(e)||0>=e)throw new TypeError("elementSpan must be a (positive) integer");super(-1,t),this.elementSpan=e}isCount(){return!0}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i(e);const n=e.length-t;return Math.floor(n/this.elementSpan)}encode(e,t,n){return 0}}class u extends c{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;if(!(e instanceof s))throw new TypeError("layout must be a Layout");if(!Number.isInteger(t))throw new TypeError("offset must be integer or undefined");super(e.span,n||e.property),this.layout=e,this.offset=t}isCount(){return this.layout instanceof d||this.layout instanceof h}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this.layout.decode(e,t+this.offset)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.layout.encode(e,t,n+this.offset)}}class d extends s{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(e).readUIntLE(t,this.span)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(t).writeUIntLE(e,n,this.span),this.span}}class h extends s{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(e).readUIntBE(t,this.span)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(t).writeUIntBE(e,n,this.span),this.span}}class f extends s{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(e).readIntLE(t,this.span)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(t).writeIntLE(e,n,this.span),this.span}}class p extends s{constructor(e,t){if(super(e,t),6<this.span)throw new RangeError("span must not exceed 6 bytes")}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(e).readIntBE(t,this.span)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(t).writeIntBE(e,n,this.span),this.span}}const m=Math.pow(2,32);function g(e){const t=Math.floor(e/m);return{hi32:t,lo32:e-t*m}}function b(e,t){return e*m+t}class y extends s{constructor(e){super(8,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=o(e),r=n.readUInt32LE(t);return b(n.readUInt32LE(t+4),r)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=g(e),i=o(t);return i.writeUInt32LE(r.lo32,n),i.writeUInt32LE(r.hi32,n+4),8}}class v extends s{constructor(e){super(8,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=o(e);return b(n.readUInt32BE(t),n.readUInt32BE(t+4))}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=g(e),i=o(t);return i.writeUInt32BE(r.hi32,n),i.writeUInt32BE(r.lo32,n+4),8}}class w extends s{constructor(e){super(8,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=o(e),r=n.readUInt32LE(t);return b(n.readInt32LE(t+4),r)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=g(e),i=o(t);return i.writeUInt32LE(r.lo32,n),i.writeInt32LE(r.hi32,n+4),8}}class _ extends s{constructor(e){super(8,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=o(e);return b(n.readInt32BE(t),n.readUInt32BE(t+4))}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=g(e),i=o(t);return i.writeInt32BE(r.hi32,n),i.writeUInt32BE(r.lo32,n+4),8}}class k extends s{constructor(e){super(4,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(e).readFloatLE(t)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(t).writeFloatLE(e,n),4}}class x extends s{constructor(e){super(4,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(e).readFloatBE(t)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(t).writeFloatBE(e,n),4}}class S extends s{constructor(e){super(8,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(e).readDoubleLE(t)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(t).writeDoubleLE(e,n),8}}class E extends s{constructor(e){super(8,e)}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(e).readDoubleBE(t)}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return o(t).writeDoubleBE(e,n),8}}class A extends s{constructor(e,t,n){if(!(e instanceof s))throw new TypeError("elementLayout must be a Layout");if(!(t instanceof c&&t.isCount()||Number.isInteger(t)&&0<=t))throw new TypeError("count must be non-negative integer or an unsigned integer ExternalLayout");let r=-1;!(t instanceof c)&&0<e.span&&(r=t*e.span),super(r,n),this.elementLayout=e,this.count=t}getSpan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;let n=0,r=this.count;if(r instanceof c&&(r=r.decode(e,t)),0<this.elementLayout.span)n=r*this.elementLayout.span;else{let i=0;for(;i<r;)n+=this.elementLayout.getSpan(e,t+n),++i}return n}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=[];let r=0,i=this.count;for(i instanceof c&&(i=i.decode(e,t));r<i;)n.push(this.elementLayout.decode(e,t)),t+=this.elementLayout.getSpan(e,t),r+=1;return n}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this.elementLayout,i=e.reduce((e,i)=>e+r.encode(i,t,n+e),0);return this.count instanceof c&&this.count.encode(e.length,t,n),i}}class P extends s{constructor(e,t,n){if(!Array.isArray(e)||!e.reduce((e,t)=>e&&t instanceof s,!0))throw new TypeError("fields must be array of Layout instances");"boolean"===typeof t&&void 0===n&&(n=t,t=void 0);for(const o of e)if(0>o.span&&void 0===o.property)throw new Error("fields cannot contain unnamed variable-length layout");let r=-1;try{r=e.reduce((e,t)=>e+t.getSpan(),0)}catch(i){}super(r,t),this.fields=e,this.decodePrefixes=!!n}getSpan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;let n=0;try{n=this.fields.reduce((n,r)=>{const i=r.getSpan(e,t);return t+=i,n+i},0)}catch(r){throw new RangeError("indeterminate span")}return n}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i(e);const n=this.makeDestinationObject();for(const r of this.fields)if(void 0!==r.property&&(n[r.property]=r.decode(e,t)),t+=r.getSpan(e,t),this.decodePrefixes&&e.length===t)break;return n}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=n;let i=0,o=0;for(const s of this.fields){let r=s.span;if(o=0<r?r:0,void 0!==s.property){const i=e[s.property];void 0!==i&&(o=s.encode(i,t,n),0>r&&(r=s.getSpan(t,n)))}i=n,n+=r}return i+o-r}fromArray(e){const t=this.makeDestinationObject();for(const n of this.fields)void 0!==n.property&&0<e.length&&(t[n.property]=e.shift());return t}layoutFor(e){if("string"!==typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}offsetOf(e){if("string"!==typeof e)throw new TypeError("property must be string");let t=0;for(const n of this.fields){if(n.property===e)return t;0>n.span?t=-1:0<=t&&(t+=n.span)}}}class C{constructor(e){this.property=e}decode(e,t){throw new Error("UnionDiscriminator is abstract")}encode(e,t,n){throw new Error("UnionDiscriminator is abstract")}}class I extends C{constructor(e,t){if(!(e instanceof c&&e.isCount()))throw new TypeError("layout must be an unsigned integer ExternalLayout");super(t||e.property||"variant"),this.layout=e}decode(e,t){return this.layout.decode(e,t)}encode(e,t,n){return this.layout.encode(e,t,n)}}class M extends s{constructor(e,t,n){let r;if(e instanceof d||e instanceof h)r=new I(new u(e));else if(e instanceof c&&e.isCount())r=new I(e);else{if(!(e instanceof C))throw new TypeError("discr must be a UnionDiscriminator or an unsigned integer layout");r=e}if(void 0===t&&(t=null),!(null===t||t instanceof s))throw new TypeError("defaultLayout must be null or a Layout");if(null!==t){if(0>t.span)throw new Error("defaultLayout must have constant span");void 0===t.property&&(t=t.replicate("content"))}let i=-1;t&&(i=t.span,0<=i&&(e instanceof d||e instanceof h)&&(i+=r.layout.span)),super(i,n),this.discriminator=r,this.usesPrefixDiscriminator=e instanceof d||e instanceof h,this.defaultLayout=t,this.registry={};let o=this.defaultGetSourceVariant.bind(this);this.getSourceVariant=function(e){return o(e)},this.configGetSourceVariant=function(e){o=e.bind(this)}}getSpan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;const n=this.getVariant(e,t);if(!n)throw new Error("unable to determine span for unrecognized variant");return n.getSpan(e,t)}defaultGetSourceVariant(e){if(Object.prototype.hasOwnProperty.call(e,this.discriminator.property)){if(this.defaultLayout&&this.defaultLayout.property&&Object.prototype.hasOwnProperty.call(e,this.defaultLayout.property))return;const t=this.registry[e[this.discriminator.property]];if(t&&(!t.layout||t.property&&Object.prototype.hasOwnProperty.call(e,t.property)))return t}else for(const t in this.registry){const n=this.registry[t];if(n.property&&Object.prototype.hasOwnProperty.call(e,n.property))return n}throw new Error("unable to infer src variant")}decode(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.discriminator,i=r.decode(e,n),o=this.registry[i];if(void 0===o){const o=this.defaultLayout;let s=0;this.usesPrefixDiscriminator&&(s=r.layout.span),t=this.makeDestinationObject(),t[r.property]=i,t[o.property]=o.decode(e,n+s)}else t=o.decode(e,n);return t}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this.getSourceVariant(e);if(void 0===r){const r=this.discriminator,i=this.defaultLayout;let o=0;return this.usesPrefixDiscriminator&&(o=r.layout.span),r.encode(e[r.property],t,n),o+i.encode(e[i.property],t,n+o)}return r.encode(e,t,n)}addVariant(e,t,n){const r=new T(this,e,t,n);return this.registry[e]=r,r}getVariant(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=e instanceof Uint8Array?this.discriminator.decode(e,n):e,this.registry[t]}}class T extends s{constructor(e,t,n,r){if(!(e instanceof M))throw new TypeError("union must be a Union");if(!Number.isInteger(t)||0>t)throw new TypeError("variant must be a (non-negative) integer");if("string"===typeof n&&void 0===r&&(r=n,n=null),n){if(!(n instanceof s))throw new TypeError("layout must be a Layout");if(null!==e.defaultLayout&&0<=n.span&&n.span>e.defaultLayout.span)throw new Error("variant span exceeds span of containing union");if("string"!==typeof r)throw new TypeError("variant must have a String property")}let i=e.span;0>e.span&&(i=n?n.span:0,0<=i&&e.usesPrefixDiscriminator&&(i+=e.discriminator.layout.span)),super(i,r),this.union=e,this.variant=t,this.layout=n||null}getSpan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(0<=this.span)return this.span;let n=0;this.union.usesPrefixDiscriminator&&(n=this.union.discriminator.layout.span);let r=0;return this.layout&&(r=this.layout.getSpan(e,t+n)),n+r}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.makeDestinationObject();if(this!==this.union.getVariant(e,t))throw new Error("variant mismatch");let r=0;return this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout?n[this.property]=this.layout.decode(e,t+r):this.property?n[this.property]=!0:this.union.usesPrefixDiscriminator&&(n[this.union.discriminator.property]=this.variant),n}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;if(this.union.usesPrefixDiscriminator&&(r=this.union.discriminator.layout.span),this.layout&&!Object.prototype.hasOwnProperty.call(e,this.property))throw new TypeError("variant lacks property "+this.property);this.union.discriminator.encode(this.variant,t,n);let i=r;if(this.layout&&(this.layout.encode(e[this.property],t,n+r),i+=this.layout.getSpan(t,n+r),0<=this.union.span&&i>this.union.span))throw new Error("encoded variant overruns containing union");return i}fromArray(e){if(this.layout)return this.layout.fromArray(e)}}function O(e){return 0>e&&(e+=4294967296),e}class N extends s{constructor(e,t,n){if(!(e instanceof d||e instanceof h))throw new TypeError("word must be a UInt or UIntBE layout");if("string"===typeof t&&void 0===n&&(n=t,t=!1),4<e.span)throw new RangeError("word cannot exceed 32 bits");super(e.span,n),this.word=e,this.msb=!!t,this.fields=[];let r=0;this._packedSetValue=function(e){return r=O(e),this},this._packedGetValue=function(){return r}}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.makeDestinationObject(),r=this.word.decode(e,t);this._packedSetValue(r);for(const i of this.fields)void 0!==i.property&&(n[i.property]=i.decode(e));return n}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this.word.decode(t,n);this._packedSetValue(r);for(const i of this.fields)if(void 0!==i.property){const t=e[i.property];void 0!==t&&i.encode(t)}return this.word.encode(this._packedGetValue(),t,n)}addField(e,t){const n=new B(this,e,t);return this.fields.push(n),n}addBoolean(e){const t=new R(this,e);return this.fields.push(t),t}fieldFor(e){if("string"!==typeof e)throw new TypeError("property must be string");for(const t of this.fields)if(t.property===e)return t}}class B{constructor(e,t,n){if(!(e instanceof N))throw new TypeError("container must be a BitStructure");if(!Number.isInteger(t)||0>=t)throw new TypeError("bits must be positive integer");const r=8*e.span,i=e.fields.reduce((e,t)=>e+t.bits,0);if(t+i>r)throw new Error("bits too long for span remainder ("+(r-i)+" of "+r+" remain)");this.container=e,this.bits=t,this.valueMask=(1<<t)-1,32===t&&(this.valueMask=4294967295),this.start=i,this.container.msb&&(this.start=r-i-t),this.wordMask=O(this.valueMask<<this.start),this.property=n}decode(e,t){return O(this.container._packedGetValue()&this.wordMask)>>>this.start}encode(e){if("number"!==typeof e||!Number.isInteger(e)||e!==O(e&this.valueMask))throw new TypeError(a("BitField.encode",this)+" value must be integer not exceeding "+this.valueMask);const t=this.container._packedGetValue(),n=O(e<<this.start);this.container._packedSetValue(O(t&~this.wordMask)|n)}}class R extends B{constructor(e,t){super(e,1,t)}decode(e,t){return!!super.decode(e,t)}encode(e){"boolean"===typeof e&&(e=+e),super.encode(e)}}class j extends s{constructor(e,t){if(!(e instanceof c&&e.isCount()||Number.isInteger(e)&&0<=e))throw new TypeError("length must be positive integer or an unsigned integer ExternalLayout");let n=-1;e instanceof c||(n=e),super(n,t),this.length=e}getSpan(e,t){let n=this.span;return 0>n&&(n=this.length.decode(e,t)),n}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.span;return 0>n&&(n=this.length.decode(e,t)),o(e).slice(t,t+n)}encode(e,t,n){let r=this.length;if(this.length instanceof c&&(r=e.length),!(e instanceof Uint8Array&&r===e.length))throw new TypeError(a("Blob.encode",this)+" requires (length "+r+") Uint8Array as src");if(n+r>t.length)throw new RangeError("encoding overruns Uint8Array");const i=o(e);return o(t).write(i.toString("hex"),n,r,"hex"),this.length instanceof c&&this.length.encode(r,t,n),r}}class L extends s{constructor(e){super(-1,e)}getSpan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;i(e);let n=t;for(;n<e.length&&0!==e[n];)n+=1;return 1+n-t}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.getSpan(e,t);return o(e).slice(t,t+n-1).toString("utf-8")}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;"string"!==typeof e&&(e=String(e));const i=r.Buffer.from(e,"utf8"),s=i.length;if(n+s>t.length)throw new RangeError("encoding overruns Buffer");const a=o(t);return i.copy(a,n),a[n+s]=0,s+1}}class F extends s{constructor(e,t){if("string"===typeof e&&void 0===t&&(t=e,e=void 0),void 0===e)e=-1;else if(!Number.isInteger(e))throw new TypeError("maxSpan must be an integer");super(-1,t),this.maxSpan=e}getSpan(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return i(e),e.length-t}decode(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.getSpan(e,t);if(0<=this.maxSpan&&this.maxSpan<n)throw new RangeError("text length exceeds maxSpan");return o(e).slice(t,t+n).toString("utf-8")}encode(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;"string"!==typeof e&&(e=String(e));const i=r.Buffer.from(e,"utf8"),s=i.length;if(0<=this.maxSpan&&this.maxSpan<s)throw new RangeError("text length exceeds maxSpan");if(n+s>t.length)throw new RangeError("encoding overruns Buffer");return i.copy(o(t),n),s}}class z extends s{constructor(e,t){super(0,t),this.value=e}decode(e,t){return this.value}encode(e,t,n){return 0}}t.cY=(e,t,n)=>new u(e,t,n),t.u8=e=>new d(1,e),t.NX=e=>new d(2,e),t.DH=e=>new d(4,e),t.I0=e=>new y(e),t.Wg=e=>new w(e),t.w3=(e,t,n)=>new P(e,t,n),t.O6=(e,t,n)=>new A(e,t,n),t.av=(e,t)=>new j(e,t)},3235:e=>{e.exports=s,s.default=s,s.stable=u,s.stableStringify=u;var t="[...]",n="[Circular]",r=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,n,s){var a;"undefined"===typeof s&&(s=o()),c(e,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(e,t,n):JSON.stringify(e,h(t),n)}catch(u){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var l=r.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return a}function a(e,t,n,o){var s=Object.getOwnPropertyDescriptor(o,n);void 0!==s.get?s.configurable?(Object.defineProperty(o,n,{value:e}),r.push([o,n,t,s])):i.push([t,n,e]):(o[n]=e,r.push([o,n,t]))}function c(e,r,i,o,s,l,u){var d;if(l+=1,"object"===typeof e&&null!==e){for(d=0;d<o.length;d++)if(o[d]===e)return void a(n,e,r,s);if("undefined"!==typeof u.depthLimit&&l>u.depthLimit)return void a(t,e,r,s);if("undefined"!==typeof u.edgesLimit&&i+1>u.edgesLimit)return void a(t,e,r,s);if(o.push(e),Array.isArray(e))for(d=0;d<e.length;d++)c(e[d],d,d,o,e,l,u);else{var h=Object.keys(e);for(d=0;d<h.length;d++){var f=h[d];c(e[f],f,d,o,e,l,u)}}o.pop()}}function l(e,t){return e<t?-1:e>t?1:0}function u(e,t,n,s){"undefined"===typeof s&&(s=o());var a,c=d(e,"",0,[],void 0,0,s)||e;try{a=0===i.length?JSON.stringify(c,t,n):JSON.stringify(c,h(t),n)}catch(u){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var l=r.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return a}function d(e,i,o,s,c,u,h){var f;if(u+=1,"object"===typeof e&&null!==e){for(f=0;f<s.length;f++)if(s[f]===e)return void a(n,e,i,c);try{if("function"===typeof e.toJSON)return}catch(b){return}if("undefined"!==typeof h.depthLimit&&u>h.depthLimit)return void a(t,e,i,c);if("undefined"!==typeof h.edgesLimit&&o+1>h.edgesLimit)return void a(t,e,i,c);if(s.push(e),Array.isArray(e))for(f=0;f<e.length;f++)d(e[f],f,f,s,e,u,h);else{var p={},m=Object.keys(e).sort(l);for(f=0;f<m.length;f++){var g=m[f];d(e[g],g,f,s,e,u,h),p[g]=e[g]}if("undefined"===typeof c)return p;r.push([c,i,e]),c[i]=p}s.pop()}}function h(e){return e="undefined"!==typeof e?e:function(e,t){return t},function(t,n){if(i.length>0)for(var r=0;r<i.length;r++){var o=i[r];if(o[1]===t&&o[0]===n){n=o[2],i.splice(r,1);break}}return e.call(this,t,n)}}},3250:(e,t)=>{function n(e){if("number"===typeof e&&(e=e.toString()),"string"!==typeof e)throw new Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw new Error("Invalid hex color: "+e);3!==t.length&&4!==t.length||(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");const n=parseInt(t.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});const t="undefined"===typeof e.margin||null===e.margin||e.margin<0?4:e.margin,r=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:r,scale:r?4:i,margin:t,color:{dark:n(e.color.dark||"#000000ff"),light:n(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,n){const r=t.getScale(e,n);return Math.floor((e+2*n.margin)*r)},t.qrToImageData=function(e,n,r){const i=n.modules.size,o=n.modules.data,s=t.getScale(i,r),a=Math.floor((i+2*r.margin)*s),c=r.margin*s,l=[r.color.light,r.color.dark];for(let t=0;t<a;t++)for(let n=0;n<a;n++){let u=4*(t*a+n),d=r.color.light;if(t>=c&&n>=c&&t<a-c&&n<a-c){d=l[o[Math.floor((t-c)/s)*i+Math.floor((n-c)/s)]?1:0]}e[u++]=d.r,e[u++]=d.g,e[u++]=d.b,e[u]=d.a}}},3269:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!e)return"mainnet-beta";return/devnet/i.test(e)?"devnet":/testnet/i.test(e)?"testnet":"mainnet-beta"}},3300:(e,t,n)=>{"use strict";n.d(t,{c:()=>o});var r=n(6006),i=n(8599);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wei";return(0,i.J)(e,r.eL[t])}},3342:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Account:()=>We,AddressLookupTableAccount:()=>en,AddressLookupTableInstruction:()=>Yr,AddressLookupTableProgram:()=>Qr,Authorized:()=>li,BLOCKHASH_CACHE_TIMEOUT_MS:()=>an,BPF_LOADER_DEPRECATED_PROGRAM_ID:()=>qe,BPF_LOADER_PROGRAM_ID:()=>qt,BpfLoader:()=>Ht,COMPUTE_BUDGET_INSTRUCTION_LAYOUTS:()=>ei,ComputeBudgetInstruction:()=>Xr,ComputeBudgetProgram:()=>ti,Connection:()=>Gr,Ed25519Program:()=>ri,Enum:()=>Re,EpochSchedule:()=>Yt,FeeCalculatorLayout:()=>Nt,Keypair:()=>Zr,LAMPORTS_PER_SOL:()=>Oi,LOOKUP_TABLE_INSTRUCTION_LAYOUTS:()=>Jr,Loader:()=>Wt,Lockup:()=>ui,MAX_SEED_LENGTH:()=>Fe,Message:()=>ct,MessageAccountKeys:()=>Je,MessageV0:()=>lt,NONCE_ACCOUNT_LENGTH:()=>Rt,NonceAccount:()=>jt,PACKET_DATA_SIZE:()=>He,PUBLIC_KEY_LENGTH:()=>ze,PublicKey:()=>Ue,SIGNATURE_LENGTH_IN_BYTES:()=>Ve,SOLANA_SCHEMA:()=>je,STAKE_CONFIG_ID:()=>ci,STAKE_INSTRUCTION_LAYOUTS:()=>hi,SYSTEM_INSTRUCTION_LAYOUTS:()=>zt,SYSVAR_CLOCK_PUBKEY:()=>bt,SYSVAR_EPOCH_SCHEDULE_PUBKEY:()=>yt,SYSVAR_INSTRUCTIONS_PUBKEY:()=>vt,SYSVAR_RECENT_BLOCKHASHES_PUBKEY:()=>wt,SYSVAR_RENT_PUBKEY:()=>_t,SYSVAR_REWARDS_PUBKEY:()=>kt,SYSVAR_SLOT_HASHES_PUBKEY:()=>xt,SYSVAR_SLOT_HISTORY_PUBKEY:()=>St,SYSVAR_STAKE_HISTORY_PUBKEY:()=>Et,Secp256k1Program:()=>si,SendTransactionError:()=>At,SolanaJSONRPCError:()=>Ct,SolanaJSONRPCErrorCode:()=>Pt,StakeAuthorizationLayout:()=>fi,StakeInstruction:()=>di,StakeProgram:()=>pi,Struct:()=>Be,SystemInstruction:()=>Ft,SystemProgram:()=>Dt,Transaction:()=>pt,TransactionExpiredBlockheightExceededError:()=>$e,TransactionExpiredNonceInvalidError:()=>Ze,TransactionExpiredTimeoutError:()=>Ge,TransactionInstruction:()=>ft,TransactionMessage:()=>mt,TransactionStatus:()=>dt,VALIDATOR_INFO_KEY:()=>wi,VERSION_PREFIX_MASK:()=>Ke,VOTE_PROGRAM_ID:()=>xi,ValidatorInfo:()=>ki,VersionedMessage:()=>ut,VersionedTransaction:()=>gt,VoteAccount:()=>Ei,VoteAuthorizationLayout:()=>yi,VoteInit:()=>mi,VoteInstruction:()=>gi,VoteProgram:()=>vi,clusterApiUrl:()=>Mi,sendAndConfirmRawTransaction:()=>Ti,sendAndConfirmTransaction:()=>It});var r=n(4223),i=n(9740),o=n(4507),s=n(5471),a=n(5720),c=n.n(a),l=n(5759),u=n.n(l),d=n(1914),h=n(6815),f=n(3109),p=n(1979);const m=["cause"];var g=8078e3,b=8078001,y=8078004,v=8078005,w=8078006,_=8078011;function k(e){if(Array.isArray(e)){return"%5B"+e.map(k).join("%2C%20")+"%5D"}return"bigint"===typeof e?"".concat(e,"n"):encodeURIComponent(String(null!=e&&null===Object.getPrototypeOf(e)?(0,i.A)({},e):e))}function x(e){let[t,n]=e;return"".concat(t,"=").concat(k(n))}function S(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};{let n="Solana error #".concat(e,"; Decode this error by running `npx @solana/errors decode -- ").concat(e);return Object.keys(t).length&&(n+=" '".concat(function(e){const t=Object.entries(e).map(x).join("&");return btoa(t)}(t),"'")),"".concat(n,"`")}}var E=class extends Error{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];let o,s,[a,c]=t;if(c){const{cause:e}=c,t=(0,r.A)(c,m);e&&(s={cause:e}),Object.keys(t).length>0&&(o=t)}super(S(a,o),s),(0,p.A)(this,"cause",this.cause),(0,p.A)(this,"context",void 0),this.context=(0,i.A)({__code:a},o),this.name="SolanaError"}};function A(e,t){return"fixedSize"in t?t.fixedSize:t.getSizeFromValue(e)}function P(e){return Object.freeze((0,i.A)((0,i.A)({},e),{},{encode:t=>{const n=new Uint8Array(A(t,e));return e.write(t,n,0),n}}))}function C(e){return Object.freeze((0,i.A)((0,i.A)({},e),{},{decode:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.read(t,n)[0]}}))}function I(e){return"fixedSize"in e&&"number"===typeof e.fixedSize}function M(e,t){if(I(e)!==I(t))throw new E(y);if(I(e)&&I(t)&&e.fixedSize!==t.fixedSize)throw new E(v,{decoderFixedSize:t.fixedSize,encoderFixedSize:e.fixedSize});if(!I(e)&&!I(t)&&e.maxSize!==t.maxSize)throw new E(w,{decoderMaxSize:t.maxSize,encoderMaxSize:e.maxSize});return(0,i.A)((0,i.A)((0,i.A)({},t),e),{},{decode:t.decode,encode:e.encode,read:t.read,write:e.write})}function T(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const i=n.length-r;if(i<t)throw new E(b,{bytesLength:i,codecDescription:e,expected:t})}function O(e,t,n,r){if(r<t||r>n)throw new E(_,{codecDescription:e,max:n,min:t,value:r})}function N(e){return 1!==(null===e||void 0===e?void 0:e.endian)}function B(e){return P({fixedSize:e.size,write(t,n,r){e.range&&O(e.name,e.range[0],e.range[1],t);const i=new ArrayBuffer(e.size);return e.set(new DataView(i),t,N(e.config)),n.set(new Uint8Array(i),r),r+e.size}})}function R(e){return C({fixedSize:e.size,read(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t.length-n<=0)throw new E(g,{codecDescription:e})}(e.name,t,n),T(e.name,e.size,t,n);const r=new DataView(function(e,t,n){const r=e.byteOffset+(null!==t&&void 0!==t?t:0),i=null!==n&&void 0!==n?n:e.byteLength;return e.buffer.slice(r,r+i)}(t,n,e.size));return[e.get(r,N(e.config)),n+e.size]}})}var j=function(){return B({config:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},name:"u64",range:[0n,BigInt("0xffffffffffffffff")],set:(e,t,n)=>e.setBigUint64(0,BigInt(t),n),size:8})},L=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return M(j(e),function(){return R({config:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},get:(e,t)=>e.getBigUint64(0,t),name:"u64",size:8})}(e))};const F=["message","explanation"];class z extends TypeError{constructor(e,t){let n;const{message:i,explanation:o}=e,s=(0,r.A)(e,F),{path:a}=e,c=0===a.length?i:"At path: ".concat(a.join(".")," -- ").concat(i);super(null!==o&&void 0!==o?o:c),null!=o&&(this.cause=c),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>null!==n&&void 0!==n?n:n=[e,...t()]}}function D(e){return"object"===typeof e&&null!=e}function U(e){return D(e)&&!Array.isArray(e)}function W(e){return"symbol"===typeof e?e.toString():"string"===typeof e?JSON.stringify(e):"".concat(e)}function q(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"===typeof e&&(e={message:e});const{path:o,branch:s}=t,{type:a}=n,{refinement:c,message:l="Expected a value of type `".concat(a,"`").concat(c?" with refinement `".concat(c,"`"):"",", but received: `").concat(W(r),"`")}=e;return(0,i.A)((0,i.A)({value:r,type:a,refinement:c,key:o[o.length-1],path:o,branch:s},e),{},{message:l})}function*H(e,t,n,r){var i;D(i=e)&&"function"===typeof i[Symbol.iterator]||(e=[e]);for(const o of e){const e=q(o,t,n,r);e&&(yield e)}}function K(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){const{path:r=[],branch:i=[e],coerce:o=!1,mask:s=!1}=n,a={path:r,branch:i,mask:s};o&&(e=t.coercer(e,a));let c="valid";for(const l of t.validator(e,a))l.explanation=n.message,c="not_valid",yield[l,void 0];for(let[l,u,d]of t.entries(e,a)){const t=K(u,d,{path:void 0===l?r:[...r,l],branch:void 0===l?i:[...i,u],coerce:o,mask:s,message:n.message});for(const n of t)n[0]?(c=null!=n[0].refinement?"not_refined":"not_valid",yield[n[0],void 0]):o&&(u=n[1],void 0===l?e=u:e instanceof Map?e.set(l,u):e instanceof Set?e.add(u):D(e)&&(void 0!==u||l in e)&&(e[l]=u))}if("not_valid"!==c)for(const l of t.refiner(e,a))l.explanation=n.message,c="not_refined",yield[l,void 0];"valid"===c&&(yield[void 0,e])}()}class V{constructor(e){const{type:t,schema:n,validator:r,refiner:i,coercer:o=e=>e,entries:s=function*(){}}=e;this.type=t,this.schema=n,this.entries=s,this.coercer=o,this.validator=r?(e,t)=>H(r(e,t),t,this,e):()=>[],this.refiner=i?(e,t)=>H(i(e,t),t,this,e):()=>[]}assert(e,t){return $(e,this,t)}create(e,t){return G(e,this,t)}is(e){return Z(e,this)}mask(e,t){return function(e,t,n){const r=J(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}(e,this,t)}validate(e){return J(e,this,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}}function $(e,t,n){const r=J(e,t,{message:n});if(r[0])throw r[0]}function G(e,t,n){const r=J(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function Z(e,t){return!J(e,t)[0]}function J(e,t){const n=K(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),r=function(e){const{done:t,value:n}=e.next();return t?void 0:n}(n);if(r[0]){return[new z(r[0],function*(){for(const e of n)e[0]&&(yield e[0])}),void 0]}return[void 0,r[1]]}function Y(e,t){return new V({type:e,schema:null,validator:t})}function Q(e){return new V({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||"Expected an array value, but received: ".concat(W(e))})}function X(){return Y("boolean",e=>"boolean"===typeof e)}function ee(e){return Y("instance",t=>t instanceof e||"Expected a `".concat(e.name,"` instance, but received: ").concat(W(t)))}function te(e){const t=W(e),n=typeof e;return new V({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||"Expected the literal `".concat(t,"`, but received: ").concat(W(n))})}function ne(){return Y("never",()=>!1)}function re(e){return new V((0,i.A)((0,i.A)({},e),{},{validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)}))}function ie(){return Y("number",e=>"number"===typeof e&&!isNaN(e)||"Expected a number, but received: ".concat(W(e)))}function oe(e){return new V((0,i.A)((0,i.A)({},e),{},{validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)}))}function se(e,t){return new V({type:"record",schema:null,*entries(n){if(D(n))for(const r in n){const i=n[r];yield[r,r,e],yield[r,i,t]}},validator:e=>U(e)||"Expected an object, but received: ".concat(W(e)),coercer:e=>U(e)?(0,i.A)({},e):e})}function ae(){return Y("string",e=>"string"===typeof e||"Expected a string, but received: ".concat(W(e)))}function ce(e){const t=ne();return new V({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let i=0;i<r;i++)yield[i,n[i],e[i]||t]}},validator:e=>Array.isArray(e)||"Expected an array, but received: ".concat(W(e)),coercer:e=>Array.isArray(e)?e.slice():e})}function le(e){const t=Object.keys(e);return new V({type:"type",schema:e,*entries(n){if(D(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>U(e)||"Expected an object, but received: ".concat(W(e)),coercer:e=>U(e)?(0,i.A)({},e):e})}function ue(e){const t=e.map(e=>e.type).join(" | ");return new V({type:"union",schema:null,coercer(t,n){for(const r of e){const[e,i]=r.validate(t,{coerce:!0,mask:n.mask});if(!e)return i}return t},validator(n,r){const i=[];for(const t of e){const[...e]=K(n,t,r),[o]=e;if(!o[0])return[];for(const[t]of e)t&&i.push(t)}return["Expected the value to satisfy a union of `".concat(t,"`, but received: ").concat(W(n)),...i]}})}function de(){return Y("unknown",()=>!0)}function he(e,t,n){return new V((0,i.A)((0,i.A)({},e),{},{coercer:(r,i)=>Z(r,t)?e.coercer(n(r,i),i):e.coercer(r,i)}))}var fe=n(4226),pe=n.n(fe),me=n(5806);const ge=["autoconnect","reconnect","reconnect_interval","max_reconnects"];var be=class extends me.EventEmitter{constructor(e,t,n){super(),(0,p.A)(this,"socket",void 0),this.socket=new window.WebSocket(e,n),this.socket.onopen=()=>this.emit("open"),this.socket.onmessage=e=>this.emit("message",e.data),this.socket.onerror=e=>this.emit("error",e),this.socket.onclose=e=>{this.emit("close",e.code,e.reason)}}send(e,t,n){const r=n||t;try{this.socket.send(e),r()}catch(i){r(i)}}close(e,t){this.socket.close(e,t)}addEventListener(e,t,n){this.socket.addEventListener(e,t,n)}};function ye(e,t){return new be(e,t)}var ve=class{encode(e){return JSON.stringify(e)}decode(e){return JSON.parse(e)}},we=class extends me.EventEmitter{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ws://localhost:8080",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{autoconnect:o=!0,reconnect:s=!0,reconnect_interval:a=1e3,max_reconnects:c=5}=n,l=(0,r.A)(n,ge),u=arguments.length>3?arguments[3]:void 0,d=arguments.length>4?arguments[4]:void 0;super(),(0,p.A)(this,"address",void 0),(0,p.A)(this,"rpc_id",void 0),(0,p.A)(this,"queue",void 0),(0,p.A)(this,"options",void 0),(0,p.A)(this,"autoconnect",void 0),(0,p.A)(this,"ready",void 0),(0,p.A)(this,"reconnect",void 0),(0,p.A)(this,"reconnect_timer_id",void 0),(0,p.A)(this,"reconnect_interval",void 0),(0,p.A)(this,"max_reconnects",void 0),(0,p.A)(this,"rest_options",void 0),(0,p.A)(this,"current_reconnects",void 0),(0,p.A)(this,"generate_request_id",void 0),(0,p.A)(this,"socket",void 0),(0,p.A)(this,"webSocketFactory",void 0),(0,p.A)(this,"dataPack",void 0),this.webSocketFactory=e,this.queue={},this.rpc_id=0,this.address=t,this.autoconnect=o,this.ready=!1,this.reconnect=s,this.reconnect_timer_id=void 0,this.reconnect_interval=a,this.max_reconnects=c,this.rest_options=l,this.current_reconnects=0,this.generate_request_id=u||(()=>"number"===typeof this.rpc_id?++this.rpc_id:Number(this.rpc_id)+1),this.dataPack=d||new ve,this.autoconnect&&this._connect(this.address,(0,i.A)({autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects},this.rest_options))}connect(){this.socket||this._connect(this.address,(0,i.A)({autoconnect:this.autoconnect,reconnect:this.reconnect,reconnect_interval:this.reconnect_interval,max_reconnects:this.max_reconnects},this.rest_options))}call(e,t,n,r){return r||"object"!==typeof n||(r=n,n=null),new Promise((i,o)=>{if(!this.ready)return o(new Error("socket not ready"));const s=this.generate_request_id(e,t),a={jsonrpc:"2.0",method:e,params:t||void 0,id:s};this.socket.send(this.dataPack.encode(a),r,e=>{if(e)return o(e);this.queue[s]={promise:[i,o]},n&&(this.queue[s].timeout=setTimeout(()=>{delete this.queue[s],o(new Error("reply timeout"))},n))})})}async login(e){const t=await this.call("rpc.login",e);if(!t)throw new Error("authentication failed");return t}async listMethods(){return await this.call("__listMethods")}notify(e,t){return new Promise((n,r)=>{if(!this.ready)return r(new Error("socket not ready"));const i={jsonrpc:"2.0",method:e,params:t};this.socket.send(this.dataPack.encode(i),e=>{if(e)return r(e);n()})})}async subscribe(e){"string"===typeof e&&(e=[e]);const t=await this.call("rpc.on",e);if("string"===typeof e&&"ok"!==t[e])throw new Error("Failed subscribing to an event '"+e+"' with: "+t[e]);return t}async unsubscribe(e){"string"===typeof e&&(e=[e]);const t=await this.call("rpc.off",e);if("string"===typeof e&&"ok"!==t[e])throw new Error("Failed unsubscribing from an event with: "+t);return t}close(e,t){this.socket&&this.socket.close(e||1e3,t)}setAutoReconnect(e){this.reconnect=e}setReconnectInterval(e){this.reconnect_interval=e}setMaxReconnects(e){this.max_reconnects=e}getCurrentReconnects(){return this.current_reconnects}getMaxReconnects(){return this.max_reconnects}isReconnecting(){return void 0!==this.reconnect_timer_id}willReconnect(){return this.reconnect&&(0===this.max_reconnects||this.current_reconnects<this.max_reconnects)}_connect(e,t){clearTimeout(this.reconnect_timer_id),this.socket=this.webSocketFactory(e,t),this.socket.addEventListener("open",()=>{this.ready=!0,this.emit("open"),this.current_reconnects=0}),this.socket.addEventListener("message",e=>{let{data:t}=e;t instanceof ArrayBuffer&&(t=o.Buffer.from(t).toString());try{t=this.dataPack.decode(t)}catch(n){return}if(t.notification&&this.listeners(t.notification).length){if(!Object.keys(t.params).length)return this.emit(t.notification);const e=[t.notification];if(t.params.constructor===Object)e.push(t.params);else for(let n=0;n<t.params.length;n++)e.push(t.params[n]);return Promise.resolve().then(()=>{this.emit.apply(this,e)})}if(!this.queue[t.id])return t.method?Promise.resolve().then(()=>{var e;this.emit(t.method,null===(e=t)||void 0===e?void 0:e.params)}):void 0;"error"in t==="result"in t&&this.queue[t.id].promise[1](new Error('Server response malformed. Response must include either "result" or "error", but not both.')),this.queue[t.id].timeout&&clearTimeout(this.queue[t.id].timeout),t.error?this.queue[t.id].promise[1](t.error):this.queue[t.id].promise[0](t.result),delete this.queue[t.id]}),this.socket.addEventListener("error",e=>this.emit("error",e)),this.socket.addEventListener("close",n=>{let{code:r,reason:i}=n;this.ready&&setTimeout(()=>this.emit("close",r,i),0),this.ready=!1,this.socket=void 0,1e3!==r&&(this.current_reconnects++,this.reconnect&&(this.max_reconnects>this.current_reconnects||0===this.max_reconnects)?this.reconnect_timer_id=setTimeout(()=>this._connect(e,t),this.reconnect_interval):this.reconnect&&this.max_reconnects>0&&this.current_reconnects>=this.max_reconnects&&setTimeout(()=>this.emit("max_reconnects_reached",r,i),1))})}},_e=n(2494),ke=n(8717);const xe=["commitment"],Se=["encoding"],Ee=["commitment"],Ae=["commitment"],Pe=s.ed25519.utils.randomPrivateKey,Ce=()=>{const e=s.ed25519.utils.randomPrivateKey(),t=Ie(e),n=new Uint8Array(64);return n.set(e),n.set(t,32),{publicKey:t,secretKey:n}},Ie=s.ed25519.getPublicKey;function Me(e){try{return s.ed25519.ExtendedPoint.fromHex(e),!0}catch(t){return!1}}const Te=(e,t)=>s.ed25519.sign(e,t.slice(0,32)),Oe=s.ed25519.verify,Ne=e=>o.Buffer.isBuffer(e)?e:e instanceof Uint8Array?o.Buffer.from(e.buffer,e.byteOffset,e.byteLength):o.Buffer.from(e);class Be{constructor(e){Object.assign(this,e)}encode(){return o.Buffer.from((0,h.serialize)(je,this))}static decode(e){return(0,h.deserialize)(je,this,e)}static decodeUnchecked(e){return(0,h.deserializeUnchecked)(je,this,e)}}class Re extends Be{constructor(e){if(super(e),this.enum="",1!==Object.keys(e).length)throw new Error("Enum can only take single value");Object.keys(e).map(e=>{this.enum=e})}}const je=new Map;var Le;const Fe=32,ze=32;let De=1;class Ue extends Be{constructor(e){if(super({}),this._bn=void 0,function(e){return void 0!==e._bn}(e))this._bn=e._bn;else{if("string"===typeof e){const t=u().decode(e);if(t.length!=ze)throw new Error("Invalid public key input");this._bn=new(c())(t)}else this._bn=new(c())(e);if(this._bn.byteLength()>ze)throw new Error("Invalid public key input")}}static unique(){const e=new Ue(De);return De+=1,new Ue(e.toBuffer())}equals(e){return this._bn.eq(e._bn)}toBase58(){return u().encode(this.toBytes())}toJSON(){return this.toBase58()}toBytes(){const e=this.toBuffer();return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}toBuffer(){const e=this._bn.toArrayLike(o.Buffer);if(e.length===ze)return e;const t=o.Buffer.alloc(32);return e.copy(t,32-e.length),t}get[Symbol.toStringTag](){return"PublicKey(".concat(this.toString(),")")}toString(){return this.toBase58()}static async createWithSeed(e,t,n){const r=o.Buffer.concat([e.toBuffer(),o.Buffer.from(t),n.toBuffer()]),i=(0,d.sc)(r);return new Ue(i)}static createProgramAddressSync(e,t){let n=o.Buffer.alloc(0);e.forEach(function(e){if(e.length>Fe)throw new TypeError("Max seed length exceeded");n=o.Buffer.concat([n,Ne(e)])}),n=o.Buffer.concat([n,t.toBuffer(),o.Buffer.from("ProgramDerivedAddress")]);const r=(0,d.sc)(n);if(Me(r))throw new Error("Invalid seeds, address must fall off the curve");return new Ue(r)}static async createProgramAddress(e,t){return this.createProgramAddressSync(e,t)}static findProgramAddressSync(e,t){let n,r=255;for(;0!=r;){try{const i=e.concat(o.Buffer.from([r]));n=this.createProgramAddressSync(i,t)}catch(i){if(i instanceof TypeError)throw i;r--;continue}return[n,r]}throw new Error("Unable to find a viable program address nonce")}static async findProgramAddress(e,t){return this.findProgramAddressSync(e,t)}static isOnCurve(e){return Me(new Ue(e).toBytes())}}Le=Ue,Ue.default=new Le("11111111111111111111111111111111"),je.set(Ue,{kind:"struct",fields:[["_bn","u256"]]});class We{constructor(e){if(this._publicKey=void 0,this._secretKey=void 0,e){const t=Ne(e);if(64!==e.length)throw new Error("bad secret key size");this._publicKey=t.slice(32,64),this._secretKey=t.slice(0,32)}else this._secretKey=Ne(Pe()),this._publicKey=Ne(Ie(this._secretKey))}get publicKey(){return new Ue(this._publicKey)}get secretKey(){return o.Buffer.concat([this._secretKey,this._publicKey],64)}}const qe=new Ue("BPFLoader1111111111111111111111111111111111"),He=1232,Ke=127,Ve=64;class $e extends Error{constructor(e){super("Signature ".concat(e," has expired: block height exceeded.")),this.signature=void 0,this.signature=e}}Object.defineProperty($e.prototype,"name",{value:"TransactionExpiredBlockheightExceededError"});class Ge extends Error{constructor(e,t){super("Transaction was not confirmed in ".concat(t.toFixed(2)," seconds. It is ")+"unknown if it succeeded or failed. Check signature "+"".concat(e," using the Solana Explorer or CLI tools.")),this.signature=void 0,this.signature=e}}Object.defineProperty(Ge.prototype,"name",{value:"TransactionExpiredTimeoutError"});class Ze extends Error{constructor(e){super("Signature ".concat(e," has expired: the nonce is no longer valid.")),this.signature=void 0,this.signature=e}}Object.defineProperty(Ze.prototype,"name",{value:"TransactionExpiredNonceInvalidError"});class Je{constructor(e,t){this.staticAccountKeys=void 0,this.accountKeysFromLookups=void 0,this.staticAccountKeys=e,this.accountKeysFromLookups=t}keySegments(){const e=[this.staticAccountKeys];return this.accountKeysFromLookups&&(e.push(this.accountKeysFromLookups.writable),e.push(this.accountKeysFromLookups.readonly)),e}get(e){for(const t of this.keySegments()){if(e<t.length)return t[e];e-=t.length}}get length(){return this.keySegments().flat().length}compileInstructions(e){if(this.length>256)throw new Error("Account index overflow encountered during compilation");const t=new Map;this.keySegments().flat().forEach((e,n)=>{t.set(e.toBase58(),n)});const n=e=>{const n=t.get(e.toBase58());if(void 0===n)throw new Error("Encountered an unknown instruction account key during compilation");return n};return e.map(e=>({programIdIndex:n(e.programId),accountKeyIndexes:e.keys.map(e=>n(e.pubkey)),data:e.data}))}}const Ye=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"publicKey";return f.av(32,e)},Qe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature";return f.av(64,e)},Xe=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"string";const t=f.w3([f.DH("length"),f.DH("lengthPadding"),f.av(f.cY(f.DH(),-8),"chars")],e),n=t.decode.bind(t),r=t.encode.bind(t),i=t;return i.decode=(e,t)=>n(e,t).chars.toString(),i.encode=(e,t,n)=>{const i={chars:o.Buffer.from(e,"utf8")};return r(i,t,n)},i.alloc=e=>f.DH().span+f.DH().span+o.Buffer.from(e,"utf8").length,i};function et(e,t){const n=e=>{if(e.span>=0)return e.span;if("function"===typeof e.alloc)return e.alloc(t[e.property]);if("count"in e&&"elementLayout"in e){const r=t[e.property];if(Array.isArray(r))return r.length*n(e.elementLayout)}else if("fields"in e)return et({layout:e},t[e.property]);return 0};let r=0;return e.layout.fields.forEach(e=>{r+=n(e)}),r}function tt(e){let t=0,n=0;for(;;){let r=e.shift();if(t|=(127&r)<<7*n,n+=1,0===(128&r))break}return t}function nt(e,t){let n=t;for(;;){let t=127&n;if(n>>=7,0==n){e.push(t);break}t|=128,e.push(t)}}function rt(e,t){if(!e)throw new Error(t||"Assertion failed")}class it{constructor(e,t){this.payer=void 0,this.keyMetaMap=void 0,this.payer=e,this.keyMetaMap=t}static compile(e,t){const n=new Map,r=e=>{const t=e.toBase58();let r=n.get(t);return void 0===r&&(r={isSigner:!1,isWritable:!1,isInvoked:!1},n.set(t,r)),r},i=r(t);i.isSigner=!0,i.isWritable=!0;for(const o of e){r(o.programId).isInvoked=!0;for(const e of o.keys){const t=r(e.pubkey);t.isSigner||(t.isSigner=e.isSigner),t.isWritable||(t.isWritable=e.isWritable)}}return new it(t,n)}getMessageComponents(){const e=[...this.keyMetaMap.entries()];rt(e.length<=256,"Max static account keys length exceeded");const t=e.filter(e=>{let[,t]=e;return t.isSigner&&t.isWritable}),n=e.filter(e=>{let[,t]=e;return t.isSigner&&!t.isWritable}),r=e.filter(e=>{let[,t]=e;return!t.isSigner&&t.isWritable}),i=e.filter(e=>{let[,t]=e;return!t.isSigner&&!t.isWritable}),o={numRequiredSignatures:t.length+n.length,numReadonlySignedAccounts:n.length,numReadonlyUnsignedAccounts:i.length};{rt(t.length>0,"Expected at least one writable signer key");const[e]=t[0];rt(e===this.payer.toBase58(),"Expected first writable signer key to be the fee payer")}return[o,[...t.map(e=>{let[t]=e;return new Ue(t)}),...n.map(e=>{let[t]=e;return new Ue(t)}),...r.map(e=>{let[t]=e;return new Ue(t)}),...i.map(e=>{let[t]=e;return new Ue(t)})]]}extractTableLookup(e){const[t,n]=this.drainKeysFoundInLookupTable(e.state.addresses,e=>!e.isSigner&&!e.isInvoked&&e.isWritable),[r,i]=this.drainKeysFoundInLookupTable(e.state.addresses,e=>!e.isSigner&&!e.isInvoked&&!e.isWritable);if(0!==t.length||0!==r.length)return[{accountKey:e.key,writableIndexes:t,readonlyIndexes:r},{writable:n,readonly:i}]}drainKeysFoundInLookupTable(e,t){const n=new Array,r=new Array;for(const[i,o]of this.keyMetaMap.entries())if(t(o)){const t=new Ue(i),o=e.findIndex(e=>e.equals(t));o>=0&&(rt(o<256,"Max lookup table index exceeded"),n.push(o),r.push(t),this.keyMetaMap.delete(i))}return[n,r]}}const ot="Reached end of buffer unexpectedly";function st(e){if(0===e.length)throw new Error(ot);return e.shift()}function at(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];const[o]=r;if(2===r.length?o+(null!==(t=r[1])&&void 0!==t?t:0)>e.length:o>=e.length)throw new Error(ot);return e.splice(...r)}class ct{constructor(e){this.header=void 0,this.accountKeys=void 0,this.recentBlockhash=void 0,this.instructions=void 0,this.indexToProgramIds=new Map,this.header=e.header,this.accountKeys=e.accountKeys.map(e=>new Ue(e)),this.recentBlockhash=e.recentBlockhash,this.instructions=e.instructions,this.instructions.forEach(e=>this.indexToProgramIds.set(e.programIdIndex,this.accountKeys[e.programIdIndex]))}get version(){return"legacy"}get staticAccountKeys(){return this.accountKeys}get compiledInstructions(){return this.instructions.map(e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:u().decode(e.data)}))}get addressTableLookups(){return[]}getAccountKeys(){return new Je(this.staticAccountKeys)}static compile(e){const t=it.compile(e.instructions,e.payerKey),[n,r]=t.getMessageComponents(),i=new Je(r).compileInstructions(e.instructions).map(e=>({programIdIndex:e.programIdIndex,accounts:e.accountKeyIndexes,data:u().encode(e.data)}));return new ct({header:n,accountKeys:r,recentBlockhash:e.recentBlockhash,instructions:i})}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const t=this.header.numRequiredSignatures;if(e>=this.header.numRequiredSignatures){return e-t<this.accountKeys.length-t-this.header.numReadonlyUnsignedAccounts}return e<t-this.header.numReadonlySignedAccounts}isProgramId(e){return this.indexToProgramIds.has(e)}programIds(){return[...this.indexToProgramIds.values()]}nonProgramIds(){return this.accountKeys.filter((e,t)=>!this.isProgramId(t))}serialize(){const e=this.accountKeys.length;let t=[];nt(t,e);const n=this.instructions.map(e=>{const{accounts:t,programIdIndex:n}=e,r=Array.from(u().decode(e.data));let i=[];nt(i,t.length);let s=[];return nt(s,r.length),{programIdIndex:n,keyIndicesCount:o.Buffer.from(i),keyIndices:t,dataLength:o.Buffer.from(s),data:r}});let r=[];nt(r,n.length);let i=o.Buffer.alloc(He);o.Buffer.from(r).copy(i);let s=r.length;n.forEach(e=>{const t=f.w3([f.u8("programIdIndex"),f.av(e.keyIndicesCount.length,"keyIndicesCount"),f.O6(f.u8("keyIndex"),e.keyIndices.length,"keyIndices"),f.av(e.dataLength.length,"dataLength"),f.O6(f.u8("userdatum"),e.data.length,"data")]).encode(e,i,s);s+=t}),i=i.slice(0,s);const a=f.w3([f.av(1,"numRequiredSignatures"),f.av(1,"numReadonlySignedAccounts"),f.av(1,"numReadonlyUnsignedAccounts"),f.av(t.length,"keyCount"),f.O6(Ye("key"),e,"keys"),Ye("recentBlockhash")]),c={numRequiredSignatures:o.Buffer.from([this.header.numRequiredSignatures]),numReadonlySignedAccounts:o.Buffer.from([this.header.numReadonlySignedAccounts]),numReadonlyUnsignedAccounts:o.Buffer.from([this.header.numReadonlyUnsignedAccounts]),keyCount:o.Buffer.from(t),keys:this.accountKeys.map(e=>Ne(e.toBytes())),recentBlockhash:u().decode(this.recentBlockhash)};let l=o.Buffer.alloc(2048);const d=a.encode(c,l);return i.copy(l,d),l.slice(0,d+i.length)}static from(e){let t=[...e];const n=st(t);if(n!==(n&Ke))throw new Error("Versioned messages must be deserialized with VersionedMessage.deserialize()");const r=st(t),i=st(t),s=tt(t);let a=[];for(let u=0;u<s;u++){const e=at(t,0,ze);a.push(new Ue(o.Buffer.from(e)))}const c=at(t,0,ze),l=tt(t);let d=[];for(let f=0;f<l;f++){const e=st(t),n=at(t,0,tt(t)),r=at(t,0,tt(t)),i=u().encode(o.Buffer.from(r));d.push({programIdIndex:e,accounts:n,data:i})}const h={header:{numRequiredSignatures:n,numReadonlySignedAccounts:r,numReadonlyUnsignedAccounts:i},recentBlockhash:u().encode(o.Buffer.from(c)),accountKeys:a,instructions:d};return new ct(h)}}class lt{constructor(e){this.header=void 0,this.staticAccountKeys=void 0,this.recentBlockhash=void 0,this.compiledInstructions=void 0,this.addressTableLookups=void 0,this.header=e.header,this.staticAccountKeys=e.staticAccountKeys,this.recentBlockhash=e.recentBlockhash,this.compiledInstructions=e.compiledInstructions,this.addressTableLookups=e.addressTableLookups}get version(){return 0}get numAccountKeysFromLookups(){let e=0;for(const t of this.addressTableLookups)e+=t.readonlyIndexes.length+t.writableIndexes.length;return e}getAccountKeys(e){let t;if(e&&"accountKeysFromLookups"in e&&e.accountKeysFromLookups){if(this.numAccountKeysFromLookups!=e.accountKeysFromLookups.writable.length+e.accountKeysFromLookups.readonly.length)throw new Error("Failed to get account keys because of a mismatch in the number of account keys from lookups");t=e.accountKeysFromLookups}else if(e&&"addressLookupTableAccounts"in e&&e.addressLookupTableAccounts)t=this.resolveAddressTableLookups(e.addressLookupTableAccounts);else if(this.addressTableLookups.length>0)throw new Error("Failed to get account keys because address table lookups were not resolved");return new Je(this.staticAccountKeys,t)}isAccountSigner(e){return e<this.header.numRequiredSignatures}isAccountWritable(e){const t=this.header.numRequiredSignatures,n=this.staticAccountKeys.length;if(e>=n){return e-n<this.addressTableLookups.reduce((e,t)=>e+t.writableIndexes.length,0)}if(e>=this.header.numRequiredSignatures){return e-t<n-t-this.header.numReadonlyUnsignedAccounts}return e<t-this.header.numReadonlySignedAccounts}resolveAddressTableLookups(e){const t={writable:[],readonly:[]};for(const n of this.addressTableLookups){const r=e.find(e=>e.key.equals(n.accountKey));if(!r)throw new Error("Failed to find address lookup table account for table key ".concat(n.accountKey.toBase58()));for(const e of n.writableIndexes){if(!(e<r.state.addresses.length))throw new Error("Failed to find address for index ".concat(e," in address lookup table ").concat(n.accountKey.toBase58()));t.writable.push(r.state.addresses[e])}for(const e of n.readonlyIndexes){if(!(e<r.state.addresses.length))throw new Error("Failed to find address for index ".concat(e," in address lookup table ").concat(n.accountKey.toBase58()));t.readonly.push(r.state.addresses[e])}}return t}static compile(e){const t=it.compile(e.instructions,e.payerKey),n=new Array,r={writable:new Array,readonly:new Array},i=e.addressLookupTableAccounts||[];for(const c of i){const e=t.extractTableLookup(c);if(void 0!==e){const[t,{writable:i,readonly:o}]=e;n.push(t),r.writable.push(...i),r.readonly.push(...o)}}const[o,s]=t.getMessageComponents(),a=new Je(s,r).compileInstructions(e.instructions);return new lt({header:o,staticAccountKeys:s,recentBlockhash:e.recentBlockhash,compiledInstructions:a,addressTableLookups:n})}serialize(){const e=Array();nt(e,this.staticAccountKeys.length);const t=this.serializeInstructions(),n=Array();nt(n,this.compiledInstructions.length);const r=this.serializeAddressTableLookups(),i=Array();nt(i,this.addressTableLookups.length);const o=f.w3([f.u8("prefix"),f.w3([f.u8("numRequiredSignatures"),f.u8("numReadonlySignedAccounts"),f.u8("numReadonlyUnsignedAccounts")],"header"),f.av(e.length,"staticAccountKeysLength"),f.O6(Ye(),this.staticAccountKeys.length,"staticAccountKeys"),Ye("recentBlockhash"),f.av(n.length,"instructionsLength"),f.av(t.length,"serializedInstructions"),f.av(i.length,"addressTableLookupsLength"),f.av(r.length,"serializedAddressTableLookups")]),s=new Uint8Array(He),a=o.encode({prefix:128,header:this.header,staticAccountKeysLength:new Uint8Array(e),staticAccountKeys:this.staticAccountKeys.map(e=>e.toBytes()),recentBlockhash:u().decode(this.recentBlockhash),instructionsLength:new Uint8Array(n),serializedInstructions:t,addressTableLookupsLength:new Uint8Array(i),serializedAddressTableLookups:r},s);return s.slice(0,a)}serializeInstructions(){let e=0;const t=new Uint8Array(He);for(const n of this.compiledInstructions){const r=Array();nt(r,n.accountKeyIndexes.length);const i=Array();nt(i,n.data.length);e+=f.w3([f.u8("programIdIndex"),f.av(r.length,"encodedAccountKeyIndexesLength"),f.O6(f.u8(),n.accountKeyIndexes.length,"accountKeyIndexes"),f.av(i.length,"encodedDataLength"),f.av(n.data.length,"data")]).encode({programIdIndex:n.programIdIndex,encodedAccountKeyIndexesLength:new Uint8Array(r),accountKeyIndexes:n.accountKeyIndexes,encodedDataLength:new Uint8Array(i),data:n.data},t,e)}return t.slice(0,e)}serializeAddressTableLookups(){let e=0;const t=new Uint8Array(He);for(const n of this.addressTableLookups){const r=Array();nt(r,n.writableIndexes.length);const i=Array();nt(i,n.readonlyIndexes.length);e+=f.w3([Ye("accountKey"),f.av(r.length,"encodedWritableIndexesLength"),f.O6(f.u8(),n.writableIndexes.length,"writableIndexes"),f.av(i.length,"encodedReadonlyIndexesLength"),f.O6(f.u8(),n.readonlyIndexes.length,"readonlyIndexes")]).encode({accountKey:n.accountKey.toBytes(),encodedWritableIndexesLength:new Uint8Array(r),writableIndexes:n.writableIndexes,encodedReadonlyIndexesLength:new Uint8Array(i),readonlyIndexes:n.readonlyIndexes},t,e)}return t.slice(0,e)}static deserialize(e){let t=[...e];const n=st(t),r=n&Ke;rt(n!==r,"Expected versioned message but received legacy message");rt(0===r,"Expected versioned message with version 0 but found version ".concat(r));const i={numRequiredSignatures:st(t),numReadonlySignedAccounts:st(t),numReadonlyUnsignedAccounts:st(t)},o=[],s=tt(t);for(let u=0;u<s;u++)o.push(new Ue(at(t,0,ze)));const a=u().encode(at(t,0,ze)),c=tt(t),l=[];for(let u=0;u<c;u++){const e=st(t),n=at(t,0,tt(t)),r=tt(t),i=new Uint8Array(at(t,0,r));l.push({programIdIndex:e,accountKeyIndexes:n,data:i})}const d=tt(t),h=[];for(let u=0;u<d;u++){const e=new Ue(at(t,0,ze)),n=at(t,0,tt(t)),r=at(t,0,tt(t));h.push({accountKey:e,writableIndexes:n,readonlyIndexes:r})}return new lt({header:i,staticAccountKeys:o,recentBlockhash:a,compiledInstructions:l,addressTableLookups:h})}}const ut={deserializeMessageVersion(e){const t=e[0],n=t&Ke;return n===t?"legacy":n},deserialize:e=>{const t=ut.deserializeMessageVersion(e);if("legacy"===t)return ct.from(e);if(0===t)return lt.deserialize(e);throw new Error("Transaction message version ".concat(t," deserialization is not supported"))}};let dt=function(e){return e[e.BLOCKHEIGHT_EXCEEDED=0]="BLOCKHEIGHT_EXCEEDED",e[e.PROCESSED=1]="PROCESSED",e[e.TIMED_OUT=2]="TIMED_OUT",e[e.NONCE_INVALID=3]="NONCE_INVALID",e}({});const ht=o.Buffer.alloc(Ve).fill(0);class ft{constructor(e){this.keys=void 0,this.programId=void 0,this.data=o.Buffer.alloc(0),this.programId=e.programId,this.keys=e.keys,e.data&&(this.data=e.data)}toJSON(){return{keys:this.keys.map(e=>{let{pubkey:t,isSigner:n,isWritable:r}=e;return{pubkey:t.toJSON(),isSigner:n,isWritable:r}}),programId:this.programId.toJSON(),data:[...this.data]}}}class pt{get signature(){return this.signatures.length>0?this.signatures[0].signature:null}constructor(e){if(this.signatures=[],this.feePayer=void 0,this.instructions=[],this.recentBlockhash=void 0,this.lastValidBlockHeight=void 0,this.nonceInfo=void 0,this.minNonceContextSlot=void 0,this._message=void 0,this._json=void 0,e)if(e.feePayer&&(this.feePayer=e.feePayer),e.signatures&&(this.signatures=e.signatures),Object.prototype.hasOwnProperty.call(e,"nonceInfo")){const{minContextSlot:t,nonceInfo:n}=e;this.minNonceContextSlot=t,this.nonceInfo=n}else if(Object.prototype.hasOwnProperty.call(e,"lastValidBlockHeight")){const{blockhash:t,lastValidBlockHeight:n}=e;this.recentBlockhash=t,this.lastValidBlockHeight=n}else{const{recentBlockhash:t,nonceInfo:n}=e;n&&(this.nonceInfo=n),this.recentBlockhash=t}}toJSON(){return{recentBlockhash:this.recentBlockhash||null,feePayer:this.feePayer?this.feePayer.toJSON():null,nonceInfo:this.nonceInfo?{nonce:this.nonceInfo.nonce,nonceInstruction:this.nonceInfo.nonceInstruction.toJSON()}:null,instructions:this.instructions.map(e=>e.toJSON()),signers:this.signatures.map(e=>{let{publicKey:t}=e;return t.toJSON()})}}add(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)throw new Error("No instructions");return t.forEach(e=>{"instructions"in e?this.instructions=this.instructions.concat(e.instructions):"data"in e&&"programId"in e&&"keys"in e?this.instructions.push(e):this.instructions.push(new ft(e))}),this}compileMessage(){if(this._message&&JSON.stringify(this.toJSON())===JSON.stringify(this._json))return this._message;let e,t,n;if(this.nonceInfo?(e=this.nonceInfo.nonce,t=this.instructions[0]!=this.nonceInfo.nonceInstruction?[this.nonceInfo.nonceInstruction,...this.instructions]:this.instructions):(e=this.recentBlockhash,t=this.instructions),!e)throw new Error("Transaction recentBlockhash required");if(t.length<1&&console.warn("No instructions provided"),this.feePayer)n=this.feePayer;else{if(!(this.signatures.length>0&&this.signatures[0].publicKey))throw new Error("Transaction fee payer required");n=this.signatures[0].publicKey}for(let i=0;i<t.length;i++)if(void 0===t[i].programId)throw new Error("Transaction instruction index ".concat(i," has undefined program id"));const r=[],o=[];t.forEach(e=>{e.keys.forEach(e=>{o.push((0,i.A)({},e))});const t=e.programId.toString();r.includes(t)||r.push(t)}),r.forEach(e=>{o.push({pubkey:new Ue(e),isSigner:!1,isWritable:!1})});const s=[];o.forEach(e=>{const t=e.pubkey.toString(),n=s.findIndex(e=>e.pubkey.toString()===t);n>-1?(s[n].isWritable=s[n].isWritable||e.isWritable,s[n].isSigner=s[n].isSigner||e.isSigner):s.push(e)}),s.sort(function(e,t){if(e.isSigner!==t.isSigner)return e.isSigner?-1:1;if(e.isWritable!==t.isWritable)return e.isWritable?-1:1;return e.pubkey.toBase58().localeCompare(t.pubkey.toBase58(),"en",{localeMatcher:"best fit",usage:"sort",sensitivity:"variant",ignorePunctuation:!1,numeric:!1,caseFirst:"lower"})});const a=s.findIndex(e=>e.pubkey.equals(n));if(a>-1){const[e]=s.splice(a,1);e.isSigner=!0,e.isWritable=!0,s.unshift(e)}else s.unshift({pubkey:n,isSigner:!0,isWritable:!0});for(const i of this.signatures){const e=s.findIndex(e=>e.pubkey.equals(i.publicKey));if(!(e>-1))throw new Error("unknown signer: ".concat(i.publicKey.toString()));s[e].isSigner||(s[e].isSigner=!0,console.warn("Transaction references a signature that is unnecessary, only the fee payer and instruction signer accounts should sign a transaction. This behavior is deprecated and will throw an error in the next major version release."))}let c=0,l=0,d=0;const h=[],f=[];s.forEach(e=>{let{pubkey:t,isSigner:n,isWritable:r}=e;n?(h.push(t.toString()),c+=1,r||(l+=1)):(f.push(t.toString()),r||(d+=1))});const p=h.concat(f),m=t.map(e=>{const{data:t,programId:n}=e;return{programIdIndex:p.indexOf(n.toString()),accounts:e.keys.map(e=>p.indexOf(e.pubkey.toString())),data:u().encode(t)}});return m.forEach(e=>{rt(e.programIdIndex>=0),e.accounts.forEach(e=>rt(e>=0))}),new ct({header:{numRequiredSignatures:c,numReadonlySignedAccounts:l,numReadonlyUnsignedAccounts:d},accountKeys:p,recentBlockhash:e,instructions:m})}_compile(){const e=this.compileMessage(),t=e.accountKeys.slice(0,e.header.numRequiredSignatures);if(this.signatures.length===t.length){if(this.signatures.every((e,n)=>t[n].equals(e.publicKey)))return e}return this.signatures=t.map(e=>({signature:null,publicKey:e})),e}serializeMessage(){return this._compile().serialize()}async getEstimatedFee(e){return(await e.getFeeForMessage(this.compileMessage())).value}setSigners(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)throw new Error("No signers");const r=new Set;this.signatures=t.filter(e=>{const t=e.toString();return!r.has(t)&&(r.add(t),!0)}).map(e=>({signature:null,publicKey:e}))}sign(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)throw new Error("No signers");const r=new Set,i=[];for(const s of t){const e=s.publicKey.toString();r.has(e)||(r.add(e),i.push(s))}this.signatures=i.map(e=>({signature:null,publicKey:e.publicKey}));const o=this._compile();this._partialSign(o,...i)}partialSign(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)throw new Error("No signers");const r=new Set,i=[];for(const s of t){const e=s.publicKey.toString();r.has(e)||(r.add(e),i.push(s))}const o=this._compile();this._partialSign(o,...i)}_partialSign(e){const t=e.serialize();for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];r.forEach(e=>{const n=Te(t,e.secretKey);this._addSignature(e.publicKey,Ne(n))})}addSignature(e,t){this._compile(),this._addSignature(e,t)}_addSignature(e,t){rt(64===t.length);const n=this.signatures.findIndex(t=>e.equals(t.publicKey));if(n<0)throw new Error("unknown signer: ".concat(e.toString()));this.signatures[n].signature=o.Buffer.from(t)}verifySignatures(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!this._getMessageSignednessErrors(this.serializeMessage(),e)}_getMessageSignednessErrors(e,t){const n={};for(const{signature:r,publicKey:i}of this.signatures)null===r?t&&(n.missing||(n.missing=[])).push(i):Oe(r,e,i.toBytes())||(n.invalid||(n.invalid=[])).push(i);return n.invalid||n.missing?n:void 0}serialize(e){const{requireAllSignatures:t,verifySignatures:n}=Object.assign({requireAllSignatures:!0,verifySignatures:!0},e),r=this.serializeMessage();if(n){const e=this._getMessageSignednessErrors(r,t);if(e){let t="Signature verification failed.";throw e.invalid&&(t+="\nInvalid signature for public key".concat(1===e.invalid.length?"":"(s)"," [`").concat(e.invalid.map(e=>e.toBase58()).join("`, `"),"`].")),e.missing&&(t+="\nMissing signature for public key".concat(1===e.missing.length?"":"(s)"," [`").concat(e.missing.map(e=>e.toBase58()).join("`, `"),"`].")),new Error(t)}}return this._serialize(r)}_serialize(e){const{signatures:t}=this,n=[];nt(n,t.length);const r=n.length+64*t.length+e.length,i=o.Buffer.alloc(r);return rt(t.length<256),o.Buffer.from(n).copy(i,0),t.forEach((e,t)=>{let{signature:r}=e;null!==r&&(rt(64===r.length,"signature has invalid length"),o.Buffer.from(r).copy(i,n.length+64*t))}),e.copy(i,n.length+64*t.length),rt(i.length<=He,"Transaction too large: ".concat(i.length," > ").concat(He)),i}get keys(){return rt(1===this.instructions.length),this.instructions[0].keys.map(e=>e.pubkey)}get programId(){return rt(1===this.instructions.length),this.instructions[0].programId}get data(){return rt(1===this.instructions.length),this.instructions[0].data}static from(e){let t=[...e];const n=tt(t);let r=[];for(let i=0;i<n;i++){const e=at(t,0,Ve);r.push(u().encode(o.Buffer.from(e)))}return pt.populate(ct.from(t),r)}static populate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=new pt;return n.recentBlockhash=e.recentBlockhash,e.header.numRequiredSignatures>0&&(n.feePayer=e.accountKeys[0]),t.forEach((t,r)=>{const i={signature:t==u().encode(ht)?null:u().decode(t),publicKey:e.accountKeys[r]};n.signatures.push(i)}),e.instructions.forEach(t=>{const r=t.accounts.map(t=>{const r=e.accountKeys[t];return{pubkey:r,isSigner:n.signatures.some(e=>e.publicKey.toString()===r.toString())||e.isAccountSigner(t),isWritable:e.isAccountWritable(t)}});n.instructions.push(new ft({keys:r,programId:e.accountKeys[t.programIdIndex],data:u().decode(t.data)}))}),n._message=e,n._json=n.toJSON(),n}}class mt{constructor(e){this.payerKey=void 0,this.instructions=void 0,this.recentBlockhash=void 0,this.payerKey=e.payerKey,this.instructions=e.instructions,this.recentBlockhash=e.recentBlockhash}static decompile(e,t){const{header:n,compiledInstructions:r,recentBlockhash:i}=e,{numRequiredSignatures:o,numReadonlySignedAccounts:s,numReadonlyUnsignedAccounts:a}=n,c=o-s;rt(c>0,"Message header is invalid");const l=e.staticAccountKeys.length-o-a;rt(l>=0,"Message header is invalid");const u=e.getAccountKeys(t),d=u.get(0);if(void 0===d)throw new Error("Failed to decompile message because no account keys were found");const h=[];for(const f of r){const e=[];for(const r of f.accountKeyIndexes){const t=u.get(r);if(void 0===t)throw new Error("Failed to find key for account key index ".concat(r));let i;i=r<o?r<c:r<u.staticAccountKeys.length?r-o<l:r-u.staticAccountKeys.length<u.accountKeysFromLookups.writable.length,e.push({pubkey:t,isSigner:r<n.numRequiredSignatures,isWritable:i})}const t=u.get(f.programIdIndex);if(void 0===t)throw new Error("Failed to find program id for program id index ".concat(f.programIdIndex));h.push(new ft({programId:t,data:Ne(f.data),keys:e}))}return new mt({payerKey:d,instructions:h,recentBlockhash:i})}compileToLegacyMessage(){return ct.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions})}compileToV0Message(e){return lt.compile({payerKey:this.payerKey,recentBlockhash:this.recentBlockhash,instructions:this.instructions,addressLookupTableAccounts:e})}}class gt{get version(){return this.message.version}constructor(e,t){if(this.signatures=void 0,this.message=void 0,void 0!==t)rt(t.length===e.header.numRequiredSignatures,"Expected signatures length to be equal to the number of required signatures"),this.signatures=t;else{const t=[];for(let n=0;n<e.header.numRequiredSignatures;n++)t.push(new Uint8Array(Ve));this.signatures=t}this.message=e}serialize(){const e=this.message.serialize(),t=Array();nt(t,this.signatures.length);const n=f.w3([f.av(t.length,"encodedSignaturesLength"),f.O6(Qe(),this.signatures.length,"signatures"),f.av(e.length,"serializedMessage")]),r=new Uint8Array(2048),i=n.encode({encodedSignaturesLength:new Uint8Array(t),signatures:this.signatures,serializedMessage:e},r);return r.slice(0,i)}static deserialize(e){let t=[...e];const n=[],r=tt(t);for(let o=0;o<r;o++)n.push(new Uint8Array(at(t,0,Ve)));const i=ut.deserialize(new Uint8Array(t));return new gt(i,n)}sign(e){const t=this.message.serialize(),n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures);for(const r of e){const e=n.findIndex(e=>e.equals(r.publicKey));rt(e>=0,"Cannot sign with non signer key ".concat(r.publicKey.toBase58())),this.signatures[e]=Te(t,r.secretKey)}}addSignature(e,t){rt(64===t.byteLength,"Signature must be 64 bytes long");const n=this.message.staticAccountKeys.slice(0,this.message.header.numRequiredSignatures).findIndex(t=>t.equals(e));rt(n>=0,"Can not add signature; `".concat(e.toBase58(),"` is not required to sign this transaction")),this.signatures[n]=t}}const bt=new Ue("SysvarC1ock11111111111111111111111111111111"),yt=new Ue("SysvarEpochSchedu1e111111111111111111111111"),vt=new Ue("Sysvar1nstructions1111111111111111111111111"),wt=new Ue("SysvarRecentB1ockHashes11111111111111111111"),_t=new Ue("SysvarRent111111111111111111111111111111111"),kt=new Ue("SysvarRewards111111111111111111111111111111"),xt=new Ue("SysvarS1otHashes111111111111111111111111111"),St=new Ue("SysvarS1otHistory11111111111111111111111111"),Et=new Ue("SysvarStakeHistory1111111111111111111111111");class At extends Error{constructor(e){let{action:t,signature:n,transactionMessage:r,logs:i}=e;const o=i?"Logs: \n".concat(JSON.stringify(i.slice(-10),null,2),". "):"",s="\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.";let a;switch(t){case"send":a="Transaction ".concat(n," resulted in an error. \n")+"".concat(r,". ")+o+s;break;case"simulate":a="Simulation failed. \nMessage: ".concat(r,". \n")+o+s;break;default:a="Unknown action '".concat(t,"'")}super(a),this.signature=void 0,this.transactionMessage=void 0,this.transactionLogs=void 0,this.signature=n,this.transactionMessage=r,this.transactionLogs=i||void 0}get transactionError(){return{message:this.transactionMessage,logs:Array.isArray(this.transactionLogs)?this.transactionLogs:void 0}}get logs(){const e=this.transactionLogs;if(null==e||"object"!==typeof e||!("then"in e))return e}async getLogs(e){return Array.isArray(this.transactionLogs)||(this.transactionLogs=new Promise((t,n)=>{e.getTransaction(this.signature).then(e=>{if(e&&e.meta&&e.meta.logMessages){const n=e.meta.logMessages;this.transactionLogs=n,t(n)}else n(new Error("Log messages not found"))}).catch(n)})),await this.transactionLogs}}const Pt={JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP:-32001,JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE:-32002,JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE:-32003,JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE:-32004,JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY:-32005,JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE:-32006,JSON_RPC_SERVER_ERROR_SLOT_SKIPPED:-32007,JSON_RPC_SERVER_ERROR_NO_SNAPSHOT:-32008,JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED:-32009,JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX:-32010,JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE:-32011,JSON_RPC_SCAN_ERROR:-32012,JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH:-32013,JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET:-32014,JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION:-32015,JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED:-32016};class Ct extends Error{constructor(e,t){let{code:n,message:r,data:i}=e;super(null!=t?"".concat(t,": ").concat(r):r),this.code=void 0,this.data=void 0,this.code=n,this.data=i,this.name="SolanaJSONRPCError"}}async function It(e,t,n,r){const i=r&&{skipPreflight:r.skipPreflight,preflightCommitment:r.preflightCommitment||r.commitment,maxRetries:r.maxRetries,minContextSlot:r.minContextSlot},o=await e.sendTransaction(t,n,i);let s;if(null!=t.recentBlockhash&&null!=t.lastValidBlockHeight)s=(await e.confirmTransaction({abortSignal:null===r||void 0===r?void 0:r.abortSignal,signature:o,blockhash:t.recentBlockhash,lastValidBlockHeight:t.lastValidBlockHeight},r&&r.commitment)).value;else if(null!=t.minNonceContextSlot&&null!=t.nonceInfo){const{nonceInstruction:n}=t.nonceInfo,i=n.keys[0].pubkey;s=(await e.confirmTransaction({abortSignal:null===r||void 0===r?void 0:r.abortSignal,minContextSlot:t.minNonceContextSlot,nonceAccountPubkey:i,nonceValue:t.nonceInfo.nonce,signature:o},r&&r.commitment)).value}else null!=(null===r||void 0===r?void 0:r.abortSignal)&&console.warn("sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` or a combination of `nonceInfo` and `minNonceContextSlot` are abortable."),s=(await e.confirmTransaction(o,r&&r.commitment)).value;if(s.err){if(null!=o)throw new At({action:"send",signature:o,transactionMessage:"Status: (".concat(JSON.stringify(s),")")});throw new Error("Transaction ".concat(o," failed (").concat(JSON.stringify(s),")"))}return o}function Mt(e){return new Promise(t=>setTimeout(t,e))}function Tt(e,t){const n=e.layout.span>=0?e.layout.span:et(e,t),r=o.Buffer.alloc(n),i=Object.assign({instruction:e.index},t);return e.layout.encode(i,r),r}function Ot(e,t){let n;try{n=e.layout.decode(t)}catch(r){throw new Error("invalid instruction; "+r)}if(n.instruction!==e.index)throw new Error("invalid instruction; instruction index mismatch ".concat(n.instruction," != ").concat(e.index));return n}const Nt=f.I0("lamportsPerSignature"),Bt=f.w3([f.DH("version"),f.DH("state"),Ye("authorizedPubkey"),Ye("nonce"),f.w3([Nt],"feeCalculator")]),Rt=Bt.span;class jt{constructor(e){this.authorizedPubkey=void 0,this.nonce=void 0,this.feeCalculator=void 0,this.authorizedPubkey=e.authorizedPubkey,this.nonce=e.nonce,this.feeCalculator=e.feeCalculator}static fromAccountData(e){const t=Bt.decode(Ne(e),0);return new jt({authorizedPubkey:new Ue(t.authorizedPubkey),nonce:new Ue(t.nonce).toString(),feeCalculator:t.feeCalculator})}}function Lt(e){const t=(0,f.av)(8,e),n=t.decode.bind(t),r=t.encode.bind(t),i=t,o=L();return i.decode=(e,t)=>{const r=n(e,t);return o.decode(r)},i.encode=(e,t,n)=>{const i=o.encode(e);return r(i,t,n)},i}class Ft{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const t=f.DH("instruction").decode(e.data);let n;for(const[r,i]of Object.entries(zt))if(i.index==t){n=r;break}if(!n)throw new Error("Instruction type incorrect; not a SystemInstruction");return n}static decodeCreateAccount(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{lamports:t,space:n,programId:r}=Ot(zt.Create,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,lamports:t,space:n,programId:new Ue(r)}}static decodeTransfer(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{lamports:t}=Ot(zt.Transfer,e.data);return{fromPubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,lamports:t}}static decodeTransferWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:t,seed:n,programId:r}=Ot(zt.TransferWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,basePubkey:e.keys[1].pubkey,toPubkey:e.keys[2].pubkey,lamports:t,seed:n,programId:new Ue(r)}}static decodeAllocate(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{space:t}=Ot(zt.Allocate,e.data);return{accountPubkey:e.keys[0].pubkey,space:t}}static decodeAllocateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{base:t,seed:n,space:r,programId:i}=Ot(zt.AllocateWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new Ue(t),seed:n,space:r,programId:new Ue(i)}}static decodeAssign(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{programId:t}=Ot(zt.Assign,e.data);return{accountPubkey:e.keys[0].pubkey,programId:new Ue(t)}}static decodeAssignWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,1);const{base:t,seed:n,programId:r}=Ot(zt.AssignWithSeed,e.data);return{accountPubkey:e.keys[0].pubkey,basePubkey:new Ue(t),seed:n,programId:new Ue(r)}}static decodeCreateWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{base:t,seed:n,lamports:r,space:i,programId:o}=Ot(zt.CreateWithSeed,e.data);return{fromPubkey:e.keys[0].pubkey,newAccountPubkey:e.keys[1].pubkey,basePubkey:new Ue(t),seed:n,lamports:r,space:i,programId:new Ue(o)}}static decodeNonceInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{authorized:t}=Ot(zt.InitializeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:new Ue(t)}}static decodeNonceAdvance(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Ot(zt.AdvanceNonceAccount,e.data),{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static decodeNonceWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);const{lamports:t}=Ot(zt.WithdrawNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:t}}static decodeNonceAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{authorized:t}=Ot(zt.AuthorizeNonceAccount,e.data);return{noncePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[1].pubkey,newAuthorizedPubkey:new Ue(t)}}static checkProgramId(e){if(!e.equals(Dt.programId))throw new Error("invalid instruction; programId is not SystemProgram")}static checkKeyLength(e,t){if(e.length<t)throw new Error("invalid instruction; found ".concat(e.length," keys, expected at least ").concat(t))}}const zt=Object.freeze({Create:{index:0,layout:f.w3([f.DH("instruction"),f.Wg("lamports"),f.Wg("space"),Ye("programId")])},Assign:{index:1,layout:f.w3([f.DH("instruction"),Ye("programId")])},Transfer:{index:2,layout:f.w3([f.DH("instruction"),Lt("lamports")])},CreateWithSeed:{index:3,layout:f.w3([f.DH("instruction"),Ye("base"),Xe("seed"),f.Wg("lamports"),f.Wg("space"),Ye("programId")])},AdvanceNonceAccount:{index:4,layout:f.w3([f.DH("instruction")])},WithdrawNonceAccount:{index:5,layout:f.w3([f.DH("instruction"),f.Wg("lamports")])},InitializeNonceAccount:{index:6,layout:f.w3([f.DH("instruction"),Ye("authorized")])},AuthorizeNonceAccount:{index:7,layout:f.w3([f.DH("instruction"),Ye("authorized")])},Allocate:{index:8,layout:f.w3([f.DH("instruction"),f.Wg("space")])},AllocateWithSeed:{index:9,layout:f.w3([f.DH("instruction"),Ye("base"),Xe("seed"),f.Wg("space"),Ye("programId")])},AssignWithSeed:{index:10,layout:f.w3([f.DH("instruction"),Ye("base"),Xe("seed"),Ye("programId")])},TransferWithSeed:{index:11,layout:f.w3([f.DH("instruction"),Lt("lamports"),Xe("seed"),Ye("programId")])},UpgradeNonceAccount:{index:12,layout:f.w3([f.DH("instruction")])}});class Dt{constructor(){}static createAccount(e){const t=Tt(zt.Create,{lamports:e.lamports,space:e.space,programId:Ne(e.programId.toBuffer())});return new ft({keys:[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!0,isWritable:!0}],programId:this.programId,data:t})}static transfer(e){let t,n;if("basePubkey"in e){t=Tt(zt.TransferWithSeed,{lamports:BigInt(e.lamports),seed:e.seed,programId:Ne(e.programId.toBuffer())}),n=[{pubkey:e.fromPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}else{t=Tt(zt.Transfer,{lamports:BigInt(e.lamports)}),n=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0}]}return new ft({keys:n,programId:this.programId,data:t})}static assign(e){let t,n;if("basePubkey"in e){t=Tt(zt.AssignWithSeed,{base:Ne(e.basePubkey.toBuffer()),seed:e.seed,programId:Ne(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{t=Tt(zt.Assign,{programId:Ne(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new ft({keys:n,programId:this.programId,data:t})}static createAccountWithSeed(e){const t=Tt(zt.CreateWithSeed,{base:Ne(e.basePubkey.toBuffer()),seed:e.seed,lamports:e.lamports,space:e.space,programId:Ne(e.programId.toBuffer())});let n=[{pubkey:e.fromPubkey,isSigner:!0,isWritable:!0},{pubkey:e.newAccountPubkey,isSigner:!1,isWritable:!0}];return e.basePubkey.equals(e.fromPubkey)||n.push({pubkey:e.basePubkey,isSigner:!0,isWritable:!1}),new ft({keys:n,programId:this.programId,data:t})}static createNonceAccount(e){const t=new pt;"basePubkey"in e&&"seed"in e?t.add(Dt.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:Rt,programId:this.programId})):t.add(Dt.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.noncePubkey,lamports:e.lamports,space:Rt,programId:this.programId}));const n={noncePubkey:e.noncePubkey,authorizedPubkey:e.authorizedPubkey};return t.add(this.nonceInitialize(n)),t}static nonceInitialize(e){const t=Tt(zt.InitializeNonceAccount,{authorized:Ne(e.authorizedPubkey.toBuffer())}),n={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:wt,isSigner:!1,isWritable:!1},{pubkey:_t,isSigner:!1,isWritable:!1}],programId:this.programId,data:t};return new ft(n)}static nonceAdvance(e){const t=Tt(zt.AdvanceNonceAccount),n={keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:wt,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t};return new ft(n)}static nonceWithdraw(e){const t=Tt(zt.WithdrawNonceAccount,{lamports:e.lamports});return new ft({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.toPubkey,isSigner:!1,isWritable:!0},{pubkey:wt,isSigner:!1,isWritable:!1},{pubkey:_t,isSigner:!1,isWritable:!1},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}static nonceAuthorize(e){const t=Tt(zt.AuthorizeNonceAccount,{authorized:Ne(e.newAuthorizedPubkey.toBuffer())});return new ft({keys:[{pubkey:e.noncePubkey,isSigner:!1,isWritable:!0},{pubkey:e.authorizedPubkey,isSigner:!0,isWritable:!1}],programId:this.programId,data:t})}static allocate(e){let t,n;if("basePubkey"in e){t=Tt(zt.AllocateWithSeed,{base:Ne(e.basePubkey.toBuffer()),seed:e.seed,space:e.space,programId:Ne(e.programId.toBuffer())}),n=[{pubkey:e.accountPubkey,isSigner:!1,isWritable:!0},{pubkey:e.basePubkey,isSigner:!0,isWritable:!1}]}else{t=Tt(zt.Allocate,{space:e.space}),n=[{pubkey:e.accountPubkey,isSigner:!0,isWritable:!0}]}return new ft({keys:n,programId:this.programId,data:t})}}Dt.programId=new Ue("11111111111111111111111111111111");const Ut=He-300;class Wt{constructor(){}static getMinNumSignatures(e){return 2*(Math.ceil(e/Wt.chunkSize)+1+1)}static async load(e,t,n,r,i){{const o=await e.getMinimumBalanceForRentExemption(i.length),s=await e.getAccountInfo(n.publicKey,"confirmed");let a=null;if(null!==s){if(s.executable)return console.error("Program load failed, account is already executable"),!1;s.data.length!==i.length&&(a=a||new pt,a.add(Dt.allocate({accountPubkey:n.publicKey,space:i.length}))),s.owner.equals(r)||(a=a||new pt,a.add(Dt.assign({accountPubkey:n.publicKey,programId:r}))),s.lamports<o&&(a=a||new pt,a.add(Dt.transfer({fromPubkey:t.publicKey,toPubkey:n.publicKey,lamports:o-s.lamports})))}else a=(new pt).add(Dt.createAccount({fromPubkey:t.publicKey,newAccountPubkey:n.publicKey,lamports:o>0?o:1,space:i.length,programId:r}));null!==a&&await It(e,a,[t,n],{commitment:"confirmed"})}const s=f.w3([f.DH("instruction"),f.DH("offset"),f.DH("bytesLength"),f.DH("bytesLengthPadding"),f.O6(f.u8("byte"),f.cY(f.DH(),-8),"bytes")]),a=Wt.chunkSize;let c=0,l=i,u=[];for(;l.length>0;){const i=l.slice(0,a),d=o.Buffer.alloc(a+16);s.encode({instruction:0,offset:c,bytes:i,bytesLength:0,bytesLengthPadding:0},d);const h=(new pt).add({keys:[{pubkey:n.publicKey,isSigner:!0,isWritable:!0}],programId:r,data:d});if(u.push(It(e,h,[t,n],{commitment:"confirmed"})),e._rpcEndpoint.includes("solana.com")){const e=4;await Mt(1e3/e)}c+=a,l=l.slice(a)}await Promise.all(u);{const i=f.w3([f.DH("instruction")]),s=o.Buffer.alloc(i.span);i.encode({instruction:1},s);const a=(new pt).add({keys:[{pubkey:n.publicKey,isSigner:!0,isWritable:!0},{pubkey:_t,isSigner:!1,isWritable:!1}],programId:r,data:s}),c="processed",l=await e.sendTransaction(a,[t,n],{preflightCommitment:c}),{context:u,value:h}=await e.confirmTransaction({signature:l,lastValidBlockHeight:a.lastValidBlockHeight,blockhash:a.recentBlockhash},c);if(h.err)throw new Error("Transaction ".concat(l," failed (").concat(JSON.stringify(h),")"));for(;;){try{if(await e.getSlot({commitment:c})>u.slot)break}catch(d){}await new Promise(e=>setTimeout(e,Math.round(200)))}}return!0}}Wt.chunkSize=Ut;const qt=new Ue("BPFLoader2111111111111111111111111111111111");class Ht{static getMinNumSignatures(e){return Wt.getMinNumSignatures(e)}static load(e,t,n,r,i){return Wt.load(e,t,n,i,r)}}function Kt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vt,$t;function Gt(){if($t)return Vt;$t=1;var e=Object.prototype.toString,t=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function n(r,i){var o,s,a,c,l,u,d;if(!0===r)return"true";if(!1===r)return"false";switch(typeof r){case"object":if(null===r)return null;if(r.toJSON&&"function"===typeof r.toJSON)return n(r.toJSON(),i);if("[object Array]"===(d=e.call(r))){for(a="[",s=r.length-1,o=0;o<s;o++)a+=n(r[o],!0)+",";return s>-1&&(a+=n(r[o],!0)),a+"]"}if("[object Object]"===d){for(s=(c=t(r).sort()).length,a="",o=0;o<s;)void 0!==(u=n(r[l=c[o]],!1))&&(a&&(a+=","),a+=JSON.stringify(l)+":"+u),o++;return"{"+a+"}"}return JSON.stringify(r);case"function":case"undefined":return i?null:void 0;case"string":return JSON.stringify(r);default:return isFinite(r)?r:null}}return Vt=function(e){var t=n(e,!1);if(void 0!==t)return""+t}}var Zt=Kt(Gt());function Jt(e){let t=0;for(;e>1;)e/=2,t++;return t}class Yt{constructor(e,t,n,r,i){this.slotsPerEpoch=void 0,this.leaderScheduleSlotOffset=void 0,this.warmup=void 0,this.firstNormalEpoch=void 0,this.firstNormalSlot=void 0,this.slotsPerEpoch=e,this.leaderScheduleSlotOffset=t,this.warmup=n,this.firstNormalEpoch=r,this.firstNormalSlot=i}getEpoch(e){return this.getEpochAndSlotIndex(e)[0]}getEpochAndSlotIndex(e){if(e<this.firstNormalSlot){const n=Jt(0===(t=e+32+1)?1:(t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,1+(t|=t>>32)))-Jt(32)-1;return[n,e-(this.getSlotsInEpoch(n)-32)]}{const t=e-this.firstNormalSlot,n=Math.floor(t/this.slotsPerEpoch);return[this.firstNormalEpoch+n,t%this.slotsPerEpoch]}var t}getFirstSlotInEpoch(e){return e<=this.firstNormalEpoch?32*(Math.pow(2,e)-1):(e-this.firstNormalEpoch)*this.slotsPerEpoch+this.firstNormalSlot}getLastSlotInEpoch(e){return this.getFirstSlotInEpoch(e)+this.getSlotsInEpoch(e)-1}getSlotsInEpoch(e){return e<this.firstNormalEpoch?Math.pow(2,e+Jt(32)):this.slotsPerEpoch}}var Qt=globalThis.fetch;class Xt extends we{constructor(e,t,n){super(e=>{const n=ye(e,(0,i.A)({autoconnect:!0,max_reconnects:5,reconnect:!0,reconnect_interval:1e3},t));return this.underlyingSocket="socket"in n?n.socket:n,n},e,t,n),this.underlyingSocket=void 0}call(){var e;const t=null===(e=this.underlyingSocket)||void 0===e?void 0:e.readyState;return 1===t?super.call(...arguments):Promise.reject(new Error("Tried to call a JSON-RPC method `"+(arguments.length<=0?void 0:arguments[0])+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}notify(){var e;const t=null===(e=this.underlyingSocket)||void 0===e?void 0:e.readyState;return 1===t?super.notify(...arguments):Promise.reject(new Error("Tried to send a JSON-RPC notification `"+(arguments.length<=0?void 0:arguments[0])+"` but the socket was not `CONNECTING` or `OPEN` (`readyState` was "+t+")"))}}class en{constructor(e){this.key=void 0,this.state=void 0,this.key=e.key,this.state=e.state}isActive(){const e=BigInt("0xffffffffffffffff");return this.state.deactivationSlot===e}static deserialize(e){const t=function(e,t){let n;try{n=e.layout.decode(t)}catch(r){throw new Error("invalid instruction; "+r)}if(n.typeIndex!==e.index)throw new Error("invalid account data; account type mismatch ".concat(n.typeIndex," != ").concat(e.index));return n}(tn,e),n=e.length-56;rt(n>=0,"lookup table is invalid"),rt(n%32===0,"lookup table is invalid");const r=n/32,{addresses:i}=f.w3([f.O6(Ye(),r,"addresses")]).decode(e.slice(56));return{deactivationSlot:t.deactivationSlot,lastExtendedSlot:t.lastExtendedSlot,lastExtendedSlotStartIndex:t.lastExtendedStartIndex,authority:0!==t.authority.length?new Ue(t.authority[0]):void 0,addresses:i.map(e=>new Ue(e))}}}const tn={index:1,layout:f.w3([f.DH("typeIndex"),Lt("deactivationSlot"),f.I0("lastExtendedSlot"),f.u8("lastExtendedStartIndex"),f.u8(),f.O6(Ye(),f.cY(f.u8(),-1),"authority")])},nn=/^[^:]+:\/\/([^:[]+|\[[^\]]+\])(:\d+)?(.*)/i;const rn=he(ee(Ue),ae(),e=>new Ue(e)),on=ce([ae(),te("base64")]),sn=he(ee(o.Buffer),on,e=>o.Buffer.from(e[0],"base64")),an=3e4;function cn(e){let t,n;if("string"===typeof e)t=e;else if(e){const{commitment:i}=e;t=i,n=(0,r.A)(e,xe)}return{commitment:t,config:n}}function ln(e){return e.map(e=>{var t;return"memcmp"in e?(0,i.A)((0,i.A)({},e),{},{memcmp:(0,i.A)((0,i.A)({},e.memcmp),{},{encoding:null!==(t=e.memcmp.encoding)&&void 0!==t?t:"base58"})}):e})}function un(e){return ue([le({jsonrpc:te("2.0"),id:ae(),result:e}),le({jsonrpc:te("2.0"),id:ae(),error:le({code:de(),message:ae(),data:oe(Y("any",()=>!0))})})])}const dn=un(de());function hn(e){return he(un(e),dn,t=>"error"in t?t:(0,i.A)((0,i.A)({},t),{},{result:G(t.result,e)}))}function fn(e){return hn(le({context:le({slot:ie()}),value:e}))}function pn(e){return le({context:le({slot:ie()}),value:e})}function mn(e,t){return 0===e?new lt({header:t.header,staticAccountKeys:t.accountKeys.map(e=>new Ue(e)),recentBlockhash:t.recentBlockhash,compiledInstructions:t.instructions.map(e=>({programIdIndex:e.programIdIndex,accountKeyIndexes:e.accounts,data:u().decode(e.data)})),addressTableLookups:t.addressTableLookups}):new ct(t)}const gn=le({foundation:ie(),foundationTerm:ie(),initial:ie(),taper:ie(),terminal:ie()}),bn=hn(Q(re(le({epoch:ie(),effectiveSlot:ie(),amount:ie(),postBalance:ie(),commission:oe(re(ie()))})))),yn=Q(le({slot:ie(),prioritizationFee:ie()})),vn=le({total:ie(),validator:ie(),foundation:ie(),epoch:ie()}),wn=le({epoch:ie(),slotIndex:ie(),slotsInEpoch:ie(),absoluteSlot:ie(),blockHeight:oe(ie()),transactionCount:oe(ie())}),_n=le({slotsPerEpoch:ie(),leaderScheduleSlotOffset:ie(),warmup:X(),firstNormalEpoch:ie(),firstNormalSlot:ie()}),kn=se(ae(),Q(ie())),xn=re(ue([le({}),ae()])),Sn=le({err:xn}),En=te("receivedSignature"),An=le({"solana-core":ae(),"feature-set":oe(ie())}),Pn=le({program:ae(),programId:rn,parsed:de()}),Cn=le({programId:rn,accounts:Q(rn),data:ae()}),In=fn(le({err:re(ue([le({}),ae()])),logs:re(Q(ae())),accounts:oe(re(Q(re(le({executable:X(),owner:ae(),lamports:ie(),data:Q(ae()),rentEpoch:oe(ie())}))))),unitsConsumed:oe(ie()),returnData:oe(re(le({programId:ae(),data:ce([ae(),te("base64")])}))),innerInstructions:oe(re(Q(le({index:ie(),instructions:Q(ue([Pn,Cn]))}))))})),Mn=fn(le({byIdentity:se(ae(),Q(ie())),range:le({firstSlot:ie(),lastSlot:ie()})}));const Tn=hn(gn),On=hn(vn),Nn=hn(yn),Bn=hn(wn),Rn=hn(_n),jn=hn(kn),Ln=hn(ie()),Fn=fn(le({total:ie(),circulating:ie(),nonCirculating:ie(),nonCirculatingAccounts:Q(rn)})),zn=le({amount:ae(),uiAmount:re(ie()),decimals:ie(),uiAmountString:oe(ae())}),Dn=fn(Q(le({address:rn,amount:ae(),uiAmount:re(ie()),decimals:ie(),uiAmountString:oe(ae())}))),Un=fn(Q(le({pubkey:rn,account:le({executable:X(),owner:rn,lamports:ie(),data:sn,rentEpoch:ie()})}))),Wn=le({program:ae(),parsed:de(),space:ie()}),qn=fn(Q(le({pubkey:rn,account:le({executable:X(),owner:rn,lamports:ie(),data:Wn,rentEpoch:ie()})}))),Hn=fn(Q(le({lamports:ie(),address:rn}))),Kn=le({executable:X(),owner:rn,lamports:ie(),data:sn,rentEpoch:ie()}),Vn=le({pubkey:rn,account:Kn}),$n=he(ue([ee(o.Buffer),Wn]),ue([on,Wn]),e=>Array.isArray(e)?G(e,sn):e),Gn=le({executable:X(),owner:rn,lamports:ie(),data:$n,rentEpoch:ie()}),Zn=le({pubkey:rn,account:Gn}),Jn=le({state:ue([te("active"),te("inactive"),te("activating"),te("deactivating")]),active:ie(),inactive:ie()}),Yn=hn(Q(le({signature:ae(),slot:ie(),err:xn,memo:re(ae()),blockTime:oe(re(ie()))}))),Qn=hn(Q(le({signature:ae(),slot:ie(),err:xn,memo:re(ae()),blockTime:oe(re(ie()))}))),Xn=le({subscription:ie(),result:pn(Kn)}),er=le({pubkey:rn,account:Kn}),tr=le({subscription:ie(),result:pn(er)}),nr=le({parent:ie(),slot:ie(),root:ie()}),rr=le({subscription:ie(),result:nr}),ir=ue([le({type:ue([te("firstShredReceived"),te("completed"),te("optimisticConfirmation"),te("root")]),slot:ie(),timestamp:ie()}),le({type:te("createdBank"),parent:ie(),slot:ie(),timestamp:ie()}),le({type:te("frozen"),slot:ie(),timestamp:ie(),stats:le({numTransactionEntries:ie(),numSuccessfulTransactions:ie(),numFailedTransactions:ie(),maxTransactionsPerEntry:ie()})}),le({type:te("dead"),slot:ie(),timestamp:ie(),err:ae()})]),or=le({subscription:ie(),result:ir}),sr=le({subscription:ie(),result:pn(ue([Sn,En]))}),ar=le({subscription:ie(),result:ie()}),cr=le({pubkey:ae(),gossip:re(ae()),tpu:re(ae()),rpc:re(ae()),version:re(ae())}),lr=le({votePubkey:ae(),nodePubkey:ae(),activatedStake:ie(),epochVoteAccount:X(),epochCredits:Q(ce([ie(),ie(),ie()])),commission:ie(),lastVote:ie(),rootSlot:re(ie())}),ur=hn(le({current:Q(lr),delinquent:Q(lr)})),dr=ue([te("processed"),te("confirmed"),te("finalized")]),hr=le({slot:ie(),confirmations:re(ie()),err:xn,confirmationStatus:oe(dr)}),fr=fn(Q(re(hr))),pr=hn(ie()),mr=le({accountKey:rn,writableIndexes:Q(ie()),readonlyIndexes:Q(ie())}),gr=le({signatures:Q(ae()),message:le({accountKeys:Q(ae()),header:le({numRequiredSignatures:ie(),numReadonlySignedAccounts:ie(),numReadonlyUnsignedAccounts:ie()}),instructions:Q(le({accounts:Q(ie()),data:ae(),programIdIndex:ie()})),recentBlockhash:ae(),addressTableLookups:oe(Q(mr))})}),br=le({pubkey:rn,signer:X(),writable:X(),source:oe(ue([te("transaction"),te("lookupTable")]))}),yr=le({accountKeys:Q(br),signatures:Q(ae())}),vr=le({parsed:de(),program:ae(),programId:rn}),wr=le({accounts:Q(rn),data:ae(),programId:rn}),_r=he(ue([wr,vr]),ue([le({parsed:de(),program:ae(),programId:ae()}),le({accounts:Q(ae()),data:ae(),programId:ae()})]),e=>G(e,"accounts"in e?wr:vr)),kr=le({signatures:Q(ae()),message:le({accountKeys:Q(br),instructions:Q(_r),recentBlockhash:ae(),addressTableLookups:oe(re(Q(mr)))})}),xr=le({accountIndex:ie(),mint:ae(),owner:oe(ae()),programId:oe(ae()),uiTokenAmount:zn}),Sr=le({writable:Q(rn),readonly:Q(rn)}),Er=le({err:xn,fee:ie(),innerInstructions:oe(re(Q(le({index:ie(),instructions:Q(le({accounts:Q(ie()),data:ae(),programIdIndex:ie()}))})))),preBalances:Q(ie()),postBalances:Q(ie()),logMessages:oe(re(Q(ae()))),preTokenBalances:oe(re(Q(xr))),postTokenBalances:oe(re(Q(xr))),loadedAddresses:oe(Sr),computeUnitsConsumed:oe(ie()),costUnits:oe(ie())}),Ar=le({err:xn,fee:ie(),innerInstructions:oe(re(Q(le({index:ie(),instructions:Q(_r)})))),preBalances:Q(ie()),postBalances:Q(ie()),logMessages:oe(re(Q(ae()))),preTokenBalances:oe(re(Q(xr))),postTokenBalances:oe(re(Q(xr))),loadedAddresses:oe(Sr),computeUnitsConsumed:oe(ie()),costUnits:oe(ie())}),Pr=ue([te(0),te("legacy")]),Cr=le({pubkey:ae(),lamports:ie(),postBalance:re(ie()),rewardType:re(ae()),commission:oe(re(ie()))}),Ir=hn(re(le({blockhash:ae(),previousBlockhash:ae(),parentSlot:ie(),transactions:Q(le({transaction:gr,meta:re(Er),version:oe(Pr)})),rewards:oe(Q(Cr)),blockTime:re(ie()),blockHeight:re(ie())}))),Mr=hn(re(le({blockhash:ae(),previousBlockhash:ae(),parentSlot:ie(),rewards:oe(Q(Cr)),blockTime:re(ie()),blockHeight:re(ie())}))),Tr=hn(re(le({blockhash:ae(),previousBlockhash:ae(),parentSlot:ie(),transactions:Q(le({transaction:yr,meta:re(Er),version:oe(Pr)})),rewards:oe(Q(Cr)),blockTime:re(ie()),blockHeight:re(ie())}))),Or=hn(re(le({blockhash:ae(),previousBlockhash:ae(),parentSlot:ie(),transactions:Q(le({transaction:kr,meta:re(Ar),version:oe(Pr)})),rewards:oe(Q(Cr)),blockTime:re(ie()),blockHeight:re(ie())}))),Nr=hn(re(le({blockhash:ae(),previousBlockhash:ae(),parentSlot:ie(),transactions:Q(le({transaction:yr,meta:re(Ar),version:oe(Pr)})),rewards:oe(Q(Cr)),blockTime:re(ie()),blockHeight:re(ie())}))),Br=hn(re(le({blockhash:ae(),previousBlockhash:ae(),parentSlot:ie(),rewards:oe(Q(Cr)),blockTime:re(ie()),blockHeight:re(ie())}))),Rr=hn(re(le({blockhash:ae(),previousBlockhash:ae(),parentSlot:ie(),transactions:Q(le({transaction:gr,meta:re(Er)})),rewards:oe(Q(Cr)),blockTime:re(ie())}))),jr=hn(re(le({blockhash:ae(),previousBlockhash:ae(),parentSlot:ie(),signatures:Q(ae()),blockTime:re(ie())}))),Lr=hn(re(le({slot:ie(),meta:re(Er),blockTime:oe(re(ie())),transaction:gr,version:oe(Pr)}))),Fr=hn(re(le({slot:ie(),transaction:kr,meta:re(Ar),blockTime:oe(re(ie())),version:oe(Pr)}))),zr=fn(le({blockhash:ae(),lastValidBlockHeight:ie()})),Dr=fn(X()),Ur=hn(Q(le({slot:ie(),numTransactions:ie(),numSlots:ie(),samplePeriodSecs:ie()}))),Wr=fn(re(le({feeCalculator:le({lamportsPerSignature:ie()})}))),qr=hn(ae()),Hr=hn(ae()),Kr=le({err:xn,logs:Q(ae()),signature:ae()}),Vr=le({result:pn(Kr),subscription:ie()}),$r={"solana-client":"js/".concat("1.0.0-maintenance")};class Gr{constructor(e,t){let n,r,i,o,s,a;var c;this._commitment=void 0,this._confirmTransactionInitialTimeout=void 0,this._rpcEndpoint=void 0,this._rpcWsEndpoint=void 0,this._rpcClient=void 0,this._rpcRequest=void 0,this._rpcBatchRequest=void 0,this._rpcWebSocket=void 0,this._rpcWebSocketConnected=!1,this._rpcWebSocketHeartbeat=null,this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketGeneration=0,this._disableBlockhashCaching=!1,this._pollingBlockhash=!1,this._blockhashInfo={latestBlockhash:null,lastFetch:0,transactionSignatures:[],simulatedSignatures:[]},this._nextClientSubscriptionId=0,this._subscriptionDisposeFunctionsByClientSubscriptionId={},this._subscriptionHashByClientSubscriptionId={},this._subscriptionStateChangeCallbacksByHash={},this._subscriptionCallbacksByServerSubscriptionId={},this._subscriptionsByHash={},this._subscriptionsAutoDisposedByRpc=new Set,this.getBlockHeight=(()=>{const e={};return async t=>{var n;const{commitment:r,config:i}=cn(t),o=this._buildArgs([],r,void 0,i),s=Zt(o);return e[s]=null!==(n=e[s])&&void 0!==n?n:(async()=>{try{const e=G(await this._rpcRequest("getBlockHeight",o),hn(ie()));if("error"in e)throw new Ct(e.error,"failed to get block height information");return e.result}finally{delete e[s]}})(),await e[s]}})(),t&&"string"===typeof t?this._commitment=t:t&&(this._commitment=t.commitment,this._confirmTransactionInitialTimeout=t.confirmTransactionInitialTimeout,n=t.wsEndpoint,r=t.httpHeaders,i=t.fetch,o=t.fetchMiddleware,s=t.disableRetryOnRateLimit,a=t.httpAgent),this._rpcEndpoint=function(e){if(!1===/^https?:/.test(e))throw new TypeError("Endpoint URL must start with `http:` or `https:`.");return e}(e),this._rpcWsEndpoint=n||function(e){const t=e.match(nn);if(null==t)throw TypeError("Failed to validate endpoint URL `".concat(e,"`"));const[n,r,i,o]=t,s=e.startsWith("https:")?"wss:":"ws:",a=null==i?null:parseInt(i.slice(1),10),c=null==a?"":":".concat(a+1);return"".concat(s,"//").concat(r).concat(c).concat(o)}(e),this._rpcClient=function(e,t,n,r,i,o){const s=n||Qt;let a;return null!=o&&console.warn("You have supplied an `httpAgent` when creating a `Connection` in a browser environment.It has been ignored; `httpAgent` is only used in Node environments."),r&&(a=async(e,t)=>{const n=await new Promise((n,i)=>{try{r(e,t,(e,t)=>n([e,t]))}catch(o){i(o)}});return await s(...n)}),new(pe())(async(n,r)=>{const o={method:"POST",body:n,agent:void 0,headers:Object.assign({"Content-Type":"application/json"},t||{},$r)};try{let t,n=5,c=500;for(;t=a?await a(e,o):await s(e,o),429===t.status&&!0!==i&&(n-=1,0!==n);)console.error("Server responded with ".concat(t.status," ").concat(t.statusText,". Retrying after ").concat(c,"ms delay...")),await Mt(c),c*=2;const l=await t.text();t.ok?r(null,l):r(new Error("".concat(t.status," ").concat(t.statusText,": ").concat(l)))}catch(c){c instanceof Error&&r(c)}},{})}(e,r,i,o,s,a),this._rpcRequest=(c=this._rpcClient,(e,t)=>new Promise((n,r)=>{c.request(e,t,(e,t)=>{e?r(e):n(t)})})),this._rpcBatchRequest=function(e){return t=>new Promise((n,r)=>{0===t.length&&n([]);const i=t.map(t=>e.request(t.methodName,t.args));e.request(i,(e,t)=>{e?r(e):n(t)})})}(this._rpcClient),this._rpcWebSocket=new Xt(this._rpcWsEndpoint,{autoconnect:!1,max_reconnects:1/0}),this._rpcWebSocket.on("open",this._wsOnOpen.bind(this)),this._rpcWebSocket.on("error",this._wsOnError.bind(this)),this._rpcWebSocket.on("close",this._wsOnClose.bind(this)),this._rpcWebSocket.on("accountNotification",this._wsOnAccountNotification.bind(this)),this._rpcWebSocket.on("programNotification",this._wsOnProgramAccountNotification.bind(this)),this._rpcWebSocket.on("slotNotification",this._wsOnSlotNotification.bind(this)),this._rpcWebSocket.on("slotsUpdatesNotification",this._wsOnSlotUpdatesNotification.bind(this)),this._rpcWebSocket.on("signatureNotification",this._wsOnSignatureNotification.bind(this)),this._rpcWebSocket.on("rootNotification",this._wsOnRootNotification.bind(this)),this._rpcWebSocket.on("logsNotification",this._wsOnLogsNotification.bind(this))}get commitment(){return this._commitment}get rpcEndpoint(){return this._rpcEndpoint}async getBalanceAndContext(e,t){const{commitment:n,config:r}=cn(t),i=this._buildArgs([e.toBase58()],n,void 0,r),o=G(await this._rpcRequest("getBalance",i),fn(ie()));if("error"in o)throw new Ct(o.error,"failed to get balance for ".concat(e.toBase58()));return o.result}async getBalance(e,t){return await this.getBalanceAndContext(e,t).then(e=>e.value).catch(t=>{throw new Error("failed to get balance of account "+e.toBase58()+": "+t)})}async getBlockTime(e){const t=G(await this._rpcRequest("getBlockTime",[e]),hn(re(ie())));if("error"in t)throw new Ct(t.error,"failed to get block time for slot ".concat(e));return t.result}async getMinimumLedgerSlot(){const e=G(await this._rpcRequest("minimumLedgerSlot",[]),hn(ie()));if("error"in e)throw new Ct(e.error,"failed to get minimum ledger slot");return e.result}async getFirstAvailableBlock(){const e=G(await this._rpcRequest("getFirstAvailableBlock",[]),Ln);if("error"in e)throw new Ct(e.error,"failed to get first available block");return e.result}async getSupply(e){let t={};t="string"===typeof e?{commitment:e}:e?(0,i.A)((0,i.A)({},e),{},{commitment:e&&e.commitment||this.commitment}):{commitment:this.commitment};const n=G(await this._rpcRequest("getSupply",[t]),Fn);if("error"in n)throw new Ct(n.error,"failed to get supply");return n.result}async getTokenSupply(e,t){const n=this._buildArgs([e.toBase58()],t),r=G(await this._rpcRequest("getTokenSupply",n),fn(zn));if("error"in r)throw new Ct(r.error,"failed to get token supply");return r.result}async getTokenAccountBalance(e,t){const n=this._buildArgs([e.toBase58()],t),r=G(await this._rpcRequest("getTokenAccountBalance",n),fn(zn));if("error"in r)throw new Ct(r.error,"failed to get token account balance");return r.result}async getTokenAccountsByOwner(e,t,n){const{commitment:r,config:i}=cn(n);let o=[e.toBase58()];"mint"in t?o.push({mint:t.mint.toBase58()}):o.push({programId:t.programId.toBase58()});const s=this._buildArgs(o,r,"base64",i),a=G(await this._rpcRequest("getTokenAccountsByOwner",s),Un);if("error"in a)throw new Ct(a.error,"failed to get token accounts owned by account ".concat(e.toBase58()));return a.result}async getParsedTokenAccountsByOwner(e,t,n){let r=[e.toBase58()];"mint"in t?r.push({mint:t.mint.toBase58()}):r.push({programId:t.programId.toBase58()});const i=this._buildArgs(r,n,"jsonParsed"),o=G(await this._rpcRequest("getTokenAccountsByOwner",i),qn);if("error"in o)throw new Ct(o.error,"failed to get token accounts owned by account ".concat(e.toBase58()));return o.result}async getLargestAccounts(e){const t=(0,i.A)((0,i.A)({},e),{},{commitment:e&&e.commitment||this.commitment}),n=t.filter||t.commitment?[t]:[],r=G(await this._rpcRequest("getLargestAccounts",n),Hn);if("error"in r)throw new Ct(r.error,"failed to get largest accounts");return r.result}async getTokenLargestAccounts(e,t){const n=this._buildArgs([e.toBase58()],t),r=G(await this._rpcRequest("getTokenLargestAccounts",n),Dn);if("error"in r)throw new Ct(r.error,"failed to get token largest accounts");return r.result}async getAccountInfoAndContext(e,t){const{commitment:n,config:r}=cn(t),i=this._buildArgs([e.toBase58()],n,"base64",r),o=G(await this._rpcRequest("getAccountInfo",i),fn(re(Kn)));if("error"in o)throw new Ct(o.error,"failed to get info about account ".concat(e.toBase58()));return o.result}async getParsedAccountInfo(e,t){const{commitment:n,config:r}=cn(t),i=this._buildArgs([e.toBase58()],n,"jsonParsed",r),o=G(await this._rpcRequest("getAccountInfo",i),fn(re(Gn)));if("error"in o)throw new Ct(o.error,"failed to get info about account ".concat(e.toBase58()));return o.result}async getAccountInfo(e,t){try{return(await this.getAccountInfoAndContext(e,t)).value}catch(n){throw new Error("failed to get info about account "+e.toBase58()+": "+n)}}async getMultipleParsedAccounts(e,t){const{commitment:n,config:r}=cn(t),i=e.map(e=>e.toBase58()),o=this._buildArgs([i],n,"jsonParsed",r),s=G(await this._rpcRequest("getMultipleAccounts",o),fn(Q(re(Gn))));if("error"in s)throw new Ct(s.error,"failed to get info for accounts ".concat(i));return s.result}async getMultipleAccountsInfoAndContext(e,t){const{commitment:n,config:r}=cn(t),i=e.map(e=>e.toBase58()),o=this._buildArgs([i],n,"base64",r),s=G(await this._rpcRequest("getMultipleAccounts",o),fn(Q(re(Kn))));if("error"in s)throw new Ct(s.error,"failed to get info for accounts ".concat(i));return s.result}async getMultipleAccountsInfo(e,t){return(await this.getMultipleAccountsInfoAndContext(e,t)).value}async getStakeActivation(e,t,n){const{commitment:r,config:o}=cn(t),s=this._buildArgs([e.toBase58()],r,void 0,(0,i.A)((0,i.A)({},o),{},{epoch:null!=n?n:null===o||void 0===o?void 0:o.epoch})),a=G(await this._rpcRequest("getStakeActivation",s),hn(Jn));if("error"in a)throw new Ct(a.error,"failed to get Stake Activation ".concat(e.toBase58()));return a.result}async getProgramAccounts(e,t){const{commitment:n,config:o}=cn(t),s=o||{},{encoding:a}=s,c=(0,r.A)(s,Se),l=this._buildArgs([e.toBase58()],n,a||"base64",(0,i.A)((0,i.A)({},c),c.filters?{filters:ln(c.filters)}:null)),u=await this._rpcRequest("getProgramAccounts",l),d=Q(Vn),h=!0===c.withContext?G(u,fn(d)):G(u,hn(d));if("error"in h)throw new Ct(h.error,"failed to get accounts owned by program ".concat(e.toBase58()));return h.result}async getParsedProgramAccounts(e,t){const{commitment:n,config:r}=cn(t),i=this._buildArgs([e.toBase58()],n,"jsonParsed",r),o=G(await this._rpcRequest("getProgramAccounts",i),hn(Q(Zn)));if("error"in o)throw new Ct(o.error,"failed to get accounts owned by program ".concat(e.toBase58()));return o.result}async confirmTransaction(e,t){let n,r;if("string"==typeof e)n=e;else{var i;const t=e;if(null!==(i=t.abortSignal)&&void 0!==i&&i.aborted)return Promise.reject(t.abortSignal.reason);n=t.signature}try{r=u().decode(n)}catch(o){throw new Error("signature must be base58 encoded: "+n)}return rt(64===r.length,"signature has invalid length"),"string"===typeof e?await this.confirmTransactionUsingLegacyTimeoutStrategy({commitment:t||this.commitment,signature:n}):"lastValidBlockHeight"in e?await this.confirmTransactionUsingBlockHeightExceedanceStrategy({commitment:t||this.commitment,strategy:e}):await this.confirmTransactionUsingDurableNonceStrategy({commitment:t||this.commitment,strategy:e})}getCancellationPromise(e){return new Promise((t,n)=>{null!=e&&(e.aborted?n(e.reason):e.addEventListener("abort",()=>{n(e.reason)}))})}getTransactionConfirmationPromise(e){let t,n,{commitment:r,signature:i}=e,o=!1;return{abortConfirmation:()=>{n&&(n(),n=void 0),null!=t&&(this.removeSignatureListener(t),t=void 0)},confirmationPromise:new Promise((e,s)=>{try{t=this.onSignature(i,(n,r)=>{t=void 0;const i={context:r,value:n};e({__type:dt.PROCESSED,response:i})},r);const a=new Promise(e=>{null==t?e():n=this._onSubscriptionStateChange(t,t=>{"subscribed"===t&&e()})});(async()=>{if(await a,o)return;const t=await this.getSignatureStatus(i);if(o)return;if(null==t)return;const{context:n,value:c}=t;if(null!=c)if(null!==c&&void 0!==c&&c.err)s(c.err);else{switch(r){case"confirmed":case"single":case"singleGossip":if("processed"===c.confirmationStatus)return;break;case"finalized":case"max":case"root":if("processed"===c.confirmationStatus||"confirmed"===c.confirmationStatus)return}o=!0,e({__type:dt.PROCESSED,response:{context:n,value:c}})}})()}catch(a){s(a)}})}}async confirmTransactionUsingBlockHeightExceedanceStrategy(e){let{commitment:t,strategy:{abortSignal:n,lastValidBlockHeight:r,signature:i}}=e,o=!1;const s=new Promise(e=>{const n=async()=>{try{return await this.getBlockHeight(t)}catch(e){return-1}};(async()=>{let t=await n();if(!o){for(;t<=r;){if(await Mt(1e3),o)return;if(t=await n(),o)return}e({__type:dt.BLOCKHEIGHT_EXCEEDED})}})()}),{abortConfirmation:a,confirmationPromise:c}=this.getTransactionConfirmationPromise({commitment:t,signature:i}),l=this.getCancellationPromise(n);let u;try{const e=await Promise.race([l,c,s]);if(e.__type!==dt.PROCESSED)throw new $e(i);u=e.response}finally{o=!0,a()}return u}async confirmTransactionUsingDurableNonceStrategy(e){let{commitment:t,strategy:{abortSignal:n,minContextSlot:r,nonceAccountPubkey:i,nonceValue:o,signature:s}}=e,a=!1;const c=new Promise(e=>{let n=o,s=null;const c=async()=>{try{const{context:e,value:n}=await this.getNonceAndContext(i,{commitment:t,minContextSlot:r});return s=e.slot,null===n||void 0===n?void 0:n.nonce}catch(e){return n}};(async()=>{if(n=await c(),!a)for(;;){if(o!==n)return void e({__type:dt.NONCE_INVALID,slotInWhichNonceDidAdvance:s});if(await Mt(2e3),a)return;if(n=await c(),a)return}})()}),{abortConfirmation:l,confirmationPromise:u}=this.getTransactionConfirmationPromise({commitment:t,signature:s}),d=this.getCancellationPromise(n);let h;try{const e=await Promise.race([d,u,c]);if(e.__type===dt.PROCESSED)h=e.response;else{var f;let n;for(;;){var p;const t=await this.getSignatureStatus(s);if(null==t)break;if(!(t.context.slot<(null!==(p=e.slotInWhichNonceDidAdvance)&&void 0!==p?p:r))){n=t;break}await Mt(400)}if(null===(f=n)||void 0===f||!f.value)throw new Ze(s);{const e=t||"finalized",{confirmationStatus:r}=n.value;switch(e){case"processed":case"recent":if("processed"!==r&&"confirmed"!==r&&"finalized"!==r)throw new Ze(s);break;case"confirmed":case"single":case"singleGossip":if("confirmed"!==r&&"finalized"!==r)throw new Ze(s);break;case"finalized":case"max":case"root":if("finalized"!==r)throw new Ze(s)}h={context:n.context,value:{err:n.value.err}}}}}finally{a=!0,l()}return h}async confirmTransactionUsingLegacyTimeoutStrategy(e){let t,{commitment:n,signature:r}=e;const i=new Promise(e=>{let r=this._confirmTransactionInitialTimeout||6e4;switch(n){case"processed":case"recent":case"single":case"confirmed":case"singleGossip":r=this._confirmTransactionInitialTimeout||3e4}t=setTimeout(()=>e({__type:dt.TIMED_OUT,timeoutMs:r}),r)}),{abortConfirmation:o,confirmationPromise:s}=this.getTransactionConfirmationPromise({commitment:n,signature:r});let a;try{const e=await Promise.race([s,i]);if(e.__type!==dt.PROCESSED)throw new Ge(r,e.timeoutMs/1e3);a=e.response}finally{clearTimeout(t),o()}return a}async getClusterNodes(){const e=G(await this._rpcRequest("getClusterNodes",[]),hn(Q(cr)));if("error"in e)throw new Ct(e.error,"failed to get cluster nodes");return e.result}async getVoteAccounts(e){const t=this._buildArgs([],e),n=G(await this._rpcRequest("getVoteAccounts",t),ur);if("error"in n)throw new Ct(n.error,"failed to get vote accounts");return n.result}async getSlot(e){const{commitment:t,config:n}=cn(e),r=this._buildArgs([],t,void 0,n),i=G(await this._rpcRequest("getSlot",r),hn(ie()));if("error"in i)throw new Ct(i.error,"failed to get slot");return i.result}async getSlotLeader(e){const{commitment:t,config:n}=cn(e),r=this._buildArgs([],t,void 0,n),i=G(await this._rpcRequest("getSlotLeader",r),hn(ae()));if("error"in i)throw new Ct(i.error,"failed to get slot leader");return i.result}async getSlotLeaders(e,t){const n=[e,t],r=G(await this._rpcRequest("getSlotLeaders",n),hn(Q(rn)));if("error"in r)throw new Ct(r.error,"failed to get slot leaders");return r.result}async getSignatureStatus(e,t){const{context:n,value:r}=await this.getSignatureStatuses([e],t);rt(1===r.length);return{context:n,value:r[0]}}async getSignatureStatuses(e,t){const n=[e];t&&n.push(t);const r=G(await this._rpcRequest("getSignatureStatuses",n),fr);if("error"in r)throw new Ct(r.error,"failed to get signature status");return r.result}async getTransactionCount(e){const{commitment:t,config:n}=cn(e),r=this._buildArgs([],t,void 0,n),i=G(await this._rpcRequest("getTransactionCount",r),hn(ie()));if("error"in i)throw new Ct(i.error,"failed to get transaction count");return i.result}async getTotalSupply(e){return(await this.getSupply({commitment:e,excludeNonCirculatingAccountsList:!0})).value.total}async getInflationGovernor(e){const t=this._buildArgs([],e),n=G(await this._rpcRequest("getInflationGovernor",t),Tn);if("error"in n)throw new Ct(n.error,"failed to get inflation");return n.result}async getInflationReward(e,t,n){const{commitment:r,config:o}=cn(n),s=this._buildArgs([e.map(e=>e.toBase58())],r,void 0,(0,i.A)((0,i.A)({},o),{},{epoch:null!=t?t:null===o||void 0===o?void 0:o.epoch})),a=G(await this._rpcRequest("getInflationReward",s),bn);if("error"in a)throw new Ct(a.error,"failed to get inflation reward");return a.result}async getInflationRate(){const e=G(await this._rpcRequest("getInflationRate",[]),On);if("error"in e)throw new Ct(e.error,"failed to get inflation rate");return e.result}async getEpochInfo(e){const{commitment:t,config:n}=cn(e),r=this._buildArgs([],t,void 0,n),i=G(await this._rpcRequest("getEpochInfo",r),Bn);if("error"in i)throw new Ct(i.error,"failed to get epoch info");return i.result}async getEpochSchedule(){const e=G(await this._rpcRequest("getEpochSchedule",[]),Rn);if("error"in e)throw new Ct(e.error,"failed to get epoch schedule");const t=e.result;return new Yt(t.slotsPerEpoch,t.leaderScheduleSlotOffset,t.warmup,t.firstNormalEpoch,t.firstNormalSlot)}async getLeaderSchedule(){const e=G(await this._rpcRequest("getLeaderSchedule",[]),jn);if("error"in e)throw new Ct(e.error,"failed to get leader schedule");return e.result}async getMinimumBalanceForRentExemption(e,t){const n=this._buildArgs([e],t),r=G(await this._rpcRequest("getMinimumBalanceForRentExemption",n),pr);return"error"in r?(console.warn("Unable to fetch minimum balance for rent exemption"),0):r.result}async getRecentBlockhashAndContext(e){const{context:t,value:{blockhash:n}}=await this.getLatestBlockhashAndContext(e);return{context:t,value:{blockhash:n,feeCalculator:{get lamportsPerSignature(){throw new Error("The capability to fetch `lamportsPerSignature` using the `getRecentBlockhash` API is no longer offered by the network. Use the `getFeeForMessage` API to obtain the fee for a given message.")},toJSON:()=>({})}}}}async getRecentPerformanceSamples(e){const t=G(await this._rpcRequest("getRecentPerformanceSamples",e?[e]:[]),Ur);if("error"in t)throw new Ct(t.error,"failed to get recent performance samples");return t.result}async getFeeCalculatorForBlockhash(e,t){const n=this._buildArgs([e],t),r=G(await this._rpcRequest("getFeeCalculatorForBlockhash",n),Wr);if("error"in r)throw new Ct(r.error,"failed to get fee calculator");const{context:i,value:o}=r.result;return{context:i,value:null!==o?o.feeCalculator:null}}async getFeeForMessage(e,t){const n=Ne(e.serialize()).toString("base64"),r=this._buildArgs([n],t),i=G(await this._rpcRequest("getFeeForMessage",r),fn(re(ie())));if("error"in i)throw new Ct(i.error,"failed to get fee for message");if(null===i.result)throw new Error("invalid blockhash");return i.result}async getRecentPrioritizationFees(e){var t;const n=null===e||void 0===e||null===(t=e.lockedWritableAccounts)||void 0===t?void 0:t.map(e=>e.toBase58()),r=null!==n&&void 0!==n&&n.length?[n]:[],i=G(await this._rpcRequest("getRecentPrioritizationFees",r),Nn);if("error"in i)throw new Ct(i.error,"failed to get recent prioritization fees");return i.result}async getRecentBlockhash(e){try{return(await this.getRecentBlockhashAndContext(e)).value}catch(t){throw new Error("failed to get recent blockhash: "+t)}}async getLatestBlockhash(e){try{return(await this.getLatestBlockhashAndContext(e)).value}catch(t){throw new Error("failed to get recent blockhash: "+t)}}async getLatestBlockhashAndContext(e){const{commitment:t,config:n}=cn(e),r=this._buildArgs([],t,void 0,n),i=G(await this._rpcRequest("getLatestBlockhash",r),zr);if("error"in i)throw new Ct(i.error,"failed to get latest blockhash");return i.result}async isBlockhashValid(e,t){const{commitment:n,config:r}=cn(t),i=this._buildArgs([e],n,void 0,r),o=G(await this._rpcRequest("isBlockhashValid",i),Dr);if("error"in o)throw new Ct(o.error,"failed to determine if the blockhash `"+e+"`is valid");return o.result}async getVersion(){const e=G(await this._rpcRequest("getVersion",[]),hn(An));if("error"in e)throw new Ct(e.error,"failed to get version");return e.result}async getGenesisHash(){const e=G(await this._rpcRequest("getGenesisHash",[]),hn(ae()));if("error"in e)throw new Ct(e.error,"failed to get genesis hash");return e.result}async getBlock(e,t){const{commitment:n,config:r}=cn(t),o=this._buildArgsAtLeastConfirmed([e],n,void 0,r),s=await this._rpcRequest("getBlock",o);try{switch(null===r||void 0===r?void 0:r.transactionDetails){case"accounts":{const e=G(s,Tr);if("error"in e)throw e.error;return e.result}case"none":{const e=G(s,Mr);if("error"in e)throw e.error;return e.result}default:{const e=G(s,Ir);if("error"in e)throw e.error;const{result:t}=e;return t?(0,i.A)((0,i.A)({},t),{},{transactions:t.transactions.map(e=>{let{transaction:t,meta:n,version:r}=e;return{meta:n,transaction:(0,i.A)((0,i.A)({},t),{},{message:mn(r,t.message)}),version:r}})}):null}}}catch(a){throw new Ct(a,"failed to get confirmed block")}}async getParsedBlock(e,t){const{commitment:n,config:r}=cn(t),i=this._buildArgsAtLeastConfirmed([e],n,"jsonParsed",r),o=await this._rpcRequest("getBlock",i);try{switch(null===r||void 0===r?void 0:r.transactionDetails){case"accounts":{const e=G(o,Nr);if("error"in e)throw e.error;return e.result}case"none":{const e=G(o,Br);if("error"in e)throw e.error;return e.result}default:{const e=G(o,Or);if("error"in e)throw e.error;return e.result}}}catch(s){throw new Ct(s,"failed to get block")}}async getBlockProduction(e){let t,n;if("string"===typeof e)n=e;else if(e){const{commitment:i}=e;n=i,t=(0,r.A)(e,Ee)}const i=this._buildArgs([],n,"base64",t),o=G(await this._rpcRequest("getBlockProduction",i),Mn);if("error"in o)throw new Ct(o.error,"failed to get block production information");return o.result}async getTransaction(e,t){const{commitment:n,config:r}=cn(t),o=this._buildArgsAtLeastConfirmed([e],n,void 0,r),s=G(await this._rpcRequest("getTransaction",o),Lr);if("error"in s)throw new Ct(s.error,"failed to get transaction");const a=s.result;return a?(0,i.A)((0,i.A)({},a),{},{transaction:(0,i.A)((0,i.A)({},a.transaction),{},{message:mn(a.version,a.transaction.message)})}):a}async getParsedTransaction(e,t){const{commitment:n,config:r}=cn(t),i=this._buildArgsAtLeastConfirmed([e],n,"jsonParsed",r),o=G(await this._rpcRequest("getTransaction",i),Fr);if("error"in o)throw new Ct(o.error,"failed to get transaction");return o.result}async getParsedTransactions(e,t){const{commitment:n,config:r}=cn(t),i=e.map(e=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([e],n,"jsonParsed",r)}));return(await this._rpcBatchRequest(i)).map(e=>{const t=G(e,Fr);if("error"in t)throw new Ct(t.error,"failed to get transactions");return t.result})}async getTransactions(e,t){const{commitment:n,config:r}=cn(t),o=e.map(e=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([e],n,void 0,r)}));return(await this._rpcBatchRequest(o)).map(e=>{const t=G(e,Lr);if("error"in t)throw new Ct(t.error,"failed to get transactions");const n=t.result;return n?(0,i.A)((0,i.A)({},n),{},{transaction:(0,i.A)((0,i.A)({},n.transaction),{},{message:mn(n.version,n.transaction.message)})}):n})}async getConfirmedBlock(e,t){const n=this._buildArgsAtLeastConfirmed([e],t),r=G(await this._rpcRequest("getBlock",n),Rr);if("error"in r)throw new Ct(r.error,"failed to get confirmed block");const o=r.result;if(!o)throw new Error("Confirmed block "+e+" not found");const s=(0,i.A)((0,i.A)({},o),{},{transactions:o.transactions.map(e=>{let{transaction:t,meta:n}=e;const r=new ct(t.message);return{meta:n,transaction:(0,i.A)((0,i.A)({},t),{},{message:r})}})});return(0,i.A)((0,i.A)({},s),{},{transactions:s.transactions.map(e=>{let{transaction:t,meta:n}=e;return{meta:n,transaction:pt.populate(t.message,t.signatures)}})})}async getBlocks(e,t,n){const r=this._buildArgsAtLeastConfirmed(void 0!==t?[e,t]:[e],n),i=G(await this._rpcRequest("getBlocks",r),hn(Q(ie())));if("error"in i)throw new Ct(i.error,"failed to get blocks");return i.result}async getBlockSignatures(e,t){const n=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),r=G(await this._rpcRequest("getBlock",n),jr);if("error"in r)throw new Ct(r.error,"failed to get block");const i=r.result;if(!i)throw new Error("Block "+e+" not found");return i}async getConfirmedBlockSignatures(e,t){const n=this._buildArgsAtLeastConfirmed([e],t,void 0,{transactionDetails:"signatures",rewards:!1}),r=G(await this._rpcRequest("getBlock",n),jr);if("error"in r)throw new Ct(r.error,"failed to get confirmed block");const i=r.result;if(!i)throw new Error("Confirmed block "+e+" not found");return i}async getConfirmedTransaction(e,t){const n=this._buildArgsAtLeastConfirmed([e],t),r=G(await this._rpcRequest("getTransaction",n),Lr);if("error"in r)throw new Ct(r.error,"failed to get transaction");const o=r.result;if(!o)return o;const s=new ct(o.transaction.message),a=o.transaction.signatures;return(0,i.A)((0,i.A)({},o),{},{transaction:pt.populate(s,a)})}async getParsedConfirmedTransaction(e,t){const n=this._buildArgsAtLeastConfirmed([e],t,"jsonParsed"),r=G(await this._rpcRequest("getTransaction",n),Fr);if("error"in r)throw new Ct(r.error,"failed to get confirmed transaction");return r.result}async getParsedConfirmedTransactions(e,t){const n=e.map(e=>({methodName:"getTransaction",args:this._buildArgsAtLeastConfirmed([e],t,"jsonParsed")}));return(await this._rpcBatchRequest(n)).map(e=>{const t=G(e,Fr);if("error"in t)throw new Ct(t.error,"failed to get confirmed transactions");return t.result})}async getConfirmedSignaturesForAddress(e,t,n){let r={},i=await this.getFirstAvailableBlock();for(;!("until"in r)&&!(--t<=0||t<i);)try{const e=await this.getConfirmedBlockSignatures(t,"finalized");e.signatures.length>0&&(r.until=e.signatures[e.signatures.length-1].toString())}catch(s){if(s instanceof Error&&s.message.includes("skipped"))continue;throw s}let o=await this.getSlot("finalized");for(;!("before"in r)&&!(++n>o);)try{const e=await this.getConfirmedBlockSignatures(n);e.signatures.length>0&&(r.before=e.signatures[e.signatures.length-1].toString())}catch(s){if(s instanceof Error&&s.message.includes("skipped"))continue;throw s}return(await this.getConfirmedSignaturesForAddress2(e,r)).map(e=>e.signature)}async getConfirmedSignaturesForAddress2(e,t,n){const r=this._buildArgsAtLeastConfirmed([e.toBase58()],n,void 0,t),i=G(await this._rpcRequest("getConfirmedSignaturesForAddress2",r),Yn);if("error"in i)throw new Ct(i.error,"failed to get confirmed signatures for address");return i.result}async getSignaturesForAddress(e,t,n){const r=this._buildArgsAtLeastConfirmed([e.toBase58()],n,void 0,t),i=G(await this._rpcRequest("getSignaturesForAddress",r),Qn);if("error"in i)throw new Ct(i.error,"failed to get signatures for address");return i.result}async getAddressLookupTable(e,t){const{context:n,value:r}=await this.getAccountInfoAndContext(e,t);let i=null;return null!==r&&(i=new en({key:e,state:en.deserialize(r.data)})),{context:n,value:i}}async getNonceAndContext(e,t){const{context:n,value:r}=await this.getAccountInfoAndContext(e,t);let i=null;return null!==r&&(i=jt.fromAccountData(r.data)),{context:n,value:i}}async getNonce(e,t){return await this.getNonceAndContext(e,t).then(e=>e.value).catch(t=>{throw new Error("failed to get nonce for account "+e.toBase58()+": "+t)})}async requestAirdrop(e,t){const n=G(await this._rpcRequest("requestAirdrop",[e.toBase58(),t]),qr);if("error"in n)throw new Ct(n.error,"airdrop to ".concat(e.toBase58()," failed"));return n.result}async _blockhashWithExpiryBlockHeight(e){if(!e){for(;this._pollingBlockhash;)await Mt(100);const e=Date.now()-this._blockhashInfo.lastFetch>=an;if(null!==this._blockhashInfo.latestBlockhash&&!e)return this._blockhashInfo.latestBlockhash}return await this._pollNewBlockhash()}async _pollNewBlockhash(){this._pollingBlockhash=!0;try{const e=Date.now(),t=this._blockhashInfo.latestBlockhash,n=t?t.blockhash:null;for(let r=0;r<50;r++){const e=await this.getLatestBlockhash("finalized");if(n!==e.blockhash)return this._blockhashInfo={latestBlockhash:e,lastFetch:Date.now(),transactionSignatures:[],simulatedSignatures:[]},e;await Mt(200)}throw new Error("Unable to obtain a new blockhash after ".concat(Date.now()-e,"ms"))}finally{this._pollingBlockhash=!1}}async getStakeMinimumDelegation(e){const{commitment:t,config:n}=cn(e),r=this._buildArgs([],t,"base64",n),i=G(await this._rpcRequest("getStakeMinimumDelegation",r),fn(ie()));if("error"in i)throw new Ct(i.error,"failed to get stake minimum delegation");return i.result}async simulateTransaction(e,t,n){if("message"in e){const r=e.serialize(),i=o.Buffer.from(r).toString("base64");if(Array.isArray(t)||void 0!==n)throw new Error("Invalid arguments");const s=t||{};s.encoding="base64","commitment"in s||(s.commitment=this.commitment),t&&"object"===typeof t&&"innerInstructions"in t&&(s.innerInstructions=t.innerInstructions);const a=[i,s],c=G(await this._rpcRequest("simulateTransaction",a),In);if("error"in c)throw new Error("failed to simulate transaction: "+c.error.message);return c.result}let r;if(e instanceof pt){let t=e;r=new pt,r.feePayer=t.feePayer,r.instructions=e.instructions,r.nonceInfo=t.nonceInfo,r.signatures=t.signatures}else r=pt.populate(e),r._message=r._json=void 0;if(void 0!==t&&!Array.isArray(t))throw new Error("Invalid arguments");const i=t;if(r.nonceInfo&&i)r.sign(...i);else{let e=this._disableBlockhashCaching;for(;;){const t=await this._blockhashWithExpiryBlockHeight(e);if(r.lastValidBlockHeight=t.lastValidBlockHeight,r.recentBlockhash=t.blockhash,!i)break;if(r.sign(...i),!r.signature)throw new Error("!signature");const n=r.signature.toString("base64");if(!this._blockhashInfo.simulatedSignatures.includes(n)&&!this._blockhashInfo.transactionSignatures.includes(n)){this._blockhashInfo.simulatedSignatures.push(n);break}e=!0}}const s=r._compile(),a=s.serialize(),c=r._serialize(a).toString("base64"),l={encoding:"base64",commitment:this.commitment};if(n){const e=(Array.isArray(n)?n:s.nonProgramIds()).map(e=>e.toBase58());l.accounts={encoding:"base64",addresses:e}}i&&(l.sigVerify=!0),t&&"object"===typeof t&&"innerInstructions"in t&&(l.innerInstructions=t.innerInstructions);const u=[c,l],d=G(await this._rpcRequest("simulateTransaction",u),In);if("error"in d){let e;if("data"in d.error&&(e=d.error.data.logs,e&&Array.isArray(e))){const t="\n ",n=t+e.join(t);console.error(d.error.message,n)}throw new At({action:"simulate",signature:"",transactionMessage:d.error.message,logs:e})}return d.result}async sendTransaction(e,t,n){if("version"in e){if(t&&Array.isArray(t))throw new Error("Invalid arguments");const n=e.serialize();return await this.sendRawTransaction(n,t)}if(void 0===t||!Array.isArray(t))throw new Error("Invalid arguments");const r=t;if(e.nonceInfo)e.sign(...r);else{let t=this._disableBlockhashCaching;for(;;){const n=await this._blockhashWithExpiryBlockHeight(t);if(e.lastValidBlockHeight=n.lastValidBlockHeight,e.recentBlockhash=n.blockhash,e.sign(...r),!e.signature)throw new Error("!signature");const i=e.signature.toString("base64");if(!this._blockhashInfo.transactionSignatures.includes(i)){this._blockhashInfo.transactionSignatures.push(i);break}t=!0}}const i=e.serialize();return await this.sendRawTransaction(i,n)}async sendRawTransaction(e,t){const n=Ne(e).toString("base64");return await this.sendEncodedTransaction(n,t)}async sendEncodedTransaction(e,t){const n={encoding:"base64"},r=t&&t.skipPreflight,i=!0===r?"processed":t&&t.preflightCommitment||this.commitment;t&&null!=t.maxRetries&&(n.maxRetries=t.maxRetries),t&&null!=t.minContextSlot&&(n.minContextSlot=t.minContextSlot),r&&(n.skipPreflight=r),i&&(n.preflightCommitment=i);const o=[e,n],s=G(await this._rpcRequest("sendTransaction",o),Hr);if("error"in s){let e;throw"data"in s.error&&(e=s.error.data.logs),new At({action:r?"send":"simulate",signature:"",transactionMessage:s.error.message,logs:e})}return s.result}_wsOnOpen(){this._rpcWebSocketConnected=!0,this._rpcWebSocketHeartbeat=setInterval(()=>{(async()=>{try{await this._rpcWebSocket.notify("ping")}catch(e){}})()},5e3),this._updateSubscriptions()}_wsOnError(e){this._rpcWebSocketConnected=!1,console.error("ws error:",e.message)}_wsOnClose(e){this._rpcWebSocketConnected=!1,this._rpcWebSocketGeneration=(this._rpcWebSocketGeneration+1)%Number.MAX_SAFE_INTEGER,this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null),this._rpcWebSocketHeartbeat&&(clearInterval(this._rpcWebSocketHeartbeat),this._rpcWebSocketHeartbeat=null),1e3!==e?(this._subscriptionCallbacksByServerSubscriptionId={},Object.entries(this._subscriptionsByHash).forEach(e=>{let[t,n]=e;this._setSubscription(t,(0,i.A)((0,i.A)({},n),{},{state:"pending"}))})):this._updateSubscriptions()}_setSubscription(e,t){var n;const r=null===(n=this._subscriptionsByHash[e])||void 0===n?void 0:n.state;if(this._subscriptionsByHash[e]=t,r!==t.state){const n=this._subscriptionStateChangeCallbacksByHash[e];n&&n.forEach(e=>{try{e(t.state)}catch(n){}})}}_onSubscriptionStateChange(e,t){var n;const r=this._subscriptionHashByClientSubscriptionId[e];if(null==r)return()=>{};const i=(n=this._subscriptionStateChangeCallbacksByHash)[r]||(n[r]=new Set);return i.add(t),()=>{i.delete(t),0===i.size&&delete this._subscriptionStateChangeCallbacksByHash[r]}}async _updateSubscriptions(){if(0===Object.keys(this._subscriptionsByHash).length)return void(this._rpcWebSocketConnected&&(this._rpcWebSocketConnected=!1,this._rpcWebSocketIdleTimeout=setTimeout(()=>{this._rpcWebSocketIdleTimeout=null;try{this._rpcWebSocket.close()}catch(e){e instanceof Error&&console.log("Error when closing socket connection: ".concat(e.message))}},500)));if(null!==this._rpcWebSocketIdleTimeout&&(clearTimeout(this._rpcWebSocketIdleTimeout),this._rpcWebSocketIdleTimeout=null,this._rpcWebSocketConnected=!0),!this._rpcWebSocketConnected)return void this._rpcWebSocket.connect();const e=this._rpcWebSocketGeneration,t=()=>e===this._rpcWebSocketGeneration;await Promise.all(Object.keys(this._subscriptionsByHash).map(async e=>{const n=this._subscriptionsByHash[e];if(void 0!==n)switch(n.state){case"pending":case"unsubscribed":if(0===n.callbacks.size)return delete this._subscriptionsByHash[e],"unsubscribed"===n.state&&delete this._subscriptionCallbacksByServerSubscriptionId[n.serverSubscriptionId],void await this._updateSubscriptions();await(async()=>{const{args:r,method:o}=n;try{this._setSubscription(e,(0,i.A)((0,i.A)({},n),{},{state:"subscribing"}));const t=await this._rpcWebSocket.call(o,r);this._setSubscription(e,(0,i.A)((0,i.A)({},n),{},{serverSubscriptionId:t,state:"subscribed"})),this._subscriptionCallbacksByServerSubscriptionId[t]=n.callbacks,await this._updateSubscriptions()}catch(s){if(console.error("Received ".concat(s instanceof Error?"":"JSON-RPC ","error calling `").concat(o,"`"),{args:r,error:s}),!t())return;this._setSubscription(e,(0,i.A)((0,i.A)({},n),{},{state:"pending"})),await this._updateSubscriptions()}})();break;case"subscribed":0===n.callbacks.size&&await(async()=>{const{serverSubscriptionId:r,unsubscribeMethod:o}=n;if(this._subscriptionsAutoDisposedByRpc.has(r))this._subscriptionsAutoDisposedByRpc.delete(r);else{this._setSubscription(e,(0,i.A)((0,i.A)({},n),{},{state:"unsubscribing"})),this._setSubscription(e,(0,i.A)((0,i.A)({},n),{},{state:"unsubscribing"}));try{await this._rpcWebSocket.call(o,[r])}catch(s){if(s instanceof Error&&console.error("".concat(o," error:"),s.message),!t())return;return this._setSubscription(e,(0,i.A)((0,i.A)({},n),{},{state:"subscribed"})),void await this._updateSubscriptions()}}this._setSubscription(e,(0,i.A)((0,i.A)({},n),{},{state:"unsubscribed"})),await this._updateSubscriptions()})()}}))}_handleServerNotification(e,t){const n=this._subscriptionCallbacksByServerSubscriptionId[e];void 0!==n&&n.forEach(e=>{try{e(...t)}catch(n){console.error(n)}})}_wsOnAccountNotification(e){const{result:t,subscription:n}=G(e,Xn);this._handleServerNotification(n,[t.value,t.context])}_makeSubscription(e,t){const n=this._nextClientSubscriptionId++,r=Zt([e.method,t]),o=this._subscriptionsByHash[r];return void 0===o?this._subscriptionsByHash[r]=(0,i.A)((0,i.A)({},e),{},{args:t,callbacks:new Set([e.callback]),state:"pending"}):o.callbacks.add(e.callback),this._subscriptionHashByClientSubscriptionId[n]=r,this._subscriptionDisposeFunctionsByClientSubscriptionId[n]=async()=>{delete this._subscriptionDisposeFunctionsByClientSubscriptionId[n],delete this._subscriptionHashByClientSubscriptionId[n];const t=this._subscriptionsByHash[r];rt(void 0!==t,"Could not find a `Subscription` when tearing down client subscription #".concat(n)),t.callbacks.delete(e.callback),await this._updateSubscriptions()},this._updateSubscriptions(),n}onAccountChange(e,t,n){const{commitment:r,config:i}=cn(n),o=this._buildArgs([e.toBase58()],r||this._commitment||"finalized","base64",i);return this._makeSubscription({callback:t,method:"accountSubscribe",unsubscribeMethod:"accountUnsubscribe"},o)}async removeAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"account change")}_wsOnProgramAccountNotification(e){const{result:t,subscription:n}=G(e,tr);this._handleServerNotification(n,[{accountId:t.value.pubkey,accountInfo:t.value.account},t.context])}onProgramAccountChange(e,t,n,r){const{commitment:i,config:o}=cn(n),s=this._buildArgs([e.toBase58()],i||this._commitment||"finalized","base64",o||(r?{filters:ln(r)}:void 0));return this._makeSubscription({callback:t,method:"programSubscribe",unsubscribeMethod:"programUnsubscribe"},s)}async removeProgramAccountChangeListener(e){await this._unsubscribeClientSubscription(e,"program account change")}onLogs(e,t,n){const r=this._buildArgs(["object"===typeof e?{mentions:[e.toString()]}:e],n||this._commitment||"finalized");return this._makeSubscription({callback:t,method:"logsSubscribe",unsubscribeMethod:"logsUnsubscribe"},r)}async removeOnLogsListener(e){await this._unsubscribeClientSubscription(e,"logs")}_wsOnLogsNotification(e){const{result:t,subscription:n}=G(e,Vr);this._handleServerNotification(n,[t.value,t.context])}_wsOnSlotNotification(e){const{result:t,subscription:n}=G(e,rr);this._handleServerNotification(n,[t])}onSlotChange(e){return this._makeSubscription({callback:e,method:"slotSubscribe",unsubscribeMethod:"slotUnsubscribe"},[])}async removeSlotChangeListener(e){await this._unsubscribeClientSubscription(e,"slot change")}_wsOnSlotUpdatesNotification(e){const{result:t,subscription:n}=G(e,or);this._handleServerNotification(n,[t])}onSlotUpdate(e){return this._makeSubscription({callback:e,method:"slotsUpdatesSubscribe",unsubscribeMethod:"slotsUpdatesUnsubscribe"},[])}async removeSlotUpdateListener(e){await this._unsubscribeClientSubscription(e,"slot update")}async _unsubscribeClientSubscription(e,t){const n=this._subscriptionDisposeFunctionsByClientSubscriptionId[e];n?await n():console.warn("Ignored unsubscribe request because an active subscription with id "+"`".concat(e,"` for '").concat(t,"' events ")+"could not be found.")}_buildArgs(e,t,n,r){const i=t||this._commitment;if(i||n||r){let t={};n&&(t.encoding=n),i&&(t.commitment=i),r&&(t=Object.assign(t,r)),e.push(t)}return e}_buildArgsAtLeastConfirmed(e,t,n,r){const i=t||this._commitment;if(i&&!["confirmed","finalized"].includes(i))throw new Error("Using Connection with default commitment: `"+this._commitment+"`, but method requires at least `confirmed`");return this._buildArgs(e,t,n,r)}_wsOnSignatureNotification(e){const{result:t,subscription:n}=G(e,sr);"receivedSignature"!==t.value&&this._subscriptionsAutoDisposedByRpc.add(n),this._handleServerNotification(n,"receivedSignature"===t.value?[{type:"received"},t.context]:[{type:"status",result:t.value},t.context])}onSignature(e,t,n){const r=this._buildArgs([e],n||this._commitment||"finalized"),i=this._makeSubscription({callback:(e,n)=>{if("status"===e.type){t(e.result,n);try{this.removeSignatureListener(i)}catch(r){}}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},r);return i}onSignatureWithOptions(e,t,n){const o=(0,i.A)((0,i.A)({},n),{},{commitment:n&&n.commitment||this._commitment||"finalized"}),{commitment:s}=o,a=(0,r.A)(o,Ae),c=this._buildArgs([e],s,void 0,a),l=this._makeSubscription({callback:(e,n)=>{t(e,n);try{this.removeSignatureListener(l)}catch(r){}},method:"signatureSubscribe",unsubscribeMethod:"signatureUnsubscribe"},c);return l}async removeSignatureListener(e){await this._unsubscribeClientSubscription(e,"signature result")}_wsOnRootNotification(e){const{result:t,subscription:n}=G(e,ar);this._handleServerNotification(n,[t])}onRootChange(e){return this._makeSubscription({callback:e,method:"rootSubscribe",unsubscribeMethod:"rootUnsubscribe"},[])}async removeRootChangeListener(e){await this._unsubscribeClientSubscription(e,"root change")}}class Zr{constructor(e){this._keypair=void 0,this._keypair=null!==e&&void 0!==e?e:Ce()}static generate(){return new Zr(Ce())}static fromSecretKey(e,t){if(64!==e.byteLength)throw new Error("bad secret key size");const n=e.slice(32,64);if(!t||!t.skipValidation){const t=e.slice(0,32),r=Ie(t);for(let e=0;e<32;e++)if(n[e]!==r[e])throw new Error("provided secretKey is invalid")}return new Zr({publicKey:n,secretKey:e})}static fromSeed(e){const t=Ie(e),n=new Uint8Array(64);return n.set(e),n.set(t,32),new Zr({publicKey:t,secretKey:n})}get publicKey(){return new Ue(this._keypair.publicKey)}get secretKey(){return new Uint8Array(this._keypair.secretKey)}}const Jr=Object.freeze({CreateLookupTable:{index:0,layout:f.w3([f.DH("instruction"),Lt("recentSlot"),f.u8("bumpSeed")])},FreezeLookupTable:{index:1,layout:f.w3([f.DH("instruction")])},ExtendLookupTable:{index:2,layout:f.w3([f.DH("instruction"),Lt(),f.O6(Ye(),f.cY(f.DH(),-8),"addresses")])},DeactivateLookupTable:{index:3,layout:f.w3([f.DH("instruction")])},CloseLookupTable:{index:4,layout:f.w3([f.DH("instruction")])}});class Yr{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const t=f.DH("instruction").decode(e.data);let n;for(const[r,i]of Object.entries(Jr))if(i.index==t){n=r;break}if(!n)throw new Error("Invalid Instruction. Should be a LookupTable Instruction");return n}static decodeCreateLookupTable(e){this.checkProgramId(e.programId),this.checkKeysLength(e.keys,4);const{recentSlot:t}=Ot(Jr.CreateLookupTable,e.data);return{authority:e.keys[1].pubkey,payer:e.keys[2].pubkey,recentSlot:Number(t)}}static decodeExtendLookupTable(e){if(this.checkProgramId(e.programId),e.keys.length<2)throw new Error("invalid instruction; found ".concat(e.keys.length," keys, expected at least 2"));const{addresses:t}=Ot(Jr.ExtendLookupTable,e.data);return{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey,payer:e.keys.length>2?e.keys[2].pubkey:void 0,addresses:t.map(e=>new Ue(e))}}static decodeCloseLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,3),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey,recipient:e.keys[2].pubkey}}static decodeFreezeLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,2),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey}}static decodeDeactivateLookupTable(e){return this.checkProgramId(e.programId),this.checkKeysLength(e.keys,2),{lookupTable:e.keys[0].pubkey,authority:e.keys[1].pubkey}}static checkProgramId(e){if(!e.equals(Qr.programId))throw new Error("invalid instruction; programId is not AddressLookupTable Program")}static checkKeysLength(e,t){if(e.length<t)throw new Error("invalid instruction; found ".concat(e.length," keys, expected at least ").concat(t))}}class Qr{constructor(){}static createLookupTable(e){const[t,n]=Ue.findProgramAddressSync([e.authority.toBuffer(),j().encode(e.recentSlot)],this.programId),r=Tt(Jr.CreateLookupTable,{recentSlot:BigInt(e.recentSlot),bumpSeed:n}),i=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:Dt.programId,isSigner:!1,isWritable:!1}];return[new ft({programId:this.programId,keys:i,data:r}),t]}static freezeLookupTable(e){const t=Tt(Jr.FreezeLookupTable),n=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new ft({programId:this.programId,keys:n,data:t})}static extendLookupTable(e){const t=Tt(Jr.ExtendLookupTable,{addresses:e.addresses.map(e=>e.toBytes())}),n=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return e.payer&&n.push({pubkey:e.payer,isSigner:!0,isWritable:!0},{pubkey:Dt.programId,isSigner:!1,isWritable:!1}),new ft({programId:this.programId,keys:n,data:t})}static deactivateLookupTable(e){const t=Tt(Jr.DeactivateLookupTable),n=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1}];return new ft({programId:this.programId,keys:n,data:t})}static closeLookupTable(e){const t=Tt(Jr.CloseLookupTable),n=[{pubkey:e.lookupTable,isSigner:!1,isWritable:!0},{pubkey:e.authority,isSigner:!0,isWritable:!1},{pubkey:e.recipient,isSigner:!1,isWritable:!0}];return new ft({programId:this.programId,keys:n,data:t})}}Qr.programId=new Ue("AddressLookupTab1e1111111111111111111111111");class Xr{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const t=f.u8("instruction").decode(e.data);let n;for(const[r,i]of Object.entries(ei))if(i.index==t){n=r;break}if(!n)throw new Error("Instruction type incorrect; not a ComputeBudgetInstruction");return n}static decodeRequestUnits(e){this.checkProgramId(e.programId);const{units:t,additionalFee:n}=Ot(ei.RequestUnits,e.data);return{units:t,additionalFee:n}}static decodeRequestHeapFrame(e){this.checkProgramId(e.programId);const{bytes:t}=Ot(ei.RequestHeapFrame,e.data);return{bytes:t}}static decodeSetComputeUnitLimit(e){this.checkProgramId(e.programId);const{units:t}=Ot(ei.SetComputeUnitLimit,e.data);return{units:t}}static decodeSetComputeUnitPrice(e){this.checkProgramId(e.programId);const{microLamports:t}=Ot(ei.SetComputeUnitPrice,e.data);return{microLamports:t}}static checkProgramId(e){if(!e.equals(ti.programId))throw new Error("invalid instruction; programId is not ComputeBudgetProgram")}}const ei=Object.freeze({RequestUnits:{index:0,layout:f.w3([f.u8("instruction"),f.DH("units"),f.DH("additionalFee")])},RequestHeapFrame:{index:1,layout:f.w3([f.u8("instruction"),f.DH("bytes")])},SetComputeUnitLimit:{index:2,layout:f.w3([f.u8("instruction"),f.DH("units")])},SetComputeUnitPrice:{index:3,layout:f.w3([f.u8("instruction"),Lt("microLamports")])}});class ti{constructor(){}static requestUnits(e){const t=Tt(ei.RequestUnits,e);return new ft({keys:[],programId:this.programId,data:t})}static requestHeapFrame(e){const t=Tt(ei.RequestHeapFrame,e);return new ft({keys:[],programId:this.programId,data:t})}static setComputeUnitLimit(e){const t=Tt(ei.SetComputeUnitLimit,e);return new ft({keys:[],programId:this.programId,data:t})}static setComputeUnitPrice(e){const t=Tt(ei.SetComputeUnitPrice,{microLamports:BigInt(e.microLamports)});return new ft({keys:[],programId:this.programId,data:t})}}ti.programId=new Ue("ComputeBudget111111111111111111111111111111");const ni=f.w3([f.u8("numSignatures"),f.u8("padding"),f.NX("signatureOffset"),f.NX("signatureInstructionIndex"),f.NX("publicKeyOffset"),f.NX("publicKeyInstructionIndex"),f.NX("messageDataOffset"),f.NX("messageDataSize"),f.NX("messageInstructionIndex")]);class ri{constructor(){}static createInstructionWithPublicKey(e){const{publicKey:t,message:n,signature:r,instructionIndex:i}=e;rt(32===t.length,"Public Key must be ".concat(32," bytes but received ").concat(t.length," bytes")),rt(64===r.length,"Signature must be ".concat(64," bytes but received ").concat(r.length," bytes"));const s=ni.span,a=s+t.length,c=a+r.length,l=o.Buffer.alloc(c+n.length),u=null==i?65535:i;return ni.encode({numSignatures:1,padding:0,signatureOffset:a,signatureInstructionIndex:u,publicKeyOffset:s,publicKeyInstructionIndex:u,messageDataOffset:c,messageDataSize:n.length,messageInstructionIndex:u},l),l.fill(t,s),l.fill(r,a),l.fill(n,c),new ft({keys:[],programId:ri.programId,data:l})}static createInstructionWithPrivateKey(e){const{privateKey:t,message:n,instructionIndex:r}=e;rt(64===t.length,"Private key must be ".concat(64," bytes but received ").concat(t.length," bytes"));try{const e=Zr.fromSecretKey(t),i=e.publicKey.toBytes(),o=Te(n,e.secretKey);return this.createInstructionWithPublicKey({publicKey:i,message:n,signature:o,instructionIndex:r})}catch(i){throw new Error("Error creating instruction; ".concat(i))}}}ri.programId=new Ue("Ed25519SigVerify111111111111111111111111111");ke.secp256k1.utils.isValidPrivateKey;const ii=ke.secp256k1.getPublicKey,oi=f.w3([f.u8("numSignatures"),f.NX("signatureOffset"),f.u8("signatureInstructionIndex"),f.NX("ethAddressOffset"),f.u8("ethAddressInstructionIndex"),f.NX("messageDataOffset"),f.NX("messageDataSize"),f.u8("messageInstructionIndex"),f.av(20,"ethAddress"),f.av(64,"signature"),f.u8("recoveryId")]);class si{constructor(){}static publicKeyToEthAddress(e){rt(64===e.length,"Public key must be ".concat(64," bytes but received ").concat(e.length," bytes"));try{return o.Buffer.from((0,_e.lY)(Ne(e))).slice(-20)}catch(t){throw new Error("Error constructing Ethereum address: ".concat(t))}}static createInstructionWithPublicKey(e){const{publicKey:t,message:n,signature:r,recoveryId:i,instructionIndex:o}=e;return si.createInstructionWithEthAddress({ethAddress:si.publicKeyToEthAddress(t),message:n,signature:r,recoveryId:i,instructionIndex:o})}static createInstructionWithEthAddress(e){const{ethAddress:t,message:n,signature:r,recoveryId:i,instructionIndex:s=0}=e;let a;a="string"===typeof t?t.startsWith("0x")?o.Buffer.from(t.substr(2),"hex"):o.Buffer.from(t,"hex"):t,rt(20===a.length,"Address must be ".concat(20," bytes but received ").concat(a.length," bytes"));const c=12+a.length,l=c+r.length+1,u=o.Buffer.alloc(oi.span+n.length);return oi.encode({numSignatures:1,signatureOffset:c,signatureInstructionIndex:s,ethAddressOffset:12,ethAddressInstructionIndex:s,messageDataOffset:l,messageDataSize:n.length,messageInstructionIndex:s,signature:Ne(r),ethAddress:Ne(a),recoveryId:i},u),u.fill(Ne(n),oi.span),new ft({keys:[],programId:si.programId,data:u})}static createInstructionWithPrivateKey(e){const{privateKey:t,message:n,instructionIndex:r}=e;rt(32===t.length,"Private key must be ".concat(32," bytes but received ").concat(t.length," bytes"));try{const e=Ne(t),i=ii(e,!1).slice(1),s=o.Buffer.from((0,_e.lY)(Ne(n))),[a,c]=((e,t)=>{const n=ke.secp256k1.sign(e,t);return[n.toCompactRawBytes(),n.recovery]})(s,e);return this.createInstructionWithPublicKey({publicKey:i,message:n,signature:a,recoveryId:c,instructionIndex:r})}catch(i){throw new Error("Error creating instruction; ".concat(i))}}}var ai;si.programId=new Ue("KeccakSecp256k11111111111111111111111111111");const ci=new Ue("StakeConfig11111111111111111111111111111111");class li{constructor(e,t){this.staker=void 0,this.withdrawer=void 0,this.staker=e,this.withdrawer=t}}class ui{constructor(e,t,n){this.unixTimestamp=void 0,this.epoch=void 0,this.custodian=void 0,this.unixTimestamp=e,this.epoch=t,this.custodian=n}}ai=ui,ui.default=new ai(0,0,Ue.default);class di{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const t=f.DH("instruction").decode(e.data);let n;for(const[r,i]of Object.entries(hi))if(i.index==t){n=r;break}if(!n)throw new Error("Instruction type incorrect; not a StakeInstruction");return n}static decodeInitialize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{authorized:t,lockup:n}=Ot(hi.Initialize,e.data);return{stakePubkey:e.keys[0].pubkey,authorized:new li(new Ue(t.staker),new Ue(t.withdrawer)),lockup:new ui(n.unixTimestamp,n.epoch,new Ue(n.custodian))}}static decodeDelegate(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,6),Ot(hi.Delegate,e.data),{stakePubkey:e.keys[0].pubkey,votePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[5].pubkey}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{newAuthorized:t,stakeAuthorizationType:n}=Ot(hi.Authorize,e.data),r={stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new Ue(t),stakeAuthorizationType:{index:n}};return e.keys.length>3&&(r.custodianPubkey=e.keys[3].pubkey),r}static decodeAuthorizeWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,2);const{newAuthorized:t,stakeAuthorizationType:n,authoritySeed:r,authorityOwner:i}=Ot(hi.AuthorizeWithSeed,e.data),o={stakePubkey:e.keys[0].pubkey,authorityBase:e.keys[1].pubkey,authoritySeed:r,authorityOwner:new Ue(i),newAuthorizedPubkey:new Ue(t),stakeAuthorizationType:{index:n}};return e.keys.length>3&&(o.custodianPubkey=e.keys[3].pubkey),o}static decodeSplit(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:t}=Ot(hi.Split,e.data);return{stakePubkey:e.keys[0].pubkey,splitStakePubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[2].pubkey,lamports:t}}static decodeMerge(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Ot(hi.Merge,e.data),{stakePubkey:e.keys[0].pubkey,sourceStakePubKey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,5);const{lamports:t}=Ot(hi.Withdraw,e.data),n={stakePubkey:e.keys[0].pubkey,toPubkey:e.keys[1].pubkey,authorizedPubkey:e.keys[4].pubkey,lamports:t};return e.keys.length>5&&(n.custodianPubkey=e.keys[5].pubkey),n}static decodeDeactivate(e){return this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3),Ot(hi.Deactivate,e.data),{stakePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey}}static checkProgramId(e){if(!e.equals(pi.programId))throw new Error("invalid instruction; programId is not StakeProgram")}static checkKeyLength(e,t){if(e.length<t)throw new Error("invalid instruction; found ".concat(e.length," keys, expected at least ").concat(t))}}const hi=Object.freeze({Initialize:{index:0,layout:f.w3([f.DH("instruction"),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"authorized";return f.w3([Ye("staker"),Ye("withdrawer")],e)}(),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lockup";return f.w3([f.Wg("unixTimestamp"),f.Wg("epoch"),Ye("custodian")],e)}()])},Authorize:{index:1,layout:f.w3([f.DH("instruction"),Ye("newAuthorized"),f.DH("stakeAuthorizationType")])},Delegate:{index:2,layout:f.w3([f.DH("instruction")])},Split:{index:3,layout:f.w3([f.DH("instruction"),f.Wg("lamports")])},Withdraw:{index:4,layout:f.w3([f.DH("instruction"),f.Wg("lamports")])},Deactivate:{index:5,layout:f.w3([f.DH("instruction")])},Merge:{index:7,layout:f.w3([f.DH("instruction")])},AuthorizeWithSeed:{index:8,layout:f.w3([f.DH("instruction"),Ye("newAuthorized"),f.DH("stakeAuthorizationType"),Xe("authoritySeed"),Ye("authorityOwner")])}}),fi=Object.freeze({Staker:{index:0},Withdrawer:{index:1}});class pi{constructor(){}static initialize(e){const{stakePubkey:t,authorized:n,lockup:r}=e,i=r||ui.default,o=Tt(hi.Initialize,{authorized:{staker:Ne(n.staker.toBuffer()),withdrawer:Ne(n.withdrawer.toBuffer())},lockup:{unixTimestamp:i.unixTimestamp,epoch:i.epoch,custodian:Ne(i.custodian.toBuffer())}}),s={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:_t,isSigner:!1,isWritable:!1}],programId:this.programId,data:o};return new ft(s)}static createAccountWithSeed(e){const t=new pt;t.add(Dt.createAccountWithSeed({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,basePubkey:e.basePubkey,seed:e.seed,lamports:e.lamports,space:this.space,programId:this.programId}));const{stakePubkey:n,authorized:r,lockup:i}=e;return t.add(this.initialize({stakePubkey:n,authorized:r,lockup:i}))}static createAccount(e){const t=new pt;t.add(Dt.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.stakePubkey,lamports:e.lamports,space:this.space,programId:this.programId}));const{stakePubkey:n,authorized:r,lockup:i}=e;return t.add(this.initialize({stakePubkey:n,authorized:r,lockup:i}))}static delegate(e){const{stakePubkey:t,authorizedPubkey:n,votePubkey:r}=e,i=Tt(hi.Delegate);return(new pt).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!1},{pubkey:bt,isSigner:!1,isWritable:!1},{pubkey:Et,isSigner:!1,isWritable:!1},{pubkey:ci,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static authorize(e){const{stakePubkey:t,authorizedPubkey:n,newAuthorizedPubkey:r,stakeAuthorizationType:i,custodianPubkey:o}=e,s=Tt(hi.Authorize,{newAuthorized:Ne(r.toBuffer()),stakeAuthorizationType:i.index}),a=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:bt,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}];return o&&a.push({pubkey:o,isSigner:!0,isWritable:!1}),(new pt).add({keys:a,programId:this.programId,data:s})}static authorizeWithSeed(e){const{stakePubkey:t,authorityBase:n,authoritySeed:r,authorityOwner:i,newAuthorizedPubkey:o,stakeAuthorizationType:s,custodianPubkey:a}=e,c=Tt(hi.AuthorizeWithSeed,{newAuthorized:Ne(o.toBuffer()),stakeAuthorizationType:s.index,authoritySeed:r,authorityOwner:Ne(i.toBuffer())}),l=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1},{pubkey:bt,isSigner:!1,isWritable:!1}];return a&&l.push({pubkey:a,isSigner:!0,isWritable:!1}),(new pt).add({keys:l,programId:this.programId,data:c})}static splitInstruction(e){const{stakePubkey:t,authorizedPubkey:n,splitStakePubkey:r,lamports:i}=e,o=Tt(hi.Split,{lamports:i});return new ft({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:o})}static split(e,t){const n=new pt;return n.add(Dt.createAccount({fromPubkey:e.authorizedPubkey,newAccountPubkey:e.splitStakePubkey,lamports:t,space:this.space,programId:this.programId})),n.add(this.splitInstruction(e))}static splitWithSeed(e,t){const{stakePubkey:n,authorizedPubkey:r,splitStakePubkey:i,basePubkey:o,seed:s,lamports:a}=e,c=new pt;return c.add(Dt.allocate({accountPubkey:i,basePubkey:o,seed:s,space:this.space,programId:this.programId})),t&&t>0&&c.add(Dt.transfer({fromPubkey:e.authorizedPubkey,toPubkey:i,lamports:t})),c.add(this.splitInstruction({stakePubkey:n,authorizedPubkey:r,splitStakePubkey:i,lamports:a}))}static merge(e){const{stakePubkey:t,sourceStakePubKey:n,authorizedPubkey:r}=e,i=Tt(hi.Merge);return(new pt).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!1,isWritable:!0},{pubkey:bt,isSigner:!1,isWritable:!1},{pubkey:Et,isSigner:!1,isWritable:!1},{pubkey:r,isSigner:!0,isWritable:!1}],programId:this.programId,data:i})}static withdraw(e){const{stakePubkey:t,authorizedPubkey:n,toPubkey:r,lamports:i,custodianPubkey:o}=e,s=Tt(hi.Withdraw,{lamports:i}),a=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!1,isWritable:!0},{pubkey:bt,isSigner:!1,isWritable:!1},{pubkey:Et,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return o&&a.push({pubkey:o,isSigner:!0,isWritable:!1}),(new pt).add({keys:a,programId:this.programId,data:s})}static deactivate(e){const{stakePubkey:t,authorizedPubkey:n}=e,r=Tt(hi.Deactivate);return(new pt).add({keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:bt,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:r})}}pi.programId=new Ue("Stake11111111111111111111111111111111111111"),pi.space=200;class mi{constructor(e,t,n,r){this.nodePubkey=void 0,this.authorizedVoter=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.nodePubkey=e,this.authorizedVoter=t,this.authorizedWithdrawer=n,this.commission=r}}class gi{constructor(){}static decodeInstructionType(e){this.checkProgramId(e.programId);const t=f.DH("instruction").decode(e.data);let n;for(const[r,i]of Object.entries(bi))if(i.index==t){n=r;break}if(!n)throw new Error("Instruction type incorrect; not a VoteInstruction");return n}static decodeInitializeAccount(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,4);const{voteInit:t}=Ot(bi.InitializeAccount,e.data);return{votePubkey:e.keys[0].pubkey,nodePubkey:e.keys[3].pubkey,voteInit:new mi(new Ue(t.nodePubkey),new Ue(t.authorizedVoter),new Ue(t.authorizedWithdrawer),t.commission)}}static decodeAuthorize(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{newAuthorized:t,voteAuthorizationType:n}=Ot(bi.Authorize,e.data);return{votePubkey:e.keys[0].pubkey,authorizedPubkey:e.keys[2].pubkey,newAuthorizedPubkey:new Ue(t),voteAuthorizationType:{index:n}}}static decodeAuthorizeWithSeed(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:t,currentAuthorityDerivedKeySeed:n,newAuthorized:r,voteAuthorizationType:i}}=Ot(bi.AuthorizeWithSeed,e.data);return{currentAuthorityDerivedKeyBasePubkey:e.keys[2].pubkey,currentAuthorityDerivedKeyOwnerPubkey:new Ue(t),currentAuthorityDerivedKeySeed:n,newAuthorizedPubkey:new Ue(r),voteAuthorizationType:{index:i},votePubkey:e.keys[0].pubkey}}static decodeWithdraw(e){this.checkProgramId(e.programId),this.checkKeyLength(e.keys,3);const{lamports:t}=Ot(bi.Withdraw,e.data);return{votePubkey:e.keys[0].pubkey,authorizedWithdrawerPubkey:e.keys[2].pubkey,lamports:t,toPubkey:e.keys[1].pubkey}}static checkProgramId(e){if(!e.equals(vi.programId))throw new Error("invalid instruction; programId is not VoteProgram")}static checkKeyLength(e,t){if(e.length<t)throw new Error("invalid instruction; found ".concat(e.length," keys, expected at least ").concat(t))}}const bi=Object.freeze({InitializeAccount:{index:0,layout:f.w3([f.DH("instruction"),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"voteInit";return f.w3([Ye("nodePubkey"),Ye("authorizedVoter"),Ye("authorizedWithdrawer"),f.u8("commission")],e)}()])},Authorize:{index:1,layout:f.w3([f.DH("instruction"),Ye("newAuthorized"),f.DH("voteAuthorizationType")])},Withdraw:{index:3,layout:f.w3([f.DH("instruction"),f.Wg("lamports")])},UpdateValidatorIdentity:{index:4,layout:f.w3([f.DH("instruction")])},AuthorizeWithSeed:{index:10,layout:f.w3([f.DH("instruction"),function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"voteAuthorizeWithSeedArgs";return f.w3([f.DH("voteAuthorizationType"),Ye("currentAuthorityDerivedKeyOwnerPubkey"),Xe("currentAuthorityDerivedKeySeed"),Ye("newAuthorized")],e)}()])}}),yi=Object.freeze({Voter:{index:0},Withdrawer:{index:1}});class vi{constructor(){}static initializeAccount(e){const{votePubkey:t,nodePubkey:n,voteInit:r}=e,i=Tt(bi.InitializeAccount,{voteInit:{nodePubkey:Ne(r.nodePubkey.toBuffer()),authorizedVoter:Ne(r.authorizedVoter.toBuffer()),authorizedWithdrawer:Ne(r.authorizedWithdrawer.toBuffer()),commission:r.commission}}),o={keys:[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:_t,isSigner:!1,isWritable:!1},{pubkey:bt,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}],programId:this.programId,data:i};return new ft(o)}static createAccount(e){const t=new pt;return t.add(Dt.createAccount({fromPubkey:e.fromPubkey,newAccountPubkey:e.votePubkey,lamports:e.lamports,space:this.space,programId:this.programId})),t.add(this.initializeAccount({votePubkey:e.votePubkey,nodePubkey:e.voteInit.nodePubkey,voteInit:e.voteInit}))}static authorize(e){const{votePubkey:t,authorizedPubkey:n,newAuthorizedPubkey:r,voteAuthorizationType:i}=e,o=Tt(bi.Authorize,{newAuthorized:Ne(r.toBuffer()),voteAuthorizationType:i.index}),s=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:bt,isSigner:!1,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return(new pt).add({keys:s,programId:this.programId,data:o})}static authorizeWithSeed(e){const{currentAuthorityDerivedKeyBasePubkey:t,currentAuthorityDerivedKeyOwnerPubkey:n,currentAuthorityDerivedKeySeed:r,newAuthorizedPubkey:i,voteAuthorizationType:o,votePubkey:s}=e,a=Tt(bi.AuthorizeWithSeed,{voteAuthorizeWithSeedArgs:{currentAuthorityDerivedKeyOwnerPubkey:Ne(n.toBuffer()),currentAuthorityDerivedKeySeed:r,newAuthorized:Ne(i.toBuffer()),voteAuthorizationType:o.index}}),c=[{pubkey:s,isSigner:!1,isWritable:!0},{pubkey:bt,isSigner:!1,isWritable:!1},{pubkey:t,isSigner:!0,isWritable:!1}];return(new pt).add({keys:c,programId:this.programId,data:a})}static withdraw(e){const{votePubkey:t,authorizedWithdrawerPubkey:n,lamports:r,toPubkey:i}=e,o=Tt(bi.Withdraw,{lamports:r}),s=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:i,isSigner:!1,isWritable:!0},{pubkey:n,isSigner:!0,isWritable:!1}];return(new pt).add({keys:s,programId:this.programId,data:o})}static safeWithdraw(e,t,n){if(e.lamports>t-n)throw new Error("Withdraw will leave vote account with insufficient funds.");return vi.withdraw(e)}static updateValidatorIdentity(e){const{votePubkey:t,authorizedWithdrawerPubkey:n,nodePubkey:r}=e,i=Tt(bi.UpdateValidatorIdentity),o=[{pubkey:t,isSigner:!1,isWritable:!0},{pubkey:r,isSigner:!0,isWritable:!1},{pubkey:n,isSigner:!0,isWritable:!1}];return(new pt).add({keys:o,programId:this.programId,data:i})}}vi.programId=new Ue("Vote111111111111111111111111111111111111111"),vi.space=3762;const wi=new Ue("Va1idator1nfo111111111111111111111111111111"),_i=le({name:ae(),website:oe(ae()),details:oe(ae()),iconUrl:oe(ae()),keybaseUsername:oe(ae())});class ki{constructor(e,t){this.key=void 0,this.info=void 0,this.key=e,this.info=t}static fromConfigData(e){let t=[...e];if(2!==tt(t))return null;const n=[];for(let r=0;r<2;r++){const e=new Ue(at(t,0,ze)),r=1===st(t);n.push({publicKey:e,isSigner:r})}if(n[0].publicKey.equals(wi)&&n[1].isSigner){const e=Xe().decode(o.Buffer.from(t)),r=JSON.parse(e);return $(r,_i),new ki(n[1].publicKey,r)}return null}}const xi=new Ue("Vote111111111111111111111111111111111111111"),Si=f.w3([Ye("nodePubkey"),Ye("authorizedWithdrawer"),f.u8("commission"),f.I0(),f.O6(f.w3([f.I0("slot"),f.DH("confirmationCount")]),f.cY(f.DH(),-8),"votes"),f.u8("rootSlotValid"),f.I0("rootSlot"),f.I0(),f.O6(f.w3([f.I0("epoch"),Ye("authorizedVoter")]),f.cY(f.DH(),-8),"authorizedVoters"),f.w3([f.O6(f.w3([Ye("authorizedPubkey"),f.I0("epochOfLastAuthorizedSwitch"),f.I0("targetEpoch")]),32,"buf"),f.I0("idx"),f.u8("isEmpty")],"priorVoters"),f.I0(),f.O6(f.w3([f.I0("epoch"),f.I0("credits"),f.I0("prevCredits")]),f.cY(f.DH(),-8),"epochCredits"),f.w3([f.I0("slot"),f.I0("timestamp")],"lastTimestamp")]);class Ei{constructor(e){this.nodePubkey=void 0,this.authorizedWithdrawer=void 0,this.commission=void 0,this.rootSlot=void 0,this.votes=void 0,this.authorizedVoters=void 0,this.priorVoters=void 0,this.epochCredits=void 0,this.lastTimestamp=void 0,this.nodePubkey=e.nodePubkey,this.authorizedWithdrawer=e.authorizedWithdrawer,this.commission=e.commission,this.rootSlot=e.rootSlot,this.votes=e.votes,this.authorizedVoters=e.authorizedVoters,this.priorVoters=e.priorVoters,this.epochCredits=e.epochCredits,this.lastTimestamp=e.lastTimestamp}static fromAccountData(e){const t=Si.decode(Ne(e),4);let n=t.rootSlot;return t.rootSlotValid||(n=null),new Ei({nodePubkey:new Ue(t.nodePubkey),authorizedWithdrawer:new Ue(t.authorizedWithdrawer),commission:t.commission,votes:t.votes,rootSlot:n,authorizedVoters:t.authorizedVoters.map(Ai),priorVoters:Ci(t.priorVoters),epochCredits:t.epochCredits,lastTimestamp:t.lastTimestamp})}}function Ai(e){let{authorizedVoter:t,epoch:n}=e;return{epoch:n,authorizedVoter:new Ue(t)}}function Pi(e){let{authorizedPubkey:t,epochOfLastAuthorizedSwitch:n,targetEpoch:r}=e;return{authorizedPubkey:new Ue(t),epochOfLastAuthorizedSwitch:n,targetEpoch:r}}function Ci(e){let{buf:t,idx:n,isEmpty:r}=e;return r?[]:[...t.slice(n+1).map(Pi),...t.slice(0,n).map(Pi)]}const Ii={http:{devnet:"http://api.devnet.solana.com",testnet:"http://api.testnet.solana.com","mainnet-beta":"http://api.mainnet-beta.solana.com/"},https:{devnet:"https://api.devnet.solana.com",testnet:"https://api.testnet.solana.com","mainnet-beta":"https://api.mainnet-beta.solana.com/"}};function Mi(e,t){const n=!1===t?"http":"https";if(!e)return Ii[n].devnet;const r=Ii[n][e];if(!r)throw new Error("Unknown ".concat(n," cluster: ").concat(e));return r}async function Ti(e,t,n,r){let i,o;n&&Object.prototype.hasOwnProperty.call(n,"lastValidBlockHeight")||n&&Object.prototype.hasOwnProperty.call(n,"nonceValue")?(i=n,o=r):o=n;const s=o&&{skipPreflight:o.skipPreflight,preflightCommitment:o.preflightCommitment||o.commitment,minContextSlot:o.minContextSlot},a=await e.sendRawTransaction(t,s),c=o&&o.commitment,l=i?e.confirmTransaction(i,c):e.confirmTransaction(a,c),u=(await l).value;if(u.err){if(null!=a)throw new At({action:null!==s&&void 0!==s&&s.skipPreflight?"send":"simulate",signature:a,transactionMessage:"Status: (".concat(JSON.stringify(u),")")});throw new Error("Raw transaction ".concat(a," failed (").concat(JSON.stringify(u),")"))}return a}const Oi=1e9},3375:e=>{function t(){this.buffer=[],this.length=0}t.prototype={get:function(e){const t=Math.floor(e/8);return 1===(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(let n=0;n<t;n++)this.putBit(1===(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},3394:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifySignIn=function(e,t){const{signedMessage:n,signature:i,account:{publicKey:s}}=t,a=o(e,t);return!!a&&(0,r.verifyMessageSignature)({message:a,signedMessage:n,signature:i,publicKey:s})},t.deriveSignInMessage=o,t.deriveSignInMessageText=s,t.parseSignInMessage=a,t.parseSignInMessageText=u,t.createSignInMessage=function(e){const t=d(e);return(new TextEncoder).encode(t)},t.createSignInMessageText=d;const r=n(38),i=n(8636);function o(e,t){const n=s(e,t);return n?(new TextEncoder).encode(n):null}function s(e,t){const n=a(t.signedMessage);if(!n)return null;if(e.domain&&e.domain!==n.domain)return null;if(e.address&&e.address!==n.address)return null;if(e.statement!==n.statement)return null;if(e.uri!==n.uri)return null;if(e.version!==n.version)return null;if(e.chainId!==n.chainId)return null;if(e.nonce!==n.nonce)return null;if(e.issuedAt!==n.issuedAt)return null;if(e.expirationTime!==n.expirationTime)return null;if(e.notBefore!==n.notBefore)return null;if(e.requestId!==n.requestId)return null;if(e.resources){if(!n.resources)return null;if(!(0,i.arraysEqual)(e.resources,n.resources))return null}else if(n.resources)return null;return d(n)}function a(e){return u((new TextDecoder).decode(e))}const c="".concat("(?:\\nURI: (?<uri>[^\\n]+))?").concat("(?:\\nVersion: (?<version>[^\\n]+))?").concat("(?:\\nChain ID: (?<chainId>[^\\n]+))?").concat("(?:\\nNonce: (?<nonce>[^\\n]+))?").concat("(?:\\nIssued At: (?<issuedAt>[^\\n]+))?").concat("(?:\\nExpiration Time: (?<expirationTime>[^\\n]+))?").concat("(?:\\nNot Before: (?<notBefore>[^\\n]+))?").concat("(?:\\nRequest ID: (?<requestId>[^\\n]+))?").concat("(?:\\nResources:(?<resources>(?:\\n- [^\\n]+)*))?"),l=new RegExp("^".concat("(?<domain>[^\\n]+?) wants you to sign in with your Solana account:\\n").concat("(?<address>[^\\n]+)(?:\\n|$)").concat("(?:\\n(?<statement>[\\S\\s]*?)(?:\\n|$))??").concat(c,"\\n*$"));function u(e){var t;const n=l.exec(e);if(!n)return null;const r=n.groups;return r?{domain:r.domain,address:r.address,statement:r.statement,uri:r.uri,version:r.version,nonce:r.nonce,chainId:r.chainId,issuedAt:r.issuedAt,expirationTime:r.expirationTime,notBefore:r.notBefore,requestId:r.requestId,resources:null===(t=r.resources)||void 0===t?void 0:t.split("\n- ").slice(1)}:null}function d(e){let t="".concat(e.domain," wants you to sign in with your Solana account:\n");t+="".concat(e.address),e.statement&&(t+="\n\n".concat(e.statement));const n=[];if(e.uri&&n.push("URI: ".concat(e.uri)),e.version&&n.push("Version: ".concat(e.version)),e.chainId&&n.push("Chain ID: ".concat(e.chainId)),e.nonce&&n.push("Nonce: ".concat(e.nonce)),e.issuedAt&&n.push("Issued At: ".concat(e.issuedAt)),e.expirationTime&&n.push("Expiration Time: ".concat(e.expirationTime)),e.notBefore&&n.push("Not Before: ".concat(e.notBefore)),e.requestId&&n.push("Request ID: ".concat(e.requestId)),e.resources){n.push("Resources:");for(const t of e.resources)n.push("- ".concat(t))}return n.length&&(t+="\n\n".concat(n.join("\n"))),t}},3406:function(e,t,n){"use strict";var r,i,o,s,a,c,l,u,d,h,f,p,m,g,b,y,v,w,_,k,x=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(t){o(t)}}function a(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},S=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},E=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},A=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaWalletAdapterWallet=t.SolanaWalletAdapterWalletAccount=void 0,t.registerWalletAdapter=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t=>t.name===e.name;const{register:i,get:o,on:s}=(0,O.getWallets)(),a=[];function c(){a.forEach(e=>e()),a.length=0}function l(){if(e.readyState===P.WalletReadyState.Unsupported||o().some(r))return!0;const l=e.readyState===P.WalletReadyState.Installed||e.readyState===P.WalletReadyState.Loadable;if(l){const o=new L(e,t,n);a.push(()=>o.destroy()),a.push(i(o)),a.push(s("register",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.some(r)&&c()}))}return l}if(!l()){function u(){l()&&e.off("readyStateChange",u)}e.on("readyStateChange",u),a.push(()=>e.off("readyStateChange",u))}return c};const P=n(3651),C=n(6488),I=n(6345),M=n(7282),T=n(3342),O=n(9790),N=n(9210),B=n(8340),R=A(n(5759));class j extends B.ReadonlyWalletAccount{constructor(e){let{adapter:t,address:n,publicKey:i,chains:o}=e;const s=[I.SolanaSignAndSendTransaction];"signTransaction"in t&&s.push(I.SolanaSignTransaction),"signMessage"in t&&s.push(I.SolanaSignMessage),"signIn"in t&&s.push(I.SolanaSignIn),super({address:n,publicKey:i,chains:o,features:s}),r.set(this,void 0),new.target===j&&Object.freeze(this),S(this,r,t,"f")}}t.SolanaWalletAdapterWalletAccount=j,r=new WeakMap;class L{get version(){return"1.0.0"}get name(){return E(this,s,"f").name}get icon(){return E(this,s,"f").icon}get chains(){return[E(this,c,"f")]}get features(){const e={[N.StandardConnect]:{version:"1.0.0",connect:E(this,f,"f")},[N.StandardDisconnect]:{version:"1.0.0",disconnect:E(this,p,"f")},[N.StandardEvents]:{version:"1.0.0",on:E(this,m,"f")},[I.SolanaSignAndSendTransaction]:{version:"1.0.0",supportedTransactionVersions:E(this,a,"f"),signAndSendTransaction:E(this,v,"f")}};let t,n,r;return"signTransaction"in E(this,s,"f")&&(t={[I.SolanaSignTransaction]:{version:"1.0.0",supportedTransactionVersions:E(this,a,"f"),signTransaction:E(this,w,"f")}}),"signMessage"in E(this,s,"f")&&(n={[I.SolanaSignMessage]:{version:"1.0.0",signMessage:E(this,_,"f")}}),"signIn"in E(this,s,"f")&&(r={[I.SolanaSignIn]:{version:"1.0.0",signIn:E(this,k,"f")}}),Object.assign(Object.assign(Object.assign({},e),t),n)}get accounts(){return E(this,u,"f")?[E(this,u,"f")]:[]}get endpoint(){return E(this,l,"f")}constructor(e,t,n){var r=this;i.add(this),o.set(this,{}),s.set(this,void 0),a.set(this,void 0),c.set(this,void 0),l.set(this,void 0),u.set(this,void 0),f.set(this,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return x(r,[...t],void 0,function(){var e=this;let{silent:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){return t||E(e,s,"f").connected||(yield E(e,s,"f").connect()),E(e,i,"m",d).call(e),{accounts:e.accounts}}()})}),p.set(this,()=>x(this,void 0,void 0,function*(){yield E(this,s,"f").disconnect()})),m.set(this,(e,t)=>{var n;return(null===(n=E(this,o,"f")[e])||void 0===n?void 0:n.push(t))||(E(this,o,"f")[e]=[t]),()=>E(this,i,"m",b).call(this,e,t)}),v.set(this,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return x(r,void 0,void 0,function*(){const e=[];if(1===t.length){const n=t[0];if(n.account!==E(this,u,"f"))throw new Error("invalid account");if(!(0,C.isSolanaChain)(n.chain))throw new Error("invalid chain");const r=E(this,i,"m",y).call(this,n.transaction),{commitment:o,preflightCommitment:a,skipPreflight:c,maxRetries:d,minContextSlot:h}=n.options||{},f=(0,M.getEndpointForChain)(n.chain,E(this,l,"f")),p=new T.Connection(f,o||"confirmed"),m=o?yield p.getLatestBlockhash({commitment:a||o,minContextSlot:h}):void 0,g=yield E(this,s,"f").sendTransaction(r,p,{preflightCommitment:a,skipPreflight:c,maxRetries:d,minContextSlot:h});m&&(yield p.confirmTransaction(Object.assign(Object.assign({},m),{signature:g}),o||"confirmed")),e.push({signature:R.default.decode(g)})}else if(t.length>1)for(const n of t)e.push(...yield E(this,v,"f").call(this,n));return e})}),w.set(this,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return x(r,void 0,void 0,function*(){if(!("signTransaction"in E(this,s,"f")))throw new Error("signTransaction not implemented by adapter");const e=[];if(1===t.length){const n=t[0];if(n.account!==E(this,u,"f"))throw new Error("invalid account");if(n.chain&&!(0,C.isSolanaChain)(n.chain))throw new Error("invalid chain");const r=E(this,i,"m",y).call(this,n.transaction),o=yield E(this,s,"f").signTransaction(r),a=(0,P.isVersionedTransaction)(o)?o.serialize():new Uint8Array(o.serialize({requireAllSignatures:!1,verifySignatures:!1}));e.push({signedTransaction:a})}else if(t.length>1){for(const e of t){if(e.account!==E(this,u,"f"))throw new Error("invalid account");if(e.chain&&!(0,C.isSolanaChain)(e.chain))throw new Error("invalid chain")}const n=t.map(e=>{let{transaction:t}=e;return E(this,i,"m",y).call(this,t)}),r=yield E(this,s,"f").signAllTransactions(n);e.push(...r.map(e=>({signedTransaction:(0,P.isVersionedTransaction)(e)?e.serialize():new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))})))}return e})}),_.set(this,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return x(r,void 0,void 0,function*(){if(!("signMessage"in E(this,s,"f")))throw new Error("signMessage not implemented by adapter");const e=[];if(1===t.length){const n=t[0];if(n.account!==E(this,u,"f"))throw new Error("invalid account");const r=yield E(this,s,"f").signMessage(n.message);e.push({signedMessage:n.message,signature:r})}else if(t.length>1)for(const n of t)e.push(...yield E(this,_,"f").call(this,n));return e})}),k.set(this,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return x(r,void 0,void 0,function*(){if(!("signIn"in E(this,s,"f")))throw new Error("signIn not implemented by adapter");if(t.length>1){const e=[];for(const n of t)e.push(yield E(this,s,"f").signIn(n));return e}return[yield E(this,s,"f").signIn(t[0])]})}),new.target===L&&Object.freeze(this);const g=[...e.supportedTransactionVersions||["legacy"]];g.length||g.push("legacy"),S(this,s,e,"f"),S(this,a,g,"f"),S(this,c,t,"f"),S(this,l,n,"f"),e.on("connect",E(this,i,"m",d),this),e.on("disconnect",E(this,i,"m",h),this),E(this,i,"m",d).call(this)}destroy(){E(this,s,"f").off("connect",E(this,i,"m",d),this),E(this,s,"f").off("disconnect",E(this,i,"m",h),this)}}t.SolanaWalletAdapterWallet=L,o=new WeakMap,s=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,w=new WeakMap,_=new WeakMap,k=new WeakMap,i=new WeakSet,d=function(){var e;const t=null===(e=E(this,s,"f").publicKey)||void 0===e?void 0:e.toBytes();if(t){const e=E(this,s,"f").publicKey.toBase58(),n=E(this,u,"f");n&&n.address===e&&!n.chains.includes(E(this,c,"f"))&&(0,B.bytesEqual)(n.publicKey,t)||(S(this,u,new j({adapter:E(this,s,"f"),address:e,publicKey:t,chains:[E(this,c,"f")]}),"f"),E(this,i,"m",g).call(this,"change",{accounts:this.accounts}))}},h=function(){E(this,u,"f")&&(S(this,u,void 0,"f"),E(this,i,"m",g).call(this,"change",{accounts:this.accounts}))},g=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i;null===(i=E(this,o,"f")[e])||void 0===i||i.forEach(e=>e.apply(null,n))},b=function(e,t){var n;E(this,o,"f")[e]=null===(n=E(this,o,"f")[e])||void 0===n?void 0:n.filter(e=>t!==e)},y=function(e){const t=T.VersionedTransaction.deserialize(e);if(!E(this,a,"f").includes(t.version))throw new Error("unsupported transaction version");return"legacy"===t.version&&(0,B.arraysEqual)(E(this,a,"f"),["legacy"])?T.Transaction.from(e):t}},3428:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLocalStorage=function(e,t){const n=(0,r.useState)(()=>{try{const t=localStorage.getItem(e);if(t)return JSON.parse(t)}catch(n){"undefined"!==typeof window&&console.error(n)}return t}),i=n[0],o=(0,r.useRef)(!0);return(0,r.useEffect)(()=>{if(o.current)o.current=!1;else try{null===i?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(i))}catch(t){"undefined"!==typeof window&&console.error(t)}},[i,e]),n};const r=n(2176)},3467:(e,t,n)=>{"use strict";n.d(t,{Ci:()=>s,J8:()=>a,MU:()=>c});var r=n(8551),i=n(8090),o=n(9603);class s extends i.C{constructor(e){let{body:t,cause:n,details:i,headers:s,status:a,url:c}=e;super("HTTP request failed.",{cause:n,details:i,metaMessages:[a&&"Status: ".concat(a),"URL: ".concat((0,o.I)(c)),t&&"Request body: ".concat((0,r.A)(t))].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=t,this.headers=s,this.status=a,this.url=c}}i.C;class a extends i.C{constructor(e){let{body:t,error:n,url:i}=e;super("RPC Request failed.",{cause:n,details:n.message,metaMessages:["URL: ".concat((0,o.I)(i)),"Request body: ".concat((0,r.A)(t))],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=n.code,this.data=n.data}}i.C;class c extends i.C{constructor(e){let{body:t,url:n}=e;super("The request took too long to respond.",{details:"The request timed out.",metaMessages:["URL: ".concat((0,o.I)(n)),"Request body: ".concat((0,r.A)(t))],name:"TimeoutError"})}}},3506:(e,t,n)=>{"use strict";n.d(t,{q:()=>i});var r=n(9740);function i(e,t){return n=>{let{exclude:i,format:o}=n;return{exclude:i,format:(e,n)=>{const s=t(e,n);if(i)for(const t of i)delete s[t];return(0,r.A)((0,r.A)({},s),o(e,n))},type:e}}}},3530:(e,t,n)=>{"use strict";n.d(t,{Af:()=>f,ZJ:()=>l,aT:()=>h});var r=n(8090),i=n(226),o=n(2370),s=n(6091),a=n(4456);const c=new TextEncoder;function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"number"===typeof e||"bigint"===typeof e?function(e,t){const n=(0,a.cK)(e,t);return h(n)}(e,t):"boolean"===typeof e?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new Uint8Array(1);if(n[0]=Number(e),"number"===typeof t.size)return(0,s.Sl)(n,{size:t.size}),(0,o.eV)(n,{size:t.size});return n}(e,t):(0,i.q)(e)?h(e,t):f(e,t)}const u={zero:48,nine:57,A:65,F:70,a:97,f:102};function d(e){return e>=u.zero&&e<=u.nine?e-u.zero:e>=u.A&&e<=u.F?e-(u.A-10):e>=u.a&&e<=u.f?e-(u.a-10):void 0}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e;t.size&&((0,s.Sl)(n,{size:t.size}),n=(0,o.eV)(n,{dir:"right",size:t.size}));let i=n.slice(2);i.length%2&&(i="0".concat(i));const a=i.length/2,c=new Uint8Array(a);for(let o=0,s=0;o<a;o++){const e=d(i.charCodeAt(s++)),t=d(i.charCodeAt(s++));if(void 0===e||void 0===t)throw new r.C('Invalid byte sequence ("'.concat(i[s-2]).concat(i[s-1],'" in "').concat(i,'").'));c[o]=16*e+t}return c}function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=c.encode(e);return"number"===typeof t.size?((0,s.Sl)(n,{size:t.size}),(0,o.eV)(n,{dir:"right",size:t.size})):n}},3563:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});const r={randomUUID:"undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var i=n(3648),o=n(2188);const s=function(e,t,n){var s,a,c,l;if(r.randomUUID&&!t&&!e)return r.randomUUID();const u=null!==(s=null!==(a=(e=e||{}).random)&&void 0!==a?a:null===(c=(l=e).rng)||void 0===c?void 0:c.call(l))&&void 0!==s?s:(0,i.A)();if(u.length<16)throw new Error("Random bytes length must be >= 16");if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError("UUID byte range ".concat(n,":").concat(n+15," is out of buffer bounds"));for(let e=0;e<16;++e)t[n+e]=u[e];return t}return(0,o.k)(u)}},3630:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var o=e(t),s=0;s<o.length;s++)"default"!==o[s]&&r(n,t,o[s]);return i(n,t),n}}();Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionProvider=void 0;const s=n(3342),a=o(n(2176)),c=n(7144);t.ConnectionProvider=e=>{let{children:t,endpoint:n,config:r={commitment:"confirmed"}}=e;const i=(0,a.useMemo)(()=>new s.Connection(n,r),[n,r]);return a.default.createElement(c.ConnectionContext.Provider,{value:{connection:i}},t)}},3648:(e,t,n)=>{"use strict";let r;n.d(t,{A:()=>o});const i=new Uint8Array(16);function o(){if(!r){if("undefined"===typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");r=crypto.getRandomValues.bind(crypto)}return r(i)}},3651:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(5844),t),i(n(7052),t),i(n(3845),t),i(n(1030),t),i(n(7559),t),i(n(7570),t)},3654:function(e,t){"use strict";var n,r,i,o,s,a,c=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},l=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};Object.defineProperty(t,"__esModule",{value:!0}),t.guard=t.pick=t.concatBytes=t.bytesEqual=t.arraysEqual=t.ReadonlyWalletAccount=void 0;class u{get address(){return c(this,n,"f")}get publicKey(){return c(this,r,"f").slice()}get chains(){return c(this,i,"f").slice()}get features(){return c(this,o,"f").slice()}get label(){return c(this,s,"f")}get icon(){return c(this,a,"f")}constructor(e){n.set(this,void 0),r.set(this,void 0),i.set(this,void 0),o.set(this,void 0),s.set(this,void 0),a.set(this,void 0),new.target===u&&Object.freeze(this),l(this,n,e.address,"f"),l(this,r,e.publicKey.slice(),"f"),l(this,i,e.chains.slice(),"f"),l(this,o,e.features.slice(),"f"),l(this,s,e.label,"f"),l(this,a,e.icon,"f")}}function d(e,t){if(e===t)return!0;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}t.ReadonlyWalletAccount=u,n=new WeakMap,r=new WeakMap,i=new WeakMap,o=new WeakMap,s=new WeakMap,a=new WeakMap,t.arraysEqual=d,t.bytesEqual=function(e,t){return d(e,t)},t.concatBytes=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=n.reduce((e,t)=>e+t.length,e.length),o=new Uint8Array(i);o.set(e,0);for(const s of n)o.set(s,o.length);return o},t.pick=function(e){const t={};for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(const o of r)t[o]=e[o];return t},t.guard=function(e){try{e()}catch(t){console.error(t)}}},3762:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWalletAdapterCompatibleWallet=void 0;const r=n(3651);t.isWalletAdapterCompatibleWallet=r.isWalletAdapterCompatibleStandardWallet},3808:(e,t,n)=>{"use strict";n.d(t,{DS:()=>S,OG:()=>_,Ph:()=>u,SJ:()=>E,aK:()=>v,d6:()=>s,dJ:()=>w,eV:()=>a,ex:()=>m,fg:()=>k,jN:()=>x,lX:()=>d,lq:()=>h,nC:()=>g,qj:()=>p,r4:()=>y,x:()=>A,z:()=>f,zW:()=>c});var r=n(2766);const i=BigInt(0),o=BigInt(1);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("boolean"!==typeof e){const n=t&&'"'.concat(t,'"');throw new Error(n+"expected boolean, got type="+typeof e)}return e}function a(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const i=(0,r.aY)(e),o=null===e||void 0===e?void 0:e.length,s=void 0!==t;if(!i||s&&o!==t){const r=n&&'"'.concat(n,'" '),a=s?" of length ".concat(t):"",c=i?"length=".concat(o):"type=".concat(typeof e);throw new Error(r+"expected Uint8Array"+a+", got "+c)}return e}function c(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function l(e){if("string"!==typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?i:BigInt("0x"+e)}function u(e){return l((0,r.My)(e))}function d(e){return(0,r.DO)(e),l((0,r.My)(Uint8Array.from(e).reverse()))}function h(e,t){return(0,r.aT)(e.toString(16).padStart(2*t,"0"))}function f(e,t){return h(e,t).reverse()}function p(e,t,n){let i;if("string"===typeof t)try{i=(0,r.aT)(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else{if(!(0,r.aY)(t))throw new Error(e+" must be hex string or Uint8Array");i=Uint8Array.from(t)}const o=i.length;if("number"===typeof n&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return i}function m(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return 0===n}function g(e){return Uint8Array.from(e)}const b=e=>"bigint"===typeof e&&i<=e;function y(e,t,n){return b(e)&&b(t)&&b(n)&&t<=e&&e<n}function v(e,t,n,r){if(!y(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function w(e){let t;for(t=0;e>i;e>>=o,t+=1);return t}const _=e=>(o<<BigInt(e))-o;function k(e,t,n){if("number"!==typeof e||e<2)throw new Error("hashLen must be a number");if("number"!==typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!==typeof n)throw new Error("hmacFn must be a function");const i=e=>new Uint8Array(e),o=e=>Uint8Array.of(e);let s=i(e),a=i(e),c=0;const l=()=>{s.fill(1),a.fill(0),c=0},u=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n(a,s,...t)},d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i(0);a=u(o(0),e),s=u(),0!==e.length&&(a=u(o(1),e),s=u())},h=()=>{if(c++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const n=[];for(;e<t;){s=u();const t=s.slice();n.push(t),e+=s.length}return(0,r.Id)(...n)};return(e,t)=>{let n;for(l(),d(e);!(n=t(h()));)d();return l(),n}}function x(e){return"function"===typeof e&&Number.isSafeInteger(e.outputLen)}function S(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||"object"!==typeof e)throw new Error("expected valid options object");function r(t,n,r){const i=e[t];if(r&&void 0===i)return;const o=typeof i;if(o!==n||null===i)throw new Error('param "'.concat(t,'" is invalid: expected ').concat(n,", got ").concat(o))}Object.entries(t).forEach(e=>{let[t,n]=e;return r(t,n,!1)}),Object.entries(n).forEach(e=>{let[t,n]=e;return r(t,n,!0)})}const E=()=>{throw new Error("not implemented")};function A(e){const t=new WeakMap;return function(n){const r=t.get(n);if(void 0!==r)return r;for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];const a=e(n,...o);return t.set(n,a),a}}},3845:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(t){o(t)}}function a(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},i=this&&this.__rest||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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseSignInMessageSignerWalletAdapter=t.BaseMessageSignerWalletAdapter=t.BaseSignerWalletAdapter=void 0;const o=n(5844),s=n(7052),a=n(7559);class c extends o.BaseWalletAdapter{sendTransaction(e,t){return r(this,arguments,void 0,function(e,t){var n=this;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){let o=!0;try{if((0,a.isVersionedTransaction)(e)){if(!n.supportedTransactionVersions)throw new s.WalletSendTransactionError("Sending versioned transactions isn't supported by this wallet");if(!n.supportedTransactionVersions.has(e.version))throw new s.WalletSendTransactionError("Sending transaction version ".concat(e.version," isn't supported by this wallet"));try{const i=(e=yield n.signTransaction(e)).serialize();return yield t.sendRawTransaction(i,r)}catch(c){if(c instanceof s.WalletSignTransactionError)throw o=!1,c;throw new s.WalletSendTransactionError(null===c||void 0===c?void 0:c.message,c)}}else try{const{signers:o}=r,s=i(r,["signers"]);e=yield n.prepareTransaction(e,t,s),(null===o||void 0===o?void 0:o.length)&&e.partialSign(...o);const a=(e=yield n.signTransaction(e)).serialize();return yield t.sendRawTransaction(a,s)}catch(c){if(c instanceof s.WalletSignTransactionError)throw o=!1,c;throw new s.WalletSendTransactionError(null===c||void 0===c?void 0:c.message,c)}}catch(c){throw o&&n.emit("error",c),c}}()})}signAllTransactions(e){return r(this,void 0,void 0,function*(){for(const n of e)if((0,a.isVersionedTransaction)(n)){if(!this.supportedTransactionVersions)throw new s.WalletSignTransactionError("Signing versioned transactions isn't supported by this wallet");if(!this.supportedTransactionVersions.has(n.version))throw new s.WalletSignTransactionError("Signing transaction version ".concat(n.version," isn't supported by this wallet"))}const t=[];for(const n of e)t.push(yield this.signTransaction(n));return t})}}t.BaseSignerWalletAdapter=c;class l extends c{}t.BaseMessageSignerWalletAdapter=l;t.BaseSignInMessageSignerWalletAdapter=class extends l{}},3905:(e,t,n)=>{"use strict";var r=n(2176);function i(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var s={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},a=Symbol.for("react.portal");var c=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){return"font"===e?"":"string"===typeof t?"use-credentials"===t?t:"":void 0}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(i(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:a,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=c.T,n=s.p;try{if(c.T=null,s.p=2,e)return e()}finally{c.T=t,s.p=n,s.d.f()}},t.preconnect=function(e,t){"string"===typeof e&&(t?t="string"===typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,s.d.C(e,t))},t.prefetchDNS=function(e){"string"===typeof e&&s.d.D(e)},t.preinit=function(e,t){if("string"===typeof e&&t&&"string"===typeof t.as){var n=t.as,r=l(n,t.crossOrigin),i="string"===typeof t.integrity?t.integrity:void 0,o="string"===typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?s.d.S(e,"string"===typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):"script"===n&&s.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:"string"===typeof t.nonce?t.nonce:void 0})}},t.preinitModule=function(e,t){if("string"===typeof e)if("object"===typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=l(t.as,t.crossOrigin);s.d.M(e,{crossOrigin:n,integrity:"string"===typeof t.integrity?t.integrity:void 0,nonce:"string"===typeof t.nonce?t.nonce:void 0})}}else null==t&&s.d.M(e)},t.preload=function(e,t){if("string"===typeof e&&"object"===typeof t&&null!==t&&"string"===typeof t.as){var n=t.as,r=l(n,t.crossOrigin);s.d.L(e,n,{crossOrigin:r,integrity:"string"===typeof t.integrity?t.integrity:void 0,nonce:"string"===typeof t.nonce?t.nonce:void 0,type:"string"===typeof t.type?t.type:void 0,fetchPriority:"string"===typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"string"===typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"===typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"===typeof t.imageSizes?t.imageSizes:void 0,media:"string"===typeof t.media?t.media:void 0})}},t.preloadModule=function(e,t){if("string"===typeof e)if(t){var n=l(t.as,t.crossOrigin);s.d.m(e,{as:"string"===typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"===typeof t.integrity?t.integrity:void 0})}else s.d.m(e)},t.requestFormReset=function(e){s.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},t.useFormStatus=function(){return c.H.useHostTransitionStatus()},t.version="19.1.0"},3932:e=>{"use strict";var t={single_source_shortest_paths:function(e,n,r){var i={},o={};o[n]=0;var s,a,c,l,u,d,h,f=t.PriorityQueue.make();for(f.push(n,0);!f.empty();)for(c in a=(s=f.pop()).value,l=s.cost,u=e[a]||{})u.hasOwnProperty(c)&&(d=l+u[c],h=o[c],("undefined"===typeof o[c]||h>d)&&(o[c]=d,f.push(c,d),i[c]=a));if("undefined"!==typeof r&&"undefined"===typeof o[r]){var p=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(p)}return i},extract_shortest_path_from_predecessor_list:function(e,t){for(var n=[],r=t;r;)n.push(r),e[r],r=e[r];return n.reverse(),n},find_path:function(e,n,r){var i=t.single_source_shortest_paths(e,n,r);return t.extract_shortest_path_from_predecessor_list(i,r)},PriorityQueue:{make:function(e){var n,r=t.PriorityQueue,i={};for(n in e=e||{},r)r.hasOwnProperty(n)&&(i[n]=r[n]);return i.queue=[],i.sorter=e.sorter||r.default_sorter,i},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){var n={value:e,cost:t};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},3960:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,s){if("function"!==typeof r)throw new TypeError("The listener must be a function");var a=new i(r,o||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,s=new Array(o);i<o;i++)s[i]=r[i].fn;return s},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,o,s){var a=n?n+e:e;if(!this._events[a])return!1;var c,l,u=this._events[a],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,i),!0;case 5:return u.fn.call(u.context,t,r,i,o),!0;case 6:return u.fn.call(u.context,t,r,i,o,s),!0}for(l=1,c=new Array(d-1);l<d;l++)c[l-1]=arguments[l];u.fn.apply(u.context,c)}else{var h,f=u.length;for(l=0;l<f;l++)switch(u[l].once&&this.removeListener(e,u[l].fn,void 0,!0),d){case 1:u[l].fn.call(u[l].context);break;case 2:u[l].fn.call(u[l].context,t);break;case 3:u[l].fn.call(u[l].context,t,r);break;case 4:u[l].fn.call(u[l].context,t,r,i);break;default:if(!c)for(h=1,c=new Array(d-1);h<d;h++)c[h-1]=arguments[h];u[l].fn.apply(u[l].context,c)}}return!0},a.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var o=n?n+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||s(this,o);else{for(var c=0,l=[],u=a.length;c<u;c++)(a[c].fn!==t||i&&!a[c].once||r&&a[c].context!==r)&&l.push(a[c]);l.length?this._events[o]=1===l.length?l[0]:l:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a},3989:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(3905)},3990:e=>{"use strict";e.exports=JSON.parse('{"openrpc":"1.2.4","info":{"title":"MetaMask MultiChain API","version":"1.0.0","description":"This provides the specs for the MultiChain API Layer for the MetaMask API"},"methods":[{"name":"wallet_notify","paramStructure":"by-name","params":[{"name":"scope","description":"a valid `scope` string that has been previously authorized via `provider_authorize`","required":true,"schema":{"$ref":"#/components/schemas/ScopeString"}},{"name":"notification","description":"an object containing a JSON-RPC notification with `method` and `params`","deprecated":false,"required":true,"schema":{"type":"object","properties":{"method":{"type":"string"},"params":true}}}]},{"name":"wallet_invokeMethod","paramStructure":"by-name","params":[{"name":"scope","description":"a valid `scope` string that has been previously authorized via `provider_authorize`","required":true,"schema":{"$ref":"#/components/schemas/ScopeString"}},{"name":"request","description":"an object containing a JSON-RPC request with `method` and `params`","deprecated":false,"required":true,"schema":{"type":"object","properties":{"method":{"type":"string"},"params":true}}}],"result":{"name":"wallet_invokeMethodResult","schema":true},"examples":[{"name":"wallet_invokeMethodExample","params":[{"name":"scope","value":"eip155:1"},{"name":"request","value":{"method":"eth_getBalance","params":[]}}],"result":{"name":"wallet_invokeMethodResult","value":"0x1"}}]},{"name":"wallet_revokeSession","description":"The `wallet_revokeSession` method revokes the entire active session.","params":[],"result":{"name":"wallet_revokeSessionResult","schema":{"type":"boolean"}},"examples":[{"name":"wallet_revokeSessionExample","params":[],"result":{"name":"wallet_revokeSessionExampleResult","value":true}}],"errors":[{"$ref":"#/components/errors/UnknownError"}]},{"name":"wallet_sessionChanged","paramStructure":"by-name","description":"This notification is published by the wallet to notify the callers of updates to a shared session\'s authorization scopes. The event payload contains the new `sessionScopes`.","params":[{"name":"sessionScopes","schema":{"$ref":"#/components/schemas/SessionScopes"}}],"examples":[{"name":"wallet_sessionChangedExample","description":"Example of a wallet_sessionChanged notification.","params":[{"name":"sessionScopes","value":{"eip155:1337":{"accounts":["eip155:1337:0x5cfe73b6021e818b776b421b1c4db2474086a7e1"],"methods":["personal_sign","eth_signTypedData_v4","wallet_watchAsset","eth_sendTransaction","eth_decrypt","eth_getEncryptionPublicKey","web3_clientVersion","eth_subscribe","eth_unsubscribe","wallet_swapAsset","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"],"notifications":["eth_subscription"]},"wallet":{"accounts":[],"methods":["wallet_registerOnboarding","wallet_scanQRCode"],"notifications":[]},"wallet:eip155":{"accounts":["wallet:eip155:0x5cfe73b6021e818b776b421b1c4db2474086a7e1"],"methods":["wallet_addEthereumChain"],"notifications":[]}}}]}]},{"name":"wallet_getSession","description":"The `wallet_getSession` method returns an active session.","params":[],"result":{"name":"wallet_getSessionResult","schema":{"type":"object","properties":{"sessionScopes":{"$ref":"#/components/schemas/SessionScopes"}}}},"examples":[{"name":"wallet_getSessionExample","description":"Example of a getSession request.","params":[],"result":{"name":"wallet_getSessionResultExample","value":{"sessionScopes":{"eip155:1337":{"accounts":["eip155:1337:0x5cfe73b6021e818b776b421b1c4db2474086a7e1"],"methods":["personal_sign","eth_signTypedData_v4","wallet_watchAsset","eth_sendTransaction","eth_decrypt","eth_getEncryptionPublicKey","web3_clientVersion","eth_subscribe","eth_unsubscribe","wallet_swapAsset","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"],"notifications":["eth_subscription"]},"wallet":{"accounts":[],"methods":["wallet_registerOnboarding","wallet_scanQRCode"],"notifications":[]},"wallet:eip155":{"accounts":["wallet:eip155:0x5cfe73b6021e818b776b421b1c4db2474086a7e1"],"methods":["wallet_addEthereumChain"],"notifications":[]}}}}}]},{"name":"wallet_createSession","paramStructure":"by-name","params":[{"name":"requiredScopes","description":"Scopes that the wallet must support in order to be used with this provider.","schema":{"type":"object","patternProperties":{"[-a-z0-9]{3,8}(:[-_a-zA-Z0-9]{1,32})?":{"$ref":"#/components/schemas/Scope"}}}},{"name":"optionalScopes","description":"Scopes that the wallet may support in order to be used with this provider.","schema":{"type":"object","patternProperties":{"[-a-z0-9]{3,8}(:[-_a-zA-Z0-9]{1,32})?":{"$ref":"#/components/schemas/Scope"}}}},{"name":"sessionProperties","description":"Properties that the wallet may use to determine if the session is valid.","schema":{"type":"object"}}],"result":{"name":"wallet_createSessionResult","schema":{"type":"object","properties":{"sessionScopes":{"$ref":"#/components/schemas/SessionScopes"},"sessionProperties":{"type":"object"}}}},"examples":[{"name":"wallet_createSessionEthExample","description":"Example of a createSession request.","params":[{"name":"optionalScopes","value":{"eip155:1337":{"methods":["wallet_watchAsset","eth_sendTransaction","eth_decrypt","eth_getEncryptionPublicKey","web3_clientVersion","eth_subscribe","eth_unsubscribe","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"],"notifications":["eth_subscription"]},"wallet":{"methods":["wallet_registerOnboarding","wallet_scanQRCode"],"notifications":[]},"wallet:eip155":{"methods":["wallet_addEthereumChain"],"notifications":[]}}}],"result":{"name":"wallet_createSessionResultExample","value":{"sessionProperties":{},"sessionScopes":{"eip155:1337":{"accounts":["eip155:1337:0x5cfe73b6021e818b776b421b1c4db2474086a7e1"],"methods":["personal_sign","eth_signTypedData_v4","wallet_watchAsset","eth_sendTransaction","eth_decrypt","eth_getEncryptionPublicKey","web3_clientVersion","eth_subscribe","eth_unsubscribe","wallet_swapAsset","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"],"notifications":["eth_subscription"]},"wallet":{"accounts":[],"methods":["wallet_registerOnboarding","wallet_scanQRCode"],"notifications":[]},"wallet:eip155":{"accounts":["wallet:eip155:0x5cfe73b6021e818b776b421b1c4db2474086a7e1"],"methods":["wallet_addEthereumChain"],"notifications":[]}}}}},{"name":"wallet_createSessionEthUnsupportedMethodsExample","description":"Example of a createSession request with unsupported eip155 methods.","params":[{"name":"optionalScopes","value":{"eip155:1337":{"methods":["not_supported"],"notifications":[]},"wallet":{"methods":[],"notifications":[]},"wallet:eip155":{"methods":[],"notifications":[]}}}],"result":{"name":"wallet_createSessionEthUnsupportedMethodsResultExample","value":{"sessionProperties":{},"sessionScopes":{"eip155:1337":{"accounts":["eip155:1337:0x5cfe73b6021e818b776b421b1c4db2474086a7e1"],"methods":["personal_sign","eth_signTypedData_v4","wallet_watchAsset","eth_sendTransaction","eth_decrypt","eth_getEncryptionPublicKey","web3_clientVersion","eth_subscribe","eth_unsubscribe","wallet_swapAsset","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"],"notifications":["eth_subscription"]},"wallet":{"accounts":[],"methods":["wallet_registerOnboarding","wallet_scanQRCode"],"notifications":[]},"wallet:eip155":{"accounts":["wallet:eip155:0x5cfe73b6021e818b776b421b1c4db2474086a7e1"],"methods":["wallet_addEthereumChain"],"notifications":[]}}}}},{"name":"wallet_createSessionUnsupportedScopesExample","description":"Example of a createSession request with unsupported scopes.","params":[{"name":"optionalScopes","value":{"foobar":{"methods":["eth_getBalance"],"notifications":["eth_subscription"]},"eip155:1":{"accounts":["eip155:1:0x5cfe73b6021e818b776b421b1c4db2474086a7e1"],"methods":["personal_sign","eth_signTypedData_v4","wallet_watchAsset","eth_sendTransaction","eth_decrypt","eth_getEncryptionPublicKey","web3_clientVersion","eth_subscribe","eth_unsubscribe","wallet_swapAsset","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"],"notifications":["eth_subscription"]}}}],"result":{"name":"wallet_createSessionUnsupportedScopesResultExample","value":{"sessionProperties":{},"sessionScopes":{"eip155:1":{"accounts":["eip155:1:0x5cfe73b6021e818b776b421b1c4db2474086a7e1"],"methods":["personal_sign","eth_signTypedData_v4","wallet_watchAsset","eth_sendTransaction","eth_decrypt","eth_getEncryptionPublicKey","web3_clientVersion","eth_subscribe","eth_unsubscribe","wallet_swapAsset","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter"],"notifications":["eth_subscription"]}}}}}],"errors":[{"$ref":"#/components/errors/UnknownError"},{"code":5100,"message":"Requested networks are not supported"},{"code":5101,"message":"Requested methods are not supported"},{"code":5102,"message":"Requested notifications are not supported"},{"code":5300,"message":"Invalid scopedProperties requested"},{"code":5301,"message":"scopedProperties can only be outside of sessionScopes"},{"code":5302,"message":"Invalid sessionProperties requested"}]}],"components":{"errors":{"UnknownError":{"code":5000,"message":"Unknown error with request"}},"schemas":{"SessionScopes":{"type":"object","patternProperties":{"[-a-z0-9]{3,8}(:[-_a-zA-Z0-9]{1,32})?":{"$ref":"#/components/schemas/Scope"}}},"ScopeString":{"type":"string","pattern":"[-a-z0-9]{3,8}(:[-_a-zA-Z0-9]{1,32})?"},"Scope":{"type":"object","title":"Scope","description":"Scope for a multi-chain connection","additionalProperties":true,"required":["notifications","methods"],"properties":{"scopes":{"type":"array","items":{"$ref":"#/components/schemas/ScopeString"}},"methods":{"description":"Methods that the wallet must support in order to be used with this provider.","type":"array","items":{"type":"string"}},"notifications":{"description":"Notifications that the wallet must support in order to be used with this provider.","type":"array","items":{"type":"string"}},"rpcEndpoints":{"description":"JSON-RPC endpoints for this namespace.","type":"array","items":{"type":"string","format":"uri"}},"rpcDocuments":{"type":"array","description":"OpenRPC documents that define RPC methods in which to anchor the methods authorized in a CAIP-25 interaction.","items":{"type":"string","format":"uri"}}}}}}}')},4015:(e,t,n)=>{"use strict";function r(e,t){const n=e.exec(t);return null===n||void 0===n?void 0:n.groups}n.d(t,{BD:()=>i,Ge:()=>o,Yv:()=>r,wj:()=>s});const i=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,o=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,s=/^\(.+?\).*?$/},4045:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaSignAndSendTransaction=void 0,t.SolanaSignAndSendTransaction="solana:signAndSendTransaction"},4176:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useWalletConnectButton=function(){const{connect:e,connected:t,connecting:n,wallet:o}=(0,r.useWallet)();let s;s=n?"connecting":t?"connected":o?"has-wallet":"no-wallet";const a=(0,i.useCallback)(()=>{e().catch(()=>{})},[e]);return{buttonDisabled:"has-wallet"!==s,buttonState:s,onButtonClick:"has-wallet"===s?a:void 0,walletIcon:null===o||void 0===o?void 0:o.adapter.icon,walletName:null===o||void 0===o?void 0:o.adapter.name}};const r=n(5059),i=n(2176)},4223:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{A:()=>r})},4226:(e,t,n)=>{"use strict";const r=n(882).v4,i=n(9517),o=function(e,t){if(!(this instanceof o))return new o(e,t);t||(t={}),this.options={reviver:"undefined"!==typeof t.reviver?t.reviver:null,replacer:"undefined"!==typeof t.replacer?t.replacer:null,generator:"undefined"!==typeof t.generator?t.generator:function(){return r()},version:"undefined"!==typeof t.version?t.version:2,notificationIdNull:"boolean"===typeof t.notificationIdNull&&t.notificationIdNull},this.callServer=e};e.exports=o,o.prototype.request=function(e,t,n,r){const o=this;let s=null;const a=Array.isArray(e)&&"function"===typeof t;if(1===this.options.version&&a)throw new TypeError("JSON-RPC 1.0 does not support batching");if(a||!a&&e&&"object"===typeof e&&"function"===typeof t)r=t,s=e;else{"function"===typeof n&&(r=n,n=void 0);const o="function"===typeof r;try{s=i(e,t,n,{generator:this.options.generator,version:this.options.version,notificationIdNull:this.options.notificationIdNull})}catch(l){if(o)return r(l);throw l}if(!o)return s}let c;try{c=JSON.stringify(s,this.options.replacer)}catch(l){return r(l)}return this.callServer(c,function(e,t){o._parseResponse(e,t,r)}),s},o.prototype._parseResponse=function(e,t,n){if(e)return void n(e);if(!t)return n();let r;try{r=JSON.parse(t,this.options.reviver)}catch(e){return n(e)}if(3===n.length){if(Array.isArray(r)){const e=function(e){return"undefined"!==typeof e.error},t=function(t){return!e(t)};return n(null,r.filter(e),r.filter(t))}return n(null,r.error,r.result)}n(null,r)}},4235:(e,t,n)=>{"use strict";n.d(t,{Hi:()=>s,ft:()=>a,uj:()=>l});var r=n(4223),i=n(8090);const o=["address"];class s extends i.C{constructor(e){let{address:t}=e;super('State for account "'.concat(t,'" is set multiple times.'),{name:"AccountStateConflictError"})}}class a extends i.C{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function c(e){return e.reduce((e,t)=>{let{slot:n,value:r}=t;return"".concat(e," ").concat(n,": ").concat(r,"\n")},"")}function l(e){return e.reduce((e,t)=>{let{address:n}=t,i=(0,r.A)(t,o),s="".concat(e," ").concat(n,":\n");return i.nonce&&(s+=" nonce: ".concat(i.nonce,"\n")),i.balance&&(s+=" balance: ".concat(i.balance,"\n")),i.code&&(s+=" code: ".concat(i.code,"\n")),i.state&&(s+=" state:\n",s+=c(i.state)),i.stateDiff&&(s+=" stateDiff:\n",s+=c(i.stateDiff)),s}," State Override:\n").slice(0,-1)}},4282:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const r=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;const i=function(e){return"string"===typeof e&&r.test(e)}},4335:(e,t)=>{const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let e=1;for(let t=0;t<255;t++)n[t]=e,r[e]=t,e<<=1,256&e&&(e^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),t.log=function(e){if(e<1)throw new Error("log("+e+")");return r[e]},t.exp=function(e){return n[e]},t.mul=function(e,t){return 0===e||0===t?0:n[r[e]+r[t]]}},4357:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LocalSolanaMobileWalletAdapter:()=>kn,RemoteSolanaMobileWalletAdapter:()=>xn,SolanaMobileWalletAdapter:()=>Sn,SolanaMobileWalletAdapterRemoteWalletName:()=>vn,SolanaMobileWalletAdapterWalletName:()=>yn,createDefaultAddressSelector:()=>En,createDefaultAuthorizationResultCache:()=>An,createDefaultWalletNotFoundHandler:()=>Cn});var r=n(3651),i=n(3342),o=n(6345),s=n(1411),a=n(7282),c=n(9740);function l(e){return Object.freeze((0,c.A)((0,c.A)({},e),{},{decode:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.read(t,n)[0]}}))}var u=e=>l({read(t,n){const r=0===n?t:t.slice(n);if(0===r.length)return["",0];let i=r.findIndex(e=>0!==e);i=-1===i?r.length:i;const o=e[0].repeat(i);if(i===r.length)return[o,t.length];const s=function(e,t){const n=BigInt(t.length),r=[];for(;e>0n;)r.unshift(t[Number(e%n)]),e/=n;return r.join("")}(r.slice(i).reduce((e,t)=>256n*e+BigInt(t),0n),e);return[o+s,t.length]}});var d="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";globalThis.TextDecoder,globalThis.TextEncoder;const h="ERROR_ASSOCIATION_PORT_OUT_OF_RANGE",f="ERROR_FORBIDDEN_WALLET_BASE_URL",p="ERROR_SECURE_CONTEXT_REQUIRED",m="ERROR_SESSION_CLOSED",g="ERROR_SESSION_TIMEOUT",b="ERROR_WALLET_NOT_FOUND",y="ERROR_INVALID_PROTOCOL_VERSION";class v extends Error{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,i,o]=t;super(i),this.code=r,this.data=o,this.name="SolanaMobileWalletAdapterError"}}class w extends Error{constructor(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,i,o,s]=t;super(o),this.code=i,this.data=s,this.jsonRpcMessageId=r,this.name="SolanaMobileWalletAdapterProtocolError"}}function _(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(t){o(t)}}function a(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}function k(e,t){const n=window.btoa(String.fromCharCode.call(null,...e));return t?n.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):n}function x(e){return new Uint8Array(window.atob(e).split("").map(e=>e.charCodeAt(0)))}function S(e,t){return _(this,void 0,void 0,function*(){const n=yield crypto.subtle.exportKey("raw",e),r=yield crypto.subtle.sign({hash:"SHA-256",name:"ECDSA"},t,n),i=new Uint8Array(n.byteLength+r.byteLength);return i.set(new Uint8Array(n),0),i.set(new Uint8Array(r),n.byteLength),i})}function E(e){return(t=function(e){return(0,a.createSignInMessageText)(e)}(e),window.btoa(t)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");var t}const A="solana:signTransactions",P="solana:cloneAuthorization";function C(e){return u(d).decode(e)}function I(e){return C(x(e))}function M(e,t){return new Proxy({},{get:(n,r)=>"then"===r?null:(null==n[r]&&(n[r]=function(n){return _(this,void 0,void 0,function*(){const{method:i,params:o}=function(e,t,n){let r=t,i=e.toString().replace(/[A-Z]/g,e=>"_".concat(e.toLowerCase())).toLowerCase();switch(e){case"authorize":{let{chain:e}=r;if("legacy"===n){switch(e){case"solana:testnet":e="testnet";break;case"solana:devnet":e="devnet";break;case"solana:mainnet":e="mainnet-beta";break;default:e=r.cluster}r.cluster=e}else{switch(e){case"testnet":case"devnet":e="solana:".concat(e);break;case"mainnet-beta":e="solana:mainnet"}r.chain=e}}case"reauthorize":{const{auth_token:e,identity:t}=r;if(e)if("legacy"===n)i="reauthorize",r={auth_token:e,identity:t};else i="authorize";break}}return{method:i,params:r}}(r,n,e),s=yield t(i,o);return"authorize"===i&&o.sign_in_payload&&!s.sign_in_result&&(s.sign_in_result=yield function(e,t,n){var r;return _(this,void 0,void 0,function*(){const i=null!==(r=e.domain)&&void 0!==r?r:window.location.host,o=t.accounts[0].address,s=E(Object.assign(Object.assign({},e),{domain:i,address:I(o)})),a=x((yield n("sign_messages",{addresses:[o],payloads:[s]})).signed_payloads[0]),c=k(a.slice(0,a.length-64)),l=k(a.slice(a.length-64));return{address:o,signed_message:0==c.length?s:c,signature:l}})}(o.sign_in_payload,s,t)),function(e,t,n){if("getCapabilities"===e){const e=t;switch(n){case"legacy":{const t=[A];return!0===e.supports_clone_authorization&&t.push(P),Object.assign(Object.assign({},e),{features:t})}case"v1":return Object.assign(Object.assign({},e),{supports_sign_and_send_transactions:!0,supports_clone_authorization:e.features.includes(P)})}}return t}(r,s,e)})}),n[r]),defineProperty:()=>!1,deleteProperty:()=>!1})}function T(e,t,n){return _(this,void 0,void 0,function*(){const r=function(e){if(e>=4294967296)throw new Error("Outbound sequence number overflow. The maximum sequence number is 32-bytes.");const t=new ArrayBuffer(4);return new DataView(t).setUint32(0,e,!1),new Uint8Array(t)}(t),i=new Uint8Array(12);crypto.getRandomValues(i);const o=yield crypto.subtle.encrypt(N(r,i),n,(new TextEncoder).encode(e)),s=new Uint8Array(r.byteLength+i.byteLength+o.byteLength);return s.set(new Uint8Array(r),0),s.set(new Uint8Array(i),r.byteLength),s.set(new Uint8Array(o),r.byteLength+i.byteLength),s})}function O(e,t){return _(this,void 0,void 0,function*(){const n=e.slice(0,4),r=e.slice(4,16),i=e.slice(16),o=yield crypto.subtle.decrypt(N(n,r),t,i);return function(){void 0===B&&(B=new TextDecoder("utf-8"));return B}().decode(o)})}function N(e,t){return{additionalData:e,iv:t,name:"AES-GCM",tagLength:128}}let B;function R(){return _(this,void 0,void 0,function*(){return yield crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign"])})}function j(){return _(this,void 0,void 0,function*(){return yield crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!1,["deriveKey","deriveBits"])})}function L(e){let t="";const n=new Uint8Array(e),r=n.byteLength;for(let i=0;i<r;i++)t+=String.fromCharCode(n[i]);return window.btoa(t)}function F(e){if(e<49152||e>65535)throw new v(h,"Association port number must be between 49152 and 65535. ".concat(e," given."),{port:e});return e}function z(e){return e.replace(/[/+=]/g,e=>({"/":"_","+":"-","=":"."}[e]))}function D(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function U(e,t){let n=null;if(t){try{n=new URL(t)}catch(i){}if("https:"!==(null===n||void 0===n?void 0:n.protocol))throw new v(f,"Base URLs supplied by wallets must be valid `https` URLs")}n||(n=new URL("".concat("solana-wallet",":/")));const r=e.startsWith("/")?e:[...D(n.pathname),...D(e)].join("/");return new URL(r,n)}function W(e,t){return _(this,void 0,void 0,function*(){return T(JSON.stringify(e),e.id,t)})}function q(e,t){return _(this,void 0,void 0,function*(){const n=yield O(e,t),r=JSON.parse(n);if(Object.hasOwnProperty.call(r,"error"))throw new w(r.id,r.error.code,r.error.message);return r})}function H(e,t,n){return _(this,void 0,void 0,function*(){const[r,i]=yield Promise.all([crypto.subtle.exportKey("raw",t),crypto.subtle.importKey("raw",e.slice(0,65),{name:"ECDH",namedCurve:"P-256"},!1,[])]),o=yield crypto.subtle.deriveBits({name:"ECDH",public:i},n,256),s=yield crypto.subtle.importKey("raw",o,"HKDF",!1,["deriveKey"]);return yield crypto.subtle.deriveKey({name:"HKDF",hash:"SHA-256",salt:new Uint8Array(r),info:new Uint8Array},s,{name:"AES-GCM",length:128},!1,["encrypt","decrypt"])})}function K(e,t){return _(this,void 0,void 0,function*(){const n=yield O(e,t),r=JSON.parse(n);let i="legacy";if(Object.hasOwnProperty.call(r,"v"))switch(r.v){case 1:case"1":case"v1":i="v1";break;case"legacy":i="legacy";break;default:throw new v(y,"Unknown/unsupported protocol version: ".concat(r.v))}return{protocol_version:i}})}const V=0,$=1;let G=null;function Z(e){return _(this,void 0,void 0,function*(){if("https:"===e.protocol)window.location.assign(e);else try{const n=-1!==navigator.userAgent.indexOf("Firefox/")?V:$;switch(n){case V:t=e,null==G&&(G=document.createElement("iframe"),G.style.display="none",document.body.appendChild(G)),G.contentWindow.location.href=t.toString();break;case $:{const t=new Promise((e,t)=>{function n(){clearTimeout(i),window.removeEventListener("blur",r)}function r(){n(),e()}window.addEventListener("blur",r);const i=setTimeout(()=>{n(),t()},3e3)});window.location.assign(e),yield t;break}}}catch(n){throw new v(b,"Found no installed wallet that supports the mobile wallet protocol.")}var t})}function J(e,t){return _(this,void 0,void 0,function*(){const n=F(49152+Math.floor(16384*Math.random())),r=yield function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["v1"];return _(this,void 0,void 0,function*(){const i=F(t),o=L(yield crypto.subtle.exportKey("raw",e)),s=U("v1/associate/local",n);return s.searchParams.set("association",z(o)),s.searchParams.set("port","".concat(i)),r.forEach(e=>{s.searchParams.set("v",e)}),s})}(e,n,t);return yield Z(r),n})}const Y={retryDelayScheduleMs:[150,150,200,500,500,750,750,1e3],timeoutMs:3e4},Q="com.solana.mobilewalletadapter.v1",X="com.solana.mobilewalletadapter.v1.base64";function ee(){if("undefined"===typeof window||!0!==window.isSecureContext)throw new v(p,"The mobile wallet adapter protocol must be used in a secure context (`https`).")}function te(e){let t;try{t=new URL(e)}catch(n){throw new v(f,"Invalid base URL supplied by wallet")}if("https:"!==t.protocol)throw new v(f,"Base URLs supplied by wallets must be valid `https` URLs")}function ne(e){return new DataView(e).getUint32(0,!1)}function re(e){let{value:t,offset:n}=function(e){var t,n=new Uint8Array(e),r=e.byteLength,i=0,o=0;do{if(o>=r||o>10)throw new RangeError("Failed to decode varint");i|=(127&(t=n[o++]))<<7*o}while(t>=128);return{value:i,offset:o}}(e);return new Uint8Array(e.slice(n,n+t))}function ie(e){return _(this,void 0,void 0,function*(){ee();const t=yield R(),n="wss://".concat(null===e||void 0===e?void 0:e.remoteHostAuthority,"/reflect");let r;const i=(()=>{const e=[...Y.retryDelayScheduleMs];return()=>e.length>1?e.shift():e[0]})();let o,s,a,c=1,l=0,u={__type:"disconnected"},d=e=>_(this,void 0,void 0,function*(){if("base64"==o){return x(yield e.data).buffer}return yield e.data.arrayBuffer()});const h=yield new Promise((c,l)=>{const h=()=>_(this,void 0,void 0,function*(){"connecting"===u.__type?(o=s.protocol.includes(X)?"base64":"binary",s.removeEventListener("open",h)):console.warn("Expected adapter state to be `connecting` at the moment the websocket opens. "+"Got `".concat(u.__type,"`."))}),f=e=>{e.wasClean?u={__type:"disconnected"}:l(new v(m,"The wallet session dropped unexpectedly (".concat(e.code,": ").concat(e.reason,")."),{closeEvent:e})),a()},p=e=>_(this,void 0,void 0,function*(){a(),Date.now()-r>=Y.timeoutMs?l(new v(g,"Failed to connect to the wallet websocket at ".concat(n,"."))):(yield new Promise(e=>{const t=i();y=window.setTimeout(e,t)}),w())}),b=n=>_(this,void 0,void 0,function*(){const r=yield d(n);if("connecting"===u.__type){if(0==r.byteLength)throw new Error("Encountered unexpected message while connecting");const n=re(r);u={__type:"reflector_id_received",reflectorId:n};const i=yield function(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:["v1"];return _(this,void 0,void 0,function*(){const o=L(yield crypto.subtle.exportKey("raw",e)),s=U("v1/associate/remote",r);return s.searchParams.set("association",z(o)),s.searchParams.set("reflector","".concat(t)),s.searchParams.set("id","".concat(k(n,!0))),i.forEach(e=>{s.searchParams.set("v",e)}),s})}(t.publicKey,e.remoteHostAuthority,n,null===e||void 0===e?void 0:e.baseUri);s.removeEventListener("message",b),c(i)}});let y;const w=()=>{a&&a(),u={__type:"connecting",associationKeypair:t},void 0===r&&(r=Date.now()),s=new WebSocket(n,[Q,X]),s.addEventListener("open",h),s.addEventListener("close",f),s.addEventListener("error",p),s.addEventListener("message",b),a=()=>{window.clearTimeout(y),s.removeEventListener("open",h),s.removeEventListener("close",f),s.removeEventListener("error",p),s.removeEventListener("message",b)}};w()});let f,p=!1;return{associationUrl:h,close:()=>{s.close(),f()},wallet:new Promise((e,n)=>{const r={},i=i=>_(this,void 0,void 0,function*(){const a=yield d(i);switch(u.__type){case"reflector_id_received":if(0!==a.byteLength)throw new Error("Encountered unexpected message while awaiting reflection");const i=yield j(),d=yield S(i.publicKey,t.privateKey);"base64"==o?s.send(k(d)):s.send(d),u={__type:"hello_req_sent",associationPublicKey:t.publicKey,ecdhPrivateKey:i.privateKey};break;case"connected":try{const e=ne(a.slice(0,4));if(e!==l+1)throw new Error("Encrypted message has invalid sequence number");l=e;const t=yield q(a,u.sharedSecret),n=r[t.id];delete r[t.id],n.resolve(t.result)}catch(h){if(!(h instanceof w))throw h;{const e=r[h.jsonRpcMessageId];delete r[h.jsonRpcMessageId],e.reject(h)}}break;case"hello_req_sent":{const t=yield H(a,u.associationPublicKey,u.ecdhPrivateKey),i=a.slice(65),d=0!==i.byteLength?yield(()=>_(this,void 0,void 0,function*(){const e=ne(i.slice(0,4));if(e!==l+1)throw new Error("Encrypted message has invalid sequence number");return l=e,K(i,t)}))():{protocol_version:"legacy"};u={__type:"connected",sharedSecret:t,sessionProperties:d};const f=M(d.protocol_version,(e,n)=>_(this,void 0,void 0,function*(){const i=c++,a=yield W({id:i,jsonrpc:"2.0",method:e,params:null!==n&&void 0!==n?n:{}},t);return"base64"==o?s.send(k(a)):s.send(a),new Promise((t,n)=>{r[i]={resolve(r){switch(e){case"authorize":case"reauthorize":{const{wallet_uri_base:e}=r;if(null!=e)try{te(e)}catch(h){return void n(h)}break}}t(r)},reject:n}})}));p=!0;try{e(f)}catch(h){n(h)}break}}});s.addEventListener("message",i),f=()=>{s.removeEventListener("message",i),a(),p||n(new v(m,"The wallet session was closed before connection.",{closeEvent:new CloseEvent("socket was closed before connection")}))}})}})}var oe,se,ae,ce,le,ue,de,he,fe=n(9210),pe=n(5759),me=n(6488);function ge(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(t){o(t)}}function a(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}function be(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function ye(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}class ve{constructor(){var e=this;oe.add(this),se.set(this,null),ae.set(this,{}),ce.set(this,!1),this.dom=null,this.open=()=>{console.debug("Modal open"),be(this,oe,"m",ue).call(this),be(this,se,"f")&&(be(this,se,"f").style.display="flex")},this.close=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;var n;console.debug("Modal close"),be(e,oe,"m",de).call(e),be(e,se,"f")&&(be(e,se,"f").style.display="none"),null===(n=be(e,ae,"f").close)||void 0===n||n.forEach(e=>e(t))},he.set(this,e=>{"Escape"===e.key&&this.close(e)}),this.init=this.init.bind(this),ye(this,se,document.getElementById("mobile-wallet-adapter-embedded-root-ui"),"f")}init(){return ge(this,void 0,void 0,function*(){console.log("Injecting modal"),be(this,oe,"m",le).call(this)})}addEventListener(e,t){var n;return(null===(n=be(this,ae,"f")[e])||void 0===n?void 0:n.push(t))||(be(this,ae,"f")[e]=[t]),()=>this.removeEventListener(e,t)}removeEventListener(e,t){var n;be(this,ae,"f")[e]=null===(n=be(this,ae,"f")[e])||void 0===n?void 0:n.filter(e=>t!==e)}}se=new WeakMap,ae=new WeakMap,ce=new WeakMap,he=new WeakMap,oe=new WeakSet,le=function(){if(document.getElementById("mobile-wallet-adapter-embedded-root-ui"))return void(be(this,se,"f")||ye(this,se,document.getElementById("mobile-wallet-adapter-embedded-root-ui"),"f"));ye(this,se,document.createElement("div"),"f"),be(this,se,"f").id="mobile-wallet-adapter-embedded-root-ui",be(this,se,"f").innerHTML='\n<div class="mobile-wallet-adapter-embedded-modal-container" role="dialog" aria-modal="true" aria-labelledby="modal-title">\n <div data-modal-close style="position: absolute; width: 100%; height: 100%;"></div>\n\t<div class="mobile-wallet-adapter-embedded-modal-card">\n\t\t<div>\n\t\t\t<button data-modal-close class="mobile-wallet-adapter-embedded-modal-close">\n\t\t\t\t<svg width="14" height="14">\n\t\t\t\t\t<path d="M 6.7125,8.3036995 1.9082,13.108199 c -0.2113,0.2112 -0.4765,0.3168 -0.7957,0.3168 -0.3192,0 -0.5844,-0.1056 -0.7958,-0.3168 C 0.1056,12.896899 0,12.631699 0,12.312499 c 0,-0.3192 0.1056,-0.5844 0.3167,-0.7958 L 5.1212,6.7124995 0.3167,1.9082 C 0.1056,1.6969 0,1.4317 0,1.1125 0,0.7933 0.1056,0.5281 0.3167,0.3167 0.5281,0.1056 0.7933,0 1.1125,0 1.4317,0 1.6969,0.1056 1.9082,0.3167 L 6.7125,5.1212 11.5167,0.3167 C 11.7281,0.1056 11.9933,0 12.3125,0 c 0.3192,0 0.5844,0.1056 0.7957,0.3167 0.2112,0.2114 0.3168,0.4766 0.3168,0.7958 0,0.3192 -0.1056,0.5844 -0.3168,0.7957 L 8.3037001,6.7124995 13.1082,11.516699 c 0.2112,0.2114 0.3168,0.4766 0.3168,0.7958 0,0.3192 -0.1056,0.5844 -0.3168,0.7957 -0.2113,0.2112 -0.4765,0.3168 -0.7957,0.3168 -0.3192,0 -0.5844,-0.1056 -0.7958,-0.3168 z" />\n\t\t\t\t</svg>\n\t\t\t</button>\n\t\t</div>\n\t\t<div class="mobile-wallet-adapter-embedded-modal-content"></div>\n\t</div>\n</div>\n',be(this,se,"f").style.display="none";const e=be(this,se,"f").querySelector(".mobile-wallet-adapter-embedded-modal-content");e&&(e.innerHTML=this.contentHtml);const t=document.createElement("style");t.id="mobile-wallet-adapter-embedded-modal-styles",t.textContent='\n.mobile-wallet-adapter-embedded-modal-container {\n display: flex; /* Use flexbox to center content */\n justify-content: center; /* Center horizontally */\n align-items: center; /* Center vertically */\n position: fixed; /* Stay in place */\n z-index: 1; /* Sit on top */\n left: 0;\n top: 0;\n width: 100%; /* Full width */\n height: 100%; /* Full height */\n background-color: rgba(0,0,0,0.4); /* Black w/ opacity */\n overflow-y: auto; /* enable scrolling */\n}\n\n.mobile-wallet-adapter-embedded-modal-card {\n display: flex;\n flex-direction: column;\n margin: auto 20px;\n max-width: 780px;\n padding: 20px;\n border-radius: 24px;\n background: #ffffff;\n font-family: "Inter Tight", "PT Sans", Calibri, sans-serif;\n transform: translateY(-200%);\n animation: slide-in 0.5s forwards;\n}\n\n@keyframes slide-in {\n 100% { transform: translateY(0%); }\n}\n\n.mobile-wallet-adapter-embedded-modal-close {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n cursor: pointer;\n background: #e4e9e9;\n border: none;\n border-radius: 50%;\n}\n\n.mobile-wallet-adapter-embedded-modal-close:focus-visible {\n outline-color: red;\n}\n\n.mobile-wallet-adapter-embedded-modal-close svg {\n fill: #546266;\n transition: fill 200ms ease 0s;\n}\n\n.mobile-wallet-adapter-embedded-modal-close:hover svg {\n fill: #fff;\n}\n'+this.contentStyles;const n=document.createElement("div");n.innerHTML='\n<link rel="preconnect" href="https://fonts.googleapis.com">\n<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>\n<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">\n',this.dom=n.attachShadow({mode:"closed"}),this.dom.appendChild(t),this.dom.appendChild(be(this,se,"f")),document.body.appendChild(n)},ue=function(){if(!be(this,se,"f")||be(this,ce,"f"))return;[...be(this,se,"f").querySelectorAll("[data-modal-close]")].forEach(e=>null===e||void 0===e?void 0:e.addEventListener("click",this.close)),window.addEventListener("load",this.close),document.addEventListener("keydown",be(this,he,"f")),ye(this,ce,!0,"f")},de=function(){if(!be(this,ce,"f"))return;if(window.removeEventListener("load",this.close),document.removeEventListener("keydown",be(this,he,"f")),!be(this,se,"f"))return;[...be(this,se,"f").querySelectorAll("[data-modal-close]")].forEach(e=>null===e||void 0===e?void 0:e.removeEventListener("click",this.close)),ye(this,ce,!1,"f")};class we extends ve{constructor(){super(...arguments),this.contentStyles=ke,this.contentHtml=_e}initWithQR(e){const t=Object.create(null,{init:{get:()=>super.init}});return ge(this,void 0,void 0,function*(){t.init.call(this),this.populateQRCode(e)})}populateQRCode(e){var t;return ge(this,void 0,void 0,function*(){const n=null===(t=this.dom)||void 0===t?void 0:t.getElementById("mobile-wallet-adapter-embedded-modal-qr-code-container");if(n){const t=yield s.toCanvas(e,{width:200,margin:0});null!==n.firstElementChild?n.replaceChild(t,n.firstElementChild):n.appendChild(t)}else console.error("QRCode Container not found")})}}const _e='\n<div class="mobile-wallet-adapter-embedded-modal-qr-content">\n <div>\n <svg class="mobile-wallet-adapter-embedded-modal-icon" width="100%" height="100%">\n <circle r="52" cx="53" cy="53" fill="#99b3be" stroke="#000000" stroke-width="2"/>\n <path d="m 53,82.7305 c -3.3116,0 -6.1361,-1.169 -8.4735,-3.507 -2.338,-2.338 -3.507,-5.1625 -3.507,-8.4735 0,-3.3116 1.169,-6.1364 3.507,-8.4744 2.3374,-2.338 5.1619,-3.507 8.4735,-3.507 3.3116,0 6.1361,1.169 8.4735,3.507 2.338,2.338 3.507,5.1628 3.507,8.4744 0,3.311 -1.169,6.1355 -3.507,8.4735 -2.3374,2.338 -5.1619,3.507 -8.4735,3.507 z m 0.007,-5.25 c 1.8532,0 3.437,-0.6598 4.7512,-1.9793 1.3149,-1.3195 1.9723,-2.9058 1.9723,-4.7591 0,-1.8526 -0.6598,-3.4364 -1.9793,-4.7512 -1.3195,-1.3149 -2.9055,-1.9723 -4.7582,-1.9723 -1.8533,0 -3.437,0.6598 -4.7513,1.9793 -1.3148,1.3195 -1.9722,2.9058 -1.9722,4.7591 0,1.8527 0.6597,3.4364 1.9792,4.7512 1.3195,1.3149 2.9056,1.9723 4.7583,1.9723 z m -28,-33.5729 -3.85,-3.6347 c 4.1195,-4.025 8.8792,-7.1984 14.2791,-9.52 5.4005,-2.3223 11.2551,-3.4834 17.5639,-3.4834 6.3087,0 12.1634,1.1611 17.5639,3.4834 5.3999,2.3216 10.1596,5.495 14.2791,9.52 l -3.85,3.6347 C 77.2999,40.358 73.0684,37.5726 68.2985,35.5514 63.5292,33.5301 58.4296,32.5195 53,32.5195 c -5.4297,0 -10.5292,1.0106 -15.2985,3.0319 -4.7699,2.0212 -9.0014,4.8066 -12.6945,8.3562 z m 44.625,10.8771 c -2.2709,-2.1046 -4.7962,-3.7167 -7.5758,-4.8361 -2.7795,-1.12 -5.7983,-1.68 -9.0562,-1.68 -3.2579,0 -6.2621,0.56 -9.0125,1.68 -2.7504,1.1194 -5.2903,2.7315 -7.6195,4.8361 L 32.5189,51.15 c 2.8355,-2.6028 5.9777,-4.6086 9.4263,-6.0174 3.4481,-1.4087 7.133,-2.1131 11.0548,-2.1131 3.9217,0 7.5979,0.7044 11.0285,2.1131 3.43,1.4088 6.5631,3.4146 9.3992,6.0174 z"/>\n </svg>\n <div class="mobile-wallet-adapter-embedded-modal-title">Remote Mobile Wallet Adapter</div>\n </div>\n <div>\n <div>\n <h4 class="mobile-wallet-adapter-embedded-modal-qr-label">\n Open your wallet and scan this code\n </h4>\n </div>\n <div id="mobile-wallet-adapter-embedded-modal-qr-code-container" class="mobile-wallet-adapter-embedded-modal-qr-code-container"></div>\n </div>\n</div>\n<div class="mobile-wallet-adapter-embedded-modal-divider"><hr></div>\n<div class="mobile-wallet-adapter-embedded-modal-footer">\n <div class="mobile-wallet-adapter-embedded-modal-subtitle">\n Follow the instructions on your device. When you\'re finished, this screen will update.\n </div>\n <div class="mobile-wallet-adapter-embedded-modal-progress-badge">\n <div>\n <div class="spinner">\n <div class="leftWrapper">\n <div class="left">\n <div class="circle"></div>\n </div>\n </div>\n <div class="rightWrapper">\n <div class="right">\n <div class="circle"></div>\n </div>\n </div>\n </div>\n </div>\n <div>Waiting for scan</div>\n </div>\n</div>\n',ke='\n.mobile-wallet-adapter-embedded-modal-qr-content {\n display: flex; \n margin-top: 10px;\n padding: 10px;\n}\n\n.mobile-wallet-adapter-embedded-modal-qr-content > div:first-child {\n display: flex;\n flex-direction: column;\n flex: 2;\n margin-top: auto;\n margin-right: 30px;\n}\n\n.mobile-wallet-adapter-embedded-modal-qr-content > div:nth-child(2) {\n display: flex;\n flex-direction: column;\n flex: 1;\n margin-left: auto;\n}\n\n.mobile-wallet-adapter-embedded-modal-footer {\n display: flex;\n padding: 10px;\n}\n\n.mobile-wallet-adapter-embedded-modal-icon {}\n\n.mobile-wallet-adapter-embedded-modal-title {\n color: #000000;\n font-size: 2.5em;\n font-weight: 600;\n}\n\n.mobile-wallet-adapter-embedded-modal-qr-label {\n text-align: right;\n color: #000000;\n}\n\n.mobile-wallet-adapter-embedded-modal-qr-code-container {\n margin-left: auto;\n}\n\n.mobile-wallet-adapter-embedded-modal-divider {\n margin-top: 20px;\n padding-left: 10px;\n padding-right: 10px;\n}\n\n.mobile-wallet-adapter-embedded-modal-divider hr {\n border-top: 1px solid #D9DEDE;\n}\n\n.mobile-wallet-adapter-embedded-modal-subtitle {\n margin: auto;\n margin-right: 60px;\n padding: 20px;\n color: #6E8286;\n}\n\n.mobile-wallet-adapter-embedded-modal-progress-badge {\n display: flex;\n background: #F7F8F8;\n height: 56px;\n min-width: 200px;\n margin: auto;\n padding-left: 20px;\n padding-right: 20px;\n border-radius: 18px;\n color: #A8B6B8;\n align-items: center;\n}\n\n.mobile-wallet-adapter-embedded-modal-progress-badge > div:first-child {\n margin-left: auto;\n margin-right: 20px;\n}\n\n.mobile-wallet-adapter-embedded-modal-progress-badge > div:nth-child(2) {\n margin-right: auto;\n}\n\n/* Smaller screens */\n@media all and (max-width: 600px) {\n .mobile-wallet-adapter-embedded-modal-card {\n text-align: center;\n }\n .mobile-wallet-adapter-embedded-modal-qr-content {\n flex-direction: column;\n }\n .mobile-wallet-adapter-embedded-modal-qr-content > div:first-child {\n margin: auto;\n }\n .mobile-wallet-adapter-embedded-modal-qr-content > div:nth-child(2) {\n margin: auto;\n flex: 2 auto;\n }\n .mobile-wallet-adapter-embedded-modal-footer {\n flex-direction: column;\n }\n .mobile-wallet-adapter-embedded-modal-icon {\n display: none;\n }\n .mobile-wallet-adapter-embedded-modal-title {\n font-size: 1.5em;\n }\n .mobile-wallet-adapter-embedded-modal-subtitle {\n margin-right: unset;\n }\n .mobile-wallet-adapter-embedded-modal-qr-label {\n text-align: center;\n }\n .mobile-wallet-adapter-embedded-modal-qr-code-container {\n margin: auto;\n }\n}\n\n/* Spinner */\n@keyframes spinLeft {\n 0% {\n transform: rotate(20deg);\n }\n 50% {\n transform: rotate(160deg);\n }\n 100% {\n transform: rotate(20deg);\n }\n}\n@keyframes spinRight {\n 0% {\n transform: rotate(160deg);\n }\n 50% {\n transform: rotate(20deg);\n }\n 100% {\n transform: rotate(160deg);\n }\n}\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(2520deg);\n }\n}\n\n.spinner {\n position: relative;\n width: 1.5em;\n height: 1.5em;\n margin: auto;\n animation: spin 10s linear infinite;\n}\n.spinner::before {\n content: "";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.right, .rightWrapper, .left, .leftWrapper {\n position: absolute;\n top: 0;\n overflow: hidden;\n width: .75em;\n height: 1.5em;\n}\n.left, .leftWrapper {\n left: 0;\n}\n.right {\n left: -12px;\n}\n.rightWrapper {\n right: 0;\n}\n.circle {\n border: .125em solid #A8B6B8;\n width: 1.25em; /* 1.5em - 2*0.125em border */\n height: 1.25em; /* 1.5em - 2*0.125em border */\n border-radius: 0.75em; /* 0.5*1.5em spinner size 8 */\n}\n.left {\n transform-origin: 100% 50%;\n animation: spinLeft 2.5s cubic-bezier(.2,0,.8,1) infinite;\n}\n.right {\n transform-origin: 100% 50%;\n animation: spinRight 2.5s cubic-bezier(.2,0,.8,1) infinite;\n}\n',xe="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03IDIuNUgxN0MxNy44Mjg0IDIuNSAxOC41IDMuMTcxNTcgMTguNSA0VjIwQzE4LjUgMjAuODI4NCAxNy44Mjg0IDIxLjUgMTcgMjEuNUg3QzYuMTcxNTcgMjEuNSA1LjUgMjAuODI4NCA1LjUgMjBWNEM1LjUgMy4xNzE1NyA2LjE3MTU3IDIuNSA3IDIuNVpNMyA0QzMgMS43OTA4NiA0Ljc5MDg2IDAgNyAwSDE3QzE5LjIwOTEgMCAyMSAxLjc5MDg2IDIxIDRWMjBDMjEgMjIuMjA5MSAxOS4yMDkxIDI0IDE3IDI0SDdDNC43OTA4NiAyNCAzIDIyLjIwOTEgMyAyMFY0Wk0xMSA0LjYxNTM4QzEwLjQ0NzcgNC42MTUzOCAxMCA1LjA2MzEgMTAgNS42MTUzOFY2LjM4NDYyQzEwIDYuOTM2OSAxMC40NDc3IDcuMzg0NjIgMTEgNy4zODQ2MkgxM0MxMy41NTIzIDcuMzg0NjIgMTQgNi45MzY5IDE0IDYuMzg0NjJWNS42MTUzOEMxNCA1LjA2MzEgMTMuNTUyMyA0LjYxNTM4IDEzIDQuNjE1MzhIMTFaIiBmaWxsPSIjRENCOEZGIi8+Cjwvc3ZnPgo=";function Se(e){return window.btoa(String.fromCharCode.call(null,...e))}function Ee(e){return new Uint8Array(window.atob(e).split("").map(e=>e.charCodeAt(0)))}var Ae,Pe,Ce,Ie,Me,Te,Oe,Ne,Be,Re,je,Le,Fe,ze,De,Ue,We,qe,He,Ke,Ve,$e,Ge,Ze,Je,Ye,Qe,Xe,et,tt,nt,rt,it,ot,st,at,ct,lt,ut,dt,ht,ft,pt,mt,gt,bt,yt,vt,wt,_t,kt,xt,St,Et,At,Pt,Ct,It,Mt,Tt,Ot,Nt,Bt,Rt,jt,Lt,Ft,zt,Dt,Ut;const Wt="Mobile Wallet Adapter",qt="Remote Mobile Wallet Adapter",Ht=[o.SolanaSignAndSendTransaction,o.SolanaSignTransaction,o.SolanaSignMessage,o.SolanaSignIn];class Kt{constructor(e){var t=this;Ae.add(this),Pe.set(this,{}),Ce.set(this,"1.0.0"),Ie.set(this,Wt),Me.set(this,"https://solanamobile.com/wallets"),Te.set(this,xe),Oe.set(this,void 0),Ne.set(this,void 0),Be.set(this,void 0),Re.set(this,!1),je.set(this,0),Le.set(this,[]),Fe.set(this,void 0),ze.set(this,void 0),De.set(this,void 0),Ue.set(this,(e,t)=>{var n;return(null===(n=be(this,Pe,"f")[e])||void 0===n?void 0:n.push(t))||(be(this,Pe,"f")[e]=[t]),()=>be(this,Ae,"m",qe).call(this,e,t)}),He.set(this,function(){let{silent:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ge(t,void 0,void 0,function*(){if(be(this,Re,"f")||this.connected)return{accounts:this.accounts};ye(this,Re,!0,"f");try{if(e){const e=yield be(this,Be,"f").get();if(!e)return{accounts:this.accounts};yield be(this,$e,"f").call(this,e.capabilities),yield be(this,Ve,"f").call(this,e)}else yield be(this,Ke,"f").call(this)}catch(t){throw new Error(t instanceof Error&&t.message||"Unknown error")}finally{ye(this,Re,!1,"f")}return{accounts:this.accounts}})}),Ke.set(this,e=>ge(this,void 0,void 0,function*(){try{const t=yield be(this,Be,"f").get();if(t)return be(this,Ve,"f").call(this,t),t;const n=yield be(this,Fe,"f").select(be(this,Le,"f"));return yield be(this,Je,"f").call(this,t=>ge(this,void 0,void 0,function*(){const[r,i]=yield Promise.all([t.getCapabilities(),t.authorize({chain:n,identity:be(this,Oe,"f"),sign_in_payload:e})]),o=be(this,Qe,"f").call(this,i.accounts),s=Object.assign(Object.assign({},i),{accounts:o,chain:n,capabilities:r});return Promise.all([be(this,$e,"f").call(this,r),be(this,Be,"f").set(s),be(this,Ve,"f").call(this,s)]),s}))}catch(t){throw new Error(t instanceof Error&&t.message||"Unknown error")}})),Ve.set(this,e=>ge(this,void 0,void 0,function*(){var t;const n=null==be(this,Ne,"f")||(null===(t=be(this,Ne,"f"))||void 0===t?void 0:t.accounts.length)!==e.accounts.length||be(this,Ne,"f").accounts.some((t,n)=>t.address!==e.accounts[n].address);ye(this,Ne,e,"f"),n&&be(this,Ae,"m",We).call(this,"change",{accounts:this.accounts})})),$e.set(this,e=>ge(this,void 0,void 0,function*(){const t=e.features.includes("solana:signTransactions"),n=e.supports_sign_and_send_transactions,r=o.SolanaSignAndSendTransaction in this.features!==n||o.SolanaSignTransaction in this.features!==t;ye(this,ze,Object.assign(Object.assign({},(n||!n&&!t)&&{[o.SolanaSignAndSendTransaction]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:be(this,tt,"f")}}),t&&{[o.SolanaSignTransaction]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:be(this,nt,"f")}}),"f"),r&&be(this,Ae,"m",We).call(this,"change",{features:this.features})})),Ge.set(this,(e,t,n)=>ge(this,void 0,void 0,function*(){var r,i;try{const[o,s]=yield Promise.all([null!==(i=null===(r=be(this,Ne,"f"))||void 0===r?void 0:r.capabilities)&&void 0!==i?i:yield e.getCapabilities(),e.authorize({auth_token:t,identity:be(this,Oe,"f"),chain:n})]),a=be(this,Qe,"f").call(this,s.accounts),c=Object.assign(Object.assign({},s),{accounts:a,chain:n,capabilities:o});Promise.all([be(this,Be,"f").set(c),be(this,Ve,"f").call(this,c)])}catch(o){throw be(this,Ze,"f").call(this),new Error(o instanceof Error&&o.message||"Unknown error")}})),Ze.set(this,()=>ge(this,void 0,void 0,function*(){var e;be(this,Be,"f").clear(),ye(this,Re,!1,"f"),ye(this,je,(e=be(this,je,"f"),++e),"f"),ye(this,Ne,void 0,"f"),be(this,Ae,"m",We).call(this,"change",{accounts:this.accounts})})),Je.set(this,e=>ge(this,void 0,void 0,function*(){var t;const n=null===(t=be(this,Ne,"f"))||void 0===t?void 0:t.wallet_uri_base,r=n?{baseUri:n}:void 0,i=be(this,je,"f");try{return yield function(e,t){return _(this,void 0,void 0,function*(){ee();const n=yield R(),r=yield J(n.publicKey,null===t||void 0===t?void 0:t.baseUri),i="ws://localhost:".concat(r,"/solana-wallet");let o;const s=(()=>{const e=[...Y.retryDelayScheduleMs];return()=>e.length>1?e.shift():e[0]})();let a=1,c=0,l={__type:"disconnected"};return new Promise((t,r)=>{let u;const d={},h=()=>_(this,void 0,void 0,function*(){if("connecting"!==l.__type)return void console.warn("Expected adapter state to be `connecting` at the moment the websocket opens. "+"Got `".concat(l.__type,"`."));u.removeEventListener("open",h);const{associationKeypair:e}=l,t=yield j();u.send(yield S(t.publicKey,e.privateKey)),l={__type:"hello_req_sent",associationPublicKey:e.publicKey,ecdhPrivateKey:t.privateKey}}),f=e=>{e.wasClean?l={__type:"disconnected"}:r(new v(m,"The wallet session dropped unexpectedly (".concat(e.code,": ").concat(e.reason,")."),{closeEvent:e})),y()},p=e=>_(this,void 0,void 0,function*(){y(),Date.now()-o>=Y.timeoutMs?r(new v(g,"Failed to connect to the wallet websocket at ".concat(i,"."))):(yield new Promise(e=>{const t=s();k=window.setTimeout(e,t)}),x())}),b=i=>_(this,void 0,void 0,function*(){const o=yield i.data.arrayBuffer();switch(l.__type){case"connecting":if(0!==o.byteLength)throw new Error("Encountered unexpected message while connecting");const i=yield j();u.send(yield S(i.publicKey,n.privateKey)),l={__type:"hello_req_sent",associationPublicKey:n.publicKey,ecdhPrivateKey:i.privateKey};break;case"connected":try{const e=ne(o.slice(0,4));if(e!==c+1)throw new Error("Encrypted message has invalid sequence number");c=e;const t=yield q(o,l.sharedSecret),n=d[t.id];delete d[t.id],n.resolve(t.result)}catch(s){if(!(s instanceof w))throw s;{const e=d[s.jsonRpcMessageId];delete d[s.jsonRpcMessageId],e.reject(s)}}break;case"hello_req_sent":{if(0===o.byteLength){const e=yield j();u.send(yield S(e.publicKey,n.privateKey)),l={__type:"hello_req_sent",associationPublicKey:n.publicKey,ecdhPrivateKey:e.privateKey};break}const i=yield H(o,l.associationPublicKey,l.ecdhPrivateKey),h=o.slice(65),f=0!==h.byteLength?yield(()=>_(this,void 0,void 0,function*(){const e=ne(h.slice(0,4));if(e!==c+1)throw new Error("Encrypted message has invalid sequence number");return c=e,K(h,i)}))():{protocol_version:"legacy"};l={__type:"connected",sharedSecret:i,sessionProperties:f};const p=M(f.protocol_version,(e,t)=>_(this,void 0,void 0,function*(){const n=a++;return u.send(yield W({id:n,jsonrpc:"2.0",method:e,params:null!==t&&void 0!==t?t:{}},i)),new Promise((t,r)=>{d[n]={resolve(n){switch(e){case"authorize":case"reauthorize":{const{wallet_uri_base:e}=n;if(null!=e)try{te(e)}catch(s){return void r(s)}break}}t(n)},reject:r}})}));try{t(yield e(p))}catch(s){r(s)}finally{y(),u.close()}break}}});let y,k;const x=()=>{y&&y(),l={__type:"connecting",associationKeypair:n},void 0===o&&(o=Date.now()),u=new WebSocket(i,[Q]),u.addEventListener("open",h),u.addEventListener("close",f),u.addEventListener("error",p),u.addEventListener("message",b),y=()=>{window.clearTimeout(k),u.removeEventListener("open",h),u.removeEventListener("close",f),u.removeEventListener("error",p),u.removeEventListener("message",b)}};x()})})}(e,r)}catch(o){throw be(this,je,"f")!==i&&(yield new Promise(()=>{})),o instanceof Error&&"SolanaMobileWalletAdapterError"===o.name&&"ERROR_WALLET_NOT_FOUND"===o.code&&(yield be(this,De,"f").call(this,this)),o}})),Ye.set(this,()=>{if(!be(this,Ne,"f"))throw new Error("Wallet not connected");return{authToken:be(this,Ne,"f").auth_token,chain:be(this,Ne,"f").chain}}),Qe.set(this,e=>e.map(e=>{var t,n;const r=Ee(e.address);return{address:pe.encode(r),publicKey:r,label:e.label,icon:e.icon,chains:null!==(t=e.chains)&&void 0!==t?t:be(this,Le,"f"),features:null!==(n=e.features)&&void 0!==n?n:Ht}})),Xe.set(this,e=>ge(this,void 0,void 0,function*(){const{authToken:t,chain:n}=be(this,Ye,"f").call(this);try{const r=e.map(e=>Se(e));return yield be(this,Je,"f").call(this,e=>ge(this,void 0,void 0,function*(){yield be(this,Ge,"f").call(this,e,t,n);return(yield e.signTransactions({payloads:r})).signed_payloads.map(Ee)}))}catch(r){throw new Error(r instanceof Error&&r.message||"Unknown error")}})),et.set(this,(e,t)=>ge(this,void 0,void 0,function*(){const{authToken:n,chain:r}=be(this,Ye,"f").call(this);try{return yield be(this,Je,"f").call(this,i=>ge(this,void 0,void 0,function*(){const[o,s]=yield Promise.all([i.getCapabilities(),be(this,Ge,"f").call(this,i,n,r)]);if(o.supports_sign_and_send_transactions){const n=Se(e);return(yield i.signAndSendTransactions(Object.assign(Object.assign({},t),{payloads:[n]}))).signatures.map(Ee)[0]}throw new Error("connected wallet does not support signAndSendTransaction")}))}catch(i){throw new Error(i instanceof Error&&i.message||"Unknown error")}})),tt.set(this,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ge(t,void 0,void 0,function*(){const e=[];for(const t of n){const n=yield be(this,et,"f").call(this,t.transaction,t.options);e.push({signature:n})}return e})}),nt.set(this,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ge(t,void 0,void 0,function*(){return(yield be(this,Xe,"f").call(this,n.map(e=>{let{transaction:t}=e;return t}))).map(e=>({signedTransaction:e}))})}),rt.set(this,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ge(t,void 0,void 0,function*(){const{authToken:e,chain:t}=be(this,Ye,"f").call(this),r=n.map(e=>{let{account:t}=e;return Se(t.publicKey)}),i=n.map(e=>{let{message:t}=e;return Se(t)});try{return yield be(this,Je,"f").call(this,n=>ge(this,void 0,void 0,function*(){yield be(this,Ge,"f").call(this,n,e,t);return(yield n.signMessages({addresses:r,payloads:i})).signed_payloads.map(Ee).map(e=>({signedMessage:e,signature:e.slice(-64)}))}))}catch(o){throw new Error(o instanceof Error&&o.message||"Unknown error")}})}),it.set(this,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ge(t,void 0,void 0,function*(){const e=[];if(!(n.length>1))return[yield be(this,ot,"f").call(this,n[0])];for(const t of n)e.push(yield be(this,ot,"f").call(this,t));return e})}),ot.set(this,e=>ge(this,void 0,void 0,function*(){var t,n,r;ye(this,Re,!0,"f");try{const i=yield be(this,Ke,"f").call(this,Object.assign(Object.assign({},e),{domain:null!==(t=null===e||void 0===e?void 0:e.domain)&&void 0!==t?t:window.location.host}));if(!i.sign_in_result)throw new Error("Sign in failed, no sign in result returned by wallet");const o=i.sign_in_result.address,s=i.accounts.find(e=>e.address==o);return{account:Object.assign(Object.assign({},null!==s&&void 0!==s?s:{address:pe.encode(Ee(o))}),{publicKey:Ee(o),chains:null!==(n=null===s||void 0===s?void 0:s.chains)&&void 0!==n?n:be(this,Le,"f"),features:null!==(r=null===s||void 0===s?void 0:s.features)&&void 0!==r?r:i.capabilities.features}),signedMessage:Ee(i.sign_in_result.signed_message),signature:Ee(i.sign_in_result.signature)}}catch(i){throw new Error(i instanceof Error&&i.message||"Unknown error")}finally{ye(this,Re,!1,"f")}})),ye(this,Be,e.authorizationCache,"f"),ye(this,Oe,e.appIdentity,"f"),ye(this,Le,e.chains,"f"),ye(this,Fe,e.chainSelector,"f"),ye(this,De,e.onWalletNotFound,"f"),ye(this,ze,{[o.SolanaSignAndSendTransaction]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:be(this,tt,"f")},[o.SolanaSignTransaction]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:be(this,nt,"f")}},"f")}get version(){return be(this,Ce,"f")}get name(){return be(this,Ie,"f")}get url(){return be(this,Me,"f")}get icon(){return be(this,Te,"f")}get chains(){return be(this,Le,"f")}get features(){return Object.assign({[fe.StandardConnect]:{version:"1.0.0",connect:be(this,He,"f")},[fe.StandardDisconnect]:{version:"1.0.0",disconnect:be(this,Ze,"f")},[fe.StandardEvents]:{version:"1.0.0",on:be(this,Ue,"f")},[o.SolanaSignMessage]:{version:"1.0.0",signMessage:be(this,rt,"f")},[o.SolanaSignIn]:{version:"1.0.0",signIn:be(this,it,"f")}},be(this,ze,"f"))}get accounts(){var e,t;return null!==(t=null===(e=be(this,Ne,"f"))||void 0===e?void 0:e.accounts)&&void 0!==t?t:[]}get connected(){return!!be(this,Ne,"f")}get isAuthorized(){return!!be(this,Ne,"f")}get currentAuthorization(){return be(this,Ne,"f")}get cachedAuthorizationResult(){return be(this,Be,"f").get()}}Pe=new WeakMap,Ce=new WeakMap,Ie=new WeakMap,Me=new WeakMap,Te=new WeakMap,Oe=new WeakMap,Ne=new WeakMap,Be=new WeakMap,Re=new WeakMap,je=new WeakMap,Le=new WeakMap,Fe=new WeakMap,ze=new WeakMap,De=new WeakMap,Ue=new WeakMap,He=new WeakMap,Ke=new WeakMap,Ve=new WeakMap,$e=new WeakMap,Ge=new WeakMap,Ze=new WeakMap,Je=new WeakMap,Ye=new WeakMap,Qe=new WeakMap,Xe=new WeakMap,et=new WeakMap,tt=new WeakMap,nt=new WeakMap,rt=new WeakMap,it=new WeakMap,ot=new WeakMap,Ae=new WeakSet,We=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i;null===(i=be(this,Pe,"f")[e])||void 0===i||i.forEach(e=>e.apply(null,n))},qe=function(e,t){var n;be(this,Pe,"f")[e]=null===(n=be(this,Pe,"f")[e])||void 0===n?void 0:n.filter(e=>t!==e)};class Vt{constructor(e){var t=this;st.add(this),at.set(this,{}),ct.set(this,"1.0.0"),lt.set(this,qt),ut.set(this,"https://solanamobile.com/wallets"),dt.set(this,xe),ht.set(this,void 0),ft.set(this,void 0),pt.set(this,void 0),mt.set(this,!1),gt.set(this,0),bt.set(this,[]),yt.set(this,void 0),vt.set(this,void 0),wt.set(this,void 0),_t.set(this,void 0),kt.set(this,void 0),xt.set(this,(e,t)=>{var n;return(null===(n=be(this,at,"f")[e])||void 0===n?void 0:n.push(t))||(be(this,at,"f")[e]=[t]),()=>be(this,st,"m",Et).call(this,e,t)}),At.set(this,function(){let{silent:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ge(t,void 0,void 0,function*(){if(be(this,mt,"f")||this.connected)return{accounts:this.accounts};ye(this,mt,!0,"f");try{yield be(this,Pt,"f").call(this)}catch(e){throw new Error(e instanceof Error&&e.message||"Unknown error")}finally{ye(this,mt,!1,"f")}return{accounts:this.accounts}})}),Pt.set(this,e=>ge(this,void 0,void 0,function*(){try{const t=yield be(this,pt,"f").get();if(t)return be(this,Ct,"f").call(this,t),t;be(this,kt,"f")&&ye(this,kt,void 0,"f");const n=yield be(this,yt,"f").select(be(this,bt,"f"));return yield be(this,Ot,"f").call(this,t=>ge(this,void 0,void 0,function*(){const[r,i]=yield Promise.all([t.getCapabilities(),t.authorize({chain:n,identity:be(this,ht,"f"),sign_in_payload:e})]),o=be(this,Bt,"f").call(this,i.accounts),s=Object.assign(Object.assign({},i),{accounts:o,chain:n,capabilities:r});return Promise.all([be(this,It,"f").call(this,r),be(this,pt,"f").set(s),be(this,Ct,"f").call(this,s)]),s}))}catch(t){throw new Error(t instanceof Error&&t.message||"Unknown error")}})),Ct.set(this,e=>ge(this,void 0,void 0,function*(){var t;const n=null==be(this,ft,"f")||(null===(t=be(this,ft,"f"))||void 0===t?void 0:t.accounts.length)!==e.accounts.length||be(this,ft,"f").accounts.some((t,n)=>t.address!==e.accounts[n].address);ye(this,ft,e,"f"),n&&be(this,st,"m",St).call(this,"change",{accounts:this.accounts})})),It.set(this,e=>ge(this,void 0,void 0,function*(){const t=e.features.includes("solana:signTransactions"),n=e.supports_sign_and_send_transactions||e.features.includes("solana:signAndSendTransaction"),r=o.SolanaSignAndSendTransaction in this.features!==n||o.SolanaSignTransaction in this.features!==t;ye(this,vt,Object.assign(Object.assign({},n&&{[o.SolanaSignAndSendTransaction]:{version:"1.0.0",supportedTransactionVersions:e.supported_transaction_versions,signAndSendTransaction:be(this,Lt,"f")}}),t&&{[o.SolanaSignTransaction]:{version:"1.0.0",supportedTransactionVersions:e.supported_transaction_versions,signTransaction:be(this,Ft,"f")}}),"f"),r&&be(this,st,"m",St).call(this,"change",{features:this.features})})),Mt.set(this,(e,t,n)=>ge(this,void 0,void 0,function*(){var r,i;try{const[o,s]=yield Promise.all([null!==(i=null===(r=be(this,ft,"f"))||void 0===r?void 0:r.capabilities)&&void 0!==i?i:yield e.getCapabilities(),e.authorize({auth_token:t,identity:be(this,ht,"f"),chain:n})]),a=be(this,Bt,"f").call(this,s.accounts),c=Object.assign(Object.assign({},s),{accounts:a,chain:n,capabilities:o});Promise.all([be(this,pt,"f").set(c),be(this,Ct,"f").call(this,c)])}catch(o){throw be(this,Tt,"f").call(this),new Error(o instanceof Error&&o.message||"Unknown error")}})),Tt.set(this,()=>ge(this,void 0,void 0,function*(){var e,t;null===(e=be(this,kt,"f"))||void 0===e||e.close(),be(this,pt,"f").clear(),ye(this,mt,!1,"f"),ye(this,gt,(t=be(this,gt,"f"),++t),"f"),ye(this,ft,void 0,"f"),ye(this,kt,void 0,"f"),be(this,st,"m",St).call(this,"change",{accounts:this.accounts})})),Ot.set(this,e=>ge(this,void 0,void 0,function*(){var t;const n=null===(t=be(this,ft,"f"))||void 0===t?void 0:t.wallet_uri_base,r=n?{baseUri:n}:void 0,i=Object.assign(Object.assign({},r),{remoteHostAuthority:be(this,_t,"f")}),o=be(this,gt,"f"),s=new we;if(be(this,kt,"f"))return e(be(this,kt,"f").wallet);try{const{associationUrl:t,close:n,wallet:r}=yield ie(i),o=s.addEventListener("close",e=>{e&&n()});return s.initWithQR(t.toString()),s.open(),ye(this,kt,{close:n,wallet:yield r},"f"),o(),s.close(),yield e(be(this,kt,"f").wallet)}catch(a){throw s.close(),be(this,gt,"f")!==o&&(yield new Promise(()=>{})),a instanceof Error&&"SolanaMobileWalletAdapterError"===a.name&&"ERROR_WALLET_NOT_FOUND"===a.code&&(yield be(this,wt,"f").call(this,this)),a}})),Nt.set(this,()=>{if(!be(this,ft,"f"))throw new Error("Wallet not connected");return{authToken:be(this,ft,"f").auth_token,chain:be(this,ft,"f").chain}}),Bt.set(this,e=>e.map(e=>{var t,n;const r=Ee(e.address);return{address:pe.encode(r),publicKey:r,label:e.label,icon:e.icon,chains:null!==(t=e.chains)&&void 0!==t?t:be(this,bt,"f"),features:null!==(n=e.features)&&void 0!==n?n:Ht}})),Rt.set(this,e=>ge(this,void 0,void 0,function*(){const{authToken:t,chain:n}=be(this,Nt,"f").call(this);try{return yield be(this,Ot,"f").call(this,r=>ge(this,void 0,void 0,function*(){yield be(this,Mt,"f").call(this,r,t,n);return(yield r.signTransactions({payloads:e.map(Se)})).signed_payloads.map(Ee)}))}catch(r){throw new Error(r instanceof Error&&r.message||"Unknown error")}})),jt.set(this,(e,t)=>ge(this,void 0,void 0,function*(){const{authToken:n,chain:r}=be(this,Nt,"f").call(this);try{return yield be(this,Ot,"f").call(this,i=>ge(this,void 0,void 0,function*(){const[o,s]=yield Promise.all([i.getCapabilities(),be(this,Mt,"f").call(this,i,n,r)]);if(o.supports_sign_and_send_transactions){return(yield i.signAndSendTransactions(Object.assign(Object.assign({},t),{payloads:[Se(e)]}))).signatures.map(Ee)[0]}throw new Error("connected wallet does not support signAndSendTransaction")}))}catch(i){throw new Error(i instanceof Error&&i.message||"Unknown error")}})),Lt.set(this,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ge(t,void 0,void 0,function*(){const e=[];for(const t of n){const n=yield be(this,jt,"f").call(this,t.transaction,t.options);e.push({signature:n})}return e})}),Ft.set(this,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ge(t,void 0,void 0,function*(){return(yield be(this,Rt,"f").call(this,n.map(e=>{let{transaction:t}=e;return t}))).map(e=>({signedTransaction:e}))})}),zt.set(this,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ge(t,void 0,void 0,function*(){const{authToken:e,chain:t}=be(this,Nt,"f").call(this),r=n.map(e=>{let{account:t}=e;return Se(t.publicKey)}),i=n.map(e=>{let{message:t}=e;return Se(t)});try{return yield be(this,Ot,"f").call(this,n=>ge(this,void 0,void 0,function*(){yield be(this,Mt,"f").call(this,n,e,t);return(yield n.signMessages({addresses:r,payloads:i})).signed_payloads.map(Ee).map(e=>({signedMessage:e,signature:e.slice(-64)}))}))}catch(o){throw new Error(o instanceof Error&&o.message||"Unknown error")}})}),Dt.set(this,function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ge(t,void 0,void 0,function*(){const e=[];if(!(n.length>1))return[yield be(this,Ut,"f").call(this,n[0])];for(const t of n)e.push(yield be(this,Ut,"f").call(this,t));return e})}),Ut.set(this,e=>ge(this,void 0,void 0,function*(){var t,n,r;ye(this,mt,!0,"f");try{const i=yield be(this,Pt,"f").call(this,Object.assign(Object.assign({},e),{domain:null!==(t=null===e||void 0===e?void 0:e.domain)&&void 0!==t?t:window.location.host}));if(!i.sign_in_result)throw new Error("Sign in failed, no sign in result returned by wallet");const o=i.sign_in_result.address,s=i.accounts.find(e=>e.address==o);return{account:Object.assign(Object.assign({},null!==s&&void 0!==s?s:{address:pe.encode(Ee(o))}),{publicKey:Ee(o),chains:null!==(n=null===s||void 0===s?void 0:s.chains)&&void 0!==n?n:be(this,bt,"f"),features:null!==(r=null===s||void 0===s?void 0:s.features)&&void 0!==r?r:i.capabilities.features}),signedMessage:Ee(i.sign_in_result.signed_message),signature:Ee(i.sign_in_result.signature)}}catch(i){throw new Error(i instanceof Error&&i.message||"Unknown error")}finally{ye(this,mt,!1,"f")}})),ye(this,pt,e.authorizationCache,"f"),ye(this,ht,e.appIdentity,"f"),ye(this,bt,e.chains,"f"),ye(this,yt,e.chainSelector,"f"),ye(this,_t,e.remoteHostAuthority,"f"),ye(this,wt,e.onWalletNotFound,"f"),ye(this,vt,{[o.SolanaSignAndSendTransaction]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signAndSendTransaction:be(this,Lt,"f")},[o.SolanaSignTransaction]:{version:"1.0.0",supportedTransactionVersions:["legacy",0],signTransaction:be(this,Ft,"f")}},"f")}get version(){return be(this,ct,"f")}get name(){return be(this,lt,"f")}get url(){return be(this,ut,"f")}get icon(){return be(this,dt,"f")}get chains(){return be(this,bt,"f")}get features(){return Object.assign({[fe.StandardConnect]:{version:"1.0.0",connect:be(this,At,"f")},[fe.StandardDisconnect]:{version:"1.0.0",disconnect:be(this,Tt,"f")},[fe.StandardEvents]:{version:"1.0.0",on:be(this,xt,"f")},[o.SolanaSignMessage]:{version:"1.0.0",signMessage:be(this,zt,"f")},[o.SolanaSignIn]:{version:"1.0.0",signIn:be(this,Dt,"f")}},be(this,vt,"f"))}get accounts(){var e,t;return null!==(t=null===(e=be(this,ft,"f"))||void 0===e?void 0:e.accounts)&&void 0!==t?t:[]}get connected(){return!!be(this,kt,"f")&&!!be(this,ft,"f")}get isAuthorized(){return!!be(this,ft,"f")}get currentAuthorization(){return be(this,ft,"f")}get cachedAuthorizationResult(){return be(this,pt,"f").get()}}at=new WeakMap,ct=new WeakMap,lt=new WeakMap,ut=new WeakMap,dt=new WeakMap,ht=new WeakMap,ft=new WeakMap,pt=new WeakMap,mt=new WeakMap,gt=new WeakMap,bt=new WeakMap,yt=new WeakMap,vt=new WeakMap,wt=new WeakMap,_t=new WeakMap,kt=new WeakMap,xt=new WeakMap,At=new WeakMap,Pt=new WeakMap,Ct=new WeakMap,It=new WeakMap,Mt=new WeakMap,Tt=new WeakMap,Ot=new WeakMap,Nt=new WeakMap,Bt=new WeakMap,Rt=new WeakMap,jt=new WeakMap,Lt=new WeakMap,Ft=new WeakMap,zt=new WeakMap,Dt=new WeakMap,Ut=new WeakMap,st=new WeakSet,St=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i;null===(i=be(this,at,"f")[e])||void 0===i||i.forEach(e=>e.apply(null,n))},Et=function(e,t){var n;be(this,at,"f")[e]=null===(n=be(this,at,"f")[e])||void 0===n?void 0:n.filter(e=>t!==e)};Event;new WeakMap;class $t extends ve{constructor(){super(...arguments),this.contentStyles=Zt,this.contentHtml=Gt}initWithError(e){super.init(),this.populateError(e)}populateError(e){var t,n;const r=null===(t=this.dom)||void 0===t?void 0:t.getElementById("mobile-wallet-adapter-error-message"),i=null===(n=this.dom)||void 0===n?void 0:n.getElementById("mobile-wallet-adapter-error-action");if(r){if("SolanaMobileWalletAdapterError"===e.name)switch(e.code){case"ERROR_WALLET_NOT_FOUND":return r.innerHTML="To use mobile wallet adapter, you must have a compatible mobile wallet application installed on your device.",void(i&&i.addEventListener("click",()=>{window.location.href="https://solanamobile.com/wallets"}));case"ERROR_BROWSER_NOT_SUPPORTED":return r.innerHTML="This browser appears to be incompatible with mobile wallet adapter. Open this page in a compatible mobile browser app and try again.",void(i&&(i.style.display="none"))}r.innerHTML="An unexpected error occurred: ".concat(e.message)}else console.log("Failed to locate error dialog element")}}const Gt='\n<svg class="mobile-wallet-adapter-embedded-modal-error-icon" xmlns="http://www.w3.org/2000/svg" height="50px" viewBox="0 -960 960 960" width="50px" fill="#000000"><path d="M 280,-80 Q 197,-80 138.5,-138.5 80,-197 80,-280 80,-363 138.5,-421.5 197,-480 280,-480 q 83,0 141.5,58.5 58.5,58.5 58.5,141.5 0,83 -58.5,141.5 Q 363,-80 280,-80 Z M 824,-120 568,-376 Q 556,-389 542.5,-402.5 529,-416 516,-428 q 38,-24 61,-64 23,-40 23,-88 0,-75 -52.5,-127.5 Q 495,-760 420,-760 345,-760 292.5,-707.5 240,-655 240,-580 q 0,6 0.5,11.5 0.5,5.5 1.5,11.5 -18,2 -39.5,8 -21.5,6 -38.5,14 -2,-11 -3,-22 -1,-11 -1,-23 0,-109 75.5,-184.5 Q 311,-840 420,-840 q 109,0 184.5,75.5 75.5,75.5 75.5,184.5 0,43 -13.5,81.5 Q 653,-460 629,-428 l 251,252 z m -615,-61 71,-71 70,71 29,-28 -71,-71 71,-71 -28,-28 -71,71 -71,-71 -28,28 71,71 -71,71 z"/></svg>\n<div class="mobile-wallet-adapter-embedded-modal-title">We can\'t find a wallet.</div>\n<div id="mobile-wallet-adapter-error-message" class="mobile-wallet-adapter-embedded-modal-subtitle"></div>\n<div>\n <button data-error-action id="mobile-wallet-adapter-error-action" class="mobile-wallet-adapter-embedded-modal-error-action">\n Find a wallet\n </button>\n</div>\n',Zt="\n.mobile-wallet-adapter-embedded-modal-content {\n text-align: center;\n}\n\n.mobile-wallet-adapter-embedded-modal-error-icon {\n margin-top: 24px;\n}\n\n.mobile-wallet-adapter-embedded-modal-title {\n margin: 18px 100px auto 100px;\n color: #000000;\n font-size: 2.75em;\n font-weight: 600;\n}\n\n.mobile-wallet-adapter-embedded-modal-subtitle {\n margin: 30px 60px 40px 60px;\n color: #000000;\n font-size: 1.25em;\n font-weight: 400;\n}\n\n.mobile-wallet-adapter-embedded-modal-error-action {\n display: block;\n width: 100%;\n height: 56px;\n /*margin-top: 40px;*/\n font-size: 1.25em;\n /*line-height: 24px;*/\n /*letter-spacing: -1%;*/\n background: #000000;\n color: #FFFFFF;\n border-radius: 18px;\n}\n\n/* Smaller screens */\n@media all and (max-width: 600px) {\n .mobile-wallet-adapter-embedded-modal-title {\n font-size: 1.5em;\n margin-right: 12px;\n margin-left: 12px;\n }\n .mobile-wallet-adapter-embedded-modal-subtitle {\n margin-right: 12px;\n margin-left: 12px;\n }\n}\n";function Jt(){return ge(this,void 0,void 0,function*(){if("undefined"!==typeof window){const e=window.navigator.userAgent.toLowerCase(),t=new $t;e.includes("wv")?t.initWithError({name:"SolanaMobileWalletAdapterError",code:"ERROR_BROWSER_NOT_SUPPORTED",message:""}):t.initWithError({name:"SolanaMobileWalletAdapterError",code:"ERROR_WALLET_NOT_FOUND",message:""}),t.open()}})}const Yt="SolanaMobileWalletAdapterDefaultAuthorizationCache";function Qt(){return{select(e){return ge(this,void 0,void 0,function*(){return 1===e.length?e[0]:e.includes(me.SOLANA_MAINNET_CHAIN)?me.SOLANA_MAINNET_CHAIN:e[0]})}}}function Xt(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(t){o(t)}}function a(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})}function en(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function tn(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n}const nn="standard:connect";function rn(e){return window.btoa(String.fromCharCode.call(null,...e))}var on,sn,an,cn,ln,un,dn,hn,fn,pn,mn,gn,bn;const yn=Wt,vn=qt;function wn(e){switch(e){case"mainnet-beta":return"solana:mainnet";case"testnet":return"solana:testnet";case"devnet":return"solana:devnet";default:return e}}class _n extends r.BaseSignInMessageSignerWalletAdapter{constructor(e,t){super(),on.add(this),this.supportedTransactionVersions=new Set(["legacy",0]),sn.set(this,void 0),an.set(this,!1),cn.set(this,"undefined"!==typeof window&&window.isSecureContext&&"undefined"!==typeof document&&/android/i.test(navigator.userAgent)?r.WalletReadyState.Loadable:r.WalletReadyState.Unsupported),ln.set(this,void 0),un.set(this,void 0),dn.set(this,void 0),hn.set(this,e=>Xt(this,void 0,void 0,function*(){if(e.accounts&&e.accounts.length>0){en(this,on,"m",pn).call(this);const t=yield en(this,ln,"f").call(this,e.accounts);t!==en(this,un,"f")&&(tn(this,un,t,"f"),tn(this,dn,void 0,"f"),this.emit("connect",this.publicKey))}})),tn(this,ln,e=>Xt(this,void 0,void 0,function*(){var n;const r=yield t.addressSelector.select(e.map(e=>{let{publicKey:t}=e;return rn(t)}));return null!==(n=e.find(e=>{let{publicKey:t}=e;return rn(t)===r}))&&void 0!==n?n:e[0]}),"f"),tn(this,sn,e,"f"),en(this,sn,"f").features["standard:events"].on("change",en(this,hn,"f")),this.name=en(this,sn,"f").name,this.icon=en(this,sn,"f").icon,this.url=en(this,sn,"f").url}get publicKey(){var e;if(!en(this,dn,"f")&&en(this,un,"f"))try{tn(this,dn,new i.PublicKey(en(this,un,"f").publicKey),"f")}catch(t){throw new r.WalletPublicKeyError(t instanceof Error&&(null===t||void 0===t?void 0:t.message)||"Unknown error",t)}return null!==(e=en(this,dn,"f"))&&void 0!==e?e:null}get connected(){return en(this,sn,"f").connected}get connecting(){return en(this,an,"f")}get readyState(){return en(this,cn,"f")}autoConnect_DO_NOT_USE_OR_YOU_WILL_BE_FIRED(){return Xt(this,void 0,void 0,function*(){return yield this.autoConnect()})}autoConnect(){return Xt(this,void 0,void 0,function*(){en(this,on,"m",fn).call(this,!0)})}connect(){return Xt(this,void 0,void 0,function*(){en(this,on,"m",fn).call(this)})}performAuthorization(e){return Xt(this,void 0,void 0,function*(){try{const t=yield en(this,sn,"f").cachedAuthorizationResult;if(t)return yield en(this,sn,"f").features[nn].connect({silent:!0}),t;e?yield en(this,sn,"f").features[o.SolanaSignIn].signIn(e):yield en(this,sn,"f").features[nn].connect();return yield yield en(this,sn,"f").cachedAuthorizationResult}catch(t){throw new r.WalletConnectionError(t instanceof Error&&t.message||"Unknown error",t)}})}disconnect(){return Xt(this,void 0,void 0,function*(){return yield en(this,on,"m",bn).call(this,()=>Xt(this,void 0,void 0,function*(){tn(this,an,!1,"f"),tn(this,dn,void 0,"f"),tn(this,un,void 0,"f"),yield en(this,sn,"f").features["standard:disconnect"].disconnect(),this.emit("disconnect")}))})}signIn(e){return Xt(this,void 0,void 0,function*(){return en(this,on,"m",bn).call(this,()=>Xt(this,void 0,void 0,function*(){var t;if(en(this,cn,"f")!==r.WalletReadyState.Installed&&en(this,cn,"f")!==r.WalletReadyState.Loadable)throw new r.WalletNotReadyError;tn(this,an,!0,"f");try{const n=yield en(this,sn,"f").features[o.SolanaSignIn].signIn(Object.assign(Object.assign({},e),{domain:null!==(t=null===e||void 0===e?void 0:e.domain)&&void 0!==t?t:window.location.host}));if(n.length>0)return n[0];throw new Error("Sign in failed, no sign in result returned by wallet")}catch(n){throw new r.WalletConnectionError(n instanceof Error&&n.message||"Unknown error",n)}finally{tn(this,an,!1,"f")}}))})}signMessage(e){return Xt(this,void 0,void 0,function*(){return yield en(this,on,"m",bn).call(this,()=>Xt(this,void 0,void 0,function*(){const t=en(this,on,"m",mn).call(this);try{return(yield en(this,sn,"f").features[o.SolanaSignMessage].signMessage({account:t,message:e}))[0].signature}catch(n){throw new r.WalletSignMessageError(null===n||void 0===n?void 0:n.message,n)}}))})}sendTransaction(e,t,n){return Xt(this,void 0,void 0,function*(){return yield en(this,on,"m",bn).call(this,()=>Xt(this,void 0,void 0,function*(){const i=en(this,on,"m",mn).call(this);try{function a(){let e,r;switch(t.commitment){case"confirmed":case"finalized":case"processed":e=t.commitment;break;default:e="finalized"}switch(null===n||void 0===n?void 0:n.preflightCommitment){case"confirmed":case"finalized":case"processed":r=n.preflightCommitment;break;case void 0:r=e;break;default:r="finalized"}return("finalized"===r?2:"confirmed"===r?1:0)<("finalized"===e?2:"confirmed"===e?1:0)?r:e}if(o.SolanaSignAndSendTransaction in en(this,sn,"f").features){const c=wn(en(this,sn,"f").currentAuthorization.chain),[l]=(yield en(this,sn,"f").features[o.SolanaSignAndSendTransaction].signAndSendTransaction({account:i,transaction:e.serialize(),chain:c,options:n?{skipPreflight:n.skipPreflight,maxRetries:n.maxRetries}:void 0})).map(e=>rn(e.signature));return l}{const[u]=yield en(this,on,"m",gn).call(this,[e]);if(function(e){return"version"in e}(u))return yield t.sendTransaction(u);{const d=u.serialize();return yield t.sendRawTransaction(d,Object.assign(Object.assign({},n),{preflightCommitment:a()}))}}}catch(s){throw new r.WalletSendTransactionError(null===s||void 0===s?void 0:s.message,s)}}))})}signTransaction(e){return Xt(this,void 0,void 0,function*(){return yield en(this,on,"m",bn).call(this,()=>Xt(this,void 0,void 0,function*(){const[t]=yield en(this,on,"m",gn).call(this,[e]);return t}))})}signAllTransactions(e){return Xt(this,void 0,void 0,function*(){return yield en(this,on,"m",bn).call(this,()=>Xt(this,void 0,void 0,function*(){return yield en(this,on,"m",gn).call(this,e)}))})}}sn=new WeakMap,an=new WeakMap,cn=new WeakMap,ln=new WeakMap,un=new WeakMap,dn=new WeakMap,hn=new WeakMap,on=new WeakSet,fn=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return Xt(this,void 0,void 0,function*(){if(!this.connecting&&!this.connected)return yield en(this,on,"m",bn).call(this,()=>Xt(this,void 0,void 0,function*(){if(en(this,cn,"f")!==r.WalletReadyState.Installed&&en(this,cn,"f")!==r.WalletReadyState.Loadable)throw new r.WalletNotReadyError;tn(this,an,!0,"f");try{yield en(this,sn,"f").features[nn].connect({silent:e})}catch(t){throw new r.WalletConnectionError(t instanceof Error&&t.message||"Unknown error",t)}finally{tn(this,an,!1,"f")}}))})},pn=function(){en(this,cn,"f")!==r.WalletReadyState.Installed&&this.emit("readyStateChange",tn(this,cn,r.WalletReadyState.Installed,"f"))},mn=function(){if(!en(this,sn,"f").isAuthorized||!en(this,un,"f"))throw new r.WalletNotConnectedError;return en(this,un,"f")},gn=function(e){return Xt(this,void 0,void 0,function*(){const t=en(this,on,"m",mn).call(this);try{if(o.SolanaSignTransaction in en(this,sn,"f").features)return en(this,sn,"f").features[o.SolanaSignTransaction].signTransaction(...e.map(e=>({account:t,transaction:e.serialize()}))).then(e=>e.map(e=>{const t=e.signedTransaction,n=64*t[0]+1;return"legacy"===i.VersionedMessage.deserializeMessageVersion(t.slice(n,t.length))?i.Transaction.from(t):i.VersionedTransaction.deserialize(t)}));throw new Error("Connected wallet does not support signing transactions")}catch(n){throw new r.WalletSignTransactionError(null===n||void 0===n?void 0:n.message,n)}})},bn=function(e){return Xt(this,void 0,void 0,function*(){try{return yield e()}catch(t){throw this.emit("error",t),t}})};class kn extends _n{constructor(e){var t;const n=wn(null!==(t=e.chain)&&void 0!==t?t:e.cluster);super(new Kt({appIdentity:e.appIdentity,authorizationCache:{set:e.authorizationResultCache.set,get:()=>Xt(this,void 0,void 0,function*(){return yield e.authorizationResultCache.get()}),clear:e.authorizationResultCache.clear},chains:[n],chainSelector:Qt(),onWalletNotFound:()=>Xt(this,void 0,void 0,function*(){e.onWalletNotFound(this)})}),{addressSelector:e.addressSelector,chain:n})}}class xn extends _n{constructor(e){const t=wn(e.chain);super(new Vt({appIdentity:e.appIdentity,authorizationCache:{set:e.authorizationResultCache.set,get:()=>Xt(this,void 0,void 0,function*(){return yield e.authorizationResultCache.get()}),clear:e.authorizationResultCache.clear},chains:[t],chainSelector:Qt(),remoteHostAuthority:e.remoteHostAuthority,onWalletNotFound:()=>Xt(this,void 0,void 0,function*(){e.onWalletNotFound(this)})}),{addressSelector:e.addressSelector,chain:t})}}class Sn extends kn{}function En(){return{select(e){return Xt(this,void 0,void 0,function*(){return e[0]})}}}function An(){return function(){let e;try{e=window.localStorage}catch(t){}return{clear(){return ge(this,void 0,void 0,function*(){if(e)try{e.removeItem(Yt)}catch(t){}})},get(){return ge(this,void 0,void 0,function*(){if(e)try{const t=JSON.parse(e.getItem(Yt));if(t&&t.accounts){const e=t.accounts.map(e=>Object.assign(Object.assign({},e),{publicKey:"publicKey"in e?new Uint8Array(Object.values(e.publicKey)):pe.decode(e.address)}));return Object.assign(Object.assign({},t),{accounts:e})}return t||void 0}catch(t){}})},set(n){return ge(this,void 0,void 0,function*(){if(e)try{e.setItem(Yt,JSON.stringify(n))}catch(t){}})}}}()}function Pn(e){return Xt(this,void 0,void 0,function*(){return Jt()})}function Cn(){return Pn}},4367:(e,t,n)=>{"use strict";n.d(t,{Bv:()=>a,bm:()=>c});var r=n(9740),i=n(4456),o=n(3506);const s={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function a(e,t){const n={};return"undefined"!==typeof e.authorizationList&&(n.authorizationList=e.authorizationList.map(e=>(0,r.A)((0,r.A)({address:e.address,r:e.r?(0,i.cK)(BigInt(e.r)):e.r,s:e.s?(0,i.cK)(BigInt(e.s)):e.s,chainId:(0,i.cK)(e.chainId),nonce:(0,i.cK)(e.nonce)},"undefined"!==typeof e.yParity?{yParity:(0,i.cK)(e.yParity)}:{}),"undefined"!==typeof e.v&&"undefined"===typeof e.yParity?{v:(0,i.cK)(e.v)}:{}))),"undefined"!==typeof e.accessList&&(n.accessList=e.accessList),"undefined"!==typeof e.blobVersionedHashes&&(n.blobVersionedHashes=e.blobVersionedHashes),"undefined"!==typeof e.blobs&&("string"!==typeof e.blobs[0]?n.blobs=e.blobs.map(e=>(0,i.My)(e)):n.blobs=e.blobs),"undefined"!==typeof e.data&&(n.data=e.data),e.account&&(n.from=e.account.address),"undefined"!==typeof e.from&&(n.from=e.from),"undefined"!==typeof e.gas&&(n.gas=(0,i.cK)(e.gas)),"undefined"!==typeof e.gasPrice&&(n.gasPrice=(0,i.cK)(e.gasPrice)),"undefined"!==typeof e.maxFeePerBlobGas&&(n.maxFeePerBlobGas=(0,i.cK)(e.maxFeePerBlobGas)),"undefined"!==typeof e.maxFeePerGas&&(n.maxFeePerGas=(0,i.cK)(e.maxFeePerGas)),"undefined"!==typeof e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=(0,i.cK)(e.maxPriorityFeePerGas)),"undefined"!==typeof e.nonce&&(n.nonce=(0,i.cK)(e.nonce)),"undefined"!==typeof e.to&&(n.to=e.to),"undefined"!==typeof e.type&&(n.type=s[e.type]),"undefined"!==typeof e.value&&(n.value=(0,i.cK)(e.value)),n}const c=(0,o.q)("transactionRequest",a)},4434:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var o=e(t),s=0;s<o.length;s++)"default"!==o[s]&&r(n,t,o[s]);return i(n,t),n}}(),s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(t){o(t)}}function a(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletProviderBase=function(e){let{children:t,wallets:n,adapter:r,isUnloadingRef:i,onAutoConnectRequest:o,onConnectError:d,onError:h,onSelectWallet:f}=e;const p=(0,c.useRef)(!1),[m,g]=(0,c.useState)(!1),b=(0,c.useRef)(!1),[y,v]=(0,c.useState)(!1),[w,_]=(0,c.useState)(()=>{var e;return null!==(e=null===r||void 0===r?void 0:r.publicKey)&&void 0!==e?e:null}),[k,x]=(0,c.useState)(()=>{var e;return null!==(e=null===r||void 0===r?void 0:r.connected)&&void 0!==e&&e}),S=(0,c.useRef)(h);(0,c.useEffect)(()=>(S.current=h,()=>{S.current=void 0}),[h]);const E=(0,c.useRef)((e,t)=>(i.current||(S.current?S.current(e,t):(console.error(e,t),e instanceof a.WalletNotReadyError&&"undefined"!==typeof window&&t&&window.open(t.url,"_blank"))),e)),[A,P]=(0,c.useState)(()=>n.map(e=>({adapter:e,readyState:e.readyState})).filter(e=>{let{readyState:t}=e;return t!==a.WalletReadyState.Unsupported}));(0,c.useEffect)(()=>{function e(e){P(t=>{const n=t.findIndex(e=>{let{adapter:t}=e;return t===this});if(-1===n)return t;const{adapter:r}=t[n];return[...t.slice(0,n),{adapter:r,readyState:e},...t.slice(n+1)].filter(e=>{let{readyState:t}=e;return t!==a.WalletReadyState.Unsupported})})}return P(e=>n.map((t,n)=>{const r=e[n];return r&&r.adapter===t&&r.readyState===t.readyState?r:{adapter:t,readyState:t.readyState}}).filter(e=>{let{readyState:t}=e;return t!==a.WalletReadyState.Unsupported})),n.forEach(t=>t.on("readyStateChange",e,t)),()=>{n.forEach(t=>t.off("readyStateChange",e,t))}},[r,n]);const C=(0,c.useMemo)(()=>{var e;return null!==(e=A.find(e=>e.adapter===r))&&void 0!==e?e:null},[r,A]);(0,c.useEffect)(()=>{if(!r)return;const e=e=>{_(e),p.current=!1,g(!1),x(!0),b.current=!1,v(!1)},t=()=>{i.current||(_(null),p.current=!1,g(!1),x(!1),b.current=!1,v(!1))},n=e=>{E.current(e,r)};return r.on("connect",e),r.on("disconnect",t),r.on("error",n),()=>{r.off("connect",e),r.off("disconnect",t),r.off("error",n),t()}},[r,i]);const I=(0,c.useRef)(!1);(0,c.useEffect)(()=>()=>{I.current=!1},[r]),(0,c.useEffect)(()=>{I.current||p.current||k||!o||(null===C||void 0===C?void 0:C.readyState)!==a.WalletReadyState.Installed&&(null===C||void 0===C?void 0:C.readyState)!==a.WalletReadyState.Loadable||(p.current=!0,g(!0),I.current=!0,function(){s(this,void 0,void 0,function*(){try{yield o()}catch(e){d()}finally{g(!1),p.current=!1}})}())},[k,o,d,C]);const M=(0,c.useCallback)((e,t,n)=>s(this,void 0,void 0,function*(){if(!r)throw E.current(new l.WalletNotSelectedError);if(!k)throw E.current(new a.WalletNotConnectedError,r);return yield r.sendTransaction(e,t,n)}),[r,k]),T=(0,c.useMemo)(()=>r&&"signTransaction"in r?e=>s(this,void 0,void 0,function*(){if(!k)throw E.current(new a.WalletNotConnectedError,r);return yield r.signTransaction(e)}):void 0,[r,k]),O=(0,c.useMemo)(()=>r&&"signAllTransactions"in r?e=>s(this,void 0,void 0,function*(){if(!k)throw E.current(new a.WalletNotConnectedError,r);return yield r.signAllTransactions(e)}):void 0,[r,k]),N=(0,c.useMemo)(()=>r&&"signMessage"in r?e=>s(this,void 0,void 0,function*(){if(!k)throw E.current(new a.WalletNotConnectedError,r);return yield r.signMessage(e)}):void 0,[r,k]),B=(0,c.useMemo)(()=>r&&"signIn"in r?e=>s(this,void 0,void 0,function*(){return yield r.signIn(e)}):void 0,[r]),R=(0,c.useCallback)(()=>s(this,void 0,void 0,function*(){if(p.current||b.current||(null===C||void 0===C?void 0:C.adapter.connected))return;if(!C)throw E.current(new l.WalletNotSelectedError);const{adapter:e,readyState:t}=C;if(t!==a.WalletReadyState.Installed&&t!==a.WalletReadyState.Loadable)throw E.current(new a.WalletNotReadyError,e);p.current=!0,g(!0);try{yield e.connect()}catch(n){throw d(),n}finally{g(!1),p.current=!1}}),[d,C]),j=(0,c.useCallback)(()=>s(this,void 0,void 0,function*(){if(!b.current&&r){b.current=!0,v(!0);try{yield r.disconnect()}finally{v(!1),b.current=!1}}}),[r]);return c.default.createElement(u.WalletContext.Provider,{value:{autoConnect:!!o,wallets:A,wallet:C,publicKey:w,connected:k,connecting:m,disconnecting:y,select:f,connect:R,disconnect:j,sendTransaction:M,signTransaction:T,signAllTransactions:O,signMessage:N,signIn:B}},t)};const a=n(3651),c=o(n(2176)),l=n(8492),u=n(1025)},4437:(e,t,n)=>{const r=n(100),i=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function o(e){this.mode=r.ALPHANUMERIC,this.data=e}o.getBitsLength=function(e){return 11*Math.floor(e/2)+e%2*6},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){let t;for(t=0;t+2<=this.data.length;t+=2){let n=45*i.indexOf(this.data[t]);n+=i.indexOf(this.data[t+1]),e.put(n,11)}this.data.length%2&&e.put(i.indexOf(this.data[t]),6)},e.exports=o},4442:(e,t,n)=>{"use strict";e.exports=n(5105)},4456:(e,t,n)=>{"use strict";n.d(t,{$P:()=>c,My:()=>l,cK:()=>u,i3:()=>h,nj:()=>a});var r=n(6469),i=n(2370),o=n(6091);const s=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"number"===typeof e||"bigint"===typeof e?u(e,t):"string"===typeof e?h(e,t):"boolean"===typeof e?c(e,t):l(e,t)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n="0x".concat(Number(e));return"number"===typeof t.size?((0,o.Sl)(n,{size:t.size}),(0,i.eV)(n,{size:t.size})):n}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="";for(let i=0;i<e.length;i++)n+=s[e[i]];const r="0x".concat(n);return"number"===typeof t.size?((0,o.Sl)(r,{size:t.size}),(0,i.eV)(r,{dir:"right",size:t.size})):r}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{signed:n,size:o}=t,s=BigInt(e);let a;o?a=n?(1n<<8n*BigInt(o)-1n)-1n:2n**(8n*BigInt(o))-1n:"number"===typeof e&&(a=BigInt(Number.MAX_SAFE_INTEGER));const c="bigint"===typeof a&&n?-a-1n:0;if(a&&s>a||s<c){const t="bigint"===typeof e?"n":"";throw new r.Ty({max:a?"".concat(a).concat(t):void 0,min:"".concat(c).concat(t),signed:n,size:o,value:"".concat(e).concat(t)})}const l="0x".concat((n&&s<0?(1n<<BigInt(8*o))+BigInt(s):s).toString(16));return o?(0,i.eV)(l,{size:o}):l}const d=new TextEncoder;function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(d.encode(e),t)}},4507:(e,t,n)=>{"use strict";const r=n(7690),i=n(5151),o="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return l(e,t,n)}function l(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|m(e,t);let r=a(n);const i=r.write(e,t);i!==n&&(r=r.slice(0,i));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const i=function(e){if(c.isBuffer(e)){const t=0|p(e.length),n=a(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||J(e.length)?a(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return u(e),a(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),n=a(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function f(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return $(e).length;default:if(i)return r?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return E(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function y(e,t,n,r,i){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"===typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){let o,s=1,a=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,c/=2,n/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let r=-1;for(o=n;o<a;o++)if(l(e,o)===l(t,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===c)return r*s}else-1!==r&&(o-=o-r),r=-1}else for(n+c>a&&(n=a-c),o=n;o>=0;o--){let n=!0;for(let r=0;r<c;r++)if(l(e,o+r)!==l(t,r)){n=!1;break}if(n)return o}return-1}function w(e,t,n,r){n=Number(n)||0;const i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=t.length;let s;for(r>o/2&&(r=o/2),s=0;s<r;++s){const r=parseInt(t.substr(2*s,2),16);if(J(r))return s;e[n+s]=r}return s}function _(e,t,n,r){return G(V(t,e.length-n),e,n,r)}function k(e,t,n,r){return G(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return G($(t),e,n,r)}function S(e,t,n,r){return G(function(e,t){let n,r,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function E(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i<n;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=n){let n,r,a,c;switch(s){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128===(192&n)&&(c=(31&t)<<6|63&n,c>127&&(o=c));break;case 3:n=e[i+1],r=e[i+2],128===(192&n)&&128===(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:n=e[i+1],r=e[i+2],a=e[i+3],128===(192&n)&&128===(192&r)&&128===(192&a)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return function(e){const t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=P));return n}(r)}t.kMaxLength=s,c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"===typeof console||"function"!==typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return l(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return u(e),e<=0?a(e):void 0!==t?"string"===typeof n?a(e).fill(t,n):a(e).fill(t):a(e)}(e,t,n)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(Z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),Z(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let i=0;for(n=0;n<e.length;++n){let t=e[n];if(Z(t,Uint8Array))i+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},c.byteLength=m,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)b(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const n=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,i){if(Z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const a=Math.min(o,s),l=this.slice(r,i),u=e.slice(t,n);for(let c=0;c<a;++c)if(l[c]!==u[c]){o=l[c],s=u[c];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return y(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return y(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"===typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":case"latin1":case"binary":return k(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function C(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function I(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function M(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i="";for(let o=t;o<n;++o)i+=Y[e[o]];return i}function T(e,t,n){const r=e.slice(t,n);let i="";for(let o=0;o<r.length-1;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function O(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function B(e,t,n,r,i){W(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function R(e,t,n,r,i){W(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function j(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,o){return t=+t,n>>>=0,o||j(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,o){return t=+t,n>>>=0,o||j(e,0,n,8),i.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Q(function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),c.prototype.readBigUInt64BE=Q(function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);let r=this[e],i=1,o=0;for(;++o<t&&(i*=256);)r+=this[e+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Q(function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),c.prototype.readBigInt64BE=Q(function(e){q(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||H(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){N(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){N(this,e,t,n,Math.pow(2,8*n)-1,0)}let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q(function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Q(function(e){return R(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);N(this,e,t,n,r-1,-r)}let i=0,o=1,s=0;for(this[t]=255&e;++i<n&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);N(this,e,t,n,r-1,-r)}let i=n-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Q(function(e){return B(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Q(function(e){return R(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const i=r-n;return this===e&&"function"===typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},c.prototype.fill=function(e,t,n,r){if("string"===typeof e){if("string"===typeof t?(r=t,t=0,n=this.length):"string"===typeof n&&(r=n,n=this.length),void 0!==r&&"string"!==typeof r)throw new TypeError("encoding must be a string");if("string"===typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"===typeof e?e&=255:"boolean"===typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(i=t;i<n;++i)this[i]=e;else{const o=c.isBuffer(e)?e:c.from(e,r),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=o[i%s]}return this};const z={};function D(e,t,n){z[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name="".concat(this.name," [").concat(e,"]"),this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return"".concat(this.name," [").concat(e,"]: ").concat(this.message)}}}function U(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t="_".concat(e.slice(n-3,n)).concat(t);return"".concat(e.slice(0,n)).concat(t)}function W(e,t,n,r,i,o){if(e>n||e<t){const r="bigint"===typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?">= 0".concat(r," and < 2").concat(r," ** ").concat(8*(o+1)).concat(r):">= -(2".concat(r," ** ").concat(8*(o+1)-1).concat(r,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(r):">= ".concat(t).concat(r," and <= ").concat(n).concat(r),new z.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||H(t,e.length-(n+1))}(r,i,o)}function q(e,t){if("number"!==typeof e)throw new z.ERR_INVALID_ARG_TYPE(t,"number",e)}function H(e,t,n){if(Math.floor(e)!==e)throw q(e,n),new z.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(n||"offset",">= ".concat(n?1:0," and <= ").concat(t),e)}D("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),D("ERR_INVALID_ARG_TYPE",function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)},TypeError),D("ERR_OUT_OF_RANGE",function(e,t,n){let r='The value of "'.concat(e,'" is out of range.'),i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=U(String(n)):"bigint"===typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),r+=" It must be ".concat(t,". Received ").concat(i),r},RangeError);const K=/[^+/0-9A-Za-z-_]/g;function V(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function $(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(K,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function G(e,t,n,r){let i;for(i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!==e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Q(e){return"undefined"===typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},4543:(e,t,n)=>{"use strict";n.d(t,{B4:()=>p,CQ:()=>_,CW:()=>w,Ei:()=>h,F8:()=>k,P5:()=>f,TH:()=>x,Vl:()=>y,Vr:()=>v,WM:()=>m,WQ:()=>b,im:()=>g,jm:()=>c,lD:()=>s,qh:()=>d,rE:()=>l,ry:()=>u,xn:()=>a});const r=BigInt(2**32-1),i=BigInt(32);function o(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(e&r),l:Number(e>>i&r)}:{h:0|Number(e>>i&r),l:0|Number(e&r)}}function s(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.length;let r=new Uint32Array(n),i=new Uint32Array(n);for(let s=0;s<n;s++){const{h:n,l:a}=o(e[s],t);[r[s],i[s]]=[n,a]}return[r,i]}const a=(e,t,n)=>e>>>n,c=(e,t,n)=>e<<32-n|t>>>n,l=(e,t,n)=>e>>>n|t<<32-n,u=(e,t,n)=>e<<32-n|t>>>n,d=(e,t,n)=>e<<64-n|t>>>n-32,h=(e,t,n)=>e>>>n-32|t<<64-n,f=(e,t,n)=>e<<n|t>>>32-n,p=(e,t,n)=>t<<n|e>>>32-n,m=(e,t,n)=>t<<n-32|e>>>64-n,g=(e,t,n)=>e<<n-32|t>>>64-n;function b(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}}const y=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),v=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,w=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),_=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,k=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),x=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0},4591:(e,t,n)=>{"use strict";n.d(t,{E8:()=>i});var r=n(3054);function i(e,t){return new r._k({type:e,schema:null,validator:t})}},4691:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(8724),t),i(n(3762),t),i(n(3406),t)},4769:(e,t,n)=>{const r=n(100);function i(e){this.mode=r.NUMERIC,this.data=e.toString()}i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,n,r;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),r=parseInt(n,10),e.put(r,10);const i=this.data.length-t;i>0&&(n=this.data.substr(t),r=parseInt(n,10),e.put(r,3*i+1))},e.exports=i},4853:(e,t,n)=>{var r=n(7802);t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(n){}},t.load=function(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(n){}!e&&"undefined"!==typeof r&&"env"in r&&(e={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.DEBUG);return e},t.useColors=function(){if("undefined"!==typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(948)(t);const{formatters:i}=e.exports;i.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},4887:(e,t,n)=>{const r=n(3250);t.render=function(e,t,n){let i=n,o=t;"undefined"!==typeof i||t&&t.getContext||(i=t,t=void 0),t||(o=function(){try{return document.createElement("canvas")}catch(e){throw new Error("You need to specify a canvas element")}}()),i=r.getOptions(i);const s=r.getImageWidth(e.modules.size,i),a=o.getContext("2d"),c=a.createImageData(s,s);return r.qrToImageData(c.data,e,i),function(e,t,n){e.clearRect(0,0,t.width,t.height),t.style||(t.style={}),t.height=n,t.width=n,t.style.height=n+"px",t.style.width=n+"px"}(a,o,s),a.putImageData(c,0,0),o},t.renderToDataURL=function(e,n,r){let i=r;"undefined"!==typeof i||n&&n.getContext||(i=n,n=void 0),i||(i={});const o=t.render(e,n,i),s=i.type||"image/png",a=i.rendererOpts||{};return o.toDataURL(s,a.quality)}},4902:(e,t,n)=>{"use strict";n.d(t,{D0:()=>M,LH:()=>I,Tp:()=>N,Tv:()=>T,dQ:()=>x,jr:()=>E,pS:()=>P,qy:()=>B,zH:()=>g,zi:()=>m});var r=n(3808),i=n(2766);const o=BigInt(0),s=BigInt(1),a=BigInt(2),c=BigInt(3),l=BigInt(4),u=BigInt(5),d=BigInt(7),h=BigInt(8),f=BigInt(9),p=BigInt(16);function m(e,t){const n=e%t;return n>=o?n:t+n}function g(e,t,n){let r=e;for(;t-- >o;)r*=r,r%=n;return r}function b(e,t){if(e===o)throw new Error("invert: expected non-zero number");if(t<=o)throw new Error("invert: expected positive modulus, got "+t);let n=m(e,t),r=t,i=o,a=s,c=s,l=o;for(;n!==o;){const e=r/n,t=r%n,o=i-c*e,s=a-l*e;r=n,n=t,i=c,a=l,c=o,l=s}if(r!==s)throw new Error("invert: does not exist");return m(i,t)}function y(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function v(e,t){const n=(e.ORDER+s)/l,r=e.pow(t,n);return y(e,r,t),r}function w(e,t){const n=(e.ORDER-u)/h,r=e.mul(t,a),i=e.pow(r,n),o=e.mul(t,i),s=e.mul(e.mul(o,a),i),c=e.mul(o,e.sub(s,e.ONE));return y(e,c,t),c}function _(e){if(e<c)throw new Error("sqrt is not defined for small field");let t=e-s,n=0;for(;t%a===o;)t/=a,n++;let r=a;const i=M(e);for(;1===C(i,r);)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===n)return v;let l=i.pow(r,t);const u=(t+s)/a;return function(e,r){if(e.is0(r))return r;if(1!==C(e,r))throw new Error("Cannot find square root");let i=n,o=e.mul(e.ONE,l),a=e.pow(r,t),c=e.pow(r,u);for(;!e.eql(a,e.ONE);){if(e.is0(a))return e.ZERO;let t=1,n=e.sqr(a);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===i)throw new Error("Cannot find square root");const r=s<<BigInt(i-t-1),l=e.pow(o,r);i=t,o=e.sqr(l),a=e.mul(a,o),c=e.mul(c,l)}return c}}function k(e){return e%l===c?v:e%h===u?w:e%p===f?function(e){const t=M(e),n=_(e),r=n(t,t.neg(t.ONE)),i=n(t,r),o=n(t,t.neg(r)),s=(e+d)/p;return(e,t)=>{let n=e.pow(t,s),a=e.mul(n,r);const c=e.mul(n,i),l=e.mul(n,o),u=e.eql(e.sqr(a),t),d=e.eql(e.sqr(c),t);n=e.cmov(n,a,u),a=e.cmov(l,c,d);const h=e.eql(e.sqr(a),t),f=e.cmov(n,a,h);return y(e,f,t),f}}(e):_(e)}const x=(e,t)=>(m(e,t)&s)===s,S=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function E(e){const t=S.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"});return(0,r.DS)(e,t),e}function A(e,t,n){if(n<o)throw new Error("invalid exponent, negatives unsupported");if(n===o)return e.ONE;if(n===s)return t;let r=e.ONE,i=t;for(;n>o;)n&s&&(r=e.mul(r,i)),i=e.sqr(i),n>>=s;return r}function P(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=new Array(t.length).fill(n?e.ZERO:void 0),i=t.reduce((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n)),e.ONE),o=e.inv(i);return t.reduceRight((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n)),o),r}function C(e,t){const n=(e.ORDER-s)/a,r=e.pow(t,n),i=e.eql(r,e.ONE),o=e.eql(r,e.ZERO),c=e.eql(r,e.neg(e.ONE));if(!i&&!o&&!c)throw new Error("invalid Legendre symbol result");return i?1:o?0:-1}function I(e,t){void 0!==t&&(0,i.Fe)(t);const n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function M(e,t){let n,i,a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(e<=o)throw new Error("invalid field: expected ORDER > 0, got "+e);let l,u=!1;if("object"===typeof t&&null!=t){if(c.sqrt||a)throw new Error("cannot specify opts in two arguments");const e=t;e.BITS&&(n=e.BITS),e.sqrt&&(i=e.sqrt),"boolean"===typeof e.isLE&&(a=e.isLE),"boolean"===typeof e.modFromBytes&&(u=e.modFromBytes),l=e.allowedLengths}else"number"===typeof t&&(n=t),c.sqrt&&(i=c.sqrt);const{nBitLength:d,nByteLength:h}=I(e,n);if(h>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let f;const p=Object.freeze({ORDER:e,isLE:a,BITS:d,BYTES:h,MASK:(0,r.OG)(d),ZERO:o,ONE:s,allowedLengths:l,create:t=>m(t,e),isValid:t=>{if("bigint"!==typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return o<=t&&t<e},is0:e=>e===o,isValidNot0:e=>!p.is0(e)&&p.isValid(e),isOdd:e=>(e&s)===s,neg:t=>m(-t,e),eql:(e,t)=>e===t,sqr:t=>m(t*t,e),add:(t,n)=>m(t+n,e),sub:(t,n)=>m(t-n,e),mul:(t,n)=>m(t*n,e),pow:(e,t)=>A(p,e,t),div:(t,n)=>m(t*b(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>b(t,e),sqrt:i||(t=>(f||(f=k(e)),f(p,t))),toBytes:e=>a?(0,r.z)(e,h):(0,r.lq)(e,h),fromBytes:function(t){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(l){if(!l.includes(t.length)||t.length>h)throw new Error("Field.fromBytes: expected "+l+" bytes, got "+t.length);const e=new Uint8Array(h);e.set(t,a?0:e.length-t.length),t=e}if(t.length!==h)throw new Error("Field.fromBytes: expected "+h+" bytes, got "+t.length);let i=a?(0,r.lX)(t):(0,r.Ph)(t);if(u&&(i=m(i,e)),!n&&!p.isValid(i))throw new Error("invalid field element: outside of range 0..ORDER");return i},invertBatch:e=>P(p,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(p)}function T(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n}function O(e){if("bigint"!==typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function N(e){const t=O(e);return t+Math.ceil(t/2)}function B(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const i=e.length,o=O(t),a=N(t);if(i<16||i<a||i>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+i);const c=m(n?(0,r.lX)(e):(0,r.Ph)(e),t-s)+s;return n?(0,r.z)(c,o):(0,r.lq)(c,o)}},4934:(e,t,n)=>{"use strict";n.d(t,{w:()=>o});var r=n(2766);class i extends r.Vw{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,r.sd)(e);const n=(0,r.ZJ)(t);if(this.iHash=e.create(),"function"!==typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(n.length>i?e.create().update(n).digest():n);for(let r=0;r<o.length;r++)o[r]^=54;this.iHash.update(o),this.oHash=e.create();for(let r=0;r<o.length;r++)o[r]^=106;this.oHash.update(o),(0,r.uH)(o)}update(e){return(0,r.CC)(this),this.iHash.update(e),this}digestInto(e){(0,r.CC)(this),(0,r.DO)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=r,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const o=(e,t,n)=>new i(e,t).update(n).digest();o.create=(e,t)=>new i(e,t)},5059:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(3630),t),i(n(8492),t),i(n(2696),t),i(n(7144),t),i(n(3428),t),i(n(1025),t),i(n(6491),t)},5105:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var a=2*(r+1)-1,c=e[a],l=a+1,u=e[l];if(0>o(c,n))l<i&&0>o(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[a]=n,r=a);else{if(!(l<i&&0>o(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,c=a.now();t.unstable_now=function(){return a.now()-c}}var l=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,b=!1,y="function"===typeof setTimeout?setTimeout:null,v="function"===typeof clearTimeout?clearTimeout:null,w="undefined"!==typeof setImmediate?setImmediate:null;function _(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(l,t)}t=r(u)}}function k(e){if(g=!1,_(e),!m)if(null!==r(l))m=!0,S||(S=!0,x());else{var t=r(u);null!==t&&O(k,t.startTime-e)}}var x,S=!1,E=-1,A=5,P=-1;function C(){return!!b||!(t.unstable_now()-P<A)}function I(){if(b=!1,S){var e=t.unstable_now();P=e;var n=!0;try{e:{m=!1,g&&(g=!1,v(E),E=-1),p=!0;var o=f;try{t:{for(_(e),h=r(l);null!==h&&!(h.expirationTime>e&&C());){var s=h.callback;if("function"===typeof s){h.callback=null,f=h.priorityLevel;var a=s(h.expirationTime<=e);if(e=t.unstable_now(),"function"===typeof a){h.callback=a,_(e),n=!0;break t}h===r(l)&&i(l),_(e)}else i(l);h=r(l)}if(null!==h)n=!0;else{var c=r(u);null!==c&&O(k,c.startTime-e),n=!1}}break e}finally{h=null,f=o,p=!1}n=void 0}}finally{n?x():S=!1}}}if("function"===typeof w)x=function(){w(I)};else if("undefined"!==typeof MessageChannel){var M=new MessageChannel,T=M.port2;M.port1.onmessage=I,x=function(){T.postMessage(null)}}else x=function(){y(I,0)};function O(e,n){E=y(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_requestPaint=function(){b=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,o){var s=t.unstable_now();switch("object"===typeof o&&null!==o?o="number"===typeof(o=o.delay)&&0<o?s+o:s:o=s,e){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:o,expirationTime:a=o+a,sortIndex:-1},o>s?(e.sortIndex=o,n(u,e),null===r(l)&&e===r(u)&&(g?(v(E),E=-1):g=!0,O(k,o-s))):(e.sortIndex=a,n(l,e),m||p||(m=!0,S||(S=!0,x()))),e},t.unstable_shouldYield=C,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},5151:(e,t)=>{t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,c=(1<<a)-1,l=c>>1,u=-7,d=n?i-1:0,h=n?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=256*o+e[t+d],d+=h,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=r;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===o)o=1-l;else{if(o===c)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=l}return(f?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,c,l=8*o-i-1,u=(1<<l)-1,d=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*c-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+f]=255&a,f+=p,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;e[n+f]=255&s,f+=p,s/=256,l-=8);e[n+f-p]|=128*m}},5163:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaSignIn=void 0,t.SolanaSignIn="solana:signIn"},5184:(e,t,n)=>{const r=n(9693);function i(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}i.prototype.initialize=function(e){this.degree=e,this.genPoly=r.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=r.mod(t,this.genPoly),i=this.degree-n.length;if(i>0){const e=new Uint8Array(this.degree);return e.set(n,i),e}return n},e.exports=i},5192:e=>{function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,n,r){const i=e*this.size+t;this.data[i]=n,r&&(this.reservedBit[i]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,n){this.data[e*this.size+t]^=n},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},5210:(e,t,n)=>{"use strict";n.d(t,{h:()=>m,k:()=>y});var r=n(9740),i=n(1588),o=n(7578),s=n(8090),a=n(6469),c=n(2569),l=n(7683),u=n(2370),d=n(1478),h=n(2129),f=n(4456);const p=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/;function m(e,t){if(e.length!==t.length)throw new i.YE({expectedLength:e.length,givenLength:t.length});const n=function(e){let{params:t,values:n}=e;const r=[];for(let i=0;i<t.length;i++)r.push(g({param:t[i],value:n[i]}));return r}({params:e,values:t}),r=b(n);return 0===r.length?"0x":r}function g(e){let{param:t,value:n}=e;const m=y(t.type);if(m){const[e,o]=m;return function(e,t){let{length:n,param:r}=t;const o=null===n;if(!Array.isArray(e))throw new i.dm(e);if(!o&&e.length!==n)throw new i.Nc({expectedLength:n,givenLength:e.length,type:"".concat(r.type,"[").concat(n,"]")});let s=!1;const a=[];for(let i=0;i<e.length;i++){const t=g({param:r,value:e[i]});t.dynamic&&(s=!0),a.push(t)}if(o||s){const e=b(a);if(o){const t=(0,f.cK)(a.length,{size:32});return{dynamic:!0,encoded:a.length>0?(0,l.xW)([t,e]):t}}if(s)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,l.xW)(a.map(e=>{let{encoded:t}=e;return t}))}}(n,{length:e,param:(0,r.A)((0,r.A)({},t),{},{type:o})})}if("tuple"===t.type)return function(e,t){let{param:n}=t,r=!1;const i=[];for(let o=0;o<n.components.length;o++){const t=n.components[o],s=g({param:t,value:e[Array.isArray(e)?o:t.name]});i.push(s),s.dynamic&&(r=!0)}return{dynamic:r,encoded:r?b(i):(0,l.xW)(i.map(e=>{let{encoded:t}=e;return t}))}}(n,{param:t});if("address"===t.type)return function(e){if(!(0,c.P)(e))throw new o.M({address:e});return{dynamic:!1,encoded:(0,u.db)(e.toLowerCase())}}(n);if("bool"===t.type)return function(e){if("boolean"!==typeof e)throw new s.C('Invalid boolean value: "'.concat(e,'" (type: ').concat(typeof e,"). Expected: `true` or `false`."));return{dynamic:!1,encoded:(0,u.db)((0,f.$P)(e))}}(n);if(t.type.startsWith("uint")||t.type.startsWith("int")){var v;const e=t.type.startsWith("int"),[,,r="256"]=null!==(v=p.exec(t.type))&&void 0!==v?v:[];return function(e,t){let{signed:n,size:r=256}=t;if("number"===typeof r){const t=2n**(BigInt(r)-(n?1n:0n))-1n,i=n?-t-1n:0n;if(e>t||e<i)throw new a.Ty({max:t.toString(),min:i.toString(),signed:n,size:r/8,value:e.toString()})}return{dynamic:!1,encoded:(0,f.cK)(e,{size:32,signed:n})}}(n,{signed:e,size:Number(r)})}if(t.type.startsWith("bytes"))return function(e,t){let{param:n}=t;const[,r]=n.type.split("bytes"),o=(0,d.E)(e);if(!r){let t=e;return o%32!==0&&(t=(0,u.db)(t,{dir:"right",size:32*Math.ceil((e.length-2)/2/32)})),{dynamic:!0,encoded:(0,l.xW)([(0,u.db)((0,f.cK)(o,{size:32})),t])}}if(o!==Number.parseInt(r,10))throw new i.gH({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:(0,u.db)(e,{dir:"right"})}}(n,{param:t});if("string"===t.type)return function(e){const t=(0,f.i3)(e),n=Math.ceil((0,d.E)(t)/32),r=[];for(let i=0;i<n;i++)r.push((0,u.db)((0,h.di)(t,32*i,32*(i+1)),{dir:"right"}));return{dynamic:!0,encoded:(0,l.xW)([(0,u.db)((0,f.cK)((0,d.E)(t),{size:32})),...r])}}(n);throw new i.nK(t.type,{docsPath:"/docs/contract/encodeAbiParameters"})}function b(e){let t=0;for(let o=0;o<e.length;o++){const{dynamic:n,encoded:r}=e[o];t+=n?32:(0,d.E)(r)}const n=[],r=[];let i=0;for(let o=0;o<e.length;o++){const{dynamic:s,encoded:a}=e[o];s?(n.push((0,f.cK)(t+i,{size:32})),r.push(a),i+=(0,d.E)(a)):n.push(a)}return(0,l.xW)([...n,...r])}function y(e){const t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}},5471:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ED25519_TORSION_SUBGROUP:()=>se,RistrettoPoint:()=>ue,ed25519:()=>j,ed25519_hasher:()=>V,ed25519ctx:()=>F,ed25519ph:()=>z,edwardsToMontgomery:()=>ce,edwardsToMontgomeryPriv:()=>le,edwardsToMontgomeryPub:()=>ae,encodeToCurve:()=>he,hashToCurve:()=>de,hashToRistretto255:()=>fe,hash_to_ristretto255:()=>pe,ristretto255:()=>ie,ristretto255_hasher:()=>oe,x25519:()=>D});var r=n(9740),i=n(929),o=n(2766),s=n(9231),a=n(3808),c=n(4902);const l=BigInt(0),u=BigInt(1),d=BigInt(2),h=BigInt(8);class f{constructor(e){this.ep=e}static fromBytes(e){(0,a.SJ)()}static fromHex(e){(0,a.SJ)()}get x(){return this.toAffine().x}get y(){return this.toAffine().y}clearCofactor(){return this}assertValidity(){this.ep.assertValidity()}toAffine(e){return this.ep.toAffine(e)}toHex(){return(0,o.My)(this.toBytes())}toString(){return this.toHex()}isTorsionFree(){return!0}isSmallOrder(){return!1}add(e){return this.assertSame(e),this.init(this.ep.add(e.ep))}subtract(e){return this.assertSame(e),this.init(this.ep.subtract(e.ep))}multiply(e){return this.init(this.ep.multiply(e))}multiplyUnsafe(e){return this.init(this.ep.multiplyUnsafe(e))}double(){return this.init(this.ep.double())}negate(){return this.init(this.ep.negate())}precompute(e,t){return this.init(this.ep.precompute(e,t))}toRawBytes(){return this.toBytes()}}function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("function"!==typeof t)throw new Error('"hash" function param is required');(0,a.DS)(n,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:r}=n,{BASE:i,Fp:s,Fn:c}=e,l=n.randomBytes||o.po,d=n.adjustScalarBytes||(e=>e),h=n.domain||((e,t,n)=>{if((0,a.d6)(n,"phflag"),t.length||n)throw new Error("Contexts/pre-hash are not supported");return e});function f(e){return c.create((0,a.lX)(e))}function p(e){const{head:n,prefix:r,scalar:o}=function(e){const n=v.secretKey;e=(0,a.qj)("private key",e,n);const r=(0,a.qj)("hashed private key",t(e),2*n),i=d(r.slice(0,n));return{head:i,prefix:r.slice(n,2*n),scalar:f(i)}}(e),s=i.multiply(o),c=s.toBytes();return{head:n,prefix:r,scalar:o,point:s,pointBytes:c}}function m(e){return p(e).pointBytes}function g(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Uint8Array.of();for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];const c=(0,o.Id)(...i);return f(t(h(c,(0,a.qj)("context",e),!!r)))}const b={zip215:!0};const y=s.BYTES,v={secretKey:y,publicKey:y,signature:2*y,seed:y};function w(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l(v.seed);return(0,a.eV)(e,v.seed,"seed")}const _={getExtendedPublicKey:p,randomSecretKey:w,isValidSecretKey:function(e){return(0,o.aY)(e)&&e.length===c.BYTES},isValidPublicKey:function(t,n){try{return!!e.fromBytes(t,n)}catch(r){return!1}},toMontgomery(t){const{y:n}=e.fromBytes(t),r=v.publicKey,i=32===r;if(!i&&57!==r)throw new Error("only defined for 25519 and 448");const o=i?s.div(u+n,u-n):s.div(n-u,n+u);return s.toBytes(o)},toMontgomerySecret(e){const n=v.secretKey;(0,a.eV)(e,n);const r=t(e.subarray(0,n));return d(r).subarray(0,n)},randomPrivateKey:w,precompute(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.BASE).precompute(t,!1)}};return Object.freeze({keygen:function(e){const t=_.randomSecretKey(e);return{secretKey:t,publicKey:m(t)}},getPublicKey:m,sign:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e=(0,a.qj)("message",e),r&&(e=r(e));const{prefix:s,scalar:l,pointBytes:u}=p(t),d=g(n.context,s,e),h=i.multiply(d).toBytes(),f=g(n.context,h,u,e),m=c.create(d+f*l);if(!c.isValid(m))throw new Error("sign failed: invalid s");const b=(0,o.Id)(h,c.toBytes(m));return(0,a.eV)(b,v.signature,"result")},verify:function(t,n,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:b;const{context:c,zip215:l}=s,u=v.signature;t=(0,a.qj)("signature",t,u),n=(0,a.qj)("message",n),o=(0,a.qj)("publicKey",o,v.publicKey),void 0!==l&&(0,a.d6)(l,"zip215"),r&&(n=r(n));const d=u/2,h=t.subarray(0,d),f=(0,a.lX)(t.subarray(d,u));let p,m,y;try{p=e.fromBytes(o,l),m=e.fromBytes(h,l),y=i.multiplyUnsafe(f)}catch(_){return!1}if(!l&&p.isSmallOrder())return!1;const w=g(c,m.toBytes(),p.toBytes(),n);return m.add(p.multiplyUnsafe(w)).subtract(y).clearCofactor().is0()},utils:_,Point:e,lengths:v})}function m(e){const{CURVE:t,curveOpts:n,hash:r,eddsaOpts:i}=function(e){const t={a:e.a,d:e.d,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n={Fp:e.Fp,Fn:(0,c.D0)(t.n,e.nBitLength,!0),uvRatio:e.uvRatio},r={randomBytes:e.randomBytes,adjustScalarBytes:e.adjustScalarBytes,domain:e.domain,prehash:e.prehash,mapToCurve:e.mapToCurve};return{CURVE:t,curveOpts:n,hash:e.hash,eddsaOpts:r}}(e),f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,s.UT)("edwards",e,t,t.FpFnLE),{Fp:r,Fn:i}=n;let c=n.CURVE;const{h:f}=c;(0,a.DS)(t,{},{uvRatio:"function"});const p=d<<BigInt(8*i.BYTES)-u,m=e=>r.create(e),g=t.uvRatio||((e,t)=>{try{return{isValid:!0,value:r.sqrt(r.div(e,t))}}catch(n){return{isValid:!1,value:l}}});if(!function(e,t,n,r){const i=e.sqr(n),o=e.sqr(r),s=e.add(e.mul(t.a,i),o),a=e.add(e.ONE,e.mul(t.d,e.mul(i,o)));return e.eql(s,a)}(r,c,c.Gx,c.Gy))throw new Error("bad curve params: generator point");function b(e,t){const n=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?u:l;return(0,a.aK)("coordinate "+e,t,n,p),t}function y(e){if(!(e instanceof _))throw new Error("ExtendedPoint expected")}const v=(0,a.x)((e,t)=>{const{X:n,Y:i,Z:o}=e,s=e.is0();null==t&&(t=s?h:r.inv(o));const a=m(n*t),c=m(i*t),d=r.mul(o,t);if(s)return{x:l,y:u};if(d!==u)throw new Error("invZ was invalid");return{x:a,y:c}}),w=(0,a.x)(e=>{const{a:t,d:n}=c;if(e.is0())throw new Error("bad point: ZERO");const{X:r,Y:i,Z:o,T:s}=e,a=m(r*r),l=m(i*i),u=m(o*o),d=m(u*u),h=m(a*t);if(m(u*m(h+l))!==m(d+m(n*m(a*l))))throw new Error("bad point: equation left != right (1)");if(m(r*i)!==m(o*s))throw new Error("bad point: equation left != right (2)");return!0});class _{constructor(e,t,n,r){this.X=b("x",e),this.Y=b("y",t),this.Z=b("z",n,!0),this.T=b("t",r),Object.freeze(this)}static CURVE(){return c}static fromAffine(e){if(e instanceof _)throw new Error("extended point not allowed");const{x:t,y:n}=e||{};return b("x",t),b("y",n),new _(t,n,u,m(t*n))}static fromBytes(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=r.BYTES,{a:i,d:o}=c;e=(0,a.nC)((0,a.eV)(e,n,"point")),(0,a.d6)(t,"zip215");const s=(0,a.nC)(e),d=e[n-1];s[n-1]=-129&d;const h=(0,a.lX)(s),f=t?p:r.ORDER;(0,a.aK)("point.y",h,l,f);const b=m(h*h),y=m(b-u),v=m(o*b-i);let{isValid:w,value:k}=g(y,v);if(!w)throw new Error("bad point: invalid y coordinate");const x=(k&u)===u,S=0!==(128&d);if(!t&&k===l&&S)throw new Error("bad point: x=0 and x_0=1");return S!==x&&(k=m(-k)),_.fromAffine({x:k,y:h})}static fromHex(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return _.fromBytes((0,a.qj)("point",e),t)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return k.createCache(this,e),t||this.multiply(d),this}assertValidity(){w(this)}equals(e){y(e);const{X:t,Y:n,Z:r}=this,{X:i,Y:o,Z:s}=e,a=m(t*s),c=m(i*r),l=m(n*s),u=m(o*r);return a===c&&l===u}is0(){return this.equals(_.ZERO)}negate(){return new _(m(-this.X),this.Y,this.Z,m(-this.T))}double(){const{a:e}=c,{X:t,Y:n,Z:r}=this,i=m(t*t),o=m(n*n),s=m(d*m(r*r)),a=m(e*i),l=t+n,u=m(m(l*l)-i-o),h=a+o,f=h-s,p=a-o,g=m(u*f),b=m(h*p),y=m(u*p),v=m(f*h);return new _(g,b,v,y)}add(e){y(e);const{a:t,d:n}=c,{X:r,Y:i,Z:o,T:s}=this,{X:a,Y:l,Z:u,T:d}=e,h=m(r*a),f=m(i*l),p=m(s*n*d),g=m(o*u),b=m((r+i)*(a+l)-h-f),v=g-p,w=g+p,k=m(f-t*h),x=m(b*v),S=m(w*k),E=m(b*k),A=m(v*w);return new _(x,S,A,E)}subtract(e){return this.add(e.negate())}multiply(e){if(!i.isValidNot0(e))throw new Error("invalid scalar: expected 1 <= sc < curve.n");const{p:t,f:n}=k.cached(this,e,e=>(0,s.Ak)(_,e));return(0,s.Ak)(_,[t,n])[0]}multiplyUnsafe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.ZERO;if(!i.isValid(e))throw new Error("invalid scalar: expected 0 <= sc < curve.n");return e===l?_.ZERO:this.is0()||e===u?this:k.unsafe(this,e,e=>(0,s.Ak)(_,e),t)}isSmallOrder(){return this.multiplyUnsafe(f).is0()}isTorsionFree(){return k.unsafe(this,c.n).is0()}toAffine(e){return v(this,e)}clearCofactor(){return f===u?this:this.multiplyUnsafe(f)}toBytes(){const{x:e,y:t}=this.toAffine(),n=r.toBytes(t);return n[n.length-1]|=e&u?128:0,n}toHex(){return(0,o.My)(this.toBytes())}toString(){return"<Point ".concat(this.is0()?"ZERO":this.toHex(),">")}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(e){return(0,s.Ak)(_,e)}static msm(e,t){return(0,s.Xf)(_,i,e,t)}_setWindowSize(e){this.precompute(e)}toRawBytes(){return this.toBytes()}}_.BASE=new _(c.Gx,c.Gy,u,m(c.Gx*c.Gy)),_.ZERO=new _(l,u,u,l),_.Fp=r,_.Fn=i;const k=new s.hT(_,i.BITS);return _.BASE.precompute(8),_}(t,n);return function(e,t){const n=t.Point;return Object.assign({},t,{ExtendedPoint:n,CURVE:e,nBitLength:n.Fn.BITS,nByteLength:n.Fn.BYTES})}(e,p(f,r,i))}var g=n(8788);const b=BigInt(0),y=BigInt(1),v=BigInt(2);function w(e){const t=function(e){return(0,a.DS)(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze((0,r.A)({},e))}(e),{P:n,type:i,adjustScalarBytes:s,powPminus2:l,randomBytes:u}=t,d="x25519"===i;if(!d&&"x448"!==i)throw new Error("invalid type");const h=u||o.po,f=d?255:448,p=d?32:56,m=d?BigInt(9):BigInt(5),g=d?BigInt(121665):BigInt(39081),w=d?v**BigInt(254):v**BigInt(447),_=d?BigInt(8)*v**BigInt(251)-y:BigInt(4)*v**BigInt(445)-y,k=w+_+y,x=e=>(0,c.zi)(e,n),S=E(m);function E(e){return(0,a.z)(x(e),p)}function A(e,t){const r=function(e,t){(0,a.aK)("u",e,b,n),(0,a.aK)("scalar",t,w,k);const r=t,i=e;let o=y,s=b,c=e,u=y,d=b;for(let n=BigInt(f-1);n>=b;n--){const e=r>>n&y;d^=e,({x_2:o,x_3:c}=C(d,o,c)),({x_2:s,x_3:u}=C(d,s,u)),d=e;const t=o+s,a=x(t*t),l=o-s,h=x(l*l),f=a-h,p=c+u,m=x((c-u)*t),b=x(p*l),v=m+b,w=m-b;c=x(v*v),u=x(i*x(w*w)),o=x(a*h),s=x(f*(a+x(g*f)))}({x_2:o,x_3:c}=C(d,o,c)),({x_2:s,x_3:u}=C(d,s,u));const h=l(s);return x(o*h)}(function(e){const t=(0,a.qj)("u coordinate",e,p);return d&&(t[31]&=127),x((0,a.lX)(t))}(t),function(e){return(0,a.lX)(s((0,a.qj)("scalar",e,p)))}(e));if(r===b)throw new Error("invalid private or public key received");return E(r)}function P(e){return A(e,S)}function C(e,t,n){const r=x(e*(t-n));return{x_2:t=x(t-r),x_3:n=x(n+r)}}const I={secretKey:p,publicKey:p,seed:p},M=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h(p);return(0,o.DO)(e,I.seed),e};return{keygen:function(e){const t=M(e);return{secretKey:t,publicKey:P(t)}},getSharedSecret:(e,t)=>A(e,t),getPublicKey:e=>P(e),scalarMult:A,scalarMultBase:P,utils:{randomSecretKey:M,randomPrivateKey:M},GuBytes:S.slice(),lengths:I}}const _=BigInt(0),k=BigInt(1),x=BigInt(2),S=BigInt(3),E=BigInt(5),A=BigInt(8),P=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),C=(()=>({p:P,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:A,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")}))();function I(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),i=BigInt(80),o=P,s=e*e%o*e%o,a=(0,c.zH)(s,x,o)*s%o,l=(0,c.zH)(a,k,o)*e%o,u=(0,c.zH)(l,E,o)*l%o,d=(0,c.zH)(u,t,o)*u%o,h=(0,c.zH)(d,n,o)*d%o,f=(0,c.zH)(h,r,o)*h%o,p=(0,c.zH)(f,i,o)*f%o,m=(0,c.zH)(p,i,o)*f%o,g=(0,c.zH)(m,t,o)*u%o;return{pow_p_5_8:(0,c.zH)(g,x,o)*e%o,b2:s}}function M(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const T=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function O(e,t){const n=P,r=(0,c.zi)(t*t*t,n),i=I(e*(0,c.zi)(r*r*t,n)).pow_p_5_8;let o=(0,c.zi)(e*r*i,n);const s=(0,c.zi)(t*o*o,n),a=o,l=(0,c.zi)(o*T,n),u=s===e,d=s===(0,c.zi)(-e,n),h=s===(0,c.zi)(-e*T,n);return u&&(o=a),(d||h)&&(o=l),(0,c.dQ)(o,n)&&(o=(0,c.zi)(-o,n)),{isValid:u||d,value:o}}const N=(()=>(0,c.D0)(C.p,{isLE:!0}))(),B=(()=>(0,c.D0)(C.n,{isLE:!0}))(),R=(()=>(0,r.A)((0,r.A)({},C),{},{Fp:N,hash:i.sha512,adjustScalarBytes:M,uvRatio:O}))(),j=(()=>m(R))();function L(e,t,n){if(t.length>255)throw new Error("Context is too big");return(0,o.Id)((0,o.AI)("SigEd25519 no Ed25519 collisions"),new Uint8Array([n?1:0,t.length]),t,e)}const F=(()=>m((0,r.A)((0,r.A)({},R),{},{domain:L})))(),z=(()=>m(Object.assign({},R,{domain:L,prehash:i.sha512})))(),D=(()=>{const e=N.ORDER;return w({P:e,type:"x25519",powPminus2:t=>{const{pow_p_5_8:n,b2:r}=I(t);return(0,c.zi)((0,c.zH)(n,S,e)*r,e)},adjustScalarBytes:M})})(),U=(()=>(P+S)/A)(),W=(()=>N.pow(x,U))(),q=(()=>N.sqrt(N.neg(N.ONE)))();const H=(()=>(0,c.Tv)(N,N.neg(BigInt(486664))))();function K(e){const{xMn:t,xMd:n,yMn:r,yMd:i}=function(e){const t=(P-E)/A,n=BigInt(486662);let r=N.sqr(e);r=N.mul(r,x);let i=N.add(r,N.ONE),o=N.neg(n),s=N.sqr(i),a=N.mul(s,i),c=N.mul(r,n);c=N.mul(c,o),c=N.add(c,s),c=N.mul(c,o);let l=N.sqr(a);s=N.sqr(l),l=N.mul(l,a),l=N.mul(l,c),s=N.mul(s,l);let u=N.pow(s,t);u=N.mul(u,l);let d=N.mul(u,q);s=N.sqr(u),s=N.mul(s,a);let h=N.eql(s,c),f=N.cmov(d,u,h),p=N.mul(o,r),m=N.mul(u,e);m=N.mul(m,W);let g=N.mul(m,q),b=N.mul(c,r);s=N.sqr(m),s=N.mul(s,a);let y=N.eql(s,b),v=N.cmov(g,m,y);s=N.sqr(f),s=N.mul(s,a);let w=N.eql(s,c),_=N.cmov(p,o,w),S=N.cmov(v,f,w),C=N.isOdd(S);return S=N.cmov(S,N.neg(S),w!==C),{xMn:_,xMd:i,yMn:S,yMd:k}}(e);let o=N.mul(t,i);o=N.mul(o,H);let s=N.mul(n,r),a=N.sub(t,n),l=N.add(t,n),u=N.mul(s,l),d=N.eql(u,N.ZERO);o=N.cmov(o,N.ZERO,d),s=N.cmov(s,N.ONE,d),a=N.cmov(a,N.ONE,d),l=N.cmov(l,N.ONE,d);const[h,f]=(0,c.pS)(N,[s,l],!0);return{x:N.mul(o,h),y:N.mul(a,f)}}const V=(()=>(0,g.qj)(j.Point,e=>K(e[0]),{DST:"edwards25519_XMD:SHA-512_ELL2_RO_",encodeDST:"edwards25519_XMD:SHA-512_ELL2_NU_",p:P,m:1,k:128,expand:"xmd",hash:i.sha512}))(),$=T,G=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),Z=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),J=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),Y=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),Q=e=>O(k,e),X=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ee=e=>j.Point.Fp.create((0,a.lX)(e)&X);function te(e){const{d:t}=C,n=P,r=e=>N.create(e),i=r($*e*e),o=r((i+k)*J);let s=BigInt(-1);const a=r((s-t*i)*r(i+t));let{isValid:l,value:u}=O(o,a),d=r(u*e);(0,c.dQ)(d,n)||(d=r(-d)),l||(u=d),l||(s=i);const h=r(s*(i-k)*Y-a),f=u*u,p=r((u+u)*a),m=r(h*G),g=r(k-f),b=r(k+f);return new j.Point(r(p*b),r(g*m),r(m*b),r(p*g))}function ne(e){(0,o.DO)(e,64);const t=te(ee(e.subarray(0,32))),n=te(ee(e.subarray(32,64)));return new re(t.add(n))}class re extends f{constructor(e){super(e)}static fromAffine(e){return new re(j.Point.fromAffine(e))}assertSame(e){if(!(e instanceof re))throw new Error("RistrettoPoint expected")}init(e){return new re(e)}static hashToCurve(e){return ne((0,a.qj)("ristrettoHash",e,64))}static fromBytes(e){(0,o.DO)(e,32);const{a:t,d:n}=C,r=P,i=e=>N.create(e),s=ee(e);if(!(0,a.ex)(N.toBytes(s),e)||(0,c.dQ)(s,r))throw new Error("invalid ristretto255 encoding 1");const l=i(s*s),u=i(k+t*l),d=i(k-t*l),h=i(u*u),f=i(d*d),p=i(t*n*h-f),{isValid:m,value:g}=Q(i(p*f)),b=i(g*d),y=i(g*b*p);let v=i((s+s)*b);(0,c.dQ)(v,r)&&(v=i(-v));const w=i(u*y),x=i(v*w);if(!m||(0,c.dQ)(x,r)||w===_)throw new Error("invalid ristretto255 encoding 2");return new re(new j.Point(v,w,k,x))}static fromHex(e){return re.fromBytes((0,a.qj)("ristrettoHex",e,32))}static msm(e,t){return(0,s.Xf)(re,j.Point.Fn,e,t)}toBytes(){let{X:e,Y:t,Z:n,T:r}=this.ep;const i=P,o=e=>N.create(e),s=o(o(n+t)*o(n-t)),a=o(e*t),l=o(a*a),{value:u}=Q(o(s*l)),d=o(u*s),h=o(u*a),f=o(d*h*r);let p;if((0,c.dQ)(r*f,i)){let n=o(t*$),r=o(e*$);e=n,t=r,p=o(d*Z)}else p=h;(0,c.dQ)(e*f,i)&&(t=o(-t));let m=o((n-t)*p);return(0,c.dQ)(m,i)&&(m=o(-m)),N.toBytes(m)}equals(e){this.assertSame(e);const{X:t,Y:n}=this.ep,{X:r,Y:i}=e.ep,o=e=>N.create(e),s=o(t*i)===o(n*r),a=o(n*i)===o(t*r);return s||a}is0(){return this.equals(re.ZERO)}}re.BASE=(()=>new re(j.Point.BASE))(),re.ZERO=(()=>new re(j.Point.ZERO))(),re.Fp=(()=>N)(),re.Fn=(()=>B)();const ie={Point:re},oe={hashToCurve(e,t){const n=(null===t||void 0===t?void 0:t.DST)||"ristretto255_XMD:SHA-512_R255MAP_RO_";return ne((0,g.Tq)(e,n,64,i.sha512))},hashToScalar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{DST:g.qX};const n=(0,g.Tq)(e,t.DST,64,i.sha512);return B.create((0,a.lX)(n))}},se=["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"];function ae(e){return j.utils.toMontgomery((0,a.qj)("pub",e))}const ce=ae;function le(e){return j.utils.toMontgomerySecret((0,a.qj)("pub",e))}const ue=re,de=(()=>V.hashToCurve)(),he=(()=>V.encodeToCurve)(),fe=(()=>oe.hashToCurve)(),pe=(()=>oe.hashToCurve)()},5720:function(e,t,n){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var s;"object"===typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(8379).Buffer}catch(C){}function a(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function c(e,t,n){var r=a(e,n);return n-1>=t&&(r|=a(e,n-1)<<4),r}function l(e,t,n,i){for(var o=0,s=0,a=Math.min(e.length,n),c=t;c<a;c++){var l=e.charCodeAt(c)-48;o*=i,s=l>=49?l-49+10:l>=17?l-17+10:l,r(l>=0&&s<i,"Invalid character"),o+=s}return o}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"===typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)i=c(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(e.length-t)%2===0?t+1:t;r<e.length;r+=2)i=c(e,t,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,s=o%r,a=Math.min(o,o-s)+n,c=0,u=n;u<a;u+=r)c=l(e,u,u+r,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var d=1;for(c=l(e,u,e.length,t),u=0;u<s;u++)d*=t;this.imuln(d),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){u(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(C){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],c=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),n=0!==o||s!==this.length-1?h[6-c.length]+c+n:c+n}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],u=p[e];n="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(u).toString(e);n=(d=d.idivn(u)).isZero()?m+n:h[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,c=s/67108864|0;n.words[0]=a;for(var l=1;l<r;l++){for(var u=c>>>26,d=67108863&c,h=Math.min(l,t.length-1),f=Math.max(0,l-e.length+1);f<=h;f++){var p=l-f|0;u+=(s=(i=0|e.words[p])*(o=0|t.words[f])+d)/67108864|0,d=67108863&s}n.words[l]=0|d,c=0|u}return 0!==c?n.words[l]=0|c:n.length--,n._strip()}o.prototype.toArrayLike=function(e,t,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;e[n++]=255&s,n<e.length&&(e[n++]=s>>8&255),n<e.length&&(e[n++]=s>>16&255),6===o?(n<e.length&&(e[n++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;e[n--]=255&s,n>=0&&(e[n--]=s>>8&255),n>=0&&(e[n--]=s>>16&255),6===o?(n>=0&&(e[n--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return r(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return r(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return r(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<n.length;s++)o=(t=(0|n.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r,i,o,s=e.words,a=t.words,c=n.words,l=0,u=0|s[0],d=8191&u,h=u>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],b=8191&g,y=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,k=0|s[4],x=8191&k,S=k>>>13,E=0|s[5],A=8191&E,P=E>>>13,C=0|s[6],I=8191&C,M=C>>>13,T=0|s[7],O=8191&T,N=T>>>13,B=0|s[8],R=8191&B,j=B>>>13,L=0|s[9],F=8191&L,z=L>>>13,D=0|a[0],U=8191&D,W=D>>>13,q=0|a[1],H=8191&q,K=q>>>13,V=0|a[2],$=8191&V,G=V>>>13,Z=0|a[3],J=8191&Z,Y=Z>>>13,Q=0|a[4],X=8191&Q,ee=Q>>>13,te=0|a[5],ne=8191&te,re=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ce=8191&ae,le=ae>>>13,ue=0|a[8],de=8191&ue,he=ue>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(l+(r=Math.imul(d,U))|0)+((8191&(i=(i=Math.imul(d,W))+Math.imul(h,U)|0))<<13)|0;l=((o=Math.imul(h,W))+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,W))+Math.imul(m,U)|0,o=Math.imul(m,W);var be=(l+(r=r+Math.imul(d,H)|0)|0)+((8191&(i=(i=i+Math.imul(d,K)|0)+Math.imul(h,H)|0))<<13)|0;l=((o=o+Math.imul(h,K)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(b,U),i=(i=Math.imul(b,W))+Math.imul(y,U)|0,o=Math.imul(y,W),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,K)|0;var ye=(l+(r=r+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,G)|0)+Math.imul(h,$)|0))<<13)|0;l=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,U),i=(i=Math.imul(w,W))+Math.imul(_,U)|0,o=Math.imul(_,W),r=r+Math.imul(b,H)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,K)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,G)|0;var ve=(l+(r=r+Math.imul(d,J)|0)|0)+((8191&(i=(i=i+Math.imul(d,Y)|0)+Math.imul(h,J)|0))<<13)|0;l=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(x,U),i=(i=Math.imul(x,W))+Math.imul(S,U)|0,o=Math.imul(S,W),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,K)|0,r=r+Math.imul(b,$)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,Y)|0;var we=(l+(r=r+Math.imul(d,X)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(h,X)|0))<<13)|0;l=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(A,U),i=(i=Math.imul(A,W))+Math.imul(P,U)|0,o=Math.imul(P,W),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(S,H)|0,o=o+Math.imul(S,K)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,Y)|0)+Math.imul(y,J)|0,o=o+Math.imul(y,Y)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var _e=(l+(r=r+Math.imul(d,ne)|0)|0)+((8191&(i=(i=i+Math.imul(d,re)|0)+Math.imul(h,ne)|0))<<13)|0;l=((o=o+Math.imul(h,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,W))+Math.imul(M,U)|0,o=Math.imul(M,W),r=r+Math.imul(A,H)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(P,H)|0,o=o+Math.imul(P,K)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,G)|0,r=r+Math.imul(w,J)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(b,X)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(m,ne)|0,o=o+Math.imul(m,re)|0;var ke=(l+(r=r+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,se)|0)+Math.imul(h,oe)|0))<<13)|0;l=((o=o+Math.imul(h,se)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(O,U),i=(i=Math.imul(O,W))+Math.imul(N,U)|0,o=Math.imul(N,W),r=r+Math.imul(I,H)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(M,H)|0,o=o+Math.imul(M,K)|0,r=r+Math.imul(A,$)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(P,$)|0,o=o+Math.imul(P,G)|0,r=r+Math.imul(x,J)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,Y)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(b,ne)|0,i=(i=i+Math.imul(b,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var xe=(l+(r=r+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(h,ce)|0))<<13)|0;l=((o=o+Math.imul(h,le)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(R,U),i=(i=Math.imul(R,W))+Math.imul(j,U)|0,o=Math.imul(j,W),r=r+Math.imul(O,H)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,K)|0,r=r+Math.imul(I,$)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(M,$)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,Y)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,Y)|0,r=r+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,le)|0;var Se=(l+(r=r+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,he)|0)+Math.imul(h,de)|0))<<13)|0;l=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(F,U),i=(i=Math.imul(F,W))+Math.imul(z,U)|0,o=Math.imul(z,W),r=r+Math.imul(R,H)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(j,H)|0,o=o+Math.imul(j,K)|0,r=r+Math.imul(O,$)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(M,J)|0,o=o+Math.imul(M,Y)|0,r=r+Math.imul(A,X)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(S,ne)|0,o=o+Math.imul(S,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,se)|0,r=r+Math.imul(b,ce)|0,i=(i=i+Math.imul(b,le)|0)+Math.imul(y,ce)|0,o=o+Math.imul(y,le)|0,r=r+Math.imul(p,de)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,he)|0;var Ee=(l+(r=r+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(h,pe)|0))<<13)|0;l=((o=o+Math.imul(h,me)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(F,H),i=(i=Math.imul(F,K))+Math.imul(z,H)|0,o=Math.imul(z,K),r=r+Math.imul(R,$)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(j,$)|0,o=o+Math.imul(j,G)|0,r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,Y)|0)+Math.imul(N,J)|0,o=o+Math.imul(N,Y)|0,r=r+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(M,X)|0,o=o+Math.imul(M,ee)|0,r=r+Math.imul(A,ne)|0,i=(i=i+Math.imul(A,re)|0)+Math.imul(P,ne)|0,o=o+Math.imul(P,re)|0,r=r+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,se)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,se)|0,r=r+Math.imul(w,ce)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ce)|0,o=o+Math.imul(_,le)|0,r=r+Math.imul(b,de)|0,i=(i=i+Math.imul(b,he)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,he)|0;var Ae=(l+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(F,$),i=(i=Math.imul(F,G))+Math.imul(z,$)|0,o=Math.imul(z,G),r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,Y)|0,r=r+Math.imul(O,X)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(I,ne)|0,i=(i=i+Math.imul(I,re)|0)+Math.imul(M,ne)|0,o=o+Math.imul(M,re)|0,r=r+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,r=r+Math.imul(x,ce)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,le)|0,r=r+Math.imul(w,de)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(_,de)|0,o=o+Math.imul(_,he)|0;var Pe=(l+(r=r+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(y,pe)|0))<<13)|0;l=((o=o+Math.imul(y,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(F,J),i=(i=Math.imul(F,Y))+Math.imul(z,J)|0,o=Math.imul(z,Y),r=r+Math.imul(R,X)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,ee)|0,r=r+Math.imul(O,ne)|0,i=(i=i+Math.imul(O,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,r=r+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(P,ce)|0,o=o+Math.imul(P,le)|0,r=r+Math.imul(x,de)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(S,de)|0,o=o+Math.imul(S,he)|0;var Ce=(l+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0;l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(F,X),i=(i=Math.imul(F,ee))+Math.imul(z,X)|0,o=Math.imul(z,ee),r=r+Math.imul(R,ne)|0,i=(i=i+Math.imul(R,re)|0)+Math.imul(j,ne)|0,o=o+Math.imul(j,re)|0,r=r+Math.imul(O,oe)|0,i=(i=i+Math.imul(O,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(I,ce)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(M,ce)|0,o=o+Math.imul(M,le)|0,r=r+Math.imul(A,de)|0,i=(i=i+Math.imul(A,he)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,he)|0;var Ie=(l+(r=r+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(S,pe)|0))<<13)|0;l=((o=o+Math.imul(S,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(F,ne),i=(i=Math.imul(F,re))+Math.imul(z,ne)|0,o=Math.imul(z,re),r=r+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,r=r+Math.imul(O,ce)|0,i=(i=i+Math.imul(O,le)|0)+Math.imul(N,ce)|0,o=o+Math.imul(N,le)|0,r=r+Math.imul(I,de)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(M,de)|0,o=o+Math.imul(M,he)|0;var Me=(l+(r=r+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(P,pe)|0))<<13)|0;l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(F,oe),i=(i=Math.imul(F,se))+Math.imul(z,oe)|0,o=Math.imul(z,se),r=r+Math.imul(R,ce)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(j,ce)|0,o=o+Math.imul(j,le)|0,r=r+Math.imul(O,de)|0,i=(i=i+Math.imul(O,he)|0)+Math.imul(N,de)|0,o=o+Math.imul(N,he)|0;var Te=(l+(r=r+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(M,pe)|0))<<13)|0;l=((o=o+Math.imul(M,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(F,ce),i=(i=Math.imul(F,le))+Math.imul(z,ce)|0,o=Math.imul(z,le),r=r+Math.imul(R,de)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(j,de)|0,o=o+Math.imul(j,he)|0;var Oe=(l+(r=r+Math.imul(O,pe)|0)|0)+((8191&(i=(i=i+Math.imul(O,me)|0)+Math.imul(N,pe)|0))<<13)|0;l=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(F,de),i=(i=Math.imul(F,he))+Math.imul(z,de)|0,o=Math.imul(z,he);var Ne=(l+(r=r+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(j,pe)|0))<<13)|0;l=((o=o+Math.imul(j,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var Be=(l+(r=Math.imul(F,pe))|0)+((8191&(i=(i=Math.imul(F,me))+Math.imul(z,pe)|0))<<13)|0;return l=((o=Math.imul(z,me))+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,c[0]=ge,c[1]=be,c[2]=ye,c[3]=ve,c[4]=we,c[5]=_e,c[6]=ke,c[7]=xe,c[8]=Se,c[9]=Ee,c[10]=Ae,c[11]=Pe,c[12]=Ce,c[13]=Ie,c[14]=Me,c[15]=Te,c[16]=Oe,c[17]=Ne,c[18]=Be,0!==l&&(c[19]=l,n.length++),n};function b(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,c=Math.min(o,t.length-1),l=Math.max(0,o-e.length+1);l<=c;l++){var u=o-l,d=(0|e.words[u])*(0|t.words[l]),h=67108863&d;a=67108863&(h=h+a|0),i+=(s=(s=s+(d/67108864|0)|0)+(h>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function y(e,t,n){return b(e,t,n)}function v(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):n<1024?b(this,e,t):y(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},v.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},v.prototype.permute=function(e,t,n,r,i,o){for(var s=0;s<o;s++)r[s]=t[e[s]],i[s]=n[e[s]]},v.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,c=Math.cos(2*Math.PI/a),l=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var d=c,h=l,f=0;f<s;f++){var p=n[u+f],m=r[u+f],g=n[u+f+s],b=r[u+f+s],y=d*g-h*b;b=d*b+h*g,g=y,n[u+f]=p+g,r[u+f]=m+b,n[u+f+s]=p-g,r[u+f+s]=m-b,f!==a&&(y=c*d-l*h,h=c*h+l*d,d=y)}},v.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},v.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},v.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,n,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)n[s]=0;r(0===o),r(0===(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},v.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),c=new Array(r),l=new Array(r),u=new Array(r),d=new Array(r),h=n.words;h.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,l,r),this.transform(s,o,a,c,r,i),this.transform(l,o,u,d,r,i);for(var f=0;f<r;f++){var p=a[f]*u[f]-c[f]*d[f];c[f]=a[f]*d[f]+c[f]*u[f],a[f]=p}return this.conjugate(a,c,r),this.transform(a,c,h,o,r,i),this.conjugate(h,o,r),this.normalize13b(h,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"===typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=s>>>26,this.words[i]=67108863&s}return 0!==n&&(this.words[i]=n,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=e.words[r]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){r("number"===typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,c=(0|this.words[t])-a<<n;this.words[t]=c|s,s=a>>>26-n}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var i;r("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,c=n;if(i-=s,i=Math.max(0,i),c){for(var l=0;l<s;l++)c.words[l]=this.words[l];c.length=s}if(0===s);else if(this.length>s)for(this.length-=s,l=0;l<this.length;l++)this.words[l]=this.words[l+s];else this.words[0]=0,this.length=1;var u=0;for(l=this.length-1;l>=0&&(0!==u||l>=i);l--){var d=0|this.words[l];this.words[l]=u<<26-o|d>>>o,u=d&a}return c&&0!==u&&(c.words[c.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},o.prototype.imaskn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"===typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var i,o,s=e.length+n;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+a;var c=(0|e.words[i])*t;a=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,s=0|i.words[i.length-1];0!==(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,c=r.length-i.length;if("mod"!==t){(a=new o(null)).length=c+1,a.words=new Array(a.length);for(var l=0;l<a.length;l++)a.words[l]=0}var u=r.clone()._ishlnsubmul(i,1,c);0===u.negative&&(r=u,a&&(a.words[c]=1));for(var d=c-1;d>=0;d--){var h=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(h=Math.min(h/s|0,67108863),r._ishlnsubmul(i,h,d);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);a&&(a.words[d]=h)}return a&&a._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),n&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),c=new o(1),l=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++l;for(var u=n.clone(),d=t.clone();!t.isZero();){for(var h=0,f=1;0===(t.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(u),s.isub(d)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0===(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||c.isOdd())&&(a.iadd(u),c.isub(d)),a.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(a),s.isub(c)):(n.isub(t),a.isub(i),c.isub(s))}return{a:a,b:c,gcd:n.iushln(l)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var l=0,u=1;0===(t.words[0]&u)&&l<26;++l,u<<=1);if(l>0)for(t.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);for(var d=0,h=1;0===(n.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(n.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);t.cmp(n)>=0?(t.isub(n),s.isub(a)):(n.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0===(1&this.words[0])},o.prototype.isOdd=function(){return 1===(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new A(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"===typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function P(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},i(k,_),k.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),i=0;i<r;i++)t.words[i]=e.words[i];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&n,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},k.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(x,_),i(S,_),i(E,_),E.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new k;else if("p224"===e)t=new x;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return w[e]=t,t},A.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},A.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),c=a.redNeg(),l=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,l).cmp(c);)u.redIAdd(c);for(var d=this.pow(u,i),h=this.pow(e,i.addn(1).iushrn(1)),f=this.pow(e,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var b=this.pow(d,new o(1).iushln(p-g-1));h=h.redMul(b),d=b.redSqr(),f=f.redMul(d),p=g}return h},A.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},A.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],s=0,a=0,c=t.bitLength()%26;for(0===c&&(c=26),r=t.length-1;r>=0;r--){for(var l=t.words[r],u=c-1;u>=0;u--){var d=l>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==s?(s<<=1,s|=d,(4===++a||0===r&&0===u)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}c=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new P(e)},i(P,A),P.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},P.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},P.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},P.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},P.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=n.nmd(e),this)},5744:(e,t,n)=>{"use strict";n.d(t,{z:()=>_});var r=n(9740),i=n(1979),o=n(4223),s=n(7802);const a=["baseUrl","Request","fetch","querySerializer","bodySerializer","headers","requestInitExt"],c=["baseUrl","fetch","Request","headers","params","parseAs","querySerializer","bodySerializer","body"],l=/\{[^{}]+\}/g;function u(e){let t=(0,r.A)({},e),{baseUrl:n="",Request:i=globalThis.Request,fetch:u=globalThis.fetch,querySerializer:y,bodySerializer:v,headers:w,requestInitExt:_}=t,k=(0,o.A)(t,a);_="object"===typeof s&&Number.parseInt(null===s||void 0===s||null===(s=s.versions)||void 0===s||null===(s=s.node)||void 0===s?void 0:s.substring(0,2))>=18&&s.versions.undici?_:void 0,n=b(n);const x=[];async function S(e,t){const s=t||{},{baseUrl:a,fetch:S=u,Request:E=i,headers:A,params:P={},parseAs:C="json",querySerializer:I,bodySerializer:M=(null!==v&&void 0!==v?v:m),body:T}=s,O=(0,o.A)(s,c);let N=n;var B;a&&(N=null!==(B=b(a))&&void 0!==B?B:n);let R="function"===typeof y?y:p(y);I&&(R="function"===typeof I?I:p((0,r.A)((0,r.A)({},"object"===typeof y?y:{}),I)));const j=void 0===T?void 0:M(T,g(w,A,P.header)),L=g(void 0===j||j instanceof FormData?{}:{"Content-Type":"application/json"},w,A,P.header),F=(0,r.A)((0,r.A)((0,r.A)({redirect:"follow"},k),O),{},{body:j,headers:L});let z,D,U,W=new i(function(e,t){var n,r;let i="".concat(t.baseUrl).concat(e);null!==(n=t.params)&&void 0!==n&&n.path&&(i=function(e,t){let n=e;for(const i of null!==(r=e.match(l))&&void 0!==r?r:[]){var r;let e=i.substring(1,i.length-1),o=!1,s="simple";if(e.endsWith("*")&&(o=!0,e=e.substring(0,e.length-1)),e.startsWith(".")?(s="label",e=e.substring(1)):e.startsWith(";")&&(s="matrix",e=e.substring(1)),!t||void 0===t[e]||null===t[e])continue;const a=t[e];Array.isArray(a)?n=n.replace(i,f(e,a,{style:s,explode:o})):n="object"!==typeof a?"matrix"!==s?n.replace(i,"label"===s?".".concat(encodeURIComponent(a)):encodeURIComponent(a)):n.replace(i,";".concat(d(e,a))):n.replace(i,h(e,a,{style:s,explode:o}))}return n}(i,t.params.path));let o=t.querySerializer(null!==(r=t.params.query)&&void 0!==r?r:{});o.startsWith("?")&&(o=o.substring(1));o&&(i+="?".concat(o));return i}(e,{baseUrl:N,params:P,querySerializer:R}),F);for(const n in O)n in W||(W[n]=O[n]);if(x.length){z=Math.random().toString(36).slice(2,11),D=Object.freeze({baseUrl:N,fetch:S,parseAs:C,querySerializer:R,bodySerializer:M});for(const t of x)if(t&&"object"===typeof t&&"function"===typeof t.onRequest){const n=await t.onRequest({request:W,schemaPath:e,params:P,options:D,id:z});if(n){if(!(n instanceof i)){if(n instanceof Response){U=n;break}throw new Error("onRequest: must return new Request() or Response() when modifying the request")}W=n}}}if(!U){try{U=await S(W,_)}catch(q){let t=q;if(x.length)for(let n=x.length-1;n>=0;n--){const r=x[n];if(r&&"object"===typeof r&&"function"===typeof r.onError){const n=await r.onError({request:W,error:t,schemaPath:e,params:P,options:D,id:z});if(n){if(n instanceof Response){t=void 0,U=n;break}if(n instanceof Error){t=n;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(t)throw t}if(x.length)for(let t=x.length-1;t>=0;t--){const n=x[t];if(n&&"object"===typeof n&&"function"===typeof n.onResponse){const t=await n.onResponse({request:W,response:U,schemaPath:e,params:P,options:D,id:z});if(t){if(!(t instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");U=t}}}}if(204===U.status||"HEAD"===W.method||"0"===U.headers.get("Content-Length"))return U.ok?{data:void 0,response:U}:{error:void 0,response:U};if(U.ok)return"stream"===C?{data:U.body,response:U}:{data:await U[C](),response:U};let q=await U.text();try{q=JSON.parse(q)}catch(H){}return{error:q,response:U}}return{request:(e,t,n)=>S(t,(0,r.A)((0,r.A)({},n),{},{method:e.toUpperCase()})),GET:(e,t)=>S(e,(0,r.A)((0,r.A)({},t),{},{method:"GET"})),PUT:(e,t)=>S(e,(0,r.A)((0,r.A)({},t),{},{method:"PUT"})),POST:(e,t)=>S(e,(0,r.A)((0,r.A)({},t),{},{method:"POST"})),DELETE:(e,t)=>S(e,(0,r.A)((0,r.A)({},t),{},{method:"DELETE"})),OPTIONS:(e,t)=>S(e,(0,r.A)((0,r.A)({},t),{},{method:"OPTIONS"})),HEAD:(e,t)=>S(e,(0,r.A)((0,r.A)({},t),{},{method:"HEAD"})),PATCH:(e,t)=>S(e,(0,r.A)((0,r.A)({},t),{},{method:"PATCH"})),TRACE:(e,t)=>S(e,(0,r.A)((0,r.A)({},t),{},{method:"TRACE"})),use(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const r of t)if(r){if("object"!==typeof r||!("onRequest"in r||"onResponse"in r||"onError"in r))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");x.push(r)}},eject(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(const r of t){const e=x.indexOf(r);-1!==e&&x.splice(e,1)}}}}function d(e,t,n){if(void 0===t||null===t)return"";if("object"===typeof t)throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return"".concat(e,"=").concat(!0===(null===n||void 0===n?void 0:n.allowReserved)?t:encodeURIComponent(t))}function h(e,t,n){if(!t||"object"!==typeof t)return"";const r=[],i={simple:",",label:".",matrix:";"}[n.style]||"&";if("deepObject"!==n.style&&!1===n.explode){for(const e in t)r.push(e,!0===n.allowReserved?t[e]:encodeURIComponent(t[e]));const i=r.join(",");switch(n.style){case"form":return"".concat(e,"=").concat(i);case"label":return".".concat(i);case"matrix":return";".concat(e,"=").concat(i);default:return i}}for(const s in t){const i="deepObject"===n.style?"".concat(e,"[").concat(s,"]"):s;r.push(d(i,t[s],n))}const o=r.join(i);return"label"===n.style||"matrix"===n.style?"".concat(i).concat(o):o}function f(e,t,n){if(!Array.isArray(t))return"";if(!1===n.explode){const r={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[n.style]||",",i=(!0===n.allowReserved?t:t.map(e=>encodeURIComponent(e))).join(r);switch(n.style){case"simple":return i;case"label":return".".concat(i);case"matrix":return";".concat(e,"=").concat(i);default:return"".concat(e,"=").concat(i)}}const r={simple:",",label:".",matrix:";"}[n.style]||"&",i=[];for(const o of t)"simple"===n.style||"label"===n.style?i.push(!0===n.allowReserved?o:encodeURIComponent(o)):i.push(d(e,o,n));return"label"===n.style||"matrix"===n.style?"".concat(r).concat(i.join(r)):i.join(r)}function p(e){return function(t){const n=[];if(t&&"object"===typeof t)for(const i in t){const o=t[i];if(void 0!==o&&null!==o)if(Array.isArray(o)){if(0===o.length)continue;n.push(f(i,o,(0,r.A)((0,r.A)({style:"form",explode:!0},null===e||void 0===e?void 0:e.array),{},{allowReserved:(null===e||void 0===e?void 0:e.allowReserved)||!1})))}else"object"!==typeof o?n.push(d(i,o,e)):n.push(h(i,o,(0,r.A)((0,r.A)({style:"deepObject",explode:!0},null===e||void 0===e?void 0:e.object),{},{allowReserved:(null===e||void 0===e?void 0:e.allowReserved)||!1})))}return n.join("&")}}function m(e,t){if(e instanceof FormData)return e;if(t){var n,r;if("application/x-www-form-urlencoded"===(t.get instanceof Function?null!==(n=t.get("Content-Type"))&&void 0!==n?n:t.get("content-type"):null!==(r=t["Content-Type"])&&void 0!==r?r:t["content-type"]))return new URLSearchParams(e).toString()}return JSON.stringify(e)}function g(){const e=new Headers;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(const i of n){if(!i||"object"!==typeof i)continue;const t=i instanceof Headers?i.entries():Object.entries(i);for(const[n,r]of t)if(null===r)e.delete(n);else if(Array.isArray(r))for(const t of r)e.append(n,t);else void 0!==r&&e.set(n,r)}return e}function b(e){return e.endsWith("/")?e.substring(0,e.length-1):e}var y,v=n(7802),w=class{constructor(e){(0,i.A)(this,"sendFn",void 0),(0,i.A)(this,"batch",[]),(0,i.A)(this,"batchSize",void 0),(0,i.A)(this,"baseTimeoutMs",void 0),(0,i.A)(this,"currentTimeoutMs",void 0),(0,i.A)(this,"maxTimeoutMs",3e4),(0,i.A)(this,"timeoutId",null),(0,i.A)(this,"isSending",!1),this.batchSize=e.batchSize,this.baseTimeoutMs=e.baseTimeoutMs,this.currentTimeoutMs=e.baseTimeoutMs,this.sendFn=e.sendFn}enqueue(e){this.batch.push(e),this.schedule()}schedule(){this.batch.length>0&&!this.timeoutId&&(this.timeoutId=setTimeout(()=>{this.timeoutId=null,this.flush()},this.currentTimeoutMs))}async flush(){if(this.isSending||0===this.batch.length)return;this.isSending=!0;const e=[...this.batch.slice(0,this.batchSize)];this.batch=this.batch.slice(this.batchSize);try{await this.sendFn(e),this.currentTimeoutMs=this.baseTimeoutMs}catch(t){console.error("Sender: Failed to send batch",t),this.batch=[...e,...this.batch],this.currentTimeoutMs=Math.min(2*this.currentTimeoutMs,this.maxTimeoutMs)}finally{this.isSending=!1,this.schedule()}}};"undefined"!==typeof v&&(y={NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.NEXT_PUBLIC_METAMASK_ANALYTICS_ENDPOINT);var _=new class{constructor(e){(0,i.A)(this,"enabled",!1),(0,i.A)(this,"sender",void 0),(0,i.A)(this,"properties",{});const t=u({baseUrl:e});this.sender=new w({batchSize:100,baseTimeoutMs:200,sendFn:async e=>{const n=await t.POST("/v2/events",{body:e});if(200!==n.response.status)throw new Error(n.error)}})}enable(){this.enabled=!0}setGlobalProperty(e,t){if("integration_types"===e){const e=Array.isArray(this.properties.integration_types)?this.properties.integration_types:[],n=Array.isArray(t)?t:[];return void(this.properties.integration_types=[...new Set([...e,...n])])}this.properties[e]=t}track(e,t){if(!this.enabled)return;const n={namespace:"metamask/connect",event_name:e,properties:(0,r.A)((0,r.A)({},t),this.properties)};this.sender.enqueue(n)}}(null!==y&&void 0!==y?y:"https://mm-sdk-analytics.api.cx.metamask.io/")},5759:(e,t,n)=>{var r=n(1240);e.exports=r("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},5794:(e,t,n)=>{const r=n(100);function i(e){this.mode=r.BYTE,this.data="string"===typeof e?(new TextEncoder).encode(e):new Uint8Array(e)}i.getBitsLength=function(e){return 8*e},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){for(let t=0,n=this.data.length;t<n;t++)e.put(this.data[t],8)},e.exports=i},5806:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EventEmitter:()=>r,default:()=>i});var r=n(3960);const i=r},5823:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createEVMClient:()=>be,getInfuraRpcUrls:()=>P});var r,i,o,s,a=n(808),c=n(7663),l=n(444),u=n(5744),d=Object.defineProperty,h=Object.defineProperties,f=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,b=e=>{throw TypeError(e)},y=(e,t,n)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v=(e,t)=>{for(var n in t||(t={}))m.call(t,n)&&y(e,n,t[n]);if(p)for(var n of p(t))g.call(t,n)&&y(e,n,t[n]);return e},w=(e,t)=>h(e,f(t)),_=(e,t,n)=>t.has(e)||b("Cannot "+n),k=(e,t,n)=>(_(e,t,"read from private field"),n?n.call(e):t.get(e)),x=(e,t,n)=>t.has(e)?b("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),S=(e,t,n,r)=>(_(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),E=(e,t,n)=>(_(e,t,"access private method"),n),A=(e,t,n)=>new Promise((r,i)=>{var o=e=>{try{a(n.next(e))}catch(t){i(t)}},s=e=>{try{a(n.throw(e))}catch(t){i(t)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,s);a((n=n.apply(e,t)).next())}),P=e=>{let{infuraApiKey:t,chainIds:n}=e;const r=null==n?void 0:n.map(e=>"eip155:".concat((0,l.ME)(e))),i=(0,a.pm)({infuraApiKey:t,caipChainIds:r});return Object.entries(i).reduce((e,t)=>{let[n,r]=t;const{namespace:i,reference:o}=(0,c.rW)(n);if(i!==c.wV.Eip155)return e;return e[(0,l.cK)(parseInt(o,10))]=r,e},{})},C=["metamask_getProviderState","metamask_sendDomainMetadata","metamask_logWeb3ShimUsage","wallet_registerOnboarding","net_version","wallet_getPermissions"],I=["eth_accounts","eth_coinbase",...C,"wallet_requestPermissions","eth_requestAccounts","eth_chainId","wallet_revokePermissions","wallet_switchEthereumChain","wallet_addEthereumChain"],M="eip1193-compatible",T={[M]:!0},O="metamask-connect:evm",N=(0,a.h)(O,"63"),B=()=>{(0,a.Nw)(O)},R=class extends a.bk{constructor(e,t){super(),x(this,r),x(this,i),x(this,o,[]),x(this,s),S(this,r,e),S(this,i,t),this.request=this.request.bind(this),this.sendAsync=this.sendAsync.bind(this),this.send=this.send.bind(this),this.on=this.on.bind(this),this.off=this.off.bind(this),this.emit=this.emit.bind(this),this.once=this.once.bind(this),this.removeListener=this.removeListener.bind(this),this.listenerCount=this.listenerCount.bind(this)}request(e){return A(this,null,function*(){var t,n,o,c;if(N("request: ".concat(e.method," - chainId: ").concat(this.selectedChainId),e.params),I.includes(e.method))return null==(t=k(this,i))?void 0:t.call(this,e);if(!k(this,s))throw new Error("No chain ID selected");const u=(0,l.ME)(k(this,s)),d="eip155:".concat(u),h=k(this,r).options;if(!(null!=(o=null==(n=null==h?void 0:h.api)?void 0:n.supportedNetworks)?o:{})[d])throw new Error("Chain ".concat(d," is not configured in supportedNetworks. Requests cannot be made to chains not explicitly configured in supportedNetworks."));try{return yield k(this,r).invokeMethod({scope:d,request:{method:e.method,params:e.params}})}catch(f){if(f instanceof a.Uv&&void 0!==f.rpcCode){const e=new Error(null!=(c=f.rpcMessage)?c:f.reason);throw e.code=f.rpcCode,e}throw f}})}get selectedAccount(){return this.accounts[0]}set accounts(e){S(this,o,e)}get accounts(){return k(this,o)}get selectedChainId(){return k(this,s)}set selectedChainId(e){S(this,s,e)}get chainId(){return this.selectedChainId}sendAsync(e,t){return A(this,null,function*(){var n;const r=null!=(n=e.id)?n:1,i=this.request({method:e.method,params:e.params}).then(e=>({id:r,jsonrpc:"2.0",result:e})).catch(e=>{var t,n;return{id:r,jsonrpc:"2.0",error:{code:null!=(t=e.code)?t:-32603,message:null!=(n=e.message)?n:"Internal error",data:e.data}}});if(!t)return i;i.then(e=>{e.error?t(new Error(e.error.message),e):t(null,e)}).catch(e=>{t(e,null)})})}send(e,t){this.sendAsync(e,t)}};r=new WeakMap,i=new WeakMap,o=new WeakMap,s=new WeakMap;var j=e=>(0,c.nW)(e)?{namespace:e}:(0,c.K4)(e)?(0,c.rW)(e):{},L=e=>{const{namespace:t}=j(e);return t===c.wV.Eip155||e==="".concat(c.wV.Wallet,":").concat(c.wV.Eip155)},F=e=>/^0x[0-9A-Fa-f]+$/.test(e),z=e=>F(e)?e:"0x".concat(BigInt(e).toString(16)),D=e=>{if(!e)return[];const t=[];for(const n of Object.keys(e)){const{namespace:e,reference:r}=j(n);e===c.wV.Eip155&&r&&t.push(z(r))}return Array.from(new Set(t))};var U,W,q,H,K,V,$,G,Z,J,Y,Q,X,ee,te,ne,re,ie,oe,se,ae,ce,le,ue,de,he,fe,pe="0x1",me="cache_eth_chainId";U=new WeakMap,W=new WeakMap,q=new WeakMap,H=new WeakMap,K=new WeakMap,V=new WeakMap,$=new WeakMap,G=new WeakMap,Z=new WeakMap,J=new WeakSet,Y=function(){return k(this,U).options},Q=function(e,t,n){return{scope:t,request:{method:e,params:n}}},X=function(e,t,n){return A(this,null,function*(){const r=E(this,J,Y).call(this);try{const i=E(this,J,Q).call(this,e,t,n),o=yield(0,a.TN)(r,k(this,U).storage,i,k(this,U).transportType);u.z.track("mmconnect_wallet_action_requested",o)}catch(i){N("Error tracking mmconnect_wallet_action_requested event",i)}})},ee=function(e,t,n){return A(this,null,function*(){const r=E(this,J,Y).call(this);try{const i=E(this,J,Q).call(this,e,t,n),o=yield(0,a.TN)(r,k(this,U).storage,i,k(this,U).transportType);u.z.track("mmconnect_wallet_action_succeeded",o)}catch(i){N("Error tracking mmconnect_wallet_action_succeeded event",i)}})},te=function(e,t,n,r){return A(this,null,function*(){const i=E(this,J,Y).call(this);try{const o=E(this,J,Q).call(this,e,t,n),s=yield(0,a.TN)(i,k(this,U).storage,o,k(this,U).transportType);(0,a.m9)(r)?u.z.track("mmconnect_wallet_action_rejected",s):u.z.track("mmconnect_wallet_action_failed",s)}catch(o){N("Error tracking wallet action rejected or failed event",r)}})},ne=function(e){return A(this,null,function*(){if(k(this,Z)&&e.includes(k(this,Z)))return k(this,Z);try{const t=yield k(this,U).storage.adapter.get(me);if(t){const n=JSON.parse(t);if(e.includes(n))return n}}catch(t){N("Error retrieving cached chainId",t)}return e[0]})},re=function(e){return A(this,null,function*(){if(N("Intercepting request for method: ".concat(e.method)),C.includes(e.method))return Promise.reject(new Error("Method: ".concat(e.method," is not supported by Metamask Connect/EVM")));if("wallet_revokePermissions"===e.method)return this.disconnect();if("wallet_requestPermissions"===(t=e).method||"eth_requestAccounts"===t.method){const t="wallet_requestPermissions"===e.method,{method:r,params:i}=e,o=D(k(this,q));0===o.length&&o.push(pe);const s=k(this,W).selectedChainId,a=s&&o.includes(s)?s:o[0],c=[a,...o.filter(e=>e!==a)],u="eip155:".concat((0,l.ME)(a));yield E(this,J,X).call(this,r,u,i);try{const e=yield this.connect({chainIds:c,forceRequest:t});return yield E(this,J,ee).call(this,r,u,i),e}catch(n){throw yield E(this,J,te).call(this,r,u,i,n),n}}var t;return function(e){return"wallet_switchEthereumChain"===e.method}(e)?this.switchChain({chainId:e.params[0].chainId}):function(e){return"wallet_addEthereumChain"===e.method}(e)?E(this,J,oe).call(this,e.params[0]):function(e){return"eth_accounts"===e.method||"eth_coinbase"===e.method}(e)?k(this,W).accounts:function(e){return"eth_chainId"===e.method}(e)?k(this,W).selectedChainId:(N("Request not intercepted, forwarding to default handler",e),Promise.resolve())})},ie=function(){k(this,W).accounts=[],k(this,W).selectedChainId=void 0},oe=function(e){return A(this,null,function*(){N("addEthereumChain called",{chainConfiguration:e});const t="wallet_addEthereumChain";if(!e)throw new Error("No chain configuration found.");const n=e.chainId||k(this,W).selectedChainId||"0x1",r=(0,l.ME)(n),i="eip155:".concat(r),o=[e];yield E(this,J,X).call(this,t,i,o);try{null===(yield E(this,J,se).call(this,{method:"wallet_addEthereumChain",params:o})).result&&(yield E(this,J,ae).call(this,n),E(this,J,le).call(this,n)),yield E(this,J,ee).call(this,t,i,o)}catch(s){throw yield E(this,J,te).call(this,t,i,o,s),s}})},se=function(e){return A(this,null,function*(){N("direct request to metamask-provider called",e);const t=k(this,U).transport.sendEip1193Message(e);return"wallet_addEthereumChain"!==e.method&&"wallet_switchEthereumChain"!==e.method||k(this,U).openSimpleDeeplinkIfNeeded(),t})},ae=function(e){return A(this,null,function*(){try{yield k(this,U).storage.adapter.set(me,JSON.stringify(e))}catch(t){N("Error caching chainId",t)}})},ce=function(e){return A(this,null,function*(){var t;N("event: wallet_sessionChanged",e),S(this,q,null!=(t=null==e?void 0:e.sessionScopes)?t:{});const n=D(k(this,q));if(0===n.length)E(this,J,he).call(this);else{let e=[];if("connected"===k(this,U).status){e=(yield k(this,U).transport.sendEip1193Message({method:"eth_accounts",params:[]})).result}else e=(e=>{if(!e)return[];const t=[];for(const{accounts:n}of Object.values(e))if(n)for(const e of n){const{address:n,chainId:r}=(0,c.Dz)(e);L(r)&&F(n)&&t.push(n)}return Array.from(new Set(t))})(k(this,q));const t=yield E(this,J,ne).call(this,n);E(this,J,de).call(this,{chainId:t,accounts:e})}})},le=function(e){var t,n;e!==k(this,W).selectedChainId&&(N("handler: chainChanged",{chainId:e}),k(this,W).selectedChainId=e,k(this,W).emit("chainChanged",e),null==(n=null==(t=k(this,H))?void 0:t.chainChanged)||n.call(t,e))},ue=function(e){var t,n;e.length===k(this,W).accounts.length&&e.every((e,t)=>e===k(this,W).accounts[t])||(N("handler: accountsChanged",e),k(this,W).accounts=e,k(this,W).emit("accountsChanged",e),null==(n=null==(t=k(this,H))?void 0:t.accountsChanged)||n.call(t,e))},de=function(e){let{chainId:t,accounts:n}=e;var r,i,o,s,a,c,l;N("handler: connect",{chainId:t,accounts:n});const u={chainId:t,accounts:n};if("connected"===k(this,G))return E(this,J,le).call(this,t),void E(this,J,ue).call(this,n);k(this,W).selectedChainId=t,k(this,W).accounts=n,S(this,G,"connected"),k(this,W).emit("connect",u),null==(i=null==(r=k(this,H))?void 0:r.connect)||i.call(r,u),k(this,W).emit("chainChanged",t),null==(s=null==(o=k(this,H))?void 0:o.chainChanged)||s.call(o,t),k(this,W).emit("accountsChanged",n),null==(c=null==(a=k(this,H))?void 0:a.accountsChanged)||c.call(a,n),null==(l=k(this,$))||l.call(this);const d=e=>{N("core-event: accountsChanged",e),E(this,J,ue).call(this,e)},h=e=>{N("core-event: chainChanged",e.chainId),E(this,J,ae).call(this,e.chainId).catch(e=>{N("Error caching chainId in notification handler",e)}),E(this,J,le).call(this,e.chainId)};k(this,U).on("metamask_accountsChanged",d),k(this,U).on("metamask_chainChanged",h),S(this,$,()=>{k(this,U).off("metamask_accountsChanged",d),k(this,U).off("metamask_chainChanged",h)})},he=function(){var e,t;"disconnected"!==k(this,G)&&(S(this,G,"disconnected"),N("handler: disconnect"),k(this,W).emit("disconnect"),null==(t=null==(e=k(this,H))?void 0:e.disconnect)||t.call(e),E(this,J,ue).call(this,[]))},fe=function(e){var t,n;"connecting"===k(this,G)&&(N("handler: display_uri",e),k(this,W).emit("display_uri",e),null==(n=null==(t=k(this,H))?void 0:t.displayUri)||n.call(t,e))};var ge=class e{constructor(e){let{core:t,eventHandlers:n}=e;x(this,J),x(this,U),x(this,W),x(this,q,{}),x(this,H),x(this,K),x(this,V),x(this,$),x(this,G,"disconnected"),x(this,Z),S(this,U,t),S(this,W,new R(t,E(this,J,re).bind(this))),S(this,H,n),S(this,K,E(this,J,ce).bind(this)),k(this,U).on("wallet_sessionChanged",k(this,K)),S(this,V,E(this,J,fe).bind(this)),k(this,U).on("display_uri",k(this,V)),N("Connect/EVM constructor completed")}static create(t){return A(this,null,function*(){var n;const r=new e(t);let i;try{i=yield k(r,U).provider.getSession()}catch(o){i={sessionScopes:{}}}return yield E(n=r,J,ce).call(n,i),r})}connect(){return A(this,arguments,function(){var e=this;let{account:t,forceRequest:n,chainIds:r=[pe]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){var i;if(N("request: connect",{account:t}),!r||0===r.length)throw new Error("chainIds must be an array of at least one chain ID");S(e,Z,r[0]);const o=Array.from(new Set(null!=(i=r.concat(pe))?i:[pe])).map(e=>"eip155:".concat((0,l.ME)(e))),s=t?o.map(e=>"".concat(e,":").concat(t)):[];S(e,G,"connecting");try{const t=new Promise(t=>{k(e,W).once("connect",e=>{let{chainId:n,accounts:r}=e;N("fulfilled-request: connect",{chainId:n,accounts:r}),t({accounts:r,chainId:n})})});return yield k(e,U).connect(o,s,T,n),yield t}catch(a){throw S(e,G,"disconnected"),N("Error connecting to wallet",a),a}finally{S(e,Z,void 0)}}()})}connectAndSign(e){return A(this,arguments,function(e){var t=this;let{message:n,chainIds:r}=e;return function*(){var e,i;const{accounts:o,chainId:s}=yield t.connect({chainIds:null!=r?r:[pe]}),a=yield k(t,W).request({method:"personal_sign",params:[o[0],n]});return null==(i=null==(e=k(t,H))?void 0:e.connectAndSign)||i.call(e,{accounts:o,chainId:s,signature:a}),{accounts:o,chainId:s,signature:a}}()})}connectWith(e){return A(this,arguments,function(e){var t=this;let{method:n,params:r,chainIds:i,account:o,forceRequest:s}=e;return function*(){var e,a;const{accounts:c,chainId:l}=yield t.connect({chainIds:null!=i?i:[pe],account:o,forceRequest:s}),u="function"===typeof r?r(c[0]):r,d=yield k(t,W).request({method:n,params:u});return null==(a=null==(e=k(t,H))?void 0:e.connectWith)||a.call(e,{accounts:c,chainId:l,result:d}),{accounts:c,chainId:l,result:d}}()})}disconnect(){return A(this,null,function*(){var e;N("request: disconnect");const t=k(this,q),n=Object.keys(t).filter(e=>{const{namespace:t}=j(e);return"eip155"===t});yield k(this,U).disconnect(n),E(this,J,he).call(this),E(this,J,ie).call(this),null==(e=k(this,$))||e.call(this),S(this,$,void 0),N("fulfilled-request: disconnect")})}switchChain(e){return A(this,arguments,function(e){var t=this;let{chainId:n,chainConfiguration:r}=e;return function*(){const e="wallet_switchEthereumChain",i="eip155:".concat((0,l.ME)(n)),o=[{chainId:n}];if(t.selectedChainId===n)return Promise.resolve();if(D(k(t,q)).includes(n)&&k(t,U).transportType===a.Yg.MWP)return yield E(t,J,ae).call(t,n),E(t,J,le).call(t,n),Promise.resolve();yield E(t,J,X).call(t,e,i,o);try{const r=yield E(t,J,se).call(t,{method:"wallet_switchEthereumChain",params:o}),s=r;if(null==s?void 0:s.error)throw new Error(s.error.message);return yield E(t,J,ee).call(t,e,i,o),null===r.result&&(yield E(t,J,ae).call(t,n),E(t,J,le).call(t,n)),Promise.resolve()}catch(s){yield E(t,J,te).call(t,e,i,o,s);if(s.message.includes("Unrecognized chain ID")&&r)return E(t,J,oe).call(t,r);throw s}}()})}getProvider(){return k(this,W)}getChainId(){return this.selectedChainId}getAccount(){return k(this,W).selectedAccount}get accounts(){return k(this,W).accounts}get selectedAccount(){return k(this,W).selectedAccount}get selectedChainId(){return k(this,W).selectedChainId}get status(){return k(this,G)}};function be(e){return A(this,null,function*(){var t,n;if(e.debug&&B(),N("Creating Metamask Connect/EVM with options:",e),!(null==(t=e.api)?void 0:t.supportedNetworks)||0===Object.keys(e.api.supportedNetworks).length)throw new Error("supportedNetworks is required and must contain at least one chain configuration");!function(e,t){const n=[];for(const[i,o]of Object.entries(e))try{new URL(o)}catch(r){n.push("".concat(i,": ").concat(o))}if(n.length>0)throw new Error("".concat(t," contains invalid URLs:\n").concat(n.join("\n")))}(e.api.supportedNetworks,"supportedNetworks");const r=Object.entries(e.api.supportedNetworks).reduce((e,t)=>{let[n,r]=t;const i=parseInt(n,16);return e["eip155:".concat(i)]=r,e},{});try{const t=yield(0,a.CI)(w(v({},e),{api:{supportedNetworks:r},analytics:{integrationType:(null==(n=e.analytics)?void 0:n.integrationType)||"direct"},versions:{"connect-evm":"1.3.0"}}));return ge.create({core:t,eventHandlers:e.eventHandlers,supportedNetworks:e.api.supportedNetworks})}catch(i){throw console.error("Error creating Metamask Connect/EVM",i),i}})}},5844:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(t){o(t)}}function a(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWalletAdapter=t.WalletReadyState=t.EventEmitter=void 0,t.scopePollingDetectionStrategy=function(e){if("undefined"===typeof window||"undefined"===typeof document)return;const t=[];function n(){if(e())for(const e of t)e()}const r=setInterval(n,1e3);t.push(()=>clearInterval(r)),"loading"===document.readyState&&(document.addEventListener("DOMContentLoaded",n,{once:!0}),t.push(()=>document.removeEventListener("DOMContentLoaded",n)));"complete"!==document.readyState&&(window.addEventListener("load",n,{once:!0}),t.push(()=>window.removeEventListener("load",n)));n()},t.isIosAndRedirectable=function(){if(!navigator)return!1;const e=navigator.userAgent.toLowerCase(),t=e.includes("iphone")||e.includes("ipad"),n=e.includes("safari");return t&&n};const o=i(n(5806));t.EventEmitter=o.default;const s=n(7052);var a;!function(e){e.Installed="Installed",e.NotDetected="NotDetected",e.Loadable="Loadable",e.Unsupported="Unsupported"}(a||(t.WalletReadyState=a={}));class c extends o.default{get connected(){return!!this.publicKey}autoConnect(){return r(this,void 0,void 0,function*(){yield this.connect()})}prepareTransaction(e,t){return r(this,arguments,void 0,function(e,t){var n=this;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){const i=n.publicKey;if(!i)throw new s.WalletNotConnectedError;return e.feePayer=e.feePayer||i,e.recentBlockhash=e.recentBlockhash||(yield t.getLatestBlockhash({commitment:r.preflightCommitment,minContextSlot:r.minContextSlot})).blockhash,e}()})}}t.BaseWalletAdapter=c},5987:(e,t,n)=>{"use strict";e.exports=n(509)},6006:(e,t,n)=>{"use strict";n.d(t,{eL:()=>r,sz:()=>i});const r={gwei:9,wei:18},i={ether:-9,wei:9}},6065:(e,t,n)=>{const r=n(9178).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];const t=Math.floor(e/7)+2,n=r(e),i=145===n?26:2*Math.ceil((n-13)/(2*t-2)),o=[n-7];for(let r=1;r<t-1;r++)o[r]=o[r-1]-i;return o.push(6),o.reverse()},t.getPositions=function(e){const n=[],r=t.getRowColCoords(e),i=r.length;for(let t=0;t<i;t++)for(let e=0;e<i;e++)0===t&&0===e||0===t&&e===i-1||t===i-1&&0===e||n.push([r[t],r[e]]);return n}},6091:(e,t,n)=>{"use strict";n.d(t,{IQ:()=>u,ME:()=>l,Sl:()=>a,uU:()=>c});var r=n(6469),i=n(1478),o=n(191),s=n(3530);function a(e,t){let{size:n}=t;if((0,i.E)(e)>n)throw new r.u({givenSize:(0,i.E)(e),maxSize:n})}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{signed:n}=t;t.size&&a(e,{size:t.size});const r=BigInt(e);if(!n)return r;const i=(e.length-2)/2;return r<=(1n<<8n*BigInt(i)-1n)-1n?r:r-BigInt("0x".concat("f".padStart(2*i,"f")))-1n}function l(e){return Number(c(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}))}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,s.aT)(e);return t.size&&(a(n,{size:t.size}),n=(0,o.B)(n,{dir:"right"})),(new TextDecoder).decode(n)}},6140:(e,t,n)=>{"use strict";n.d(t,{Ik:()=>p,KC:()=>y,L5:()=>v,YO:()=>c,Yj:()=>b,ai:()=>f,bz:()=>a,eu:()=>u,g1:()=>g,lq:()=>m,me:()=>h,nd:()=>l});var r=n(9740),i=n(3054),o=n(1099),s=n(4591);function a(){return(0,s.E8)("any",()=>!0)}function c(e){return new i._k({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||"Expected an array value, but received: ".concat((0,o.yy)(e))})}function l(){return(0,s.E8)("integer",e=>"number"===typeof e&&!isNaN(e)&&Number.isInteger(e)||"Expected an integer, but received: ".concat((0,o.yy)(e)))}function u(e){const t=(0,o.yy)(e),n=typeof e;return new i._k({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||"Expected the literal `".concat(t,"`, but received: ").concat((0,o.yy)(n))})}function d(){return(0,s.E8)("never",()=>!1)}function h(e){return new i._k((0,r.A)((0,r.A)({},e),{},{validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)}))}function f(){return(0,s.E8)("number",e=>"number"===typeof e&&!isNaN(e)||"Expected a number, but received: ".concat((0,o.yy)(e)))}function p(e){const t=e?Object.keys(e):[],n=d();return new i._k({type:"object",schema:null!==e&&void 0!==e?e:null,*entries(r){if(e&&(0,o.Gv)(r)){const o=new Set(Object.keys(r));for(const n of t){o.delete(n);const t=e[n];i.P$.isExactOptional(t)&&!Object.prototype.hasOwnProperty.call(r,n)||(yield[n,r[n],e[n]])}for(const e of o)yield[e,r[e],n]}},validator:e=>(0,o.Gv)(e)||"Expected an object, but received: ".concat((0,o.yy)(e)),coercer:e=>(0,o.Gv)(e)?(0,r.A)({},e):e})}function m(e){return new i._k((0,r.A)((0,r.A)({},e),{},{validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)}))}function g(e,t){return new i._k({type:"record",schema:null,*entries(n){if((0,o.Gv)(n))for(const r in n){const i=n[r];yield[r,r,e],yield[r,i,t]}},validator:e=>(0,o.Gv)(e)||"Expected an object, but received: ".concat((0,o.yy)(e))})}function b(){return(0,s.E8)("string",e=>"string"===typeof e||"Expected a string, but received: ".concat((0,o.yy)(e)))}function y(e){const t=e.map(e=>e.type).join(" | ");return new i._k({type:"union",schema:null,coercer(t){for(const n of e){const[e,r]=n.validate(t,{coerce:!0});if(!e)return r}return t},validator(n,r){const i=[];for(const t of e){const[...e]=(0,o.eF)(n,t,r),[s]=e;if(null===s||void 0===s||!s[0])return[];for(const[t]of e)t&&i.push(t)}return["Expected the value to satisfy a union of `".concat(t,"`, but received: ").concat((0,o.yy)(n)),...i]}})}function v(){return(0,s.E8)("unknown",()=>!0)}},6345:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(4045),t),i(n(5163),t),i(n(8857),t),i(n(9154),t),i(n(6791),t)},6351:(e,t,n)=>{"use strict";n.d(t,{b2:()=>i,v2:()=>r});const r=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],i=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],o=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}]},6469:(e,t,n)=>{"use strict";n.d(t,{Ty:()=>i,u:()=>s,xO:()=>o});var r=n(8090);class i extends r.C{constructor(e){let{max:t,min:n,signed:r,size:i,value:o}=e;super('Number "'.concat(o,'" is not in safe ').concat(i?"".concat(8*i,"-bit ").concat(r?"signed":"unsigned"," "):"","integer range ").concat(t?"(".concat(n," to ").concat(t,")"):"(above ".concat(n,")")),{name:"IntegerOutOfRangeError"})}}class o extends r.C{constructor(e){super('Bytes value "'.concat(e,'" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.'),{name:"InvalidBytesBooleanError"})}}r.C;r.C;class s extends r.C{constructor(e){let{givenSize:t,maxSize:n}=e;super("Size cannot exceed ".concat(n," bytes. Given size: ").concat(t," bytes."),{name:"SizeOverflowError"})}}},6473:(e,t,n)=>{var r=n(4507),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,n){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},s.alloc=function(e,t,n){if("number"!==typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"===typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},6488:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SOLANA_CHAINS=t.SOLANA_LOCALNET_CHAIN=t.SOLANA_TESTNET_CHAIN=t.SOLANA_DEVNET_CHAIN=t.SOLANA_MAINNET_CHAIN=void 0,t.isSolanaChain=function(e){return t.SOLANA_CHAINS.includes(e)},t.SOLANA_MAINNET_CHAIN="solana:mainnet",t.SOLANA_DEVNET_CHAIN="solana:devnet",t.SOLANA_TESTNET_CHAIN="solana:testnet",t.SOLANA_LOCALNET_CHAIN="solana:localnet",t.SOLANA_CHAINS=[t.SOLANA_MAINNET_CHAIN,t.SOLANA_DEVNET_CHAIN,t.SOLANA_TESTNET_CHAIN,t.SOLANA_LOCALNET_CHAIN]},6491:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var o=e(t),s=0;s<o.length;s++)"default"!==o[s]&&r(n,t,o[s]);return i(n,t),n}}(),s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(t){o(t)}}function a(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WalletProvider=function(e){let{children:t,wallets:n,autoConnect:r,localStorageKey:i="walletName",onError:o}=e;const{connection:a}=(0,f.useConnection)(),y=(0,l.useStandardWalletAdapters)(n),v=(0,u.useMemo)(()=>{if(!function(e){const t=function(){var e,t;void 0===g&&(g=null!==(t=null===(e=globalThis.navigator)||void 0===e?void 0:e.userAgent)&&void 0!==t?t:null);return g}();return(0,d.default)({adapters:e,userAgentString:t})===d.Environment.MOBILE_WEB}(y))return null;const e=y.find(e=>e.name===c.SolanaMobileWalletAdapterWalletName);return e||new c.SolanaMobileWalletAdapter({addressSelector:(0,c.createDefaultAddressSelector)(),appIdentity:{uri:b()},authorizationResultCache:(0,c.createDefaultAuthorizationResultCache)(),cluster:(0,h.default)(null===a||void 0===a?void 0:a.rpcEndpoint),onWalletNotFound:(0,c.createDefaultWalletNotFoundHandler)()})},[y,null===a||void 0===a?void 0:a.rpcEndpoint]),w=(0,u.useMemo)(()=>null==v||-1!==y.indexOf(v)?y:[v,...y],[y,v]),[_,k]=(0,p.useLocalStorage)(i,null),x=(0,u.useMemo)(()=>{var e;return null!==(e=w.find(e=>e.name===_))&&void 0!==e?e:null},[w,_]),S=(0,u.useCallback)(e=>{_!==e&&(x&&x.name!==c.SolanaMobileWalletAdapterWalletName&&x.disconnect(),k(e))},[x,k,_]);(0,u.useEffect)(()=>{if(x)return x.on("disconnect",e),()=>{x.off("disconnect",e)};function e(){P.current||k(null)}},[x,y,k,_]);const E=(0,u.useRef)(!1),A=(0,u.useMemo)(()=>{if(r&&x)return()=>s(this,void 0,void 0,function*(){(!0===r||(yield r(x)))&&(E.current?yield x.connect():yield x.autoConnect())})},[r,x]),P=(0,u.useRef)(!1),C=(0,u.useCallback)(()=>{x&&S(null)},[x,S]),I=(0,u.useCallback)(e=>{E.current=!0,S(e)},[S]);return u.default.createElement(m.WalletProviderBase,{wallets:w,adapter:x,isUnloadingRef:P,onAutoConnectRequest:A,onConnectError:C,onError:o,onSelectWallet:I},t)};const c=n(4357),l=n(147),u=o(n(2176)),d=o(n(8168)),h=a(n(3269)),f=n(7144),p=n(3428),m=n(4434);let g;function b(){const e=globalThis.location;if(e)return"".concat(e.protocol,"//").concat(e.host)}},6583:(e,t,n)=>{"use strict";n.d(t,{EH:()=>o,YE:()=>a,jF:()=>s,qD:()=>c,rj:()=>i});var r=n(8090);class i extends r.C{constructor(e){let{blockNumber:t,chain:n,contract:r}=e;super('Chain "'.concat(n.name,'" does not support contract "').concat(r.name,'".'),{metaMessages:["This could be due to any of the following:",...t&&r.blockCreated&&r.blockCreated>t?['- The contract "'.concat(r.name,'" was not deployed until block ').concat(r.blockCreated," (current block ").concat(t,").")]:['- The chain does not have the contract "'.concat(r.name,'" configured.')]],name:"ChainDoesNotSupportContract"})}}class o extends r.C{constructor(e){let{chain:t,currentChainId:n}=e;super("The current chain of the wallet (id: ".concat(n,") does not match the target chain for the transaction (id: ").concat(t.id," \u2013 ").concat(t.name,")."),{metaMessages:["Current Chain ID: ".concat(n),"Expected Chain ID: ".concat(t.id," \u2013 ").concat(t.name)],name:"ChainMismatchError"})}}class s extends r.C{constructor(){super(["No chain was provided to the request.","Please provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient."].join("\n"),{name:"ChainNotFoundError"})}}class a extends r.C{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class c extends r.C{constructor(e){let{chainId:t}=e;super("number"===typeof t?'Chain ID "'.concat(t,'" is invalid.'):"Chain ID is invalid.",{name:"InvalidChainIdError"})}}},6600:(e,t,n)=>{"use strict";n.d(t,{A7:()=>o,BG:()=>s,Fo:()=>f,K0:()=>c,Oh:()=>l,RM:()=>g,jj:()=>a,k5:()=>d,lN:()=>m,lY:()=>h,uC:()=>p,vW:()=>u});var r=n(2958),i=n(8090);class o extends i.C{constructor(){var e;let{cause:t,message:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=null===n||void 0===n||null===(e=n.replace("execution reverted: ",""))||void 0===e?void 0:e.replace("execution reverted","");super("Execution reverted ".concat(r?"with reason: ".concat(r):"for an unknown reason","."),{cause:t,name:"ExecutionRevertedError"})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class s extends i.C{constructor(){let{cause:e,maxFeePerGas:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("The fee cap (`maxFeePerGas`".concat(t?" = ".concat((0,r.Q)(t)," gwei"):"",") cannot be higher than the maximum allowed value (2^256-1)."),{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class a extends i.C{constructor(){let{cause:e,maxFeePerGas:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("The fee cap (`maxFeePerGas`".concat(t?" = ".concat((0,r.Q)(t)):""," gwei) cannot be lower than the block base fee."),{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class c extends i.C{constructor(){let{cause:e,nonce:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("Nonce provided for the transaction ".concat(t?"(".concat(t,") "):"","is higher than the next one expected."),{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class l extends i.C{constructor(){let{cause:e,nonce:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(["Nonce provided for the transaction ".concat(t?"(".concat(t,") "):"","is lower than the current nonce of the account."),"Try increasing the nonce or find the latest nonce with `getTransactionCount`."].join("\n"),{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class u extends i.C{constructor(){let{cause:e,nonce:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("Nonce provided for the transaction ".concat(t?"(".concat(t,") "):"","exceeds the maximum allowed nonce."),{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends i.C{constructor(){let{cause:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(["The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account."].join("\n"),{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class h extends i.C{constructor(){let{cause:e,gas:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("The amount of gas ".concat(t?"(".concat(t,") "):"","provided for the transaction exceeds the limit allowed for the block."),{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class f extends i.C{constructor(){let{cause:e,gas:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super("The amount of gas ".concat(t?"(".concat(t,") "):"","provided for the transaction is too low."),{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class p extends i.C{constructor(e){let{cause:t}=e;super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends i.C{constructor(){let{cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(["The provided tip (`maxPriorityFeePerGas`".concat(t?" = ".concat((0,r.Q)(t)," gwei"):"",") cannot be higher than the fee cap (`maxFeePerGas`").concat(n?" = ".concat((0,r.Q)(n)," gwei"):"",").")].join("\n"),{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class g extends i.C{constructor(e){let{cause:t}=e;super("An error occurred while executing: ".concat(null===t||void 0===t?void 0:t.shortMessage),{cause:t,name:"UnknownNodeError"})}}},6703:(e,t,n)=>{"use strict";n.d(t,{u:()=>o});var r=n(2283);const i=new Map;function o(e){let{fn:t,id:n,shouldSplitBatch:o,wait:s=0,sort:a}=e;const c=async()=>{const e=u();l();const n=e.map(e=>{let{args:t}=e;return t});0!==n.length&&t(n).then(t=>{a&&Array.isArray(t)&&t.sort(a);for(let n=0;n<e.length;n++){const{resolve:r}=e[n];null===r||void 0===r||r([t[n],t])}}).catch(t=>{for(let n=0;n<e.length;n++){const{reject:r}=e[n];null===r||void 0===r||r(t)}})},l=()=>i.delete(n),u=()=>i.get(n)||[],d=e=>i.set(n,[...u(),e]);return{flush:l,async schedule(e){const{promise:t,resolve:n,reject:i}=(0,r.Y)();(null===o||void 0===o?void 0:o([...u().map(e=>{let{args:t}=e;return t}),e]))&&c();return u().length>0?(d({args:e,resolve:n,reject:i}),t):(d({args:e,resolve:n,reject:i}),setTimeout(c,s),t)}}}},6791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignAndSendAllTransactions=void 0,t.SignAndSendAllTransactions="solana:signAndSendAllTransactions"},6815:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeUnchecked=t.deserialize=t.serialize=t.BinaryReader=t.BinaryWriter=t.BorshError=t.baseDecode=t.baseEncode=void 0;const c=a(n(5720)),l=a(n(5759)),u=s(n(9063)),d=new("function"!==typeof TextDecoder?u.TextDecoder:TextDecoder)("utf-8",{fatal:!0});t.baseEncode=function(e){return"string"===typeof e&&(e=Buffer.from(e,"utf8")),l.default.encode(Buffer.from(e))},t.baseDecode=function(e){return Buffer.from(l.default.decode(e))};const h=1024;class f extends Error{constructor(e){super(e),this.fieldPath=[],this.originalMessage=e}addToFieldPath(e){this.fieldPath.splice(0,0,e),this.message=this.originalMessage+": "+this.fieldPath.join(".")}}t.BorshError=f;class p{constructor(){this.buf=Buffer.alloc(h),this.length=0}maybeResize(){this.buf.length<16+this.length&&(this.buf=Buffer.concat([this.buf,Buffer.alloc(h)]))}writeU8(e){this.maybeResize(),this.buf.writeUInt8(e,this.length),this.length+=1}writeU16(e){this.maybeResize(),this.buf.writeUInt16LE(e,this.length),this.length+=2}writeU32(e){this.maybeResize(),this.buf.writeUInt32LE(e,this.length),this.length+=4}writeU64(e){this.maybeResize(),this.writeBuffer(Buffer.from(new c.default(e).toArray("le",8)))}writeU128(e){this.maybeResize(),this.writeBuffer(Buffer.from(new c.default(e).toArray("le",16)))}writeU256(e){this.maybeResize(),this.writeBuffer(Buffer.from(new c.default(e).toArray("le",32)))}writeU512(e){this.maybeResize(),this.writeBuffer(Buffer.from(new c.default(e).toArray("le",64)))}writeBuffer(e){this.buf=Buffer.concat([Buffer.from(this.buf.subarray(0,this.length)),e,Buffer.alloc(h)]),this.length+=e.length}writeString(e){this.maybeResize();const t=Buffer.from(e,"utf8");this.writeU32(t.length),this.writeBuffer(t)}writeFixedArray(e){this.writeBuffer(Buffer.from(e))}writeArray(e,t){this.maybeResize(),this.writeU32(e.length);for(const n of e)this.maybeResize(),t(n)}toArray(){return this.buf.subarray(0,this.length)}}function m(e,t,n){const r=n.value;n.value=function(){try{for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.apply(this,t)}catch(i){if(i instanceof RangeError){const e=i.code;if(["ERR_BUFFER_OUT_OF_BOUNDS","ERR_OUT_OF_RANGE"].indexOf(e)>=0)throw new f("Reached the end of buffer when deserializing")}throw i}}}t.BinaryWriter=p;class g{constructor(e){this.buf=e,this.offset=0}readU8(){const e=this.buf.readUInt8(this.offset);return this.offset+=1,e}readU16(){const e=this.buf.readUInt16LE(this.offset);return this.offset+=2,e}readU32(){const e=this.buf.readUInt32LE(this.offset);return this.offset+=4,e}readU64(){const e=this.readBuffer(8);return new c.default(e,"le")}readU128(){const e=this.readBuffer(16);return new c.default(e,"le")}readU256(){const e=this.readBuffer(32);return new c.default(e,"le")}readU512(){const e=this.readBuffer(64);return new c.default(e,"le")}readBuffer(e){if(this.offset+e>this.buf.length)throw new f("Expected buffer length ".concat(e," isn't within bounds"));const t=this.buf.slice(this.offset,this.offset+e);return this.offset+=e,t}readString(){const e=this.readU32(),t=this.readBuffer(e);try{return d.decode(t)}catch(n){throw new f("Error decoding UTF-8 string: ".concat(n))}}readFixedArray(e){return new Uint8Array(this.readBuffer(e))}readArray(e){const t=this.readU32(),n=Array();for(let r=0;r<t;++r)n.push(e());return n}}function b(e){return e.charAt(0).toUpperCase()+e.slice(1)}function y(e,t,n,r,i){try{if("string"===typeof r)i["write".concat(b(r))](n);else if(r instanceof Array)if("number"===typeof r[0]){if(n.length!==r[0])throw new f("Expecting byte array of length ".concat(r[0],", but got ").concat(n.length," bytes"));i.writeFixedArray(n)}else if(2===r.length&&"number"===typeof r[1]){if(n.length!==r[1])throw new f("Expecting byte array of length ".concat(r[1],", but got ").concat(n.length," bytes"));for(let t=0;t<r[1];t++)y(e,null,n[t],r[0],i)}else i.writeArray(n,n=>{y(e,t,n,r[0],i)});else if(void 0!==r.kind)switch(r.kind){case"option":null===n||void 0===n?i.writeU8(0):(i.writeU8(1),y(e,t,n,r.type,i));break;case"map":i.writeU32(n.size),n.forEach((n,o)=>{y(e,t,o,r.key,i),y(e,t,n,r.value,i)});break;default:throw new f("FieldType ".concat(r," unrecognized"))}else v(e,n,i)}catch(o){throw o instanceof f&&o.addToFieldPath(t),o}}function v(e,t,n){if("function"===typeof t.borshSerialize)return void t.borshSerialize(n);const r=e.get(t.constructor);if(!r)throw new f("Class ".concat(t.constructor.name," is missing in schema"));if("struct"===r.kind)r.fields.map(r=>{let[i,o]=r;y(e,i,t[i],o,n)});else{if("enum"!==r.kind)throw new f("Unexpected schema kind: ".concat(r.kind," for ").concat(t.constructor.name));{const i=t[r.field];for(let o=0;o<r.values.length;++o){const[s,a]=r.values[o];if(s===i){n.writeU8(o),y(e,s,t[s],a,n);break}}}}}function w(e,t,n,r){try{if("string"===typeof n)return r["read".concat(b(n))]();if(n instanceof Array){if("number"===typeof n[0])return r.readFixedArray(n[0]);if("number"===typeof n[1]){const t=[];for(let i=0;i<n[1];i++)t.push(w(e,null,n[0],r));return t}return r.readArray(()=>w(e,t,n[0],r))}if("option"===n.kind){return r.readU8()?w(e,t,n.type,r):void 0}if("map"===n.kind){let i=new Map;const o=r.readU32();for(let s=0;s<o;s++){const o=w(e,t,n.key,r),s=w(e,t,n.value,r);i.set(o,s)}return i}return _(e,n,r)}catch(i){throw i instanceof f&&i.addToFieldPath(t),i}}function _(e,t,n){if("function"===typeof t.borshDeserialize)return t.borshDeserialize(n);const r=e.get(t);if(!r)throw new f("Class ".concat(t.name," is missing in schema"));if("struct"===r.kind){const r={};for(const[i,o]of e.get(t).fields)r[i]=w(e,i,o,n);return new t(r)}if("enum"===r.kind){const i=n.readU8();if(i>=r.values.length)throw new f("Enum index: ".concat(i," is out of range"));const[o,s]=r.values[i],a=w(e,o,s,n);return new t({[o]:a})}throw new f("Unexpected schema kind: ".concat(r.kind," for ").concat(t.constructor.name))}o([m],g.prototype,"readU8",null),o([m],g.prototype,"readU16",null),o([m],g.prototype,"readU32",null),o([m],g.prototype,"readU64",null),o([m],g.prototype,"readU128",null),o([m],g.prototype,"readU256",null),o([m],g.prototype,"readU512",null),o([m],g.prototype,"readString",null),o([m],g.prototype,"readFixedArray",null),o([m],g.prototype,"readArray",null),t.BinaryReader=g,t.serialize=function(e,t){const n=new(arguments.length>2&&void 0!==arguments[2]?arguments[2]:p);return v(e,t,n),n.toArray()},t.deserialize=function(e,t,n){const r=new(arguments.length>3&&void 0!==arguments[3]?arguments[3]:g)(n),i=_(e,t,r);if(r.offset<n.length)throw new f("Unexpected ".concat(n.length-r.offset," bytes after deserialized data"));return i},t.deserializeUnchecked=function(e,t,n){return _(e,t,new(arguments.length>3&&void 0!==arguments[3]?arguments[3]:g)(n))}},6912:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useStandardWalletAdapters=function(e){const t=s(()=>new Set),{get:n,on:r}=s(()=>(0,i.DEPRECATED_getWallets)()),[c,l]=(0,o.useState)(()=>a(n()));(0,o.useEffect)(()=>{const e=[r("register",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l(e=>[...e,...a(t)])}),r("unregister",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l(e=>e.filter(e=>t.some(t=>t===e.wallet)))})];return()=>e.forEach(e=>e())},[r]);const u=function(e){const t=(0,o.useRef)(void 0);return(0,o.useEffect)(()=>{t.current=e}),t.current}(c);return(0,o.useEffect)(()=>{if(!u)return;const e=new Set(c);new Set(u.filter(t=>!e.has(t))).forEach(e=>e.destroy())},[u,c]),(0,o.useEffect)(()=>()=>c.forEach(e=>e.destroy()),[]),(0,o.useMemo)(()=>[...c,...e.filter(e=>{let{name:n}=e;return!c.some(e=>e.name===n)||(t.has(n)||(t.add(n),console.warn("".concat(n," was registered as a Standard Wallet. The Wallet Adapter for ").concat(n," can be removed from your app."))),!1)})],[c,e,t])};const r=n(4691),i=n(9790),o=n(2176);function s(e){const t=(0,o.useRef)(void 0);return void 0===t.current&&(t.current={value:e()}),t.current.value}function a(e){return e.filter(r.isWalletAdapterCompatibleWallet).map(e=>new r.StandardWalletAdapter({wallet:e}))}},6961:(e,t,n)=>{"use strict";n.d(t,{b:()=>u,o:()=>l});var r=n(7578),i=n(3530),o=n(7568),s=n(7543),a=n(2569);const c=new s.A(8192);function l(e,t){if(c.has("".concat(e,".").concat(t)))return c.get("".concat(e,".").concat(t));const n=t?"".concat(t).concat(e.toLowerCase()):e.substring(2).toLowerCase(),r=(0,o.S)((0,i.Af)(n),"bytes"),s=(t?n.substring("".concat(t,"0x").length):n).split("");for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&s[i]&&(s[i]=s[i].toUpperCase()),(15&r[i>>1])>=8&&s[i+1]&&(s[i+1]=s[i+1].toUpperCase());const a="0x".concat(s.join(""));return c.set("".concat(e,".").concat(t),a),a}function u(e,t){if(!(0,a.P)(e,{strict:!1}))throw new r.M({address:e});return l(e,t)}},7052:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletWindowClosedError=t.WalletWindowBlockedError=t.WalletTimeoutError=t.WalletSignInError=t.WalletSignMessageError=t.WalletSignTransactionError=t.WalletSendTransactionError=t.WalletNotConnectedError=t.WalletKeypairError=t.WalletPublicKeyError=t.WalletAccountError=t.WalletDisconnectionError=t.WalletDisconnectedError=t.WalletConnectionError=t.WalletConfigError=t.WalletLoadError=t.WalletNotReadyError=t.WalletError=void 0;class n extends Error{constructor(e,t){super(e),this.error=t}}t.WalletError=n;t.WalletNotReadyError=class extends n{constructor(){super(...arguments),this.name="WalletNotReadyError"}};t.WalletLoadError=class extends n{constructor(){super(...arguments),this.name="WalletLoadError"}};t.WalletConfigError=class extends n{constructor(){super(...arguments),this.name="WalletConfigError"}};t.WalletConnectionError=class extends n{constructor(){super(...arguments),this.name="WalletConnectionError"}};t.WalletDisconnectedError=class extends n{constructor(){super(...arguments),this.name="WalletDisconnectedError"}};t.WalletDisconnectionError=class extends n{constructor(){super(...arguments),this.name="WalletDisconnectionError"}};t.WalletAccountError=class extends n{constructor(){super(...arguments),this.name="WalletAccountError"}};t.WalletPublicKeyError=class extends n{constructor(){super(...arguments),this.name="WalletPublicKeyError"}};t.WalletKeypairError=class extends n{constructor(){super(...arguments),this.name="WalletKeypairError"}};t.WalletNotConnectedError=class extends n{constructor(){super(...arguments),this.name="WalletNotConnectedError"}};t.WalletSendTransactionError=class extends n{constructor(){super(...arguments),this.name="WalletSendTransactionError"}};t.WalletSignTransactionError=class extends n{constructor(){super(...arguments),this.name="WalletSignTransactionError"}};t.WalletSignMessageError=class extends n{constructor(){super(...arguments),this.name="WalletSignMessageError"}};t.WalletSignInError=class extends n{constructor(){super(...arguments),this.name="WalletSignInError"}};t.WalletTimeoutError=class extends n{constructor(){super(...arguments),this.name="WalletTimeoutError"}};t.WalletWindowBlockedError=class extends n{constructor(){super(...arguments),this.name="WalletWindowBlockedError"}};t.WalletWindowClosedError=class extends n{constructor(){super(...arguments),this.name="WalletWindowClosedError"}}},7144:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionContext=void 0,t.useConnection=function(){return(0,r.useContext)(t.ConnectionContext)};const r=n(2176);t.ConnectionContext=(0,r.createContext)({})},7188:(e,t,n)=>{"use strict";n.d(t,{iY:()=>l});var r=n(9740),i=n(1588),o=n(226),s=n(2569);const a=n(8859).k;var c=n(1503);function l(e){const{abi:t,args:n=[],name:r}=e,s=(0,o.q)(r,{strict:!1}),l=t.filter(e=>s?"function"===e.type?(0,c.V)(e)===r:"event"===e.type&&a(e)===r:"name"in e&&e.name===r);if(0===l.length)return;if(1===l.length)return l[0];let h;for(const o of l){if(!("inputs"in o))continue;if(!n||0===n.length){if(!o.inputs||0===o.inputs.length)return o;continue}if(!o.inputs)continue;if(0===o.inputs.length)continue;if(o.inputs.length!==n.length)continue;if(n.every((e,t)=>{const n="inputs"in o&&o.inputs[t];return!!n&&u(e,n)})){if(h&&"inputs"in h&&h.inputs){const e=d(o.inputs,h.inputs,n);if(e)throw new i.nM({abiItem:o,type:e[0]},{abiItem:h,type:e[1]})}h=o}}return h||l[0]}function u(e,t){const n=typeof e,i=t.type;switch(i){case"address":return(0,s.P)(e,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:return"tuple"===i&&"components"in t?Object.values(t.components).every((t,n)=>u(Object.values(e)[n],t)):/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i)?"number"===n||"bigint"===n:/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i)?"string"===n||e instanceof Uint8Array:!!/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i)&&(Array.isArray(e)&&e.every(e=>u(e,(0,r.A)((0,r.A)({},t),{},{type:i.replace(/(\[[0-9]{0,}\])$/,"")}))))}}function d(e,t,n){for(const r in e){const i=e[r],o=t[r];if("tuple"===i.type&&"tuple"===o.type&&"components"in i&&"components"in o)return d(i.components,o.components,n[r]);const a=[i.type,o.type];if((()=>!(!a.includes("address")||!a.includes("bytes20"))||(a.includes("address")&&a.includes("string")||!(!a.includes("address")||!a.includes("bytes")))&&(0,s.P)(n[r],{strict:!1}))())return a}}},7278:(e,t,n)=>{"use strict";n.d(t,{c:()=>l});var r=n(625),i=n(2505),o=n(7578),s=n(6600),a=n(7814),c=n(2569);function l(e){const{account:t,gasPrice:n,maxFeePerGas:l,maxPriorityFeePerGas:u,to:d}=e,h=t?(0,r.J)(t):void 0;if(h&&!(0,c.P)(h.address))throw new o.M({address:h.address});if(d&&!(0,c.P)(d))throw new o.M({address:d});if("undefined"!==typeof n&&("undefined"!==typeof l||"undefined"!==typeof u))throw new a.n3;if(l&&l>i.Ao)throw new s.BG({maxFeePerGas:l});if(u&&l&&u>l)throw new s.lN({maxFeePerGas:l,maxPriorityFeePerGas:u})}},7282:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(7469),t),i(n(8417),t),i(n(3394),t),i(n(38),t)},7327:(e,t,n)=>{const r=n(9178),i=n(410),o=n(1605),s=n(100),a=n(1314),c=r.getBCHDigit(7973);function l(e,t){return s.getCharCountIndicator(e,t)+4}function u(e,t){let n=0;return e.forEach(function(e){const r=l(e.mode,t);n+=r+e.getBitsLength()}),n}t.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,n){if(!a.isValid(e))throw new Error("Invalid QR Code version");"undefined"===typeof n&&(n=s.BYTE);const o=8*(r.getSymbolTotalCodewords(e)-i.getTotalCodewordsCount(e,t));if(n===s.MIXED)return o;const c=o-l(n,e);switch(n){case s.NUMERIC:return Math.floor(c/10*3);case s.ALPHANUMERIC:return Math.floor(c/11*2);case s.KANJI:return Math.floor(c/13);case s.BYTE:default:return Math.floor(c/8)}},t.getBestVersionForData=function(e,n){let r;const i=o.from(n,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,n){for(let r=1;r<=40;r++)if(u(e,r)<=t.getCapacity(r,n,s.MIXED))return r}(e,i);if(0===e.length)return 1;r=e[0]}else r=e;return function(e,n,r){for(let i=1;i<=40;i++)if(n<=t.getCapacity(i,r,e))return i}(r.mode,r.getLength(),i)},t.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw new Error("Invalid QR Code version");let t=e<<12;for(;r.getBCHDigit(t)-c>=0;)t^=7973<<r.getBCHDigit(t)-c;return e<<12|t}},7469:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCommitment=function(e){switch(e){case"processed":case"confirmed":case"finalized":case void 0:return e;case"recent":return"processed";case"single":case"singleGossip":return"confirmed";case"max":case"root":return"finalized";default:return}}},7543:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});class r extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){const t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){const e=this.keys().next().value;e&&this.delete(e)}return this}}},7545:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>r})},7559:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isVersionedTransaction=function(e){return"version"in e}},7562:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disconnect=t.StandardDisconnect=void 0,t.StandardDisconnect="standard:disconnect",t.Disconnect=t.StandardDisconnect},7568:(e,t,n)=>{"use strict";n.d(t,{S:()=>a});var r=n(2494),i=n(226),o=n(3530),s=n(4456);function a(e,t){const n=t||"hex",a=(0,r.lY)((0,i.q)(e,{strict:!1})?(0,o.ZJ)(e):e);return"bytes"===n?a:(0,s.nj)(a)}},7570:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.WalletAdapterNetwork=void 0,function(e){e.Mainnet="mainnet-beta",e.Testnet="testnet",e.Devnet="devnet"}(n||(t.WalletAdapterNetwork=n={}))},7578:(e,t,n)=>{"use strict";n.d(t,{M:()=>i});var r=n(8090);class i extends r.C{constructor(e){let{address:t}=e;super('Address "'.concat(t,'" is invalid.'),{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}},7663:(e,t,n)=>{"use strict";n.d(t,{wV:()=>b,K4:()=>y,nW:()=>v,Dz:()=>_,rW:()=>w});var r=n(8512),i=n(4591);function o(e,t){return(0,i.E8)(e,e=>"string"===typeof e&&t.test(e))}const s=(0,r.A)(/^([\x2D0-9a-z]{3,8}):([\x2D0-9A-Z_a-z]{1,32})$/,{namespace:1,reference:2}),a=/^[\x2D0-9a-z]{3,8}$/,c=/^[\x2D0-9A-Z_a-z]{1,32}$/,l=(0,r.A)(/^(([\x2D0-9a-z]{3,8}):([\x2D0-9A-Z_a-z]{1,32})):([%\x2D\.0-9A-Za-z]{1,128})$/,{chainId:1,namespace:2,reference:3,accountAddress:4}),u=/^[%\x2D\.0-9A-Za-z]{1,128}$/,d=/^[\x2D0-9a-z]{3,8}$/,h=/^[%\x2D\.0-9A-Za-z]{1,128}$/,f=/^[%\x2D\.0-9A-Za-z]{1,78}$/,p=(0,r.A)(/^(([\x2D0-9a-z]{3,8}):([\x2D0-9A-Z_a-z]{1,32}))\/([\x2D0-9a-z]{3,8}):([%\x2D\.0-9A-Za-z]{1,128})$/,{chainId:1,namespace:2,reference:3,assetNamespace:4,assetReference:5}),m=(0,r.A)(/^(([\x2D0-9a-z]{3,8}):([\x2D0-9A-Z_a-z]{1,32}))\/([\x2D0-9a-z]{3,8}):([%\x2D\.0-9A-Za-z]{1,128})\/([%\x2D\.0-9A-Za-z]{1,78})$/,{chainId:1,namespace:2,reference:3,assetNamespace:4,assetReference:5,tokenId:6}),g=(0,r.A)(/^(([\x2D0-9a-z]{3,8}):([\x2D0-9A-Z_a-z]{1,32}))\/([\x2D0-9a-z]{3,8}):([%\x2D\.0-9A-Za-z]{1,128})(\/([%\x2D\.0-9A-Za-z]{1,78}))?$/,{chainId:1,namespace:2,reference:3,assetNamespace:4,assetReference:5,tokenId:7});o("CaipChainId",s),o("CaipNamespace",a),o("CaipReference",c),o("CaipAccountId",l),o("CaipAccountAddress",u),o("CaipAssetNamespace",d),o("CaipAssetReference",h),o("CaipTokenId",f),o("CaipAssetType",p),o("CaipAssetId",m),o("CaipAssetTypeOrId",g);var b;function y(e){return"string"===typeof e&&s.test(e)}function v(e){return"string"===typeof e&&a.test(e)}function w(e){const t=s.exec(e);if(null===t||void 0===t||!t.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}}function _(e){const t=l.exec(e);if(null===t||void 0===t||!t.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}!function(e){e.Bip122="bip122",e.Solana="solana",e.Tron="tron",e.Eip155="eip155",e.Wallet="wallet"}(b=b||(b={}))},7683:(e,t,n)=>{"use strict";function r(e){return"string"===typeof e[0]?i(e):function(e){let t=0;for(const i of e)t+=i.length;const n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}(e)}function i(e){return"0x".concat(e.reduce((e,t)=>e+t.replace("0x",""),""))}n.d(t,{aP:()=>i,xW:()=>r})},7690:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=a(e),s=o[0],c=o[1],l=new i(function(e,t,n){return 3*(t+n)/4-n}(0,s,c)),u=0,d=c>0?s-4:s;for(n=0;n<d;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],s=16383,a=0,c=r-i;a<c;a+=s)o.push(l(e,a,a+s>c?c:a+s));1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return o.join("")};for(var n=[],r=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=o[s],r[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function l(e,t,n){for(var r,i=[],o=t;o<n;o+=3)r=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(c(r));return i.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},7787:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useWalletMultiButton=function(e){let{onSelectWallet:t}=e;const{connect:n,connected:o,connecting:s,disconnect:a,disconnecting:c,publicKey:l,select:u,wallet:d,wallets:h}=(0,r.useWallet)();let f;f=s?"connecting":o?"connected":c?"disconnecting":d?"has-wallet":"no-wallet";const p=(0,i.useCallback)(()=>{n().catch(()=>{})},[n]),m=(0,i.useCallback)(()=>{a().catch(()=>{})},[a]),g=(0,i.useCallback)(()=>{t({onSelectWallet:u,wallets:h})},[t,u,h]);return{buttonState:f,onConnect:"has-wallet"===f?p:void 0,onDisconnect:"disconnecting"!==f&&"no-wallet"!==f?m:void 0,onSelectWallet:g,publicKey:null!==l&&void 0!==l?l:void 0,walletIcon:null===d||void 0===d?void 0:d.adapter.icon,walletName:null===d||void 0===d?void 0:d.adapter.name}};const r=n(5059),i=n(2176)},7802:e=>{var t,n,r=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"===typeof setTimeout?setTimeout:i}catch(e){t=i}try{n="function"===typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var a,c=[],l=!1,u=-1;function d(){l&&a&&(l=!1,a.length?c=a.concat(c):u=-1,c.length&&h())}function h(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(a=c,c=[];++u<t;)a&&a[u].run();u=-1,t=c.length}a=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new f(e,t)),1!==c.length||l||s(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},7814:(e,t,n)=>{"use strict";n.d(t,{$s:()=>d,Kc:()=>f,Kz:()=>h,Vg:()=>l,WA:()=>p,aO:()=>s,fZ:()=>u,n3:()=>a,zW:()=>c});var r=n(3300),i=n(2958),o=n(8090);function s(e){const t=Object.entries(e).map(e=>{let[t,n]=e;return void 0===n||!1===n?null:[t,n]}).filter(Boolean),n=t.reduce((e,t)=>{let[n]=t;return Math.max(e,n.length)},0);return t.map(e=>{let[t,r]=e;return" ".concat("".concat(t,":").padEnd(n+1)," ").concat(r)}).join("\n")}class a extends o.C{constructor(){super(["Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.","Use `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others."].join("\n"),{name:"FeeConflictError"})}}class c extends o.C{constructor(e){let{v:t}=e;super('Invalid `v` value "'.concat(t,'". Expected 27 or 28.'),{name:"InvalidLegacyVError"})}}class l extends o.C{constructor(e){let{transaction:t}=e;super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",s(t),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}o.C;o.C;class u extends o.C{constructor(e){let{storageKey:t}=e;super('Size for storage key "'.concat(t,'" is invalid. Expected 32 bytes. Got ').concat(Math.floor((t.length-2)/2)," bytes."),{name:"InvalidStorageKeySizeError"})}}class d extends o.C{constructor(e,t){var n;let{account:o,docsPath:a,chain:c,data:l,gas:u,gasPrice:d,maxFeePerGas:h,maxPriorityFeePerGas:f,nonce:p,to:m,value:g}=t;const b=s({chain:c&&"".concat(null===c||void 0===c?void 0:c.name," (id: ").concat(null===c||void 0===c?void 0:c.id,")"),from:null===o||void 0===o?void 0:o.address,to:m,value:"undefined"!==typeof g&&"".concat((0,r.c)(g)," ").concat((null===c||void 0===c||null===(n=c.nativeCurrency)||void 0===n?void 0:n.symbol)||"ETH"),data:l,gas:u,gasPrice:"undefined"!==typeof d&&"".concat((0,i.Q)(d)," gwei"),maxFeePerGas:"undefined"!==typeof h&&"".concat((0,i.Q)(h)," gwei"),maxPriorityFeePerGas:"undefined"!==typeof f&&"".concat((0,i.Q)(f)," gwei"),nonce:p});super(e.shortMessage,{cause:e,docsPath:a,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",b].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class h extends o.C{constructor(e){let{blockHash:t,blockNumber:n,blockTag:r,hash:i,index:o}=e,s="Transaction";r&&void 0!==o&&(s='Transaction at block time "'.concat(r,'" at index "').concat(o,'"')),t&&void 0!==o&&(s='Transaction at block hash "'.concat(t,'" at index "').concat(o,'"')),n&&void 0!==o&&(s='Transaction at block number "'.concat(n,'" at index "').concat(o,'"')),i&&(s='Transaction with hash "'.concat(i,'"')),super("".concat(s," could not be found."),{name:"TransactionNotFoundError"})}}class f extends o.C{constructor(e){let{hash:t}=e;super('Transaction receipt with hash "'.concat(t,'" could not be found. The Transaction may not be processed on a block yet.'),{name:"TransactionReceiptNotFoundError"})}}o.C;class p extends o.C{constructor(e){let{hash:t}=e;super('Timed out while waiting for transaction with hash "'.concat(t,'" to be confirmed.'),{name:"WaitForTransactionReceiptTimeoutError"})}}},7862:(e,t,n)=>{"use strict";n.d(t,{T:()=>Be});var r=n(9740),i=n(4223),o=n(8512),s=n(4015);const a=(0,o.A)(/^error ([a-zA-Z$_][a-zA-Z0-9$_]*)\((.*?)\)$/,{name:1,parameters:2});const c=(0,o.A)(/^event ([a-zA-Z$_][a-zA-Z0-9$_]*)\((.*?)\)$/,{name:1,parameters:2});const l=(0,o.A)(/^function ([a-zA-Z$_][a-zA-Z0-9$_]*)\((.*?)\)(?: (external|public{1}))?(?: (pure|view|nonpayable|payable{1}))?(?: returns\s?\((.*?)\))?$/,{name:1,parameters:2,scope:3,stateMutability:4,returns:5});const u=(0,o.A)(/^struct ([a-zA-Z$_][a-zA-Z0-9$_]*) \{(.*?)\}$/,{name:1,properties:2});function d(e){return u.test(e)}function h(e){return(0,s.Yv)(u,e)}const f=(0,o.A)(/^constructor\((.*?)\)(?:\s(payable{1}))?$/,{parameters:1,stateMutability:2});const p=(0,o.A)(/^fallback\(\) external(?:\s(payable{1}))?$/,{stateMutability:1});const m=/^receive\(\) external payable$/;new Set(["memory","indexed","storage","calldata"]);const g=new Set(["indexed"]),b=new Set(["calldata","memory","storage"]);class y extends Error{constructor(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=n.cause instanceof y?n.cause.details:null!==(t=n.cause)&&void 0!==t&&t.message?n.cause.message:n.details,i=n.cause instanceof y&&n.cause.docsPath||n.docsPath;super([e||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?["Docs: https://abitype.dev".concat(i)]:[],...r?["Details: ".concat(r)]:[],"Version: abitype@".concat("1.1.0")].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=e}}class v extends y{constructor(e){let{type:t}=e;super("Unknown type.",{metaMessages:['Type "'.concat(t,'" is not a valid ABI type. Perhaps you forgot to include a struct signature?')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class w extends y{constructor(e){let{type:t}=e;super("Unknown type.",{metaMessages:['Type "'.concat(t,'" is not a valid ABI type.')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class _ extends y{constructor(e){let{param:t}=e;super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class k extends y{constructor(e){let{param:t,name:n}=e;super("Invalid ABI parameter.",{details:t,metaMessages:['"'.concat(n,'" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class x extends y{constructor(e){let{param:t,type:n,modifier:r}=e;super("Invalid ABI parameter.",{details:t,metaMessages:['Modifier "'.concat(r,'" not allowed').concat(n?' in "'.concat(n,'" type'):"",".")]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class S extends y{constructor(e){let{param:t,type:n,modifier:r}=e;super("Invalid ABI parameter.",{details:t,metaMessages:['Modifier "'.concat(r,'" not allowed').concat(n?' in "'.concat(n,'" type'):"","."),'Data location can only be specified for array, struct, or mapping types, but "'.concat(r,'" was given.')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class E extends y{constructor(e){let{abiParameter:t}=e;super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class A extends y{constructor(e){let{signature:t,type:n}=e;super("Invalid ".concat(n," signature."),{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class P extends y{constructor(e){let{signature:t}=e;super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class C extends y{constructor(e){let{signature:t}=e;super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class I extends y{constructor(e){let{type:t}=e;super("Circular reference detected.",{metaMessages:['Struct "'.concat(t,'" is a circular reference.')]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class M extends y{constructor(e){let{current:t,depth:n}=e;super("Unbalanced parentheses.",{metaMessages:['"'.concat(t.trim(),'" has too many ').concat(n>0?"opening":"closing"," parentheses.")],details:'Depth "'.concat(n,'"')}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}const T=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function O(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e){return l.test(e)}(e))return function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(e){return(0,s.Yv)(l,e)}(e);if(!r)throw new A({signature:e,type:"function"});const i=L(r.parameters),o=[],a=i.length;for(let s=0;s<a;s++)o.push(j(i[s],{modifiers:b,structs:n,type:"function"}));const c=[];if(r.returns){const e=L(r.returns),t=e.length;for(let r=0;r<t;r++)c.push(j(e[r],{modifiers:b,structs:n,type:"function"}))}return{name:r.name,type:"function",stateMutability:null!==(t=r.stateMutability)&&void 0!==t?t:"nonpayable",inputs:o,outputs:c}}(e,t);if(function(e){return c.test(e)}(e))return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=function(e){return(0,s.Yv)(c,e)}(e);if(!n)throw new A({signature:e,type:"event"});const r=L(n.parameters),i=[],o=r.length;for(let s=0;s<o;s++)i.push(j(r[s],{modifiers:g,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:i}}(e,t);if(function(e){return a.test(e)}(e))return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=function(e){return(0,s.Yv)(a,e)}(e);if(!n)throw new A({signature:e,type:"error"});const r=L(n.parameters),i=[],o=r.length;for(let s=0;s<o;s++)i.push(j(r[s],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:i}}(e,t);if(function(e){return f.test(e)}(e))return function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(e){return(0,s.Yv)(f,e)}(e);if(!r)throw new A({signature:e,type:"constructor"});const i=L(r.parameters),o=[],a=i.length;for(let s=0;s<a;s++)o.push(j(i[s],{structs:n,type:"constructor"}));return{type:"constructor",stateMutability:null!==(t=r.stateMutability)&&void 0!==t?t:"nonpayable",inputs:o}}(e,t);if(function(e){return p.test(e)}(e))return function(e){var t;const n=function(e){return(0,s.Yv)(p,e)}(e);if(!n)throw new A({signature:e,type:"fallback"});return{type:"fallback",stateMutability:null!==(t=n.stateMutability)&&void 0!==t?t:"nonpayable"}}(e);if(function(e){return m.test(e)}(e))return{type:"receive",stateMutability:"payable"};throw new P({signature:e})}const N=(0,o.A)(/^([a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)((?:\[\d*?\])+?)?(?:\s(calldata|indexed|memory|storage{1}))?(?:\s([a-zA-Z$_][a-zA-Z0-9$_]*))?$/,{type:1,array:2,modifier:3,name:4}),B=(0,o.A)(/^\((.+?)\)((?:\[\d*?\])+?)?(?:\s(calldata|indexed|memory|storage{1}))?(?:\s([a-zA-Z$_][a-zA-Z0-9$_]*))?$/,{type:1,array:2,modifier:3,name:4}),R=/^u?int$/;function j(e,t){var n,i;const o=function(e,t,n){let r="";if(n)for(const i of Object.entries(n)){if(!i)continue;let e="";for(const t of i[1])e+="[".concat(t.type).concat(t.name?":".concat(t.name):"","]");r+="(".concat(i[0],"{").concat(e,"})")}return t?"".concat(t,":").concat(e).concat(r):e}(e,null===t||void 0===t?void 0:t.type,null===t||void 0===t?void 0:t.structs);if(T.has(o))return T.get(o);const a=s.wj.test(e),c=(0,s.Yv)(a?B:N,e);if(!c)throw new _({param:e});if(c.name&&function(e){return"address"===e||"bool"===e||"function"===e||"string"===e||"tuple"===e||s.BD.test(e)||s.Ge.test(e)||z.test(e)}(c.name))throw new k({param:e,name:c.name});const l=c.name?{name:c.name}:{},u="indexed"===c.modifier?{indexed:!0}:{},d=null!==(n=null===t||void 0===t?void 0:t.structs)&&void 0!==n?n:{};let h,f={};if(a){h="tuple";const e=L(c.type),t=[],n=e.length;for(let r=0;r<n;r++)t.push(j(e[r],{structs:d}));f={components:t}}else if(c.type in d)h="tuple",f={components:d[c.type]};else if(R.test(c.type))h="".concat(c.type,"256");else if("address payable"===c.type)h="address";else if(h=c.type,"struct"!==(null===t||void 0===t?void 0:t.type)&&!F(h))throw new w({type:h});if(c.modifier){var p,m;if(null===t||void 0===t||null===(p=t.modifiers)||void 0===p||null===(m=p.has)||void 0===m||!m.call(p,c.modifier))throw new x({param:e,type:null===t||void 0===t?void 0:t.type,modifier:c.modifier});if(b.has(c.modifier)&&!function(e,t){return t||"bytes"===e||"string"===e||"tuple"===e}(h,!!c.array))throw new S({param:e,type:null===t||void 0===t?void 0:t.type,modifier:c.modifier})}const g=(0,r.A)((0,r.A)((0,r.A)({type:"".concat(h).concat(null!==(i=c.array)&&void 0!==i?i:"")},l),u),f);return T.set(o,g),g}function L(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const i=e.trim().length;for(let o=0;o<i;o++){const i=e[o],s=e.slice(o+1);switch(i){case",":return 0===r?L(s,[...t,n.trim()]):L(s,t,"".concat(n).concat(i),r);case"(":return L(s,t,"".concat(n).concat(i),r+1);case")":return L(s,t,"".concat(n).concat(i),r-1);default:return L(s,t,"".concat(n).concat(i),r)}}if(""===n)return t;if(0!==r)throw new M({current:n,depth:r});return t.push(n.trim()),t}function F(e){return"address"===e||"bool"===e||"function"===e||"string"===e||s.BD.test(e)||s.Ge.test(e)}const z=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;const D=(0,o.A)(/^([a-zA-Z$_][a-zA-Z0-9$_]*)((?:\[\d*?\])+?)?$/,{type:1,array:2});function U(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Set;const i=[],o=e.length;for(let c=0;c<o;c++){const o=e[c];if(s.wj.test(o.type))i.push(o);else{const e=(0,s.Yv)(D,o.type);if(null===e||void 0===e||!e.type)throw new E({abiParameter:o});const{array:c,type:l}=e;if(l in t){var a;if(n.has(l))throw new I({type:l});i.push((0,r.A)((0,r.A)({},o),{},{type:"tuple".concat(null!==c&&void 0!==c?c:""),components:U(null!==(a=t[l])&&void 0!==a?a:[],t,new Set([...n,l]))}))}else{if(!F(l))throw new v({type:l});i.push(o)}}}return i}function W(e){const t=function(e){const t={},n=e.length;for(let s=0;s<n;s++){const n=e[s];if(!d(n))continue;const r=h(n);if(!r)throw new A({signature:n,type:"struct"});const i=r.properties.split(";"),o=[],a=i.length;for(let e=0;e<a;e++){const t=i[e].trim();if(!t)continue;const n=j(t,{type:"struct"});o.push(n)}if(!o.length)throw new C({signature:n});t[r.name]=o}const r={},i=Object.entries(t),o=i.length;for(let s=0;s<o;s++){const[e,n]=i[s];r[e]=U(n,t)}return r}(e),n=[],r=e.length;for(let i=0;i<r;i++){const r=e[i];d(r)||n.push(O(r,t))}return n}class q extends Error{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(e=>{if(t.cause instanceof q){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause&&"details"in t.cause&&"string"===typeof t.cause.details?t.cause.details:null!==(e=t.cause)&&void 0!==e&&e.message?t.cause.message:t.details})(),r=t.cause instanceof q&&t.cause.docsPath||t.docsPath,i="".concat("https://oxlib.sh").concat(null!==r&&void 0!==r?r:"");super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...n||r?["",n?"Details: ".concat(n):void 0,r?"See: ".concat(i):void 0]:[]].filter(e=>"string"===typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"ox@".concat("0.1.1")}),this.cause=t.cause,this.details=n,this.docs=i,this.docsPath=r,this.shortMessage=e}walk(e){return H(this,e)}}function H(e,t){return null!==t&&void 0!==t&&t(e)?e:e&&"object"===typeof e&&"cause"in e&&e.cause?H(e.cause,t):t?null:e}function K(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{signed:n,size:r}=t,i=BigInt(e);let o;r?o=n?(1n<<8n*BigInt(r)-1n)-1n:2n**(8n*BigInt(r))-1n:"number"===typeof e&&(o=BigInt(Number.MAX_SAFE_INTEGER));const s="bigint"===typeof o&&n?-o-1n:0;if(o&&i>o||i<s){const t="bigint"===typeof e?"n":"";throw new $({max:o?"".concat(o).concat(t):void 0,min:"".concat(s).concat(t),signed:n,size:r,value:"".concat(e).concat(t)})}const a=(n&&i<0?(1n<<BigInt(8*r))+BigInt(i):i).toString(16),c="0x".concat(a);return r?V(c,r):c}function V(e,t){return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{dir:n,size:r=32}=t;if(0===r)return e;const i=e.replace("0x","");if(i.length>2*r)throw new G({size:Math.ceil(i.length/2),targetSize:r,type:"Hex"});return"0x".concat(i["right"===n?"padEnd":"padStart"](2*r,"0"))}(e,{dir:"left",size:t})}class $ extends q{constructor(e){let{max:t,min:n,signed:r,size:i,value:o}=e;super("Number `".concat(o,"` is not in safe").concat(i?" ".concat(8*i,"-bit"):"").concat(r?" signed":" unsigned"," integer range ").concat(t?"(`".concat(n,"` to `").concat(t,"`)"):"(above `".concat(n,"`)"))),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class G extends q{constructor(e){let{size:t,targetSize:n,type:r}=e;super("".concat(r.charAt(0).toUpperCase()).concat(r.slice(1).toLowerCase()," size (`").concat(t,"`) exceeds padding size (`").concat(n,"`).")),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}function Z(e){return{address:e.address,amount:K(e.amount),index:K(e.index),validatorIndex:K(e.validatorIndex)}}var J=n(625),Y=n(6351);const Q="0x82ad56cb",X="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",ee="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",te="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033";var ne=n(8090),re=n(6583),ie=(n(8445),n(9774),n(2311));n(8551);var oe=n(7188),se=n(3300),ae=n(2958),ce=n(1588),le=n(4235),ue=n(7814);n(9603);class de extends ne.C{constructor(e,t){var n;let{account:r,docsPath:i,chain:o,data:s,gas:a,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:h,value:f,stateOverride:p}=t;const m=r?(0,J.J)(r):void 0;let g=(0,ue.aO)({from:null===m||void 0===m?void 0:m.address,to:h,value:"undefined"!==typeof f&&"".concat((0,se.c)(f)," ").concat((null===o||void 0===o||null===(n=o.nativeCurrency)||void 0===n?void 0:n.symbol)||"ETH"),data:s,gas:a,gasPrice:"undefined"!==typeof c&&"".concat((0,ae.Q)(c)," gwei"),maxFeePerGas:"undefined"!==typeof l&&"".concat((0,ae.Q)(l)," gwei"),maxPriorityFeePerGas:"undefined"!==typeof u&&"".concat((0,ae.Q)(u)," gwei"),nonce:d});p&&(g+="\n".concat((0,le.uj)(p))),super(e.shortMessage,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",g].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}ne.C;ne.C;ne.C;class he extends ne.C{constructor(e){let{factory:t}=e;super("Deployment for counterfactual contract call failed".concat(t?' for factory "'.concat(t,'".'):""),{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class fe extends ne.C{constructor(e){let{data:t,message:n}=e;super(n||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}var pe=n(1187);const me="/docs/contract/decodeFunctionResult";var ge=n(7683),be=n(5210);const ye="/docs/contract/encodeDeployData";function ve(e){const{abi:t,args:n,bytecode:r}=e;if(!n||0===n.length)return r;const i=t.find(e=>"type"in e&&"constructor"===e.type);if(!i)throw new ce.YW({docsPath:ye});if(!("inputs"in i))throw new ce.YF({docsPath:ye});if(!i.inputs||0===i.inputs.length)throw new ce.YF({docsPath:ye});const o=(0,be.h)(i.inputs,n);return(0,ge.aP)([r,o])}var we=n(1503);const _e="/docs/contract/encodeFunctionData";function ke(e){const{args:t}=e,{abi:n,functionName:r}=1===e.abi.length&&null!==(i=e.functionName)&&void 0!==i&&i.startsWith("0x")?e:function(e){const{abi:t,args:n,functionName:r}=e;let i=t[0];if(r){const e=(0,oe.iY)({abi:t,args:n,name:r});if(!e)throw new ce.Iz(r,{docsPath:_e});i=e}if("function"!==i.type)throw new ce.Iz(void 0,{docsPath:_e});return{abi:[i],functionName:(0,we.V)((0,ie.B)(i))}}(e);var i;const o=n[0],s=r,a="inputs"in o&&o.inputs?(0,be.h)(o.inputs,null!==t&&void 0!==t?t:[]):void 0;return(0,ge.aP)([s,null!==a&&void 0!==a?a:"0x"])}var xe=n(4456),Se=n(6600),Ee=n(2580);const Ae=["docsPath"];var Pe=n(3093),Ce=n(4367),Ie=n(6703),Me=n(9187),Te=n(7278);const Oe=["account","authorizationList","batch","blockNumber","blockTag","accessList","blobs","blockOverrides","code","data","factory","factoryData","gas","gasPrice","maxFeePerBlobGas","maxFeePerGas","maxPriorityFeePerGas","nonce","to","value","stateOverride"],Ne=["data","to"];async function Be(e,t){var o,s;const{account:a=e.account,authorizationList:c,batch:l=Boolean(null===(o=e.batch)||void 0===o?void 0:o.multicall),blockNumber:u,blockTag:d=(null!==(s=e.experimental_blockTag)&&void 0!==s?s:"latest"),accessList:h,blobs:f,blockOverrides:p,code:m,data:g,factory:b,factoryData:y,gas:v,gasPrice:w,maxFeePerBlobGas:_,maxFeePerGas:k,maxPriorityFeePerGas:x,nonce:S,to:E,value:A,stateOverride:P}=t,C=(0,i.A)(t,Oe),I=a?(0,J.J)(a):void 0;if(m&&(b||y))throw new ne.C("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(m&&E)throw new ne.C("Cannot provide both `code` & `to` as parameters.");const M=m&&g,T=b&&y&&E&&g,O=M||T,N=M?Re({code:m,data:g}):T?function(e){const{data:t,factory:n,factoryData:r,to:i}=e;return ve({abi:W(["constructor(address, bytes, address, bytes)"]),bytecode:ee,args:[i,t,n,r]})}({data:g,factory:b,factoryData:y,to:E}):g;try{var B;(0,Te.c)(t);const n=("bigint"===typeof u?(0,xe.cK)(u):void 0)||d,o=p?function(e){return(0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)((0,r.A)({},"bigint"===typeof e.baseFeePerGas&&{baseFeePerGas:K(e.baseFeePerGas)}),"bigint"===typeof e.blobBaseFee&&{blobBaseFee:K(e.blobBaseFee)}),"string"===typeof e.feeRecipient&&{feeRecipient:e.feeRecipient}),"bigint"===typeof e.gasLimit&&{gasLimit:K(e.gasLimit)}),"bigint"===typeof e.number&&{number:K(e.number)}),"bigint"===typeof e.prevRandao&&{prevRandao:K(e.prevRandao)}),"bigint"===typeof e.time&&{time:K(e.time)}),e.withdrawals&&{withdrawals:e.withdrawals.map(Z)})}(p):void 0,s=(0,Me.yH)(P),a=null===(B=e.chain)||void 0===B||null===(B=B.formatters)||void 0===B||null===(B=B.transactionRequest)||void 0===B?void 0:B.format,m=(a||Ce.Bv)((0,r.A)((0,r.A)({},(0,Pe.o)(C,{format:a})),{},{accessList:h,account:I,authorizationList:c,blobs:f,data:N,gas:v,gasPrice:w,maxFeePerBlobGas:_,maxFeePerGas:k,maxPriorityFeePerGas:x,nonce:S,to:O?void 0:E,value:A}),"call");if(l&&function(e){let{request:t}=e;const{data:n,to:r}=t,o=(0,i.A)(t,Ne);return!!n&&(!n.startsWith(Q)&&(!!r&&!(Object.values(o).filter(e=>"undefined"!==typeof e).length>0)))}({request:m})&&!s&&!o)try{return await async function(e,t){var n,i;const{batchSize:o=1024,deployless:s=!1,wait:a=0}="object"===typeof(null===(n=e.batch)||void 0===n?void 0:n.multicall)?e.batch.multicall:{},{blockNumber:c,blockTag:l=(null!==(i=e.experimental_blockTag)&&void 0!==i?i:"latest"),data:u,to:d}=t,h=(()=>{if(s)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return function(e){var t;let{blockNumber:n,chain:r,contract:i}=e;const o=null===r||void 0===r||null===(t=r.contracts)||void 0===t?void 0:t[i];if(!o)throw new re.rj({chain:r,contract:{name:i}});if(n&&o.blockCreated&&o.blockCreated>n)throw new re.rj({blockNumber:n,chain:r,contract:{name:i,blockCreated:o.blockCreated}});return o.address}({blockNumber:c,chain:e.chain,contract:"multicall3"});throw new re.YE})(),f="bigint"===typeof c?(0,xe.cK)(c):void 0,p=f||l,{schedule:m}=(0,Ie.u)({id:"".concat(e.uid,".").concat(p),wait:a,shouldSplitBatch(e){const t=e.reduce((e,t)=>{let{data:n}=t;return e+(n.length-2)},0);return t>2*o},fn:async t=>{const n=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),i=ke({abi:Y.v2,args:[n],functionName:"aggregate3"}),o=await e.request({method:"eth_call",params:[(0,r.A)({},null===h?{data:Re({code:te,data:i})}:{to:h,data:i}),p]});return function(e){const{abi:t,args:n,functionName:r,data:i}=e;let o=t[0];if(r){const e=(0,oe.iY)({abi:t,args:n,name:r});if(!e)throw new ce.Iz(r,{docsPath:me});o=e}if("function"!==o.type)throw new ce.Iz(void 0,{docsPath:me});if(!o.outputs)throw new ce.MR(o.name,{docsPath:me});const s=(0,pe.n)(o.outputs,i);return s&&s.length>1?s:s&&1===s.length?s[0]:void 0}({abi:Y.v2,args:[n],functionName:"aggregate3",data:o||"0x"})}}),[{returnData:g,success:b}]=await m({data:u,to:d});if(!b)throw new fe({data:g});return"0x"===g?{data:void 0}:{data:g}}(e,(0,r.A)((0,r.A)({},m),{},{blockNumber:u,blockTag:d}))}catch(R){if(!(R instanceof re.YE)&&!(R instanceof re.rj))throw R}const g=(()=>{const e=[m,n];return s&&o?[...e,s,o]:s?[...e,s]:o?[...e,{},o]:e})(),b=await e.request({method:"eth_call",params:g});return"0x"===b?{data:void 0}:{data:b}}catch(R){const o=function(e){var t;if(!(e instanceof ne.C))return;const n=e.walk();return"object"===typeof(null===n||void 0===n?void 0:n.data)?null===(t=n.data)||void 0===t?void 0:t.data:n.data}(R),{offchainLookup:s,offchainLookupSignature:a}=await n.e(700).then(n.bind(n,6700));if(!1!==e.ccipRead&&(null===o||void 0===o?void 0:o.slice(0,10))===a&&E)return{data:await s(e,{data:o,to:E})};if(O&&"0x101bb98d"===(null===o||void 0===o?void 0:o.slice(0,10)))throw new he({factory:b});throw function(e,t){let{docsPath:n}=t,o=(0,i.A)(t,Ae);const s=(()=>{const t=(0,Ee.l)(e,o);return t instanceof Se.RM?e:t})();return new de(s,(0,r.A)({docsPath:n},o))}(R,(0,r.A)((0,r.A)({},t),{},{account:I,chain:e.chain}))}}function Re(e){const{code:t,data:n}=e;return ve({abi:W(["constructor(bytes, bytes)"]),bytecode:X,args:[t,n]})}},7950:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element");function r(e,t,r){var i=null;if(void 0!==r&&(i=""+r),void 0!==t.key&&(i=""+t.key),"key"in t)for(var o in r={},t)"key"!==o&&(r[o]=t[o]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:i,ref:void 0!==t?t:null,props:r}}Symbol.for("react.fragment"),t.jsx=r,t.jsxs=r},7960:(e,t,n)=>{const r=n(9178).getSymbolSize;t.getPositions=function(e){const t=r(e);return[[0,0],[t-7,0],[0,t-7]]}},8090:(e,t,n)=>{"use strict";n.d(t,{C:()=>s});var r=n(9740);const i="2.38.6";let o={getDocsUrl:e=>{let{docsBaseUrl:t,docsPath:n="",docsSlug:r}=e;return n?"".concat(null!==t&&void 0!==t?t:"https://viem.sh").concat(n).concat(r?"#".concat(r):""):void 0},version:"viem@".concat(i)};class s extends Error{constructor(e){var t,n,a;let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l=c.cause instanceof s?c.cause.details:null!==(u=c.cause)&&void 0!==u&&u.message?c.cause.message:c.details;var u;const d=c.cause instanceof s&&c.cause.docsPath||c.docsPath,h=null===(t=(n=o).getDocsUrl)||void 0===t?void 0:t.call(n,(0,r.A)((0,r.A)({},c),{},{docsPath:d}));super([e||"An error occurred.","",...c.metaMessages?[...c.metaMessages,""]:[],...h?["Docs: ".concat(h)]:[],...l?["Details: ".concat(l)]:[],...o.version?["Version: ".concat(o.version)]:[]].join("\n"),c.cause?{cause:c.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=l,this.docsPath=d,this.metaMessages=c.metaMessages,this.name=null!==(a=c.name)&&void 0!==a?a:this.name,this.shortMessage=e,this.version=i}walk(e){return a(this,e)}}function a(e,t){return null!==t&&void 0!==t&&t(e)?e:e&&"object"===typeof e&&"cause"in e&&void 0!==e.cause?a(e.cause,t):t?null:e}},8168:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Environment=void 0,t.default=function(e){let{adapters:t,userAgentString:n}=e;if(t.some(e=>e.name!==r.SolanaMobileWalletAdapterWalletName&&e.readyState===i.WalletReadyState.Installed))return o.DESKTOP_WEB;return n&&/android/i.test(n)&&!function(e){return/(WebView|Version\/.+(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+)|; wv\).+(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+))/i.test(e)}(n)?o.MOBILE_WEB:o.DESKTOP_WEB};const r=n(4357),i=n(3651);var o;!function(e){e[e.DESKTOP_WEB=0]="DESKTOP_WEB",e[e.MOBILE_WEB=1]="MOBILE_WEB"}(o||(t.Environment=o={}))},8340:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(2611),t),i(n(3654),t)},8379:()=>{},8417:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LOCALNET_ENDPOINT=t.TESTNET_ENDPOINT=t.DEVNET_ENDPOINT=t.MAINNET_ENDPOINT=void 0,t.getChainForEndpoint=function(e){return e.includes(t.MAINNET_ENDPOINT)?r.SOLANA_MAINNET_CHAIN:/\bdevnet\b/i.test(e)?r.SOLANA_DEVNET_CHAIN:/\btestnet\b/i.test(e)?r.SOLANA_TESTNET_CHAIN:/\blocalhost\b/i.test(e)||/\b127\.0\.0\.1\b/.test(e)?r.SOLANA_LOCALNET_CHAIN:r.SOLANA_MAINNET_CHAIN},t.getEndpointForChain=function(e,n){return n||(e===r.SOLANA_MAINNET_CHAIN?t.MAINNET_ENDPOINT:e===r.SOLANA_DEVNET_CHAIN?t.DEVNET_ENDPOINT:e===r.SOLANA_TESTNET_CHAIN?t.TESTNET_ENDPOINT:e===r.SOLANA_LOCALNET_CHAIN?t.LOCALNET_ENDPOINT:t.MAINNET_ENDPOINT)};const r=n(6488);t.MAINNET_ENDPOINT="https://api.mainnet-beta.solana.com",t.DEVNET_ENDPOINT="https://api.devnet.solana.com",t.TESTNET_ENDPOINT="https://api.testnet.solana.com",t.LOCALNET_ENDPOINT="http://localhost:8899"},8445:(e,t,n)=>{"use strict";n.d(t,{J9:()=>o,Mc:()=>i,fD:()=>r});const r={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},o={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},8492:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletNotSelectedError=void 0;const r=n(3651);class i extends r.WalletError{constructor(){super(...arguments),this.name="WalletNotSelectedError"}}t.WalletNotSelectedError=i},8512:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7545);function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function o(){o=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var s=RegExp(e,r);return t.set(s,o||t.get(e)),i(s,n.prototype)}function s(e,n){var r=t.get(n);return Object.keys(r).reduce(function(t,n){var i=r[n];if("number"==typeof i)t[n]=e[i];else{for(var o=0;void 0===e[i[o]]&&o+1<i.length;)o++;t[n]=e[i[o]]}return t},Object.create(null))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=s(n,this);var r=n.indices;r&&(r.groups=s(r,this))}return n},n.prototype[Symbol.replace]=function(n,i){if("string"==typeof i){var o=t.get(this);return e[Symbol.replace].call(this,n,i.replace(/\$<([^>]+)(>|$)/g,function(e,t,n){if(""===n)return e;var r=o[t];return Array.isArray(r)?"$"+r.join("$"):"number"==typeof r?"$"+r:""}))}if("function"==typeof i){var a=this;return e[Symbol.replace].call(this,n,function(){var e=arguments;return"object"!=(0,r.A)(e[e.length-1])&&(e=[].slice.call(e)).push(s(e,a)),i.apply(this,e)})}return e[Symbol.replace].call(this,n,i)},o.apply(this,arguments)}},8551:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(e,t,n)=>JSON.stringify(e,(e,n)=>{const r="bigint"===typeof n?n.toString():n;return"function"===typeof t?t(e,r):r},n)},8599:(e,t,n)=>{"use strict";function r(e,t){let n=e.toString();const r=n.startsWith("-");r&&(n=n.slice(1)),n=n.padStart(t,"0");let[i,o]=[n.slice(0,n.length-t),n.slice(n.length-t)];return o=o.replace(/(0+)$/,""),"".concat(r?"-":"").concat(i||"0").concat(o?".".concat(o):"")}n.d(t,{J:()=>r})},8636:(e,t)=>{"use strict";function n(e,t){if(e===t)return!0;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.arraysEqual=n,t.bytesEqual=function(e,t){return n(e,t)}},8717:(e,t,n)=>{"use strict";n.r(t),n.d(t,{encodeToCurve:()=>X,hashToCurve:()=>Q,schnorr:()=>G,secp256k1:()=>R,secp256k1_hasher:()=>Y});var r=n(9740),i=n(929),o=n(2766),s=n(4934),a=n(3808),c=n(9231),l=n(4902);const u=(e,t)=>(e+(e>=0?t:-t)/b)/t;function d(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function h(e,t){const n={};for(let r of Object.keys(t))n[r]=void 0===e[r]?t[r]:e[r];return(0,a.d6)(n.lowS,"lowS"),(0,a.d6)(n.prehash,"prehash"),void 0!==n.format&&d(n.format),n}class f extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}}const p={Err:f,_tlv:{encode:(e,t)=>{const{Err:n}=p;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");const r=t.length/2,i=(0,a.zW)(r);if(i.length/2&128)throw new n("tlv.encode: long form length too big");const o=r>127?(0,a.zW)(i.length/2|128):"";return(0,a.zW)(e)+o+i+t},decode(e,t){const{Err:n}=p;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const i=t[r++];let o=0;if(!!(128&i)){const e=127&i;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");const s=t.subarray(r,r+e);if(s.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===s[0])throw new n("tlv.decode(long): zero leftmost byte");for(const t of s)o=o<<8|t;if(r+=e,o<128)throw new n("tlv.decode(long): not minimal encoding")}else o=i;const s=t.subarray(r,r+o);if(s.length!==o)throw new n("tlv.decode: wrong value length");return{v:s,l:t.subarray(r+o)}}},_int:{encode(e){const{Err:t}=p;if(e<m)throw new t("integer: negative integers are not allowed");let n=(0,a.zW)(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=p;if(128&e[0])throw new t("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new t("invalid signature integer: unnecessary leading zero");return(0,a.Ph)(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=p,i=(0,a.qj)("signature",e),{v:o,l:s}=r.decode(48,i);if(s.length)throw new t("invalid signature: left bytes after parsing");const{v:c,l:l}=r.decode(2,o),{v:u,l:d}=r.decode(2,l);if(d.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(c),s:n.decode(u)}},hexFromSig(e){const{_tlv:t,_int:n}=p,r=t.encode(2,n.encode(e.r))+t.encode(2,n.encode(e.s));return t.encode(48,r)}},m=BigInt(0),g=BigInt(1),b=BigInt(2),y=BigInt(3),v=BigInt(4);function w(e,t){const{BYTES:n}=e;let r;if("bigint"===typeof t)r=t;else{let o=(0,a.qj)("private key",t);try{r=e.fromBytes(o)}catch(i){throw new Error("invalid private key: expected ui8a of size ".concat(n,", got ").concat(typeof t))}}if(!e.isValidNot0(r))throw new Error("invalid private key: out of range [1..N-1]");return r}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,c.UT)("weierstrass",e,t),{Fp:r,Fn:i}=n;let s=n.CURVE;const{h:l,n:d}=s;(0,a.DS)(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:h}=t;if(h&&(!r.is0(s.a)||"bigint"!==typeof h.beta||!Array.isArray(h.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const f=S(r,i);function p(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}const b=t.toBytes||function(e,t,n){const{x:i,y:s}=t.toAffine(),c=r.toBytes(i);if((0,a.d6)(n,"isCompressed"),n){p();const e=!r.isOdd(s);return(0,o.Id)(k(e),c)}return(0,o.Id)(Uint8Array.of(4),c,r.toBytes(s))},_=t.fromBytes||function(e){(0,a.eV)(e,void 0,"Point");const{publicKey:t,publicKeyUncompressed:n}=f,i=e.length,o=e[0],s=e.subarray(1);if(i!==t||2!==o&&3!==o){if(i===n&&4===o){const e=r.BYTES,t=r.fromBytes(s.subarray(0,e)),n=r.fromBytes(s.subarray(e,2*e));if(!E(t,n))throw new Error("bad point: is not on curve");return{x:t,y:n}}throw new Error("bad point: got length ".concat(i,", expected compressed=").concat(t," or uncompressed=").concat(n))}{const e=r.fromBytes(s);if(!r.isValid(e))throw new Error("bad point: is not on curve, wrong x");const t=x(e);let n;try{n=r.sqrt(t)}catch(c){const e=c instanceof Error?": "+c.message:"";throw new Error("bad point: is not on curve, sqrt error"+e)}p();return 1===(1&o)!==r.isOdd(n)&&(n=r.neg(n)),{x:e,y:n}}};function x(e){const t=r.sqr(e),n=r.mul(t,e);return r.add(r.add(n,r.mul(e,s.a)),s.b)}function E(e,t){const n=r.sqr(t),i=x(e);return r.eql(n,i)}if(!E(s.Gx,s.Gy))throw new Error("bad curve params: generator point");const A=r.mul(r.pow(s.a,y),v),P=r.mul(r.sqr(s.b),BigInt(27));if(r.is0(r.add(A,P)))throw new Error("bad curve params: a or b");function C(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!r.isValid(t)||n&&r.is0(t))throw new Error("bad point coordinate ".concat(e));return t}function I(e){if(!(e instanceof B))throw new Error("ProjectivePoint expected")}function M(e){if(!h||!h.basises)throw new Error("no endo");return function(e,t,n){const[[r,i],[o,s]]=t,c=u(s*e,n),l=u(-i*e,n);let d=e-c*r-l*o,h=-c*i-l*s;const f=d<m,p=h<m;f&&(d=-d),p&&(h=-h);const b=(0,a.OG)(Math.ceil((0,a.dJ)(n)/2))+g;if(d<m||d>=b||h<m||h>=b)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:f,k1:d,k2neg:p,k2:h}}(e,h.basises,i.ORDER)}const T=(0,a.x)((e,t)=>{const{X:n,Y:i,Z:o}=e;if(r.eql(o,r.ONE))return{x:n,y:i};const s=e.is0();null==t&&(t=s?r.ONE:r.inv(o));const a=r.mul(n,t),c=r.mul(i,t),l=r.mul(o,t);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(l,r.ONE))throw new Error("invZ was invalid");return{x:a,y:c}}),O=(0,a.x)(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.Y))return;throw new Error("bad point: ZERO")}const{x:n,y:i}=e.toAffine();if(!r.isValid(n)||!r.isValid(i))throw new Error("bad point: x or y not field elements");if(!E(n,i))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function N(e,t,n,i,o){return n=new B(r.mul(n.X,e),n.Y,n.Z),t=(0,c.u0)(i,t),n=(0,c.u0)(o,n),t.add(n)}class B{constructor(e,t,n){this.X=C("x",e),this.Y=C("y",t,!0),this.Z=C("z",n),Object.freeze(this)}static CURVE(){return s}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof B)throw new Error("projective point not allowed");return r.is0(t)&&r.is0(n)?B.ZERO:new B(t,n,r.ONE)}static fromBytes(e){const t=B.fromAffine(_((0,a.eV)(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return B.fromBytes((0,a.qj)("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return j.createCache(this,e),t||this.multiply(y),this}assertValidity(){O(this)}hasEvenY(){const{y:e}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(e)}equals(e){I(e);const{X:t,Y:n,Z:i}=this,{X:o,Y:s,Z:a}=e,c=r.eql(r.mul(t,a),r.mul(o,i)),l=r.eql(r.mul(n,a),r.mul(s,i));return c&&l}negate(){return new B(this.X,r.neg(this.Y),this.Z)}double(){const{a:e,b:t}=s,n=r.mul(t,y),{X:i,Y:o,Z:a}=this;let c=r.ZERO,l=r.ZERO,u=r.ZERO,d=r.mul(i,i),h=r.mul(o,o),f=r.mul(a,a),p=r.mul(i,o);return p=r.add(p,p),u=r.mul(i,a),u=r.add(u,u),c=r.mul(e,u),l=r.mul(n,f),l=r.add(c,l),c=r.sub(h,l),l=r.add(h,l),l=r.mul(c,l),c=r.mul(p,c),u=r.mul(n,u),f=r.mul(e,f),p=r.sub(d,f),p=r.mul(e,p),p=r.add(p,u),u=r.add(d,d),d=r.add(u,d),d=r.add(d,f),d=r.mul(d,p),l=r.add(l,d),f=r.mul(o,a),f=r.add(f,f),d=r.mul(f,p),c=r.sub(c,d),u=r.mul(f,h),u=r.add(u,u),u=r.add(u,u),new B(c,l,u)}add(e){I(e);const{X:t,Y:n,Z:i}=this,{X:o,Y:a,Z:c}=e;let l=r.ZERO,u=r.ZERO,d=r.ZERO;const h=s.a,f=r.mul(s.b,y);let p=r.mul(t,o),m=r.mul(n,a),g=r.mul(i,c),b=r.add(t,n),v=r.add(o,a);b=r.mul(b,v),v=r.add(p,m),b=r.sub(b,v),v=r.add(t,i);let w=r.add(o,c);return v=r.mul(v,w),w=r.add(p,g),v=r.sub(v,w),w=r.add(n,i),l=r.add(a,c),w=r.mul(w,l),l=r.add(m,g),w=r.sub(w,l),d=r.mul(h,v),l=r.mul(f,g),d=r.add(l,d),l=r.sub(m,d),d=r.add(m,d),u=r.mul(l,d),m=r.add(p,p),m=r.add(m,p),g=r.mul(h,g),v=r.mul(f,v),m=r.add(m,g),g=r.sub(p,g),g=r.mul(h,g),v=r.add(v,g),p=r.mul(m,v),u=r.add(u,p),p=r.mul(w,v),l=r.mul(b,l),l=r.sub(l,p),p=r.mul(b,m),d=r.mul(w,d),d=r.add(d,p),new B(l,u,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(B.ZERO)}multiply(e){const{endo:n}=t;if(!i.isValidNot0(e))throw new Error("invalid scalar: out of range");let r,o;const s=e=>j.cached(this,e,e=>(0,c.Ak)(B,e));if(n){const{k1neg:t,k1:i,k2neg:a,k2:c}=M(e),{p:l,f:u}=s(i),{p:d,f:h}=s(c);o=u.add(h),r=N(n.beta,l,d,t,a)}else{const{p:t,f:n}=s(e);r=t,o=n}return(0,c.Ak)(B,[r,o])[0]}multiplyUnsafe(e){const{endo:n}=t,r=this;if(!i.isValid(e))throw new Error("invalid scalar: out of range");if(e===m||r.is0())return B.ZERO;if(e===g)return r;if(j.hasCache(this))return this.multiply(e);if(n){const{k1neg:t,k1:i,k2neg:o,k2:s}=M(e),{p1:a,p2:l}=(0,c.fH)(B,r,i,s);return N(n.beta,a,l,t,o)}return j.unsafe(r,e)}multiplyAndAddUnsafe(e,t,n){const r=this.multiplyUnsafe(t).add(e.multiplyUnsafe(n));return r.is0()?void 0:r}toAffine(e){return T(this,e)}isTorsionFree(){const{isTorsionFree:e}=t;return l===g||(e?e(B,this):j.unsafe(this,d).is0())}clearCofactor(){const{clearCofactor:e}=t;return l===g?this:e?e(B,this):this.multiplyUnsafe(l)}isSmallOrder(){return this.multiplyUnsafe(l).is0()}toBytes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return(0,a.d6)(e,"isCompressed"),this.assertValidity(),b(B,this,e)}toHex(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return(0,o.My)(this.toBytes(e))}toString(){return"<Point ".concat(this.is0()?"ZERO":this.toHex(),">")}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.toBytes(e)}_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return(0,c.Ak)(B,e)}static msm(e,t){return(0,c.Xf)(B,i,e,t)}static fromPrivateKey(e){return B.BASE.multiply(w(i,e))}}B.BASE=new B(s.Gx,s.Gy,r.ONE),B.ZERO=new B(r.ZERO,r.ONE,r.ZERO),B.Fp=r,B.Fn=i;const R=i.BITS,j=new c.hT(B,t.endo?Math.ceil(R/2):R);return B.BASE.precompute(8),B}function k(e){return Uint8Array.of(e?2:3)}function x(e,t){(0,l.jr)(e);const{A:n,B:r,Z:i}=t;if(!e.isValid(n)||!e.isValid(r)||!e.isValid(i))throw new Error("mapToCurveSimpleSWU: invalid opts");const o=function(e,t){const n=e.ORDER;let r=m;for(let p=n-g;p%b===m;p/=b)r+=g;const i=r,o=b<<i-g-g,s=o*b,a=(n-g)/s,c=(a-g)/b,l=s-g,u=o,d=e.pow(t,a),h=e.pow(t,(a+g)/b);let f=(t,n)=>{let r=d,o=e.pow(n,l),s=e.sqr(o);s=e.mul(s,n);let a=e.mul(t,s);a=e.pow(a,c),a=e.mul(a,o),o=e.mul(a,n),s=e.mul(a,t);let f=e.mul(s,o);a=e.pow(f,u);let p=e.eql(a,e.ONE);o=e.mul(s,h),a=e.mul(f,r),s=e.cmov(o,s,p),f=e.cmov(a,f,p);for(let c=i;c>g;c--){let t=c-b;t=b<<t-g;let n=e.pow(f,t);const i=e.eql(n,e.ONE);o=e.mul(s,r),r=e.mul(r,r),n=e.mul(f,r),s=e.cmov(o,s,i),f=e.cmov(n,f,i)}return{isValid:p,value:s}};if(e.ORDER%v===y){const n=(e.ORDER-y)/v,r=e.sqrt(e.neg(t));f=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,n);a=e.mul(a,s);const c=e.mul(a,r),l=e.mul(e.sqr(a),i),u=e.eql(l,t);return{isValid:u,value:e.cmov(c,a,u)}}}return f}(e,i);if(!e.isOdd)throw new Error("Field does not have .isOdd()");return t=>{let s,a,c,u,d,h,f,p;s=e.sqr(t),s=e.mul(s,i),a=e.sqr(s),a=e.add(a,s),c=e.add(a,e.ONE),c=e.mul(c,r),u=e.cmov(i,e.neg(a),!e.eql(a,e.ZERO)),u=e.mul(u,n),a=e.sqr(c),h=e.sqr(u),d=e.mul(h,n),a=e.add(a,d),a=e.mul(a,c),h=e.mul(h,u),d=e.mul(h,r),a=e.add(a,d),f=e.mul(s,c);const{isValid:m,value:g}=o(a,h);p=e.mul(s,t),p=e.mul(p,g),f=e.cmov(f,c,m),p=e.cmov(p,g,m);const b=e.isOdd(t)===e.isOdd(p);p=e.cmov(e.neg(p),p,b);const y=(0,l.pS)(e,[u],!0)[0];return f=e.mul(f,y),{x:f,y:p}}}function S(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function E(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,o.sd)(t),(0,a.DS)(n,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=n.randomBytes||o.po,i=n.hmac||function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(0,s.w)(t,e,(0,o.Id)(...r))},{Fp:c,Fn:u}=e,{ORDER:f,BITS:y}=u,{keygen:v,getPublicKey:_,getSharedSecret:x,utils:E,lengths:A}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{Fn:n}=e,r=t.randomBytes||o.po,i=Object.assign(S(e.Fp,n),{seed:(0,l.Tp)(n.ORDER)});function s(e){try{return!!w(n,e)}catch(t){return!1}}function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r(i.seed);return(0,l.qy)((0,a.eV)(e,i.seed,"seed"),n.ORDER)}function u(t){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.BASE.multiply(w(n,t)).toBytes(r)}function d(t){if("bigint"===typeof t)return!1;if(t instanceof e)return!0;const{secretKey:r,publicKey:o,publicKeyUncompressed:s}=i;if(n.allowedLengths||r===o)return;const c=(0,a.qj)("key",t).length;return c===o||c===s}const h={isValidSecretKey:s,isValidPublicKey:function(t,n){const{publicKey:r,publicKeyUncompressed:o}=i;try{const i=t.length;return(!0!==n||i===r)&&(!1!==n||i===o)&&!!e.fromBytes(t)}catch(s){return!1}},randomSecretKey:c,isValidPrivateKey:s,randomPrivateKey:c,normPrivateKeyToScalar:e=>w(n,e),precompute(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.BASE).precompute(t,!1)}};return Object.freeze({getPublicKey:u,getSharedSecret:function(t,r){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!0===d(t))throw new Error("first arg must be private key");if(!1===d(r))throw new Error("second arg must be public key");const o=w(n,t);return e.fromHex(r).multiply(o).toBytes(i)},keygen:function(e){const t=c(e);return{secretKey:t,publicKey:u(t)}},Point:e,utils:h,lengths:i})}(e,n),P={prehash:!1,lowS:"boolean"===typeof n.lowS&&n.lowS,format:void 0,extraEntropy:!1},C="compact";function I(e){return e>f>>g}function M(e,t){if(!u.isValidNot0(t))throw new Error("invalid signature ".concat(e,": out of range 1..Point.Fn.ORDER"));return t}class T{constructor(e,t,n){this.r=M("r",e),this.s=M("s",t),null!=n&&(this.recovery=n),Object.freeze(this)}static fromBytes(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C;if(function(e,t){d(t);const n=A.signature,r="compact"===t?n:"recovered"===t?n+1:void 0;(0,a.eV)(e,r,"".concat(t," signature"))}(e,n),"der"===n){const{r:t,s:n}=p.toSig((0,a.eV)(e));return new T(t,n)}"recovered"===n&&(t=e[0],n="compact",e=e.subarray(1));const r=u.BYTES,i=e.subarray(0,r),o=e.subarray(r,2*r);return new T(u.fromBytes(i),u.fromBytes(o),t)}static fromHex(e,t){return this.fromBytes((0,o.aT)(e),t)}addRecoveryBit(e){return new T(this.r,this.s,e)}recoverPublicKey(t){const n=c.ORDER,{r:r,s:i,recovery:s}=this;if(null==s||![0,1,2,3].includes(s))throw new Error("recovery id invalid");if(f*b<n&&s>1)throw new Error("recovery id is ambiguous for h>1 curve");const l=2===s||3===s?r+f:r;if(!c.isValid(l))throw new Error("recovery id 2 or 3 invalid");const d=c.toBytes(l),h=e.fromBytes((0,o.Id)(k(0===(1&s)),d)),p=u.inv(l),m=N((0,a.qj)("msgHash",t)),g=u.create(-m*p),y=u.create(i*p),v=e.BASE.multiplyUnsafe(g).add(h.multiplyUnsafe(y));if(v.is0())throw new Error("point at infinify");return v.assertValidity(),v}hasHighS(){return I(this.s)}toBytes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C;if(d(e),"der"===e)return(0,o.aT)(p.hexFromSig(this));const t=u.toBytes(this.r),n=u.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw new Error("recovery bit must be present");return(0,o.Id)(Uint8Array.of(this.recovery),t,n)}return(0,o.Id)(t,n)}toHex(e){return(0,o.My)(this.toBytes(e))}assertValidity(){}static fromCompact(e){return T.fromBytes((0,a.qj)("sig",e),"compact")}static fromDER(e){return T.fromBytes((0,a.qj)("sig",e),"der")}normalizeS(){return this.hasHighS()?new T(this.r,u.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return(0,o.My)(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return(0,o.My)(this.toBytes("compact"))}}const O=n.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=(0,a.Ph)(e),n=8*e.length-y;return n>0?t>>BigInt(n):t},N=n.bits2int_modN||function(e){return u.create(O(e))},B=(0,a.OG)(y);function R(e){return(0,a.aK)("num < 2^"+y,e,m,B),u.toBytes(e)}function j(e,n){return(0,a.eV)(e,void 0,"message"),n?(0,a.eV)(t(e),void 0,"prehashed message"):e}return Object.freeze({keygen:v,getPublicKey:_,getSharedSecret:x,utils:E,lengths:A,Point:e,sign:function(n,s){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=(0,a.qj)("message",n);const{seed:l,k2sig:d}=function(t,n,i){if(["recovered","canonical"].some(e=>e in i))throw new Error("sign() legacy options not supported");const{lowS:s,prehash:c,extraEntropy:l}=h(i,P);t=j(t,c);const d=N(t),f=w(u,n),p=[R(f),R(d)];if(null!=l&&!1!==l){const e=!0===l?r(A.secretKey):l;p.push((0,a.qj)("extraEntropy",e))}const b=(0,o.Id)(...p),y=d;return{seed:b,k2sig:function(t){const n=O(t);if(!u.isValidNot0(n))return;const r=u.inv(n),i=e.BASE.multiply(n).toAffine(),o=u.create(i.x);if(o===m)return;const a=u.create(r*u.create(y+o*f));if(a===m)return;let c=(i.x===o?0:2)|Number(i.y&g),l=a;return s&&I(a)&&(l=u.neg(a),c^=1),new T(o,l,c)}}}(n,s,c);return(0,a.fg)(t.outputLen,u.BYTES,i)(l,d)},verify:function(t,n,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{lowS:s,prehash:c,format:l}=h(i,P);if(r=(0,a.qj)("publicKey",r),n=j((0,a.qj)("message",n),c),"strict"in i)throw new Error("options.strict was renamed to lowS");const d=void 0===l?function(e){let t;const n="string"===typeof e||(0,o.aY)(e),r=!n&&null!==e&&"object"===typeof e&&"bigint"===typeof e.r&&"bigint"===typeof e.s;if(!n&&!r)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(r)t=new T(e.r,e.s);else if(n){try{t=T.fromBytes((0,a.qj)("sig",e),"der")}catch(i){if(!(i instanceof p.Err))throw i}if(!t)try{t=T.fromBytes((0,a.qj)("sig",e),"compact")}catch(s){return!1}}return t||!1}(t):T.fromBytes((0,a.qj)("sig",t),l);if(!1===d)return!1;try{const t=e.fromBytes(r);if(s&&d.hasHighS())return!1;const{r:i,s:o}=d,a=N(n),c=u.inv(o),l=u.create(a*c),h=u.create(i*c),f=e.BASE.multiplyUnsafe(l).add(t.multiplyUnsafe(h));if(f.is0())return!1;return u.create(f.x)===i}catch(f){return!1}},recoverPublicKey:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{prehash:r}=h(n,P);return t=j(t,r),T.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:T,hash:t})}function A(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp;let r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0;return{CURVE:t,curveOpts:{Fp:n,Fn:(0,l.D0)(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes}}}function P(e){const{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:i}=function(e){const{CURVE:t,curveOpts:n}=A(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,hash:e.hash,ecdsaOpts:r}}(e);return function(e,t){const n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,(0,l.LH)(n.Fn.ORDER,n.Fn.BITS))})}(e,E(_(t,n),r,i))}var C=n(8788);const I={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},M={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},T=BigInt(0),O=BigInt(1),N=BigInt(2);const B=(0,l.D0)(I.p,{sqrt:function(e){const t=I.p,n=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),a=BigInt(44),c=BigInt(88),u=e*e*e%t,d=u*u*e%t,h=(0,l.zH)(d,n,t)*d%t,f=(0,l.zH)(h,n,t)*d%t,p=(0,l.zH)(f,N,t)*u%t,m=(0,l.zH)(p,i,t)*p%t,g=(0,l.zH)(m,o,t)*m%t,b=(0,l.zH)(g,a,t)*g%t,y=(0,l.zH)(b,c,t)*b%t,v=(0,l.zH)(y,a,t)*g%t,w=(0,l.zH)(v,n,t)*d%t,_=(0,l.zH)(w,s,t)*m%t,k=(0,l.zH)(_,r,t)*u%t,x=(0,l.zH)(k,N,t);if(!B.eql(B.sqr(x),e))throw new Error("Cannot find square root");return x}}),R=function(e,t){const n=t=>P((0,r.A)((0,r.A)({},e),{},{hash:t}));return(0,r.A)((0,r.A)({},n(t)),{},{create:n})}((0,r.A)((0,r.A)({},I),{},{Fp:B,lowS:!0,endo:M}),i.sha256),j={};function L(e){let t=j[e];if(void 0===t){const n=(0,i.sha256)((0,o.AI)(e));t=(0,o.Id)(n,n),j[e]=t}for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return(0,i.sha256)((0,o.Id)(t,...r))}const F=e=>e.toBytes(!0).slice(1),z=(()=>R.Point)(),D=e=>e%N===T;function U(e){const{Fn:t,BASE:n}=z,r=w(t,e),i=n.multiply(r);return{scalar:D(i.y)?r:t.neg(r),bytes:F(i)}}function W(e){const t=B;if(!t.isValidNot0(e))throw new Error("invalid x: Fail if x \u2265 p");const n=t.create(e*e),r=t.create(n*e+BigInt(7));let i=t.sqrt(r);D(i)||(i=t.neg(i));const o=z.fromAffine({x:e,y:i});return o.assertValidity(),o}const q=a.Ph;function H(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return z.Fn.create(q(L("BIP0340/challenge",...t)))}function K(e){return U(e).bytes}function V(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,o.po)(32);const{Fn:r}=z,i=(0,a.qj)("message",e),{bytes:s,scalar:c}=U(t),l=(0,a.qj)("auxRand",n,32),u=r.toBytes(c^q(L("BIP0340/aux",l))),d=L("BIP0340/nonce",u,s,i),{bytes:h,scalar:f}=U(d),p=H(h,s,i),m=new Uint8Array(64);if(m.set(h,0),m.set(r.toBytes(r.create(f+p*c)),32),!$(m,i,s))throw new Error("sign: Invalid signature produced");return m}function $(e,t,n){const{Fn:r,BASE:i}=z,o=(0,a.qj)("signature",e,64),s=(0,a.qj)("message",t),c=(0,a.qj)("publicKey",n,32);try{const e=W(q(c)),t=q(o.subarray(0,32));if(!(0,a.r4)(t,O,I.p))return!1;const n=q(o.subarray(32,64));if(!(0,a.r4)(n,O,I.n))return!1;const l=H(r.toBytes(t),F(e),s),u=i.multiplyUnsafe(n).add(e.multiplyUnsafe(r.neg(l))),{x:d,y:h}=u.toAffine();return!(u.is0()||!D(h)||d!==t)}catch(l){return!1}}const G=(()=>{const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,o.po)(48);return(0,l.qy)(e,I.n)};return R.utils.randomSecretKey,{keygen:function(t){const n=e(t);return{secretKey:n,publicKey:K(n)}},getPublicKey:K,sign:V,verify:$,Point:z,utils:{randomSecretKey:e,randomPrivateKey:e,taggedHash:L,lift_x:W,pointToBytes:F,numberToBytesBE:a.lq,bytesToNumberBE:a.Ph,mod:l.zi},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})(),Z=(()=>(0,C.FL)(B,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>BigInt(e)))))(),J=(()=>x(B,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:B.create(BigInt("-11"))}))(),Y=(()=>(0,C.qj)(R.Point,e=>{const{x:t,y:n}=J(B.create(e[0]));return Z(t,n)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:B.ORDER,m:1,k:128,expand:"xmd",hash:i.sha256}))(),Q=(()=>Y.hashToCurve)(),X=(()=>Y.encodeToCurve)()},8724:function(e,t,n){"use strict";var r,i,o,s,a,c,l,u,d,h,f,p,m,g,b,y,v,w,_=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(e){try{c(r.next(e))}catch(t){o(t)}}function a(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(s,a)}c((r=r.apply(e,t||[])).next())})},k=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},x=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},S=this&&this.__rest||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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},E=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.StandardWalletAdapter=void 0;const A=n(3651),P=n(6345),C=n(7282),I=n(3342),M=n(9210),T=n(8340),O=E(n(5759));class N extends A.BaseWalletAdapter{get name(){return k(this,u,"f").name}get url(){return"https://github.com/solana-labs/wallet-standard"}get icon(){return k(this,u,"f").icon}get readyState(){return k(this,d,"f")}get publicKey(){return k(this,o,"f")}get connecting(){return k(this,s,"f")}get supportedTransactionVersions(){return k(this,l,"f")}get wallet(){return k(this,u,"f")}get standard(){return!0}constructor(e){let{wallet:t}=e;super(),r.add(this),i.set(this,void 0),o.set(this,void 0),s.set(this,void 0),a.set(this,void 0),c.set(this,void 0),l.set(this,void 0),u.set(this,void 0),d.set(this,"undefined"===typeof window||"undefined"===typeof document?A.WalletReadyState.Unsupported:A.WalletReadyState.Installed),g.set(this,e=>{if("accounts"in e){const e=k(this,u,"f").accounts[0];k(this,i,"f")&&!k(this,a,"f")&&e!==k(this,i,"f")&&(e?k(this,r,"m",f).call(this,e):(this.emit("error",new A.WalletDisconnectedError),k(this,r,"m",p).call(this)))}"features"in e&&k(this,r,"m",m).call(this)}),x(this,u,t,"f"),x(this,i,null,"f"),x(this,o,null,"f"),x(this,s,!1,"f"),x(this,a,!1,"f"),x(this,c,k(this,u,"f").features[M.StandardEvents].on("change",k(this,g,"f")),"f"),k(this,r,"m",m).call(this)}destroy(){x(this,i,null,"f"),x(this,o,null,"f"),x(this,s,!1,"f"),x(this,a,!1,"f");const e=k(this,c,"f");e&&(x(this,c,null,"f"),e())}autoConnect(){return _(this,void 0,void 0,function*(){return k(this,r,"m",h).call(this,{silent:!0})})}connect(){return _(this,void 0,void 0,function*(){return k(this,r,"m",h).call(this)})}disconnect(){return _(this,void 0,void 0,function*(){if(M.StandardDisconnect in k(this,u,"f").features)try{x(this,a,!0,"f"),yield k(this,u,"f").features[M.StandardDisconnect].disconnect()}catch(e){this.emit("error",new A.WalletDisconnectionError(null===e||void 0===e?void 0:e.message,e))}finally{x(this,a,!1,"f")}k(this,r,"m",p).call(this)})}sendTransaction(e,t){return _(this,arguments,void 0,function(e,t){var n=this;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){try{const s=k(n,i,"f");if(!s)throw new A.WalletNotConnectedError;let a;if(P.SolanaSignAndSendTransaction in k(n,u,"f").features)if(s.features.includes(P.SolanaSignAndSendTransaction))a=P.SolanaSignAndSendTransaction;else{if(!(P.SolanaSignTransaction in k(n,u,"f").features)||!s.features.includes(P.SolanaSignTransaction))throw new A.WalletAccountError;a=P.SolanaSignTransaction}else{if(!(P.SolanaSignTransaction in k(n,u,"f").features))throw new A.WalletConfigError;if(!s.features.includes(P.SolanaSignTransaction))throw new A.WalletAccountError;a=P.SolanaSignTransaction}const c=(0,C.getChainForEndpoint)(t.rpcEndpoint);if(!s.chains.includes(c))throw new A.WalletSendTransactionError;try{const{signers:i}=r,o=S(r,["signers"]);let l;if((0,A.isVersionedTransaction)(e)?((null===i||void 0===i?void 0:i.length)&&e.sign(i),l=e.serialize()):(e=yield n.prepareTransaction(e,t,o),(null===i||void 0===i?void 0:i.length)&&e.partialSign(...i),l=new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))),a===P.SolanaSignAndSendTransaction){const[e]=yield k(n,u,"f").features[P.SolanaSignAndSendTransaction].signAndSendTransaction({account:s,chain:c,transaction:l,options:{preflightCommitment:(0,C.getCommitment)(o.preflightCommitment||t.commitment),skipPreflight:o.skipPreflight,maxRetries:o.maxRetries,minContextSlot:o.minContextSlot}});return O.default.encode(e.signature)}{const[e]=yield k(n,u,"f").features[P.SolanaSignTransaction].signTransaction({account:s,chain:c,transaction:l,options:{preflightCommitment:(0,C.getCommitment)(o.preflightCommitment||t.commitment),minContextSlot:o.minContextSlot}});return yield t.sendRawTransaction(e.signedTransaction,Object.assign(Object.assign({},o),{preflightCommitment:(0,C.getCommitment)(o.preflightCommitment||t.commitment)}))}}catch(o){if(o instanceof A.WalletError)throw o;throw new A.WalletSendTransactionError(null===o||void 0===o?void 0:o.message,o)}}catch(o){throw n.emit("error",o),o}}()})}}t.StandardWalletAdapter=N,i=new WeakMap,o=new WeakMap,s=new WeakMap,a=new WeakMap,c=new WeakMap,l=new WeakMap,u=new WeakMap,d=new WeakMap,g=new WeakMap,r=new WeakSet,h=function(e){return _(this,void 0,void 0,function*(){try{if(this.connected||this.connecting)return;if(k(this,d,"f")!==A.WalletReadyState.Installed)throw new A.WalletNotReadyError;if(x(this,s,!0,"f"),!k(this,u,"f").accounts.length)try{yield k(this,u,"f").features[M.StandardConnect].connect(e)}catch(t){throw new A.WalletConnectionError(null===t||void 0===t?void 0:t.message,t)}const n=k(this,u,"f").accounts[0];if(!n)throw new A.WalletAccountError;k(this,r,"m",f).call(this,n)}catch(t){throw this.emit("error",t),t}finally{x(this,s,!1,"f")}})},f=function(e){let t;try{t=new I.PublicKey(e.address)}catch(n){throw new A.WalletPublicKeyError(null===n||void 0===n?void 0:n.message,n)}x(this,i,e,"f"),x(this,o,t,"f"),k(this,r,"m",m).call(this),this.emit("connect",t)},p=function(){x(this,i,null,"f"),x(this,o,null,"f"),k(this,r,"m",m).call(this),this.emit("disconnect")},m=function(){var e,t;const n=P.SolanaSignAndSendTransaction in k(this,u,"f").features?k(this,u,"f").features[P.SolanaSignAndSendTransaction].supportedTransactionVersions:k(this,u,"f").features[P.SolanaSignTransaction].supportedTransactionVersions;x(this,l,(0,T.arraysEqual)(n,["legacy"])?null:new Set(n),"f"),P.SolanaSignTransaction in k(this,u,"f").features&&(null===(e=k(this,i,"f"))||void 0===e?void 0:e.features.includes(P.SolanaSignTransaction))?(this.signTransaction=k(this,r,"m",b),this.signAllTransactions=k(this,r,"m",y)):(delete this.signTransaction,delete this.signAllTransactions),P.SolanaSignMessage in k(this,u,"f").features&&(null===(t=k(this,i,"f"))||void 0===t?void 0:t.features.includes(P.SolanaSignMessage))?this.signMessage=k(this,r,"m",v):delete this.signMessage,P.SolanaSignIn in k(this,u,"f").features?this.signIn=k(this,r,"m",w):delete this.signIn},b=function(e){return _(this,void 0,void 0,function*(){try{const n=k(this,i,"f");if(!n)throw new A.WalletNotConnectedError;if(!(P.SolanaSignTransaction in k(this,u,"f").features))throw new A.WalletConfigError;if(!n.features.includes(P.SolanaSignTransaction))throw new A.WalletAccountError;try{const t=(yield k(this,u,"f").features[P.SolanaSignTransaction].signTransaction({account:n,transaction:(0,A.isVersionedTransaction)(e)?e.serialize():new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))}))[0].signedTransaction;return(0,A.isVersionedTransaction)(e)?I.VersionedTransaction.deserialize(t):I.Transaction.from(t)}catch(t){if(t instanceof A.WalletError)throw t;throw new A.WalletSignTransactionError(null===t||void 0===t?void 0:t.message,t)}}catch(t){throw this.emit("error",t),t}})},y=function(e){return _(this,void 0,void 0,function*(){try{const n=k(this,i,"f");if(!n)throw new A.WalletNotConnectedError;if(!(P.SolanaSignTransaction in k(this,u,"f").features))throw new A.WalletConfigError;if(!n.features.includes(P.SolanaSignTransaction))throw new A.WalletAccountError;try{const t=yield k(this,u,"f").features[P.SolanaSignTransaction].signTransaction(...e.map(e=>({account:n,transaction:(0,A.isVersionedTransaction)(e)?e.serialize():new Uint8Array(e.serialize({requireAllSignatures:!1,verifySignatures:!1}))})));return e.map((e,n)=>{const r=t[n].signedTransaction;return(0,A.isVersionedTransaction)(e)?I.VersionedTransaction.deserialize(r):I.Transaction.from(r)})}catch(t){throw new A.WalletSignTransactionError(null===t||void 0===t?void 0:t.message,t)}}catch(t){throw this.emit("error",t),t}})},v=function(e){return _(this,void 0,void 0,function*(){try{const n=k(this,i,"f");if(!n)throw new A.WalletNotConnectedError;if(!(P.SolanaSignMessage in k(this,u,"f").features))throw new A.WalletConfigError;if(!n.features.includes(P.SolanaSignMessage))throw new A.WalletAccountError;try{return(yield k(this,u,"f").features[P.SolanaSignMessage].signMessage({account:n,message:e}))[0].signature}catch(t){throw new A.WalletSignMessageError(null===t||void 0===t?void 0:t.message,t)}}catch(t){throw this.emit("error",t),t}})},w=function(){return _(this,arguments,void 0,function(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function*(){try{if(!(P.SolanaSignIn in k(e,u,"f").features))throw new A.WalletConfigError;let i;try{[i]=yield k(e,u,"f").features[P.SolanaSignIn].signIn(t)}catch(n){throw new A.WalletSignInError(null===n||void 0===n?void 0:n.message,n)}if(!i)throw new A.WalletSignInError;return k(e,r,"m",f).call(e,i.account),i}catch(n){throw e.emit("error",n),n}}()})}},8788:(e,t,n)=>{"use strict";n.d(t,{FL:()=>f,Tq:()=>d,qX:()=>p,qj:()=>m});var r=n(3808),i=n(2766),o=n(4902);const s=r.Ph;function a(e,t){if(l(e),l(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);const n=Array.from({length:t}).fill(0);for(let r=t-1;r>=0;r--)n[r]=255&e,e>>>=8;return new Uint8Array(n)}function c(e,t){const n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e[r]^t[r];return n}function l(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function u(e){if(!(0,i.aY)(e)&&"string"!==typeof e)throw new Error("DST must be Uint8Array or string");return"string"===typeof e?(0,i.AI)(e):e}function d(e,t,n,r){(0,i.DO)(e),l(n),(t=u(t)).length>255&&(t=r((0,i.Id)((0,i.AI)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:s}=r,d=Math.ceil(n/o);if(n>65535||d>255)throw new Error("expand_message_xmd: invalid lenInBytes");const h=(0,i.Id)(t,a(t.length,1)),f=a(0,s),p=a(n,2),m=new Array(d),g=r((0,i.Id)(f,e,p,a(0,1),h));m[0]=r((0,i.Id)(g,a(1,1),h));for(let l=1;l<=d;l++){const e=[c(g,m[l-1]),a(l+1,1),h];m[l]=r((0,i.Id)(...e))}return(0,i.Id)(...m).slice(0,n)}function h(e,t,n){(0,r.DS)(n,{p:"bigint",m:"number",k:"number",hash:"function"});const{p:c,k:h,m:f,hash:p,expand:m,DST:g}=n;if(!(0,r.jN)(n.hash))throw new Error("expected valid hash");(0,i.DO)(e),l(t);const b=c.toString(2).length,y=Math.ceil((b+h)/8),v=t*f*y;let w;if("xmd"===m)w=d(e,g,v,p);else if("xof"===m)w=function(e,t,n,r,o){if((0,i.DO)(e),l(n),(t=u(t)).length>255){const e=Math.ceil(2*r/8);t=o.create({dkLen:e}).update((0,i.AI)("H2C-OVERSIZE-DST-")).update(t).digest()}if(n>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:n}).update(e).update(a(n,2)).update(t).update(a(t.length,1)).digest()}(e,g,v,h,p);else{if("_internal_pass"!==m)throw new Error('expand must be "xmd" or "xof"');w=e}const _=new Array(t);for(let r=0;r<t;r++){const e=new Array(f);for(let t=0;t<f;t++){const n=y*(t+r*f),i=w.subarray(n,n+y);e[t]=(0,o.zi)(s(i),c)}_[r]=e}return _}function f(e,t){const n=t.map(e=>Array.from(e).reverse());return(t,r)=>{const[i,s,a,c]=n.map(n=>n.reduce((n,r)=>e.add(e.mul(n,t),r))),[l,u]=(0,o.pS)(e,[s,c],!0);return t=e.mul(i,l),r=e.mul(r,e.mul(a,u)),{x:t,y:r}}}const p=(0,i.AI)("HashToScalar-");function m(e,t,n){if("function"!==typeof t)throw new Error("mapToCurve() must be defined");function r(n){return e.fromAffine(t(n))}function i(t){const n=t.clearCofactor();return n.equals(e.ZERO)?e.ZERO:(n.assertValidity(),n)}return{defaults:n,hashToCurve(e,t){const o=h(e,2,Object.assign({},n,t)),s=r(o[0]),a=r(o[1]);return i(s.add(a))},encodeToCurve(e,t){const o=n.encodeDST?{DST:n.encodeDST}:{};return i(r(h(e,1,Object.assign({},n,o,t))[0]))},mapToCurve(e){if(!Array.isArray(e))throw new Error("expected array of bigints");for(const t of e)if("bigint"!==typeof t)throw new Error("expected array of bigints");return i(r(e))},hashToScalar(t,r){const i=e.Fn.ORDER;return h(t,1,Object.assign({},n,{p:i,m:1,DST:p},r))[0][0]}}}},8857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaSignMessage=void 0,t.SolanaSignMessage="solana:signMessage"},8859:(e,t,n)=>{"use strict";n.d(t,{k:()=>p});var r=n(3530),i=n(7568);const o=e=>(0,i.S)((0,r.ZJ)(e));var s=n(9740),a=n(8512),c=n(4015);const l=(0,a.A)(/^tuple((\[(\d*)\])*)$/,{array:1});function u(e){let t=e.type;if(l.test(e.type)&&"components"in e){var n;t="(";const r=e.components.length;for(let n=0;n<r;n++){t+=u(e.components[n]),n<r-1&&(t+=", ")}const i=(0,c.Yv)(l,e.type);return t+=")".concat(null!==(n=null===i||void 0===i?void 0:i.array)&&void 0!==n?n:""),u((0,s.A)((0,s.A)({},e),{},{type:t}))}return"indexed"in e&&e.indexed&&(t="".concat(t," indexed")),e.name?"".concat(t," ").concat(e.name):t}function d(e){let t="";const n=e.length;for(let r=0;r<n;r++){t+=u(e[r]),r!==n-1&&(t+=", ")}return t}var h=n(8090);const f=e=>function(e){let t=!0,n="",r=0,i="",o=!1;for(let s=0;s<e.length;s++){const a=e[s];if(["(",")",","].includes(a)&&(t=!0),"("===a&&r++,")"===a&&r--,t)if(0!==r)" "!==a?(i+=a,n+=a):","!==e[s-1]&&","!==n&&",("!==n&&(n="",t=!1);else if(" "===a&&["event","function",""].includes(i))i="";else if(i+=a,")"===a){o=!0;break}}if(!o)throw new h.C("Unable to normalize signature.");return i}("string"===typeof e?e:function(e){var t;return"function"===e.type?"function ".concat(e.name,"(").concat(d(e.inputs),")").concat(e.stateMutability&&"nonpayable"!==e.stateMutability?" ".concat(e.stateMutability):"").concat(null!==(t=e.outputs)&&void 0!==t&&t.length?" returns (".concat(d(e.outputs),")"):""):"event"===e.type?"event ".concat(e.name,"(").concat(d(e.inputs),")"):"error"===e.type?"error ".concat(e.name,"(").concat(d(e.inputs),")"):"constructor"===e.type?"constructor(".concat(d(e.inputs),")").concat("payable"===e.stateMutability?" payable":""):"fallback"===e.type?"fallback() external".concat("payable"===e.stateMutability?" payable":""):"receive() external payable"}(e));function p(e){return t=f(e),o(t);var t}},9063:(e,t,n)=>{"use strict";function r(e,t,n){return t<=e&&e<=n}function i(e){if(void 0===e)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}n.r(t),n.d(t,{TextDecoder:()=>l,TextEncoder:()=>u});function o(e){this.tokens=[].slice.call(e)}o.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.shift():-1},prepend:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.unshift(t.pop());else this.tokens.unshift(e)},push:function(e){if(Array.isArray(e))for(var t=e;t.length;)this.tokens.push(t.shift());else this.tokens.push(e)}};var s=-1;function a(e,t){if(e)throw TypeError("Decoder error");return t||65533}var c="utf-8";function l(e,t){if(!(this instanceof l))return new l(e,t);if((e=void 0!==e?String(e).toLowerCase():c)!==c)throw new Error("Encoding not supported. Only utf-8 is supported");t=i(t),this._streaming=!1,this._BOMseen=!1,this._decoder=null,this._fatal=Boolean(t.fatal),this._ignoreBOM=Boolean(t.ignoreBOM),Object.defineProperty(this,"encoding",{value:"utf-8"}),Object.defineProperty(this,"fatal",{value:this._fatal}),Object.defineProperty(this,"ignoreBOM",{value:this._ignoreBOM})}function u(e,t){if(!(this instanceof u))return new u(e,t);if((e=void 0!==e?String(e).toLowerCase():c)!==c)throw new Error("Encoding not supported. Only utf-8 is supported");t=i(t),this._streaming=!1,this._encoder=null,this._options={fatal:Boolean(t.fatal)},Object.defineProperty(this,"encoding",{value:"utf-8"})}function d(e){var t=e.fatal,n=0,i=0,o=0,c=128,l=191;this.handler=function(e,u){if(-1===u&&0!==o)return o=0,a(t);if(-1===u)return s;if(0===o){if(r(u,0,127))return u;if(r(u,194,223))o=1,n=u-192;else if(r(u,224,239))224===u&&(c=160),237===u&&(l=159),o=2,n=u-224;else{if(!r(u,240,244))return a(t);240===u&&(c=144),244===u&&(l=143),o=3,n=u-240}return n<<=6*o,null}if(!r(u,c,l))return n=o=i=0,c=128,l=191,e.prepend(u),a(t);if(c=128,l=191,n+=u-128<<6*(o-(i+=1)),i!==o)return null;var d=n;return n=o=i=0,d}}function h(e){e.fatal;this.handler=function(e,t){if(-1===t)return s;if(r(t,0,127))return t;var n,i;r(t,128,2047)?(n=1,i=192):r(t,2048,65535)?(n=2,i=224):r(t,65536,1114111)&&(n=3,i=240);for(var o=[(t>>6*n)+i];n>0;){var a=t>>6*(n-1);o.push(128|63&a),n-=1}return o}}l.prototype={decode:function(e,t){var n;n="object"===typeof e&&e instanceof ArrayBuffer?new Uint8Array(e):"object"===typeof e&&"buffer"in e&&e.buffer instanceof ArrayBuffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(0),t=i(t),this._streaming||(this._decoder=new d({fatal:this._fatal}),this._BOMseen=!1),this._streaming=Boolean(t.stream);for(var r,a=new o(n),c=[];!a.endOfStream()&&(r=this._decoder.handler(a,a.read()))!==s;)null!==r&&(Array.isArray(r)?c.push.apply(c,r):c.push(r));if(!this._streaming){do{if((r=this._decoder.handler(a,a.read()))===s)break;null!==r&&(Array.isArray(r)?c.push.apply(c,r):c.push(r))}while(!a.endOfStream());this._decoder=null}return c.length&&(-1===["utf-8"].indexOf(this.encoding)||this._ignoreBOM||this._BOMseen||(65279===c[0]?(this._BOMseen=!0,c.shift()):this._BOMseen=!0)),function(e){for(var t="",n=0;n<e.length;++n){var r=e[n];r<=65535?t+=String.fromCharCode(r):(r-=65536,t+=String.fromCharCode(55296+(r>>10),56320+(1023&r)))}return t}(c)}},u.prototype={encode:function(e,t){e=e?String(e):"",t=i(t),this._streaming||(this._encoder=new h(this._options)),this._streaming=Boolean(t.stream);for(var n,r=[],a=new o(function(e){for(var t=String(e),n=t.length,r=0,i=[];r<n;){var o=t.charCodeAt(r);if(o<55296||o>57343)i.push(o);else if(56320<=o&&o<=57343)i.push(65533);else if(55296<=o&&o<=56319)if(r===n-1)i.push(65533);else{var s=e.charCodeAt(r+1);if(56320<=s&&s<=57343){var a=1023&o,c=1023&s;i.push(65536+(a<<10)+c),r+=1}else i.push(65533)}r+=1}return i}(e));!a.endOfStream()&&(n=this._encoder.handler(a,a.read()))!==s;)Array.isArray(n)?r.push.apply(r,n):r.push(n);if(!this._streaming){for(;(n=this._encoder.handler(a,a.read()))!==s;)Array.isArray(n)?r.push.apply(r,n):r.push(n);this._encoder=null}return new Uint8Array(r)}}},9154:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolanaSignTransaction=void 0,t.SolanaSignTransaction="solana:signTransaction"},9178:(e,t)=>{let n;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return r[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!==typeof e)throw new Error('"toSJISFunc" is not a valid function.');n=e},t.isKanjiModeEnabled=function(){return"undefined"!==typeof n},t.toSJIS=function(e){return n(e)}},9187:(e,t,n)=>{"use strict";n.d(t,{yH:()=>h});var r=n(4223),i=n(7578),o=n(1296),s=n(4235),a=n(2569),c=n(4456);const l=["address"];function u(e){if(e&&0!==e.length)return e.reduce((e,t)=>{let{slot:n,value:r}=t;if(66!==n.length)throw new o.NV({size:n.length,targetSize:66,type:"hex"});if(66!==r.length)throw new o.NV({size:r.length,targetSize:66,type:"hex"});return e[n]=r,e},{})}function d(e){const{balance:t,nonce:n,state:r,stateDiff:i,code:o}=e,a={};if(void 0!==o&&(a.code=o),void 0!==t&&(a.balance=(0,c.cK)(t)),void 0!==n&&(a.nonce=(0,c.cK)(n)),void 0!==r&&(a.state=u(r)),void 0!==i){if(a.state)throw new s.ft;a.stateDiff=u(i)}return a}function h(e){if(!e)return;const t={};for(const n of e){const{address:e}=n,o=(0,r.A)(n,l);if(!(0,a.P)(e,{strict:!1}))throw new i.M({address:e});if(t[e])throw new s.Hi({address:e});t[e]=d(o)}return t}},9210:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(620),t),i(n(7562),t),i(n(289),t)},9231:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>c,UT:()=>k,Xf:()=>w,fH:()=>v,hT:()=>y,u0:()=>a});var r=n(3808),i=n(4902);const o=BigInt(0),s=BigInt(1);function a(e,t){const n=t.negate();return e?n:t}function c(e,t){const n=(0,i.pS)(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))}function l(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function u(e,t){l(e,t);const n=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:(0,r.OG)(e),maxNumber:n,shiftBy:BigInt(e)}}function d(e,t,n){const{windowSize:r,mask:i,maxNumber:o,shiftBy:a}=n;let c=Number(e&i),l=e>>a;c>r&&(c-=o,l+=s);const u=t*r;return{nextN:l,offset:u+Math.abs(c)-1,isZero:0===c,isNeg:c<0,isNegF:t%2!==0,offsetF:u}}function h(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw new Error("invalid point at index "+n)})}function f(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+n)})}const p=new WeakMap,m=new WeakMap;function g(e){return m.get(e)||1}function b(e){if(e!==o)throw new Error("invalid wNAF")}class y{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.ZERO,r=e;for(;t>o;)t&s&&(n=n.add(r)),r=r.double(),t>>=s;return n}precomputeWindow(e,t){const{windows:n,windowSize:r}=u(t,this.bits),i=[];let o=e,s=o;for(let a=0;a<n;a++){s=o,i.push(s);for(let e=1;e<r;e++)s=s.add(o),i.push(s);o=s.double()}return i}wNAF(e,t,n){if(!this.Fn.isValid(n))throw new Error("invalid scalar");let r=this.ZERO,i=this.BASE;const o=u(e,this.bits);for(let s=0;s<o.windows;s++){const{nextN:e,offset:c,isZero:l,isNeg:u,isNegF:h,offsetF:f}=d(n,s,o);n=e,l?i=i.add(a(h,t[f])):r=r.add(a(u,t[c]))}return b(n),{p:r,f:i}}wNAFUnsafe(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.ZERO;const i=u(e,this.bits);for(let s=0;s<i.windows&&n!==o;s++){const{nextN:e,offset:o,isZero:a,isNeg:c}=d(n,s,i);if(n=e,!a){const e=t[o];r=r.add(c?e.negate():e)}}return b(n),r}getPrecomputes(e,t,n){let r=p.get(t);return r||(r=this.precomputeWindow(t,e),1!==e&&("function"===typeof n&&(r=n(r)),p.set(t,r))),r}cached(e,t,n){const r=g(e);return this.wNAF(r,this.getPrecomputes(r,e,n),t)}unsafe(e,t,n,r){const i=g(e);return 1===i?this._unsafeLadder(e,t,r):this.wNAFUnsafe(i,this.getPrecomputes(i,e,n),t,r)}createCache(e,t){l(t,this.bits),m.set(e,t),p.delete(e)}hasCache(e){return 1!==g(e)}}function v(e,t,n,r){let i=t,a=e.ZERO,c=e.ZERO;for(;n>o||r>o;)n&s&&(a=a.add(i)),r&s&&(c=c.add(i)),i=i.double(),n>>=s,r>>=s;return{p1:a,p2:c}}function w(e,t,n,i){h(n,e),f(i,t);const o=n.length,s=i.length;if(o!==s)throw new Error("arrays of points and scalars must have equal length");const a=e.ZERO,c=(0,r.dJ)(BigInt(o));let l=1;c>12?l=c-3:c>4?l=c-2:c>0&&(l=2);const u=(0,r.OG)(l),d=new Array(Number(u)+1).fill(a);let p=a;for(let r=Math.floor((t.BITS-1)/l)*l;r>=0;r-=l){d.fill(a);for(let t=0;t<s;t++){const e=i[t],o=Number(e>>BigInt(r)&u);d[o]=d[o].add(n[t])}let e=a;for(let t=d.length-1,n=a;t>0;t--)n=n.add(d[t]),e=e.add(n);if(p=p.add(e),0!==r)for(let t=0;t<l;t++)p=p.double()}return p}function _(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,i.jr)(t),t}return(0,i.D0)(e,{isLE:n})}function k(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(void 0===r&&(r="edwards"===e),!t||"object"!==typeof t)throw new Error("expected valid ".concat(e," CURVE object"));for(const c of["p","n","h"]){const e=t[c];if(!("bigint"===typeof e&&e>o))throw new Error("CURVE.".concat(c," must be positive bigint"))}const i=_(t.p,n.Fp,r),s=_(t.n,n.Fn,r),a=["Gx","Gy","a","weierstrass"===e?"b":"d"];for(const o of a)if(!i.isValid(t[o]))throw new Error("CURVE.".concat(o," must be valid field element of CURVE.Fp"));return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:i,Fn:s}}},9336:(e,t)=>{const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";t.KANJI=new RegExp(r,"g"),t.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=new RegExp(i,"g"),t.NUMERIC=new RegExp(n,"g"),t.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const o=new RegExp("^"+r+"$"),s=new RegExp("^"+n+"$"),a=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return s.test(e)},t.testAlphanumeric=function(e){return a.test(e)}},9405:e=>{var t=1e3,n=60*t,r=60*n,i=24*r,o=7*i,s=365.25*i;function a(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,c){c=c||{};var l=typeof e;if("string"===l&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*o;case"days":case"day":case"d":return c*i;case"hours":case"hour":case"hrs":case"hr":case"h":return c*r;case"minutes":case"minute":case"mins":case"min":case"m":return c*n;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===l&&isFinite(e))return c.long?function(e){var o=Math.abs(e);if(o>=i)return a(e,o,i,"day");if(o>=r)return a(e,o,r,"hour");if(o>=n)return a(e,o,n,"minute");if(o>=t)return a(e,o,t,"second");return e+" ms"}(e):function(e){var o=Math.abs(e);if(o>=i)return Math.round(e/i)+"d";if(o>=r)return Math.round(e/r)+"h";if(o>=n)return Math.round(e/n)+"m";if(o>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},9454:(e,t,n)=>{"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(2387)},9517:(e,t,n)=>{"use strict";const r=n(882).v4;e.exports=function(e,t,n,i){if("string"!==typeof e)throw new TypeError(e+" must be a string");const o="number"===typeof(i=i||{}).version?i.version:2;if(1!==o&&2!==o)throw new TypeError(o+" must be 1 or 2");const s={method:e};if(2===o&&(s.jsonrpc="2.0"),t){if("object"!==typeof t&&!Array.isArray(t))throw new TypeError(t+" must be an object, array or omitted");s.params=t}if("undefined"===typeof n){const e="function"===typeof i.generator?i.generator:function(){return r()};s.id=e(s,i)}else 2===o&&null===n?i.notificationIdNull&&(s.id=null):s.id=n;return s}},9603:(e,t,n)=>{"use strict";n.d(t,{I:()=>i,R:()=>r});const r=e=>e,i=e=>e},9693:(e,t,n)=>{const r=n(4335);t.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let i=0;i<e.length;i++)for(let o=0;o<t.length;o++)n[i+o]^=r.mul(e[i],t[o]);return n},t.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const e=n[0];for(let o=0;o<t.length;o++)n[o]^=r.mul(t[o],e);let i=0;for(;i<n.length&&0===n[i];)i++;n=n.slice(i)}return n},t.generateECPolynomial=function(e){let n=new Uint8Array([1]);for(let i=0;i<e;i++)n=t.mul(n,new Uint8Array([1,r.exp(i)]));return n}},9740:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1979);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}},9774:(e,t,n)=>{"use strict";n.d(t,{W:()=>l});var r=n(8445),i=n(1588),o=n(2129),s=n(1503),a=n(1187),c=n(2311);function l(e){const{abi:t,data:n}=e,l=(0,o.di)(n,0,4);if("0x"===l)throw new i.O;const u=[...t||[],r.Mc,r.J9].find(e=>"error"===e.type&&l===(0,s.V)((0,c.B)(e)));if(!u)throw new i.Wq(l,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:u,args:"inputs"in u&&u.inputs&&u.inputs.length>0?(0,a.n)(u.inputs,(0,o.di)(n,4)):void 0,errorName:u.name}}},9790:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(2104),t)},9804:function(e){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=90)}({17:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=n(18),i=function(){function e(){}return e.getFirstMatch=function(e,t){var n=t.match(e);return n&&n.length>0&&n[1]||""},e.getSecondMatch=function(e,t){var n=t.match(e);return n&&n.length>1&&n[2]||""},e.matchAndReturnConst=function(e,t,n){if(e.test(t))return n},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),10===t[0])switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map(function(e){return parseInt(e,10)||0});if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,n,r){void 0===r&&(r=!1);var i=e.getVersionPrecision(t),o=e.getVersionPrecision(n),s=Math.max(i,o),a=0,c=e.map([t,n],function(t){var n=s-e.getVersionPrecision(t),r=t+new Array(n+1).join(".0");return e.map(r.split("."),function(e){return new Array(20-e.length).join("0")+e}).reverse()});for(r&&(a=s-Math.min(i,o)),s-=1;s>=a;){if(c[0][s]>c[1][s])return 1;if(c[0][s]===c[1][s]){if(s===a)return 0;s-=1}else if(c[0][s]<c[1][s])return-1}},e.map=function(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n+=1)r.push(t(e[n]));return r},e.find=function(e,t){var n,r;if(Array.prototype.find)return Array.prototype.find.call(e,t);for(n=0,r=e.length;n<r;n+=1){var i=e[n];if(t(i,n))return i}},e.assign=function(e){for(var t,n,r=e,i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];if(Object.assign)return Object.assign.apply(Object,[e].concat(o));var a=function(){var e=o[t];"object"==typeof e&&null!==e&&Object.keys(e).forEach(function(t){r[t]=e[t]})};for(t=0,n=o.length;t<n;t+=1)a();return e},e.getBrowserAlias=function(e){return r.BROWSER_ALIASES_MAP[e]},e.getBrowserTypeByAlias=function(e){return r.BROWSER_MAP[e]||""},e}();t.default=i,e.exports=t.default},18:function(e,t,n){"use strict";t.__esModule=!0,t.ENGINE_MAP=t.OS_MAP=t.PLATFORMS_MAP=t.BROWSER_MAP=t.BROWSER_ALIASES_MAP=void 0,t.BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast","Pale Moon":"pale_moon",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},t.BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",pale_moon:"Pale Moon",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},t.PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv",bot:"bot"},t.OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},t.ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"}},90:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(91))&&r.__esModule?r:{default:r},o=n(18);function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=function(){function e(){}var t,n,r;return e.getParser=function(e,t){if(void 0===t&&(t=!1),"string"!=typeof e)throw new Error("UserAgent should be a string");return new i.default(e,t)},e.parse=function(e){return new i.default(e).getResult()},t=e,r=[{key:"BROWSER_MAP",get:function(){return o.BROWSER_MAP}},{key:"ENGINE_MAP",get:function(){return o.ENGINE_MAP}},{key:"OS_MAP",get:function(){return o.OS_MAP}},{key:"PLATFORMS_MAP",get:function(){return o.PLATFORMS_MAP}}],(n=null)&&s(t.prototype,n),r&&s(t,r),e}();t.default=a,e.exports=t.default},91:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(92)),i=c(n(93)),o=c(n(94)),s=c(n(95)),a=c(n(17));function c(e){return e&&e.__esModule?e:{default:e}}var l=function(){function e(e,t){if(void 0===t&&(t=!1),null==e||""===e)throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},!0!==t&&this.parse()}var t=e.prototype;return t.getUA=function(){return this._ua},t.test=function(e){return e.test(this._ua)},t.parseBrowser=function(){var e=this;this.parsedResult.browser={};var t=a.default.find(r.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser},t.getBrowser=function(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()},t.getBrowserName=function(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""},t.getBrowserVersion=function(){return this.getBrowser().version},t.getOS=function(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()},t.parseOS=function(){var e=this;this.parsedResult.os={};var t=a.default.find(i.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os},t.getOSName=function(e){var t=this.getOS().name;return e?String(t).toLowerCase()||"":t||""},t.getOSVersion=function(){return this.getOS().version},t.getPlatform=function(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()},t.getPlatformType=function(e){void 0===e&&(e=!1);var t=this.getPlatform().type;return e?String(t).toLowerCase()||"":t||""},t.parsePlatform=function(){var e=this;this.parsedResult.platform={};var t=a.default.find(o.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform},t.getEngine=function(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()},t.getEngineName=function(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""},t.parseEngine=function(){var e=this;this.parsedResult.engine={};var t=a.default.find(s.default,function(t){if("function"==typeof t.test)return t.test(e);if(Array.isArray(t.test))return t.test.some(function(t){return e.test(t)});throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine},t.parse=function(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this},t.getResult=function(){return a.default.assign({},this.parsedResult)},t.satisfies=function(e){var t=this,n={},r=0,i={},o=0;if(Object.keys(e).forEach(function(t){var s=e[t];"string"==typeof s?(i[t]=s,o+=1):"object"==typeof s&&(n[t]=s,r+=1)}),r>0){var s=Object.keys(n),c=a.default.find(s,function(e){return t.isOS(e)});if(c){var l=this.satisfies(n[c]);if(void 0!==l)return l}var u=a.default.find(s,function(e){return t.isPlatform(e)});if(u){var d=this.satisfies(n[u]);if(void 0!==d)return d}}if(o>0){var h=Object.keys(i),f=a.default.find(h,function(e){return t.isBrowser(e,!0)});if(void 0!==f)return this.compareVersion(i[f])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),i=a.default.getBrowserTypeByAlias(r);return t&&i&&(r=i.toLowerCase()),r===n},t.compareVersion=function(e){var t=[0],n=e,r=!1,i=this.getBrowserVersion();if("string"==typeof i)return">"===e[0]||"<"===e[0]?(n=e.substr(1),"="===e[1]?(r=!0,n=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?n=e.substr(1):"~"===e[0]&&(r=!0,n=e.substr(1)),t.indexOf(a.default.compareVersions(i,n,r))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some(function(e){return t.is(e)})},e}();t.default=l,e.exports=t.default},92:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=/version\/(\d+(\.?_?\d+)+)/i,s=[{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},n=i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},n=i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},n=i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},n=i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},n=i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},n=i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},n=i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},n=i.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=i.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},n=i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},n=i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},n=i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},n=i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},n=i.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},n=i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},n=i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},n=i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},n=i.default.getFirstMatch(o,e)||i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},n=i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},n=i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},n=i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},n=i.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},n=i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},n=i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},n=i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},n=i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},n=i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t={name:"Android Browser"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},n=i.default.getFirstMatch(o,e);return n&&(t.version=n),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:i.default.getFirstMatch(t,e),version:i.default.getSecondMatch(t,e)}}}];t.default=s,e.exports=t.default},93:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/Roku\/DVP/],describe:function(e){var t=i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:o.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=i.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=i.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=i.default.getWindowsVersionName(t);return{name:o.OS_MAP.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:o.OS_MAP.iOS},n=i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe:function(e){var t=i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=i.default.getMacOSVersionName(t),r={name:o.OS_MAP.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:o.OS_MAP.iOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe:function(e){var t=i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=i.default.getAndroidVersionName(t),r={name:o.OS_MAP.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:o.OS_MAP.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||i.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:o.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:o.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:o.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:o.OS_MAP.PlayStation4,version:t}}}];t.default=s,e.exports=t.default},94:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:[/googlebot/i],describe:function(){return{type:o.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/huawei/i],describe:function(e){var t=i.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:o.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe:function(e){var t=i.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:o.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=i.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),n={type:o.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(n.model=t),n}},{test:[/[^-]mobi/i],describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:o.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:o.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.mobile}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:o.PLATFORMS_MAP.tv}}}];t.default=s,e.exports=t.default},95:function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r,i=(r=n(17))&&r.__esModule?r:{default:r},o=n(18),s=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:o.ENGINE_MAP.Blink};var t=i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:o.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:o.ENGINE_MAP.Trident},n=i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:o.ENGINE_MAP.Presto},n=i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:function(e){var t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe:function(e){var t={name:o.ENGINE_MAP.Gecko},n=i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:o.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:o.ENGINE_MAP.WebKit},n=i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}];t.default=s,e.exports=t.default}})},9873:(e,t,n)=>{const r=n(9178),i=r.getBCHDigit(1335);t.getEncodedBits=function(e,t){const n=e.bit<<3|t;let o=n<<10;for(;r.getBCHDigit(o)-i>=0;)o^=1335<<r.getBCHDigit(o)-i;return 21522^(n<<10|o)}},9921:e=>{"use strict";e.exports=JSON.parse('{"openrpc":"1.2.4","info":{"title":"JSON-RPC API","version":"1.0.0","description":"This section provides an interactive reference for MetaMask\'s Wallet JSON-RPC API. The API builds on a set of standard Ethereum methods with MetaMask-specific enhancements, and is designed for seamless integration into dapps."},"methods":[{"name":"wallet_addEthereumChain","tags":[{"$ref":"#/components/tags/MetaMask"},{"$ref":"#/components/tags/Multichain"}],"summary":"Adds an Ethereum chain to the wallet.","description":"Creates a confirmation asking the user to add the specified chain to the wallet application. The caller must specify a chain ID and some chain metadata. Specified by [EIP-3085](https://eips.ethereum.org/EIPS/eip-3085).","params":[{"name":"Chain","schema":{"$ref":"#/components/schemas/AddEthereumChainParameter"}}],"errors":[{"code":-32602,"message":"Expected null or array with at least one valid string HTTPS URL \'blockExplorerUrl\'. Received: ${blockExplorerUrls}"},{"code":-32602,"message":"Expected 0x-prefixed, unpadded, non-zero hexadecimal string \'chainId\'. Received:\\n${chainId}"},{"code":-32602,"message":"Invalid chain ID \\"${_chainId}\\": numerical value greater than max safe value. Received:\\n${chainId}"},{"code":-32602,"message":"May not specify default MetaMask chain."},{"code":-32602,"message":"Expected 2-6 character string \'nativeCurrency.symbol\'. Received:\\n${ticker}"},{"code":-32602,"message":"nativeCurrency.symbol does not match currency symbol for a network the user already has added with the same chainId. Received:\\n${ticker}"}],"result":{"name":"Null response","description":"This method returns `null` if the chain is added.","schema":{"type":"null"}},"examples":[{"name":"wallet_addEthereumChain example","params":[{"name":"Chain","value":{"chainId":"0x64","chainName":"Gnosis","rpcUrls":["https://rpc.gnosischain.com"],"iconUrls":["https://xdaichain.com/fake/example/url/xdai.svg","https://xdaichain.com/fake/example/url/xdai.png"],"nativeCurrency":{"name":"XDAI","symbol":"XDAI","decimals":18},"blockExplorerUrls":["https://blockscout.com/poa/xdai/"]}}],"result":{"name":"Null response","value":"null"}}]},{"name":"wallet_switchEthereumChain","tags":[{"$ref":"#/components/tags/MetaMask"}],"summary":"Switches the wallet\'s active Ethereum chain.","description":"Requests that the wallet switches its active Ethereum chain. Specified by [EIP-3326](https://eips.ethereum.org/EIPS/eip-3326).","params":[{"name":"Chain","schema":{"title":"Chain","description":"Object containing the chain ID to switch to.","type":"object","required":["chainId"],"properties":{"chainId":{"description":"The chain ID as a `0x`-prefixed hexadecimal string, as returned by the `eth_chainId` method.","type":"string"}}}}],"result":{"name":"Null response","description":"This method returns `null` if the active chain is switched.","schema":{"type":"null"}},"errors":[{"code":4902,"message":"Unrecognized chain ID. Try adding the chain using wallet_addEthereumChain first."}],"examples":[{"name":"wallet_switchEthereumChain example","params":[{"name":"Chain","value":{"chainId":"0x64"}}],"result":{"name":"Null response","value":"null"}}]},{"name":"wallet_getPermissions","tags":[{"$ref":"#/components/tags/MetaMask"}],"summary":"Gets the user\'s permissions.","description":"Gets the user\'s permissions. Specified by [EIP-2255](https://eips.ethereum.org/EIPS/eip-2255).","params":[],"result":{"name":"Permissions list","schema":{"$ref":"#/components/schemas/PermissionsList"}},"examples":[{"name":"wallet_getPermissions example","params":[],"result":{"name":"Permission list","value":{"eth_accounts":{}}}}]},{"name":"wallet_requestPermissions","tags":[{"$ref":"#/components/tags/MetaMask"}],"summary":"Requests additional permissions.","description":"Requests additional permissions from the user. This method accepts a single permission per call. Specified by [EIP-2255](https://eips.ethereum.org/EIPS/eip-2255).","params":[{"name":"Permission","required":true,"schema":{"title":"Permission","description":"Object containing the permission to request.","type":"object","properties":{"permission_name":{"type":"object","description":"The permission object. `permission_name` is the name of the permission being requested.","additionalProperties":true}}}}],"result":{"name":"Permissions list","schema":{"$ref":"#/components/schemas/PermissionsList"}},"examples":[{"name":"wallet_requestPermissions example","params":[{"name":"Permission","value":{"eth_accounts":{}}}],"result":{"name":"Permission list","value":{"eth_accounts":{}}}}],"errors":[{"$ref":"#/components/errors/UserRejected"}]},{"name":"wallet_revokePermissions","tags":[{"$ref":"#/components/tags/MetaMask"},{"$ref":"#/components/tags/Experimental"}],"summary":"Revokes the current dapp permissions.","description":"Revokes previously granted permissions for the current dapp identified by its origin. This method accepts a single permission per call. Specified by [MIP-2](https://github.com/MetaMask/metamask-improvement-proposals/blob/main/MIPs/mip-2.md) and only available for the MetaMask browser extension.","params":[{"name":"Permission","required":true,"schema":{"title":"Permission","description":"Object containing the permission to revoke.","type":"object","properties":{"permission_name":{"type":"object","description":"The permission object. `permission_name` is the name of the permission being revoked.","additionalProperties":true}}}}],"result":{"name":"Null response","description":"This method returns `null` if the permission is revoked.","schema":{"type":"null"}},"errors":[],"examples":[{"name":"wallet_revokePermissions example","params":[{"name":"Permission","value":{"eth_accounts":{}}}],"result":{"name":"Null response","value":"null"}}]},{"name":"personal_sign","tags":[{"$ref":"#/components/tags/MetaMask"},{"$ref":"#/components/tags/Restricted"},{"$ref":"#/components/tags/Multichain"}],"summary":"Presents a plain text signature challenge to the user.","description":"Presents a plain text signature challenge to the user and returns the signed response. Prepends a safe prefix to the signed message to prevent the challenge tricking users into signing a financial transaction. <br><br> MetaMask implements `personal_sign` similarly to the Go Ethereum client\'s `eth_sign` implementation. MetaMask\'s `personal_sign` doesn\'t accept a password. <br><br> This method requires that the user has granted permission to interact with their account first, so make sure to call `eth_requestAccounts` (recommended) or `wallet_requestPermissions` first.","deprecated":false,"params":[{"name":"Challenge","required":true,"description":"A hex-encoded UTF-8 string to present to the user. See how to encode a string like this in the [`browser-string-hexer`](https://github.com/danfinlay/browser-string-hexer) module.","schema":{"type":"string","pattern":"^0x[a-fA-F\\\\d]+$"}},{"name":"Address","required":true,"description":"The address of the requested signing account.","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}],"result":{"name":"Signature","description":"A hex-encoded signature.","schema":{"type":"string","pattern":"^0x[0-9a-f]*$"}},"examples":[{"name":"personal_sign example","params":[{"name":"Challenge","value":"0x506c65617365207369676e2074686973206d65737361676520746f20636f6e6669726d20796f7572206964656e746974792e"},{"name":"Address","value":"0x4B0897b0513FdBeEc7C469D9aF4fA6C0752aBea7"}],"result":{"name":"Signature","value":"0x43d7215ebe96c09a5adac69fc76dea5647286b501954ea273e417cf65e6c80e1db4891826375a7de02467a3e01caf125f64c851a8e9ee9467fd6f7e83523b2115bed8e79d527a85e28a36807d79b85fc551b5c15c1ead2e43456c31f565219203db2aed86cb3601b33ec3b410836d4be7718c6148dc9ac82ecc0a04c5edecd8914"}}]},{"name":"eth_signTypedData_v4","tags":[{"$ref":"#/components/tags/MetaMask"},{"$ref":"#/components/tags/Restricted"},{"$ref":"#/components/tags/Multichain"}],"summary":"Presents a structured data message for the user to sign.","description":"Presents a data message for the user to sign in a structured and readable format and returns the signed response. Introduced by [EIP-712](https://eips.ethereum.org/EIPS/eip-712). This method requires that the user has granted permission to interact with their account first, so make sure to call `eth_requestAccounts` (recommended) or `wallet_requestPermissions` first.","params":[{"name":"Address","required":true,"description":"The address of the requested signing account.","schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},{"name":"Typed data","required":true,"schema":{"$ref":"#/components/schemas/TypedData"}}],"result":{"name":"Signature","description":"A hex-encoded signature.","schema":{"type":"string","pattern":"^0x[0-9a-f]*$"}},"examples":[{"name":"eth_SignTypedData_v4 example","params":[{"name":"Address","value":"0x0000000000000000000000000000000000000000"},{"name":"Typed data","value":{"types":{"EIP712Domain":[{"name":"name","type":"string"},{"name":"version","type":"string"},{"name":"chainId","type":"uint256"},{"name":"verifyingContract","type":"address"}],"Person":[{"name":"name","type":"string"},{"name":"wallet","type":"address"}],"Mail":[{"name":"from","type":"Person"},{"name":"to","type":"Person"},{"name":"contents","type":"string"}]},"primaryType":"Mail","domain":{"name":"Ether Mail","version":"1","chainId":1,"verifyingContract":"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"},"message":{"from":{"name":"Cow","wallet":"0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826"},"to":{"name":"Bob","wallet":"0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB"},"contents":"Hello, Bob!"}}}],"result":{"name":"Signature","value":"0x4355c47d63924e8a72e509b65029052eb6c299d53a04e167c5775fd466751c9d07299936d304c153f6443dfa05f40ff007d72911b6f72307f996231605b915621c"}}]},{"name":"wallet_registerOnboarding","tags":[{"$ref":"#/components/tags/MetaMask"},{"$ref":"#/components/tags/Multichain"}],"summary":"Redirects the user back to the site after onboarding.","description":"Registers the requesting site with MetaMask as the initiator of onboarding, enabling MetaMask to redirect the user back to the site after onboarding. Returns a promise that resolves to `true`, or rejects the request if there\'s an error. Instead of calling this method directly, you should use the [`@metamask/onboarding`](https://github.com/MetaMask/metamask-onboarding) library.","params":[],"result":{"name":"Registered","description":"`true` if the request was successful, `false` otherwise.","schema":{"type":"boolean"}},"examples":[{"name":"wallet_registerOnboarding example","params":[],"result":{"name":"Registered","value":true}}]},{"name":"wallet_watchAsset","tags":[{"$ref":"#/components/tags/MetaMask"},{"$ref":"#/components/tags/Experimental"},{"$ref":"#/components/tags/Multichain"}],"summary":"Tracks a token in MetaMask.","description":"Requests that the user track the specified token in MetaMask. Returns a boolean indicating if the token was successfully added. Once added, the token is indistinguishable from those added using legacy methods, such as a centralized registry. Introduced by [EIP-747](https://eips.ethereum.org/EIPS/eip-747).","paramStructure":"by-name","params":[{"name":"type","schema":{"type":"string","description":"The token type (`ERC20`, `ERC721`, or `ERC1155`). Support for ERC-721 and ERC-1155 tokens is experimental and currently only available on the extension (not on mobile). See [MIP-1](https://github.com/MetaMask/metamask-improvement-proposals/blob/main/MIPs/mip-1.md) and the [MIP proposal lifecycle](https://github.com/MetaMask/metamask-improvement-proposals/blob/main/PROCESS-GUIDE.md#proposal-lifecycle) for more information.","enum":["ERC20","ERC721","ERC1155"]},"required":true},{"name":"options","schema":{"description":"An object containing information about the token.","type":"object","required":["address"],"properties":{"address":{"description":"The address of the token contract.","type":"string"},"symbol":{"description":"A ticker symbol or shorthand, up to 11 characters (optional for ERC-20 tokens).","minLength":2,"maxLength":11,"type":"string"},"decimals":{"description":"The number of token decimals (optional for ERC-20 tokens).","type":"number"},"image":{"description":"A string URL of the token logo (optional for ERC-20 tokens).","type":"string"},"tokenId":{"description":"The unique identifier of the NFT (required for ERC-721 and ERC-1155 tokens).","type":"string"}}}}],"errors":[{"code":-32602,"message":"Must specify address, symbol, and decimals."},{"code":-32602,"message":"Invalid symbol: not a string."},{"code":-32602,"message":"Invalid symbol \'${symbol}\': longer than 11 characters."},{"code":-32602,"message":"Invalid decimals \'${decimals}\': must be 0 <= 36."},{"code":-32602,"message":"Invalid address \'${address}\'."},{"code":-32602,"message":"Asset type is required."},{"code":-32602,"message":"Both address and tokenId are required."},{"code":-32602,"message":"Invalid address."},{"code":-32000,"message":"Suggested NFT is not owned by the selected account."},{"code":-32000,"message":"Suggested NFT of type ${standard} does not match received type ${type}."},{"code":-32002,"message":"Unable to verify ownership. Possibly because the standard is not supported or the user\'s currently selected network does not match the chain of the asset in question."}],"result":{"name":"Added","description":"`true` if the token was added, `false` otherwise.","schema":{"type":"boolean"}},"examples":[{"name":"wallet_watchAsset ERC-20 example","params":[{"name":"type","value":"ERC20"},{"name":"options","value":{"address":"0xb60e8dd61c5d32be8058bb8eb970870f07233155","symbol":"FOO","decimals":18,"image":"https://foo.io/token-image.svg"}}],"result":{"name":"Added","value":true}},{"name":"wallet_watchAsset ERC-721 example","params":[{"name":"type","value":"ERC721"},{"name":"options","value":{"address":"0x123456789abcdef0123456789abcdef01234567","tokenId":"42"}}],"result":{"name":"Added","value":true}},{"name":"wallet_watchAsset ERC-1155 example","params":[{"name":"type","value":"ERC1155"},{"name":"options","value":{"address":"0xabcdef0123456789abcdef0123456789abcdef01","tokenId":"1337"}}],"result":{"name":"Added","value":true}}]},{"name":"wallet_scanQRCode","tags":[{"$ref":"#/components/tags/MetaMask"},{"$ref":"#/components/tags/Mobile"},{"$ref":"#/components/tags/Multichain"}],"summary":"Requests that the user scan a QR code.","description":"Requests that the user scan a QR code using their device camera. Introduced by [EIP-945](https://github.com/ethereum/EIPs/issues/945).","params":[{"name":"Regex","required":false,"description":"A regular expression (regex) string for matching arbitrary QR code strings.","schema":{"type":"string","title":"regex"}}],"result":{"name":"QR code string","description":"A string corresponding to the scanned QR code. If a regex string is provided, the resulting string matches it. If no regex string is provided, the resulting string matches an Ethereum address. If neither condition is met, the method returns an error.","schema":{"type":"string","title":"QR code string"}}},{"name":"wallet_sendCalls","tags":[{"$ref":"#/components/tags/MetaMask"}],"summary":"Sends a batch of calls.","description":"Requests that the wallet submits a batch of calls. Specified by [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792).","params":[{"name":"Calls","required":true,"schema":{"$ref":"#/components/schemas/SendCallsParameter"}}],"result":{"name":"Batch result","schema":{"description":"An object containing information about the sent batch.","type":"object","properties":{"id":{"description":"The ID of the batch of calls.","type":"string"},"capabilities":{"description":"Wallets can use this object to attach capability-specific metadata.","type":"object"}}}},"errors":[{"$ref":"#/components/errors/InvalidParams"},{"code":-32000,"message":"Version not supported."},{"$ref":"#/components/errors/UserRejected"},{"$ref":"#/components/errors/Unauthorized"},{"code":5700,"message":"The wallet does not support a capability that was not marked as optional."},{"code":5710,"message":"EIP-7702 not supported on the specified chain ID."},{"code":5720,"message":"There is already a batch submitted with the specified batch ID."},{"code":5740,"message":"The batch is too large for the wallet to process."},{"code":5750,"message":"EIP-7702 upgrade rejected for this chain and account."}],"examples":[{"name":"wallet_sendCalls example","params":[{"name":"Calls","value":{"version":"2.0.0","from":"0xd46e8dd67c5d32be8058bb8eb970870f07244567","chainId":"0xaa36a7","atomicRequired":true,"calls":[{"to":"0x54f1C1965B355e1AB9ec3465616136be35bb5Ff7","value":"0x0"},{"to":"0x2D48e6f5Ae053e4E918d2be53570961D880905F2","value":"0x0"}]}}],"result":{"name":"Batch result","value":{"id":"0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"}}}]},{"name":"wallet_getCallsStatus","tags":[{"$ref":"#/components/tags/MetaMask"}],"summary":"Gets the status of a call batch.","description":"Gets the status of a batch of calls that was previously sent using `wallet_sendCalls`. Specified by [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792).","params":[{"name":"Batch ID","required":true,"description":"The ID of a batch of calls (the `id` value returned by `wallet_sendCalls`).","schema":{"type":"string"}}],"result":{"name":"Batch status","schema":{"description":"An object containing status information of the batch of calls.","type":"object","properties":{"version":{"description":"The version of the API format.","type":"string"},"id":{"description":"The ID of the batch of calls.","$ref":"#/components/schemas/uint"},"chainId":{"description":"The chain ID of the calls.","$ref":"#/components/schemas/uint"},"status":{"description":"The status code of the batch of calls. Possible values are: <br> <ul>\\n <li>`100` - Pending</li>\\n <li>`200` - Confirmed</li>\\n <li>`400` - Failed offchain</li>\\n <li>`500` - Reverted</li>\\n <li>`600` - Partially reverted</li>\\n</ul>","type":"number"},"atomic":{"description":"`true` if the wallet executed the calls atomically. `false` if the wallet executed the calls non-atomically.","type":"boolean"},"receipts":{"description":"An array of transaction receipts. If the wallet executed the calls atomically, a single receipt or an array of receipts may be returned, corresponding to how the batch of calls were included onchain.","type":"array","items":{"title":"Receipt","description":"A transaction receipt object.","type":"object","properties":{"logs":{"description":"An array of log objects.","type":"array","items":{"title":"Log","description":"An object containing information about the log.","type":"object","properties":{"address":{"description":"The address that generated the log.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"data":{"description":"The data of the log.","type":"string","pattern":"^0x[0-9a-f]*$"},"topics":{"description":"An array of log topics.","type":"array","items":{"title":"Topic","description":"A log topic.","type":"string","pattern":"^0x[0-9a-f]*$"}}}}},"status":{"description":"The status of the transaction. `0x1` indicates success, and `0x0` indicates failure.","type":"string","pattern":"^0x[0-1]$"},"blockHash":{"description":"The hash of the block containing the transaction.","type":"string","pattern":"^0x[0-9a-f]{64}$"},"blockNumber":{"description":"The number of the block containing the transaction.","type":"string","pattern":"^0x([1-9a-f]+[0-9a-f]*|0)$"},"gasUsed":{"description":"The amount of gas used by the transaction.","type":"string","pattern":"^0x([1-9a-f]+[0-9a-f]*|0)$"},"transactionHash":{"description":"The hash of the transaction.","type":"string","pattern":"^0x[0-9a-f]{64}$"}},"additionalProperties":true}},"capabilities":{"description":"Capabilities associated with the batch of calls.","type":"object","additionalProperties":true}}}},"errors":[{"$ref":"#/components/errors/InvalidParams"},{"$ref":"#/components/errors/Unauthorized"},{"code":5730,"message":"No matching bundle found."}],"examples":[{"name":"wallet_getCallsStatus example","params":[{"name":"Batch ID","value":"0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"}],"result":{"name":"Batch status","value":{"version":"2.0.0","chainId":"0xaa36a7","id":"0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331","status":200,"atomic":true,"receipts":[{"logs":[{"address":"0xa922b54716264130634d6ff183747a8ead91a40b","topics":["0x5a2a90727cc9d000dd060b1132a5c977c9702bb3a52afe360c9c22f0e9451a68"],"data":"0xabcd"}],"status":"0x1","blockHash":"0xf19bbafd9fd0124ec110b848e8de4ab4f62bf60c189524e54213285e7f540d4a","blockNumber":"0xabcd","gasUsed":"0xdef","transactionHash":"0x9b7bb827c2e5e3c1a0a44dc53e573aa0b3af3bd1f9f5ed03071b100bb039eaff"}]}}}]},{"name":"wallet_getCapabilities","tags":[{"$ref":"#/components/tags/MetaMask"}],"summary":"Gets the capabilities of the wallet.","description":"Returns information about the wallet\'s support for the `atomic` capability. The `atomic` capability specifies how the wallet will execute batches of transactions sent using `wallet_sendCalls`. `wallet_getCapabilities` is specified by [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792).","params":[{"name":"Address","description":"A wallet address.","required":true,"schema":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},{"name":"Chain IDs","description":"An array of chain IDs to get capabilities for.","schema":{"type":"array","items":{"title":"Chain ID","description":"An [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID in hexadecimal format.","$ref":"#/components/schemas/uint"}}}],"result":{"name":"Capabilities","schema":{"description":"An object specifying the status of the `atomic` capability for specific [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain IDs. For each chain, the `atomic` capability can have a `status` of: <br> <ul>\\n <li>`supported` - The wallet will execute calls sent using\\n `wallet_sendCalls` atomically.</li>\\n <li>`ready` - The wallet can upgrade to `supported` pending user\\n approval to upgrade their account via EIP-7702.</li>\\n</ul> If the `atomic` capability is not `supported` or `ready` for a specified chain ID, the wallet will not return anything for that chain ID.","type":"object"}},"errors":[{"$ref":"#/components/errors/InvalidParams"},{"$ref":"#/components/errors/Unauthorized"}],"examples":[{"name":"wallet_getCapabilities example","params":[{"name":"Address","value":"0xd46e8dd67c5d32be8058bb8eb970870f07244567"},{"name":"Chain IDs","value":["0xaa36a7"]}],"result":{"name":"Capabilities","value":{"0xaa36a7":{"atomic":{"status":"ready"}}}}}]},{"name":"eth_requestAccounts","tags":[{"$ref":"#/components/tags/MetaMask"}],"description":"Requests that the user provide access to one or more Ethereum addresses. This method is specified by [EIP-1102](https://eips.ethereum.org/EIPS/eip-1102). Internally, this method calls `wallet_requestPermissions` for permission to call `eth_accounts`.","summary":"Requests that the user provide access to addresses.","params":[],"result":{"name":"Address list","schema":{"type":"array","description":"An array of Ethereum addresses that the user has authorized the dapp to access.","items":{"title":"Address","description":"A hex-encoded address.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}},"errors":[{"$ref":"#/components/errors/UserRejected"}],"examples":[{"name":"eth_requestAccounts example","params":[],"result":{"name":"Address list","value":["0xa77392123a1085f75e62eec7dea7e0e1e5142d5f"]}}]},{"name":"eth_accounts","tags":[{"$ref":"#/components/tags/MetaMask"},{"$ref":"#/components/tags/Restricted"}],"description":"Returns a list of addresses that the user has authorized the dapp to access. This method requires calling `wallet_requestPermissions` for permission. We recommend using `eth_requestAccounts`, which internally calls `wallet_requestPermission`.","summary":"Gets a list of authorized addresses.","params":[],"result":{"name":"Address list","schema":{"type":"array","description":"An array of Ethereum addresses that the user has authorized the dapp to access.","items":{"title":"Address","description":"A hex-encoded address.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}},"examples":[{"name":"eth_accounts example","params":[],"result":{"name":"Address list","value":["0xa77392123a1085f75e62eec7dea7e0e1e5142d5f"]}}]},{"name":"eth_sendTransaction","tags":[{"$ref":"#/components/tags/MetaMask"},{"$ref":"#/components/tags/Restricted"},{"$ref":"#/components/tags/Multichain"}],"description":"Creates a new wallet confirmation to make an Ethereum transaction from the user\'s account. This method requires that the user has granted permission to interact with their account first, so make sure to call `eth_requestAccounts` (recommended) or `wallet_requestPermissions` first.","summary":"Initiates a new transaction.","params":[{"name":"Transaction","required":true,"description":"The transaction object to sign and send.","schema":{"type":"object","title":"Transaction","description":"The parameters to customize a transaction. If a `to` address is not provided, the transaction is assumed to be a contract creation transaction, and the `data` field is used as the contract initialization code. `gasPrice` cannot be used together with `maxPriorityFeePerGas` and `maxFeePerGas`.","required":["from"],"if":{"properties":{"to":{"not":{"type":"string"}}}},"then":{"required":["data"]},"properties":{"to":{"description":"The recipient\'s address.","$ref":"#/components/schemas/address"},"from":{"description":"The sender\'s address.","$ref":"#/components/schemas/address"},"gas":{"description":"The maximum amount of gas the transaction is allowed to use.","$ref":"#/components/schemas/uint"},"value":{"description":"The amount to transfer in wei.","$ref":"#/components/schemas/uint"},"data":{"description":"The data to include in the transaction. Used for contract creation transactions.","$ref":"#/components/schemas/bytes"},"gasPrice":{"description":"The gas price the sender is willing to pay to miners in wei. Used in pre-1559 transactions.","$ref":"#/components/schemas/uint"},"maxPriorityFeePerGas":{"description":"Maximum fee per gas the sender is willing to pay to miners in wei. Used in 1559 transactions.","$ref":"#/components/schemas/uint"},"maxFeePerGas":{"description":"The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei. Used in 1559 transactions.","$ref":"#/components/schemas/uint"}}}}],"result":{"name":"Transaction hash","description":"The transaction hash of the sent transaction.","schema":{"type":"string","pattern":"^0x[0-9a-f]{64}$"}},"errors":[{"code":4100,"message":"The requested account and/or method has not been authorized by the user."}],"examples":[{"name":"sendTransaction","params":[{"name":"Transaction","value":{"to":"0x4B0897b0513FdBeEc7C469D9aF4fA6C0752aBea7","from":"0xDeaDbeefdEAdbeefdEadbEEFdeadbeefDEADbEEF","gas":"0x76c0","value":"0x8ac7230489e80000","data":"0x","gasPrice":"0x4a817c800"}}],"result":{"name":"eth_sendTransactionExampleResult","value":"0x4e306b5a5a37532e1734503f7d2427a86f2c992fbe471f5be403b9f734e667c8"}}]},{"name":"eth_decrypt","tags":[{"$ref":"#/components/tags/MetaMask"},{"$ref":"#/components/tags/Restricted"},{"$ref":"#/components/tags/Deprecated"}],"summary":"Decrypts an encrypted message.","description":"This method is deprecated and may be removed in the future.\\n\\n Requests that MetaMask decrypt the specified encrypted message.\\n The message must have been encrypted using the public encryption key of the specified Ethereum address.\\n Returns a promise that resolves to the decrypted message, or rejects if the decryption attempt fails.","params":[{"name":"EncryptedMessage","required":true,"description":"The encrypted message to decrypt.","schema":{"type":"string"}},{"name":"Address","required":true,"description":"The address of the Ethereum account that can decrypt the message.","schema":{"$ref":"#/components/schemas/address"}}],"result":{"name":"PermissionsList","schema":{"$ref":"#/components/schemas/PermissionsList"}},"errors":[{"code":4100,"message":"The requested account and/or method has not been authorized by the user."}],"examples":[{"name":"decryptExample","params":[{"name":"EncryptedMessage","value":"0x7b2276657273696f6e223a227832353531392d7873616c736132302d706f6c7931333035222c226e6f6e6365223a2243533967507076467071765358704655416679726a7179774e35302b7a747766222c22657068656d5075626c69634b6579223a224372774b61456d2f4b356d6d714239764c376f5872636d6441417757764479324f784c3333527135576e553d222c2263697068657274657874223a2248347a65336e7177572b753174663956343945506167454e343872774f766b6952676244566e47587a38493d227d"},{"name":"Address","value":"0xD1F5279BE4B4dD94133A23deE1B23F5bfC0Db1d0"}],"result":{"name":"eth_decryptExampleResult","value":"Hello, Ethereum!"}}]},{"name":"eth_getEncryptionPublicKey","tags":[{"$ref":"#/components/tags/MetaMask"},{"$ref":"#/components/tags/Restricted"},{"$ref":"#/components/tags/Deprecated"}],"summary":"Gets a public key used for encryption.","description":"This method is deprecated and may be removed in the future.\\n\\n Requests that the user share their public encryption key.\\n Returns a public encryption key, or rejects if the user denies the request.\\n The public key is computed from entropy associated with the specified user account, using the NaCl implementation of the `X25519_XSalsa20_Poly1305` algorithm.","params":[{"name":"Address","required":true,"description":"The address of the Ethereum account that can decrypt the message.","schema":{"$ref":"#/components/schemas/address"}}],"result":{"name":"EncryptionKey","schema":{"type":"string"}},"examples":[{"name":"eth_getEncryptionPublicKey","params":[{"name":"Address","value":"0x4B0897b0513FdBeEc7C469D9aF4fA6C0752aBea7"}],"result":{"name":"eth_getEncryptionPublicKeyExampleResult","value":"0x04bfcab3b7ca7e8b3f3b62b2f7f77e9e4b68080bbf8f0f4a1c8f890864d2c7c1d3c45d8b2e3f5f1c27dfeea4c2f5733e90bfc7484e2a690aa9b8ac4559d2e6a8d7"}}]},{"name":"web3_clientVersion","tags":[{"$ref":"#/components/tags/Ethereum"},{"$ref":"#/components/tags/Multichain"}],"description":"Returns the current MetaMask client version. This differs slightly per client. For example, the browser extension returns a string like `MetaMask/v10.33.1`, while the mobile app returns a string like `MetaMask/8.1.2/Mobile`.","summary":"Current client version.","params":[],"examples":[{"name":"MetaMaskClientVersionExample","description":"Example version response from MetaMask.","params":[],"result":{"name":"MetaMaskClientVersion","description":"The current client version.","value":"MetaMask/v10.33.1"}},{"name":"MetaMaskMobileClientVersionExample","description":"Example version response from MetaMask Mobile.","params":[],"result":{"name":"MetaMaskClientVersion","description":"The current client version.","value":"MetaMask/8.1.2/Mobile"}}],"result":{"name":"CurrentVersion","description":"The current client version.","schema":{"title":"CurrentClientVersion","type":"string"}}},{"name":"eth_subscribe","tags":[{"$ref":"#/components/tags/Ethereum"},{"$ref":"#/components/tags/Multichain"}],"summary":"Subscribes to specific Ethereum events, returning a subscription ID used to receive notifications.","description":"Subscribes to specific events on the Ethereum network, such as new blocks, or logs. When an event occurs, a notification is sent to the client with the corresponding data. To stop receiving notifications, the client can unsubscribe using `eth_unsubscribe`.","params":[{"name":"subscriptionType","required":true,"schema":{"title":"subscriptionType","type":"string","enum":["newHeads","logs"],"description":"The type of subscription to create. Must be one of the following:\\n1. `newHeads` - New block headers.\\n2. `logs` - Logs matching a filter object."}},{"name":"filterOptions","required":false,"schema":{"title":"filterOptions","type":"object","description":"(Optional) An object containing filter options specific to the subscription type. Only applicable for the `logs` subscription type.","required":["topics"],"properties":{"address":{"type":"string","description":"(Optional) A single address or an array of addresses to filter the logs by."},"topics":{"type":"array","description":"An array of topics to filter the logs by.","items":{"type":"string"}}}}}],"result":{"name":"subscriptionId","schema":{"type":"string"},"description":"A unique subscription ID that can be used to unsubscribe or identify incoming notifications."},"examples":[{"name":"eth_subscribe example","params":[{"name":"subscriptionType","value":"newHeads"}],"result":{"name":"eth_subscribeExampleResult","value":"0x1b84f2cdf29a204b79e450c1939b30c1"}}]},{"name":"eth_unsubscribe","tags":[{"$ref":"#/components/tags/Ethereum"},{"$ref":"#/components/tags/Multichain"}],"summary":"Unsubscribes from a specific Ethereum event, using the subscription ID provided by `eth_subscribe`.","description":"Unsubscribes from specific events on the Ethereum network, to which the client has been previously subscribed using `eth_subscribe`. The client must provide the subscription ID obtained from `eth_subscribe` to stop receiving notifications for the corresponding event.","params":[{"name":"subscriptionId","required":true,"schema":{"type":"string","description":"The unique subscription ID obtained from `eth_subscribe`, used to identify the subscription to be unsubscribed."}}],"result":{"name":"unsubscribed","schema":{"type":"boolean"},"description":"A boolean value indicating whether the unsubscription was successful."},"examples":[{"name":"eth_unsubscribe example","params":[{"name":"subscriptionId","value":"0x1b84f2cdf29a204b79e450c1939b30c1"}],"result":{"name":"eth_unsubscribeExampleResult","value":true}}]},{"name":"eth_blockNumber","summary":"Returns the number of most recent block.","params":[],"result":{"name":"Block number","schema":{"$ref":"#/components/schemas/uint"}},"examples":[{"name":"eth_blockNumber example","params":[],"result":{"name":"Block number","value":"0x2377"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_call","summary":"Executes a new message call immediately without creating a transaction on the block chain.","params":[{"name":"Transaction","required":true,"schema":{"$ref":"#/components/schemas/GenericTransaction"}},{"name":"Block","required":false,"schema":{"$ref":"#/components/schemas/BlockNumberOrTagOrHash"}}],"result":{"name":"Return data","schema":{"$ref":"#/components/schemas/bytes"}},"examples":[{"name":"eth_call example","params":[{"name":"Transaction","value":{"to":"0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13","value":"0x1"}},{"name":"Block","value":"latest"}],"result":{"name":"Return data","value":"0x"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_chainId","summary":"Returns the chain ID of the current network.","params":[],"result":{"name":"Chain ID","schema":{"$ref":"#/components/schemas/uint"}},"examples":[{"name":"eth_chainId example","params":[],"result":{"name":"Chain ID","value":"0x1"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_coinbase","summary":"Returns the client coinbase address.","params":[],"result":{"name":"Coinbase address","schema":{"$ref":"#/components/schemas/address"}},"examples":[{"name":"eth_coinbase example","params":[],"result":{"name":"Coinbase address","value":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_estimateGas","summary":"Generates and returns an estimate of how much gas is necessary to allow the transaction to complete.","params":[{"name":"Transaction","required":true,"schema":{"$ref":"#/components/schemas/GenericTransaction"}},{"name":"Block","required":false,"schema":{"$ref":"#/components/schemas/BlockNumberOrTag"}}],"result":{"name":"Gas used","schema":{"$ref":"#/components/schemas/uint"}},"examples":[{"name":"eth_estimateGas example","params":[{"name":"Transaction","value":{"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","to":"0x44aa93095d6749a706051658b970b941c72c1d53","value":"0x1"}}],"result":{"name":"Gas used","value":"0x5208"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_feeHistory","summary":"Transaction fee history","description":"Returns transaction base fee per gas and effective priority fee per gas for the requested/supported block range.","params":[{"name":"blockCount","description":"Requested range of blocks. Clients will return less than the requested range if not all blocks are available.","required":true,"schema":{"$ref":"#/components/schemas/uint"}},{"name":"newestBlock","description":"Highest block of the requested range.","required":true,"schema":{"$ref":"#/components/schemas/BlockNumberOrTag"}},{"name":"rewardPercentiles","description":"A monotonically increasing list of percentile values. For each block in the requested range, the transactions will be sorted in ascending order by effective tip per gas and the coresponding effective tip for the percentile will be determined, accounting for gas consumed.","required":true,"schema":{"title":"rewardPercentiles","type":"array","items":{"title":"rewardPercentile","description":"Floating point value between 0 and 100.","type":"number"}}}],"result":{"name":"Fee history result","description":"Fee history for the returned block range. This can be a subsection of the requested range if not all blocks are available.","schema":{"title":"feeHistoryResults","description":"Fee history results.","type":"object","required":["oldestBlock","baseFeePerGas","gasUsedRatio"],"additionalProperties":false,"properties":{"oldestBlock":{"title":"oldestBlock","description":"Lowest number block of returned range.","$ref":"#/components/schemas/uint"},"baseFeePerGas":{"title":"baseFeePerGasArray","description":"An array of block base fees per gas. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-1559 blocks.","type":"array","items":{"$ref":"#/components/schemas/uint"}},"baseFeePerBlobGas":{"title":"baseFeePerBlobGasArray","description":"An array of block base fees per blob gas. This includes the next block after the newest of the returned range, because this value can be derived from the newest block. Zeroes are returned for pre-EIP-4844 blocks.","type":"array","items":{"$ref":"#/components/schemas/uint"}},"gasUsedRatio":{"title":"gasUsedRatio","description":"An array of block gas used ratios. These are calculated as the ratio of gasUsed and gasLimit.","type":"array","items":{"$ref":"#/components/schemas/ratio"}},"blobGasUsedRatio":{"title":"blobGasUsedRatio","description":"An array of block blob gas used ratios. These are calculated as the ratio of blobGasUsed and the max blob gas per block.","type":"array","items":{"$ref":"#/components/schemas/ratio"}},"reward":{"title":"rewardArray","description":"A two-dimensional array of effective priority fees per gas at the requested block percentiles.","type":"array","items":{"title":"rewardPercentile","description":"An array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty.","type":"array","items":{"title":"rewardPercentile","description":"A given percentile sample of effective priority fees per gas from a single block in ascending order, weighted by gas used. Zeroes are returned if the block is empty.","$ref":"#/components/schemas/uint"}}}}}},"examples":[{"name":"eth_feeHistory example","params":[{"name":"blockCount","value":"0x5"},{"name":"newestblock","value":"latest"},{"name":"rewardPercentiles","value":[20,30]}],"result":{"name":"Fee history result","value":{"oldestblock":"0x10b52f","baseFeePerGas":["0x3fa63a3f","0x37f999ee","0x3e36f20a","0x4099f79a","0x430d532d","0x46fcd4a4"],"baseFeePerBlobGas":["0x7b7609c19","0x6dbe41789","0x7223341d4","0x6574a002c","0x7223341d4","0x6574a002c"],"gasUsedRatio":[0.017712333333333333,0.9458865666666667,0.6534561,0.6517375666666667,0.7347769666666667],"blobGasUsedRatio":[0,0.6666666666666666,0,1,0],"reward":[["0x3b9aca00","0x59682f00"],["0x3a13012","0x3a13012"],["0x3a13012","0x3a13012"],["0xf4240","0xf4240"],["0xf4240","0xf4240"]]}}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_gasPrice","summary":"Returns the current price per gas in wei.","params":[],"result":{"name":"Gas price","schema":{"title":"Gas price","$ref":"#/components/schemas/uint"}},"examples":[{"name":"eth_gasPrice example","params":[],"result":{"name":"Gas price","value":"0x3e8"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getBalance","summary":"Returns the balance of the account of given address.","params":[{"name":"Address","required":true,"schema":{"$ref":"#/components/schemas/address"}},{"name":"Block","required":true,"schema":{"$ref":"#/components/schemas/BlockNumberOrTagOrHash"}}],"result":{"name":"Balance","schema":{"$ref":"#/components/schemas/uint"}},"examples":[{"name":"eth_getBalance example","params":[{"name":"Address","value":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"},{"name":"Block","value":"latest"}],"result":{"name":"Balance","value":"0x1cfe56f3795885980000"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getBlockByHash","summary":"Returns information about a block by hash.","params":[{"name":"Block hash","required":true,"schema":{"$ref":"#/components/schemas/hash32"}},{"name":"Hydrated transactions","required":true,"schema":{"title":"hydrated","type":"boolean"}}],"result":{"name":"Block information","schema":{"oneOf":[{"$ref":"#/components/schemas/notFound"},{"$ref":"#/components/schemas/Block"}]}},"examples":[{"name":"eth_getBlockByHash example","params":[{"name":"Block hash","value":"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c"},{"name":"Hydrated transactions","value":false}],"result":{"name":"Block information","value":{"number":"0x68b3","hash":"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c","mixHash":"0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d","parentHash":"0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d","nonce":"0x378da40ff335b070","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","logsBloom":"0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000","transactionsRoot":"0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126","stateRoot":"0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233","receiptsRoot":"0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a","miner":"0xb42b6c4a95406c78ff892d270ad20b22642e102d","difficulty":"0x66e619a","totalDifficulty":"0x1e875d746ae","extraData":"0xd583010502846765746885676f312e37856c696e7578","size":"0x334","gasLimit":"0x47e7c4","gasUsed":"0x37993","timestamp":"0x5835c54d","uncles":[],"transactions":["0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc","0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"],"baseFeePerGas":"0x7","withdrawalsRoot":"0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f","withdrawals":[{"index":"0x0","validatorIndex":"0x9d8c0","address":"0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f","amount":"0x11a33e3760"}],"blobGasUsed":"0x0","excessBlobGas":"0x0","parentBeaconBlockRoot":"0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"}}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getBlockByNumber","summary":"Returns information about a block by number.","params":[{"name":"Block","required":true,"schema":{"$ref":"#/components/schemas/BlockNumberOrTag"}},{"name":"Hydrated transactions","required":true,"schema":{"title":"hydrated","type":"boolean"}}],"result":{"name":"Block information","schema":{"oneOf":[{"$ref":"#/components/schemas/notFound"},{"$ref":"#/components/schemas/Block"}]}},"examples":[{"name":"eth_getBlockByNumber example","params":[{"name":"block","value":"0x68b3"},{"name":"Hydrated transactions","value":false}],"result":{"name":"Block information","value":{"number":"0x68b3","hash":"0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c","mixHash":"0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d","parentHash":"0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d","nonce":"0x378da40ff335b070","sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347","logsBloom":"0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000","transactionsRoot":"0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126","stateRoot":"0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233","receiptsRoot":"0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a","miner":"0xb42b6c4a95406c78ff892d270ad20b22642e102d","difficulty":"0x66e619a","totalDifficulty":"0x1e875d746ae","extraData":"0xd583010502846765746885676f312e37856c696e7578","size":"0x334","gasLimit":"0x47e7c4","gasUsed":"0x37993","timestamp":"0x5835c54d","uncles":[],"transactions":["0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc","0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"],"baseFeePerGas":"0x7","withdrawalsRoot":"0x7a4ecf19774d15cf9c15adf0dd8e8a250c128b26c9e2ab2a08d6c9c8ffbd104f","withdrawals":[{"index":"0x0","validatorIndex":"0x9d8c0","address":"0xb9d7934878b5fb9610b3fe8a5e441e8fad7e293f","amount":"0x11a33e3760"}],"blobGasUsed":"0x0","excessBlobGas":"0x0","parentBeaconBlockRoot":"0x95c4dbd5b19f6fe3cbc3183be85ff4e85ebe75c5b4fc911f1c91e5b7a554a685"}}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getBlockTransactionCountByHash","summary":"Returns the number of transactions in a block from a block matching the given block hash.","params":[{"name":"Block hash","schema":{"$ref":"#/components/schemas/hash32"}}],"result":{"name":"Transaction count","schema":{"oneOf":[{"$ref":"#/components/schemas/notFound"},{"title":"Transaction count","$ref":"#/components/schemas/uint"}]}},"examples":[{"name":"eth_getBlockTransactionCountByHash example","params":[{"name":"Block hash","value":"0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"}],"result":{"name":"Transaction count","value":"0x8"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getBlockTransactionCountByNumber","summary":"Returns the number of transactions in a block matching the given block number.","params":[{"name":"Block","schema":{"$ref":"#/components/schemas/BlockNumberOrTag"}}],"result":{"name":"Transaction count","schema":{"oneOf":[{"$ref":"#/components/schemas/notFound"},{"title":"Transaction count","$ref":"#/components/schemas/uint"}]}},"examples":[{"name":"eth_getBlockTransactionCountByNumber example","params":[{"name":"Block","value":"0xe8"}],"result":{"name":"Transaction count","value":"0x8"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getCode","summary":"Returns code at a given address.","params":[{"name":"Address","required":true,"schema":{"$ref":"#/components/schemas/address"}},{"name":"Block","required":true,"schema":{"$ref":"#/components/schemas/BlockNumberOrTagOrHash"}}],"result":{"name":"Bytecode","schema":{"$ref":"#/components/schemas/bytes"}},"examples":[{"name":"eth_getCode example","params":[{"name":"Address","value":"0xa50a51c09a5c451c52bb714527e1974b686d8e77"},{"name":"Block","value":"latest"}],"result":{"name":"Bytecode","value":"0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getFilterChanges","summary":"Polling method for the filter with the given ID (created using `eth_newFilter`). Returns an array of logs which occurred since last poll.","params":[{"name":"Filter identifier","schema":{"$ref":"#/components/schemas/uint"}}],"result":{"name":"Log objects","schema":{"$ref":"#/components/schemas/FilterResults"}},"examples":[{"name":"eth_getFilterChanges example","params":[{"name":"Filter identifier","value":"0x01"}],"result":{"name":"Log objects","value":[{"logIndex":"0x0","removed":false,"blockNumber":"0x233","blockHash":"0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5","transactionHash":"0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d","transactionIndex":"0x0","address":"0x42699a7612a82f1d9c36148af9c77354759b210b","data":"0x0000000000000000000000000000000000000000000000000000000000000004","topics":["0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"]},{"logIndex":"0x0","removed":false,"blockNumber":"0x238","blockHash":"0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed","transactionHash":"0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058","transactionIndex":"0x0","address":"0x42699a7612a82f1d9c36148af9c77354759b210b","data":"0x0000000000000000000000000000000000000000000000000000000000000007","topics":["0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"]}]}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getFilterLogs","summary":"Returns an array of all logs matching the filter with the given ID (created using `eth_newFilter`).","params":[{"name":"Filter identifier","schema":{"$ref":"#/components/schemas/uint"}}],"result":{"name":"Log objects","schema":{"$ref":"#/components/schemas/FilterResults"}},"examples":[{"name":"eth_getFilterLogs example","params":[{"name":"Filter identifier","value":"0x01"}],"result":{"name":"Log objects","value":[{"logIndex":"0x0","removed":false,"blockNumber":"0x233","blockHash":"0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5","transactionHash":"0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d","transactionIndex":"0x0","address":"0x42699a7612a82f1d9c36148af9c77354759b210b","data":"0x0000000000000000000000000000000000000000000000000000000000000004","topics":["0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"]},{"logIndex":"0x0","removed":false,"blockNumber":"0x238","blockHash":"0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed","transactionHash":"0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058","transactionIndex":"0x0","address":"0x42699a7612a82f1d9c36148af9c77354759b210b","data":"0x0000000000000000000000000000000000000000000000000000000000000007","topics":["0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"]}]}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getLogs","summary":"Returns an array of all logs matching the specified filter.","params":[{"name":"Filter","schema":{"$ref":"#/components/schemas/Filter"}}],"result":{"name":"Log objects","schema":{"$ref":"#/components/schemas/FilterResults"}},"examples":[{"name":"eth_getLogs example","params":[{"name":"Filter","value":{"fromBlock":"0x137d3c2","toBlock":"0x137d3c3","address":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","topics":[]}}],"result":{"name":"Log objects","value":[{"logIndex":"0x0","removed":false,"blockNumber":"0x233","blockHash":"0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5","transactionHash":"0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d","transactionIndex":"0x0","address":"0x42699a7612a82f1d9c36148af9c77354759b210b","data":"0x0000000000000000000000000000000000000000000000000000000000000004","topics":["0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"]},{"logIndex":"0x0","removed":false,"blockNumber":"0x238","blockHash":"0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed","transactionHash":"0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058","transactionIndex":"0x0","address":"0x42699a7612a82f1d9c36148af9c77354759b210b","data":"0x0000000000000000000000000000000000000000000000000000000000000007","topics":["0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"]}]}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getProof","summary":"Returns the merkle proof for a given account and optionally some storage keys.","params":[{"name":"Address","required":true,"schema":{"$ref":"#/components/schemas/address"}},{"name":"StorageKeys","required":true,"schema":{"title":"Storage keys","type":"array","items":{"$ref":"#/components/schemas/bytesMax32"}}},{"name":"Block","required":true,"schema":{"$ref":"#/components/schemas/BlockNumberOrTagOrHash"}}],"result":{"name":"Account","schema":{"$ref":"#/components/schemas/AccountProof"}},"examples":[{"name":"eth_getProof example","params":[{"name":"Address","value":"0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8"},{"name":"StorageKeys","value":["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","0x283s34c8e2b1456f09832c71e5d6a0b4f8c9e1d3a2b5c7f0e6d4a8b2c1f3e5d7"]},{"name":"Block","value":"latest"}],"result":{"name":"Account","value":{"accountProof":["0xf90211a06a718c2c9da77c253b12d7b2569657901e37bb691718f5dda1b86157ab1dd5eda0e7f19ed5e21bccc8d3260236b24f80ad88b3634f5d005f37b838881f0e12f1bda0abb301291704e4d92686c0f5f8ebb1734185321559b8d717ffdca95c99591976a0d0c2026bfab65c3b95276bfa82af9dec860b485f8857f293c148d63a2182128fa0c98044ec9a1273a218bed58b478277dd39173ad7b8edb95c200423a6bc8fc25fa056e5a55d9ddccdbf49362857200bbb1f042d61187c9f5f9ddcff5d2f1fc984a2a02a5b7200af424114f99a4b5f0a21c19aac82209e431ed80bfde177adb1004bdfa0026e4374f0518ff44a80fa374838ecb86cc64ac93bb710fea6dff4198f947b27a03fea341d87984673ad523177ed52f278bf4d8f97e6531c8ece932aeede4802f4a0bfe2f4a7fcb78f7e9f080dea7b6977fb1d88c441696e4456dad92b9d34ff0f43a02a3eb5c0edb14626c9c629601027bd60178bb2b688a67cea4d179fc432436615a0747355b8e02f3b884b4ffe5cea1619e32515fea064cca98208591af8c744e894a0874253737bae37f020ad3bb7e3292c7c4a63cdc158af6b33aaa4deaef016dccba03d8192bc1fc6aa1548912e763a0b5013a94399cefad7b47cf388873b2b794068a09b67f9737c6028d796bfd1c5da57a6f45824dc891f848ea0e1f8019d1fb5fba8a0aa871f9de8da85960fcd8a22cdf21c27f11e3966c14a6737ffd414b98dda00b280","0xf90211a0d360be1e1da1a0c32bc4c105833bd531e59d110684007b7c50fb2709002973eca0cf6dd1e350a7031b4e2ab49c899fd8bd47551c8565d8fd8d1d7796c83820c3b1a0eb0a88c29bb33989a589156f7bf07d9efc74034dd9d3f5b73385c3b45c3249bea02783c25f97a6ddb8dc07adf4b176991836d39184b1f678adeda832fff15e3664a00a4e288060045e587774d8a64993a7add73068b16863145e1e8eeb4602e18e19a0340851f4046ad1298962d6e47d05c66329549c839c158748aaad7ae00b943aefa085b127bc2a3bd17604283de21b2b3c9aa8f1d4b7b85c94d8105a46fe32c77688a00f531d62b3c5435324c01009c284fe31277e8d38302b75ea01be89f09e205969a00011c8351c0e3d639ac54b9d3a59de630b16a67de8270d7d6064d0a67e93f9cca048780d32b7f2db88650b51c46f46fd0a68795edee1fd5ecee6eb3595741d9669a0c91afd74eaf8e08a997061a62b354e2516fdc494e8e26cc50ceeb8f4a175608ba0e2c07f1b48fab80eecb340f5882e8c7b32ee416e4045c61f1df646a133487303a01a1eff78435a7a29a29463bdc3486ae81364b00bea82ba0fdf67a110770f2261a04f2eb440ba71c72da5fd7f0e439018d6671dc809f747213a1ea755848124e994a074ff9f37fce99daa3ed01dd763076450022996fc729be2cc43c61ec5182c2366a0b80b36b7b621112592f52390b89748d422e9b1517c4b0203b8176a53f89d4a6680","0xf90211a0b25f283bd01a8c8b2418049f9585bc37ff2c1e2e12eab4b7f64ae1f26647389aa02ad96c150d7c3c9c194d30315456852cf6a0a940e0191ae5d04007454823d4e9a0b220cf7a855e2dbcc0b973134e2e119b982d7d40dbb1b27d99816c41f40e829aa049224431da84cbf1b7ae813abcc9ef4c1dfc1760f6ddc5d57f7354bf3cbf6cc4a015191f879ac115b362f0257fd3eedb789537e836574a5b1abf1c9982ebe3bdfea07913c1b6e7282569d2d421e9fa2257f5d1698e93303bc49b941704287d7aaefea0a526576981ce6fd9f2bd48dd2ca6d5272f2fbdc85f0ee35a295f6ccd97ae8765a0313fad407f0c737c29024c02a890c4ecc12d7771c05ab7b435e5087a7cdef4d9a0d2044603cba9d4afdaf6fd2470e729ef3a65242de71276f20d59accfa6b53a7ca0457caacb9370c09b15f7d904adefd2308be94e23669ba5f43241ffff5f438a0aa09fb2dd45a383a0cc088a72b14117e1e9b7d6889218f3ac7631e8de644c5cb76da0c675dcd4d3fb692b514851c6106e2b09e6f5661d56a0a32ae02e2efc1515c235a074949a59ff1bdba87548510d6e404ec4532f4456dfdec8e753d92fda11a3088ba0a328c6ab1ab8f70db4d23e95bb163c13ba0c508f063a5b1393a4efd7ff375f05a0c722fe3ce796998269373cbb2fc229b2bdf2c43c6c2df003309422e043ce6c03a024e69343286eec44fa4744f6907209116e5383cff3fa98fe81ba06e7e8d4366680","0xf90211a00e99ba2198124b8241ea304551fe973215829e2fbc0438d67922707a2a847432a0bb9ce24fd527879c5fe6dbbec1ef5a05ed9d1ca88e921d140bafbec1112f6a6aa099787fd6c7a1989229c4291ef5267335e66152ce417daea46e66d19cb6f81d1ca0e430ff4b8d5621baa5978673344e78b4d8b4df51431b6e63785267c98a24ce18a0bb3e91a825fe3d42ed270a93e9ad1aabd566c40cb28e622f7f1d7ee967c8afd6a0aa364b0056870c6507bc3262a5f851ecb13684088bdb13996d3cb2db401ce3ffa0a3732eba4c7a6e062665ab5be08acb986c3db87556fb138548cc900ff1e56995a026b088e90c9738b8ce16e853107a937a50d52726a24f9f6ce60f587762eb45a2a006c9d5bc3c064b5c1fb565bff91cace9161c64ae653a329610c1dcf34d434429a06c16df2edc70656d322d0c2403bad7d45bc790ffc3e7adeef856d98ea6afc91ba0ae05ed5d6c34b5da29c2e94d7880aeba0906f95f4ec10b132a1d4766a0701c98a01470a86aa350d1ada0c082eac75de828a851f9c8c7c4aa49b1556fe3a5574966a0334eef025100a6da1033710dd98e0475f29d3d7e397caf618ca71c336c5f4f49a0ef0b3abbebcff34d6a8a8f5cdbfbd154ab3452b58dcb09de58ec983644963675a041857e865ec38e200a13bc1a3cb71c7d69aeef7ffdee8be515c9a5b691ce091fa059edd0eb3bbec36bbf38a19802d4646c00ba821ab55fdeea12e15bab62c4e1e580","0xf90211a0af0c7fa65ffcb84c31e68c1cf00e1a20bf8bb497c39883e19b66a99975b03431a0c492cab3623eb7926069794c3c718733e16c5fd0d4a13fb7c752ee9809aac7ada05003cea7132aa70d6f36731d60640a90bcd8f4fd493e4540d5ab1b4943679c0ca0fd700683405b1d2306b586dd3b5b2f92f1692fae20d17cd8b8e59d09b9c6670da01db8683910e46e56e8afeb9fe2b7c35382e5a0914d7b0dd8f0e8cb9981ba7435a0fa7f75d73aa73c35824387bec81388315caa4aee3f4f5562f971beb256c62d49a0ee478e420d83f413e8568dacfd5d83f83a5dd7c45f494b504828e5dc962f0e3ea094b95444a917ac94a675681f6bf851172ad0969801a783a63a71edafed45e7a7a0a0c46586e109abe80fe50361dd582e3f143cb416828239faa43bb2b890869501a0ae051d5d43634c68bf9c97823256cc68580f194dfdbd0c301140c7ca5853430ca0660b9365bb77ec9cdc6eb95516c162dca20727c6f828dbbeb1ae110dde4d3134a09feb1b75e84ff6722e4d837bfb6d207b6ee3b21b86844a01140ce293813b49a1a0ed58a70b04efa3bdc0babe2abfa20824a75d61d52291bfdb5cf08597800764d6a020a2d5d3a83f9e35ad9fd1c448626d90af0eb3efefaa4f2f93207b4096ef5507a0fc8efc4484dcf0a54f0574de9aaade0dcff6ec3599edb9f82efb26b6566dcaeaa032f7e79856db3fd984f72bb2c93d4dab328198d355a61c975fab1f08bdb2046580"],"balance":"0x0","codeHash":"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470","nonce":"0x0","storageHash":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","storageProof":[{"key":"0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421","proof":["0xf90211a0c87222cccea2bf32759fcee9dbaacbe3ea4165dd6184af6773651c5e00e34a8ba0be90e6e5d1a67ab5587779c60ac136d6a96db62b84c04998a5f03a367346abd6a05344aa1c9ca2e3e56bf98fd718ec43728578d148e1967fbaf8bf17a2a073a0bda011a2f9312c3308640a0d6ceeae218747290f23806067456da1d444c65abae437a0b3097a108bfce79af6699da4ae3003cd4929f0b4576aad655c31cb725bde84c7a0c133d3c637e174f36a73c22b1039eb003da6374bc0929321241badb3efa3c4a9a0f13059f2301ad9862ce02e3f7f3f2c9ab78eb30583764d73654f7f1f8b1e86fda06544e3915748b18204e09df75ff20d2fa6bd8121e2e669699012d54590383d6fa070e3a8e093691581d58fadb560b510262a758037632cd8670d3a36df828976b7a062a88a2900544dc76a32255a6b2b2a2eef8fa68279700c00adc7508286702552a0a474aeebd5603dfce46a6ecd1ecd519068dc034a544fde03ac42d4018e60a334a0b7d528fc41c8fdc8ea18c6e7d0099270c777ec1403cf879d1f5134bdc12a6c6ca04440f1242e42c5bfa7c536591ab89c8e84bea417435871c32eef1e25295b20daa06a5dcfe3cc84cff9d3e3c3ae868cfba8f0dd111a90c3f85869dab5b893f96643a026b2fb9dd7d08b0ed2f1c44fbf875011412a384f86f751c92e1013248d4aa371a0c75597b2b789fc4e939b71937390ce9d7d53159431328ac52180eef08ef200f280","0xf90191a0f0c5b800b542001597f2b7a8e106ac0e2849d2cc1df1727ac35c4ea3965f1c9180a08537f2e248702a6ae2a57e9110a5740f5772c876389739ac90debd6a0692713ea00b3a26a05b5494fb3ff6f0b3897688a5581066b20b07ebab9252d169d928717fa0a9a54d84976d134d6dba06a65064c7f3a964a75947d452db6f6bb4b6c47b43aaa01e2a1ed3d1572b872bbf09ee44d2ed737da31f01de3c0f4b4e1f046740066461a076f251d160b9a02eb0b5c1d83b61c9cdd4f37361705e79a45529bf49801fb824a0774a01a624cb14a50d17f2fe4b7ae6af8a67bbb029177ccc3dd729a734484d3ea05921b8a19aebe4fff5a36071e311778f9b93459183fdf7f6d870b401fa25dcbba0c8d71dd13d2806e2865a5c2cfa447f626471bf0b66182a8fd07230434e1cad2680a0e9864fdfaf3693b2602f56cd938ccd494b8634b1f91800ef02203a3609ca4c21a0c69d174ad6b6e58b0bd05914352839ec60915cd066dd2bee2a48016139687f21a0513dd5514fd6bad56871711441d38de2821cc6913cb192416b0385f025650731808080"],"value":"0x1"}]}}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getStorageAt","summary":"Returns the value from a storage position at a given address.","params":[{"name":"Address","required":true,"schema":{"$ref":"#/components/schemas/address"}},{"name":"Storage slot","required":true,"schema":{"$ref":"#/components/schemas/uint256"}},{"name":"Block","required":true,"schema":{"$ref":"#/components/schemas/BlockNumberOrTagOrHash"}}],"result":{"name":"Value","schema":{"$ref":"#/components/schemas/bytes"}},"examples":[{"name":"eth_getStorageAt example","params":[{"name":"Address","value":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"},{"name":"Storage slot","value":"0x0"},{"name":"Block","value":"latest"}],"result":{"name":"Value","value":"0x0000000000000000000000000000000000000000000000000000000000000000"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getTransactionByBlockHashAndIndex","summary":"Returns information about a transaction by block hash and transaction index position.","params":[{"name":"Block hash","required":true,"schema":{"$ref":"#/components/schemas/hash32"}},{"name":"Transaction index","required":true,"schema":{"$ref":"#/components/schemas/uint"}}],"result":{"name":"Transaction information","schema":{"oneOf":[{"$ref":"#/components/schemas/notFound"},{"$ref":"#/components/schemas/TransactionInfo"}]}},"examples":[{"name":"eth_getTransactionByBlockHashAndIndex example","params":[{"name":"Block hash","value":"0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7"},{"name":"Transaction index","value":"0x2"}],"result":{"name":"Transaction information","value":{"blockHash":"0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda","blockNumber":"0x422","chainId":2018,"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","gas":"0x5208","gasPrice":"0x3b9aca00","hash":"0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44","input":"0x","nonce":"0x1","to":"0x627306090abab3a6e1400e9345bc60c78a8bef57","transactionIndex":"0x0","value":"0x4e1003b28d9280000","v":"0xfe7","r":"0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3","s":"0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"}}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getTransactionByBlockNumberAndIndex","summary":"Returns information about a transaction by block number and transaction index position.","params":[{"name":"Block","required":true,"schema":{"$ref":"#/components/schemas/BlockNumberOrTag"}},{"name":"Transaction index","required":true,"schema":{"$ref":"#/components/schemas/uint"}}],"result":{"name":"Transaction information","schema":{"oneOf":[{"$ref":"#/components/schemas/notFound"},{"$ref":"#/components/schemas/TransactionInfo"}]}},"examples":[{"name":"eth_getTransactionByBlockNumberAndIndex example","params":[{"name":"Block","value":"0x1442e"},{"name":"Transaction index","value":"0x2"}],"result":{"name":"Transaction information","value":{"blockHash":"0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda","blockNumber":"0x422","chainId":2018,"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","gas":"0x5208","gasPrice":"0x3b9aca00","hash":"0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44","input":"0x","nonce":"0x1","to":"0x627306090abab3a6e1400e9345bc60c78a8bef57","transactionIndex":"0x0","value":"0x4e1003b28d9280000","v":"0xfe7","r":"0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3","s":"0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"}}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getTransactionByHash","summary":"Returns the information about a transaction requested by transaction hash.","params":[{"name":"Transaction hash","required":true,"schema":{"$ref":"#/components/schemas/hash32"}}],"result":{"name":"Transaction information","schema":{"oneOf":[{"$ref":"#/components/schemas/notFound"},{"$ref":"#/components/schemas/TransactionInfo"}]}},"examples":[{"name":"eth_getTransactionByHash example","params":[{"name":"Transaction hash","value":"0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"}],"result":{"name":"Transaction information","value":{"blockHash":"0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda","blockNumber":"0x422","chainId":2018,"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","gas":"0x5208","gasPrice":"0x3b9aca00","hash":"0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44","input":"0x","nonce":"0x1","to":"0x627306090abab3a6e1400e9345bc60c78a8bef57","transactionIndex":"0x0","value":"0x4e1003b28d9280000","v":"0xfe7","r":"0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3","s":"0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"}}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getTransactionCount","summary":"Returns the number of transactions sent from an address.","params":[{"name":"Address","required":true,"schema":{"$ref":"#/components/schemas/address"}},{"name":"Block","required":true,"schema":{"$ref":"#/components/schemas/BlockNumberOrTagOrHash"}}],"result":{"name":"Transaction count","schema":{"$ref":"#/components/schemas/uint"}},"examples":[{"name":"eth_getTransactionCount example","params":[{"name":"Address","value":"0xc94770007dda54cF92009BFF0dE90c06F603a09f"},{"name":"Block","value":"latest"}],"result":{"name":"Transaction count","value":"0x1"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getTransactionReceipt","summary":"Returns the receipt of a transaction by transaction hash.","params":[{"name":"Transaction hash","required":true,"schema":{"$ref":"#/components/schemas/hash32"}}],"result":{"name":"Receipt information","schema":{"oneOf":[{"$ref":"#/components/schemas/notFound"},{"$ref":"#/components/schemas/ReceiptInfo"}]}},"examples":[{"name":"eth_getTransactionReceipt example","params":[{"name":"Transaction hash","value":"0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"}],"result":{"name":"Receipt information","value":{"blockHash":"0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a","blockNumber":"0x50","contractAddress":null,"cumulativeGasUsed":"0x5208","from":"0x627306090abab3a6e1400e9345bc60c78a8bef57","gasUsed":"0x5208","blobGasUsed":"0x20000","effectiveGasPrice":"0x1","blobGasPrice":"0x3","logs":[],"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","status":"0x1","to":"0xf17f52151ebef6c7334fad080c5704d77216b732","transactionHash":"0xc00e97af59c6f88de163306935f7682af1a34c67245e414537d02e422815efc3","transactionIndex":"0x0"}}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getUncleCountByBlockHash","summary":"Returns the number of uncles in a block from a block matching the given block hash.","params":[{"name":"Block hash","schema":{"$ref":"#/components/schemas/hash32"}}],"result":{"name":"Uncle count","schema":{"oneOf":[{"$ref":"#/components/schemas/notFound"},{"title":"Uncle count","$ref":"#/components/schemas/uint"}]}},"examples":[{"name":"eth_getUncleCountByBlockHash example","params":[{"name":"Block hash","value":"0xb3b20624f8f0f86eb50dd04688409e5cea4bd02d700bf6e79e9384d47d6a5a35"}],"result":{"name":"Uncle count","value":"0x1"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_getUncleCountByBlockNumber","summary":"Returns the number of transactions in a block matching the given block number.","params":[{"name":"Block","schema":{"$ref":"#/components/schemas/BlockNumberOrTag"}}],"result":{"name":"Uncle count","schema":{"oneOf":[{"$ref":"#/components/schemas/notFound"},{"title":"Uncle count","$ref":"#/components/schemas/uint"}]}},"examples":[{"name":"eth_getUncleCountByBlockNumber example","params":[{"name":"Block","value":"0xe8"}],"result":{"name":"Uncle count","value":"0x1"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_newBlockFilter","summary":"Creates a filter in the node, to notify when a new block arrives.","params":[],"result":{"name":"Filter identifier","schema":{"$ref":"#/components/schemas/uint"}},"examples":[{"name":"eth_newBlockFilter example","params":[],"result":{"name":"Filter identifier","value":"0x01"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_newFilter","summary":"Creates a filter object, based on filter options, to notify when the state changes (logs).","params":[{"name":"Filter","schema":{"$ref":"#/components/schemas/Filter"}}],"result":{"name":"Filter identifier","schema":{"$ref":"#/components/schemas/uint"}},"examples":[{"name":"eth_newFilter example","params":[{"name":"Filter","value":{"fromBlock":"0x137d3c2","toBlock":"0x137d3c3","address":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","topics":[]}}],"result":{"name":"Filter identifier","value":"0x01"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_newPendingTransactionFilter","summary":"Creates a filter in the node, to notify when new pending transactions arrive.","params":[],"result":{"name":"Filter identifier","schema":{"$ref":"#/components/schemas/uint"}},"examples":[{"name":"eth_newPendingTransactionFilter example","params":[],"result":{"name":"Filter identifier","value":"0x01"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_sendRawTransaction","summary":"Submits a raw transaction. You can create and sign a transaction externally using a library such as [web3.js](https://web3js.readthedocs.io/) or [ethers.js](https://docs.ethers.org/). For [EIP-4844](https://eips.ethereum.org/EIPS/eip-4844) transactions, the raw form must be the network form. This means it includes the blobs, KZG commitments, and KZG proofs.","params":[{"name":"Transaction","required":true,"schema":{"$ref":"#/components/schemas/bytes"}}],"result":{"name":"Transaction hash","schema":{"$ref":"#/components/schemas/hash32"}},"examples":[{"name":"eth_sendRawTransaction example","params":[{"name":"Transaction","value":"0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"}],"result":{"name":"Transaction hash","value":"0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_syncing","summary":"Returns an object with data about the sync status or false.","params":[],"result":{"name":"Syncing status","schema":{"$ref":"#/components/schemas/SyncingStatus"}},"examples":[{"name":"eth_syncing example","params":[],"result":{"name":"Syncing status","value":{"startingBlock":"0x0","currentBlock":"0x1518","highestBlock":"0x9567a3"}}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]},{"name":"eth_uninstallFilter","summary":"Uninstalls a filter with given id.","params":[{"name":"Filter identifier","schema":{"$ref":"#/components/schemas/uint"}}],"result":{"name":"Success","schema":{"type":"boolean"}},"examples":[{"name":"eth_uninstallFilter example","params":[{"name":"Filter identifier","value":"0x01"}],"result":{"name":"Success","value":true}}],"tags":[{"name":"Ethereum API","description":"Ethereum Node JSON-RPC method"},{"name":"Multichain API","description":"Multichain JSON-RPC method"}]}],"components":{"errors":{"UserRejected":{"code":4001,"message":"User rejected the request."},"InvalidParams":{"code":-32602,"message":"The wallet cannot parse the request."},"Unauthorized":{"code":4100,"message":"The requested account and/or method has not been authorized by the user."}},"schemas":{"TypedData":{"title":"Typed data","description":"Object containing information about the typed data to sign.","type":"object","required":["types","primaryType","domain","message"],"properties":{"types":{"type":"object","description":"Object containing type information.","required":["EIP712Domain"],"properties":{"EIP712Domain":{"type":"array","items":{"type":"object","title":"Domain separator value","description":"Object containing information about the domain separator value.","properties":{"name":{"type":"string","description":"Name of the domain separator value."},"type":{"type":"string","description":"Data type of the domain separator value."}}},"description":"An array specifying one or more of the following domain separator values: <br><br> <ul>\\n <li>`name` - The user-readable name of the signing domain, that is, the name of the dapp or the protocol.</li>\\n <li>`version` - The current major version of the signing domain.</li>\\n <li>`chainId` - The chain ID of the network.</li>\\n <li>`verifyingContract` - The address of the contract that will verify the signature.</li>\\n <li>`salt` - A disambiguating salt for the protocol.</li>\\n</ul>"}},"additionalProperties":{"type":"array","required":["name","type"],"items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}}}}},"domain":{"type":"object","description":"Object containing the domain separator values specified in the `EIP712Domain` type."},"primaryType":{"type":"string","description":"The primary type of the message."},"message":{"type":"object","description":"The message you\'re proposing the user to sign."}}},"SendCallsParameter":{"title":"Calls","description":"An object containing information about a batch of calls.","type":"object","required":["version","from","chainId","atomicRequired","calls"],"properties":{"version":{"description":"The version of the API format. This must be `2.0.0`.","type":"string"},"id":{"description":"The ID of the batch of calls.","type":"string"},"from":{"description":"The sender\'s address.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"chainId":{"description":"The [EIP-155](https://eips.ethereum.org/EIPS/eip-155) chain ID of the calls. This must match the currently selected network in the wallet.","type":"string","pattern":"^0x([1-9a-f]+[0-9a-f]*|0)$"},"atomicRequired":{"description":"`true` if the wallet must execute all calls atomically. If `false`, the wallet may execute the calls sequentially without atomicity. If `false` and the wallet is capable of executing the calls atomically, it may do so.","type":"boolean"},"calls":{"type":"array","description":"An array of call objects.","items":{"title":"Call","description":"An object containing information about the call.","type":"object","properties":{"to":{"description":"The address of the call\'s recipient.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"data":{"description":"The data to send with the call.","type":"string","pattern":"^0x[0-9a-f]*$"},"value":{"description":"The value to send with the call.","type":"string","pattern":"^0x([1-9a-f]+[0-9a-f]*|0)$"},"capabilities":{"description":"Dapps can use this object to communicate with the wallet about supported capabilities.","type":"object"}}}},"capabilities":{"description":"Dapps can use this object to communicate with the wallet about supported capabilities.","type":"object"}}},"AddEthereumChainParameter":{"title":"Chain","description":"Object containing information about the chain to add.","type":"object","required":["chainId","chainName","nativeCurrency","rpcUrls"],"properties":{"chainId":{"description":"The chain ID as a `0x`-prefixed hexadecimal string, per the `eth_chainId` method. MetaMask compares this chain ID value with the `eth_chainId` return value. If these values aren\'t identical, MetaMask rejects the request.","type":"string"},"blockExplorerUrls":{"description":"(Optional) An array of one or more URLs pointing to block explorer sites for the chain.","type":"array","items":{"type":"string","description":"Block explorer URL."}},"chainName":{"description":"A human-readable name for the chain.","type":"string"},"iconUrls":{"description":"(Optional) An array of one or more URLs pointing to icons that can be used to visually identify the chain. Note: MetaMask will not currently display these icons. You can still include icon URLs so they are used if MetaMask incorporates them into the display of custom networks in the future.","type":"array","items":{"format":"uri","type":"string","description":"Icon URL."}},"nativeCurrency":{"$ref":"#/components/schemas/NativeCurrency"},"rpcUrls":{"description":"An array of one or more URLs pointing to RPC endpoints that can be used to communicate with the chain. At least one item is required, and only the first item is used.","type":"array","minItems":1,"items":{"format":"uri","type":"string","description":"RPC URL."}}}},"NativeCurrency":{"title":"NativeCurrency","type":"object","description":"An object containing information about the native currency of the chain.","required":["decimals","symbol"],"properties":{"decimals":{"description":"A non-negative integer representing the number of decimals the native currency uses.","minimum":0,"type":"integer"},"name":{"description":"A human-readable name of the native currency.","type":"string"},"symbol":{"description":"A human-readable symbol of the native currency.","type":"string"}}},"Caveats":{"title":"Caveats","description":"An array of caveats that specify restrictions on the permission.","type":"array","items":{"title":"Caveat","description":"Object containing information about the caveat.","type":"object","properties":{"type":{"title":"Type","type":"string","description":"Type of caveat."},"value":{"title":"CaveatValue","description":"Value of the caveat."},"name":{"title":"Name","type":"string","description":"Name of the caveat."}}}},"Permission":{"title":"Permission","description":"Object containing information about the permission.","type":"object","properties":{"id":{"description":"The permission ID.","type":"string"},"parentCapability":{"description":"The name of the permission being granted. For example, `eth_accounts` or `endowment:permitted-chains`.","type":"string"},"invoker":{"description":"The URI of the dapp being granted this permission.","type":"string"},"caveats":{"$ref":"#/components/schemas/Caveats"},"date":{"description":"The timestamp of the permission request.","type":"number"}}},"PermissionsList":{"title":"Permissions list","description":"An array of the user\'s permissions.","type":"array","items":{"$ref":"#/components/schemas/Permission"}},"address":{"title":"hex encoded address","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"addresses":{"title":"hex encoded address","type":"array","items":{"$ref":"#/components/schemas/address"}},"byte":{"title":"hex encoded byte","type":"string","pattern":"^0x([0-9a-fA-F]?){1,2}$"},"bytes":{"title":"hex encoded bytes","type":"string","pattern":"^0x[0-9a-f]*$"},"bytesMax32":{"title":"32 hex encoded bytes","type":"string","pattern":"^0x[0-9a-f]{0,64}$"},"bytes8":{"title":"8 hex encoded bytes","type":"string","pattern":"^0x[0-9a-f]{16}$"},"bytes32":{"title":"32 hex encoded bytes","type":"string","pattern":"^0x[0-9a-f]{64}$"},"bytes48":{"title":"48 hex encoded bytes","type":"string","pattern":"^0x[0-9a-f]{96}$"},"bytes96":{"title":"96 hex encoded bytes","type":"string","pattern":"^0x[0-9a-f]{192}$"},"bytes256":{"title":"256 hex encoded bytes","type":"string","pattern":"^0x[0-9a-f]{512}$"},"bytes65":{"title":"65 hex encoded bytes","type":"string","pattern":"^0x[0-9a-f]{130}$"},"ratio":{"title":"normalized ratio","type":"number","minimum":0,"maximum":1},"uint":{"title":"hex encoded unsigned integer","type":"string","pattern":"^0x([1-9a-f]+[0-9a-f]*|0)$"},"uint64":{"title":"hex encoded 64 bit unsigned integer","type":"string","pattern":"^0x([1-9a-f]+[0-9a-f]{0,15})|0$"},"uint256":{"title":"hex encoded 256 bit unsigned integer","type":"string","pattern":"^0x([1-9a-f]+[0-9a-f]{0,31})|0$"},"hash32":{"title":"32 byte hex value","type":"string","pattern":"^0x[0-9a-f]{64}$"},"notFound":{"title":"Not Found (null)","type":"null"},"Block":{"title":"Block object","type":"object","required":["hash","parentHash","sha3Uncles","miner","stateRoot","transactionsRoot","receiptsRoot","logsBloom","number","gasLimit","gasUsed","timestamp","extraData","mixHash","nonce","size","transactions","uncles"],"additionalProperties":false,"properties":{"hash":{"title":"Hash","$ref":"#/components/schemas/hash32"},"parentHash":{"title":"Parent block hash","$ref":"#/components/schemas/hash32"},"sha3Uncles":{"title":"Ommers hash","$ref":"#/components/schemas/hash32"},"miner":{"title":"Coinbase","$ref":"#/components/schemas/address"},"stateRoot":{"title":"State root","$ref":"#/components/schemas/hash32"},"transactionsRoot":{"title":"Transactions root","$ref":"#/components/schemas/hash32"},"receiptsRoot":{"title":"Receipts root","$ref":"#/components/schemas/hash32"},"logsBloom":{"title":"Bloom filter","$ref":"#/components/schemas/bytes256"},"difficulty":{"title":"Difficulty","$ref":"#/components/schemas/uint"},"number":{"title":"Number","$ref":"#/components/schemas/uint"},"gasLimit":{"title":"Gas limit","$ref":"#/components/schemas/uint"},"gasUsed":{"title":"Gas used","$ref":"#/components/schemas/uint"},"timestamp":{"title":"Timestamp","$ref":"#/components/schemas/uint"},"extraData":{"title":"Extra data","$ref":"#/components/schemas/bytes"},"mixHash":{"title":"Mix hash","$ref":"#/components/schemas/hash32"},"nonce":{"title":"Nonce","$ref":"#/components/schemas/bytes8"},"baseFeePerGas":{"title":"Base fee per gas","$ref":"#/components/schemas/uint"},"withdrawalsRoot":{"title":"Withdrawals root","$ref":"#/components/schemas/hash32"},"blobGasUsed":{"title":"Blob gas used","$ref":"#/components/schemas/uint"},"excessBlobGas":{"title":"Excess blob gas","$ref":"#/components/schemas/uint"},"parentBeaconBlockRoot":{"title":"Parent Beacon Block Root","$ref":"#/components/schemas/hash32"},"size":{"title":"Block size","$ref":"#/components/schemas/uint"},"transactions":{"anyOf":[{"title":"Transaction hashes","type":"array","items":{"$ref":"#/components/schemas/hash32"}},{"title":"Full transactions","type":"array","items":{"$ref":"#/components/schemas/TransactionInfo"}}]},"withdrawals":{"title":"Withdrawals","type":"array","items":{"$ref":"#/components/schemas/Withdrawal"}},"uncles":{"title":"Uncles","type":"array","items":{"$ref":"#/components/schemas/hash32"}}}},"BlockTag":{"title":"Block tag","type":"string","enum":["earliest","finalized","safe","latest","pending"],"description":"`earliest`: The lowest numbered block the client has available; `finalized`: The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination; `safe`: The most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions; `latest`: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions; `pending`: A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from local mempool. Before the merge transition is finalized, any call querying for `finalized` or `safe` block MUST be responded to with `-39001: Unknown block` error"},"BlockNumberOrTag":{"title":"Block number or tag","oneOf":[{"title":"Block number","$ref":"#/components/schemas/uint"},{"title":"Block tag","$ref":"#/components/schemas/BlockTag"}]},"BlockNumberOrTagOrHash":{"title":"Block number, tag, or block hash","anyOf":[{"title":"Block number","$ref":"#/components/schemas/uint"},{"title":"Block tag","$ref":"#/components/schemas/BlockTag"},{"title":"Block hash","$ref":"#/components/schemas/hash32"}]},"BadBlock":{"title":"Bad block","type":"object","required":["block","hash","rlp"],"additionalProperties":false,"properties":{"block":{"title":"Block","$ref":"#/components/schemas/Block"},"hash":{"title":"Hash","$ref":"#/components/schemas/hash32"},"rlp":{"title":"RLP","$ref":"#/components/schemas/bytes"}}},"SyncingStatus":{"title":"Syncing status","oneOf":[{"title":"Syncing progress","type":"object","additionalProperties":false,"properties":{"startingBlock":{"title":"Starting block","$ref":"#/components/schemas/uint"},"currentBlock":{"title":"Current block","$ref":"#/components/schemas/uint"},"highestBlock":{"title":"Highest block","$ref":"#/components/schemas/uint"}}},{"title":"Not syncing","description":"Should always return false if not syncing.","type":"boolean"}]},"FilterResults":{"title":"Filter results","oneOf":[{"title":"new block or transaction hashes","type":"array","items":{"$ref":"#/components/schemas/hash32"}},{"title":"new logs","type":"array","items":{"$ref":"#/components/schemas/Log"}}]},"Filter":{"title":"filter","type":"object","additionalProperties":false,"properties":{"fromBlock":{"title":"from block","$ref":"#/components/schemas/uint"},"toBlock":{"title":"to block","$ref":"#/components/schemas/uint"},"address":{"title":"Address(es)","oneOf":[{"title":"Any Address","type":"null"},{"title":"Address","$ref":"#/components/schemas/address"},{"title":"Addresses","$ref":"#/components/schemas/addresses"}]},"topics":{"title":"Topics","$ref":"#/components/schemas/FilterTopics"}}},"FilterTopics":{"title":"Filter Topics","oneOf":[{"title":"Any Topic Match","type":"null"},{"title":"Specified Filter Topics","type":"array","items":{"$ref":"#/components/schemas/FilterTopic"}}]},"FilterTopic":{"title":"Filter Topic List Entry","oneOf":[{"title":"Single Topic Match","$ref":"#/components/schemas/bytes32"},{"title":"Multiple Topic Match","type":"array","items":{"$ref":"#/components/schemas/bytes32"}}]},"Log":{"title":"log","type":"object","required":["transactionHash"],"additionalProperties":false,"properties":{"removed":{"title":"removed","type":"boolean"},"logIndex":{"title":"log index","$ref":"#/components/schemas/uint"},"transactionIndex":{"title":"transaction index","$ref":"#/components/schemas/uint"},"transactionHash":{"title":"transaction hash","$ref":"#/components/schemas/hash32"},"blockHash":{"title":"block hash","$ref":"#/components/schemas/hash32"},"blockNumber":{"title":"block number","$ref":"#/components/schemas/uint"},"address":{"title":"address","$ref":"#/components/schemas/address"},"data":{"title":"data","$ref":"#/components/schemas/bytes"},"topics":{"title":"topics","type":"array","items":{"$ref":"#/components/schemas/bytes32"}}}},"ReceiptInfo":{"type":"object","title":"Receipt information","required":["blockHash","blockNumber","from","cumulativeGasUsed","gasUsed","logs","logsBloom","transactionHash","transactionIndex","effectiveGasPrice"],"additionalProperties":false,"properties":{"type":{"title":"type","$ref":"#/components/schemas/byte"},"transactionHash":{"title":"transaction hash","$ref":"#/components/schemas/hash32"},"transactionIndex":{"title":"transaction index","$ref":"#/components/schemas/uint"},"blockHash":{"title":"block hash","$ref":"#/components/schemas/hash32"},"blockNumber":{"title":"block number","$ref":"#/components/schemas/uint"},"from":{"title":"from","$ref":"#/components/schemas/address"},"to":{"title":"to","description":"Address of the receiver or null in a contract creation transaction.","oneOf":[{"title":"Contract Creation (null)","type":"null"},{"title":"Recipient Address","$ref":"#/components/schemas/address"}]},"cumulativeGasUsed":{"title":"cumulative gas used","description":"The sum of gas used by this transaction and all preceding transactions in the same block.","$ref":"#/components/schemas/uint"},"gasUsed":{"title":"gas used","description":"The amount of gas used for this specific transaction alone.","$ref":"#/components/schemas/uint"},"blobGasUsed":{"title":"blob gas used","description":"The amount of blob gas used for this specific transaction. Only specified for blob transactions as defined by EIP-4844.","$ref":"#/components/schemas/uint"},"contractAddress":{"title":"contract address","description":"The contract address created, if the transaction was a contract creation, otherwise null.","oneOf":[{"$ref":"#/components/schemas/address"},{"title":"Null","type":"null"}]},"logs":{"title":"logs","type":"array","items":{"$ref":"#/components/schemas/Log"}},"logsBloom":{"title":"logs bloom","$ref":"#/components/schemas/bytes256"},"root":{"title":"state root","description":"The post-transaction state root. Only specified for transactions included before the Byzantium upgrade.","$ref":"#/components/schemas/hash32"},"status":{"title":"status","description":"Either 1 (success) or 0 (failure). Only specified for transactions included after the Byzantium upgrade.","$ref":"#/components/schemas/uint"},"effectiveGasPrice":{"title":"effective gas price","description":"The actual value per gas deducted from the sender\'s account. Before EIP-1559, this is equal to the transaction\'s gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).","$ref":"#/components/schemas/uint"},"blobGasPrice":{"title":"blob gas price","description":"The actual value per gas deducted from the sender\'s account for blob gas. Only specified for blob transactions as defined by EIP-4844.","$ref":"#/components/schemas/uint"}}},"AccountProof":{"title":"Account proof","type":"object","required":["address","accountProof","balance","codeHash","nonce","storageHash","storageProof"],"additionalProperties":false,"properties":{"address":{"title":"address","$ref":"#/components/schemas/address"},"accountProof":{"title":"accountProof","type":"array","items":{"$ref":"#/components/schemas/bytes"}},"balance":{"title":"balance","$ref":"#/components/schemas/uint256"},"codeHash":{"title":"codeHash","$ref":"#/components/schemas/hash32"},"nonce":{"title":"nonce","$ref":"#/components/schemas/uint64"},"storageHash":{"title":"storageHash","$ref":"#/components/schemas/hash32"},"storageProof":{"title":"Storage proofs","type":"array","items":{"$ref":"#/components/schemas/StorageProof"}}}},"StorageProof":{"title":"Storage proof","type":"object","required":["key","value","proof"],"additionalProperties":false,"properties":{"key":{"title":"key","$ref":"#/components/schemas/bytesMax32"},"value":{"title":"value","$ref":"#/components/schemas/uint256"},"proof":{"title":"proof","type":"array","items":{"$ref":"#/components/schemas/bytes"}}}},"Transaction4844Unsigned":{"type":"object","title":"EIP-4844 transaction.","required":["type","nonce","to","gas","value","input","maxPriorityFeePerGas","maxFeePerGas","maxFeePerBlobGas","accessList","blobVersionedHashes","chainId"],"properties":{"type":{"title":"type","$ref":"#/components/schemas/byte"},"nonce":{"title":"nonce","$ref":"#/components/schemas/uint"},"to":{"title":"to address","$ref":"#/components/schemas/address"},"gas":{"title":"gas limit","$ref":"#/components/schemas/uint"},"value":{"title":"value","$ref":"#/components/schemas/uint"},"input":{"title":"input data","$ref":"#/components/schemas/bytes"},"maxPriorityFeePerGas":{"title":"max priority fee per gas","description":"Maximum fee per gas the sender is willing to pay to miners in wei","$ref":"#/components/schemas/uint"},"maxFeePerGas":{"title":"max fee per gas","description":"The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei","$ref":"#/components/schemas/uint"},"maxFeePerBlobGas":{"title":"max fee per blob gas","description":"The maximum total fee per gas the sender is willing to pay for blob gas in wei","$ref":"#/components/schemas/uint"},"accessList":{"title":"accessList","description":"EIP-2930 access list","$ref":"#/components/schemas/AccessList"},"blobVersionedHashes":{"title":"blobVersionedHashes","description":"List of versioned blob hashes associated with the transaction\'s EIP-4844 data blobs.","type":"array","items":{"$ref":"#/components/schemas/hash32"}},"chainId":{"title":"chainId","description":"Chain ID that this transaction is valid on.","$ref":"#/components/schemas/uint"}}},"AccessListEntry":{"title":"Access list entry","type":"object","additionalProperties":false,"properties":{"address":{"$ref":"#/components/schemas/address"},"storageKeys":{"type":"array","items":{"$ref":"#/components/schemas/hash32"}}}},"AccessList":{"title":"Access list","type":"array","items":{"$ref":"#/components/schemas/AccessListEntry"}},"Transaction1559Unsigned":{"type":"object","title":"EIP-1559 transaction.","required":["type","nonce","gas","value","input","maxFeePerGas","maxPriorityFeePerGas","gasPrice","chainId","accessList"],"properties":{"type":{"title":"type","type":"string","pattern":"^0x2$"},"nonce":{"title":"nonce","$ref":"#/components/schemas/uint"},"to":{"title":"to address","oneOf":[{"title":"Contract Creation (null)","type":"null"},{"title":"Address","$ref":"#/components/schemas/address"}]},"gas":{"title":"gas limit","$ref":"#/components/schemas/uint"},"value":{"title":"value","$ref":"#/components/schemas/uint"},"input":{"title":"input data","$ref":"#/components/schemas/bytes"},"maxPriorityFeePerGas":{"title":"max priority fee per gas","description":"Maximum fee per gas the sender is willing to pay to miners in wei","$ref":"#/components/schemas/uint"},"maxFeePerGas":{"title":"max fee per gas","description":"The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei","$ref":"#/components/schemas/uint"},"gasPrice":{"title":"gas price","description":"The effective gas price paid by the sender in wei. For transactions not yet included in a block, this value should be set equal to the max fee per gas. This field is DEPRECATED, please transition to using effectiveGasPrice in the receipt object going forward.","$ref":"#/components/schemas/uint"},"accessList":{"title":"accessList","description":"EIP-2930 access list","$ref":"#/components/schemas/AccessList"},"chainId":{"title":"chainId","description":"Chain ID that this transaction is valid on.","$ref":"#/components/schemas/uint"}}},"Transaction2930Unsigned":{"type":"object","title":"EIP-2930 transaction.","required":["type","nonce","gas","value","input","gasPrice","chainId","accessList"],"properties":{"type":{"title":"type","type":"string","pattern":"^0x1$"},"nonce":{"title":"nonce","$ref":"#/components/schemas/uint"},"to":{"title":"to address","oneOf":[{"title":"Contract Creation (null)","type":"null"},{"title":"Address","$ref":"#/components/schemas/address"}]},"gas":{"title":"gas limit","$ref":"#/components/schemas/uint"},"value":{"title":"value","$ref":"#/components/schemas/uint"},"input":{"title":"input data","$ref":"#/components/schemas/bytes"},"gasPrice":{"title":"gas price","description":"The gas price willing to be paid by the sender in wei","$ref":"#/components/schemas/uint"},"accessList":{"title":"accessList","description":"EIP-2930 access list","$ref":"#/components/schemas/AccessList"},"chainId":{"title":"chainId","description":"Chain ID that this transaction is valid on.","$ref":"#/components/schemas/uint"}}},"TransactionLegacyUnsigned":{"type":"object","title":"Legacy transaction.","required":["type","nonce","gas","value","input","gasPrice"],"properties":{"type":{"title":"type","type":"string","pattern":"^0x0$"},"nonce":{"title":"nonce","$ref":"#/components/schemas/uint"},"to":{"title":"to address","oneOf":[{"title":"Contract Creation (null)","type":"null"},{"title":"Address","$ref":"#/components/schemas/address"}]},"gas":{"title":"gas limit","$ref":"#/components/schemas/uint"},"value":{"title":"value","$ref":"#/components/schemas/uint"},"input":{"title":"input data","$ref":"#/components/schemas/bytes"},"gasPrice":{"title":"gas price","description":"The gas price willing to be paid by the sender in wei","$ref":"#/components/schemas/uint"},"chainId":{"title":"chainId","description":"Chain ID that this transaction is valid on.","$ref":"#/components/schemas/uint"}}},"TransactionUnsigned":{"oneOf":[{"$ref":"#/components/schemas/Transaction4844Unsigned"},{"$ref":"#/components/schemas/Transaction1559Unsigned"},{"$ref":"#/components/schemas/Transaction2930Unsigned"},{"$ref":"#/components/schemas/TransactionLegacyUnsigned"}]},"Transaction4844Signed":{"title":"Signed 4844 Transaction","type":"object","allOf":[{"$ref":"#/components/schemas/Transaction4844Unsigned"},{"title":"EIP-4844 transaction signature properties.","required":["yParity","r","s"],"properties":{"yParity":{"title":"yParity","description":"The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.","$ref":"#/components/schemas/uint"},"r":{"title":"r","$ref":"#/components/schemas/uint"},"s":{"title":"s","$ref":"#/components/schemas/uint"}}}]},"Transaction1559Signed":{"title":"Signed 1559 Transaction","type":"object","allOf":[{"$ref":"#/components/schemas/Transaction1559Unsigned"},{"title":"EIP-1559 transaction signature properties.","required":["yParity","r","s"],"properties":{"yParity":{"title":"yParity","description":"The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.","$ref":"#/components/schemas/uint"},"v":{"title":"v","description":"For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.","$ref":"#/components/schemas/uint"},"r":{"title":"r","$ref":"#/components/schemas/uint"},"s":{"title":"s","$ref":"#/components/schemas/uint"}}}]},"Transaction2930Signed":{"title":"Signed 2930 Transaction","type":"object","allOf":[{"$ref":"#/components/schemas/Transaction2930Unsigned"},{"title":"EIP-2930 transaction signature properties.","required":["yParity","r","s"],"properties":{"yParity":{"title":"yParity","description":"The parity (0 for even, 1 for odd) of the y-value of the secp256k1 signature.","$ref":"#/components/schemas/uint"},"v":{"title":"v","description":"For backwards compatibility, `v` is optionally provided as an alternative to `yParity`. This field is DEPRECATED and all use of it should migrate to `yParity`.","$ref":"#/components/schemas/uint"},"r":{"title":"r","$ref":"#/components/schemas/uint"},"s":{"title":"s","$ref":"#/components/schemas/uint"}}}]},"TransactionLegacySigned":{"title":"Signed Legacy Transaction","type":"object","allOf":[{"$ref":"#/components/schemas/TransactionLegacyUnsigned"},{"title":"Legacy transaction signature properties.","required":["v","r","s"],"properties":{"v":{"title":"v","$ref":"#/components/schemas/uint"},"r":{"title":"r","$ref":"#/components/schemas/uint"},"s":{"title":"s","$ref":"#/components/schemas/uint"}}}]},"TransactionSigned":{"oneOf":[{"$ref":"#/components/schemas/Transaction4844Signed"},{"$ref":"#/components/schemas/Transaction1559Signed"},{"$ref":"#/components/schemas/Transaction2930Signed"},{"$ref":"#/components/schemas/TransactionLegacySigned"}]},"TransactionInfo":{"type":"object","title":"Transaction information","allOf":[{"title":"Contextual information","required":["blockHash","blockNumber","from","hash","transactionIndex"],"unevaluatedProperties":false,"properties":{"blockHash":{"title":"block hash","$ref":"#/components/schemas/hash32"},"blockNumber":{"title":"block number","$ref":"#/components/schemas/uint"},"from":{"title":"from address","$ref":"#/components/schemas/address"},"hash":{"title":"transaction hash","$ref":"#/components/schemas/hash32"},"transactionIndex":{"title":"transaction index","$ref":"#/components/schemas/uint"}}},{"$ref":"#/components/schemas/TransactionSigned"}]},"GenericTransaction":{"type":"object","title":"Transaction object generic to all types","additionalProperties":false,"properties":{"type":{"title":"type","$ref":"#/components/schemas/byte"},"nonce":{"title":"nonce","$ref":"#/components/schemas/uint"},"to":{"title":"to address","oneOf":[{"title":"Contract Creation (null)","type":"null"},{"title":"Address","$ref":"#/components/schemas/address"}]},"from":{"title":"from address","$ref":"#/components/schemas/address"},"gas":{"title":"gas limit","$ref":"#/components/schemas/uint"},"value":{"title":"value","$ref":"#/components/schemas/uint"},"input":{"title":"input data","$ref":"#/components/schemas/bytes"},"gasPrice":{"title":"gas price","description":"The gas price willing to be paid by the sender in wei","$ref":"#/components/schemas/uint"},"maxPriorityFeePerGas":{"title":"max priority fee per gas","description":"Maximum fee per gas the sender is willing to pay to miners in wei","$ref":"#/components/schemas/uint"},"maxFeePerGas":{"title":"max fee per gas","description":"The maximum total fee per gas the sender is willing to pay (includes the network / base fee and miner / priority fee) in wei","$ref":"#/components/schemas/uint"},"maxFeePerBlobGas":{"title":"max fee per blob gas","description":"The maximum total fee per gas the sender is willing to pay for blob gas in wei","$ref":"#/components/schemas/uint"},"accessList":{"title":"accessList","description":"EIP-2930 access list","$ref":"#/components/schemas/AccessList"},"blobVersionedHashes":{"title":"blobVersionedHashes","description":"List of versioned blob hashes associated with the transaction\'s EIP-4844 data blobs.","type":"array","items":{"$ref":"#/components/schemas/hash32"}},"blobs":{"title":"blobs","description":"Raw blob data.","type":"array","items":{"$ref":"#/components/schemas/bytes"}},"chainId":{"title":"chainId","description":"Chain ID that this transaction is valid on.","$ref":"#/components/schemas/uint"}}},"Withdrawal":{"type":"object","title":"Validator withdrawal","required":["index","validatorIndex","address","amount"],"additionalProperties":false,"properties":{"index":{"title":"index of withdrawal","$ref":"#/components/schemas/uint64"},"validatorIndex":{"title":"index of validator that generated withdrawal","$ref":"#/components/schemas/uint64"},"address":{"title":"recipient address for withdrawal value","$ref":"#/components/schemas/address"},"amount":{"title":"value contained in withdrawal","$ref":"#/components/schemas/uint256"}}},"ForkchoiceStateV1":{"title":"Forkchoice state object V1","type":"object","required":["headBlockHash","safeBlockHash","finalizedBlockHash"],"properties":{"headBlockHash":{"title":"Head block hash","$ref":"#/components/schemas/hash32"},"safeBlockHash":{"title":"Safe block hash","$ref":"#/components/schemas/hash32"},"finalizedBlockHash":{"title":"Finalized block hash","$ref":"#/components/schemas/hash32"}}},"ForkchoiceUpdatedResponseV1":{"title":"Forkchoice updated response","type":"object","required":["payloadStatus"],"properties":{"payloadStatus":{"title":"Payload status","$ref":"#/components/schemas/RestrictedPayloadStatusV1"},"payloadId":{"title":"Payload id","$ref":"#/components/schemas/bytes8"}}},"PayloadAttributesV1":{"title":"Payload attributes object V1","type":"object","required":["timestamp","prevRandao","suggestedFeeRecipient"],"properties":{"timestamp":{"title":"Timestamp","$ref":"#/components/schemas/uint64"},"prevRandao":{"title":"Previous randao value","$ref":"#/components/schemas/bytes32"},"suggestedFeeRecipient":{"title":"Suggested fee recipient","$ref":"#/components/schemas/address"}}},"PayloadAttributesV2":{"title":"Payload attributes object V2","type":"object","required":["timestamp","prevRandao","suggestedFeeRecipient","withdrawals"],"properties":{"timestamp":{"$ref":"#/components/schemas/PayloadAttributesV1/properties/timestamp"},"prevRandao":{"$ref":"#/components/schemas/PayloadAttributesV1/properties/prevRandao"},"suggestedFeeRecipient":{"$ref":"#/components/schemas/PayloadAttributesV1/properties/suggestedFeeRecipient"},"withdrawals":{"title":"Withdrawals","type":"array","items":{"$ref":"#/components/schemas/WithdrawalV1"}}}},"PayloadAttributesV3":{"title":"Payload attributes object V3","type":"object","required":["timestamp","prevRandao","suggestedFeeRecipient","withdrawals","parentBeaconBlockRoot"],"properties":{"timestamp":{"$ref":"#/components/schemas/PayloadAttributesV2/properties/timestamp"},"prevRandao":{"$ref":"#/components/schemas/PayloadAttributesV2/properties/prevRandao"},"suggestedFeeRecipient":{"$ref":"#/components/schemas/PayloadAttributesV2/properties/suggestedFeeRecipient"},"withdrawals":{"$ref":"#/components/schemas/PayloadAttributesV2/properties/withdrawals"},"parentBeaconBlockRoot":{"title":"Parent beacon block root","$ref":"#/components/schemas/hash32"}}},"PayloadStatusV1":{"title":"Payload status object V1","type":"object","required":["status"],"properties":{"status":{"title":"Payload validation status","type":"string","enum":["VALID","INVALID","SYNCING","ACCEPTED","INVALID_BLOCK_HASH"]},"latestValidHash":{"title":"The hash of the most recent valid block","$ref":"#/components/schemas/hash32"},"validationError":{"title":"Validation error message","type":"string"}}},"RestrictedPayloadStatusV1":{"$ref":"#/components/schemas/PayloadStatusV1","properties":{"status":{"$ref":"#/components/schemas/PayloadStatusV1/properties/status","description":"Set of possible values is restricted to VALID, INVALID, SYNCING","enum":["VALID","INVALID","SYNCING"]},"latestValidHash":{"$ref":"#/components/schemas/PayloadStatusV1/properties/latestValidHash"},"validationError":{"$ref":"#/components/schemas/PayloadStatusV1/properties/validationError"}}},"PayloadStatusNoInvalidBlockHash":{"$ref":"#/components/schemas/PayloadStatusV1","title":"Payload status object deprecating INVALID_BLOCK_HASH status","properties":{"status":{"$ref":"#/components/schemas/PayloadStatusV1/properties/status","enum":["VALID","INVALID","SYNCING","ACCEPTED"]},"latestValidHash":{"$ref":"#/components/schemas/PayloadStatusV1/properties/latestValidHash"},"validationError":{"$ref":"#/components/schemas/PayloadStatusV1/properties/validationError"}}},"ExecutionPayloadV1":{"title":"Execution payload object V1","type":"object","required":["parentHash","feeRecipient","stateRoot","receiptsRoot","logsBloom","prevRandao","blockNumber","gasLimit","gasUsed","timestamp","extraData","baseFeePerGas","blockHash","transactions"],"properties":{"parentHash":{"title":"Parent block hash","$ref":"#/components/schemas/hash32"},"feeRecipient":{"title":"Recipient of transaction priority fees","$ref":"#/components/schemas/address"},"stateRoot":{"title":"State root","$ref":"#/components/schemas/hash32"},"receiptsRoot":{"title":"Receipts root","$ref":"#/components/schemas/hash32"},"logsBloom":{"title":"Bloom filter","$ref":"#/components/schemas/bytes256"},"prevRandao":{"title":"Previous randao value","$ref":"#/components/schemas/bytes32"},"blockNumber":{"title":"Block number","$ref":"#/components/schemas/uint64"},"gasLimit":{"title":"Gas limit","$ref":"#/components/schemas/uint64"},"gasUsed":{"title":"Gas used","$ref":"#/components/schemas/uint64"},"timestamp":{"title":"Timestamp","$ref":"#/components/schemas/uint64"},"extraData":{"title":"Extra data","$ref":"#/components/schemas/bytesMax32"},"baseFeePerGas":{"title":"Base fee per gas","$ref":"#/components/schemas/uint256"},"blockHash":{"title":"Block hash","$ref":"#/components/schemas/hash32"},"transactions":{"title":"Transactions","type":"array","items":{"$ref":"#/components/schemas/bytes"}}}},"WithdrawalV1":{"title":"Withdrawal object V1","type":"object","required":["index","validatorIndex","address","amount"],"properties":{"index":{"title":"Withdrawal index","$ref":"#/components/schemas/uint64"},"validatorIndex":{"title":"Validator index","$ref":"#/components/schemas/uint64"},"address":{"title":"Withdrawal address","$ref":"#/components/schemas/address"},"amount":{"title":"Withdrawal amount","$ref":"#/components/schemas/uint64"}}},"ExecutionPayloadV2":{"title":"Execution payload object V2","type":"object","required":["parentHash","feeRecipient","stateRoot","receiptsRoot","logsBloom","prevRandao","blockNumber","gasLimit","gasUsed","timestamp","extraData","baseFeePerGas","blockHash","transactions","withdrawals"],"properties":{"parentHash":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/parentHash"},"feeRecipient":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/feeRecipient"},"stateRoot":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/stateRoot"},"receiptsRoot":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/receiptsRoot"},"logsBloom":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/logsBloom"},"prevRandao":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/prevRandao"},"blockNumber":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/blockNumber"},"gasLimit":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/gasLimit"},"gasUsed":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/gasUsed"},"timestamp":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/timestamp"},"extraData":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/extraData"},"baseFeePerGas":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/baseFeePerGas"},"blockHash":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/blockHash"},"transactions":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/transactions"},"withdrawals":{"title":"Withdrawals","type":"array","items":{"$ref":"#/components/schemas/WithdrawalV1"}}}},"ExecutionPayloadV3":{"title":"Execution payload object V3","type":"object","required":["parentHash","feeRecipient","stateRoot","receiptsRoot","logsBloom","prevRandao","blockNumber","gasLimit","gasUsed","timestamp","extraData","baseFeePerGas","blockHash","transactions","withdrawals","blobGasUsed","excessBlobGas"],"properties":{"parentHash":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/parentHash"},"feeRecipient":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/feeRecipient"},"stateRoot":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/stateRoot"},"receiptsRoot":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/receiptsRoot"},"logsBloom":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/logsBloom"},"prevRandao":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/prevRandao"},"blockNumber":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/blockNumber"},"gasLimit":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/gasLimit"},"gasUsed":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/gasUsed"},"timestamp":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/timestamp"},"extraData":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/extraData"},"baseFeePerGas":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/baseFeePerGas"},"blockHash":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/blockHash"},"transactions":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/transactions"},"withdrawals":{"$ref":"#/components/schemas/ExecutionPayloadV2/properties/withdrawals"},"blobGasUsed":{"title":"Blob gas used","$ref":"#/components/schemas/uint64"},"excessBlobGas":{"title":"Excess blob gas","$ref":"#/components/schemas/uint64"}}},"ExecutionPayloadV4":{"title":"Execution payload object V4","type":"object","required":["parentHash","feeRecipient","stateRoot","receiptsRoot","logsBloom","prevRandao","blockNumber","gasLimit","gasUsed","timestamp","extraData","baseFeePerGas","blockHash","transactions","withdrawals","blobGasUsed","excessBlobGas","depositRequests","withdrawalRequests","consolidationRequests"],"properties":{"parentHash":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/parentHash"},"feeRecipient":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/feeRecipient"},"stateRoot":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/stateRoot"},"receiptsRoot":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/receiptsRoot"},"logsBloom":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/logsBloom"},"prevRandao":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/prevRandao"},"blockNumber":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/blockNumber"},"gasLimit":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/gasLimit"},"gasUsed":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/gasUsed"},"timestamp":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/timestamp"},"extraData":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/extraData"},"baseFeePerGas":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/baseFeePerGas"},"blockHash":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/blockHash"},"transactions":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/transactions"},"withdrawals":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/withdrawals"},"blobGasUsed":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/blobGasUsed"},"excessBlobGas":{"$ref":"#/components/schemas/ExecutionPayloadV3/properties/excessBlobGas"},"depositRequests":{"title":"Deposit requests","type":"array","items":{"$ref":"#/components/schemas/DepositRequestV1"}},"withdrawalRequests":{"title":"Withdrawals requests","type":"array","items":{"$ref":"#/components/schemas/WithdrawalRequestV1"}},"consolidationRequests":{"title":"Consolidation requests","type":"array","items":{"$ref":"#/components/schemas/ConsolidationRequestV1"}}}},"ExecutionPayloadBodyV1":{"title":"Execution payload body object V1","type":"object","required":["transactions"],"properties":{"transactions":{"$ref":"#/components/schemas/ExecutionPayloadV1/properties/transactions"},"withdrawals":{"title":"Withdrawals","type":["array","null"],"items":{"$ref":"#/components/schemas/WithdrawalV1"}}}},"ExecutionPayloadBodyV2":{"title":"Execution payload body object V2","type":"object","required":["transactions"],"properties":{"transactions":{"title":"Transactions","type":"array","items":{"$ref":"#/components/schemas/bytes"}},"withdrawals":{"title":"Withdrawals","type":["array","null"],"items":{"$ref":"#/components/schemas/WithdrawalV1"}},"depositRequests":{"title":"Deposit requests","type":["array","null"],"items":{"$ref":"#/components/schemas/DepositRequestV1"}},"withdrawalRequests":{"title":"Withdrawals requests","type":["array","null"],"items":{"$ref":"#/components/schemas/WithdrawalRequestV1"}},"consolidationRequests":{"title":"Consolidation requests - array - \'null\'","items":{"$ref":"#/components/schemas/ConsolidationRequestV1"}}}},"BlobsBundleV1":{"title":"Blobs bundle object V1","type":"object","required":["commitments","proofs","blobs"],"properties":{"commitments":{"title":"Commitments","type":"array","items":{"$ref":"#/components/schemas/bytes48"}},"proofs":{"title":"Proofs","type":"array","items":{"$ref":"#/components/schemas/bytes48"}},"blobs":{"title":"Blobs","type":"array","items":{"$ref":"#/components/schemas/bytes"}}}},"DepositRequestV1":{"title":"Deposit request object V1","type":"object","required":["pubkey","withdrawalCredentials","amount","signature","index"],"properties":{"pubkey":{"title":"Public key","$ref":"#/components/schemas/bytes48"},"withdrawalCredentials":{"title":"Withdrawal credentials","$ref":"#/components/schemas/bytes32"},"amount":{"title":"Deposit amount","$ref":"#/components/schemas/uint64"},"signature":{"title":"Deposit signature","$ref":"#/components/schemas/bytes96"},"index":{"title":"Deposit index","$ref":"#/components/schemas/uint64"}}},"WithdrawalRequestV1":{"title":"Withdrawal request object V1","type":"object","required":["sourceAddress","validatorPubkey","amount"],"properties":{"sourceAddress":{"title":"Source address","$ref":"#/components/schemas/address"},"validatorPubkey":{"title":"Validator public key","$ref":"#/components/schemas/bytes48"},"amount":{"title":"Withdraw amount","$ref":"#/components/schemas/uint64"}}},"ConsolidationRequestV1":{"title":"Consolidation request object V1","type":"object","required":["sourceAddress","sourcePubkey","targetPubkey"],"properties":{"sourceAddress":{"title":"Source address","$ref":"#/components/schemas/address"},"sourcePubkey":{"title":"Source validator public key","$ref":"#/components/schemas/bytes48"},"targetPubkey":{"title":"Target validator public key","$ref":"#/components/schemas/bytes48"}}},"TransitionConfigurationV1":{"title":"Transition configuration object","type":"object","required":["terminalTotalDifficulty","terminalBlockHash","terminalBlockNumber"],"properties":{"terminalTotalDifficulty":{"title":"Terminal total difficulty","$ref":"#/components/schemas/uint256"},"terminalBlockHash":{"title":"Terminal block hash","$ref":"#/components/schemas/hash32"},"terminalBlockNumber":{"title":"Terminal block number","$ref":"#/components/schemas/uint64"}}}},"tags":{"MetaMask":{"name":"MetaMask","description":"MetaMask-specific methods."},"Restricted":{"name":"Restricted","description":"Restricted methods. If a method is restricted, the caller must have the corresponding permission via `wallet_requestPermissions` in order to call it."},"Mobile":{"name":"Mobile","description":"Mobile-specific methods."},"Experimental":{"name":"Experimental","description":"Experimental methods."},"Deprecated":{"name":"Deprecated","description":"Deprecated methods."},"Ethereum":{"name":"Ethereum API","description":"Ethereum execution API methods."},"Multichain":{"name":"Multichain API","description":"Multichain API methods."}},"contentDescriptors":{},"examplePairings":{},"links":{},"examples":{}}}')},9994:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useWalletDisconnectButton=function(){const{disconnecting:e,disconnect:t,wallet:n}=(0,r.useWallet)();let o;o=e?"disconnecting":n?"has-wallet":"no-wallet";const s=(0,i.useCallback)(()=>{t().catch(()=>{})},[t]);return{buttonDisabled:"has-wallet"!==o,buttonState:o,onButtonClick:"has-wallet"===o?s:void 0,walletIcon:null===n||void 0===n?void 0:n.adapter.icon,walletName:null===n||void 0===n?void 0:n.adapter.name}};const r=n(5059),i=n(2176)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,i){if(1&i&&(r=this(r)),8&i)return r;if("object"===typeof r&&r){if(4&i&&r.__esModule)return r;if(16&i&&"function"===typeof r.then)return r}var o=Object.create(null);n.r(o);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&i&&r;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(e=>s[e]=()=>r[e]);return s.default=()=>r,n.d(o,s),o}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>"static/js/"+e+"."+{29:"8d088763",127:"6f28ac63",288:"51cc5192",435:"8081f498",578:"67e35af4",700:"6c474807",817:"bf92ca72",921:"58d10f34"}[e]+".chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="@metamask/browser-playground:";n.l=(r,i,o,s)=>{if(e[r])e[r].push(i);else{var a,c;if(void 0!==o)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+o){a=d;break}}a||(c=!0,(a=document.createElement("script")).charset="utf-8",n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack",t+o),a.src=r),e[r]=[i];var h=(t,n)=>{a.onerror=a.onload=null,clearTimeout(f);var i=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach(e=>e(n)),t)return t(n)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),c&&document.head.appendChild(a)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.p="./",(()=>{var e={792:0};n.f.j=(t,r)=>{var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise((n,r)=>i=e[t]=[n,r]);r.push(i[2]=o);var s=n.p+n.u(t),a=new Error;n.l(s,r=>{if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,i[1](a)}},"chunk-"+t,t)}};var t=(t,r)=>{var i,o,[s,a,c]=r,l=0;if(s.some(t=>0!==e[t])){for(i in a)n.o(a,i)&&(n.m[i]=a[i]);if(c)c(n)}for(t&&t(r);l<s.length;l++)o=s[l],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunk_metamask_browser_playground=self.webpackChunk_metamask_browser_playground||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";var e,t,r=n(2176),i=n(9454);function o(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function s(e,t,n){o(e,t),t.set(e,n)}function a(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function c(e,t,n){return e.set(a(e,t),n),n}function l(e,t){return e.get(a(e,t))}var u={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},d=new(e=new WeakMap,t=new WeakMap,class{constructor(){s(this,e,u),s(this,t,!1)}setTimeoutProvider(t){c(e,this,t)}setTimeout(t,n){return l(e,this).setTimeout(t,n)}clearTimeout(t){l(e,this).clearTimeout(t)}setInterval(t,n){return l(e,this).setInterval(t,n)}clearInterval(t){l(e,this).clearInterval(t)}});function h(){}function f(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,r=null;return function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];t=o,null===r&&(r=d.setTimeout(()=>{e(...t),r=null},n))}}var p=n(9740),m="undefined"===typeof window||"Deno"in globalThis;function g(){}function b(e){return"number"===typeof e&&e>=0&&e!==1/0}function y(e,t){return Math.max(e+(t||0)-Date.now(),0)}function v(e,t){return"function"===typeof e?e(t):e}function w(e,t){return"function"===typeof e?e(t):e}function _(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s)if(r){if(t.queryHash!==x(s,t.options))return!1}else if(!E(t.queryKey,s))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!==typeof a||t.isStale()===a)&&((!i||i===t.state.fetchStatus)&&!(o&&!o(t)))}function k(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(S(t.options.mutationKey)!==S(o))return!1}else if(!E(t.options.mutationKey,o))return!1}return(!r||t.state.status===r)&&!(i&&!i(t))}function x(e,t){return((null===t||void 0===t?void 0:t.queryKeyHashFn)||S)(e)}function S(e){return JSON.stringify(e,(e,t)=>M(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function E(e,t){return e===t||typeof e===typeof t&&(!(!e||!t||"object"!==typeof e||"object"!==typeof t)&&Object.keys(t).every(n=>E(e[n],t[n])))}var A=Object.prototype.hasOwnProperty;function P(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e===t)return e;if(n>500)return t;const r=I(e)&&I(t);if(!r&&(!M(e)||!M(t)))return t;const i=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),s=o.length,a=r?new Array(s):{};let c=0;for(let l=0;l<s;l++){const s=r?l:o[l],u=e[s],d=t[s];if(u===d){a[s]=u,(r?l<i:A.call(e,s))&&c++;continue}if(null===u||null===d||"object"!==typeof u||"object"!==typeof d){a[s]=d;continue}const h=P(u,d,n+1);a[s]=h,h===u&&c++}return i===s&&c===i?e:a}function C(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function I(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function M(e){if(!T(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!T(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function T(e){return"[object Object]"===Object.prototype.toString.call(e)}function O(e,t,n){return"function"===typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?P(e,t):t}function N(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=[...e,t];return n&&r.length>n?r.slice(1):r}function B(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var R=Symbol();function j(e,t){return!e.queryFn&&null!==t&&void 0!==t&&t.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==R?e.queryFn:()=>Promise.reject(new Error("Missing queryFn: '".concat(e.queryHash,"'")))}function L(e,t){return"function"===typeof e?e(...t):!!e}function F(e,t){o(e,t),t.add(e)}var z=function(e){setTimeout(e,0)};var D,U,W,q,H,K,V=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=z;const o=r=>{t?e.push(r):i(()=>{n(r)})};return{batch:o=>{let s;t++;try{s=o()}finally{t--,t||(()=>{const t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})})()}return s},batchCalls:e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];o(()=>{e(...n)})},schedule:o,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}(),$=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},G=new(D=new WeakMap,U=new WeakMap,W=new WeakMap,class extends ${constructor(){super(),s(this,D,void 0),s(this,U,void 0),s(this,W,void 0),c(W,this,e=>{if(!m&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){l(U,this)||this.setEventListener(l(W,this))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=l(U,this))||void 0===e||e.call(this),c(U,this,void 0))}setEventListener(e){var t;c(W,this,e),null===(t=l(U,this))||void 0===t||t.call(this),c(U,this,e(e=>{"boolean"===typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){l(D,this)!==e&&(c(D,this,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return"boolean"===typeof l(D,this)?l(D,this):"hidden"!==(null===(e=globalThis.document)||void 0===e?void 0:e.visibilityState)}}),Z=new(q=new WeakMap,H=new WeakMap,K=new WeakMap,class extends ${constructor(){super(),s(this,q,!0),s(this,H,void 0),s(this,K,void 0),c(K,this,e=>{if(!m&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}})}onSubscribe(){l(H,this)||this.setEventListener(l(K,this))}onUnsubscribe(){var e;this.hasListeners()||(null===(e=l(H,this))||void 0===e||e.call(this),c(H,this,void 0))}setEventListener(e){var t;c(K,this,e),null===(t=l(H,this))||void 0===t||t.call(this),c(H,this,e(this.setOnline.bind(this)))}setOnline(e){l(q,this)!==e&&(c(q,this,e),this.listeners.forEach(t=>{t(e)}))}isOnline(){return l(q,this)}});function J(){let e,t;const n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}function Y(e){return Math.min(1e3*2**e,3e4)}function Q(e){return"online"!==(null!==e&&void 0!==e?e:"online")||Z.isOnline()}var X,ee=class extends Error{constructor(e){super("CancelledError"),this.revert=null===e||void 0===e?void 0:e.revert,this.silent=null===e||void 0===e?void 0:e.silent}};function te(e){let t,n=!1,r=0;const i=J(),o=()=>"pending"!==i.status,s=()=>G.isFocused()&&("always"===e.networkMode||Z.isOnline())&&e.canRun(),a=()=>Q(e.networkMode)&&e.canRun(),c=e=>{var n;o()||(null===(n=t)||void 0===n||n(),i.resolve(e))},l=e=>{var n;o()||(null===(n=t)||void 0===n||n(),i.reject(e))},u=()=>new Promise(n=>{var r;t=e=>{(o()||s())&&n(e)},null===(r=e.onPause)||void 0===r||r.call(e)}).then(()=>{var n;(t=void 0,o())||(null===(n=e.onContinue)||void 0===n||n.call(e))}),h=()=>{if(o())return;let t;const i=0===r?e.initialPromise:void 0;try{t=null!==i&&void 0!==i?i:e.fn()}catch(a){t=Promise.reject(a)}Promise.resolve(t).then(c).catch(t=>{var i,a,c;if(o())return;const f=null!==(i=e.retry)&&void 0!==i?i:m?0:3,p=null!==(a=e.retryDelay)&&void 0!==a?a:Y,g="function"===typeof p?p(r,t):p,b=!0===f||"number"===typeof f&&r<f||"function"===typeof f&&f(r,t);var y;!n&&b?(r++,null===(c=e.onFail)||void 0===c||c.call(e,r,t),(y=g,new Promise(e=>{d.setTimeout(e,y)})).then(()=>s()?void 0:u()).then(()=>{n?l(t):h()})):l(t)})};return{promise:i,status:()=>i.status,cancel:t=>{if(!o()){var n;const r=new ee(t);l(r),null===(n=e.onCancel)||void 0===n||n.call(e,r)}},continue:()=>{var e;return null===(e=t)||void 0===e||e(),i},cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:a,start:()=>(a()?h():u().then(h),i)}}var ne,re,ie,oe,se,ae,ce,le,ue,de=(X=new WeakMap,class{constructor(){s(this,X,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),b(this.gcTime)&&c(X,this,d.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,null!==e&&void 0!==e?e:m?1/0:3e5)}clearGcTimeout(){l(X,this)&&(d.clearTimeout(l(X,this)),c(X,this,void 0))}}),he=(ne=new WeakMap,re=new WeakMap,ie=new WeakMap,oe=new WeakMap,se=new WeakMap,ae=new WeakMap,ce=new WeakMap,le=new WeakSet,class extends de{constructor(e){var t;super(),F(this,le),s(this,ne,void 0),s(this,re,void 0),s(this,ie,void 0),s(this,oe,void 0),s(this,se,void 0),s(this,ae,void 0),s(this,ce,void 0),c(ce,this,!1),c(ae,this,e.defaultOptions),this.setOptions(e.options),this.observers=[],c(oe,this,e.client),c(ie,this,l(oe,this).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,c(ne,this,ge(this.options)),this.state=null!==(t=e.state)&&void 0!==t?t:l(ne,this),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return null===(e=l(se,this))||void 0===e?void 0:e.promise}setOptions(e){if(this.options=(0,p.A)((0,p.A)({},l(ae,this)),e),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=ge(this.options);void 0!==e.data&&(this.setState(me(e.data,e.dataUpdatedAt)),c(ne,this,e))}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||l(ie,this).remove(this)}setData(e,t){const n=O(this.state.data,e,this.options);return a(le,this,fe).call(this,{data:n,type:"success",dataUpdatedAt:null===t||void 0===t?void 0:t.updatedAt,manual:null===t||void 0===t?void 0:t.manual}),n}setState(e,t){a(le,this,fe).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var t,n;const r=null===(t=l(se,this))||void 0===t?void 0:t.promise;return null===(n=l(se,this))||void 0===n||n.cancel(e),r?r.then(g).catch(g):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(l(ne,this))}isActive(){return this.observers.some(e=>!1!==w(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===R||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===v(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!y(this.state.dataUpdatedAt,e))}onFocus(){var e;const t=this.observers.find(e=>e.shouldFetchOnWindowFocus());null===t||void 0===t||t.refetch({cancelRefetch:!1}),null===(e=l(se,this))||void 0===e||e.continue()}onOnline(){var e;const t=this.observers.find(e=>e.shouldFetchOnReconnect());null===t||void 0===t||t.refetch({cancelRefetch:!1}),null===(e=l(se,this))||void 0===e||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),l(ie,this).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(l(se,this)&&(l(ce,this)?l(se,this).cancel({revert:!0}):l(se,this).cancelRetry()),this.scheduleGc()),l(ie,this).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||a(le,this,fe).call(this,{type:"invalidate"})}async fetch(e,t){var n,r,i;if("idle"!==this.state.fetchStatus&&"rejected"!==(null===(n=l(se,this))||void 0===n?void 0:n.status()))if(void 0!==this.state.data&&null!==t&&void 0!==t&&t.cancelRefetch)this.cancel({silent:!0});else if(l(se,this))return l(se,this).continueRetry(),l(se,this).promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}const o=new AbortController,s=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(c(ce,this,!0),o.signal)})},u=()=>{const e=j(this.options,t),n=(()=>{const e={client:l(oe,this),queryKey:this.queryKey,meta:this.meta};return s(e),e})();return c(ce,this,!1),this.options.persister?this.options.persister(e,n,this):e(n)},d=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:l(oe,this),state:this.state,fetchFn:u};return s(e),e})();var h;(null===(r=this.options.behavior)||void 0===r||r.onFetch(d,this),c(re,this,this.state),"idle"===this.state.fetchStatus||this.state.fetchMeta!==(null===(i=d.fetchOptions)||void 0===i?void 0:i.meta))&&a(le,this,fe).call(this,{type:"fetch",meta:null===(h=d.fetchOptions)||void 0===h?void 0:h.meta});c(se,this,te({initialPromise:null===t||void 0===t?void 0:t.initialPromise,fn:d.fetchFn,onCancel:e=>{e instanceof ee&&e.revert&&this.setState((0,p.A)((0,p.A)({},l(re,this)),{},{fetchStatus:"idle"})),o.abort()},onFail:(e,t)=>{a(le,this,fe).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{a(le,this,fe).call(this,{type:"pause"})},onContinue:()=>{a(le,this,fe).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{var f,m,g,b;const e=await l(se,this).start();if(void 0===e)throw new Error("".concat(this.queryHash," data is undefined"));return this.setData(e),null===(f=(m=l(ie,this).config).onSuccess)||void 0===f||f.call(m,e,this),null===(g=(b=l(ie,this).config).onSettled)||void 0===g||g.call(b,e,this.state.error,this),e}catch(k){var y,v,w,_;if(k instanceof ee){if(k.silent)return l(se,this).promise;if(k.revert){if(void 0===this.state.data)throw k;return this.state.data}}throw a(le,this,fe).call(this,{type:"error",error:k}),null===(y=(v=l(ie,this).config).onError)||void 0===y||y.call(v,k,this),null===(w=(_=l(ie,this).config).onSettled)||void 0===w||w.call(_,this.state.data,k,this),k}finally{this.scheduleGc()}}});function fe(e){this.state=(t=>{var n;switch(e.type){case"failed":return(0,p.A)((0,p.A)({},t),{},{fetchFailureCount:e.failureCount,fetchFailureReason:e.error});case"pause":return(0,p.A)((0,p.A)({},t),{},{fetchStatus:"paused"});case"continue":return(0,p.A)((0,p.A)({},t),{},{fetchStatus:"fetching"});case"fetch":return(0,p.A)((0,p.A)((0,p.A)({},t),pe(t.data,this.options)),{},{fetchMeta:null!==(n=e.meta)&&void 0!==n?n:null});case"success":const r=(0,p.A)((0,p.A)((0,p.A)({},t),me(e.data,e.dataUpdatedAt)),{},{dataUpdateCount:t.dataUpdateCount+1},!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null});return c(re,this,e.manual?r:void 0),r;case"error":const i=e.error;return(0,p.A)((0,p.A)({},t),{},{error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0});case"invalidate":return(0,p.A)((0,p.A)({},t),{},{isInvalidated:!0});case"setState":return(0,p.A)((0,p.A)({},t),e.state)}})(this.state),V.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),l(ie,this).notify({query:this,type:"updated",action:e})})}function pe(e,t){return(0,p.A)({fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Q(t.networkMode)?"fetching":"paused"},void 0===e&&{error:null,status:"pending"})}function me(e,t){return{data:e,dataUpdatedAt:null!==t&&void 0!==t?t:Date.now(),error:null,isInvalidated:!1,status:"success"}}function ge(e){const t="function"===typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"===typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?null!==r&&void 0!==r?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var be,ye,ve,we,_e,ke,xe,Se,Ee=(ue=new WeakMap,class extends ${constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),s(this,ue,void 0),this.config=e,c(ue,this,new Map)}build(e,t,n){var r;const i=t.queryKey,o=null!==(r=t.queryHash)&&void 0!==r?r:x(i,t);let s=this.get(o);return s||(s=new he({client:e,queryKey:i,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){l(ue,this).has(e.queryHash)||(l(ue,this).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=l(ue,this).get(e.queryHash);t&&(e.destroy(),t===e&&l(ue,this).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){V.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return l(ue,this).get(e)}getAll(){return[...l(ue,this).values()]}find(e){const t=(0,p.A)({exact:!0},e);return this.getAll().find(e=>_(t,e))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>_(e,t)):t}notify(e){V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){V.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){V.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}}),Ae=(be=new WeakMap,ye=new WeakMap,ve=new WeakMap,we=new WeakMap,_e=new WeakSet,class extends de{constructor(e){super(),F(this,_e),s(this,be,void 0),s(this,ye,void 0),s(this,ve,void 0),s(this,we,void 0),c(be,this,e.client),this.mutationId=e.mutationId,c(ve,this,e.mutationCache),c(ye,this,[]),this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){l(ye,this).includes(e)||(l(ye,this).push(e),this.clearGcTimeout(),l(ve,this).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){c(ye,this,l(ye,this).filter(t=>t!==e)),this.scheduleGc(),l(ve,this).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){l(ye,this).length||("pending"===this.state.status?this.scheduleGc():l(ve,this).remove(this))}continue(){var e,t;return null!==(e=null===(t=l(we,this))||void 0===t?void 0:t.continue())&&void 0!==e?e:this.execute(this.state.variables)}async execute(e){var t;const n=()=>{a(_e,this,Pe).call(this,{type:"continue"})},r={client:l(be,this),meta:this.options.meta,mutationKey:this.options.mutationKey};c(we,this,te({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{a(_e,this,Pe).call(this,{type:"failed",failureCount:e,error:t})},onPause:()=>{a(_e,this,Pe).call(this,{type:"pause"})},onContinue:n,retry:null!==(t=this.options.retry)&&void 0!==t?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>l(ve,this).canRun(this)}));const i="pending"===this.state.status,o=!l(we,this).canStart();try{var s,u,d,h,f,p,m,g;if(i)n();else{var b,y;a(_e,this,Pe).call(this,{type:"pending",variables:e,isPaused:o}),l(ve,this).config.onMutate&&await l(ve,this).config.onMutate(e,this,r);const t=await(null===(b=(y=this.options).onMutate)||void 0===b?void 0:b.call(y,e,r));t!==this.state.context&&a(_e,this,Pe).call(this,{type:"pending",context:t,variables:e,isPaused:o})}const t=await l(we,this).start();return await(null===(s=(u=l(ve,this).config).onSuccess)||void 0===s?void 0:s.call(u,t,e,this.state.context,this,r)),await(null===(d=(h=this.options).onSuccess)||void 0===d?void 0:d.call(h,t,e,this.state.context,r)),await(null===(f=(p=l(ve,this).config).onSettled)||void 0===f?void 0:f.call(p,t,null,this.state.variables,this.state.context,this,r)),await(null===(m=(g=this.options).onSettled)||void 0===m?void 0:m.call(g,t,null,e,this.state.context,r)),a(_e,this,Pe).call(this,{type:"success",data:t}),t}catch(P){try{var v,w;await(null===(v=(w=l(ve,this).config).onError)||void 0===v?void 0:v.call(w,P,e,this.state.context,this,r))}catch(C){Promise.reject(C)}try{var _,k;await(null===(_=(k=this.options).onError)||void 0===_?void 0:_.call(k,P,e,this.state.context,r))}catch(C){Promise.reject(C)}try{var x,S;await(null===(x=(S=l(ve,this).config).onSettled)||void 0===x?void 0:x.call(S,void 0,P,this.state.variables,this.state.context,this,r))}catch(C){Promise.reject(C)}try{var E,A;await(null===(E=(A=this.options).onSettled)||void 0===E?void 0:E.call(A,void 0,P,e,this.state.context,r))}catch(C){Promise.reject(C)}throw a(_e,this,Pe).call(this,{type:"error",error:P}),P}finally{l(ve,this).runNext(this)}}});function Pe(e){this.state=(t=>{switch(e.type){case"failed":return(0,p.A)((0,p.A)({},t),{},{failureCount:e.failureCount,failureReason:e.error});case"pause":return(0,p.A)((0,p.A)({},t),{},{isPaused:!0});case"continue":return(0,p.A)((0,p.A)({},t),{},{isPaused:!1});case"pending":return(0,p.A)((0,p.A)({},t),{},{context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()});case"success":return(0,p.A)((0,p.A)({},t),{},{data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1});case"error":return(0,p.A)((0,p.A)({},t),{},{data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"})}})(this.state),V.batch(()=>{l(ye,this).forEach(t=>{t.onMutationUpdate(e)}),l(ve,this).notify({mutation:this,type:"updated",action:e})})}var Ce,Ie,Me,Te,Oe,Ne,Be,Re,je=(ke=new WeakMap,xe=new WeakMap,Se=new WeakMap,class extends ${constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),s(this,ke,void 0),s(this,xe,void 0),s(this,Se,void 0),this.config=e,c(ke,this,new Set),c(xe,this,new Map),c(Se,this,0)}build(e,t,n){var r;const i=new Ae({client:e,mutationCache:this,mutationId:c(Se,this,(r=l(Se,this),++r)),options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){l(ke,this).add(e);const t=Le(e);if("string"===typeof t){const n=l(xe,this).get(t);n?n.push(e):l(xe,this).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(l(ke,this).delete(e)){const t=Le(e);if("string"===typeof t){const n=l(xe,this).get(t);if(n)if(n.length>1){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&l(xe,this).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Le(e);if("string"===typeof t){const n=l(xe,this).get(t),r=null===n||void 0===n?void 0:n.find(e=>"pending"===e.state.status);return!r||r===e}return!0}runNext(e){const t=Le(e);if("string"===typeof t){var n,r;const i=null===(n=l(xe,this).get(t))||void 0===n?void 0:n.find(t=>t!==e&&t.state.isPaused);return null!==(r=null===i||void 0===i?void 0:i.continue())&&void 0!==r?r:Promise.resolve()}return Promise.resolve()}clear(){V.batch(()=>{l(ke,this).forEach(e=>{this.notify({type:"removed",mutation:e})}),l(ke,this).clear(),l(xe,this).clear()})}getAll(){return Array.from(l(ke,this))}find(e){const t=(0,p.A)({exact:!0},e);return this.getAll().find(e=>k(t,e))}findAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getAll().filter(t=>k(e,t))}notify(e){V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return V.batch(()=>Promise.all(e.map(e=>e.continue().catch(g))))}});function Le(e){var t;return null===(t=e.options.scope)||void 0===t?void 0:t.id}function Fe(e){return{onFetch:(t,n)=>{var r,i,o;const s=t.options,a=null===(r=t.fetchOptions)||void 0===r||null===(r=r.meta)||void 0===r||null===(r=r.fetchMore)||void 0===r?void 0:r.direction,c=(null===(i=t.state.data)||void 0===i?void 0:i.pages)||[],l=(null===(o=t.state.data)||void 0===o?void 0:o.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const h=async()=>{let n=!1;const r=e=>{!function(e,t,n){let r,i=!1;Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(null!==r&&void 0!==r||(r=t()),i||(i=!0,r.aborted?n():r.addEventListener("abort",n,{once:!0})),r)})}(e,()=>t.signal,()=>n=!0)},i=j(t.options,t.fetchOptions),o=async(e,o,s)=>{if(n)return Promise.reject();if(null==o&&e.pages.length)return Promise.resolve(e);const a=(()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:o,direction:s?"backward":"forward",meta:t.options.meta};return r(e),e})(),c=await i(a),{maxPages:l}=t.options,u=s?B:N;return{pages:u(e.pages,c,l),pageParams:u(e.pageParams,o,l)}};if(a&&c.length){const e="backward"===a,t={pages:c,pageParams:l},n=(e?De:ze)(s,t);u=await o(t,n,e)}else{const t=null!==e&&void 0!==e?e:c.length;do{var h;const e=0===d?null!==(h=l[0])&&void 0!==h?h:s.initialPageParam:ze(s,u);if(d>0&&null==e)break;u=await o(u,e),d++}while(d<t)}return u};t.options.persister?t.fetchFn=()=>{var e,r;return null===(e=(r=t.options).persister)||void 0===e?void 0:e.call(r,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=h}}}function ze(e,t){let{pages:n,pageParams:r}=t;const i=n.length-1;return n.length>0?e.getNextPageParam(n[i],n,r[i],r):void 0}function De(e,t){var n;let{pages:r,pageParams:i}=t;return r.length>0?null===(n=e.getPreviousPageParam)||void 0===n?void 0:n.call(e,r[0],r,i[0],i):void 0}var Ue=(Ce=new WeakMap,Ie=new WeakMap,Me=new WeakMap,Te=new WeakMap,Oe=new WeakMap,Ne=new WeakMap,Be=new WeakMap,Re=new WeakMap,class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};s(this,Ce,void 0),s(this,Ie,void 0),s(this,Me,void 0),s(this,Te,void 0),s(this,Oe,void 0),s(this,Ne,void 0),s(this,Be,void 0),s(this,Re,void 0),c(Ce,this,e.queryCache||new Ee),c(Ie,this,e.mutationCache||new je),c(Me,this,e.defaultOptions||{}),c(Te,this,new Map),c(Oe,this,new Map),c(Ne,this,0)}mount(){var e;c(Ne,this,(e=l(Ne,this),e++,e)),1===l(Ne,this)&&(c(Be,this,G.subscribe(async e=>{e&&(await this.resumePausedMutations(),l(Ce,this).onFocus())})),c(Re,this,Z.subscribe(async e=>{e&&(await this.resumePausedMutations(),l(Ce,this).onOnline())})))}unmount(){var e,t,n;c(Ne,this,(e=l(Ne,this),e--,e)),0===l(Ne,this)&&(null===(t=l(Be,this))||void 0===t||t.call(this),c(Be,this,void 0),null===(n=l(Re,this))||void 0===n||n.call(this),c(Re,this,void 0))}isFetching(e){return l(Ce,this).findAll((0,p.A)((0,p.A)({},e),{},{fetchStatus:"fetching"})).length}isMutating(e){return l(Ie,this).findAll((0,p.A)((0,p.A)({},e),{},{status:"pending"})).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null===(t=l(Ce,this).get(n.queryHash))||void 0===t?void 0:t.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=l(Ce,this).build(this,t),r=n.state.data;return void 0===r?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(v(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return l(Ce,this).findAll(e).map(e=>{let{queryKey:t,state:n}=e;return[t,n.data]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=l(Ce,this).get(r.queryHash),o=function(e,t){return"function"===typeof e?e(t):e}(t,null===i||void 0===i?void 0:i.state.data);if(void 0!==o)return l(Ce,this).build(this,r).setData(o,(0,p.A)((0,p.A)({},n),{},{manual:!0}))}setQueriesData(e,t,n){return V.batch(()=>l(Ce,this).findAll(e).map(e=>{let{queryKey:r}=e;return[r,this.setQueryData(r,t,n)]}))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return null===(t=l(Ce,this).get(n.queryHash))||void 0===t?void 0:t.state}removeQueries(e){const t=l(Ce,this);V.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const n=l(Ce,this);return V.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries((0,p.A)({type:"active"},e),t)))}cancelQueries(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(0,p.A)({revert:!0},t),r=V.batch(()=>l(Ce,this).findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(g).catch(g)}invalidateQueries(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return V.batch(()=>{var n,r;return l(Ce,this).findAll(e).forEach(e=>{e.invalidate()}),"none"===(null===e||void 0===e?void 0:e.refetchType)?Promise.resolve():this.refetchQueries((0,p.A)((0,p.A)({},e),{},{type:null!==(n=null!==(r=null===e||void 0===e?void 0:e.refetchType)&&void 0!==r?r:null===e||void 0===e?void 0:e.type)&&void 0!==n?n:"active"}),t)})}refetchQueries(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(0,p.A)((0,p.A)({},n),{},{cancelRefetch:null===(t=n.cancelRefetch)||void 0===t||t}),i=V.batch(()=>l(Ce,this).findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(g)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(i).then(g)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=l(Ce,this).build(this,t);return n.isStaleByTime(v(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(g).catch(g)}fetchInfiniteQuery(e){return e.behavior=Fe(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(g).catch(g)}ensureInfiniteQueryData(e){return e.behavior=Fe(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Z.isOnline()?l(Ie,this).resumePausedMutations():Promise.resolve()}getQueryCache(){return l(Ce,this)}getMutationCache(){return l(Ie,this)}getDefaultOptions(){return l(Me,this)}setDefaultOptions(e){c(Me,this,e)}setQueryDefaults(e,t){l(Te,this).set(S(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...l(Te,this).values()],n={};return t.forEach(t=>{E(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){l(Oe,this).set(S(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...l(Oe,this).values()],n={};return t.forEach(t=>{E(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t=(0,p.A)((0,p.A)((0,p.A)((0,p.A)({},l(Me,this).queries),this.getQueryDefaults(e.queryKey)),e),{},{_defaulted:!0});return t.queryHash||(t.queryHash=x(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===R&&(t.enabled=!1),t}defaultMutationOptions(e){return null!==e&&void 0!==e&&e._defaulted?e:(0,p.A)((0,p.A)((0,p.A)((0,p.A)({},l(Me,this).mutations),(null===e||void 0===e?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey)),e),{},{_defaulted:!0})}clear(){l(Ce,this).clear(),l(Ie,this).clear()}}),We=n(4223);const qe=["state"],He=["fetchStatus"];function Ke(e){return e}function Ve(e){return(0,p.A)((0,p.A)({mutationKey:e.options.mutationKey,state:e.state},e.options.scope&&{scope:e.options.scope}),e.meta&&{meta:e.meta})}function $e(e,t,n){return(0,p.A)((0,p.A)({dehydratedAt:Date.now(),state:(0,p.A)((0,p.A)({},e.state),void 0!==e.state.data&&{data:t(e.state.data)}),queryKey:e.queryKey,queryHash:e.queryHash},"pending"===e.state.status&&{promise:(()=>{var r;const i=null===(r=e.promise)||void 0===r?void 0:r.then(t).catch(e=>n(e)?Promise.reject(new Error("redacted")):Promise.reject(e));return null===i||void 0===i||i.catch(g),i})()}),e.meta&&{meta:e.meta})}function Ge(e){return e.state.isPaused}function Ze(e){return"success"===e.state.status}function Je(e){return!0}function Ye(e){var t,n,r,i,o,s,a,c,l,u,d,h;let f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const p=null!==(t=null!==(n=f.shouldDehydrateMutation)&&void 0!==n?n:null===(r=e.getDefaultOptions().dehydrate)||void 0===r?void 0:r.shouldDehydrateMutation)&&void 0!==t?t:Ge,m=e.getMutationCache().getAll().flatMap(e=>p(e)?[Ve(e)]:[]),g=null!==(i=null!==(o=f.shouldDehydrateQuery)&&void 0!==o?o:null===(s=e.getDefaultOptions().dehydrate)||void 0===s?void 0:s.shouldDehydrateQuery)&&void 0!==i?i:Ze,b=null!==(a=null!==(c=f.shouldRedactErrors)&&void 0!==c?c:null===(l=e.getDefaultOptions().dehydrate)||void 0===l?void 0:l.shouldRedactErrors)&&void 0!==a?a:Je,y=null!==(u=null!==(d=f.serializeData)&&void 0!==d?d:null===(h=e.getDefaultOptions().dehydrate)||void 0===h?void 0:h.serializeData)&&void 0!==u?u:Ke;return{mutations:m,queries:e.getQueryCache().getAll().flatMap(e=>g(e)?[$e(e,y,b)]:[])}}function Qe(e,t,n){var r,i,o,s;if("object"!==typeof t||null===t)return;const a=e.getMutationCache(),c=e.getQueryCache(),l=null!==(r=null!==(i=null===n||void 0===n||null===(o=n.defaultOptions)||void 0===o?void 0:o.deserializeData)&&void 0!==i?i:null===(s=e.getDefaultOptions().hydrate)||void 0===s?void 0:s.deserializeData)&&void 0!==r?r:Ke,u=t.mutations||[],d=t.queries||[];u.forEach(t=>{var r,i;let{state:o}=t,s=(0,We.A)(t,qe);a.build(e,(0,p.A)((0,p.A)((0,p.A)({},null===(r=e.getDefaultOptions().hydrate)||void 0===r?void 0:r.mutations),null===n||void 0===n||null===(i=n.defaultOptions)||void 0===i?void 0:i.mutations),s),o)}),d.forEach(t=>{var r,i;let{queryKey:o,state:s,queryHash:a,meta:u,promise:d,dehydratedAt:h}=t;const f=d?function(e){var t;let n;if(null===(t=e.then(e=>(n=e,e),g))||void 0===t||t.catch(g),void 0!==n)return{data:n}}(d):void 0,m=void 0===s.data?null===f||void 0===f?void 0:f.data:s.data,b=void 0===m?m:l(m);let y=c.get(a);const v="pending"===(null===(r=y)||void 0===r?void 0:r.state.status),w="fetching"===(null===(i=y)||void 0===i?void 0:i.state.fetchStatus);if(y){const e=f&&void 0!==h&&h>y.state.dataUpdatedAt;if(s.dataUpdatedAt>y.state.dataUpdatedAt||e){const{fetchStatus:e}=s,t=(0,We.A)(s,He);y.setState((0,p.A)((0,p.A)({},t),{},{data:b}))}}else{var _,k;y=c.build(e,(0,p.A)((0,p.A)((0,p.A)({},null===(_=e.getDefaultOptions().hydrate)||void 0===_?void 0:_.queries),null===n||void 0===n||null===(k=n.defaultOptions)||void 0===k?void 0:k.queries),{},{queryKey:o,queryHash:a,meta:u}),(0,p.A)((0,p.A)({},s),{},{data:b,fetchStatus:"idle",status:void 0!==b?"success":s.status}))}d&&!v&&!w&&(void 0===h||h>y.state.dataUpdatedAt)&&y.fetch(void 0,{initialPromise:Promise.resolve(d).then(l)}).catch(g)})}var Xe=["added","removed","updated"];function et(e){return Xe.includes(e)}async function tt(e){let{queryClient:t,persister:n,maxAge:r=864e5,buster:i="",hydrateOptions:o}=e;try{const e=await n.restoreClient();if(e){if(!e.timestamp)return n.removeClient();{const s=Date.now()-e.timestamp>r,a=e.buster!==i;if(s||a)return n.removeClient();Qe(t,e.clientState,o)}}}catch(s){throw await n.removeClient(),s}}async function nt(e){let{queryClient:t,persister:n,buster:r="",dehydrateOptions:i}=e;const o={buster:r,timestamp:Date.now(),clientState:Ye(t,i)};await n.persistClient(o)}function rt(e){const t=e.queryClient.getQueryCache().subscribe(t=>{et(t.type)&&nt(e)}),n=e.queryClient.getMutationCache().subscribe(t=>{et(t.type)&&nt(e)});return()=>{t(),n()}}var it=n(812),ot=r.createContext(void 0),st=e=>{const t=r.useContext(ot);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},at=e=>{let{client:t,children:n}=e;return r.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,it.jsx)(ot.Provider,{value:t,children:n})},ct=r.createContext(!1),lt=ct.Provider;const ut=["children","persistOptions","onSuccess","onError"];var dt=e=>{let{children:t,persistOptions:n,onSuccess:i,onError:o}=e,s=(0,We.A)(e,ut);const[a,c]=r.useState(!0),l=r.useRef({persistOptions:n,onSuccess:i,onError:o}),u=r.useRef(!1);return r.useEffect(()=>{l.current={persistOptions:n,onSuccess:i,onError:o}}),r.useEffect(()=>{const e=(0,p.A)((0,p.A)({},l.current.persistOptions),{},{queryClient:s.client});return u.current||(u.current=!0,tt(e).then(()=>{var e,t;return null===(e=(t=l.current).onSuccess)||void 0===e?void 0:e.call(t)}).catch(()=>{var e,t;return null===(e=(t=l.current).onError)||void 0===e?void 0:e.call(t)}).finally(()=>{c(!1)})),a?void 0:rt(e)},[s.client,a]),(0,it.jsx)(at,(0,p.A)((0,p.A)({},s),{},{children:(0,it.jsx)(lt,{value:a,children:t})}))};function ht(e,t){return e.slice(0,t).join(".")||"."}function ft(e,t){const{length:n}=e;for(let r=0;r<n;++r)if(e[r]===t)return r+1;return 0}function pt(e,t,n,r){return JSON.stringify(e,function(e,t){const n="function"===typeof e,r="function"===typeof t,i=[],o=[];return function(s,a){if("object"===typeof a)if(i.length){const e=ft(i,this);0===e?i[i.length]=this:(i.splice(e),o.splice(e)),o[o.length]=s;const n=ft(i,a);if(0!==n)return r?t.call(this,s,a,ht(o,n)):"[ref=".concat(ht(o,n),"]")}else i[0]=a,o[0]=s;return n?e.call(this,s,a):a}}((e,n)=>{var r;let i=n;return"bigint"===typeof i&&(i={__type:"bigint",value:n.toString()}),i instanceof Map&&(i={__type:"Map",value:Array.from(n.entries())}),null!==(r=null===t||void 0===t?void 0:t(e,i))&&void 0!==r?r:i},r),null!==n&&void 0!==n?n:void 0)}function mt(e,t){return JSON.parse(e,(e,n)=>{var r,i,o;let s=n;return"bigint"===(null===(r=s)||void 0===r?void 0:r.__type)&&(s=BigInt(s.value)),"Map"===(null===(i=s)||void 0===i?void 0:i.__type)&&(s=new Map(s.value)),null!==(o=null===t||void 0===t?void 0:t(e,s))&&void 0!==o?o:s})}let gt=!1;function bt(e,t){const{initialState:n,reconnectOnMount:r}=t;return n&&!e._internal.store.persist.hasHydrated()&&e.setState((0,p.A)((0,p.A)({},n),{},{chainId:e.chains.some(e=>e.id===n.chainId)?n.chainId:e.chains[0].id,connections:r?n.connections:new Map,status:r?"reconnecting":"disconnected"})),{async onMount(){e._internal.ssr&&(await e._internal.store.persist.rehydrate(),e._internal.mipd&&e._internal.connectors.setState(t=>{var n,r;const i=new Set;for(const e of null!==t&&void 0!==t?t:[])if(e.rdns){const t=Array.isArray(e.rdns)?e.rdns:[e.rdns];for(const e of t)i.add(e)}const o=[],s=null!==(n=null===(r=e._internal.mipd)||void 0===r?void 0:r.getProviders())&&void 0!==n?n:[];for(const a of s){if(i.has(a.info.rdns))continue;const t=e._internal.connectors.providerDetailToConnector(a),n=e._internal.connectors.setup(t);o.push(n)}return[...t,...o]})),r?async function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(gt)return[];gt=!0,e.setState(e=>(0,p.A)((0,p.A)({},e),{},{status:e.current?"reconnecting":"connecting"}));const r=[];if(null!==(t=n.connectors)&&void 0!==t&&t.length)for(const h of n.connectors){let t;t="function"===typeof h?e._internal.connectors.setup(h):h,r.push(t)}else r.push(...e.connectors);let i;try{var o;i=await(null===(o=e.storage)||void 0===o?void 0:o.getItem("recentConnectorId"))}catch(d){}const s={};for(const[,h]of e.state.connections)s[h.connector.id]=1;i&&(s[i]=0);const a=Object.keys(s).length>0?[...r].sort((e,t)=>{var n,r;return(null!==(n=s[e.id])&&void 0!==n?n:10)-(null!==(r=s[t.id])&&void 0!==r?r:10)}):r;let c=!1;const l=[],u=[];for(const h of a){const t=await h.getProvider().catch(()=>{});if(!t)continue;if(u.some(e=>e===t))continue;if(!await h.isAuthorized())continue;const n=await h.connect({isReconnecting:!0}).catch(()=>null);n&&(h.emitter.off("connect",e._internal.events.connect),h.emitter.on("change",e._internal.events.change),h.emitter.on("disconnect",e._internal.events.disconnect),e.setState(e=>{const t=new Map(c?e.connections:new Map).set(h.uid,{accounts:n.accounts,chainId:n.chainId,connector:h});return(0,p.A)((0,p.A)({},e),{},{current:c?e.current:h.uid,connections:t})}),l.push({accounts:n.accounts,chainId:n.chainId,connector:h}),u.push(t),c=!0)}"reconnecting"!==e.state.status&&"connecting"!==e.state.status||(c?e.setState(e=>(0,p.A)((0,p.A)({},e),{},{status:"connected"})):e.setState(e=>(0,p.A)((0,p.A)({},e),{},{connections:new Map,current:null,status:"disconnected"}))),gt=!1}(e):e.storage&&e.setState(e=>(0,p.A)((0,p.A)({},e),{},{connections:new Map}))}}}function yt(e){const{children:t,config:n,initialState:i,reconnectOnMount:o=!0}=e,{onMount:s}=bt(n,{initialState:i,reconnectOnMount:o});n._internal.ssr||s();const a=(0,r.useRef)(!0);return(0,r.useEffect)(()=>{if(a.current&&n._internal.ssr)return s(),()=>{a.current=!1}},[]),t}const vt=(0,r.createContext)(void 0);function wt(e){const{children:t,config:n}=e,i={value:n};return(0,r.createElement)(yt,e,(0,r.createElement)(vt.Provider,i,t))}var _t=n(444);function kt(e,t){if(e===t)return!0;if(e&&t&&"object"===typeof e&&"object"===typeof t){if(e.constructor!==t.constructor)return!1;let n,r;if(Array.isArray(e)&&Array.isArray(t)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!kt(e[r],t[r]))return!1;return!0}if("function"===typeof e.valueOf&&e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if("function"===typeof e.toString&&e.toString!==Object.prototype.toString)return e.toString()===t.toString();const i=Object.keys(e);if(n=i.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!Object.hasOwn(t,i[r]))return!1;for(r=n;0!==r--;){const n=i[r];if(n&&!kt(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function xt(e){const t=e.state.current,n=e.state.connections.get(t),r=null===n||void 0===n?void 0:n.accounts,i=null===r||void 0===r?void 0:r[0],o=e.chains.find(e=>e.id===(null===n||void 0===n?void 0:n.chainId)),s=e.state.status;switch(s){case"connected":return{address:i,addresses:r,chain:o,chainId:null===n||void 0===n?void 0:n.chainId,connector:null===n||void 0===n?void 0:n.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:s};case"reconnecting":return{address:i,addresses:r,chain:o,chainId:null===n||void 0===n?void 0:n.chainId,connector:null===n||void 0===n?void 0:n.connector,isConnected:!!i,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:s};case"connecting":return{address:i,addresses:r,chain:o,chainId:null===n||void 0===n?void 0:n.chainId,connector:null===n||void 0===n?void 0:n.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:s};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:s}}}const St=["connector"],Et=["connector"];const At="3.4.0";var Pt,Ct,It=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class Mt extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return"@wagmi/core@".concat(At)}constructor(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),Pt.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});const r=n.cause instanceof Mt?n.cause.details:null!==(t=n.cause)&&void 0!==t&&t.message?n.cause.message:n.details,i=n.cause instanceof Mt&&n.cause.docsPath||n.docsPath;this.message=[e||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...i?["Docs: ".concat(this.docsBaseUrl).concat(i,".html").concat(n.docsSlug?"#".concat(n.docsSlug):"")]:[],...r?["Details: ".concat(r)]:[],"Version: ".concat(this.version)].join("\n"),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=i,this.metaMessages=n.metaMessages,this.shortMessage=e}walk(e){return It(this,Pt,"m",Ct).call(this,this,e)}}Pt=new WeakSet,Ct=function e(t,n){return null!==n&&void 0!==n&&n(t)?t:t.cause?It(this,Pt,"m",e).call(this,t.cause,n):t};class Tt extends Mt{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return"wagmi@".concat("3.5.0")}}class Ot extends Tt{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function Nt(){var e;const t=null!==(e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).config)&&void 0!==e?e:(0,r.useContext)(vt);if(!t)throw new Ot;return t}var Bt=n(5987);const Rt=e=>"object"===typeof e&&!Array.isArray(e);function jt(){const e=Nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:kt;const o=(0,r.useRef)([]),s=(0,Bt.useSyncExternalStoreWithSelector)(e,t,n,e=>e,(e,t)=>{if(Rt(e)&&Rt(t)&&o.current.length){for(const n of o.current)if(!i(e[n],t[n]))return!1;return!0}return i(e,t)});return(0,r.useMemo)(()=>{if(Rt(s)){const e=(0,p.A)({},s);let t={};for(const[n,r]of Object.entries(e))t=(0,p.A)((0,p.A)({},t),{},{[n]:{configurable:!1,enumerable:!0,get:()=>(o.current.includes(n)||o.current.push(n),r)}});return Object.defineProperties(e,t),e}return s},[s])}(t=>function(e,t){const{onChange:n}=t;return e.subscribe(()=>xt(e),n,{equalityFn(e,t){const{connector:n}=e,r=(0,We.A)(e,St),{connector:i}=t;return kt(r,(0,We.A)(t,Et))&&(null===n||void 0===n?void 0:n.id)===(null===i||void 0===i?void 0:i.id)&&(null===n||void 0===n?void 0:n.uid)===(null===i||void 0===i?void 0:i.uid)}})}(e,{onChange:t}),()=>xt(e))}var Lt,Ft,zt,Dt,Ut,Wt=(Lt=new WeakMap,Ft=new WeakMap,zt=new WeakMap,Dt=new WeakMap,Ut=new WeakSet,class extends ${constructor(e,t){super(),F(this,Ut),s(this,Lt,void 0),s(this,Ft,void 0),s(this,zt,void 0),s(this,Dt,void 0),c(Lt,this,e),this.setOptions(t),this.bindMethods(),a(Ut,this,qt).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=l(Lt,this).defaultMutationOptions(e),C(this.options,n)||l(Lt,this).getMutationCache().notify({type:"observerOptionsUpdated",mutation:l(zt,this),observer:this}),null!==n&&void 0!==n&&n.mutationKey&&this.options.mutationKey&&S(n.mutationKey)!==S(this.options.mutationKey)?this.reset():"pending"===(null===(t=l(zt,this))||void 0===t?void 0:t.state.status)&&l(zt,this).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(null===(e=l(zt,this))||void 0===e||e.removeObserver(this))}onMutationUpdate(e){a(Ut,this,qt).call(this),a(Ut,this,Ht).call(this,e)}getCurrentResult(){return l(Ft,this)}reset(){var e;null===(e=l(zt,this))||void 0===e||e.removeObserver(this),c(zt,this,void 0),a(Ut,this,qt).call(this),a(Ut,this,Ht).call(this)}mutate(e,t){var n;return c(Dt,this,t),null===(n=l(zt,this))||void 0===n||n.removeObserver(this),c(zt,this,l(Lt,this).getMutationCache().build(l(Lt,this),this.options)),l(zt,this).addObserver(this),l(zt,this).execute(e)}});function qt(){var e,t;const n=null!==(e=null===(t=l(zt,this))||void 0===t?void 0:t.state)&&void 0!==e?e:{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0};c(Ft,this,(0,p.A)((0,p.A)({},n),{},{isPending:"pending"===n.status,isSuccess:"success"===n.status,isError:"error"===n.status,isIdle:"idle"===n.status,mutate:this.mutate,reset:this.reset}))}function Ht(e){V.batch(()=>{if(l(Dt,this)&&this.hasListeners()){const d=l(Ft,this).variables,h=l(Ft,this).context,f={client:l(Lt,this),meta:this.options.meta,mutationKey:this.options.mutationKey};if("success"===(null===e||void 0===e?void 0:e.type)){try{var t,n;null===(t=(n=l(Dt,this)).onSuccess)||void 0===t||t.call(n,e.data,d,h,f)}catch(u){Promise.reject(u)}try{var r,i;null===(r=(i=l(Dt,this)).onSettled)||void 0===r||r.call(i,e.data,null,d,h,f)}catch(u){Promise.reject(u)}}else if("error"===(null===e||void 0===e?void 0:e.type)){try{var o,s;null===(o=(s=l(Dt,this)).onError)||void 0===o||o.call(s,e.error,d,h,f)}catch(u){Promise.reject(u)}try{var a,c;null===(a=(c=l(Dt,this)).onSettled)||void 0===a||a.call(c,void 0,e.error,d,h,f)}catch(u){Promise.reject(u)}}}this.listeners.forEach(e=>{e(l(Ft,this))})})}function Kt(e,t){const n=st(t),[i]=r.useState(()=>new Wt(n,e));r.useEffect(()=>{i.setOptions(e)},[i,e]);const o=r.useSyncExternalStore(r.useCallback(e=>i.subscribe(V.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=r.useCallback((e,t)=>{i.mutate(e,t).catch(g)},[i]);if(o.error&&L(i.options.throwOnError,[o.error]))throw o.error;return(0,p.A)((0,p.A)({},o),{},{mutate:s,mutateAsync:o.mutate})}class Vt extends Mt{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class $t extends Mt{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class Gt extends Mt{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class Zt extends Mt{constructor(e){let{address:t,connector:n}=e;super('Account "'.concat(t,'" not found for connector "').concat(n.name,'".')),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class Jt extends Mt{constructor(e){let{connectionChainId:t,connectorChainId:n}=e;super("The current chain of the connector (id: ".concat(n,") does not match the connection's chain (id: ").concat(t,")."),{metaMessages:["Current Chain ID: ".concat(n),"Expected Chain ID: ".concat(t)]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class Yt extends Mt{constructor(e){let{connector:t}=e;super('Connector "'.concat(t.name,'" unavailable while reconnecting.'),{details:["During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`.","All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored.","This error commonly occurs for connectors that asynchronously inject after reconnection has already started."].join(" ")}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}const Qt=["connector"];function Xt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,p.A)((0,p.A)({},t.mutation),{},{mutationFn:async t=>async function(e,t){let n;if(n="function"===typeof t.connector?e._internal.connectors.setup(t.connector):t.connector,n.uid===e.state.current)throw new $t;try{var r;e.setState(e=>(0,p.A)((0,p.A)({},e),{},{status:"connecting"})),n.emitter.emit("message",{type:"connecting"});const{connector:i}=t,o=(0,We.A)(t,Qt),s=await n.connect(o);return n.emitter.off("connect",e._internal.events.connect),n.emitter.on("change",e._internal.events.change),n.emitter.on("disconnect",e._internal.events.disconnect),await(null===(r=e.storage)||void 0===r?void 0:r.setItem("recentConnectorId",n.id)),e.setState(e=>(0,p.A)((0,p.A)({},e),{},{connections:new Map(e.connections).set(n.uid,{accounts:o.withCapabilities?s.accounts.map(e=>"object"===typeof e?e.address:e):s.accounts,chainId:s.chainId,connector:n}),current:n.uid,status:"connected"})),{accounts:o.withCapabilities?s.accounts.map(e=>"object"===typeof e?e:{address:e,capabilities:{}}):s.accounts,chainId:s.chainId}}catch(i){throw e.setState(e=>(0,p.A)((0,p.A)({},e),{},{status:e.current?"connected":"disconnected"})),i}}(e,t),mutationKey:["connect"]})}let en=[];function tn(e){const t=e.connectors;return en.length===t.length&&en.every((e,n)=>e===t[n])?en:(en=t,t)}function nn(){const e=Nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return(0,r.useSyncExternalStore)(t=>function(e,t){const{onChange:n}=t;return e._internal.connectors.subscribe((e,t)=>{n(Object.values(e),t)})}(e,{onChange:t}),()=>tn(e),()=>tn(e))}var rn=n(5059),on=n(2349),sn=n.n(on),an=n(7663);const cn=e=>(0,an.nW)(e)?{namespace:e}:(0,an.K4)(e)?(0,an.rW)(e):{};var ln=Object.defineProperty,un=Object.defineProperties,dn=Object.getOwnPropertyDescriptors,hn=Object.getOwnPropertySymbols,fn=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,mn=(e,t,n)=>t in e?ln(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gn=(e,t)=>{for(var n in t||(t={}))fn.call(t,n)&&mn(e,n,t[n]);if(hn)for(var n of hn(t))pn.call(t,n)&&mn(e,n,t[n]);return e},bn=(e,t)=>un(e,dn(t)),yn={"Ethereum Mainnet":"eip155:1","Linea Mainnet":"eip155:59144","Arbitrum One":"eip155:42161","Avalanche Network C-Chain":"eip155:43114","BNB Chain":"eip155:56","OP Mainnet":"eip155:10","Polygon Mainnet":"eip155:137","zkSync Era Mainnet":"eip155:324","Base Mainnet":"eip155:8453","HyperEVM Mainnet":"eip155:999","MegaETH Mainnet":"eip155:4326","Monad Mainnet":"eip155:143","Sei Mainnet":"eip155:1329","Tempo Mainnet":"eip155:4217","Solana Mainnet":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","Localhost 8545":"eip155:1337"},vn={eth_sendTransaction:!0,eth_signTypedData_v4:!0,personal_sign:!0,eth_getBalance:!0,wallet_sendCalls:!0,wallet_getCapabilities:!0},wn=["wallet_registerOnboarding","wallet_scanQRCode"],_n=["wallet_addEthereumChain"],kn=["wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_revokePermissions","eth_requestAccounts","eth_accounts","eth_coinbase","net_version","metamask_logWeb3ShimUsage","metamask_getProviderState","metamask_sendDomainMetadata","wallet_registerOnboarding"],xn=(on.MetaMaskOpenRPCDocument.methods.map(e=>{let{name:t}=e;return t}).filter(e=>!_n.includes(e)).filter(e=>!wn.includes(e)).filter(e=>!kn.includes(e)),e=>{const t=[];return e.forEach(e=>{const{namespace:n,reference:r}=cn(e);if("eip155"===n&&r){const e=parseInt(r,10);isNaN(e)||t.push((0,_t.cK)(e))}}),t}),Sn=e=>{if(!e.examples||0===e.examples.length)return{method:e.name,params:[]};const t=e.examples[0].params.map(e=>e.value),n="by-name"===e.paramStructure?((e,t)=>e.reduce((e,n,r)=>{var i;const o=null==(i=t[r])?void 0:i.name;return o&&(e[o]=n),e},{}))(t,e.params):t;return{method:e.name,params:n}},En=(e,t,n,r,i)=>{var o,s;const a=null!=(o=e[t])?o:{},c=null!=(s=a[n])?s:[];return bn(gn({},e),{[t]:bn(gn({},a),{[n]:[...c,{result:r,request:i}]})})},An=e=>e.params.request,Pn=e=>e.toLowerCase().replace(/:/g,"-").replace(/\s+/g,"-").replace(/_/g,"-").replace(/[^a-z0-9-]/g,""),Cn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.map(Pn).filter(Boolean).join("-")},In={container:"app-container",title:"app-title",btnConnect:e=>e?Cn("app","btn","connect",e):"app-btn-connect",btnDisconnect:"app-btn-disconnect",btnReconnect:"app-btn-reconnect",btnCancel:"app-btn-cancel",btnConnectWindowEthereum:"app-btn-connect-window-ethereum",sectionScopes:"app-section-scopes",sectionConnected:"app-section-connected",sectionError:"app-section-error"},Mn={container:e=>Cn("dynamic-inputs","container",e),heading:e=>Cn("dynamic-inputs","heading",e),checkbox:e=>Cn("dynamic-inputs","checkbox",e),checkboxLabel:e=>Cn("dynamic-inputs","label",e)},Tn={card:e=>Cn("scope-card",e),networkName:e=>Cn("scope-card","network-name",e),accountsLabel:e=>Cn("scope-card","accounts-label",e),accountsBadge:e=>Cn("scope-card","accounts-badge",e),accountSelect:e=>Cn("scope-card","account-select",e),accountOption:(e,t)=>Cn("scope-card","account-option",e,t),activeAccount:e=>Cn("scope-card","active-account",e),methodsLabel:e=>Cn("scope-card","methods-label",e),methodsBadge:e=>Cn("scope-card","methods-badge",e),methodSelect:e=>Cn("scope-card","method-select",e),methodOption:(e,t)=>Cn("scope-card","method-option",e,t),selectedMethod:e=>Cn("scope-card","selected-method",e),invokeCollapsible:e=>Cn("scope-card","invoke-collapsible",e),invokeTextarea:e=>Cn("scope-card","invoke-textarea",e),invokeBtn:e=>Cn("scope-card","invoke-btn",e),resultContainer:(e,t,n)=>Cn("scope-card","result",e,t,String(n)),resultMethod:(e,t,n)=>Cn("scope-card","result-method",e,t,String(n)),resultStatus:(e,t,n)=>Cn("scope-card","result-status",e,t,String(n)),resultCode:(e,t,n)=>Cn("scope-card","result-code",e,t,String(n))},On={card:"legacy-evm-card",title:"legacy-evm-title",btnDisconnect:"legacy-evm-btn-disconnect",chainIdLabel:"legacy-evm-chain-id-label",chainIdValue:"legacy-evm-chain-id-value",accountsLabel:"legacy-evm-accounts-label",accountsValue:"legacy-evm-accounts-value",activeAccount:"legacy-evm-active-account",responseContainer:"legacy-evm-response-container",responseLabel:"legacy-evm-response-label",responseText:"legacy-evm-response-text",btnConnectAndSign:"legacy-evm-btn-connect-and-sign",btnRequestPermissions:"legacy-evm-btn-request-permissions",btnSignTypedDataV4:"legacy-evm-btn-sign-typed-data-v4",btnPersonalSign:"legacy-evm-btn-personal-sign",btnSendTransaction:"legacy-evm-btn-send-transaction",btnSwitchToGoerli:"legacy-evm-btn-switch-goerli",btnSwitchToSepolia:"legacy-evm-btn-switch-sepolia",btnSwitchToMainnet:"legacy-evm-btn-switch-mainnet",btnSwitchToPolygon:"legacy-evm-btn-switch-polygon",btnAddPolygonChain:"legacy-evm-btn-add-polygon-chain",readOnlySection:"legacy-evm-section-read-only",btnGetBalance:"legacy-evm-btn-get-balance",btnBlockNumber:"legacy-evm-btn-block-number",btnGasPrice:"legacy-evm-btn-gas-price"},Nn={card:"wagmi-card",title:"wagmi-title",btnDisconnect:"wagmi-btn-disconnect",chainIdLabel:"wagmi-chain-id-label",chainIdValue:"wagmi-chain-id-value",accountLabel:"wagmi-account-label",accountValue:"wagmi-account-value",activeAccount:"wagmi-active-account",balanceContainer:"wagmi-balance-container",balanceValue:"wagmi-balance-value",blockNumberContainer:"wagmi-block-number-container",blockNumberValue:"wagmi-block-number-value",switchChainSection:"wagmi-section-switch-chain",btnSwitchChain:e=>Cn("wagmi","btn-switch-chain",String(e)),signMessageSection:"wagmi-section-sign-message",inputMessage:"wagmi-input-message",btnSignMessage:"wagmi-btn-sign-message",signatureResult:"wagmi-signature-result",sendTxSection:"wagmi-section-send-transaction",inputToAddress:"wagmi-input-to-address",inputAmount:"wagmi-input-amount",btnSendTransaction:"wagmi-btn-send-transaction",txHashResult:"wagmi-tx-hash-result",txConfirmingText:"wagmi-tx-confirming",txConfirmedText:"wagmi-tx-confirmed",txErrorText:"wagmi-tx-error",connectorSection:"wagmi-section-connector",connectorAccount:"wagmi-connector-account",connectorChainId:"wagmi-connector-chain-id"},Bn={card:"solana-card",title:"solana-title",btnConnect:"solana-btn-connect",btnDisconnect:"solana-btn-disconnect",status:"solana-status",addressContainer:"solana-address-container",signMessageSection:"solana-section-sign-message",inputMessage:"solana-input-message",btnSignMessage:"solana-btn-sign-message",signedMessageResult:"solana-signed-message-result",transactionsSection:"solana-section-transactions",btnSignTransaction:"solana-btn-sign-transaction",btnSendTransaction:"solana-btn-send-transaction",transactionSignatureResult:"solana-transaction-signature-result",errorContainer:"solana-error-container"},Rn=n(808);const jn=(0,r.createContext)(void 0),Ln=e=>{let{children:t}=e;const[n,i]=(0,r.useState)("connecting"),[o,s]=(0,r.useState)(void 0),[a,c]=(0,r.useState)(null),l=(0,r.useRef)(void 0);(0,r.useEffect)(()=>{l.current||(l.current=(0,Rn.CI)({dapp:{name:"playground",url:"https://playground.metamask.io"},api:{supportedNetworks:(0,Rn.pm)({infuraApiKey:""})},transport:{extensionId:"nkbihfbeogaeaoehlefnkodbefgpgknn"}}),l.current.then(e=>{i(e.status),e.on("stateChanged",e=>{i(e)}),e.on("wallet_sessionChanged",e=>{s(e)})}))},[]);const u=(0,r.useCallback)(async()=>{try{if(!l.current)throw new Error("SDK not initialized");const e=await l.current;return s(void 0),e.disconnect()}catch(a){c(a)}},[]),d=(0,r.useCallback)(async(e,t)=>{try{if(!l.current)throw new Error("SDK not initialized");const n=await l.current;await n.connect(e,t)}catch(a){c(a)}},[]),h=(0,r.useCallback)(async e=>{try{if(!l.current)throw new Error("SDK not initialized");return(await l.current).invokeMethod(e)}catch(a){c(a)}},[]);return(0,it.jsx)(jn.Provider,{value:{session:o,status:n,error:a,connect:d,disconnect:u,invokeMethod:h},children:t})},Fn=()=>{const e=(0,r.useContext)(jn);if(void 0===e)throw new Error("useSDK must be used within a SDKProvider");return e};var zn=n(5823);const Dn=(0,r.createContext)(void 0),Un=e=>{let{children:t}=e;const[n,i]=(0,r.useState)(),[o,s]=(0,r.useState)(!1),[a,c]=(0,r.useState)(),[l,u]=(0,r.useState)(),[d,h]=(0,r.useState)([]),[f,p]=(0,r.useState)(null),m=(0,r.useRef)(void 0);(0,r.useEffect)(()=>{if(!m.current){const e=async()=>{const e=(t={"eip155:1":"https://eth.llamarpc.com","eip155:5":"https://goerli.infura.io/v3/demo","eip155:11155111":"https://sepolia.infura.io/v3/demo","eip155:137":"https://polygon-rpc.com","eip155:1337":"http://127.0.0.1:8545"},Object.entries(t).reduce((e,t)=>{let[n,r]=t;const i=n.match(/^eip155:(\d+)$/);if(null!==i&&void 0!==i&&i[1]){const t=parseInt(i[1],10);e["0x".concat(t.toString(16))]=r}return e},{}));var t;const n=await(0,zn.createEVMClient)({dapp:{name:"playground",url:"https://playground.metamask.io"},api:{supportedNetworks:e}}),r=await n.getProvider();return r&&(r.on("connect",e=>{let{chainId:t,accounts:n}=e;u(t),h(n),s(!0)}),r.on("disconnect",()=>{s(!1),h([]),u(void 0)}),r.on("chainChanged",e=>{u(e)}),r.on("accountsChanged",e=>{h(e)}),i(n),c(r),n.accounts.length>0&&(s(!0),h(n.accounts),n.selectedChainId&&u(n.selectedChainId))),n};m.current=e()}},[]);const g=(0,r.useCallback)(async e=>{p(null);try{if(!m.current)throw new Error("SDK not initialized");const t=await m.current,n=e.length>0?e:["0x1"];await t.connect({chainIds:n})}catch(t){console.error("Failed to connect:",t),p(t)}},[]),b=(0,r.useCallback)(async(e,t)=>{if(p(null),!m.current)throw new Error("SDK not initialized");const n=await m.current,r=t&&t.length>0?t:["0x1"];return(await n.connectAndSign({message:e,chainIds:r})).signature},[]),y=(0,r.useCallback)(async()=>{try{if(!m.current)throw new Error("SDK not initialized");const e=await m.current;await e.disconnect(),s(!1),h([]),u(void 0)}catch(f){console.error("Failed to disconnect:",f)}},[]);return(0,it.jsx)(Dn.Provider,{value:{sdk:n,connected:o,provider:a,chainId:l,accounts:d,error:f,connect:g,connectAndSign:b,disconnect:y},children:t})};let Wn=function(e){return e.ADDRESS="Address",e.SCOPE="Scope",e.CAIP_ACCOUNT_ID="CAIP Address",e}({});const qn=e=>{let{inputArray:t,handleCheckboxChange:n,label:r,availableOptions:i}=e;return(0,it.jsxs)("div",{"data-testid":Mn.container(r),className:"space-y-3",children:[(0,it.jsxs)("h3",{"data-testid":Mn.heading(r),className:"text-lg font-medium text-gray-800",children:[r,"s:"]}),(0,it.jsx)("div",{className:"flex flex-wrap gap-4",children:i.map(e=>{const r=t.includes(e.value);return(0,it.jsxs)("label",{"data-testid":Mn.checkboxLabel(e.value),className:"flex items-center gap-2 p-2 hover:bg-gray-50 rounded cursor-pointer",children:[(0,it.jsx)("input",{type:"checkbox","data-testid":Mn.checkbox(e.value),checked:r,onChange:t=>n(e.value,t.target.checked),className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 focus:ring-2"}),(0,it.jsx)("span",{className:"text-gray-700 select-none",children:e.name})]},"checkbox-".concat(e.value))})})]})};Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var Hn={},Kn={},Vn=e=>{if(Kn.stringToBase64)return Kn.stringToBase64(e);if("undefined"!==typeof btoa)return btoa(e);throw new Error("No base64 encoder configured. Call setPlatformAdapter() first.")},$n=(Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,{"Ethereum Mainnet":"eip155:1","Linea Mainnet":"eip155:59144","Arbitrum One":"eip155:42161","Avalanche Network C-Chain":"eip155:43114","BNB Chain":"eip155:56","OP Mainnet":"eip155:10","Polygon Mainnet":"eip155:137","zkSync Era Mainnet":"eip155:324","Base Mainnet":"eip155:8453","HyperEVM Mainnet":"eip155:999","MegaETH Mainnet":"eip155:4326","Monad Mainnet":"eip155:143","Sei Mainnet":"eip155:1329","Tempo Mainnet":"eip155:4217","Solana Mainnet":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","Localhost 8545":"eip155:1337"}),Gn=["wallet_registerOnboarding","wallet_scanQRCode"],Zn=["wallet_addEthereumChain"],Jn=["wallet_switchEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_revokePermissions","eth_requestAccounts","eth_accounts","eth_coinbase","net_version","metamask_logWeb3ShimUsage","metamask_getProviderState","metamask_sendDomainMetadata","wallet_registerOnboarding"],Yn=(on.MetaMaskOpenRPCDocument.methods.map(e=>{let{name:t}=e;return t}).filter(e=>!Zn.includes(e)).filter(e=>!Gn.includes(e)).filter(e=>!Jn.includes(e)),n(3342));const Qn=()=>{const e=Hn;return{endpoints:[...e.heliusApiKey?["https://api.helius-rpc.com/?api-key=".concat(e.heliusApiKey)]:[],...{NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_HELIUS_API_KEY?["https://api.helius-rpc.com/?api-key=".concat({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0}.REACT_APP_HELIUS_API_KEY)]:[],"https://api.devnet.solana.com","https://api.mainnet-beta.solana.com"],commitment:"confirmed",fallbackBlockhash:"EETubP5AKHgjPAhzPAFcb8BAY1hMH639CWCFTqi3hq1k"}},Xn=async e=>{const t=Qn(),n=new Yn.PublicKey(e);let r,i;for(const c of t.endpoints)try{const e=new Yn.Connection(c,t.commitment);r=(await e.getLatestBlockhash()).blockhash,console.log("Successfully connected to Solana RPC endpoint");break}catch(a){console.error("Failed to connect to RPC endpoint:",a),i=a}r||(console.warn("All RPC endpoints failed, using fallback blockhash"),r=t.fallbackBlockhash,console.error("Original error:",i));const o=new Yn.Transaction;o.recentBlockhash=r,o.feePayer=n,o.add(Yn.SystemProgram.transfer({fromPubkey:n,toPubkey:n,lamports:1e3}));const s=o.serialize({verifySignatures:!1});return(e=>{if(Kn.uint8ArrayToBase64)return Kn.uint8ArrayToBase64(e);let t="";for(let n=0;n<e.length;n+=2048){const r=e.slice(n,n+2048);t+=String.fromCharCode.apply(null,Array.from(r))}if("undefined"!==typeof btoa)return btoa(t);throw new Error("No base64 encoder configured. Call setPlatformAdapter() first.")})(new Uint8Array(s))},er=sn();function tr(e){var t,n,i,o,s,a,c,l;let{scope:u,details:d}=e;const{accounts:h}=d,f=(0,r.useCallback)(e=>{const t={},n={},r={};Object.entries(e.sessionScopes).forEach(e=>{var i;let[o,s]=e;null!==(i=s.accounts)&&void 0!==i&&i[0]&&(n[o]=s.accounts[0]);if(o.startsWith("eip155:")){t[o]="eth_blockNumber";const e=null===er||void 0===er?void 0:er.methods.find(e=>"eth_blockNumber"===e.name),n=(e=>({method:"wallet_invokeMethod",params:{scope:o,request:e}}))(Sn(e));r[o]=JSON.stringify(n,null,2)}}),x(r),P(t),E(n)},[]),m=(0,r.useCallback)(e=>{var t;null!==(t=e.params)&&void 0!==t&&t.sessionScopes&&f({sessionScopes:e.params.sessionScopes})},[f]),{invokeMethod:g,session:b}=Fn();(0,r.useEffect)(()=>{m(b)},[b,m]);const[y,v]=(0,r.useState)({}),[w,_]=(0,r.useState)(null!==h&&void 0!==h&&h.length?h[0]:void 0),[k,x]=(0,r.useState)({}),[S,E]=(0,r.useState)({[u]:null!==h&&void 0!==h&&h.length&&null!==(t=h[0])&&void 0!==t?t:null}),[A,P]=(0,r.useState)({}),C=(e=>{const t=Object.entries(yn).find(t=>{let[n,r]=t;return r===e});return t?t[0]:e})(u),I=null!==(n=null===h||void 0===h?void 0:h.length)&&void 0!==n?n:0,M=async(e,t,n)=>{if(!e.startsWith("solana:"))throw new Error('Invalid CAIP chain ID. It must start with "solana:"');const r=await(async(e,t)=>{switch(e){case"signMessage":return{params:{account:{address:t},message:Vn("Hello, world!")}};case"signTransaction":case"signAndSendTransaction":return{params:{account:{address:t},transaction:await Xn(t),scope:$n["Solana Mainnet"]}};case"signAllTransactions":return{params:{account:{address:t},transactions:[await Xn(t),await Xn(t)],scope:$n["Solana Mainnet"]}};case"signIn":return{params:{address:t,domain:Kn.getHostname?Kn.getHostname():"undefined"!==typeof window&&window.location?window.location.host:"metamask.io",statement:"Please sign in."}};case"getGenesisHash":return{params:{}};default:return{}}})(n,t),i={method:"wallet_invokeMethod",params:{scope:e,request:(0,p.A)({method:n},r)}};x(t=>(0,p.A)((0,p.A)({},t),{},{[e]:JSON.stringify(i,null,2)}))},T=async(e,t)=>{const n=e.target.value;P(e=>(0,p.A)((0,p.A)({},e),{},{[t]:n}));const r=S[t];if(r)if(t.startsWith("solana:"))await M(t,(0,an.Dz)(r).address,n);else{const e=null===er||void 0===er?void 0:er.methods.find(e=>e.name===n);if(e){let i=Sn(e);n in vn&&(i=((e,t,n,r)=>{const{address:i}=(0,an.Dz)(n),{reference:o}=(0,an.rW)(r);if(!(e in vn)||"object"!==typeof t||null===t||!("method"in t)||!("params"in t)||!Array.isArray(t.params))return t;switch(e){case"eth_sendTransaction":if(t.params.length>0&&"object"===typeof t.params[0]&&null!==t.params[0])return bn(gn({},t),{params:[bn(gn({},t.params[0]),{from:i,to:i,value:"0x0"}),...t.params.slice(1)]});break;case"personal_sign":if(t.params.length>=2)return bn(gn({},t),{params:[t.params[0],i,...t.params.slice(2)]});break;case"eth_signTypedData_v4":if(t.params.length>=2&&"object"===typeof t.params[1]&&null!==t.params[1]){const e=t.params[1];if("object"===typeof e&&null!==e&&"domain"in e&&"object"===typeof e.domain&&null!==e.domain)return bn(gn({},t),{params:[i,bn(gn({},e),{domain:bn(gn({},e.domain),{chainId:o})})]})}break;case"eth_getBalance":return bn(gn({},t),{params:[i,"latest"]});case"wallet_sendCalls":{const e=t.params[0];if("object"===typeof e)return bn(gn({},t),{params:[bn(gn({},e),{chainId:(0,_t.cK)(Number(o)),from:i})]});break}case"wallet_getCapabilities":return bn(gn({},t),{params:[i,[(0,_t.cK)(Number(o))]]})}return t})(n,i,r,t));const o={method:"wallet_invokeMethod",params:{scope:t,request:i}};x(e=>(0,p.A)((0,p.A)({},e),{},{[t]:JSON.stringify(o,null,2)}))}}},O=async(e,t,n)=>{console.log("\ud83d\udd27 handleInvokeMethod called: ".concat(t," on ").concat(e));const r=k[e];if(!n&&!r)throw new Error("No request configured for method ".concat(t," on scope ").concat(e));const i=null!==n&&void 0!==n?n:JSON.parse(null!==r&&void 0!==r?r:"{}");console.log("\ud83d\udccb Request object:",i);try{const n=(e=>e.params.request.params)(i);console.log("\ud83d\udce4 Calling invokeMethod with params:",n);const r=((e,t,n)=>{if(["signMessage","signTransaction","signAllTransactions","signAndSendTransaction","signIn"].includes(e)||(null==n?void 0:n.startsWith("solana:")))return t;let r=Array.isArray(t)?t:[t];if(("eth_signTypedData_v3"===e||"eth_signTypedData_v4"===e)&&r.length>=2){const e=r[0],t=r[1];void 0!==e&&void 0!==t&&(r=[e,"string"===typeof t?t:JSON.stringify(t)])}return r})(t,n,e);console.log("\ud83d\udce4 Normalized params:",r);const o=await g({scope:e,request:{method:t,params:r}});console.log("\ud83d\udce5 Received result:",o);const s=An(i);v(n=>{const r=En(n,e,t,o,s);return console.log("\ud83d\udcbe Updated invoke results:",r),r})}catch(o){console.error("\u274c Error invoking method:",o);const n=An(i);v(r=>{const i=En(r,e,t,o,n);return console.log("\ud83d\udcbe Updated invoke results (error):",i),i})}};return(0,it.jsxs)("div",{"data-testid":Tn.card(u),className:"bg-white border border-gray-200 rounded-lg p-6 shadow-sm hover:shadow-md transition-shadow duration-200",children:[(0,it.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,it.jsx)("h3",{"data-testid":Tn.networkName(u),title:"".concat(C," (").concat(u,")"),className:"text-lg font-semibold text-gray-800 truncate",children:C})}),(0,it.jsxs)("div",{className:"mb-4",children:[(0,it.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,it.jsx)("span",{"data-testid":Tn.accountsLabel(u),className:"text-sm font-medium text-gray-600",children:"Accounts:"}),(0,it.jsxs)("span",{"data-testid":Tn.accountsBadge(u),className:"text-sm text-gray-500 bg-blue-50 text-blue-700 px-2 py-1 rounded-full",children:[I," available"]})]}),(0,it.jsxs)("select",{value:w,onChange:async e=>{const t=e.target.value;_(t),E(e=>(0,p.A)((0,p.A)({},e),{},{[u]:t}))},"data-testid":Tn.accountSelect(u),id:Tn.accountSelect(u),className:"w-full p-3 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors",children:[(0,it.jsx)("option",{value:"",children:"Select an account"}),(null!==h&&void 0!==h?h:[]).map(e=>{const{address:t}=(0,an.Dz)(e);return(0,it.jsx)("option",{"data-testid":Tn.accountOption(u,String(e)),value:e,children:t},t)})]})]}),w&&(0,it.jsxs)("div",{"data-testid":Tn.activeAccount(u),className:"mt-4 p-3 bg-green-50 border border-green-200 rounded-md",children:[(0,it.jsx)("p",{className:"text-sm text-green-800 font-medium",children:"Active Account:"}),(0,it.jsx)("p",{className:"text-sm text-green-700 font-mono break-all",children:(0,an.Dz)(w).address})]}),(0,it.jsxs)("div",{className:"mb-4",children:[(0,it.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,it.jsx)("span",{"data-testid":Tn.methodsLabel(u),className:"text-sm font-medium text-gray-600",children:"Available Methods:"}),(0,it.jsxs)("span",{"data-testid":Tn.methodsBadge(u),className:"text-sm text-gray-500 bg-purple-50 text-purple-700 px-2 py-1 rounded-full",children:[null!==(i=null===(o=d.methods)||void 0===o?void 0:o.length)&&void 0!==i?i:0," available"]})]}),(0,it.jsxs)("select",{"data-testid":Tn.methodSelect(u),value:null!==(s=A[u])&&void 0!==s?s:"",onChange:async e=>{await T(e,u)},id:Tn.methodSelect(u),className:"w-full p-3 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-purple-500 transition-colors bg-white hover:border-gray-400",children:[(0,it.jsx)("option",{value:"",children:"Select a method to invoke"}),(null!==(a=d.methods)&&void 0!==a?a:[]).map(e=>(0,it.jsx)("option",{"data-testid":Tn.methodOption(u,e),value:e,children:e},e))]})]}),A[u]&&(0,it.jsxs)("div",{"data-testid":Tn.selectedMethod(u),className:"mt-4 p-3 bg-purple-50 border border-purple-200 rounded-md",children:[(0,it.jsx)("p",{className:"text-sm text-purple-800 font-medium",children:"Selected Method:"}),(0,it.jsx)("p",{className:"text-sm text-purple-700 font-mono",children:A[u]})]}),(0,it.jsxs)("details",{className:"mt-4 border border-gray-200 rounded-lg","data-testid":Tn.invokeCollapsible(u),id:Tn.invokeCollapsible(u),children:[(0,it.jsxs)("summary",{className:"px-4 py-3 bg-gray-50 cursor-pointer hover:bg-gray-100 transition-colors duration-150 rounded-t-lg flex items-center gap-2 font-medium text-gray-700",children:[(0,it.jsxs)("svg",{className:"w-4 h-4 transform transition-transform duration-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,it.jsx)("title",{children:"Invoke Method"}),(0,it.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})]}),"Invoke Method Request"]}),(0,it.jsxs)("div",{className:"p-4 bg-white border-t border-gray-200",children:[(0,it.jsx)("div",{className:"mb-2",children:(0,it.jsx)("label",{htmlFor:Tn.invokeTextarea(u),className:"block text-sm font-medium text-gray-600 mb-1",children:"JSON Request:"})}),(0,it.jsx)("textarea",{"data-testid":Tn.invokeTextarea(u),value:null!==(c=k[u])&&void 0!==c?c:"",onChange:e=>x(t=>(0,p.A)((0,p.A)({},t),{},{[u]:e.target.value})),rows:12,id:Tn.invokeTextarea(u),className:"w-full p-3 font-mono text-sm border border-gray-300 rounded-md resize-y min-h-[200px] max-h-[400px] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-gray-50",placeholder:"Method request will appear here...",spellCheck:!1}),(0,it.jsx)("div",{className:"mt-2 text-xs text-gray-500",children:"Edit the JSON above to customize the request parameters before invoking the method."})]})]}),(0,it.jsxs)("button",{type:"button","data-testid":Tn.invokeBtn(u),onClick:async()=>{const e=A[u];e&&await O(u,e)},id:Tn.invokeBtn(u),disabled:!A[u]||!k[u],className:"\n w-full mt-4 px-6 py-3 rounded-lg font-medium text-white transition-all duration-200\n flex items-center justify-center gap-2\n ".concat(A[u]&&k[u]?"bg-gradient-to-r from-purple-600 to-blue-600 hover:from-purple-700 hover:to-blue-700 hover:shadow-lg hover:scale-105 active:scale-95 cursor-pointer":"bg-gray-300 cursor-not-allowed text-gray-500","\n "),children:[(0,it.jsxs)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,it.jsx)("title",{children:"Invoke Method"}),(0,it.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})]}),"Invoke Method"]}),Object.entries(null!==(l=y[u])&&void 0!==l?l:{}).map(e=>{let[t,n]=e;return n.map((e,n)=>{let{result:r,request:i}=e;const{text:o,truncated:s}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;const n=JSON.stringify(e);return n.length<=t?{text:n,truncated:!1}:{text:n.slice(0,t),truncated:!0}}(r,150),a=r instanceof Error;return s?(0,it.jsxs)("details",{"data-testid":Tn.resultContainer(u,t,n),id:Tn.resultContainer(u,t,n),className:"mt-4 border border-gray-200 rounded-lg",children:[(0,it.jsx)("summary",{className:"px-4 py-3 cursor-pointer hover:bg-gray-50 transition-colors duration-150 rounded-t-lg ".concat(a?"bg-red-50 border-red-200":"bg-gray-50"),children:(0,it.jsxs)("div",{className:"flex items-center gap-2",children:[(0,it.jsxs)("svg",{className:"w-4 h-4 transform transition-transform duration-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,it.jsx)("title",{children:"Scope card"}),(0,it.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})]}),(0,it.jsxs)("div",{className:"flex-1",children:[(0,it.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,it.jsx)("span",{className:"font-mono text-sm font-medium ".concat(a?"text-red-700":"text-purple-700"),children:t}),(0,it.jsx)("span",{className:"text-xs px-2 py-1 rounded-full ".concat(a?"bg-red-100 text-red-600":"bg-green-100 text-green-600"),children:a?"Error":"Success"})]}),(0,it.jsxs)("div",{className:"text-xs text-gray-500 mb-1",children:[(0,it.jsx)("span",{className:"font-medium",children:"Params:"})," ",JSON.stringify(i.params)]}),(0,it.jsxs)("div",{className:"text-xs text-gray-600 font-mono bg-gray-100 p-2 rounded",children:[o,"..."]})]})]})}),(0,it.jsxs)("div",{className:"p-4 bg-white border-t border-gray-200",children:[(0,it.jsx)("div",{className:"mb-2",children:(0,it.jsx)("div",{className:"block text-sm font-medium text-gray-600 mb-1",children:"Full Response:"})}),(0,it.jsx)("div",{className:"relative",children:(0,it.jsx)("pre",{className:"bg-gray-50 p-4 rounded-md text-sm font-mono overflow-x-auto max-h-96 overflow-y-auto border border-gray-200 text-left",children:(0,it.jsx)("code",{"data-testid":Tn.resultCode(u,t,n),id:Tn.resultCode(u,t,n),className:a?"text-red-600":"text-gray-800",children:JSON.stringify(r,null,2)})})})]})]},"".concat(t,"-").concat(n)):(0,it.jsxs)("div",{className:"mt-4 border border-gray-200 rounded-lg bg-white","data-testid":Tn.resultContainer(u,t,n),id:Tn.resultContainer(u,t,n),children:[(0,it.jsx)("div",{className:"px-4 py-3 border-b border-gray-200 ".concat(a?"bg-red-50":"bg-gray-50"),children:(0,it.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,it.jsx)("span",{className:"font-mono text-sm font-medium ".concat(a?"text-red-700":"text-purple-700"),children:t}),(0,it.jsx)("span",{className:"text-xs px-2 py-1 rounded-full ".concat(a?"bg-red-100 text-red-600":"bg-green-100 text-green-600"),children:a?"Error":"Success"})]})}),(0,it.jsx)("div",{className:"p-4",children:(0,it.jsx)("div",{className:"relative",children:(0,it.jsx)("pre",{className:"bg-gray-50 p-4 rounded-md text-sm font-mono overflow-x-auto border border-gray-200 text-left",children:(0,it.jsx)("code",{"data-testid":Tn.resultCode(u,t,n),id:Tn.resultCode(u,t,n),className:a?"text-red-600":"text-gray-800",children:o})})})})]},"".concat(t,"-").concat(n))})})]},u)}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var nr=n(4507);function rr(e){var t,n;let{provider:i,chainId:o,accounts:s,sdk:a,disconnect:c}=e;const[l,u]=(0,r.useState)(""),[d,h]=(0,r.useState)(null!==(t=s[0])&&void 0!==t?t:""),f=async e=>{console.debug("switching to network chainId=".concat(e));try{const t=await(null===i||void 0===i?void 0:i.request({method:"wallet_switchEthereumChain",params:[{chainId:e}]}));console.debug("response",t)}catch(t){console.error(t)}};return(0,it.jsxs)("div",{"data-testid":On.card,className:"bg-white border border-gray-200 rounded-lg p-6 shadow-sm hover:shadow-md transition-shadow duration-200",children:[(0,it.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,it.jsx)("h3",{"data-testid":On.title,className:"text-lg font-semibold text-gray-800 truncate",children:"Legacy EVM Connection"}),(0,it.jsx)("button",{type:"button","data-testid":On.btnDisconnect,onClick:c,className:"bg-red-500 text-white px-3 py-1 rounded text-sm hover:bg-red-600 transition-colors",children:"Disconnect"})]}),(0,it.jsxs)("div",{className:"mb-4",children:[(0,it.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,it.jsx)("span",{"data-testid":On.chainIdLabel,className:"text-sm font-medium text-gray-600",children:"Connected Chain:"}),(0,it.jsx)("span",{"data-testid":On.chainIdValue,className:"text-sm text-gray-500 bg-blue-50 text-blue-700 px-2 py-1 rounded-full",children:o||"Not available"})]}),(0,it.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,it.jsx)("span",{"data-testid":On.accountsLabel,className:"text-sm font-medium text-gray-600",children:"Accounts:"}),(0,it.jsxs)("span",{"data-testid":On.accountsValue,className:"text-sm text-gray-500 bg-blue-50 text-blue-700 px-2 py-1 rounded-full",children:[s.length," available"]})]}),s.length>0&&(0,it.jsxs)("div",{"data-testid":On.activeAccount,className:"mt-2 p-3 bg-green-50 border border-green-200 rounded-md",children:[(0,it.jsx)("p",{className:"text-sm text-green-800 font-medium",children:"Active Account:"}),(0,it.jsx)("p",{className:"text-sm text-green-700 font-mono break-all",children:s[0]})]})]}),l&&(0,it.jsxs)("div",{"data-testid":On.responseContainer,className:"mb-4 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,it.jsx)("p",{"data-testid":On.responseLabel,className:"text-sm font-medium text-gray-600 mb-1",children:"Last Response:"}),(0,it.jsx)("p",{"data-testid":On.responseText,className:"text-sm text-gray-700 font-mono break-all",children:String(l)})]}),(0,it.jsxs)("div",{className:"space-y-2",children:[(0,it.jsx)("button",{type:"button","data-testid":On.btnRequestPermissions,onClick:async()=>{if(i)try{const e=await i.request({method:"wallet_requestPermissions",params:[]});u("Accounts: ".concat(e))}catch(e){console.error("Error requesting accounts",e),u("Error: ".concat(e instanceof Error?e.message:"Unknown error"))}else u("Provider not available")},className:"w-full bg-blue-500 text-white px-4 py-2 rounded text-sm hover:bg-blue-600 transition-colors",children:"wallet_requestPermissions"}),(0,it.jsx)("button",{type:"button","data-testid":On.btnSignTypedDataV4,onClick:async()=>{var e;if(!i)return void u("invalid ethereum provider");const t=await(async(e,t)=>{const n=JSON.stringify((e=>({domain:{chainId:e,name:"Ether Mail",verifyingContract:"0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC",version:"1"},message:{contents:"Hello, Bob!",attachedMoneyInEth:4.2,from:{name:"Cow",wallets:["0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826","0xDeaDbeefdEAdbeefdEadbEEFdeadbeEFdEaDbeeF"]},to:[{name:"Bob",wallets:["0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB","0xB0BdaBea57B0BDABeA57b0bdABEA57b0BDabEa57","0xB0B0b0b0b0b0B000000000000000000000000000"]}]},primaryType:"Mail",types:{EIP712Domain:[{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}],Group:[{name:"name",type:"string"},{name:"members",type:"Person[]"}],Mail:[{name:"from",type:"Person"},{name:"to",type:"Person[]"},{name:"contents",type:"string"}],Person:[{name:"name",type:"string"},{name:"wallets",type:"address[]"}]}}))(t)),r=e.selectedAccount;console.debug("sign from: ".concat(r));try{if(!r)return void alert("Invalid account -- please connect using eth_requestAccounts first");const t=[r,n],i="eth_signTypedData_v4";return console.debug("ethRequest ".concat(i),JSON.stringify(t,null,4)),console.debug("sign params",t),await(null===e||void 0===e?void 0:e.request({method:i,params:t}))}catch(i){return console.log("eth_signTypedData_v4 error: ".concat(i)),"Error: ".concat(i)}})(i,null!==(e=null===a||void 0===a?void 0:a.selectedChainId)&&void 0!==e?e:"");u(t)},className:"w-full bg-blue-500 text-white px-4 py-2 rounded text-sm hover:bg-blue-600 transition-colors",children:"eth_signTypedData_v4"}),(0,it.jsx)("button",{type:"button","data-testid":On.btnPersonalSign,onClick:async()=>{if(!i)return void u("invalid ethereum provider");const e=await(async e=>{try{const t=e.selectedAccount,n="Hello World from the ".concat("Create React dapp","!"),r="0x".concat(nr.Buffer.from(n,"utf8").toString("hex"));return await e.request({method:"personal_sign",params:[r,t,"Example password"]})}catch(t){return console.log("personal_sign error: ".concat(t)),"Error: ".concat(t)}})(i);u(e)},className:"w-full bg-blue-500 text-white px-4 py-2 rounded text-sm hover:bg-blue-600 transition-colors",children:"personal_sign"}),(0,it.jsx)("input",{type:"text",value:d,onChange:e=>h(e.target.value),placeholder:null!==(n=s[0])&&void 0!==n?n:"0x...",className:"w-full border rounded px-3 py-2 text-sm font-mono"}),(0,it.jsx)("button",{type:"button","data-testid":On.btnSendTransaction,onClick:async()=>{if(!s[0])return void u("No account available");const e={to:d||s[0],from:s[0],value:"0x5AF3107A4000"};console.log("transactionParameters",e);try{const t=await(null===i||void 0===i?void 0:i.request({method:"eth_sendTransaction",params:[e]}));u(t)}catch(t){console.log(t),u(t instanceof Error?t.message:"Unknown error")}},className:"w-full bg-blue-500 text-white px-4 py-2 rounded text-sm hover:bg-blue-600 transition-colors",children:"Send transaction"}),"0x1"===o?(0,it.jsx)("button",{type:"button","data-testid":On.btnSwitchToGoerli,onClick:()=>f("0x5"),className:"w-full bg-blue-500 text-white px-4 py-2 rounded text-sm hover:bg-blue-600 transition-colors",children:"Switch to Goerli"}):(0,it.jsx)("button",{type:"button","data-testid":On.btnSwitchToMainnet,onClick:()=>f("0x1"),className:"w-full bg-blue-500 text-white px-4 py-2 rounded text-sm hover:bg-blue-600 transition-colors",children:"Switch to Mainnet"}),(0,it.jsx)("button",{type:"button","data-testid":On.btnSwitchToPolygon,onClick:()=>f("0x89"),className:"w-full bg-blue-500 text-white px-4 py-2 rounded text-sm hover:bg-blue-600 transition-colors",children:"Switch to Polygon"}),(0,it.jsx)("button",{type:"button","data-testid":On.btnAddPolygonChain,onClick:()=>{if(!i)throw new Error("invalid ethereum provider");i.request({method:"wallet_addEthereumChain",params:[{chainId:"0x89",chainName:"Polygon",blockExplorerUrls:["https://polygonscan.com"],nativeCurrency:{symbol:"MATIC",decimals:18},rpcUrls:["https://polygon-rpc.com/"]}]})},className:"w-full bg-blue-500 text-white px-4 py-2 rounded text-sm hover:bg-blue-600 transition-colors",children:"Add Polygon Chain"}),(0,it.jsxs)("div",{"data-testid":On.readOnlySection,className:"mt-4 pt-4 border-t border-gray-200",children:[(0,it.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Read-Only RPC Calls"}),(0,it.jsxs)("div",{className:"space-y-2",children:[(0,it.jsx)("button",{type:"button","data-testid":On.btnGetBalance,onClick:async()=>{if(i&&s[0])try{const e=await i.request({method:"eth_getBalance",params:[s[0],"latest"]});u("Balance: ".concat(e))}catch(e){console.error("Error getting balance",e),u("Error: ".concat(e instanceof Error?e.message:"Unknown error"))}else u("Provider or accounts not available")},className:"w-full bg-purple-500 text-white px-4 py-2 rounded text-sm hover:bg-purple-600 transition-colors",children:"eth_getBalance"}),(0,it.jsx)("button",{type:"button","data-testid":On.btnBlockNumber,onClick:async()=>{if(i)try{const e=await i.request({method:"eth_blockNumber",params:[]});u("Block Number: ".concat(e))}catch(e){console.error("Error getting block number",e),u("Error: ".concat(e instanceof Error?e.message:"Unknown error"))}else u("Provider not available")},className:"w-full bg-purple-500 text-white px-4 py-2 rounded text-sm hover:bg-purple-600 transition-colors",children:"eth_blockNumber"}),(0,it.jsx)("button",{type:"button","data-testid":On.btnGasPrice,onClick:async()=>{if(i)try{const e=await i.request({method:"eth_gasPrice",params:[]});u("Gas Price: ".concat(e))}catch(e){console.error("Error getting gas price",e),u("Error: ".concat(e instanceof Error?e.message:"Unknown error"))}else u("Provider not available")},className:"w-full bg-purple-500 text-white px-4 py-2 rounded text-sm hover:bg-purple-600 transition-colors",children:"eth_gasPrice"})]})]})]})]})}var ir=n(6006),or=n(8090);class sr extends or.C{constructor(e){let{value:t}=e;super("Number `".concat(t,"` is not a valid decimal number."),{name:"InvalidDecimalNumberError"})}}function ar(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"wei";return function(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new sr({value:e});let[n,r="0"]=e.split(".");const i=n.startsWith("-");if(i&&(n=n.slice(1)),r=r.replace(/(0+)$/,""),0===t)1===Math.round(Number(".".concat(r)))&&(n="".concat(BigInt(n)+1n)),r="";else if(r.length>t){const[e,i,o]=[r.slice(0,t-1),r.slice(t-1,t),r.slice(t)],s=Math.round(Number("".concat(i,".").concat(o)));r=s>9?"".concat(BigInt(e)+BigInt(1),"0").padStart(e.length+1,"0"):"".concat(e).concat(s),r.length>t&&(r=r.slice(1),n="".concat(BigInt(n)+1n)),r=r.slice(0,t)}else r=r.padEnd(t,"0");return BigInt("".concat(i?"-":"").concat(n).concat(r))}(e,ir.eL[t])}var cr=n(3300);function lr(e){return e.state.chainId}function ur(){const e=Nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return(0,r.useSyncExternalStore)(t=>function(e,t){const{onChange:n}=t;return e.subscribe(e=>e.chainId,n)}(e,{onChange:t}),()=>lr(e),()=>lr(e))}function dr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,p.A)((0,p.A)({},t.mutation),{},{mutationFn:async t=>async function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n.connector)t=n.connector;else{const{connections:n,current:r}=e.state,i=n.get(r);t=null===i||void 0===i?void 0:i.connector}const r=e.state.connections;t&&(await t.disconnect(),t.emitter.off("change",e._internal.events.change),t.emitter.off("disconnect",e._internal.events.disconnect),t.emitter.on("connect",e._internal.events.connect),r.delete(t.uid)),e.setState(e=>{if(0===r.size)return(0,p.A)((0,p.A)({},e),{},{connections:new Map,current:null,status:"disconnected"});const t=r.values().next().value;return(0,p.A)((0,p.A)({},e),{},{connections:new Map(r),current:t.connector.uid})});{var i,o;const t=e.state.current;if(!t)return;const n=null===(i=e.state.connections.get(t))||void 0===i?void 0:i.connector;if(!n)return;await(null===(o=e.storage)||void 0===o?void 0:o.setItem("recentConnectorId",n.id))}}(e,t),mutationKey:["disconnect"]})}let hr=[];function fr(e){const t=[...e.state.connections.values()];return"reconnecting"===e.state.status||kt(hr,t)?hr:(hr=t,t)}function pr(){const e=Nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return(0,r.useSyncExternalStore)(t=>function(e,t){const{onChange:n}=t;return e.subscribe(()=>fr(e),n,{equalityFn:kt})}(e,{onChange:t}),()=>fr(e),()=>fr(e))}let mr=[];function gr(e){const t=e.chains;return kt(mr,t)?mr:(mr=t,t)}function br(){const e=Nt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return(0,r.useSyncExternalStore)(t=>function(e,t){const{onChange:n}=t;return e._internal.chains.subscribe((e,t)=>{n(e,t)})}(e,{onChange:t}),()=>gr(e),()=>gr(e))}class yr extends Mt{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class vr extends Mt{constructor(e){let{connector:t}=e;super('"'.concat(t.name,'" does not support programmatic chain switching.')),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}function wr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,p.A)((0,p.A)({},t.mutation),{},{mutationFn:t=>async function(e,t){var n,r;const{addEthereumChainParameter:i,chainId:o}=t,s=e.state.connections.get(null!==(n=null===(r=t.connector)||void 0===r?void 0:r.uid)&&void 0!==n?n:e.state.current);if(s){const e=s.connector;if(!e.switchChain)throw new vr({connector:e});return await e.switchChain({addEthereumChainParameter:i,chainId:o})}const a=e.chains.find(e=>e.id===o);if(!a)throw new Vt;return e.setState(e=>(0,p.A)((0,p.A)({},e),{},{chainId:o})),a}(e,t),mutationKey:["switchChain"]})}var _r=n(4456);async function kr(e,t){var n;let{address:r,blockNumber:i,blockTag:o=(null!==(n=e.experimental_blockTag)&&void 0!==n?n:"latest")}=t;const s="bigint"===typeof i?(0,_r.cK)(i):void 0,a=await e.request({method:"eth_getBalance",params:[r,s||o]});return BigInt(a)}function xr(e,t,n){const r=e[t.name];if("function"===typeof r)return r;const i=e[n];return"function"===typeof i?i:n=>t(e,n)}const Sr=["_defaulted","behavior","gcTime","initialData","initialDataUpdatedAt","maxPages","meta","networkMode","queryFn","queryHash","queryKey","queryKeyHashFn","retry","retryDelay","structuralSharing","getPreviousPageParam","getNextPageParam","initialPageParam","_optimisticResults","enabled","notifyOnChangeProps","placeholderData","refetchInterval","refetchIntervalInBackground","refetchOnMount","refetchOnReconnect","refetchOnWindowFocus","retryOnMount","select","staleTime","suspense","throwOnError","abi","config","connector","query","watch"];function Er(e){return JSON.stringify(e,(e,t)=>function(e){if(!Ar(e))return!1;const t=e.constructor;if("undefined"===typeof t)return!0;const n=t.prototype;return!!Ar(n)&&!!n.hasOwnProperty("isPrototypeOf")}(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):"bigint"===typeof t?t.toString():t)}function Ar(e){return"[object Object]"===Object.prototype.toString.call(e)}function Pr(e){const{_defaulted:t,behavior:n,gcTime:r,initialData:i,initialDataUpdatedAt:o,maxPages:s,meta:a,networkMode:c,queryFn:l,queryHash:u,queryKey:d,queryKeyHashFn:h,retry:f,retryDelay:m,structuralSharing:g,getPreviousPageParam:b,getNextPageParam:y,initialPageParam:v,_optimisticResults:w,enabled:_,notifyOnChangeProps:k,placeholderData:x,refetchInterval:S,refetchIntervalInBackground:E,refetchOnMount:A,refetchOnReconnect:P,refetchOnWindowFocus:C,retryOnMount:I,select:M,staleTime:T,suspense:O,throwOnError:N,abi:B,config:R,connector:j,query:L,watch:F}=e,z=(0,We.A)(e,Sr);return j?(0,p.A)({connectorUid:null===j||void 0===j?void 0:j.uid},z):z}const Cr=["scopeKey"];function Ir(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,p.A)((0,p.A)({},r.query),{},{enabled:Boolean(r.address&&(null===(t=null===(n=r.query)||void 0===n?void 0:n.enabled)||void 0===t||t)),queryFn:async t=>{const[,n]=t.queryKey,{scopeKey:r}=n,i=(0,We.A)(n,Cr);if(!i.address)throw new Error("address is required");const o=await async function(e,t){var n;const{address:r,blockNumber:i,blockTag:o,chainId:s}=t,a=e.getClient({chainId:s}),c=xr(a,kr,"getBalance"),l=await c(i?{address:r,blockNumber:i}:{address:r,blockTag:o}),u=null!==(n=e.chains.find(e=>e.id===s))&&void 0!==n?n:a.chain;return{decimals:u.nativeCurrency.decimals,symbol:u.nativeCurrency.symbol,value:l}}(e,(0,p.A)((0,p.A)({},i),{},{address:i.address}));return null!==o&&void 0!==o?o:null},queryKey:Mr(r)})}function Mr(){return["balance",Pr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})]}var Tr,Or,Nr,Br,Rr,jr,Lr,Fr,zr,Dr,Ur,Wr,qr,Hr,Kr,Vr,$r=(Tr=new WeakMap,Or=new WeakMap,Nr=new WeakMap,Br=new WeakMap,Rr=new WeakMap,jr=new WeakMap,Lr=new WeakMap,Fr=new WeakMap,zr=new WeakMap,Dr=new WeakMap,Ur=new WeakMap,Wr=new WeakMap,qr=new WeakMap,Hr=new WeakMap,Kr=new WeakMap,Vr=new WeakSet,class extends ${constructor(e,t){super(),F(this,Vr),s(this,Tr,void 0),s(this,Or,void 0),s(this,Nr,void 0),s(this,Br,void 0),s(this,Rr,void 0),s(this,jr,void 0),s(this,Lr,void 0),s(this,Fr,void 0),s(this,zr,void 0),s(this,Dr,void 0),s(this,Ur,void 0),s(this,Wr,void 0),s(this,qr,void 0),s(this,Hr,void 0),s(this,Kr,new Set),this.options=t,c(Tr,this,e),c(Fr,this,null),c(Lr,this,J()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(l(Or,this).addObserver(this),ri(l(Or,this),this.options)?a(Vr,this,Gr).call(this):this.updateResult(),a(Vr,this,Qr).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ii(l(Or,this),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ii(l(Or,this),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,a(Vr,this,Xr).call(this),a(Vr,this,ei).call(this),l(Or,this).removeObserver(this)}setOptions(e){const t=this.options,n=l(Or,this);if(this.options=l(Tr,this).defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!==typeof this.options.enabled&&"function"!==typeof this.options.enabled&&"boolean"!==typeof w(this.options.enabled,l(Or,this)))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");a(Vr,this,ti).call(this),l(Or,this).setOptions(this.options),t._defaulted&&!C(this.options,t)&&l(Tr,this).getQueryCache().notify({type:"observerOptionsUpdated",query:l(Or,this),observer:this});const r=this.hasListeners();r&&oi(l(Or,this),n,this.options,t)&&a(Vr,this,Gr).call(this),this.updateResult(),!r||l(Or,this)===n&&w(this.options.enabled,l(Or,this))===w(t.enabled,l(Or,this))&&v(this.options.staleTime,l(Or,this))===v(t.staleTime,l(Or,this))||a(Vr,this,Zr).call(this);const i=a(Vr,this,Jr).call(this);!r||l(Or,this)===n&&w(this.options.enabled,l(Or,this))===w(t.enabled,l(Or,this))&&i===l(Hr,this)||a(Vr,this,Yr).call(this,i)}getOptimisticResult(e){const t=l(Tr,this).getQueryCache().build(l(Tr,this),e),n=this.createResult(t,e);return function(e,t){if(!C(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(c(Br,this,n),c(jr,this,this.options),c(Rr,this,l(Or,this).state)),n}getCurrentResult(){return l(Br,this)}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),null===t||void 0===t||t(n),"promise"===n&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==l(Lr,this).status||l(Lr,this).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,n))})}trackProp(e){l(Kr,this).add(e)}getCurrentQuery(){return l(Or,this)}refetch(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return this.fetch((0,p.A)({},t))}fetchOptimistic(e){const t=l(Tr,this).defaultQueryOptions(e),n=l(Tr,this).getQueryCache().build(l(Tr,this),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){var t;return a(Vr,this,Gr).call(this,(0,p.A)((0,p.A)({},e),{},{cancelRefetch:null===(t=e.cancelRefetch)||void 0===t||t})).then(()=>(this.updateResult(),l(Br,this)))}createResult(e,t){const n=l(Or,this),r=this.options,i=l(Br,this),o=l(Rr,this),s=l(jr,this),a=e!==n?e.state:l(Nr,this),{state:u}=e;let d,h=(0,p.A)({},u),f=!1;if(t._optimisticResults){const i=this.hasListeners(),o=!i&&ri(e,t),s=i&&oi(e,n,t,r);(o||s)&&(h=(0,p.A)((0,p.A)({},h),pe(u.data,e.options))),"isRestoring"===t._optimisticResults&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:b}=h;d=h.data;let y=!1;if(void 0!==t.placeholderData&&void 0===d&&"pending"===b){let e;var v;if(null!==i&&void 0!==i&&i.isPlaceholderData&&t.placeholderData===(null===s||void 0===s?void 0:s.placeholderData))e=i.data,y=!0;else e="function"===typeof t.placeholderData?t.placeholderData(null===(v=l(Ur,this))||void 0===v?void 0:v.state.data,l(Ur,this)):t.placeholderData;void 0!==e&&(b="success",d=O(null===i||void 0===i?void 0:i.data,e,t),f=!0)}if(t.select&&void 0!==d&&!y)if(i&&d===(null===o||void 0===o?void 0:o.data)&&t.select===l(zr,this))d=l(Dr,this);else try{c(zr,this,t.select),d=t.select(d),d=O(null===i||void 0===i?void 0:i.data,d,t),c(Dr,this,d),c(Fr,this,null)}catch(P){c(Fr,this,P)}l(Fr,this)&&(m=l(Fr,this),d=l(Dr,this),g=Date.now(),b="error");const _="fetching"===h.fetchStatus,k="pending"===b,x="error"===b,S=k&&_,E=void 0!==d,A={status:b,fetchStatus:h.fetchStatus,isPending:k,isSuccess:"success"===b,isError:x,isInitialLoading:S,isLoading:S,data:d,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>a.dataUpdateCount||h.errorUpdateCount>a.errorUpdateCount,isFetching:_,isRefetching:_&&!k,isLoadingError:x&&!E,isPaused:"paused"===h.fetchStatus,isPlaceholderData:f,isRefetchError:x&&E,isStale:si(e,t),refetch:this.refetch,promise:l(Lr,this),isEnabled:!1!==w(t.enabled,e)};if(this.options.experimental_prefetchInRender){const t=void 0!==A.data,r="error"===A.status&&!t,i=e=>{r?e.reject(A.error):t&&e.resolve(A.data)},o=()=>{const e=c(Lr,this,A.promise=J());i(e)},s=l(Lr,this);switch(s.status){case"pending":e.queryHash===n.queryHash&&i(s);break;case"fulfilled":(r||A.data!==s.value)&&o();break;case"rejected":r&&A.error===s.reason||o()}}return A}updateResult(){const e=l(Br,this),t=this.createResult(l(Or,this),this.options);if(c(Rr,this,l(Or,this).state),c(jr,this,this.options),void 0!==l(Rr,this).data&&c(Ur,this,l(Or,this)),C(t,e))return;c(Br,this,t);a(Vr,this,ni).call(this,{listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,n="function"===typeof t?t():t;if("all"===n||!n&&!l(Kr,this).size)return!0;const r=new Set(null!==n&&void 0!==n?n:l(Kr,this));return this.options.throwOnError&&r.add("error"),Object.keys(l(Br,this)).some(t=>{const n=t;return l(Br,this)[n]!==e[n]&&r.has(n)})})()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&a(Vr,this,Qr).call(this)}});function Gr(e){a(Vr,this,ti).call(this);let t=l(Or,this).fetch(this.options,e);return null!==e&&void 0!==e&&e.throwOnError||(t=t.catch(g)),t}function Zr(){a(Vr,this,Xr).call(this);const e=v(this.options.staleTime,l(Or,this));if(m||l(Br,this).isStale||!b(e))return;const t=y(l(Br,this).dataUpdatedAt,e)+1;c(Wr,this,d.setTimeout(()=>{l(Br,this).isStale||this.updateResult()},t))}function Jr(){var e;return null!==(e="function"===typeof this.options.refetchInterval?this.options.refetchInterval(l(Or,this)):this.options.refetchInterval)&&void 0!==e&&e}function Yr(e){a(Vr,this,ei).call(this),c(Hr,this,e),!m&&!1!==w(this.options.enabled,l(Or,this))&&b(l(Hr,this))&&0!==l(Hr,this)&&c(qr,this,d.setInterval(()=>{(this.options.refetchIntervalInBackground||G.isFocused())&&a(Vr,this,Gr).call(this)},l(Hr,this)))}function Qr(){a(Vr,this,Zr).call(this),a(Vr,this,Yr).call(this,a(Vr,this,Jr).call(this))}function Xr(){l(Wr,this)&&(d.clearTimeout(l(Wr,this)),c(Wr,this,void 0))}function ei(){l(qr,this)&&(d.clearInterval(l(qr,this)),c(qr,this,void 0))}function ti(){const e=l(Tr,this).getQueryCache().build(l(Tr,this),this.options);if(e===l(Or,this))return;const t=l(Or,this);c(Or,this,e),c(Nr,this,e.state),this.hasListeners()&&(null===t||void 0===t||t.removeObserver(this),e.addObserver(this))}function ni(e){V.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(l(Br,this))}),l(Tr,this).getQueryCache().notify({query:l(Or,this),type:"observerResultsUpdated"})})}function ri(e,t){return function(e,t){return!1!==w(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&ii(e,t,t.refetchOnMount)}function ii(e,t,n){if(!1!==w(t.enabled,e)&&"static"!==v(t.staleTime,e)){const r="function"===typeof n?n(e):n;return"always"===r||!1!==r&&si(e,t)}return!1}function oi(e,t,n,r){return(e!==t||!1===w(r.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&si(e,n)}function si(e,t){return!1!==w(t.enabled,e)&&e.isStaleByTime(v(t.staleTime,e))}function ai(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ci=r.createContext(ai()),li=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ui(e,t,n){var i,o,s,a;const c=r.useContext(ct),l=r.useContext(ci),u=st(n),d=u.defaultQueryOptions(e);null===(i=u.getDefaultOptions().queries)||void 0===i||null===(o=i._experimental_beforeQuery)||void 0===o||o.call(i,d);const h=u.getQueryCache().get(d.queryHash);d._optimisticResults=c?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,n=e=>"static"===e?e:Math.max(null!==e&&void 0!==e?e:t,t),r=e.staleTime;e.staleTime="function"===typeof r?function(){return n(r(...arguments))}:n(r),"number"===typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(d),((e,t,n)=>{const r=null!==n&&void 0!==n&&n.state.error&&"function"===typeof e.throwOnError?L(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))})(d,l,h),(e=>{r.useEffect(()=>{e.clearReset()},[e])})(l);const f=!u.getQueryCache().get(d.queryHash),[p]=r.useState(()=>new t(u,d)),b=p.getOptimisticResult(d),y=!c&&!1!==e.subscribed;if(r.useSyncExternalStore(r.useCallback(e=>{const t=y?p.subscribe(V.batchCalls(e)):g;return p.updateResult(),t},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),r.useEffect(()=>{p.setOptions(d)},[d,p]),((e,t)=>(null===e||void 0===e?void 0:e.suspense)&&t.isPending)(d,b))throw li(d,p,l);if((e=>{let{result:t,errorResetBoundary:n,throwOnError:r,query:i,suspense:o}=e;return t.isError&&!n.isReset()&&!t.isFetching&&i&&(o&&void 0===t.data||L(r,[t.error,i]))})({result:b,errorResetBoundary:l,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw b.error;if(null===(s=u.getDefaultOptions().queries)||void 0===s||null===(a=s._experimental_afterQuery)||void 0===a||a.call(s,d,b),d.experimental_prefetchInRender&&!m&&((e,t)=>e.isLoading&&e.isFetching&&!t)(b,c)){const e=f?li(d,p,l):null===h||void 0===h?void 0:h.promise;null===e||void 0===e||e.catch(g).finally(()=>{p.updateResult()})}return d.notifyOnChangeProps?b:p.trackResult(b)}function di(e){const t=function(e,t){return ui(e,$r,t)}((0,p.A)((0,p.A)({},e),{},{queryKeyHashFn:Er}));return t.queryKey=e.queryKey,t}const hi=new Map,fi=new Map;async function pi(e,t){let{cacheKey:n,cacheTime:r=Number.POSITIVE_INFINITY}=t;const i=function(e){const t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:n=>t.set(e,n)}),n=t(e,hi),r=t(e,fi);return{clear:()=>{n.clear(),r.clear()},promise:n,response:r}}(n),o=i.response.get();if(o&&r>0){if(Date.now()-o.created.getTime()<r)return o.data}let s=i.promise.get();s||(s=e(),i.promise.set(s));try{const e=await s;return i.response.set({created:new Date,data:e}),e}finally{i.promise.clear()}}const mi=e=>"blockNumber.".concat(e);async function gi(e){let{cacheTime:t=e.cacheTime}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=await pi(()=>e.request({method:"eth_blockNumber"}),{cacheKey:mi(e.uid),cacheTime:t});return BigInt(n)}const bi=["chainId"];const yi=["scopeKey"];function vi(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,p.A)((0,p.A)({},t.query),{},{gcTime:0,queryFn:async t=>{const[,n]=t.queryKey,{scopeKey:r}=n,i=(0,We.A)(n,yi),o=await function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{chainId:n}=t,r=(0,We.A)(t,bi);return xr(e.getClient({chainId:n}),gi,"getBlockNumber")(r)}(e,i);return null!==o&&void 0!==o?o:null},queryKey:wi(t)})}function wi(){return["blockNumber",Pr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})]}var _i=n(6091);function ki(e,t,n){const r=e[t.name];if("function"===typeof r)return r;const i=e[n];return"function"===typeof i?i:n=>t(e,n)}const xi=new Map,Si=new Map;let Ei=0;function Ai(e,t,n){const r=++Ei,i=()=>xi.get(e)||[],o=()=>{const t=i();if(!t.some(e=>e.id===r))return;const n=Si.get(e);if(1===t.length&&n){const e=n();e instanceof Promise&&e.catch(()=>{})}(()=>{const t=i();xi.set(e,t.filter(e=>e.id!==r))})()},s=i();if(xi.set(e,[...s,{id:r,fns:t}]),s&&s.length>0)return o;const a={};for(const l in t)a[l]=function(){const e=i();if(0!==e.length){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(const t of e){var o,s;null===(o=(s=t.fns)[l])||void 0===o||o.call(s,...n)}}};const c=n(a);return"function"===typeof c&&Si.set(e,c),o}async function Pi(e){return new Promise(t=>setTimeout(t,e))}var Ci=n(8551);function Ii(e,t){let{emitOnBegin:n=!1,emitMissed:r=!1,onBlockNumber:i,onError:o,poll:s,pollingInterval:a=e.pollingInterval}=t;let c;return("undefined"!==typeof s?s:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type&&"ipc"!==e.transport.transports[0].config.type))?Ai((0,Ci.A)(["watchBlockNumber",e.uid,n,r,a]),{onBlockNumber:i,onError:o},t=>function(e,t){let{emitOnBegin:n,initialWaitTime:r,interval:i}=t,o=!0;const s=()=>o=!1;return(async()=>{var t;let a;n&&(a=await e({unpoll:s}));const c=null!==(t=await(null===r||void 0===r?void 0:r(a)))&&void 0!==t?t:i;await Pi(c);const l=async()=>{o&&(await e({unpoll:s}),await Pi(i),l())};l()})(),s}(async()=>{try{const n=await ki(e,gi,"getBlockNumber")({cacheTime:0});if(void 0!==c){if(n===c)return;if(n-c>1&&r)for(let e=c+1n;e<n;e++)t.onBlockNumber(e,c),c=e}(void 0===c||n>c)&&(t.onBlockNumber(n,c),c=n)}catch(i){var n;null===(n=t.onError)||void 0===n||n.call(t,i)}},{emitOnBegin:n,interval:a})):Ai((0,Ci.A)(["watchBlockNumber",e.uid,n,r]),{onBlockNumber:i,onError:o},t=>{let n=!0,r=()=>n=!1;return(async()=>{try{const i=(()=>{if("fallback"===e.transport.type){const t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:o}=await i.subscribe({params:["newHeads"],onData(e){var r;if(!n)return;const i=(0,_i.uU)(null===(r=e.result)||void 0===r?void 0:r.number);t.onBlockNumber(i,c),c=i},onError(e){var n;null===(n=t.onError)||void 0===n||n.call(t,e)}});r=o,n||r()}catch(i){null===o||void 0===o||o(i)}})(),()=>r()})}const Mi=["syncConnectedChain"];const Ti=["enabled","onBlockNumber","config"];function Oi(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{enabled:n=!0,onBlockNumber:i,config:o}=t,s=(0,We.A)(t,Ti),a=Nt(t),c=ur({config:a}),l=null!==(e=t.chainId)&&void 0!==e?e:c,u=(0,r.useRef)(i),d=(0,r.useRef)(s.onError);u.current=i,d.current=s.onError,(0,r.useEffect)(()=>{if(n&&u.current)return function(e,t){const{syncConnectedChain:n=e._internal.syncConnectedChain}=t,r=(0,We.A)(t,Mi);let i;const o=t=>{i&&i();const n=xr(e.getClient({chainId:t}),Ii,"watchBlockNumber");return i=n(r),i},s=o(t.chainId);let a;return n&&!t.chainId&&(a=e.subscribe(e=>{let{chainId:t}=e;return t},async e=>o(e))),()=>{var e;null===s||void 0===s||s(),null===(e=a)||void 0===e||e()}}(a,(0,p.A)((0,p.A)({},s),{},{chainId:l,onBlockNumber:(e,t)=>{var n;return null===(n=u.current)||void 0===n?void 0:n.call(u,e,t)},onError:e=>{var t;return null===(t=d.current)||void 0===t?void 0:t.call(d,e)}}))},[l,a,n,s.emitMissed,s.emitOnBegin,s.poll,s.pollingInterval,s.syncConnectedChain])}var Ni=n(625);let Bi,Ri=256;function ji(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:11;if(!Bi||Ri+e>512){Bi="",Ri=0;for(let e=0;e<256;e++)Bi+=(256+256*Math.random()|0).toString(16).substring(1)}return Bi.substring(Ri,Ri+++e)}function Li(e){var t,n,r,i;const{batch:o,chain:s,ccipRead:a,key:c="base",name:l="Base Client",type:u="base"}=e,d=null!==(t=e.experimental_blockTag)&&void 0!==t?t:"number"===typeof(null===s||void 0===s?void 0:s.experimental_preconfirmationTime)?"pending":void 0,h=null!==(n=null===s||void 0===s?void 0:s.blockTime)&&void 0!==n?n:12e3,f=Math.min(Math.max(Math.floor(h/2),500),4e3),m=null!==(r=e.pollingInterval)&&void 0!==r?r:f,g=null!==(i=e.cacheTime)&&void 0!==i?i:m,b=e.account?(0,Ni.J)(e.account):void 0,{config:y,request:v,value:w}=e.transport({chain:s,pollingInterval:m}),_=(0,p.A)((0,p.A)({},y),w),k=(0,p.A)({account:b,batch:o,cacheTime:g,ccipRead:a,chain:s,key:c,name:l,pollingInterval:m,request:v,transport:_,type:u,uid:ji()},d?{experimental_blockTag:d}:{});return Object.assign(k,{extend:function e(t){return n=>{const r=n(t);for(const e in k)delete r[e];const i=(0,p.A)((0,p.A)({},t),r);return Object.assign(i,{extend:e(i)})}}(k)})}var Fi=n(3467);class zi extends or.C{constructor(e,t){let{code:n,docsPath:r,metaMessages:i,name:o,shortMessage:s}=t;super(s,{cause:e,docsPath:r,metaMessages:i||(null===e||void 0===e?void 0:e.metaMessages),name:o||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=o||e.name,this.code=e instanceof Fi.J8?e.code:null!==n&&void 0!==n?n:-1}}class Di extends zi{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class Ui extends zi{constructor(e){super(e,{code:Ui.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(Ui,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class Wi extends zi{constructor(e){super(e,{code:Wi.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(Wi,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class qi extends zi{constructor(e){let{method:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,{code:qi.code,name:"MethodNotFoundRpcError",shortMessage:"The method".concat(t?' "'.concat(t,'"'):""," does not exist / is not available.")})}}Object.defineProperty(qi,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class Hi extends zi{constructor(e){super(e,{code:Hi.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join("\n")})}}Object.defineProperty(Hi,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class Ki extends zi{constructor(e){super(e,{code:Ki.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(Ki,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class Vi extends zi{constructor(e){super(e,{code:Vi.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join("\n")})}}Object.defineProperty(Vi,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class $i extends zi{constructor(e){super(e,{code:$i.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty($i,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class Gi extends zi{constructor(e){super(e,{code:Gi.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(Gi,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class Zi extends zi{constructor(e){super(e,{code:Zi.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(Zi,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class Ji extends zi{constructor(e){let{method:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,{code:Ji.code,name:"MethodNotSupportedRpcError",shortMessage:"Method".concat(t?' "'.concat(t,'"'):""," is not supported.")})}}Object.defineProperty(Ji,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class Yi extends zi{constructor(e){super(e,{code:Yi.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(Yi,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class Qi extends zi{constructor(e){super(e,{code:Qi.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(Qi,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class Xi extends Di{constructor(e){super(e,{code:Xi.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(Xi,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class eo extends Di{constructor(e){super(e,{code:eo.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(eo,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class to extends Di{constructor(e){let{method:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e,{code:to.code,name:"UnsupportedProviderMethodError",shortMessage:"The Provider does not support the requested method".concat(t?' " '.concat(t,'"'):"",".")})}}Object.defineProperty(to,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class no extends Di{constructor(e){super(e,{code:no.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(no,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class ro extends Di{constructor(e){super(e,{code:ro.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty(ro,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class io extends Di{constructor(e){super(e,{code:io.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(io,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class oo extends Di{constructor(e){super(e,{code:oo.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(oo,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class so extends Di{constructor(e){super(e,{code:so.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(so,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class ao extends Di{constructor(e){super(e,{code:ao.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(ao,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class co extends Di{constructor(e){super(e,{code:co.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(co,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class lo extends Di{constructor(e){super(e,{code:lo.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(lo,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class uo extends Di{constructor(e){super(e,{code:uo.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(uo,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class ho extends Di{constructor(e){super(e,{code:ho.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(ho,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class fo extends zi{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}var po=n(7543);const mo=new po.A(8192);function go(e){let{delay:t=100,retryCount:n=2,shouldRetry:r=()=>!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((i,o)=>{const s=async function(){let{count:a=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{const t=await e();i(t)}catch(c){if(a<n&&await r({count:a,error:c}))return(async e=>{let{error:n}=e;const r="function"===typeof t?t({count:a,error:n}):t;r&&await Pi(r),s({count:a+1})})({error:c});o(c)}};s()})}function bo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return async function(n){var r;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{dedupe:o=!1,methods:s,retryDelay:a=150,retryCount:c=3,uid:l}=(0,p.A)((0,p.A)({},t),i),{method:u}=n;if(null!==s&&void 0!==s&&null!==(r=s.exclude)&&void 0!==r&&r.includes(u))throw new Ji(new Error("method not supported"),{method:u});if(null!==s&&void 0!==s&&s.include&&!s.include.includes(u))throw new Ji(new Error("method not supported"),{method:u});return function(e,t){let{enabled:n=!0,id:r}=t;if(!n||!r)return e();if(mo.get(r))return mo.get(r);const i=e().finally(()=>mo.delete(r));return mo.set(r,i),i}(()=>go(async()=>{try{return await e(n)}catch(t){const e=t;switch(e.code){case Ui.code:throw new Ui(e);case Wi.code:throw new Wi(e);case qi.code:throw new qi(e,{method:n.method});case Hi.code:throw new Hi(e);case Ki.code:throw new Ki(e);case Vi.code:throw new Vi(e);case $i.code:throw new $i(e);case Gi.code:throw new Gi(e);case Zi.code:throw new Zi(e);case Ji.code:throw new Ji(e,{method:n.method});case Yi.code:throw new Yi(e);case Qi.code:throw new Qi(e);case Xi.code:throw new Xi(e);case eo.code:throw new eo(e);case to.code:throw new to(e);case no.code:throw new no(e);case ro.code:throw new ro(e);case io.code:throw new io(e);case oo.code:throw new oo(e);case so.code:throw new so(e);case ao.code:throw new ao(e);case co.code:throw new co(e);case lo.code:throw new lo(e);case uo.code:throw new uo(e);case ho.code:throw new ho(e);case 5e3:throw new Xi(e);default:if(t instanceof or.C)throw t;throw new fo(e)}}},{delay:e=>{let{count:t,error:n}=e;if(n&&n instanceof Fi.Ci){var r;const e=null===n||void 0===n||null===(r=n.headers)||void 0===r?void 0:r.get("Retry-After");if(null!==e&&void 0!==e&&e.match(/\d/))return 1e3*Number.parseInt(e,10)}return(1<<t)*a},retryCount:c,shouldRetry:e=>{let{error:t}=e;return function(e){if("code"in e&&"number"===typeof e.code)return-1===e.code||(e.code===Yi.code||e.code===Ki.code);if(e instanceof Fi.Ci&&e.status)return 403===e.status||(408===e.status||(413===e.status||(429===e.status||(500===e.status||(502===e.status||(503===e.status||504===e.status))))));return!0}(t)}}),{enabled:o,id:o?(0,_r.i3)("".concat(l,".").concat((0,Ci.A)(n))):void 0})}}function yo(e,t){let{key:n,methods:r,name:i,request:o,retryCount:s=3,retryDelay:a=150,timeout:c,type:l}=e;return{config:{key:n,methods:r,name:i,request:o,retryCount:s,retryDelay:a,timeout:c,type:l},request:bo(o,{methods:r,retryCount:s,retryDelay:a,uid:ji()}),value:t}}var vo=n(6961);async function wo(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{assertChainId:i=!0}=r;let o;if(r.connector){const{connector:t}=r;if("reconnecting"===e.state.status&&!t.getAccounts&&!t.getChainId)throw new Yt({connector:t});const[n,i]=await Promise.all([t.getAccounts().catch(e=>{if(null===r.account)return[];throw e}),t.getChainId()]);o={accounts:n,chainId:i,connector:t}}else o=e.state.connections.get(e.state.current);if(!o)throw new Gt;const s=null!==(t=r.chainId)&&void 0!==t?t:o.chainId,a=await o.connector.getChainId();if(i&&a!==s)throw new Jt({connectionChainId:s,connectorChainId:a});const c=o.connector;if(c.getClient)return c.getClient({chainId:s});const l=(0,Ni.J)(null!==(n=r.account)&&void 0!==n?n:o.accounts[0]);if(l&&(l.address=(0,vo.b)(l.address)),r.account&&!o.accounts.some(e=>e.toLowerCase()===l.address.toLowerCase()))throw new Zt({address:l.address,connector:c});const u=e.chains.find(e=>e.id===s),d=await o.connector.getProvider({chainId:s});return Li({account:l,chain:u,name:"Connector Client",transport:e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{key:n="custom",methods:r,name:i="Custom Provider",retryDelay:o}=t;return s=>{var a;let{retryCount:c}=s;return yo({key:n,methods:r,name:i,request:e.request.bind(e),retryCount:null!==(a=t.retryCount)&&void 0!==a?a:c,retryDelay:o,type:"custom"})}}(d)((0,p.A)((0,p.A)({},e),{},{retryCount:0}))})}const _o=["connectorUid","scopeKey"];function ko(){return["connectorClient",Pr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})]}function xo(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=Nt(n),o=ur({config:i}),{address:s,connector:a}=jt({config:i}),c=function(e){var t,n,r;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,p.A)((0,p.A)({},i.query),{},{enabled:Boolean((null===(t=i.connector)||void 0===t?void 0:t.getProvider)&&(null===(n=null===(r=i.query)||void 0===r?void 0:r.enabled)||void 0===n||n)),gcTime:0,queryFn:async t=>{const[,n]=t.queryKey,{connectorUid:r,scopeKey:o}=n,s=(0,We.A)(n,_o);return wo(e,(0,p.A)((0,p.A)({},s),{},{connector:i.connector}))},queryKey:ko(i),staleTime:Number.POSITIVE_INFINITY})}(i,(0,p.A)((0,p.A)({},n),{},{chainId:null!==(e=n.chainId)&&void 0!==e?e:o,connector:null!==(t=n.connector)&&void 0!==t?t:a,query:n.query})),l=(0,r.useRef)(s),u=st();return(0,r.useEffect)(()=>{const e=l.current;!s&&e?(u.removeQueries({queryKey:c.queryKey}),l.current=void 0):s!==e&&(u.invalidateQueries({queryKey:c.queryKey}),l.current=s)},[s,u]),di(c)}class So extends or.C{constructor(){let{docsPath:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(["Could not find an Account to execute with this Action.","Please provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client."].join("\n"),{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}class Eo extends or.C{constructor(e){let{docsPath:t,metaMessages:n,type:r}=e;super('Account type "'.concat(r,'" is not supported.'),{docsPath:t,metaMessages:n,name:"AccountTypeNotSupportedError"})}}async function Ao(e,t){let{account:n=e.account,message:r}=t;if(!n)throw new So({docsPath:"/docs/actions/wallet/signMessage"});const i=(0,Ni.J)(n);if(i.signMessage)return i.signMessage({message:r});const o="string"===typeof r?(0,_r.i3)(r):r.raw instanceof Uint8Array?(0,_r.nj)(r.raw):r.raw;return e.request({method:"personal_sign",params:[o,i.address]},{retryCount:0})}const Po=["account","connector"];function Co(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,p.A)((0,p.A)({},t.mutation),{},{mutationFn:t=>async function(e,t){const{account:n,connector:r}=t,i=(0,We.A)(t,Po);let o;return o="object"===typeof n&&"local"===n.type?e.getClient():await wo(e,{account:n,connector:r}),xr(o,Ao,"signMessage")((0,p.A)((0,p.A)({},i),n?{account:n}:{}))}(e,t),mutationKey:["signMessage"]})}var Io=n(7568);var Mo=n(226),To=n(1478);function Oo(e){if(0===e||1===e)return e;if(27===e)return 0;if(28===e)return 1;throw new Error("Invalid yParityOrV value")}async function No(e){let{hash:t,signature:r}=e;return function(e){const t=(0,Io.S)("0x".concat(e.substring(4))).substring(26);return(0,vo.o)("0x".concat(t))}(await async function(e){let{hash:t,signature:r}=e;const i=(0,Mo.q)(t)?t:(0,_r.nj)(t),{secp256k1:o}=await n.e(578).then(n.bind(n,578)),s=(()=>{if("object"===typeof r&&"r"in r&&"s"in r){const{r:e,s:t,v:n,yParity:i}=r,s=Oo(Number(null!==i&&void 0!==i?i:n));return new o.Signature((0,_i.uU)(e),(0,_i.uU)(t)).addRecoveryBit(s)}const e=(0,Mo.q)(r)?r:(0,_r.nj)(r);if(65!==(0,To.E)(e))throw new Error("invalid signature length");const t=Oo((0,_i.ME)("0x".concat(e.slice(130))));return o.Signature.fromCompact(e.substring(2,130)).addRecoveryBit(t)})().recoverPublicKey(i.substring(2)).toHex(!1);return"0x".concat(s)}({hash:t,signature:r}))}var Bo=n(7683),Ro=n(3530),jo=n(2470);function Lo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"hex";const n=Fo(e),r=(0,jo.l)(new Uint8Array(n.length));return n.encode(r),"hex"===t?(0,_r.My)(r.bytes):r.bytes}function Fo(e){return Array.isArray(e)?function(e){const t=e.reduce((e,t)=>e+t.length,0),n=zo(t);return{length:t<=55?1+t:1+n+t,encode(r){t<=55?r.pushByte(192+t):(r.pushByte(247+n),1===n?r.pushUint8(t):2===n?r.pushUint16(t):3===n?r.pushUint24(t):r.pushUint32(t));for(const{encode:t}of e)t(r)}}}(e.map(e=>Fo(e))):function(e){const t="string"===typeof e?(0,Ro.aT)(e):e,n=zo(t.length),r=1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length;return{length:r,encode(e){1===t.length&&t[0]<128?e.pushBytes(t):t.length<=55?(e.pushByte(128+t.length),e.pushBytes(t)):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length),e.pushBytes(t))}}}(e)}function zo(e){if(e<256)return 1;if(e<65536)return 2;if(e<2**24)return 3;if(e<2**32)return 4;throw new or.C("Length is too large.")}function Do(e){var t;const{chainId:n,nonce:r,to:i}=e,o=null!==(t=e.contractAddress)&&void 0!==t?t:e.address,s=(0,Io.S)((0,Bo.aP)(["0x05",Lo([n?(0,_r.cK)(n):"0x",o,r?(0,_r.cK)(r):"0x"])]));return"bytes"===i?(0,Ro.aT)(s):s}async function Uo(e){const{authorization:t,signature:n}=e;return No({hash:Do(t),signature:null!==n&&void 0!==n?n:t})}var Wo=n(6583);var qo=n(6600),Ho=n(7814),Ko=n(2580);const Vo=["docsPath"];var $o=n(3093),Go=n(4367),Zo=n(7278);async function Jo(e){const t=await e.request({method:"eth_chainId"},{dedupe:!0});return(0,_i.ME)(t)}var Yo=n(2958);class Qo extends or.C{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class Xo extends or.C{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class es extends or.C{constructor(e){let{maxPriorityFeePerGas:t}=e;super("`maxFeePerGas` cannot be less than the `maxPriorityFeePerGas` (".concat((0,Yo.Q)(t)," gwei)."),{name:"MaxFeePerGasTooLowError"})}}class ts extends or.C{constructor(e){let{blockHash:t,blockNumber:n}=e,r="Block";t&&(r='Block at hash "'.concat(t,'"')),n&&(r='Block at number "'.concat(n,'"')),super("".concat(r," could not be found."),{name:"BlockNotFoundError"})}}var ns=n(3506);const rs={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function is(e,t){const n=(0,p.A)((0,p.A)({},e),{},{blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,_i.ME)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,_i.ME)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?rs[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0});return e.authorizationList&&(n.authorizationList=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"===typeof n.v){if(0n===n.v||27n===n.v)return 0;if(1n===n.v||28n===n.v)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),"legacy"===n.type&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),"eip2930"===n.type&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),"eip1559"===n.type&&delete n.maxFeePerBlobGas,n}const os=(0,ns.q)("transaction",is);function ss(e,t){var n;const r=(null!==(n=e.transactions)&&void 0!==n?n:[]).map(e=>"string"===typeof e?e:is(e));return(0,p.A)((0,p.A)({},e),{},{baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null})}const as=(0,ns.q)("block",ss);async function cs(e){var t,n;let{blockHash:r,blockNumber:i,blockTag:o=(null!==(t=e.experimental_blockTag)&&void 0!==t?t:"latest"),includeTransactions:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const a=null!==s&&void 0!==s&&s,c=void 0!==i?(0,_r.cK)(i):void 0;let l=null;if(l=r?await e.request({method:"eth_getBlockByHash",params:[r,a]},{dedupe:!0}):await e.request({method:"eth_getBlockByNumber",params:[c||o,a]},{dedupe:Boolean(c)}),!l)throw new ts({blockHash:r,blockNumber:i});return((null===(n=e.chain)||void 0===n||null===(n=n.formatters)||void 0===n||null===(n=n.block)||void 0===n?void 0:n.format)||ss)(l,"getBlock")}async function ls(e){const t=await e.request({method:"eth_gasPrice"});return BigInt(t)}async function us(e,t){const{block:n,chain:r=e.chain,request:i}=t||{};try{var o,s,a;const t=null!==(o=null===r||void 0===r||null===(s=r.fees)||void 0===s?void 0:s.maxPriorityFeePerGas)&&void 0!==o?o:null===r||void 0===r||null===(a=r.fees)||void 0===a?void 0:a.defaultPriorityFee;if("function"===typeof t){const r=n||await ki(e,cs,"getBlock")({}),o=await t({block:r,client:e,request:i});if(null===o)throw new Error;return o}if("undefined"!==typeof t)return t;const c=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,_i.uU)(c)}catch(c){const[t,r]=await Promise.all([n?Promise.resolve(n):ki(e,cs,"getBlock")({}),ki(e,ls,"getGasPrice")({})]);if("bigint"!==typeof t.baseFeePerGas)throw new Xo;const i=r-t.baseFeePerGas;return i<0n?0n:i}}async function ds(e,t){var n,r,i,o;const{block:s,chain:a=e.chain,request:c,type:l="eip1559"}=t||{},u=await(async(t,n,r)=>"function"===typeof(null===a||void 0===a||null===(t=a.fees)||void 0===t?void 0:t.baseFeeMultiplier)?a.fees.baseFeeMultiplier({block:s,client:e,request:c}):null!==(n=null===a||void 0===a||null===(r=a.fees)||void 0===r?void 0:r.baseFeeMultiplier)&&void 0!==n?n:1.2)();if(u<1)throw new Qo;const d=10**(null!==(n=null===(r=u.toString().split(".")[1])||void 0===r?void 0:r.length)&&void 0!==n?n:0),h=e=>e*BigInt(Math.ceil(u*d))/BigInt(d),f=s||await ki(e,cs,"getBlock")({});if("function"===typeof(null===a||void 0===a||null===(i=a.fees)||void 0===i?void 0:i.estimateFeesPerGas)){const t=await a.fees.estimateFeesPerGas({block:s,client:e,multiply:h,request:c,type:l});if(null!==t)return t}if("eip1559"===l){var p;if("bigint"!==typeof f.baseFeePerGas)throw new Xo;const t="bigint"===typeof(null===c||void 0===c?void 0:c.maxPriorityFeePerGas)?c.maxPriorityFeePerGas:await us(e,{block:f,chain:a,request:c}),n=h(f.baseFeePerGas);return{maxFeePerGas:null!==(p=null===c||void 0===c?void 0:c.maxFeePerGas)&&void 0!==p?p:n+t,maxPriorityFeePerGas:t}}return{gasPrice:null!==(o=null===c||void 0===c?void 0:c.gasPrice)&&void 0!==o?o:h(await ki(e,ls,"getGasPrice")({}))}}class hs extends or.C{constructor(e,t){var n;let{account:r,docsPath:i,chain:o,data:s,gas:a,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:u,nonce:d,to:h,value:f}=t;const p=(0,Ho.aO)({from:null===r||void 0===r?void 0:r.address,to:h,value:"undefined"!==typeof f&&"".concat((0,cr.c)(f)," ").concat((null===o||void 0===o||null===(n=o.nativeCurrency)||void 0===n?void 0:n.symbol)||"ETH"),data:s,gas:a,gasPrice:"undefined"!==typeof c&&"".concat((0,Yo.Q)(c)," gwei"),maxFeePerGas:"undefined"!==typeof l&&"".concat((0,Yo.Q)(l)," gwei"),maxPriorityFeePerGas:"undefined"!==typeof u&&"".concat((0,Yo.Q)(u)," gwei"),nonce:d});super(e.shortMessage,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",p].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}const fs=["docsPath"];var ps=n(9187);const ms=["accessList","authorizationList","blobs","blobVersionedHashes","blockNumber","blockTag","data","gas","gasPrice","maxFeePerBlobGas","maxFeePerGas","maxPriorityFeePerGas","nonce","value","stateOverride"];async function gs(e,t){const{account:n=e.account,prepare:r=!0}=t,i=n?(0,Ni.J)(n):void 0,o=Array.isArray(r)?r:"local"!==(null===i||void 0===i?void 0:i.type)?["blobVersionedHashes"]:void 0;try{var s,a;const n=r?await Rs(e,(0,p.A)((0,p.A)({},t),{},{parameters:o})):t,{accessList:c,authorizationList:l,blobs:u,blobVersionedHashes:d,blockNumber:h,blockTag:f,data:m,gas:g,gasPrice:b,maxFeePerBlobGas:y,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:_,value:k,stateOverride:x}=n,S=(0,We.A)(n,ms),E=("bigint"===typeof h?(0,_r.cK)(h):void 0)||f,A=(0,ps.yH)(x),P=await(async()=>S.to?S.to:l&&l.length>0?await Uo({authorization:l[0]}).catch(()=>{throw new or.C("`to` is required. Could not infer from `authorizationList`")}):void 0)();(0,Zo.c)(t);const C=null===(s=e.chain)||void 0===s||null===(s=s.formatters)||void 0===s||null===(s=s.transactionRequest)||void 0===s?void 0:s.format,I=(C||Go.Bv)((0,p.A)((0,p.A)({},(0,$o.o)(S,{format:C})),{},{account:i,accessList:c,authorizationList:l,blobs:u,blobVersionedHashes:d,data:m,gas:g,gasPrice:b,maxFeePerBlobGas:y,maxFeePerGas:v,maxPriorityFeePerGas:w,nonce:_,to:P,value:k}),"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:A?[I,null!==(a=null!==E&&void 0!==E?E:e.experimental_blockTag)&&void 0!==a?a:"latest",A]:E?[I,E]:[I]}))}catch(c){throw function(e,t){let{docsPath:n}=t,r=(0,We.A)(t,fs);const i=(()=>{const t=(0,Ko.l)(e,r);return t instanceof qo.RM?e:t})();return new hs(i,(0,p.A)({docsPath:n},r))}(c,(0,p.A)((0,p.A)({},t),{},{account:i,chain:e.chain}))}}async function bs(e,t){let{address:n,blockTag:r="latest",blockNumber:i}=t;const o=await e.request({method:"eth_getTransactionCount",params:[n,"bigint"===typeof i?(0,_r.cK)(i):r]},{dedupe:Boolean(i)});return(0,_i.ME)(o)}function ys(e){var t;const{kzg:n}=e,r=null!==(t=e.to)&&void 0!==t?t:"string"===typeof e.blobs[0]?"hex":"bytes",i="string"===typeof e.blobs[0]?e.blobs.map(e=>(0,Ro.aT)(e)):e.blobs,o=[];for(const s of i)o.push(Uint8Array.from(n.blobToKzgCommitment(s)));return"bytes"===r?o:o.map(e=>(0,_r.My)(e))}function vs(e){var t;const{kzg:n}=e,r=null!==(t=e.to)&&void 0!==t?t:"string"===typeof e.blobs[0]?"hex":"bytes",i="string"===typeof e.blobs[0]?e.blobs.map(e=>(0,Ro.aT)(e)):e.blobs,o="string"===typeof e.commitments[0]?e.commitments.map(e=>(0,Ro.aT)(e)):e.commitments,s=[];for(let a=0;a<i.length;a++){const e=i[a],t=o[a];s.push(Uint8Array.from(n.computeBlobKzgProof(e,t)))}return"bytes"===r?s:s.map(e=>(0,_r.My)(e))}var ws=n(1914);function _s(e){var t;const{commitment:n,version:r=1}=e,i=null!==(t=e.to)&&void 0!==t?t:"string"===typeof n?"hex":"bytes",o=function(e,t){const n=t||"hex",r=(0,ws.sc)((0,Mo.q)(e,{strict:!1})?(0,Ro.ZJ)(e):e);return"bytes"===n?r:(0,_r.nj)(r)}(n,"bytes");return o.set([r],0),"bytes"===i?o:(0,_r.My)(o)}function ks(e){var t;const{commitments:n,version:r}=e,i=null!==(t=e.to)&&void 0!==t?t:"string"===typeof n[0]?"hex":"bytes",o=[];for(const s of n)o.push(_s({commitment:s,to:i,version:r}));return o}const xs=32,Ss=4096,Es=xs*Ss,As=6*Es-1-1*Ss*6;class Ps extends or.C{constructor(e){let{maxSize:t,size:n}=e;super("Blob size is too large.",{metaMessages:["Max: ".concat(t," bytes"),"Given: ".concat(n," bytes")],name:"BlobSizeTooLargeError"})}}class Cs extends or.C{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class Is extends or.C{constructor(e){let{hash:t,size:n}=e;super('Versioned hash "'.concat(t,'" size is invalid.'),{metaMessages:["Expected: 32","Received: ".concat(n)],name:"InvalidVersionedHashSizeError"})}}class Ms extends or.C{constructor(e){let{hash:t,version:n}=e;super('Versioned hash "'.concat(t,'" version is invalid.'),{metaMessages:["Expected: ".concat(1),"Received: ".concat(n)],name:"InvalidVersionedHashVersionError"})}}function Ts(e){var t,n,r;const{data:i,kzg:o,to:s}=e,a=null!==(t=e.blobs)&&void 0!==t?t:function(e){var t;const n=null!==(t=e.to)&&void 0!==t?t:"string"===typeof e.data?"hex":"bytes",r="string"===typeof e.data?(0,Ro.aT)(e.data):e.data,i=(0,To.E)(r);if(!i)throw new Cs;if(i>As)throw new Ps({maxSize:As,size:i});const o=[];let s=!0,a=0;for(;s;){const e=(0,jo.l)(new Uint8Array(Es));let t=0;for(;t<Ss;){const n=r.slice(a,a+(xs-1));if(e.pushByte(0),e.pushBytes(n),n.length<31){e.pushByte(128),s=!1;break}t++,a+=31}o.push(e)}return"bytes"===n?o.map(e=>e.bytes):o.map(e=>(0,_r.My)(e.bytes))}({data:i,to:s}),c=null!==(n=e.commitments)&&void 0!==n?n:ys({blobs:a,kzg:o,to:s}),l=null!==(r=e.proofs)&&void 0!==r?r:vs({blobs:a,commitments:c,kzg:o,to:s}),u=[];for(let d=0;d<a.length;d++)u.push({blob:a[d],commitment:c[d],proof:l[d]});return u}function Os(e){if(e.type)return e.type;if("undefined"!==typeof e.authorizationList)return"eip7702";if("undefined"!==typeof e.blobs||"undefined"!==typeof e.blobVersionedHashes||"undefined"!==typeof e.maxFeePerBlobGas||"undefined"!==typeof e.sidecars)return"eip4844";if("undefined"!==typeof e.maxFeePerGas||"undefined"!==typeof e.maxPriorityFeePerGas)return"eip1559";if("undefined"!==typeof e.gasPrice)return"undefined"!==typeof e.accessList?"eip2930":"legacy";throw new Ho.Vg({transaction:e})}const Ns=["blobVersionedHashes","chainId","fees","gas","nonce","type"],Bs=new Map;async function Rs(e,t){const{account:n=e.account,blobs:r,chain:i,gas:o,kzg:s,nonce:a,nonceManager:c,parameters:l=Ns,type:u}=t,d=n?(0,Ni.J)(n):n,h=(0,p.A)((0,p.A)({},t),d?{from:null===d||void 0===d?void 0:d.address}:{});let f,m;async function g(){return f||(f=await ki(e,cs,"getBlock")({blockTag:"latest"}),f)}async function b(){if(m)return m;if(i)return i.id;if("undefined"!==typeof t.chainId)return t.chainId;const n=await ki(e,Jo,"getChainId")({});return m=n,m}if(l.includes("nonce")&&"undefined"===typeof a&&d)if(c){const t=await b();h.nonce=await c.consume({address:d.address,chainId:t,client:e})}else h.nonce=await ki(e,bs,"getTransactionCount")({address:d.address,blockTag:"pending"});if((l.includes("blobVersionedHashes")||l.includes("sidecars"))&&r&&s){const e=ys({blobs:r,kzg:s});if(l.includes("blobVersionedHashes")){const t=ks({commitments:e,to:"hex"});h.blobVersionedHashes=t}if(l.includes("sidecars")){const t=Ts({blobs:r,commitments:e,proofs:vs({blobs:r,commitments:e,kzg:s}),to:"hex"});h.sidecars=t}}if(l.includes("chainId")&&(h.chainId=await b()),(l.includes("fees")||l.includes("type"))&&"undefined"===typeof u)try{h.type=Os(h)}catch(y){let t=Bs.get(e.uid);if("undefined"===typeof t){const n=await g();t="bigint"===typeof(null===n||void 0===n?void 0:n.baseFeePerGas),Bs.set(e.uid,t)}h.type=t?"eip1559":"legacy"}if(l.includes("fees"))if("legacy"!==h.type&&"eip2930"!==h.type){if("undefined"===typeof h.maxFeePerGas||"undefined"===typeof h.maxPriorityFeePerGas){const n=await g(),{maxFeePerGas:r,maxPriorityFeePerGas:o}=await ds(e,{block:n,chain:i,request:h});if("undefined"===typeof t.maxPriorityFeePerGas&&t.maxFeePerGas&&t.maxFeePerGas<o)throw new es({maxPriorityFeePerGas:o});h.maxPriorityFeePerGas=o,h.maxFeePerGas=r}}else{if("undefined"!==typeof t.maxFeePerGas||"undefined"!==typeof t.maxPriorityFeePerGas)throw new Xo;if("undefined"===typeof t.gasPrice){const t=await g(),{gasPrice:n}=await ds(e,{block:t,chain:i,request:h,type:"legacy"});h.gasPrice=n}}return l.includes("gas")&&"undefined"===typeof o&&(h.gas=await ki(e,gs,"estimateGas")((0,p.A)((0,p.A)({},h),{},{account:d,prepare:"local"===(null===d||void 0===d?void 0:d.type)?[]:["blobVersionedHashes"]}))),(0,Zo.c)(h),delete h.parameters,h}async function js(e,t){let{serializedTransaction:n}=t;return e.request({method:"eth_sendRawTransaction",params:[n]},{retryCount:0})}const Ls=["account","chain","accessList","authorizationList","blobs","data","gas","gasPrice","maxFeePerBlobGas","maxFeePerGas","maxPriorityFeePerGas","nonce","type","value"],Fs=new po.A(128);async function zs(e,t){const{account:n=e.account,chain:r=e.chain,accessList:i,authorizationList:o,blobs:s,data:a,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:f,type:m,value:g}=t,b=(0,We.A)(t,Ls);if("undefined"===typeof n)throw new So({docsPath:"/docs/actions/wallet/sendTransaction"});const y=n?(0,Ni.J)(n):null;try{(0,Zo.c)(t);const n=await(async()=>t.to?t.to:null!==t.to&&o&&o.length>0?await Uo({authorization:o[0]}).catch(()=>{throw new or.C("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if("json-rpc"===(null===y||void 0===y?void 0:y.type)||null===y){var v;let t;null!==r&&(t=await ki(e,Jo,"getChainId")({}),function(e){let{chain:t,currentChainId:n}=e;if(!t)throw new Wo.jF;if(n!==t.id)throw new Wo.EH({chain:t,currentChainId:n})}({currentChainId:t,chain:r}));const w=null===(v=e.chain)||void 0===v||null===(v=v.formatters)||void 0===v||null===(v=v.transactionRequest)||void 0===v?void 0:v.format,k=(w||Go.Bv)((0,p.A)((0,p.A)({},(0,$o.o)(b,{format:w})),{},{accessList:i,account:y,authorizationList:o,blobs:s,chainId:t,data:a,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:f,to:n,type:m,value:g}),"sendTransaction"),x=Fs.get(e.uid),S=x?"wallet_sendTransaction":"eth_sendTransaction";try{return await e.request({method:S,params:[k]},{retryCount:0})}catch(_){if(!1===x)throw _;const t=_;if("InvalidInputRpcError"===t.name||"InvalidParamsRpcError"===t.name||"MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)return await e.request({method:"wallet_sendTransaction",params:[k]},{retryCount:0}).then(t=>(Fs.set(e.uid,!0),t)).catch(n=>{const r=n;if("MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name)throw Fs.set(e.uid,!1),t;throw r});throw t}}if("local"===(null===y||void 0===y?void 0:y.type)){var w;const t=await ki(e,Rs,"prepareTransactionRequest")((0,p.A)((0,p.A)({account:y,accessList:i,authorizationList:o,blobs:s,chain:r,data:a,gas:c,gasPrice:l,maxFeePerBlobGas:u,maxFeePerGas:d,maxPriorityFeePerGas:h,nonce:f,nonceManager:y.nonceManager,parameters:[...Ns,"sidecars"],type:m,value:g},b),{},{to:n})),v=null===r||void 0===r||null===(w=r.serializers)||void 0===w?void 0:w.transaction,_=await y.signTransaction(t,{serializer:v});return await ki(e,js,"sendRawTransaction")({serializedTransaction:_})}if("smart"===(null===y||void 0===y?void 0:y.type))throw new Eo({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new Eo({docsPath:"/docs/actions/wallet/sendTransaction",type:null===y||void 0===y?void 0:y.type})}catch(k){if(k instanceof Eo)throw k;throw function(e,t){let{docsPath:n}=t,r=(0,We.A)(t,Vo);const i=(()=>{const t=(0,Ko.l)(e,r);return t instanceof qo.RM?e:t})();return new Ho.$s(i,(0,p.A)({docsPath:n},r))}(k,(0,p.A)((0,p.A)({},t),{},{account:y,chain:t.chain||void 0}))}}const Ds=["account","chainId","connector"];function Us(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,p.A)((0,p.A)({},t.mutation),{},{mutationFn:t=>async function(e,t){var n;const{account:r,chainId:i,connector:o}=t,s=(0,We.A)(t,Ds);let a;a="object"===typeof r&&"local"===(null===r||void 0===r?void 0:r.type)?e.getClient({chainId:i}):await wo(e,{account:null!==r&&void 0!==r?r:void 0,assertChainId:!1,chainId:i,connector:o});const c=i&&(null===(l=a.chain)||void 0===l?void 0:l.id)!==i?{id:i}:a.chain;var l;const u=xr(a,zs,"sendTransaction");return await u((0,p.A)((0,p.A)((0,p.A)({},s),r?{account:r}:{}),{},{assertChainId:!!i,chain:c,gas:null!==(n=s.gas)&&void 0!==n?n:void 0}))}(e,t),mutationKey:["sendTransaction"]})}var Ws=n(2283);async function qs(e,t){var n;let{blockHash:r,blockNumber:i,blockTag:o,hash:s,index:a}=t;const c=o||"latest",l=void 0!==i?(0,_r.cK)(i):void 0;let u=null;if(s?u=await e.request({method:"eth_getTransactionByHash",params:[s]},{dedupe:!0}):r?u=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[r,(0,_r.cK)(a)]},{dedupe:!0}):(l||c)&&(u=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[l||c,(0,_r.cK)(a)]},{dedupe:Boolean(l)})),!u)throw new Ho.Kz({blockHash:r,blockNumber:i,blockTag:c,hash:s,index:a});return((null===(n=e.chain)||void 0===n||null===(n=n.formatters)||void 0===n||null===(n=n.transaction)||void 0===n?void 0:n.format)||is)(u,"getTransaction")}const Hs={"0x0":"reverted","0x1":"success"};function Ks(e,t){const n=(0,p.A)((0,p.A)({},e),{},{blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>function(e){let{args:t,eventName:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,p.A)((0,p.A)({},e),{},{blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null},n?{args:t,eventName:n}:{})}(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,_i.ME)(e.transactionIndex):null,status:e.status?Hs[e.status]:null,type:e.type?rs[e.type]||e.type:null});return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}const Vs=(0,ns.q)("transactionReceipt",Ks);async function $s(e,t){var n;let{hash:r}=t;const i=await e.request({method:"eth_getTransactionReceipt",params:[r]},{dedupe:!0});if(!i)throw new Ho.Kc({hash:r});return((null===(n=e.chain)||void 0===n||null===(n=n.formatters)||void 0===n||null===(n=n.transactionReceipt)||void 0===n?void 0:n.format)||Ks)(i,"getTransactionReceipt")}async function Gs(e,t){const{checkReplacement:n=!0,confirmations:r=1,hash:i,onReplaced:o,retryCount:s=6,retryDelay:a=e=>{let{count:t}=e;return 200*(1<<t)},timeout:c=18e4}=t,l=(0,Ci.A)(["waitForTransactionReceipt",e.uid,i]),u=t.pollingInterval?t.pollingInterval:null!==(d=e.chain)&&void 0!==d&&d.experimental_preconfirmationTime?e.chain.experimental_preconfirmationTime:e.pollingInterval;var d;let h,f,p,m,g,b=!1;const{promise:y,resolve:v,reject:w}=(0,Ws.Y)(),_=c?setTimeout(()=>{var e,t;null===(e=g)||void 0===e||e(),null===(t=m)||void 0===t||t(),w(new Ho.WA({hash:i}))},c):void 0;return m=Ai(l,{onReplaced:o,resolve:v,reject:w},async t=>{var o;if(p=await ki(e,$s,"getTransactionReceipt")({hash:i}).catch(()=>{}),p&&r<=1)return clearTimeout(_),t.resolve(p),void(null===(o=m)||void 0===o||o());g=ki(e,Ii,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:u,async onBlockNumber(o){const c=e=>{var t,n;clearTimeout(_),null===(t=g)||void 0===t||t(),e(),null===(n=m)||void 0===n||n()};let l=o;if(!b)try{if(p){if(r>1&&(!p.blockNumber||l-p.blockNumber+1n<r))return;return void c(()=>t.resolve(p))}if(n&&!h&&(b=!0,await go(async()=>{h=await ki(e,qs,"getTransaction")({hash:i}),h.blockNumber&&(l=h.blockNumber)},{delay:a,retryCount:s}),b=!1),p=await ki(e,$s,"getTransactionReceipt")({hash:i}),r>1&&(!p.blockNumber||l-p.blockNumber+1n<r))return;c(()=>t.resolve(p))}catch(u){if(u instanceof Ho.Kz||u instanceof Ho.Kc){if(!h)return void(b=!1);try{f=h,b=!0;const n=await go(()=>ki(e,cs,"getBlock")({blockNumber:l,includeTransactions:!0}),{delay:a,retryCount:s,shouldRetry:e=>{let{error:t}=e;return t instanceof ts}});b=!1;const i=n.transactions.find(e=>{let{from:t,nonce:n}=e;return t===f.from&&n===f.nonce});if(!i)return;if(p=await ki(e,$s,"getTransactionReceipt")({hash:i.hash}),r>1&&(!p.blockNumber||l-p.blockNumber+1n<r))return;let o="replaced";i.to===f.to&&i.value===f.value&&i.input===f.input?o="repriced":i.from===i.to&&0n===i.value&&(o="cancelled"),c(()=>{var e;null===(e=t.onReplaced)||void 0===e||e.call(t,{reason:o,replacedTransaction:f,transaction:i,transactionReceipt:p}),t.resolve(p)})}catch(d){c(()=>t.reject(d))}}else c(()=>t.reject(u))}}})}),y}var Zs=n(7862);const Js=["chainId","timeout"],Ys=["from"];const Qs=["scopeKey"],Xs=["onReplaced"];function ea(e){var t,n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,p.A)((0,p.A)({},r.query),{},{enabled:Boolean(r.hash&&(null===(t=null===(n=r.query)||void 0===n?void 0:n.enabled)||void 0===t||t)),queryFn:async t=>{const[,n]=t.queryKey,{scopeKey:i}=n,o=(0,We.A)(n,Qs);if(!o.hash)throw new Error("hash is required");return async function(e,t){const{chainId:n,timeout:r=0}=t,i=(0,We.A)(t,Js),o=e.getClient({chainId:n}),s=xr(o,Gs,"waitForTransactionReceipt"),a=await s((0,p.A)((0,p.A)({},i),{},{timeout:r}));if("reverted"===a.status){const e=xr(o,qs,"getTransaction"),t=await e({hash:a.transactionHash}),{from:n}=t,r=(0,We.A)(t,Ys),i=xr(o,Zs.T,"call"),s=await i((0,p.A)((0,p.A)({},r),{},{account:n,data:r.input,gasPrice:"eip1559"!==r.type?r.gasPrice:void 0,maxFeePerGas:"eip1559"===r.type?r.maxFeePerGas:void 0,maxPriorityFeePerGas:"eip1559"===r.type?r.maxPriorityFeePerGas:void 0})),c=null!==s&&void 0!==s&&s.data?(0,_i.IQ)("0x".concat(s.data.substring(138))):"unknown reason";throw new Error(c)}return(0,p.A)((0,p.A)({},a),{},{chainId:o.chain.id})}(e,(0,p.A)((0,p.A)({},o),{},{onReplaced:r.onReplaced,hash:o.hash}))},queryKey:ta(r)})}function ta(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{onReplaced:t}=e;return["waitForTransactionReceipt",Pr((0,We.A)(e,Xs))]}function na(){var e,t;const n=jt(),i=ur(),{disconnect:o}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Nt(e),n=Kt(dr(t,e));return(0,p.A)((0,p.A)({},n),{},{connectors:pr({config:t}).map(e=>e.connector),disconnect:n.mutate,disconnectAsync:n.mutateAsync})}(),s=br(),{switchChain:a}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Nt(e),n=Kt(wr(t,e));return(0,p.A)((0,p.A)({},n),{},{chains:br({config:t}),switchChain:n.mutate,switchChainAsync:n.mutateAsync})}(),{data:c}=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=Nt(t),r=ur({config:n});return di(Ir(n,(0,p.A)((0,p.A)({},t),{},{chainId:null!==(e=t.chainId)&&void 0!==e?e:r})))}({address:n.address}),{data:l}=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=Nt(n),i=ur({config:r}),o=vi(r,(0,p.A)((0,p.A)({},n),{},{chainId:null!==(e=n.chainId)&&void 0!==e?e:i})),s=st();return Oi((0,p.A)((0,p.A)({},(0,p.A)({config:n.config,chainId:n.chainId},"object"===typeof n.watch?n.watch:{})),{},{enabled:Boolean((null===(t=o.enabled)||void 0===t||t)&&("object"===typeof n.watch?n.watch.enabled:n.watch)),onBlockNumber(e){s.setQueryData(o.queryKey,e)}})),di(o)}({watch:!0}),{data:u}=xo(),{signMessage:d,data:h}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Kt(Co(Nt(e),e));return(0,p.A)((0,p.A)({},t),{},{signMessage:t.mutate,signMessageAsync:t.mutateAsync})}(),{data:f,error:m,isPending:g,sendTransaction:b}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Kt(Us(Nt(e),e));return(0,p.A)((0,p.A)({},t),{},{sendTransaction:t.mutate,sendTransactionAsync:t.mutateAsync})}(),{isLoading:y,isSuccess:v}=function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=Nt(t),r=ur({config:n});return di(ea(n,(0,p.A)((0,p.A)({},t),{},{chainId:null!==(e=t.chainId)&&void 0!==e?e:r})))}({hash:f}),[w,_]=(0,r.useState)(""),[k,x]=(0,r.useState)(""),[S,E]=(0,r.useState)("");return(0,it.jsxs)("div",{"data-testid":Nn.card,className:"bg-white border border-gray-200 rounded-lg p-6 shadow-sm hover:shadow-md transition-shadow duration-200",children:[(0,it.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,it.jsx)("h3",{"data-testid":Nn.title,className:"text-lg font-semibold text-gray-800 truncate",children:"Wagmi Connection"}),(0,it.jsx)("button",{type:"button","data-testid":Nn.btnDisconnect,onClick:()=>o(),className:"bg-red-500 text-white px-3 py-1 rounded text-sm hover:bg-red-600 transition-colors",children:"Disconnect"})]}),(0,it.jsxs)("div",{className:"mb-4",children:[(0,it.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,it.jsx)("span",{"data-testid":Nn.chainIdLabel,className:"text-sm font-medium text-gray-600",children:"Connected Chain:"}),(0,it.jsx)("span",{"data-testid":Nn.chainIdValue,className:"text-sm text-gray-500 bg-blue-50 text-blue-700 px-2 py-1 rounded-full",children:i||"Not available"})]}),(0,it.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,it.jsx)("span",{"data-testid":Nn.accountLabel,className:"text-sm font-medium text-gray-600",children:"Account:"}),(0,it.jsx)("span",{"data-testid":Nn.accountValue,className:"text-sm text-gray-500 bg-blue-50 text-blue-700 px-2 py-1 rounded-full",children:n.address?"Connected":"Not connected"})]}),n.address&&(0,it.jsxs)("div",{"data-testid":Nn.activeAccount,className:"mt-2 p-3 bg-green-50 border border-green-200 rounded-md",children:[(0,it.jsx)("p",{className:"text-sm text-green-800 font-medium",children:"Active Account:"}),(0,it.jsx)("p",{className:"text-sm text-green-700 font-mono break-all",children:n.address})]}),c&&(0,it.jsxs)("div",{"data-testid":Nn.balanceContainer,className:"mt-2 p-3 bg-purple-50 border border-purple-200 rounded-md",children:[(0,it.jsx)("p",{className:"text-sm text-purple-800 font-medium",children:"Balance:"}),(0,it.jsxs)("p",{"data-testid":Nn.balanceValue,className:"text-sm text-purple-700 font-mono",children:[(0,cr.c)(c.value)," ",c.symbol]})]}),l&&(0,it.jsxs)("div",{"data-testid":Nn.blockNumberContainer,className:"mt-2 p-3 bg-gray-50 border border-gray-200 rounded-md",children:[(0,it.jsx)("p",{className:"text-sm text-gray-800 font-medium",children:"Block Number:"}),(0,it.jsx)("p",{"data-testid":Nn.blockNumberValue,className:"text-sm text-gray-700 font-mono",children:l.toString()})]})]}),(0,it.jsxs)("div",{className:"space-y-2",children:[(0,it.jsxs)("div",{"data-testid":Nn.switchChainSection,className:"mt-4 pt-4 border-t border-gray-200",children:[(0,it.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Switch Chain"}),(0,it.jsx)("div",{className:"space-y-2",children:s.map(e=>(0,it.jsxs)("button",{type:"button","data-testid":Nn.btnSwitchChain(e.id),disabled:i===e.id,onClick:()=>a({chainId:e.id}),className:"w-full bg-blue-500 text-white px-4 py-2 rounded text-sm hover:bg-blue-600 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed",children:[e.name," ",i===e.id&&"(Current)"]},e.id))})]}),(0,it.jsxs)("div",{"data-testid":Nn.signMessageSection,className:"mt-4 pt-4 border-t border-gray-200",children:[(0,it.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Sign Message"}),(0,it.jsxs)("form",{onSubmit:e=>{e.preventDefault(),w&&d({message:w})},className:"space-y-2",children:[(0,it.jsx)("input",{type:"text","data-testid":Nn.inputMessage,value:w,onChange:e=>_(e.target.value),placeholder:"Enter message to sign",className:"w-full p-2 border border-gray-300 rounded text-sm"}),(0,it.jsx)("button",{type:"submit","data-testid":Nn.btnSignMessage,disabled:!w,className:"w-full bg-blue-500 text-white px-4 py-2 rounded text-sm hover:bg-blue-600 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed",children:"Sign Message"})]}),h&&(0,it.jsxs)("div",{"data-testid":Nn.signatureResult,className:"mt-2 p-2 bg-green-50 border border-green-200 rounded text-xs font-mono break-all",children:["Signature: ",h]})]}),(0,it.jsxs)("div",{"data-testid":Nn.sendTxSection,className:"mt-4 pt-4 border-t border-gray-200",children:[(0,it.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Send Transaction"}),(0,it.jsxs)("form",{onSubmit:e=>{e.preventDefault(),k&&S&&b({to:k,value:ar(S)})},className:"space-y-2",children:[(0,it.jsx)("input",{type:"text","data-testid":Nn.inputToAddress,value:k,onChange:e=>x(e.target.value),placeholder:"To address (0x...)",className:"w-full p-2 border border-gray-300 rounded text-sm"}),(0,it.jsx)("input",{type:"text","data-testid":Nn.inputAmount,value:S,onChange:e=>E(e.target.value),placeholder:"Amount (ETH)",className:"w-full p-2 border border-gray-300 rounded text-sm"}),(0,it.jsx)("button",{type:"submit","data-testid":Nn.btnSendTransaction,disabled:g||!k||!S,className:"w-full bg-blue-500 text-white px-4 py-2 rounded text-sm hover:bg-blue-600 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed",children:g?"Sending...":"Send Transaction"})]}),f&&(0,it.jsxs)("div",{"data-testid":Nn.txHashResult,className:"mt-2 p-2 bg-blue-50 border border-blue-200 rounded text-xs font-mono break-all",children:["Transaction Hash: ",f]}),y&&(0,it.jsx)("div",{"data-testid":Nn.txConfirmingText,className:"mt-2 text-xs text-blue-600",children:"Waiting for confirmation..."}),v&&(0,it.jsx)("div",{"data-testid":Nn.txConfirmedText,className:"mt-2 text-xs text-green-600",children:"Transaction confirmed!"}),m&&(0,it.jsxs)("div",{"data-testid":Nn.txErrorText,className:"mt-2 p-2 bg-red-50 border border-red-200 rounded text-xs text-red-600",children:["Error: ",m.shortMessage||m.message]})]}),u&&(0,it.jsxs)("div",{"data-testid":Nn.connectorSection,className:"mt-4 pt-4 border-t border-gray-200",children:[(0,it.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Connector Client Info"}),(0,it.jsxs)("div",{className:"p-2 bg-gray-50 border border-gray-200 rounded text-xs",children:[(0,it.jsxs)("p",{"data-testid":Nn.connectorAccount,children:["Account: ",null===(e=u.account)||void 0===e?void 0:e.address]}),(0,it.jsxs)("p",{"data-testid":Nn.connectorChainId,children:["Chain ID: ",null===(t=u.chain)||void 0===t?void 0:t.id]})]})]})]})]})}var ra=n(214);const ia=e=>r.createElement("button",{className:"wallet-adapter-button ".concat(e.className||""),disabled:e.disabled,style:e.style,onClick:e.onClick,tabIndex:e.tabIndex||0,type:"button"},e.startIcon&&r.createElement("i",{className:"wallet-adapter-button-start-icon"},e.startIcon),e.children,e.endIcon&&r.createElement("i",{className:"wallet-adapter-button-end-icon"},e.endIcon)),oa=["wallet"],sa=e=>{let{wallet:t}=e,n=(0,We.A)(e,oa);return t&&r.createElement("img",(0,p.A)({src:t.adapter.icon,alt:"".concat(t.adapter.name," icon")},n))},aa=["walletIcon","walletName"];function ca(e){let{walletIcon:t,walletName:n}=e,i=(0,We.A)(e,aa);return r.createElement(ia,(0,p.A)((0,p.A)({},i),{},{className:"wallet-adapter-button-trigger",startIcon:t&&n?r.createElement(sa,{wallet:{adapter:{icon:t,name:n}}}):void 0}))}const la={setVisible(e){console.error(ua("call","setVisible"))},visible:!1};function ua(e,t){return"You have tried to "+" ".concat(e,' "').concat(t,'"')+" on a WalletModalContext without providing one. Make sure to render a WalletModalProvider as an ancestor of the component that uses WalletModalContext"}Object.defineProperty(la,"visible",{get:()=>(console.error(ua("read","visible")),!1)});const da=(0,r.createContext)(la);function ha(){return(0,r.useContext)(da)}const fa=["children","labels"];function pa(e){let{children:t,labels:n}=e,i=(0,We.A)(e,fa);const{setVisible:o}=ha(),{buttonState:s,onConnect:a,onDisconnect:c,publicKey:l,walletIcon:u,walletName:d}=(0,ra.useWalletMultiButton)({onSelectWallet(){o(!0)}}),[h,f]=(0,r.useState)(!1),[m,g]=(0,r.useState)(!1),b=(0,r.useRef)(null);(0,r.useEffect)(()=>{const e=e=>{const t=b.current;t&&!t.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[]);const y=(0,r.useMemo)(()=>{if(t)return t;if(l){const e=l.toBase58();return e.slice(0,4)+".."+e.slice(-4)}return"connecting"===s||"has-wallet"===s?n[s]:n["no-wallet"]},[s,t,n,l]);return r.createElement("div",{className:"wallet-adapter-dropdown"},r.createElement(ca,(0,p.A)((0,p.A)({},i),{},{"aria-expanded":m,style:(0,p.A)({pointerEvents:m?"none":"auto"},i.style),onClick:()=>{switch(s){case"no-wallet":o(!0);break;case"has-wallet":a&&a();break;case"connected":g(!0)}},walletIcon:u,walletName:d}),y),r.createElement("ul",{"aria-label":"dropdown-list",className:"wallet-adapter-dropdown-list ".concat(m&&"wallet-adapter-dropdown-list-active"),ref:b,role:"menu"},l?r.createElement("li",{className:"wallet-adapter-dropdown-list-item",onClick:async()=>{await navigator.clipboard.writeText(l.toBase58()),f(!0),setTimeout(()=>f(!1),400)},role:"menuitem"},h?n.copied:n["copy-address"]):null,r.createElement("li",{className:"wallet-adapter-dropdown-list-item",onClick:()=>{o(!0),g(!1)},role:"menuitem"},n["change-wallet"]),c?r.createElement("li",{className:"wallet-adapter-dropdown-list-item",onClick:()=>{c(),g(!1)},role:"menuitem"},n.disconnect):null))}const ma={"change-wallet":"Change wallet",connecting:"Connecting ...","copy-address":"Copy address",copied:"Copied",disconnect:"Disconnect","has-wallet":"Connect","no-wallet":"Select Wallet"};function ga(e){return r.createElement(pa,(0,p.A)((0,p.A)({},e),{},{labels:ma}))}const ba=()=>{const{connection:e}=(0,rn.useConnection)(),{publicKey:t,connected:n,disconnect:i,signMessage:o,signTransaction:s,sendTransaction:a}=(0,rn.useWallet)(),[c,l]=(0,r.useState)("Hello from MetaMask Connect!"),[u,d]=(0,r.useState)(null),[h,f]=(0,r.useState)(null),[p,m]=(0,r.useState)(!1),[g,b]=(0,r.useState)(null),y=(0,r.useCallback)(async()=>{if(t&&o){m(!0),b(null),d(null);try{const e=(new TextEncoder).encode(c),t=await o(e);d(Buffer.from(t).toString("base64"))}catch(e){b(e instanceof Error?e.message:"Failed to sign message")}finally{m(!1)}}else b("Wallet not connected or signMessage not supported")},[t,o,c]),v=(0,r.useCallback)(async()=>{if(t&&s){m(!0),b(null),f(null);try{var n;const{blockhash:r}=await e.getLatestBlockhash(),i=new Yn.Transaction({feePayer:t,recentBlockhash:r}).add(Yn.SystemProgram.transfer({fromPubkey:t,toPubkey:t,lamports:0})),o=null===(n=(await s(i)).signatures[0])||void 0===n?void 0:n.signature;o&&f(Buffer.from(o).toString("base64"))}catch(r){b(r instanceof Error?r.message:"Failed to sign transaction")}finally{m(!1)}}else b("Wallet not connected or signTransaction not supported")},[t,s,e]),w=(0,r.useCallback)(async()=>{if(t&&a){m(!0),b(null),f(null);try{const{blockhash:n}=await e.getLatestBlockhash(),r=new Yn.Transaction({feePayer:t,recentBlockhash:n}).add(Yn.SystemProgram.transfer({fromPubkey:t,toPubkey:t,lamports:0})),i=await a(r,e);f(i)}catch(n){b(n instanceof Error?n.message:"Failed to send transaction")}finally{m(!1)}}else b("Wallet not connected or sendTransaction not supported")},[t,a,e]);return(0,it.jsxs)("div",{"data-testid":Bn.card,className:"bg-white rounded-lg p-6 shadow-sm border border-gray-200",children:[(0,it.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,it.jsxs)("h3",{"data-testid":Bn.title,className:"text-lg font-semibold text-gray-800 flex items-center gap-2",children:[(0,it.jsx)("span",{className:"text-2xl",children:"\u2600\ufe0f"}),"Solana Wallet"]}),n&&(0,it.jsx)("button",{type:"button","data-testid":Bn.btnDisconnect,onClick:i,className:"bg-red-500 text-white px-3 py-1 rounded text-sm hover:bg-red-600 transition-colors",children:"Disconnect"})]}),(0,it.jsxs)("div",{className:"space-y-4",children:[(0,it.jsxs)("div",{"data-testid":Bn.status,className:"flex items-center gap-2",children:[(0,it.jsx)("span",{className:"w-2 h-2 rounded-full ".concat(n?"bg-green-500":"bg-gray-400")}),(0,it.jsx)("span",{className:"text-sm text-gray-600",children:n?"Connected":"Not connected"})]}),t&&(0,it.jsxs)("div",{"data-testid":Bn.addressContainer,className:"bg-gray-50 rounded p-3",children:[(0,it.jsx)("p",{className:"text-xs text-gray-500 mb-1",children:"Address"}),(0,it.jsx)("p",{className:"text-sm font-mono break-all",children:t.toBase58()})]}),!n&&(0,it.jsx)("div",{"data-testid":Bn.btnConnect,className:"flex gap-2 flex-wrap",children:(0,it.jsx)(ga,{className:"!bg-blue-500 hover:!bg-blue-600"})}),n&&(0,it.jsxs)("div",{"data-testid":Bn.signMessageSection,className:"border-t pt-4 mt-4",children:[(0,it.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Sign Message"}),(0,it.jsx)("input",{type:"text","data-testid":Bn.inputMessage,value:c,onChange:e=>l(e.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded text-sm mb-2",placeholder:"Enter message to sign"}),(0,it.jsx)("button",{type:"button","data-testid":Bn.btnSignMessage,onClick:y,disabled:p||!o,className:"bg-purple-500 text-white px-4 py-2 rounded text-sm hover:bg-purple-600 disabled:bg-gray-400 disabled:cursor-not-allowed",children:p?"Signing...":"Sign Message"}),u&&(0,it.jsxs)("div",{"data-testid":Bn.signedMessageResult,className:"mt-3 bg-green-50 rounded p-3",children:[(0,it.jsx)("p",{className:"text-xs text-green-700 mb-1",children:"Signed Message"}),(0,it.jsx)("p",{className:"text-xs font-mono break-all text-green-800",children:u})]})]}),n&&(0,it.jsxs)("div",{"data-testid":Bn.transactionsSection,className:"border-t pt-4 mt-4",children:[(0,it.jsx)("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:"Transactions"}),(0,it.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,it.jsx)("button",{type:"button","data-testid":Bn.btnSignTransaction,onClick:v,disabled:p||!s,className:"bg-orange-500 text-white px-4 py-2 rounded text-sm hover:bg-orange-600 disabled:bg-gray-400 disabled:cursor-not-allowed",children:p?"Signing...":"Sign Transaction"}),(0,it.jsx)("button",{type:"button","data-testid":Bn.btnSendTransaction,onClick:w,disabled:p||!a,className:"bg-green-500 text-white px-4 py-2 rounded text-sm hover:bg-green-600 disabled:bg-gray-400 disabled:cursor-not-allowed",children:p?"Sending...":"Sign & Send"})]}),h&&(0,it.jsxs)("div",{"data-testid":Bn.transactionSignatureResult,className:"mt-3 bg-blue-50 rounded p-3",children:[(0,it.jsx)("p",{className:"text-xs text-blue-700 mb-1",children:"Transaction Signature"}),(0,it.jsx)("p",{className:"text-xs font-mono break-all text-blue-800",children:h})]})]}),g&&(0,it.jsx)("div",{"data-testid":Bn.errorContainer,className:"bg-red-50 border border-red-200 rounded p-3",children:(0,it.jsx)("p",{className:"text-sm text-red-700",children:g})})]})]})};let ya=0;function va(e){var t;let{connectedScopes:n}=e;const{invokeMethod:i,session:o}=Fn(),[s,a]=(0,r.useState)([]),c=null!==(t=n.find(e=>e.startsWith("eip155:")))&&void 0!==t?t:"eip155:1",l=(0,r.useMemo)(()=>{var e;const t=null!==(e=null===o||void 0===o?void 0:o.sessionScopes)&&void 0!==e?e:{};for(const[r,i]of Object.entries(t)){var n;if(!r.startsWith("eip155:")&&"wallet"!==r)continue;const e=null!==(n=null===i||void 0===i?void 0:i.accounts)&&void 0!==n?n:[];for(const t of e){const e=t.split(":").pop();if(null!==e&&void 0!==e&&e.startsWith("0x"))return e}}},[o]),u=(0,r.useCallback)(async(e,t,n)=>{const r=(ya+=1,ya);a(n=>[{id:r,label:e,expected:t,status:"pending"},...n]);try{await n(),a(e=>e.map(e=>e.id===r?(0,p.A)((0,p.A)({},e),{},{status:"no-throw"}):e))}catch(i){const t=i,n={status:"threw"};void 0!==t.name&&(n.errorName=t.name),void 0!==t.message&&(n.errorMessage=t.message),"number"!==typeof t.code&&"string"!==typeof t.code||(n.errorCode=t.code),a(e=>e.map(e=>e.id===r?(0,p.A)((0,p.A)({},e),n):e)),console.warn('[analytics bench] "'.concat(e,'":'),i)}},[]),d="text-left bg-slate-800 hover:bg-slate-700 text-white px-3 py-2 rounded text-sm transition-colors",h="text-left bg-amber-700 hover:bg-amber-600 text-white px-3 py-2 rounded text-sm transition-colors";return(0,it.jsx)("section",{className:"bg-white rounded-lg mb-6 shadow-sm",children:(0,it.jsxs)("details",{className:"group",children:[(0,it.jsxs)("summary",{className:"cursor-pointer list-none p-6 flex items-center justify-between",children:[(0,it.jsxs)("div",{children:[(0,it.jsx)("h2",{className:"text-2xl font-bold text-gray-800",children:"Analytics test bench"}),(0,it.jsxs)("p",{className:"text-sm text-gray-500 mt-1",children:["Drive each ",(0,it.jsx)("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"failure_reason"})," classifier branch from the dapp. Pair with the local analytics echo server (see playground README)."]})]}),(0,it.jsx)("span",{"aria-hidden":!0,className:"text-gray-400 text-sm select-none group-open:rotate-90 transition-transform",children:"\u25b6"})]}),(0,it.jsxs)("div",{className:"px-6 pb-6 pt-0",children:[(0,it.jsxs)("p",{className:"text-sm text-gray-600 mb-2",children:["Each button drives a request shape designed to land in a specific"," ",(0,it.jsx)("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"failure_reason"})," ","bucket on"," ",(0,it.jsx)("code",{className:"bg-gray-100 px-1 rounded text-xs",children:"mmconnect_wallet_action_failed"}),". Watch the analytics echo server terminal to see the tagged event. Connect first \u2014 most of these need an active session."]}),(0,it.jsxs)("p",{className:"text-xs text-gray-500 mb-4",children:[(0,it.jsx)("strong",{children:"Heads up:"})," on multichain (CAIP-25) sessions, the wallet rejects any method not in the granted scope with"," ",(0,it.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"4100 Unauthorized"})," ",'BEFORE the method handler runs. That means buttons like "bogus method" and "switch chain to 0xfa" both reach the same code path \u2014 they all land in'," ",(0,it.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"wallet_unauthorized"})," ","because the wallet never gets to see the actual method. To reach"," ",(0,it.jsx)("code",{className:"bg-gray-100 px-1 rounded",children:"wallet_method_unsupported"})," ","(real ",(0,it.jsx)("code",{children:"-32601"}),") or ",(0,it.jsx)("code",{children:"unrecognized_chain"})," (real"," ",(0,it.jsx)("code",{children:"4902"}),"), the method has to be in scope first \u2014 that's a separate experiment."]}),(0,it.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2 mb-4",children:[(0,it.jsx)("button",{type:"button",className:d,onClick:()=>u("wallet_unauthorized (method not in scope)","wallet_unauthorized",()=>i({scope:c,request:{method:"foo_bar_doesnt_exist",params:[]}})),children:"wallet_unauthorized (bogus method, blocked by scope)"}),(0,it.jsx)("button",{type:"button",className:d,onClick:()=>u("wallet_invalid_params (\u221232602)","wallet_invalid_params",()=>i({scope:c,request:{method:"eth_sendTransaction",params:[{to:"not-a-hex-address",value:"not-hex-either"}]}})),children:"wallet_invalid_params (malformed eth_sendTransaction)"}),(0,it.jsx)("button",{type:"button",className:d,onClick:()=>u("wallet_unauthorized (switchEthereumChain not in scope)","wallet_unauthorized",()=>i({scope:c,request:{method:"wallet_switchEthereumChain",params:[{chainId:"0xdeadbe"}]}})),children:"wallet_unauthorized (switch to chain 0xdeadbe)"}),(0,it.jsx)("button",{type:"button",className:d,onClick:()=>u("wallet_unauthorized (switchEthereumChain not in scope)","wallet_unauthorized",()=>i({scope:c,request:{method:"wallet_switchEthereumChain",params:[{chainId:"0xfa"}]}})),children:"wallet_unauthorized (switch to 0xfa)"}),(0,it.jsx)("button",{type:"button",className:d,onClick:()=>u("wallet_invalid_params (malformed signTypedData)","wallet_invalid_params",()=>i({scope:c,request:{method:"eth_signTypedData_v4",params:["0x0000000000000000000000000000000000000000","{}"]}})),children:"wallet_invalid_params (signTypedData on bad address)"}),(0,it.jsx)("button",{type:"button",className:d,onClick:()=>u("unknown (fallback) \u2014 empty method","unknown",()=>i({scope:c,request:{method:"",params:[]}})),children:"unknown (empty method name)"}),(0,it.jsx)("button",{type:"button",className:d,onClick:()=>{if(l)return u("(rejection \u2014 should fire _rejected, NOT _failed)","n/a \u2014 _rejected",()=>i({scope:c,request:{method:"personal_sign",params:["0x68656c6c6f",l]}}));alert("No EVM account in the current session \u2014 connect one first so personal_sign has a real signer to prompt for.")},children:"\u21b3 rejection sanity-check (reject personal_sign in wallet)"}),(0,it.jsx)("button",{type:"button",className:h,onClick:()=>{alert(["transport_timeout requires a stall longer than the transport timeout.","","Easiest repro:",' 1. Open DevTools \u2192 Network \u2192 set throttling to "Offline".',' 2. Click any wallet-bound trigger above (e.g. "wallet_invalid_params").'," 3. Wait ~30s for the SDK timeout to fire.","","You should see mmconnect_wallet_action_failed with failure_reason=transport_timeout."].join("\n"))},children:"transport_timeout (manual \u2014 instructions)"}),(0,it.jsx)("button",{type:"button",className:h,onClick:()=>{alert(["transport_disconnect requires the wallet to drop the connection mid-request.","","Easiest repro:"," 1. Click any wallet-bound trigger above."," 2. Immediately disable or quit the MetaMask extension before approving.","","You should see mmconnect_wallet_action_failed with failure_reason=transport_disconnect."].join("\n"))},children:"transport_disconnect (manual \u2014 instructions)"})]}),s.length>0&&(0,it.jsxs)("div",{className:"mt-6",children:[(0,it.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"Recent triggers"}),(0,it.jsx)("div",{className:"text-xs font-mono space-y-1",children:s.map(e=>(0,it.jsxs)("div",{className:"p-2 rounded border ".concat("threw"===e.status?"border-red-200 bg-red-50":"no-throw"===e.status?"border-yellow-200 bg-yellow-50":"border-gray-200 bg-gray-50"),children:[(0,it.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,it.jsx)("span",{className:"font-semibold",children:e.label}),(0,it.jsxs)("span",{className:"text-gray-500",children:["expected: ",e.expected]})]}),"pending"===e.status&&(0,it.jsx)("div",{className:"text-gray-500",children:"\u2026waiting"}),"no-throw"===e.status&&(0,it.jsx)("div",{className:"text-yellow-800",children:"no error thrown \u2014 _failed event will NOT have fired"}),"threw"===e.status&&(0,it.jsxs)("div",{className:"text-gray-700",children:[e.errorName&&(0,it.jsxs)("span",{className:"mr-2",children:[(0,it.jsx)("span",{className:"text-gray-500",children:"name="}),e.errorName]}),void 0!==e.errorCode&&(0,it.jsxs)("span",{className:"mr-2",children:[(0,it.jsx)("span",{className:"text-gray-500",children:"code="}),String(e.errorCode)]}),e.errorMessage&&(0,it.jsxs)("span",{children:[(0,it.jsx)("span",{className:"text-gray-500",children:"msg="}),e.errorMessage]})]})]},e.id))})]})]})]})})}var wa=n(8340),_a=n(6488),ka=n(6345),xa=n(9210),Sa=n(5759);var Ea;!function(e){e.MAINNET="solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",e.DEVNET="solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",e.TESTNET="solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"}(Ea||(Ea={}));const Aa=Object.values(Ea);const Pa=(0,n(8512).A)(/^(([\x2D0-9a-z]{3,8}):([\x2D0-9A-Z_a-z]{1,32})):([%\x2D\.0-9A-Za-z]{1,128})$/,{chainId:1,namespace:2,reference:3,accountAddress:4});function Ca(e){var t;return"metamask_accountsChanged"===(null===(t=e.params)||void 0===t||null===(t=t.notification)||void 0===t?void 0:t.method)}var Ia,Ma,Ta,Oa,Na,Ba,Ra,ja,La,Fa,za,Da,Ua,Wa,qa,Ha,Ka,Va,$a,Ga=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},Za=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};class Ja extends wa.ReadonlyWalletAccount{constructor(e){let{address:t,publicKey:n,chains:r}=e;super({address:t,publicKey:n,chains:r,features:[ka.SolanaSignAndSendTransaction,ka.SolanaSignTransaction,ka.SolanaSignMessage,ka.SolanaSignIn]}),new.target===Ja&&Object.freeze(this)}}class Ya{getInitialSelectedAddress(){return new Promise(e=>{const t=setTimeout(()=>{e(void 0)},2e3),n=this.client.onNotification(r=>{if(Ca(r)){var i;const o=null===r||void 0===r||null===(i=r.params)||void 0===i||null===(i=i.notification)||void 0===i||null===(i=i.params)||void 0===i?void 0:i[0];o&&(clearTimeout(t),null===n||void 0===n||n(),e(o))}})})}get accounts(){return Ga(this,Oa,"f")?[Ga(this,Oa,"f")]:[]}get features(){return{[xa.StandardConnect]:{version:this.version,connect:Ga(this,La,"f")},[ka.SolanaSignIn]:{version:this.version,signIn:Ga(this,Fa,"f")},[xa.StandardDisconnect]:{version:this.version,disconnect:Ga(this,za,"f")},[xa.StandardEvents]:{version:this.version,on:Ga(this,Ba,"f")},[ka.SolanaSignAndSendTransaction]:{version:this.version,supportedTransactionVersions:["legacy",0],signAndSendTransaction:Ga(this,Da,"f")},[ka.SolanaSignTransaction]:{version:this.version,supportedTransactionVersions:["legacy",0],signTransaction:Ga(this,Ua,"f")},[ka.SolanaSignMessage]:{version:this.version,signMessage:Ga(this,Wa,"f")}}}constructor(e){var t=this;let{client:n,walletName:r}=e;Ia.add(this),Ma.set(this,{}),this.version="1.0.0",this.icon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjIzIiBoZWlnaHQ9IjIzIiB4PSIzLjUiIHk9IjMuNSIgdmlld0JveD0iMCAwIDE0MS41MSAxMzYuNDIiPjxwYXRoIGZpbGw9IiNGRjVDMTYiIGQ9Im0xMzIuMjQgMTMxLjc1LTMwLjQ4LTkuMDctMjIuOTkgMTMuNzQtMTYuMDMtLjAxLTIzLTEzLjc0LTMwLjQ3IDkuMDhMMCAxMDAuNDdsOS4yNy0zNC43M0wwIDM2LjQgOS4yNyAwbDQ3LjYgMjguNDRoMjcuNzZMMTMyLjI0IDBsOS4yNyAzNi4zOC05LjI3IDI5LjM2IDkuMjcgMzQuNzItOS4yNyAzMS4zWiIvPjxwYXRoIGZpbGw9IiNGRjVDMTYiIGQ9Im05LjI3IDAgNDcuNjEgMjguNDZMNTQuOTggNDggOS4yOSAwWm0zMC40NyAxMDAuNDggMjAuOTUgMTUuOTUtMjAuOTUgNi4yNHYtMjIuMlpNNTkuMDEgNzQuMSA1NSA0OCAyOS4yMiA2NS43NWgtLjAybC4wOCAxOC4yNyAxMC40NS05LjkyaDE5LjI5Wk0xMzIuMjUgMGwtNDcuNiAyOC40Nkw4Ni41MSA0OGw0NS43Mi00OFptLTMwLjQ3IDEwMC40OC0yMC45NCAxNS45NSAyMC45NCA2LjI0di0yMi4yWm0xMC41My0zNC43M0w4Ni41MyA0OCA4Mi41IDc0LjFoMTkuMjdsMTAuNDYgOS45LjA3LTE4LjI2WiIvPjxwYXRoIGZpbGw9IiNFMzQ4MDciIGQ9Im0zOS43MyAxMjIuNjctMzAuNDYgOS4wOEwwIDEwMC40OGgzOS43M3YyMi4yWk01OS4wMiA3NC4xbDUuODIgMzcuNzEtOC4wNy0yMC45Ny0yNy40OS02LjgyIDEwLjQ2LTkuOTJINTlabTQyLjc2IDQ4LjU5IDMwLjQ3IDkuMDcgOS4yNy0zMS4yN2gtMzkuNzR6TTgyLjUgNzQuMDlsLTUuODIgMzcuNzEgOC4wNi0yMC45NyAyNy41LTYuODItMTAuNDctOS45MnoiLz48cGF0aCBmaWxsPSIjRkY4RDVEIiBkPSJtMCAxMDAuNDcgOS4yNy0zNC43M0gyOS4ybC4wNyAxOC4yNyAyNy41IDYuODIgOC4wNiAyMC45Ny00LjE1IDQuNjItMjAuOTQtMTUuOTZIMFptMTQxLjUgMC05LjI2LTM0LjczaC0xOS45M2wtLjA3IDE4LjI3LTI3LjUgNi44Mi04LjA2IDIwLjk3IDQuMTUgNC42MiAyMC45NC0xNS45NmgzOS43NFpNODQuNjQgMjguNDRINTYuODhsLTEuODkgMTkuNTQgOS44NCA2My44aDExLjg1bDkuODUtNjMuOC0xLjktMTkuNTRaIi8+PHBhdGggZmlsbD0iIzY2MTgwMCIgZD0iTTkuMjcgMCAwIDM2LjM4bDkuMjcgMjkuMzZIMjkuMkw1NC45OCA0OHptNDMuOTggODEuNjdoLTkuMDNsLTQuOTIgNC44MSAxNy40NyA0LjMzLTMuNTItOS4xNVpNMTMyLjI0IDBsOS4yNyAzNi4zOC05LjI3IDI5LjM2aC0xOS45M0w4Ni41MyA0OHpNODguMjcgODEuNjdoOS4wNGw0LjkyIDQuODItMTcuNDkgNC4zNCAzLjUzLTkuMTdabS05LjUgNDIuMyAyLjA2LTcuNTQtNC4xNS00LjYySDY0LjgybC00LjE0IDQuNjIgMi4wNSA3LjU0Ii8+PHBhdGggZmlsbD0iI0MwQzRDRCIgZD0iTTc4Ljc3IDEyMy45N3YxMi40NUg2Mi43NHYtMTIuNDVoMTYuMDJaIi8+PHBhdGggZmlsbD0iI0U3RUJGNiIgZD0ibTM5Ljc0IDEyMi42NiAyMyAxMy43NnYtMTIuNDZsLTIuMDUtNy41NHptNjIuMDMgMC0yMyAxMy43NnYtMTIuNDZsMi4wNi03LjU0eiIvPjwvc3ZnPjwvc3ZnPg==",this.chains=[_a.SOLANA_MAINNET_CHAIN,_a.SOLANA_DEVNET_CHAIN,_a.SOLANA_TESTNET_CHAIN],Ta.set(this,void 0),Oa.set(this,void 0),Na.set(this,void 0),Ba.set(this,(e,t)=>{var n;Ga(this,Ma,"f")[e]?null===(n=Ga(this,Ma,"f")[e])||void 0===n||n.push(t):Ga(this,Ma,"f")[e]=[t];return()=>Ga(this,Ia,"m",ja).call(this,e,t)}),La.set(this,async()=>this.accounts.length?{accounts:this.accounts}:(await Ga(this,Va,"f").call(this),this.accounts.length||await Ga(this,$a,"f").call(this,Ea.MAINNET),this.accounts.length?(Za(this,Na,this.client.onNotification(Ga(this,Ia,"m",qa).bind(this)),"f"),{accounts:this.accounts}):{accounts:[]})),Fa.set(this,async function(){if((!Ga(t,Oa,"f")||!t.scope)&&(await Ga(t,La,"f").call(t),!Ga(t,Oa,"f")||!t.scope))throw new Error("Not connected");const e=[];for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(const o of r){const n=await t.client.invokeMethod({scope:t.scope,request:{method:"signIn",params:(0,p.A)((0,p.A)({},o),{},{domain:o.domain||window.location.host,address:o.address||Ga(t,Oa,"f").address})}});e.push({account:Ga(t,Oa,"f"),signedMessage:Buffer.from(n.signedMessage,"base64"),signature:Sa.decode(n.signature)})}return e}),za.set(this,async function(){var e;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{revokeSession:r=!0}=n;Za(t,Oa,void 0,"f"),t.scope=void 0,null===(e=Ga(t,Na,"f"))||void 0===e||e.call(t),Za(t,Na,void 0,"f"),Ga(t,Ia,"m",Ra).call(t,"change",{accounts:t.accounts}),r&&await t.client.revokeSession({scopes:[Ea.MAINNET,Ea.DEVNET,Ea.TESTNET]})}),Da.set(this,async function(){var e,n;const r=Ga(t,Oa,"f");if(!r)throw new Error("Not connected");for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];Ga(t,Ka,"f").call(t,o);const a=function(e){switch(e){case _a.SOLANA_MAINNET_CHAIN:case void 0:return Ea.MAINNET;case _a.SOLANA_TESTNET_CHAIN:return Ea.TESTNET;case _a.SOLANA_DEVNET_CHAIN:return Ea.DEVNET;default:if(Aa.includes(e))return e;throw new Error("Unsupported chainId: ".concat(e))}}(null===(e=o[0])||void 0===e?void 0:e.chain),c=await t.client.getSession(),l=null===c||void 0===c||null===(n=c.sessionScopes[a])||void 0===n?void 0:n.accounts;null!==l&&void 0!==l&&l.includes("".concat(a,":").concat(r.address))?t.scope=a:await Ga(t,$a,"f").call(t,a,[r.address]);const u=[];for(const{transaction:d,account:h}of o){const e=Buffer.from(d).toString("base64"),n=await t.client.invokeMethod({scope:a,request:{method:"signAndSendTransaction",params:{account:{address:h.address},transaction:e,scope:a}}});u.push({signature:Sa.decode(n.signature)})}return u}),Ua.set(this,async function(){if(!t.scope)throw new Error("Not connected");const e=[];for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(const{transaction:o,account:s}of r){const n=Buffer.from(o).toString("base64"),r=await t.client.invokeMethod({scope:t.scope,request:{method:"signTransaction",params:{account:{address:s.address},transaction:n,scope:t.scope}}});e.push({signedTransaction:Uint8Array.from(Buffer.from(r.signedTransaction,"base64"))})}return e}),Wa.set(this,async function(){if(!t.scope)throw new Error("Not connected");const e=[];for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(const{message:o,account:s}of r){const n=Buffer.from(o).toString("base64"),r=await t.client.invokeMethod({scope:t.scope,request:{method:"signMessage",params:{message:n,account:{address:s.address}}}});e.push({signedMessage:Buffer.from(r.signedMessage,"base64"),signature:Sa.decode(r.signature),signatureType:r.signatureType})}return e}),Ka.set(this,e=>{var t,n;const r=null===(t=Ga(this,Oa,"f"))||void 0===t?void 0:t.address,i=null===(n=e[0])||void 0===n?void 0:n.chain;for(const{account:{address:o},chain:s}of e){if(o!==r)throw new Error("Invalid transaction addresses");if(s!==i)throw new Error("All transactions must be on the same chain")}}),Va.set(this,async()=>{try{const e=await this.client.getSession();if(!e)return;const t=await Ga(this,Ta,"f");this.updateSession(e,t)}catch(e){console.warn("Error restoring session",e)}}),$a.set(this,async(e,t)=>{let n;const r=new Promise(e=>{n=e}),i=this.client.onNotification(e=>{var t;if(!Ca(e))return;const r=null===e||void 0===e||null===(t=e.params)||void 0===t||null===(t=t.notification)||void 0===t||null===(t=t.params)||void 0===t?void 0:t[0];r&&(i(),n(r))}),o=await this.client.createSession({optionalScopes:{[e]:(0,p.A)((0,p.A)({},t?{accounts:t.map(t=>"".concat(e,":").concat(t))}:{}),{},{methods:[],notifications:[]})},sessionProperties:{solana_accountChanged_notifications:!0}}),s=await Promise.race([r,new Promise(e=>setTimeout(()=>e(void 0),200))]);this.updateSession(o,s)}),this.client=n,this.name="".concat(null!==r&&void 0!==r?r:"MetaMask"),Za(this,Ta,this.getInitialSelectedAddress(),"f")}updateSession(e,t){var n,r,i,o;const s=new Set(Object.keys(null!==(n=null===e||void 0===e?void 0:e.sessionScopes)&&void 0!==n?n:{})),a=[Ea.MAINNET,Ea.DEVNET,Ea.TESTNET].find(e=>s.has(e));if(!a)return void Za(this,Oa,void 0,"f");const c=null===e||void 0===e||null===(r=e.sessionScopes[a])||void 0===r?void 0:r.accounts;if(null===c||void 0===c||!c[0])return void Za(this,Oa,void 0,"f");let l;l=t&&c.includes("".concat(a,":").concat(t))?t:null!==(i=Ga(this,Oa,"f"))&&void 0!==i&&i.address&&c.includes("".concat(a,":").concat(null===(o=Ga(this,Oa,"f"))||void 0===o?void 0:o.address))?Ga(this,Oa,"f").address:function(e){var t;const n=Pa.exec(e);if(null===n||void 0===n||null===(t=n.groups)||void 0===t||!t.accountAddress)throw new Error("Invalid CAIP account ID.");return n.groups.accountAddress}(c[0]),Za(this,Oa,Ga(this,Ia,"m",Ha).call(this,l),"f"),this.scope=a,Ga(this,Ia,"m",Ra).call(this,"change",{accounts:this.accounts})}}function Qa(e){return new Ya(e)}Ma=new WeakMap,Ta=new WeakMap,Oa=new WeakMap,Na=new WeakMap,Ba=new WeakMap,La=new WeakMap,Fa=new WeakMap,za=new WeakMap,Da=new WeakMap,Ua=new WeakMap,Wa=new WeakMap,Ka=new WeakMap,Va=new WeakMap,$a=new WeakMap,Ia=new WeakSet,Ra=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(const o of null!==(i=Ga(this,Ma,"f")[e])&&void 0!==i?i:[]){var i;o.apply(null,n)}},ja=function(e,t){var n;Ga(this,Ma,"f")[e]=null===(n=Ga(this,Ma,"f")[e])||void 0===n?void 0:n.filter(e=>t!==e)},qa=async function(e){var t;if(!Ca(e))return;const n=null===e||void 0===e||null===(t=e.params)||void 0===t||null===(t=t.notification)||void 0===t||null===(t=t.params)||void 0===t?void 0:t[0];if(!n)return void await Ga(this,za,"f").call(this,{revokeSession:!1});const r=await this.client.getSession();this.updateSession(r,n)},Ha=function(e){return new Ja({address:e,publicKey:new Uint8Array(Sa.decode(e)),chains:this.chains})};var Xa=n(9790),ec=(e,t,n)=>new Promise((r,i)=>{var o=e=>{try{a(n.next(e))}catch(t){i(t)}},s=e=>{try{a(n.throw(e))}catch(t){i(t)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,s);a((n=n.apply(e,t)).next())}),tc={mainnet:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",devnet:"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1",testnet:"solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z"};var nc=(0,Rn.h)("metamask-connect:solana","93");function rc(e){return ec(this,null,function*(){var t,n,r,i,o;const s=null!=(t=e.skipAutoRegister)&&t,a=(c=null!=(r=null==(n=e.api)?void 0:n.supportedNetworks)?r:{mainnet:"https://api.mainnet-beta.solana.com"},Object.entries(c).reduce((e,t)=>{let[n,r]=t;const i=tc[n];return i&&r&&(e[i]=r),e},{}));var c;const l=yield(0,Rn.CI)({dapp:e.dapp,api:{supportedNetworks:a},analytics:{integrationType:(null==(i=e.analytics)?void 0:i.integrationType)||"direct"},versions:{"connect-solana":"1.1.0"}}),u=l.provider,d="MetaMask";let h,f=!1;const p=new Promise(e=>{h=e}),m=()=>ec(null,null,function*(){f?nc("MetaMask Connect is already registered. Skipping..."):(0,Xa.getWallets)().get().some(e=>e.name.toLowerCase().includes("metamask"))?nc("MetaMask extension is already registered. Skipping..."):(yield async function(e){const t=Qa(e);(0,wa.registerWallet)(t)}({client:u,walletName:d}),f=!0)});s?h():setTimeout(()=>ec(null,null,function*(){try{yield m()}finally{h()}}),1e3);const g=Qa({client:u,walletName:d}),b=yield l.provider.getSession();return Object.keys(null!=(o=null==b?void 0:b.sessionScopes)?o:{}).some(e=>e.startsWith("solana:"))&&(yield g.features["standard:connect"].connect()),{core:l,getWallet:()=>g,registerWallet:()=>ec(null,null,function*(){yield p,yield m()}),disconnect:()=>ec(null,null,function*(){return yield l.disconnect(Object.values(tc))})}})}var ic=n(3651),oc=n(3989);const sc=e=>{let{id:t,children:n,expanded:i=!1}=e;const o=(0,r.useRef)(null),s=(0,r.useRef)(!0);return(0,r.useLayoutEffect)(()=>{i?(()=>{const e=o.current;e&&requestAnimationFrame(()=>{e.style.height=e.scrollHeight+"px"})})():(()=>{const e=o.current;e&&requestAnimationFrame(()=>{e.style.height=e.offsetHeight+"px",e.style.overflow="hidden",requestAnimationFrame(()=>{e.style.height="0"})})})()},[i]),(0,r.useLayoutEffect)(()=>{const e=o.current;if(e)return s.current&&(t(),s.current=!1),e.addEventListener("transitionend",n),()=>e.removeEventListener("transitionend",n);function t(){e&&(e.style.overflow=i?"initial":"hidden",i&&(e.style.height="auto"))}function n(n){e&&n.target===e&&"height"===n.propertyName&&t()}},[i]),r.createElement("div",{className:"wallet-adapter-collapse",id:t,ref:o,role:"region",style:{height:0,transition:s.current?void 0:"height 250ms ease-out"}},n)},ac=e=>{let{handleClick:t,tabIndex:n,wallet:i}=e;return r.createElement("li",null,r.createElement(ia,{onClick:t,startIcon:r.createElement(sa,{wallet:i}),tabIndex:n},i.adapter.name,i.readyState===ic.WalletReadyState.Installed&&r.createElement("span",null,"Detected")))},cc=()=>r.createElement("svg",{width:"97",height:"96",viewBox:"0 0 97 96",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.createElement("circle",{cx:"48.5",cy:"48",r:"48",fill:"url(#paint0_linear_880_5115)",fillOpacity:"0.1"}),r.createElement("circle",{cx:"48.5",cy:"48",r:"47",stroke:"url(#paint1_linear_880_5115)",strokeOpacity:"0.4",strokeWidth:"2"}),r.createElement("g",{clipPath:"url(#clip0_880_5115)"},r.createElement("path",{d:"M65.5769 28.1523H31.4231C27.6057 28.1523 24.5 31.258 24.5 35.0754V60.9215C24.5 64.7389 27.6057 67.8446 31.4231 67.8446H65.5769C69.3943 67.8446 72.5 64.7389 72.5 60.9215V35.0754C72.5 31.258 69.3943 28.1523 65.5769 28.1523ZM69.7308 52.1523H59.5769C57.2865 52.1523 55.4231 50.289 55.4231 47.9985C55.4231 45.708 57.2864 43.8446 59.5769 43.8446H69.7308V52.1523ZM69.7308 41.0754H59.5769C55.7595 41.0754 52.6539 44.1811 52.6539 47.9985C52.6539 51.8159 55.7595 54.9215 59.5769 54.9215H69.7308V60.9215C69.7308 63.2119 67.8674 65.0754 65.5769 65.0754H31.4231C29.1327 65.0754 27.2692 63.212 27.2692 60.9215V35.0754C27.2692 32.785 29.1326 30.9215 31.4231 30.9215H65.5769C67.8673 30.9215 69.7308 32.7849 69.7308 35.0754V41.0754Z",fill:"url(#paint2_linear_880_5115)"}),r.createElement("path",{d:"M61.4231 46.6172H59.577C58.8123 46.6172 58.1924 47.2371 58.1924 48.0018C58.1924 48.7665 58.8123 49.3863 59.577 49.3863H61.4231C62.1878 49.3863 62.8077 48.7664 62.8077 48.0018C62.8077 47.2371 62.1878 46.6172 61.4231 46.6172Z",fill:"url(#paint3_linear_880_5115)"})),r.createElement("defs",null,r.createElement("linearGradient",{id:"paint0_linear_880_5115",x1:"3.41664",y1:"98.0933",x2:"103.05",y2:"8.42498",gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#9945FF"}),r.createElement("stop",{offset:"0.14",stopColor:"#8A53F4"}),r.createElement("stop",{offset:"0.42",stopColor:"#6377D6"}),r.createElement("stop",{offset:"0.79",stopColor:"#24B0A7"}),r.createElement("stop",{offset:"0.99",stopColor:"#00D18C"}),r.createElement("stop",{offset:"1",stopColor:"#00D18C"})),r.createElement("linearGradient",{id:"paint1_linear_880_5115",x1:"3.41664",y1:"98.0933",x2:"103.05",y2:"8.42498",gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#9945FF"}),r.createElement("stop",{offset:"0.14",stopColor:"#8A53F4"}),r.createElement("stop",{offset:"0.42",stopColor:"#6377D6"}),r.createElement("stop",{offset:"0.79",stopColor:"#24B0A7"}),r.createElement("stop",{offset:"0.99",stopColor:"#00D18C"}),r.createElement("stop",{offset:"1",stopColor:"#00D18C"})),r.createElement("linearGradient",{id:"paint2_linear_880_5115",x1:"25.9583",y1:"68.7101",x2:"67.2337",y2:"23.7879",gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#9945FF"}),r.createElement("stop",{offset:"0.14",stopColor:"#8A53F4"}),r.createElement("stop",{offset:"0.42",stopColor:"#6377D6"}),r.createElement("stop",{offset:"0.79",stopColor:"#24B0A7"}),r.createElement("stop",{offset:"0.99",stopColor:"#00D18C"}),r.createElement("stop",{offset:"1",stopColor:"#00D18C"})),r.createElement("linearGradient",{id:"paint3_linear_880_5115",x1:"58.3326",y1:"49.4467",x2:"61.0002",y2:"45.4453",gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#9945FF"}),r.createElement("stop",{offset:"0.14",stopColor:"#8A53F4"}),r.createElement("stop",{offset:"0.42",stopColor:"#6377D6"}),r.createElement("stop",{offset:"0.79",stopColor:"#24B0A7"}),r.createElement("stop",{offset:"0.99",stopColor:"#00D18C"}),r.createElement("stop",{offset:"1",stopColor:"#00D18C"})),r.createElement("clipPath",{id:"clip0_880_5115"},r.createElement("rect",{width:"48",height:"48",fill:"white",transform:"translate(24.5 24)"})))),lc=e=>{let{className:t="",container:n="body"}=e;const i=(0,r.useRef)(null),{wallets:o,select:s}=(0,rn.useWallet)(),{setVisible:a}=ha(),[c,l]=(0,r.useState)(!1),[u,d]=(0,r.useState)(!1),[h,f]=(0,r.useState)(null),[p,m]=(0,r.useMemo)(()=>{const e=[],t=[];for(const n of o)n.readyState===ic.WalletReadyState.Installed?e.push(n):t.push(n);return e.length?[e,t]:[t,[]]},[o]),g=(0,r.useCallback)(()=>{d(!1),setTimeout(()=>a(!1),150)},[a]),b=(0,r.useCallback)(e=>{e.preventDefault(),g()},[g]),y=(0,r.useCallback)((e,t)=>{s(t),b(e)},[s,b]),v=(0,r.useCallback)(()=>l(!c),[c]),w=(0,r.useCallback)(e=>{const t=i.current;if(!t)return;const n=t.querySelectorAll("button"),r=n[0],o=n[n.length-1];e.shiftKey?document.activeElement===r&&(o.focus(),e.preventDefault()):document.activeElement===o&&(r.focus(),e.preventDefault())},[i]);return(0,r.useLayoutEffect)(()=>{const e=e=>{"Escape"===e.key?g():"Tab"===e.key&&w(e)},{overflow:t}=window.getComputedStyle(document.body);return setTimeout(()=>d(!0),0),document.body.style.overflow="hidden",window.addEventListener("keydown",e,!1),()=>{document.body.style.overflow=t,window.removeEventListener("keydown",e,!1)}},[g,w]),(0,r.useLayoutEffect)(()=>f(document.querySelector(n)),[n]),h&&(0,oc.createPortal)(r.createElement("div",{"aria-labelledby":"wallet-adapter-modal-title","aria-modal":"true",className:"wallet-adapter-modal ".concat(u&&"wallet-adapter-modal-fade-in"," ").concat(t),ref:i,role:"dialog"},r.createElement("div",{className:"wallet-adapter-modal-container"},r.createElement("div",{className:"wallet-adapter-modal-wrapper"},r.createElement("button",{onClick:b,className:"wallet-adapter-modal-button-close"},r.createElement("svg",{width:"14",height:"14"},r.createElement("path",{d:"M14 12.461 8.3 6.772l5.234-5.233L12.006 0 6.772 5.234 1.54 0 0 1.539l5.234 5.233L0 12.006l1.539 1.528L6.772 8.3l5.69 5.7L14 12.461z"}))),p.length?r.createElement(r.Fragment,null,r.createElement("h1",{className:"wallet-adapter-modal-title"},"Connect a wallet on Solana to continue"),r.createElement("ul",{className:"wallet-adapter-modal-list"},p.map(e=>r.createElement(ac,{key:e.adapter.name,handleClick:t=>y(t,e.adapter.name),wallet:e})),m.length?r.createElement(sc,{expanded:c,id:"wallet-adapter-modal-collapse"},m.map(e=>r.createElement(ac,{key:e.adapter.name,handleClick:t=>y(t,e.adapter.name),tabIndex:c?0:-1,wallet:e}))):null),m.length?r.createElement("button",{className:"wallet-adapter-modal-list-more",onClick:v,tabIndex:0},r.createElement("span",null,c?"Less ":"More ","options"),r.createElement("svg",{width:"13",height:"7",viewBox:"0 0 13 7",xmlns:"http://www.w3.org/2000/svg",className:"".concat(c?"wallet-adapter-modal-list-more-icon-rotate":"")},r.createElement("path",{d:"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z"}))):null):r.createElement(r.Fragment,null,r.createElement("h1",{className:"wallet-adapter-modal-title"},"You'll need a wallet on Solana to continue"),r.createElement("div",{className:"wallet-adapter-modal-middle"},r.createElement(cc,null)),m.length?r.createElement(r.Fragment,null,r.createElement("button",{className:"wallet-adapter-modal-list-more",onClick:v,tabIndex:0},r.createElement("span",null,c?"Hide ":"Already have a wallet? View ","options"),r.createElement("svg",{width:"13",height:"7",viewBox:"0 0 13 7",xmlns:"http://www.w3.org/2000/svg",className:"".concat(c?"wallet-adapter-modal-list-more-icon-rotate":"")},r.createElement("path",{d:"M0.71418 1.626L5.83323 6.26188C5.91574 6.33657 6.0181 6.39652 6.13327 6.43762C6.24844 6.47872 6.37371 6.5 6.50048 6.5C6.62725 6.5 6.75252 6.47872 6.8677 6.43762C6.98287 6.39652 7.08523 6.33657 7.16774 6.26188L12.2868 1.626C12.7753 1.1835 12.3703 0.5 11.6195 0.5H1.37997C0.629216 0.5 0.224175 1.1835 0.71418 1.626Z"}))),r.createElement(sc,{expanded:c,id:"wallet-adapter-modal-collapse"},r.createElement("ul",{className:"wallet-adapter-modal-list"},m.map(e=>r.createElement(ac,{key:e.adapter.name,handleClick:t=>y(t,e.adapter.name),tabIndex:c?0:-1,wallet:e}))))):null))),r.createElement("div",{className:"wallet-adapter-modal-overlay",onMouseDown:b})),h)},uc=["children"],dc=e=>{let{children:t}=e,n=(0,We.A)(e,uc);const[i,o]=(0,r.useState)(!1);return r.createElement(da.Provider,{value:{visible:i,setVisible:o}},t,i&&r.createElement(lc,(0,p.A)({},n)))},hc="https://api.devnet.solana.com",fc=(0,r.createContext)(void 0),pc=e=>{let{children:t}=e;const[n,i]=(0,r.useState)(null),[o,s]=(0,r.useState)(!1),[a,c]=(0,r.useState)(hc),[l,u]=(0,r.useState)(null),d=(0,r.useRef)(!1),h=(0,r.useCallback)(()=>u(null),[]);(0,r.useEffect)(()=>{d.current||(d.current=!0,rc({debug:!0,dapp:{name:"MetaMask Connect Playground",url:window.location.origin},api:{supportedNetworks:{devnet:hc,mainnet:"https://api.mainnet-beta.solana.com"}}}).then(e=>{i(e),s(!0)}).catch(e=>{console.error("Failed to initialize Solana client:",e)}))},[]);const f=(0,r.useMemo)(()=>({client:n,isRegistered:o,endpoint:a,setEndpoint:c,walletError:l,clearWalletError:h}),[n,o,a,l,h]),p=(0,r.useCallback)(e=>{console.error("Solana wallet error:",e.name,e.message),"WalletNotSelectedError"!==e.name&&u(e)},[]);return(0,it.jsx)(fc.Provider,{value:f,children:(0,it.jsx)(rn.ConnectionProvider,{endpoint:a,config:{commitment:"confirmed"},children:(0,it.jsx)(rn.WalletProvider,{wallets:[],autoConnect:!0,onError:p,children:(0,it.jsx)(dc,{children:t})})})})},mc=e=>{let{children:t}=e;return(0,it.jsx)(pc,{children:t})};n.g.Buffer=nr.Buffer;const gc="Hello from MetaMask Connect Playground!";const bc=function(){var e,t,n;const[i,o]=(0,r.useState)("127.0.0.1"===window.location.hostname||"localhost"===window.location.hostname?["eip155:1337"]:["eip155:1"]),[s,a]=(0,r.useState)([]),[c,l]=(0,r.useState)(null),[u,d]=(0,r.useState)(null),{walletError:h,clearWalletError:f}=(()=>{const e=(0,r.useContext)(fc);if(void 0===e)throw new Error("useSolanaSDK must be used within a SolanaWalletProvider");return e})(),{error:m,status:g,session:b,connect:y,disconnect:v}=Fn(),{connected:w,provider:_,chainId:k,accounts:x,sdk:S,error:E,connect:A,connectAndSign:P,disconnect:C}=(()=>{const e=(0,r.useContext)(Dn);if(void 0===e)throw new Error("useLegacyEVMSDK must be used within a LegacyEVMSDKProvider");return e})(),{address:I,isConnected:M}=jt(),{connectors:T,connectAsync:O,status:N}=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Nt(e),n=Kt(Xt(t,e));return(0,r.useEffect)(()=>t.subscribe(e=>{let{status:t}=e;return t},(e,t)=>{"connected"===t&&"disconnected"===e&&n.reset()}),[t,n.reset]),(0,p.A)((0,p.A)({},n),{},{connect:n.mutate,connectAsync:n.mutateAsync,connectors:nn({config:t})})}(),{connected:B,connecting:R,disconnecting:j,publicKey:L,wallets:F,select:z}=(0,rn.useWallet)(),D=(0,r.useCallback)((e,t)=>{o(n=>t?Array.from(new Set([...n,e])):n.filter(t=>t!==e))},[]);(0,r.useEffect)(()=>{var e;if(b&&Object.keys(null!==(e=null===b||void 0===b?void 0:b.sessionScopes)&&void 0!==e?e:{}).length>0){const e=Object.keys(b.sessionScopes);o(e);const r=[];for(const i of e){var t,n;const{accounts:e}=null!==(t=null===(n=b.sessionScopes)||void 0===n?void 0:n[i])&&void 0!==t?t:{};e&&e.length>0&&r.push(...e)}a(r)}},[b]);const U=(0,r.useCallback)(()=>{var e;if(!b)return!1;const t=Object.keys(null!==(e=null===b||void 0===b?void 0:b.sessionScopes)&&void 0!==e?e:{}),n=i.filter(e=>e.length);return t.length!==n.length||(!t.every(e=>n.includes(e))||!n.every(e=>t.includes(e)))},[b,i]),W=(0,r.useCallback)(async()=>{const e=i.filter(e=>e.length),t=s.filter(e=>""!==e.trim());return y(e,t)},[i,s,y]),q=(0,r.useCallback)(async()=>{const e=i.filter(e=>e.length),t=xn(e);await A(t)},[i,A]),H=(0,r.useCallback)(async()=>{d(null);const e=i.filter(e=>e.length),t=xn(e),n=await P(gc,t);d(n)},[i,P]),K=(0,r.useCallback)(async()=>{l(null);const e=i.filter(e=>e.length),t=xn(e).map(e=>(0,_t.ME)(e))[0]||1,n=T.find(e=>"metaMaskSDK"===e.id);if(n)try{await O({connector:n,chainId:t})}catch(r){console.error("Wagmi connection error:",r),l(r instanceof Error?r:new Error(String(r)))}},[i,T,O]),V=(0,r.useCallback)(async()=>{f();const e=F.find(e=>e.adapter.name.toLowerCase().includes("metamask"));e?z(e.adapter.name):console.error("MetaMask wallet not found in registered wallets")},[F,z,f]),$=(0,r.useCallback)(()=>{var e;null===(e=window.ethereum)||void 0===e||e.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]})},[]),G="connected"===g,Z="connecting"===g,J="disconnected"===g||"pending"===g||"loaded"===g,Y=(0,r.useCallback)(async()=>{await v()},[v]),Q=Object.keys(yn).reduce((e,t)=>{const n=yn[t];return e.push({name:t,value:n}),e},[]);return(0,it.jsx)("div",{"data-testid":In.container,className:"min-h-screen bg-gray-50 flex justify-center",children:(0,it.jsxs)("div",{className:"max-w-6xl w-full p-8",children:[(0,it.jsx)("h1",{"data-testid":In.title,className:"text-slate-800 text-4xl font-bold mb-8 text-center",children:"MetaMask MultiChain API Test Dapp"}),(0,it.jsxs)("section",{className:"bg-white rounded-lg p-8 mb-6 shadow-sm",children:[(0,it.jsx)("div",{className:"mb-4",children:(0,it.jsx)(qn,{availableOptions:Q,inputArray:i,handleCheckboxChange:D,label:Wn.SCOPE})}),(0,it.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[Z&&(0,it.jsx)("button",{type:"button","data-testid":In.btnConnect(),onClick:W,className:"bg-gray-500 text-white px-5 py-2 rounded text-base hover:bg-gray-600 transition-colors",children:"Connecting (Multichain)"}),J&&(0,it.jsx)("button",{type:"button","data-testid":In.btnConnect(),onClick:W,className:"bg-blue-500 text-white px-5 py-2 rounded text-base hover:bg-blue-600 transition-colors",children:"Connect (Multichain)"}),!w&&(0,it.jsx)("button",{type:"button","data-testid":In.btnConnect("legacy"),onClick:q,className:"bg-green-500 text-white px-5 py-2 rounded text-base hover:bg-green-600 transition-colors",children:"Connect (Legacy EVM)"}),!w&&(0,it.jsx)("button",{type:"button","data-testid":On.btnConnectAndSign,onClick:H,className:"bg-green-700 text-white px-5 py-2 rounded text-base hover:bg-green-800 transition-colors",children:"Connect & Sign (Legacy EVM)"}),!M&&(0,it.jsx)("button",{type:"button","data-testid":In.btnConnect("wagmi"),onClick:K,disabled:"pending"===N,className:"bg-yellow-500 text-white px-5 py-2 rounded text-base hover:bg-yellow-600 transition-colors disabled:bg-gray-400 disabled:cursor-not-allowed",children:"pending"===N?"Connecting...":"Connect (Wagmi)"}),!B&&(0,it.jsx)("button",{type:"button","data-testid":In.btnConnect("solana"),onClick:V,className:"bg-purple-500 text-white px-5 py-2 rounded text-base hover:bg-purple-600 transition-colors",children:"Connect (Solana)"}),(0,it.jsx)("button",{type:"button","data-testid":In.btnConnectWindowEthereum,onClick:$,className:"bg-orange-500 text-white px-5 py-2 rounded text-base hover:bg-orange-600 transition-colors",children:"Connect (window.ethereum)"}),G&&U()&&(0,it.jsx)("button",{type:"button","data-testid":In.btnReconnect,onClick:W,className:"bg-blue-500 text-white px-5 py-2 rounded text-base hover:bg-blue-600 transition-colors",children:" Reconnect (Multichain) "}),(G||w||M||B)&&(0,it.jsx)("button",{type:"button","data-testid":In.btnDisconnect,onClick:Y,className:"bg-red-500 text-white px-5 py-2 rounded text-base hover:bg-red-600 transition-colors",children:"Disconnect All"})]})]}),(m||E||c||h)&&(0,it.jsxs)("section",{"data-testid":In.sectionError,className:"bg-white rounded-lg p-8 mb-6 shadow-sm",children:[(0,it.jsx)("h2",{className:"text-2xl font-bold text-red-600 mb-4",children:"Error"}),m&&(0,it.jsxs)("p",{className:"text-gray-700 mb-2",children:[(0,it.jsx)("span",{className:"font-semibold",children:"Multichain:"})," ",m.message.toString(),m.code&&(0,it.jsxs)("span",{className:"ml-2 text-sm text-gray-500",children:["(code: ",m.code,")"]})]}),E&&(0,it.jsxs)("p",{className:"text-gray-700 mb-2",children:[(0,it.jsx)("span",{className:"font-semibold",children:"Legacy EVM:"})," ",E.message.toString(),E.code&&(0,it.jsxs)("span",{className:"ml-2 text-sm text-gray-500",children:["(code: ",E.code,")"]})]}),c&&(0,it.jsxs)("p",{className:"text-gray-700 mb-2",children:[(0,it.jsx)("span",{className:"font-semibold",children:"Wagmi:"})," ",c.message.toString(),c.code&&(0,it.jsxs)("span",{className:"ml-2 text-sm text-gray-500",children:["(code: ",c.code,")"]})]}),h&&(0,it.jsxs)("p",{className:"text-gray-700",children:[(0,it.jsx)("span",{className:"font-semibold",children:"Solana:"})," ",h.message.toString(),h.code&&(0,it.jsxs)("span",{className:"ml-2 text-sm text-gray-500",children:["(code: ",h.code,")"]})]})]}),u&&(0,it.jsxs)("section",{className:"bg-white rounded-lg p-8 mb-6 shadow-sm",children:[(0,it.jsx)("h2",{className:"text-lg font-bold text-gray-800 mb-2",children:"connectAndSign Result"}),(0,it.jsxs)("p",{className:"text-xs text-gray-500 mb-1",children:['Message: "',gc,'"']}),(0,it.jsx)("p",{className:"font-mono text-sm text-green-700 break-all",children:u})]}),(0,it.jsx)(va,{connectedScopes:Object.keys(null!==(e=null===b||void 0===b?void 0:b.sessionScopes)&&void 0!==e?e:{})}),(0,it.jsxs)("section",{"data-testid":In.sectionConnected,className:"bg-white rounded-lg p-8 mb-6 shadow-sm",children:[Object.keys(null!==(t=null===b||void 0===b?void 0:b.sessionScopes)&&void 0!==t?t:{}).length>0&&(0,it.jsxs)("section",{"data-testid":In.sectionScopes,className:"mb-6",children:[(0,it.jsx)("h2",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Connected Networks"}),(0,it.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Object.entries(null!==(n=null===b||void 0===b?void 0:b.sessionScopes)&&void 0!==n?n:{}).map(e=>{let[t,n]=e;return(0,it.jsx)(tr,{scope:t,details:n},t)})})]}),w&&_&&S&&(0,it.jsxs)("section",{className:"mb-6",children:[(0,it.jsx)("h2",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Legacy EVM Connection"}),(0,it.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:(0,it.jsx)(rr,{provider:_,chainId:k,accounts:x,sdk:S,disconnect:C})})]}),M&&I&&(0,it.jsxs)("section",{className:"mb-6",children:[(0,it.jsx)("h2",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Wagmi Connection"}),(0,it.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:(0,it.jsx)(na,{})})]})]}),B&&L&&(0,it.jsxs)("section",{className:"bg-white rounded-lg p-8 mb-6 shadow-sm",children:[(0,it.jsx)("h2",{className:"text-2xl font-bold text-gray-800 mb-6",children:"Solana Wallet Standard"}),(0,it.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:(0,it.jsx)(ba,{})})]})]})})};function yc(){const e=new Set;let t=[];const n=()=>function(e){if("undefined"===typeof window)return;const t=t=>e(t.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)}(n=>{t.some(e=>{let{info:t}=e;return t.uuid===n.info.uuid})||(t=[...t,n],e.forEach(e=>e(t,{added:[n]})))});let r=n();return{_listeners:()=>e,clear(){e.forEach(e=>e([],{removed:[...t]})),t=[]},destroy(){var t;this.clear(),e.clear(),null===(t=r)||void 0===t||t()},findProvider(e){let{rdns:n}=e;return t.find(e=>e.info.rdns===n)},getProviders:()=>t,reset(){var e;this.clear(),null===(e=r)||void 0===e||e(),r=n()},subscribe(n){let{emitImmediately:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.add(n),r&&n(t,{added:t}),()=>e.delete(n)}}}const vc=e=>(t,n,r)=>{const i=r.subscribe;r.subscribe=(e,t,n)=>{let o=e;if(t){const i=(null==n?void 0:n.equalityFn)||Object.is;let s=e(r.getState());o=n=>{const r=e(n);if(!i(s,r)){const e=s;t(s=r,e)}},(null==n?void 0:n.fireImmediately)&&t(s,s)}return i(o)};return e(t,n,r)};function wc(e,t){let n;try{n=e()}catch(r){return}return{getItem:e=>{var r;const i=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),o=null!=(r=n.getItem(e))?r:null;return o instanceof Promise?o.then(i):i(o)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}const _c=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>_c(e)(n),catch(e){return this}}}catch(n){return{then(e){return this},catch:e=>_c(e)(n)}}},kc=(e,t)=>(n,r,i)=>{let o=(0,p.A)({storage:wc(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>(0,p.A)((0,p.A)({},t),e)},t),s=!1;const a=new Set,c=new Set;let l=o.storage;if(!l)return e(function(){console.warn("[zustand persist middleware] Unable to update item '".concat(o.name,"', the given storage is currently unavailable.")),n(...arguments)},r,i);const u=()=>{const e=o.partialize((0,p.A)({},r()));return l.setItem(o.name,{state:e,version:o.version})},d=i.setState;i.setState=(e,t)=>{d(e,t),u()};const h=e(function(){n(...arguments),u()},r,i);let f;i.getInitialState=()=>h;const m=()=>{var e,t;if(!l)return;s=!1,a.forEach(e=>{var t;return e(null!=(t=r())?t:h)});const i=(null==(t=o.onRehydrateStorage)?void 0:t.call(o,null!=(e=r())?e:h))||void 0;return _c(l.getItem.bind(l))(o.name).then(e=>{if(e){if("number"!==typeof e.version||e.version===o.version)return[!1,e.state];if(o.migrate)return[!0,o.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;const[i,s]=e;if(f=o.merge(s,null!=(t=r())?t:h),n(f,!0),i)return u()}).then(()=>{null==i||i(f,void 0),f=r(),s=!0,c.forEach(e=>e(f))}).catch(e=>{null==i||i(void 0,e)})};return i.persist={setOptions:e=>{o=(0,p.A)((0,p.A)({},o),e),e.storage&&(l=e.storage)},clearStorage:()=>{null==l||l.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:e=>(a.add(e),()=>{a.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},o.skipHydration||m(),f||h},xc=e=>{let t;const n=new Set,r=(e,r)=>{const i="function"===typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=r?r:"object"!==typeof i||null===i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,o={setState:r,getState:i,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e))},s=t=e(r,i,o);return o},Sc=e=>e?xc(e):xc;function Ec(e,t){let{errorInstance:n=new Error("timed out"),timeout:r,signal:i}=t;return new Promise((t,o)=>{(async()=>{let s;try{const a=new AbortController;r>0&&(s=setTimeout(()=>{i?a.abort():o(n)},r)),t(await e({signal:(null===a||void 0===a?void 0:a.signal)||null}))}catch(a){"AbortError"===(null===a||void 0===a?void 0:a.name)&&o(n),o(a)}finally{clearTimeout(s)}})()})}const Ac=["default"];function Pc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{shimDisconnect:t=!0,unstable_shimAsyncInject:n}=e;function r(){var t;const n=e.target;if("function"===typeof n){const e=n();if(e)return e}return"object"===typeof n?n:"string"===typeof n?(0,p.A)({},null!==(t=Cc[n])&&void 0!==t?t:{id:n,name:"".concat(n[0].toUpperCase()).concat(n.slice(1)),provider:"is".concat(n[0].toUpperCase()).concat(n.slice(1))}):{id:"injected",name:"Injected",provider:e=>null===e||void 0===e?void 0:e.ethereum}}let i,o,s,a;return c=>({get icon(){return r().icon},get id(){return r().id},get name(){return r().name},type:Pc.type,async setup(){const t=await this.getProvider();null!==t&&void 0!==t&&t.on&&e.target&&(s||(s=this.onConnect.bind(this),t.on("connect",s)),i||(i=this.onAccountsChanged.bind(this),t.on("accountsChanged",i)))},async connect(){let{chainId:n,isReconnecting:r,withCapabilities:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const u=await this.getProvider();if(!u)throw new yr;let d=[];if(r)d=await this.getAccounts().catch(()=>[]);else if(t)try{var h;if(d=null===(h=(await u.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}))[0])||void 0===h||null===(h=h.caveats)||void 0===h||null===(h=h[0])||void 0===h||null===(h=h.value)||void 0===h?void 0:h.map(e=>(0,vo.b)(e)),d.length>0){d=await this.getAccounts()}}catch(b){const e=b;if(e.code===Xi.code)throw new Xi(e);if(e.code===Gi.code)throw e}try{var f,p,m;if((null===(f=d)||void 0===f||!f.length)&&!r){d=(await u.request({method:"eth_requestAccounts"})).map(e=>(0,vo.b)(e))}s&&(u.removeListener("connect",s),s=void 0),i||(i=this.onAccountsChanged.bind(this),u.on("accountsChanged",i)),o||(o=this.onChainChanged.bind(this),u.on("chainChanged",o)),a||(a=this.onDisconnect.bind(this),u.on("disconnect",a));let h=await this.getChainId();if(n&&h!==n){var g;const e=await this.switchChain({chainId:n}).catch(e=>{if(e.code===Xi.code)throw e;return{id:h}});h=null!==(g=null===e||void 0===e?void 0:e.id)&&void 0!==g?g:h}return t&&await(null===(p=c.storage)||void 0===p?void 0:p.removeItem("".concat(this.id,".disconnected"))),e.target||await(null===(m=c.storage)||void 0===m?void 0:m.setItem("injected.connected",!0)),{accounts:l?d.map(e=>({address:e,capabilities:{}})):d,chainId:h}}catch(b){const e=b;if(e.code===Xi.code)throw new Xi(e);if(e.code===Gi.code)throw new Gi(e);throw e}},async disconnect(){var n;const r=await this.getProvider();if(!r)throw new yr;o&&(r.removeListener("chainChanged",o),o=void 0),a&&(r.removeListener("disconnect",a),a=void 0),s||(s=this.onConnect.bind(this),r.on("connect",s));try{await Ec(()=>r.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch(l){}var i;t&&await(null===(i=c.storage)||void 0===i?void 0:i.setItem("".concat(this.id,".disconnected"),!0));e.target||await(null===(n=c.storage)||void 0===n?void 0:n.removeItem("injected.connected"))},async getAccounts(){const e=await this.getProvider();if(!e)throw new yr;return(await e.request({method:"eth_accounts"})).map(e=>(0,vo.b)(e))},async getChainId(){const e=await this.getProvider();if(!e)throw new yr;const t=await e.request({method:"eth_chainId"});return Number(t)},async getProvider(){if("undefined"===typeof window)return;let e;const t=r();return e="function"===typeof t.provider?t.provider(window):"string"===typeof t.provider?Ic(window,t.provider):t.provider,e&&!e.removeListener&&("off"in e&&"function"===typeof e.off?e.removeListener=e.off:e.removeListener=()=>{}),e},async isAuthorized(){try{var r;if(t&&await(null===(r=c.storage)||void 0===r?void 0:r.getItem("".concat(this.id,".disconnected"))))return!1;if(!e.target){var i;if(!await(null===(i=c.storage)||void 0===i?void 0:i.getItem("injected.connected")))return!1}if(!await this.getProvider()){if(void 0!==n&&!1!==n){const e=async()=>{"undefined"!==typeof window&&window.removeEventListener("ethereum#initialized",e);return!!await this.getProvider()},t="number"===typeof n?n:1e3;if(await Promise.race([..."undefined"!==typeof window?[new Promise(t=>window.addEventListener("ethereum#initialized",()=>t(e()),{once:!0}))]:[],new Promise(n=>setTimeout(()=>n(e()),t))]))return!0}throw new yr}return!!(await go(()=>this.getAccounts())).length}catch(o){return!1}},async switchChain(e){let{addEthereumChainParameter:t,chainId:n}=e;const r=await this.getProvider();if(!r)throw new yr;const i=c.chains.find(e=>e.id===n);if(!i)throw new io(new Vt);const o=new Promise(e=>{const t=r=>{"chainId"in r&&r.chainId===n&&(c.emitter.off("change",t),e())};c.emitter.on("change",t)});try{return await Promise.all([r.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,_r.cK)(n)}]}).then(async()=>{await this.getChainId()===n&&c.emitter.emit("change",{chainId:n})}),o]),i}catch(p){var s;const e=p;if(4902===e.code||4902===(null===e||void 0===e||null===(s=e.data)||void 0===s||null===(s=s.originalError)||void 0===s?void 0:s.code))try{var a,l,u,d,h,f;const e=null!==(a=i.blockExplorers)&&void 0!==a?a:{},{default:s}=e,p=(0,We.A)(e,Ac);let m,g;null!==t&&void 0!==t&&t.blockExplorerUrls?m=t.blockExplorerUrls:s&&(m=[s.url,...Object.values(p).map(e=>e.url)]),g=null!==t&&void 0!==t&&null!==(l=t.rpcUrls)&&void 0!==l&&l.length?t.rpcUrls:[null!==(u=null===(d=i.rpcUrls.default)||void 0===d?void 0:d.http[0])&&void 0!==u?u:""];const b={blockExplorerUrls:m,chainId:(0,_r.cK)(n),chainName:null!==(h=null===t||void 0===t?void 0:t.chainName)&&void 0!==h?h:i.name,iconUrls:null===t||void 0===t?void 0:t.iconUrls,nativeCurrency:null!==(f=null===t||void 0===t?void 0:t.nativeCurrency)&&void 0!==f?f:i.nativeCurrency,rpcUrls:g};return await Promise.all([r.request({method:"wallet_addEthereumChain",params:[b]}).then(async()=>{if(await this.getChainId()!==n)throw new Xi(new Error("User rejected switch after adding network."));c.emitter.emit("change",{chainId:n})}),o]),i}catch(m){throw new Xi(m)}if(e.code===Xi.code)throw new Xi(e);throw new io(e)}},async onAccountsChanged(e){if(0===e.length)this.onDisconnect();else if(c.emitter.listenerCount("connect")){var n;const e=(await this.getChainId()).toString();this.onConnect({chainId:e}),t&&await(null===(n=c.storage)||void 0===n?void 0:n.removeItem("".concat(this.id,".disconnected")))}else c.emitter.emit("change",{accounts:e.map(e=>(0,vo.b)(e))})},onChainChanged(e){const t=Number(e);c.emitter.emit("change",{chainId:t})},async onConnect(e){const t=await this.getAccounts();if(0===t.length)return;const n=Number(e.chainId);c.emitter.emit("connect",{accounts:t,chainId:n});const r=await this.getProvider();r&&(s&&(r.removeListener("connect",s),s=void 0),i||(i=this.onAccountsChanged.bind(this),r.on("accountsChanged",i)),o||(o=this.onChainChanged.bind(this),r.on("chainChanged",o)),a||(a=this.onDisconnect.bind(this),r.on("disconnect",a)))},async onDisconnect(e){const t=await this.getProvider();e&&1013===e.code&&t&&(await this.getAccounts()).length||(c.emitter.emit("disconnect"),t&&(o&&(t.removeListener("chainChanged",o),o=void 0),a&&(t.removeListener("disconnect",a),a=void 0),s||(s=this.onConnect.bind(this),t.on("connect",s))))}})}Pc.type="injected";const Cc={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider:e=>null!==e&&void 0!==e&&e.coinbaseWalletExtension?e.coinbaseWalletExtension:Ic(e,"isCoinbaseWallet")},metaMask:{id:"metaMask",name:"MetaMask",provider:e=>Ic(e,e=>{if(!e.isMetaMask)return!1;if(e.isBraveWallet&&!e._events&&!e._state)return!1;const t=["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"];for(const n of t)if(e[n])return!1;return!0})},phantom:{id:"phantom",name:"Phantom",provider(e){var t,n;return null!==e&&void 0!==e&&null!==(t=e.phantom)&&void 0!==t&&t.ethereum?null===(n=e.phantom)||void 0===n?void 0:n.ethereum:Ic(e,"isPhantom")}}};function Ic(e,t){function n(e){return"function"===typeof t?t(e):"string"!==typeof t||e[t]}const r=e.ethereum;return null!==r&&void 0!==r&&r.providers?r.providers.find(e=>n(e)):r&&n(r)?r:void 0}var Mc=n(5806);class Tc{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new Mc.EventEmitter})}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}emit(e){const t=arguments.length<=1?void 0:arguments[1];this._emitter.emit(e,(0,p.A)({uid:this.uid},t))}listenerCount(e){return this._emitter.listenerCount(e)}}function Oc(e){const{deserialize:t=mt,key:n="wagmi",serialize:r=pt,storage:i=Nc}=e;function o(e){return e instanceof Promise?e.then(e=>e).catch(()=>null):e}return(0,p.A)((0,p.A)({},i),{},{key:n,async getItem(e,r){var s;const a=i.getItem("".concat(n,".").concat(e)),c=await o(a);return c?null!==(s=t(c))&&void 0!==s?s:null:null!==r&&void 0!==r?r:null},async setItem(e,t){const s="".concat(n,".").concat(e);null===t?await o(i.removeItem(s)):await o(i.setItem(s,r(t)))},async removeItem(e){await o(i.removeItem("".concat(n,".").concat(e)))}})}const Nc={getItem:()=>null,setItem:()=>{},removeItem:()=>{}};function Bc(){const e="undefined"!==typeof window&&window.localStorage?window.localStorage:Nc;return{getItem:t=>e.getItem(t),removeItem(t){e.removeItem(t)},setItem(t,n){try{e.setItem(t,n)}catch(r){}}}}let Rc,jc=256;const Lc=["multiInjectedProviderDiscovery","storage","syncConnectedChain","ssr"];class Fc extends or.C{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}var zc=n(6703);function Dc(){return{current:0,take(){return this.current++},reset(){this.current=0}}}const Uc=Dc();function Wc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{batch:n,fetchFn:r,fetchOptions:i,key:o="http",methods:s,name:a="HTTP JSON-RPC",onFetchRequest:c,onFetchResponse:l,retryDelay:u,raw:d}=t;return h=>{var f,m;let{chain:g,retryCount:b,timeout:y}=h;const{batchSize:v=1e3,wait:w=0}="object"===typeof n?n:{},_=null!==(f=t.retryCount)&&void 0!==f?f:b,k=null!==(m=null!==y&&void 0!==y?y:t.timeout)&&void 0!==m?m:1e4,x=e||(null===g||void 0===g?void 0:g.rpcUrls.default.http[0]);if(!x)throw new Fc;const S=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{async request(n){var r,i,o,s;const{body:a,fetchFn:c=(null!==(r=t.fetchFn)&&void 0!==r?r:fetch),onRequest:l=t.onRequest,onResponse:u=t.onResponse,timeout:d=(null!==(i=t.timeout)&&void 0!==i?i:1e4)}=n,h=(0,p.A)((0,p.A)({},null!==(o=t.fetchOptions)&&void 0!==o?o:{}),null!==(s=n.fetchOptions)&&void 0!==s?s:{}),{headers:f,method:m,signal:g}=h;try{var b;const t=await Ec(async t=>{var n,r,i;let{signal:o}=t;const s=(0,p.A)((0,p.A)({},h),{},{body:Array.isArray(a)?(0,Ci.A)(a.map(e=>{var t;return(0,p.A)({jsonrpc:"2.0",id:null!==(t=e.id)&&void 0!==t?t:Uc.take()},e)})):(0,Ci.A)((0,p.A)({jsonrpc:"2.0",id:null!==(n=a.id)&&void 0!==n?n:Uc.take()},a)),headers:(0,p.A)({"Content-Type":"application/json"},f),method:m||"POST",signal:g||(d>0?o:null)}),u=new Request(e,s),b=null!==(r=await(null===l||void 0===l?void 0:l(u,s)))&&void 0!==r?r:(0,p.A)((0,p.A)({},s),{},{url:e});return await c(null!==(i=b.url)&&void 0!==i?i:e,b)},{errorInstance:new Fi.MU({body:a,url:e}),timeout:d,signal:!0});let n;if(u&&await u(t),null!==(b=t.headers.get("Content-Type"))&&void 0!==b&&b.startsWith("application/json"))n=await t.json();else{n=await t.text();try{n=JSON.parse(n||"{}")}catch(y){if(t.ok)throw y;n={error:n}}}if(!t.ok)throw new Fi.Ci({body:a,details:(0,Ci.A)(n.error)||t.statusText,headers:t.headers,status:t.status,url:e});return n}catch(y){if(y instanceof Fi.Ci)throw y;if(y instanceof Fi.MU)throw y;throw new Fi.Ci({body:a,cause:y,url:e})}}}}(x,{fetchFn:r,fetchOptions:i,onRequest:c,onResponse:l,timeout:k});return yo({key:o,methods:s,name:a,async request(e){let{method:t,params:r}=e;const i={method:t,params:r},{schedule:o}=(0,zc.u)({id:x,wait:w,shouldSplitBatch:e=>e.length>v,fn:e=>S.request({body:e}),sort:(e,t)=>e.id-t.id}),[{error:s,result:a}]=await(async e=>n?o(e):[await S.request({body:e})])(i);if(d)return{error:s,result:a};if(s)throw new Fi.J8({body:i,error:s,url:x});return a},retryCount:_,retryDelay:u,timeout:k,type:"http"},{fetchOptions:i,url:x})}}function qc(e){return(0,p.A)({formatters:void 0,fees:void 0,serializers:void 0},e)}const Hc=qc({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),Kc=qc({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://11155111.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0}),Vc={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}},$c={block:as({format(e){var t;return{transactions:null===(t=e.transactions)||void 0===t?void 0:t.map(e=>{if("string"===typeof e)return e;const t=is(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,_i.uU)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}),stateRoot:e.stateRoot}}}),transaction:os({format(e){const t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,_i.uU)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:Vs({format:e=>({l1GasPrice:e.l1GasPrice?(0,_i.uU)(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?(0,_i.uU)(e.l1GasUsed):null,l1Fee:e.l1Fee?(0,_i.uU)(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})};var Gc=n(7578),Zc=n(2569);const Jc=["chainId","nonce"];var Yc=n(191),Qc=n(2505),Xc=n(2129);function el(e){const{chainId:t,maxPriorityFeePerGas:n,maxFeePerGas:r,to:i}=e;if(t<=0)throw new Wo.qD({chainId:t});if(i&&!(0,Zc.P)(i))throw new Gc.M({address:i});if(r&&r>Qc.Ao)throw new qo.BG({maxFeePerGas:r});if(n&&r&&n>r)throw new qo.lN({maxFeePerGas:r,maxPriorityFeePerGas:n})}function tl(e){if(!e||0===e.length)return[];const t=[];for(let n=0;n<e.length;n++){const{address:r,storageKeys:i}=e[n];for(let e=0;e<i.length;e++)if(i[e].length-2!==64)throw new Ho.fZ({storageKey:i[e]});if(!(0,Zc.P)(r,{strict:!1}))throw new Gc.M({address:r});t.push([r,i])}return t}function nl(e,t){const n=Os(e);return"eip1559"===n?function(e,t){const{chainId:n,gas:r,nonce:i,to:o,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:l,data:u}=e;el(e);const d=tl(l),h=[(0,_r.cK)(n),i?(0,_r.cK)(i):"0x",c?(0,_r.cK)(c):"0x",a?(0,_r.cK)(a):"0x",r?(0,_r.cK)(r):"0x",null!==o&&void 0!==o?o:"0x",s?(0,_r.cK)(s):"0x",null!==u&&void 0!==u?u:"0x",d,...rl(e,t)];return(0,Bo.aP)(["0x02",Lo(h)])}(e,t):"eip2930"===n?function(e,t){const{chainId:n,gas:r,data:i,nonce:o,to:s,value:a,accessList:c,gasPrice:l}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(t<=0)throw new Wo.qD({chainId:t});if(o&&!(0,Zc.P)(o))throw new Gc.M({address:o});if(n||i)throw new or.C("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(r&&r>Qc.Ao)throw new qo.BG({maxFeePerGas:r})}(e);const u=tl(c),d=[(0,_r.cK)(n),o?(0,_r.cK)(o):"0x",l?(0,_r.cK)(l):"0x",r?(0,_r.cK)(r):"0x",null!==s&&void 0!==s?s:"0x",a?(0,_r.cK)(a):"0x",null!==i&&void 0!==i?i:"0x",u,...rl(e,t)];return(0,Bo.aP)(["0x01",Lo(d)])}(e,t):"eip4844"===n?function(e,t){const{chainId:n,gas:r,nonce:i,to:o,value:s,maxFeePerBlobGas:a,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;!function(e){const{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new Cs;for(const e of t){const t=(0,To.E)(e),n=(0,_i.ME)((0,Xc.di)(e,0,1));if(32!==t)throw new Is({hash:e,size:t});if(1!==n)throw new Ms({hash:e,version:n})}}el(e)}(e);let h=e.blobVersionedHashes,f=e.sidecars;if(e.blobs&&("undefined"===typeof h||"undefined"===typeof f)){const t="string"===typeof e.blobs[0]?e.blobs:e.blobs.map(e=>(0,_r.My)(e)),n=e.kzg,r=ys({blobs:t,kzg:n});if("undefined"===typeof h&&(h=ks({commitments:r})),"undefined"===typeof f){f=Ts({blobs:t,commitments:r,proofs:vs({blobs:t,commitments:r,kzg:n})})}}const p=tl(u),m=[(0,_r.cK)(n),i?(0,_r.cK)(i):"0x",l?(0,_r.cK)(l):"0x",c?(0,_r.cK)(c):"0x",r?(0,_r.cK)(r):"0x",null!==o&&void 0!==o?o:"0x",s?(0,_r.cK)(s):"0x",null!==d&&void 0!==d?d:"0x",p,a?(0,_r.cK)(a):"0x",null!==h&&void 0!==h?h:[],...rl(e,t)],g=[],b=[],y=[];if(f)for(let v=0;v<f.length;v++){const{blob:e,commitment:t,proof:n}=f[v];g.push(e),b.push(t),y.push(n)}return(0,Bo.aP)(["0x03",Lo(f?[m,g,b,y]:m)])}(e,t):"eip7702"===n?function(e,t){const{authorizationList:n,chainId:r,gas:i,nonce:o,to:s,value:a,maxFeePerGas:c,maxPriorityFeePerGas:l,accessList:u,data:d}=e;!function(e){const{authorizationList:t}=e;if(t)for(const n of t){const{chainId:e}=n,t=n.address;if(!(0,Zc.P)(t))throw new Gc.M({address:t});if(e<0)throw new Wo.qD({chainId:e})}el(e)}(e);const h=tl(u),f=function(e){if(!e||0===e.length)return[];const t=[];for(const n of e){const{chainId:e,nonce:r}=n,i=(0,We.A)(n,Jc),o=n.address;t.push([e?(0,_r.nj)(e):"0x",o,r?(0,_r.nj)(r):"0x",...rl({},i)])}return t}(n);return(0,Bo.aP)(["0x04",Lo([(0,_r.cK)(r),o?(0,_r.cK)(o):"0x",l?(0,_r.cK)(l):"0x",c?(0,_r.cK)(c):"0x",i?(0,_r.cK)(i):"0x",null!==s&&void 0!==s?s:"0x",a?(0,_r.cK)(a):"0x",null!==d&&void 0!==d?d:"0x",h,f,...rl(e,t)])])}(e,t):function(e,t){const{chainId:n=0,gas:r,data:i,nonce:o,to:s,value:a,gasPrice:c}=e;!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o}=e;if(o&&!(0,Zc.P)(o))throw new Gc.M({address:o});if("undefined"!==typeof t&&t<=0)throw new Wo.qD({chainId:t});if(n||i)throw new or.C("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(r&&r>Qc.Ao)throw new qo.BG({maxFeePerGas:r})}(e);let l=[o?(0,_r.cK)(o):"0x",c?(0,_r.cK)(c):"0x",r?(0,_r.cK)(r):"0x",null!==s&&void 0!==s?s:"0x",a?(0,_r.cK)(a):"0x",null!==i&&void 0!==i?i:"0x"];if(t){const e=(()=>{if(t.v>=35n){return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n)}if(n>0)return BigInt(2*n)+BigInt(35n+t.v-27n);const e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new Ho.zW({v:t.v});return e})(),r=(0,Yc.B)(t.r),i=(0,Yc.B)(t.s);l=[...l,(0,_r.cK)(e),"0x00"===r?"0x":r,"0x00"===i?"0x":i]}else n>0&&(l=[...l,(0,_r.cK)(n),"0x","0x"]);return Lo(l)}(e,t)}function rl(e,t){const n=null!==t&&void 0!==t?t:e,{v:r,yParity:i}=n;if("undefined"===typeof n.r)return[];if("undefined"===typeof n.s)return[];if("undefined"===typeof r&&"undefined"===typeof i)return[];const o=(0,Yc.B)(n.r),s=(0,Yc.B)(n.s);return["number"===typeof i?i?(0,_r.cK)(1):"0x":0n===r?"0x":1n===r?(0,_r.cK)(1):27n===r?"0x":(0,_r.cK)(1),"0x00"===o?"0x":o,"0x00"===s?"0x":s]}function il(e,t){return function(e){return"deposit"===e.type||"undefined"!==typeof e.sourceHash}(e)?function(e){!function(e){const{from:t,to:n}=e;if(t&&!(0,Zc.P)(t))throw new Gc.M({address:t});if(n&&!(0,Zc.P)(n))throw new Gc.M({address:n})}(e);const{sourceHash:t,data:n,from:r,gas:i,isSystemTx:o,mint:s,to:a,value:c}=e,l=[t,r,null!==a&&void 0!==a?a:"0x",s?(0,_r.nj)(s):"0x",c?(0,_r.nj)(c):"0x",i?(0,_r.nj)(i):"0x",o?"0x1":"0x",null!==n&&void 0!==n?n:"0x"];return(0,Bo.aP)(["0x7e",Lo(l)])}(e):nl(e,t)}const ol={blockTime:2e3,contracts:Vc,formatters:$c,serializers:{transaction:il}},sl=1,al=qc((0,p.A)((0,p.A)({},ol),{},{id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:(0,p.A)((0,p.A)({},ol.contracts),{},{disputeGameFactory:{[sl]:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{[sl]:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{[sl]:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{[sl]:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}}),sourceId:1})),cl={estimateFeesPerGas:async e=>{var t;if(null===(t=e.request)||void 0===t||!t.feeCurrency)return null;const[n,r]=await Promise.all([ll(e.client,e.request.feeCurrency),ul(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(n-r)+r,maxPriorityFeePerGas:r}}};async function ll(e,t){const n=await e.request({method:"eth_gasPrice",params:[t]});return BigInt(n)}async function ul(e,t){const n=await e.request({method:"eth_maxPriorityFeePerGas",params:[t]});return BigInt(n)}function dl(e){return 0===e||0n===e||void 0===e||null===e||"0"===e||""===e||"string"===typeof e&&("0x"===(0,Yc.B)(e).toLowerCase()||"0x00"===(0,Yc.B)(e).toLowerCase())}function hl(e){return!dl(e)}function fl(e){return"cip64"===e.type||function(e){return"undefined"!==typeof e.maxFeePerGas&&"undefined"!==typeof e.maxPriorityFeePerGas}(e)&&hl(e.feeCurrency)}const pl={block:as({format(e){var t;return{transactions:null===(t=e.transactions)||void 0===t?void 0:t.map(e=>{if("string"===typeof e)return e;const t=is(e);return(0,p.A)((0,p.A)((0,p.A)({},t),e.gatewayFee?{gatewayFee:(0,_i.uU)(e.gatewayFee),gatewayFeeRecipient:e.gatewayFeeRecipient}:{}),{},{feeCurrency:e.feeCurrency})})}}}),transaction:os({format(e){if("0x7e"===e.type)return{isSystemTx:e.isSystemTx,mint:e.mint?(0,_i.uU)(e.mint):void 0,sourceHash:e.sourceHash,type:"deposit"};const t={feeCurrency:e.feeCurrency};return"0x7b"===e.type?t.type="cip64":("0x7c"===e.type&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?(0,_i.uU)(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:(0,Go.bm)({format(e){const t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),fl(e)&&(t.type="0x7b"),t}})};const ml={transaction:function(e,t){return fl(e)?function(e,t){!function(e){const{chainId:t,maxPriorityFeePerGas:n,gasPrice:r,maxFeePerGas:i,to:o,feeCurrency:s}=e;if(t<=0)throw new Wo.qD({chainId:t});if(o&&!(0,Zc.P)(o))throw new Gc.M({address:o});if(r)throw new or.C("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(hl(i)&&i>gl)throw new qo.BG({maxFeePerGas:i});if(hl(n)&&hl(i)&&n>i)throw new qo.lN({maxFeePerGas:i,maxPriorityFeePerGas:n});if(hl(s)&&!(0,Zc.P)(s))throw new or.C("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(dl(s))throw new or.C("`feeCurrency` must be provided for CIP-64 transactions.")}(e);const{chainId:n,gas:r,nonce:i,to:o,value:s,maxFeePerGas:a,maxPriorityFeePerGas:c,accessList:l,feeCurrency:u,data:d}=e,h=[(0,_r.nj)(n),i?(0,_r.nj)(i):"0x",c?(0,_r.nj)(c):"0x",a?(0,_r.nj)(a):"0x",r?(0,_r.nj)(r):"0x",null!==o&&void 0!==o?o:"0x",s?(0,_r.nj)(s):"0x",null!==d&&void 0!==d?d:"0x",tl(l),u,...rl(e,t)];return(0,Bo.aP)(["0x7b",Lo(h)])}(e,t):il(e,t)}};const gl=Qc.Ao;const bl={blockTime:1e3,contracts:Vc,formatters:pl,serializers:ml,fees:cl},yl=qc((0,p.A)((0,p.A)({},bl),{},{id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1})),vl=qc({id:1337,name:"Localhost",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["http://127.0.0.1:8545"]}}});function wl(){let e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return i=>({id:"metaMaskSDK",name:"MetaMask",rdns:["io.metamask","io.metamask.mobile"],type:wl.type,async connect(){let{chainId:e=1,isReconnecting:t,withCapabilities:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=await this.getInstance(),s=o.getProvider();let a=[];t&&(a=await this.getAccounts().catch(()=>[]));try{var c;let t,u;if(null===(c=a)||void 0===c||!c.length){const e=i.chains.map(e=>(0,_r.cK)(e.id));if(r.connectAndSign||r.connectWith)r.connectAndSign?t=(await o.connectAndSign({chainIds:e,message:r.connectAndSign})).signature:r.connectWith&&(u=(await o.connectWith({chainIds:e,method:r.connectWith.method,params:r.connectWith.params})).result),a=await this.getAccounts();else{a=(await o.connect({chainIds:e})).accounts.map(e=>(0,vo.b)(e))}}let d=await this.getChainId();if(e&&d!==e){var l;const t=await this.switchChain({chainId:e}).catch(e=>{if(e.code===Xi.code)throw e;return{id:d}});d=null!==(l=null===t||void 0===t?void 0:t.id)&&void 0!==l?l:d}return t?s.emit("connectAndSign",{accounts:a,chainId:(0,_r.cK)(d),signature:t}):u&&s.emit("connectWith",{accounts:a,chainId:(0,_r.cK)(d),result:u}),{accounts:n?a.map(e=>({address:e,capabilities:{}})):a,chainId:d}}catch(u){const e=u;if(e.code===Xi.code)throw new Xi(e);if(e.code===Gi.code)throw new Gi(e);throw e}},async disconnect(){return(await this.getInstance()).disconnect()},async getAccounts(){const e=await this.getInstance();if(e.accounts.length)return e.accounts.map(e=>(0,vo.b)(e));const t=e.getProvider();return(await t.request({method:"eth_accounts"})).map(e=>(0,vo.b)(e))},async getChainId(){const e=await this.getInstance();if(e.getChainId())return Number(e.getChainId());const t=e.getProvider(),n=await t.request({method:"eth_chainId"});return Number(n)},async getProvider(){return(await this.getInstance()).getProvider()},async isAuthorized(){try{const e=10,t=await go(async()=>Ec(async()=>{const e=await this.getAccounts();if(!e.length)throw new Error("try again");return e},{timeout:e}),{delay:e+1,retryCount:3});return Boolean(t.length)}catch(e){return!1}},async switchChain(e){let{addEthereumChainParameter:t,chainId:n}=e;const r=i.chains.find(e=>{let{id:t}=e;return t===Number(n)});if(!r)throw new io(new Vt);const o=(0,_r.cK)(n);try{var s,a,c,l;const e=await this.getInstance();return await e.switchChain({chainId:o,chainConfiguration:{blockExplorerUrls:null!==t&&void 0!==t&&t.blockExplorerUrls?[...t.blockExplorerUrls]:null!==(s=r.blockExplorers)&&void 0!==s&&s.default.url?[r.blockExplorers.default.url]:void 0,chainId:o,chainName:null!==(a=null===t||void 0===t?void 0:t.chainName)&&void 0!==a?a:r.name,iconUrls:null===t||void 0===t?void 0:t.iconUrls,nativeCurrency:null!==(c=null===t||void 0===t?void 0:t.nativeCurrency)&&void 0!==c?c:r.nativeCurrency,rpcUrls:null!==t&&void 0!==t&&t.rpcUrls?[...t.rpcUrls]:null!==(l=r.rpcUrls.default)&&void 0!==l&&l.http?[...r.rpcUrls.default.http]:void 0}}),r}catch(u){const e=u;if(e.code===Xi.code)throw new Xi(e);throw new io(e)}},async onAccountsChanged(e){i.emitter.emit("change",{accounts:e.map(e=>(0,vo.b)(e))})},onChainChanged(e){const t=Number(e);i.emitter.emit("change",{chainId:t})},async onConnect(e){const t=await this.getAccounts();if(0===t.length)return;const n=Number(e.chainId);i.emitter.emit("connect",{accounts:t,chainId:n})},async onDisconnect(e){if(e&&1013===e.code){if(await this.getProvider()&&Boolean((await this.getAccounts()).length))return}i.emitter.emit("disconnect")},onDisplayUri(e){i.emitter.emit("message",{type:"display_uri",data:e})},async getInstance(){if(!e){if(!t){var o,s;const{createEVMClient:e}=await(async()=>{try{return Promise.resolve().then(n.bind(n,5823))}catch(e){throw new Error('dependency "@metamask/connect-evm" not found')}})(),a="undefined"===typeof window?{name:"wagmi"}:{name:window.location.hostname,url:window.location.href};t=e((0,p.A)((0,p.A)({},r),{},{api:{supportedNetworks:Object.fromEntries(i.chains.map(e=>{var t,n;return[(0,_r.cK)(e.id),null!==(t=null===(n=e.rpcUrls.default)||void 0===n?void 0:n.http[0])&&void 0!==t?t:""]}))},dapp:null!==(o=null!==(s=r.dappMetadata)&&void 0!==s?s:r.dapp)&&void 0!==o?o:a,debug:!!r.logging||r.debug,eventHandlers:{accountsChanged:this.onAccountsChanged.bind(this),chainChanged:this.onChainChanged.bind(this),connect:this.onConnect.bind(this),disconnect:this.onDisconnect.bind(this),displayUri:this.onDisplayUri.bind(this)},analytics:{integrationType:"wagmi"}},r.mobile&&{mobile:r.mobile}))}e=await t}return e}})}wl.type="metaMask";const _l=function(e){var t;const{multiInjectedProviderDiscovery:n=!0,storage:r=Oc({storage:Bc()}),syncConnectedChain:i=!0,ssr:o=!1}=e,s=(0,We.A)(e,Lc),a="undefined"!==typeof window&&n?yc():void 0,c=Sc(()=>s.chains),l=Sc(()=>{const e=[],t=new Set;for(const r of null!==(n=s.connectors)&&void 0!==n?n:[]){var n;const i=u(r);if(e.push(i),!o&&i.rdns){const e="string"===typeof i.rdns?[i.rdns]:i.rdns;for(const n of e)t.add(n)}}if(!o&&a){const n=a.getProviders();for(const r of n)t.has(r.info.rdns)||e.push(u(d(r)))}return e});function u(e){var t;const n=function(e){return new Tc(e)}(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:11;if(!Rc||jc+e>512){Rc="",jc=0;for(let e=0;e<256;e++)Rc+=(256+256*Math.random()|0).toString(16).substring(1)}return Rc.substring(jc,jc+++e)}()),i=(0,p.A)((0,p.A)({},e({emitter:n,chains:c.getState(),storage:r,transports:s.transports})),{},{emitter:n,uid:n.uid});return n.on("connect",w),null===(t=i.setup)||void 0===t||t.call(i),i}function d(e){const{info:t}=e,n=e.provider;return Pc({target:(0,p.A)((0,p.A)({},t),{},{id:t.rdns,provider:n})})}const h=new Map;function f(){return{chainId:c.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let m;const g="0.0.0-canary-";m=At.startsWith(g)?Number.parseInt(At.replace(g,""),10):Number.parseInt(null!==(t=At.split(".")[0])&&void 0!==t?t:"0",10);const b=Sc(vc(r?kc(f,{migrate(e,t){if(t===m)return e;const n=f(),r=y(e,n.chainId);return(0,p.A)((0,p.A)({},n),{},{chainId:r})},name:"store",partialize:e=>({connections:{__type:"Map",value:Array.from(e.connections.entries()).map(e=>{let[t,n]=e;const{id:r,name:i,type:o,uid:s}=n.connector,a={id:r,name:i,type:o,uid:s};return[t,(0,p.A)((0,p.A)({},n),{},{connector:a})]})},chainId:e.chainId,current:e.current}),merge(e,t){"object"===typeof e&&e&&"status"in e&&delete e.status;const n=y(e,t.chainId);return(0,p.A)((0,p.A)((0,p.A)({},t),e),{},{chainId:n})},skipHydration:o,storage:r,version:m}):f));function y(e,t){return e&&"object"===typeof e&&"chainId"in e&&"number"===typeof e.chainId&&c.getState().some(t=>t.id===e.chainId)?e.chainId:t}function v(e){b.setState(t=>{var n,r;const i=t.connections.get(e.uid);return i?(0,p.A)((0,p.A)({},t),{},{connections:new Map(t.connections).set(e.uid,{accounts:null!==(n=e.accounts)&&void 0!==n?n:i.accounts,chainId:null!==(r=e.chainId)&&void 0!==r?r:i.chainId,connector:i.connector})}):t})}function w(e){"connecting"!==b.getState().status&&"reconnecting"!==b.getState().status&&b.setState(t=>{const n=l.getState().find(t=>t.uid===e.uid);return n?(n.emitter.listenerCount("connect")&&n.emitter.off("connect",v),n.emitter.listenerCount("change")||n.emitter.on("change",v),n.emitter.listenerCount("disconnect")||n.emitter.on("disconnect",_),(0,p.A)((0,p.A)({},t),{},{connections:new Map(t.connections).set(e.uid,{accounts:e.accounts,chainId:e.chainId,connector:n}),current:e.uid,status:"connected"})):t})}function _(e){b.setState(t=>{const n=t.connections.get(e.uid);if(n){const e=n.connector;e.emitter.listenerCount("change")&&n.connector.emitter.off("change",v),e.emitter.listenerCount("disconnect")&&n.connector.emitter.off("disconnect",_),e.emitter.listenerCount("connect")||n.connector.emitter.on("connect",w)}if(t.connections.delete(e.uid),0===t.connections.size)return(0,p.A)((0,p.A)({},t),{},{connections:new Map,current:null,status:"disconnected"});const r=t.connections.values().next().value;return(0,p.A)((0,p.A)({},t),{},{connections:new Map(t.connections),current:r.connector.uid})})}return b.setState(f()),i&&b.subscribe(e=>{var t;let{connections:n,current:r}=e;return r?null===(t=n.get(r))||void 0===t?void 0:t.chainId:void 0},e=>{if(c.getState().some(t=>t.id===e))return b.setState(t=>(0,p.A)((0,p.A)({},t),{},{chainId:null!==e&&void 0!==e?e:t.chainId}))}),null===a||void 0===a||a.subscribe(e=>{const t=new Set,n=new Set;for(const r of l.getState())if(t.add(r.id),r.rdns){const e="string"===typeof r.rdns?[r.rdns]:r.rdns;for(const t of e)n.add(t)}const i=[];for(const r of e){if(n.has(r.info.rdns))continue;const e=u(d(r));t.has(e.id)||i.push(e)}r&&!b.persist.hasHydrated()||l.setState(e=>[...e,...i],!0)}),{get chains(){return c.getState()},get connectors(){return l.getState()},storage:r,getClient:function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=null!==(e=t.chainId)&&void 0!==e?e:b.getState().chainId,r=c.getState().find(e=>e.id===n);if(t.chainId&&!r)throw new Vt;{const e=h.get(b.getState().chainId);if(e&&!r)return e;if(!r)throw new Vt}{const e=h.get(n);if(e)return e}let i;if(s.client)i=s.client({chain:r});else{var o;const e=r.id,t=c.getState().map(e=>e.id),n={},a=Object.entries(s);for(const[r,i]of a)if("chains"!==r&&"client"!==r&&"connectors"!==r&&"transports"!==r)if("object"===typeof i)if(e in i)n[r]=i[e];else{if(t.some(e=>e in i))continue;n[r]=i}else n[r]=i;i=Li((0,p.A)((0,p.A)({},n),{},{chain:r,batch:null!==(o=n.batch)&&void 0!==o?o:{multicall:!0},transport:t=>s.transports[e]((0,p.A)((0,p.A)({},t),{},{connectors:l}))}))}return h.set(n,i),i},get state(){return b.getState()},setState(e){let t;t="function"===typeof e?e(b.getState()):e;const n=f();"object"!==typeof t&&(t=n);Object.keys(n).some(e=>!(e in t))&&(t=n),b.setState(t,!0)},subscribe:(e,t,n)=>b.subscribe(e,t,n?(0,p.A)((0,p.A)({},n),{},{fireImmediately:n.emitImmediately}):void 0),_internal:{mipd:a,async revalidate(){const e=b.getState(),t=e.connections;let n=e.current;for(const[,r]of t){const e=r.connector;!!e.isAuthorized&&await e.isAuthorized()||(t.delete(e.uid),n===e.uid&&(n=null))}b.setState(e=>(0,p.A)((0,p.A)({},e),{},{connections:t,current:n}))},store:b,ssr:Boolean(o),syncConnectedChain:i,transports:s.transports,chains:{setState(e){const t="function"===typeof e?e(c.getState()):e;if(0!==t.length)return c.setState(t,!0)},subscribe:e=>c.subscribe(e)},connectors:{providerDetailToConnector:d,setup:u,setState:e=>l.setState("function"===typeof e?e(l.getState()):e,!0),subscribe:e=>l.subscribe(e)},events:{change:v,connect:w,disconnect:_}}}}({chains:[Hc,Kc,al,yl,vl],connectors:[wl({dapp:{name:window.location.hostname,url:window.location.href}})],transports:{[Hc.id]:Wc(),[Kc.id]:Wc(),[al.id]:Wc(),[yl.id]:Wc(),[vl.id]:Wc()}}),kl=new Ue({defaultOptions:{queries:{gcTime:864e5,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}),xl=function(e){let{storage:t,key:n="REACT_QUERY_OFFLINE_CACHE",throttleTime:r=1e3,serialize:i=JSON.stringify,deserialize:o=JSON.parse,retry:s}=e;if(t){const e=e=>{try{return void t.setItem(n,i(e))}catch(r){return r}};return{persistClient:f(t=>{let n=t,r=e(n),i=0;for(;r&&n;)i++,n=null===s||void 0===s?void 0:s({persistedClient:n,error:r,errorCount:i}),n&&(r=e(n))},r),restoreClient:()=>{const e=t.getItem(n);if(e)return o(e)},removeClient:()=>{t.removeItem(n)}}}return{persistClient:h,restoreClient:h,removeClient:h}}({key:"browser-playground.cache",serialize:pt,storage:window.localStorage,deserialize:mt});i.createRoot(document.getElementById("root")).render((0,it.jsx)(r.StrictMode,{children:(0,it.jsx)(wt,{config:_l,children:(0,it.jsx)(dt,{client:kl,persistOptions:{persister:xl},children:(0,it.jsx)(Ln,{children:(0,it.jsx)(Un,{children:(0,it.jsx)(mc,{children:(0,it.jsx)(bc,{})})})})})})}))})()})();
3
+ //# sourceMappingURL=main.31e1a1d6.js.map