PageSourceSearch

https://lumma.xyz/assets/index-DbMHO1rv.js

js lumma.xyz collected 2026-10-04 06:55:17 UTC 302,658 bytes, 7 lines download raw bytes

1import{a_ as or,b7 as ke,ad as jt,b0 as ms,aZ as Eu,a$ as bl,b8 as yl,b3 as vl,bv as ml,b2 as _l,ag as wl}from"./lifi-CLzEqxsZ.js";import{V as _e,M as El,v as Sl,U as ar}from"./chains-C23td42K.js";function Rl(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const f in n)if(f!=="default"&&!(f in e)){const s=Object.getOwnPropertyDescriptor(n,f);s&&Object.defineProperty(e,f,s.get?s:{enumerable:!0,get:()=>n[f]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var dn={},it={},st={},Us;function kl(){if(Us)return st;Us=1,Object.defineProperty(st,"__esModule",{value:!0}),st.walletLogo=void 0;const e=(t,r)=>{let n;switch(t){case"standard":return n=r,`data:image/svg+xml,%3Csvg width='${r}' height='${n}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `;case"circle":return n=r,`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${r}' height='${n}' viewBox='0 0 999.81 999.81'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052fe;%7D.cls-2%7Bfill:%23fefefe;%7D.cls-3%7Bfill:%230152fe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M655-115.9h56c.83,1.59,2.36.88,3.56,1a478,478,0,0,1,75.06,10.42C891.4-81.76,978.33-32.58,1049.19,44q116.7,126,131.94,297.61c.38,4.14-.34,8.53,1.78,12.45v59c-1.58.84-.91,2.35-1,3.56a482.05,482.05,0,0,1-10.38,74.05c-24,106.72-76.64,196.76-158.83,268.93s-178.18,112.82-287.2,122.6c-4.83.43-9.86-.25-14.51,1.77H654c-1-1.68-2.69-.91-4.06-1a496.89,496.89,0,0,1-105.9-18.59c-93.54-27.42-172.78-77.59-236.91-150.94Q199.34,590.1,184.87,426.58c-.47-5.19.25-10.56-1.77-15.59V355c1.68-1,.91-2.7,1-4.06a498.12,498.12,0,0,1,18.58-105.9c26-88.75,72.64-164.9,140.6-227.57q126-116.27,297.21-131.61C645.32-114.57,650.35-113.88,655-115.9Zm377.92,500c0-192.44-156.31-349.49-347.56-350.15-194.13-.68-350.94,155.13-352.29,347.42-1.37,194.55,155.51,352.1,348.56,352.47C876.15,734.23,1032.93,577.84,1032.93,384.11Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-2' d='M1032.93,384.11c0,193.73-156.78,350.12-351.29,349.74-193-.37-349.93-157.92-348.56-352.47C334.43,189.09,491.24,33.28,685.37,34,876.62,34.62,1032.94,191.67,1032.93,384.11ZM683,496.81q43.74,0,87.48,0c15.55,0,25.32-9.72,25.33-25.21q0-87.48,0-175c0-15.83-9.68-25.46-25.59-25.46H595.77c-15.88,0-25.57,9.64-25.58,25.46q0,87.23,0,174.45c0,16.18,9.59,25.7,25.84,25.71Z' transform='translate(-183.1 115.9)'/%3E%3Cpath class='cls-3' d='M683,496.81H596c-16.25,0-25.84-9.53-25.84-25.71q0-87.23,0-174.45c0-15.82,9.7-25.46,25.58-25.46H770.22c15.91,0,25.59,9.63,25.59,25.46q0,87.47,0,175c0,15.49-9.78,25.2-25.33,25.21Q726.74,496.84,683,496.81Z' transform='translate(-183.1 115.9)'/%3E%3C/svg%3E`;case"text":return n=(.1*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3
1V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogo":return n=(.25*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%230052ff;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;case"textLight":return n=(.1*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 528.15 53.64'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Ctitle%3ECoinbase_Wordmark_SubBrands_ALL%3C/title%3E%3Cpath class='cls-1' d='M164.45,15a15,15,0,0,0-11.74,5.4V0h-8.64V52.92h8.5V48a15,15,0,0,0,11.88,5.62c10.37,0,18.21-8.21,18.21-19.3S174.67,15,164.45,15Zm-1.3,30.67c-6.19,0-10.73-4.83-10.73-11.31S157,23,163.22,23s10.66,4.82,10.66,11.37S169.34,45.65,163.15,45.65Zm83.31-14.91-6.34-.93c-3-.43-5.18-1.44-5.18-3.82,0-2.59,2.8-3.89,6.62-3.89,4.18,0,6.84,1.8,7.42,4.76h8.35c-.94-7.49-6.7-11.88-15.55-11.88-9.15,0-15.2,4.68-15.2,11.3,0,6.34,4,10,12,11.16l6.33.94c3.1.43,4.83,1.65,4.83,4,0,2.95-3,4.17-7.2,4.17-5.12,0-8-2.09-8.43-5.25h-8.49c.79,7.27,6.48,12.38,16.84,12.38,9.44,0,15.7-4.32,15.7-11.74C258.12,35.28,253.58,31.82,246.46,30.74Zm-27.65-2.3c0-8.06-4.9-13.46-15.27-13.46-9.79,0-15.26,5-16.34,12.6h8.57c.43-3,2.73-5.4,7.63-5.4,4.39,0,6.55,1.94,6.55,4.32,0,3.09-4,3.88-8.85,4.39-6.63.72-14.84,3-14.84,11.66,0,6.7,5,11,12.89,11,6.19,0,10.08-2.59,12-6.7.28,3.67,3,6.05,6.84,6.05h5v-7.7h-4.25Zm-8.5,9.36c0,5-4.32,8.64-9.57,8.64-3.24,0-6-1.37-6-4.25,0-3.67,4.39-4.68,8.42-5.11s6-1.22,7.13-2.88ZM281.09,15c-11.09,0-19.23,8.35-19.23,19.36,0,11.6,8.72,19.3,19.37,19.3,9,0,16.06-5.33,17.86-12.89h-9c-1.3,3.31-4.47,5.19-8.71,5.19-5.55,0-9.72-3.46-10.66-9.51H299.3V33.12C299.3,22.46,291.53,15,281.09,15Zm-9.87,15.26c1.37-5.18,5.26-7.7,9.72-7.7,4.9,0,8.64,2.8,9.51,7.7ZM19.3,23a9.84,9.84,0,0,1,9.5,7h9.14c-1.65-8.93-9-15-18.57-15A19,19,0,0,0,0,34.34c0,11.09,8.28,19.3,19.37,19.3,9.36,0,16.85-6,18.5-15H28.8a9.75,9.75,0,0,1-9.43,7.06c-6.27,0-10.66-4.83-10.66-11.31S13,23,19.3,23Zm41.11-8A19,19,0,0,0,41,34.34c0,11.09,8.28,19.3,19.37,19.3A19,19,0,0,0,79.92,34.27C79.92,23.33,71.64,15,60.41,15Zm.07,30.67c-6.19,0-10.73-4.83-10.73-11.31S54.22,23,60.41,23s10.8,4.89,10.8,11.37S66.67,45.65,60.48,45.65ZM123.41,15c-5.62,0-9.29,2.3-11.45,5.54V15.7h-8.57V52.92H112V32.69C112,27,115.63,23,121,23c5,0,8.06,3.53,8.06,8.64V52.92h8.64V31C137.66,21.6,132.84,15,123.41,15ZM92,.36a5.36,5.36,0,0,0-5.55,5.47,5.55,5.55,0,0,0,11.09,0A5.35,5.35,0,0,0,92,.36Zm-9.72,23h5.4V52.92h8.64V15.7
1h-14Zm298.17-7.7L366.2,52.92H372L375.29,44H392l3.33,8.88h6L386.87,15.7ZM377,39.23l6.45-17.56h.1l6.56,17.56ZM362.66,15.7l-7.88,29h-.11l-8.14-29H341l-8,28.93h-.1l-8-28.87H319L329.82,53h5.45l8.19-29.24h.11L352,53h5.66L368.1,15.7Zm135.25,0v4.86h12.32V52.92h5.6V20.56h12.32V15.7ZM467.82,52.92h25.54V48.06H473.43v-12h18.35V31.35H473.43V20.56h19.93V15.7H467.82ZM443,15.7h-5.6V52.92h24.32V48.06H443Zm-30.45,0h-5.61V52.92h24.32V48.06H412.52Z'/%3E%3C/svg%3E`;case"textWithLogoLight":return n=(.25*r).toFixed(2),`data:image/svg+xml,%3Csvg width='${r}' height='${n}' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 308.44 77.61'%3E%3Cdefs%3E%3Cstyle%3E.cls-1%7Bfill:%23fefefe;%7D%3C/style%3E%3C/defs%3E%3Cpath class='cls-1' d='M142.94,20.2l-7.88,29H135l-8.15-29h-5.55l-8,28.93h-.11l-8-28.87H99.27l10.84,37.27h5.44l8.2-29.24h.1l8.41,29.24h5.66L148.39,20.2Zm17.82,0L146.48,57.42h5.82l3.28-8.88h16.65l3.34,8.88h6L167.16,20.2Zm-3.44,23.52,6.45-17.55h.11l6.56,17.55ZM278.2,20.2v4.86h12.32V57.42h5.6V25.06h12.32V20.2ZM248.11,57.42h25.54V52.55H253.71V40.61h18.35V35.85H253.71V25.06h19.94V20.2H248.11ZM223.26,20.2h-5.61V57.42H242V52.55H223.26Zm-30.46,0h-5.6V57.42h24.32V52.55H192.8Zm-154,38A19.41,19.41,0,1,1,57.92,35.57H77.47a38.81,38.81,0,1,0,0,6.47H57.92A19.39,19.39,0,0,1,38.81,58.21Z'/%3E%3C/svg%3E`;default:return n=r,`data:image/svg+xml,%3Csvg width='${r}' height='${n}' viewBox='0 0 1024 1024' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Crect width='1024' height='1024' fill='%230052FF'/%3E %3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z' fill='white'/%3E %3C/svg%3E `}};return st.walletLogo=e,st}var ot={},Hs;
1function Cl(){return Hs||(Hs=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.LINK_API_URL=void 0,ot.LINK_API_URL="https://www.walletlink.org"),ot}var j={},hn={},xe={},Ws;function cr(){return Ws||(Ws=1,Object.defineProperty(xe,"__esModule",{value:!0}),xe.errorValues=xe.standardErrorCodes=void 0,xe.standardErrorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},xe.errorValues={"-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."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}}),xe}var at={},fn={},$s;function _s(){return $s||($s=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serialize=e.getErrorCode=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=cr(),r="Unspecified error message.";e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function n(d,o=r){if(d&&Number.isInteger(d)){const p=d.toString();if(y(t.errorValues,p))return t.errorValues[p].message;if(u(d))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return o}e.getMessageFromCode=n;function f(d){if(!Number.isInteger(d))return!1;const o=d.toString();return!!(t.errorValues[o]||u(d))}e.isValidCode=f;function s(d){var o;if(typeof d=="number")return d;if(c(d))return(o=d.code)!==null&&o!==void 0?o:d.errorCode}e.getErrorCode=s;function c(d){return typeof d=="object"&&d!==null&&(typeof d.code=="number"||typeof d.errorCode=="number")}function l(d,{shouldIncludeStack:o=!1}={}){const p={};if(d&&typeof d=="object"&&!Array.isArray(d)&&y(d,"code")&&f(d.code)){const v=d;p.code=v.code,v.message&&typeof v.message=="string"?(p.message=v.message,y(v,"data")&&(p.data=v.data)):(p.message=n(p.code),p.data={originalError:h(d)})}else p.code=t.standardErrorCodes.rpc.internal,p.message=a(d,"message")?d.message:r,p.data={originalError:h(d)};return o&&(p.stack=a(d,"stack")?d.stack:void 0),p}e.serialize=l;function u(d){return d>=-32099&&d<=-32e3}function h(d){return d&&typeof d=="object"&&!Array.isArray(d)?Object.assign({},d):d}function y(d,o){return Object.prototype.hasOwnProperty.call(d,o)}function a(d,o){return typeof d=="object"&&d!==null&&o in d&&typeof d[o]=="string"}})(fn)),fn}var Vs;function Al(){if(Vs)return at;
1Vs=1,Object.defineProperty(at,"__esModule",{value:!0}),at.standardErrors=void 0;const e=cr(),t=_s();at.standardErrors={rpc:{parse:u=>r(e.standardErrorCodes.rpc.parse,u),invalidRequest:u=>r(e.standardErrorCodes.rpc.invalidRequest,u),invalidParams:u=>r(e.standardErrorCodes.rpc.invalidParams,u),methodNotFound:u=>r(e.standardErrorCodes.rpc.methodNotFound,u),internal:u=>r(e.standardErrorCodes.rpc.internal,u),server:u=>{if(!u||typeof u!="object"||Array.isArray(u))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:h}=u;if(!Number.isInteger(h)||h>-32005||h<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return r(h,u)},invalidInput:u=>r(e.standardErrorCodes.rpc.invalidInput,u),resourceNotFound:u=>r(e.standardErrorCodes.rpc.resourceNotFound,u),resourceUnavailable:u=>r(e.standardErrorCodes.rpc.resourceUnavailable,u),transactionRejected:u=>r(e.standardErrorCodes.rpc.transactionRejected,u),methodNotSupported:u=>r(e.standardErrorCodes.rpc.methodNotSupported,u),limitExceeded:u=>r(e.standardErrorCodes.rpc.limitExceeded,u)},provider:{userRejectedRequest:u=>n(e.standardErrorCodes.provider.userRejectedRequest,u),unauthorized:u=>n(e.standardErrorCodes.provider.unauthorized,u),unsupportedMethod:u=>n(e.standardErrorCodes.provider.unsupportedMethod,u),disconnected:u=>n(e.standardErrorCodes.provider.disconnected,u),chainDisconnected:u=>n(e.standardErrorCodes.provider.chainDisconnected,u),unsupportedChain:u=>n(e.standardErrorCodes.provider.unsupportedChain,u),custom:u=>{if(!u||typeof u!="object"||Array.isArray(u))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:h,message:y,data:a}=u;if(!y||typeof y!="string")throw new Error('"message" must be a nonempty string');return new c(h,y,a)}}};function r(u,h){const[y,a]=f(h);return new s(u,y||(0,t.getMessageFromCode)(u),a)}function n(u,h){const[y,a]=f(h);return new c(u,y||(0,t.getMessageFromCode)(u),a)}function f(u){if(u){if(typeof u=="string")return[u];if(typeof u=="object"&&!Array.isArray(u)){const{message:h,data:y}=u;
1if(h&&typeof h!="string")throw new Error("Must specify string message.");return[h||void 0,y]}}return[]}class s extends Error{constructor(h,y,a){if(!Number.isInteger(h))throw new Error('"code" must be an integer.');if(!y||typeof y!="string")throw new Error('"message" must be a nonempty string.');super(y),this.code=h,a!==void 0&&(this.data=a)}}class c extends s{constructor(h,y,a){if(!l(h))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(h,y,a)}}function l(u){return Number.isInteger(u)&&u>=1e3&&u<=4999}return at}var ct={},ut={},zs;function ws(){if(zs)return ut;zs=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.isErrorResponse=void 0;function e(t){return t.errorMessage!==void 0}return ut.isErrorResponse=e,ut}var lt={},Js;function Es(){return Js||(Js=1,Object.defineProperty(lt,"__esModule",{value:!0}),lt.LIB_VERSION=void 0,lt.LIB_VERSION="3.9.3"),lt}var Gs;function Il(){if(Gs)return ct;Gs=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.serializeError=void 0;const e=ws(),t=Es(),r=cr(),n=_s();function f(l,u){const h=(0,n.serialize)(s(l),{shouldIncludeStack:!0}),y=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");y.searchParams.set("version",t.LIB_VERSION),y.searchParams.set("code",h.code.toString());const a=c(h.data,u);return a&&y.searchParams.set("method",a),y.searchParams.set("message",h.message),Object.assign(Object.assign({},h),{docUrl:y.href})}ct.serializeError=f;function s(l){return typeof l=="string"?{message:l,code:r.standardErrorCodes.rpc.internal}:(0,e.isErrorResponse)(l)?Object.assign(Object.assign({},l),{message:l.errorMessage,code:l.errorCode,data:{method:l.method}}):l}function c(l,u){const h=l==null?void 0:l.method;if(h)return h;if(u!==void 0){if(typeof u=="string")return u;if(Array.isArray(u)){if(u.length>0)return u[0].method}else return u.method}}return ct}var Zs;function ur(){return Zs||(Zs=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardErrors=e.standardErrorCodes=e.serializeError=e.getMessageFromCode=e.getErrorCode=void 0;const t=cr();Object.defineProperty(e,"standardErrorCodes",{enumerable:!0,get:function(){return t.standardErrorCodes}});const r=Al();Object.defineProperty(e,"standardErrors",{enumerable:!0,get:function(){return r.standardErrors}});const n=Il();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}});const f=_s();Object.defineProperty(e,"getErrorCode",{enumerable:!0,get:function(){return f.getErrorCode}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return f.getMessageFromCode}})})(hn)),hn}var se={},Ks;function lr(){if(Ks)return se;Ks=1,Object.defineProperty(se,"__esModule",{value:!0}),se.ProviderType=se.RegExpString=se.IntNumber=se.BigIntString=se.AddressString=se.HexString=se.OpaqueType=void 0;function e(){return n=>n}se.OpaqueType=e,se.HexString=e(),se.AddressString=e(),se.BigIntString=e();function t(n){return Math.floor(n)}se.IntNumber=t,se.RegExpString=e();var r;return(function(n){n.CoinbaseWallet="CoinbaseWallet",n.MetaMask="MetaMask",n.Unselected=""})(r||(se.ProviderType=r={})),se}var Qs;function Ce(){if(Qs)return j;Qs=1;var e=j&&j.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(j,"__esModule",{value:!0}),j.isMobileWeb=j.getLocation=j.isInIFrame=j.createQrUrl=j.getFavicon=j.range=j.isBigNumber=j.ensureParsedJSONObject=j.ensureBN=j.ensureRegExpString=j.ensureIntNumber=j.ensureBuffer=j.ensureAddressString=j.ensureEvenLengthHexString=j.ensureHexString=j.isHexString=j.prepend0x=j.strip0x=j.has0xPrefix=j.hexStringFromIntNumber=j.intNumberFromHexString=j.bigIntStringFromBN=j.hexStringFromBuffer=j.hexStringToUint8Array=j.uint8ArrayToHex=j.randomBytesHex=void 0;const t=e(or()),r=ur(),n=lr(),f=/^[0-9]*$/,s=/^[a-f0-9]*$/;function c(I){return l(crypto.getRandomValues(new Uint8Array(I)))}j.randomBytesHex=c;function l(I){return[...I].map(N=>N.toString(16).padStart(2,"0")).join("")}j.uint8ArrayToHex=l;function u(I){return new Uint8Array(I.match(/.{1,2}/g).map(N=>parseInt(N,16)))}j.hexStringToUint8Array=u;function h(I,N=!1){const H=I.toString("hex");return(0,n.HexString)(N?`0x${H}`:H)}j.hexStringFromBuffer=h;function y(I){return(0,n.BigIntString)(I.toString(10))}j.bigIntStringFromBN=y;function a(I){return(0,n.IntNumber)(new t.default(b(I,!1),16).toNumber())}j.intNumberFromHexString=a;function d(I){return(0,n.HexString)(`0x${new t.default(I).toString(16)}`)}j.hexStringFromIntNumber=d;function o(I){return I.startsWith("0x")||I.startsWith("0X")}j.has0xPrefix=o;function p(I){return o(I)?I.slice(2):I}j.strip0x=p;
1function v(I){return o(I)?`0x${I.slice(2)}`:`0x${I}`}j.prepend0x=v;function g(I){if(typeof I!="string")return!1;const N=p(I).toLowerCase();return s.test(N)}j.isHexString=g;function i(I,N=!1){if(typeof I=="string"){const H=p(I).toLowerCase();if(s.test(H))return(0,n.HexString)(N?`0x${H}`:H)}throw r.standardErrors.rpc.invalidParams(`"${String(I)}" is not a hexadecimal string`)}j.ensureHexString=i;function b(I,N=!1){let H=i(I,!1);return H.length%2===1&&(H=(0,n.HexString)(`0${H}`)),N?(0,n.HexString)(`0x${H}`):H}j.ensureEvenLengthHexString=b;function m(I){if(typeof I=="string"){const N=p(I).toLowerCase();if(g(N)&&N.length===40)return(0,n.AddressString)(v(N))}throw r.standardErrors.rpc.invalidParams(`Invalid Ethereum address: ${String(I)}`)}j.ensureAddressString=m;function _(I){if(Buffer.isBuffer(I))return I;if(typeof I=="string"){if(g(I)){const N=b(I,!1);return Buffer.from(N,"hex")}return Buffer.from(I,"utf8")}throw r.standardErrors.rpc.invalidParams(`Not binary data: ${String(I)}`)}j.ensureBuffer=_;function S(I){if(typeof I=="number"&&Number.isInteger(I))return(0,n.IntNumber)(I);if(typeof I=="string"){if(f.test(I))return(0,n.IntNumber)(Number(I));if(g(I))return(0,n.IntNumber)(new t.default(b(I,!1),16).toNumber())}throw r.standardErrors.rpc.invalidParams(`Not an integer: ${String(I)}`)}j.ensureIntNumber=S;
1function k(I){if(I instanceof RegExp)return(0,n.RegExpString)(I.toString());throw r.standardErrors.rpc.invalidParams(`Not a RegExp: ${String(I)}`)}j.ensureRegExpString=k;function R(I){if(I!==null&&(t.default.isBN(I)||T(I)))return new t.default(I.toString(10),10);if(typeof I=="number")return new t.default(S(I));if(typeof I=="string"){if(f.test(I))return new t.default(I,10);if(g(I))return new t.default(b(I,!1),16)}throw r.standardErrors.rpc.invalidParams(`Not an integer: ${String(I)}`)}j.ensureBN=R;function M(I){if(typeof I=="string")return JSON.parse(I);if(typeof I=="object")return I;throw r.standardErrors.rpc.invalidParams(`Not a JSON string or an object: ${String(I)}`)}j.ensureParsedJSONObject=M;function T(I){if(I==null||typeof I.constructor!="function")return!1;const{constructor:N}=I;return typeof N.config=="function"&&typeof N.EUCLID=="number"}j.isBigNumber=T;function L(I,N){return Array.from({length:N-I},(H,W)=>I+W)}j.range=L;function q(){const I=document.querySelector('link[sizes="192x192"]')||document.querySelector('link[sizes="180x180"]')||document.querySelector('link[rel="icon"]')||document.querySelector('link[rel="shortcut icon"]'),{protocol:N,host:H}=document.location,W=I?I.getAttribute("href"):null;return!W||W.startsWith("javascript:")||W.startsWith("vbscript:")?null:W.startsWith("http://")||W.startsWith("https://")||W.startsWith("data:")?W:W.startsWith("//")?N+W:`${N}//${H}${W}`}j.getFavicon=q;function F(I,N,H,W,X,ae){const te=W?"parent-id":"id",Y=new URLSearchParams({[te]:I,secret:N,server:H,v:X,chainId:ae.toString()}).toString();return`${H}/#/link?${Y}`}j.createQrUrl=F;function z(){try{return window.frameElement!==null}catch{return!1}}j.isInIFrame=z;function V(){try{return z()&&window.top?window.top.location:window.location}catch{return window.location}}j.getLocation=V;function $(){var I;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test((I=window==null?void 0:window.navigator)===null||I===void 0?void 0:I.userAgent)}return j.isMobileWeb=$,j}var dt={},Ys;function Ml(){if(Ys)return dt;
1Ys=1,Object.defineProperty(dt,"__esModule",{value:!0}),dt.ScopedLocalStorage=void 0;let e=class{constructor(r){this.scope=r}setItem(r,n){localStorage.setItem(this.scopedKey(r),n)}getItem(r){return localStorage.getItem(this.scopedKey(r))}removeItem(r){localStorage.removeItem(this.scopedKey(r))}clear(){const r=this.scopedKey(""),n=[];for(let f=0;f<localStorage.length;f++){const s=localStorage.key(f);typeof s=="string"&&s.startsWith(r)&&n.push(s)}n.forEach(f=>localStorage.removeItem(f))}scopedKey(r){return`${this.scope}:${r}`}};return dt.ScopedLocalStorage=e,dt}var Te={},ht={},ft={},pt={},Xs;function Ss(){return Xs||(Xs=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.EVENTS=void 0,pt.EVENTS={STARTED_CONNECTING:"walletlink_sdk.started.connecting",CONNECTED_STATE_CHANGE:"walletlink_sdk.connected",DISCONNECTED:"walletlink_sdk.disconnected",METADATA_DESTROYED:"walletlink_sdk_metadata_destroyed",LINKED:"walletlink_sdk.linked",FAILURE:"walletlink_sdk.generic_failure",SESSION_CONFIG_RECEIVED:"walletlink_sdk.session_config_event_received",ETH_ACCOUNTS_STATE:"walletlink_sdk.eth_accounts_state",SESSION_STATE_CHANGE:"walletlink_sdk.session_state_change",UNLINKED_ERROR_STATE:"walletlink_sdk.unlinked_error_state",SKIPPED_CLEARING_SESSION:"walletlink_sdk.skipped_clearing_session",GENERAL_ERROR:"walletlink_sdk.general_error",WEB3_REQUEST:"walletlink_sdk.web3.request",WEB3_REQUEST_PUBLISHED:"walletlink_sdk.web3.request_published",WEB3_RESPONSE:"walletlink_sdk.web3.response",METHOD_NOT_IMPLEMENTED:"walletlink_sdk.method_not_implemented",UNKNOWN_ADDRESS_ENCOUNTERED:"walletlink_sdk.unknown_address_encountered"}),pt}var ge={},eo;function Rs(){if(eo)return ge;eo=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.RelayAbstract=ge.APP_VERSION_KEY=ge.LOCAL_STORAGE_ADDRESSES_KEY=ge.WALLET_USER_NAME_KEY=void 0;const e=ur();ge.WALLET_USER_NAME_KEY="walletUsername",ge.LOCAL_STORAGE_ADDRESSES_KEY="Addresses",ge.APP_VERSION_KEY="AppVersion";let t=class{async makeEthereumJSONRPCRequest(n,f){if(!f)throw new Error("Error: No jsonRpcUrl provided");return window.fetch(f,{method:"POST",body:JSON.stringify(n),mode:"cors",headers:{"Content-Type":"application/json"}}).then(s=>s.json()).then(s=>{if(!s)throw e.standardErrors.rpc.parse({});const c=s,{error:l}=c;if(l)throw(0,e.serializeError)(l,n.method);return c})}};return ge.RelayAbstract=t,ge}var gt={},pn={exports:{}},gn,to;function xl(){if(to)return gn;to=1;var e={}.toString;return gn=Array.isArray||function(t){return e.call(t)=="[object Array]"},gn}var bn,ro;function Ut(){return ro||(ro=1,bn=TypeError),bn}var yn,no;function Su(){return no||(no=1,yn=Object),yn}var vn,io;function Tl(){return io||(io=1,vn=Error),vn}var mn,so;function Pl(){return so||(so=1,mn=EvalError),mn}var _n,oo;function Bl(){return oo||(oo=1,_n=RangeError),_n}var wn,ao;function Nl(){return ao||(ao=1,wn=ReferenceError),wn}var En,co;function Ru(){return co||(co=1,En=SyntaxError),En}var Sn,uo;function Ll(){return uo||(uo=1,Sn=URIError),Sn}var Rn,lo;function Ol(){return lo||(lo=1,Rn=Math.abs),Rn}var kn,ho;function Dl(){return ho||(ho=1,kn=Math.floor),kn}var Cn,fo;function ql(){return fo||(fo=1,Cn=Math.max),Cn}var An,po;function Fl(){return po||(po=1,An=Math.min),An}var In,go;function jl(){return go||(go=1,In=Math.pow),In}var Mn,bo;function Ul(){return bo||(bo=1,Mn=Math.round),Mn}var xn,yo;function Hl(){return yo||(yo=1,xn=Number.isNaN||function(t){return t!==t}),xn}var Tn,vo;function Wl(){if(vo)return Tn;vo=1;var e=Hl();return Tn=function(r){return e(r)||r===0?r:r<0?-1:1},Tn}var Pn,mo;function $l(){return mo||(mo=1,Pn=Object.getOwnPropertyDescriptor),Pn}var Bn,_o;function Ht(){if(_o)return Bn;_o=1;var e=$l();if(e)try{e([],"length")}catch{e=null}return Bn=e,Bn}var Nn,wo;function dr(){if(wo)return Nn;wo=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return Nn=e,Nn}var Ln,Eo;function ku(){return Eo||(Eo=1,Ln=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var f=42;t[r]=f;
vendor: 9,848 bytes, line 1
1for(var s in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var c=Object.getOwnPropertySymbols(t);if(c.length!==1||c[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==f||l.enumerable!==!0)return!1}return!0}),Ln}var On,So;function Vl(){if(So)return On;So=1;var e=typeof Symbol<"u"&&Symbol,t=ku();return On=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},On}var Dn,Ro;function Cu(){return Ro||(Ro=1,Dn=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Dn}var qn,ko;function Au(){if(ko)return qn;ko=1;var e=Su();return qn=e.getPrototypeOf||null,qn}var Fn,Co;function zl(){if(Co)return Fn;Co=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,n="[object Function]",f=function(u,h){for(var y=[],a=0;a<u.length;a+=1)y[a]=u[a];for(var d=0;d<h.length;d+=1)y[d+u.length]=h[d];return y},s=function(u,h){for(var y=[],a=h,d=0;a<u.length;a+=1,d+=1)y[d]=u[a];return y},c=function(l,u){for(var h="",y=0;y<l.length;y+=1)h+=l[y],y+1<l.length&&(h+=u);return h};return Fn=function(u){var h=this;if(typeof h!="function"||t.apply(h)!==n)throw new TypeError(e+h);for(var y=s(arguments,1),a,d=function(){if(this instanceof a){var i=h.apply(this,f(y,arguments));return Object(i)===i?i:this}return h.apply(u,f(y,arguments))},o=r(0,h.length-y.length),p=[],v=0;v<o;v++)p[v]="$"+v;if(a=Function("binder","return function ("+c(p,",")+"){ return binder.apply(this,arguments); }")(d),h.prototype){var g=function(){};g.prototype=h.prototype,a.prototype=new g,g.prototype=null}return a},Fn}var jn,Ao;function Wt(){if(Ao)return jn;Ao=1;var e=zl();return jn=Function.prototype.bind||e,jn}var Un,Io;function ks(){return Io||(Io=1,Un=Function.prototype.call),Un}var Hn,Mo;function Cs(){return Mo||(Mo=1,Hn=Function.prototype.apply),Hn}var Wn,xo;function Jl(){return xo||(xo=1,Wn=typeof Reflect<"u"&&Reflect&&Reflect.apply),Wn}var $n,To;function Iu(){if(To)return $n;To=1;var e=Wt(),t=Cs(),r=ks(),n=Jl();return $n=n||e.call(r,t),$n}var Vn,Po;function As(){if(Po)return Vn;Po=1;var e=Wt(),t=Ut(),r=ks(),n=Iu();return Vn=function(s){if(s.length<1||typeof s[0]!="function")throw new t("a function is required");return n(e,r,s)},Vn}var zn,Bo;function Gl(){if(Bo)return zn;Bo=1;var e=As(),t=Ht(),r;try{r=[].__proto__===Array.prototype}catch(c){if(!c||typeof c!="object"||!("code"in c)||c.code!=="ERR_PROTO_ACCESS")throw c}var n=!!r&&t&&t(Object.prototype,"__proto__"),f=Object,s=f.getPrototypeOf;return zn=n&&typeof n.get=="function"?e([n.get]):typeof s=="function"?function(l){return s(l==null?l:f(l))}:!1,zn}var Jn,No;function Mu(){if(No)return Jn;No=1;var e=Cu(),t=Au(),r=Gl();return Jn=e?function(f){return e(f)}:t?function(f){if(!f||typeof f!="object"&&typeof f!="function")throw new TypeError("getProto: not an object");return t(f)}:r?function(f){return r(f)}:null,Jn}var Gn,Lo;function Zl(){if(Lo)return Gn;Lo=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=Wt();return Gn=r.call(e,t),Gn}var Zn,Oo;function xu(){if(Oo)return Zn;Oo=1;var e,t=Su(),r=Tl(),n=Pl(),f=Bl(),s=Nl(),c=Ru(),l=Ut(),u=Ll(),h=Ol(),y=Dl(),a=ql(),d=Fl(),o=jl(),p=Ul(),v=Wl(),g=Function,i=function(O){try{return g('"use strict"; return ('+O+").constructor;")()}catch{}},b=Ht(),m=dr(),_=function(){throw new l},S=b?(function(){try{return arguments.callee,_}catch{try{return b(arguments,"callee").get}catch{return _}}})():_,k=Vl()(),R=Mu(),M=Au(),T=Cu(),L=Cs(),q=ks(),F={},z=typeof Uint8Array>"u"||!R?e:R(Uint8Array),V={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":k&&R?R([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":F,"%AsyncGenerator%":F,"%AsyncGeneratorFunction%":F,"%AsyncIteratorPrototype%":F,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":F,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&R?R(R([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!k||!R?e:R(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":f,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!k||!R?e:R(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&R?R(""[Symbol.iterator]()):e,"%Symbol%":k?Symbol:e,"%SyntaxError%":c,"%ThrowTypeError%":S,"%TypedArray%":z,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":q,"%Function.prototype.apply%":L,"%Object.defineProperty%":m,"%Object.getPrototypeOf%":M,"%Math.abs%":h,"%Math.floor%":y,"%Math.max%":a,"%Math.min%":d,"%Math.pow%":o,"%Math.round%":p,"%Math.sign%":v,"%Reflect.getPrototypeOf%":T};if(R)try{null.error}catch(O){var $=R(R(O));V["%Error.prototype%"]=$}var I=function O(D){var w;if(D==="%AsyncFunction%")w=i("async function () {}");else if(D==="%GeneratorFunction%")w=i("function* () {}");else if(D==="%AsyncGeneratorFunction%")w=i("async function* () {}");else if(D==="%AsyncGenerator%"){var E=O("%AsyncGeneratorFunction%");E&&(w=E.prototype)}else if(D==="%AsyncIteratorPrototype%"){var x=O("%AsyncGenerator%");x&&R&&(w=R(x.prototype))}return V[D]=w,w},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},H=Wt(),W=Zl(),X=H.call(q,Array.prototype.concat),ae=H.call(L,Array.prototype.splice),te=H.call(q,String.prototype.replace),Y=H.call(q,String.prototype.slice),re=H.call(q,RegExp.prototype.exec),Q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,C=function(D){var w=Y(D,0,1),E=Y(
1D,-1);if(w==="%"&&E!=="%")throw new c("invalid intrinsic syntax, expected closing `%`");if(E==="%"&&w!=="%")throw new c("invalid intrinsic syntax, expected opening `%`");var x=[];return te(D,Q,function(B,G,U,J){x[x.length]=U?te(J,A,"$1"):G||B}),x},P=function(D,w){var E=D,x;if(W(N,E)&&(x=N[E],E="%"+x[0]+"%"),W(V,E)){var B=V[E];if(B===F&&(B=I(E)),typeof B>"u"&&!w)throw new l("intrinsic "+D+" exists, but is not available. Please file an issue!");return{alias:x,name:E,value:B}}throw new c("intrinsic "+D+" does not exist!")};return Zn=function(D,w){if(typeof D!="string"||D.length===0)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof w!="boolean")throw new l('"allowMissing" argument must be a boolean');if(re(/^%?[^%]*%?$/,D)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var E=C(D),x=E.length>0?E[0]:"",B=P("%"+x+"%",w),G=B.name,U=B.value,J=!1,oe=B.alias;oe&&(x=oe[0],ae(E,X([0,1],oe)));for(var ce=1,ue=!0;ce<E.length;ce+=1){var K=E[ce],ne=Y(K,0,1),le=Y(K,-1);if((ne==='"'||ne==="'"||ne==="`"||le==='"'||le==="'"||le==="`")&&ne!==le)throw new c("property names with quotes must have matching quotes");if((K==="constructor"||!ue)&&(J=!0),x+="."+K,G="%"+x+"%",W(V,G))U=V[G];else if(U!=null){if(!(K in U)){if(!w)throw new l("base intrinsic for "+D+" exists, but the property is not available.");return}if(b&&ce+1>=E.length){var fe=b(U,K);ue=!!fe,ue&&"get"in fe&&!("originalValue"in fe.get)?U=fe.get:U=U[K]}else ue=W(U,K),U=U[K];ue&&!J&&(V[G]=U)}}return U},Zn}var Kn,Do;function Tu(){if(Do)return Kn;Do=1;var e=xu(),t=As(),r=t([e("%String.prototype.indexOf%")]);return Kn=function(f,s){var c=e(f,!!s);return typeof c=="function"&&r(f,".prototype.")>-1?t([c]):c},Kn}var Qn,qo;function Kl(){if(qo)return Qn;qo=1;var e=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,r,n;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{r=Object.defineProperty({},"length",{get:function(){throw n}}),n={},t(function(){throw 42},null,r)}catch(b){b!==n&&(t=null)}else t=null;var f=/^\s*class\b/,s=function(m){try{var _=e.call(m);return f.test(_)}catch{return!1}},c=function(m){try{return s(m)?!1:(e.call(m),!0)}catch{return!1}},l=Object.prototype.toString,u="[object Object]",h="[object Function]",y="[object GeneratorFunction]",a="[object HTMLAllCollection]",d="[object HTML document.all class]",o="[object HTMLCollection]",p=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),g=function(){return!1};if(typeof document=="object"){var i=document.all;l.call(i)===l.call(document.all)&&(g=function(m){if((v||!m)&&(typeof m>"u"||typeof m=="object"))try{var _=l.call(m);return(_===a||_===d||_===o||_===u)&&m("")==null}catch{}return!1})}return Qn=t?function(m){if(g(m))return!0;if(!m||typeof m!="function"&&typeof m!="object")return!1;try{t(m,null,r)}catch(_){if(_!==n)return!1}return!s(m)&&c(m)}:function(m){if(g(m))return!0;if(!m||typeof m!="function"&&typeof m!="object")return!1;if(p)return c(m);if(s(m))return!1;var _=l.call(m);return _!==h&&_!==y&&!/^\[object HTML/.test(_)?!1:c(m)},Qn}var Yn,Fo;function Ql(){if(Fo)return Yn;Fo=1;var e=Kl(),t=Object.prototype.toString,r=Object.prototype.hasOwnProperty,n=function(u,h,y){for(var a=0,d=u.length;a<d;a++)r.call(u,a)&&(y==null?h(u[a],a,u):h.call(y,u[a],a,u))},f=function(u,h,y){for(var a=0,d=u.length;a<d;a++)y==null?h(u.charAt(a),a,u):h.call(y,u.charAt(a),a,u)},s=function(u,h,y){for(var a in u)r.call(u,a)&&(y==null?h(u[a],a,u):h.call(y,u[a],a,u))};function c(l){return t.call(l)==="[object Array]"}return Yn=function(u,h,y){if(!e(h))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=y),c(u)?n(u,h,a):typeof u=="string"?f(u,h,a):s(u,h,a)},Yn}var Xn,jo;function Yl(){return jo||(jo=1,Xn=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Xn}var ei,Uo;function Xl(){if(Uo)return ei;Uo=1;var e=Yl(),t=globalThis;return ei=function(){for(var n=[],f=0;f<e.length;f++)typeof t[e[f]]=="function"&&(n[n.length]=e[f]);return n},ei}var ti={exports:{}},ri,Ho;function ed(){if(Ho)return ri;Ho=1;
1var e=dr(),t=Ru(),r=Ut(),n=Ht();return ri=function(s,c,l){if(!s||typeof s!="object"&&typeof s!="function")throw new r("`obj` must be an object or a function`");if(typeof c!="string"&&typeof c!="symbol")throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new r("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,y=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,d=!!n&&n(s,c);if(e)e(s,c,{configurable:y===null&&d?d.configurable:!y,enumerable:u===null&&d?d.enumerable:!u,value:l,writable:h===null&&d?d.writable:!h});else if(a||!u&&!h&&!y)s[c]=l;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ri}var ni,Wo;function td(){if(Wo)return ni;Wo=1;var e=dr(),t=function(){return!!e};return t.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},ni=t,ni}var ii,$o;function rd(){if($o)return ii;$o=1;var e=xu(),t=ed(),r=td()(),n=Ht(),f=Ut(),s=e("%Math.floor%");return ii=function(l,u){if(typeof l!="function")throw new f("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||s(u)!==u)throw new f("`length` must be a positive 32-bit integer");var h=arguments.length>2&&!!arguments[2],y=!0,a=!0;if("length"in l&&n){var d=n(l,"length");d&&!d.configurable&&(y=!1),d&&!d.writable&&(a=!1)}return(y||a||!h)&&(r?t(l,"length",u,!0,!0):t(l,"length",u)),l},ii}var si,Vo;function nd(){if(Vo)return si;Vo=1;var e=Wt(),t=Cs(),r=Iu();return si=function(){return r(e,t,arguments)},si}var zo;function id(){return zo||(zo=1,(function(e){var t=rd(),r=dr(),n=As(),f=nd();e.exports=function(c){var l=n(arguments),u=1+c.length-(arguments.length-1);return t(l,u>0?u:0,!0)},r?r(e.exports,"apply",{value:f}):e.exports.apply=f})(ti)),ti.exports}var oi,Jo;
1function sd(){if(Jo)return oi;Jo=1;var e=ku();return oi=function(){return e()&&!!Symbol.toStringTag},oi}var ai,Go;function od(){if(Go)return ai;Go=1;var e=Ql(),t=Xl(),r=id(),n=Tu(),f=Ht(),s=Mu(),c=n("Object.prototype.toString"),l=sd()(),u=globalThis,h=t(),y=n("String.prototype.slice"),a=n("Array.prototype.indexOf",!0)||function(g,i){for(var b=0;b<g.length;b+=1)if(g[b]===i)return b;return-1},d={__proto__:null};l&&f&&s?e(h,function(v){var g=new u[v];if(Symbol.toStringTag in g&&s){var i=s(g),b=f(i,Symbol.toStringTag);if(!b&&i){var m=s(i);b=f(m,Symbol.toStringTag)}if(b&&b.get){var _=r(b.get);d["$"+v]=_}}}):e(h,function(v){var g=new u[v],i=g.slice||g.set;if(i){var b=r(i);d["$"+v]=b}});var o=function(g){var i=!1;return e(d,function(b,m){if(!i)try{"$"+b(g)===m&&(i=y(m,1))}catch{}}),i},p=function(g){var i=!1;return e(d,function(b,m){if(!i)try{b(g),i=y(m,1)}catch{}}),i};return ai=function(g){if(!g||typeof g!="object")return!1;if(!l){var i=y(c(g),8,-1);return a(h,i)>-1?i:i!=="Object"?!1:p(g)}return f?o(g):null},ai}var ci,Zo;function ad(){if(Zo)return ci;Zo=1;var e=od();return ci=function(r){return!!e(r)},ci}var ui,Ko;function cd(){if(Ko)return ui;Ko=1;var e=Ut(),t=Tu(),r=t("TypedArray.prototype.buffer",!0),n=ad();return ui=r||function(s){if(!n(s))throw new e("Not a Typed Array");return s.buffer},ui}var li,Qo;function ud(){if(Qo)return li;Qo=1;var e=ke().Buffer,t=xl(),r=cd(),n=ArrayBuffer.isView||function(u){try{return r(u),!0}catch{return!1}},f=typeof Uint8Array<"u",s=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",c=s&&(e.prototype instanceof Uint8Array||e.TYPED_ARRAY_SUPPORT);return li=function(u,h){if(e.isBuffer(u))return u.constructor&&!("isBuffer"in u)?e.from(u):u;if(typeof u=="string")return e.from(u,h);if(s&&n(u)){if(u.byteLength===0)return e.alloc(0);if(c){var y=e.from(u.buffer,u.byteOffset,u.byteLength);if(y.byteLength===u.byteLength)return y}var a=u instanceof Uint8Array?u:new Uint8Array(u.buffer,u.byteOffset,u.byteLength),d=e.from(a);if(d.length===u.byteLength)return d}if(f&&u instanceof Uint8Array)return e.from(u);var o=t(u);if(o)for(var p=0;p<u.length;p+=1){var v=u[p];if(typeof v!="number"||v<0||v>255||~~v!==v)throw new RangeError("Array items must be numbers in the range 0-255.")}if(o||e.isBuffer(u)&&u.constructor&&typeof u.constructor.isBuffer=="function"&&u.constructor.isBuffer(u))return e.from(u);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')},li}var di,Yo;function tt(){if(Yo)return di;Yo=1;var e=ke().Buffer,t=ud();function r(n,f){this._block=e.alloc(n),this._finalSize=f,this._blockSize=n,this._len=0}return r.prototype.update=function(n,f){n=t(n,f||"utf8");for(var s=this._block,c=this._blockSize,l=n.length,u=this._len,h=0;h<l;){for(var y=u%c,a=Math.min(l-h,c-y),d=0;d<a;d++)s[y+d]=n[h+d];u+=a,h+=a,u%c===0&&this._update(s)}return this._len+=l,this},r.prototype.digest=function(n){var f=this._len%this._blockSize;this._block[f]=128,this._block.fill(0,f+1),f>=this._finalSize&&(this._update(this._block),this._block.fill(0));var s=this._len*8;if(s<=4294967295)this._block.writeUInt32BE(s,this._blockSize-4);else{var c=(s&4294967295)>>>0,l=(s-c)/4294967296;this._block.writeUInt32BE(l,this._blockSize-8),this._block.writeUInt32BE(c,this._blockSize-4)}this._update(this._block);var u=this._hash();return n?u.toString(n):u},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},di=r,di}var hi,Xo;function ld(){if(Xo)return hi;Xo=1;var e=_e(),t=tt(),r=ke().Buffer,n=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);function s(){this.init(),this._w=f,t.call(this,64,56)}e(s,t),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function c(h){return h<<5|h>>>27}function l(h){return h<<30|h>>>2}function u(h,y,a,d){return h===0?y&a|~y&d:h===2?y&a|y&d|a&d:y^a^d}return s.prototype._update=function(h){for(var y=this._w,a=this._a|0,d=this._b|0,o=this._c|0,p=this._d|0,v=this._e|0,g=0;g<16;++g)y[g]=h.readInt32BE(g*4);for(;g<80;++g)y[g]=y[g-3]^y[g-8]^y[g-14]^y[g-16];for(var i=0;i<80;++i){var b=~~(i/20),m=c(a)+u(b,d,o,p)+v+y[i]+n[b]|0;v=p,p=o,o=l(d),d=a,a=m}this._a=a+this._a|0,this._b=d+this._b|0,this._c=o+this._c|0,this._d=p+this._d|0,this._e=v+this._e|0},s.prototype._hash=function(){var h=r.allocUnsafe(20);return h.writeInt32BE(this._a|0,0),h.writeInt32BE(this._b|0,4),h.writeInt32BE(this._c|0,8),h.writeInt32BE(this._d|0,12),h.writeInt32BE(this._e|0,16),h},hi=s,hi}var fi,ea;function dd(){if(ea)return fi;ea=1;var e=_e(),t=tt(),r=ke().Buffer,n=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);function s(){this.init(),this._w=f,t.call(this,64,56)}e(s,t),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function c(y){return y<<1|y>>>31}function l(y){return y<<5|y>>>27}function u(y){return y<<30|y>>>2}function h(y,a,d,o){return y===0?a&d|~a&o:y===2?a&d|a&o|d&o:a^d^o}return s.prototype._update=function(y){for(var a=this._w,d=this._a|0,o=this._b|0,p=this._c|0,v=this._d|0,g=this._e|0,i=0;i<16;++i)a[i]=y.readInt32BE(i*4);for(;i<80;++i)a[i]=c(a[i-3]^a[i-8]^a[i-14]^a[i-16]);for(var b=0;b<80;++b){var m=~~(b/20),_=l(d)+h(m,o,p,v)+g+a[b]+n[m]|0;g=v,v=p,p=u(o),o=d,d=_}this._a=d+this._a|0,this._b=o+this._b|0,this._c=p+this._c|0,this._d=v+this._d|0,this._e=g+this._e|0},s.prototype._hash=function(){var y=r.allocUnsafe(20);return y.writeInt32BE(this._a|0,0),y.writeInt32BE(this._b|0,4),y.writeInt32BE(this._c|0,8),y.writeInt32BE(this._d|0,12),y.writeInt32BE(this._e|0,16),y},fi=s,fi}var pi,ta;function Pu(){if(ta)return pi;ta=1;var e=_e(),t=tt(),r=ke().Buffer,n=[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,2756
1734187,3204031479,3329325298],f=new Array(64);function s(){this.init(),this._w=f,t.call(this,64,56)}e(s,t),s.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function c(d,o,p){return p^d&(o^p)}function l(d,o,p){return d&o|p&(d|o)}function u(d){return(d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10)}function h(d){return(d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7)}function y(d){return(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3}function a(d){return(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10}return s.prototype._update=function(d){for(var o=this._w,p=this._a|0,v=this._b|0,g=this._c|0,i=this._d|0,b=this._e|0,m=this._f|0,_=this._g|0,S=this._h|0,k=0;k<16;++k)o[k]=d.readInt32BE(k*4);for(;k<64;++k)o[k]=a(o[k-2])+o[k-7]+y(o[k-15])+o[k-16]|0;for(var R=0;R<64;++R){var M=S+h(b)+c(b,m,_)+n[R]+o[R]|0,T=u(p)+l(p,v,g)|0;S=_,_=m,m=b,b=i+M|0,i=g,g=v,v=p,p=M+T|0}this._a=p+this._a|0,this._b=v+this._b|0,this._c=g+this._c|0,this._d=i+this._d|0,this._e=b+this._e|0,this._f=m+this._f|0,this._g=_+this._g|0,this._h=S+this._h|0},s.prototype._hash=function(){var d=r.allocUnsafe(32);return d.writeInt32BE(this._a,0),d.writeInt32BE(this._b,4),d.writeInt32BE(this._c,8),d.writeInt32BE(this._d,12),d.writeInt32BE(this._e,16),d.writeInt32BE(this._f,20),d.writeInt32BE(this._g,24),d.writeInt32BE(this._h,28),d},pi=s,pi}var gi,ra;function hd(){if(ra)return gi;ra=1;var e=_e(),t=Pu(),r=tt(),n=ke().Buffer,f=new Array(64);function s(){this.init(),this._w=f,r.call(this,64,56)}return e(s,t),s.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},s.prototype._hash=function(){var c=n.allocUnsafe(28);return c.writeInt32BE(this._a,0),c.writeInt32BE(this._b,4),c.writeInt32BE(this._c,8),c.writeInt32BE(this._d,12),c.writeInt32BE(this._e,16),c.writeInt32BE(this._f,20),c.writeInt32BE(this._g,24),c},gi=s,gi}var bi,na;function Bu(){if(na)return bi;na=1;var e=_e(),t=tt(),r=ke().Buffer,n=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,
11126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],f=new Array(160);function s(){this.init(),this._w=f,t.call(this,128,112)}e(s,t),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function c(v,g,i){return i^v&(g^i)}function l(v,g,i){return v&g|i&(v|g)}function u(v,g){return(v>>>28|g<<4)^(g>>>2|v<<30)^(g>>>7|v<<25)}function h(v,g){return(v>>>14|g<<18)^(v>>>18|g<<14)^(g>>>9|v<<23)}function y(v,g){return(v>>>1|g<<31)^(v>>>8|g<<24)^v>>>7}function a(v,g){return(v>>>1|g<<31)^(v>>>8|g<<24)^(v>>>7|g<<25)}function d(v,g){return(v>>>19|g<<13)^(g>>>29|v<<3)^v>>>6}function o(v,g){return(v>>>19|g<<13)^(g>>>29|v<<3)^(v>>>6|g<<26)}function p(v,g){return v>>>0<g>>>0?1:0}return s.prototype._update=function(v){for(var g=this._w,i=this._ah|0,b=this._bh|0,m=this._ch|0,_=this._dh|0,S=this._eh|0,k=this._fh|0,R=this._gh|0,M=this._hh|0,T=this._al|0,L=this._bl|0,q=this._cl|0,F=this._dl|0,z=this._el|0,V=this._fl|0,$=this._gl|0,I=this._hl|0,N=0;N<32;N+=2)g[N]=v.readInt32BE(N*4),g[N+1]=v.readInt32BE(N*4+4);for(;N<160;N+=2){var H=g[N-30],W=g[N-30+1],X=y(H,W),ae=a(W,H);H=g[N-4],W=g[N-4+1];var te=d(H,W),Y=o(W,H),re=g[N-14],Q=g[N-14+1],A=g[N-32],C=g[N-32+1],P=ae+Q|0,O=X+re+p(P,ae)|0;P=P+Y|0,O=O+te+p(P,Y)|0,P=P+C|0,O=O+A+p(P,C)|0,g[N]=O,g[N+1]=P}for(var D=0;D<160;D+=2){O=g[D],P=g[D+1];var w=l(i,b,m),E=l(T,L,q),x=u(i,T),B=u(T,i),G=h(S,z),U=h(z,S),J=n[D],oe=n[D+1],ce=c(S,k,R),ue=c(z,V,$),K=I+U|0,ne=M+G+p(K,I)|0;K=K+ue|0,ne=ne+ce+p(K,ue)|0,K=K+oe|0,ne=ne+J+p(K,oe)|0,K=K+P|0,ne=ne+O+p(K,P)|0;var le=B+E|0,fe=x+w+p(le,B)|0;M=R,I=$,R=k,$=V,k=S,V=z,z=F+K|0,S=_+ne+p(z,F)|0,_=m,F=q,m=b,q=L,b=i,L=T,T=K+le|0,i=ne+fe+p(T,K)|0}this._al=this._al+T|0,this._bl=this._bl+L|0,this._cl=this._cl+q|0,this._dl=this._dl+F|0,this._el=this._el+z|0,this._fl=this._fl+V|0,this._gl=this._gl+$|0,this._hl=this._hl+I|0,this._ah=this._ah+i+p(this._al,T)|0,this._bh=this._bh+b+p(this._bl,L)|0,this._ch=this._ch+m+p(this._cl,q)|0,this._dh=this._dh+_+p(this._dl,F)|0,this._eh=this._eh+S+p(this._el,z)|0,this._fh=this._fh+k+p(this._fl,V)|0,this._gh=this._gh+R+p(this._gl,$)|0,this._hh=this._hh+M+p(this._hl,I)|0},s.prototype._hash=function(){var v=r.allocUnsafe(64);function g(i,b,m){v.writeInt32BE(i,m),v.writeInt32BE(b,m+4)}return g(this._ah,this._al,0),g(this._bh,this._bl,8),g(this._ch,this._cl,16),g(this._dh,this._dl,24),g(this._eh,this._el,32),g(this._fh,this._fl,40),g(this._gh,this._gl,48),g(this._hh,this._hl,56),v},bi=s,bi}var yi,ia;function fd(){if(ia)return yi;ia=1;var e=_e(),t=Bu(),r=tt(),n=ke().Buffer,f=new Array(160);function s(){this.init(),this._w=f,r.call(this,128,112)}return e(s,t),s.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},s.prototype._hash=function(){var c=n.allocUnsafe(48);function l(u,h,y){c.writeInt32BE(u,y),c.writeInt32BE(h,y+4)}return l(this._ah,this._al,0),l(this._bh,this._bl,8),l(this._ch,this._cl,16),l(this._dh,this._dl,24),l(this._eh,this._el,32),l(this._fh,this._fl,40),c},yi=s,yi}var sa;function pd(){return sa||(sa=1,(function(e){e.exports=function(r){var n=r.toLowerCase(),f=e.exports[n];if(!f)throw new Error(n+" is not supported (we accept pull requests)");return new f},e.exports.sha=ld(),e.exports.sha1=dd(),e.exports.sha224=hd(),e.exports.sha256=Pu(),e.exports.sha384=fd(),e.exports.sha512=Bu()})(pn)),pn.exports}var oa;function Is(){if(oa)return gt;oa=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.Session=void 0;const e=pd(),t=Ce(),r="session:id",n="session:secret",f="session:linked";let s=class Nu{constructor(l,u,h,y){this._storage=l,this._id=u||(0,t.randomBytesHex)(16),this._secret=h||(0,t.randomBytesHex)(32),this._key=new e.sha256().update(`${this._id}, ${this._secret} WalletLink`).digest("hex"),this._linked=!!y}static load(l){const u=l.getItem(r),h=l.getItem(f),y=l.getItem(n);return u&&y?new Nu(l,u,y,h==="1"):null}static hash(l){return new e.sha256().update(l).digest("hex")}get id(){return this._id}get secret(){return this._secret}get key(){return this._key}get linked(){return this._linked}set linked(l){this._linked=l,this.persistLinked()}save(){return this._storage.setItem(r,this._id),this._storage.setItem(n,this._secret),this.persistLinked(),this}persistLinked(){this._storage.setItem(f,this._linked?"1":"0")}};return gt.Session=s,gt}var bt={},yt={},aa;function gd(){if(aa)return yt;
1aa=1,Object.defineProperty(yt,"__esModule",{value:!0}),yt.Cipher=void 0;const e=Ce();let t=class{constructor(n){this.secret=n}async encrypt(n){const f=this.secret;if(f.length!==64)throw Error("secret must be 256 bits");const s=crypto.getRandomValues(new Uint8Array(12)),c=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(f),{name:"aes-gcm"},!1,["encrypt","decrypt"]),l=new TextEncoder,u=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:s},c,l.encode(n)),h=16,y=u.slice(u.byteLength-h),a=u.slice(0,u.byteLength-h),d=new Uint8Array(y),o=new Uint8Array(a),p=new Uint8Array([...s,...d,...o]);return(0,e.uint8ArrayToHex)(p)}async decrypt(n){const f=this.secret;if(f.length!==64)throw Error("secret must be 256 bits");return new Promise((s,c)=>{(async function(){const l=await crypto.subtle.importKey("raw",(0,e.hexStringToUint8Array)(f),{name:"aes-gcm"},!1,["encrypt","decrypt"]),u=(0,e.hexStringToUint8Array)(n),h=u.slice(0,12),y=u.slice(12,28),a=u.slice(28),d=new Uint8Array([...a,...y]),o={name:"AES-GCM",iv:new Uint8Array(h)};try{const p=await window.crypto.subtle.decrypt(o,l,d),v=new TextDecoder;s(v.decode(p))}catch(p){c(p)}})()})}};return yt.Cipher=t,yt}var vt={},ca;function bd(){if(ca)return vt;ca=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.WalletLinkHTTP=void 0;let e=class{constructor(r,n,f){this.linkAPIUrl=r,this.sessionId=n;const s=`${n}:${f}`;this.auth=`Basic ${btoa(s)}`}async markUnseenEventsAsSeen(r){return Promise.all(r.map(n=>fetch(`${this.linkAPIUrl}/events/${n.eventId}/seen`,{method:"POST",headers:{Authorization:this.auth}}))).catch(n=>console.error("Unabled to mark event as failed:",n))}async fetchUnseenEvents(){var r;const n=await fetch(`${this.linkAPIUrl}/events?unseen=true`,{headers:{Authorization:this.auth}});if(n.ok){const{events:f,error:s}=await n.json();if(s)throw new Error(`Check unseen events failed: ${s}`);const c=(r=f==null?void 0:f.filter(l=>l.event==="Web3Response").map(l=>({type:"Event",sessionId:this.sessionId,eventId:l.id,event:l.event,data:l.data})))!==null&&r!==void 0?r:[];return this.markUnseenEventsAsSeen(c),c}throw new Error(`Check unseen events failed: ${n.status}`)}};return vt.WalletLinkHTTP=e,vt}var Pe={},ua;function yd(){if(ua)return Pe;ua=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.WalletLinkWebSocket=Pe.ConnectionState=void 0;var e;(function(r){r[r.DISCONNECTED=0]="DISCONNECTED",r[r.CONNECTING=1]="CONNECTING",r[r.CONNECTED=2]="CONNECTED"})(e||(Pe.ConnectionState=e={}));let t=class{setConnectionStateListener(n){this.connectionStateListener=n}setIncomingDataListener(n){this.incomingDataListener=n}constructor(n,f=WebSocket){this.WebSocketClass=f,this.webSocket=null,this.pendingData=[],this.url=n.replace(/^http/,"ws")}async connect(){if(this.webSocket)throw new Error("webSocket object is not null");return new Promise((n,f)=>{var s;let c;try{this.webSocket=c=new this.WebSocketClass(this.url)}catch(l){f(l);return}(s=this.connectionStateListener)===null||s===void 0||s.call(this,e.CONNECTING),c.onclose=l=>{var u;this.clearWebSocket(),f(new Error(`websocket error ${l.code}: ${l.reason}`)),(u=this.connectionStateListener)===null||u===void 0||u.call(this,e.DISCONNECTED)},c.onopen=l=>{var u;n(),(u=this.connectionStateListener)===null||u===void 0||u.call(this,e.CONNECTED),this.pendingData.length>0&&([...this.pendingData].forEach(y=>this.sendData(y)),this.pendingData=[])},c.onmessage=l=>{var u,h;if(l.data==="h")(u=this.incomingDataListener)===null||u===void 0||u.call(this,{type:"Heartbeat"});else try{const y=JSON.parse(l.data);(h=this.incomingDataListener)===null||h===void 0||h.call(this,y)}catch{}}})}disconnect(){var n;const{webSocket:f}=this;if(f){this.clearWebSocket(),(n=this.connectionStateListener)===null||n===void 0||n.call(this,e.DISCONNECTED),this.connectionStateListener=void 0,this.incomingDataListener=void 0;try{f.close()}catch{}}}sendData(n){const{webSocket:f}=this;if(!f){this.pendingData.push(n),this.connect();return}f.send(n)}clearWebSocket(){const{webSocket:n}=this;n&&(this.webSocket=null,n.onclose=null,n.onerror=null,n.onmessage=null,n.onopen=null)}};return Pe.WalletLinkWebSocket=t,Pe}var la;function vd(){if(la)return bt;
1la=1,Object.defineProperty(bt,"__esModule",{value:!0}),bt.WalletLinkConnection=void 0;const e=lr(),t=gd(),r=Ss(),n=Rs(),f=Is(),s=bd(),c=yd(),l=1e4,u=6e4;let h=class{constructor({session:a,linkAPIUrl:d,listener:o,diagnostic:p,WebSocketClass:v=WebSocket}){this.destroyed=!1,this.lastHeartbeatResponse=0,this.nextReqId=(0,e.IntNumber)(1),this._connected=!1,this._linked=!1,this.shouldFetchUnseenEventsOnConnect=!1,this.requestResolutions=new Map,this.handleSessionMetadataUpdated=i=>{if(!i)return;new Map([["__destroyed",this.handleDestroyed],["EthereumAddress",this.handleAccountUpdated],["WalletUsername",this.handleWalletUsernameUpdated],["AppVersion",this.handleAppVersionUpdated],["ChainId",m=>i.JsonRpcUrl&&this.handleChainUpdated(m,i.JsonRpcUrl)]]).forEach((m,_)=>{const S=i[_];S!==void 0&&m(S)})},this.handleDestroyed=i=>{var b,m;i==="1"&&((b=this.listener)===null||b===void 0||b.resetAndReload(),(m=this.diagnostic)===null||m===void 0||m.log(r.EVENTS.METADATA_DESTROYED,{alreadyDestroyed:this.isDestroyed,sessionIdHash:f.Session.hash(this.session.id)}))},this.handleAccountUpdated=async i=>{var b,m;try{const _=await this.cipher.decrypt(i);(b=this.listener)===null||b===void 0||b.accountUpdated(_)}catch{(m=this.diagnostic)===null||m===void 0||m.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"selectedAddress"})}},this.handleMetadataUpdated=async(i,b)=>{var m,_;try{const S=await this.cipher.decrypt(b);(m=this.listener)===null||m===void 0||m.metadataUpdated(i,S)}catch{(_=this.diagnostic)===null||_===void 0||_.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:i})}},this.handleWalletUsernameUpdated=async i=>{this.handleMetadataUpdated(n.WALLET_USER_NAME_KEY,i)},this.handleAppVersionUpdated=async i=>{this.handleMetadataUpdated(n.APP_VERSION_KEY,i)},this.handleChainUpdated=async(i,b)=>{var m,_;try{const S=await this.cipher.decrypt(i),k=await this.cipher.decrypt(b);(m=this.listener)===null||m===void 0||m.chainUpdated(S,k)}catch{(_=this.diagnostic)===null||_===void 0||_.log(r.EVENTS.GENERAL_ERROR,{message:"Had error decrypting",value:"chainId|jsonRpcUrl"})}},this.session=a,this.cipher=new t.Cipher(a.secret),this.diagnostic=p,this.listener=o;const g=new c.WalletLinkWebSocket(`${d}/rpc`,v);g.setConnectionStateListener(async i=>{var b;(b=this.diagnostic)===null||b===void 0||b.log(r.EVENTS.CONNECTED_STATE_CHANGE,{state:i,sessionIdHash:f.Session.hash(a.id)});let m=!1;switch(i){case c.ConnectionState.DISCONNECTED:if(!this.destroyed){const _=async()=>{await new Promise(S=>setTimeout(S,5e3)),this.destroyed||g.connect().catch(()=>{_()})};_()}break;case c.ConnectionState.CONNECTED:try{await this.authenticate(),this.sendIsLinked(),this.sendGetSessionConfig(),m=!0}catch{}this.updateLastHeartbeat(),setInterval(()=>{this.heartbeat()},l),this.shouldFetchUnseenEventsOnConnect&&this.fetchUnseenEventsAPI();break;case c.ConnectionState.CONNECTING:break}this.connected!==m&&(this.connected=m)}),g.setIncomingDataListener(i=>{var b,m,_;switch(i.type){case"Heartbeat":this.updateLastHeartbeat();return;case"IsLinkedOK":case"Linked":{const S=i.type==="IsLinkedOK"?i.linked:void 0;(b=this.diagnostic)===null||b===void 0||b.log(r.EVENTS.LINKED,{sessionIdHash:f.Session.hash(a.id),linked:S,type:i.type,onlineGuests:i.onlineGuests}),this.linked=S||i.onlineGuests>0;break}case"GetSessionConfigOK":case"SessionConfigUpdated":{(m=this.diagnostic)===null||m===void 0||m.log(r.EVENTS.SESSION_CONFIG_RECEIVED,{sessionIdHash:f.Session.hash(a.id),metadata_keys:i&&i.metadata?Object.keys(i.metadata):void 0}),this.handleSessionMetadataUpdated(i.metadata);break}case"Event":{this.handleIncomingEvent(i);break}}i.id!==void 0&&((_=this.requestResolutions.get(i.id))===null||_===void 0||_(i))}),this.ws=g,this.http=new s.WalletLinkHTTP(d,a.id,a.key)}connect(){var a;if(this.destroyed)throw new Error("instance is destroyed");(a=this.diagnostic)===null||a===void 0||a.log(r.EVENTS.STARTED_CONNECTING,{sessionIdHash:f.Session.hash(this.session.id)}),this.ws.connect()}destroy(){var a;this.destroyed=!0,this.ws.disconnect(),(a=this.diagnostic)===null||a===void 0||a.log(r.EVENTS.DISCONNECTED,{sessionIdHash:f.Session.hash(this.session.id)}),this.listener=void 0}get isDestroyed(){return this.destroyed}get connected(){return this._connected}set connected(a){var d,o;this._connected=a,a&&((d=this.onceConnected)===null||d===void 0||d.call(this)),(o=this.listener)===null||o===void 0||o.connectedUpdated(a)}setOnceConnected(a){return new Promise(d=>{this.connected?a().then(d):this.onceConnected=()=>{a().then(d),this.onceConnected=void 0}})}get linked(){return this._linked}set linked(a){var d,o;this._linked=a,a&&((d=this.onceLinked)===null||d===void 0||d.call(this)),(o=this.listener)===null||o===void 0||o.linkedUpdated(a)}setOnceLinked(a){return new Promise(d=>{this.linked?a().then(d):this.onceLinked=()=>{a().then(d),this.onceLinked=void 0}})}async handleIncomingEvent(a){var d,o;if(!(a.type!=="Event"||a.event!=="Web3Response"))try{const p=await this.cipher.decrypt(a.data),v=JSON.parse(p);if(v.type!=="WEB3_RESPONSE")return;(d=this.listener)===null||d===void 0||d.handleWeb3ResponseMessage(v)}catch{(o=this.diagnostic)===null||o===void 0||o.log(r.EVENTS.GENERAL_ER
1ROR,{message:"Had error decrypting",value:"incomingEvent"})}}async checkUnseenEvents(){if(!this.connected){this.shouldFetchUnseenEventsOnConnect=!0;return}await new Promise(a=>setTimeout(a,250));try{await this.fetchUnseenEventsAPI()}catch(a){console.error("Unable to check for unseen events",a)}}async fetchUnseenEventsAPI(){this.shouldFetchUnseenEventsOnConnect=!1,(await this.http.fetchUnseenEvents()).forEach(d=>this.handleIncomingEvent(d))}async setSessionMetadata(a,d){const o={type:"SetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,metadata:{[a]:d}};return this.setOnceConnected(async()=>{const p=await this.makeRequest(o);if(p.type==="Fail")throw new Error(p.error||"failed to set session metadata")})}async publishEvent(a,d,o=!1){const p=await this.cipher.encrypt(JSON.stringify(Object.assign(Object.assign({},d),{origin:location.origin,relaySource:window.coinbaseWalletExtension?"injected_sdk":"sdk"}))),v={type:"PublishEvent",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,event:a,data:p,callWebhook:o};return this.setOnceLinked(async()=>{const g=await this.makeRequest(v);if(g.type==="Fail")throw new Error(g.error||"failed to publish event");return g.eventId})}sendData(a){this.ws.sendData(JSON.stringify(a))}updateLastHeartbeat(){this.lastHeartbeatResponse=Date.now()}heartbeat(){if(Date.now()-this.lastHeartbeatResponse>l*2){this.ws.disconnect();return}try{this.ws.sendData("h")}catch{}}async makeRequest(a,d=u){const o=a.id;this.sendData(a);let p;return Promise.race([new Promise((v,g)=>{p=window.setTimeout(()=>{g(new Error(`request ${o} timed out`))},d)}),new Promise(v=>{this.requestResolutions.set(o,g=>{clearTimeout(p),v(g),this.requestResolutions.delete(o)})})])}async authenticate(){const a={type:"HostSession",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id,sessionKey:this.session.key},d=await this.makeRequest(a);if(d.type==="Fail")throw new Error(d.error||"failed to authentcate")}sendIsLinked(){const a={type:"IsLinked",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(a)}sendGetSessionConfig(){const a={type:"GetSessionConfig",id:(0,e.IntNumber)(this.nextReqId++),sessionId:this.session.id};this.sendData(a)}};return bt.WalletLinkConnection=h,bt}var mt={},Be={},Gt={},da;function md(){return da||(da=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.default='@namespace svg "http://www.w3.org/2000/svg";.-cbwsdk-css-reset,.-cbwsdk-css-reset *{animation:none;animation-delay:0;animation-direction:normal;animation-duration:0;animation-fill-mode:none;animation-iteration-count:1;animation-name:none;animation-play-state:running;animation-timing-function:ease;backface-visibility:visible;background:0;background-attachment:scroll;background-clip:border-box;background-color:rgba(0,0,0,0);background-image:none;background-origin:padding-box;background-position:0 0;background-position-x:0;background-position-y:0;background-repeat:repeat;background-size:auto auto;border:0;border-style:none;border-width:medium;border-color:inherit;border-bottom:0;border-bottom-color:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-style:none;border-bottom-width:medium;border-collapse:separate;border-image:none;border-left:0;border-left-color:inherit;border-left-style:none;border-left-width:medium;border-radius:0;border-right:0;border-right-color:inherit;border-right-style:none;border-right-width:medium;border-spacing:0;border-top:0;border-top-color:inherit;border-top-left-radius:0;border-top-right-radius:0;border-top-style:none;border-top-width:medium;box-shadow:none;box-sizing:border-box;caption-side:top;clear:none;clip:auto;color:inherit;columns:auto;column-count:auto;column-fill:balance;column-gap:normal;column-rule:medium none currentColor;column-rule-color:currentColor;column-rule-style:none;column-rule-width:none;column-span:1;column-width:auto;counter-increment:none;counter-reset:none;direction:ltr;empty-cells:show;float:none;font:normal;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;height:auto;hyphens:none;letter-spacing:normal;line-height:normal;list-style:none;list-style-image:none;list-style-position:outside;list-style-type:disc;margin:0;margin-bottom:0;margin-left:0;margin-right:0;margin-top:0;opacity:1;orphans:0;outline:0;outline-color:invert;outline-style:none;outline-width:medium;overflow:visible;overflow-x:visible;overflow-y:visible;padding:0;padding-bottom:0;padding-left:0;padding-right:0;padding-top:0;page-break-after:auto;page-break-before:auto;page-break-inside:auto;perspective:none;perspective-origin:50% 50%;pointer-events:auto;position:static;quotes:"\\201C" "\\201D" "\\2018" "\\2019";tab-size:8;table-layout:auto;text-align:inherit;text-align-last:auto;text-decoration:none;text-decoration-color:inherit;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-shadow:none;text-transform:none;transform:none;transform-style:flat;transition:none;transition-delay:0s;transition-duration:0s;transition-property:none;transition-timing-function:ease;unicode-bidi:normal;vertical-align:baseline;visibility:visible;white-space:normal;widows:0;word-spacing:normal;z-index:auto}.-cbwsdk-css-reset strong{font-weight:bold}.-cbwsdk-css-reset *{box-sizing:border-box;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue",Arial,sans-serif;line-height:1}.-cbwsdk-css-reset [class*=container]{margin:0;padding:0}.-cbwsdk-css-reset style{display:none}'),Gt}var ha;
1function Lu(){if(ha)return Be;ha=1;var e=Be&&Be.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Be,"__esModule",{value:!0}),Be.injectCssReset=void 0;const t=e(md());function r(){const n=document.createElement("style");n.type="text/css",n.appendChild(document.createTextNode(t.default)),document.documentElement.appendChild(n)}return Be.injectCssReset=r,Be}var _t={};const de=jt(El);var Ne={};function Ou(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=Ou(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function fa(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Ou(e))&&(n&&(n+=" "),n+=t);return n}const _d=Object.freeze(Object.defineProperty({__proto__:null,clsx:fa,default:fa},Symbol.toStringTag,{value:"Module"})),$t=jt(_d),hr=jt(Sl);var Se={},wt={},pa;function wd(){if(pa)return wt;pa=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.CloseIcon=void 0;const e=de;function t(r){return(0,e.h)("svg",Object.assign({width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("path",{d:"M13.7677 13L12.3535 14.4142L18.3535 20.4142L12.3535 26.4142L13.7677 27.8284L19.7677 21.8284L25.7677 27.8284L27.1819 26.4142L21.1819 20.4142L27.1819 14.4142L25.7677 13L19.7677 19L13.7677 13Z"}))}return wt.CloseIcon=t,wt}var Et={},ga;function Ed(){if(ga)return Et;ga=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.CoinbaseWalletRound=void 0;const e=de;function t(r){return(0,e.h)("svg",Object.assign({width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("circle",{cx:"14",cy:"14",r:"14",fill:"#0052FF"}),(0,e.h)("path",{d:"M23.8521 14.0003C23.8521 19.455 19.455 23.8521 14.0003 23.8521C8.54559 23.8521 4.14844 19.455 4.14844 14.0003C4.14844 8.54559 8.54559 4.14844 14.0003 4.14844C19.455 4.14844 23.8521 8.54559 23.8521 14.0003Z",fill:"white"}),(0,e.h)("path",{d:"M11.1855 12.5042C11.1855 12.0477 11.1855 11.7942 11.2835 11.642C11.3814 11.4899 11.4793 11.3377 11.6261 11.287C11.8219 11.1855 12.0178 11.1855 12.5073 11.1855H15.4934C15.983 11.1855 16.1788 11.1855 16.3746 11.287C16.5215 11.3884 16.6683 11.4899 16.7173 11.642C16.8152 11.8449 16.8152 12.0477 16.8152 12.5042V15.4965C16.8152 15.953 16.8152 16.2066 16.7173 16.3587C16.6194 16.5109 16.5215 16.663 16.3746 16.7137C16.1788 16.8152 15.983 16.8152 15.4934 16.8152H12.5073C12.0178 16.8152 11.8219 16.8152 11.6261 16.7137C11.4793 16.6123 11.3324 16.5109 11.2835 16.3587C11.1855 16.1558 11.1855 15.953 11.1855 15.4965V12.5042Z",fill:"#0052FF"}))}return Et.CoinbaseWalletRound=t,Et}var St={},ba;function Sd(){if(ba)return St;ba=1,Object.defineProperty(St,"__esModule",{value:!0}),St.QRCodeIcon=void 0;const e=de;function t(r){return(0,e.h)("svg",Object.assign({width:"18",height:"18",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("path",{d:"M3 3V8.99939L5 8.99996V5H9V3H3Z"}),(0,e.h)("path",{d:"M15 21L21 21V15.0006L19 15V19L15 19V21Z"}),(0,e.h)("path",{d:"M21 9H19V5H15.0006L15 3H21V9Z"}),(0,e.h)("path",{d:"M3 15V21H8.99939L8.99996 19H5L5 15H3Z"}))}return St.QRCodeIcon=t,St}var Le={},vi,ya;function Rd(){if(ya)return vi;ya=1;function e(o){this.mode=r.MODE_8BIT_BYTE,this.data=o,this.parsedData=[];for(var p=0,v=this.data.length;p<v;p++){var g=[],i=this.data.charCodeAt(p);i>65536?(g[0]=240|(i&1835008)>>>18,g[1]=128|(i&258048)>>>12,g[2]=128|(i&4032)>>>6,g[3]=128|i&63):i>2048?(g[0]=224|(i&61440)>>>12,g[1]=128|(i&4032)>>>6,g[2]=128|i&63):i>128?(g[0]=192|(i&1984)>>>6,g[1]=128|i&63):g[0]=i,this.parsedData.push(g)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}e.prototype={getLength:function(o){return this.parsedData.length},write:function(o){for(var p=0,v=this.parsedData.length;p<v;p++)o.put(this.parsedData[p],8)}};function t(o,p){this.typeNumber=o,this.errorCorrectLevel=p,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}t.prototype={addData:function(o){var p=new e(o);this.dataList.push(p),this.dataCache=null},isDark:function(o,p){if(o<0||this.moduleCount<=o||p<0||this.moduleCount<=p)throw new Error(o+","+p);return this.modules[o][p]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(o,p){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var v=0;v<this.moduleCount;v++){this.modules[v]=new Array(this.moduleCount);for(var g=0;g<this.moduleCount;g++)this.modules[v][g]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(o,p),this.typeNumber>=7&&this.setupTypeNumber(o),this.dataCache==null&&(this.dataCache=t.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,p)},setupPositionProbePattern:function(o,p){for(var v=-1;v<=7;v++)if(!(o+v<=-1||this.moduleCount<=o+v))for(var g=-1;g<=7;g++)p+g<=-1||this.moduleCount<=p+g||(0<=v&&v<=6&&(g==0||g==6)||0<=g&&g<=6&&(v==0||v==6)||2<=v&&v<=4&&2<=g&&g<=4?this.modules[o+v][p+g]=!0:this.modules[o+v][p+g]=!1)},getBestMaskPattern:function(){for(var o=0,p=0,v=0;v<8;v++){this.makeImpl(!0,v);
vendor: 8,297 bytes, line 1
1var g=s.getLostPoint(this);(v==0||o>g)&&(o=g,p=v)}return p},createMovieClip:function(o,p,v){var g=o.createEmptyMovieClip(p,v),i=1;this.make();for(var b=0;b<this.modules.length;b++)for(var m=b*i,_=0;_<this.modules[b].length;_++){var S=_*i,k=this.modules[b][_];k&&(g.beginFill(0,100),g.moveTo(S,m),g.lineTo(S+i,m),g.lineTo(S+i,m+i),g.lineTo(S,m+i),g.endFill())}return g},setupTimingPattern:function(){for(var o=8;o<this.moduleCount-8;o++)this.modules[o][6]==null&&(this.modules[o][6]=o%2==0);for(var p=8;p<this.moduleCount-8;p++)this.modules[6][p]==null&&(this.modules[6][p]=p%2==0)},setupPositionAdjustPattern:function(){for(var o=s.getPatternPosition(this.typeNumber),p=0;p<o.length;p++)for(var v=0;v<o.length;v++){var g=o[p],i=o[v];if(this.modules[g][i]==null)for(var b=-2;b<=2;b++)for(var m=-2;m<=2;m++)b==-2||b==2||m==-2||m==2||b==0&&m==0?this.modules[g+b][i+m]=!0:this.modules[g+b][i+m]=!1}},setupTypeNumber:function(o){for(var p=s.getBCHTypeNumber(this.typeNumber),v=0;v<18;v++){var g=!o&&(p>>v&1)==1;this.modules[Math.floor(v/3)][v%3+this.moduleCount-8-3]=g}for(var v=0;v<18;v++){var g=!o&&(p>>v&1)==1;this.modules[v%3+this.moduleCount-8-3][Math.floor(v/3)]=g}},setupTypeInfo:function(o,p){for(var v=this.errorCorrectLevel<<3|p,g=s.getBCHTypeInfo(v),i=0;i<15;i++){var b=!o&&(g>>i&1)==1;i<6?this.modules[i][8]=b:i<8?this.modules[i+1][8]=b:this.modules[this.moduleCount-15+i][8]=b}for(var i=0;i<15;i++){var b=!o&&(g>>i&1)==1;i<8?this.modules[8][this.moduleCount-i-1]=b:i<9?this.modules[8][15-i-1+1]=b:this.modules[8][15-i-1]=b}this.modules[this.moduleCount-8][8]=!o},mapData:function(o,p){for(var v=-1,g=this.moduleCount-1,i=7,b=0,m=this.moduleCount-1;m>0;m-=2)for(m==6&&m--;;){for(var _=0;_<2;_++)if(this.modules[g][m-_]==null){var S=!1;b<o.length&&(S=(o[b]>>>i&1)==1);var k=s.getMask(p,g,m-_);k&&(S=!S),this.modules[g][m-_]=S,i--,i==-1&&(b++,i=7)}if(g+=v,g<0||this.moduleCount<=g){g-=v,v=-v;break}}}},t.PAD0=236,t.PAD1=17,t.createData=function(o,p,v){for(var g=h.getRSBlocks(o,p),i=new y,b=0;b<v.length;b++){var m=v[b];i.put(m.mode,4),i.put(m.getLength(),s.getLengthInBits(m.mode,o)),m.write(i)}for(var _=0,b=0;b<g.length;b++)_+=g[b].dataCount;if(i.getLengthInBits()>_*8)throw new Error("code length overflow. ("+i.getLengthInBits()+">"+_*8+")");for(i.getLengthInBits()+4<=_*8&&i.put(0,4);i.getLengthInBits()%8!=0;)i.putBit(!1);for(;!(i.getLengthInBits()>=_*8||(i.put(t.PAD0,8),i.getLengthInBits()>=_*8));)i.put(t.PAD1,8);return t.createBytes(i,g)},t.createBytes=function(o,p){for(var v=0,g=0,i=0,b=new Array(p.length),m=new Array(p.length),_=0;_<p.length;_++){var S=p[_].dataCount,k=p[_].totalCount-S;g=Math.max(g,S),i=Math.max(i,k),b[_]=new Array(S);for(var R=0;R<b[_].length;R++)b[_][R]=255&o.buffer[R+v];v+=S;var M=s.getErrorCorrectPolynomial(k),T=new u(b[_],M.getLength()-1),L=T.mod(M);m[_]=new Array(M.getLength()-1);for(var R=0;R<m[_].length;R++){var q=R+L.getLength()-m[_].length;m[_][R]=q>=0?L.get(q):0}}for(var F=0,R=0;R<p.length;R++)F+=p[R].totalCount;for(var z=new Array(F),V=0,R=0;R<g;R++)for(var _=0;_<p.length;_++)R<b[_].length&&(z[V++]=b[_][R]);for(var R=0;R<i;R++)for(var _=0;_<p.length;_++)R<m[_].length&&(z[V++]=m[_][R]);return z};for(var r={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},n={L:1,M:0,Q:3,H:2},f={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(o){for(var p=o<<10;s.getBCHDigit(p)-s.getBCHDigit(s.G15)>=0;)p^=s.G15<<s.getBCHDigit(p)-s.getBCHDigit(s.G15);return(o<<10|p)^s.G15_MASK},getBCHTypeNumber:function(o){for(var p=o<<12;s.getBCHDigit(p)-s.getBCHDigit(s.G18)>=0;)p^=s.G18<<s.getBCHDigit(p)-s.getBCHDigit(s.G18);return o<<12|p},getBCHDigit:function(o){for(var p=0;o!=0;)p++,o>>>=1;return p},getPatternPosition:function(o){return s.PATTERN_POSITION_TABLE[o-1]},getMask:function(o,p,v){switch(o){case f.PATTERN000:return(p+v)%2==0;case f.PATTERN001:return p%2==0;case f.PATTERN010:return v%3==0;case f.PATTERN011:return(p+v)%3==0;case f.PATTERN100:return(Math.floor(p/2)+Math.floor(v/3))%2==0;case f.PATTERN101:return p*v%2+p*v%3==0;case f.PATTERN110:return(p*v%2+p*v%3)%2==0;case f.PATTERN111:return(p*v%3+(p+v)%2)%2==0;default:throw new Error("bad maskPattern:"+o)}},getErrorCorrectPolynomial:function(o){for(var p=new u([1],0),v=0;v<o;v++)p=p.multiply(new u([1,c.gexp(v)],0));return p},getLengthInBits:function(o,p){if(1<=p&&p<10)switch(o){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:return 8;case r.MODE_KANJI:return 8;default:throw new Error("mode:"+o)}else if(p<27)switch(o){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+o)}else if(p<41)switch(o){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+o)}else throw new Error("type:"+p)},getLostPoint:function(o){for(var p=o.getModuleCount(),v=0,g=0;g<p;g++)for(var i=0;i<p;i++){for(var b=0,m=o.isDark(g,i),_=-1;_<=1;_++)if(!(g+_<0||p<=g+_))for(var S=-1;S<=1;S++)i+S<0||p<=i+S||_==0&&S==0||m==o.isDark(g+_,i+S)&&b++;b>5&&(v+=3+b-5)}for(var g=0;g<p-1;g++)for(var i=0;i<p-1;i++){var k=0;o.isDark(g,i)&&k++,o.isDark(g+1,i)&&k++,o.isDark(g,i+1)&&k++,o.isDark(g+1,i+1)&&k++,(k==0||k==4)&&(v+=3)}for(var g=0;g<p;g++)for(var i=0;i<p-6;i++)o.isDark(g,i)&&!o.isDark(g,i+1)&&o.isDark(g,i+2)&&o.isDark(g,i+3)&&o.isDark(g,i+4)&&!o.isDark(g,i+5)&&o.isDark(g,i+6)&&(v+=40);for(var i=0;i<p;i++)for(var g=0;g<p-6;g++)o.isDark(g,i)&&!o.isDark(g+1,i)&&o.isDark(g+2,i)&&o.isDark(g+3,i)&&o.isDark(g+4,i)&&!o.isDark(g+5,i)&&o.isDark(g+6,i)&&(v+=40);for(var R=0,i=0;i<p;i++)for(var g=0;g<p;g++)o.isDark(g,i)&&R++;var M=Math.abs(100*R/p/p-50)/5;return v+=M*10,v}},c={glog:function(o){if(o<1)throw new Error("glog("+o+")");return c.LOG_TABLE[o]},gexp:function(o){for(;o<0;)o+=255;for(;o>=256;)o-=255;return c.EXP_TABLE[o]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},l=0;l<8;l++)c.EXP_TABLE[l]=1<<l;for(var l=8;l<256;l++)c.EXP_TABLE[l]=c.EXP_TABLE[l-4]^c.EXP_TABLE[l-5]^c.EXP_TABLE[l-6]^c.EXP_TABLE[l-8];for(var l=0;l<255;l++)c.LOG_TABLE[c.EXP_TABLE[l]]=l;function u(o,p){if(o.length==null)throw new Error(o.length+"/"+p);for(var v=0;v<o.length&&o[v]==0;)v++;this.num=new Array(o.length-v+p);for(var g=0;g<o.length-v;g++)this.num[g]=o[g+v]}u.prototype={get:function(o){return this.num[o]},getLength:function(){return this.num.length},multiply:function(o){for(var p=new Array(this.getLength()+o.getLength()-1),v=0;v<this.getLength();v++)for(var g=0;g<o.getLength();g++)p[v+g]^=c.gexp(c.glog(this.get(v))+c.glog(o.get(g)));return new u(p,0)},mod:function(o){if(this.getLength()-o.getLength()<0)return this;for(var p=c.glog(this.get(0))-c.glog(o.get(0)),v=new Array(this.getLength()),g=0;g<this.getLength();g++)v[g]=this.get(g);for(var g=0;g<o.getLength();g++)v[g]^=c.gexp(c.glog(o.get(g))+p);return new u(v,0).mod(o)}};function h(o,p){this.totalCount=o,this.dataCount=p}h.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37
1],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],h.getRSBlocks=function(o,p){var v=h.getRsBlockTable(o,p);if(v==null)throw new Error("bad rs block @ typeNumber:"+o+"/errorCorrectLevel:"+p);for(var g=v.length/3,i=[],b=0;b<g;b++)for(var m=v[b*3+0],_=v[b*3+1],S=v[b*3+2],k=0;k<m;k++)i.push(new h(_,S));return i},h.getRsBlockTable=function(o,p){switch(p){case n.L:return h.RS_BLOCK_TABLE[(o-1)*4+0];case n.M:return h.RS_BLOCK_TABLE[(o-1)*4+1];case n.Q:return h.RS_BLOCK_TABLE[(o-1)*4+2];case n.H:return h.RS_BLOCK_TABLE[(o-1)*4+3];default:return}};function y(){this.buffer=[],this.length=0}y.prototype={get:function(o){var p=Math.floor(o/8);return(this.buffer[p]>>>7-o%8&1)==1},put:function(o,p){for(var v=0;v<p;v++)this.putBit((o>>>p-v-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(o){var p=Math.floor(this.length/8);this.buffer.length<=p&&this.buffer.push(0),o&&(this.buffer[p]|=128>>>this.length%8),this.length++}};var a=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function d(o){if(this.options={padding:4,width:256,height:256,typeNumber:4,color:"#000000",background:"#ffffff",ecl:"M",image:{svg:"",width:0,height:0}},typeof o=="string"&&(o={content:o}),o)for(var p in o)this.options[p]=o[p];if(typeof this.options.content!="string")throw new Error("Expected 'content' as string!");if(this.options.content.length===0)throw new Error("Expected 'content' to be non-empty!");if(!(this.options.padding>=0))throw new Error("Expected 'padding' value to be non-negative!");if(!(this.options.width>0)||!(this.options.height>0))throw new Error("Expected 'width' or 'height' value to be higher than zero!");function v(S){switch(S){case"L":return n.L;case"M":return n.M;case"Q":return n.Q;case"H":return n.H;default:throw new Error("Unknwon error correction level: "+S)}}function g(S,k){for(var R=i(S),M=1,T=0,L=0,q=a.length;L<=q;L++){var F=a[L];if(!F)throw new Error("Content too long: expected "+T+" but got "+R);switch(k){case"L":T=F[0];break;case"M":T=F[1];break;case"Q":T=F[2];break;case"H":T=F[3];break;default:throw new Error("Unknwon error correction level: "+k)}if(R<=T)break;M++}if(M>a.length)throw new Error("Content too long");return M}function i(S){var k=encodeURI(S).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return k.length+(k.length!=S?3:0)}var b=this.options.content,m=g(b,this.options.ecl),_=v(this.options.ecl);this.qrcode=new t(m,_),this.qrcode.addData(b),this.qrcode.make()}return d.prototype.svg=function(o){var p=this.options||{},v=this.qrcode.modules;typeof o>
1"u"&&(o={container:p.container||"svg"});for(var g=typeof p.pretty<"u"?!!p.pretty:!0,i=g?"  ":"",b=g?`\r
2`:"",m=p.width,_=p.height,S=v.length,k=m/(S+2*p.padding),R=_/(S+2*p.padding),M=typeof p.join<"u"?!!p.join:!1,T=typeof p.swap<"u"?!!p.swap:!1,L=typeof p.xmlDeclaration<"u"?!!p.xmlDeclaration:!0,q=typeof p.predefined<"u"?!!p.predefined:!1,F=q?i+'<defs><path id="qrmodule" d="M0 0 h'+R+" v"+k+' H0 z" style="fill:'+p.color+';shape-rendering:crispEdges;" /></defs>'+b:"",z=i+'<rect x="0" y="0" width="'+m+'" height="'+_+'" style="fill:'+p.background+';shape-rendering:crispEdges;"/>'+b,V="",$="",I=0;I<S;I++)for(var N=0;N<S;N++){var H=v[N][I];if(H){var W=N*k+p.padding*k,X=I*R+p.padding*R;if(T){var ae=W;W=X,X=ae}if(M){var te=k+W,Y=R+X;W=Number.isInteger(W)?Number(W):W.toFixed(2),X=Number.isInteger(X)?Number(X):X.toFixed(2),te=Number.isInteger(te)?Number(te):te.toFixed(2),Y=Number.isInteger(Y)?Number(Y):Y.toFixed(2),$+="M"+W+","+X+" V"+Y+" H"+te+" V"+X+" H"+W+" Z "}else q?V+=i+'<use x="'+W.toString()+'" y="'+X.toString()+'" href="#qrmodule" />'+b:V+=i+'<rect x="'+W.toString()+'" y="'+X.toString()+'" width="'+k+'" height="'+R+'" style="fill:'+p.color+';shape-rendering:crispEdges;"/>'+b}}M&&(V=i+'<path x="0" y="0" style="fill:'+p.color+';shape-rendering:crispEdges;" d="'+$+'" />');let re="";if(this.options.image!==void 0&&this.options.image.svg){const A=m*this.options.image.width/100,C=_*this.options.image.height/100,P=m/2-A/2,O=_/2-C/2;re+=`<svg x="${P}" y="${O}" width="${A}" height="${C}" viewBox="0 0 100 100" preserveAspectRatio="xMinYMin meet">`,re+=this.options.image.svg+b,re+="</svg>"}var Q="";switch(o.container){case"svg":L&&(Q+='<?xml version="1.0" standalone="yes"?>'+b),Q+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="'+m+'" height="'+_+'">'+b,Q+=F+z+V,Q+=re,Q+="</svg>";break;case"svg-viewbox":L&&(Q+='<?xml version="1.0" standalone="yes"?>'+b),Q+='<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 '+m+" "+_+'">'+b,Q+=F+z+V,Q+=re,Q+="</svg>";break;case"g":Q+='<g width="'+m+'" height="'+_+'">'+b,Q+=F+z+V,Q+=re,Q+="</g>";break;default:Q+=(F+z+V+re).replace(/^\s+/,"");break}return Q},vi=d,vi}var va;function kd(){if(va)return Le;va=1;var e=Le&&Le.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Le,"__esModule",{value:!0}),Le.QRCode=void 0;const t=de,r=hr,n=e(Rd()),f=s=>{const[c,l]=(0,r.useState)("");return(0,r.useEffect)(()=>{var u,h;const y=new n.default({content:s.content,background:s.bgColor||"#ffffff",color:s.fgColor||"#000000",container:"svg",ecl:"M",width:(u=s.width)!==null&&u!==void 0?u:256,height:(h=s.height)!==null&&h!==void 0?h:256,padding:0,image:s.image}),a=Buffer.from(y.svg(),"utf8").toString("base64");l(`data:image/svg+xml;base64,${a}`)},[s.bgColor,s.content,s.fgColor,s.height,s.image,s.width]),c?(0,t.h)("img",{src:c,alt:"QR Code"}):null};return Le.QRCode=f,Le}var Oe={},Zt={},ma;function Cd(){return ma||(ma=1,Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.default=".-cbwsdk-css-reset .-cbwsdk-spinner{display:inline-block}.-cbwsdk-css-reset .-cbwsdk-spinner svg{display:inline-block;animation:2s linear infinite -cbwsdk-spinner-svg}.-cbwsdk-css-reset .-cbwsdk-spinner svg circle{animation:1.9s ease-in-out infinite both -cbwsdk-spinner-circle;display:block;fill:rgba(0,0,0,0);stroke-dasharray:283;stroke-dashoffset:280;stroke-linecap:round;stroke-width:10px;transform-origin:50% 50%}@keyframes -cbwsdk-spinner-svg{0%{transform:rotateZ(0deg)}100%{transform:rotateZ(360deg)}}@keyframes -cbwsdk-spinner-circle{0%,25%{stroke-dashoffset:280;transform:rotate(0)}50%,75%{stroke-dashoffset:75;transform:rotate(45deg)}100%{stroke-dashoffset:280;transform:rotate(360deg)}}"),Zt}var _a;function Ad(){if(_a)return Oe;_a=1;var e=Oe&&Oe.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.Spinner=void 0;const t=de,r=e(Cd()),n=f=>{var s;const c=(s=f.size)!==null&&s!==void 0?s:64,l=f.color||"#000";return(0,t.h)("div",{class:"-cbwsdk-spinner"},(0,t.h)("style",null,r.default),(0,t.h)("svg",{viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",style:{width:c,height:c}},(0,t.h)("circle",{style:{cx:50,cy:50,r:45,stroke:l}})))};return Oe.Spinner=n,Oe}var Kt={},wa;
2function Id(){return wa||(wa=1,Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.default=".-cbwsdk-css-reset .-cbwsdk-connect-content{height:430px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-connect-content.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-header{display:flex;align-items:center;justify-content:space-between;margin:0 0 30px}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading{font-style:normal;font-weight:500;font-size:28px;line-height:36px;margin:0}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-layout{display:flex;flex-direction:row}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-left{margin-right:30px;display:flex;flex-direction:column;justify-content:space-between}.-cbwsdk-css-reset .-cbwsdk-connect-content-column-right{flex:25%;margin-right:34px}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-wrapper{width:220px;height:220px;border-radius:12px;display:flex;justify-content:center;align-items:center;background:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting{position:absolute;top:0;bottom:0;left:0;right:0;display:flex;flex-direction:column;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light{background-color:rgba(255,255,255,.95)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.light>p{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark{background-color:rgba(10,11,13,.9)}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting.dark>p{color:#fff}.-cbwsdk-css-reset .-cbwsdk-connect-content-qr-connecting>p{font-size:12px;font-weight:bold;margin-top:16px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app{border-radius:8px;font-size:14px;line-height:20px;padding:12px;width:339px}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.light{background:#eef0f3;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-connect-content-update-app.dark{background:#1e2025;color:#8a919e}.-cbwsdk-css-reset .-cbwsdk-cancel-button{-webkit-appearance:none;border:none;background:none;cursor:pointer;padding:0;margin:0}.-cbwsdk-css-reset .-cbwsdk-cancel-button-x{position:relative;display:block;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-wallet-steps{padding:0 0 0 16px;margin:0;width:100%;list-style:decimal}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item{list-style-type:decimal;display:list-item;font-style:normal;font-weight:400;font-size:16px;line-height:24px;margin-top:20px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-item-wrapper{display:flex;align-items:center}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-pad-left{margin-left:6px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon{display:flex;border-radius:50%;height:24px;width:24px}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.light{background:#0052ff}.-cbwsdk-css-reset .-cbwsdk-wallet-steps-icon.dark{background:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item{align-items:center;display:flex;flex-direction:row;padding:16px 24px;gap:12px;cursor:pointer;border-radius:100px;font-weight:600}.-cbwsdk-css-reset .-cbwsdk-connect-item.light{background:#f5f8ff;color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-connect-item.dark{background:#001033;color:#588af5}.-cbwsdk-css-reset .-cbwsdk-connect-item-copy-wrapper{margin:0 4px 0 8px}.-cbwsdk-css-reset .-cbwsdk-connect-item-title{margin:0 0 0;font-size:16px;line-height:24px;font-weight:500}.-cbwsdk-css-reset .-cbwsdk-connect-item-description{font-weight:400;font-size:14px;line-height:20px;margin:0}"),Kt}var Ea;function Md(){if(Ea)return Se;Ea=1;var e=Se&&Se.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.CoinbaseWalletSteps=Se.ConnectContent=void 0;const t=e($t),r=de,n=Ce(),f=Es(),s=wd(),c=Ed(),l=Sd(),u=kd(),h=Ad(),y=e(Id()),a={title:"Coinbase Wallet app",description:"Connect with your self-custody wallet",steps:v},d=g=>g==="light"?"#FFFFFF":"#0A0B0D";function o(g){const{theme:i}=g,b=(0,n.createQrUrl)(g.sessionId,g.sessionSecret,g.linkAPIUrl,g.isParentConnection,g.version,g.chainId),m=a.steps;return(0,r.h)("div",{"data-testid":"connect-content",className:(0,t.default)("-cbwsdk-connect-content",i)},(0,r.h)("style",null,y.default),(0,r.h)("div",{className:"-cbwsdk-connect-content-header"},(0,r.h)("h2",{className:(0,t.default)("-cbwsdk-connect-content-heading",i)},"Scan to connect with our mobile app"),g.onCancel&&(0,r.h)("button",{type:"button",className:"-cbwsdk-cancel-button",onClick:g.onCancel},(0,r.h)(s.CloseIcon,{fill:i==="light"?"#0A0B0D":"#FFFFFF"}))),(0,r.h)("div",{className:"-cbwsdk-connect-content-layout"},(0,r.h)("div",{className:"-cbwsdk-connect-content-column-left"}
2,(0,r.h)(p,{title:a.title,description:a.description,theme:i})),(0,r.h)("div",{className:"-cbwsdk-connect-content-column-right"},(0,r.h)("div",{className:"-cbwsdk-connect-content-qr-wrapper"},(0,r.h)(u.QRCode,{content:b,width:200,height:200,fgColor:"#000",bgColor:"transparent"}),(0,r.h)("input",{type:"hidden",name:"cbw-cbwsdk-version",value:f.LIB_VERSION}),(0,r.h)("input",{type:"hidden",value:b})),(0,r.h)(m,{theme:i}),!g.isConnected&&(0,r.h)("div",{"data-testid":"connecting-spinner",className:(0,t.default)("-cbwsdk-connect-content-qr-connecting",i)},(0,r.h)(h.Spinner,{size:36,color:i==="dark"?"#FFF":"#000"}),(0,r.h)("p",null,"Connecting...")))))}Se.ConnectContent=o;function p({title:g,description:i,theme:b}){return(0,r.h)("div",{className:(0,t.default)("-cbwsdk-connect-item",b)},(0,r.h)("div",null,(0,r.h)(c.CoinbaseWalletRound,null)),(0,r.h)("div",{className:"-cbwsdk-connect-item-copy-wrapper"},(0,r.h)("h3",{className:"-cbwsdk-connect-item-title"},g),(0,r.h)("p",{className:"-cbwsdk-connect-item-description"},i)))}function v({theme:g}){return(0,r.h)("ol",{className:"-cbwsdk-wallet-steps"},(0,r.h)("li",{className:(0,t.default)("-cbwsdk-wallet-steps-item",g)},(0,r.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},"Open Coinbase Wallet app")),(0,r.h)("li",{className:(0,t.default)("-cbwsdk-wallet-steps-item",g)},(0,r.h)("div",{className:"-cbwsdk-wallet-steps-item-wrapper"},(0,r.h)("span",null,"Tap ",(0,r.h)("strong",null,"Scan")," "),(0,r.h)("span",{className:(0,t.default)("-cbwsdk-wallet-steps-pad-left","-cbwsdk-wallet-steps-icon",g)},(0,r.h)(l.QRCodeIcon,{fill:d(g)})))))}return Se.CoinbaseWalletSteps=v,Se}var De={},Rt={},Sa;function xd(){if(Sa)return Rt;
2Sa=1,Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.ArrowLeftIcon=void 0;const e=de;function t(r){return(0,e.h)("svg",Object.assign({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("path",{d:"M8.60675 0.155884L7.37816 1.28209L12.7723 7.16662H0V8.83328H12.6548L6.82149 14.6666L8 15.8451L15.8201 8.02501L8.60675 0.155884Z"}))}return Rt.ArrowLeftIcon=t,Rt}var kt={},Ra;function Td(){if(Ra)return kt;Ra=1,Object.defineProperty(kt,"__esModule",{value:!0}),kt.LaptopIcon=void 0;const e=de;function t(r){return(0,e.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("path",{d:"M1.8001 2.2002H12.2001V9.40019H1.8001V2.2002ZM3.4001 3.8002V7.80019H10.6001V3.8002H3.4001Z"}),(0,e.h)("path",{d:"M13.4001 10.2002H0.600098C0.600098 11.0838 1.31644 11.8002 2.2001 11.8002H11.8001C12.6838 11.8002 13.4001 11.0838 13.4001 10.2002Z"}))}return kt.LaptopIcon=t,kt}var Ct={},ka;function Pd(){if(ka)return Ct;ka=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.SafeIcon=void 0;const e=de;function t(r){return(0,e.h)("svg",Object.assign({width:"14",height:"14",viewBox:"0 0 14 14",xmlns:"http://www.w3.org/2000/svg"},r),(0,e.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.600098 0.600098V11.8001H13.4001V0.600098H0.600098ZM7.0001 9.2001C5.3441 9.2001 4.0001 7.8561 4.0001 6.2001C4.0001 4.5441 5.3441 3.2001 7.0001 3.2001C8.6561 3.2001 10.0001 4.5441 10.0001 6.2001C10.0001 7.8561 8.6561 9.2001 7.0001 9.2001ZM0.600098 12.6001H3.8001V13.4001H0.600098V12.6001ZM10.2001 12.6001H13.4001V13.4001H10.2001V12.6001ZM8.8001 6.2001C8.8001 7.19421 7.99421 8.0001 7.0001 8.0001C6.00598 8.0001 5.2001 7.19421 5.2001 6.2001C5.2001 5.20598 6.00598 4.4001 7.0001 4.4001C7.99421 4.4001 8.8001 5.20598 8.8001 6.2001Z"}))}return Ct.SafeIcon=t,Ct}var Qt={},Ca;function Bd(){return Ca||(Ca=1,Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.default=".-cbwsdk-css-reset .-cbwsdk-try-extension{display:flex;margin-top:12px;height:202px;width:700px;border-radius:12px;padding:30px}.-cbwsdk-css-reset .-cbwsdk-try-extension.light{background:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension.dark{background:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-column-half{flex:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading{font-style:normal;font-weight:500;font-size:25px;line-height:32px;margin:0;max-width:204px}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.light{color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-try-extension-heading.dark{color:#fff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta{appearance:none;border:none;background:none;color:#0052ff;cursor:pointer;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.light{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta.dark{color:#588af5}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-wrapper{display:flex;align-items:center;margin-top:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-cta-icon{display:block;margin-left:4px;height:14px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list{display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0;padding:0;list-style:none;height:100%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item{display:flex;align-items:center;flex-flow:nowrap;margin-top:24px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item:first-of-type{margin-top:0}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon-wrapper{display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon{display:flex;height:32px;width:32px;border-radius:50%}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon svg{margin:auto;display:block}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.light{background:#eef0f3}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-icon.dark{background:#1e2025}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy{display:block;font-weight:400;font-size:14px;line-height:20px;padding-left:12px}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.light{color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-try-extension-list-item-copy.dark{color:#8a919e}"),Qt}var Aa;function Nd(){if(Aa)return De;Aa=1;var e=De&&De.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};
2Object.defineProperty(De,"__esModule",{value:!0}),De.TryExtensionContent=void 0;const t=e($t),r=de,n=hr,f=xd(),s=Td(),c=Pd(),l=e(Bd());function u({theme:h}){const[y,a]=(0,n.useState)(!1),d=(0,n.useCallback)(()=>{window.open("https://api.wallet.coinbase.com/rpc/v2/desktop/chrome","_blank")},[]),o=(0,n.useCallback)(()=>{y?window.location.reload():(d(),a(!0))},[d,y]);return(0,r.h)("div",{class:(0,t.default)("-cbwsdk-try-extension",h)},(0,r.h)("style",null,l.default),(0,r.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,r.h)("h3",{class:(0,t.default)("-cbwsdk-try-extension-heading",h)},"Or try the Coinbase Wallet browser extension"),(0,r.h)("div",{class:"-cbwsdk-try-extension-cta-wrapper"},(0,r.h)("button",{class:(0,t.default)("-cbwsdk-try-extension-cta",h),onClick:o},y?"Refresh":"Install"),(0,r.h)("div",null,!y&&(0,r.h)(f.ArrowLeftIcon,{class:"-cbwsdk-try-extension-cta-icon",fill:h==="light"?"#0052FF":"#588AF5"})))),(0,r.h)("div",{class:"-cbwsdk-try-extension-column-half"},(0,r.h)("ul",{class:"-cbwsdk-try-extension-list"},(0,r.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,r.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,r.h)("span",{class:(0,t.default)("-cbwsdk-try-extension-list-item-icon",h)},(0,r.h)(s.LaptopIcon,{fill:h==="light"?"#0A0B0D":"#FFFFFF"}))),(0,r.h)("div",{class:(0,t.default)("-cbwsdk-try-extension-list-item-copy",h)},"Connect with dapps with just one click on your desktop browser")),(0,r.h)("li",{class:"-cbwsdk-try-extension-list-item"},(0,r.h)("div",{class:"-cbwsdk-try-extension-list-item-icon-wrapper"},(0,r.h)("span",{class:(0,t.default)("-cbwsdk-try-extension-list-item-icon",h)},(0,r.h)(c.SafeIcon,{fill:h==="light"?"#0A0B0D":"#FFFFFF"}))),(0,r.h)("div",{class:(0,t.default)("-cbwsdk-try-extension-list-item-copy",h)},"Add an additional layer of security by using a supported Ledger hardware wallet")))))}return De.TryExtensionContent=u,De}var Yt={},Ia;function Ld(){return Ia||(Ia=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.default=".-cbwsdk-css-reset .-cbwsdk-connect-dialog{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop{z-index:2147483647;position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.light{background-color:rgba(0,0,0,.5)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop.dark{background-color:rgba(50,53,61,.4)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-backdrop-hidden{opacity:0}
2.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box{display:flex;position:relative;flex-direction:column;transform:scale(1);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-box-hidden{opacity:0;transform:scale(0.85)}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container{display:block}.-cbwsdk-css-reset .-cbwsdk-connect-dialog-container-hidden{display:none}"),Yt}var Ma;function Od(){if(Ma)return Ne;Ma=1;var e=Ne&&Ne.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.ConnectDialog=void 0;const t=e($t),r=de,n=hr,f=Md(),s=Nd(),c=e(Ld()),l=u=>{const{isOpen:h,darkMode:y}=u,[a,d]=(0,n.useState)(!h),[o,p]=(0,n.useState)(!h);(0,n.useEffect)(()=>{const g=[window.setTimeout(()=>{p(!h)},10)];return h?d(!1):g.push(window.setTimeout(()=>{d(!0)},360)),()=>{g.forEach(window.clearTimeout)}},[h]);const v=y?"dark":"light";return(0,r.h)("div",{class:(0,t.default)("-cbwsdk-connect-dialog-container",a&&"-cbwsdk-connect-dialog-container-hidden")},(0,r.h)("style",null,c.default),(0,r.h)("div",{class:(0,t.default)("-cbwsdk-connect-dialog-backdrop",v,o&&"-cbwsdk-connect-dialog-backdrop-hidden")}),(0,r.h)("div",{class:"-cbwsdk-connect-dialog"},(0,r.h)("div",{class:(0,t.default)("-cbwsdk-connect-dialog-box",o&&"-cbwsdk-connect-dialog-box-hidden")},u.connectDisabled?null:(0,r.h)(f.ConnectContent,{theme:v,version:u.version,sessionId:u.sessionId,sessionSecret:u.sessionSecret,linkAPIUrl:u.linkAPIUrl,isConnected:u.isConnected,isParentConnection:u.isParentConnection,chainId:u.chainId,onCancel:u.onCancel}),(0,r.h)(s.TryExtensionContent,{theme:v}))))};return Ne.ConnectDialog=l,Ne}var xa;function Dd(){if(xa)return _t;xa=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.LinkFlow=void 0;const e=de,t=Od();let r=class{constructor(f){this.connected=!1,this.chainId=1,this.isOpen=!1,this.onCancel=null,this.root=null,this.connectDisabled=!1,this.darkMode=f.darkMode,this.version=f.version,this.sessionId=f.sessionId,this.sessionSecret=f.sessionSecret,this.linkAPIUrl=f.linkAPIUrl,this.isParentConnection=f.isParentConnection}attach(f){this.root=document.createElement("div"),this.root.className="-cbwsdk-link-flow-root",f.appendChild(this.root),this.render()}setConnected(f){this.connected!==f&&(this.connected=f,this.render())}setChainId(f){this.chainId!==f&&(this.chainId=f,this.render())}detach(){var f;this.root&&((0,e.render)(null,this.root),(f=this.root.parentElement)===null||f===void 0||f.removeChild(this.root))}setConnectDisabled(f){this.connectDisabled=f}open(f){this.isOpen=!0,this.onCancel=f.onCancel,this.render()}close(){this.isOpen=!1,this.onCancel=null,this.render()}render(){this.root&&(0,e.render)((0,e.h)(t.ConnectDialog,{darkMode:this.darkMode,version:this.version,sessionId:this.sessionId,sessionSecret:this.sessionSecret,linkAPIUrl:this.linkAPIUrl,isOpen:this.isOpen,isConnected:this.connected,isParentConnection:this.isParentConnection,chainId:this.chainId,onCancel:this.onCancel,connectDisabled:this.connectDisabled}),this.root)}};return _t.LinkFlow=r,_t}var At={},Xt={},Ta;function qd(){return Ta||(Ta=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.default=".-cbwsdk-css-reset .-gear-container{margin-left:16px !important;margin-right:9px !important;display:flex;align-items:center;justify-content:center;width:24px;height:24px;transition:opacity .25s}.-cbwsdk-css-reset .-gear-container *{user-select:none}.-cbwsdk-css-reset .-gear-container svg{opacity:0;position:absolute}.-cbwsdk-css-reset .-gear-icon{height:12px;width:12px;z-index:10000}.-cbwsdk-css-reset .-cbwsdk-snackbar{align-items:flex-end;display:flex;flex-direction:column;position:fixed;right:0;top:0;z-index:2147483647}.-cbwsdk-css-reset .-cbwsdk-snackbar *{user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance{display:flex;flex-direction:column;margin:8px 16px 0 16px;overflow:visible;text-align:left;transform:translateX(0);transition:opacity .25s,transform .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header:hover .-gear-container svg{opacity:1}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header{display:flex;align-items:center;background:#fff;overflow:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;
2cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-cblogo{margin:8px 8px 8px 8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-header-message{color:#000;font-size:13px;line-height:1.5;user-select:none}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu{background:#fff;transition:opacity .25s ease-in-out,transform .25s linear,visibility 0s;visibility:hidden;border:1px solid #e7ebee;box-sizing:border-box;border-radius:8px;opacity:0;flex-direction:column;padding-left:8px;padding-right:8px}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:last-child{margin-bottom:8px !important}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover{background:#f5f7f8;border-radius:6px;transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover span{color:#050f19;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item:hover svg path{fill:#000;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item{visibility:inherit;height:35px;margin-top:8px;margin-bottom:0;display:flex;flex-direction:row;align-items:center;padding:8px;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item *{visibility:inherit;cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover{background:rgba(223,95,103,.2);transition:background .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover *{cursor:pointer}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover svg path{fill:#df5f67;transition:fill .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-is-red:hover span{color:#df5f67;transition:color .25s}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-menu-item-info{color:#aaa;font-size:13px;margin:0 8px 0 32px;position:absolute}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-hidden{opacity:0;text-align:left;transform:translateX(25%);transition:opacity .5s linear}.-cbwsdk-css-reset .-cbwsdk-snackbar-instance-expanded .-cbwsdk-snackbar-instance-menu{opacity:1;display:flex;transform:translateY(8px);visibility:visible}"),Xt}var Pa;function Du(){return Pa||(Pa=1,(function(e){var t=At&&At.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.SnackbarInstance=e.SnackbarContainer=e.Snackbar=void 0;const r=t($t),n=de,f=hr,s=t(qd()),c="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNDkyIDEwLjQxOWE4LjkzIDguOTMgMCAwMTguOTMtOC45M2gxMS4xNjNhOC45MyA4LjkzIDAgMDE4LjkzIDguOTN2MTEuMTYzYTguOTMgOC45MyAwIDAxLTguOTMgOC45M0gxMC40MjJhOC45MyA4LjkzIDAgMDEtOC45My04LjkzVjEwLjQxOXoiIGZpbGw9IiMxNjUyRjAiLz48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEwLjQxOSAwSDIxLjU4QzI3LjMzNSAwIDMyIDQuNjY1IDMyIDEwLjQxOVYyMS41OEMzMiAyNy4zMzUgMjcuMzM1IDMyIDIxLjU4MSAzMkgxMC40MkM0LjY2NSAzMiAwIDI3LjMzNSAwIDIxLjU4MVYxMC40MkMwIDQuNjY1IDQuNjY1IDAgMTAuNDE5IDB6bTAgMS40ODhhOC45MyA4LjkzIDAgMDAtOC45MyA4LjkzdjExLjE2M2E4LjkzIDguOTMgMCAwMDguOTMgOC45M0gyMS41OGE4LjkzIDguOTMgMCAwMDguOTMtOC45M1YxMC40MmE4LjkzIDguOTMgMCAwMC04LjkzLTguOTNIMTAuNDJ6IiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNS45OTggMjYuMDQ5Yy01LjU0OSAwLTEwLjA0Ny00LjQ5OC0xMC4wNDctMTAuMDQ3IDAtNS41NDggNC40OTgtMTAuMDQ2IDEwLjA0Ny0xMC4wNDYgNS41NDggMCAxMC4wNDYgNC40OTggMTAuMDQ2IDEwLjA0NiAwIDUuNTQ5LTQuNDk4IDEwLjA0Ny0xMC4wNDYgMTAuMDQ3eiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMi43NjIgMTQuMjU0YzAtLjgyMi42NjctMS40ODkgMS40ODktMS40ODloMy40OTdjLjgyMiAwIDEuNDg4LjY2NiAxLjQ4OCAxLjQ4OXYzLjQ5N2MwIC44MjItLjY2NiAxLjQ4OC0xLjQ4OCAxLjQ4OGgtMy40OTdhMS40ODggMS40ODggMCAwMS0xLjQ4OS0xLjQ4OHYtMy40OTh6IiBmaWxsPSIjMTY1MkYwIi8+PC9zdmc+",l="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEyIDYuNzV2LTEuNWwtMS43Mi0uNTdjLS4wOC0uMjctLjE5LS41Mi0uMzItLjc3bC44MS0xLjYyLTEuMDYtMS4wNi0xLjYyLjgxYy0uMjQtLjEzLS41LS4yNC0uNzctLjMyTDYuNzUgMGgtMS41bC0uNTcgMS43MmMtLjI3LjA4LS41My4xOS0uNzcuMzJsLTEuNjItLjgxLTEuMDYgMS4wNi44MSAxLjYyYy0uMTMuMjQtLjI0LjUtLjMyLjc3TDAgNS4yNXYxLjVsMS43Mi41N2MuMDguMjcuMTkuNTMuMzIuNzdsLS44MSAxLjYyIDEuMDYgMS4wNiAxLjYyLS44MWMuMjQuMTMuNS4yMy43Ny4zMkw1LjI1IDEyaDEuNWwu
2NTctMS43MmMuMjctLjA4LjUyLS4xOS43Ny0uMzJsMS42Mi44MSAxLjA2LTEuMDYtLjgxLTEuNjJjLjEzLS4yNC4yMy0uNS4zMi0uNzdMMTIgNi43NXpNNiA4LjVhMi41IDIuNSAwIDAxMC01IDIuNSAyLjUgMCAwMTAgNXoiIGZpbGw9IiMwNTBGMTkiLz48L3N2Zz4=";class u{constructor(d){this.items=new Map,this.nextItemKey=0,this.root=null,this.darkMode=d.darkMode}attach(d){this.root=document.createElement("div"),this.root.className="-cbwsdk-snackbar-root",d.appendChild(this.root),this.render()}presentItem(d){const o=this.nextItemKey++;return this.items.set(o,d),this.render(),()=>{this.items.delete(o),this.render()}}clear(){this.items.clear(),this.render()}render(){this.root&&(0,n.render)((0,n.h)("div",null,(0,n.h)(e.SnackbarContainer,{darkMode:this.darkMode},Array.from(this.items.entries()).map(([d,o])=>(0,n.h)(e.SnackbarInstance,Object.assign({},o,{key:d}))))),this.root)}}e.Snackbar=u;const h=a=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-container")},(0,n.h)("style",null,s.default),(0,n.h)("div",{class:"-cbwsdk-snackbar"},a.children));e.SnackbarContainer=h;const y=({autoExpand:a,message:d,menuItems:o})=>{const[p,v]=(0,f.useState)(!0),[g,i]=(0,f.useState)(a??!1);(0,f.useEffect)(()=>{const m=[window.setTimeout(()=>{v(!1)},1),window.setTimeout(()=>{i(!0)},1e4)];return()=>{m.forEach(window.clearTimeout)}});const b=()=>{i(!g)};return(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance",p&&"-cbwsdk-snackbar-instance-hidden",g&&"-cbwsdk-snackbar-instance-expanded")},(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header",onClick:b},(0,n.h)("img",{src:c,class:"-cbwsdk-snackbar-instance-header-cblogo"})," ",(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-header-message"},d),(0,n.h)("div",{class:"-gear-container"},!g&&(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("circle",{cx:"12",cy:"12",r:"12",fill:"#F5F7F8"})),(0,n.h)("img",{src:l,class:"-gear-icon",title:"Expand"}))),o&&o.length>0&&(0,n.h)("div",{class:"-cbwsdk-snackbar-instance-menu"},o.map((m,_)=>(0,n.h)("div",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item",m.isRed&&"-cbwsdk-snackbar-instance-menu-item-is-red"),onClick:m.onClick,key:_},(0,n.h)("svg",{width:m.svgWidth,height:m.svgHeight,viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":m.defaultFillRule,"clip-rule":m.defaultClipRule,d:m.path,fill:"#AAAAAA"})),(0,n.h)("span",{class:(0,r.default)("-cbwsdk-snackbar-instance-menu-item-info",m.isRed&&"-cbwsdk-snackbar-instance-menu-item-info-is-red")},m.info)))))};e.SnackbarInstance=y})(At)),At}var Ba;function qu(){if(Ba)return mt;Ba=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.WalletLinkRelayUI=void 0;const e=Lu(),t=Dd(),r=Du();let n=class{constructor(s){this.standalone=null,this.attached=!1,this.snackbar=new r.Snackbar({darkMode:s.darkMode}),this.linkFlow=new t.LinkFlow({darkMode:s.darkMode,version:s.version,sessionId:s.session.id,sessionSecret:s.session.secret,linkAPIUrl:s.linkAPIUrl,isParentConnection:!1})}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");const s=document.documentElement,c=document.createElement("div");c.className="-cbwsdk-css-reset",s.appendChild(c),this.linkFlow.attach(c),this.snackbar.attach(c),this.attached=!0,(0,e.injectCssReset)()}setConnected(s){this.linkFlow.setConnected(s)}setChainId(s){this.linkFlow.setChainId(s)}setConnectDisabled(s){this.linkFlow.setConnectDisabled(s)}addEthereumChain(){}watchAsset(){}switchEthereumChain(){}requestEthereumAccounts(s){this.linkFlow.open({onCancel:s.onCancel})}hideRequestEthereumAccounts(){this.linkFlow.close()}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}showConnecting(s){let c;return s.isUnlinkedErrorState?c={autoExpand:!0,message:"Connection lost",menuItems:[{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.9687
25 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:s.onResetConnection}]}:c={message:"Confirm on phone",menuItems:[{isRed:!0,info:"Cancel transaction",svgWidth:"11",svgHeight:"11",path:"M10.3711 1.52346L9.21775 0.370117L5.37109 4.21022L1.52444 0.370117L0.371094 1.52346L4.2112 5.37012L0.371094 9.21677L1.52444 10.3701L5.37109 6.53001L9.21775 10.3701L10.3711 9.21677L6.53099 5.37012L10.3711 1.52346Z",defaultFillRule:"inherit",defaultClipRule:"inherit",onClick:s.onCancel},{isRed:!1,info:"Reset connection",svgWidth:"10",svgHeight:"11",path:"M5.00008 0.96875C6.73133 0.96875 8.23758 1.94375 9.00008 3.375L10.0001 2.375V5.5H9.53133H7.96883H6.87508L7.80633 4.56875C7.41258 3.3875 6.31258 2.53125 5.00008 2.53125C3.76258 2.53125 2.70633 3.2875 2.25633 4.36875L0.812576 3.76875C1.50008 2.125 3.11258 0.96875 5.00008 0.96875ZM2.19375 6.43125C2.5875 7.6125 3.6875 8.46875 5 8.46875C6.2375 8.46875 7.29375 7.7125 7.74375 6.63125L9.1875 7.23125C8.5 8.875 6.8875 10.0312 5 10.0312C3.26875 10.0312 1.7625 9.05625 1 7.625L0 8.625V5.5H0.46875H2.03125H3.125L2.19375 6.43125Z",defaultFillRule:"evenodd",defaultClipRule:"evenodd",onClick:s.onResetConnection}]},this.snackbar.presentItem(c)}reloadUI(){document.location.reload()}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}setStandalone(s){this.standalone=s}isStandalone(){var s;return(s=this.standalone)!==null&&s!==void 0?s:!1}};return mt.WalletLinkRelayUI=n,mt}var Na;function Fu(){if(Na)return ft;Na=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.WalletLinkRelay=void 0;const e=ur(),t=lr(),r=Ce(),n=Ss(),f=Rs(),s=Is(),c=vd(),l=ws(),u=qu();let h=class Ke extends f.RelayAbstract{constructor(a){var d;super(),this.accountsCallback=null,this.chainCallbackParams={chainId:"",jsonRpcUrl:""},this.chainCallback=null,this.dappDefaultChain=1,this.appName="",this.appLogoUrl=null,this.linkedUpdated=g=>{var i;this.isLinked=g;const b=this.storage.getItem(f.LOCAL_STORAGE_ADDRESSES_KEY);if(g&&(this.session.linked=g),this.isUnlinkedErrorState=!1,b){const m=b.split(" "),_=this.storage.getItem("IsStandaloneSigning")==="true";if(m[0]!==""&&!g&&this.session.linked&&!_){this.isUnlinkedErrorState=!0;const S=this.getSessionIdHash();(i=this.diagnostic)===null||i===void 0||i.log(n.EVENTS.UNLINKED_ERROR_STATE,{sessionIdHash:S})}}},this.metadataUpdated=(g,i)=>{this.storage.setItem(g,i)},this.chainUpdated=(g,i)=>{this.chainCallbackParams.chainId===g&&this.chainCallbackParams.jsonRpcUrl===i||(this.chainCallbackParams={chainId:g,jsonRpcUrl:i},this.chainCallback&&this.chainCallback(g,i))},this.accountUpdated=g=>{this.accountsCallback&&this.accountsCallback([g]),Ke.accountRequestCallbackIds.size>0&&(Array.from(Ke.accountRequestCallbackIds.values()).forEach(i=>{const b={type:"WEB3_RESPONSE",id:i,response:{method:"requestEthereumAccounts",result:[g]}};this.invokeCallback(Object.assign(Object.assign({},b),{id:i}))}),Ke.accountRequestCallbackIds.clear())},this.connectedUpdated=g=>{this.ui.setConnected(g)},this.resetAndReload=this.resetAndReload.bind(this),this.linkAPIUrl=a.linkAPIUrl,this.storage=a.storage,this.options=a;const{session:o,ui:p,connection:v}=this.subscribe();this._session=o,this.connection=v,this.relayEventManager=a.relayEventManager,this.diagnostic=a.diagnosticLogger,this._reloadOnDisconnect=(d=a.reloadOnDisconnect)!==null&&d!==void 0?d:!0,this.ui=p}subscribe(){const a=s.Session.load(this.storage)||new s.Session(this.storage).save(),{linkAPIUrl:d,diagnostic:o}=this,p=new c.WalletLinkConnection({session:a,linkAPIUrl:d,diagnostic:o,listener:this}),{version:v,darkMode:g}=this.options,i=this.options.uiConstructor({linkAPIUrl:d,version:v,darkMode:g,session:a});return p.connect(),{session:a,ui:i,connection:p}}attachUI(){this.ui.attach()}resetAndReload(){Promise.race([this.connection.setSessionMetadata("__destroyed","1"),new Promise(a=>setTimeout(()=>a(null),1e3))]).then(()=>{var a,d;const o=this.ui.isStandalone();(a=this.diagnostic)===null||a===void 0||a.log(n.EVENTS.SESSION_STATE_CHANGE,{method:"relay::resetAndReload",sessionMetadataChange:"__destroyed, 1",sessionIdHash:this.getSessionIdHash()}),this.connection.destroy();const p=s.Session.load(this.storage);if((p==null?void 0:p.id)===this._session.id?this.storage.clear():p&&((d=this.diagnostic)===null||d===void 0||d.log(n.EVENTS.SKIPPED_CLEARING_SESSION,{sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:s.Session.hash(p.id)})),this._reloadOnDisconnect){this.ui.reloadUI();return}this.accountsCallback&&this.accountsCallback([],!0);const{session:v,ui:g,connection:i}=this.subscribe();this._session=v,this.connection=i,this.ui=g,o&&this.ui.setStandalone&&this.ui.setStandalone(!0),this.options.headlessMode||this.attachUI()}).catch(a=>{var d;(d=this.diagnostic)===null||d===void 0||d.log(n.EVENTS.FAILURE,{method:"relay::resetAndReload",message:`failed to reset and reload with ${a}`,sessionIdHash:this.getSessionIdHash()})})}setAppInfo(a,d){this.appName=a,this.appLogoUrl=d}getStorageItem(a){return this.storage.getItem(a)}get session(){return this._session}setStorageItem(a,d){this.storage.setItem(a,d)}
2signEthereumMessage(a,d,o,p){return this.sendRequest({method:"signEthereumMessage",params:{message:(0,r.hexStringFromBuffer)(a,!0),address:d,addPrefix:o,typedDataJson:p||null}})}ethereumAddressFromSignedMessage(a,d,o){return this.sendRequest({method:"ethereumAddressFromSignedMessage",params:{message:(0,r.hexStringFromBuffer)(a,!0),signature:(0,r.hexStringFromBuffer)(d,!0),addPrefix:o}})}signEthereumTransaction(a){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:a.fromAddress,toAddress:a.toAddress,weiValue:(0,r.bigIntStringFromBN)(a.weiValue),data:(0,r.hexStringFromBuffer)(a.data,!0),nonce:a.nonce,gasPriceInWei:a.gasPriceInWei?(0,r.bigIntStringFromBN)(a.gasPriceInWei):null,maxFeePerGas:a.gasPriceInWei?(0,r.bigIntStringFromBN)(a.gasPriceInWei):null,maxPriorityFeePerGas:a.gasPriceInWei?(0,r.bigIntStringFromBN)(a.gasPriceInWei):null,gasLimit:a.gasLimit?(0,r.bigIntStringFromBN)(a.gasLimit):null,chainId:a.chainId,shouldSubmit:!1}})}signAndSubmitEthereumTransaction(a){return this.sendRequest({method:"signEthereumTransaction",params:{fromAddress:a.fromAddress,toAddress:a.toAddress,weiValue:(0,r.bigIntStringFromBN)(a.weiValue),data:(0,r.hexStringFromBuffer)(a.data,!0),nonce:a.nonce,gasPriceInWei:a.gasPriceInWei?(0,r.bigIntStringFromBN)(a.gasPriceInWei):null,maxFeePerGas:a.maxFeePerGas?(0,r.bigIntStringFromBN)(a.maxFeePerGas):null,maxPriorityFeePerGas:a.maxPriorityFeePerGas?(0,r.bigIntStringFromBN)(a.maxPriorityFeePerGas):null,gasLimit:a.gasLimit?(0,r.bigIntStringFromBN)(a.gasLimit):null,chainId:a.chainId,shouldSubmit:!0}})}submitEthereumTransaction(a,d){return this.sendRequest({method:"submitEthereumTransaction",params:{signedTransaction:(0,r.hexStringFromBuffer)(a,!0),chainId:d}})}scanQRCode(a){return this.sendRequest({method:"scanQRCode",params:{regExp:a}})}getQRCodeUrl(){return(0,r.createQrUrl)(this._session.id,this._session.secret,this.linkAPIUrl,!1,this.options.version,this.dappDefaultChain)}genericRequest(a,d){return this.sendRequest({method:"generic",params:{action:d,data:a}})}sendGenericMessage(a){return this.sendRequest(a)}sendRequest(a){let d=null;const o=(0,r.randomBytesHex)(8),p=g=>{this.publishWeb3RequestCanceledEvent(o),this.handleErrorResponse(o,a.method,g),d==null||d()};return{promise:new Promise((g,i)=>{this.ui.isStandalone()||(d=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:p,onResetConnection:this.resetAndReload})),this.relayEventManager.callbacks.set(o,b=>{if(d==null||d(),(0,l.isErrorResponse)(b))return i(new Error(b.errorMessage));g(b)}),this.ui.isStandalone()?this.sendRequestStandalone(o,a):this.publishWeb3RequestEvent(o,a)}),cancel:p}}setConnectDisabled(a){this.ui.setConnectDisabled(a)}setAccountsCallback(a){this.accountsCallback=a}setChainCallback(a){this.chainCallback=a}setDappDefaultChainCallback(a){this.dappDefaultChain=a,this.ui instanceof u.WalletLinkRelayUI&&this.ui.setChainId(a)}publishWeb3RequestEvent(a,d){var o;const p={type:"WEB3_REQUEST",id:a,request:d},v=s.Session.load(this.storage);(o=this.diagnostic)===null||o===void 0||o.log(n.EVENTS.WEB3_REQUEST,{eventId:p.id,method:`relay::${d.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:v?s.Session.hash(v.id):"",isSessionMismatched:((v==null?void 0:v.id)!==this._session.id).toString()}),this.publishEvent("Web3Request",p,!0).then(g=>{var i;(i=this.diagnostic)===null||i===void 0||i.log(n.EVENTS.WEB3_REQUEST_PUBLISHED,{eventId:p.id,method:`relay::${d.method}`,sessionIdHash:this.getSessionIdHash(),storedSessionIdHash:v?s.Session.hash(v.id):"",isSessionMismatched:((v==null?void 0:v.id)!==this._session.id).toString()})}).catch(g=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:p.id,response:{method:d.method,errorMessage:g.message}})})}publishWeb3RequestCanceledEvent(a){const d={type:"WEB3_REQUEST_CANCELED",id:a};this.publishEvent("Web3RequestCanceled",d,!1).then()}publishEvent(a,d,o){return this.connection.publishEvent(a,d,o)}handleWeb3ResponseMessage(a){var d;const{response:o}=a;if((d=this.diagnostic)===null||d===void 0||d.log(n.EVENTS.WEB3_RESPONSE,{eventId:a.id,method:`relay::${o.method}`,sessionIdHash:this.getSessionIdHash()}),o.method==="requestEthereumAccounts"){Ke.accountRequestCallbackIds.forEach(p=>this.invokeCallback(Object.assign(Object.assign({},a),{id:p}))),Ke.accountRequestCallbackIds.clear();return}this.invokeCallback(a)}handleErrorResponse(a,d,o,p){var v;const g=(v=o==null?void 0:o.message)!==null&&v!==void 0?v:(0,e.getMe
2ssageFromCode)(p);this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:a,response:{method:d,errorMessage:g,errorCode:p}})}invokeCallback(a){const d=this.relayEventManager.callbacks.get(a.id);d&&(d(a.response),this.relayEventManager.callbacks.delete(a.id))}requestEthereumAccounts(){const a={method:"requestEthereumAccounts",params:{appName:this.appName,appLogoUrl:this.appLogoUrl||null}},d=(0,r.randomBytesHex)(8),o=v=>{this.publishWeb3RequestCanceledEvent(d),this.handleErrorResponse(d,a.method,v)};return{promise:new Promise((v,g)=>{if(this.relayEventManager.callbacks.set(d,i=>{if(this.ui.hideRequestEthereumAccounts(),(0,l.isErrorResponse)(i))return g(new Error(i.errorMessage));v(i)}),this.ui.inlineAccountsResponse()){const i=b=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:d,response:{method:"requestEthereumAccounts",result:b}})};this.ui.requestEthereumAccounts({onCancel:o,onAccounts:i})}else{const i=e.standardErrors.provider.userRejectedRequest("User denied account authorization");this.ui.requestEthereumAccounts({onCancel:()=>o(i)})}Ke.accountRequestCallbackIds.add(d),!this.ui.inlineAccountsResponse()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(d,a)}),cancel:o}}selectProvider(a){const d={method:"selectProvider"},o=(0,r.randomBytesHex)(8),p=g=>{this.publishWeb3RequestCanceledEvent(o),this.handleErrorResponse(o,d.method,g)},v=new Promise((g,i)=>{this.relayEventManager.callbacks.set(o,_=>{if((0,l.isErrorResponse)(_))return i(new Error(_.errorMessage));g(_)});const b=_=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:o,response:{method:"selectProvider",result:t.ProviderType.Unselected}})},m=_=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:o,response:{method:"selectProvider",result:_}})};this.ui.selectProvider&&this.ui.selectProvider({onApprove:m,onCancel:b,providerOptions:a})});return{cancel:p,promise:v}}watchAsset(a,d,o,p,v,g){const i={method:"watchAsset",params:{type:a,options:{address:d,symbol:o,decimals:p,image:v},chainId:g}};let b=null;const m=(0,r.randomBytesHex)(8),_=k=>{this.publishWeb3RequestCanceledEvent(m),this.handleErrorResponse(m,i.method,k),b==null||b()};this.ui.inlineWatchAsset()||(b=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:_,onResetConnection:this.resetAndReload}));const S=new Promise((k,R)=>{this.relayEventManager.callbacks.set(m,L=>{if(b==null||b(),(0,l.isErrorResponse)(L))return R(new Error(L.errorMessage));k(L)});const M=L=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:m,response:{method:"watchAsset",result:!1}})},T=()=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:m,response:{method:"watchAsset",result:!0}})};this.ui.inlineWatchAsset()&&this.ui.watchAsset({onApprove:T,onCancel:M,type:a,address:d,symbol:o,decimals:p,image:v,chainId:g}),!this.ui.inlineWatchAsset()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(m,i)});return{cancel:_,promise:S}}addEthereumChain(a,d,o,p,v,g){const i={method:"addEthereumChain",params:{chainId:a,rpcUrls:d,blockExplorerUrls:p,chainName:v,iconUrls:o,nativeCurrency:g}};let b=null;const m=(0,r.randomBytesHex)(8),_=k=>{this.publishWeb3RequestCanceledEvent(m),this.handleErrorResponse(m,i.method,k),b==null||b()};return this.ui.inlineAddEthereumChain(a)||(b=this.ui.showConnecting({isUnlinkedErrorState:this.isUnlinkedErrorState,onCancel:_,onResetConnection:this.resetAndReload})),{promise:new Promise((k,R)=>{this.relayEventManager.callbacks.set(m,L=>{if(b==null||b(),(0,l.isErrorResponse)(L))return R(new Error(L.errorMessage));k(L)});const M=L=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:m,response:{method:"addEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},T=L=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:m,response:{method:"addEthereumChain",result:{isApproved:!0,rpcUrl:L}}})};this.ui.inlineAddEthereumChain(a)&&this.ui.addEthereumChain({onCancel:M,onApprove:T,chainId:i.params.chainId,rpcUrls:i.params.rpcUrls,blockExplorerUrls:i.params.blockExplorerUrls,chainName:i.params.chainName,iconUrls:i.params.iconUrls,nativeCurrency:i.params.nativeCurrency}),!this.ui.inlineAddEthereumChain(a)&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(m,i)}),cancel:_}}switchEthereumChain(a,d){const o={method:"switchEthereumChain",params:Object.assign({chainId:a},{address:d})},p=(0,r.randomBytesHex)(8),v=i=>{this.publishWeb3RequestCanceledEvent(p),this.handleErrorResponse(p,o.method,i)};return{promise:new Promise((i,b)=>{this.relayEventManager.callbacks.set(p,S=>
2{if((0,l.isErrorResponse)(S)&&S.errorCode)return b(e.standardErrors.provider.custom({code:S.errorCode,message:"Unrecognized chain ID. Try adding the chain using addEthereumChain first."}));if((0,l.isErrorResponse)(S))return b(new Error(S.errorMessage));i(S)});const m=S=>{var k;if(S){const R=(k=(0,e.getErrorCode)(S))!==null&&k!==void 0?k:e.standardErrorCodes.provider.unsupportedChain;this.handleErrorResponse(p,"switchEthereumChain",S instanceof Error?S:e.standardErrors.provider.unsupportedChain(a),R)}else this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:p,response:{method:"switchEthereumChain",result:{isApproved:!1,rpcUrl:""}}})},_=S=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:p,response:{method:"switchEthereumChain",result:{isApproved:!0,rpcUrl:S}}})};this.ui.switchEthereumChain({onCancel:m,onApprove:_,chainId:o.params.chainId,address:o.params.address}),!this.ui.inlineSwitchEthereumChain()&&!this.ui.isStandalone()&&this.publishWeb3RequestEvent(p,o)}),cancel:v}}inlineAddEthereumChain(a){return this.ui.inlineAddEthereumChain(a)}getSessionIdHash(){return s.Session.hash(this._session.id)}sendRequestStandalone(a,d){const o=v=>{this.handleErrorResponse(a,d.method,v)},p=v=>{this.handleWeb3ResponseMessage({type:"WEB3_RESPONSE",id:a,response:v})};switch(d.method){case"signEthereumMessage":this.ui.signEthereumMessage({request:d,onSuccess:p,onCancel:o});break;case"signEthereumTransaction":this.ui.signEthereumTransaction({request:d,onSuccess:p,onCancel:o});break;case"submitEthereumTransaction":this.ui.submitEthereumTransaction({request:d,onSuccess:p,onCancel:o});break;case"ethereumAddressFromSignedMessage":this.ui.ethereumAddressFromSignedMessage({request:d,onSuccess:p});break;default:o();break}}};return ft.WalletLinkRelay=h,h.accountRequestCallbackIds=new Set,ft}var It={},qe={},Fe={},La;function Fd(){return La||(La=1,(function(e){var t=Fe&&Fe.__createBinding||(Object.create?(function(n,f,s,c){c===void 0&&(c=s);var l=Object.getOwnPropertyDescriptor(f,s);(!l||("get"in l?!f.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return f[s]}}),Object.defineProperty(n,c,l)}):(function(n,f,s,c){c===void 0&&(c=s),n[c]=f[s]})),r=Fe&&Fe.__exportStar||function(n,f){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(f,s)&&t(f,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(Du(),e)})(Fe)),Fe}var er={},Oa;function jd(){return Oa||(Oa=1,Object.defineProperty(er,"__esModule",{value:!0}),er.default=".-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;transition:opacity .25s;background-color:rgba(10,11,13,.5)}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-backdrop-hidden{opacity:0}
2.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%, -50%);padding:20px;border-radius:8px;background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box p{display:block;font-weight:400;font-size:14px;line-height:20px;padding-bottom:12px;color:#5b636e}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box button{appearance:none;border:none;background:none;color:#0052ff;padding:0;text-decoration:none;display:block;font-weight:600;font-size:16px;line-height:24px}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark{background-color:#0a0b0d;color:#fff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.dark button{color:#0052ff}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light{background-color:#fff;color:#0a0b0d}.-cbwsdk-css-reset .-cbwsdk-redirect-dialog-box.light button{color:#0052ff}"),er}var Da;function Ud(){if(Da)return qe;Da=1;var e=qe&&qe.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(qe,"__esModule",{value:!0}),qe.RedirectDialog=void 0;const t=e($t),r=de,n=Lu(),f=Fd(),s=e(jd());let c=class{constructor(){this.root=null}attach(){const h=document.documentElement;this.root=document.createElement("div"),this.root.className="-cbwsdk-css-reset",h.appendChild(this.root),(0,n.injectCssReset)()}present(h){this.render(h)}clear(){this.render(null)}render(h){this.root&&((0,r.render)(null,this.root),h&&(0,r.render)((0,r.h)(l,Object.assign({},h,{onDismiss:()=>{this.clear()}})),this.root))}};qe.RedirectDialog=c;const l=({title:u,buttonText:h,darkMode:y,onButtonClick:a,onDismiss:d})=>{const o=y?"dark":"light";return(0,r.h)(f.SnackbarContainer,{darkMode:y},(0,r.h)("div",{class:"-cbwsdk-redirect-dialog"},(0,r.h)("style",null,s.default),(0,r.h)("div",{class:"-cbwsdk-redirect-dialog-backdrop",onClick:d}),(0,r.h)("div",{class:(0,t.default)("-cbwsdk-redirect-dialog-box",o)},(0,r.h)("p",null,u),(0,r.h)("button",{onClick:a},h))))};return qe}var qa;function ju(){if(qa)return It;qa=1,Object.defineProperty(It,"__esModule",{value:!0}),It.MobileRelayUI=void 0;const e=Ud();let t=class{constructor(n){this.attached=!1,this.darkMode=!1,this.redirectDialog=new e.RedirectDialog,this.darkMode=n.darkMode}attach(){if(this.attached)throw new Error("Coinbase Wallet SDK UI is already attached");this.redirectDialog.attach(),this.attached=!0}setConnected(n){}redirectToCoinbaseWallet(n){const f=new URL("https://go.cb-w.com/walletlink");f.searchParams.append("redirect_url",window.location.href),n&&f.searchParams.append("wl_url",n);const s=document.createElement("a");s.target="cbw-opener",s.href=f.href,s.rel="noreferrer noopener",s.click()}openCoinbaseWalletDeeplink(n){this.redirectDialog.present({title:"Redirecting to Coinbase Wallet...",buttonText:"Open",darkMode:this.darkMode,onButtonClick:()=>{this.redirectToCoinbaseWallet(n)}}),setTimeout(()=>{this.redirectToCoinbaseWallet(n)},99)}showConnecting(n){return()=>{this.redirectDialog.clear()}}hideRequestEthereumAccounts(){this.redirectDialog.clear()}requestEthereumAccounts(){}addEthereumChain(){}watchAsset(){}selectProvider(){}switchEthereumChain(){}signEthereumMessage(){}signEthereumTransaction(){}submitEthereumTransaction(){}ethereumAddressFromSignedMessage(){}reloadUI(){}setStandalone(){}setConnectDisabled(){}inlineAccountsResponse(){return!1}inlineAddEthereumChain(){return!1}inlineWatchAsset(){return!1}inlineSwitchEthereumChain(){return!1}isStandalone(){return!1}};return It.MobileRelayUI=t,It}var Fa;
2function Uu(){if(Fa)return ht;Fa=1,Object.defineProperty(ht,"__esModule",{value:!0}),ht.MobileRelay=void 0;const e=Ce(),t=Fu(),r=ju();let n=class extends t.WalletLinkRelay{constructor(s){var c;super(s),this._enableMobileWalletLink=(c=s.enableMobileWalletLink)!==null&&c!==void 0?c:!1}requestEthereumAccounts(){return this._enableMobileWalletLink?super.requestEthereumAccounts():{promise:new Promise(()=>{const s=(0,e.getLocation)();s.href=`https://go.cb-w.com/dapp?cb_url=${encodeURIComponent(s.href)}`}),cancel:()=>{}}}publishWeb3RequestEvent(s,c){if(super.publishWeb3RequestEvent(s,c),!(this._enableMobileWalletLink&&this.ui instanceof r.MobileRelayUI))return;let l=!1;switch(c.method){case"requestEthereumAccounts":case"connectAndSignIn":l=!0,this.ui.openCoinbaseWalletDeeplink(this.getQRCodeUrl());break;case"switchEthereumChain":return;default:l=!0,this.ui.openCoinbaseWalletDeeplink();break}l&&window.addEventListener("blur",()=>{window.addEventListener("focus",()=>{this.connection.checkUnseenEvents()},{once:!0})},{once:!0})}handleWeb3ResponseMessage(s){super.handleWeb3ResponseMessage(s)}connectAndSignIn(s){if(!this._enableMobileWalletLink)throw new Error("connectAndSignIn is supported only when enableMobileWalletLink is on");return this.sendRequest({method:"connectAndSignIn",params:{appName:this.appName,appLogoUrl:this.appLogoUrl,domain:window.location.hostname,aud:window.location.href,version:"1",type:"eip4361",nonce:s.nonce,iat:new Date().toISOString(),chainId:`eip155:${this.dappDefaultChain}`,statement:s.statement,resources:s.resources}})}};return ht.MobileRelay=n,ht}var tr={exports:{}},mi,ja;function Hu(){return ja||(ja=1,mi=ar().EventEmitter),mi}var _i,Ua;function Hd(){if(Ua)return _i;Ua=1;function e(p,v){var g=Object.keys(p);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(p);v&&(i=i.filter(function(b){return Object.getOwnPropertyDescriptor(p,b).enumerable})),g.push.apply(g,i)}return g}function t(p){for(var v=1;v<arguments.length;v++){var g=arguments[v]!=null?arguments[v]:{};v%2?e(Object(g),!0).forEach(function(i){r(p,i,g[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(g)):e(Object(g)).forEach(function(i){Object.defineProperty(p,i,Object.getOwnPropertyDescriptor(g,i))})}return p}function r(p,v,g){return v=c(v),v in p?Object.defineProperty(p,v,{value:g,enumerable:!0,configurable:!0,writable:!0}):p[v]=g,p}function n(p,v){if(!(p instanceof v))throw new TypeError("Cannot call a class as a function")}function f(p,v){for(var g=0;g<v.length;g++){var i=v[g];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(p,c(i.key),i)}}function s(p,v,g){return v&&f(p.prototype,v),Object.defineProperty(p,"prototype",{writable:!1}),p}function c(p){var v=l(p,"string");return typeof v=="symbol"?v:String(v)}function l(p,v){if(typeof p!="object"||p===null)return p;var g=p[Symbol.toPrimitive];if(g!==void 0){var i=g.call(p,v);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}var u=ms(),h=u.Buffer,y=Eu,a=y.inspect,d=a&&a.custom||"inspect";function o(p,v,g){h.prototype.copy.call(p,v,g)}return _i=(function(){function p(){n(this,p),this.head=null,this.tail=null,this.length=0}return s(p,[{key:"push",value:function(g){var i={data:g,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(g){var i={data:g,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var i=this.head,b=""+i.data;i=i.next;)b+=g+i.data;return b}},{key:"concat",value:function(g){if(this.length===0)return h.alloc(0);for(var i=h.allocUnsafe(g>>>0),b=this.head,m=0;b;)o(b.data,i,m),m+=b.data.length,b=b.next;return i}},{key:"consume",value:function(g,i){var b;return g<this.head.data.length?(b=this.head.data.slice(0,g),this.head.data=this.head.data.slice(g)):g===this.head.data.length?b=this.shift():b=i?this._getString(g):this._getBuffer(g),b}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(g){var i=this.head,b=1,m=i.data;for(g-=m.length;i=i.next;){var _=i.data,S=g>_.length?_.length:g;if(S===_.length?m+=_:m+=_.slice(0,g),g-=S,g===0){S===_.length?(++b,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=_.slice(S));break}++b}return this.length-=b,m}},{key:"_getBuffer",value:function(g){var i=h.allocUnsafe(g),b=this.head,m=1;for(b.data.copy(i),g-=b.data.length;b=b.next;){var _=b.data,S=g>_.length?_.length:g;if(_.copy(i,i.length-g,0,S),g-=S,g===0){S===_.length?(++m,b.next?this.head=b.next:this.head=this.tail=null):(this.head=b,b.data=_.slice(S));break}++m}return this.length-=m,i}},{key:d,value:function(g,i){return a(this,t(t({},i),{},{depth:0,customInspect:!1}))}}]),p})(),_i}var wi,Ha;function Wu(){if(Ha)return wi;Ha=1;function e(c,l){var u=this,h=this._readableState&&this._readableState.destroyed,y=this._writableState&&this._writableState.destroyed;return h||y?(l?l(c):c&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(f,this,c)):process.nextTick(f,this,c)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(c||null,function(a){!l&&a?u._writableState?u._writableState.errorEmitted?process.nextTick(r,u):(u._writableState.errorEmitted=!0,process.nextTick(t,u,a)):process.nextTick(t,u,a):l?(process.nextTick(r,u),l(a)):process.nextTick(r,u)}),this)}function t(c,l){f(c,l),r(c)}function r(c){c._writableState&&!c._writableState.emitClose||c._readableState&&!c._readableState.emitClose||c.emit("close")}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function f(c,l){c.emit("error",l)}function s(c,l){var u=c._readableState,h=c._writableState;u&&u.autoDestroy||h&&h.autoDestroy?c.destroy(l):c.emit("error",l)}return wi={destroy:e,undestroy:n,errorOrDestroy:s},wi}var Ei={},Wa;function rt(){if(Wa)return Ei;Wa=1;function e(l,u){l.prototype=Object.create(u.prototype),l.prototype.constructor=l,l.__proto__=u}var t={};function r(l,u,h){h||(h=Error);function y(d,o,p){return typeof u=="string"?u:u(d,o,p)}var a=(function(d){e(o,d);function o(p,v,g){return d.call(this,y(p,v,g))||this}return o}
vendor: 11,859 bytes, line 2
2)(h);a.prototype.name=h.name,a.prototype.code=l,t[l]=a}function n(l,u){if(Array.isArray(l)){var h=l.length;return l=l.map(function(y){return String(y)}),h>2?"one of ".concat(u," ").concat(l.slice(0,h-1).join(", "),", or ")+l[h-1]:h===2?"one of ".concat(u," ").concat(l[0]," or ").concat(l[1]):"of ".concat(u," ").concat(l[0])}else return"of ".concat(u," ").concat(String(l))}function f(l,u,h){return l.substr(0,u.length)===u}function s(l,u,h){return(h===void 0||h>l.length)&&(h=l.length),l.substring(h-u.length,h)===u}function c(l,u,h){return typeof h!="number"&&(h=0),h+u.length>l.length?!1:l.indexOf(u,h)!==-1}return r("ERR_INVALID_OPT_VALUE",function(l,u){return'The value "'+u+'" is invalid for option "'+l+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(l,u,h){var y;typeof u=="string"&&f(u,"not ")?(y="must not be",u=u.replace(/^not /,"")):y="must be";var a;if(s(l," argument"))a="The ".concat(l," ").concat(y," ").concat(n(u,"type"));else{var d=c(l,".")?"property":"argument";a='The "'.concat(l,'" ').concat(d," ").concat(y," ").concat(n(u,"type"))}return a+=". Received type ".concat(typeof h),a},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(l){return"The "+l+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(l){return"Cannot call "+l+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(l){return"Unknown encoding: "+l},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Ei.codes=t,Ei}var Si,$a;function $u(){if($a)return Si;$a=1;var e=rt().codes.ERR_INVALID_OPT_VALUE;function t(n,f,s){return n.highWaterMark!=null?n.highWaterMark:f?n[s]:null}function r(n,f,s,c){var l=t(f,c,s);if(l!=null){if(!(isFinite(l)&&Math.floor(l)===l)||l<0){var u=c?s:"highWaterMark";throw new e(u,l)}return Math.floor(l)}return n.objectMode?16:16*1024}return Si={getHighWaterMark:r},Si}var Ri,Va;function Wd(){if(Va)return Ri;Va=1,Ri=e;function e(r,n){if(t("noDeprecation"))return r;var f=!1;function s(){if(!f){if(t("throwDeprecation"))throw new Error(n);t("traceDeprecation")?console.trace(n):console.warn(n),f=!0}return r.apply(this,arguments)}return s}function t(r){try{if(!globalThis.localStorage)return!1}catch{return!1}var n=globalThis.localStorage[r];return n==null?!1:String(n).toLowerCase()==="true"}return Ri}var ki,za;function Vu(){if(za)return ki;za=1,ki=M;function e(A){var C=this;this.next=null,this.entry=null,this.finish=function(){Q(C,A)}}var t;M.WritableState=k;var r={deprecate:Wd()},n=Hu(),f=ms().Buffer,s=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function c(A){return f.from(A)}function l(A){return f.isBuffer(A)||A instanceof s}var u=Wu(),h=$u(),y=h.getHighWaterMark,a=rt().codes,d=a.ERR_INVALID_ARG_TYPE,o=a.ERR_METHOD_NOT_IMPLEMENTED,p=a.ERR_MULTIPLE_CALLBACK,v=a.ERR_STREAM_CANNOT_PIPE,g=a.ERR_STREAM_DESTROYED,i=a.ERR_STREAM_NULL_VALUES,b=a.ERR_STREAM_WRITE_AFTER_END,m=a.ERR_UNKNOWN_ENCODING,_=u.errorOrDestroy;_e()(M,n);function S(){}function k(A,C,P){t=t||et(),A=A||{},typeof P!="boolean"&&(P=C instanceof t),this.objectMode=!!A.objectMode,P&&(this.objectMode=this.objectMode||!!A.writableObjectMode),this.highWaterMark=y(this,A,"writableHighWaterMark",P),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var O=A.decodeStrings===!1;this.decodeStrings=!O,this.defaultEncoding=A.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(D){I(C,D)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=A.emitClose!==!1,this.autoDestroy=!!A.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}k.prototype.getBuffer=function(){for(var C=this.bufferedRequest,P=[];C;)P.push(C),C=C.next;return P},(function(){try{Object.defineProperty(k.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var R;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(R=Function.prototype[Symbol.hasInstance],Object.defineProperty(M,Symbol.hasInstance,{value:function(C){return R.call(this,C)?!0:this!==M?!1:C&&C._writableState instanceof k}})):R=function(C){return C instanceof this};function M(A){t=t||et();var C=this instanceof t;if(!C&&!R.call(M,this))return new M(A);this._writableState=new k(A,this,C),this.writable=!0,A&&(typeof A.write=="function"&&(this._write=A.write),typeof A.writev=="function"&&(this._writev=A.writev),typeof A.destroy=="function"&&(this._destroy=A.destroy),typeof A.final=="function"&&(this._final=A.final)),n.call(this)}M.prototype.pipe=function(){_(this,new v)};function T(A,C){var P=new b;_(A,P),process.nextTick(C,P)}function L(A,C,P,O){var D;return P===null?D=new i:typeof P!="string"&&!C.objectMode&&(D=new d("chunk",["string","Buffer"],P)),D?(_(A,D),process.nextTick(O,D),!1):!0}M.prototype.write=function(A,C,P){var O=this._writableState,D=!1,w=!O.objectMode&&l(A);return w&&!f.isBuffer(A)&&(A=c(A)),typeof C=="function"&&(P=C,C=null),w?C="buffer":C||(C=O.defaultEncoding),typeof P!="function"&&(P=S),O.ending?T(this,P):(w||L(this,O,A,P))&&(O.pendingcb++,D=F(this,O,w,A,C,P)),D},M.prototype.cork=function(){this._writableState.corked++},M.prototype.uncork=function(){var A=this._writableState;A.corked&&(A.corked--,!A.writing&&!A.corked&&!A.bufferProcessing&&A.bufferedRequest&&W(this,A))},M.prototype.setDefaultEncoding=function(C){if(typeof C=="string"&&(C=C.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((C+"").toLowerCase())>-1))throw new m(C);return this._writableState.defaultEncoding=C,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function q(A,C,P){return!A.objectMode&&A.decodeStrings!==!1&&typeof C=="string"&&(C=f.from(C,P)),C}Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F(A,C,P,O,D,w){if(!P){var E=q(C,O,D);O!==E&&(P=!0,D="buffer",O=E)}var x=C.objectMode?1:O.length;C.length+=x;var B=C.length<C.highWaterMark;if(B||(C.needDrain=!0),C.writing||C.corked){var G=C.lastBufferedRequest;C.lastBufferedRequest={chunk:O,encoding:D,isBuf:P,callback:w,next:null},G?G.next=C.lastBufferedRequest:C.bufferedRequest=C.lastBufferedRequest,C.bufferedRequestCount+=1}else z(A,C,!1,x,O,D,w);return B}function z(A,C,P,O,D,w,E){C.writelen=O,C.writecb=E,C.writing=!0,C.sync=!0,C.destroyed?C.onwrite(new g("write")):P?A._writev(D,C.onwrite):A._write(D,w,C.onwrite),C.sync=!1}function V(A,C,P,O,D){--C.pendingcb,P?(process.nextTick(D,O),process.nextTick(Y,A,C),A._writableState.errorEmitted=!0,_(A,O)):(D(O),A._writableState.errorEmitted=!0,_(A,O),Y(A,C))}function $(A){A.writing=!1,A.writecb=null,A.length-=A.writelen,A.writelen=0}function I(A,C){var P=A._writableState,O=P.sync,D=P.writecb;if(typeof D!="function")throw new p;if($(P),C)V(A,P,O,C,D);else{var w=X(P)||A.destroyed;!w&&!P.corked&&!P.bufferProcessing&&P.bufferedRequest&&W(A,P),O?process.nextTick(N,A,P,w,D):N(A,P,w,D)}}function N(A,C,P,O){P||H(A,C),C.pendingcb--,O(),Y(A,C)}function H(A,C){C.length===0&&C.needDrain&&(C.needDrain=!1,A.emit("drain"))}function W(A,C){C.bufferProcessing=!0;var P=C.bufferedRequest;if(A._writev&&P&&P.next){var O=C.bufferedRequestCount,D=new Array(O),w=C.corkedRequestsFree;w.entry=P;for(var E=0,x=!0;P;)D[E]=P,P.isBuf||(x=!1),P=P.next,E+=1;D.allBuffers=x,z(A,C,!0,C.length,D,"",w.finish),C.pendingcb++,C.lastBufferedRequest=null,w.next?(C.corkedRequestsFree=w.next,w.next=null):C.corkedRequestsFree=new e(C),C.bufferedRequestCount=0}else{for(;P;){var B=P.chunk,G=P.encoding,U=P.callback,J=C.objectMode?1:B.length;if(z(A,C,!1,J,B,G,U),P=P.next,C.bufferedRequestCount--,C.writing)break}P===null&&(C.lastBufferedRequest=null)}C.bufferedRequest=P,C.bufferProcessing=!1}M.prototype._write=function(A,C,P){P(new o("_write()"))},M.prototype._writev=null,M.prototype.end=function(A,C,P){var O=this._writableState;return typeof A=="function"?(P=A,A=null,C=null):typeof C=="function"&&(P=C,C=null),A!=null&&this.write(A,C),O.corked&&(O.corked=1,this.uncork()),O.ending||re(this,O,P),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function X(A){return A.ending&&A.length===0&&A.bufferedRequest===null&&!A.finished&&!A.writing}function ae(A,C){A._final(function(P){C.pendingcb--,P&&_(A,P),C.prefinished=!0,A.emit("prefinish"),Y(A,C)})}function te(A,C){!C.prefinished&&!C.finalCalled&&(typeof A._final=="function"&&!C.destroyed?(C.pendingcb++,C.finalCalled=!0,process.nextTick(ae,A,C)):(C.prefinished=!0,A.emit("prefinish")))}function Y(A,C){var P=X(C);if(P&&(te(A,C),C.pendingcb===0&&(C.finished=!0,A.emit("finish"),C.autoDestroy))){var O=A._readableState;(!O||O.autoDestroy&&O.endEmitted)&&A.destroy()}return P}function re(A,C,P){C.ending=!0,Y(A,C),P&&(C.finished?process.nextTick(P):A.once("finish",P)),C.ended=!0,A.writable=!1}function Q(A,C,P){var O=A.entry;for(A.entry=null;O;){var D=O.callback;C.pendingcb--,D(P),O=O.next}C.corkedRequestsFree.next=A}return Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(C){this._writableState&&(this._writableState.destroyed=C)}}),M.prototype.destroy=u.destroy,M.prototype._undestroy=u.undestroy,M.prototype._destroy=function(A,C){C(A)},ki}var Ci,Ja;function et(){if(Ja)return Ci;Ja=1;var e=Object.keys||function(h){var y=[];for(var a in h)y.push(a);return y};Ci=c;var t=zu(),r=Vu();_e()(c,t);for(var n=e(r.prototype),f=0;f<n.length;f++){var s=n[f];c.prototype[s]||(c.prototype[s]=r.prototype[s])}function c(h){if(!(this instanceof c))return new c(h);t.call(this,h),r.call(this,h),this.allowHalfOpen=!0,h&&(h.readable===!1&&(this.readable=!1),h.writable===!1&&(this.writable=!1),h.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",l)))}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function l(){this._writableState.ended||process.nextTick(u,this)}function u(h){h.end()}return Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(y){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=y,this._writableState.destroyed=y)}}),Ci}var Ai={},Ga;function Za(){if(Ga)return Ai;Ga=1;var e=ke().Buffer,t=e.isEncoding||function(i){switch(i=""+i,i&&i.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(i){if(!i)return"utf8";for(var b;;)switch(i){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";
vendor: 5,612 bytes, line 2
2case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return i;default:if(b)return;i=(""+i).toLowerCase(),b=!0}}function n(i){var b=r(i);if(typeof b!="string"&&(e.isEncoding===t||!t(i)))throw new Error("Unknown encoding: "+i);return b||i}Ai.StringDecoder=f;function f(i){this.encoding=n(i);var b;switch(this.encoding){case"utf16le":this.text=a,this.end=d,b=4;break;case"utf8":this.fillLast=u,b=4;break;case"base64":this.text=o,this.end=p,b=3;break;default:this.write=v,this.end=g;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(b)}f.prototype.write=function(i){if(i.length===0)return"";var b,m;if(this.lastNeed){if(b=this.fillLast(i),b===void 0)return"";m=this.lastNeed,this.lastNeed=0}else m=0;return m<i.length?b?b+this.text(i,m):this.text(i,m):b||""},f.prototype.end=y,f.prototype.text=h,f.prototype.fillLast=function(i){if(this.lastNeed<=i.length)return i.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);i.copy(this.lastChar,this.lastTotal-this.lastNeed,0,i.length),this.lastNeed-=i.length};function s(i){return i<=127?0:i>>5===6?2:i>>4===14?3:i>>3===30?4:i>>6===2?-1:-2}function c(i,b,m){var _=b.length-1;if(_<m)return 0;var S=s(b[_]);return S>=0?(S>0&&(i.lastNeed=S-1),S):--_<m||S===-2?0:(S=s(b[_]),S>=0?(S>0&&(i.lastNeed=S-2),S):--_<m||S===-2?0:(S=s(b[_]),S>=0?(S>0&&(S===2?S=0:i.lastNeed=S-3),S):0))}function l(i,b,m){if((b[0]&192)!==128)return i.lastNeed=0,"�";if(i.lastNeed>1&&b.length>1){if((b[1]&192)!==128)return i.lastNeed=1,"�";if(i.lastNeed>2&&b.length>2&&(b[2]&192)!==128)return i.lastNeed=2,"�"}}function u(i){var b=this.lastTotal-this.lastNeed,m=l(this,i);if(m!==void 0)return m;if(this.lastNeed<=i.length)return i.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);i.copy(this.lastChar,b,0,i.length),this.lastNeed-=i.length}function h(i,b){var m=c(this,i,b);if(!this.lastNeed)return i.toString("utf8",b);this.lastTotal=m;var _=i.length-(m-this.lastNeed);return i.copy(this.lastChar,0,_),i.toString("utf8",b,_)}function y(i){var b=i&&i.length?this.write(i):"";return this.lastNeed?b+"�":b}function a(i,b){if((i.length-b)%2===0){var m=i.toString("utf16le",b);if(m){var _=m.charCodeAt(m.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1],m.slice(0,-1)}return m}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=i[i.length-1],i.toString("utf16le",b,i.length-1)}function d(i){var b=i&&i.length?this.write(i):"";if(this.lastNeed){var m=this.lastTotal-this.lastNeed;return b+this.lastChar.toString("utf16le",0,m)}return b}function o(i,b){var m=(i.length-b)%3;return m===0?i.toString("base64",b):(this.lastNeed=3-m,this.lastTotal=3,m===1?this.lastChar[0]=i[i.length-1]:(this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1]),i.toString("base64",b,i.length-m))}function p(i){var b=i&&i.length?this.write(i):"";return this.lastNeed?b+this.lastChar.toString("base64",0,3-this.lastNeed):b}function v(i){return i.toString(this.encoding)}function g(i){return i&&i.length?this.write(i):""}return Ai}var Ii,Ka;function Ms(){if(Ka)return Ii;Ka=1;var e=rt().codes.ERR_STREAM_PREMATURE_CLOSE;function t(s){var c=!1;return function(){if(!c){c=!0;for(var l=arguments.length,u=new Array(l),h=0;h<l;h++)u[h]=arguments[h];s.apply(this,u)}}}function r(){}function n(s){return s.setHeader&&typeof s.abort=="function"}function f(s,c,l){if(typeof c=="function")return f(s,null,c);c||(c={}),l=t(l||r);var u=c.readable||c.readable!==!1&&s.readable,h=c.writable||c.writable!==!1&&s.writable,y=function(){s.writable||d()},a=s._writableState&&s._writableState.finished,d=function(){h=!1,a=!0,u||l.call(s)},o=s._readableState&&s._readableState.endEmitted,p=function(){u=!1,o=!0,h||l.call(s)},v=function(m){l.call(s,m)},g=function(){var m;if(u&&!o)return(!s._readableState||!s._readableState.ended)&&(m=new e),l.call(s,m);if(h&&!a)return(!s._writableState||!s._writableState.ended)&&(m=new e),l.call(s,m)},i=function(){s.req.on("finish",d)};return n(s)?(s.on("complete",d),s.on("abort",g),s.req?i():s.on("request",i)):h&&!s._writableState&&(s.on("end",y),s.on("close",y)),s.on("end",p),s.on("finish",d),c.error!==!1&&s.on("error",v),s.on("close",g),function(){s.removeListener("complete",d),s.removeListener("abort",g),s.removeListener("request",i),s.req&&s.req.removeListener("finish",d),s.removeListener("end",y),s.removeListener("close",y),s.removeListener("finish",d),s.removeListener("end",p),s.removeListener("error",v),s.removeListener("close",g)}}return Ii=f,Ii}var Mi,Qa;function $d(){if(Qa)return Mi;Qa=1;var e;function t(m,_,S){return _=r(_),_ in m?Object.defineProperty(m,_,{value:S,enumerable:!0,configurable:!0,writable:!0}):m[_]=S,m}function r(m){var _=n(m,"string");return typeof _=="symbol"?_:String(_)}function n(m,_){if(typeof m!="object"||m===null)return m;var S=m[Symbol.toPrimitive];if(S!==void 0){var k=S.call(m,_);if(typeof k!="object")return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return(_==="string"?String:Number)(m)}var f=Ms(),s=Symbol("lastResolve"),c=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),h=Symbol("lastPromise"),y=Symbol("handlePromise"),a=Symbol("stream");function d(m,_){return{value:m,done:_}}function o(m){var _=m[s];if(_!==null){var S=m[a].read();S!==null&&(m[h]=null,m[s]=null,m[c]=null,_(d(S,!1)))}}function p(m){process.nextTick(o,m)}function v(m,_){return function(S,k){m.then(function(){if(_[u]){S(d(void 0,!0));return}_[y](S,k)},k)}}var g=Object.getPrototypeOf(function(){}
2),i=Object.setPrototypeOf((e={get stream(){return this[a]},next:function(){var _=this,S=this[l];if(S!==null)return Promise.reject(S);if(this[u])return Promise.resolve(d(void 0,!0));if(this[a].destroyed)return new Promise(function(T,L){process.nextTick(function(){_[l]?L(_[l]):T(d(void 0,!0))})});var k=this[h],R;if(k)R=new Promise(v(k,this));else{var M=this[a].read();if(M!==null)return Promise.resolve(d(M,!1));R=new Promise(this[y])}return this[h]=R,R}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var _=this;return new Promise(function(S,k){_[a].destroy(null,function(R){if(R){k(R);return}S(d(void 0,!0))})})}),e),g),b=function(_){var S,k=Object.create(i,(S={},t(S,a,{value:_,writable:!0}),t(S,s,{value:null,writable:!0}),t(S,c,{value:null,writable:!0}),t(S,l,{value:null,writable:!0}),t(S,u,{value:_._readableState.endEmitted,writable:!0}),t(S,y,{value:function(M,T){var L=k[a].read();L?(k[h]=null,k[s]=null,k[c]=null,M(d(L,!1))):(k[s]=M,k[c]=T)},writable:!0}),S));return k[h]=null,f(_,function(R){if(R&&R.code!=="ERR_STREAM_PREMATURE_CLOSE"){var M=k[c];M!==null&&(k[h]=null,k[s]=null,k[c]=null,M(R)),k[l]=R;return}var T=k[s];T!==null&&(k[h]=null,k[s]=null,k[c]=null,T(d(void 0,!0))),k[u]=!0}),_.on("readable",p.bind(null,k)),k};return Mi=b,Mi}var xi,Ya;function Vd(){return Ya||(Ya=1,xi=function(){throw new Error("Readable.from is not available in the browser")}),xi}var Ti,Xa;function zu(){if(Xa)return Ti;Xa=1,Ti=T;var e;T.ReadableState=M,ar().EventEmitter;var t=function(E,x){return E.listeners(x).length},r=Hu(),n=ms().Buffer,f=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function s(w){return n.from(w)}function c(w){return n.isBuffer(w)||w instanceof f}var l=Eu,u;l&&l.debuglog?u=l.debuglog("stream"):u=function(){};var h=Hd(),y=Wu(),a=$u(),d=a.getHighWaterMark,o=rt().codes,p=o.ERR_INVALID_ARG_TYPE,v=o.ERR_STREAM_PUSH_AFTER_EOF,g=o.ERR_METHOD_NOT_IMPLEMENTED,i=o.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,b,m,_;_e()(T,r);var S=y.errorOrDestroy,k=["error","close","destroy","pause","resume"];function R(w,E,x){if(typeof w.prependListener=="function")return w.prependListener(E,x);!w._events||!w._events[E]?w.on(E,x):Array.isArray(w._events[E])?w._events[E].unshift(x):w._events[E]=[x,w._events[E]]}function M(w,E,x){e=e||et(),w=w||{},typeof x!="boolean"&&(x=E instanceof e),this.objectMode=!!w.objectMode,x&&(this.objectMode=this.objectMode||!!w.readableObjectMode),this.highWaterMark=d(this,w,"readableHighWaterMark",x),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=w.emitClose!==!1,this.autoDestroy=!!w.autoDestroy,this.destroyed=!1,this.defaultEncoding=w.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,w.encoding&&(b||(b=Za().StringDecoder),this.decoder=new b(w.encoding),this.encoding=w.encoding)}function T(w){if(e=e||et(),!(this instanceof T))return new T(w);var E=this instanceof e;this._readableState=new M(w,this,E),this.readable=!0,w&&(typeof w.read=="function"&&(this._read=w.read),typeof w.destroy=="function"&&(this._destroy=w.destroy)),r.call(this)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(E){this._readableState&&(this._readableState.destroyed=E)}}),T.prototype.destroy=y.destroy,T.prototype._undestroy=y.undestroy,T.prototype._destroy=function(w,E){E(w)},T.prototype.push=function(w,E){var x=this._readableState,B;return x.objectMode?B=!0:typeof w=="string"&&(E=E||x.defaultEncoding,E!==x.encoding&&(w=n.from(w,E),E=""),B=!0),L(this,w,E,!1,B)},T.prototype.unshift=function(w){return L(this,w,null,!0,!1)};function L(w,E,x,B,G){u("readableAddChunk",E);var U=w._readableState;if(E===null)U.reading=!1,I(w,U);else{var J;if(G||(J=F(U,E)),J)S(w,J);else if(U.objectMode||E&&E.length>
vendor: 9,612 bytes, line 2
20)if(typeof E!="string"&&!U.objectMode&&Object.getPrototypeOf(E)!==n.prototype&&(E=s(E)),B)U.endEmitted?S(w,new i):q(w,U,E,!0);else if(U.ended)S(w,new v);else{if(U.destroyed)return!1;U.reading=!1,U.decoder&&!x?(E=U.decoder.write(E),U.objectMode||E.length!==0?q(w,U,E,!1):W(w,U)):q(w,U,E,!1)}else B||(U.reading=!1,W(w,U))}return!U.ended&&(U.length<U.highWaterMark||U.length===0)}function q(w,E,x,B){E.flowing&&E.length===0&&!E.sync?(E.awaitDrain=0,w.emit("data",x)):(E.length+=E.objectMode?1:x.length,B?E.buffer.unshift(x):E.buffer.push(x),E.needReadable&&N(w)),W(w,E)}function F(w,E){var x;return!c(E)&&typeof E!="string"&&E!==void 0&&!w.objectMode&&(x=new p("chunk",["string","Buffer","Uint8Array"],E)),x}T.prototype.isPaused=function(){return this._readableState.flowing===!1},T.prototype.setEncoding=function(w){b||(b=Za().StringDecoder);var E=new b(w);this._readableState.decoder=E,this._readableState.encoding=this._readableState.decoder.encoding;for(var x=this._readableState.buffer.head,B="";x!==null;)B+=E.write(x.data),x=x.next;return this._readableState.buffer.clear(),B!==""&&this._readableState.buffer.push(B),this._readableState.length=B.length,this};var z=1073741824;function V(w){return w>=z?w=z:(w--,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,w|=w>>>16,w++),w}function $(w,E){return w<=0||E.length===0&&E.ended?0:E.objectMode?1:w!==w?E.flowing&&E.length?E.buffer.head.data.length:E.length:(w>E.highWaterMark&&(E.highWaterMark=V(w)),w<=E.length?w:E.ended?E.length:(E.needReadable=!0,0))}T.prototype.read=function(w){u("read",w),w=parseInt(w,10);var E=this._readableState,x=w;if(w!==0&&(E.emittedReadable=!1),w===0&&E.needReadable&&((E.highWaterMark!==0?E.length>=E.highWaterMark:E.length>0)||E.ended))return u("read: emitReadable",E.length,E.ended),E.length===0&&E.ended?P(this):N(this),null;if(w=$(w,E),w===0&&E.ended)return E.length===0&&P(this),null;var B=E.needReadable;u("need readable",B),(E.length===0||E.length-w<E.highWaterMark)&&(B=!0,u("length less than watermark",B)),E.ended||E.reading?(B=!1,u("reading or ended",B)):B&&(u("do read"),E.reading=!0,E.sync=!0,E.length===0&&(E.needReadable=!0),this._read(E.highWaterMark),E.sync=!1,E.reading||(w=$(x,E)));var G;return w>0?G=C(w,E):G=null,G===null?(E.needReadable=E.length<=E.highWaterMark,w=0):(E.length-=w,E.awaitDrain=0),E.length===0&&(E.ended||(E.needReadable=!0),x!==w&&E.ended&&P(this)),G!==null&&this.emit("data",G),G};function I(w,E){if(u("onEofChunk"),!E.ended){if(E.decoder){var x=E.decoder.end();x&&x.length&&(E.buffer.push(x),E.length+=E.objectMode?1:x.length)}E.ended=!0,E.sync?N(w):(E.needReadable=!1,E.emittedReadable||(E.emittedReadable=!0,H(w)))}}function N(w){var E=w._readableState;u("emitReadable",E.needReadable,E.emittedReadable),E.needReadable=!1,E.emittedReadable||(u("emitReadable",E.flowing),E.emittedReadable=!0,process.nextTick(H,w))}function H(w){var E=w._readableState;u("emitReadable_",E.destroyed,E.length,E.ended),!E.destroyed&&(E.length||E.ended)&&(w.emit("readable"),E.emittedReadable=!1),E.needReadable=!E.flowing&&!E.ended&&E.length<=E.highWaterMark,A(w)}function W(w,E){E.readingMore||(E.readingMore=!0,process.nextTick(X,w,E))}function X(w,E){for(;!E.reading&&!E.ended&&(E.length<E.highWaterMark||E.flowing&&E.length===0);){var x=E.length;if(u("maybeReadMore read 0"),w.read(0),x===E.length)break}E.readingMore=!1}T.prototype._read=function(w){S(this,new g("_read()"))},T.prototype.pipe=function(w,E){var x=this,B=this._readableState;switch(B.pipesCount){case 0:B.pipes=w;break;case 1:B.pipes=[B.pipes,w];break;default:B.pipes.push(w);break}B.pipesCount+=1,u("pipe count=%d opts=%j",B.pipesCount,E);var G=(!E||E.end!==!1)&&w!==process.stdout&&w!==process.stderr,U=G?oe:Ae;B.endEmitted?process.nextTick(U):x.once("end",U),w.on("unpipe",J);function J(we,Ee){u("onunpipe"),we===x&&Ee&&Ee.hasUnpiped===!1&&(Ee.hasUnpiped=!0,K())}function oe(){u("onend"),w.end()}var ce=ae(x);w.on("drain",ce);var ue=!1;function K(){u("cleanup"),w.removeListener("close",fe),w.removeListener("finish",Xe),w.removeListener("drain",ce),w.removeListener("error",le),w.removeListener("unpipe",J),x.removeListener("end",oe),x.removeListener("end",Ae),x.removeListener("data",ne),ue=!0,B.awaitDrain&&(!w._writableState||w._writableState.needDrain)&&ce()}x.on("data",ne);function ne(we){u("ondata");var Ee=w.write(we);u("dest.write",Ee),Ee===!1&&((B.pipesCount===1&&B.pipes===w||B.pipesCount>1&&D(B.pipes,w)!==-1)&&!ue&&(u("false write response, pause",B.awaitDrain),B.awaitDrain++),x.pause())}function le(we){u("onerror",we),Ae(),w.removeListener("error",le),t(w,"error")===0&&S(w,we)}R(w,"error",le);function fe(){w.removeListener("finish",Xe),Ae()}w.once("close",fe);function Xe(){u("onfinish"),w.removeListener("close",fe),Ae()}w.once("finish",Xe);function Ae(){u("unpipe"),x.unpipe(w)}return w.emit("pipe",x),B.flowing||(u("pipe resume"),x.resume()),w};function ae(w){return function(){var x=w._readableState;u("pipeOnDrain",x.awaitDrain),x.awaitDrain&&x.awaitDrain--,x.awaitDrain===0&&t(w,"data")&&(x.flowing=!0,A(w))}}T.prototype.unpipe=function(w){var E=this._readableState,x={hasUnpiped:!1};if(E.pipesCount===0)return this;if(E.pipesCount===1)return w&&w!==E.pipes?this:(w||(w=E.pipes),E.pipes=null,E.pipesCount=0,E.flowing=!1,w&&w.emit("unpipe",this,x),this);if(!w){var B=E.pipes,G=E.pipesCount;E.pipes=null,E.pipesCount=0,E.flowing=!1;for(var U=0;U<G;U++)B[U].emit("unpipe",this,{hasUnpiped:!1});return this}var J=D(E.pipes,w);return J===-1?this:(E.pipes.splice(J,1),E.pipesCount-=1,E.pipesCount===1&&(E.pipes=E.pipes[0]),w.emit("unpipe",this,x),this)},T.prototype.on=function(w,E){var x=r.prototype.on.call(this,w,E),B=this._readableState;return w==="data"?(B.readableListening=this.listenerCount("readable")>0,B.flowing!==!1&&this.resume()):w==="readable"&&!B.endEmitted&&!B.readableListening&&(B.readableListening=B.needReadable=!0,B.flowing=!1,B.emittedReadable=!1,u("on readable",B.length,B.reading),B.length?N(this):B.reading||process.nextTick(Y,this)),x},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(w,E){var x=r.prototype.removeListener.call(this,w,E);return w==="readable"&&process.nextTick(te,this),x},T.prototype.removeAllListeners=function(w){var E=r.prototype.removeAllListeners.apply(this,arguments);return(w==="readable"||w===void 0)&&process.nextTick(te,this),E};function te(w){var E=w._readableState;E.readableListening=w.listenerCount("readable")>0,E.resumeScheduled&&!E.paused?E.flowing=!0:w.listenerCount("data")>0&&w.resume()}function Y(w){u("readable nexttick read 0"),w.read(0)}T.prototype.resume=function(){var w=this._readableState;return w.flowing||(u("resume"),w.flowing=!w.readableListening,re(this,w)),w.paused=!1,this};function re(w,E){E.resumeScheduled||(E.resumeScheduled=!0,process.nextTick(Q,w,E))}function Q(w,E){u("resume",E.reading),E.reading||w.read(0),E.resumeScheduled=!1,w.emit("resume"),A(w),E.flowing&&!E.reading&&w.read(0)}T.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function A(w){var E=w._readableState;for(u("flow",E.flowing);E.flowing&&w.read()!==null;);}T.prototype.wrap=function(w){var E=this,x=this._readableState,B=!1;w.on("end",function(){if(u("wrapped end"),x.decoder&&!x.ended){var J=x.decoder.end();J&&J.length&&E.push(J)}E.push(null)}),w.on("data",function(J){if(u("wrapped data"),x.decoder&&(J=x.decoder.write(J)),!(x.objectMode&&J==null)&&!(!x.objectMode&&(!J||!J.length))){var oe=E.push(J);oe||(B=!0,w.pause())}});for(var G in w)this[G]===void 0&&typeof w[G]=="function"&&(this[G]=(function(oe){return function(){return w[oe].apply(w,arguments)}})(G));for(var U=0;U<k.length;U++)w.on(k[U],this.emit.bind(this,k[U]));return this._read=function(J){u("wrapped _read",J),B&&(B=!1,w.resume())},this},typeof Symbol=="function"&&(T.prototype[Symbol.asyncIterator]=function(){return m===void 0&&(m=$d()),m(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(E){this._readableState&&(this._readableState.flowing=E)}}),T._fromList=C,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function C(w,E){if(E.length===0)return null;var x;return E.objectMode?x=E.buffer.shift():!w||w>=E.length?(E.decoder?x=E.buffer.join(""):E.buffer.length===1?x=E.buffer.first():x=E.buffer.concat(E.length),E.buffer.clear()):x=E.buffer.consume(w,E.decoder),x}function P(w){var E=w._readableState;u("endReadable",E.endEmitted),E.endEmitted||(E.ended=!0,process.nextTick(O,E,w))}function O(w,E){if(u("endReadableNT",w.endEmitted,w.length),!w.endEmitted&&w.length===0&&(w.endEmitted=!0,E.readable=!1,E.emit("end"),w.autoDestroy)){var x=E._writableState;(!x||x.autoDestroy&&x.finished)&&E.destroy()}}typeof Symbol=="function"&&(T.from=function(w,E){return _===void 0&&(_=Vd()),_(T,w,E)});function D(w,E){for(var x=0,B=w.length;x<B;x++)if(w[x]===E)return x;return-1}return Ti}var Pi,ec;function Ju(){if(ec)return Pi;ec=1,Pi=l;var e=rt().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,r=e.ERR_MULTIPLE_CALLBACK,n=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,f=e.ERR_TRANSFORM_WITH_LENGTH_0,s=et();_e()(l,s);function c(y,a){var d=this._transformState;d.transforming=!1;var o=d.writecb;
2if(o===null)return this.emit("error",new r);d.writechunk=null,d.writecb=null,a!=null&&this.push(a),o(y);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function l(y){if(!(this instanceof l))return new l(y);s.call(this,y),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,y&&(typeof y.transform=="function"&&(this._transform=y.transform),typeof y.flush=="function"&&(this._flush=y.flush)),this.on("prefinish",u)}function u(){var y=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(a,d){h(y,a,d)}):h(this,null,null)}l.prototype.push=function(y,a){return this._transformState.needTransform=!1,s.prototype.push.call(this,y,a)},l.prototype._transform=function(y,a,d){d(new t("_transform()"))},l.prototype._write=function(y,a,d){var o=this._transformState;if(o.writecb=d,o.writechunk=y,o.writeencoding=a,!o.transforming){var p=this._readableState;(o.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},l.prototype._read=function(y){var a=this._transformState;a.writechunk!==null&&!a.transforming?(a.transforming=!0,this._transform(a.writechunk,a.writeencoding,a.afterTransform)):a.needTransform=!0},l.prototype._destroy=function(y,a){s.prototype._destroy.call(this,y,function(d){a(d)})};function h(y,a,d){if(a)return y.emit("error",a);if(d!=null&&y.push(d),y._writableState.length)throw new f;if(y._transformState.transforming)throw new n;return y.push(null)}return Pi}var Bi,tc;function zd(){if(tc)return Bi;tc=1,Bi=t;var e=Ju();_e()(t,e);function t(r){if(!(this instanceof t))return new t(r);e.call(this,r)}return t.prototype._transform=function(r,n,f){f(null,r)},Bi}var Ni,rc;function Jd(){if(rc)return Ni;rc=1;var e;function t(d){var o=!1;return function(){o||(o=!0,d.apply(void 0,arguments))}}var r=rt().codes,n=r.ERR_MISSING_ARGS,f=r.ERR_STREAM_DESTROYED;function s(d){if(d)throw d}function c(d){return d.setHeader&&typeof d.abort=="function"}function l(d,o,p,v){v=t(v);var g=!1;d.on("close",function(){g=!0}),e===void 0&&(e=Ms()),e(d,{readable:o,writable:p},function(b){if(b)return v(b);g=!0,v()});var i=!1;return function(b){if(!g&&!i){if(i=!0,c(d))return d.abort();if(typeof d.destroy=="function")return d.destroy();v(b||new f("pipe"))}}}function u(d){d()}function h(d,o){return d.pipe(o)}function y(d){return!d.length||typeof d[d.length-1]!="function"?s:d.pop()}function a(){for(var d=arguments.length,o=new Array(d),p=0;p<d;p++)o[p]=arguments[p];var v=y(o);if(Array.isArray(o[0])&&(o=o[0]),o.length<2)throw new n("streams");var g,i=o.map(function(b,m){var _=m<o.length-1,S=m>0;return l(b,_,S,function(k){g||(g=k),k&&i.forEach(u),!_&&(i.forEach(u),v(g))})});return o.reduce(h)}return Ni=a,Ni}var nc;function Gu(){return nc||(nc=1,(function(e,t){t=e.exports=zu(),t.Stream=t,t.Readable=t,t.Writable=Vu(),t.Duplex=et(),t.Transform=Ju(),t.PassThrough=zd(),t.finished=Ms(),t.pipeline=Jd()})(tr,tr.exports)),tr.exports}var Li,ic;function Gd(){if(ic)return Li;ic=1;const{Transform:e}=Gu();return Li=t=>class Zu extends e{constructor(n,f,s,c,l){super(l),this._rate=n,this._capacity=f,this._delimitedSuffix=s,this._hashBitLength=c,this._options=l,this._state=new t,this._state.initialize(n,f),this._finalized=!1}_transform(n,f,s){let c=null;try{this.update(n,f)}catch(l){c=l}s(c)}_flush(n){let f=null;try{this.push(this.digest())}catch(s){f=s}n(f)}update(n,f){if(!Buffer.isBuffer(n)&&typeof n!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(n)||(n=Buffer.from(n,f)),this._state.absorb(n),this}digest(n){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let f=this._state.squeeze(this._hashBitLength/8);return n!==void 0&&(f=f.toString(n)),this._resetState(),f}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const n=new Zu(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(n._state),n._finalized=this._finalized,n}},Li}var Oi,sc;function Zd(){if(sc)return Oi;sc=1;const{Transform:e}=Gu();return Oi=t=>class Ku extends e{constructor(n,f,s,c){super(c),this._rate=n,this._capacity=f,this._delimitedSuffix=s,this._options=c,this._state=new t,this._state.initialize(n,f),this._finalized=!1}_transform(n,f,s){let c=null;try{this.update(n,f)}catch(l){c=l}s(c)}_flush(){}_read(n){this.push(this.squeeze(n))}
2update(n,f){if(!Buffer.isBuffer(n)&&typeof n!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(n)||(n=Buffer.from(n,f)),this._state.absorb(n),this}squeeze(n,f){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let s=this._state.squeeze(n);return f!==void 0&&(s=s.toString(f)),s}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const n=new Ku(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(n._state),n._finalized=this._finalized,n}},Oi}var Di,oc;function Kd(){if(oc)return Di;oc=1;const e=Gd(),t=Zd();return Di=function(r){const n=e(r),f=t(r);return function(s,c){switch(typeof s=="string"?s.toLowerCase():s){case"keccak224":return new n(1152,448,null,224,c);case"keccak256":return new n(1088,512,null,256,c);case"keccak384":return new n(832,768,null,384,c);case"keccak512":return new n(576,1024,null,512,c);case"sha3-224":return new n(1152,448,6,224,c);case"sha3-256":return new n(1088,512,6,256,c);case"sha3-384":return new n(832,768,6,384,c);case"sha3-512":return new n(576,1024,6,512,c);case"shake128":return new f(1344,256,31,c);case"shake256":return new f(1088,512,31,c);default:throw new Error("Invald algorithm: "+s)}}},Di}var qi={},ac;function Qd(){if(ac)return qi;ac=1;const e=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];return qi.p1600=function(t){for(let r=0;r<24;++r){const n=t[0]^t[10]^t[20]^t[30]^t[40],f=t[1]^t[11]^t[21]^t[31]^t[41],s=t[2]^t[12]^t[22]^t[32]^t[42],c=t[3]^t[13]^t[23]^t[33]^t[43],l=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],h=t[6]^t[16]^t[26]^t[36]^t[46],y=t[7]^t[17]^t[27]^t[37]^t[47],a=t[8]^t[18]^t[28]^t[38]^t[48],d=t[9]^t[19]^t[29]^t[39]^t[49];let o=a^(s<<1|c>>>31),p=d^(c<<1|s>>>31);const v=t[0]^o,g=t[1]^p,i=t[10]^o,b=t[11]^p,m=t[20]^o,_=t[21]^p,S=t[30]^o,k=t[31]^p,R=t[40]^o,M=t[41]^p;o=n^(l<<1|u>>>31),p=f^(u<<1|l>>>31);const T=t[2]^o,L=t[3]^p,q=t[12]^o,F=t[13]^p,z=t[22]^o,V=t[23]^p,$=t[32]^o,I=t[33]^p,N=t[42]^o,H=t[43]^p;o=s^(h<<1|y>>>31),p=c^(y<<1|h>>>31);const W=t[4]^o,X=t[5]^p,ae=t[14]^o,te=t[15]^p,Y=t[24]^o,re=t[25]^p,Q=t[34]^o,A=t[35]^p,C=t[44]^o,P=t[45]^p;o=l^(a<<1|d>>>31),p=u^(d<<1|a>>>31);const O=t[6]^o,D=t[7]^p,w=t[16]^o,E=t[17]^p,x=t[26]^o,B=t[27]^p,G=t[36]^o,U=t[37]^p,J=t[46]^o,oe=t[47]^p;o=h^(n<<1|f>>>31),p=y^(f<<1|n>>>31);const ce=t[8]^o,ue=t[9]^p,K=t[18]^o,ne=t[19]^p,le=t[28]^o,fe=t[29]^p,Xe=t[38]^o,Ae=t[39]^p,we=t[48]^o,Ee=t[49]^p,pr=v,gr=g,br=b<<4|i>>>28,yr=i<<4|b>>>28,vr=m<<3|_>>>29,mr=_<<3|m>>>29,_r=k<<9|S>>>23,wr=S<<9|k>>>23,Er=R<<18|M>>>14,Sr=M<<18|R>>>14,Rr=T<<1|L>>>31,kr=L<<1|T>>>31,Cr=F<<12|q>>>20,Ar=q<<12|F>>>20,Ir=z<<10|V>>>22,Mr=V<<10|z>>>22,xr=I<<13|$>>>19,Tr=$<<13|I>>>19,Pr=N<<2|H>>>30,Br=H<<2|N>>>30,Nr=X<<30|W>>>2,Lr=W<<30|X>>>2,Or=ae<<6|te>>>26,Dr=te<<6|ae>>>26,qr=re<<11|Y>>>21,Fr=Y<<11|re>>>21,jr=Q<<15|A>>>17,Ur=A<<15|Q>>>17,Hr=P<<29|C>>>3,Wr=C<<29|P>>>3,$r=O<<28|D>>>4,Vr=D<<28|O>>>4,zr=E<<23|w>>>9,Jr=w<<23|E>>>9,Gr=x<<25|B>>>7,Zr=B<<25|x>>>7,Kr=G<<21|U>>>11,Qr=U<<21|G>>>11,Yr=oe<<24|J>>>8,Xr=J<<24|oe>>>8,en=ce<<27|ue>>>5,tn=ue<<27|ce>>>5,rn=K<<20|ne>>>12,nn=ne<<20|K>>>12,sn=fe<<7|le>>>25,on=le<<7|fe>>>25,an=Xe<<8|Ae>>>24,cn=Ae<<8|Xe>>>24,un=we<<14|Ee>>>18,ln=Ee<<14|we>>>18;t[0]=pr^~Cr&qr,t[1]=gr^~Ar&Fr,t[10]=$r^~rn&vr,t[11]=Vr^~nn&mr,t[20]=Rr^~Or&Gr,t[21]=kr^~Dr&Zr,t[30]=en^~br&Ir,t[31]=tn^~yr&Mr,t[40]=Nr^~zr&sn,t[41]=Lr^~Jr&on,t[2]=Cr^~qr&Kr,t[3]=Ar^~Fr&Qr,t[12]=rn^~vr&xr,t[13]=nn^~mr&Tr,t[22]=Or^~Gr&an,t[23]=Dr^~Zr&cn,t[32]=br^~Ir&jr,t[33]=yr^~Mr&Ur,t[42]=zr^~sn&_r,t[43]=Jr^~on&wr,t[4]=qr^~Kr&un,t[5]=Fr^~Qr&ln,t[14]=vr^~xr&Hr,t[15]=mr^~Tr&Wr,t[24]=Gr^~an&Er,t[25]=Zr^~cn&Sr,t[34]=Ir^~jr&Yr,t[35]=Mr^~Ur&Xr,t[44]=sn^~_r&Pr,t[45]=on^~wr&Br,t[6]=Kr^~un&pr,t[7]=Qr^~ln&gr,t[16]=xr^~Hr&$r,t[17]=Tr^~Wr&Vr,t[26]=an^~Er&Rr,t[27]=cn^~Sr&kr,t[36]=jr^~Yr&en,t[37]=Ur^~Xr&tn,t[46]=_r^~Pr&Nr,t[47]=wr^~Br&Lr,t[8]=un^~pr&Cr,t[9]=ln^~gr&Ar,t[18]=Hr^~$r&rn,t[19]=Wr^~Vr&nn,t[28]=Er^~Rr&Or,t[29]=Sr^~kr&Dr,t[38]=Yr^~en&br,t[39]=Xr^~tn&yr,t[48]=Pr^~Nr&zr,t[49]=Br^~Lr&Jr,t[0]^=e[r*2],t[1]^=e[r*2+1]}},qi}var Fi,cc;function Yd(){if(cc)return Fi;cc=1;const e=Qd();function t(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}return t.prototype.initialize=function(r,n){for(let f=0;f<50;++f)this.state[f]=0;this.blockSize=r/8,this.count=0,this.squeezing=!1},t.prototype.absorb=function(r){for(let n=0;n<r.length;++n)this.state[~~(this.count/4)]^=r[n]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0)},t.prototype.absorbLastFewBits=function(r){this.state[~~(this.count/4)]^=r<<8*(this.count%4),(r&128)!==0&&this.count===this.blockSize-1&&e.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),e.p1600(this.state),this.count=0,this.squeezing=!0},t.prototype.squeeze=function(r){this.squeezing||this.absorbLastFewBits(1);const n=Buffer.alloc(r);for(let f=0;f<r;++f)n[f]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(e.p1600(this.state),this.count=0);return n},t.prototype.copy=function(r){for(let n=0;n<50;++n)r.state[n]=this.state[n];r.blockSize=this.blockSize,r.count=this.count,r.squeezing=this.squeezing},Fi=t,Fi}var ji,uc;function Xd(){return uc||(uc=1,ji=Kd()(Yd())),ji}var Ui,lc;function Qu(){if(lc)return Ui;lc=1;const e=Xd(),t=or();function r(a){return Buffer.allocUnsafe(a).fill(0)}function n(a,d,o){const p=r(d);return a=s(a),o?a.length<d?(a.copy(p),p):a.slice(0,d):a.length<d?(a.copy(p,d-a.length),p):a.slice(-d)}function f(a,d){return n(a,d,!0)}function s(a){if(!Buffer.isBuffer(a))if(Array.isArray(a))a=Buffer.from(a);
2else if(typeof a=="string")h(a)?a=Buffer.from(u(y(a)),"hex"):a=Buffer.from(a);else if(typeof a=="number")a=intToBuffer(a);else if(a==null)a=Buffer.allocUnsafe(0);else if(t.isBN(a))a=a.toArrayLike(Buffer);else if(a.toArray)a=Buffer.from(a.toArray());else throw new Error("invalid type");return a}function c(a){return a=s(a),"0x"+a.toString("hex")}function l(a,d){return a=s(a),d||(d=256),e("keccak"+d).update(a).digest()}function u(a){return a.length%2?"0"+a:a}function h(a){return typeof a=="string"&&a.match(/^0x[0-9A-Fa-f]*$/)}function y(a){return typeof a=="string"&&a.startsWith("0x")?a.slice(2):a}return Ui={zeros:r,setLength:n,setLengthRight:f,isHexString:h,stripHexPrefix:y,toBuffer:s,bufferToHex:c,keccak:l},Ui}var Hi,dc;function eh(){if(dc)return Hi;dc=1;const e=Qu(),t=or();function r(o){return o.startsWith("int[")?"int256"+o.slice(3):o==="int"?"int256":o.startsWith("uint[")?"uint256"+o.slice(4):o==="uint"?"uint256":o.startsWith("fixed[")?"fixed128x128"+o.slice(5):o==="fixed"?"fixed128x128":o.startsWith("ufixed[")?"ufixed128x128"+o.slice(6):o==="ufixed"?"ufixed128x128":o}function n(o){return parseInt(/^\D+(\d+)$/.exec(o)[1],10)}function f(o){var p=/^\D+(\d+)x(\d+)$/.exec(o);return[parseInt(p[1],10),parseInt(p[2],10)]}function s(o){var p=o.match(/(.*)\[(.*?)\]$/);return p?p[2]===""?"dynamic":parseInt(p[2],10):null}function c(o){var p=typeof o;if(p==="string")return e.isHexString(o)?new t(e.stripHexPrefix(o),16):new t(o,10);if(p==="number")return new t(o);if(o.toArray)return o;throw new Error("Argument is not a number")}function l(o,p){var v,g,i,b;if(o==="address")return l("uint160",c(p));if(o==="bool")return l("uint8",p?1:0);if(o==="string")return l("bytes",new Buffer(p,"utf8"));if(h(o)){if(typeof p.length>"u")throw new Error("Not an array?");if(v=s(o),v!=="dynamic"&&v!==0&&p.length>v)throw new Error("Elements exceed array size: "+v);i=[],o=o.slice(0,o.lastIndexOf("[")),typeof p=="string"&&(p=JSON.parse(p));for(b in p)i.push(l(o,p[b]));if(v==="dynamic"){var m=l("uint256",p.length);i.unshift(m)}return Buffer.concat(i)}else{if(o==="bytes")return p=new Buffer(p),i=Buffer.concat([l("uint256",p.length),p]),p.length%32!==0&&(i=Buffer.concat([i,e.zeros(32-p.length%32)])),i;if(o.startsWith("bytes")){if(v=n(o),v<1||v>32)throw new Error("Invalid bytes<N> width: "+v);return e.setLengthRight(p,32)}else if(o.startsWith("uint")){if(v=n(o),v%8||v<8||v>256)throw new Error("Invalid uint<N> width: "+v);if(g=c(p),g.bitLength()>v)throw new Error("Supplied uint exceeds width: "+v+" vs "+g.bitLength());if(g<0)throw new Error("Supplied uint is negative");return g.toArrayLike(Buffer,"be",32)}else if(o.startsWith("int")){if(v=n(o),v%8||v<8||v>256)throw new Error("Invalid int<N> width: "+v);if(g=c(p),g.bitLength()>v)throw new Error("Supplied int exceeds width: "+v+" vs "+g.bitLength());return g.toTwos(256).toArrayLike(Buffer,"be",32)}else if(o.startsWith("ufixed")){if(v=f(o),g=c(p),g<0)throw new Error("Supplied ufixed is negative");return l("uint256",g.mul(new t(2).pow(new t(v[1]))))}else if(o.startsWith("fixed"))return v=f(o),l("int256",c(p).mul(new t(2).pow(new t(v[1]))))}throw new Error("Unsupported or invalid type: "+o)}function u(o){return o==="string"||o==="bytes"||s(o)==="dynamic"}function h(o){return o.lastIndexOf("]")===o.length-1}function y(o,p){var v=[],g=[],i=32*o.length;for(var b in o){var m=r(o[b]),_=p[b],S=l(m,_);u(m)?(v.push(l("uint256",i)),g.push(S),i+=S.length):v.push(S)}return Buffer.concat(v.concat(g))}function a(o,p){if(o.length!==p.length)throw new Error("Number of types are not matching the values");for(var v,g,i=[],b=0;b<o.length;b++){var m=r(o[b]),_=p[b];if(m==="bytes")i.push(_);else if(m==="string")i.push(new Buffer(_,"utf8"));else if(m==="bool")i.push(new Buffer(_?"01":"00","hex"));else if(m==="address")i.push(e.setLength(_,20));else if(m.startsWith("bytes")){if(v=n(m),v<1||v>32)throw new Error("Invalid bytes<N> width: "+v);i.push(e.setLengthRight(_,v))}else if(m.startsWith("uint")){if(v=n(m),v%8||v<8||v>256)throw new Error("Invalid uint<N> width: "+v);if(g=c(_),g.bitLength()>v)throw new Error("Supplied uint exceeds width: "+v+" vs "+g.bitLength());i.push(g.toArrayLike(Buffer,"be",v/8))}else if(m.startsWith("int")){if(v=n(m),v%8||v<8||v>256)throw new Error("Invalid int<N> width: "+v);if(g=c(_),g.bitLength()>v)throw new Error("Supplied int exceeds width: "+v+" vs "+g.bitLength());i.push(g.toTwos(v).toArrayLike(Buffer,"be",v/8))}else throw new Error("Unsupported or invalid type: "+m)}return Buffer.concat(i)}function d(o,p){return e.keccak(a(o,p))}return Hi={rawEncode:y,solidityPack:a,soliditySHA3:d},Hi}var Wi,hc;function th(){if(hc)return Wi;hc=1;const e=Qu(),t=eh(),r={type:"object",properties:{types:{type:"object",additionalProperties:{type:"array",items:{type:"object",properties:{name:{type:"string"},type:{type:"string"}},required:["name","type"]}}},primaryType:{type:"string"},domain:{type:"object"},message:{type:"object"}},required:["types","primaryType","domain","message"]},n={encodeData(s,c,l,u=!0){const h=["bytes32"],y=[this.hashType(s,l)];if(u){const a=(d,o,p)=>{if(l[o]!==void 0)return["bytes32",p==null?"0x0000000000000000000000000000000000000000000000000000000000000000":e.keccak(this.encodeData(o,p,l,u))];if(p===void 0)throw new Error(`missing value for field ${d} of type ${o}`);if(o==="bytes")return["bytes32",e.keccak(p)];
2if(o==="string")return typeof p=="string"&&(p=Buffer.from(p,"utf8")),["bytes32",e.keccak(p)];if(o.lastIndexOf("]")===o.length-1){const v=o.slice(0,o.lastIndexOf("[")),g=p.map(i=>a(d,v,i));return["bytes32",e.keccak(t.rawEncode(g.map(([i])=>i),g.map(([,i])=>i)))]}return[o,p]};for(const d of l[s]){const[o,p]=a(d.name,d.type,c[d.name]);h.push(o),y.push(p)}}else for(const a of l[s]){let d=c[a.name];if(d!==void 0)if(a.type==="bytes")h.push("bytes32"),d=e.keccak(d),y.push(d);else if(a.type==="string")h.push("bytes32"),typeof d=="string"&&(d=Buffer.from(d,"utf8")),d=e.keccak(d),y.push(d);else if(l[a.type]!==void 0)h.push("bytes32"),d=e.keccak(this.encodeData(a.type,d,l,u)),y.push(d);else{if(a.type.lastIndexOf("]")===a.type.length-1)throw new Error("Arrays currently unimplemented in encodeData");h.push(a.type),y.push(d)}}return t.rawEncode(h,y)},encodeType(s,c){let l="",u=this.findTypeDependencies(s,c).filter(h=>h!==s);u=[s].concat(u.sort());for(const h of u){if(!c[h])throw new Error("No type definition specified: "+h);l+=h+"("+c[h].map(({name:a,type:d})=>d+" "+a).join(",")+")"}return l},findTypeDependencies(s,c,l=[]){if(s=s.match(/^\w*/)[0],l.includes(s)||c[s]===void 0)return l;l.push(s);for(const u of c[s])for(const h of this.findTypeDependencies(u.type,c,l))!l.includes(h)&&l.push(h);return l},hashStruct(s,c,l,u=!0){return e.keccak(this.encodeData(s,c,l,u))},hashType(s,c){return e.keccak(this.encodeType(s,c))},sanitizeData(s){const c={};for(const l in r.properties)s[l]&&(c[l]=s[l]);return c.types&&(c.types=Object.assign({EIP712Domain:[]},c.types)),c},hash(s,c=!0){const l=this.sanitizeData(s),u=[Buffer.from("1901","hex")];return u.push(this.hashStruct("EIP712Domain",l.domain,l.types,c)),l.primaryType!=="EIP712Domain"&&u.push(this.hashStruct(l.primaryType,l.message,l.types,c)),e.keccak(Buffer.concat(u))}};Wi={TYPED_MESSAGE_SCHEMA:r,TypedDataUtils:n,hashForSignTypedDataLegacy:function(s){return f(s.data)},hashForSignTypedData_v3:function(s){return n.hash(s.data,!1)},hashForSignTypedData_v4:function(s){return n.hash(s.data)}};function f(s){const c=new Error("Expect argument to be non-empty array");if(typeof s!="object"||!s.length)throw c;const l=s.map(function(y){return y.type==="bytes"?e.toBuffer(y.value):y.value}),u=s.map(function(y){return y.type}),h=s.map(function(y){if(!y.name)throw c;return y.type+" "+y.name});return t.soliditySHA3(["bytes32","bytes32"],[t.soliditySHA3(new Array(s.length).fill("string"),h),t.soliditySHA3(u,l)])}return Wi}var je={},fc;function rh(){if(fc)return je;fc=1,Object.defineProperty(je,"__esModule",{value:!0}),je.filterFromParam=je.FilterPolyfill=void 0;const e=lr(),t=Ce(),r=300*1e3,n={jsonrpc:"2.0",id:0};let f=class{constructor(d){this.logFilters=new Map,this.blockFilters=new Set,this.pendingTransactionFilters=new Set,this.cursors=new Map,this.timeouts=new Map,this.nextFilterId=(0,e.IntNumber)(1),this.REQUEST_THROTTLE_INTERVAL=1e3,this.lastFetchTimestamp=new Date(0),this.resolvers=[],this.provider=d}async newFilter(d){const o=s(d),p=this.makeFilterId(),v=await this.setInitialCursorPosition(p,o.fromBlock);return console.info(`Installing new log filter(${p}):`,o,"initial cursor position:",v),this.logFilters.set(p,o),this.setFilterTimeout(p),(0,t.hexStringFromIntNumber)(p)}async newBlockFilter(){const d=this.makeFilterId(),o=await this.setInitialCursorPosition(d,"latest");return console.info(`Installing new block filter (${d}) with initial cursor position:`,o),this.blockFilters.add(d),this.setFilterTimeout(d),(0,t.hexStringFromIntNumber)(d)}async newPendingTransactionFilter(){const d=this.makeFilterId(),o=await this.setInitialCursorPosition(d,"latest");return console.info(`Installing new block filter (${d}) with initial cursor position:`,o),this.pendingTransactionFilters.add(d),this.setFilterTimeout(d),(0,t.hexStringFromIntNumber)(d)}uninstallFilter(d){const o=(0,t.intNumberFromHexString)(d);return console.info(`Uninstalling filter (${o})`),this.deleteFilter(o),!0}getFilterChanges(d){const o=(0,t.intNumberFromHexString)(d);return this.timeouts.has(o)&&this.setFilterTimeout(o),this.logFilters.has(o)?this.getLogFilterChanges(o):this.blockFilters.has(o)?this.getBlockFilterChanges(o):this.pendingTransactionFilters.has(o)?this.getPendingTransactionFilterChanges(o):Promise.resolve(h())}async getFilterLogs(d){const o=(0,t.intNumberFromHexString)(d),p=this.logFilters.get(o);return p?this.sendAsyncPromise(Object.assign(Object.assign({},n),{method:"eth_getLogs",params:[c(p)]})):h()}makeFilterId(){return(0,e.IntNumber)(++this.nextFilterId)}sendAsyncPromise(d){return new Promise((o,p)=>{this.provider.sendAsync(d,(v,g)=>{if(v)return p(v);if(Array.isArray(g)||g==null)return p(new Error(`unexpected response received: ${JSON.stringify(g)}`));o(g)})})}deleteFilter(d){console.info(`Deleting filter (${d}
2)`),this.logFilters.delete(d),this.blockFilters.delete(d),this.pendingTransactionFilters.delete(d),this.cursors.delete(d),this.timeouts.delete(d)}async getLogFilterChanges(d){const o=this.logFilters.get(d),p=this.cursors.get(d);if(!p||!o)return h();const v=await this.getCurrentBlockHeight(),g=o.toBlock==="latest"?v:o.toBlock;if(p>v||p>Number(o.toBlock))return y();console.info(`Fetching logs from ${p} to ${g} for filter ${d}`);const i=await this.sendAsyncPromise(Object.assign(Object.assign({},n),{method:"eth_getLogs",params:[c(Object.assign(Object.assign({},o),{fromBlock:p,toBlock:g}))]}));if(Array.isArray(i.result)){const b=i.result.map(_=>(0,t.intNumberFromHexString)(_.blockNumber||"0x0")),m=Math.max(...b);if(m&&m>p){const _=(0,e.IntNumber)(m+1);console.info(`Moving cursor position for filter (${d}) from ${p} to ${_}`),this.cursors.set(d,_)}}return i}async getBlockFilterChanges(d){const o=this.cursors.get(d);if(!o)return h();const p=await this.getCurrentBlockHeight();if(o>p)return y();console.info(`Fetching blocks from ${o} to ${p} for filter (${d})`);const v=(await Promise.all((0,t.range)(o,p+1).map(i=>this.getBlockHashByNumber((0,e.IntNumber)(i))))).filter(i=>!!i),g=(0,e.IntNumber)(o+v.length);return console.info(`Moving cursor position for filter (${d}) from ${o} to ${g}`),this.cursors.set(d,g),Object.assign(Object.assign({},n),{result:v})}async getPendingTransactionFilterChanges(d){return Promise.resolve(y())}async setInitialCursorPosition(d,o){const p=await this.getCurrentBlockHeight(),v=typeof o=="number"&&o>p?o:p;return this.cursors.set(d,v),v}setFilterTimeout(d){const o=this.timeouts.get(d);o&&window.clearTimeout(o);const p=window.setTimeout(()=>{console.info(`Filter (${d}) timed out`),this.deleteFilter(d)},r);this.timeouts.set(d,p)}async getCurrentBlockHeight(){const d=new Date;if(d.getTime()-this.lastFetchTimestamp.getTime()>this.REQUEST_THROTTLE_INTERVAL){this.lastFetchTimestamp=d;const o=await this._getCurrentBlockHeight();this.currentBlockHeight=o,this.resolvers.forEach(p=>p(o)),this.resolvers=[]}return this.currentBlockHeight?this.currentBlockHeight:new Promise(o=>this.resolvers.push(o))}async _getCurrentBlockHeight(){const{result:d}=await this.sendAsyncPromise(Object.assign(Object.assign({},n),{method:"eth_blockNumber",params:[]}));return(0,t.intNumberFromHexString)((0,t.ensureHexString)(d))}async getBlockHashByNumber(d){const o=await this.sendAsyncPromise(Object.assign(Object.assign({},n),{method:"eth_getBlockByNumber",params:[(0,t.hexStringFromIntNumber)(d),!1]}));return o.result&&typeof o.result.hash=="string"?(0,t.ensureHexString)(o.result.hash):null}};je.FilterPolyfill=f;function s(a){return{fromBlock:l(a.fromBlock),toBlock:l(a.toBlock),addresses:a.address===void 0?null:Array.isArray(a.address)?a.address:[a.address],topics:a.topics||[]}}je.filterFromParam=s;function c(a){const d={fromBlock:u(a.fromBlock),toBlock:u(a.toBlock),topics:a.topics};return a.addresses!==null&&(d.address=a.addresses),d}function l(a){if(a===void 0||a==="latest"||a==="pending")return"latest";if(a==="earliest")return(0,e.IntNumber)(0);if((0,t.isHexString)(a))return(0,t.intNumberFromHexString)(a);throw new Error(`Invalid block option: ${String(a)}`)}function u(a){return a==="latest"?a:(0,t.hexStringFromIntNumber)(a)}function h(){return Object.assign(Object.assign({},n),{error:{code:-32e3,message:"filter not found"}})}function y(){return Object.assign(Object.assign({},n),{result:[]})}return je}var Mt={},Ue={},He={},$i,pc;function xs(){if(pc)return $i;pc=1,$i=e;function e(t){t=t||{};var r=t.max||Number.MAX_SAFE_INTEGER,n=typeof t.start<"u"?t.start:Math.floor(Math.random()*r);return function(){return n=n%r,n++}}return $i}var Vi,gc;function nh(){if(gc)return Vi;gc=1;const e=(t,r)=>function(){const n=r.promiseModule,f=new Array(arguments.length);for(let s=0;s<arguments.length;s++)f[s]=arguments[s];return new n((s,c)=>{r.errorFirst?f.push(function(l,u){if(r.multiArgs){const h=new Array(arguments.length-1);for(let y=1;y<arguments.length;y++)h[y-1]=arguments[y];l?(h.unshift(l),c(h)):s(h)}else l?c(l):s(u)}):f.push(function(l){if(r.multiArgs){const u=new Array(arguments.length-1);for(let h=0;h<arguments.length;h++)u[h]=arguments[h];s(u)}else s(l)}),t.apply(this,f)})};return Vi=(t,r)=>{r=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},r);const n=s=>{const c=l=>typeof l=="string"?s===l:l.test(s);return r.include?r.include.some(c):!r.exclude.some(c)};let f;typeof t=="function"?f=function(){return r.excludeMain?t.apply(this,arguments):e(t,r).apply(this,arguments)}:f=Object.create(Object.getPrototypeOf(t));for(const s in t){const c=t[s];f[s]=typeof c=="function"&&n(s)?e(c,r):c}return f},Vi}var We={},rr={},bc;function Ts(){if(bc)return rr;
2bc=1,Object.defineProperty(rr,"__esModule",{value:!0});const e=ar();function t(f,s,c){try{Reflect.apply(f,s,c)}catch(l){setTimeout(()=>{throw l})}}function r(f){const s=f.length,c=new Array(s);for(let l=0;l<s;l+=1)c[l]=f[l];return c}class n extends e.EventEmitter{emit(s,...c){let l=s==="error";const u=this._events;if(u!==void 0)l=l&&u.error===void 0;else if(!l)return!1;if(l){let y;if(c.length>0&&([y]=c),y instanceof Error)throw y;const a=new Error(`Unhandled error.${y?` (${y.message})`:""}`);throw a.context=y,a}const h=u[s];if(h===void 0)return!1;if(typeof h=="function")t(h,this,c);else{const y=h.length,a=r(h);for(let d=0;d<y;d+=1)t(a[d],this,c)}return!0}}return rr.default=n,rr}var yc;function Yu(){if(yc)return We;yc=1;var e=We&&We.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(We,"__esModule",{value:!0}),We.BaseBlockTracker=void 0;const t=e(Ts()),r=1e3,n=(l,u)=>l+u,f=["sync","latest"];let s=class extends t.default{constructor(u){super(),this._blockResetDuration=u.blockResetDuration||20*r,this._usePastBlocks=u.usePastBlocks||!1,this._currentBlock=null,this._isRunning=!1,this._onNewListener=this._onNewListener.bind(this),this._onRemoveListener=this._onRemoveListener.bind(this),this._resetCurrentBlock=this._resetCurrentBlock.bind(this),this._setupInternalEvents()}async destroy(){this._cancelBlockResetTimeout(),await this._maybeEnd(),super.removeAllListeners()}isRunning(){return this._isRunning}getCurrentBlock(){return this._currentBlock}async getLatestBlock(){return this._currentBlock?this._currentBlock:await new Promise(h=>this.once("latest",h))}removeAllListeners(u){return u?super.removeAllListeners(u):super.removeAllListeners(),this._setupInternalEvents(),this._onRemoveListener(),this}_setupInternalEvents(){this.removeListener("newListener",this._onNewListener),this.removeListener("removeListener",this._onRemoveListener),this.on("newListener",this._onNewListener),this.on("removeListener",this._onRemoveListener)}_onNewListener(u){f.includes(u)&&this._maybeStart()}_onRemoveListener(){this._getBlockTrackerEventCount()>0||this._maybeEnd()}async _maybeStart(){this._isRunning||(this._isRunning=!0,this._cancelBlockResetTimeout(),await this._start(),this.emit("_started"))}async _maybeEnd(){this._isRunning&&(this._isRunning=!1,this._setupBlockResetTimeout(),await this._end(),this.emit("_ended"))}_getBlockTrackerEventCount(){return f.map(u=>this.listenerCount(u)).reduce(n)}_shouldUseNewBlock(u){const h=this._currentBlock;if(!h)return!0;const y=c(u),a=c(h);return this._usePastBlocks&&y<a||y>a}_newPotentialLatest(u){this._shouldUseNewBlock(u)&&this._setCurrentBlock(u)}_setCurrentBlock(u){const h=this._currentBlock;this._currentBlock=u,this.emit("latest",u),this.emit("sync",{oldBlock:h,newBlock:u})}_setupBlockResetTimeout(){this._cancelBlockResetTimeout(),this._blockResetTimeout=setTimeout(this._resetCurrentBlock,this._blockResetDuration),this._blockResetTimeout.unref&&this._blockResetTimeout.unref()}_cancelBlockResetTimeout(){this._blockResetTimeout&&clearTimeout(this._blockResetTimeout)}_resetCurrentBlock(){this._currentBlock=null}};We.BaseBlockTracker=s;function c(l){return Number.parseInt(l,16)}return We}var zi={},$e={},be={};class Xu extends TypeError{constructor(t,r){let n;const{message:f,explanation:s,...c}=t,{path:l}=t,u=l.length===0?f:`At path: ${l.join(".")} -- ${f}`;super(s??u),s!=null&&(this.cause=u),Object.assign(this,c),this.name=this.constructor.name,this.failures=()=>n??(n=[t,...r()])}}function ih(e){return pe(e)&&typeof e[Symbol.iterator]=="function"}function pe(e){return typeof e=="object"&&e!=null}function vc(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function ie(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function sh(e){const{done:t,value:r}=e.next();return t?void 0:r}function oh(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:f,branch:s}=t,{type:c}=r,{refinement:l,message:u=`Expected a value of type \`${c}\`${l?` with refinement \`${l}\``:""}, but received: \`${ie(n)}\``}=e;return{value:n,type:c,refinement:l,key:f[f.length-1],path:f,branch:s,...e,message:u}}function*ys(e,t,r,n){ih(e)||(e=[e]);for(const f of e){const s=oh(f,t,r,n);s&&(yield s)}}function*Ps(e,t,r={}){const{path:n=[],branch:f=[e],coerce:s=!1,mask:c=!1}=r,l={path:n,branch:f};if(s&&(e=t.coercer(e,l),c&&t.type!=="type"&&pe(t.schema)&&pe(e)&&!Array.isArray(e)))for(const h in e)t.schema[h]===void 0&&delete e[h];let u="valid";for(const h of t.validator(e,l))h.explanation=r.message,u="not_val
2id",yield[h,void 0];for(let[h,y,a]of t.entries(e,l)){const d=Ps(y,a,{path:h===void 0?n:[...n,h],branch:h===void 0?f:[...f,y],coerce:s,mask:c,message:r.message});for(const o of d)o[0]?(u=o[0].refinement!=null?"not_refined":"not_valid",yield[o[0],void 0]):s&&(y=o[1],h===void 0?e=y:e instanceof Map?e.set(h,y):e instanceof Set?e.add(y):pe(e)&&(y!==void 0||h in e)&&(e[h]=y))}if(u!=="not_valid")for(const h of t.refiner(e,l))h.explanation=r.message,u="not_refined",yield[h,void 0];u==="valid"&&(yield[void 0,e])}class ee{constructor(t){const{type:r,schema:n,validator:f,refiner:s,coercer:c=u=>u,entries:l=function*(){}}=t;this.type=r,this.schema=n,this.entries=l,this.coercer=c,f?this.validator=(u,h)=>{const y=f(u,h);return ys(y,h,this,u)}:this.validator=()=>[],s?this.refiner=(u,h)=>{const y=s(u,h);return ys(y,h,this,u)}:this.refiner=()=>[]}assert(t,r){return el(t,this,r)}create(t,r){return tl(t,this,r)}is(t){return Bs(t,this)}mask(t,r){return rl(t,this,r)}validate(t,r={}){return nt(t,this,r)}}function el(e,t,r){const n=nt(e,t,{message:r});if(n[0])throw n[0]}function tl(e,t,r){const n=nt(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function rl(e,t,r){const n=nt(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function Bs(e,t){return!nt(e,t)[0]}function nt(e,t,r={}){const n=Ps(e,t,r),f=sh(n);return f[0]?[new Xu(f[0],function*(){for(const c of n)c[0]&&(yield c[0])}),void 0]:[void 0,f[1]]}function ah(...e){const t=e[0].type==="type",r=e.map(f=>f.schema),n=Object.assign({},...r);return t?zt(n):Vt(n)}function he(e,t){return new ee({type:e,schema:null,validator:t})}function ch(e,t){return new ee({...e,refiner:(r,n)=>r===void 0||e.refiner(r,n),validator(r,n){return r===void 0?!0:(t(r,n),e.validator(r,n))}})}function uh(e){return new ee({type:"dynamic",schema:null,*entries(t,r){yield*e(t,r).entries(t,r)},validator(t,r){return e(t,r).validator(t,r)},coercer(t,r){return e(t,r).coercer(t,r)},refiner(t,r){return e(t,r).refiner(t,r)}})}function lh(e){let t;return new ee({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator(r,n){return t??(t=e()),t.validator(r,n)},coercer(r,n){return t??(t=e()),t.coercer(r,n)},refiner(r,n){return t??(t=e()),t.refiner(r,n)}})}function dh(e,t){const{schema:r}=e,n={...r};for(const f of t)delete n[f];switch(e.type){case"type":return zt(n);default:return Vt(n)}}function hh(e){const t=e instanceof ee,r=t?{...e.schema}:{...e};for(const n in r)r[n]=nl(r[n]);return t&&e.type==="type"?zt(r):Vt(r)}function fh(e,t){const{schema:r}=e,n={};for(const f of t)n[f]=r[f];switch(e.type){case"type":return zt(n);default:return Vt(n)}}function ph(e,t){return console.warn("[email protected] - The `struct` helper has been renamed to `define`."),he(e,t)}function gh(){return he("any",()=>!0)}function bh(e){return new ee({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${ie(t)}`}})}function yh(){return he("bigint",e=>typeof e=="bigint")}function vh(){return he("boolean",e=>typeof e=="boolean")}function mh(){return he("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${ie(e)}`)}function _h(e){const t={},r=e.map(n=>ie(n)).join();for(const n of e)t[n]=n;return new ee({type:"enums",schema:t,validator(n){return e.includes(n)||`Expected one of \`${r}\`, but received: ${ie(n)}`}})}function wh(){return he("func",e=>typeof e=="function"||`Expected a function, but received: ${ie(e)}`)}function Eh(e){return he("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${ie(t)}`)}function Sh(){return he("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${ie(e)}`)}function Rh(e){return new ee({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})}function kh(e){const t=ie(e),r=typeof e;return new ee({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${ie(n)}`}})}function Ch(e,t){return new ee({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,f]of r.entries())yield[n,n,e],yield[n,f,t]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${ie(r)}`}})}function Ns(){return he("never",()=>!1)}function Ah(e){return new ee({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function Ih(){return he("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${ie(e)}`)}function Vt(e){const t=e?Object.keys(e):[],r=Ns();return new ee({type:"object",schema:e||null,*entries(n){if(e&&pe(n)){const f=new Set(Object.keys(n));for(const s of t)f.delete(s),yield[s,n[s],e[s]];for(const s of f)yield[s,n[s],r]}},validator(n){return pe(n)||`Expected an object, but received: ${ie(n)}`},coercer(n){return pe(n)?{...n}:n}})}function nl(e){return new ee({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function Mh(e,t){return new ee({type:"record",schema:null,*entries(r){if(pe(r))for(const n in r){const f=r[n];yield[n,n,e],yield[n,f,t]}},validator(r){return pe(r)||`Expected an object, but received: ${ie(r)}`}})}function xh(){return he("regexp",e=>e instanceof RegExp)}function Th(e){return new ee({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer(t){return t instanceof Set?new Set(t):t},validator(t){return t instanceof Set||`Expected a \`Set\` object, but received: ${ie(t)}`}})}function il(){return he("string",e=>typeof e=="string"||`Expected a string, but received: ${ie(e)}`)}function Ph(e){const t=Ns();return new ee({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let f=0;f<n;f++)yield[f,r[f],e[f]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${ie(r)}`}})}function zt(e){const t=Object.keys(e);return new ee({type:"type",schema:e,*entries(r){if(pe(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return pe(r)||`Expected an object, but received: ${ie(r)}`},coercer(r){return pe(r)?{...r}:r}})}function Bh(e){const t=e.map(r=>r.type).join(" | ");return new ee({type:"union",schema:null,coercer(r){for(const n of e){const[f,s]=n.validate(r,{coerce:!0});if(!f)return s}return r},validator(r,n){const f=[];for(const s of e){const[...c]=Ps(r,s,n),[l]=c;if(l[0])for(const[u]of c)u&&f.push(u);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${ie(r)}`,...f]}})}function sl(){return he("unknown",()=>!0)}function Ls(e,t,r){return new ee({...e,coercer:(n,f)=>Bs(n,t)?e.coercer(r(n,f),f):e.coercer(n,f)})}function Nh(e,t,r={}){return Ls(e,sl(),n=>{const f=typeof t=="function"?t():t;if(n===void 0)return f;
2if(!r.strict&&vc(n)&&vc(f)){const s={...n};let c=!1;for(const l in f)s[l]===void 0&&(s[l]=f[l],c=!0);if(c)return s}return n})}function Lh(e){return Ls(e,il(),t=>t.trim())}function Oh(e){return Qe(e,"empty",t=>{const r=ol(t);return r===0||`Expected an empty ${e.type} but received one with a size of \`${r}\``})}function ol(e){return e instanceof Map||e instanceof Set?e.size:e.length}function Dh(e,t,r={}){const{exclusive:n}=r;return Qe(e,"max",f=>n?f<t:f<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${f}\``)}function qh(e,t,r={}){const{exclusive:n}=r;return Qe(e,"min",f=>n?f>t:f>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${f}\``)}function Fh(e){return Qe(e,"nonempty",t=>ol(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function jh(e,t){return Qe(e,"pattern",r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`)}function Uh(e,t,r=t){const n=`Expected a ${e.type}`,f=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return Qe(e,"size",s=>{if(typeof s=="number"||s instanceof Date)return t<=s&&s<=r||`${n} ${f} but received \`${s}\``;if(s instanceof Map||s instanceof Set){const{size:c}=s;return t<=c&&c<=r||`${n} with a size ${f} but received one with a size of \`${c}\``}else{const{length:c}=s;return t<=c&&c<=r||`${n} with a length ${f} but received one with a length of \`${c}\``}})}function Qe(e,t,r){return new ee({...e,*refiner(n,f){yield*e.refiner(n,f);const s=r(n,f),c=ys(s,f,e,n);for(const l of c)yield{...l,refinement:t}}})}const Hh=Object.freeze(Object.defineProperty({__proto__:null,Struct:ee,StructError:Xu,any:gh,array:bh,assert:el,assign:ah,bigint:yh,boolean:vh,coerce:Ls,create:tl,date:mh,defaulted:Nh,define:he,deprecated:ch,dynamic:uh,empty:Oh,enums:_h,func:wh,instance:Eh,integer:Sh,intersection:Rh,is:Bs,lazy:lh,literal:kh,map:Ch,mask:rl,max:Dh,min:qh,never:Ns,nonempty:Fh,nullable:Ah,number:Ih,object:Vt,omit:dh,optional:nl,partial:hh,pattern:jh,pick:fh,record:Mh,refine:Qe,regexp:xh,set:Th,size:Uh,string:il,struct:ph,trimmed:Lh,tuple:Ph,type:zt,union:Bh,unknown:sl,validate:nt},Symbol.toStringTag,{value:"Module"})),Ye=jt(Hh);var mc;function Me(){if(mc)return be;mc=1,Object.defineProperty(be,"__esModule",{value:!0}),be.assertExhaustive=be.assertStruct=be.assert=be.AssertionError=void 0;const e=Ye;function t(h){return typeof h=="object"&&h!==null&&"message"in h}function r(h){var y,a;return typeof((a=(y=h==null?void 0:h.prototype)===null||y===void 0?void 0:y.constructor)===null||a===void 0?void 0:a.name)=="string"}function n(h){const y=t(h)?h.message:String(h);return y.endsWith(".")?y.slice(0,-1):y}function f(h,y){return r(h)?new h({message:y}):h({message:y})}class s extends Error{constructor(y){super(y.message),this.code="ERR_ASSERTION"}}be.AssertionError=s;function c(h,y="Assertion failed.",a=s){if(!h)throw y instanceof Error?y:f(a,y)}be.assert=c;function l(h,y,a="Assertion failed",d=s){try{(0,e.assert)(h,y)}catch(o){throw f(d,`${a}: ${n(o)}.`)}}be.assertStruct=l;function u(h){throw new Error("Invalid branch reached. Should be detected during compilation.")}return be.assertExhaustive=u,be}var xt={},_c;function al(){if(_c)return xt;_c=1,Object.defineProperty(xt,"__esModule",{value:!0}),xt.base64=void 0;const e=Ye,t=Me(),r=(n,f={})=>{var s,c;const l=(s=f.paddingRequired)!==null&&s!==void 0?s:!1,u=(c=f.characterSet)!==null&&c!==void 0?c:"base64";let h;u==="base64"?h=String.raw`[A-Za-z0-9+\/]`:((0,t.assert)(u==="base64url"),h=String.raw`[-_A-Za-z0-9]`);let y;return l?y=new RegExp(`^(?:${h}{4})*(?:${h}{3}=|${h}{2}==)?$`,"u"):y=new RegExp(`^(?:${h}{4})*(?:${h}{2,3}|${h}{3}=|${h}{2}==)?$`,"u"),(0,e.pattern)(n,y)};return xt.base64=r,xt}var Z={},Ji={},wc;function fr(){return wc||(wc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;const t=Ye,r=Me();e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu);function n(h){return(0,t.is)(h,e.HexStruct)}e.isHexString=n;function f(h){return(0,t.is)(h,e.StrictHexStruct)}e.isStrictHexString=f;function s(h){(0,r.assert)(n(h),"Value must be a hexadecimal string.")}e.assertIsHexString=s;function c(h){(0,r.assert)(f(h),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=c;function l(h){return h.startsWith("0x")?h:h.startsWith("0X")?`0x${h.substring(2)}`:`0x${h}`}e.add0x=l;function u(h){return h.startsWith("0x")||h.startsWith("0X")?h.substring(2):h}e.remove0x=u})(Ji)),Ji}var Ec;
2function cl(){if(Ec)return Z;Ec=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.createDataView=Z.concatBytes=Z.valueToBytes=Z.stringToBytes=Z.numberToBytes=Z.signedBigIntToBytes=Z.bigIntToBytes=Z.hexToBytes=Z.bytesToString=Z.bytesToNumber=Z.bytesToSignedBigInt=Z.bytesToBigInt=Z.bytesToHex=Z.assertIsBytes=Z.isBytes=void 0;const e=Me(),t=fr(),r=48,n=58,f=87;function s(){const R=[];return()=>{if(R.length===0)for(let M=0;M<256;M++)R.push(M.toString(16).padStart(2,"0"));return R}}const c=s();function l(R){return R instanceof Uint8Array}Z.isBytes=l;function u(R){(0,e.assert)(l(R),"Value must be a Uint8Array.")}Z.assertIsBytes=u;function h(R){if(u(R),R.length===0)return"0x";const M=c(),T=new Array(R.length);for(let L=0;L<R.length;L++)T[L]=M[R[L]];return(0,t.add0x)(T.join(""))}Z.bytesToHex=h;function y(R){u(R);const M=h(R);return BigInt(M)}Z.bytesToBigInt=y;function a(R){u(R);let M=BigInt(0);for(const T of R)M=(M<<BigInt(8))+BigInt(T);return BigInt.asIntN(R.length*8,M)}Z.bytesToSignedBigInt=a;function d(R){u(R);const M=y(R);return(0,e.assert)(M<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(M)}Z.bytesToNumber=d;function o(R){return u(R),new TextDecoder().decode(R)}Z.bytesToString=o;function p(R){var M;if(((M=R==null?void 0:R.toLowerCase)===null||M===void 0?void 0:M.call(R))==="0x")return new Uint8Array;(0,t.assertIsHexString)(R);const T=(0,t.remove0x)(R).toLowerCase(),L=T.length%2===0?T:`0${T}`,q=new Uint8Array(L.length/2);for(let F=0;F<q.length;F++){const z=L.charCodeAt(F*2),V=L.charCodeAt(F*2+1),$=z-(z<n?r:f),I=V-(V<n?r:f);q[F]=$*16+I}return q}Z.hexToBytes=p;function v(R){(0,e.assert)(typeof R=="bigint","Value must be a bigint."),(0,e.assert)(R>=BigInt(0),"Value must be a non-negative bigint.");const M=R.toString(16);return p(M)}Z.bigIntToBytes=v;function g(R,M){(0,e.assert)(M>0);const T=R>>BigInt(31);return!((~R&T)+(R&~T)>>BigInt(M*8+-1))}function i(R,M){(0,e.assert)(typeof R=="bigint","Value must be a bigint."),(0,e.assert)(typeof M=="number","Byte length must be a number."),(0,e.assert)(M>0,"Byte length must be greater than 0."),(0,e.assert)(g(R,M),"Byte length is too small to represent the given value.");let T=R;const L=new Uint8Array(M);for(let q=0;q<L.length;q++)L[q]=Number(BigInt.asUintN(8,T)),T>>=BigInt(8);return L.reverse()}Z.signedBigIntToBytes=i;function b(R){(0,e.assert)(typeof R=="number","Value must be a number."),(0,e.assert)(R>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(R),"Value is not a safe integer. Use `bigIntToBytes` instead.");const M=R.toString(16);return p(M)}Z.numberToBytes=b;function m(R){return(0,e.assert)(typeof R=="string","Value must be a string."),new TextEncoder().encode(R)}Z.stringToBytes=m;function _(R){if(typeof R=="bigint")return v(R);if(typeof R=="number")return b(R);if(typeof R=="string")return R.startsWith("0x")?p(R):m(R);if(l(R))return R;throw new TypeError(`Unsupported value type: "${typeof R}".`)}Z.valueToBytes=_;function S(R){const M=new Array(R.length);let T=0;for(let q=0;q<R.length;q++){const F=_(R[q]);M[q]=F,T+=F.length}const L=new Uint8Array(T);for(let q=0,F=0;q<M.length;q++)L.set(M[q],F),F+=M[q].length;return L}Z.concatBytes=S;function k(R){if(typeof Buffer<"u"&&R instanceof Buffer){const M=R.buffer.slice(R.byteOffset,R.byteOffset+R.byteLength);return new DataView(M)}return new DataView(R.buffer,R.byteOffset,R.byteLength)}return Z.createDataView=k,Z}var Tt={},Sc;function Wh(){if(Sc)return Tt;Sc=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.ChecksumStruct=void 0;const e=Ye,t=al();return Tt.ChecksumStruct=(0,e.size)((0,t.base64)((0,e.string)(),{paddingRequired:!0}),44,44),Tt}var ye={},Rc;function $h(){if(Rc)return ye;Rc=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.createHex=ye.createBytes=ye.createBigInt=ye.createNumber=void 0;const e=Ye,t=Me(),r=cl(),n=fr(),f=(0,e.union)([(0,e.number)(),(0,e.bigint)(),(0,e.string)(),n.StrictHexStruct]),s=(0,e.coerce)((0,e.number)(),f,Number),c=(0,e.coerce)((0,e.bigint)(),f,BigInt);(0,e.union)([n.StrictHexStruct,(0,e.instance)(Uint8Array)]);const l=(0,e.coerce)((0,e.instance)(Uint8Array),(0,e.union)([n.StrictHexStruct]),r.hexToBytes),u=(0,e.coerce)(n.StrictHexStruct,(0,e.instance)(Uint8Array),r.bytesToHex);function h(o){try{const p=(0,e.create)(o,s);return(0,t.assert)(Number.isFinite(p),`Expected a number-like value, got "${o}".`),p}catch(p){throw p instanceof e.StructError?new Error(`Expected a number-like value, got "${o}".`):p}}ye.createNumber=h;function y(o){try{return(0,e.create)(o,c)}catch(p){throw p instanceof e.StructError?new Error(`Expected a number-like value, got "${String(p.value)}".`):p}}ye.createBigInt=y;
2function a(o){if(typeof o=="string"&&o.toLowerCase()==="0x")return new Uint8Array;try{return(0,e.create)(o,l)}catch(p){throw p instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(p.value)}".`):p}}ye.createBytes=a;function d(o){if(o instanceof Uint8Array&&o.length===0||typeof o=="string"&&o.toLowerCase()==="0x")return"0x";try{return(0,e.create)(o,u)}catch(p){throw p instanceof e.StructError?new Error(`Expected a bytes-like value, got "${String(p.value)}".`):p}}return ye.createHex=d,ye}var ve={},kc;function Vh(){if(kc)return ve;kc=1;var e=ve&&ve.__classPrivateFieldSet||function(c,l,u,h,y){if(h==="m")throw new TypeError("Private method is not writable");if(h==="a"&&!y)throw new TypeError("Private accessor was defined without a setter");if(typeof l=="function"?c!==l||!y:!l.has(c))throw new TypeError("Cannot write private member to an object whose class did not declare it");return h==="a"?y.call(c,u):y?y.value=u:l.set(c,u),u},t=ve&&ve.__classPrivateFieldGet||function(c,l,u,h){if(u==="a"&&!h)throw new TypeError("Private accessor was defined without a getter");if(typeof l=="function"?c!==l||!h:!l.has(c))throw new TypeError("Cannot read private member from an object whose class did not declare it");return u==="m"?h:u==="a"?h.call(c):h?h.value:l.get(c)},r,n;
2Object.defineProperty(ve,"__esModule",{value:!0}),ve.FrozenSet=ve.FrozenMap=void 0;class f{constructor(l){r.set(this,void 0),e(this,r,new Map(l),"f"),Object.freeze(this)}get size(){return t(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return t(this,r,"f")[Symbol.iterator]()}entries(){return t(this,r,"f").entries()}forEach(l,u){return t(this,r,"f").forEach((h,y,a)=>l.call(u,h,y,this))}get(l){return t(this,r,"f").get(l)}has(l){return t(this,r,"f").has(l)}keys(){return t(this,r,"f").keys()}values(){return t(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([l,u])=>`${String(l)} => ${String(u)}`).join(", ")} `:""}}`}}ve.FrozenMap=f;class s{constructor(l){n.set(this,void 0),e(this,n,new Set(l),"f"),Object.freeze(this)}get size(){return t(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return t(this,n,"f")[Symbol.iterator]()}entries(){return t(this,n,"f").entries()}forEach(l,u){return t(this,n,"f").forEach((h,y,a)=>l.call(u,h,y,this))}has(l){return t(this,n,"f").has(l)}keys(){return t(this,n,"f").keys()}values(){return t(this,n,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(l=>String(l)).join(", ")} `:""}}`}}return ve.FrozenSet=s,Object.freeze(f),Object.freeze(f.prototype),Object.freeze(s),Object.freeze(s.prototype),ve}var Gi={},Cc;function zh(){return Cc||(Cc=1,Object.defineProperty(Gi,"__esModule",{value:!0})),Gi}var Zi={},Ac;function Jh(){return Ac||(Ac=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=void 0;const t=Ye,r=Me(),n=()=>(0,t.define)("finite number",S=>(0,t.is)(S,(0,t.number)())&&Number.isFinite(S));e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),n(),(0,t.string)(),(0,t.array)((0,t.lazy)(()=>e.UnsafeJsonStruct)),(0,t.record)((0,t.string)(),(0,t.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,t.define)("Json",(S,k)=>{function R(M,T){const q=[...T.validator(M,k)];return q.length>0?q:!0}try{const M=R(S,e.UnsafeJsonStruct);return M!==!0?M:R(JSON.parse(JSON.stringify(S)),e.UnsafeJsonStruct)}catch(M){return M instanceof RangeError?"Circular reference detected":!1}});function f(S){return(0,t.is)(S,e.JsonStruct)}e.isValidJson=f;function s(S){(0,r.assertStruct)(S,e.JsonStruct,"Invalid JSON value");const k=JSON.stringify(S);return new TextEncoder().encode(k).byteLength}e.getJsonSize=s,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,t.object)({code:(0,t.integer)(),message:(0,t.string)(),data:(0,t.optional)(e.JsonStruct),stack:(0,t.optional)((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.optional)((0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,t.omit)(e.JsonRpcRequestStruct,["id"]);function c(S){return(0,t.is)(S,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=c;function l(S,k){(0,r.assertStruct)(S,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",k)}e.assertIsJsonRpcNotification=l;function u(S){return(0,t.is)(S,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=u;function h(S,k){(0,r.assertStruct)(S,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",k)}e.assertIsJsonRpcRequest=h,e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStru
2ct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function y(S){return(0,t.is)(S,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=y;function a(S,k){(0,r.assertStruct)(S,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",k)}e.assertIsPendingJsonRpcResponse=a;function d(S){return(0,t.is)(S,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=d;function o(S,k){(0,r.assertStruct)(S,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",k)}e.assertIsJsonRpcResponse=o;function p(S){return(0,t.is)(S,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=p;function v(S,k){(0,r.assertStruct)(S,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",k)}e.assertIsJsonRpcSuccess=v;function g(S){return(0,t.is)(S,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=g;function i(S,k){(0,r.assertStruct)(S,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",k)}e.assertIsJsonRpcFailure=i;function b(S){return(0,t.is)(S,e.JsonRpcErrorStruct)}e.isJsonRpcError=b;function m(S,k){(0,r.assertStruct)(S,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",k)}e.assertIsJsonRpcError=m;function _(S){const{permitEmptyString:k,permitFractions:R,permitNull:M}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},S);return L=>!!(typeof L=="number"&&(R||Number.isInteger(L))||typeof L=="string"&&(k||L.length>0)||M&&L===null)}e.getJsonRpcIdValidator=_})(Zi)),Zi}var Ki={},Ic;function Gh(){return Ic||(Ic=1,Object.defineProperty(Ki,"__esModule",{value:!0})),Ki}var Re={},Mc;function Zh(){if(Mc)return Re;Mc=1;var e=Re&&Re.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Re,"__esModule",{value:!0}),Re.createModuleLogger=Re.createProjectLogger=void 0;const r=(0,e(bl()).default)("metamask");function n(s){return r.extend(s)}Re.createProjectLogger=n;function f(s,c){return s.extend(c)}return Re.createModuleLogger=f,Re}var Qi={},xc;function Kh(){return xc||(xc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function t(h){return Array.isArray(h)&&h.length>0}e.isNonEmptyArray=t;function r(h){return h==null}e.isNullOrUndefined=r;function n(h){return!!h&&typeof h=="object"&&!Array.isArray(h)}e.isObject=n;const f=(h,y)=>Object.hasOwnProperty.call(h,y);e.hasProperty=f,(function(h){h[h.Null=4]="Null",h[h.Comma=1]="Comma",h[h.Wrapper=1]="Wrapper",h[h.True=4]="True",h[h.False=5]="False",h[h.Quote=1]="Quote",h[h.Colon=1]="Colon",h[h.Date=24]="Date"})(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function s(h){if(typeof h!="object"||h===null)return!1;try{let y=h;for(;Object.getPrototypeOf(y)!==null;)y=Object.getPrototypeOf(y);return Object.getPrototypeOf(h)===y}catch{return!1}}e.isPlainObject=s;function c(h){return h.charCodeAt(0)<=127}e.isASCII=c;function l(h){var y;return h.split("").reduce((d,o)=>c(o)?d+1:d+2,0)+((y=h.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&y!==void 0?y:[]).length}e.calculateStringSize=l;function u(h){return h.toString().length}e.calculateNumberSize=u})(Qi)),Qi}var me={},Tc;function Qh(){if(Tc)return me;Tc=1,Object.defineProperty(me,"__esModule",{value:!0}),me.hexToBigInt=me.hexToNumber=me.bigIntToHex=me.numberToHex=void 0;const e=Me(),t=fr(),r=c=>((0,e.assert)(typeof c=="number","Value must be a number."),(0,e.assert)(c>=0,"Value must be a non-negative number."),(0,e.assert)(Number.isSafeInteger(c),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,t.add0x)(c.toString(16)));me.numberToHex=r;const n=c=>((0,e.assert)(typeof c=="bigint","Value must be a bigint."),(0,e.assert)(c>=0,"Value must be a non-negative bigint."),(0,t.add0x)(c.toString(16)));me.bigIntToHex=n;const f=c=>{(0,t.assertIsHexString)(c);const l=parseInt(c,16);return(0,e.assert)(Number.isSafeInteger(l),"Value is not a safe integer. Use `hexToBigInt` instead."),l};me.hexToNumber=f;const s=c=>((0,t.assertIsHexString)(c),BigInt((0,t.add0x)(c)));return me.hexToBigInt=s,me}var Yi={},Pc;function Yh(){return Pc||(Pc=1,Object.defineProperty(Yi,"__esModule",{value:!0})),Yi}var Xi={},Bc;function Xh(){return Bc||(Bc=1,(function(e){Object.defineProperty(e,"__esMo
2dule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,(function(s){s[s.Millisecond=1]="Millisecond",s[s.Second=1e3]="Second",s[s.Minute=6e4]="Minute",s[s.Hour=36e5]="Hour",s[s.Day=864e5]="Day",s[s.Week=6048e5]="Week",s[s.Year=31536e6]="Year"})(e.Duration||(e.Duration={}));const t=s=>Number.isInteger(s)&&s>=0,r=(s,c)=>{if(!t(s))throw new Error(`"${c}" must be a non-negative integer. Received: "${s}".`)};function n(s,c){return r(s,"count"),s*c}e.inMilliseconds=n;function f(s){return r(s,"timestamp"),Date.now()-s}e.timeSince=f})(Xi)),Xi}var es={},Nc;function ef(){return Nc||(Nc=1,Object.defineProperty(es,"__esModule",{value:!0})),es}var ts={},Lc;function tf(){return Lc||(Lc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const t=yl(),r=Ye,n=Me();e.VersionStruct=(0,r.refine)((0,r.string)(),"Version",a=>(0,t.valid)(a)===null?`Expected SemVer version, got "${a}"`:!0),e.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",a=>(0,t.validRange)(a)===null?`Expected SemVer range, got "${a}"`:!0);function f(a){return(0,r.is)(a,e.VersionStruct)}e.isValidSemVerVersion=f;function s(a){return(0,r.is)(a,e.VersionRangeStruct)}e.isValidSemVerRange=s;function c(a){(0,n.assertStruct)(a,e.VersionStruct)}e.assertIsSemVerVersion=c;function l(a){(0,n.assertStruct)(a,e.VersionRangeStruct)}e.assertIsSemVerRange=l;function u(a,d){return(0,t.gt)(a,d)}e.gtVersion=u;function h(a,d){return(0,t.gtr)(a,d)}e.gtRange=h;function y(a,d){return(0,t.satisfies)(a,d,{includePrerelease:!0})}e.satisfiesVersionRange=y})(ts)),ts}var Oc;function rf(){return Oc||(Oc=1,(function(e){var t=$e&&$e.__createBinding||(Object.create?(function(n,f,s,c){c===void 0&&(c=s);var l=Object.getOwnPropertyDescriptor(f,s);(!l||("get"in l?!f.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return f[s]}}),Object.defineProperty(n,c,l)}):(function(n,f,s,c){c===void 0&&(c=s),n[c]=f[s]})),r=$e&&$e.__exportStar||function(n,f){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(f,s)&&t(f,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(Me(),e),r(al(),e),r(cl(),e),r(Wh(),e),r($h(),e),r(Vh(),e),r(zh(),e),r(fr(),e),r(Jh(),e),r(Gh(),e),r(Zh(),e),r(Kh(),e),r(Qh(),e),r(Yh(),e),r(Xh(),e),r(ef(),e),r(tf(),e)})($e)),$e}var Dc;function nf(){return Dc||(Dc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createModuleLogger=e.projectLogger=void 0;const t=rf();Object.defineProperty(e,"createModuleLogger",{enumerable:!0,get:function(){return t.createModuleLogger}}),e.projectLogger=(0,t.createProjectLogger)("eth-block-tracker")})(zi)),zi}var qc;function sf(){if(qc)return He;qc=1;var e=He&&He.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(He,"__esModule",{value:!0}),He.PollingBlockTracker=void 0;const t=e(xs()),r=e(nh()),n=Yu(),f=nf(),s=(0,f.createModuleLogger)(f.projectLogger,"polling-block-tracker"),c=(0,t.default)(),l=1e3;let u=class extends n.BaseBlockTracker{constructor(a={}){var d;if(!a.provider)throw new Error("PollingBlockTracker - no provider specified.");super(Object.assign(Object.assign({},a),{blockResetDuration:(d=a.blockResetDuration)!==null&&d!==void 0?d:a.pollingInterval})),this._provider=a.provider,this._pollingInterval=a.pollingInterval||20*l,this._retryTimeout=a.retryTimeout||this._pollingInterval/10,this._keepEventLoopActive=a.keepEventLoopActive===void 0?!0:a.keepEventLoopActive,this._setSkipCacheFlag=a.setSkipCacheFlag||!1}async checkForLatestBlock(){return await this._updateLatestBlock(),await this.getLatestBlock()}async _start(){this._synchronize()}async _end(){}async _synchronize(){for(var a;this._isRunning;)try{await this._updateLatestBlock();const d=h(this._pollingInterval,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await d}catch(d){const o=new Error(`PollingBlockTracker - encountered an error while attempting to update latest block:
3${(a=d.stack)!==null&&a!==void 0?a:d}`);
3try{this.emit("error",o)}catch{console.error(o)}const p=h(this._retryTimeout,!this._keepEventLoopActive);this.emit("_waitingForNextIteration"),await p}}async _updateLatestBlock(){const a=await this._fetchLatestBlock();this._newPotentialLatest(a)}async _fetchLatestBlock(){const a={jsonrpc:"2.0",id:c(),method:"eth_blockNumber",params:[]};this._setSkipCacheFlag&&(a.skipCache=!0),s("Making request",a);const d=await(0,r.default)(o=>this._provider.sendAsync(a,o))();if(s("Got response",d),d.error)throw new Error(`PollingBlockTracker - encountered error fetching block:
4${d.error.message}`);return d.result}};He.PollingBlockTracker=u;function h(y,a){return new Promise(d=>{const o=setTimeout(d,y);o.unref&&a&&o.unref()})}return He}var Ve={},Fc;function of(){if(Fc)return Ve;Fc=1;var e=Ve&&Ve.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.SubscribeBlockTracker=void 0;const t=e(xs()),r=Yu(),n=(0,t.default)();let f=class extends r.BaseBlockTracker{constructor(c={}){if(!c.provider)throw new Error("SubscribeBlockTracker - no provider specified.");super(c),this._provider=c.provider,this._subscriptionId=null}async checkForLatestBlock(){return await this.getLatestBlock()}
4async _start(){if(this._subscriptionId===void 0||this._subscriptionId===null)try{const c=await this._call("eth_blockNumber");this._subscriptionId=await this._call("eth_subscribe","newHeads"),this._provider.on("data",this._handleSubData.bind(this)),this._newPotentialLatest(c)}catch(c){this.emit("error",c)}}async _end(){if(this._subscriptionId!==null&&this._subscriptionId!==void 0)try{await this._call("eth_unsubscribe",this._subscriptionId),this._subscriptionId=null}catch(c){this.emit("error",c)}}_call(c,...l){return new Promise((u,h)=>{this._provider.sendAsync({id:n(),method:c,params:l,jsonrpc:"2.0"},(y,a)=>{y?h(y):u(a.result)})})}_handleSubData(c,l){var u;l.method==="eth_subscription"&&((u=l.params)===null||u===void 0?void 0:u.subscription)===this._subscriptionId&&this._newPotentialLatest(l.params.result.number)}};return Ve.SubscribeBlockTracker=f,Ve}var jc;function af(){return jc||(jc=1,(function(e){var t=Ue&&Ue.__createBinding||(Object.create?(function(n,f,s,c){c===void 0&&(c=s),Object.defineProperty(n,c,{enumerable:!0,get:function(){return f[s]}})}):(function(n,f,s,c){c===void 0&&(c=s),n[c]=f[s]})),r=Ue&&Ue.__exportStar||function(n,f){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(f,s)&&t(f,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(sf(),e),r(of(),e)})(Ue)),Ue}var ze={},Pt={},Bt={},Uc;function ul(){if(Uc)return Bt;Uc=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getUniqueId=void 0;const e=4294967295;let t=Math.floor(Math.random()*e);function r(){return t=(t+1)%e,t}return Bt.getUniqueId=r,Bt}var Hc;function cf(){if(Hc)return Pt;Hc=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.createIdRemapMiddleware=void 0;const e=ul();function t(){return(r,n,f,s)=>{const c=r.id,l=e.getUniqueId();r.id=l,n.id=l,f(u=>{r.id=c,n.id=c,u()})}}return Pt.createIdRemapMiddleware=t,Pt}var Nt={},Wc;function uf(){if(Wc)return Nt;Wc=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.createAsyncMiddleware=void 0;function e(t){return async(r,n,f,s)=>{let c;const l=new Promise(a=>{c=a});let u=null,h=!1;const y=async()=>{h=!0,f(a=>{u=a,c()}),await l};try{await t(r,n,y),h?(await l,u(null)):s(null)}catch(a){u?u(a):s(a)}}}return Nt.createAsyncMiddleware=e,Nt}var Lt={},$c;function lf(){if($c)return Lt;$c=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.createScaffoldMiddleware=void 0;function e(t){return(r,n,f,s)=>{const c=t[r.method];return c===void 0?f():typeof c=="function"?c(r,n,f,s):(n.result=c,s())}}return Lt.createScaffoldMiddleware=e,Lt}var Je={},nr={},Vc;function df(){if(Vc)return nr;Vc=1,Object.defineProperty(nr,"__esModule",{value:!0});const e=ar();function t(f,s,c){try{Reflect.apply(f,s,c)}catch(l){setTimeout(()=>{throw l})}}function r(f){const s=f.length,c=new Array(s);for(let l=0;l<s;l+=1)c[l]=f[l];return c}class n extends e.EventEmitter{emit(s,...c){let l=s==="error";const u=this._events;if(u!==void 0)l=l&&u.error===void 0;else if(!l)return!1;if(l){let y;if(c.length>0&&([y]=c),y instanceof Error)throw y;const a=new Error(`Unhandled error.${y?` (${y.message})`:""}`);throw a.context=y,a}const h=u[s];if(h===void 0)return!1;if(typeof h=="function")t(h,this,c);else{const y=h.length,a=r(h);for(let d=0;d<y;d+=1)t(a[d],this,c)}return!0}}return nr.default=n,nr}var rs={},Ge={},zc;function Os(){if(zc)return Ge;zc=1,Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.EthereumProviderError=Ge.EthereumRpcError=void 0;const e=vl();class t extends Error{constructor(c,l,u){if(!Number.isInteger(c))throw new Error('"code" must be an integer.');if(!l||typeof l!="string")throw new Error('"message" must be a nonempty string.');super(l),this.code=c,u!==void 0&&(this.data=u)}serialize(){const c={code:this.code,message:this.message};return this.data!==void 0&&(c.data=this.data),this.stack&&(c.stack=this.stack),c}toString(){return e.default(this.serialize(),f,2)}}Ge.EthereumRpcError=t;class r extends t{constructor(c,l,u){if(!n(c))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(c,l,u)}}Ge.EthereumProviderError=r;function n(s){return Number.isInteger(s)&&s>=1e3&&s<=4999}function f(s,c){if(c!=="[Circular]")return c}return Ge}var ns={},Ze={},Jc;
4function Ds(){return Jc||(Jc=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.errorValues=Ze.errorCodes=void 0,Ze.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},Ze.errorValues={"-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."}}),Ze}var Gc;function ll(){return Gc||(Gc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=Ds(),r=Os(),n=t.errorCodes.rpc.internal,f="Unspecified error message. This is a bug, please report it.",s={code:n,message:c(n)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function c(d,o=f){if(Number.isInteger(d)){const p=d.toString();if(a(t.errorValues,p))return t.errorValues[p].message;if(h(d))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return o}e.getMessageFromCode=c;function l(d){if(!Number.isInteger(d))return!1;const o=d.toString();return!!(t.errorValues[o]||h(d))}e.isValidCode=l;function u(d,{fallbackError:o=s,shouldIncludeStack:p=!1}={}){var v,g;if(!o||!Number.isInteger(o.code)||typeof o.message!="string")throw new Error("Mu
4st provide fallback error with integer number code and string message.");if(d instanceof r.EthereumRpcError)return d.serialize();const i={};if(d&&typeof d=="object"&&!Array.isArray(d)&&a(d,"code")&&l(d.code)){const m=d;i.code=m.code,m.message&&typeof m.message=="string"?(i.message=m.message,a(m,"data")&&(i.data=m.data)):(i.message=c(i.code),i.data={originalError:y(d)})}else{i.code=o.code;const m=(v=d)===null||v===void 0?void 0:v.message;i.message=m&&typeof m=="string"?m:o.message,i.data={originalError:y(d)}}const b=(g=d)===null||g===void 0?void 0:g.stack;return p&&d&&b&&typeof b=="string"&&(i.stack=b),i}e.serializeError=u;function h(d){return d>=-32099&&d<=-32e3}function y(d){return d&&typeof d=="object"&&!Array.isArray(d)?Object.assign({},d):d}function a(d,o){return Object.prototype.hasOwnProperty.call(d,o)}})(ns)),ns}var Ot={},Zc;function hf(){if(Zc)return Ot;Zc=1,Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.ethErrors=void 0;const e=Os(),t=ll(),r=Ds();Ot.ethErrors={rpc:{parse:c=>n(r.errorCodes.rpc.parse,c),invalidRequest:c=>n(r.errorCodes.rpc.invalidRequest,c),invalidParams:c=>n(r.errorCodes.rpc.invalidParams,c),methodNotFound:c=>n(r.errorCodes.rpc.methodNotFound,c),internal:c=>n(r.errorCodes.rpc.internal,c),server:c=>{if(!c||typeof c!="object"||Array.isArray(c))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:l}=c;if(!Number.isInteger(l)||l>-32005||l<-32099)throw new Error('"code" must be an integer such that: -32099 <= code 
4<= -32005');return n(l,c)},invalidInput:c=>n(r.errorCodes.rpc.invalidInput,c),resourceNotFound:c=>n(r.errorCodes.rpc.resourceNotFound,c),resourceUnavailable:c=>n(r.errorCodes.rpc.resourceUnavailable,c),transactionRejected:c=>n(r.errorCodes.rpc.transactionRejected,c),methodNotSupported:c=>n(r.errorCodes.rpc.methodNotSupported,c),limitExceeded:c=>n(r.errorCodes.rpc.limitExceeded,c)},provider:{userRejectedRequest:c=>f(r.errorCodes.provider.userRejectedRequest,c),unauthorized:c=>f(r.errorCodes.provider.unauthorized,c),unsupportedMethod:c=>f(r.errorCodes.provider.unsupportedMethod,c),disconnected:c=>f(r.errorCodes.provider.disconnected,c),chainDisconnected:c=>f(r.errorCodes.provider.chainDisconnected,c),custom:c=>{if(!c||typeof c!="object"||Array.isArray(c))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:l,message:u,data:h}=c;if(!u||typeof u!="string")throw new Error('"message" must be a nonempty string');return new e.EthereumProviderError(l,u,h)}}};function n(c,l){const[u,h]=s(l);return new e.EthereumRpcError(c,u||t.getMessageFromCode(c),h)}function f(c,l){const[u,h]=s(l);return new e.EthereumProviderError(c,u||t.getMessageFromCode(c),h)}function s(c){if(c){if(typeof c=="string")return[c];if(typeof c=="object"&&!Array.isArray(c)){const{message:l,data:u}=c;
4if(l&&typeof l!="string")throw new Error("Must specify string message.");return[l||void 0,u]}}return[]}return Ot}var Kc;function ff(){return Kc||(Kc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=Os();Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=ll();Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const n=hf();Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return n.ethErrors}});const f=Ds();Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return f.errorCodes}})})(rs)),rs}var Qc;function dl(){if(Qc)return Je;Qc=1;var e=Je&&Je.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Je,"__esModule",{value:!0}),Je.JsonRpcEngine=void 0;const t=e(df()),r=ff();let n=class Ie extends t.default{constructor(){super(),this._middleware=[]}push(c){this._middleware.push(c)}handle(c,l){if(l&&typeof l!="function")throw new Error('"callback" must be a function if provided.');return Array.isArray(c)?l?this._handleBatch(c,l):this._handleBatch(c):l?this._handle(c,l):this._promiseHandle(c)}asMiddleware(){return async(c,l,u,h)=>{try{const[y,a,d]=await Ie._runAllMiddleware(c,l,this._middleware);return a?(await Ie._runReturnHandlers(d),h(y)):u(async o=>{try{await Ie._runReturnHandlers(d)}catch(p){return o(p)}return o()})}catch(y){return h(y)}}}async _handleBatch(c,l){try{const u=await Promise.all(c.map(this._promiseHandle.bind(this)));return l?l(null,u):u}catch(u){if(l)return l(u);throw u}}_promiseHandle(c){return new Promise(l=>{this._handle(c,(u,h)=>{l(h)})})}async _handle(c,l){if(!c||Array.isArray(c)||typeof c!="object"){const a=new r.EthereumRpcError(r.errorCodes.rpc.invalidRequest,`Requests must be plain objects. Received: ${typeof c}`,{request:c});return l(a,{id:void 0,jsonrpc:"2.0",error:a})}if(typeof c.method!="string"){const a=new r.EthereumRpcError(r.errorCodes.rpc.invalidRequest,`Must specify a string method. Received: ${typeof c.method}`,{request:c});return l(a,{id:c.id,jsonrpc:"2.0",error:a})}const u=Object.assign({},c),h={id:u.id,jsonrpc:u.jsonrpc};let y=null;try{await this._processRequest(u,h)}catch(a){y=a}return y&&(delete h.result,h.error||(h.error=r.serializeError(y))),l(y,h)}async _processRequest(c,l){const[u,h,y]=await Ie._runAllMiddleware(c,l,this._middleware);if(Ie._checkForCompletion(c,l,h),await Ie._runReturnHandlers(y),u)throw u}static async _runAllMiddleware(c,l,u){const h=[];let y=null,a=!1;for(const d of u)if([y,a]=await Ie._runMiddleware(c,l,d,h),a)break;return[y,a,h.reverse()]}static _runMiddleware(c,l,u,h){return new Promise(y=>{const a=o=>{const p=o||l.error;p&&(l.error=r.serializeError(p)),y([p,!0])},d=o=>{l.error?a(l.error):(o&&(typeof o!="function"&&a(new r.EthereumRpcError(r.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof o}" for request:
5${f(c)}`,{request:c})),h.push(o)),y([null,!1]))};try{u(c,l,d,a)}catch(o){a(o)}})}static async _runReturnHandlers(c){for(const l of c)await new Promise((u,h)=>{l(y=>y?h(y):u())})}static _checkForCompletion(c,l,u){if(!("result"in l)&&!("error"in l))throw new r.EthereumRpcError(r.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:
6${f(c)}`,{request:c});if(!u)throw new r.EthereumRpcError(r.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:
7${f(c)}`,{request:c})}};Je.JsonRpcEngine=n;function f(s){return JSON.stringify(s,null,2)}return Je}var Dt={},Yc;function pf(){if(Yc)return Dt;Yc=1,Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.mergeMiddleware=void 0;const e=dl();function t(r){const n=new e.JsonRpcEngine;return r.forEach(f=>n.push(f)),n.asMiddleware()}return Dt.mergeMiddleware=t,Dt}var Xc;function hl(){return Xc||(Xc=1,(function(e){var t=ze&&ze.__createBinding||(Object.create?(function(n,f,s,c){c===void 0&&(c=s),Ob
7ject.defineProperty(n,c,{enumerable:!0,get:function(){return f[s]}})}):(function(n,f,s,c){c===void 0&&(c=s),n[c]=f[s]})),r=ze&&ze.__exportStar||function(n,f){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(f,s)&&t(f,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),r(cf(),e),r(uf(),e),r(lf(),e),r(ul(),e),r(dl(),e),r(pf(),e)})(ze)),ze}var is={},ir={};const qs=jt(ml);var sr={},eu;function fl(){if(eu)return sr;eu=1,Object.defineProperty(sr,"__esModule",{value:!0});var e=qs,t=(function(){function r(n){if(this._maxConcurrency=n,this._queue=[],n<=0)throw new Error("semaphore must be initialized to a positive value");this._value=n}return r.prototype.acquire=function(){var n=this,f=this.isLocked(),s=new Promise(function(c){return n._queue.push(c)});return f||this._dispatch(),s},r.prototype.runExclusive=function(n){return e.__awaiter(this,void 0,void 0,function(){var f,s,c;return e.__generator(this,function(l){switch(l.label){case 0:return[4,this.acquire()];case 1:f=l.sent(),s=f[0],c=f[1],l.label=2;case 2:return l.trys.push([2,,4,5]),[4,n(s)];case 3:return[2,l.sent()];case 4:return c(),[7];case 5:return[2]}})})},r.prototype.isLocked=function(){return this._value<=0},r.prototype.release=function(){if(this._maxConcurrency>1)throw new Error("this method is unavailabel on semaphores with concurrency > 1; use the scoped release returned by acquire instead");if(this._currentReleaser){var n=this._currentReleaser;this._currentReleaser=void 0,n()}},r.prototype._dispatch=function(){var n=this,f=this._queue.shift();if(f){var s=!1;this._currentReleaser=function(){s||(s=!0,n._value++,n._dispatch())},f([this._value--,this._currentReleaser])}},r})();return sr.default=t,sr}var tu;function gf(){if(tu)return ir;tu=1,Object.defineProperty(ir,"__esModule",{value:!0});var e=qs,t=fl(),r=(function(){function n(){this._semaphore=new t.default(1)}return n.prototype.acquire=function(){return e.__awaiter(this,void 0,void 0,function(){var f,s;return e.__generator(this,function(c){switch(c.label){case 0:return[4,this._semaphore.acquire()];case 1:return f=c.sent(),s=f[1],[2,s]}})})},n.prototype.runExclusive=function(f){return this._semaphore.runExclusive(function(){return f()})},n.prototype.isLocked=function(){return this._semaphore.isLocked()},n.prototype.release=function(){this._semaphore.release()},n})();return ir.default=r,ir}var qt={},ru;function bf(){if(ru)return qt;ru=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.withTimeout=void 0;var e=qs;function t(r,n,f){var s=this;return f===void 0&&(f=new Error("timeout")),{acquire:function(){return new Promise(function(c,l){return e.__awaiter(s,void 0,void 0,function(){var u,h,y;return e.__generator(this,function(a){switch(a.label){case 0:return u=!1,setTimeout(function(){u=!0,l(f)},n),[4,r.acquire()];case 1:return h=a.sent(),u?(y=Array.isArray(h)?h[1]:h,y()):c(h),[2]}})})})},runExclusive:function(c){return e.__awaiter(this,void 0,void 0,function(){var l,u;return e.__generator(this,function(h){switch(h.label){case 0:l=function(){},h.label=1;case 1:return h.trys.push([1,,7,8]),[4,this.acquire()];case 2:return u=h.sent(),Array.isArray(u)?(l=u[1],[4,c(u[0])]):[3,4];case 3:return[2,h.sent()];case 4:return l=u,[4,c()];case 5:return[2,h.sent()];case 6:return[3,8];case 7:return l(),[7];case 8:return[2]}})})},release:function(){r.release()},isLocked:function(){return r.isLocked()}}}return qt.withTimeout=t,qt}var nu;function yf(){return nu||(nu=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.withTimeout=e.Semaphore=e.Mutex=void 0;var t=gf();Object.defineProperty(e,"Mutex",{enumerable:!0,get:function(){return t.default}});var r=fl();Object.defineProperty(e,"Semaphore",{enumerable:!0,get:function(){return r.default}});var n=bf();Object.defineProperty(e,"withTimeout",{enumerable:!0,get:function(){return n.withTimeout}})})(is)),is}var ss,iu;function vf(){if(iu)return ss;iu=1,ss=t;var e=Object.prototype.hasOwnProperty;function t(){for(var r={},n=0;n<arguments.length;n++){var f=arguments[n];for(var s in f)e.call(f,s)&&(r[s]=f[s])}return r}return ss}var os,su;function mf(){if(su)return os;su=1;const e=vf(),t=xs()();os=r;function r(c){const l=this;l.currentProvider=c}r.prototype.getBalance=f(2,"eth_getBalance"),r.prototype.getCode=f(2,"eth_getCode"),r.prototype.getTransactionCount=f(2,"eth_getTransactionCount"),r.prototype.getStorageAt=f(3,"eth_getStorageAt"),r.prototype.call=f(2,"eth_call"),r.prototype.protocolVersion=n("eth_protocolVersion"),r.prototype.syncing=n("eth_syncing"),r.prototype.coinbase=n("eth_coinbase"),r.prototype.mining=n("eth_mining"),r.prototype.hashrate=n("eth_hashrate"),r.prototype.gasPrice=n("eth_gasPrice"),r.prototype.accounts=n("eth_accounts"),r.prototype.blockNumber=n("eth_blockNumber"),r.prototype.getBlockTransactionCountByHash=n("eth_getBlockTransactionCountByHash"),r.prototype.getBlockTransactionCountByNumber=n("eth_getBlockTransactionCountByNumber"),r.prototype.getUncleCountByBlockHash=n("eth_getUncleCountByBlockHash"),r.prototype.getUncleCountByBlockNumber=n("eth_getUncleCountByBlockNumber"),r.prototype.sign=n("eth_sign"),r.prototype.sendTransaction=n("eth_sendTransaction"),r.prototype.sendRawTransaction=n("eth_sendRawTransaction"),r.prototype.estimateGas=n("eth_estimateGas"),r.prototype.getBlockByHash=n("eth_getBlockByHash"),r.prototype.getBlockByNumber=n("eth_getBlockByNumber"),r.prototype.getTransactionByHash=n("eth_getTransactionByHash"),r.prototype.getTransactionByBlockHashAndIndex=n("eth_getTransactionByBlockHashAndIndex"),r.prototype.getTransactionByBlockNumberAndIndex=n("eth_getTransactionByBlockNumberAndIndex"),r.prototype.getTransactionReceipt=n("eth_getTransactionReceipt"),r.prototype.getUncleByBlockHashAndIndex=n("eth_getUncleByBlockHashAndIndex"),r.prototype.getUncleByBlockNumberAndIndex=n("eth_getUncleByBlockNumberAndIndex"),r.prototype.getCompilers=n("eth_getCompilers"),r.prototype.compileLLL=n("eth_compileLLL"),r.prototype.compileSolidity=n("eth_compileSolidity"),r.prototype.compileSerpent=n("eth_compileSerpent"),r.prototype.newFilter=n("eth_newFilter"),r.prototype.newBlockFilter=n("eth_newBlockFilter"),r.prototype.newPendingTransactionFilter=n("eth_newPendingTransactionFilter"),r.prototype.uninstallFilter=n("eth_uninstallFilter"),r.prototype.getFilterChanges=n("eth_getFilterChanges"),r.prototype.getFilterLogs=n("eth_getFilterLogs"),r.prototype.getLogs=n("eth_getLogs"),r.prototype.getWork=n("eth_getWork"),r.prototype.submitWork=n("eth_submitWork"),r.prototype.submitHashrate=n("eth_submitHashrate"),r.prototype.sendAsync=function(c,l){this.currentProvider.sendAsync(s(c),function(h,y){if
7(!h&&y.error&&(h=new Error("EthQuery - RPC Error - "+y.error.message)),h)return l(h);l(null,y.result)})};function n(c){return function(){const l=this;var u=[].slice.call(arguments),h=u.pop();l.sendAsync({method:c,params:u},h)}}function f(c,l){return function(){const u=this;var h=[].slice.call(arguments),y=h.pop();h.length<c&&h.push("latest"),u.sendAsync({method:l,params:h},y)}}function s(c){return e({id:t(),jsonrpc:"2.0",params:[]},c)}return os}var as,ou;function _f(){if(ou)return as;ou=1;const e=(r,n,f,s)=>function(...c){const l=n.promiseModule;return new l((u,h)=>{n.multiArgs?c.push((...a)=>{n.errorFirst?a[0]?h(a):(a.shift(),u(a)):u(a)}):n.errorFirst?c.push((a,d)=>{a?h(a):u(d)}):c.push(u),Reflect.apply(r,this===f?s:this,c)})},t=new WeakMap;return as=(r,n)=>{n={exclude:[/.+(?:Sync|Stream)$/],errorFirst:!0,promiseModule:Promise,...n};const f=typeof r;if(!(r!==null&&(f==="object"||f==="function")))throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${r===null?"null":f}\``);const s=(u,h)=>{let y=t.get(u);if(y||(y={},t.set(u,y)),h in y)return y[h];const a=g=>typeof g=="string"||typeof h=="symbol"?h===g:g.test(h),d=Reflect.getOwnPropertyDescriptor(u,h),o=d===void 0||d.writable||d.configurable,v=(n.include?n.include.some(a):!n.exclude.some(a))&&o;return y[h]=v,v},c=new WeakMap,l=new Proxy(r,{apply(u,h,y){const a=c.get(u);if(a)return Reflect.apply(a,h,y);const d=n.excludeMain?u:e(u,n,l,u);return c.set(u,d),Reflect.apply(d,h,y)},get(u,h){const y=u[h];if(!s(u,h)||y===Function.prototype[h])return y;const a=c.get(y);if(a)return a;if(typeof y=="function"){const d=e(y,n,l,u);return c.set(y,d),d}return y}});return l},as}var cs,au;function Fs(){if(au)return cs;au=1;const e=Ts().default;class t extends e{constructor(){super(),this.updates=[]}async initialize(){}async update(){throw new Error("BaseFilter - no update method specified")}addResults(n){this.updates=this.updates.concat(n),n.forEach(f=>this.emit("update",f))}addInitialResults(n){}getChangesAndClear(){const n=this.updates;return this.updates=[],n}}return cs=t,cs}var us,cu;function wf(){if(cu)return us;cu=1;const e=Fs();class t extends e{constructor(){super(),this.allResults=[]}async update(){throw new Error("BaseFilterWithHistory - no update method specified")}addResults(n){this.allResults=this.allResults.concat(n),super.addResults(n)}addInitialResults(n){this.allResults=this.allResults.concat(n),super.addInitialResults(n)}getAllResults(){return this.allResults}}return us=t,us}var ls,uu;function Jt(){if(uu)return ls;
7uu=1,ls={minBlockRef:e,maxBlockRef:t,sortBlockRefs:r,bnToHex:n,blockRefIsNumber:f,hexToInt:s,incrementHexInt:c,intToHex:l,unsafeRandomBytes:u};function e(...y){return r(y)[0]}function t(...y){const a=r(y);return a[a.length-1]}function r(y){return y.sort((a,d)=>a==="latest"||d==="earliest"?1:d==="latest"||a==="earliest"?-1:s(a)-s(d))}function n(y){return"0x"+y.toString(16)}function f(y){return y&&!["earliest","latest","pending"].includes(y)}function s(y){return y==null?y:Number.parseInt(y,16)}function c(y){if(y==null)return y;const a=s(y);return l(a+1)}function l(y){if(y==null)return y;let a=y.toString(16);return a.length%2&&(a="0"+a),"0x"+a}function u(y){let a="0x";for(let d=0;d<y;d++)a+=h(),a+=h();return a}function h(){return Math.floor(Math.random()*16).toString(16)}return ls}var ds,lu;function Ef(){if(lu)return ds;lu=1;const e=mf(),t=_f(),r=wf(),{bnToHex:n,hexToInt:f,incrementHexInt:s,minBlockRef:c,blockRefIsNumber:l}=Jt();class u extends r{constructor({provider:y,params:a}){super(),this.type="log",this.ethQuery=new e(y),this.params=Object.assign({fromBlock:"latest",toBlock:"latest",address:void 0,topics:[]},a),this.params.address&&(Array.isArray(this.params.address)||(this.params.address=[this.params.address]),this.params.address=this.params.address.map(d=>d.toLowerCase()))}async initialize({currentBlock:y}){let a=this.params.fromBlock;["latest","pending"].includes(a)&&(a=y),a==="earliest"&&(a="0x0"),this.params.fromBlock=a;const d=c(this.params.toBlock,y),o=Object.assign({},this.params,{toBlock:d}),p=await this._fetchLogs(o);this.addInitialResults(p)}async update({oldBlock:y,newBlock:a}){const d=a;let o;y?o=s(y):o=a;const p=Object.assign({},this.params,{fromBlock:o,toBlock:d}),g=(await this._fetchLogs(p)).filter(i=>this.matchLog(i));this.addResults(g)}async _fetchLogs(y){return await t(d=>this.ethQuery.getLogs(y,d))()}matchLog(y){if(f(this.params.fromBlock)>=f(y.blockNumber)||l(this.params.toBlock)&&f(this.params.toBlock)<=f(y.blockNumber))return!1;const a=y.address&&y.address.toLowerCase();return this.params.address&&a&&!this.params.address.includes(a)?!1:this.params.topics.every((o,p)=>{let v=y.topics[p];if(!v)return!1;v=v.toLowerCase();let g=Array.isArray(o)?o:[o];return g.includes(null)?!0:(g=g.map(m=>m.toLowerCase()),g.includes(v))})}}return ds=u,ds}var hs,du;function js(){if(du)return hs;du=1,hs=e;async function e({provider:s,fromBlock:c,toBlock:l}){c||(c=l);const u=t(c),y=t(l)-u+1,a=Array(y).fill().map((o,p)=>u+p).map(r);let d=await Promise.all(a.map(o=>f(s,"eth_getBlockByNumber",[o,!1])));return d=d.filter(o=>o!==null),d}function t(s){return s==null?s:Number.parseInt(s,16)}function r(s){return s==null?s:"0x"+s.toString(16)}function n(s,c){return new Promise((l,u)=>{s.sendAsync(c,(h,y)=>{h?u(h):y.error?u(y.error):y.result?l(y.result):u(new Error("Result was empty"))})})}async function f(s,c,l){for(let u=0;u<3;u++)try{return await n(s,{id:1,jsonrpc:"2.0",method:c,params:l})}catch(h){console.error(`provider.sendAsync failed: ${h.stack||h.message||h}`)}return null}return hs}var fs,hu;function Sf(){if(hu)return fs;hu=1;const e=Fs(),t=js(),{incrementHexInt:r}=Jt();class n extends e{constructor({provider:s,params:c}){super(),this.type="block",this.provider=s}async update({oldBlock:s,newBlock:c}){const l=c,u=r(s),y=(await t({provider:this.provider,fromBlock:u,toBlock:l})).map(a=>a.hash);this.addResults(y)}}return fs=n,fs}var ps,fu;function Rf(){if(fu)return ps;fu=1;const e=Fs(),t=js(),{incrementHexInt:r}=Jt();class n extends e{constructor({provider:s}){super(),this.type="tx",this.provider=s}async update({oldBlock:s}){const c=s,l=r(s),u=await t({provider:this.provider,fromBlock:l,toBlock:c}),h=[];for(const y of u)h.push(...y.transactions);this.addResults(h)}}return ps=n,ps}var gs,pu;function kf(){if(pu)return gs;pu=1;const e=yf().Mutex,{createAsyncMiddleware:t,createScaffoldMiddleware:r}=hl(),n=Ef(),f=Sf(),s=Rf(),{intToHex:c,hexToInt:l}=Jt();gs=u;function u({blockTracker:o,provider:p}){let v=0,g={};const i=new e,b=a({mutex:i}),m=r({eth_newFilter:b(h(S)),eth_newBlockFilter:b(h(k)),eth_newPendingTransactionFilter:b(h(R)),eth_uninstallFilter:b(y(L)),eth_getFilterChanges:b(y(M)),eth_getFilterLogs:b(y(T))}),_=async({oldBlock:$,newBlock:I})=>{if(g.length===0)return;const N=await i.acquire();try{await Promise.all(d(g).map(async H=>{try{await H.update({oldBlock:$,newBlock:I})}catch(W){console.error(W)}}))}catch(H){console.error(H)}N()};return m.newLogFilter=S,m.newBlockFilter=k,m.newPendingTransactionFilter=R,m.uninstallFilter=L,m.getFilterChanges=M,m.getFilterLogs=T,m.destroy=()=>{z()},m;async function S($){const I=new n({provider:p,params:$});return await q(I),I}async function k(){const $=new f({provider:p});return await q($),$}async function R(){const $=new s({provider:p});return await q($),$}async function M($){const I=l($),N=g[I];if(!N)throw new Error(`No filter for index "${I}"`);return N.getChangesAndClear()}async function T($){const I=l($),N=g[I];if(!N)throw new Error(`No filter for index "${I}"`);let H=[];return N.type==="log"&&(H=N.getAllResults()),H}async function L($){const I=l($),H=!!g[I];return H&&await F(I),H}async function q($){const I=d(g).length,N=await o.getLatestBlock();await $.initialize({currentBlock:N}),v++,g[v]=$,$.id=v,$.idHex=c(v);const H=d(g).length;return V({prevFilterCount:I,newFilterCount:H}),v}async function F($){const I=d(g).length;delete g[$];const N=d(g).length;V({prevFilterCount:I,newFilterCount:N})}async function z(){const $=d(g).length;g={},V({prevFilterCount:$,newFilterCount:0})}function V({prevFilterCount:$,newFilterCount:I}){if($===0&&I>0){o.on("sync",_);return}if($>0&&I===0){o.removeListener("sync",_);return}}}function h(o){return y(async(...p)=>{const v=await o(...p);return c(v.id)})}function y(o){return t(async(p,v)=>{const g=await o.apply(null,p.params);v.result=g})}function a({mutex:o}){return p=>async(v,g,i,b)=>{(await o.acquire())(),p(v,g,i,b)}}function d(o,p){const v=[];for(let g in o)v.push(o[g]);return v}return gs}var bs,gu;function Cf(){if(gu)return bs;gu=1;const e=Ts().default,{createAsyncMiddleware:t,createScaffoldMiddleware:r}=hl(),n=kf(),{unsafeRandomBytes:f,incrementHexInt:s}=Jt(),c=js();bs=l;function l({blockTracker:h,provider:y}){const a={},d=n({blockTracker:h,provider:y});let o=!1;const p=new e,v=r({eth_subscribe:t(g),eth_unsubscribe:t(i)});return v.destroy=m,{events:p,middleware:v};async function g(_,S){if(o)throw new Error("SubscriptionManager - attempting to use after destroying");const k=_.params[0],R=f(16);let M;switch(k){case"newHeads":M=T({subId:R});break;case"logs":const q=_.params[1],F=await d.newLogFilter(q);M=L({subId:R,filter:F});break;default:throw new Error(`SubscriptionManager - unsupported subscription type "${k}"`)}a[R]=M,S.result=R;return;function T({subId:q}){const F={type:k,destroy:async()=>{h.removeListener("sync",F.update)},update:async({oldBlock:z,newBlock:V})=>{const $=V,I=s(z);(await c({provider:y,fromBlock:I,toBlock:$})).map(u).filter(W=>W!==null).forEach(W=>{b(q,W)})}};return h.on("sync",F.update),F}function L({subId:q,filter:F}){return F.on("update",V=>b(q,V)),{type:k,destroy:async()=>await d.uninstallFilter(F.idHex)}}}async function i(_,S){if(o)throw new Error("SubscriptionManager - attempting to use after destroying");const k=_.params[0],R=a[k];if(!R){S.result=!1;return}delete a[k],await R.destroy(),S.result=!0}function b(_,S){p.emit("notification",{jsonrpc:"2.0",method:"eth_subscription",params:{subscription:_,result:S}})}function m(){p.removeAllListeners();for(const _ in a)a[_].destroy(),delete a[_];o=!0}}function u(h){return h==null?null:{hash:h.hash,parentHash:h.parentHash,sha3Uncles:h.sha3Uncles,miner:h.miner,stateRoot:h.stateRoot,transactionsRoot:h.transactionsRoot,receiptsRoot:h.receiptsRoot,logsBloom:h.logsBloom,difficulty:h.difficulty,number:h.number,gasLim
7it:h.gasLimit,gasUsed:h.gasUsed,nonce:h.nonce,mixHash:h.mixHash,timestamp:h.timestamp,extraData:h.extraData}}return bs}var bu;function Af(){if(bu)return Mt;bu=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.SubscriptionManager=void 0;const e=af(),t=Cf(),r=()=>{};let n=class{constructor(s){const c=new e.PollingBlockTracker({provider:s,pollingInterval:15e3,setSkipCacheFlag:!0}),{events:l,middleware:u}=t({blockTracker:c,provider:s});this.events=l,this.subscriptionMiddleware=u}async handleRequest(s){const c={};return await this.subscriptionMiddleware(s,c,r,r),c}destroy(){this.subscriptionMiddleware.destroy()}};return Mt.SubscriptionManager=n,Mt}var yu;function vs(){if(yu)return Te;yu=1;var e=Te&&Te.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(Te,"__esModule",{value:!0}),Te.CoinbaseWalletProvider=void 0;const t=e(or()),r=_l(),n=ur(),f=Ce(),s=Uu(),c=Rs(),l=Is(),u=ws(),h=e(th()),y=Ss(),a=rh(),d=Af(),o="DefaultChainId",p="DefaultJsonRpcUrl";let v=class extends r.EventEmitter{constructor(i){var b,m;super(),this._filterPolyfill=new a.FilterPolyfill(this),this._subscriptionManager=new d.SubscriptionManager(this),this._relay=null,this._addresses=[],this.hasMadeFirstChainChangedEmission=!1,this.setProviderInfo=this.setProviderInfo.bind(this),this.updateProviderInfo=this.updateProviderInfo.bind(this),this.getChainId=this.getChainId.bind(this),this.setAppInfo=this.setAppInfo.bind(this),this.enable=this.enable.bind(this),this.close=this.close.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this),this.request=this.request.bind(this),this._setAddresses=this._setAddresses.bind(this),this.scanQRCode=this.scanQRCode.bind(this),this.genericRequest=this.genericRequest.bind(this),this._chainIdFromOpts=i.chainId,this._jsonRpcUrlFromOpts=i.jsonRpcUrl,this._overrideIsMetaMask=i.overrideIsMetaMask,this._relayProvider=i.relayProvider,this._storage=i.storage,this._relayEventManager=i.relayEventManager,this.diagnostic=i.diagnosticLogger,this.reloadOnDisconnect=!0,this.isCoinbaseWallet=(b=i.overrideIsCoinbaseWallet)!==null&&b!==void 0?b:!0,this.isCoinbaseBrowser=(m=i.overrideIsCoinbaseBrowser)!==null&&m!==void 0?m:!1,this.qrUrl=i.qrUrl;const _=this.getChainId(),S=(0,f.prepend0x)(_.toString(16));this.emit("connect",{chainIdStr:S});const k=this._storage.getItem(c.LOCAL_STORAGE_ADDRESSES_KEY);if(k){const R=k.split(" ");R[0]!==""&&(this._addresses=R.map(M=>(0,f.ensureAddressString)(M)),this.emit("accountsChanged",R))}this._subscriptionManager.events.on("notification",R=>{this.emit("message",{type:R.method,data:R.params})}),this._isAuthorized()&&this.initializeRelay(),window.addEventListener("message",R=>{var M;if(!(R.origin!==location.origin||R.source!==window)&&R.data.type==="walletLinkMessage"&&R.data.data.action==="dappChainSwitched"){const T=R.data.data.chainId,L=(M=R.data.data.jsonRpcUrl)!==null&&M!==void 0?M:this.jsonRpcUrl;this.updateProviderInfo(L,Number(T))}})}get selectedAddress(){return this._addresses[0]||void 0}get networkVersion(){return this.getChainId().toString(10)}get chainId(){return(0,f.prepend0x)(this.getChainId().toString(16))}get isWalletLink(){return!0}get isMetaMask(){return this._overrideIsMetaMask}get host(){return this.jsonRpcUrl}get connected(){return!0}isConnected(){return!0}get jsonRpcUrl(){var i;return(i=this._storage.getItem(p))!==null&&i!==void 0?i:this._jsonRpcUrlFromOpts}set jsonRpcUrl(i){this._storage.setItem(p,i)}disableReloadOnDisconnect(){this.reloadOnDisconnect=!1}setProviderInfo(i,b){this.isCoinbaseBrowser||(this._chainIdFromOpts=b,this._jsonRpcUrlFromOpts=i),this.updateProviderInfo(this.jsonRpcUrl,this.getChainId())}updateProviderInfo(i,b){this.jsonRpcUrl=i;const m=this.getChainId();this._storage.setItem(o,b.toString(10)),((0,f.ensureIntNumber)(b)!==m||!this.hasMadeFirstChainChangedEmission)&&(this.emit("chainChanged",this.getChainId()),this.hasMadeFirstChainChangedEmission=!0)}async watchAsset(i,b,m,_,S,k){const M=await(await this.initializeRelay()).watchAsset(i,b,m,_,S,k==null?void 0:k.toString()).promise;return(0,u.isErrorResponse)(M)?!1:!!M.result}async addEthereumChain(i,b,m,_,S,k){var R,M;if((0,f.ensureIntNumber)(i)===this.getChainId())return!1;const T=await this.initializeRelay(),L=T.inlineAddEthereumChain(i.toString());!this._isAuthorized()&&!L&&await T.requestEthereumAccounts().promise;const q=await T.addEthereumChain(i.toString(),b,S,m,_,k).promise;return(0,u.isErrorResponse)(q)?!1:(((R=q.result)===null||R===void 0?void 0:R.isApproved)===!0&&this.updateProviderInfo(b[0],i),((M=q.result)===null||M===void 0?void 0:M.isApproved)===!0)}async switchEthereumChain(i){const m=await(await this.initializeRelay()).switchEthereumChain(i.toString(10),this.selectedAddress||void 0).promise;if((0,u.isErrorResponse)(m)){if(!m.errorCode)return;throw m.errorCode===n.standardErrorCodes.provider.unsupportedChain?n.standardErrors.provider.unsupportedChain():n.standardErrors.provider.custom({message:m.errorMessage,code:m.errorCode})}const _=m.result;_.isApproved&&_.rpcUrl.length>0&&this.updateProviderInfo(_.rpcUrl,i)}setAppInfo(i,b){this.initializeRelay().then(m=>m.setAppInfo(i,b))}async enable(){var i;return(i=this.diagnostic)===null||i===void 0||i.log(y.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::enable",addresses_length:this._addresses.length,sessionIdHash:this._relay?l.Session.hash(this._relay.session.id):void 0}),this._isAuthorized()?[...this._addresses]:await this.send("eth_requestAccounts")}async close(){(await this.initializeRelay()).resetAndReload()}send(i,b){try{const m=this._send(i,b);
7if(m instanceof Promise)return m.catch(_=>{throw(0,n.serializeError)(_,i)})}catch(m){throw(0,n.serializeError)(m,i)}}_send(i,b){if(typeof i=="string"){const _=i,S=Array.isArray(b)?b:b!==void 0?[b]:[],k={jsonrpc:"2.0",id:0,method:_,params:S};return this._sendRequestAsync(k).then(R=>R.result)}if(typeof b=="function"){const _=i,S=b;return this._sendAsync(_,S)}if(Array.isArray(i))return i.map(S=>this._sendRequest(S));const m=i;return this._sendRequest(m)}async sendAsync(i,b){try{return this._sendAsync(i,b).catch(m=>{throw(0,n.serializeError)(m,i)})}catch(m){return Promise.reject((0,n.serializeError)(m,i))}}async _sendAsync(i,b){if(typeof b!="function")throw new Error("callback is required");if(Array.isArray(i)){const _=b;this._sendMultipleRequestsAsync(i).then(S=>_(null,S)).catch(S=>_(S,null));return}const m=b;return this._sendRequestAsync(i).then(_=>m(null,_)).catch(_=>m(_,null))}async request(i){try{return this._request(i).catch(b=>{throw(0,n.serializeError)(b,i.method)})}catch(b){return Promise.reject((0,n.serializeError)(b,i.method))}}async _request(i){if(!i||typeof i!="object"||Array.isArray(i))throw n.standardErrors.rpc.invalidRequest({message:"Expected a single, non-array, object argument.",data:i});const{method:b,params:m}=i;if(typeof b!="string"||b.length===0)throw n.standardErrors.rpc.invalidRequest({message:"'args.method' must be a non-empty string.",data:i});if(m!==void 0&&!Array.isArray(m)&&(typeof m!="object"||m===null))throw n.standardErrors.rpc.invalidRequest({message:"'args.params' must be an object or array if provided.",data:i});const _=m===void 0?[]:m,S=this._relayEventManager.makeRequestId();return(await this._sendRequestAsync({method:b,params:_,jsonrpc:"2.0",id:S})).result}async scanQRCode(i){const m=await(await this.initializeRelay()).scanQRCode((0,f.ensureRegExpString)(i)).promise;if((0,u.isErrorResponse)(m))throw(0,n.serializeError)(m.errorMessage,"scanQRCode");if(typeof m.result!="string")throw(0,n.serializeError)("result was not a string","scanQRCode");return m.result}async genericRequest(i,b){const _=await(await this.initializeRelay()).genericRequest(i,b).promise;if((0,u.isErrorResponse)(_))throw(0,n.serializeError)(_.errorMessage,"generic");if(typeof _.result!="string")throw(0,n.serializeError)("result was not a string","generic");return _.result}async connectAndSignIn(i){var b;(b=this.diagnostic)===null||b===void 0||b.log(y.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::connectAndSignIn",sessionIdHash:this._relay?l.Session.hash(this._relay.session.id):void 0});let m;try{const S=await this.initializeRelay();if(!(S instanceof s.MobileRelay))throw new Error("connectAndSignIn is only supported on mobile");if(m=await S.connectAndSignIn(i).promise,(0,u.isErrorResponse)(m))throw new Error(m.errorMessage)}catch(S){throw typeof S.message=="string"&&S.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied account authorization"):S}if(!m.result)throw new Error("accounts received is empty");const{accounts:_}=m.result;return this._setAddresses(_),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),m.result}async selectProvider(i){const m=await(await this.initializeRelay()).selectProvider(i).promise;if((0,u.isErrorResponse)(m))throw(0,n.serializeError)(m.errorMessage,"selectProvider");if(typeof m.result!="string")throw(0,n.serializeError)("result was not a string","selectProvider");return m.result}supportsSubscriptions(){return!1}subscribe(){throw new Error("Subscriptions are not supported")}unsubscribe(){throw new Error("Subscriptions are not supported")}disconnect(){return!0}_sendRequest(i){const b={jsonrpc:"2.0",id:i.id},{method:m}=i;if(b.result=this._handleSynchronousMethods(i),b.result===void 0)throw new Error(`Coinbase Wallet does not support calling ${m} synchronously without a callback. Please provide a callback parameter to call ${m} asynchronously.`);return b}_setAddresses(i,b){if(!Array.isArray(i))throw new Error("addresses is not an array");const m=i.map(_=>(0,f.ensureAddressString)(_));JSON.stringify(m)!==JSON.stringify(this._addresses)&&(this._addresses=m,this.emit
7("accountsChanged",this._addresses),this._storage.setItem(c.LOCAL_STORAGE_ADDRESSES_KEY,m.join(" ")))}_sendRequestAsync(i){return new Promise((b,m)=>{try{const _=this._handleSynchronousMethods(i);if(_!==void 0)return b({jsonrpc:"2.0",id:i.id,result:_});const S=this._handleAsynchronousFilterMethods(i);if(S!==void 0){S.then(R=>b(Object.assign(Object.assign({},R),{id:i.id}))).catch(R=>m(R));return}const k=this._handleSubscriptionMethods(i);if(k!==void 0){k.then(R=>b({jsonrpc:"2.0",id:i.id,result:R.result})).catch(R=>m(R));return}}catch(_){return m(_)}this._handleAsynchronousMethods(i).then(_=>_&&b(Object.assign(Object.assign({},_),{id:i.id}))).catch(_=>m(_))})}_sendMultipleRequestsAsync(i){return Promise.all(i.map(b=>this._sendRequestAsync(b)))}_handleSynchronousMethods(i){const{method:b}=i,m=i.params||[];switch(b){case"eth_accounts":return this._eth_accounts();case"eth_coinbase":return this._eth_coinbase();case"eth_uninstallFilter":return this._eth_uninstallFilter(m);case"net_version":return this._net_version();case"eth_chainId":return this._eth_chainId();default:return}}async _handleAsynchronousMethods(i){const{method:b}=i,m=i.params||[];switch(b){case"eth_requestAccounts":return this._eth_requestAccounts();case"eth_sign":return this._eth_sign(m);case"eth_ecRecover":return this._eth_ecRecover(m);case"personal_sign":return this._personal_sign(m);case"personal_ecRecover":return this._personal_ecRecover(m);case"eth_signTransaction":return this._eth_signTransaction(m);case"eth_sendRawTransaction":return this._eth_sendRawTransaction(m);case"eth_sendTransaction":return this._eth_sendTransaction(m);case"eth_signTypedData_v1":return this._eth_signTypedData_v1(m);case"eth_signTypedData_v2":return this._throwUnsupportedMethodError();case"eth_signTypedData_v3":return this._eth_signTypedData_v3(m);case"eth_signTypedData_v4":case"eth_signTypedData":return this._eth_signTypedData_v4(m);case"cbWallet_arbitrary":return this._cbwallet_arbitrary(m);case"wallet_addEthereumChain":return this._wallet_addEthereumChain(m);case"wallet_switchEthereumChain":return this._wallet_switchEthereumChain(m);case"wallet_watchAsset":return this._wallet_watchAsset(m)}return(await this.initializeRelay()).makeEthereumJSONRPCRequest(i,this.jsonRpcUrl).catch(S=>{var k;throw(S.code===n.standardErrorCodes.rpc.methodNotFound||S.code===n.standardErrorCodes.rpc.methodNotSupported)&&((k=this.diagnostic)===null||k===void 0||k.log(y.EVENTS.METHOD_NOT_IMPLEMENTED,{method:i.method,sessionIdHash:this._relay?l.Session.hash(this._relay.session.id):void 0})),S})}_handleAsynchronousFilterMethods(i){const{method:b}=i,m=i.params||[];switch(b){case"eth_newFilter":return this._eth_newFilter(m);case"eth_newBlockFilter":return this._eth_newBlockFilter();case"eth_newPendingTransactionFilter":return this._eth_newPendingTransactionFilter();case"eth_getFilterChanges":return this._eth_getFilterChanges(m);case"eth_getFilterLogs":return this._eth_getFilterLogs(m)}}_handleSubscriptionMethods(i){switch(i.method){case"eth_subscribe":case"eth_unsubscribe":return this._subscriptionManager.handleRequest(i)}}_isKnownAddress(i){try{const b=(0,f.ensureAddressString)(i);return this._addresses.map(_=>(0,f.ensureAddressString)(_)).includes(b)}catch{}return!1}_ensureKnownAddress(i){var b;if(!this._isKnownAddress(i))throw(b=this.diagnostic)===null||b===void 0||b.log(y.EVENTS.UNKNOWN_ADDRESS_ENCOUNTERED),new Error("Unknown Ethereum address")}_prepareTransactionParams(i){const b=i.from?(0,f.ensureAddressString)(i.from):this.selectedAddress;if(!b)throw new Error("Ethereum address is unavailable");this._ensureKnownAddress(b);const m=i.to?(0,f.ensureAddressString)(i.to):null,_=i.value!=null?(0,f.ensureBN)(i.value):new t.default(0),S=i.data?(0,f.ensureBuffer)(i.data):Buffer.alloc(0),k=i.nonce!=null?(0,f.ensureIntNumber)(i.nonce):null,R=i.gasPrice!=null?(0,f.ensureBN)(i.gasPrice):null,M=i.maxFeePerGas!=null?(0,f.ensureBN)(i.maxFeePerGas):null,T=i.maxPriorityFeePerGas!=null?(0,f.ensureBN)(i.maxPriorityFeePerGas):null,L=i.gas!=null?(0,f.ensureBN)(i.gas):null,q=i.chainId?(0,f.ensureIntNumber)(i.chainId):this.getChainId();return{fromAddress:b,toAddress:m,weiValue:_,data:S,nonce:k,gasPriceInWei:R,maxFeePerGas:M,maxPriorityFeePerGas:T,gasLim
7it:L,chainId:q}}_isAuthorized(){return this._addresses.length>0}_requireAuthorization(){if(!this._isAuthorized())throw n.standardErrors.provider.unauthorized({})}_throwUnsupportedMethodError(){throw n.standardErrors.provider.unsupportedMethod({})}async _signEthereumMessage(i,b,m,_){this._ensureKnownAddress(b);try{const k=await(await this.initializeRelay()).signEthereumMessage(i,b,m,_).promise;if((0,u.isErrorResponse)(k))throw new Error(k.errorMessage);return{jsonrpc:"2.0",id:0,result:k.result}}catch(S){throw typeof S.message=="string"&&S.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied message signature"):S}}async _ethereumAddressFromSignedMessage(i,b,m){const S=await(await this.initializeRelay()).ethereumAddressFromSignedMessage(i,b,m).promise;if((0,u.isErrorResponse)(S))throw new Error(S.errorMessage);return{jsonrpc:"2.0",id:0,result:S.result}}_eth_accounts(){return[...this._addresses]}_eth_coinbase(){return this.selectedAddress||null}_net_version(){return this.getChainId().toString(10)}_eth_chainId(){return(0,f.hexStringFromIntNumber)(this.getChainId())}getChainId(){const i=this._storage.getItem(o);if(!i)return(0,f.ensureIntNumber)(this._chainIdFromOpts);const b=parseInt(i,10);return(0,f.ensureIntNumber)(b)}async _eth_requestAccounts(){var i;if((i=this.diagnostic)===null||i===void 0||i.log(y.EVENTS.ETH_ACCOUNTS_STATE,{method:"provider::_eth_requestAccounts",addresses_length:this._addresses.length,sessionIdHash:this._relay?l.Session.hash(this._relay.session.id):void 0}),this._isAuthorized())return Promise.resolve({jsonrpc:"2.0",id:0,result:this._addresses});let b;try{if(b=await(await this.initializeRelay()).requestEthereumAccounts().promise,(0,u.isErrorResponse)(b))throw new Error(b.errorMessage)}catch(m){throw typeof m.message=="string"&&m.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied account authorization"):m}if(!b.result)throw new Error("accounts received is empty");return this._setAddresses(b.result),this.isCoinbaseBrowser||await this.switchEthereumChain(this.getChainId()),{jsonrpc:"2.0",id:0,result:this._addresses}}_eth_sign(i){this._requireAuthorization();const b=(0,f.ensureAddressString)(i[0]),m=(0,f.ensureBuffer)(i[1]);return this._signEthereumMessage(m,b,!1)}_eth_ecRecover(i){const b=(0,f.ensureBuffer)(i[0]),m=(0,f.ensureBuffer)(i[1]);return this._ethereumAddressFromSignedMessage(b,m,!1)}_personal_sign(i){this._requireAuthorization();const b=(0,f.ensureBuffer)(i[0]),m=(0,f.ensureAddressString)(i[1]);return this._signEthereumMessage(b,m,!0)}_personal_ecRecover(i){const b=(0,f.ensureBuffer)(i[0]),m=(0,f.ensureBuffer)(i[1]);return this._ethereumAddressFromSignedMessage(b,m,!0)}async _eth_signTransaction(i){this._requireAuthorization();const b=this._prepareTransactionParams(i[0]||{});try{const _=await(await this.initializeRelay()).signEthereumTransaction(b).promise;if((0,u.isErrorResponse)(_))throw new Error(_.errorMessage);return{jsonrpc:"2.0",id:0,result:_.result}}catch(m){throw typeof m.message=="string"&&m.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied transaction signature"):m}}async _eth_sendRawTransaction(i){const b=(0,f.ensureBuffer)(i[0]),_=await(await this.initializeRelay()).submitEthereumTransaction(b,this.getChainId()).promise;if((0,u.isErrorResponse)(_))throw new Error(_.errorMessage);return{jsonrpc:"2.0",id:0,result:_.result}}async _eth_sendTransaction(i){this._requireAuthorization();const b=this._prepareTransactionParams(i[0]||{});try{const _=await(await this.initializeRelay()).signAndSubmitEthereumTransaction(b).promise;if((0,u.isErrorResponse)(_))throw new Error(_.errorMessage);return{jsonrpc:"2.0",id:0,result:_.result}}catch(m){throw typeof m.message=="string"&&m.message.match(/(denied|rejected)/i)?n.standardErrors.provider.userRejectedRequest("User denied transaction signature"):m}}async _eth_signTypedData_v1(i){this._requireAuthorization();const b=(0,f.ensureParsedJSONObject)(i[0]),m=(0,f.ensureAddressString)(i[1]);this._ensureKnownAddress(m);const _=h.default.hashForSignTypedDataLegacy({data:b}),S=JSON.stringify(b,null,2);return this._signEthereumMessage(_,m,!1,S)}async _eth_signTypedData_v3(i){this._requireAuthorization();const b=(0,f.ensureAddressString)(i[0]),m=(0,f.ensureParsedJSONObject)(i[1]);this._ensureKnownAddress(b);const _=h.default.hashForSignTypedData_v3({data:m}),S=JSON.stringify(m,null,2);return this._signEthereumMessage(_,b,!1,S)}async _eth_signTypedData_v4(i){this._requireAuthorization();const b=(0,f.ensureAddressString)(i[0]),m=(0,f.ensureParsedJSONObject)(i[1]);this._ensureKnownAddress(b);const _=h.default.hashForSignTypedData_v4({data:m}),S=JSON.stringify(m,null,2);return this._signEthereumMessage(_,b,!1,S)}async _cbwallet_arbitrary(i){const b=i[0],m=i[1];if(typeof m!="string")throw new Error("parameter must be a string");if(typeof b!="object"||b===null)throw new Error("parameter must be an object");return{jsonrpc:"2.0",id:0,result:await this.genericRequest(b,m)}}async _wallet_addEthereumChain(i){var b,m,_,S;const k=i[0];if(((b=k.rpcUrls)===null||b===void 0?void 0:b.length)===0)return{jsonrpc:"2.0",id:0,error:{code:2,message:"please pass in at least 1 rpcUrl"}};if(!k.chainName||k.chainName.trim()==="")throw n.standardErrors.rpc.invalidParams("chainName is a required field");if(!k.nativeCurrency)throw n.standardErrors.rpc.invalidParams("nativeCurrency is a required field");const R=parseInt(k.chainId,16);return await this.addEthereumChain(R,(m=k.rpcUrls)!==null&&m!==void 0?m:[],(_=k.blockExplorerUrls)!==null&&_!==void 0?_:[],k.chainName,(S=k.iconUrls)!==null&&S!==void 0?S:[],k.nativeCurrency)?{jsonrpc:"2.0",id:0,result:null}:{jsonrpc:"2.0",id:0,error:{code:2,message:"unable to add ethereum chain"}}}async _wallet_switchEthereumChain(i){const b=i[0];return await this.switchEthereumChain(parseInt(b.chainId,16)),{jsonrpc:"2.0",id:0,result:null}}async _wallet_watchAsset(i){const b=Array.isArray(i)?i[0]:i;if(!b.type)throw n.standardErrors.rpc.invalidParams("Type is required");if((b==null?void 0:b.type)!=="ERC20")throw n.standardErrors.rpc.invalidParams(`Asset of type '${b.type}' is not supported`);if(!(b!=null&&b.options))throw n.standardErrors.rpc.invalidParams("Options are required");if(!(b!=null&&b.options.address))throw n.standardErrors.rpc.invalidParams("Address is required");
7const m=this.getChainId(),{address:_,symbol:S,image:k,decimals:R}=b.options;return{jsonrpc:"2.0",id:0,result:await this.watchAsset(b.type,_,S,R,k,m)}}_eth_uninstallFilter(i){const b=(0,f.ensureHexString)(i[0]);return this._filterPolyfill.uninstallFilter(b)}async _eth_newFilter(i){const b=i[0];return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newFilter(b)}}async _eth_newBlockFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newBlockFilter()}}async _eth_newPendingTransactionFilter(){return{jsonrpc:"2.0",id:0,result:await this._filterPolyfill.newPendingTransactionFilter()}}_eth_getFilterChanges(i){const b=(0,f.ensureHexString)(i[0]);return this._filterPolyfill.getFilterChanges(b)}_eth_getFilterLogs(i){const b=(0,f.ensureHexString)(i[0]);return this._filterPolyfill.getFilterLogs(b)}initializeRelay(){return this._relay?Promise.resolve(this._relay):this._relayProvider().then(i=>(i.setAccountsCallback((b,m)=>this._setAddresses(b,m)),i.setChainCallback((b,m)=>{this.updateProviderInfo(m,parseInt(b,10))}),i.setDappDefaultChainCallback(this._chainIdFromOpts),this._relay=i,i))}};return Te.CoinbaseWalletProvider=v,Te}var Ft={},vu;function If(){if(vu)return Ft;vu=1,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.RelayEventManager=void 0;const e=Ce();let t=class{constructor(){this._nextRequestId=0,this.callbacks=new Map}makeRequestId(){this._nextRequestId=(this._nextRequestId+1)%2147483647;const n=this._nextRequestId,f=(0,e.prepend0x)(n.toString(16));return this.callbacks.get(f)&&this.callbacks.delete(f),n}};return Ft.RelayEventManager=t,Ft}var mu;function _u(){if(mu)return it;mu=1,Object.defineProperty(it,"__esModule",{value:!0}),it.CoinbaseWalletSDK=void 0;const e=kl(),t=Cl(),r=Ce(),n=Ml(),f=vs(),s=Uu(),c=ju(),l=If(),u=qu(),h=Fu(),y=Es();let a=class pl{constructor(o){var p,v,g;this._appName="",this._appLogoUrl=null,this._relay=null,this._relayEventManager=null;const i=o.linkAPIUrl||t.LINK_API_URL;typeof o.overrideIsMetaMask>"u"?this._overrideIsMetaMask=!1:this._overrideIsMetaMask=o.overrideIsMetaMask,this._overrideIsCoinbaseWallet=(p=o.overrideIsCoinbaseWallet)!==null&&p!==void 0?p:!0,this._overrideIsCoinbaseBrowser=(v=o.overrideIsCoinbaseBrowser)!==null&&v!==void 0?v:!1,this._diagnosticLogger=o.diagnosticLogger,this._reloadOnDisconnect=(g=o.reloadOnDisconnect)!==null&&g!==void 0?g:!0;const b=new URL(i),m=`${b.protocol}//${b.host}`;if(this._storage=new n.ScopedLocalStorage(`-walletlink:${m}`),this._storage.setItem("version",pl.VERSION),this.walletExtension||this.coinbaseBrowser)return;this._relayEventManager=new l.RelayEventManager;const _=(0,r.isMobileWeb)(),S=o.uiConstructor||(R=>_?new c.MobileRelayUI(R):new u.WalletLinkRelayUI(R)),k={linkAPIUrl:i,version:y.LIB_VERSION,darkMode:!!o.darkMode,headlessMode:!!o.headlessMode,uiConstructor:S,storage:this._storage,relayEventManager:this._relayEventManager,diagnosticLogger:this._diagnosticLogger,reloadOnDisconnect:this._reloadOnDisconnect,enableMobileWalletLink:o.enableMobileWalletLink};this._relay=_?new s.MobileRelay(k):new h.WalletLinkRelay(k),this.setAppInfo(o.appName,o.appLogoUrl),!o.headlessMode&&this._relay.attachUI()}makeWeb3Provider(o="",p=1){const v=this.walletExtension;if(v)return this.isCipherProvider(v)||v.setProviderInfo(o,p),this._reloadOnDisconnect===!1&&typeof v.disableReloadOnDisconnect=="function"&&v.disableReloadOnDisconnect(),v;const g=this.coinbaseBrowser;if(g)return g;const i=this._relay;if(!i||!this._relayEventManager||!this._storage)throw new Error("Relay not initialized, should never happen");return o||i.setConnectDisabled(!0),new f.CoinbaseWalletProvider({relayProvider:()=>Promise.resolve(i),relayEventManager:this._relayEventManager,storage:this._storage,jsonRpcUrl:o,chainId:p,qrUrl:this.getQrUrl(),diagnosticLogger:this._diagnosticLogger,overrideIsMetaMask:this._overrideIsMetaMask,overrideIsCoinbaseWallet:this._overrideIsCoinbaseWallet,overrideIsCoinbaseBrowser:this._overrideIsCoinbaseBrowser})}setAppInfo(o,p){var v;this._appName=o||"DApp",this._appLogoUrl=p||(0,r.getFavicon)();const g=this.walletExtension;g?this.isCipherProvider(g)||g.setAppInfo(this._appName,this._appLogoUrl):(v=this._relay)===null||v===void 0||v.setAppInfo(this._appName,this._appLogoUrl)}disconnect(){var o;const p=this===null||this===void 0?void 0:this.walletExtension;p?p.close():(o=this._relay)===null||o===void 0||o.resetAndReload()}getQrUrl(){var o,p;return(p=(o=this._relay)===null||o===void 0?void 0:o.getQRCodeUrl())!==null&&p!==void 0?p:null}getCoinbaseWalletLogo(o,p=240){return(0,e.walletLogo)(o,p)}get walletExtension(){var o;return(o=window.coinbaseWalletExtension)!==null&&o!==void 0?o:window.walletLinkExtension}get coinbaseBrowser(){var o,p;try{const v=(o=window.ethereum)!==null&&o!==void 0?o:(p=window.top)===null||p===void 0?void 0:p.ethereum;return v&&"isCoinbaseBrowser"in v&&v.isCoinbaseBrowser?v:void 0}catch{return}}isCipherProvider(o){return typeof o.isCipher=="boolean"&&o.isCipher}};return it.CoinbaseWalletSDK=a,a.VERSION=y.LIB_VERSION,it}var wu;function Mf(){return wu||(wu=1,(function(e){Object.defineProperty(e,"__esMo
7dule",{value:!0}),e.CoinbaseWalletProvider=e.CoinbaseWalletSDK=void 0;const t=_u(),r=vs();var n=_u();Object.defineProperty(e,"CoinbaseWalletSDK",{enumerable:!0,get:function(){return n.CoinbaseWalletSDK}});var f=vs();Object.defineProperty(e,"CoinbaseWalletProvider",{enumerable:!0,get:function(){return f.CoinbaseWalletProvider}}),e.default=t.CoinbaseWalletSDK,typeof window<"u"&&(window.CoinbaseWalletSDK=t.CoinbaseWalletSDK,window.CoinbaseWalletProvider=r.CoinbaseWalletProvider,window.WalletLink=t.CoinbaseWalletSDK,window.WalletLinkProvider=r.CoinbaseWalletProvider)})(dn)),dn}var gl=Mf();const xf=wl(gl),Qf=Rl({__proto__:null,default:xf},[gl]);export{Qf as i};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.